From affa7292281b73741d8ad9672b800ac5571dceb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Fri, 20 Feb 2026 19:10:17 +0100 Subject: [PATCH 1/4] Default to light theme if bg is transparent --- changelog.md | 4 + js-applet/src/graph-widget.tsx | 184 +++++++++--------- justfile | 3 + python-wrapper/src/neo4j_viz/nvl.py | 2 + .../resources/nvl_entrypoint/index.html | 2 +- .../resources/nvl_entrypoint/widget.js | 13 +- .../src/neo4j_viz/visualization_graph.py | 11 +- python-wrapper/src/neo4j_viz/widget.py | 5 + python-wrapper/uv.lock | 2 +- 9 files changed, 131 insertions(+), 95 deletions(-) diff --git a/changelog.md b/changelog.md index f33527e..14d0d03 100644 --- a/changelog.md +++ b/changelog.md @@ -8,7 +8,11 @@ ## Bug fixes +* Fixed a bug with the theme detection. In VSCode the output would always be in dark theme as the reported background color was always reported as `rgba(0, 0, 0, 0)`. + ## Improvements +* Allow setting the theme manually in `VG.render(theme="light")` and `VG.render_widget(theme="dark")`. + ## Other changes diff --git a/js-applet/src/graph-widget.tsx b/js-applet/src/graph-widget.tsx index 3a7f00e..6b89a09 100644 --- a/js-applet/src/graph-widget.tsx +++ b/js-applet/src/graph-widget.tsx @@ -1,119 +1,125 @@ -import { createRender, useModelState } from "@anywidget/react"; +import {createRender, useModelState} from "@anywidget/react"; import "@neo4j-ndl/base/lib/neo4j-ds-styles.css"; -import { GraphVisualization } from "@neo4j-ndl/react-graph"; -import type { Layout, NvlOptions } from "@neo4j-nvl/base"; -import { useEffect, useMemo, useState } from "react"; +import {GraphVisualization} from "@neo4j-ndl/react-graph"; +import type {Layout, NvlOptions} from "@neo4j-nvl/base"; +import {useEffect, useMemo, useState} from "react"; import { - SerializedNode, - SerializedRelationship, - transformNodes, - transformRelationships, + SerializedNode, + SerializedRelationship, + transformNodes, + transformRelationships, } from "./data-transforms"; -import { GraphErrorBoundary } from "./graph-error-boundary"; +import {GraphErrorBoundary} from "./graph-error-boundary"; export type Theme = "dark" | "light" | "auto"; export type GraphOptions = { - layout?: Layout; - nvlOptions?: Partial; - zoom?: number; - pan?: { x: number; y: number }; - layoutOptions?: Record; + layout?: Layout; + nvlOptions?: Partial; + zoom?: number; + pan?: { x: number; y: number }; + layoutOptions?: Record; }; export type WidgetData = { - nodes: SerializedNode[]; - relationships: SerializedRelationship[]; - options: GraphOptions; - height: string; - width: string; - theme: Theme; + nodes: SerializedNode[]; + relationships: SerializedRelationship[]; + options: GraphOptions; + height: string; + width: string; + theme: Theme; }; function detectTheme(): "light" | "dark" { - const backgroundColorString = window - .getComputedStyle(document.body, null) - .getPropertyValue("background-color"); - const colorsArray = backgroundColorString.match(/\d+/g); - if (!colorsArray || colorsArray.length < 3) { - return "light"; - } - const brightness = - Number(colorsArray[0]) * 0.2126 + - Number(colorsArray[1]) * 0.7152 + - Number(colorsArray[2]) * 0.0722; - return brightness < 128 ? "dark" : "light"; + const backgroundColorString = window + .getComputedStyle(document.body, null) + .getPropertyValue("background-color"); + const colorsArray = backgroundColorString.match(/\d+/g); + if (!colorsArray || colorsArray.length < 3) { + return "light"; + } + const brightness = + Number(colorsArray[0]) * 0.2126 + + Number(colorsArray[1]) * 0.7152 + + Number(colorsArray[2]) * 0.0722; + + // VSCode reports: rgba(0, 0, 0, 0) as the background color independent of the theme, default to light here + if (brightness === 0 && colorsArray.length > 3 && colorsArray[3] === "0") { + return "light"; + } + + return brightness < 128 ? "dark" : "light"; } function useTheme(theme: Theme) { - useEffect(() => { - const resolved = theme === "auto" ? detectTheme() : theme; - document.documentElement.className = `ndl-theme-${resolved}`; - }, [theme]); + useEffect(() => { + const resolved = theme === "auto" ? detectTheme() : theme; + document.documentElement.className = `ndl-theme-${resolved}`; + }, [theme]); } function GraphWidget() { - const [nodes] = useModelState("nodes"); - const [relationships] = - useModelState("relationships"); - const [options] = useModelState("options"); - const [height] = useModelState("height"); - const [width] = useModelState("width"); - const [theme] = useModelState("theme"); + const [nodes] = useModelState("nodes"); + const [relationships] = + useModelState("relationships"); + const [options] = useModelState("options"); + const [height] = useModelState("height"); + const [width] = useModelState("width"); + const [theme] = useModelState("theme"); - useTheme(theme ?? "auto"); + useTheme(theme ?? "auto"); - const { layout, nvlOptions, zoom, pan, layoutOptions } = options ?? {}; - const [neoNodes, neoRelationships] = useMemo( - () => [ - transformNodes(nodes ?? []), - transformRelationships(relationships ?? []), - ], - [nodes, relationships], - ); + const {layout, nvlOptions, zoom, pan, layoutOptions} = options ?? {}; + const [neoNodes, neoRelationships] = useMemo( + () => [ + transformNodes(nodes ?? []), + transformRelationships(relationships ?? []), + ], + [nodes, relationships], + ); - const nvlOptionsWithoutWorkers = useMemo( - () => ({ - ...nvlOptions, - minZoom: 0, - maxZoom: 1000, - disableWebWorkers: true, - }), - [nvlOptions], - ); - const [isSidePanelOpen, setIsSidePanelOpen] = useState(false); - const [sidePanelWidth, setSidePanelWidth] = useState(300); + const nvlOptionsWithoutWorkers = useMemo( + () => ({ + ...nvlOptions, + minZoom: 0, + maxZoom: 1000, + disableWebWorkers: true, + }), + [nvlOptions], + ); + const [isSidePanelOpen, setIsSidePanelOpen] = useState(false); + const [sidePanelWidth, setSidePanelWidth] = useState(300); - return ( -
- , - }} - /> -
- ); + return ( +
+ , + }} + /> +
+ ); } function GraphWidgetWithErrorBoundary() { - return ( - - - - ); + return ( + + + + ); } const render = createRender(GraphWidgetWithErrorBoundary); -export default { render }; +export default {render}; diff --git a/justfile b/justfile index f03074d..efc7cb5 100644 --- a/justfile +++ b/justfile @@ -39,6 +39,9 @@ js-dev: js-rebuild: ./scripts/clean_js_applet.sh && ./scripts/build_js_applet.sh +js-build: + ./scripts/build_js_applet.sh + streamlit: ./scripts/run_streamlit_example.sh diff --git a/python-wrapper/src/neo4j_viz/nvl.py b/python-wrapper/src/neo4j_viz/nvl.py index 372ac72..ffabec8 100644 --- a/python-wrapper/src/neo4j_viz/nvl.py +++ b/python-wrapper/src/neo4j_viz/nvl.py @@ -38,12 +38,14 @@ def render( render_options: RenderOptions, width: str, height: str, + theme: str, ) -> HTML: data_dict: dict[str, object] = { "nodes": [_serialize_entity(node) for node in nodes], "relationships": [_serialize_entity(rel) for rel in relationships], "width": width, "height": height, + "theme": theme, "options": render_options.to_js_options(), } data_json = json.dumps(data_dict) diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html index f899f06..2bad432 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html @@ -1550,7 +1550,7 @@ * * @preserve */var dle=hx.exports,N9;function hle(){return N9||(N9=1,(function(r,e){(function(t,n){r.exports=n()})(dle,(function(){for(var t=function(K,oe,ye){return oe===void 0&&(oe=0),ye===void 0&&(ye=1),Kye?ye:K},n=t,i=function(K){K._clipped=!1,K._unclipped=K.slice(0);for(var oe=0;oe<=3;oe++)oe<3?((K[oe]<0||K[oe]>255)&&(K._clipped=!0),K[oe]=n(K[oe],0,255)):oe===3&&(K[oe]=n(K[oe],0,1));return K},a={},o=0,s=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(K):c(K[0])=="object"&&oe?oe.split("").filter(function(ye){return K[0][ye]!==void 0}).map(function(ye){return K[0][ye]}):K[0]},d=l,h=function(K){if(K.length<2)return null;var oe=K.length-1;return d(K[oe])=="string"?K[oe].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:t,type:l,unpack:f,last:h,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,_=g.clip_rgb,m=g.type,x=y,S=function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];var Pe=this;if(m(oe[0])==="object"&&oe[0].constructor&&oe[0].constructor===this.constructor)return oe[0];var ze=b(oe),Ge=!1;if(!ze){Ge=!0,x.sorted||(x.autodetect=x.autodetect.sort(function(dt,qt){return qt.p-dt.p}),x.sorted=!0);for(var Be=0,Ke=x.autodetect;Be4?K[4]:1;return Ge===1?[0,0,0,Be]:[ye>=1?0:255*(1-ye)*(1-Ge),Pe>=1?0:255*(1-Pe)*(1-Ge),ze>=1?0:255*(1-ze)*(1-Ge),Be]},z=j,H=T,q=O,W=y,$=g.unpack,J=g.type,X=L;q.prototype.cmyk=function(){return X(this._rgb)},H.cmyk=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(q,[null].concat(K,["cmyk"])))},W.format.cmyk=z,W.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=$(K,"cmyk"),J(K)==="array"&&K.length===4)return"cmyk"}});var Q=g.unpack,ue=g.last,re=function(K){return Math.round(K*100)/100},ne=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Q(K,"hsla"),Pe=ue(K)||"lsa";return ye[0]=re(ye[0]||0),ye[1]=re(ye[1]*100)+"%",ye[2]=re(ye[2]*100)+"%",Pe==="hsla"||ye.length>3&&ye[3]<1?(ye[3]=ye.length>3?ye[3]:1,Pe="hsla"):ye.length=3,Pe+"("+ye.join(",")+")"},le=ne,ce=g.unpack,pe=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ce(K,"rgba");var ye=K[0],Pe=K[1],ze=K[2];ye/=255,Pe/=255,ze/=255;var Ge=Math.min(ye,Pe,ze),Be=Math.max(ye,Pe,ze),Ke=(Be+Ge)/2,Je,gt;return Be===Ge?(Je=0,gt=Number.NaN):Je=Ke<.5?(Be-Ge)/(Be+Ge):(Be-Ge)/(2-Be-Ge),ye==Be?gt=(Pe-ze)/(Be-Ge):Pe==Be?gt=2+(ze-ye)/(Be-Ge):ze==Be&&(gt=4+(ye-Pe)/(Be-Ge)),gt*=60,gt<0&&(gt+=360),K.length>3&&K[3]!==void 0?[gt,Je,Ke,K[3]]:[gt,Je,Ke]},fe=pe,se=g.unpack,de=g.last,ge=le,Oe=fe,ke=Math.round,Me=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=se(K,"rgba"),Pe=de(K)||"rgb";return Pe.substr(0,3)=="hsl"?ge(Oe(ye),Pe):(ye[0]=ke(ye[0]),ye[1]=ke(ye[1]),ye[2]=ke(ye[2]),(Pe==="rgba"||ye.length>3&&ye[3]<1)&&(ye[3]=ye.length>3?ye[3]:1,Pe="rgba"),Pe+"("+ye.slice(0,Pe==="rgb"?3:4).join(",")+")")},Ne=Me,Ce=g.unpack,Y=Math.round,Z=function(){for(var K,oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];oe=Ce(oe,"hsl");var Pe=oe[0],ze=oe[1],Ge=oe[2],Be,Ke,Je;if(ze===0)Be=Ke=Je=Ge*255;else{var gt=[0,0,0],dt=[0,0,0],qt=Ge<.5?Ge*(1+ze):Ge+ze-Ge*ze,Ct=2*Ge-qt,Jt=Pe/360;gt[0]=Jt+1/3,gt[1]=Jt,gt[2]=Jt-1/3;for(var Zt=0;Zt<3;Zt++)gt[Zt]<0&&(gt[Zt]+=1),gt[Zt]>1&&(gt[Zt]-=1),6*gt[Zt]<1?dt[Zt]=Ct+(qt-Ct)*6*gt[Zt]:2*gt[Zt]<1?dt[Zt]=qt:3*gt[Zt]<2?dt[Zt]=Ct+(qt-Ct)*(2/3-gt[Zt])*6:dt[Zt]=Ct;K=[Y(dt[0]*255),Y(dt[1]*255),Y(dt[2]*255)],Be=K[0],Ke=K[1],Je=K[2]}return oe.length>3?[Be,Ke,Je,oe[3]]:[Be,Ke,Je,1]},ie=Z,we=ie,Ee=y,De=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ie=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ot=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,mt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,wt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Mt=Math.round,Dt=function(K){K=K.toLowerCase().trim();var oe;if(Ee.format.named)try{return Ee.format.named(K)}catch{}if(oe=K.match(De)){for(var ye=oe.slice(1,4),Pe=0;Pe<3;Pe++)ye[Pe]=+ye[Pe];return ye[3]=1,ye}if(oe=K.match(Ie)){for(var ze=oe.slice(1,5),Ge=0;Ge<4;Ge++)ze[Ge]=+ze[Ge];return ze}if(oe=K.match(Ye)){for(var Be=oe.slice(1,4),Ke=0;Ke<3;Ke++)Be[Ke]=Mt(Be[Ke]*2.55);return Be[3]=1,Be}if(oe=K.match(ot)){for(var Je=oe.slice(1,5),gt=0;gt<3;gt++)Je[gt]=Mt(Je[gt]*2.55);return Je[3]=+Je[3],Je}if(oe=K.match(mt)){var dt=oe.slice(1,4);dt[1]*=.01,dt[2]*=.01;var qt=we(dt);return qt[3]=1,qt}if(oe=K.match(wt)){var Ct=oe.slice(1,4);Ct[1]*=.01,Ct[2]*=.01;var Jt=we(Ct);return Jt[3]=+oe[4],Jt}};Dt.test=function(K){return De.test(K)||Ie.test(K)||Ye.test(K)||ot.test(K)||mt.test(K)||wt.test(K)};var vt=Dt,tt=T,_e=O,Ue=y,Qe=g.type,Ze=Ne,nt=vt;_e.prototype.css=function(K){return Ze(this._rgb,K)},tt.css=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_e,[null].concat(K,["css"])))},Ue.format.css=nt,Ue.autodetect.push({p:5,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Qe(K)==="string"&&nt.test(K))return"css"}});var It=O,ct=T,Lt=y,Rt=g.unpack;Lt.format.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Rt(K,"rgba");return ye[0]*=255,ye[1]*=255,ye[2]*=255,ye},ct.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(It,[null].concat(K,["gl"])))},It.prototype.gl=function(){var K=this._rgb;return[K[0]/255,K[1]/255,K[2]/255,K[3]]};var jt=g.unpack,Yt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Math.min(Pe,ze,Ge),Ke=Math.max(Pe,ze,Ge),Je=Ke-Be,gt=Je*100/255,dt=Be/(255-Je)*100,qt;return Je===0?qt=Number.NaN:(Pe===Ke&&(qt=(ze-Ge)/Je),ze===Ke&&(qt=2+(Ge-Pe)/Je),Ge===Ke&&(qt=4+(Pe-ze)/Je),qt*=60,qt<0&&(qt+=360)),[qt,gt,dt]},sr=Yt,Ut=g.unpack,Rr=Math.floor,Xt=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=Ut(Be,"hcg");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;dt=dt*255;var Zt=gt*255;if(gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var en=Rr(Je),Or=Je-en,$r=dt*(1-gt),vn=$r+Zt*(1-Or),ua=$r+Zt*Or,Bi=$r+Zt;switch(en){case 0:K=[Bi,ua,$r],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[vn,Bi,$r],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[$r,Bi,ua],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[$r,vn,Bi],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[ua,$r,Bi],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[Bi,$r,vn],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},Vr=Xt,Br=g.unpack,mr=g.type,ur=T,sn=O,Fr=y,un=sr;sn.prototype.hcg=function(){return un(this._rgb)},ur.hcg=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(sn,[null].concat(K,["hcg"])))},Fr.format.hcg=Vr,Fr.autodetect.push({p:1,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Br(K,"hcg"),mr(K)==="array"&&K.length===3)return"hcg"}});var bn=g.unpack,wn=g.last,_n=Math.round,xn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=bn(K,"rgba"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=ye[3],Ke=wn(K)||"auto";Be===void 0&&(Be=1),Ke==="auto"&&(Ke=Be<1?"rgba":"rgb"),Pe=_n(Pe),ze=_n(ze),Ge=_n(Ge);var Je=Pe<<16|ze<<8|Ge,gt="000000"+Je.toString(16);gt=gt.substr(gt.length-6);var dt="0"+_n(Be*255).toString(16);switch(dt=dt.substr(dt.length-2),Ke.toLowerCase()){case"rgba":return"#"+gt+dt;case"argb":return"#"+dt+gt;default:return"#"+gt}},on=xn,Nn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,fi=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,gn=function(K){if(K.match(Nn)){(K.length===4||K.length===7)&&(K=K.substr(1)),K.length===3&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]);var oe=parseInt(K,16),ye=oe>>16,Pe=oe>>8&255,ze=oe&255;return[ye,Pe,ze,1]}if(K.match(fi)){(K.length===5||K.length===9)&&(K=K.substr(1)),K.length===4&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]+K[3]+K[3]);var Ge=parseInt(K,16),Be=Ge>>24&255,Ke=Ge>>16&255,Je=Ge>>8&255,gt=Math.round((Ge&255)/255*100)/100;return[Be,Ke,Je,gt]}throw new Error("unknown hex color: "+K)},yn=gn,Jn=T,_i=O,Ir=g.type,pa=y,di=on;_i.prototype.hex=function(K){return di(this._rgb,K)},Jn.hex=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_i,[null].concat(K,["hex"])))},pa.format.hex=yn,pa.autodetect.push({p:4,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Ir(K)==="string"&&[3,4,5,6,7,8,9].indexOf(K.length)>=0)return"hex"}});var Bt=g.unpack,hr=g.TWOPI,ei=Math.min,Hn=Math.sqrt,fs=Math.acos,Na=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Bt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];Pe/=255,ze/=255,Ge/=255;var Be,Ke=ei(Pe,ze,Ge),Je=(Pe+ze+Ge)/3,gt=Je>0?1-Ke/Je:0;return gt===0?Be=NaN:(Be=(Pe-ze+(Pe-Ge))/2,Be/=Hn((Pe-ze)*(Pe-ze)+(Pe-Ge)*(ze-Ge)),Be=fs(Be),Ge>ze&&(Be=hr-Be),Be/=hr),[Be*360,gt,Je]},ki=Na,Wr=g.unpack,Nr=g.limit,na=g.TWOPI,Fs=g.PITHIRD,hu=Math.cos,ga=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wr(K,"hsi");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke;return isNaN(ye)&&(ye=0),isNaN(Pe)&&(Pe=0),ye>360&&(ye-=360),ye<0&&(ye+=360),ye/=360,ye<1/3?(Ke=(1-Pe)/3,Ge=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Be=1-(Ke+Ge)):ye<2/3?(ye-=1/3,Ge=(1-Pe)/3,Be=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ke=1-(Ge+Be)):(ye-=2/3,Be=(1-Pe)/3,Ke=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ge=1-(Be+Ke)),Ge=Nr(ze*Ge*3),Be=Nr(ze*Be*3),Ke=Nr(ze*Ke*3),[Ge*255,Be*255,Ke*255,K.length>3?K[3]:1]},Us=ga,Ln=g.unpack,Ii=g.type,Ni=T,Pc=O,vu=y,ia=ki;Pc.prototype.hsi=function(){return ia(this._rgb)},Ni.hsi=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Pc,[null].concat(K,["hsi"])))},vu.format.hsi=Us,vu.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Ln(K,"hsi"),Ii(K)==="array"&&K.length===3)return"hsi"}});var Hl=g.unpack,Md=g.type,Xa=T,Wl=O,Yl=y,nf=fe;Wl.prototype.hsl=function(){return nf(this._rgb)},Xa.hsl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wl,[null].concat(K,["hsl"])))},Yl.format.hsl=ie,Yl.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Hl(K,"hsl"),Md(K)==="array"&&K.length===3)return"hsl"}});var Wi=g.unpack,af=Math.min,La=Math.max,qo=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wi(K,"rgb");var ye=K[0],Pe=K[1],ze=K[2],Ge=af(ye,Pe,ze),Be=La(ye,Pe,ze),Ke=Be-Ge,Je,gt,dt;return dt=Be/255,Be===0?(Je=Number.NaN,gt=0):(gt=Ke/Be,ye===Be&&(Je=(Pe-ze)/Ke),Pe===Be&&(Je=2+(ze-ye)/Ke),ze===Be&&(Je=4+(ye-Pe)/Ke),Je*=60,Je<0&&(Je+=360)),[Je,gt,dt]},Gf=qo,ds=g.unpack,Mc=Math.floor,Xl=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=ds(Be,"hsv");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;if(dt*=255,gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var Zt=Mc(Je),en=Je-Zt,Or=dt*(1-gt),$r=dt*(1-gt*en),vn=dt*(1-gt*(1-en));switch(Zt){case 0:K=[dt,vn,Or],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[$r,dt,Or],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[Or,dt,vn],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[Or,$r,dt],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[vn,Or,dt],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[dt,Or,$r],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},ti=Xl,zs=g.unpack,Qu=g.type,qs=T,$l=O,of=y,pu=Gf;$l.prototype.hsv=function(){return pu(this._rgb)},qs.hsv=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply($l,[null].concat(K,["hsv"])))},of.format.hsv=ti,of.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=zs(K,"hsv"),Qu(K)==="array"&&K.length===3)return"hsv"}});var _o={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},wo=_o,Vf=g.unpack,sf=Math.pow,gu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vf(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Kl(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2],dt=116*Je-16;return[dt<0?0:dt,500*(Ke-Je),200*(Je-gt)]},so=function(K){return(K/=255)<=.04045?K/12.92:sf((K+.055)/1.055,2.4)},Ju=function(K){return K>wo.t3?sf(K,1/3):K/wo.t2+wo.t0},Kl=function(K,oe,ye){K=so(K),oe=so(oe),ye=so(ye);var Pe=Ju((.4124564*K+.3575761*oe+.1804375*ye)/wo.Xn),ze=Ju((.2126729*K+.7151522*oe+.072175*ye)/wo.Yn),Ge=Ju((.0193339*K+.119192*oe+.9503041*ye)/wo.Zn);return[Pe,ze,Ge]},Go=gu,hs=_o,jn=g.unpack,Zr=Math.pow,Zl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=jn(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke,Je,gt,dt;return Be=(ye+16)/116,Ge=isNaN(Pe)?Be:Be+Pe/500,Ke=isNaN(ze)?Be:Be-ze/200,Be=hs.Yn*Dc(Be),Ge=hs.Xn*Dc(Ge),Ke=hs.Zn*Dc(Ke),Je=vs(3.2404542*Ge-1.5371385*Be-.4985314*Ke),gt=vs(-.969266*Ge+1.8760108*Be+.041556*Ke),dt=vs(.0556434*Ge-.2040259*Be+1.0572252*Ke),[Je,gt,dt,K.length>3?K[3]:1]},vs=function(K){return 255*(K<=.00304?12.92*K:1.055*Zr(K,1/2.4)-.055)},Dc=function(K){return K>hs.t1?K*K*K:hs.t2*(K-hs.t0)},Oa=Zl,el=g.unpack,uf=g.type,Ql=T,tl=O,wi=y,Jl=Go;tl.prototype.lab=function(){return Jl(this._rgb)},Ql.lab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(tl,[null].concat(K,["lab"])))},wi.format.lab=Oa,wi.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=el(K,"lab"),uf(K)==="array"&&K.length===3)return"lab"}});var aa=g.unpack,yu=g.RAD2DEG,lf=Math.sqrt,ya=Math.atan2,ma=Math.round,mu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=aa(K,"lab"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=lf(ze*ze+Ge*Ge),Ke=(ya(Ge,ze)*yu+360)%360;return ma(Be*1e4)===0&&(Ke=Number.NaN),[Pe,Be,Ke]},uo=mu,Vo=g.unpack,st=Go,xt=uo,pt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vo(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=st(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xt(Ke,Je,gt)},Wt=pt,ir=g.unpack,En=g.DEG2RAD,oa=Math.sin,ja=Math.cos,Kn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ir(K,"lch"),Pe=ye[0],ze=ye[1],Ge=ye[2];return isNaN(Ge)&&(Ge=0),Ge=Ge*En,[Pe,ja(Ge)*ze,oa(Ge)*ze]},ec=Kn,xi=g.unpack,ba=ec,cf=Oa,Ev=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=xi(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=ba(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=cf(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},rl=Ev,Dd=g.unpack,kd=rl,Fn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Dd(K,"hcl").reverse();return kd.apply(void 0,ye)},Sv=Fn,Hf=g.unpack,nl=g.type,Ov=T,Wf=O,ff=y,Gs=Wt;Wf.prototype.lch=function(){return Gs(this._rgb)},Wf.prototype.hcl=function(){return Gs(this._rgb).reverse()},Ov.lch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["lch"])))},Ov.hcl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["hcl"])))},ff.format.lch=rl,ff.format.hcl=Sv,["lch","hcl"].forEach(function(K){return ff.autodetect.push({p:2,test:function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];if(oe=Hf(oe,K),nl(oe)==="array"&&oe.length===3)return K}})});var bu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},kc=bu,Ah=O,tc=y,Yf=g.type,Ic=kc,_u=yn,xo=on;Ah.prototype.name=function(){for(var K=xo(this._rgb,"rgb"),oe=0,ye=Object.keys(Ic);oe0;)oe[ye]=arguments[ye+1];if(!oe.length&&Yf(K)==="string"&&Ic[K.toLowerCase()])return"named"}});var Nc=g.unpack,Vs=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Nc(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];return(Pe<<16)+(ze<<8)+Ge},df=Vs,Rh=g.type,Xf=function(K){if(Rh(K)=="number"&&K>=0&&K<=16777215){var oe=K>>16,ye=K>>8&255,Pe=K&255;return[oe,ye,Pe,1]}throw new Error("unknown num color: "+K)},$f=Xf,Id=T,rc=O,Kf=y,Lc=g.type,Nd=df;rc.prototype.num=function(){return Nd(this._rgb)},Id.num=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(rc,[null].concat(K,["num"])))},Kf.format.num=$f,Kf.autodetect.push({p:5,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K.length===1&&Lc(K[0])==="number"&&K[0]>=0&&K[0]<=16777215)return"num"}});var Ph=T,hf=O,Li=y,hi=g.unpack,Zf=g.type,Tv=Math.round;hf.prototype.rgb=function(K){return K===void 0&&(K=!0),K===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Tv)},hf.prototype.rgba=function(K){return K===void 0&&(K=!0),this._rgb.slice(0,4).map(function(oe,ye){return ye<3?K===!1?oe:Tv(oe):oe})},Ph.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(hf,[null].concat(K,["rgb"])))},Li.format.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=hi(K,"rgba");return ye[3]===void 0&&(ye[3]=1),ye},Li.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=hi(K,"rgba"),Zf(K)==="array"&&(K.length===3||K.length===4&&Zf(K[3])=="number"&&K[3]>=0&&K[3]<=1))return"rgb"}});var Qf=Math.log,Yp=function(K){var oe=K/100,ye,Pe,ze;return oe<66?(ye=255,Pe=oe<6?0:-155.25485562709179-.44596950469579133*(Pe=oe-2)+104.49216199393888*Qf(Pe),ze=oe<20?0:-254.76935184120902+.8274096064007395*(ze=oe-10)+115.67994401066147*Qf(ze)):(ye=351.97690566805693+.114206453784165*(ye=oe-55)-40.25366309332127*Qf(ye),Pe=325.4494125711974+.07943456536662342*(Pe=oe-50)-28.0852963507957*Qf(Pe),ze=255),[ye,Pe,ze,1]},il=Yp,ri=il,nc=g.unpack,jc=Math.round,vf=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];for(var ye=nc(K,"rgb"),Pe=ye[0],ze=ye[2],Ge=1e3,Be=4e4,Ke=.4,Je;Be-Ge>Ke;){Je=(Be+Ge)*.5;var gt=ri(Je);gt[2]/gt[0]>=ze/Pe?Be=Je:Ge=Je}return jc(Je)},pf=vf,Bc=T,Hs=O,ic=y,We=pf;Hs.prototype.temp=Hs.prototype.kelvin=Hs.prototype.temperature=function(){return We(this._rgb)},Bc.temp=Bc.kelvin=Bc.temperature=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Hs,[null].concat(K,["temp"])))},ic.format.temp=ic.format.kelvin=ic.format.temperature=il;var ft=g.unpack,ut=Math.cbrt,Kt=Math.pow,Pr=Math.sign,Qr=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ft(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=[be(Pe/255),be(ze/255),be(Ge/255)],Ke=Be[0],Je=Be[1],gt=Be[2],dt=ut(.4122214708*Ke+.5363325363*Je+.0514459929*gt),qt=ut(.2119034982*Ke+.6806995451*Je+.1073969566*gt),Ct=ut(.0883024619*Ke+.2817188376*Je+.6299787005*gt);return[.2104542553*dt+.793617785*qt-.0040720468*Ct,1.9779984951*dt-2.428592205*qt+.4505937099*Ct,.0259040371*dt+.7827717662*qt-.808675766*Ct]},oi=Qr;function be(K){var oe=Math.abs(K);return oe<.04045?K/12.92:(Pr(K)||1)*Kt((oe+.055)/1.055,2.4)}var al=g.unpack,Ho=Math.pow,Ei=Math.sign,nn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=al(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge=Ho(ye+.3963377774*Pe+.2158037573*ze,3),Be=Ho(ye-.1055613458*Pe-.0638541728*ze,3),Ke=Ho(ye-.0894841775*Pe-1.291485548*ze,3);return[255*$a(4.0767416621*Ge-3.3077115913*Be+.2309699292*Ke),255*$a(-1.2684380046*Ge+2.6097574011*Be-.3413193965*Ke),255*$a(-.0041960863*Ge-.7034186147*Be+1.707614701*Ke),K.length>3?K[3]:1]},ol=nn;function $a(K){var oe=Math.abs(K);return oe>.0031308?(Ei(K)||1)*(1.055*Ho(oe,1/2.4)-.055):K*12.92}var ps=g.unpack,wu=g.type,Jr=T,Ld=O,gf=y,Eo=oi;Ld.prototype.oklab=function(){return Eo(this._rgb)},Jr.oklab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ld,[null].concat(K,["oklab"])))},gf.format.oklab=ol,gf.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=ps(K,"oklab"),wu(K)==="array"&&K.length===3)return"oklab"}});var jd=g.unpack,So=oi,xu=uo,sl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jd(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=So(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xu(Ke,Je,gt)},Ws=sl,ac=g.unpack,gs=ec,ys=ol,ul=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ac(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=gs(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=ys(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},Ka=ul,Eu=g.unpack,Mh=g.type,Yi=T,Ba=O,Oo=y,Cv=Ws;Ba.prototype.oklch=function(){return Cv(this._rgb)},Yi.oklch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ba,[null].concat(K,["oklch"])))},Oo.format.oklch=Ka,Oo.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Eu(K,"oklch"),Mh(K)==="array"&&K.length===3)return"oklch"}});var oc=O,sc=g.type;oc.prototype.alpha=function(K,oe){return oe===void 0&&(oe=!1),K!==void 0&&sc(K)==="number"?oe?(this._rgb[3]=K,this):new oc([this._rgb[0],this._rgb[1],this._rgb[2],K],"rgb"):this._rgb[3]};var ji=O;ji.prototype.clipped=function(){return this._rgb._clipped||!1};var Wo=O,yf=_o;Wo.prototype.darken=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lab();return ye[0]-=yf.Kn*K,new Wo(ye,"lab").alpha(oe.alpha(),!0)},Wo.prototype.brighten=function(K){return K===void 0&&(K=1),this.darken(-K)},Wo.prototype.darker=Wo.prototype.darken,Wo.prototype.brighter=Wo.prototype.brighten;var Ys=O;Ys.prototype.get=function(K){var oe=K.split("."),ye=oe[0],Pe=oe[1],ze=this[ye]();if(Pe){var Ge=ye.indexOf(Pe)-(ye.substr(0,2)==="ok"?2:0);if(Ge>-1)return ze[Ge];throw new Error("unknown channel "+Pe+" in mode "+ye)}else return ze};var sa=O,ll=g.type,ms=Math.pow,Ri=1e-7,Sn=20;sa.prototype.luminance=function(K){if(K!==void 0&&ll(K)==="number"){if(K===0)return new sa([0,0,0,this._rgb[3]],"rgb");if(K===1)return new sa([255,255,255,this._rgb[3]],"rgb");var oe=this.luminance(),ye="rgb",Pe=Sn,ze=function(Be,Ke){var Je=Be.interpolate(Ke,.5,ye),gt=Je.luminance();return Math.abs(K-gt)K?ze(Be,Je):ze(Je,Ke)},Ge=(oe>K?ze(new sa([0,0,0]),this):ze(this,new sa([255,255,255]))).rgb();return new sa(Ge.concat([this._rgb[3]]))}return To.apply(void 0,this._rgb.slice(0,3))};var To=function(K,oe,ye){return K=Co(K),oe=Co(oe),ye=Co(ye),.2126*K+.7152*oe+.0722*ye},Co=function(K){return K/=255,K<=.03928?K/12.92:ms((K+.055)/1.055,2.4)},Xi={},Yo=O,Fa=g.type,Ua=Xi,cl=function(K,oe,ye){ye===void 0&&(ye=.5);for(var Pe=[],ze=arguments.length-3;ze-- >0;)Pe[ze]=arguments[ze+3];var Ge=Pe[0]||"lrgb";if(!Ua[Ge]&&!Pe.length&&(Ge=Object.keys(Ua)[0]),!Ua[Ge])throw new Error("interpolation mode "+Ge+" is not defined");return Fa(K)!=="object"&&(K=new Yo(K)),Fa(oe)!=="object"&&(oe=new Yo(oe)),Ua[Ge](K,oe,ye).alpha(K.alpha()+ye*(oe.alpha()-K.alpha()))},Xs=O,uc=cl;Xs.prototype.mix=Xs.prototype.interpolate=function(K,oe){oe===void 0&&(oe=.5);for(var ye=[],Pe=arguments.length-2;Pe-- >0;)ye[Pe]=arguments[Pe+2];return uc.apply(void 0,[this,K,oe].concat(ye))};var lc=O;lc.prototype.premultiply=function(K){K===void 0&&(K=!1);var oe=this._rgb,ye=oe[3];return K?(this._rgb=[oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],this):new lc([oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],"rgb")};var Si=O,Rn=_o;Si.prototype.saturate=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lch();return ye[1]+=Rn.Kn*K,ye[1]<0&&(ye[1]=0),new Si(ye,"lch").alpha(oe.alpha(),!0)},Si.prototype.desaturate=function(K){return K===void 0&&(K=1),this.saturate(-K)};var hn=O,Su=g.type;hn.prototype.set=function(K,oe,ye){ye===void 0&&(ye=!1);var Pe=K.split("."),ze=Pe[0],Ge=Pe[1],Be=this[ze]();if(Ge){var Ke=ze.indexOf(Ge)-(ze.substr(0,2)==="ok"?2:0);if(Ke>-1){if(Su(oe)=="string")switch(oe.charAt(0)){case"+":Be[Ke]+=+oe;break;case"-":Be[Ke]+=+oe;break;case"*":Be[Ke]*=+oe.substr(1);break;case"/":Be[Ke]/=+oe.substr(1);break;default:Be[Ke]=+oe}else if(Su(oe)==="number")Be[Ke]=oe;else throw new Error("unsupported value for Color.set");var Je=new hn(Be,ze);return ye?(this._rgb=Je._rgb,this):Je}throw new Error("unknown channel "+Ge+" in mode "+ze)}else return Be};var Xo=O,mf=function(K,oe,ye){var Pe=K._rgb,ze=oe._rgb;return new Xo(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"rgb")};Xi.rgb=mf;var fl=O,cc=Math.sqrt,bs=Math.pow,dl=function(K,oe,ye){var Pe=K._rgb,ze=Pe[0],Ge=Pe[1],Be=Pe[2],Ke=oe._rgb,Je=Ke[0],gt=Ke[1],dt=Ke[2];return new fl(cc(bs(ze,2)*(1-ye)+bs(Je,2)*ye),cc(bs(Ge,2)*(1-ye)+bs(gt,2)*ye),cc(bs(Be,2)*(1-ye)+bs(dt,2)*ye),"rgb")};Xi.lrgb=dl;var xe=O,Ou=function(K,oe,ye){var Pe=K.lab(),ze=oe.lab();return new xe(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"lab")};Xi.lab=Ou;var $s=O,ar=function(K,oe,ye,Pe){var ze,Ge,Be,Ke;Pe==="hsl"?(Be=K.hsl(),Ke=oe.hsl()):Pe==="hsv"?(Be=K.hsv(),Ke=oe.hsv()):Pe==="hcg"?(Be=K.hcg(),Ke=oe.hcg()):Pe==="hsi"?(Be=K.hsi(),Ke=oe.hsi()):Pe==="lch"||Pe==="hcl"?(Pe="hcl",Be=K.hcl(),Ke=oe.hcl()):Pe==="oklch"&&(Be=K.oklch().reverse(),Ke=oe.oklch().reverse());var Je,gt,dt,qt,Ct,Jt;(Pe.substr(0,1)==="h"||Pe==="oklch")&&(ze=Be,Je=ze[0],dt=ze[1],Ct=ze[2],Ge=Ke,gt=Ge[0],qt=Ge[1],Jt=Ge[2]);var Zt,en,Or,$r;return!isNaN(Je)&&!isNaN(gt)?(gt>Je&>-Je>180?$r=gt-(Je+360):gt180?$r=gt+360-Je:$r=gt-Je,en=Je+ye*$r):isNaN(Je)?isNaN(gt)?en=Number.NaN:(en=gt,(Ct==1||Ct==0)&&Pe!="hsv"&&(Zt=qt)):(en=Je,(Jt==1||Jt==0)&&Pe!="hsv"&&(Zt=dt)),Zt===void 0&&(Zt=dt+ye*(qt-dt)),Or=Ct+ye*(Jt-Ct),Pe==="oklch"?new $s([Or,Zt,en],Pe):new $s([en,Zt,Or],Pe)},Yr=ar,Tu=function(K,oe,ye){return Yr(K,oe,ye,"lch")};Xi.lch=Tu,Xi.hcl=Tu;var _s=O,Cu=function(K,oe,ye){var Pe=K.num(),ze=oe.num();return new _s(Pe+ye*(ze-Pe),"num")};Xi.num=Cu;var hl=ar,Dh=function(K,oe,ye){return hl(K,oe,ye,"hcg")};Xi.hcg=Dh;var za=ar,Bd=function(K,oe,ye){return za(K,oe,ye,"hsi")};Xi.hsi=Bd;var Au=ar,_a=function(K,oe,ye){return Au(K,oe,ye,"hsl")};Xi.hsl=_a;var $o=ar,kh=function(K,oe,ye){return $o(K,oe,ye,"hsv")};Xi.hsv=kh;var Ko=O,fc=function(K,oe,ye){var Pe=K.oklab(),ze=oe.oklab();return new Ko(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"oklab")};Xi.oklab=fc;var Ih=ar,$i=function(K,oe,ye){return Ih(K,oe,ye,"oklch")};Xi.oklch=$i;var Za=O,bf=g.clip_rgb,vl=Math.pow,_f=Math.sqrt,Ru=Math.PI,pl=Math.cos,lo=Math.sin,Av=Math.atan2,dc=function(K,oe,ye){oe===void 0&&(oe="lrgb"),ye===void 0&&(ye=null);var Pe=K.length;ye||(ye=Array.from(new Array(Pe)).map(function(){return 1}));var ze=Pe/ye.reduce(function(en,Or){return en+Or});if(ye.forEach(function(en,Or){ye[Or]*=ze}),K=K.map(function(en){return new Za(en)}),oe==="lrgb")return Zo(K,ye);for(var Ge=K.shift(),Be=Ge.get(oe),Ke=[],Je=0,gt=0,dt=0;dt=360;)Zt-=360;Be[Jt]=Zt}else Be[Jt]=Be[Jt]/Ke[Jt];return Ct/=Pe,new Za(Be,oe).alpha(Ct>.99999?1:Ct,!0)},Zo=function(K,oe){for(var ye=K.length,Pe=[0,0,0,0],ze=0;ze.9999999&&(Pe[3]=1),new Za(bf(Pe))},Ta=T,Pu=g.type,Jf=Math.pow,ed=function(K){var oe="rgb",ye=Ta("#ccc"),Pe=0,ze=[0,1],Ge=[],Be=[0,0],Ke=!1,Je=[],gt=!1,dt=0,qt=1,Ct=!1,Jt={},Zt=!0,en=1,Or=function(kt){if(kt=kt||["#fff","#000"],kt&&Pu(kt)==="string"&&Ta.brewer&&Ta.brewer[kt.toLowerCase()]&&(kt=Ta.brewer[kt.toLowerCase()]),Pu(kt)==="array"){kt.length===1&&(kt=[kt[0],kt[0]]),kt=kt.slice(0);for(var gr=0;gr=Ke[tn];)tn++;return tn-1}return 0},vn=function(kt){return kt},ua=function(kt){return kt},Bi=function(kt,gr){var tn,yr;if(gr==null&&(gr=!1),isNaN(kt)||kt===null)return ye;if(gr)yr=kt;else if(Ke&&Ke.length>2){var Ji=$r(kt);yr=Ji/(Ke.length-2)}else qt!==dt?yr=(kt-dt)/(qt-dt):yr=1;yr=ua(yr),gr||(yr=vn(yr)),en!==1&&(yr=Jf(yr,en)),yr=Be[0]+yr*(1-Be[0]-Be[1]),yr=Math.min(1,Math.max(0,yr));var mn=Math.floor(yr*1e4);if(Zt&&Jt[mn])tn=Jt[mn];else{if(Pu(Je)==="array")for(var cn=0;cn=Mn&&cn===Ge.length-1){tn=Je[cn];break}if(yr>Mn&&yr2){var cn=kt.map(function(On,zn){return zn/(kt.length-1)}),Mn=kt.map(function(On){return(On-dt)/(qt-dt)});Mn.every(function(On,zn){return cn[zn]===On})||(ua=function(On){if(On<=0||On>=1)return On;for(var zn=0;On>=Mn[zn+1];)zn++;var ts=(On-Mn[zn])/(Mn[zn+1]-Mn[zn]),_l=cn[zn]+ts*(cn[zn+1]-cn[zn]);return _l})}}return ze=[dt,qt],ln},ln.mode=function(kt){return arguments.length?(oe=kt,Ja(),ln):oe},ln.range=function(kt,gr){return Or(kt),ln},ln.out=function(kt){return gt=kt,ln},ln.spread=function(kt){return arguments.length?(Pe=kt,ln):Pe},ln.correctLightness=function(kt){return kt==null&&(kt=!0),Ct=kt,Ja(),Ct?vn=function(gr){for(var tn=Bi(0,!0).lab()[0],yr=Bi(1,!0).lab()[0],Ji=tn>yr,mn=Bi(gr,!0).lab()[0],cn=tn+(yr-tn)*gr,Mn=mn-cn,On=0,zn=1,ts=20;Math.abs(Mn)>.01&&ts-- >0;)(function(){return Ji&&(Mn*=-1),Mn<0?(On=gr,gr+=(zn-gr)*.5):(zn=gr,gr+=(On-gr)*.5),mn=Bi(gr,!0).lab()[0],Mn=mn-cn})();return gr}:vn=function(gr){return gr},ln},ln.padding=function(kt){return kt!=null?(Pu(kt)==="number"&&(kt=[kt,kt]),Be=kt,ln):Be},ln.colors=function(kt,gr){arguments.length<2&&(gr="hex");var tn=[];if(arguments.length===0)tn=Je.slice(0);else if(kt===1)tn=[ln(.5)];else if(kt>1){var yr=ze[0],Ji=ze[1]-yr;tn=Fc(0,kt).map(function(zn){return ln(yr+zn/(kt-1)*Ji)})}else{K=[];var mn=[];if(Ke&&Ke.length>2)for(var cn=1,Mn=Ke.length,On=1<=Mn;On?cnMn;On?cn++:cn--)mn.push((Ke[cn-1]+Ke[cn])*.5);else mn=ze;tn=mn.map(function(zn){return ln(zn)})}return Ta[gr]&&(tn=tn.map(function(zn){return zn[gr]()})),tn},ln.cache=function(kt){return kt!=null?(Zt=kt,ln):Zt},ln.gamma=function(kt){return kt!=null?(en=kt,ln):en},ln.nodata=function(kt){return kt!=null?(ye=Ta(kt),ln):ye},ln};function Fc(K,oe,ye){for(var Pe=[],ze=KGe;ze?Be++:Be--)Pe.push(Be);return Pe}var gl=O,Ca=ed,Qo=function(K){for(var oe=[1,1],ye=1;ye=5){var gt,dt,qt;gt=K.map(function(Ct){return Ct.lab()}),qt=K.length-1,dt=Qo(qt),ze=function(Ct){var Jt=1-Ct,Zt=[0,1,2].map(function(en){return gt.reduce(function(Or,$r,vn){return Or+dt[vn]*Math.pow(Jt,qt-vn)*Math.pow(Ct,vn)*$r[en]},0)});return new gl(Zt,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return ze},yl=function(K){var oe=td(K);return oe.scale=function(){return Ca(oe)},oe},Ao=T,Ki=function(K,oe,ye){if(!Ki[ye])throw new Error("unknown blend mode "+ye);return Ki[ye](K,oe)},Mu=function(K){return function(oe,ye){var Pe=Ao(ye).rgb(),ze=Ao(oe).rgb();return Ao.rgb(K(Pe,ze))}},co=function(K){return function(oe,ye){var Pe=[];return Pe[0]=K(oe[0],ye[0]),Pe[1]=K(oe[1],ye[1]),Pe[2]=K(oe[2],ye[2]),Pe}},Du=function(K){return K},Ro=function(K,oe){return K*oe/255},Uc=function(K,oe){return K>oe?oe:K},Po=function(K,oe){return K>oe?K:oe},Qa=function(K,oe){return 255*(1-(1-K/255)*(1-oe/255))},rd=function(K,oe){return oe<128?2*K*oe/255:255*(1-2*(1-K/255)*(1-oe/255))},ku=function(K,oe){return 255*(1-(1-oe/255)/(K/255))},wf=function(K,oe){return K===255?255:(K=255*(oe/255)/(1-K/255),K>255?255:K)};Ki.normal=Mu(co(Du)),Ki.multiply=Mu(co(Ro)),Ki.screen=Mu(co(Qa)),Ki.overlay=Mu(co(rd)),Ki.darken=Mu(co(Uc)),Ki.lighten=Mu(co(Po)),Ki.dodge=Mu(co(wf)),Ki.burn=Mu(co(ku));for(var Jo=Ki,fo=g.type,nd=g.clip_rgb,Iu=g.TWOPI,Ks=Math.pow,xf=Math.sin,ws=Math.cos,Zi=T,hc=function(K,oe,ye,Pe,ze){K===void 0&&(K=300),oe===void 0&&(oe=-1.5),ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=[0,1]);var Ge=0,Be;fo(ze)==="array"?Be=ze[1]-ze[0]:(Be=0,ze=[ze,ze]);var Ke=function(Je){var gt=Iu*((K+120)/360+oe*Je),dt=Ks(ze[0]+Be*Je,Pe),qt=Ge!==0?ye[0]+Je*Ge:ye,Ct=qt*dt*(1-dt)/2,Jt=ws(gt),Zt=xf(gt),en=dt+Ct*(-.14861*Jt+1.78277*Zt),Or=dt+Ct*(-.29227*Jt-.90649*Zt),$r=dt+Ct*(1.97294*Jt);return Zi(nd([en*255,Or*255,$r*255,1]))};return Ke.start=function(Je){return Je==null?K:(K=Je,Ke)},Ke.rotations=function(Je){return Je==null?oe:(oe=Je,Ke)},Ke.gamma=function(Je){return Je==null?Pe:(Pe=Je,Ke)},Ke.hue=function(Je){return Je==null?ye:(ye=Je,fo(ye)==="array"?(Ge=ye[1]-ye[0],Ge===0&&(ye=ye[1])):Ge=0,Ke)},Ke.lightness=function(Je){return Je==null?ze:(fo(Je)==="array"?(ze=Je,Be=Je[1]-Je[0]):(ze=[Je,Je],Be=0),Ke)},Ke.scale=function(){return Zi.scale(Ke)},Ke.hue(ye),Ke},Ef=O,xs="0123456789abcdef",Es=Math.floor,Zs=Math.random,Ss=function(){for(var K="#",oe=0;oe<6;oe++)K+=xs.charAt(Es(Zs()*16));return new Ef(K,"hex")},zc=l,Qi=Math.log,Nu=Math.pow,er=Math.floor,ho=Math.abs,Qs=function(K,oe){oe===void 0&&(oe=null);var ye={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return zc(K)==="object"&&(K=Object.values(K)),K.forEach(function(Pe){oe&&zc(Pe)==="object"&&(Pe=Pe[oe]),Pe!=null&&!isNaN(Pe)&&(ye.values.push(Pe),ye.sum+=Pe,Peye.max&&(ye.max=Pe),ye.count+=1)}),ye.domain=[ye.min,ye.max],ye.limits=function(Pe,ze){return Os(ye,Pe,ze)},ye},Os=function(K,oe,ye){oe===void 0&&(oe="equal"),ye===void 0&&(ye=7),zc(K)=="array"&&(K=Qs(K));var Pe=K.min,ze=K.max,Ge=K.values.sort(function(sd,Tf){return sd-Tf});if(ye===1)return[Pe,ze];var Be=[];if(oe.substr(0,1)==="c"&&(Be.push(Pe),Be.push(ze)),oe.substr(0,1)==="e"){Be.push(Pe);for(var Ke=1;Ke 0");var Je=Math.LOG10E*Qi(Pe),gt=Math.LOG10E*Qi(ze);Be.push(Pe);for(var dt=1;dt200&&(ua=!1)}for(var ju={},mc=0;mcPe?(ye+.05)/(Pe+.05):(Pe+.05)/(ye+.05)},Pi=O,es=Math.sqrt,Pn=Math.pow,Sr=Math.min,Xr=Math.max,vi=Math.atan2,vc=Math.abs,ml=Math.cos,Ts=Math.sin,ad=Math.exp,pc=Math.PI,bl=function(K,oe,ye,Pe,ze){ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=1);var Ge=function(wa){return 360*wa/(2*pc)},Be=function(wa){return 2*pc*wa/360};K=new Pi(K),oe=new Pi(oe);var Ke=Array.from(K.lab()),Je=Ke[0],gt=Ke[1],dt=Ke[2],qt=Array.from(oe.lab()),Ct=qt[0],Jt=qt[1],Zt=qt[2],en=(Je+Ct)/2,Or=es(Pn(gt,2)+Pn(dt,2)),$r=es(Pn(Jt,2)+Pn(Zt,2)),vn=(Or+$r)/2,ua=.5*(1-es(Pn(vn,7)/(Pn(vn,7)+Pn(25,7)))),Bi=gt*(1+ua),Ja=Jt*(1+ua),ln=es(Pn(Bi,2)+Pn(dt,2)),kt=es(Pn(Ja,2)+Pn(Zt,2)),gr=(ln+kt)/2,tn=Ge(vi(dt,Bi)),yr=Ge(vi(Zt,Ja)),Ji=tn>=0?tn:tn+360,mn=yr>=0?yr:yr+360,cn=vc(Ji-mn)>180?(Ji+mn+360)/2:(Ji+mn)/2,Mn=1-.17*ml(Be(cn-30))+.24*ml(Be(2*cn))+.32*ml(Be(3*cn+6))-.2*ml(Be(4*cn-63)),On=mn-Ji;On=vc(On)<=180?On:mn<=Ji?On+360:On-360,On=2*es(ln*kt)*Ts(Be(On)/2);var zn=Ct-Je,ts=kt-ln,_l=1+.015*Pn(en-50,2)/es(20+Pn(en-50,2)),ju=1+.045*gr,mc=1+.015*gr*Mn,Bu=30*ad(-Pn((cn-275)/25,2)),Cs=2*es(Pn(gr,7)/(Pn(gr,7)+Pn(25,7))),wl=-Cs*Ts(2*Be(Bu)),Fi=es(Pn(zn/(ye*_l),2)+Pn(ts/(Pe*ju),2)+Pn(On/(ze*mc),2)+wl*(ts/(Pe*ju))*(On/(ze*mc)));return Xr(0,Sr(100,Fi))},Nh=O,si=function(K,oe,ye){ye===void 0&&(ye="lab"),K=new Nh(K),oe=new Nh(oe);var Pe=K.get(ye),ze=oe.get(ye),Ge=0;for(var Be in Pe){var Ke=(Pe[Be]||0)-(ze[Be]||0);Ge+=Ke*Ke}return Math.sqrt(Ge)},od=O,gc=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];try{return new(Function.prototype.bind.apply(od,[null].concat(K))),!0}catch{return!1}},Sf=T,qc=ed,Rv={cool:function(){return qc([Sf.hsl(180,1,.9),Sf.hsl(250,.7,.4)])},hot:function(){return qc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Lu={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yc=0,Of=Object.keys(Lu);yc`#${[parseInt(r.substring(1,3),16),parseInt(r.substring(3,5),16),parseInt(r.substring(5,7),16)].map(t=>{let n=parseInt((t*(100+e)/100).toString(),10);const i=(n=n<255?n:255).toString(16);return i.length===1?`0${i}`:i}).join("")}`;function zG(r){let e=0,t=0;const n=r.length;for(;t{const s=UG.contrast(r,o);s>a&&(i=o,a=s)}),ac%(d-f)+f;return UG.oklch(l(o,n,t)/100,l(s,a,i)/100,l(u,0,360)).hex()}function yle(r,e){const t=gle(r,e),n=ple(t,-20),i=qG(t,["#2A2C34","#FFFFFF"]);return{backgroundColor:t,borderColor:n,textColor:i}}const JP=Yu.palette.neutral[40],GG=Yu.palette.neutral[40],eM=(r="",e="")=>r.toLowerCase().localeCompare(e.toLowerCase());function mle(r){var e;const[t]=r;if(t===void 0)return GG;const n={};for(const o of r)n[o]=((e=n[o])!==null&&e!==void 0?e:0)+1;let i=0,a=t;for(const[o,s]of Object.entries(n))s>i&&(i=s,a=o);return a}function L9(r){return Object.entries(r).reduce((e,[t,n])=>(e[t]={mostCommonColor:mle(n),totalCount:n.length},e),{})}const ble=[/^name$/i,/^title$/i,/^label$/i,/name$/i,/description$/i,/^.+/];function _le(r){const e=r.filter(n=>n.type==="property").map(n=>n.captionKey);for(const n of ble){const i=e.find(a=>n.test(a));if(i!==void 0)return{captionKey:i,type:"property"}}const t=r.find(n=>n.type==="type");return t||r.find(n=>n.type==="id")}const wle=r=>{const e=Object.keys(r.properties).map(i=>({captionKey:i,type:"property"}));e.push({type:"id"},{type:"type"});const t=_le(e);if((t==null?void 0:t.type)==="property"){const i=r.properties[t.captionKey];if(i!==void 0)return i.type==="string"?[{value:i.stringified.slice(1,-1)}]:[{value:i.stringified}]}const[n]=r.labels;return(t==null?void 0:t.type)==="type"&&n!==void 0?[{value:n}]:[{value:r.id}]};function xle(r,e){const t={},n={},i={},a={},o=r.map(f=>{var d;const[h]=f.labels,p=Object.assign(Object.assign({captions:wle(f),color:(d=f.color)!==null&&d!==void 0?d:h===void 0?GG:yle(h).backgroundColor},f),{labels:void 0,properties:void 0});return i[f.id]={color:p.color,id:f.id,labelsSorted:[...f.labels].sort(eM),properties:f.properties},f.labels.forEach(g=>{var y;t[g]=[...(y=t[g])!==null&&y!==void 0?y:[],p.color]}),p}),s=e.map(f=>{var d,h,p;return a[f.id]={color:(d=f.color)!==null&&d!==void 0?d:JP,id:f.id,properties:f.properties,type:f.type},n[f.type]=[...(h=n[f.type])!==null&&h!==void 0?h:[],(p=f.color)!==null&&p!==void 0?p:JP],Object.assign(Object.assign({captions:[{value:f.type}],color:JP},f),{properties:void 0,type:void 0})}),u=L9(t),l=L9(n);return{dataLookupTable:{labelMetaData:u,labels:Object.keys(u).sort((f,d)=>eM(f,d)),nodes:i,relationships:a,typeMetaData:l,types:Object.keys(l).sort((f,d)=>eM(f,d))},nodes:o,rels:s}}const j9=/(?:https?|s?ftp|bolt):\/\/(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi,Ele=({text:r})=>{var e;const t=r??"",n=(e=t.match(j9))!==null&&e!==void 0?e:[];return Te.jsx(Te.Fragment,{children:t.split(j9).map((i,a)=>Te.jsxs(ao.Fragment,{children:[i,n[a]&&Te.jsx("a",{href:n[a],target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:n[a]})]},`clickable-url-${a}`))})},Sle=ao.memo(Ele),Ole="…",Tle=900,Cle=150,Ale=300,Rle=({value:r,width:e,type:t})=>{const[n,i]=me.useState(!1),a=e>Tle?Ale:Cle,o=()=>{i(!0)};let s=n?r:r.slice(0,a);const u=s.length!==r.length;return s+=u?Ole:"",Te.jsxs(Te.Fragment,{children:[t.startsWith("Array")&&"[",Te.jsx(Sle,{text:s}),u&&Te.jsx("button",{type:"button",onClick:o,className:"ndl-properties-show-all-button",children:" Show all"}),t.startsWith("Array")&&"]"]})},Ple=({properties:r,paneWidth:e})=>Te.jsxs("div",{className:"ndl-graph-visualization-properties-table",children:[Te.jsxs("div",{className:"ndl-properties-header",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-header-key",children:"Key"}),Te.jsx(Ed,{variant:"body-small",children:"Value"})]}),Object.entries(r).map(([t,{stringified:n,type:i}])=>Te.jsxs("div",{className:"ndl-properties-row",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-key",children:t}),Te.jsx("div",{className:"ndl-properties-value",children:Te.jsx(Rle,{value:n,width:e,type:i})}),Te.jsx("div",{className:"ndl-properties-clipboard-button",children:Te.jsx(z7,{textToCopy:`${t}: ${n}`,size:"small",tooltipProps:{placement:"left",type:"simple"}})})]},t))]}),Mle=({paneWidth:r=400})=>{const{selected:e,nvlGraph:t}=Vl(),n=me.useMemo(()=>{const[s]=e.nodeIds;if(s!==void 0)return t.dataLookupTable.nodes[s]},[e,t]),i=me.useMemo(()=>{const[s]=e.relationshipIds;if(s!==void 0)return t.dataLookupTable.relationships[s]},[e,t]),a=me.useMemo(()=>{if(n)return{data:n,dataType:"node"};if(i)return{data:i,dataType:"relationship"}},[n,i]);if(a===void 0)return null;const o=[{key:"",type:"String",value:`${a.data.id}`},...Object.keys(a.data.properties).map(s=>({key:s,type:a.data.properties[s].type,value:a.data.properties[s].stringified}))];return Te.jsxs(Te.Fragment,{children:[Te.jsxs(ty.Title,{children:[Te.jsx("h6",{className:"ndl-details-title",children:a.dataType==="node"?"Node details":"Relationship details"}),Te.jsx(z7,{textToCopy:o.map(s=>`${s.key}: ${s.value}`).join(` -`),size:"small"})]}),Te.jsxs(ty.Content,{children:[Te.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Te.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Te.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Te.jsx("div",{className:"ndl-details-divider"}),Te.jsx(Ple,{properties:a.data.properties,paneWidth:r})]})]})},Dle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Te.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Te.jsx("li",{children:c},l)})})},kle=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>kle(f)?f():f);return Te.jsxs(Te.Fragment,{children:[t===!0?Te.jsx(Dle,{children:c}):Te.jsx("div",{style:{all:"inherit"},children:c}),s&&Te.jsx(rX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Ile=()=>{const{nvlGraph:r}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(ty.Title,{children:Te.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Te.jsx(ty.Content,{children:Te.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Te.jsxs("div",{className:"ndl-overview-section",children:[Te.jsx("div",{className:"ndl-overview-header",children:Te.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Te.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Te.jsxs("div",{className:"ndl-overview-relationships-section",children:[Te.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Te.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Nle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Te.jsx(Mle,{}):Te.jsx(Ile,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function Lle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(Me=>{n==="select"&&Me.key===" "&&i("pan")},[n,i]),c=me.useCallback(Me=>{n==="pan"&&Me.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(Me=>{lb(Me)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(Me))},[T,e]),L=me.useCallback((Me,Ne)=>{i("drag");const Ce=Me.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Ce,relationshipIds:r.relationshipIds});return}e({nodeIds:Ce,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(Me,Ne)},[e,x,r,i]),B=me.useCallback((Me,Ne)=>{typeof S=="function"&&S(Me,Ne),i("select")},[S,i]),j=me.useCallback(Me=>{typeof E=="function"&&E(Me)},[E]),z=me.useCallback((Me,Ne,Ce)=>{typeof O=="function"&&O(Me,Ne,Ce)},[O]),H=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.nodeIds.includes(Me.id)){const Z=r.nodeIds.filter(ie=>ie!==Me.id);e({nodeIds:Z,relationshipIds:r.relationshipIds})}else{const Z=[...r.nodeIds,Me.id];e({nodeIds:Z,relationshipIds:r.relationshipIds})}else e({nodeIds:[Me.id],relationshipIds:[]});typeof _=="function"&&_(Me,Ne,Ce)}},[e,r,_]),q=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.relationshipIds.includes(Me.id)){const Z=r.relationshipIds.filter(ie=>ie!==Me.id);e({nodeIds:r.nodeIds,relationshipIds:Z})}else{const Z=[...r.relationshipIds,Me.id];e({nodeIds:r.nodeIds,relationshipIds:Z})}else e({nodeIds:[],relationshipIds:[Me.id]});typeof m=="function"&&m(Me,Ne,Ce)}},[e,r,m]),W=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof P=="function"&&P(Me,Ne,Ce)},[P]),$=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof I=="function"&&I(Me,Ne,Ce)},[I]),J=me.useCallback((Me,Ne,Ce)=>{const Y=Me.map(ie=>ie.id),Z=Ne.map(ie=>ie.id);if(Gw(Ce)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],De=Ee(ie,Y),Ie=Ee(we,Z);e({nodeIds:De,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Z})},[e,r]),X=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof d=="function"&&d({nodes:Me,rels:Ne},Ce)},[J,d]),Q=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof f=="function"&&f({nodes:Me,rels:Ne},Ce)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var Me;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Q:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(Me=a.onZoom)!==null&&Me!==void 0?Me:!0})},[pe,ne,le,ce,ue,re,a,Q,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(Me=>Object.assign(Object.assign({},Me),{disabled:de?!de.has(Me.id):!1,selected:se.nodeIds.has(Me.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(Me=>Object.assign(Object.assign({},Me),{disabled:ge?!ge.has(Me.id):!1,selected:se.relIds.has(Me.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var jle=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx("div",{className:Vn(Ble[t],e),children:r}),Fle={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Te.jsxs(XX,{orientation:"vertical",isFloating:!0,size:"small",children:[Te.jsx(NG,{})," ",Te.jsx(LG,{})," ",Te.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Te.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Te.jsx(FG,{})," ",Te.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=jle(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=S2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Q,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>xle(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=Lle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Q,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,Me]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Te.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:Me,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,Me]),Ce=L??"div";return Te.jsx(Ce,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Te.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Q,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Te.jsxs("div",{className:"ndl-graph-visualization",children:[Te.jsx(Zue,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Fle),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Z;Y||(Z=j.current)===null||Z===void 0||Z.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Te.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Te.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Te.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Te.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Te.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=nle;ql.LassoSelectButton=ile;ql.SingleSelectButton=rle;ql.SearchButton=ale;ql.SingleSelectionSidePanelContents=Nle;ql.LayoutSelectButton=sle;ql.GestureSelectButton=lle;function Ule(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function zle(r){return r.map(e=>{const t=Ule(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function qle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Gle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Te.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Te.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Te.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Vle(){const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);return!e||e.length<3?"light":Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722<128?"dark":"light"}function Hle(r){me.useEffect(()=>{const e=r==="auto"?Vle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Wle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Hle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[zle(r??[]),qle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Te.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Te.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Te.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Yle(){return Te.jsx(Gle,{children:Te.jsx(Wle,{})})}const Xle=cV(Yle),$le={render:Xle},gE=window.__NEO4J_VIZ_DATA__;if(!gE)throw document.body.innerHTML=` +`),size:"small"})]}),Te.jsxs(ty.Content,{children:[Te.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Te.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Te.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Te.jsx("div",{className:"ndl-details-divider"}),Te.jsx(Ple,{properties:a.data.properties,paneWidth:r})]})]})},Dle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Te.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Te.jsx("li",{children:c},l)})})},kle=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>kle(f)?f():f);return Te.jsxs(Te.Fragment,{children:[t===!0?Te.jsx(Dle,{children:c}):Te.jsx("div",{style:{all:"inherit"},children:c}),s&&Te.jsx(rX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Ile=()=>{const{nvlGraph:r}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(ty.Title,{children:Te.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Te.jsx(ty.Content,{children:Te.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Te.jsxs("div",{className:"ndl-overview-section",children:[Te.jsx("div",{className:"ndl-overview-header",children:Te.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Te.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Te.jsxs("div",{className:"ndl-overview-relationships-section",children:[Te.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Te.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Nle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Te.jsx(Mle,{}):Te.jsx(Ile,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function Lle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(Me=>{n==="select"&&Me.key===" "&&i("pan")},[n,i]),c=me.useCallback(Me=>{n==="pan"&&Me.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(Me=>{lb(Me)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(Me))},[T,e]),L=me.useCallback((Me,Ne)=>{i("drag");const Ce=Me.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Ce,relationshipIds:r.relationshipIds});return}e({nodeIds:Ce,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(Me,Ne)},[e,x,r,i]),B=me.useCallback((Me,Ne)=>{typeof S=="function"&&S(Me,Ne),i("select")},[S,i]),j=me.useCallback(Me=>{typeof E=="function"&&E(Me)},[E]),z=me.useCallback((Me,Ne,Ce)=>{typeof O=="function"&&O(Me,Ne,Ce)},[O]),H=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.nodeIds.includes(Me.id)){const Z=r.nodeIds.filter(ie=>ie!==Me.id);e({nodeIds:Z,relationshipIds:r.relationshipIds})}else{const Z=[...r.nodeIds,Me.id];e({nodeIds:Z,relationshipIds:r.relationshipIds})}else e({nodeIds:[Me.id],relationshipIds:[]});typeof _=="function"&&_(Me,Ne,Ce)}},[e,r,_]),q=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.relationshipIds.includes(Me.id)){const Z=r.relationshipIds.filter(ie=>ie!==Me.id);e({nodeIds:r.nodeIds,relationshipIds:Z})}else{const Z=[...r.relationshipIds,Me.id];e({nodeIds:r.nodeIds,relationshipIds:Z})}else e({nodeIds:[],relationshipIds:[Me.id]});typeof m=="function"&&m(Me,Ne,Ce)}},[e,r,m]),W=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof P=="function"&&P(Me,Ne,Ce)},[P]),$=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof I=="function"&&I(Me,Ne,Ce)},[I]),J=me.useCallback((Me,Ne,Ce)=>{const Y=Me.map(ie=>ie.id),Z=Ne.map(ie=>ie.id);if(Gw(Ce)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],De=Ee(ie,Y),Ie=Ee(we,Z);e({nodeIds:De,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Z})},[e,r]),X=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof d=="function"&&d({nodes:Me,rels:Ne},Ce)},[J,d]),Q=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof f=="function"&&f({nodes:Me,rels:Ne},Ce)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var Me;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Q:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(Me=a.onZoom)!==null&&Me!==void 0?Me:!0})},[pe,ne,le,ce,ue,re,a,Q,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(Me=>Object.assign(Object.assign({},Me),{disabled:de?!de.has(Me.id):!1,selected:se.nodeIds.has(Me.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(Me=>Object.assign(Object.assign({},Me),{disabled:ge?!ge.has(Me.id):!1,selected:se.relIds.has(Me.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var jle=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx("div",{className:Vn(Ble[t],e),children:r}),Fle={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Te.jsxs(XX,{orientation:"vertical",isFloating:!0,size:"small",children:[Te.jsx(NG,{})," ",Te.jsx(LG,{})," ",Te.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Te.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Te.jsx(FG,{})," ",Te.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=jle(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=S2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Q,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>xle(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=Lle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Q,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,Me]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Te.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:Me,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,Me]),Ce=L??"div";return Te.jsx(Ce,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Te.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Q,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Te.jsxs("div",{className:"ndl-graph-visualization",children:[Te.jsx(Zue,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Fle),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Z;Y||(Z=j.current)===null||Z===void 0||Z.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Te.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Te.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Te.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Te.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Te.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=nle;ql.LassoSelectButton=ile;ql.SingleSelectButton=rle;ql.SearchButton=ale;ql.SingleSelectionSidePanelContents=Nle;ql.LayoutSelectButton=sle;ql.GestureSelectButton=lle;function Ule(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function zle(r){return r.map(e=>{const t=Ule(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function qle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Gle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Te.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Te.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Te.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Vle(){const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);if(!e||e.length<3)return"light";const t=Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722;return t===0&&e.length>3&&e[3]==="0"?"light":t<128?"dark":"light"}function Hle(r){me.useEffect(()=>{const e=r==="auto"?Vle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Wle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Hle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[zle(r??[]),qle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Te.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Te.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Te.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Yle(){return Te.jsxs(Gle,{children:[Te.jsxs("h1",{children:["BackgroundColor: ",window.getComputedStyle(document.body,null).getPropertyValue("background-color")]}),Te.jsx(Wle,{})]})}const Xle=cV(Yle),$le={render:Xle},gE=window.__NEO4J_VIZ_DATA__;if(!gE)throw document.body.innerHTML=`

Missing visualization data

Expected window.__NEO4J_VIZ_DATA__ to be set.

diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js index 0a17d29..91fc3ca 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js @@ -82162,7 +82162,10 @@ class zle extends me.Component { } function qle() { const e = window.getComputedStyle(document.body, null).getPropertyValue("background-color").match(/\d+/g); - return !e || e.length < 3 ? "light" : Number(e[0]) * 0.2126 + Number(e[1]) * 0.7152 + Number(e[2]) * 0.0722 < 128 ? "dark" : "light"; + if (!e || e.length < 3) + return "light"; + const t = Number(e[0]) * 0.2126 + Number(e[1]) * 0.7152 + Number(e[2]) * 0.0722; + return t === 0 && e.length > 3 && e[3] === "0" ? "light" : t < 128 ? "dark" : "light"; } function Gle(r) { me.useEffect(() => { @@ -82209,7 +82212,13 @@ function Vle() { ) }); } function Hle() { - return /* @__PURE__ */ Te.jsx(zle, { children: /* @__PURE__ */ Te.jsx(Vle, {}) }); + return /* @__PURE__ */ Te.jsxs(zle, { children: [ + /* @__PURE__ */ Te.jsxs("h1", { children: [ + "BackgroundColor: ", + window.getComputedStyle(document.body, null).getPropertyValue("background-color") + ] }), + /* @__PURE__ */ Te.jsx(Vle, {}) + ] }); } const Wle = uV(Hle), Xle = { render: Wle }; export { diff --git a/python-wrapper/src/neo4j_viz/visualization_graph.py b/python-wrapper/src/neo4j_viz/visualization_graph.py index fc5bfc0..d77399b 100644 --- a/python-wrapper/src/neo4j_viz/visualization_graph.py +++ b/python-wrapper/src/neo4j_viz/visualization_graph.py @@ -2,7 +2,7 @@ import warnings from collections.abc import Hashable, Iterable -from typing import Any, Callable +from typing import Any, Callable, Literal from IPython.display import HTML from pydantic.alias_generators import to_snake @@ -142,6 +142,7 @@ def render( max_zoom: float = 10, allow_dynamic_min_zoom: bool = True, max_allowed_nodes: int = 10_000, + theme: Literal["auto"] | Literal["light"] | Literal["dark"] = "auto", ) -> HTML: """ Render the graph as an HTML object. @@ -173,7 +174,8 @@ def render( Whether to allow dynamic minimum zoom level. max_allowed_nodes: The maximum allowed number of nodes to render. - + theme: + The theme of the rendered graph. Can be 'auto', 'light', or 'dark' Example ------- @@ -198,6 +200,7 @@ def render( render_options, width, height, + theme, ) def render_widget( @@ -213,6 +216,7 @@ def render_widget( max_zoom: float = 10, allow_dynamic_min_zoom: bool = True, max_allowed_nodes: int = 10_000, + theme: Literal["auto"] | Literal["light"] | Literal["dark"] = "auto", ) -> GraphWidget: """ Render the graph as an interactive Jupyter widget (anywidget). @@ -244,6 +248,8 @@ def render_widget( Whether to allow dynamic minimum zoom level. max_allowed_nodes: The maximum allowed number of nodes to render. + theme: + The theme to use for the rendered graph. """ render_options = self._build_render_options( layout, @@ -263,6 +269,7 @@ def render_widget( width=width, height=height, options=render_options, + theme=theme, ) def toggle_nodes_pinned(self, pinned: dict[NodeIdType, bool]) -> None: diff --git a/python-wrapper/src/neo4j_viz/widget.py b/python-wrapper/src/neo4j_viz/widget.py index f78118b..ffc2915 100644 --- a/python-wrapper/src/neo4j_viz/widget.py +++ b/python-wrapper/src/neo4j_viz/widget.py @@ -56,6 +56,9 @@ class GraphWidget(anywidget.AnyWidget): width: traitlets.Unicode[str, str | bytes] = traitlets.Unicode("100%").tag(sync=True) height: traitlets.Unicode[str, str | bytes] = traitlets.Unicode("600px").tag(sync=True) options: traitlets.Dict[str, Any] = traitlets.Dict({}).tag(sync=True) + theme: traitlets.Unicode[str, str | bytes] = traitlets.Unicode( + default_value="auto", help="Theme of the graph widget. Can be 'auto', 'light', or 'dark'." + ).tag(sync=True) @classmethod def from_graph_data( @@ -65,6 +68,7 @@ def from_graph_data( width: str = "100%", height: str = "600px", options: RenderOptions | None = None, + theme: str = "auto", ) -> GraphWidget: """Create a GraphWidget from Node and Relationship lists.""" return cls( @@ -73,4 +77,5 @@ def from_graph_data( width=width, height=height, options=options.to_js_options() if options else {}, + theme=theme, ) diff --git a/python-wrapper/uv.lock b/python-wrapper/uv.lock index dad0e57..14d7a02 100644 --- a/python-wrapper/uv.lock +++ b/python-wrapper/uv.lock @@ -2148,7 +2148,7 @@ wheels = [ [[package]] name = "neo4j-viz" -version = "1.2.0" +version = "1.3.0" source = { editable = "." } dependencies = [ { name = "anywidget" }, From 25099c0f59e1143583153dde73e776e5ec231fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Fri, 20 Feb 2026 19:23:31 +0100 Subject: [PATCH 2/4] Use lts version in gha --- .github/workflows/nvl-entrypoint-test.yml | 2 +- .../src/neo4j_viz/resources/nvl_entrypoint/index.html | 2 +- .../src/neo4j_viz/resources/nvl_entrypoint/widget.js | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nvl-entrypoint-test.yml b/.github/workflows/nvl-entrypoint-test.yml index 0568c68..e8944dc 100644 --- a/.github/workflows/nvl-entrypoint-test.yml +++ b/.github/workflows/nvl-entrypoint-test.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "24.x" + node-version: "lts/*" - name: Setup run: yarn - name: Build diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html index 2bad432..6a947dc 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html @@ -1550,7 +1550,7 @@ * * @preserve */var dle=hx.exports,N9;function hle(){return N9||(N9=1,(function(r,e){(function(t,n){r.exports=n()})(dle,(function(){for(var t=function(K,oe,ye){return oe===void 0&&(oe=0),ye===void 0&&(ye=1),Kye?ye:K},n=t,i=function(K){K._clipped=!1,K._unclipped=K.slice(0);for(var oe=0;oe<=3;oe++)oe<3?((K[oe]<0||K[oe]>255)&&(K._clipped=!0),K[oe]=n(K[oe],0,255)):oe===3&&(K[oe]=n(K[oe],0,1));return K},a={},o=0,s=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(K):c(K[0])=="object"&&oe?oe.split("").filter(function(ye){return K[0][ye]!==void 0}).map(function(ye){return K[0][ye]}):K[0]},d=l,h=function(K){if(K.length<2)return null;var oe=K.length-1;return d(K[oe])=="string"?K[oe].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:t,type:l,unpack:f,last:h,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,_=g.clip_rgb,m=g.type,x=y,S=function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];var Pe=this;if(m(oe[0])==="object"&&oe[0].constructor&&oe[0].constructor===this.constructor)return oe[0];var ze=b(oe),Ge=!1;if(!ze){Ge=!0,x.sorted||(x.autodetect=x.autodetect.sort(function(dt,qt){return qt.p-dt.p}),x.sorted=!0);for(var Be=0,Ke=x.autodetect;Be4?K[4]:1;return Ge===1?[0,0,0,Be]:[ye>=1?0:255*(1-ye)*(1-Ge),Pe>=1?0:255*(1-Pe)*(1-Ge),ze>=1?0:255*(1-ze)*(1-Ge),Be]},z=j,H=T,q=O,W=y,$=g.unpack,J=g.type,X=L;q.prototype.cmyk=function(){return X(this._rgb)},H.cmyk=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(q,[null].concat(K,["cmyk"])))},W.format.cmyk=z,W.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=$(K,"cmyk"),J(K)==="array"&&K.length===4)return"cmyk"}});var Q=g.unpack,ue=g.last,re=function(K){return Math.round(K*100)/100},ne=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Q(K,"hsla"),Pe=ue(K)||"lsa";return ye[0]=re(ye[0]||0),ye[1]=re(ye[1]*100)+"%",ye[2]=re(ye[2]*100)+"%",Pe==="hsla"||ye.length>3&&ye[3]<1?(ye[3]=ye.length>3?ye[3]:1,Pe="hsla"):ye.length=3,Pe+"("+ye.join(",")+")"},le=ne,ce=g.unpack,pe=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ce(K,"rgba");var ye=K[0],Pe=K[1],ze=K[2];ye/=255,Pe/=255,ze/=255;var Ge=Math.min(ye,Pe,ze),Be=Math.max(ye,Pe,ze),Ke=(Be+Ge)/2,Je,gt;return Be===Ge?(Je=0,gt=Number.NaN):Je=Ke<.5?(Be-Ge)/(Be+Ge):(Be-Ge)/(2-Be-Ge),ye==Be?gt=(Pe-ze)/(Be-Ge):Pe==Be?gt=2+(ze-ye)/(Be-Ge):ze==Be&&(gt=4+(ye-Pe)/(Be-Ge)),gt*=60,gt<0&&(gt+=360),K.length>3&&K[3]!==void 0?[gt,Je,Ke,K[3]]:[gt,Je,Ke]},fe=pe,se=g.unpack,de=g.last,ge=le,Oe=fe,ke=Math.round,Me=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=se(K,"rgba"),Pe=de(K)||"rgb";return Pe.substr(0,3)=="hsl"?ge(Oe(ye),Pe):(ye[0]=ke(ye[0]),ye[1]=ke(ye[1]),ye[2]=ke(ye[2]),(Pe==="rgba"||ye.length>3&&ye[3]<1)&&(ye[3]=ye.length>3?ye[3]:1,Pe="rgba"),Pe+"("+ye.slice(0,Pe==="rgb"?3:4).join(",")+")")},Ne=Me,Ce=g.unpack,Y=Math.round,Z=function(){for(var K,oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];oe=Ce(oe,"hsl");var Pe=oe[0],ze=oe[1],Ge=oe[2],Be,Ke,Je;if(ze===0)Be=Ke=Je=Ge*255;else{var gt=[0,0,0],dt=[0,0,0],qt=Ge<.5?Ge*(1+ze):Ge+ze-Ge*ze,Ct=2*Ge-qt,Jt=Pe/360;gt[0]=Jt+1/3,gt[1]=Jt,gt[2]=Jt-1/3;for(var Zt=0;Zt<3;Zt++)gt[Zt]<0&&(gt[Zt]+=1),gt[Zt]>1&&(gt[Zt]-=1),6*gt[Zt]<1?dt[Zt]=Ct+(qt-Ct)*6*gt[Zt]:2*gt[Zt]<1?dt[Zt]=qt:3*gt[Zt]<2?dt[Zt]=Ct+(qt-Ct)*(2/3-gt[Zt])*6:dt[Zt]=Ct;K=[Y(dt[0]*255),Y(dt[1]*255),Y(dt[2]*255)],Be=K[0],Ke=K[1],Je=K[2]}return oe.length>3?[Be,Ke,Je,oe[3]]:[Be,Ke,Je,1]},ie=Z,we=ie,Ee=y,De=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ie=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ot=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,mt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,wt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Mt=Math.round,Dt=function(K){K=K.toLowerCase().trim();var oe;if(Ee.format.named)try{return Ee.format.named(K)}catch{}if(oe=K.match(De)){for(var ye=oe.slice(1,4),Pe=0;Pe<3;Pe++)ye[Pe]=+ye[Pe];return ye[3]=1,ye}if(oe=K.match(Ie)){for(var ze=oe.slice(1,5),Ge=0;Ge<4;Ge++)ze[Ge]=+ze[Ge];return ze}if(oe=K.match(Ye)){for(var Be=oe.slice(1,4),Ke=0;Ke<3;Ke++)Be[Ke]=Mt(Be[Ke]*2.55);return Be[3]=1,Be}if(oe=K.match(ot)){for(var Je=oe.slice(1,5),gt=0;gt<3;gt++)Je[gt]=Mt(Je[gt]*2.55);return Je[3]=+Je[3],Je}if(oe=K.match(mt)){var dt=oe.slice(1,4);dt[1]*=.01,dt[2]*=.01;var qt=we(dt);return qt[3]=1,qt}if(oe=K.match(wt)){var Ct=oe.slice(1,4);Ct[1]*=.01,Ct[2]*=.01;var Jt=we(Ct);return Jt[3]=+oe[4],Jt}};Dt.test=function(K){return De.test(K)||Ie.test(K)||Ye.test(K)||ot.test(K)||mt.test(K)||wt.test(K)};var vt=Dt,tt=T,_e=O,Ue=y,Qe=g.type,Ze=Ne,nt=vt;_e.prototype.css=function(K){return Ze(this._rgb,K)},tt.css=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_e,[null].concat(K,["css"])))},Ue.format.css=nt,Ue.autodetect.push({p:5,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Qe(K)==="string"&&nt.test(K))return"css"}});var It=O,ct=T,Lt=y,Rt=g.unpack;Lt.format.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Rt(K,"rgba");return ye[0]*=255,ye[1]*=255,ye[2]*=255,ye},ct.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(It,[null].concat(K,["gl"])))},It.prototype.gl=function(){var K=this._rgb;return[K[0]/255,K[1]/255,K[2]/255,K[3]]};var jt=g.unpack,Yt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Math.min(Pe,ze,Ge),Ke=Math.max(Pe,ze,Ge),Je=Ke-Be,gt=Je*100/255,dt=Be/(255-Je)*100,qt;return Je===0?qt=Number.NaN:(Pe===Ke&&(qt=(ze-Ge)/Je),ze===Ke&&(qt=2+(Ge-Pe)/Je),Ge===Ke&&(qt=4+(Pe-ze)/Je),qt*=60,qt<0&&(qt+=360)),[qt,gt,dt]},sr=Yt,Ut=g.unpack,Rr=Math.floor,Xt=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=Ut(Be,"hcg");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;dt=dt*255;var Zt=gt*255;if(gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var en=Rr(Je),Or=Je-en,$r=dt*(1-gt),vn=$r+Zt*(1-Or),ua=$r+Zt*Or,Bi=$r+Zt;switch(en){case 0:K=[Bi,ua,$r],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[vn,Bi,$r],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[$r,Bi,ua],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[$r,vn,Bi],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[ua,$r,Bi],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[Bi,$r,vn],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},Vr=Xt,Br=g.unpack,mr=g.type,ur=T,sn=O,Fr=y,un=sr;sn.prototype.hcg=function(){return un(this._rgb)},ur.hcg=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(sn,[null].concat(K,["hcg"])))},Fr.format.hcg=Vr,Fr.autodetect.push({p:1,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Br(K,"hcg"),mr(K)==="array"&&K.length===3)return"hcg"}});var bn=g.unpack,wn=g.last,_n=Math.round,xn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=bn(K,"rgba"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=ye[3],Ke=wn(K)||"auto";Be===void 0&&(Be=1),Ke==="auto"&&(Ke=Be<1?"rgba":"rgb"),Pe=_n(Pe),ze=_n(ze),Ge=_n(Ge);var Je=Pe<<16|ze<<8|Ge,gt="000000"+Je.toString(16);gt=gt.substr(gt.length-6);var dt="0"+_n(Be*255).toString(16);switch(dt=dt.substr(dt.length-2),Ke.toLowerCase()){case"rgba":return"#"+gt+dt;case"argb":return"#"+dt+gt;default:return"#"+gt}},on=xn,Nn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,fi=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,gn=function(K){if(K.match(Nn)){(K.length===4||K.length===7)&&(K=K.substr(1)),K.length===3&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]);var oe=parseInt(K,16),ye=oe>>16,Pe=oe>>8&255,ze=oe&255;return[ye,Pe,ze,1]}if(K.match(fi)){(K.length===5||K.length===9)&&(K=K.substr(1)),K.length===4&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]+K[3]+K[3]);var Ge=parseInt(K,16),Be=Ge>>24&255,Ke=Ge>>16&255,Je=Ge>>8&255,gt=Math.round((Ge&255)/255*100)/100;return[Be,Ke,Je,gt]}throw new Error("unknown hex color: "+K)},yn=gn,Jn=T,_i=O,Ir=g.type,pa=y,di=on;_i.prototype.hex=function(K){return di(this._rgb,K)},Jn.hex=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_i,[null].concat(K,["hex"])))},pa.format.hex=yn,pa.autodetect.push({p:4,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Ir(K)==="string"&&[3,4,5,6,7,8,9].indexOf(K.length)>=0)return"hex"}});var Bt=g.unpack,hr=g.TWOPI,ei=Math.min,Hn=Math.sqrt,fs=Math.acos,Na=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Bt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];Pe/=255,ze/=255,Ge/=255;var Be,Ke=ei(Pe,ze,Ge),Je=(Pe+ze+Ge)/3,gt=Je>0?1-Ke/Je:0;return gt===0?Be=NaN:(Be=(Pe-ze+(Pe-Ge))/2,Be/=Hn((Pe-ze)*(Pe-ze)+(Pe-Ge)*(ze-Ge)),Be=fs(Be),Ge>ze&&(Be=hr-Be),Be/=hr),[Be*360,gt,Je]},ki=Na,Wr=g.unpack,Nr=g.limit,na=g.TWOPI,Fs=g.PITHIRD,hu=Math.cos,ga=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wr(K,"hsi");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke;return isNaN(ye)&&(ye=0),isNaN(Pe)&&(Pe=0),ye>360&&(ye-=360),ye<0&&(ye+=360),ye/=360,ye<1/3?(Ke=(1-Pe)/3,Ge=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Be=1-(Ke+Ge)):ye<2/3?(ye-=1/3,Ge=(1-Pe)/3,Be=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ke=1-(Ge+Be)):(ye-=2/3,Be=(1-Pe)/3,Ke=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ge=1-(Be+Ke)),Ge=Nr(ze*Ge*3),Be=Nr(ze*Be*3),Ke=Nr(ze*Ke*3),[Ge*255,Be*255,Ke*255,K.length>3?K[3]:1]},Us=ga,Ln=g.unpack,Ii=g.type,Ni=T,Pc=O,vu=y,ia=ki;Pc.prototype.hsi=function(){return ia(this._rgb)},Ni.hsi=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Pc,[null].concat(K,["hsi"])))},vu.format.hsi=Us,vu.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Ln(K,"hsi"),Ii(K)==="array"&&K.length===3)return"hsi"}});var Hl=g.unpack,Md=g.type,Xa=T,Wl=O,Yl=y,nf=fe;Wl.prototype.hsl=function(){return nf(this._rgb)},Xa.hsl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wl,[null].concat(K,["hsl"])))},Yl.format.hsl=ie,Yl.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Hl(K,"hsl"),Md(K)==="array"&&K.length===3)return"hsl"}});var Wi=g.unpack,af=Math.min,La=Math.max,qo=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wi(K,"rgb");var ye=K[0],Pe=K[1],ze=K[2],Ge=af(ye,Pe,ze),Be=La(ye,Pe,ze),Ke=Be-Ge,Je,gt,dt;return dt=Be/255,Be===0?(Je=Number.NaN,gt=0):(gt=Ke/Be,ye===Be&&(Je=(Pe-ze)/Ke),Pe===Be&&(Je=2+(ze-ye)/Ke),ze===Be&&(Je=4+(ye-Pe)/Ke),Je*=60,Je<0&&(Je+=360)),[Je,gt,dt]},Gf=qo,ds=g.unpack,Mc=Math.floor,Xl=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=ds(Be,"hsv");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;if(dt*=255,gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var Zt=Mc(Je),en=Je-Zt,Or=dt*(1-gt),$r=dt*(1-gt*en),vn=dt*(1-gt*(1-en));switch(Zt){case 0:K=[dt,vn,Or],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[$r,dt,Or],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[Or,dt,vn],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[Or,$r,dt],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[vn,Or,dt],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[dt,Or,$r],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},ti=Xl,zs=g.unpack,Qu=g.type,qs=T,$l=O,of=y,pu=Gf;$l.prototype.hsv=function(){return pu(this._rgb)},qs.hsv=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply($l,[null].concat(K,["hsv"])))},of.format.hsv=ti,of.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=zs(K,"hsv"),Qu(K)==="array"&&K.length===3)return"hsv"}});var _o={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},wo=_o,Vf=g.unpack,sf=Math.pow,gu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vf(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Kl(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2],dt=116*Je-16;return[dt<0?0:dt,500*(Ke-Je),200*(Je-gt)]},so=function(K){return(K/=255)<=.04045?K/12.92:sf((K+.055)/1.055,2.4)},Ju=function(K){return K>wo.t3?sf(K,1/3):K/wo.t2+wo.t0},Kl=function(K,oe,ye){K=so(K),oe=so(oe),ye=so(ye);var Pe=Ju((.4124564*K+.3575761*oe+.1804375*ye)/wo.Xn),ze=Ju((.2126729*K+.7151522*oe+.072175*ye)/wo.Yn),Ge=Ju((.0193339*K+.119192*oe+.9503041*ye)/wo.Zn);return[Pe,ze,Ge]},Go=gu,hs=_o,jn=g.unpack,Zr=Math.pow,Zl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=jn(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke,Je,gt,dt;return Be=(ye+16)/116,Ge=isNaN(Pe)?Be:Be+Pe/500,Ke=isNaN(ze)?Be:Be-ze/200,Be=hs.Yn*Dc(Be),Ge=hs.Xn*Dc(Ge),Ke=hs.Zn*Dc(Ke),Je=vs(3.2404542*Ge-1.5371385*Be-.4985314*Ke),gt=vs(-.969266*Ge+1.8760108*Be+.041556*Ke),dt=vs(.0556434*Ge-.2040259*Be+1.0572252*Ke),[Je,gt,dt,K.length>3?K[3]:1]},vs=function(K){return 255*(K<=.00304?12.92*K:1.055*Zr(K,1/2.4)-.055)},Dc=function(K){return K>hs.t1?K*K*K:hs.t2*(K-hs.t0)},Oa=Zl,el=g.unpack,uf=g.type,Ql=T,tl=O,wi=y,Jl=Go;tl.prototype.lab=function(){return Jl(this._rgb)},Ql.lab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(tl,[null].concat(K,["lab"])))},wi.format.lab=Oa,wi.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=el(K,"lab"),uf(K)==="array"&&K.length===3)return"lab"}});var aa=g.unpack,yu=g.RAD2DEG,lf=Math.sqrt,ya=Math.atan2,ma=Math.round,mu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=aa(K,"lab"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=lf(ze*ze+Ge*Ge),Ke=(ya(Ge,ze)*yu+360)%360;return ma(Be*1e4)===0&&(Ke=Number.NaN),[Pe,Be,Ke]},uo=mu,Vo=g.unpack,st=Go,xt=uo,pt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vo(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=st(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xt(Ke,Je,gt)},Wt=pt,ir=g.unpack,En=g.DEG2RAD,oa=Math.sin,ja=Math.cos,Kn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ir(K,"lch"),Pe=ye[0],ze=ye[1],Ge=ye[2];return isNaN(Ge)&&(Ge=0),Ge=Ge*En,[Pe,ja(Ge)*ze,oa(Ge)*ze]},ec=Kn,xi=g.unpack,ba=ec,cf=Oa,Ev=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=xi(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=ba(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=cf(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},rl=Ev,Dd=g.unpack,kd=rl,Fn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Dd(K,"hcl").reverse();return kd.apply(void 0,ye)},Sv=Fn,Hf=g.unpack,nl=g.type,Ov=T,Wf=O,ff=y,Gs=Wt;Wf.prototype.lch=function(){return Gs(this._rgb)},Wf.prototype.hcl=function(){return Gs(this._rgb).reverse()},Ov.lch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["lch"])))},Ov.hcl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["hcl"])))},ff.format.lch=rl,ff.format.hcl=Sv,["lch","hcl"].forEach(function(K){return ff.autodetect.push({p:2,test:function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];if(oe=Hf(oe,K),nl(oe)==="array"&&oe.length===3)return K}})});var bu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},kc=bu,Ah=O,tc=y,Yf=g.type,Ic=kc,_u=yn,xo=on;Ah.prototype.name=function(){for(var K=xo(this._rgb,"rgb"),oe=0,ye=Object.keys(Ic);oe0;)oe[ye]=arguments[ye+1];if(!oe.length&&Yf(K)==="string"&&Ic[K.toLowerCase()])return"named"}});var Nc=g.unpack,Vs=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Nc(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];return(Pe<<16)+(ze<<8)+Ge},df=Vs,Rh=g.type,Xf=function(K){if(Rh(K)=="number"&&K>=0&&K<=16777215){var oe=K>>16,ye=K>>8&255,Pe=K&255;return[oe,ye,Pe,1]}throw new Error("unknown num color: "+K)},$f=Xf,Id=T,rc=O,Kf=y,Lc=g.type,Nd=df;rc.prototype.num=function(){return Nd(this._rgb)},Id.num=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(rc,[null].concat(K,["num"])))},Kf.format.num=$f,Kf.autodetect.push({p:5,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K.length===1&&Lc(K[0])==="number"&&K[0]>=0&&K[0]<=16777215)return"num"}});var Ph=T,hf=O,Li=y,hi=g.unpack,Zf=g.type,Tv=Math.round;hf.prototype.rgb=function(K){return K===void 0&&(K=!0),K===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Tv)},hf.prototype.rgba=function(K){return K===void 0&&(K=!0),this._rgb.slice(0,4).map(function(oe,ye){return ye<3?K===!1?oe:Tv(oe):oe})},Ph.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(hf,[null].concat(K,["rgb"])))},Li.format.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=hi(K,"rgba");return ye[3]===void 0&&(ye[3]=1),ye},Li.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=hi(K,"rgba"),Zf(K)==="array"&&(K.length===3||K.length===4&&Zf(K[3])=="number"&&K[3]>=0&&K[3]<=1))return"rgb"}});var Qf=Math.log,Yp=function(K){var oe=K/100,ye,Pe,ze;return oe<66?(ye=255,Pe=oe<6?0:-155.25485562709179-.44596950469579133*(Pe=oe-2)+104.49216199393888*Qf(Pe),ze=oe<20?0:-254.76935184120902+.8274096064007395*(ze=oe-10)+115.67994401066147*Qf(ze)):(ye=351.97690566805693+.114206453784165*(ye=oe-55)-40.25366309332127*Qf(ye),Pe=325.4494125711974+.07943456536662342*(Pe=oe-50)-28.0852963507957*Qf(Pe),ze=255),[ye,Pe,ze,1]},il=Yp,ri=il,nc=g.unpack,jc=Math.round,vf=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];for(var ye=nc(K,"rgb"),Pe=ye[0],ze=ye[2],Ge=1e3,Be=4e4,Ke=.4,Je;Be-Ge>Ke;){Je=(Be+Ge)*.5;var gt=ri(Je);gt[2]/gt[0]>=ze/Pe?Be=Je:Ge=Je}return jc(Je)},pf=vf,Bc=T,Hs=O,ic=y,We=pf;Hs.prototype.temp=Hs.prototype.kelvin=Hs.prototype.temperature=function(){return We(this._rgb)},Bc.temp=Bc.kelvin=Bc.temperature=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Hs,[null].concat(K,["temp"])))},ic.format.temp=ic.format.kelvin=ic.format.temperature=il;var ft=g.unpack,ut=Math.cbrt,Kt=Math.pow,Pr=Math.sign,Qr=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ft(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=[be(Pe/255),be(ze/255),be(Ge/255)],Ke=Be[0],Je=Be[1],gt=Be[2],dt=ut(.4122214708*Ke+.5363325363*Je+.0514459929*gt),qt=ut(.2119034982*Ke+.6806995451*Je+.1073969566*gt),Ct=ut(.0883024619*Ke+.2817188376*Je+.6299787005*gt);return[.2104542553*dt+.793617785*qt-.0040720468*Ct,1.9779984951*dt-2.428592205*qt+.4505937099*Ct,.0259040371*dt+.7827717662*qt-.808675766*Ct]},oi=Qr;function be(K){var oe=Math.abs(K);return oe<.04045?K/12.92:(Pr(K)||1)*Kt((oe+.055)/1.055,2.4)}var al=g.unpack,Ho=Math.pow,Ei=Math.sign,nn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=al(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge=Ho(ye+.3963377774*Pe+.2158037573*ze,3),Be=Ho(ye-.1055613458*Pe-.0638541728*ze,3),Ke=Ho(ye-.0894841775*Pe-1.291485548*ze,3);return[255*$a(4.0767416621*Ge-3.3077115913*Be+.2309699292*Ke),255*$a(-1.2684380046*Ge+2.6097574011*Be-.3413193965*Ke),255*$a(-.0041960863*Ge-.7034186147*Be+1.707614701*Ke),K.length>3?K[3]:1]},ol=nn;function $a(K){var oe=Math.abs(K);return oe>.0031308?(Ei(K)||1)*(1.055*Ho(oe,1/2.4)-.055):K*12.92}var ps=g.unpack,wu=g.type,Jr=T,Ld=O,gf=y,Eo=oi;Ld.prototype.oklab=function(){return Eo(this._rgb)},Jr.oklab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ld,[null].concat(K,["oklab"])))},gf.format.oklab=ol,gf.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=ps(K,"oklab"),wu(K)==="array"&&K.length===3)return"oklab"}});var jd=g.unpack,So=oi,xu=uo,sl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jd(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=So(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xu(Ke,Je,gt)},Ws=sl,ac=g.unpack,gs=ec,ys=ol,ul=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ac(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=gs(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=ys(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},Ka=ul,Eu=g.unpack,Mh=g.type,Yi=T,Ba=O,Oo=y,Cv=Ws;Ba.prototype.oklch=function(){return Cv(this._rgb)},Yi.oklch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ba,[null].concat(K,["oklch"])))},Oo.format.oklch=Ka,Oo.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Eu(K,"oklch"),Mh(K)==="array"&&K.length===3)return"oklch"}});var oc=O,sc=g.type;oc.prototype.alpha=function(K,oe){return oe===void 0&&(oe=!1),K!==void 0&&sc(K)==="number"?oe?(this._rgb[3]=K,this):new oc([this._rgb[0],this._rgb[1],this._rgb[2],K],"rgb"):this._rgb[3]};var ji=O;ji.prototype.clipped=function(){return this._rgb._clipped||!1};var Wo=O,yf=_o;Wo.prototype.darken=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lab();return ye[0]-=yf.Kn*K,new Wo(ye,"lab").alpha(oe.alpha(),!0)},Wo.prototype.brighten=function(K){return K===void 0&&(K=1),this.darken(-K)},Wo.prototype.darker=Wo.prototype.darken,Wo.prototype.brighter=Wo.prototype.brighten;var Ys=O;Ys.prototype.get=function(K){var oe=K.split("."),ye=oe[0],Pe=oe[1],ze=this[ye]();if(Pe){var Ge=ye.indexOf(Pe)-(ye.substr(0,2)==="ok"?2:0);if(Ge>-1)return ze[Ge];throw new Error("unknown channel "+Pe+" in mode "+ye)}else return ze};var sa=O,ll=g.type,ms=Math.pow,Ri=1e-7,Sn=20;sa.prototype.luminance=function(K){if(K!==void 0&&ll(K)==="number"){if(K===0)return new sa([0,0,0,this._rgb[3]],"rgb");if(K===1)return new sa([255,255,255,this._rgb[3]],"rgb");var oe=this.luminance(),ye="rgb",Pe=Sn,ze=function(Be,Ke){var Je=Be.interpolate(Ke,.5,ye),gt=Je.luminance();return Math.abs(K-gt)K?ze(Be,Je):ze(Je,Ke)},Ge=(oe>K?ze(new sa([0,0,0]),this):ze(this,new sa([255,255,255]))).rgb();return new sa(Ge.concat([this._rgb[3]]))}return To.apply(void 0,this._rgb.slice(0,3))};var To=function(K,oe,ye){return K=Co(K),oe=Co(oe),ye=Co(ye),.2126*K+.7152*oe+.0722*ye},Co=function(K){return K/=255,K<=.03928?K/12.92:ms((K+.055)/1.055,2.4)},Xi={},Yo=O,Fa=g.type,Ua=Xi,cl=function(K,oe,ye){ye===void 0&&(ye=.5);for(var Pe=[],ze=arguments.length-3;ze-- >0;)Pe[ze]=arguments[ze+3];var Ge=Pe[0]||"lrgb";if(!Ua[Ge]&&!Pe.length&&(Ge=Object.keys(Ua)[0]),!Ua[Ge])throw new Error("interpolation mode "+Ge+" is not defined");return Fa(K)!=="object"&&(K=new Yo(K)),Fa(oe)!=="object"&&(oe=new Yo(oe)),Ua[Ge](K,oe,ye).alpha(K.alpha()+ye*(oe.alpha()-K.alpha()))},Xs=O,uc=cl;Xs.prototype.mix=Xs.prototype.interpolate=function(K,oe){oe===void 0&&(oe=.5);for(var ye=[],Pe=arguments.length-2;Pe-- >0;)ye[Pe]=arguments[Pe+2];return uc.apply(void 0,[this,K,oe].concat(ye))};var lc=O;lc.prototype.premultiply=function(K){K===void 0&&(K=!1);var oe=this._rgb,ye=oe[3];return K?(this._rgb=[oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],this):new lc([oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],"rgb")};var Si=O,Rn=_o;Si.prototype.saturate=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lch();return ye[1]+=Rn.Kn*K,ye[1]<0&&(ye[1]=0),new Si(ye,"lch").alpha(oe.alpha(),!0)},Si.prototype.desaturate=function(K){return K===void 0&&(K=1),this.saturate(-K)};var hn=O,Su=g.type;hn.prototype.set=function(K,oe,ye){ye===void 0&&(ye=!1);var Pe=K.split("."),ze=Pe[0],Ge=Pe[1],Be=this[ze]();if(Ge){var Ke=ze.indexOf(Ge)-(ze.substr(0,2)==="ok"?2:0);if(Ke>-1){if(Su(oe)=="string")switch(oe.charAt(0)){case"+":Be[Ke]+=+oe;break;case"-":Be[Ke]+=+oe;break;case"*":Be[Ke]*=+oe.substr(1);break;case"/":Be[Ke]/=+oe.substr(1);break;default:Be[Ke]=+oe}else if(Su(oe)==="number")Be[Ke]=oe;else throw new Error("unsupported value for Color.set");var Je=new hn(Be,ze);return ye?(this._rgb=Je._rgb,this):Je}throw new Error("unknown channel "+Ge+" in mode "+ze)}else return Be};var Xo=O,mf=function(K,oe,ye){var Pe=K._rgb,ze=oe._rgb;return new Xo(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"rgb")};Xi.rgb=mf;var fl=O,cc=Math.sqrt,bs=Math.pow,dl=function(K,oe,ye){var Pe=K._rgb,ze=Pe[0],Ge=Pe[1],Be=Pe[2],Ke=oe._rgb,Je=Ke[0],gt=Ke[1],dt=Ke[2];return new fl(cc(bs(ze,2)*(1-ye)+bs(Je,2)*ye),cc(bs(Ge,2)*(1-ye)+bs(gt,2)*ye),cc(bs(Be,2)*(1-ye)+bs(dt,2)*ye),"rgb")};Xi.lrgb=dl;var xe=O,Ou=function(K,oe,ye){var Pe=K.lab(),ze=oe.lab();return new xe(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"lab")};Xi.lab=Ou;var $s=O,ar=function(K,oe,ye,Pe){var ze,Ge,Be,Ke;Pe==="hsl"?(Be=K.hsl(),Ke=oe.hsl()):Pe==="hsv"?(Be=K.hsv(),Ke=oe.hsv()):Pe==="hcg"?(Be=K.hcg(),Ke=oe.hcg()):Pe==="hsi"?(Be=K.hsi(),Ke=oe.hsi()):Pe==="lch"||Pe==="hcl"?(Pe="hcl",Be=K.hcl(),Ke=oe.hcl()):Pe==="oklch"&&(Be=K.oklch().reverse(),Ke=oe.oklch().reverse());var Je,gt,dt,qt,Ct,Jt;(Pe.substr(0,1)==="h"||Pe==="oklch")&&(ze=Be,Je=ze[0],dt=ze[1],Ct=ze[2],Ge=Ke,gt=Ge[0],qt=Ge[1],Jt=Ge[2]);var Zt,en,Or,$r;return!isNaN(Je)&&!isNaN(gt)?(gt>Je&>-Je>180?$r=gt-(Je+360):gt180?$r=gt+360-Je:$r=gt-Je,en=Je+ye*$r):isNaN(Je)?isNaN(gt)?en=Number.NaN:(en=gt,(Ct==1||Ct==0)&&Pe!="hsv"&&(Zt=qt)):(en=Je,(Jt==1||Jt==0)&&Pe!="hsv"&&(Zt=dt)),Zt===void 0&&(Zt=dt+ye*(qt-dt)),Or=Ct+ye*(Jt-Ct),Pe==="oklch"?new $s([Or,Zt,en],Pe):new $s([en,Zt,Or],Pe)},Yr=ar,Tu=function(K,oe,ye){return Yr(K,oe,ye,"lch")};Xi.lch=Tu,Xi.hcl=Tu;var _s=O,Cu=function(K,oe,ye){var Pe=K.num(),ze=oe.num();return new _s(Pe+ye*(ze-Pe),"num")};Xi.num=Cu;var hl=ar,Dh=function(K,oe,ye){return hl(K,oe,ye,"hcg")};Xi.hcg=Dh;var za=ar,Bd=function(K,oe,ye){return za(K,oe,ye,"hsi")};Xi.hsi=Bd;var Au=ar,_a=function(K,oe,ye){return Au(K,oe,ye,"hsl")};Xi.hsl=_a;var $o=ar,kh=function(K,oe,ye){return $o(K,oe,ye,"hsv")};Xi.hsv=kh;var Ko=O,fc=function(K,oe,ye){var Pe=K.oklab(),ze=oe.oklab();return new Ko(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"oklab")};Xi.oklab=fc;var Ih=ar,$i=function(K,oe,ye){return Ih(K,oe,ye,"oklch")};Xi.oklch=$i;var Za=O,bf=g.clip_rgb,vl=Math.pow,_f=Math.sqrt,Ru=Math.PI,pl=Math.cos,lo=Math.sin,Av=Math.atan2,dc=function(K,oe,ye){oe===void 0&&(oe="lrgb"),ye===void 0&&(ye=null);var Pe=K.length;ye||(ye=Array.from(new Array(Pe)).map(function(){return 1}));var ze=Pe/ye.reduce(function(en,Or){return en+Or});if(ye.forEach(function(en,Or){ye[Or]*=ze}),K=K.map(function(en){return new Za(en)}),oe==="lrgb")return Zo(K,ye);for(var Ge=K.shift(),Be=Ge.get(oe),Ke=[],Je=0,gt=0,dt=0;dt=360;)Zt-=360;Be[Jt]=Zt}else Be[Jt]=Be[Jt]/Ke[Jt];return Ct/=Pe,new Za(Be,oe).alpha(Ct>.99999?1:Ct,!0)},Zo=function(K,oe){for(var ye=K.length,Pe=[0,0,0,0],ze=0;ze.9999999&&(Pe[3]=1),new Za(bf(Pe))},Ta=T,Pu=g.type,Jf=Math.pow,ed=function(K){var oe="rgb",ye=Ta("#ccc"),Pe=0,ze=[0,1],Ge=[],Be=[0,0],Ke=!1,Je=[],gt=!1,dt=0,qt=1,Ct=!1,Jt={},Zt=!0,en=1,Or=function(kt){if(kt=kt||["#fff","#000"],kt&&Pu(kt)==="string"&&Ta.brewer&&Ta.brewer[kt.toLowerCase()]&&(kt=Ta.brewer[kt.toLowerCase()]),Pu(kt)==="array"){kt.length===1&&(kt=[kt[0],kt[0]]),kt=kt.slice(0);for(var gr=0;gr=Ke[tn];)tn++;return tn-1}return 0},vn=function(kt){return kt},ua=function(kt){return kt},Bi=function(kt,gr){var tn,yr;if(gr==null&&(gr=!1),isNaN(kt)||kt===null)return ye;if(gr)yr=kt;else if(Ke&&Ke.length>2){var Ji=$r(kt);yr=Ji/(Ke.length-2)}else qt!==dt?yr=(kt-dt)/(qt-dt):yr=1;yr=ua(yr),gr||(yr=vn(yr)),en!==1&&(yr=Jf(yr,en)),yr=Be[0]+yr*(1-Be[0]-Be[1]),yr=Math.min(1,Math.max(0,yr));var mn=Math.floor(yr*1e4);if(Zt&&Jt[mn])tn=Jt[mn];else{if(Pu(Je)==="array")for(var cn=0;cn=Mn&&cn===Ge.length-1){tn=Je[cn];break}if(yr>Mn&&yr2){var cn=kt.map(function(On,zn){return zn/(kt.length-1)}),Mn=kt.map(function(On){return(On-dt)/(qt-dt)});Mn.every(function(On,zn){return cn[zn]===On})||(ua=function(On){if(On<=0||On>=1)return On;for(var zn=0;On>=Mn[zn+1];)zn++;var ts=(On-Mn[zn])/(Mn[zn+1]-Mn[zn]),_l=cn[zn]+ts*(cn[zn+1]-cn[zn]);return _l})}}return ze=[dt,qt],ln},ln.mode=function(kt){return arguments.length?(oe=kt,Ja(),ln):oe},ln.range=function(kt,gr){return Or(kt),ln},ln.out=function(kt){return gt=kt,ln},ln.spread=function(kt){return arguments.length?(Pe=kt,ln):Pe},ln.correctLightness=function(kt){return kt==null&&(kt=!0),Ct=kt,Ja(),Ct?vn=function(gr){for(var tn=Bi(0,!0).lab()[0],yr=Bi(1,!0).lab()[0],Ji=tn>yr,mn=Bi(gr,!0).lab()[0],cn=tn+(yr-tn)*gr,Mn=mn-cn,On=0,zn=1,ts=20;Math.abs(Mn)>.01&&ts-- >0;)(function(){return Ji&&(Mn*=-1),Mn<0?(On=gr,gr+=(zn-gr)*.5):(zn=gr,gr+=(On-gr)*.5),mn=Bi(gr,!0).lab()[0],Mn=mn-cn})();return gr}:vn=function(gr){return gr},ln},ln.padding=function(kt){return kt!=null?(Pu(kt)==="number"&&(kt=[kt,kt]),Be=kt,ln):Be},ln.colors=function(kt,gr){arguments.length<2&&(gr="hex");var tn=[];if(arguments.length===0)tn=Je.slice(0);else if(kt===1)tn=[ln(.5)];else if(kt>1){var yr=ze[0],Ji=ze[1]-yr;tn=Fc(0,kt).map(function(zn){return ln(yr+zn/(kt-1)*Ji)})}else{K=[];var mn=[];if(Ke&&Ke.length>2)for(var cn=1,Mn=Ke.length,On=1<=Mn;On?cnMn;On?cn++:cn--)mn.push((Ke[cn-1]+Ke[cn])*.5);else mn=ze;tn=mn.map(function(zn){return ln(zn)})}return Ta[gr]&&(tn=tn.map(function(zn){return zn[gr]()})),tn},ln.cache=function(kt){return kt!=null?(Zt=kt,ln):Zt},ln.gamma=function(kt){return kt!=null?(en=kt,ln):en},ln.nodata=function(kt){return kt!=null?(ye=Ta(kt),ln):ye},ln};function Fc(K,oe,ye){for(var Pe=[],ze=KGe;ze?Be++:Be--)Pe.push(Be);return Pe}var gl=O,Ca=ed,Qo=function(K){for(var oe=[1,1],ye=1;ye=5){var gt,dt,qt;gt=K.map(function(Ct){return Ct.lab()}),qt=K.length-1,dt=Qo(qt),ze=function(Ct){var Jt=1-Ct,Zt=[0,1,2].map(function(en){return gt.reduce(function(Or,$r,vn){return Or+dt[vn]*Math.pow(Jt,qt-vn)*Math.pow(Ct,vn)*$r[en]},0)});return new gl(Zt,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return ze},yl=function(K){var oe=td(K);return oe.scale=function(){return Ca(oe)},oe},Ao=T,Ki=function(K,oe,ye){if(!Ki[ye])throw new Error("unknown blend mode "+ye);return Ki[ye](K,oe)},Mu=function(K){return function(oe,ye){var Pe=Ao(ye).rgb(),ze=Ao(oe).rgb();return Ao.rgb(K(Pe,ze))}},co=function(K){return function(oe,ye){var Pe=[];return Pe[0]=K(oe[0],ye[0]),Pe[1]=K(oe[1],ye[1]),Pe[2]=K(oe[2],ye[2]),Pe}},Du=function(K){return K},Ro=function(K,oe){return K*oe/255},Uc=function(K,oe){return K>oe?oe:K},Po=function(K,oe){return K>oe?K:oe},Qa=function(K,oe){return 255*(1-(1-K/255)*(1-oe/255))},rd=function(K,oe){return oe<128?2*K*oe/255:255*(1-2*(1-K/255)*(1-oe/255))},ku=function(K,oe){return 255*(1-(1-oe/255)/(K/255))},wf=function(K,oe){return K===255?255:(K=255*(oe/255)/(1-K/255),K>255?255:K)};Ki.normal=Mu(co(Du)),Ki.multiply=Mu(co(Ro)),Ki.screen=Mu(co(Qa)),Ki.overlay=Mu(co(rd)),Ki.darken=Mu(co(Uc)),Ki.lighten=Mu(co(Po)),Ki.dodge=Mu(co(wf)),Ki.burn=Mu(co(ku));for(var Jo=Ki,fo=g.type,nd=g.clip_rgb,Iu=g.TWOPI,Ks=Math.pow,xf=Math.sin,ws=Math.cos,Zi=T,hc=function(K,oe,ye,Pe,ze){K===void 0&&(K=300),oe===void 0&&(oe=-1.5),ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=[0,1]);var Ge=0,Be;fo(ze)==="array"?Be=ze[1]-ze[0]:(Be=0,ze=[ze,ze]);var Ke=function(Je){var gt=Iu*((K+120)/360+oe*Je),dt=Ks(ze[0]+Be*Je,Pe),qt=Ge!==0?ye[0]+Je*Ge:ye,Ct=qt*dt*(1-dt)/2,Jt=ws(gt),Zt=xf(gt),en=dt+Ct*(-.14861*Jt+1.78277*Zt),Or=dt+Ct*(-.29227*Jt-.90649*Zt),$r=dt+Ct*(1.97294*Jt);return Zi(nd([en*255,Or*255,$r*255,1]))};return Ke.start=function(Je){return Je==null?K:(K=Je,Ke)},Ke.rotations=function(Je){return Je==null?oe:(oe=Je,Ke)},Ke.gamma=function(Je){return Je==null?Pe:(Pe=Je,Ke)},Ke.hue=function(Je){return Je==null?ye:(ye=Je,fo(ye)==="array"?(Ge=ye[1]-ye[0],Ge===0&&(ye=ye[1])):Ge=0,Ke)},Ke.lightness=function(Je){return Je==null?ze:(fo(Je)==="array"?(ze=Je,Be=Je[1]-Je[0]):(ze=[Je,Je],Be=0),Ke)},Ke.scale=function(){return Zi.scale(Ke)},Ke.hue(ye),Ke},Ef=O,xs="0123456789abcdef",Es=Math.floor,Zs=Math.random,Ss=function(){for(var K="#",oe=0;oe<6;oe++)K+=xs.charAt(Es(Zs()*16));return new Ef(K,"hex")},zc=l,Qi=Math.log,Nu=Math.pow,er=Math.floor,ho=Math.abs,Qs=function(K,oe){oe===void 0&&(oe=null);var ye={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return zc(K)==="object"&&(K=Object.values(K)),K.forEach(function(Pe){oe&&zc(Pe)==="object"&&(Pe=Pe[oe]),Pe!=null&&!isNaN(Pe)&&(ye.values.push(Pe),ye.sum+=Pe,Peye.max&&(ye.max=Pe),ye.count+=1)}),ye.domain=[ye.min,ye.max],ye.limits=function(Pe,ze){return Os(ye,Pe,ze)},ye},Os=function(K,oe,ye){oe===void 0&&(oe="equal"),ye===void 0&&(ye=7),zc(K)=="array"&&(K=Qs(K));var Pe=K.min,ze=K.max,Ge=K.values.sort(function(sd,Tf){return sd-Tf});if(ye===1)return[Pe,ze];var Be=[];if(oe.substr(0,1)==="c"&&(Be.push(Pe),Be.push(ze)),oe.substr(0,1)==="e"){Be.push(Pe);for(var Ke=1;Ke 0");var Je=Math.LOG10E*Qi(Pe),gt=Math.LOG10E*Qi(ze);Be.push(Pe);for(var dt=1;dt200&&(ua=!1)}for(var ju={},mc=0;mcPe?(ye+.05)/(Pe+.05):(Pe+.05)/(ye+.05)},Pi=O,es=Math.sqrt,Pn=Math.pow,Sr=Math.min,Xr=Math.max,vi=Math.atan2,vc=Math.abs,ml=Math.cos,Ts=Math.sin,ad=Math.exp,pc=Math.PI,bl=function(K,oe,ye,Pe,ze){ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=1);var Ge=function(wa){return 360*wa/(2*pc)},Be=function(wa){return 2*pc*wa/360};K=new Pi(K),oe=new Pi(oe);var Ke=Array.from(K.lab()),Je=Ke[0],gt=Ke[1],dt=Ke[2],qt=Array.from(oe.lab()),Ct=qt[0],Jt=qt[1],Zt=qt[2],en=(Je+Ct)/2,Or=es(Pn(gt,2)+Pn(dt,2)),$r=es(Pn(Jt,2)+Pn(Zt,2)),vn=(Or+$r)/2,ua=.5*(1-es(Pn(vn,7)/(Pn(vn,7)+Pn(25,7)))),Bi=gt*(1+ua),Ja=Jt*(1+ua),ln=es(Pn(Bi,2)+Pn(dt,2)),kt=es(Pn(Ja,2)+Pn(Zt,2)),gr=(ln+kt)/2,tn=Ge(vi(dt,Bi)),yr=Ge(vi(Zt,Ja)),Ji=tn>=0?tn:tn+360,mn=yr>=0?yr:yr+360,cn=vc(Ji-mn)>180?(Ji+mn+360)/2:(Ji+mn)/2,Mn=1-.17*ml(Be(cn-30))+.24*ml(Be(2*cn))+.32*ml(Be(3*cn+6))-.2*ml(Be(4*cn-63)),On=mn-Ji;On=vc(On)<=180?On:mn<=Ji?On+360:On-360,On=2*es(ln*kt)*Ts(Be(On)/2);var zn=Ct-Je,ts=kt-ln,_l=1+.015*Pn(en-50,2)/es(20+Pn(en-50,2)),ju=1+.045*gr,mc=1+.015*gr*Mn,Bu=30*ad(-Pn((cn-275)/25,2)),Cs=2*es(Pn(gr,7)/(Pn(gr,7)+Pn(25,7))),wl=-Cs*Ts(2*Be(Bu)),Fi=es(Pn(zn/(ye*_l),2)+Pn(ts/(Pe*ju),2)+Pn(On/(ze*mc),2)+wl*(ts/(Pe*ju))*(On/(ze*mc)));return Xr(0,Sr(100,Fi))},Nh=O,si=function(K,oe,ye){ye===void 0&&(ye="lab"),K=new Nh(K),oe=new Nh(oe);var Pe=K.get(ye),ze=oe.get(ye),Ge=0;for(var Be in Pe){var Ke=(Pe[Be]||0)-(ze[Be]||0);Ge+=Ke*Ke}return Math.sqrt(Ge)},od=O,gc=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];try{return new(Function.prototype.bind.apply(od,[null].concat(K))),!0}catch{return!1}},Sf=T,qc=ed,Rv={cool:function(){return qc([Sf.hsl(180,1,.9),Sf.hsl(250,.7,.4)])},hot:function(){return qc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Lu={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yc=0,Of=Object.keys(Lu);yc`#${[parseInt(r.substring(1,3),16),parseInt(r.substring(3,5),16),parseInt(r.substring(5,7),16)].map(t=>{let n=parseInt((t*(100+e)/100).toString(),10);const i=(n=n<255?n:255).toString(16);return i.length===1?`0${i}`:i}).join("")}`;function zG(r){let e=0,t=0;const n=r.length;for(;t{const s=UG.contrast(r,o);s>a&&(i=o,a=s)}),ac%(d-f)+f;return UG.oklch(l(o,n,t)/100,l(s,a,i)/100,l(u,0,360)).hex()}function yle(r,e){const t=gle(r,e),n=ple(t,-20),i=qG(t,["#2A2C34","#FFFFFF"]);return{backgroundColor:t,borderColor:n,textColor:i}}const JP=Yu.palette.neutral[40],GG=Yu.palette.neutral[40],eM=(r="",e="")=>r.toLowerCase().localeCompare(e.toLowerCase());function mle(r){var e;const[t]=r;if(t===void 0)return GG;const n={};for(const o of r)n[o]=((e=n[o])!==null&&e!==void 0?e:0)+1;let i=0,a=t;for(const[o,s]of Object.entries(n))s>i&&(i=s,a=o);return a}function L9(r){return Object.entries(r).reduce((e,[t,n])=>(e[t]={mostCommonColor:mle(n),totalCount:n.length},e),{})}const ble=[/^name$/i,/^title$/i,/^label$/i,/name$/i,/description$/i,/^.+/];function _le(r){const e=r.filter(n=>n.type==="property").map(n=>n.captionKey);for(const n of ble){const i=e.find(a=>n.test(a));if(i!==void 0)return{captionKey:i,type:"property"}}const t=r.find(n=>n.type==="type");return t||r.find(n=>n.type==="id")}const wle=r=>{const e=Object.keys(r.properties).map(i=>({captionKey:i,type:"property"}));e.push({type:"id"},{type:"type"});const t=_le(e);if((t==null?void 0:t.type)==="property"){const i=r.properties[t.captionKey];if(i!==void 0)return i.type==="string"?[{value:i.stringified.slice(1,-1)}]:[{value:i.stringified}]}const[n]=r.labels;return(t==null?void 0:t.type)==="type"&&n!==void 0?[{value:n}]:[{value:r.id}]};function xle(r,e){const t={},n={},i={},a={},o=r.map(f=>{var d;const[h]=f.labels,p=Object.assign(Object.assign({captions:wle(f),color:(d=f.color)!==null&&d!==void 0?d:h===void 0?GG:yle(h).backgroundColor},f),{labels:void 0,properties:void 0});return i[f.id]={color:p.color,id:f.id,labelsSorted:[...f.labels].sort(eM),properties:f.properties},f.labels.forEach(g=>{var y;t[g]=[...(y=t[g])!==null&&y!==void 0?y:[],p.color]}),p}),s=e.map(f=>{var d,h,p;return a[f.id]={color:(d=f.color)!==null&&d!==void 0?d:JP,id:f.id,properties:f.properties,type:f.type},n[f.type]=[...(h=n[f.type])!==null&&h!==void 0?h:[],(p=f.color)!==null&&p!==void 0?p:JP],Object.assign(Object.assign({captions:[{value:f.type}],color:JP},f),{properties:void 0,type:void 0})}),u=L9(t),l=L9(n);return{dataLookupTable:{labelMetaData:u,labels:Object.keys(u).sort((f,d)=>eM(f,d)),nodes:i,relationships:a,typeMetaData:l,types:Object.keys(l).sort((f,d)=>eM(f,d))},nodes:o,rels:s}}const j9=/(?:https?|s?ftp|bolt):\/\/(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi,Ele=({text:r})=>{var e;const t=r??"",n=(e=t.match(j9))!==null&&e!==void 0?e:[];return Te.jsx(Te.Fragment,{children:t.split(j9).map((i,a)=>Te.jsxs(ao.Fragment,{children:[i,n[a]&&Te.jsx("a",{href:n[a],target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:n[a]})]},`clickable-url-${a}`))})},Sle=ao.memo(Ele),Ole="…",Tle=900,Cle=150,Ale=300,Rle=({value:r,width:e,type:t})=>{const[n,i]=me.useState(!1),a=e>Tle?Ale:Cle,o=()=>{i(!0)};let s=n?r:r.slice(0,a);const u=s.length!==r.length;return s+=u?Ole:"",Te.jsxs(Te.Fragment,{children:[t.startsWith("Array")&&"[",Te.jsx(Sle,{text:s}),u&&Te.jsx("button",{type:"button",onClick:o,className:"ndl-properties-show-all-button",children:" Show all"}),t.startsWith("Array")&&"]"]})},Ple=({properties:r,paneWidth:e})=>Te.jsxs("div",{className:"ndl-graph-visualization-properties-table",children:[Te.jsxs("div",{className:"ndl-properties-header",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-header-key",children:"Key"}),Te.jsx(Ed,{variant:"body-small",children:"Value"})]}),Object.entries(r).map(([t,{stringified:n,type:i}])=>Te.jsxs("div",{className:"ndl-properties-row",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-key",children:t}),Te.jsx("div",{className:"ndl-properties-value",children:Te.jsx(Rle,{value:n,width:e,type:i})}),Te.jsx("div",{className:"ndl-properties-clipboard-button",children:Te.jsx(z7,{textToCopy:`${t}: ${n}`,size:"small",tooltipProps:{placement:"left",type:"simple"}})})]},t))]}),Mle=({paneWidth:r=400})=>{const{selected:e,nvlGraph:t}=Vl(),n=me.useMemo(()=>{const[s]=e.nodeIds;if(s!==void 0)return t.dataLookupTable.nodes[s]},[e,t]),i=me.useMemo(()=>{const[s]=e.relationshipIds;if(s!==void 0)return t.dataLookupTable.relationships[s]},[e,t]),a=me.useMemo(()=>{if(n)return{data:n,dataType:"node"};if(i)return{data:i,dataType:"relationship"}},[n,i]);if(a===void 0)return null;const o=[{key:"",type:"String",value:`${a.data.id}`},...Object.keys(a.data.properties).map(s=>({key:s,type:a.data.properties[s].type,value:a.data.properties[s].stringified}))];return Te.jsxs(Te.Fragment,{children:[Te.jsxs(ty.Title,{children:[Te.jsx("h6",{className:"ndl-details-title",children:a.dataType==="node"?"Node details":"Relationship details"}),Te.jsx(z7,{textToCopy:o.map(s=>`${s.key}: ${s.value}`).join(` -`),size:"small"})]}),Te.jsxs(ty.Content,{children:[Te.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Te.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Te.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Te.jsx("div",{className:"ndl-details-divider"}),Te.jsx(Ple,{properties:a.data.properties,paneWidth:r})]})]})},Dle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Te.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Te.jsx("li",{children:c},l)})})},kle=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>kle(f)?f():f);return Te.jsxs(Te.Fragment,{children:[t===!0?Te.jsx(Dle,{children:c}):Te.jsx("div",{style:{all:"inherit"},children:c}),s&&Te.jsx(rX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Ile=()=>{const{nvlGraph:r}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(ty.Title,{children:Te.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Te.jsx(ty.Content,{children:Te.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Te.jsxs("div",{className:"ndl-overview-section",children:[Te.jsx("div",{className:"ndl-overview-header",children:Te.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Te.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Te.jsxs("div",{className:"ndl-overview-relationships-section",children:[Te.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Te.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Nle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Te.jsx(Mle,{}):Te.jsx(Ile,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function Lle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(Me=>{n==="select"&&Me.key===" "&&i("pan")},[n,i]),c=me.useCallback(Me=>{n==="pan"&&Me.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(Me=>{lb(Me)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(Me))},[T,e]),L=me.useCallback((Me,Ne)=>{i("drag");const Ce=Me.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Ce,relationshipIds:r.relationshipIds});return}e({nodeIds:Ce,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(Me,Ne)},[e,x,r,i]),B=me.useCallback((Me,Ne)=>{typeof S=="function"&&S(Me,Ne),i("select")},[S,i]),j=me.useCallback(Me=>{typeof E=="function"&&E(Me)},[E]),z=me.useCallback((Me,Ne,Ce)=>{typeof O=="function"&&O(Me,Ne,Ce)},[O]),H=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.nodeIds.includes(Me.id)){const Z=r.nodeIds.filter(ie=>ie!==Me.id);e({nodeIds:Z,relationshipIds:r.relationshipIds})}else{const Z=[...r.nodeIds,Me.id];e({nodeIds:Z,relationshipIds:r.relationshipIds})}else e({nodeIds:[Me.id],relationshipIds:[]});typeof _=="function"&&_(Me,Ne,Ce)}},[e,r,_]),q=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.relationshipIds.includes(Me.id)){const Z=r.relationshipIds.filter(ie=>ie!==Me.id);e({nodeIds:r.nodeIds,relationshipIds:Z})}else{const Z=[...r.relationshipIds,Me.id];e({nodeIds:r.nodeIds,relationshipIds:Z})}else e({nodeIds:[],relationshipIds:[Me.id]});typeof m=="function"&&m(Me,Ne,Ce)}},[e,r,m]),W=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof P=="function"&&P(Me,Ne,Ce)},[P]),$=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof I=="function"&&I(Me,Ne,Ce)},[I]),J=me.useCallback((Me,Ne,Ce)=>{const Y=Me.map(ie=>ie.id),Z=Ne.map(ie=>ie.id);if(Gw(Ce)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],De=Ee(ie,Y),Ie=Ee(we,Z);e({nodeIds:De,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Z})},[e,r]),X=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof d=="function"&&d({nodes:Me,rels:Ne},Ce)},[J,d]),Q=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof f=="function"&&f({nodes:Me,rels:Ne},Ce)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var Me;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Q:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(Me=a.onZoom)!==null&&Me!==void 0?Me:!0})},[pe,ne,le,ce,ue,re,a,Q,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(Me=>Object.assign(Object.assign({},Me),{disabled:de?!de.has(Me.id):!1,selected:se.nodeIds.has(Me.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(Me=>Object.assign(Object.assign({},Me),{disabled:ge?!ge.has(Me.id):!1,selected:se.relIds.has(Me.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var jle=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx("div",{className:Vn(Ble[t],e),children:r}),Fle={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Te.jsxs(XX,{orientation:"vertical",isFloating:!0,size:"small",children:[Te.jsx(NG,{})," ",Te.jsx(LG,{})," ",Te.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Te.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Te.jsx(FG,{})," ",Te.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=jle(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=S2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Q,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>xle(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=Lle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Q,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,Me]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Te.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:Me,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,Me]),Ce=L??"div";return Te.jsx(Ce,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Te.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Q,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Te.jsxs("div",{className:"ndl-graph-visualization",children:[Te.jsx(Zue,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Fle),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Z;Y||(Z=j.current)===null||Z===void 0||Z.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Te.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Te.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Te.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Te.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Te.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=nle;ql.LassoSelectButton=ile;ql.SingleSelectButton=rle;ql.SearchButton=ale;ql.SingleSelectionSidePanelContents=Nle;ql.LayoutSelectButton=sle;ql.GestureSelectButton=lle;function Ule(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function zle(r){return r.map(e=>{const t=Ule(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function qle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Gle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Te.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Te.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Te.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Vle(){const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);if(!e||e.length<3)return"light";const t=Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722;return t===0&&e.length>3&&e[3]==="0"?"light":t<128?"dark":"light"}function Hle(r){me.useEffect(()=>{const e=r==="auto"?Vle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Wle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Hle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[zle(r??[]),qle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Te.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Te.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Te.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Yle(){return Te.jsxs(Gle,{children:[Te.jsxs("h1",{children:["BackgroundColor: ",window.getComputedStyle(document.body,null).getPropertyValue("background-color")]}),Te.jsx(Wle,{})]})}const Xle=cV(Yle),$le={render:Xle},gE=window.__NEO4J_VIZ_DATA__;if(!gE)throw document.body.innerHTML=` +`),size:"small"})]}),Te.jsxs(ty.Content,{children:[Te.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Te.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Te.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Te.jsx("div",{className:"ndl-details-divider"}),Te.jsx(Ple,{properties:a.data.properties,paneWidth:r})]})]})},Dle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Te.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Te.jsx("li",{children:c},l)})})},kle=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>kle(f)?f():f);return Te.jsxs(Te.Fragment,{children:[t===!0?Te.jsx(Dle,{children:c}):Te.jsx("div",{style:{all:"inherit"},children:c}),s&&Te.jsx(rX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Ile=()=>{const{nvlGraph:r}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(ty.Title,{children:Te.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Te.jsx(ty.Content,{children:Te.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Te.jsxs("div",{className:"ndl-overview-section",children:[Te.jsx("div",{className:"ndl-overview-header",children:Te.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Te.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Te.jsxs("div",{className:"ndl-overview-relationships-section",children:[Te.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Te.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Nle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Te.jsx(Mle,{}):Te.jsx(Ile,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function Lle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(Me=>{n==="select"&&Me.key===" "&&i("pan")},[n,i]),c=me.useCallback(Me=>{n==="pan"&&Me.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(Me=>{lb(Me)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(Me))},[T,e]),L=me.useCallback((Me,Ne)=>{i("drag");const Ce=Me.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Ce,relationshipIds:r.relationshipIds});return}e({nodeIds:Ce,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(Me,Ne)},[e,x,r,i]),B=me.useCallback((Me,Ne)=>{typeof S=="function"&&S(Me,Ne),i("select")},[S,i]),j=me.useCallback(Me=>{typeof E=="function"&&E(Me)},[E]),z=me.useCallback((Me,Ne,Ce)=>{typeof O=="function"&&O(Me,Ne,Ce)},[O]),H=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.nodeIds.includes(Me.id)){const Z=r.nodeIds.filter(ie=>ie!==Me.id);e({nodeIds:Z,relationshipIds:r.relationshipIds})}else{const Z=[...r.nodeIds,Me.id];e({nodeIds:Z,relationshipIds:r.relationshipIds})}else e({nodeIds:[Me.id],relationshipIds:[]});typeof _=="function"&&_(Me,Ne,Ce)}},[e,r,_]),q=me.useCallback((Me,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.relationshipIds.includes(Me.id)){const Z=r.relationshipIds.filter(ie=>ie!==Me.id);e({nodeIds:r.nodeIds,relationshipIds:Z})}else{const Z=[...r.relationshipIds,Me.id];e({nodeIds:r.nodeIds,relationshipIds:Z})}else e({nodeIds:[],relationshipIds:[Me.id]});typeof m=="function"&&m(Me,Ne,Ce)}},[e,r,m]),W=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof P=="function"&&P(Me,Ne,Ce)},[P]),$=me.useCallback((Me,Ne,Ce)=>{lb(Ce)||typeof I=="function"&&I(Me,Ne,Ce)},[I]),J=me.useCallback((Me,Ne,Ce)=>{const Y=Me.map(ie=>ie.id),Z=Ne.map(ie=>ie.id);if(Gw(Ce)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],De=Ee(ie,Y),Ie=Ee(we,Z);e({nodeIds:De,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Z})},[e,r]),X=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof d=="function"&&d({nodes:Me,rels:Ne},Ce)},[J,d]),Q=me.useCallback(({nodes:Me,rels:Ne},Ce)=>{J(Me,Ne,Ce),typeof f=="function"&&f({nodes:Me,rels:Ne},Ce)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var Me;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Q:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(Me=a.onZoom)!==null&&Me!==void 0?Me:!0})},[pe,ne,le,ce,ue,re,a,Q,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(Me=>Object.assign(Object.assign({},Me),{disabled:de?!de.has(Me.id):!1,selected:se.nodeIds.has(Me.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(Me=>Object.assign(Object.assign({},Me),{disabled:ge?!ge.has(Me.id):!1,selected:se.relIds.has(Me.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var jle=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx("div",{className:Vn(Ble[t],e),children:r}),Fle={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Te.jsxs(XX,{orientation:"vertical",isFloating:!0,size:"small",children:[Te.jsx(NG,{})," ",Te.jsx(LG,{})," ",Te.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Te.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Te.jsx(FG,{})," ",Te.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=jle(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=S2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Q,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>xle(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=Lle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Q,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,Me]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Te.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:Me,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,Me]),Ce=L??"div";return Te.jsx(Ce,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Te.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Q,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Te.jsxs("div",{className:"ndl-graph-visualization",children:[Te.jsx(Zue,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Fle),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Z;Y||(Z=j.current)===null||Z===void 0||Z.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Te.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Te.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Te.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Te.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Te.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=nle;ql.LassoSelectButton=ile;ql.SingleSelectButton=rle;ql.SearchButton=ale;ql.SingleSelectionSidePanelContents=Nle;ql.LayoutSelectButton=sle;ql.GestureSelectButton=lle;function Ule(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function zle(r){return r.map(e=>{const t=Ule(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function qle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Gle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Te.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Te.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Te.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Vle(){const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);if(!e||e.length<3)return"light";const t=Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722;return t===0&&e.length>3&&e[3]==="0"?"light":t<128?"dark":"light"}function Hle(r){me.useEffect(()=>{const e=r==="auto"?Vle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Wle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Hle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[zle(r??[]),qle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Te.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Te.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Te.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Yle(){return Te.jsx(Gle,{children:Te.jsx(Wle,{})})}const Xle=cV(Yle),$le={render:Xle},gE=window.__NEO4J_VIZ_DATA__;if(!gE)throw document.body.innerHTML=`

Missing visualization data

Expected window.__NEO4J_VIZ_DATA__ to be set.

diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js index 91fc3ca..e32d53f 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js @@ -82212,13 +82212,7 @@ function Vle() { ) }); } function Hle() { - return /* @__PURE__ */ Te.jsxs(zle, { children: [ - /* @__PURE__ */ Te.jsxs("h1", { children: [ - "BackgroundColor: ", - window.getComputedStyle(document.body, null).getPropertyValue("background-color") - ] }), - /* @__PURE__ */ Te.jsx(Vle, {}) - ] }); + return /* @__PURE__ */ Te.jsx(zle, { children: /* @__PURE__ */ Te.jsx(Vle, {}) }); } const Wle = uV(Hle), Xle = { render: Wle }; export { From 1a29b6381b90ca37218c2fa6dec7991019f3320f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 23 Feb 2026 11:27:23 +0100 Subject: [PATCH 3/4] Check for vscode theme class --- changelog.md | 7 +- js-applet/src/graph-widget.tsx | 9 +- js-applet/yarn.lock | 365 +- .../resources/nvl_entrypoint/index.html | 178 +- .../resources/nvl_entrypoint/widget.js | 8723 +++++++++-------- 5 files changed, 4649 insertions(+), 4633 deletions(-) diff --git a/changelog.md b/changelog.md index 14d0d03..ec98836 100644 --- a/changelog.md +++ b/changelog.md @@ -2,17 +2,14 @@ ## Breaking changes - ## New features - ## Bug fixes -* Fixed a bug with the theme detection. In VSCode the output would always be in dark theme as the reported background color was always reported as `rgba(0, 0, 0, 0)`. +- Fixed a bug with the theme detection inn VSCode. ## Improvements -* Allow setting the theme manually in `VG.render(theme="light")` and `VG.render_widget(theme="dark")`. - +- Allow setting the theme manually in `VG.render(theme="light")` and `VG.render_widget(theme="dark")`. ## Other changes diff --git a/js-applet/src/graph-widget.tsx b/js-applet/src/graph-widget.tsx index 6b89a09..3f7b75f 100644 --- a/js-applet/src/graph-widget.tsx +++ b/js-applet/src/graph-widget.tsx @@ -31,6 +31,13 @@ export type WidgetData = { }; function detectTheme(): "light" | "dark" { + if (document.body.classList.contains("vscode-light")) { + return "light"; + } + if (document.body.classList.contains("vscode-dark")) { + return "dark"; + } + const backgroundColorString = window .getComputedStyle(document.body, null) .getPropertyValue("background-color"); @@ -115,7 +122,7 @@ function GraphWidget() { function GraphWidgetWithErrorBoundary() { return ( - + ); } diff --git a/js-applet/yarn.lock b/js-applet/yarn.lock index 13a802c..922cb6b 100644 --- a/js-applet/yarn.lock +++ b/js-applet/yarn.lock @@ -613,7 +613,7 @@ dependencies: "@floating-ui/utils" "^0.2.10" -"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.7.4", "@floating-ui/dom@^1.7.5": +"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.7.5": version "1.7.5" resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.7.5.tgz#60bfc83a4d1275b2a90db76bf42ca2a5f2c231c2" integrity sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg== @@ -621,26 +621,19 @@ "@floating-ui/core" "^1.7.4" "@floating-ui/utils" "^0.2.10" -"@floating-ui/react-dom@2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.6.tgz#189f681043c1400561f62972f461b93f01bf2231" - integrity sha512-4JX6rEatQEvlmgU80wZyq9RT96HZJa88q8hp0pBd+LrczeDI4o6uA2M+uvxngVHo4Ihr8uibXxH6+70zhAFrVw== - dependencies: - "@floating-ui/dom" "^1.7.4" - -"@floating-ui/react-dom@^2.1.6", "@floating-ui/react-dom@^2.1.7": +"@floating-ui/react-dom@2.1.7", "@floating-ui/react-dom@^2.1.7": version "2.1.7" resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.7.tgz#529475cc16ee4976ba3387968117e773d9aa703e" integrity sha512-0tLRojf/1Go2JgEVm+3Frg9A3IW8bJgKgdO0BN5RkF//ufuz2joZM63Npau2ff3J6lUVYgDSNzNkR+aH3IVfjg== dependencies: "@floating-ui/dom" "^1.7.5" -"@floating-ui/react@0.27.16": - version "0.27.16" - resolved "https://registry.yarnpkg.com/@floating-ui/react/-/react-0.27.16.tgz#6e485b5270b7a3296fdc4d0faf2ac9abf955a2f7" - integrity sha512-9O8N4SeG2z++TSM8QA/KTeKFBVCNEz/AGS7gWPJf6KFRzmRWixFRnCnkPHRDwSVZW6QPDO6uT0P2SpWNKCc9/g== +"@floating-ui/react@0.27.17": + version "0.27.17" + resolved "https://registry.yarnpkg.com/@floating-ui/react/-/react-0.27.17.tgz#f1d74e01cf10016825a4167b3b0139a4d5af118a" + integrity sha512-LGVZKHwmWGg6MRHjLLgsfyaX2y2aCNgnD1zT/E6B+/h+vxg+nIJUqHPAlTzsHDyqdgEpJ1Np5kxWuFEErXzoGg== dependencies: - "@floating-ui/react-dom" "^2.1.6" + "@floating-ui/react-dom" "^2.1.7" "@floating-ui/utils" "^0.2.10" tabbable "^6.0.0" @@ -822,22 +815,22 @@ integrity sha512-e6LK0H7uQj56F7lbTLTdQDlKgvCs8XE3I7zMx8Itt+qzMq5QNcHQ7OU7RU9x7w7EzNwWjeMBry3AT0PtMaCHHA== "@neo4j-ndl/react-graph@^1.2.8": - version "1.2.19" - resolved "https://registry.yarnpkg.com/@neo4j-ndl/react-graph/-/react-graph-1.2.19.tgz#f50667bfe5647065ad3f91fae0244322f3681bf3" - integrity sha512-RPf3gq9ACU3YHf2FnezrCX9pALxJe8Txqcf3Vf4wMfaic+evC5gg+AFKZxsl69xNyZ2l65/v18pawxY7eJ5iQQ== + version "1.2.20" + resolved "https://registry.yarnpkg.com/@neo4j-ndl/react-graph/-/react-graph-1.2.20.tgz#d8454b6014c57c77d582a441dd92a912398f2476" + integrity sha512-ptLMNaKHcFDXZECZcVfSoZ4Xc7+mjGEs66SHrsrr4UboHelMAU9/lBQZIXXQ7grNg6cesHRJ2ULdU0E/Vnu0PQ== dependencies: classnames "2.5.1" re-resizable "6.11.2" "@neo4j-ndl/react@^4.7.3": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@neo4j-ndl/react/-/react-4.9.1.tgz#fc980b9a3b2d983e14561bda6521d2edcad3386d" - integrity sha512-EQrHZHwQjfk/ENjo4DPR4J7Aw9oBF5CBtYDBbgcO0jbjzaNC30FjQhv9dfS9VnOixYQQ/UxRIQGa+1k6tpsYpA== + version "4.9.2" + resolved "https://registry.yarnpkg.com/@neo4j-ndl/react/-/react-4.9.2.tgz#c8ac8c88c5d176162383eba36ea8d8b84b84f0e6" + integrity sha512-fFJagmWp1zPDmVO+2mJhxvrFmTYxYk6HrOE1bo+gN8mLyCxgYFTEc/6z3k81u/8I+Krn0iEuBMDf5Zd6MUChoQ== dependencies: "@dnd-kit/core" "6.3.1" "@dnd-kit/sortable" "10.0.0" - "@floating-ui/react" "0.27.16" - "@floating-ui/react-dom" "2.1.6" + "@floating-ui/react" "0.27.17" + "@floating-ui/react-dom" "2.1.7" "@heroicons/react" "2.2.0" "@neo4j-devtools/word-color" "0.0.8" "@uiw/react-color" "2.8.0" @@ -2032,130 +2025,130 @@ resolved "https://registry.yarnpkg.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz#47d2bf4cef6d470b22f5831b420f8964e0bf755f" integrity sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA== -"@rollup/rollup-android-arm-eabi@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.58.0.tgz#4cda52aeff1d38539ff823b371dfe85064c1252e" - integrity sha512-mr0tmS/4FoVk1cnaeN244A/wjvGDNItZKR8hRhnmCzygyRXYtKF5jVDSIILR1U97CTzAYmbgIj/Dukg62ggG5w== - -"@rollup/rollup-android-arm64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.58.0.tgz#ceffd87180d55701fb362c8fda9a380d64976c9e" - integrity sha512-+s++dbp+/RTte62mQD9wLSbiMTV+xr/PeRJEc/sFZFSBRlHPNPVaf5FXlzAL77Mr8FtSfQqCN+I598M8U41ccQ== - -"@rollup/rollup-darwin-arm64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.58.0.tgz#fe0e54a3b2affd1a951fec7c35b9013d1d0ec5f6" - integrity sha512-MFWBwTcYs0jZbINQBXHfSrpSQJq3IUOakcKPzfeSznONop14Pxuqa0Kg19GD0rNBMPQI2tFtu3UzapZpH0Uc1Q== - -"@rollup/rollup-darwin-x64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.58.0.tgz#0509fab5a7f3e77cbd4b26f011e75cdc69e2205d" - integrity sha512-yiKJY7pj9c9JwzuKYLFaDZw5gma3fI9bkPEIyofvVfsPqjCWPglSHdpdwXpKGvDeYDms3Qal8qGMEHZ1M/4Udg== - -"@rollup/rollup-freebsd-arm64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.58.0.tgz#dbe79b0ef383eae698623d0c1d6b959c2b4584ac" - integrity sha512-x97kCoBh5MOevpn/CNK9W1x8BEzO238541BGWBc315uOlN0AD/ifZ1msg+ZQB05Ux+VF6EcYqpiagfLJ8U3LvQ== - -"@rollup/rollup-freebsd-x64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.58.0.tgz#b65254c46414c59698316671d69d6ea6ee462737" - integrity sha512-Aa8jPoZ6IQAG2eIrcXPpjRcMjROMFxCt1UYPZZtCxRV68WkuSigYtQ/7Zwrcr2IvtNJo7T2JfDXyMLxq5L4Jlg== - -"@rollup/rollup-linux-arm-gnueabihf@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.58.0.tgz#5a85c07b0a7083f7db33a9c9acb8415aa87e4efb" - integrity sha512-Ob8YgT5kD/lSIYW2Rcngs5kNB/44Q2RzBSPz9brf2WEtcGR7/f/E9HeHn1wYaAwKBni+bdXEwgHvUd0x12lQSA== - -"@rollup/rollup-linux-arm-musleabihf@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.58.0.tgz#b29ff496f689529603bd3761e6d46325aba4d542" - integrity sha512-K+RI5oP1ceqoadvNt1FecL17Qtw/n9BgRSzxif3rTL2QlIu88ccvY+Y9nnHe/cmT5zbH9+bpiJuG1mGHRVwF4Q== - -"@rollup/rollup-linux-arm64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.58.0.tgz#f188f24ab4ed307391bd12d9ce6021414ab33858" - integrity sha512-T+17JAsCKUjmbopcKepJjHWHXSjeW7O5PL7lEFaeQmiVyw4kkc5/lyYKzrv6ElWRX/MrEWfPiJWqbTvfIvjM1Q== - -"@rollup/rollup-linux-arm64-musl@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.58.0.tgz#8c0f105952ab6eaf3b7c335d67866a12f6e9701d" - integrity sha512-cCePktb9+6R9itIJdeCFF9txPU7pQeEHB5AbHu/MKsfH/k70ZtOeq1k4YAtBv9Z7mmKI5/wOLYjQ+B9QdxR6LA== - -"@rollup/rollup-linux-loong64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.58.0.tgz#5637c6293d20c2a42e32bc176fe91f25df29a589" - integrity sha512-iekUaLkfliAsDl4/xSdoCJ1gnnIXvoNz85C8U8+ZxknM5pBStfZjeXgB8lXobDQvvPRCN8FPmmuTtH+z95HTmg== - -"@rollup/rollup-linux-loong64-musl@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.58.0.tgz#232cc97d391a8e2a31f012d31e527a10d2b7624f" - integrity sha512-68ofRgJNl/jYJbxFjCKE7IwhbfxOl1muPN4KbIqAIe32lm22KmU7E8OPvyy68HTNkI2iV/c8y2kSPSm2mW/Q9Q== - -"@rollup/rollup-linux-ppc64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.58.0.tgz#dd67db4a17c577eca6903d8f2e6427729318946f" - integrity sha512-dpz8vT0i+JqUKuSNPCP5SYyIV2Lh0sNL1+FhM7eLC457d5B9/BC3kDPp5BBftMmTNsBarcPcoz5UGSsnCiw4XQ== - -"@rollup/rollup-linux-ppc64-musl@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.58.0.tgz#2faf62360f3b98d252a03c9b83ba38013048edf4" - integrity sha512-4gdkkf9UJ7tafnweBCR/mk4jf3Jfl0cKX9Np80t5i78kjIH0ZdezUv/JDI2VtruE5lunfACqftJ8dIMGN4oHew== - -"@rollup/rollup-linux-riscv64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.58.0.tgz#5281964be59302d441abcd8ad2440beb92999be3" - integrity sha512-YFS4vPnOkDTD/JriUeeZurFYoJhPf9GQQEF/v4lltp3mVcBmnsAdjEWhr2cjUCZzZNzxCG0HZOvJU44UGHSdzw== - -"@rollup/rollup-linux-riscv64-musl@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.58.0.tgz#aff5c40462868bb3ec5dc3950b5c57f34b64e36e" - integrity sha512-x2xgZlFne+QVNKV8b4wwaCS8pwq3y14zedZ5DqLzjdRITvreBk//4Knbcvm7+lWmms9V9qFp60MtUd0/t/PXPw== - -"@rollup/rollup-linux-s390x-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.58.0.tgz#4203a0d06289b6e684e4d2b643a0d16e66bb4435" - integrity sha512-jIhrujyn4UnWF8S+DHSkAkDEO3hLX0cjzxJZPLF80xFyzyUIYgSMRcYQ3+uqEoyDD2beGq7Dj7edi8OnJcS/hg== - -"@rollup/rollup-linux-x64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.58.0.tgz#1ec45245ea6b8699d14386e91ba78ea0107d982f" - integrity sha512-+410Srdoh78MKSJxTQ+hZ/Mx+ajd6RjjPwBPNd0R3J9FtL6ZA0GqiiyNjCO9In0IzZkCNrpGymSfn+kgyPQocg== - -"@rollup/rollup-linux-x64-musl@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.58.0.tgz#42ca10181712a325a5392d423e49804813a390ce" - integrity sha512-ZjMyby5SICi227y1MTR3VYBpFTdZs823Rs/hpakufleBoufoOIB6jtm9FEoxn/cgO7l6PM2rCEl5Kre5vX0QrQ== - -"@rollup/rollup-openbsd-x64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.58.0.tgz#02cfab92d507419194f7ee9b4a76ad9d101ca4a1" - integrity sha512-ds4iwfYkSQ0k1nb8LTcyXw//ToHOnNTJtceySpL3fa7tc/AsE+UpUFphW126A6fKBGJD5dhRvg8zw1rvoGFxmw== - -"@rollup/rollup-openharmony-arm64@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.58.0.tgz#34d1ffb17a72819611cf277474e2e6b35e6beaa7" - integrity sha512-fd/zpJniln4ICdPkjWFhZYeY/bpnaN9pGa6ko+5WD38I0tTqk9lXMgXZg09MNdhpARngmxiCg0B0XUamNw/5BQ== - -"@rollup/rollup-win32-arm64-msvc@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.58.0.tgz#c9cbe2d5a5a741222301b473f29069781e8a0f77" - integrity sha512-YpG8dUOip7DCz3nr/JUfPbIUo+2d/dy++5bFzgi4ugOGBIox+qMbbqt/JoORwvI/C9Kn2tz6+Bieoqd5+B1CjA== - -"@rollup/rollup-win32-ia32-msvc@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.58.0.tgz#b4b393de58f38f87fa66ca1371d865366756a24c" - integrity sha512-b9DI8jpFQVh4hIXFr0/+N/TzLdpBIoPzjt0Rt4xJbW3mzguV3mduR9cNgiuFcuL/TeORejJhCWiAXe3E/6PxWA== - -"@rollup/rollup-win32-x64-gnu@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.58.0.tgz#583097cf2e8403c14df49da1a93ce94fde2bca22" - integrity sha512-CSrVpmoRJFN06LL9xhkitkwUcTZtIotYAF5p6XOR2zW0Zz5mzb3IPpcoPhB02frzMHFNo1reQ9xSF5fFm3hUsQ== - -"@rollup/rollup-win32-x64-msvc@4.58.0": - version "4.58.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.58.0.tgz#de01bb79f597fdba7c205e4d7d7f85760f8b2645" - integrity sha512-QFsBgQNTnh5K0t/sBsjJLq24YVqEIVkGpfN2VHsnN90soZyhaiA9UUHufcctVNL4ypJY0wrwad0wslx2KJQ1/w== +"@rollup/rollup-android-arm-eabi@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz#a6742c74c7d9d6d604ef8a48f99326b4ecda3d82" + integrity sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg== + +"@rollup/rollup-android-arm64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz#97247be098de4df0c11971089fd2edf80a5da8cf" + integrity sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q== + +"@rollup/rollup-darwin-arm64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz#674852cf14cf11b8056e0b1a2f4e872b523576cf" + integrity sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg== + +"@rollup/rollup-darwin-x64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz#36dfd7ed0aaf4d9d89d9ef983af72632455b0246" + integrity sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w== + +"@rollup/rollup-freebsd-arm64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz#2f87c2074b4220260fdb52a9996246edfc633c22" + integrity sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA== + +"@rollup/rollup-freebsd-x64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz#9b5a26522a38a95dc06616d1939d4d9a76937803" + integrity sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg== + +"@rollup/rollup-linux-arm-gnueabihf@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz#86aa4859385a8734235b5e40a48e52d770758c3a" + integrity sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw== + +"@rollup/rollup-linux-arm-musleabihf@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz#cbe70e56e6ece8dac83eb773b624fc9e5a460976" + integrity sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA== + +"@rollup/rollup-linux-arm64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz#d14992a2e653bc3263d284bc6579b7a2890e1c45" + integrity sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA== + +"@rollup/rollup-linux-arm64-musl@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz#2fdd1ddc434ea90aeaa0851d2044789b4d07f6da" + integrity sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA== + +"@rollup/rollup-linux-loong64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz#8a181e6f89f969f21666a743cd411416c80099e7" + integrity sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg== + +"@rollup/rollup-linux-loong64-musl@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz#904125af2babc395f8061daa27b5af1f4e3f2f78" + integrity sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q== + +"@rollup/rollup-linux-ppc64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz#a57970ac6864c9a3447411a658224bdcf948be22" + integrity sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA== + +"@rollup/rollup-linux-ppc64-musl@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz#bb84de5b26870567a4267666e08891e80bb56a63" + integrity sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA== + +"@rollup/rollup-linux-riscv64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz#72d00d2c7fb375ce3564e759db33f17a35bffab9" + integrity sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg== + +"@rollup/rollup-linux-riscv64-musl@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz#4c166ef58e718f9245bd31873384ba15a5c1a883" + integrity sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg== + +"@rollup/rollup-linux-s390x-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz#bb5025cde9a61db478c2ca7215808ad3bce73a09" + integrity sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w== + +"@rollup/rollup-linux-x64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz#9b66b1f9cd95c6624c788f021c756269ffed1552" + integrity sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg== + +"@rollup/rollup-linux-x64-musl@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz#b007ca255dc7166017d57d7d2451963f0bd23fd9" + integrity sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg== + +"@rollup/rollup-openbsd-x64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz#e8b357b2d1aa2c8d76a98f5f0d889eabe93f4ef9" + integrity sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ== + +"@rollup/rollup-openharmony-arm64@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz#96c2e3f4aacd3d921981329831ff8dde492204dc" + integrity sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA== + +"@rollup/rollup-win32-arm64-msvc@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz#2d865149d706d938df8b4b8f117e69a77646d581" + integrity sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A== + +"@rollup/rollup-win32-ia32-msvc@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz#abe1593be0fa92325e9971c8da429c5e05b92c36" + integrity sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA== + +"@rollup/rollup-win32-x64-gnu@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz#c4af3e9518c9a5cd4b1c163dc81d0ad4d82e7eab" + integrity sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA== + +"@rollup/rollup-win32-x64-msvc@4.59.0": + version "4.59.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz#4584a8a87b29188a4c1fe987a9fcf701e256d86c" + integrity sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA== "@segment/analytics-core@1.8.2": version "1.8.2" @@ -2287,9 +2280,9 @@ integrity sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w== "@swc/helpers@^0.5.0": - version "0.5.18" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.18.tgz#feeeabea0d10106ee25aaf900165df911ab6d3b1" - integrity sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ== + version "0.5.19" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.19.tgz#9a8c8a0bdaecfdfb9b8ae5421c0c8e09246dfee9" + integrity sha512-QamiFeIK3txNjgUTNppE6MiG3p7TdninpZu0E0PbqVh1a9FNLT2FRhisaa4NcaX52XVhA5l7Pk58Ft7Sqi/2sA== dependencies: tslib "^2.8.0" @@ -3019,9 +3012,9 @@ callsites@^3.0.0: integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== caniuse-lite@^1.0.30001759: - version "1.0.30001770" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001770.tgz#4dc47d3b263a50fbb243448034921e0a88591a84" - integrity sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw== + version "1.0.30001774" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001774.tgz#0e576b6f374063abcd499d202b9ba1301be29b70" + integrity sha512-DDdwPGz99nmIEv216hKSgLD+D4ikHQHjBC/seF98N9CPqRX4M5mSxT9eTV6oyisnJcuzxtZy4n17yKKQYmYQOA== ccount@^2.0.0: version "2.0.1" @@ -4190,9 +4183,9 @@ json5@^2.2.3: integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== katex@^0.16.0, katex@^0.16.22: - version "0.16.28" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.28.tgz#64068425b5a29b41b136aae0d51cbb2c71d64c39" - integrity sha512-YHzO7721WbmAL6Ov1uzN/l5mY5WWWhJBSW+jq4tkfZfsxmo1hu6frS0EOswvjBUnWE6NtjEs48SFn5CQESRLZg== + version "0.16.32" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.32.tgz#4f0cbfb68db20f2ea333173c35e8e45d729a65fa" + integrity sha512-ac0FzkRJlpw4WyH3Zu/OgU9LmPKqjHr6O2BxfSrBt8uJ1BhvH2YK3oJ4ut/K+O+6qQt2MGpdbn0MrffVEnnUDQ== dependencies: commander "^8.3.0" @@ -4307,9 +4300,9 @@ mdast-util-find-and-replace@^3.0.0: unist-util-visit-parents "^6.0.0" mdast-util-from-markdown@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz#4850390ca7cf17413a9b9a0fbefcd1bc0eb4160a" - integrity sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA== + version "2.0.3" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz#c95822b91aab75f18a4cbe8b2f51b873ed2cf0c7" + integrity sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q== dependencies: "@types/mdast" "^4.0.0" "@types/unist" "^3.0.0" @@ -5419,37 +5412,37 @@ robust-predicates@^3.0.2: integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== rollup@^4.34.9, rollup@^4.43.0: - version "4.58.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.58.0.tgz#cdbbb79d48ff94f192d9974988c1728f9dd1994c" - integrity sha512-wbT0mBmWbIvvq8NeEYWWvevvxnOyhKChir47S66WCxw1SXqhw7ssIYejnQEVt7XYQpsj2y8F9PM+Cr3SNEa0gw== + version "4.59.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.59.0.tgz#cf74edac17c1486f562d728a4d923a694abdf06f" + integrity sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg== dependencies: "@types/estree" "1.0.8" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.58.0" - "@rollup/rollup-android-arm64" "4.58.0" - "@rollup/rollup-darwin-arm64" "4.58.0" - "@rollup/rollup-darwin-x64" "4.58.0" - "@rollup/rollup-freebsd-arm64" "4.58.0" - "@rollup/rollup-freebsd-x64" "4.58.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.58.0" - "@rollup/rollup-linux-arm-musleabihf" "4.58.0" - "@rollup/rollup-linux-arm64-gnu" "4.58.0" - "@rollup/rollup-linux-arm64-musl" "4.58.0" - "@rollup/rollup-linux-loong64-gnu" "4.58.0" - "@rollup/rollup-linux-loong64-musl" "4.58.0" - "@rollup/rollup-linux-ppc64-gnu" "4.58.0" - "@rollup/rollup-linux-ppc64-musl" "4.58.0" - "@rollup/rollup-linux-riscv64-gnu" "4.58.0" - "@rollup/rollup-linux-riscv64-musl" "4.58.0" - "@rollup/rollup-linux-s390x-gnu" "4.58.0" - "@rollup/rollup-linux-x64-gnu" "4.58.0" - "@rollup/rollup-linux-x64-musl" "4.58.0" - "@rollup/rollup-openbsd-x64" "4.58.0" - "@rollup/rollup-openharmony-arm64" "4.58.0" - "@rollup/rollup-win32-arm64-msvc" "4.58.0" - "@rollup/rollup-win32-ia32-msvc" "4.58.0" - "@rollup/rollup-win32-x64-gnu" "4.58.0" - "@rollup/rollup-win32-x64-msvc" "4.58.0" + "@rollup/rollup-android-arm-eabi" "4.59.0" + "@rollup/rollup-android-arm64" "4.59.0" + "@rollup/rollup-darwin-arm64" "4.59.0" + "@rollup/rollup-darwin-x64" "4.59.0" + "@rollup/rollup-freebsd-arm64" "4.59.0" + "@rollup/rollup-freebsd-x64" "4.59.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.59.0" + "@rollup/rollup-linux-arm-musleabihf" "4.59.0" + "@rollup/rollup-linux-arm64-gnu" "4.59.0" + "@rollup/rollup-linux-arm64-musl" "4.59.0" + "@rollup/rollup-linux-loong64-gnu" "4.59.0" + "@rollup/rollup-linux-loong64-musl" "4.59.0" + "@rollup/rollup-linux-ppc64-gnu" "4.59.0" + "@rollup/rollup-linux-ppc64-musl" "4.59.0" + "@rollup/rollup-linux-riscv64-gnu" "4.59.0" + "@rollup/rollup-linux-riscv64-musl" "4.59.0" + "@rollup/rollup-linux-s390x-gnu" "4.59.0" + "@rollup/rollup-linux-x64-gnu" "4.59.0" + "@rollup/rollup-linux-x64-musl" "4.59.0" + "@rollup/rollup-openbsd-x64" "4.59.0" + "@rollup/rollup-openharmony-arm64" "4.59.0" + "@rollup/rollup-win32-arm64-msvc" "4.59.0" + "@rollup/rollup-win32-ia32-msvc" "4.59.0" + "@rollup/rollup-win32-x64-gnu" "4.59.0" + "@rollup/rollup-win32-x64-msvc" "4.59.0" fsevents "~2.3.2" roughjs@^4.6.6: diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html index 6a947dc..162d84f 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html @@ -15,7 +15,7 @@ Python (nvl.py) injects a + `,new Error("window.__NEO4J_VIZ_DATA__ is not defined");const Zle={get(r){return pE[r]},on(){},off(){},set(){},save_changes(){}},gE=document.getElementById("neo4j-viz-container");if(!gE)throw new Error("Container element #neo4j-viz-container not found");gE.style.width=pE.width??"100%";gE.style.height=pE.height??"100vh";Kle.render({model:Zle,el:gE}); diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js index e32d53f..e49a9a2 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js @@ -40,7 +40,7 @@ function KG(r) { }); }), t; } -var HE = { exports: {} }, U0 = {}; +var VE = { exports: {} }, U0 = {}; /** * @license React * react-jsx-runtime.production.js @@ -74,9 +74,9 @@ function ZG() { } var QD; function QG() { - return QD || (QD = 1, HE.exports = ZG()), HE.exports; + return QD || (QD = 1, VE.exports = ZG()), VE.exports; } -var Te = QG(), WE = { exports: {} }, fn = {}; +var Te = QG(), HE = { exports: {} }, fn = {}; /** * @license React * react.production.js @@ -105,23 +105,23 @@ function JG() { enqueueSetState: function() { } }, g = Object.assign, y = {}; - function b(X, Q, ue) { - this.props = X, this.context = Q, this.refs = y, this.updater = ue || p; + function b(X, Z, ue) { + this.props = X, this.context = Z, this.refs = y, this.updater = ue || p; } - b.prototype.isReactComponent = {}, b.prototype.setState = function(X, Q) { + b.prototype.isReactComponent = {}, b.prototype.setState = function(X, Z) { if (typeof X != "object" && typeof X != "function" && X != null) throw Error( "takes an object of state variables to update or a function which returns an object of state variables." ); - this.updater.enqueueSetState(this, X, Q, "setState"); + this.updater.enqueueSetState(this, X, Z, "setState"); }, b.prototype.forceUpdate = function(X) { this.updater.enqueueForceUpdate(this, X, "forceUpdate"); }; function _() { } _.prototype = b.prototype; - function m(X, Q, ue) { - this.props = X, this.context = Q, this.refs = y, this.updater = ue || p; + function m(X, Z, ue) { + this.props = X, this.context = Z, this.refs = y, this.updater = ue || p; } var x = m.prototype = new _(); x.constructor = m, g(x, b.prototype), x.isPureReactComponent = !0; @@ -129,31 +129,31 @@ function JG() { function O() { } var E = { H: null, A: null, T: null, S: null }, T = Object.prototype.hasOwnProperty; - function P(X, Q, ue) { + function P(X, Z, ue) { var re = ue.ref; return { $$typeof: r, type: X, - key: Q, + key: Z, ref: re !== void 0 ? re : null, props: ue }; } - function I(X, Q) { - return P(X.type, Q, X.props); + function I(X, Z) { + return P(X.type, Z, X.props); } function k(X) { return typeof X == "object" && X !== null && X.$$typeof === r; } function L(X) { - var Q = { "=": "=0", ":": "=2" }; + var Z = { "=": "=0", ":": "=2" }; return "$" + X.replace(/[=:]/g, function(ue) { - return Q[ue]; + return Z[ue]; }); } var B = /\/+/g; - function j(X, Q) { - return typeof X == "object" && X !== null && X.key != null ? L("" + X.key) : Q.toString(36); + function j(X, Z) { + return typeof X == "object" && X !== null && X.key != null ? L("" + X.key) : Z.toString(36); } function z(X) { switch (X.status) { @@ -163,11 +163,11 @@ function JG() { throw X.reason; default: switch (typeof X.status == "string" ? X.then(O, O) : (X.status = "pending", X.then( - function(Q) { - X.status === "pending" && (X.status = "fulfilled", X.value = Q); + function(Z) { + X.status === "pending" && (X.status = "fulfilled", X.value = Z); }, - function(Q) { - X.status === "pending" && (X.status = "rejected", X.reason = Q); + function(Z) { + X.status === "pending" && (X.status = "rejected", X.reason = Z); } )), X.status) { case "fulfilled": @@ -178,7 +178,7 @@ function JG() { } throw X; } - function H(X, Q, ue, re, ne) { + function H(X, Z, ue, re, ne) { var le = typeof X; (le === "undefined" || le === "boolean") && (X = null); var ce = !1; @@ -199,7 +199,7 @@ function JG() { case c: return ce = X._init, H( ce(X._payload), - Q, + Z, ue, re, ne @@ -207,7 +207,7 @@ function JG() { } } if (ce) - return ne = ne(X), ce = re === "" ? "." + j(X, 0) : re, S(ne) ? (ue = "", ce != null && (ue = ce.replace(B, "$&/") + "/"), H(ne, Q, ue, "", function(se) { + return ne = ne(X), ce = re === "" ? "." + j(X, 0) : re, S(ne) ? (ue = "", ce != null && (ue = ce.replace(B, "$&/") + "/"), H(ne, Z, ue, "", function(se) { return se; })) : ne != null && (k(ne) && (ne = I( ne, @@ -215,14 +215,14 @@ function JG() { B, "$&/" ) + "/") + ce - )), Q.push(ne)), 1; + )), Z.push(ne)), 1; ce = 0; var pe = re === "" ? "." : re + ":"; if (S(X)) for (var fe = 0; fe < X.length; fe++) re = X[fe], le = pe + j(re, fe), ce += H( re, - Q, + Z, ue, le, ne @@ -231,7 +231,7 @@ function JG() { for (X = fe.call(X), fe = 0; !(re = X.next()).done; ) re = re.value, le = pe + j(re, fe++), ce += H( re, - Q, + Z, ue, le, ne @@ -240,48 +240,48 @@ function JG() { if (typeof X.then == "function") return H( z(X), - Q, + Z, ue, re, ne ); - throw Q = String(X), Error( - "Objects are not valid as a React child (found: " + (Q === "[object Object]" ? "object with keys {" + Object.keys(X).join(", ") + "}" : Q) + "). If you meant to render a collection of children, use an array instead." + throw Z = String(X), Error( + "Objects are not valid as a React child (found: " + (Z === "[object Object]" ? "object with keys {" + Object.keys(X).join(", ") + "}" : Z) + "). If you meant to render a collection of children, use an array instead." ); } return ce; } - function q(X, Q, ue) { + function q(X, Z, ue) { if (X == null) return X; var re = [], ne = 0; return H(X, re, "", "", function(le) { - return Q.call(ue, le, ne++); + return Z.call(ue, le, ne++); }), re; } function W(X) { if (X._status === -1) { - var Q = X._result; - Q = Q(), Q.then( + var Z = X._result; + Z = Z(), Z.then( function(ue) { (X._status === 0 || X._status === -1) && (X._status = 1, X._result = ue); }, function(ue) { (X._status === 0 || X._status === -1) && (X._status = 2, X._result = ue); } - ), X._status === -1 && (X._status = 0, X._result = Q); + ), X._status === -1 && (X._status = 0, X._result = Z); } if (X._status === 1) return X._result.default; throw X._result; } var $ = typeof reportError == "function" ? reportError : function(X) { if (typeof window == "object" && typeof window.ErrorEvent == "function") { - var Q = new window.ErrorEvent("error", { + var Z = new window.ErrorEvent("error", { bubbles: !0, cancelable: !0, message: typeof X == "object" && X !== null && typeof X.message == "string" ? String(X.message) : String(X), error: X }); - if (!window.dispatchEvent(Q)) return; + if (!window.dispatchEvent(Z)) return; } else if (typeof process == "object" && typeof process.emit == "function") { process.emit("uncaughtException", X); return; @@ -289,24 +289,24 @@ function JG() { console.error(X); }, J = { map: q, - forEach: function(X, Q, ue) { + forEach: function(X, Z, ue) { q( X, function() { - Q.apply(this, arguments); + Z.apply(this, arguments); }, ue ); }, count: function(X) { - var Q = 0; + var Z = 0; return q(X, function() { - Q++; - }), Q; + Z++; + }), Z; }, toArray: function(X) { - return q(X, function(Q) { - return Q; + return q(X, function(Z) { + return Z; }) || []; }, only: function(X) { @@ -328,15 +328,15 @@ function JG() { }; }, fn.cacheSignal = function() { return null; - }, fn.cloneElement = function(X, Q, ue) { + }, fn.cloneElement = function(X, Z, ue) { if (X == null) throw Error( "The argument must be a React element, but you passed " + X + "." ); var re = g({}, X.props), ne = X.key; - if (Q != null) - for (le in Q.key !== void 0 && (ne = "" + Q.key), Q) - !T.call(Q, le) || le === "key" || le === "__self" || le === "__source" || le === "ref" && Q.ref === void 0 || (re[le] = Q[le]); + if (Z != null) + for (le in Z.key !== void 0 && (ne = "" + Z.key), Z) + !T.call(Z, le) || le === "key" || le === "__self" || le === "__source" || le === "ref" && Z.ref === void 0 || (re[le] = Z[le]); var le = arguments.length - 2; if (le === 1) re.children = ue; else if (1 < le) { @@ -357,11 +357,11 @@ function JG() { $$typeof: a, _context: X }, X; - }, fn.createElement = function(X, Q, ue) { + }, fn.createElement = function(X, Z, ue) { var re, ne = {}, le = null; - if (Q != null) - for (re in Q.key !== void 0 && (le = "" + Q.key), Q) - T.call(Q, re) && re !== "key" && re !== "__self" && re !== "__source" && (ne[re] = Q[re]); + if (Z != null) + for (re in Z.key !== void 0 && (le = "" + Z.key), Z) + T.call(Z, re) && re !== "key" && re !== "__self" && re !== "__source" && (ne[re] = Z[re]); var ce = arguments.length - 2; if (ce === 1) ne.children = ue; else if (1 < ce) { @@ -383,14 +383,14 @@ function JG() { _payload: { _status: -1, _result: X }, _init: W }; - }, fn.memo = function(X, Q) { + }, fn.memo = function(X, Z) { return { $$typeof: l, type: X, - compare: Q === void 0 ? null : Q + compare: Z === void 0 ? null : Z }; }, fn.startTransition = function(X) { - var Q = E.T, ue = {}; + var Z = E.T, ue = {}; E.T = ue; try { var re = X(), ne = E.S; @@ -398,47 +398,47 @@ function JG() { } catch (le) { $(le); } finally { - Q !== null && ue.types !== null && (Q.types = ue.types), E.T = Q; + Z !== null && ue.types !== null && (Z.types = ue.types), E.T = Z; } }, fn.unstable_useCacheRefresh = function() { return E.H.useCacheRefresh(); }, fn.use = function(X) { return E.H.use(X); - }, fn.useActionState = function(X, Q, ue) { - return E.H.useActionState(X, Q, ue); - }, fn.useCallback = function(X, Q) { - return E.H.useCallback(X, Q); + }, fn.useActionState = function(X, Z, ue) { + return E.H.useActionState(X, Z, ue); + }, fn.useCallback = function(X, Z) { + return E.H.useCallback(X, Z); }, fn.useContext = function(X) { return E.H.useContext(X); }, fn.useDebugValue = function() { - }, fn.useDeferredValue = function(X, Q) { - return E.H.useDeferredValue(X, Q); - }, fn.useEffect = function(X, Q) { - return E.H.useEffect(X, Q); + }, fn.useDeferredValue = function(X, Z) { + return E.H.useDeferredValue(X, Z); + }, fn.useEffect = function(X, Z) { + return E.H.useEffect(X, Z); }, fn.useEffectEvent = function(X) { return E.H.useEffectEvent(X); }, fn.useId = function() { return E.H.useId(); - }, fn.useImperativeHandle = function(X, Q, ue) { - return E.H.useImperativeHandle(X, Q, ue); - }, fn.useInsertionEffect = function(X, Q) { - return E.H.useInsertionEffect(X, Q); - }, fn.useLayoutEffect = function(X, Q) { - return E.H.useLayoutEffect(X, Q); - }, fn.useMemo = function(X, Q) { - return E.H.useMemo(X, Q); - }, fn.useOptimistic = function(X, Q) { - return E.H.useOptimistic(X, Q); - }, fn.useReducer = function(X, Q, ue) { - return E.H.useReducer(X, Q, ue); + }, fn.useImperativeHandle = function(X, Z, ue) { + return E.H.useImperativeHandle(X, Z, ue); + }, fn.useInsertionEffect = function(X, Z) { + return E.H.useInsertionEffect(X, Z); + }, fn.useLayoutEffect = function(X, Z) { + return E.H.useLayoutEffect(X, Z); + }, fn.useMemo = function(X, Z) { + return E.H.useMemo(X, Z); + }, fn.useOptimistic = function(X, Z) { + return E.H.useOptimistic(X, Z); + }, fn.useReducer = function(X, Z, ue) { + return E.H.useReducer(X, Z, ue); }, fn.useRef = function(X) { return E.H.useRef(X); }, fn.useState = function(X) { return E.H.useState(X); - }, fn.useSyncExternalStore = function(X, Q, ue) { + }, fn.useSyncExternalStore = function(X, Z, ue) { return E.H.useSyncExternalStore( X, - Q, + Z, ue ); }, fn.useTransition = function() { @@ -446,15 +446,15 @@ function JG() { }, fn.version = "19.2.4", fn; } var ek; -function x5() { - return ek || (ek = 1, WE.exports = JG()), WE.exports; +function w5() { + return ek || (ek = 1, HE.exports = JG()), HE.exports; } -var me = x5(); +var me = w5(); const ao = /* @__PURE__ */ Bp(me), B9 = /* @__PURE__ */ $G({ __proto__: null, default: ao }, [me]); -var YE = { exports: {} }, z0 = {}, XE = { exports: {} }, $E = {}; +var WE = { exports: {} }, z0 = {}, YE = { exports: {} }, XE = {}; /** * @license React * scheduler.production.js @@ -486,9 +486,9 @@ function eV() { if (W !== q) { H[0] = W; e: for (var $ = 0, J = H.length, X = J >>> 1; $ < X; ) { - var Q = 2 * ($ + 1) - 1, ue = H[Q], re = Q + 1, ne = H[re]; + var Z = 2 * ($ + 1) - 1, ue = H[Z], re = Z + 1, ne = H[re]; if (0 > i(ue, W)) - re < J && 0 > i(ne, ue) ? (H[$] = ne, H[re] = W, $ = re) : (H[$] = ue, H[Q] = W, $ = Q); + re < J && 0 > i(ne, ue) ? (H[$] = ne, H[re] = W, $ = re) : (H[$] = ue, H[Z] = W, $ = Z); else if (re < J && 0 > i(ne, W)) H[$] = ne, H[re] = W, $ = re; else break e; @@ -682,13 +682,13 @@ function eV() { } }; }; - })($E)), $E; + })(XE)), XE; } var rk; function tV() { - return rk || (rk = 1, XE.exports = eV()), XE.exports; + return rk || (rk = 1, YE.exports = eV()), YE.exports; } -var KE = { exports: {} }, Vu = {}; +var $E = { exports: {} }, Vu = {}; /** * @license React * react-dom.production.js @@ -702,7 +702,7 @@ var nk; function rV() { if (nk) return Vu; nk = 1; - var r = x5(); + var r = w5(); function e(u) { var l = "https://react.dev/errors/" + u; if (1 < arguments.length) { @@ -833,7 +833,7 @@ function rV() { } var ik; function F9() { - if (ik) return KE.exports; + if (ik) return $E.exports; ik = 1; function r() { if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) @@ -843,7 +843,7 @@ function F9() { console.error(e); } } - return r(), KE.exports = rV(), KE.exports; + return r(), $E.exports = rV(), $E.exports; } /** * @license React @@ -858,7 +858,7 @@ var ak; function nV() { if (ak) return z0; ak = 1; - var r = tV(), e = x5(), t = F9(); + var r = tV(), e = w5(), t = F9(); function n(v) { var w = "https://react.dev/errors/" + v; if (1 < arguments.length) { @@ -1022,7 +1022,7 @@ function nV() { function X(v) { return { current: v }; } - function Q(v) { + function Z(v) { 0 > J || (v.current = $[J], $[J] = null, J--); } function ue(v, w) { @@ -1050,10 +1050,10 @@ function nV() { v = 0; } } - Q(re), ue(re, v); + Z(re), ue(re, v); } function fe() { - Q(re), Q(ne), Q(le); + Z(re), Z(ne), Z(le); } function se(v) { v.memoizedState !== null && ue(ce, v); @@ -1061,7 +1061,7 @@ function nV() { w !== C && (ue(ne, v), ue(re, C)); } function de(v) { - ne.current === v && (Q(re), Q(ne)), ce.current === v && (Q(ce), Zv._currentValue = W); + ne.current === v && (Z(re), Z(ne)), ce.current === v && (Z(ce), Zv._currentValue = W); } var ge, Oe; function ke(v) { @@ -1076,10 +1076,10 @@ function nV() { return ` ` + ge + v + Oe; } - var Me = !1; + var De = !1; function Ne(v, w) { - if (!v || Me) return ""; - Me = !0; + if (!v || De) return ""; + De = !0; var C = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { @@ -1163,7 +1163,7 @@ function nV() { } } } finally { - Me = !1, Error.prepareStackTrace = C; + De = !1, Error.prepareStackTrace = C; } return (C = v ? v.displayName || v.name : "") ? ke(C) : ""; } @@ -1205,7 +1205,7 @@ Error generating stack: ` + M.message + ` ` + M.stack; } } - var Z = Object.prototype.hasOwnProperty, ie = r.unstable_scheduleCallback, we = r.unstable_cancelCallback, Ee = r.unstable_shouldYield, De = r.unstable_requestPaint, Ie = r.unstable_now, Ye = r.unstable_getCurrentPriorityLevel, ot = r.unstable_ImmediatePriority, mt = r.unstable_UserBlockingPriority, wt = r.unstable_NormalPriority, Mt = r.unstable_LowPriority, Dt = r.unstable_IdlePriority, vt = r.log, tt = r.unstable_setDisableYieldValue, _e = null, Ue = null; + var Q = Object.prototype.hasOwnProperty, ie = r.unstable_scheduleCallback, we = r.unstable_cancelCallback, Ee = r.unstable_shouldYield, Me = r.unstable_requestPaint, Ie = r.unstable_now, Ye = r.unstable_getCurrentPriorityLevel, ot = r.unstable_ImmediatePriority, mt = r.unstable_UserBlockingPriority, wt = r.unstable_NormalPriority, Mt = r.unstable_LowPriority, Dt = r.unstable_IdlePriority, vt = r.log, tt = r.unstable_setDisableYieldValue, _e = null, Ue = null; function Qe(v) { if (typeof vt == "function" && tt(v), Ue && typeof Ue.setStrictMode == "function") try { @@ -1475,7 +1475,7 @@ Error generating stack: ` + M.message + ` "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$" ), na = {}, Fs = {}; function hu(v) { - return Z.call(Fs, v) ? !0 : Z.call(na, v) ? !1 : Nr.test(v) ? Fs[v] = !0 : (na[v] = !0, !1); + return Q.call(Fs, v) ? !0 : Q.call(na, v) ? !1 : Nr.test(v) ? Fs[v] = !0 : (na[v] = !0, !1); } function ga(v, w, C) { if (hu(w)) @@ -2255,7 +2255,7 @@ Error generating stack: ` + M.message + ` if (C.length !== M.length) return !1; for (M = 0; M < C.length; M++) { var F = C[M]; - if (!Z.call(w, F) || !ri(v[F], w[F])) + if (!Q.call(w, F) || !ri(v[F], w[F])) return !1; } return !0; @@ -2439,7 +2439,7 @@ Error generating stack: ` + M.message + ` var ae = 0; if (M = v, typeof v == "function") Ba(v) && (ae = 1); else if (typeof v == "string") - ae = LE( + ae = NE( v, C, re.current @@ -2657,7 +2657,7 @@ Error generating stack: ` + M.message + ` ue(ar, w._currentValue), w._currentValue = C; } function Cu(v) { - v._currentValue = ar.current, Q(ar); + v._currentValue = ar.current, Z(ar); } function hl(v, w, C) { for (; v !== null; ) { @@ -3171,8 +3171,8 @@ Error generating stack: ` + M.message + ` } for (or = M(or); !Qn.done; pn++, Qn = rt.next()) Qn = lt(or, Xe, pn, Qn.value, bt), Qn !== null && (v && Qn.alternate !== null && or.delete(Qn.key === null ? pn : Qn.key), Ve = V(Qn, Ve, pn), Zn === null ? wr = Qn : Zn.sibling = Qn, Zn = Qn); - return v && or.forEach(function(VE) { - return w(Xe, VE); + return v && or.forEach(function(GE) { + return w(Xe, GE); }), hn && Ua(Xe, pn), wr; } function Ti(Xe, Ve, rt, bt) { @@ -3456,7 +3456,7 @@ Error generating stack: ` + M.message + ` ue(Ss, Ga), ue(Zs, Zs.current); } function Nu() { - Ga = Ss.current, Q(Zs), Q(Ss); + Ga = Ss.current, Z(Zs), Z(Ss); } var er = X(null), ho = null; function Qs(v) { @@ -3473,7 +3473,7 @@ Error generating stack: ` + M.message + ` ue(Pi, Pi.current), ue(er, er.current); } function Wn(v) { - Q(er), ho === v && (ho = null), Q(Pi); + Z(er), ho === v && (ho = null), Z(Pi); } var Pi = X(0); function es(v) { @@ -5437,7 +5437,7 @@ Error generating stack: ` + M.message + ` C ), dd(v, w), v === null && (w.flags |= 4194304), w.child; case 5: - return v === null && hn && ((F = M = Rn) && (M = CE( + return v === null && hn && ((F = M = Rn) && (M = TE( M, w.type, w.pendingProps, @@ -5793,7 +5793,7 @@ Error generating stack: ` + M.message + ` case 10: return Cu(w.type), pi(w), null; case 19: - if (Q(Pi), M = w.memoizedState, M === null) return pi(w), null; + if (Z(Pi), M = w.memoizedState, M === null) return pi(w), null; if (F = (w.flags & 128) !== 0, V = M.rendering, V === null) if (F) Vh(M, !1); else { @@ -5826,7 +5826,7 @@ Error generating stack: ` + M.message + ` ), hn && Ua(w, M.treeForkCount), v) : (pi(w), null); case 22: case 23: - return Wn(w), Nu(), M = w.memoizedState !== null, v !== null ? v.memoizedState !== null !== M && (w.flags |= 8192) : M && (w.flags |= 8192), M ? (C & 536870912) !== 0 && (w.flags & 128) === 0 && (pi(w), w.subtreeFlags & 6 && (w.flags |= 8192)) : pi(w), C = w.updateQueue, C !== null && Hd(w, C.retryQueue), C = null, v !== null && v.memoizedState !== null && v.memoizedState.cachePool !== null && (C = v.memoizedState.cachePool.pool), M = null, w.memoizedState !== null && w.memoizedState.cachePool !== null && (M = w.memoizedState.cachePool.pool), M !== C && (w.flags |= 2048), v !== null && Q(Ta), null; + return Wn(w), Nu(), M = w.memoizedState !== null, v !== null ? v.memoizedState !== null !== M && (w.flags |= 8192) : M && (w.flags |= 8192), M ? (C & 536870912) !== 0 && (w.flags & 128) === 0 && (pi(w), w.subtreeFlags & 6 && (w.flags |= 8192)) : pi(w), C = w.updateQueue, C !== null && Hd(w, C.retryQueue), C = null, v !== null && v.memoizedState !== null && v.memoizedState.cachePool !== null && (C = v.memoizedState.cachePool.pool), M = null, w.memoizedState !== null && w.memoizedState.cachePool !== null && (M = w.memoizedState.cachePool.pool), M !== C && (w.flags |= 2048), v !== null && Z(Ta), null; case 24: return C = null, v !== null && (C = v.memoizedState.cache), w.memoizedState.cache !== C && (w.flags |= 2048), Cu($i), pi(w), null; case 25: @@ -5861,14 +5861,14 @@ Error generating stack: ` + M.message + ` } return v = w.flags, v & 65536 ? (w.flags = v & -65537 | 128, w) : null; case 19: - return Q(Pi), null; + return Z(Pi), null; case 4: return fe(), null; case 10: return Cu(w.type), null; case 22: case 23: - return Wn(w), Nu(), v !== null && Q(Ta), v = w.flags, v & 65536 ? (w.flags = v & -65537 | 128, w) : null; + return Wn(w), Nu(), v !== null && Z(Ta), v = w.flags, v & 65536 ? (w.flags = v & -65537 | 128, w) : null; case 24: return Cu($i), null; case 25: @@ -5897,14 +5897,14 @@ Error generating stack: ` + M.message + ` Wn(w); break; case 19: - Q(Pi); + Z(Pi); break; case 10: Cu(w.type); break; case 22: case 23: - Wn(w), Nu(), v !== null && Q(Ta); + Wn(w), Nu(), v !== null && Z(Ta); break; case 24: Cu($i); @@ -6042,7 +6042,7 @@ Error generating stack: ` + M.message + ` function jv(v, w, C) { try { var M = v.stateNode; - SE(M, v.type, C, w), M[Nn] = w; + EE(M, v.type, C, w), M[Nn] = w; } catch (F) { yi(v, v.return, F); } @@ -6267,7 +6267,7 @@ Error generating stack: ` + M.message + ` he(v, C), M & 4 && wy(v, C), M & 64 && (v = C.memoizedState, v !== null && (v = v.dehydrated, v !== null && (C = Cy.bind( null, C - ), AE(v, C)))); + ), CE(v, C)))); break; case 22: if (M = C.memoizedState !== null || Tl, !M) { @@ -6439,7 +6439,7 @@ Error generating stack: ` + M.message + ` w.forEach(function(M) { if (!C.has(M)) { C.add(M); - var F = _E.bind(null, v, M); + var F = bE.bind(null, v, M); M.then(F, F); } }); @@ -7277,7 +7277,7 @@ Error generating stack: ` + M.message + ` } function l_(v, w, C) { if ((zt & 6) !== 0) throw Error(n(327)); - var M = !C && (w & 127) === 0 && (w & v.expiredLanes) === 0 || Ut(v, w), F = M ? yE(v, w) : d0(v, w, !0), V = M; + var M = !C && (w & 127) === 0 && (w & v.expiredLanes) === 0 || Ut(v, w), F = M ? gE(v, w) : d0(v, w, !0), V = M; do { if (F === 0) { eu && !M && vd(v, w, 0, !1); @@ -7413,7 +7413,7 @@ Error generating stack: ` + M.message + ` _t ); var rr = (V & 62914560) === V ? ag - Ie() : (V & 4194048) === V ? o_ - Ie() : 0; - if (rr = jE( + if (rr = LE( _t, rr ), rr !== null) { @@ -7501,7 +7501,7 @@ Error generating stack: ` + M.message + ` } function qv(v, w) { var C = v.timeoutHandle; - C !== -1 && (v.timeoutHandle = -1, TE(C)), C = v.cancelPendingCommit, C !== null && (v.cancelPendingCommit = null, C()), hd = 0, f0(), Hr = v, fr = C = Oo(v.current, null), Mr = w, _r = 0, ui = null, po = !1, eu = Ut(v, w), Yc = !1, $c = Lo = Xh = xc = Xc = qi = 0, go = Xd = null, $d = !1, (w & 8) !== 0 && (w |= w & 32); + C !== -1 && (v.timeoutHandle = -1, OE(C)), C = v.cancelPendingCommit, C !== null && (v.cancelPendingCommit = null, C()), hd = 0, f0(), Hr = v, fr = C = Oo(v.current, null), Mr = w, _r = 0, ui = null, po = !1, eu = Ut(v, w), Yc = !1, $c = Lo = Xh = xc = Xc = qi = 0, go = Xd = null, $d = !1, (w & 8) !== 0 && (w |= w & 32); var M = v.entangledLanes; if (M !== 0) for (v = v.entanglements, M &= w; 0 < M; ) { @@ -7565,7 +7565,7 @@ Error generating stack: ` + M.message + ` it = _r, _r = 0, ui = null, Gv(v, Se, Fe, it); } } - gE(), ae = qi; + pE(), ae = qi; break; } catch (ht) { d_(v, ht); @@ -7573,10 +7573,10 @@ Error generating stack: ` + M.message + ` while (!0); return w && v.shellSuspendCounter++, Tu = Yr = null, zt = M, H.H = F, H.A = V, fr === null && (Hr = null, Mr = 0, Ws()), ae; } - function gE() { + function pE() { for (; fr !== null; ) p_(fr); } - function yE(v, w) { + function gE(v, w) { var C = zt; zt |= 2; var M = h_(), F = v_(); @@ -7643,7 +7643,7 @@ Error generating stack: ` + M.message + ` throw Error(n(462)); } } - mE(); + yE(); break; } catch (ht) { d_(v, ht); @@ -7651,7 +7651,7 @@ Error generating stack: ` + M.message + ` while (!0); return Tu = Yr = null, H.H = M, H.A = F, zt = C, fr !== null ? 0 : (Hr = null, Mr = 0, Ws(), qi); } - function mE() { + function yE() { for (; fr !== null && !Ee(); ) p_(fr); } @@ -7775,7 +7775,7 @@ Error generating stack: ` + M.message + ` ae, Se, Fe - ), v === Hr && (fr = Hr = null, Mr = 0), zv = w, Zd = v, hd = C, u0 = V, l0 = F, s_ = M, (w.subtreeFlags & 10256) !== 0 || (w.flags & 10256) !== 0 ? (v.callbackNode = null, v.callbackPriority = 0, wE(wt, function() { + ), v === Hr && (fr = Hr = null, Mr = 0), zv = w, Zd = v, hd = C, u0 = V, l0 = F, s_ = M, (w.subtreeFlags & 10256) !== 0 || (w.flags & 10256) !== 0 ? (v.callbackNode = null, v.callbackPriority = 0, _E(wt, function() { return g0(), null; })) : (v.callbackNode = null, v.callbackPriority = 0), M = (w.flags & 13878) !== 0, (w.subtreeFlags & 13878) !== 0 || M) { M = H.T, H.T = null, F = q.p, q.p = 2, ae = zt, zt |= 4; @@ -7871,7 +7871,7 @@ Error generating stack: ` + M.message + ` } function Ty() { if (yo === 4 || yo === 3) { - yo = 0, De(); + yo = 0, Me(); var v = Zd, w = zv, C = hd, M = s_; (w.subtreeFlags & 10256) !== 0 || (w.flags & 10256) !== 0 ? yo = 5 : (yo = 0, zv = Zd = null, p0(v, v.pendingLanes)); var F = v.pendingLanes; @@ -7970,9 +7970,9 @@ Error generating stack: ` + M.message + ` M.set(w, F); } else F = M.get(w), F === void 0 && (F = /* @__PURE__ */ new Set(), M.set(w, F)); - F.has(C) || (Yc = !0, F.add(C), v = bE.bind(null, v, w, C), w.then(v, v)); + F.has(C) || (Yc = !0, F.add(C), v = mE.bind(null, v, w, C), w.then(v, v)); } - function bE(v, w, C) { + function mE(v, w, C) { var M = v.pingCache; M !== null && M.delete(w), v.pingedLanes |= v.suspendedLanes & C, v.warmLanes &= ~C, Hr === v && (Mr & C) === C && (qi === 4 || qi === 3 && (Mr & 62914560) === Mr && 300 > Ie() - ag ? (zt & 2) === 0 && qv(v, 0) : Xh |= C, $c === Mr && ($c = 0)), Af(v); } @@ -7983,7 +7983,7 @@ Error generating stack: ` + M.message + ` var w = v.memoizedState, C = 0; w !== null && (C = w.retryLane), cg(v, C); } - function _E(v, w) { + function bE(v, w) { var C = 0; switch (v.tag) { case 31: @@ -8002,12 +8002,12 @@ Error generating stack: ` + M.message + ` } M !== null && M.delete(w), cg(v, C); } - function wE(v, w) { + function _E(v, w) { return ie(v, w); } var Vv = null, Kh = null, b0 = !1, Ay = !1, _0 = !1, Qd = 0; function Af(v) { - v !== Kh && v.next === null && (Kh === null ? Vv = Kh = v : Kh = Kh.next = v), Ay = !0, b0 || (b0 = !0, EE()); + v !== Kh && v.next === null && (Kh === null ? Vv = Kh = v : Kh = Kh.next = v), Ay = !0, b0 || (b0 = !0, xE()); } function fg(v, w) { if (!_0 && Ay) { @@ -8034,13 +8034,13 @@ Error generating stack: ` + M.message + ` _0 = !1; } } - function xE() { + function wE() { m_(); } function m_() { Ay = b0 = !1; var v = 0; - Qd !== 0 && OE() && (v = Qd); + Qd !== 0 && SE() && (v = Qd); for (var w = Ie(), C = null, M = Vv; M !== null; ) { var F = M.next, V = b_(M, w); V === 0 ? (M.next = null, C === null ? Vv = F : C.next = F, F === null && (Kh = C)) : (C = M, (v !== 0 || (V & 3) !== 0) && (Ay = !0)), M = F; @@ -8095,11 +8095,11 @@ Error generating stack: ` + M.message + ` if (lg()) return null; l_(v, w, !0); } - function EE() { + function xE() { P_(function() { (zt & 6) !== 0 ? ie( ot, - xE + wE ) : m_(); }); } @@ -8268,10 +8268,10 @@ Error generating stack: ` + M.message + ` function Py(v, w, C, M) { switch (K_(w)) { case 2: - var F = FE; + var F = BE; break; case 8: - F = UE; + F = FE; break; default: F = N0; @@ -9096,7 +9096,7 @@ Error generating stack: ` + M.message + ` for (Se in C) C.hasOwnProperty(Se) && (M = C[Se], M != null && Oi(v, w, Se, M, C, null)); } - function SE(v, w, C, M) { + function EE(v, w, C, M) { switch (w) { case "div": case "span": @@ -9405,11 +9405,11 @@ Error generating stack: ` + M.message + ` return v === "textarea" || v === "noscript" || typeof w.children == "string" || typeof w.children == "number" || typeof w.children == "bigint" || typeof w.dangerouslySetInnerHTML == "object" && w.dangerouslySetInnerHTML !== null && w.dangerouslySetInnerHTML.__html != null; } var A0 = null; - function OE() { + function SE() { var v = window.event; return v && v.type === "popstate" ? v === A0 ? !1 : (A0 = v, !0) : (A0 = null, !1); } - var A_ = typeof setTimeout == "function" ? setTimeout : void 0, TE = typeof clearTimeout == "function" ? clearTimeout : void 0, R_ = typeof Promise == "function" ? Promise : void 0, P_ = typeof queueMicrotask == "function" ? queueMicrotask : typeof R_ < "u" ? function(v) { + var A_ = typeof setTimeout == "function" ? setTimeout : void 0, OE = typeof clearTimeout == "function" ? clearTimeout : void 0, R_ = typeof Promise == "function" ? Promise : void 0, P_ = typeof queueMicrotask == "function" ? queueMicrotask : typeof R_ < "u" ? function(v) { return R_.resolve(null).then(v).catch(pd); } : A_; function pd(v) { @@ -9480,7 +9480,7 @@ Error generating stack: ` + M.message + ` v.removeChild(C); } } - function CE(v, w, C, M) { + function TE(v, w, C, M) { for (; v.nodeType === 1; ) { var F = C; if (v.nodeName.toLowerCase() !== w.toLowerCase()) { @@ -9534,7 +9534,7 @@ Error generating stack: ` + M.message + ` function Hv(v) { return v.data === "$!" || v.data === "$?" && v.ownerDocument.readyState !== "loading"; } - function AE(v, w) { + function CE(v, w) { var C = v.ownerDocument; if (v.data === "$~") v._reactRetry = w; else if (v.data !== "$?" || C.readyState !== "loading") @@ -9615,21 +9615,21 @@ Error generating stack: ` + M.message + ` } var gd = q.d; q.d = { - f: RE, - r: PE, + f: AE, + r: RE, D: M0, - C: ME, - L: DE, - m: kE, + C: PE, + L: ME, + m: DE, X: Gu, S: jo, - M: IE + M: kE }; - function RE() { + function AE() { var v = gd.f(), w = Ey(); return v || w; } - function PE(v) { + function RE(v) { var w = Bt(v); w !== null && w.tag === 5 && w.type === "form" ? $p(w) : gd.r(v); } @@ -9644,10 +9644,10 @@ Error generating stack: ` + M.message + ` function M0(v) { gd.D(v), L_("dns-prefetch", v, null); } - function ME(v, w) { + function PE(v, w) { gd.C(v, w), L_("preconnect", v, w); } - function DE(v, w, C) { + function ME(v, w, C) { gd.L(v, w, C); var M = th; if (M && v && w) { @@ -9675,7 +9675,7 @@ Error generating stack: ` + M.message + ` ), Sc.set(V, v), M.querySelector(F) !== null || w === "style" && M.querySelector(Yv(V)) || w === "script" && M.querySelector($v(V)) || (w = M.createElement("link"), as(w, "link", v), Hn(w), M.head.appendChild(w))); } } - function kE(v, w) { + function DE(v, w) { gd.m(v, w); var C = th; if (C && v) { @@ -9753,7 +9753,7 @@ Error generating stack: ` + M.message + ` }, M.set(F, V)); } } - function IE(v, w) { + function kE(v, w) { gd.M(v, w); var C = th; if (C && v) { @@ -9804,7 +9804,7 @@ Error generating stack: ` + M.message + ` media: C.media, hrefLang: C.hrefLang, referrerPolicy: C.referrerPolicy - }, Sc.set(v, C), V || NE( + }, Sc.set(v, C), V || IE( F, v, C, @@ -9841,7 +9841,7 @@ Error generating stack: ` + M.message + ` precedence: null }); } - function NE(v, w, C, M) { + function IE(v, w, C, M) { v.querySelector('link[rel="preload"][as="style"][' + w + "]") ? M.loading = 1 : (w = v.createElement("link"), M.preload = w, w.addEventListener("load", function() { return M.loading |= 1; }), w.addEventListener("error", function() { @@ -9938,7 +9938,7 @@ Error generating stack: ` + M.message + ` w === "title" ? v.querySelector("head > title") : null ); } - function LE(v, w, C) { + function NE(v, w, C) { if (C === 1 || w.itemProp != null) return !1; switch (v) { case "meta": @@ -9986,7 +9986,7 @@ Error generating stack: ` + M.message + ` } } var k0 = 0; - function jE(v, w) { + function LE(v, w) { return v.stylesheets && v.count === 0 && Fy(v, v.stylesheets), 0 < v.count || 0 < v.imgCount ? function(C) { var M = setTimeout(function() { if (v.stylesheets && Fy(v, v.stylesheets), v.unsuspend) { @@ -10047,11 +10047,11 @@ Error generating stack: ` + M.message + ` _currentValue2: W, _threadCount: 0 }; - function BE(v, w, C, M, F, V, ae, Se, Fe) { + function jE(v, w, C, M, F, V, ae, Se, Fe) { this.tag = 1, this.containerInfo = v, this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null, this.callbackPriority = 0, this.expirationTimes = Vr(-1), this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Vr(0), this.hiddenUpdates = Vr(null), this.identifierPrefix = M, this.onUncaughtError = F, this.onCaughtError = V, this.onRecoverableError = ae, this.pooledCache = null, this.pooledCacheLanes = 0, this.formState = Fe, this.incompleteTransitions = /* @__PURE__ */ new Map(); } function V_(v, w, C, M, F, V, ae, Se, Fe, it, ht, _t) { - return v = new BE( + return v = new jE( v, w, C, @@ -10097,7 +10097,7 @@ Error generating stack: ` + M.message + ` } } var Uy = !0; - function FE(v, w, C, M) { + function BE(v, w, C, M) { var F = H.T; H.T = null; var V = q.p; @@ -10107,7 +10107,7 @@ Error generating stack: ` + M.message + ` q.p = V, H.T = F; } } - function UE(v, w, C, M) { + function FE(v, w, C, M) { var F = H.T; H.T = null; var V = q.p; @@ -10136,7 +10136,7 @@ Error generating stack: ` + M.message + ` M )) M.stopPropagation(); - else if (Z_(v, M), w & 4 && -1 < zE.indexOf(v)) { + else if (Z_(v, M), w & 4 && -1 < UE.indexOf(v)) { for (; F !== null; ) { var V = Bt(F); if (V !== null) @@ -10296,7 +10296,7 @@ Error generating stack: ` + M.message + ` return 32; } } - var B0 = !1, rh = null, nh = null, ih = null, _g = /* @__PURE__ */ new Map(), wg = /* @__PURE__ */ new Map(), ah = [], zE = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split( + var B0 = !1, rh = null, nh = null, ih = null, _g = /* @__PURE__ */ new Map(), wg = /* @__PURE__ */ new Map(), ah = [], UE = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split( " " ); function Z_(v, w) { @@ -10435,13 +10435,13 @@ Error generating stack: ` + M.message + ` function J_(v, w, C) { qy(v) && C.delete(w); } - function qE() { + function zE() { B0 = !1, rh !== null && qy(rh) && (rh = null), nh !== null && qy(nh) && (nh = null), ih !== null && qy(ih) && (ih = null), _g.forEach(J_), wg.forEach(J_); } function Qv(v, w) { v.blockedOn === w && (v.blockedOn = null, B0 || (B0 = !0, r.unstable_scheduleCallback( r.unstable_NormalPriority, - qE + zE ))); } var Gy = null; @@ -10574,7 +10574,7 @@ Error generating stack: ` + M.message + ` throw typeof v.render == "function" ? Error(n(188)) : (v = Object.keys(v).join(","), Error(n(268, v))); return v = l(w), v = v !== null ? c(v) : null, v = v === null ? null : v.stateNode, v; }; - var GE = { + var qE = { bundleType: 0, version: "19.2.4", rendererPackageName: "react-dom", @@ -10586,7 +10586,7 @@ Error generating stack: ` + M.message + ` if (!Hy.isDisabled && Hy.supportsFiber) try { _e = Hy.inject( - GE + qE ), Ue = Hy; } catch { } @@ -10629,7 +10629,7 @@ Error generating stack: ` + M.message + ` } var ok; function iV() { - if (ok) return YE.exports; + if (ok) return WE.exports; ok = 1; function r() { if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) @@ -10639,7 +10639,7 @@ function iV() { console.error(e); } } - return r(), YE.exports = nV(), YE.exports; + return r(), WE.exports = nV(), WE.exports; } var aV = iV(); let U9 = me.createContext( @@ -11470,7 +11470,7 @@ Object.assign(Object.assign({}, fV), { extend: { zIndex: Object.assign({}, Ds.zIndex), spacing: Object.assign(Object.assign({}, Object.keys(Ds.space).reduce((r, e) => Object.assign(Object.assign({}, r), { [`token-${e}`]: Ds.space[e] }), {})), { 0: "0px", px: "1px", 0.5: "2px", 1: "4px", 1.5: "6px", 2: "8px", 2.5: "10px", 3: "12px", 3.5: "14px", 4: "16px", 5: "20px", 6: "24px", 7: "28px", 8: "32px", 9: "36px", 10: "40px", 11: "44px", 12: "48px", 14: "56px", 16: "64px", 20: "20px", 24: "96px", 28: "112px", 32: "128px", 36: "144px", 40: "160px", 44: "176px", 48: "192px", 52: "208px", 56: "224px", 60: "240px", 64: "256px", 72: "288px", 80: "320px", 96: "384px" }) } }); -var ZE = { exports: {} }; +var KE = { exports: {} }; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see @@ -11507,10 +11507,10 @@ function dV() { } r.exports ? (t.default = t, r.exports = t) : window.classNames = t; })(); - })(ZE)), ZE.exports; + })(KE)), KE.exports; } var hV = dV(); -const Vn = /* @__PURE__ */ Bp(hV), JP = (r) => console.warn(`[🪡 Needle]: ${r}`); +const Vn = /* @__PURE__ */ Bp(hV), QP = (r) => console.warn(`[🪡 Needle]: ${r}`); var vV = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); @@ -11890,7 +11890,7 @@ function c2() { return typeof window < "u"; } function Fp(r) { - return E5(r) ? (r.nodeName || "").toLowerCase() : "#document"; + return x5(r) ? (r.nodeName || "").toLowerCase() : "#document"; } function Fl(r) { var e; @@ -11898,9 +11898,9 @@ function Fl(r) { } function Sh(r) { var e; - return (e = (E5(r) ? r.ownerDocument : r.document) || window.document) == null ? void 0 : e.documentElement; + return (e = (x5(r) ? r.ownerDocument : r.document) || window.document) == null ? void 0 : e.documentElement; } -function E5(r) { +function x5(r) { return c2() ? r instanceof Node || r instanceof Fl(r).Node : !1; } function da(r) { @@ -11937,14 +11937,14 @@ function f2(r) { }); } const gH = ["transform", "translate", "scale", "rotate", "perspective"], yH = ["transform", "translate", "scale", "rotate", "perspective", "filter"], mH = ["paint", "layout", "strict", "content"]; -function S5(r) { +function E5(r) { const e = d2(), t = da(r) ? Ff(r) : r; return gH.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || yH.some((n) => (t.willChange || "").includes(n)) || mH.some((n) => (t.contain || "").includes(n)); } function bH(r) { let e = hv(r); for (; bo(e) && !cv(e); ) { - if (S5(e)) + if (E5(e)) return e; if (f2(e)) return null; @@ -11992,12 +11992,12 @@ function wp(r, e, t) { e === void 0 && (e = []), t === void 0 && (t = !0); const i = W9(r), a = i === ((n = r.ownerDocument) == null ? void 0 : n.body), o = Fl(i); if (a) { - const s = eM(o); + const s = JP(o); return e.concat(o, o.visualViewport || [], B1(i) ? i : [], s && t ? wp(s) : []); } return e.concat(i, wp(i, [], t)); } -function eM(r) { +function JP(r) { return r.parent && Object.getPrototypeOf(r.parent) ? r.frameElement : null; } const px = Math.min, Bg = Math.max, gx = Math.round, hm = Math.floor, _h = (r) => ({ @@ -12045,9 +12045,9 @@ function SH(r, e, t) { } function OH(r) { const e = yx(r); - return [tM(r), e, tM(e)]; + return [eM(r), e, eM(e)]; } -function tM(r) { +function eM(r) { return r.replace(/start|end/g, (e) => xH[e]); } const fk = ["left", "right"], dk = ["right", "left"], TH = ["top", "bottom"], CH = ["bottom", "top"]; @@ -12066,7 +12066,7 @@ function AH(r, e, t) { function RH(r, e, t, n) { const i = p2(r); let a = AH(qg(r), t === "start", n); - return i && (a = a.map((o) => o + "-" + i), e && (a = a.concat(a.map(tM)))), a; + return i && (a = a.map((o) => o + "-" + i), e && (a = a.concat(a.map(eM)))), a; } function yx(r) { return r.replace(/left|right|bottom|top/g, (e) => wH[e]); @@ -12270,11 +12270,11 @@ var DH = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] t = t.parentElement; } return !1; -}, rM = function(e, t) { +}, tM = function(e, t) { return !(t.disabled || LH(t) || GH(t, e) || // For a details element with a summary, the summary element gets the focus jH(t) || VH(t)); -}, nM = function(e, t) { - return !(zH(t) || J9(t) < 0 || !rM(e, t)); +}, rM = function(e, t) { + return !(zH(t) || J9(t) < 0 || !tM(e, t)); }, HH = function(e) { var t = parseInt(e.getAttribute("tabindex"), 10); return !!(isNaN(t) || t >= 0); @@ -12296,23 +12296,23 @@ var DH = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] t = t || {}; var n; return t.getShadowRoot ? n = xx([e], t.includeContainer, { - filter: nM.bind(null, t), + filter: rM.bind(null, t), flatten: !1, getShadowRoot: t.getShadowRoot, shadowRootFilter: HH - }) : n = Z9(e, t.includeContainer, nM.bind(null, t)), t7(n); + }) : n = Z9(e, t.includeContainer, rM.bind(null, t)), t7(n); }, WH = function(e, t) { t = t || {}; var n; return t.getShadowRoot ? n = xx([e], t.includeContainer, { - filter: rM.bind(null, t), + filter: tM.bind(null, t), flatten: !0, getShadowRoot: t.getShadowRoot - }) : n = Z9(e, t.includeContainer, rM.bind(null, t)), n; + }) : n = Z9(e, t.includeContainer, tM.bind(null, t)), n; }, r7 = function(e, t) { if (t = t || {}, !e) throw new Error("No node provided"); - return Im.call(e, bx) === !1 ? !1 : nM(t, e); + return Im.call(e, bx) === !1 ? !1 : rM(t, e); }; function n7() { const r = navigator.userAgentData; @@ -12331,7 +12331,7 @@ function i7() { function a7() { return /apple/i.test(navigator.vendor); } -function iM() { +function nM() { const r = /android/i; return r.test(n7()) || r.test(i7()); } @@ -12341,7 +12341,7 @@ function YH() { function o7() { return i7().includes("jsdom/"); } -const vk = "data-floating-ui-focusable", XH = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", QE = "ArrowLeft", JE = "ArrowRight", $H = "ArrowUp", KH = "ArrowDown"; +const vk = "data-floating-ui-focusable", XH = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", ZE = "ArrowLeft", QE = "ArrowRight", $H = "ArrowUp", KH = "ArrowDown"; function yh(r) { let e = r.activeElement; for (; ((t = e) == null || (t = t.shadowRoot) == null ? void 0 : t.activeElement) != null; ) { @@ -12369,7 +12369,7 @@ function Is(r, e) { function mh(r) { return "composedPath" in r ? r.composedPath()[0] : r.target; } -function eS(r, e) { +function JE(r, e) { if (e == null) return !1; if ("composedPath" in r) @@ -12383,11 +12383,11 @@ function ZH(r) { function ou(r) { return (r == null ? void 0 : r.ownerDocument) || document; } -function O5(r) { +function S5(r) { return bo(r) && r.matches(XH); } -function aM(r) { - return r ? r.getAttribute("role") === "combobox" && O5(r) : !1; +function iM(r) { + return r ? r.getAttribute("role") === "combobox" && S5(r) : !1; } function QH(r) { if (!r || o7()) return !0; @@ -12431,10 +12431,10 @@ function eW(r) { return "nativeEvent" in r; } function s7(r) { - return r.mozInputSource === 0 && r.isTrusted ? !0 : iM() && r.pointerType ? r.type === "click" && r.buttons === 1 : r.detail === 0 && !r.pointerType; + return r.mozInputSource === 0 && r.isTrusted ? !0 : nM() && r.pointerType ? r.type === "click" && r.buttons === 1 : r.detail === 0 && !r.pointerType; } function u7(r) { - return o7() ? !1 : !iM() && r.width === 0 && r.height === 0 || iM() && r.width === 1 && r.height === 1 && r.pressure === 0 && r.detail === 0 && r.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height. + return o7() ? !1 : !nM() && r.width === 0 && r.height === 0 || nM() && r.width === 1 && r.height === 1 && r.pressure === 0 && r.detail === 0 && r.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height. r.width < 1 && r.height < 1 && r.pressure === 0 && r.detail === 0 && r.pointerType === "touch"; } function Nm(r, e) { @@ -12470,7 +12470,7 @@ function rw(r, e, t) { function Rb(r, e) { return e < 0 || e >= r.current.length; } -function tS(r, e) { +function eS(r, e) { return Wu(r, { disabledIndices: e }); @@ -12531,7 +12531,7 @@ function oW(r, e) { disabledIndices: s }))), Rb(r, d) && (d = c)), n === "both") { const h = hm(c / o); - t.key === (a ? QE : JE) && (f && au(t), c % o !== o - 1 ? (d = Wu(r, { + t.key === (a ? ZE : QE) && (f && au(t), c % o !== o - 1 ? (d = Wu(r, { startingIndex: c, disabledIndices: s }), i && rw(d, o, h) && (d = Wu(r, { @@ -12540,7 +12540,7 @@ function oW(r, e) { }))) : i && (d = Wu(r, { startingIndex: c - c % o - 1, disabledIndices: s - })), rw(d, o, h) && (d = c)), t.key === (a ? JE : QE) && (f && au(t), c % o !== 0 ? (d = Wu(r, { + })), rw(d, o, h) && (d = c)), t.key === (a ? QE : ZE) && (f && au(t), c % o !== 0 ? (d = Wu(r, { startingIndex: c, decrement: !0, disabledIndices: s @@ -12554,7 +12554,7 @@ function oW(r, e) { disabledIndices: s })), rw(d, o, h) && (d = c)); const p = hm(l / o) === h; - Rb(r, d) && (i && p ? d = t.key === (a ? JE : QE) ? l : Wu(r, { + Rb(r, d) && (i && p ? d = t.key === (a ? QE : ZE) ? l : Wu(r, { startingIndex: c - c % o - 1, disabledIndices: s }) : d = c); @@ -12998,11 +12998,11 @@ function d7(r) { $: s }; } -function T5(r) { +function O5(r) { return da(r) ? r : r.contextElement; } function bm(r) { - const e = T5(r); + const e = O5(r); if (!bo(e)) return _h(1); const t = e.getBoundingClientRect(), { @@ -13029,17 +13029,17 @@ function bW(r, e, t) { } function Gg(r, e, t, n) { e === void 0 && (e = !1), t === void 0 && (t = !1); - const i = r.getBoundingClientRect(), a = T5(r); + const i = r.getBoundingClientRect(), a = O5(r); let o = _h(1); e && (n ? da(n) && (o = bm(n)) : o = bm(r)); const s = bW(a, t, n) ? h7(a) : _h(0); let u = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, c = i.width / o.x, f = i.height / o.y; if (a) { const d = Fl(a), h = n && da(n) ? Fl(n) : n; - let p = d, g = eM(p); + let p = d, g = JP(p); for (; g && n && h !== p; ) { const y = bm(g), b = g.getBoundingClientRect(), _ = Ff(g), m = b.left + (g.clientLeft + parseFloat(_.paddingLeft)) * y.x, x = b.top + (g.clientTop + parseFloat(_.paddingTop)) * y.y; - u *= y.x, l *= y.y, c *= y.x, f *= y.y, u += m, l += x, p = Fl(g), g = eM(p); + u *= y.x, l *= y.y, c *= y.x, f *= y.y, u += m, l += x, p = Fl(g), g = JP(p); } } return mx({ @@ -13163,7 +13163,7 @@ function TW(r, e) { const a = Ff(r).position === "fixed"; let o = a ? hv(r) : r; for (; da(o) && !cv(o); ) { - const s = Ff(o), u = S5(o); + const s = Ff(o), u = E5(o); !u && s.position === "fixed" && (i = null), (a ? !u && !i : !u && s.position === "static" && !!i && SW.has(i.position) || B1(o) && !u && p7(r, o)) ? n = n.filter((c) => c !== o) : i = s, o = hv(o); } return e.set(r, n), n; @@ -13220,7 +13220,7 @@ function RW(r, e, t) { height: o.height }; } -function rS(r) { +function tS(r) { return Ff(r).position === "static"; } function wk(r, e) { @@ -13238,16 +13238,16 @@ function g7(r, e) { if (!bo(r)) { let i = hv(r); for (; i && !cv(i); ) { - if (da(i) && !rS(i)) + if (da(i) && !tS(i)) return i; i = hv(i); } return t; } let n = wk(r, e); - for (; n && vH(n) && rS(n); ) + for (; n && vH(n) && tS(n); ) n = wk(n, e); - return n && cv(n) && rS(n) && !S5(n) ? t : n || bH(r) || t; + return n && cv(n) && tS(n) && !E5(n) ? t : n || bH(r) || t; } const PW = async function(r) { const e = this.getOffsetParent || g7, t = this.getDimensions, n = await t(r.floating); @@ -13325,7 +13325,7 @@ function kW(r, e) { } return o(!0), a; } -function C5(r, e, t, n) { +function T5(r, e, t, n) { n === void 0 && (n = {}); const { ancestorScroll: i = !0, @@ -13333,7 +13333,7 @@ function C5(r, e, t, n) { elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: u = !1 - } = n, l = T5(r), c = i || a ? [...l ? wp(l) : [], ...wp(e)] : []; + } = n, l = O5(r), c = i || a ? [...l ? wp(l) : [], ...wp(e)] : []; c.forEach((b) => { i && b.addEventListener("scroll", t, { passive: !0 @@ -13413,7 +13413,7 @@ function xk(r, e) { const t = m7(r); return Math.round(e * t) / t; } -function nS(r) { +function rS(r) { const e = me.useRef(r); return Yw(() => { e.current = r; @@ -13446,7 +13446,7 @@ function UW(r) { W !== O.current && (O.current = W, g(W)); }, []), m = me.useCallback((W) => { W !== E.current && (E.current = W, b(W)); - }, []), x = a || p, S = o || y, O = me.useRef(null), E = me.useRef(null), T = me.useRef(c), P = u != null, I = nS(u), k = nS(i), L = nS(l), B = me.useCallback(() => { + }, []), x = a || p, S = o || y, O = me.useRef(null), E = me.useRef(null), T = me.useRef(c), P = u != null, I = rS(u), k = rS(i), L = rS(l), B = me.useCallback(() => { if (!O.current || !E.current) return; const W = { @@ -13521,13 +13521,13 @@ function UW(r) { floatingStyles: q }), [c, B, z, H, q]); } -const A5 = (r, e) => ({ +const C5 = (r, e) => ({ ...IW(r), options: [r, e] -}), R5 = (r, e) => ({ +}), A5 = (r, e) => ({ ...NW(r), options: [r, e] -}), P5 = (r, e) => ({ +}), R5 = (r, e) => ({ ...LW(r), options: [r, e] }); @@ -13717,7 +13717,7 @@ function iu(r) { r.current !== -1 && (clearTimeout(r.current), r.current = -1); } const Ck = /* @__PURE__ */ Vg("safe-polygon"); -function iS(r, e, t) { +function nS(r, e, t) { if (t && !Nm(t)) return 0; if (typeof r == "number") @@ -13728,7 +13728,7 @@ function iS(r, e, t) { } return r == null ? void 0 : r[e]; } -function aS(r) { +function iS(r) { return typeof r == "function" ? r() : r; } function S7(r, e) { @@ -13775,7 +13775,7 @@ function S7(r, e) { }, [o.floating, t, n, s, g, k]); const L = me.useCallback(function(q, W, $) { W === void 0 && (W = !0), $ === void 0 && ($ = "hover"); - const J = iS(y.current, "close", m.current); + const J = nS(y.current, "close", m.current); J && !S.current ? (iu(x), x.current = window.setTimeout(() => n(!1, q, $), J)) : W && (iu(x), n(!1, q, $)); }, [y, n]), B = Wa(() => { P.current(), S.current = void 0; @@ -13787,15 +13787,15 @@ function S7(r, e) { }), z = Wa(() => i.current.openEvent ? ["click", "mousedown"].includes(i.current.openEvent.type) : !1); me.useEffect(() => { if (!s) return; - function q(Q) { - if (iu(x), E.current = !1, c && !Nm(m.current) || aS(_.current) > 0 && !iS(y.current, "open")) + function q(Z) { + if (iu(x), E.current = !1, c && !Nm(m.current) || iS(_.current) > 0 && !nS(y.current, "open")) return; - const ue = iS(y.current, "open", m.current); + const ue = nS(y.current, "open", m.current); ue ? x.current = window.setTimeout(() => { - b.current || n(!0, Q, "hover"); - }, ue) : t || n(!0, Q, "hover"); + b.current || n(!0, Z, "hover"); + }, ue) : t || n(!0, Z, "hover"); } - function W(Q) { + function W(Z) { if (z()) { j(); return; @@ -13806,10 +13806,10 @@ function S7(r, e) { t || iu(x), S.current = g.current({ ...i.current.floatingContext, tree: h, - x: Q.clientX, - y: Q.clientY, + x: Z.clientX, + y: Z.clientY, onClose() { - j(), B(), z() || L(Q, !0, "safe-polygon"); + j(), B(), z() || L(Z, !0, "safe-polygon"); } }); const ne = S.current; @@ -13818,31 +13818,31 @@ function S7(r, e) { }; return; } - (m.current === "touch" ? !Is(o.floating, Q.relatedTarget) : !0) && L(Q); + (m.current === "touch" ? !Is(o.floating, Z.relatedTarget) : !0) && L(Z); } - function $(Q) { + function $(Z) { z() || i.current.floatingContext && (g.current == null || g.current({ ...i.current.floatingContext, tree: h, - x: Q.clientX, - y: Q.clientY, + x: Z.clientX, + y: Z.clientY, onClose() { - j(), B(), z() || L(Q); + j(), B(), z() || L(Z); } - })(Q)); + })(Z)); } function J() { iu(x); } - function X(Q) { - z() || L(Q, !1); + function X(Z) { + z() || L(Z, !1); } if (da(o.domReference)) { - const Q = o.domReference, ue = o.floating; - return t && Q.addEventListener("mouseleave", $), d && Q.addEventListener("mousemove", q, { + const Z = o.domReference, ue = o.floating; + return t && Z.addEventListener("mouseleave", $), d && Z.addEventListener("mousemove", q, { once: !0 - }), Q.addEventListener("mouseenter", q), Q.addEventListener("mouseleave", W), ue && (ue.addEventListener("mouseleave", $), ue.addEventListener("mouseenter", J), ue.addEventListener("mouseleave", X)), () => { - t && Q.removeEventListener("mouseleave", $), d && Q.removeEventListener("mousemove", q), Q.removeEventListener("mouseenter", q), Q.removeEventListener("mouseleave", W), ue && (ue.removeEventListener("mouseleave", $), ue.removeEventListener("mouseenter", J), ue.removeEventListener("mouseleave", X)); + }), Z.addEventListener("mouseenter", q), Z.addEventListener("mouseleave", W), ue && (ue.addEventListener("mouseleave", $), ue.addEventListener("mouseenter", J), ue.addEventListener("mouseleave", X)), () => { + t && Z.removeEventListener("mouseleave", $), d && Z.removeEventListener("mousemove", q), Z.removeEventListener("mouseenter", q), Z.removeEventListener("mouseleave", W), ue && (ue.removeEventListener("mouseleave", $), ue.removeEventListener("mouseenter", J), ue.removeEventListener("mouseleave", X)); }; } }, [o, s, r, c, d, L, B, j, n, t, b, h, y, g, i, z, _]), Di(() => { @@ -13854,8 +13854,8 @@ function S7(r, e) { var W; const J = ou(o.floating).body; J.setAttribute(Ck, ""); - const X = o.domReference, Q = h == null || (W = h.nodesRef.current.find((ue) => ue.id === p)) == null || (W = W.context) == null ? void 0 : W.elements.floating; - return Q && (Q.style.pointerEvents = ""), J.style.pointerEvents = "none", X.style.pointerEvents = "auto", $.style.pointerEvents = "auto", () => { + const X = o.domReference, Z = h == null || (W = h.nodesRef.current.find((ue) => ue.id === p)) == null || (W = W.context) == null ? void 0 : W.elements.floating; + return Z && (Z.style.pointerEvents = ""), J.style.pointerEvents = "none", X.style.pointerEvents = "auto", $.style.pointerEvents = "auto", () => { J.style.pointerEvents = "", X.style.pointerEvents = "", $.style.pointerEvents = ""; }; } @@ -13879,7 +13879,7 @@ function S7(r, e) { function J() { !E.current && !b.current && n(!0, $, "hover"); } - c && !Nm(m.current) || t || aS(_.current) === 0 || I.current && W.movementX ** 2 + W.movementY ** 2 < 2 || (iu(O), m.current === "touch" ? J() : (I.current = !0, O.current = window.setTimeout(J, aS(_.current)))); + c && !Nm(m.current) || t || iS(_.current) === 0 || I.current && W.movementX ** 2 + W.movementY ** 2 < 2 || (iu(O), m.current === "touch" ? J() : (I.current = !0, O.current = window.setTimeout(J, iS(_.current)))); } }; }, [c, n, t, b, _]); @@ -13901,7 +13901,7 @@ function Tg(r, e) { }); i ? a() : Ak = requestAnimationFrame(a); } -function oS(r, e) { +function aS(r, e) { if (!r || !e) return !1; const t = e.getRootNode == null ? void 0 : e.getRootNode(); @@ -13931,7 +13931,7 @@ const _m = { function Rk(r) { return r === "inert" ? _m.inert : r === "aria-hidden" ? _m["aria-hidden"] : _m.none; } -let nw = /* @__PURE__ */ new WeakSet(), iw = {}, sS = 0; +let nw = /* @__PURE__ */ new WeakSet(), iw = {}, oS = 0; const JW = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, O7 = (r) => r && (r.host || O7(r.parentNode)), eY = (r, e) => e.map((t) => { if (r.contains(t)) return t; @@ -13957,11 +13957,11 @@ function tY(r, e, t, n) { } }); } - return sS++, () => { + return oS++, () => { l.forEach((h) => { const p = Rk(a), y = (p.get(h) || 0) - 1, b = (c.get(h) || 0) - 1; p.set(h, y), c.set(h, b), y || (!nw.has(h) && a && h.removeAttribute(a), nw.delete(h)), b || h.removeAttribute(i); - }), sS--, sS || (_m.inert = /* @__PURE__ */ new WeakMap(), _m["aria-hidden"] = /* @__PURE__ */ new WeakMap(), _m.none = /* @__PURE__ */ new WeakMap(), nw = /* @__PURE__ */ new WeakSet(), iw = {}); + }), oS--, oS || (_m.inert = /* @__PURE__ */ new WeakMap(), _m["aria-hidden"] = /* @__PURE__ */ new WeakMap(), _m.none = /* @__PURE__ */ new WeakMap(), nw = /* @__PURE__ */ new WeakSet(), iw = {}); }; } function Pk(r, e, t) { @@ -13969,7 +13969,7 @@ function Pk(r, e, t) { const n = QW(r[0]).body; return tY(r.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))), n, e, t); } -const x2 = { +const P5 = { border: 0, clip: "rect(0 0 0 0)", height: "1px", @@ -13993,14 +13993,19 @@ const x2 = { role: n, "aria-hidden": n ? void 0 : !0, [Vg("focus-guard")]: "", - style: x2 + style: P5 }; return /* @__PURE__ */ Te.jsx("span", { ...e, ...a }); -}), T7 = /* @__PURE__ */ me.createContext(null), Mk = /* @__PURE__ */ Vg("portal"); -function rY(r) { +}), rY = { + clipPath: "inset(50%)", + position: "fixed", + top: 0, + left: 0 +}, T7 = /* @__PURE__ */ me.createContext(null), Mk = /* @__PURE__ */ Vg("portal"); +function nY(r) { r === void 0 && (r = {}); const { id: e, @@ -14019,7 +14024,7 @@ function rY(r) { }, [e, n]), Di(() => { if (t === null || !n || s.current) return; let u = t || (i == null ? void 0 : i.portalNode); - u && !E5(u) && (u = u.current), u = u || document.body; + u && !x5(u) && (u = u.current), u = u || document.body; let l = null; e && (l = document.createElement("div"), l.id = e, u.appendChild(l)); const c = document.createElement("div"); @@ -14032,7 +14037,7 @@ function Tx(r) { id: t, root: n, preserveTabOrder: i = !0 - } = r, a = rY({ + } = r, a = nY({ id: t, root: n }), [o, s] = me.useState(null), u = me.useRef(null), l = me.useRef(null), c = me.useRef(null), f = me.useRef(null), d = o == null ? void 0 : o.modal, h = o == null ? void 0 : o.open, p = ( @@ -14077,7 +14082,7 @@ function Tx(r) { } }), p && a && /* @__PURE__ */ Te.jsx("span", { "aria-owns": a.id, - style: x2 + style: rY }), a && /* @__PURE__ */ y2.createPortal(e, a), p && a && /* @__PURE__ */ Te.jsx(Ox, { "data-type": "outside", ref: l, @@ -14101,18 +14106,18 @@ function Dk(r) { }); }, r); } -const nY = 20; +const iY = 20; let hp = []; function M5() { hp = hp.filter((r) => r.isConnected); } -function iY(r) { - M5(), r && Fp(r) !== "body" && (hp.push(r), hp.length > nY && (hp = hp.slice(-20))); +function aY(r) { + M5(), r && Fp(r) !== "body" && (hp.push(r), hp.length > iY && (hp = hp.slice(-20))); } function kk() { return M5(), hp[hp.length - 1]; } -function aY(r) { +function oY(r) { const e = F1(); return r7(r, e) ? r : g2(r, e)[0] || r; } @@ -14126,13 +14131,13 @@ function Ik(r, e) { }), o = r.getAttribute("tabindex"); e.current.includes("floating") || a.length === 0 ? o !== "0" && r.setAttribute("tabindex", "0") : (o !== "-1" || r.hasAttribute("data-tabindex") && r.getAttribute("data-tabindex") !== "-1") && (r.setAttribute("tabindex", "-1"), r.setAttribute("data-tabindex", "-1")); } -const oY = /* @__PURE__ */ me.forwardRef(function(e, t) { +const sY = /* @__PURE__ */ me.forwardRef(function(e, t) { return /* @__PURE__ */ Te.jsx("button", { ...e, type: "button", ref: t, tabIndex: -1, - style: x2 + style: P5 }); }); function D5(r) { @@ -14162,7 +14167,7 @@ function D5(r) { } = e, x = Wa(() => { var ge; return (ge = b.current.floatingContext) == null ? void 0 : ge.nodeId; - }), S = Wa(h), O = typeof o == "number" && o < 0, E = aM(_) && O, T = JW(), P = T ? a : !0, I = !P || T && d, k = Ns(i), L = Ns(o), B = Ns(s), j = bv(), z = C7(), H = me.useRef(null), q = me.useRef(null), W = me.useRef(!1), $ = me.useRef(!1), J = me.useRef(-1), X = me.useRef(-1), Q = z != null, ue = Ex(m), re = Wa(function(ge) { + }), S = Wa(h), O = typeof o == "number" && o < 0, E = iM(_) && O, T = JW(), P = T ? a : !0, I = !P || T && d, k = Ns(i), L = Ns(o), B = Ns(s), j = bv(), z = C7(), H = me.useRef(null), q = me.useRef(null), W = me.useRef(!1), $ = me.useRef(!1), J = me.useRef(-1), X = me.useRef(-1), Z = z != null, ue = Ex(m), re = Wa(function(ge) { return ge === void 0 && (ge = ue), ge ? g2(ge, F1()) : []; }), ne = Wa((ge) => { const Oe = re(ge); @@ -14173,8 +14178,8 @@ function D5(r) { function ge(ke) { if (ke.key === "Tab") { Is(ue, yh(ou(ue))) && re().length === 0 && !E && au(ke); - const Me = ne(), Ne = mh(ke); - k.current[0] === "reference" && Ne === _ && (au(ke), ke.shiftKey ? Tg(Me[Me.length - 1]) : Tg(Me[1])), k.current[1] === "floating" && Ne === ue && ke.shiftKey && (au(ke), Tg(Me[0])); + const De = ne(), Ne = mh(ke); + k.current[0] === "reference" && Ne === _ && (au(ke), ke.shiftKey ? Tg(De[De.length - 1]) : Tg(De[1])), k.current[1] === "floating" && Ne === ue && ke.shiftKey && (au(ke), Tg(De[0])); } } const Oe = ou(ue); @@ -14198,18 +14203,18 @@ function D5(r) { }); } function Oe(Ne) { - const Ce = Ne.relatedTarget, Y = Ne.currentTarget, Z = mh(Ne); + const Ce = Ne.relatedTarget, Y = Ne.currentTarget, Q = mh(Ne); queueMicrotask(() => { const ie = x(), we = !(Is(_, Ce) || Is(m, Ce) || Is(Ce, m) || Is(z == null ? void 0 : z.portalNode, Ce) || Ce != null && Ce.hasAttribute(Vg("focus-guard")) || j && (Fg(j.nodesRef.current, ie).find((Ee) => { - var De, Ie; - return Is((De = Ee.context) == null ? void 0 : De.elements.floating, Ce) || Is((Ie = Ee.context) == null ? void 0 : Ie.elements.domReference, Ce); + var Me, Ie; + return Is((Me = Ee.context) == null ? void 0 : Me.elements.floating, Ce) || Is((Ie = Ee.context) == null ? void 0 : Ie.elements.domReference, Ce); }) || pk(j.nodesRef.current, ie).find((Ee) => { - var De, Ie, Ye; - return [(De = Ee.context) == null ? void 0 : De.elements.floating, Ex((Ie = Ee.context) == null ? void 0 : Ie.elements.floating)].includes(Ce) || ((Ye = Ee.context) == null ? void 0 : Ye.elements.domReference) === Ce; + var Me, Ie, Ye; + return [(Me = Ee.context) == null ? void 0 : Me.elements.floating, Ex((Ie = Ee.context) == null ? void 0 : Ie.elements.floating)].includes(Ce) || ((Ye = Ee.context) == null ? void 0 : Ye.elements.domReference) === Ce; }))); - if (Y === _ && ue && Ik(ue, k), u && Y !== _ && !(Z != null && Z.isConnected) && yh(ou(ue)) === ou(ue).body) { + if (Y === _ && ue && Ik(ue, k), u && Y !== _ && !(Q != null && Q.isConnected) && yh(ou(ue)) === ou(ue).body) { bo(ue) && ue.focus(); - const Ee = J.current, De = re(), Ie = De[Ee] || De[De.length - 1] || ue; + const Ee = J.current, Me = re(), Ie = Me[Ee] || Me[Me.length - 1] || ue; bo(Ie) && Ie.focus(); } if (b.current.insideReactTree) { @@ -14221,24 +14226,24 @@ function D5(r) { }); } const ke = !!(!j && z); - function Me() { + function De() { iu(X), b.current.insideReactTree = !0, X.current = window.setTimeout(() => { b.current.insideReactTree = !1; }); } if (m && bo(_)) - return _.addEventListener("focusout", Oe), _.addEventListener("pointerdown", ge), m.addEventListener("focusout", Oe), ke && m.addEventListener("focusout", Me, !0), () => { - _.removeEventListener("focusout", Oe), _.removeEventListener("pointerdown", ge), m.removeEventListener("focusout", Oe), ke && m.removeEventListener("focusout", Me, !0); + return _.addEventListener("focusout", Oe), _.addEventListener("pointerdown", ge), m.addEventListener("focusout", Oe), ke && m.addEventListener("focusout", De, !0), () => { + _.removeEventListener("focusout", Oe), _.removeEventListener("pointerdown", ge), m.removeEventListener("focusout", Oe), ke && m.removeEventListener("focusout", De, !0); }; }, [n, _, m, ue, l, j, z, g, f, u, re, E, x, k, b]); const le = me.useRef(null), ce = me.useRef(null), pe = Dk([le, z == null ? void 0 : z.beforeInsideRef]), fe = Dk([ce, z == null ? void 0 : z.afterInsideRef]); me.useEffect(() => { var ge, Oe; if (n || !m) return; - const ke = Array.from((z == null || (ge = z.portalNode) == null ? void 0 : ge.querySelectorAll("[" + Vg("portal") + "]")) || []), Ne = (Oe = (j ? pk(j.nodesRef.current, x()) : []).find((Z) => { + const ke = Array.from((z == null || (ge = z.portalNode) == null ? void 0 : ge.querySelectorAll("[" + Vg("portal") + "]")) || []), Ne = (Oe = (j ? pk(j.nodesRef.current, x()) : []).find((Q) => { var ie; - return aM(((ie = Z.context) == null ? void 0 : ie.elements.domReference) || null); - })) == null || (Oe = Oe.context) == null ? void 0 : Oe.elements.domReference, Ce = [m, Ne, ...ke, ...S(), H.current, q.current, le.current, ce.current, z == null ? void 0 : z.beforeOutsideRef.current, z == null ? void 0 : z.afterOutsideRef.current, k.current.includes("reference") || E ? _ : null].filter((Z) => Z != null), Y = l || E ? Pk(Ce, !I, I) : Pk(Ce); + return iM(((ie = Q.context) == null ? void 0 : ie.elements.domReference) || null); + })) == null || (Oe = Oe.context) == null ? void 0 : Oe.elements.domReference, Ce = [m, Ne, ...ke, ...S(), H.current, q.current, le.current, ce.current, z == null ? void 0 : z.beforeOutsideRef.current, z == null ? void 0 : z.afterOutsideRef.current, k.current.includes("reference") || E ? _ : null].filter((Q) => Q != null), Y = l || E ? Pk(Ce, !I, I) : Pk(Ce); return () => { Y(); }; @@ -14246,7 +14251,7 @@ function D5(r) { if (n || !bo(ue)) return; const ge = ou(ue), Oe = yh(ge); queueMicrotask(() => { - const ke = ne(ue), Me = L.current, Ne = (typeof Me == "number" ? ke[Me] : Me.current) || ue, Ce = Is(ue, Oe); + const ke = ne(ue), De = L.current, Ne = (typeof De == "number" ? ke[De] : De.current) || ue, Ce = Is(ue, Oe); !O && !Ce && p && Tg(Ne, { preventScroll: Ne === ue }); @@ -14254,17 +14259,17 @@ function D5(r) { }, [n, p, ue, O, ne, L]), Di(() => { if (n || !ue) return; const ge = ou(ue), Oe = yh(ge); - iY(Oe); + aY(Oe); function ke(Ce) { let { reason: Y, - event: Z, + event: Q, nested: ie } = Ce; - if (["hover", "safe-polygon"].includes(Y) && Z.type === "mouseleave" && (W.current = !0), Y === "outside-press") + if (["hover", "safe-polygon"].includes(Y) && Q.type === "mouseleave" && (W.current = !0), Y === "outside-press") if (ie) W.current = !1; - else if (s7(Z) || u7(Z)) + else if (s7(Q) || u7(Q)) W.current = !1; else { let we = !1; @@ -14276,33 +14281,33 @@ function D5(r) { } } y.on("openchange", ke); - const Me = ge.createElement("span"); - Me.setAttribute("tabindex", "-1"), Me.setAttribute("aria-hidden", "true"), Object.assign(Me.style, x2), Q && _ && _.insertAdjacentElement("afterend", Me); + const De = ge.createElement("span"); + De.setAttribute("tabindex", "-1"), De.setAttribute("aria-hidden", "true"), Object.assign(De.style, P5), Z && _ && _.insertAdjacentElement("afterend", De); function Ne() { if (typeof B.current == "boolean") { const Ce = _ || kk(); - return Ce && Ce.isConnected ? Ce : Me; + return Ce && Ce.isConnected ? Ce : De; } - return B.current.current || Me; + return B.current.current || De; } return () => { y.off("openchange", ke); const Ce = yh(ge), Y = Is(m, Ce) || j && Fg(j.nodesRef.current, x(), !1).some((ie) => { var we; return Is((we = ie.context) == null ? void 0 : we.elements.floating, Ce); - }), Z = Ne(); + }), Q = Ne(); queueMicrotask(() => { - const ie = aY(Z); + const ie = oY(Q); // eslint-disable-next-line react-hooks/exhaustive-deps B.current && !W.current && bo(ie) && // If the focus moved somewhere else after mount, avoid returning focus // since it likely entered a different element which should be // respected: https://github.com/floating-ui/floating-ui/issues/2607 (!(ie !== Ce && Ce !== ge.body) || Y) && ie.focus({ preventScroll: !0 - }), Me.remove(); + }), De.remove(); }); }; - }, [n, m, ue, B, b, y, j, Q, _, x]), me.useEffect(() => (queueMicrotask(() => { + }, [n, m, ue, B, b, y, j, Z, _, x]), me.useEffect(() => (queueMicrotask(() => { W.current = !1; }), () => { queueMicrotask(M5); @@ -14321,13 +14326,13 @@ function D5(r) { n || ue && Ik(ue, k); }, [n, ue, k]); function se(ge) { - return n || !c || !l ? null : /* @__PURE__ */ Te.jsx(oY, { + return n || !c || !l ? null : /* @__PURE__ */ Te.jsx(sY, { ref: ge === "start" ? H : q, onClick: (Oe) => g(!1, Oe.nativeEvent), children: typeof c == "string" ? c : "Dismiss" }); } - const de = !n && P && (l ? !E : !0) && (Q || l); + const de = !n && P && (l ? !E : !0) && (Z || l); return /* @__PURE__ */ Te.jsxs(Te.Fragment, { children: [de && /* @__PURE__ */ Te.jsx(Ox, { "data-type": "inside", @@ -14366,11 +14371,11 @@ function D5(r) { function Nk(r) { return bo(r.target) && r.target.tagName === "BUTTON"; } -function sY(r) { +function uY(r) { return bo(r.target) && r.target.tagName === "A"; } function Lk(r) { - return O5(r); + return S5(r); } function k5(r, e) { e === void 0 && (e = {}); @@ -14405,7 +14410,7 @@ function k5(r, e) { Nm(y, !0) && l || (t && u && (!(i.current.openEvent && f) || i.current.openEvent.type === "click") ? n(!1, g.nativeEvent, "click") : n(!0, g.nativeEvent, "click")); }, onKeyDown(g) { - d.current = void 0, !(g.defaultPrevented || !c || Nk(g)) && (g.key === " " && !Lk(a) && (g.preventDefault(), h.current = !0), !sY(g) && g.key === "Enter" && n(!(t && u), g.nativeEvent, "click")); + d.current = void 0, !(g.defaultPrevented || !c || Nk(g)) && (g.key === " " && !Lk(a) && (g.preventDefault(), h.current = !0), !uY(g) && g.key === "Enter" && n(!(t && u), g.nativeEvent, "click")); }, onKeyUp(g) { g.defaultPrevented || !c || Nk(g) || Lk(a) || g.key === " " && h.current && (h.current = !1, n(!(t && u), g.nativeEvent, "click")); @@ -14415,7 +14420,7 @@ function k5(r, e) { reference: p } : {}, [o, p]); } -function uY(r, e) { +function lY(r, e) { let t = null, n = null, i = !1; return { contextElement: r || void 0, @@ -14444,7 +14449,7 @@ function uY(r, e) { function jk(r) { return r != null && r.clientX != null; } -function lY(r, e) { +function cY(r, e) { e === void 0 && (e = {}); const { open: t, @@ -14460,7 +14465,7 @@ function lY(r, e) { x: l = null, y: c = null } = e, f = me.useRef(!1), d = me.useRef(null), [h, p] = me.useState(), [g, y] = me.useState([]), b = Wa((O, E) => { - f.current || n.current.openEvent && !jk(n.current.openEvent) || o.setPositionReference(uY(a, { + f.current || n.current.openEvent && !jk(n.current.openEvent) || o.setPositionReference(lY(a, { x: O, y: E, axis: u, @@ -14510,11 +14515,11 @@ function lY(r, e) { reference: S } : {}, [s, S]); } -const cY = { +const fY = { pointerdown: "onPointerDown", mousedown: "onMouseDown", click: "onClick" -}, fY = { +}, dY = { pointerdown: "onPointerDownCapture", mousedown: "onMouseDownCapture", click: "onClickCapture" @@ -14597,13 +14602,13 @@ function I5(r, e) { if (Oe || ke) return; } - const Q = (z = a.current.floatingContext) == null ? void 0 : z.nodeId, ue = g && Fg(g.nodesRef.current, Q).some((ne) => { + const Z = (z = a.current.floatingContext) == null ? void 0 : z.nodeId, ue = g && Fg(g.nodesRef.current, Z).some((ne) => { var le; - return eS(j, (le = ne.context) == null ? void 0 : le.elements.floating); + return JE(j, (le = ne.context) == null ? void 0 : le.elements.floating); }); - if (eS(j, i.floating) || eS(j, i.domReference) || ue) + if (JE(j, i.floating) || JE(j, i.domReference) || ue) return; - const re = g ? Fg(g.nodesRef.current, Q) : []; + const re = g ? Fg(g.nodesRef.current, Z) : []; if (re.length > 0) { let ne = !0; if (re.forEach((le) => { @@ -14666,7 +14671,7 @@ function I5(r, e) { const L = me.useMemo(() => ({ onKeyDown: T, ...c && { - [cY[f]]: (j) => { + [fY[f]]: (j) => { n(!1, j.nativeEvent, "reference-press"); }, ...f !== "click" && { @@ -14683,7 +14688,7 @@ function I5(r, e) { onMouseUp() { _.current = !0; }, - [fY[l]]: () => { + [dY[l]]: () => { a.current.insideReactTree = !0; } }), [T, l, a]); @@ -14692,7 +14697,7 @@ function I5(r, e) { floating: B } : {}, [o, L, B]); } -function dY(r) { +function hY(r) { const { open: e = !1, onOpenChange: t, @@ -14725,7 +14730,7 @@ function N5(r) { r === void 0 && (r = {}); const { nodeId: e - } = r, t = dY({ + } = r, t = hY({ ...r, elements: { reference: null, @@ -14782,10 +14787,10 @@ function N5(r) { elements: b }), [h, y, b, _]); } -function uS() { +function sS() { return YH() && a7(); } -function hY(r, e) { +function vY(r, e) { e === void 0 && (e = {}); const { open: t, @@ -14809,8 +14814,8 @@ function hY(r, e) { function y() { f.current = !1; } - return h.addEventListener("blur", p), uS() && (h.addEventListener("keydown", g, !0), h.addEventListener("pointerdown", y, !0)), () => { - h.removeEventListener("blur", p), uS() && (h.removeEventListener("keydown", g, !0), h.removeEventListener("pointerdown", y, !0)); + return h.addEventListener("blur", p), sS() && (h.addEventListener("keydown", g, !0), h.addEventListener("pointerdown", y, !0)), () => { + h.removeEventListener("blur", p), sS() && (h.removeEventListener("keydown", g, !0), h.removeEventListener("pointerdown", y, !0)); }; }, [o.domReference, t, s]), me.useEffect(() => { if (!s) return; @@ -14834,8 +14839,8 @@ function hY(r, e) { if (l.current) return; const p = mh(h.nativeEvent); if (u && da(p)) { - if (uS() && !h.relatedTarget) { - if (!f.current && !O5(p)) + if (sS() && !h.relatedTarget) { + if (!f.current && !S5(p)) return; } else if (!QH(p)) return; @@ -14856,7 +14861,7 @@ function hY(r, e) { reference: d } : {}, [s, d]); } -function lS(r, e, t) { +function uS(r, e, t) { const n = /* @__PURE__ */ new Map(), i = t === "item"; let a = r; if (i && r) { @@ -14896,15 +14901,15 @@ function lS(r, e, t) { function L5(r) { r === void 0 && (r = []); const e = r.map((s) => s == null ? void 0 : s.reference), t = r.map((s) => s == null ? void 0 : s.floating), n = r.map((s) => s == null ? void 0 : s.item), i = me.useCallback( - (s) => lS(s, r, "reference"), + (s) => uS(s, r, "reference"), // eslint-disable-next-line react-hooks/exhaustive-deps e ), a = me.useCallback( - (s) => lS(s, r, "floating"), + (s) => uS(s, r, "floating"), // eslint-disable-next-line react-hooks/exhaustive-deps t ), o = me.useCallback( - (s) => lS(s, r, "item"), + (s) => uS(s, r, "item"), // eslint-disable-next-line react-hooks/exhaustive-deps n ); @@ -14914,8 +14919,8 @@ function L5(r) { getItemProps: o }), [i, a, o]); } -const vY = "Escape"; -function E2(r, e, t) { +const pY = "Escape"; +function x2(r, e, t) { switch (r) { case "vertical": return e; @@ -14926,19 +14931,19 @@ function E2(r, e, t) { } } function aw(r, e) { - return E2(e, r === _7 || r === _2, r === U1 || r === z1); + return x2(e, r === _7 || r === _2, r === U1 || r === z1); } -function cS(r, e, t) { - return E2(e, r === _2, t ? r === U1 : r === z1) || r === "Enter" || r === " " || r === ""; +function lS(r, e, t) { + return x2(e, r === _2, t ? r === U1 : r === z1) || r === "Enter" || r === " " || r === ""; } function Fk(r, e, t) { - return E2(e, t ? r === U1 : r === z1, r === _2); + return x2(e, t ? r === U1 : r === z1, r === _2); } function Uk(r, e, t, n) { const i = t ? r === z1 : r === U1, a = r === _7; - return e === "both" || e === "horizontal" && n && n > 1 ? r === vY : E2(e, i, a); + return e === "both" || e === "horizontal" && n && n > 1 ? r === pY : x2(e, i, a); } -function pY(r, e) { +function gY(r, e) { const { open: t, onOpenChange: n, @@ -14973,7 +14978,7 @@ function pY(r, e) { }, [r, x]); const z = Wa(() => { u(W.current === -1 ? null : W.current); - }), H = aM(i.domReference), q = me.useRef(y), W = me.useRef(c ?? -1), $ = me.useRef(null), J = me.useRef(!0), X = me.useRef(z), Q = me.useRef(!!i.floating), ue = me.useRef(t), re = me.useRef(!1), ne = me.useRef(!1), le = Ns(m), ce = Ns(t), pe = Ns(E), fe = Ns(c), [se, de] = me.useState(), [ge, Oe] = me.useState(), ke = Wa(() => { + }), H = iM(i.domReference), q = me.useRef(y), W = me.useRef(c ?? -1), $ = me.useRef(null), J = me.useRef(!0), X = me.useRef(z), Z = me.useRef(!!i.floating), ue = me.useRef(t), re = me.useRef(!1), ne = me.useRef(!1), le = Ns(m), ce = Ns(t), pe = Ns(E), fe = Ns(c), [se, de] = me.useState(), [ge, Oe] = me.useState(), ke = Wa(() => { function Ee(ot) { if (g) { var mt; @@ -14984,11 +14989,11 @@ function pY(r, e) { preventScroll: !0 }); } - const De = o.current[W.current], Ie = ne.current; - De && Ee(De), (re.current ? (ot) => ot() : requestAnimationFrame)(() => { - const ot = o.current[W.current] || De; + const Me = o.current[W.current], Ie = ne.current; + Me && Ee(Me), (re.current ? (ot) => ot() : requestAnimationFrame)(() => { + const ot = o.current[W.current] || Me; if (!ot) return; - De || Ee(ot); + Me || Ee(ot); const mt = pe.current; mt && Ne && (Ie || !J.current) && (ot.scrollIntoView == null || ot.scrollIntoView(typeof mt == "boolean" ? { block: "nearest", @@ -14997,42 +15002,42 @@ function pY(r, e) { }); }); Di(() => { - l && (t && i.floating ? q.current && c != null && (ne.current = !0, W.current = c, z()) : Q.current && (W.current = -1, X.current())); + l && (t && i.floating ? q.current && c != null && (ne.current = !0, W.current = c, z()) : Z.current && (W.current = -1, X.current())); }, [l, t, i.floating, c, z]), Di(() => { if (l && t && i.floating) if (s == null) { if (re.current = !1, fe.current != null) return; - if (Q.current && (W.current = -1, ke()), (!ue.current || !Q.current) && q.current && ($.current != null || q.current === !0 && $.current == null)) { + if (Z.current && (W.current = -1, ke()), (!ue.current || !Z.current) && q.current && ($.current != null || q.current === !0 && $.current == null)) { let Ee = 0; - const De = () => { - o.current[0] == null ? (Ee < 2 && (Ee ? requestAnimationFrame : queueMicrotask)(De), Ee++) : (W.current = $.current == null || cS($.current, x, p) || h ? tS(o, le.current) : gk(o, le.current), $.current = null, z()); + const Me = () => { + o.current[0] == null ? (Ee < 2 && (Ee ? requestAnimationFrame : queueMicrotask)(Me), Ee++) : (W.current = $.current == null || lS($.current, x, p) || h ? eS(o, le.current) : gk(o, le.current), $.current = null, z()); }; - De(); + Me(); } } else Rb(o, s) || (W.current = s, ke(), ne.current = !1); }, [l, t, i.floating, s, fe, h, o, x, p, z, ke, le]), Di(() => { var Ee; - if (!l || i.floating || !j || g || !Q.current) + if (!l || i.floating || !j || g || !Z.current) return; - const De = j.nodesRef.current, Ie = (Ee = De.find((mt) => mt.id === B)) == null || (Ee = Ee.context) == null ? void 0 : Ee.elements.floating, Ye = yh(ou(i.floating)), ot = De.some((mt) => mt.context && Is(mt.context.elements.floating, Ye)); + const Me = j.nodesRef.current, Ie = (Ee = Me.find((mt) => mt.id === B)) == null || (Ee = Ee.context) == null ? void 0 : Ee.elements.floating, Ye = yh(ou(i.floating)), ot = Me.some((mt) => mt.context && Is(mt.context.elements.floating, Ye)); Ie && !ot && J.current && Ie.focus({ preventScroll: !0 }); }, [l, i.floating, j, B, g]), Di(() => { if (!l || !j || !g || B) return; - function Ee(De) { - Oe(De.id), T && (T.current = De); + function Ee(Me) { + Oe(Me.id), T && (T.current = Me); } return j.events.on("virtualfocus", Ee), () => { j.events.off("virtualfocus", Ee); }; }, [l, j, g, B, T]), Di(() => { - X.current = z, ue.current = t, Q.current = !!i.floating; + X.current = z, ue.current = t, Z.current = !!i.floating; }), Di(() => { t || ($.current = null, q.current = y); }, [t, y]); - const Me = s != null, Ne = me.useMemo(() => { + const De = s != null, Ne = me.useMemo(() => { function Ee(Ie) { if (!ce.current) return; const Ye = o.current.indexOf(Ie); @@ -15074,7 +15079,7 @@ function pY(r, e) { }; }, [ce, L, b, o, z, g]), Ce = me.useCallback(() => { var Ee; - return S ?? (j == null || (Ee = j.nodesRef.current.find((De) => De.id === B)) == null || (Ee = Ee.context) == null || (Ee = Ee.dataRef) == null ? void 0 : Ee.current.orientation); + return S ?? (j == null || (Ee = j.nodesRef.current.find((Me) => Me.id === B)) == null || (Ee = Ee.context) == null || (Ee = Ee.dataRef) == null ? void 0 : Ee.current.orientation); }, [B, j, S]), Y = Wa((Ee) => { if (J.current = !1, re.current = !0, Ee.which === 229 || !ce.current && Ee.currentTarget === L.current) return; @@ -15082,7 +15087,7 @@ function pY(r, e) { aw(Ee.key, Ce()) || au(Ee), n(!1, Ee.nativeEvent, "list-navigation"), bo(i.domReference) && (g ? j == null || j.events.emit("virtualfocus", i.domReference) : i.domReference.focus()); return; } - const De = W.current, Ie = tS(o, m), Ye = gk(o, m); + const Me = W.current, Ie = eS(o, m), Ye = gk(o, m); if (H || (Ee.key === "Home" && (au(Ee), W.current = Ie, z()), Ee.key === "End" && (au(Ee), W.current = Ye, z())), O > 1) { const ot = P || Array.from({ length: o.current.length @@ -15119,43 +15124,43 @@ function pY(r, e) { } if (aw(Ee.key, x)) { if (au(Ee), t && !g && yh(Ee.currentTarget.ownerDocument) === Ee.currentTarget) { - W.current = cS(Ee.key, x, p) ? Ie : Ye, z(); + W.current = lS(Ee.key, x, p) ? Ie : Ye, z(); return; } - cS(Ee.key, x, p) ? d ? W.current = De >= Ye ? f && De !== o.current.length ? -1 : Ie : Wu(o, { - startingIndex: De, + lS(Ee.key, x, p) ? d ? W.current = Me >= Ye ? f && Me !== o.current.length ? -1 : Ie : Wu(o, { + startingIndex: Me, disabledIndices: m }) : W.current = Math.min(Ye, Wu(o, { - startingIndex: De, + startingIndex: Me, disabledIndices: m - })) : d ? W.current = De <= Ie ? f && De !== -1 ? o.current.length : Ye : Wu(o, { - startingIndex: De, + })) : d ? W.current = Me <= Ie ? f && Me !== -1 ? o.current.length : Ye : Wu(o, { + startingIndex: Me, decrement: !0, disabledIndices: m }) : W.current = Math.max(Ie, Wu(o, { - startingIndex: De, + startingIndex: Me, decrement: !0, disabledIndices: m })), Rb(o, W.current) && (W.current = -1), z(); } - }), Z = me.useMemo(() => g && t && Me && { + }), Q = me.useMemo(() => g && t && De && { "aria-activedescendant": ge || se - }, [g, t, Me, ge, se]), ie = me.useMemo(() => ({ + }, [g, t, De, ge, se]), ie = me.useMemo(() => ({ "aria-orientation": x === "both" ? void 0 : x, - ...H ? {} : Z, + ...H ? {} : Q, onKeyDown: Y, onPointerMove() { J.current = !0; } - }), [Z, Y, x, H]), we = me.useMemo(() => { + }), [Q, Y, x, H]), we = me.useMemo(() => { function Ee(Ie) { y === "auto" && s7(Ie.nativeEvent) && (q.current = !0); } - function De(Ie) { + function Me(Ie) { q.current = y, y === "auto" && u7(Ie.nativeEvent) && (q.current = !0); } return { - ...Z, + ...Q, onKeyDown(Ie) { J.current = !1; const Ye = Ie.key.startsWith("Arrow"), ot = ["Home", "End"].includes(Ie.key), mt = Ye || ot, wt = Fk(Ie.key, x, p), Mt = Uk(Ie.key, x, p, O), Dt = Fk(Ie.key, Ce(), p), vt = aw(Ie.key, x), tt = (h ? Dt : vt) || Ie.key === "Enter" || Ie.key.trim() === ""; @@ -15185,7 +15190,7 @@ function pY(r, e) { $.current = h && Ze ? null : Ie.key; } if (h) { - Dt && (au(Ie), t ? (W.current = tS(o, le.current), z()) : n(!0, Ie.nativeEvent, "list-navigation")); + Dt && (au(Ie), t ? (W.current = eS(o, le.current), z()) : n(!0, Ie.nativeEvent, "list-navigation")); return; } vt && (c != null && (W.current = c), au(Ie), !t && _ ? n(!0, Ie.nativeEvent, "list-navigation") : Y(Ie), t && z()); @@ -15194,19 +15199,19 @@ function pY(r, e) { onFocus() { t && !g && (W.current = -1, z()); }, - onPointerDown: De, - onPointerEnter: De, + onPointerDown: Me, + onPointerEnter: Me, onMouseDown: Ee, onClick: Ee }; - }, [se, Z, O, Y, le, y, o, h, z, n, t, _, x, Ce, p, c, j, g, T]); + }, [se, Q, O, Y, le, y, o, h, z, n, t, _, x, Ce, p, c, j, g, T]); return me.useMemo(() => l ? { reference: we, floating: ie, item: Ne } : {}, [l, we, ie, Ne]); } -const gY = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]); +const yY = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]); function j5(r, e) { var t, n; e === void 0 && (e = {}); @@ -15220,7 +15225,7 @@ function j5(r, e) { } = e, l = w2(), c = ((t = a.domReference) == null ? void 0 : t.id) || l, f = me.useMemo(() => { var _; return ((_ = Ex(a.floating)) == null ? void 0 : _.id) || o; - }, [a.floating, o]), d = (n = gY.get(u)) != null ? n : u, p = Up() != null, g = me.useMemo(() => d === "tooltip" || u === "label" ? { + }, [a.floating, o]), d = (n = yY.get(u)) != null ? n : u, p = Up() != null, g = me.useMemo(() => d === "tooltip" || u === "label" ? { ["aria-" + (u === "label" ? "labelledby" : "describedby")]: i ? f : void 0 } : { "aria-expanded": i ? "true" : "false", @@ -15285,7 +15290,7 @@ const zk = (r) => r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + function Yy(r, e) { return typeof r == "function" ? r(e) : r; } -function yY(r, e) { +function mY(r, e) { const [t, n] = me.useState(r); return r && !t && n(!0), me.useEffect(() => { if (!r && t) { @@ -15294,7 +15299,7 @@ function yY(r, e) { } }, [r, t, e]), t; } -function mY(r, e) { +function bY(r, e) { e === void 0 && (e = {}); const { open: t, @@ -15303,7 +15308,7 @@ function mY(r, e) { } } = r, { duration: i = 250 - } = e, o = (typeof i == "number" ? i : i.close) || 0, [s, u] = me.useState("unmounted"), l = yY(t, o); + } = e, o = (typeof i == "number" ? i : i.close) || 0, [s, u] = me.useState("unmounted"), l = mY(t, o); return !l && s === "close" && u("unmounted"), Di(() => { if (n) { if (t) { @@ -15324,7 +15329,7 @@ function mY(r, e) { status: s }; } -function bY(r, e) { +function _Y(r, e) { e === void 0 && (e = {}); const { initial: t = { @@ -15343,7 +15348,7 @@ function bY(r, e) { })), { isMounted: g, status: y - } = mY(r, { + } = bY(r, { duration: o }), b = Ns(t), _ = Ns(n), m = Ns(i), x = Ns(a); return Di(() => { @@ -15371,7 +15376,7 @@ function bY(r, e) { styles: h }; } -function _Y(r, e) { +function wY(r, e) { var t; const { open: n, @@ -15444,7 +15449,7 @@ function qk(r, e) { } return i; } -function wY(r, e) { +function xY(r, e) { return r[0] >= e.x && r[0] <= e.x + e.width && r[1] >= e.y && r[1] <= e.y + e.height; } function R7(r) { @@ -15483,24 +15488,24 @@ function R7(r) { const { clientX: O, clientY: E - } = x, T = [O, E], P = ZW(x), I = x.type === "mouseleave", k = oS(g.floating, P), L = oS(g.domReference, P), B = g.domReference.getBoundingClientRect(), j = g.floating.getBoundingClientRect(), z = p.split("-")[0], H = d > j.right - j.width / 2, q = h > j.bottom - j.height / 2, W = wY(T, B), $ = j.width > B.width, J = j.height > B.height, X = ($ ? B : j).left, Q = ($ ? B : j).right, ue = (J ? B : j).top, re = (J ? B : j).bottom; + } = x, T = [O, E], P = ZW(x), I = x.type === "mouseleave", k = aS(g.floating, P), L = aS(g.domReference, P), B = g.domReference.getBoundingClientRect(), j = g.floating.getBoundingClientRect(), z = p.split("-")[0], H = d > j.right - j.width / 2, q = h > j.bottom - j.height / 2, W = xY(T, B), $ = j.width > B.width, J = j.height > B.height, X = ($ ? B : j).left, Z = ($ ? B : j).right, ue = (J ? B : j).top, re = (J ? B : j).bottom; if (k && (a = !0, !I)) return; if (L && (a = !1), L && !I) { a = !0; return; } - if (I && da(x.relatedTarget) && oS(g.floating, x.relatedTarget) || _ && A7(_.nodesRef.current, b).length) + if (I && da(x.relatedTarget) && aS(g.floating, x.relatedTarget) || _ && A7(_.nodesRef.current, b).length) return; if (z === "top" && h >= B.bottom - 1 || z === "bottom" && h <= B.top + 1 || z === "left" && d >= B.right - 1 || z === "right" && d <= B.left + 1) return S(); let ne = []; switch (z) { case "top": - ne = [[X, B.top + 1], [X, j.bottom - 1], [Q, j.bottom - 1], [Q, B.top + 1]]; + ne = [[X, B.top + 1], [X, j.bottom - 1], [Z, j.bottom - 1], [Z, B.top + 1]]; break; case "bottom": - ne = [[X, j.top + 1], [X, B.bottom - 1], [Q, B.bottom - 1], [Q, j.top + 1]]; + ne = [[X, j.top + 1], [X, B.bottom - 1], [Z, B.bottom - 1], [Z, j.top + 1]]; break; case "left": ne = [[j.right - 1, re], [j.right - 1, ue], [B.left + 1, ue], [B.left + 1, re]]; @@ -15546,33 +15551,33 @@ function R7(r) { blockPointerEvents: t }, c; } -const v1 = ({ shouldWrap: r, wrap: e, children: t }) => r ? e(t) : t, xY = ao.createContext(null), B5 = () => !!me.useContext(xY), EY = me.createContext(void 0), SY = me.createContext(void 0), S2 = () => { - let r = me.useContext(EY); +const v1 = ({ shouldWrap: r, wrap: e, children: t }) => r ? e(t) : t, EY = ao.createContext(null), B5 = () => !!me.useContext(EY), SY = me.createContext(void 0), OY = me.createContext(void 0), E2 = () => { + let r = me.useContext(SY); r === void 0 && (r = "light"); - const e = me.useContext(SY); + const e = me.useContext(OY); return { theme: r, themeClassName: `ndl-theme-${r}`, tokens: e }; }; -function OY({ isInitialOpen: r = !1, placement: e = "top", isOpen: t, onOpenChange: n, type: i = "simple", isPortaled: a = !0, strategy: o = "absolute", hoverDelay: s = void 0, shouldCloseOnReferenceClick: u = !1, autoUpdateOptions: l, isDisabled: c = !1 } = {}) { +function TY({ isInitialOpen: r = !1, placement: e = "top", isOpen: t, onOpenChange: n, type: i = "simple", isPortaled: a = !0, strategy: o = "absolute", hoverDelay: s = void 0, shouldCloseOnReferenceClick: u = !1, autoUpdateOptions: l, isDisabled: c = !1 } = {}) { const [f, d] = me.useState(r), h = t ?? f, p = n ?? d, g = N5({ middleware: [ - A5(5), - P5({ + C5(5), + R5({ crossAxis: e.includes("-"), fallbackAxisSideDirection: "start", padding: 5 }), - R5({ padding: 5 }) + A5({ padding: 5 }) ], onOpenChange: p, open: h, placement: e, strategy: o, whileElementsMounted(E, T, P) { - return C5(E, T, P, Object.assign({}, l)); + return T5(E, T, P, Object.assign({}, l)); } }), y = g.context, b = S7(y, { delay: s, @@ -15581,7 +15586,7 @@ function OY({ isInitialOpen: r = !1, placement: e = "top", isOpen: t, onOpenChan move: !1 }), _ = k5(y, { enabled: i === "rich" && !c - }), m = hY(y, { + }), m = vY(y, { enabled: i === "simple" && !c, visibleOnly: !0 }), x = I5(y, { @@ -15613,7 +15618,7 @@ var G1 = function(r, e) { return t; }; const M7 = ({ children: r, isDisabled: e = !1, type: t, isInitialOpen: n, placement: i, isOpen: a, onOpenChange: o, isPortaled: s, floatingStrategy: u, hoverDelay: l, shouldCloseOnReferenceClick: c, autoUpdateOptions: f }) => { - const d = B5(), g = OY({ + const d = B5(), g = TY({ autoUpdateOptions: f, hoverDelay: l, isDisabled: e, @@ -15630,7 +15635,7 @@ const M7 = ({ children: r, isDisabled: e = !1, type: t, isInitialOpen: n, placem return Te.jsx(P7.Provider, { value: g, children: r }); }; M7.displayName = "Tooltip"; -const TY = (r) => { +const CY = (r) => { var { children: e, hasButtonWrapper: t = !1, htmlAttributes: n, className: i, style: a, ref: o } = r, s = G1(r, ["children", "hasButtonWrapper", "htmlAttributes", "className", "style", "ref"]); const u = q1(), l = e.props, c = mv([ u.refs.setReference, @@ -15645,9 +15650,9 @@ const TY = (r) => { return me.cloneElement(e, u.getReferenceProps(d)); } return Te.jsx("button", Object.assign({ type: "button", className: f, style: a, ref: c }, u.getReferenceProps(n), s, { children: e })); -}, CY = (r) => { +}, AY = (r) => { var { children: e, style: t, htmlAttributes: n, className: i, ref: a } = r, o = G1(r, ["children", "style", "htmlAttributes", "className", "ref"]); - const s = q1(), u = mv([s.refs.setFloating, a]), { themeClassName: l } = S2(); + const s = q1(), u = mv([s.refs.setFloating, a]), { themeClassName: l } = E2(); if (!s.isOpen) return null; const c = Vn("ndl-tooltip-content", l, i, { @@ -15655,15 +15660,15 @@ const TY = (r) => { "ndl-tooltip-content-simple": s.type === "simple" }); return s.type === "simple" ? Te.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Te.jsx(Tx, { children: f }), children: Te.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: Te.jsx(Ed, { variant: "body-medium", children: e }) })) }) : Te.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Te.jsx(Tx, { children: f }), children: Te.jsx(D5, { context: s.context, returnFocus: !0, modal: !1, initialFocus: -1, closeOnFocusOut: !0, children: Te.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: e })) }) }); -}, AY = (r) => { +}, RY = (r) => { var { children: e, passThroughProps: t, typographyVariant: n = "subheading-medium", className: i, style: a, htmlAttributes: o, ref: s } = r, u = G1(r, ["children", "passThroughProps", "typographyVariant", "className", "style", "htmlAttributes", "ref"]); const l = q1(), c = Vn("ndl-tooltip-header", i); return l.isOpen ? Te.jsx(Ed, Object.assign({ ref: s, variant: n, className: c, style: a, htmlAttributes: o }, t, u, { children: e })) : null; -}, RY = (r) => { +}, PY = (r) => { var { children: e, className: t, style: n, htmlAttributes: i, passThroughProps: a, ref: o } = r, s = G1(r, ["children", "className", "style", "htmlAttributes", "passThroughProps", "ref"]); const u = q1(), l = Vn("ndl-tooltip-body", t); return u.isOpen ? Te.jsx(Ed, Object.assign({ ref: o, variant: "body-medium", className: l, style: n, htmlAttributes: i }, a, s, { children: e })) : null; -}, PY = (r) => { +}, MY = (r) => { var { children: e, className: t, style: n, htmlAttributes: i, ref: a } = r, o = G1(r, ["children", "className", "style", "htmlAttributes", "ref"]); const s = q1(), u = mv([s.refs.setFloating, a]); if (!s.isOpen) @@ -15671,13 +15676,13 @@ const TY = (r) => { const l = Vn("ndl-tooltip-actions", t); return Te.jsx("div", Object.assign({ className: l, ref: u, style: n }, o, i, { children: e })); }, Bf = Object.assign(M7, { - Actions: PY, - Body: RY, - Content: CY, - Header: AY, - Trigger: TY + Actions: MY, + Body: PY, + Content: AY, + Header: RY, + Trigger: CY }); -var MY = function(r, e) { +var DY = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -15704,7 +15709,7 @@ const D7 = (r) => { htmlAttributes: p, onClick: g, ref: y - } = r, b = MY(r, ["children", "as", "iconButtonVariant", "isLoading", "isDisabled", "size", "isFloating", "isActive", "description", "tooltipProps", "className", "style", "variant", "htmlAttributes", "onClick", "ref"]); + } = r, b = DY(r, ["children", "as", "iconButtonVariant", "isLoading", "isDisabled", "size", "isFloating", "isActive", "description", "tooltipProps", "className", "style", "variant", "htmlAttributes", "onClick", "ref"]); const _ = t ?? "button", m = !a && !i, x = n === "clean", O = Vn("ndl-icon-btn", f, { "ndl-active": !!u, "ndl-clean": x, @@ -15718,7 +15723,7 @@ const D7 = (r) => { }); if (x && s) throw new Error('BaseIconButton: Cannot use isFloating and iconButtonVariant="clean" at the same time.'); - !l && !(p != null && p["aria-label"]) && JP("Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI"); + !l && !(p != null && p["aria-label"]) && QP("Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI"); const E = (T) => { if (!m) { T.preventDefault(), T.stopPropagation(); @@ -15731,7 +15736,7 @@ const D7 = (r) => { open: 500 } }, c == null ? void 0 : c.root, { type: "simple", isDisabled: l === null || a, children: [Te.jsx(Bf.Trigger, Object.assign({}, c == null ? void 0 : c.trigger, { hasButtonWrapper: !0, children: Te.jsx(_, Object.assign({ type: "button", onClick: E, disabled: a, "aria-disabled": !m, "aria-label": l, "aria-pressed": u, className: O, style: d, ref: y }, b, p, { children: Te.jsx("div", { className: "ndl-icon-btn-inner", children: i ? Te.jsx(h1, { size: "small" }) : Te.jsx("div", { className: "ndl-icon", children: e }) }) })) })), Te.jsx(Bf.Content, Object.assign({}, c == null ? void 0 : c.content, { children: l }))] })); }; -var DY = function(r, e) { +var kY = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -15739,7 +15744,7 @@ var DY = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const O2 = (r) => { +const S2 = (r) => { var { children: e, as: t, @@ -15756,30 +15761,30 @@ const O2 = (r) => { htmlAttributes: d, onClick: h, ref: p - } = r, g = DY(r, ["children", "as", "isLoading", "isDisabled", "size", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); + } = r, g = kY(r, ["children", "as", "isLoading", "isDisabled", "size", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); return Te.jsx(D7, Object.assign({ as: t, iconButtonVariant: "clean", isDisabled: i, size: a, isLoading: n, isActive: o, variant: s, description: u, tooltipProps: l, className: c, style: f, htmlAttributes: d, onClick: h, ref: p }, g, { children: e })); }; -function kY({ state: r, onChange: e, isControlled: t, inputType: n = "text" }) { +function IY({ state: r, onChange: e, isControlled: t, inputType: n = "text" }) { const [i, a] = me.useState(r), o = me.useMemo(() => t === !0 ? r : i, [t, r, i]), s = me.useCallback((u) => { let l; ["checkbox", "radio", "switch"].includes(n) ? l = u.target.checked : l = u.target.value, t !== !0 && a(l), e == null || e(u); }, [t, e, n]); return [o, s]; } -function IY({ isInitialOpen: r = !1, placement: e = "bottom", isOpen: t, onOpenChange: n, offsetOption: i = 10, anchorElement: a, anchorPosition: o, anchorElementAsPortalAnchor: s, shouldCaptureFocus: u, initialFocus: l, role: c, closeOnClickOutside: f, strategy: d = "absolute", isPortaled: h = !0 } = {}) { +function NY({ isInitialOpen: r = !1, placement: e = "bottom", isOpen: t, onOpenChange: n, offsetOption: i = 10, anchorElement: a, anchorPosition: o, anchorElementAsPortalAnchor: s, shouldCaptureFocus: u, initialFocus: l, role: c, closeOnClickOutside: f, strategy: d = "absolute", isPortaled: h = !0 } = {}) { var p; const [g, y] = me.useState(r), [b, _] = me.useState(), [m, x] = me.useState(), S = t ?? g, O = n ?? y, E = N5({ elements: { reference: a }, middleware: [ - A5(i), - P5({ + C5(i), + R5({ crossAxis: e.includes("-"), fallbackAxisSideDirection: "end", padding: 5 }), - R5() + A5() ], onOpenChange: (z, H) => { O(z), n == null || n(z, H); @@ -15787,18 +15792,18 @@ function IY({ isInitialOpen: r = !1, placement: e = "bottom", isOpen: t, onOpenC open: S, placement: e, strategy: d, - whileElementsMounted: C5 + whileElementsMounted: T5 }), T = E.context, P = k5(T, { enabled: t === void 0 }), I = I5(T, { outsidePress: f }), k = j5(T, { role: c - }), L = lY(T, { + }), L = cY(T, { enabled: o !== void 0, x: o == null ? void 0 : o.x, y: o == null ? void 0 : o.y - }), B = L5([P, I, k, L]), { styles: j } = bY(T, { + }), B = L5([P, I, k, L]), { styles: j } = _Y(T, { duration: (p = Number.parseInt(Yu.motion.duration.quick)) !== null && p !== void 0 ? p : 0 }); return me.useMemo(() => Object.assign(Object.assign(Object.assign({ @@ -15828,7 +15833,7 @@ function IY({ isInitialOpen: r = !1, placement: e = "bottom", isOpen: t, onOpenC h ]); } -function NY() { +function LY() { me.useEffect(() => { const r = () => { document.querySelectorAll("[data-floating-ui-focus-guard]").forEach((n) => { @@ -15847,7 +15852,7 @@ function NY() { }; }, []); } -var oM = function(r, e) { +var aM = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -15873,8 +15878,8 @@ const k7 = { if (r === null) throw new Error("Popover components must be wrapped in "); return r; -}, LY = ({ children: r, anchorElement: e, placement: t, isOpen: n, offset: i, anchorPosition: a, hasAnchorPortal: o, shouldCaptureFocus: s = !1, initialFocus: u, onOpenChange: l, role: c, closeOnClickOutside: f = !0, isPortaled: d, strategy: h }) => { - const p = B5(), g = p ? "fixed" : "absolute", _ = IY({ +}, jY = ({ children: r, anchorElement: e, placement: t, isOpen: n, offset: i, anchorPosition: a, hasAnchorPortal: o, shouldCaptureFocus: s = !1, initialFocus: u, onOpenChange: l, role: c, closeOnClickOutside: f = !0, isPortaled: d, strategy: h }) => { + const p = B5(), g = p ? "fixed" : "absolute", _ = NY({ anchorElement: e, anchorElementAsPortalAnchor: o ?? p, anchorPosition: a, @@ -15890,25 +15895,25 @@ const k7 = { strategy: h ?? g }); return Te.jsx(I7.Provider, { value: _, children: r }); -}, jY = (r) => { - var { children: e, hasButtonWrapper: t = !1, ref: n } = r, i = oM(r, ["children", "hasButtonWrapper", "ref"]); +}, BY = (r) => { + var { children: e, hasButtonWrapper: t = !1, ref: n } = r, i = aM(r, ["children", "hasButtonWrapper", "ref"]); const a = N7(), o = e.props, s = mv([ a.refs.setReference, n, o == null ? void 0 : o.ref ]); return t && ao.isValidElement(e) ? ao.cloneElement(e, a.getReferenceProps(Object.assign(Object.assign(Object.assign({}, i), o), { "data-state": a.isOpen ? "open" : "closed", ref: s }))) : Te.jsx("button", Object.assign({ ref: a.refs.setReference, type: "button", "data-state": a.isOpen ? "open" : "closed" }, a.getReferenceProps(i), { children: e })); -}, BY = (r) => { - var { as: e, className: t, style: n, children: i, htmlAttributes: a, ref: o } = r, s = oM(r, ["as", "className", "style", "children", "htmlAttributes", "ref"]); - const u = N7(), { context: l } = u, c = oM(u, ["context"]), f = mv([c.refs.setFloating, o]), { themeClassName: d } = S2(), h = Vn("ndl-popover", d, t), p = e ?? "div"; - return NY(), l.open ? Te.jsx(v1, { shouldWrap: c.isPortaled, wrap: (g) => { +}, FY = (r) => { + var { as: e, className: t, style: n, children: i, htmlAttributes: a, ref: o } = r, s = aM(r, ["as", "className", "style", "children", "htmlAttributes", "ref"]); + const u = N7(), { context: l } = u, c = aM(u, ["context"]), f = mv([c.refs.setFloating, o]), { themeClassName: d } = E2(), h = Vn("ndl-popover", d, t), p = e ?? "div"; + return LY(), l.open ? Te.jsx(v1, { shouldWrap: c.isPortaled, wrap: (g) => { var y; return Te.jsx(Tx, { root: (y = c.anchorElementAsPortalAnchor) !== null && y !== void 0 && y ? c.refs.reference.current : void 0, children: g }); }, children: Te.jsx(D5, { context: l, modal: c.shouldCaptureFocus, initialFocus: c.initialFocus, children: Te.jsx(p, Object.assign({ className: h, "aria-labelledby": c.labelId, "aria-describedby": c.descriptionId, style: Object.assign(Object.assign(Object.assign({}, c.floatingStyles), c.transitionStyles), n), ref: f }, c.getFloatingProps(Object.assign({}, a)), s, { children: i })) }) }) : null; }; -Object.assign(LY, { - Content: BY, - Trigger: jY +Object.assign(jY, { + Content: FY, + Trigger: BY }); var Xm = function(r, e) { var t = {}; @@ -15928,35 +15933,35 @@ const p1 = me.createContext({ // oxlint-disable-next-line @typescript-eslint/no-empty-function setHasFocusInside: () => { } -}), FY = (r) => Up() === null ? Te.jsx(KW, { children: Te.jsx(Gk, Object.assign({}, r, { isRoot: !0 })) }) : Te.jsx(Gk, Object.assign({}, r)), Gk = ({ children: r, isOpen: e, onClose: t, isRoot: n, anchorRef: i, as: a, className: o, placement: s, minWidth: u, title: l, isDisabled: c, description: f, icon: d, isPortaled: h = !0, portalTarget: p, htmlAttributes: g, strategy: y, ref: b, style: _ }) => { - const [m, x] = me.useState(!1), [S, O] = me.useState(!1), [E, T] = me.useState(null), P = me.useRef([]), I = me.useRef([]), k = me.useContext(p1), L = B5(), B = bv(), j = XW(), z = Up(), H = b2(), { themeClassName: q } = S2(); +}), UY = (r) => Up() === null ? Te.jsx(KW, { children: Te.jsx(Gk, Object.assign({}, r, { isRoot: !0 })) }) : Te.jsx(Gk, Object.assign({}, r)), Gk = ({ children: r, isOpen: e, onClose: t, isRoot: n, anchorRef: i, as: a, className: o, placement: s, minWidth: u, title: l, isDisabled: c, description: f, icon: d, isPortaled: h = !0, portalTarget: p, htmlAttributes: g, strategy: y, ref: b, style: _ }) => { + const [m, x] = me.useState(!1), [S, O] = me.useState(!1), [E, T] = me.useState(null), P = me.useRef([]), I = me.useRef([]), k = me.useContext(p1), L = B5(), B = bv(), j = XW(), z = Up(), H = b2(), { themeClassName: q } = E2(); me.useEffect(() => { e !== void 0 && x(e); }, [e]), me.useEffect(() => { m && T(0); }, [m]); - const W = a ?? "div", $ = z !== null, J = $ ? "right-start" : "bottom-start", { floatingStyles: X, refs: Q, context: ue } = N5({ + const W = a ?? "div", $ = z !== null, J = $ ? "right-start" : "bottom-start", { floatingStyles: X, refs: Z, context: ue } = N5({ elements: { reference: i == null ? void 0 : i.current }, middleware: [ - A5({ + C5({ alignmentAxis: $ ? -4 : 0, mainAxis: $ ? 0 : 4 }), - P5({ + R5({ fallbackPlacements: ["left-start", "right-start"] }), - R5() + A5() ], nodeId: j, - onOpenChange: (Me, Ne) => { - e === void 0 && x(Me), Me || (Ne instanceof PointerEvent ? t == null || t(Ne, { type: "backdropClick" }) : Ne instanceof KeyboardEvent && (t == null || t(Ne, { type: "escapeKeyDown" }))); + onOpenChange: (Ne, Ce) => { + e === void 0 && x(Ne), Ne || (Ce instanceof PointerEvent ? t == null || t(Ce, { type: "backdropClick" }) : Ce instanceof KeyboardEvent ? t == null || t(Ce, { type: "escapeKeyDown" }) : Ce instanceof FocusEvent && (t == null || t(Ce, { type: "focusOut" }))); }, open: m, placement: s ? k7[s] : J, strategy: y ?? (L ? "fixed" : "absolute"), - whileElementsMounted: C5 + whileElementsMounted: T5 }), re = S7(ue, { delay: { open: 75 }, enabled: $, @@ -15965,12 +15970,12 @@ const p1 = me.createContext({ event: "mousedown", ignoreMouse: $, toggle: !$ - }), le = j5(ue, { role: "menu" }), ce = I5(ue, { bubbles: !0 }), pe = pY(ue, { + }), le = j5(ue, { role: "menu" }), ce = I5(ue, { bubbles: !0 }), pe = gY(ue, { activeIndex: E, listRef: P, nested: $, onNavigate: T - }), fe = _Y(ue, { + }), fe = wY(ue, { activeIndex: E, listRef: I, onMatch: m ? T : void 0 @@ -15978,23 +15983,28 @@ const p1 = me.createContext({ me.useEffect(() => { if (!B) return; - function Me(Ce) { - e === void 0 && x(!1), t == null || t(void 0, { id: Ce == null ? void 0 : Ce.id, type: "itemClick" }); + function Ne(Y) { + e === void 0 && x(!1), t == null || t(void 0, { id: Y == null ? void 0 : Y.id, type: "itemClick" }); } - function Ne(Ce) { - Ce.nodeId !== j && Ce.parentId === z && (e === void 0 && x(!1), t == null || t(void 0, { type: "itemClick" })); + function Ce(Y) { + Y.nodeId !== j && Y.parentId === z && (e === void 0 && x(!1), t == null || t(void 0, { type: "itemClick" })); } - return B.events.on("click", Me), B.events.on("menuopen", Ne), () => { - B.events.off("click", Me), B.events.off("menuopen", Ne); + return B.events.on("click", Ne), B.events.on("menuopen", Ce), () => { + B.events.off("click", Ne), B.events.off("menuopen", Ce); }; }, [B, j, z, t, e]), me.useEffect(() => { m && B && B.events.emit("menuopen", { nodeId: j, parentId: z }); }, [B, m, j, z]); - const Oe = Vn("ndl-menu", q, o), ke = mv([Q.setReference, H.ref, b]); - return Te.jsxs($W, { id: j, children: [n !== !0 && Te.jsx(zY, { ref: ke, className: $ ? "MenuItem" : "RootMenu", isDisabled: c, style: _, htmlAttributes: Object.assign(Object.assign({ "data-focus-inside": S ? "" : void 0, "data-nested": $ ? "" : void 0, "data-open": m ? "" : void 0, role: $ ? "menuitem" : void 0, tabIndex: $ ? k.activeIndex === H.index ? 0 : -1 : void 0 }, g), se(k.getItemProps({ - onFocus(Me) { - var Ne; - (Ne = g == null ? void 0 : g.onFocus) === null || Ne === void 0 || Ne.call(g, Me), O(!1), k.setHasFocusInside(!0); + const Oe = me.useCallback((Ne) => { + Ne.key === "Tab" && Ne.shiftKey && requestAnimationFrame(() => { + const Ce = Z.floating.current; + Ce && !Ce.contains(document.activeElement) && (e === void 0 && x(!1), t == null || t(void 0, { type: "focusOut" })); + }); + }, [e, t, Z]), ke = Vn("ndl-menu", q, o), De = mv([Z.setReference, H.ref, b]); + return Te.jsxs($W, { id: j, children: [n !== !0 && Te.jsx(qY, { ref: De, className: $ ? "MenuItem" : "RootMenu", isDisabled: c, style: _, htmlAttributes: Object.assign(Object.assign({ "data-focus-inside": S ? "" : void 0, "data-nested": $ ? "" : void 0, "data-open": m ? "" : void 0, role: $ ? "menuitem" : void 0, tabIndex: $ ? k.activeIndex === H.index ? 0 : -1 : void 0 }, g), se(k.getItemProps({ + onFocus(Ne) { + var Ce; + (Ce = g == null ? void 0 : g.onFocus) === null || Ce === void 0 || Ce.call(g, Ne), O(!1), k.setHasFocusInside(!0); } }))), title: l, description: f, leadingVisual: d }), Te.jsx(p1.Provider, { value: { activeIndex: E, @@ -16002,14 +16012,16 @@ const p1 = me.createContext({ isOpen: c === !0 ? !1 : m, setActiveIndex: T, setHasFocusInside: O - }, children: Te.jsx(qW, { elementsRef: P, labelsRef: I, children: m && Te.jsx(v1, { shouldWrap: h, wrap: (Me) => Te.jsx(Tx, { root: p, children: Me }), children: Te.jsx(D5, { context: ue, modal: !1, initialFocus: 0, returnFocus: !$, closeOnFocusOut: !0, guards: !0, children: Te.jsx(W, Object.assign({ ref: Q.setFloating, className: Oe, style: Object.assign(Object.assign({ minWidth: u !== void 0 ? `${u}px` : void 0 }, X), _) }, de(), { children: r })) }) }) }) })] }); + }, children: Te.jsx(qW, { elementsRef: P, labelsRef: I, children: m && Te.jsx(v1, { shouldWrap: h, wrap: (Ne) => Te.jsx(Tx, { root: p, children: Ne }), children: Te.jsx(D5, { context: ue, modal: !1, initialFocus: 0, returnFocus: !$, closeOnFocusOut: !0, guards: !0, children: Te.jsx(W, Object.assign({ ref: Z.setFloating, className: ke, style: Object.assign(Object.assign({ minWidth: u !== void 0 ? `${u}px` : void 0 }, X), _) }, de({ + onKeyDown: Oe + }), { children: r })) }) }) }) })] }); }, F5 = (r) => { var { title: e, leadingContent: t, trailingContent: n, preLeadingContent: i, description: a, isDisabled: o, as: s, className: u, style: l, htmlAttributes: c, ref: f } = r, d = Xm(r, ["title", "leadingContent", "trailingContent", "preLeadingContent", "description", "isDisabled", "as", "className", "style", "htmlAttributes", "ref"]); const h = Vn("ndl-menu-item", u, { "ndl-disabled": o }), p = s ?? "button"; return Te.jsx(p, Object.assign({ className: h, ref: f, type: "button", role: "menuitem", disabled: o, style: l }, d, c, { children: Te.jsxs("div", { className: "ndl-menu-item-inner", children: [!!i && Te.jsx("div", { className: "ndl-menu-item-pre-leading-content", children: i }), !!t && Te.jsx("div", { className: "ndl-menu-item-leading-content", children: t }), Te.jsxs("div", { className: "ndl-menu-item-title-wrapper", children: [Te.jsx("div", { className: "ndl-menu-item-title", children: e }), !!a && Te.jsx("div", { className: "ndl-menu-item-description", children: a })] }), !!n && Te.jsx("div", { className: "ndl-menu-item-trailing-content", children: n })] }) })); -}, UY = (r) => { +}, zY = (r) => { var { title: e, className: t, style: n, leadingVisual: i, trailingContent: a, description: o, isDisabled: s, as: u, onClick: l, onFocus: c, htmlAttributes: f, id: d, ref: h } = r, p = Xm(r, ["title", "className", "style", "leadingVisual", "trailingContent", "description", "isDisabled", "as", "onClick", "onFocus", "htmlAttributes", "id", "ref"]); const g = me.useContext(p1), b = b2({ label: s === !0 ? null : typeof e == "string" ? e : void 0 }), _ = bv(), m = b.index === g.activeIndex, x = mv([b.ref, h]); return Te.jsx(F5, Object.assign({ as: u ?? "button", style: n, className: t, ref: x, title: e, description: o, leadingContent: i, trailingContent: a, isDisabled: s, htmlAttributes: Object.assign(Object.assign(Object.assign({}, f), { tabIndex: m ? 0 : -1 }), g.getItemProps({ @@ -16021,7 +16033,7 @@ const p1 = me.createContext({ c == null || c(S), g.setHasFocusInside(!0); } })) }, p)); -}, zY = ({ title: r, isDisabled: e, description: t, leadingVisual: n, as: i, onFocus: a, onClick: o, className: s, style: u, htmlAttributes: l, id: c, ref: f }) => { +}, qY = ({ title: r, isDisabled: e, description: t, leadingVisual: n, as: i, onFocus: a, onClick: o, className: s, style: u, htmlAttributes: l, id: c, ref: f }) => { const d = me.useContext(p1), p = b2({ label: e === !0 ? null : typeof r == "string" ? r : void 0 }), g = p.index === d.activeIndex, y = mv([p.ref, f]); return Te.jsx(F5, { as: i ?? "button", style: u, className: s, ref: y, title: r, description: t, leadingContent: n, trailingContent: Te.jsx(V9, { className: "ndl-menu-item-chevron" }), isDisabled: e, htmlAttributes: Object.assign(Object.assign(Object.assign(Object.assign({}, l), { tabIndex: g ? 0 : -1 }), d.getItemProps({ onClick(b) { @@ -16034,11 +16046,11 @@ const p1 = me.createContext({ d.setHasFocusInside(!0); } })), { id: c }) }); -}, qY = (r) => { +}, GY = (r) => { var { children: e, className: t, style: n, as: i, htmlAttributes: a, ref: o } = r, s = Xm(r, ["children", "className", "style", "as", "htmlAttributes", "ref"]); const u = Vn("ndl-menu-category-item", t), l = i ?? "div"; return Te.jsx(l, Object.assign({ className: u, style: n, ref: o }, s, a, { children: e })); -}, GY = (r) => { +}, VY = (r) => { var { title: e, leadingVisual: t, trailingContent: n, description: i, isDisabled: a, isChecked: o = !1, onClick: s, onFocus: u, className: l, style: c, as: f, id: d, htmlAttributes: h, ref: p } = r, g = Xm(r, ["title", "leadingVisual", "trailingContent", "description", "isDisabled", "isChecked", "onClick", "onFocus", "className", "style", "as", "id", "htmlAttributes", "ref"]); const y = me.useContext(p1), _ = b2({ label: a === !0 ? null : typeof e == "string" ? e : void 0 }), m = bv(), x = _.index === y.activeIndex, S = mv([_.ref, p]), O = Vn("ndl-menu-radio-item", l, { "ndl-checked": o @@ -16052,26 +16064,26 @@ const p1 = me.createContext({ u == null || u(E), y.setHasFocusInside(!0); } })) }, g)); -}, VY = (r) => { +}, HY = (r) => { var { as: e, children: t, className: n, htmlAttributes: i, style: a, ref: o } = r, s = Xm(r, ["as", "children", "className", "htmlAttributes", "style", "ref"]); const u = Vn("ndl-menu-items", n), l = e ?? "div"; return Te.jsx(l, Object.assign({ className: u, style: a, ref: o }, s, i, { children: t })); -}, HY = (r) => { +}, WY = (r) => { var { children: e, className: t, htmlAttributes: n, style: i, ref: a } = r, o = Xm(r, ["children", "className", "htmlAttributes", "style", "ref"]); const s = Vn("ndl-menu-group", t); return Te.jsx("div", Object.assign({ className: s, style: i, ref: a, role: "group" }, o, n, { children: e })); -}, Lm = Object.assign(FY, { - CategoryItem: qY, +}, Lm = Object.assign(UY, { + CategoryItem: GY, Divider: pV, - Group: HY, - Item: UY, + Group: WY, + Item: zY, /** * @deprecated Use Menu.Group instead if you want to group items together. If not, you can just omit this component in your implementation. */ - Items: VY, - RadioItem: GY -}), WY = "aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"; -var YY = function(r, e) { + Items: HY, + RadioItem: VY +}), YY = "aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"; +var XY = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -16080,7 +16092,7 @@ var YY = function(r, e) { return t; }; const cb = (r) => { - var { as: e, shape: t = "rectangular", className: n, style: i, height: a, width: o, isLoading: s = !0, children: u, htmlAttributes: l, onBackground: c = "default", ref: f } = r, d = YY(r, ["as", "shape", "className", "style", "height", "width", "isLoading", "children", "htmlAttributes", "onBackground", "ref"]); + var { as: e, shape: t = "rectangular", className: n, style: i, height: a, width: o, isLoading: s = !0, children: u, htmlAttributes: l, onBackground: c = "default", ref: f } = r, d = XY(r, ["as", "shape", "className", "style", "height", "width", "isLoading", "children", "htmlAttributes", "onBackground", "ref"]); const h = e ?? "div", p = Vn(`ndl-skeleton ndl-skeleton-${t}`, c && `ndl-skeleton-${c}`, n); return Te.jsx(v1, { shouldWrap: s, wrap: (g) => Te.jsx(h, Object.assign({ ref: f, className: p, style: Object.assign(Object.assign({}, i), { height: a, @@ -16088,7 +16100,7 @@ const cb = (r) => { }), "aria-busy": !0, tabIndex: -1 }, d, l, { children: Te.jsx("div", { "aria-hidden": s, className: "ndl-skeleton-content", tabIndex: -1, children: g }) })), children: u }); }; cb.displayName = "Skeleton"; -var XY = function(r, e) { +var $Y = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -16096,9 +16108,9 @@ var XY = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const $Y = (r) => { - var { label: e, isFluid: t, errorText: n, helpText: i, leadingElement: a, trailingElement: o, showRequiredOrOptionalLabel: s = !1, moreInformationText: u, size: l = "medium", placeholder: c, value: f, tooltipProps: d, htmlAttributes: h, isDisabled: p, isReadOnly: g, isRequired: y, onChange: b, isClearable: _ = !1, className: m, style: x, isSkeletonLoading: S = !1, isLoading: O = !1, skeletonProps: E, ref: T } = r, P = XY(r, ["label", "isFluid", "errorText", "helpText", "leadingElement", "trailingElement", "showRequiredOrOptionalLabel", "moreInformationText", "size", "placeholder", "value", "tooltipProps", "htmlAttributes", "isDisabled", "isReadOnly", "isRequired", "onChange", "isClearable", "className", "style", "isSkeletonLoading", "isLoading", "skeletonProps", "ref"]); - const [I, k] = kY({ +const KY = (r) => { + var { label: e, isFluid: t, errorText: n, helpText: i, leadingElement: a, trailingElement: o, showRequiredOrOptionalLabel: s = !1, moreInformationText: u, size: l = "medium", placeholder: c, value: f, tooltipProps: d, htmlAttributes: h, isDisabled: p, isReadOnly: g, isRequired: y, onChange: b, isClearable: _ = !1, className: m, style: x, isSkeletonLoading: S = !1, isLoading: O = !1, skeletonProps: E, ref: T } = r, P = $Y(r, ["label", "isFluid", "errorText", "helpText", "leadingElement", "trailingElement", "showRequiredOrOptionalLabel", "moreInformationText", "size", "placeholder", "value", "tooltipProps", "htmlAttributes", "isDisabled", "isReadOnly", "isRequired", "onChange", "isClearable", "className", "style", "isSkeletonLoading", "isLoading", "skeletonProps", "ref"]); + const [I, k] = IY({ inputType: "text", isControlled: f !== void 0, onChange: b, @@ -16116,14 +16128,14 @@ const $Y = (r) => { }), H = e == null || e === "", q = Vn("ndl-form-item-label", { "ndl-fluid": t, "ndl-form-item-no-label": H - }), W = Object.assign(Object.assign({}, h), { className: Vn("ndl-input", h == null ? void 0 : h.className) }), $ = W["aria-label"], X = !!e && typeof e != "string" && ($ === void 0 || $ === ""), Q = _ || O, ue = (le) => { + }), W = Object.assign(Object.assign({}, h), { className: Vn("ndl-input", h == null ? void 0 : h.className) }), $ = W["aria-label"], X = !!e && typeof e != "string" && ($ === void 0 || $ === ""), Z = _ || O, ue = (le) => { var ce; _ && le.key === "Escape" && I && (le.preventDefault(), le.stopPropagation(), k == null || k({ target: { value: "" } })), (ce = h == null ? void 0 : h.onKeyDown) === null || ce === void 0 || ce.call(h, le); }; me.useMemo(() => { - !e && !$ && JP("A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"), X && JP(WY); + !e && !$ && QP("A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"), X && QP(YY); }, [e, $, X]); const re = Vn({ "ndl-information-icon-large": l === "large", @@ -16134,7 +16146,7 @@ const $Y = (r) => { }, [L, i, n, B, j]); return Te.jsxs("div", { className: z, style: x, children: [Te.jsxs("label", { className: q, children: [!H && Te.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Te.jsxs("div", { className: "ndl-label-text-wrapper", children: [Te.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-label-text", children: e }), !!u && Te.jsxs(Bf, Object.assign({}, d == null ? void 0 : d.root, { type: "simple", children: [Te.jsx(Bf.Trigger, Object.assign({}, d == null ? void 0 : d.trigger, { className: re, hasButtonWrapper: !0, children: Te.jsx("div", { tabIndex: 0, role: "button", "aria-label": "Information icon", children: Te.jsx(YV, {}) }) })), Te.jsx(Bf.Content, Object.assign({}, d == null ? void 0 : d.content, { children: u }))] })), s && Te.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-form-item-optional", children: y === !0 ? "Required" : "Optional" })] }) })), Te.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Te.jsxs("div", { className: "ndl-input-wrapper", children: [(a || O && !o) && Te.jsx("div", { className: "ndl-element-leading ndl-element", children: O ? Te.jsx(h1, { size: l === "large" ? "medium" : "small", className: l === "large" ? "ndl-medium-spinner" : "ndl-small-spinner" }) : a }), Te.jsxs("div", { className: Vn("ndl-input-container", { "ndl-clearable": _ - }), children: [Te.jsx("input", Object.assign({ ref: T, readOnly: g, disabled: p, required: y, value: I, placeholder: c, type: "text", onChange: k, "aria-describedby": ne }, W, { onKeyDown: ue }, P)), Q && Te.jsxs("span", { id: L, className: "ndl-text-input-hint", "aria-hidden": !0, children: [O && "Loading ", _ && "Press Escape to clear input."] }), _ && !!I && Te.jsx("div", { className: "ndl-element-clear ndl-element", children: Te.jsx("button", { tabIndex: -1, "aria-hidden": !0, type: "button", title: "Clear input (Esc)", onClick: () => { + }), children: [Te.jsx("input", Object.assign({ ref: T, readOnly: g, disabled: p, required: y, value: I, placeholder: c, type: "text", onChange: k, "aria-describedby": ne }, W, { onKeyDown: ue }, P)), Z && Te.jsxs("span", { id: L, className: "ndl-text-input-hint", "aria-hidden": !0, children: [O && "Loading ", _ && "Press Escape to clear input."] }), _ && !!I && Te.jsx("div", { className: "ndl-element-clear ndl-element", children: Te.jsx("button", { tabIndex: -1, "aria-hidden": !0, type: "button", title: "Clear input (Esc)", onClick: () => { k == null || k({ target: { value: "" } }); @@ -16148,7 +16160,7 @@ const $Y = (r) => { id: j }, children: n })] }) }))] }); }; -var KY = function(r, e) { +var ZY = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -16157,7 +16169,7 @@ var KY = function(r, e) { return t; }; const L7 = (r) => { - var { as: e, buttonFill: t = "filled", children: n, className: i, variant: a = "primary", htmlAttributes: o, isDisabled: s = !1, isFloating: u = !1, isFluid: l = !1, isLoading: c = !1, leadingVisual: f, onClick: d, ref: h, size: p = "medium", style: g, type: y = "button" } = r, b = KY(r, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "onClick", "ref", "size", "style", "type"]); + var { as: e, buttonFill: t = "filled", children: n, className: i, variant: a = "primary", htmlAttributes: o, isDisabled: s = !1, isFloating: u = !1, isFluid: l = !1, isLoading: c = !1, leadingVisual: f, onClick: d, ref: h, size: p = "medium", style: g, type: y = "button" } = r, b = ZY(r, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "onClick", "ref", "size", "style", "type"]); const _ = e ?? "button", m = !s && !c, x = Vn(i, "ndl-btn", { "ndl-disabled": s, "ndl-floating": u, @@ -16175,7 +16187,7 @@ const L7 = (r) => { }; return Te.jsx(_, Object.assign({ type: y, onClick: S, disabled: s, "aria-disabled": !m, className: x, style: g, ref: h }, b, o, { children: Te.jsxs("div", { className: "ndl-btn-inner", children: [c && Te.jsx("span", { className: "ndl-btn-spinner-wrapper", children: Te.jsx(h1, { size: p }) }), !!f && Te.jsx("div", { className: "ndl-btn-leading-element", children: f }), !!n && Te.jsx("span", { className: "ndl-btn-content", children: n })] }) })); }; -var ZY = function(r, e) { +var QY = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -16183,11 +16195,11 @@ var ZY = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const QY = (r) => { - var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, isFloating: l = !1, className: c, style: f, htmlAttributes: d, ref: h } = r, p = ZY(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "isFloating", "className", "style", "htmlAttributes", "ref"]); +const JY = (r) => { + var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, isFloating: l = !1, className: c, style: f, htmlAttributes: d, ref: h } = r, p = QY(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "isFloating", "className", "style", "htmlAttributes", "ref"]); return Te.jsx(L7, Object.assign({ as: t, buttonFill: "outlined", variant: a, className: c, isDisabled: o, isFloating: l, isLoading: i, onClick: u, size: s, style: f, type: n, htmlAttributes: d, ref: h }, p, { children: e })); }; -var JY = function(r, e) { +var eX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -16195,13 +16207,13 @@ var JY = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const eX = (r) => { - var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, className: l, style: c, htmlAttributes: f, ref: d } = r, h = JY(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "className", "style", "htmlAttributes", "ref"]); +const tX = (r) => { + var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, className: l, style: c, htmlAttributes: f, ref: d } = r, h = eX(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "className", "style", "htmlAttributes", "ref"]); return Te.jsx(L7, Object.assign({ as: t, buttonFill: "text", variant: a, className: l, isDisabled: o, isLoading: i, onClick: u, size: s, style: c, type: n, htmlAttributes: f, ref: d }, h, { children: e })); }; -var fS, Vk; -function tX() { - if (Vk) return fS; +var cS, Vk; +function rX() { + if (Vk) return cS; Vk = 1; var r = "Expected a function", e = NaN, t = "[object Symbol]", n = /^\s+|\s+$/g, i = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, o = /^0o[0-7]+$/i, s = parseInt, u = typeof Lf == "object" && Lf && Lf.Object === Object && Lf, l = typeof self == "object" && self && self.Object === Object && self, c = u || l || Function("return this")(), f = Object.prototype, d = f.toString, h = Math.max, p = Math.min, g = function() { return c.Date.now(); @@ -16216,7 +16228,7 @@ function tX() { return T = P = void 0, j = ce, k = S.apply(fe, pe), k; } function $(ce) { - return j = ce, L = setTimeout(Q, O), z ? W(ce) : k; + return j = ce, L = setTimeout(Z, O), z ? W(ce) : k; } function J(ce) { var pe = ce - B, fe = ce - j, se = O - pe; @@ -16226,11 +16238,11 @@ function tX() { var pe = ce - B, fe = ce - j; return B === void 0 || pe >= O || pe < 0 || H && fe >= I; } - function Q() { + function Z() { var ce = g(); if (X(ce)) return ue(ce); - L = setTimeout(Q, J(ce)); + L = setTimeout(Z, J(ce)); } function ue(ce) { return L = void 0, q && T ? W(ce) : (T = P = void 0, k); @@ -16247,9 +16259,9 @@ function tX() { if (L === void 0) return $(B); if (H) - return L = setTimeout(Q, O), W(B); + return L = setTimeout(Z, O), W(B); } - return L === void 0 && (L = setTimeout(Q, O)), k; + return L === void 0 && (L = setTimeout(Z, O)), k; } return le.cancel = re, le.flush = ne, le; } @@ -16278,10 +16290,10 @@ function tX() { var E = a.test(S); return E || o.test(S) ? s(S.slice(2), E ? 2 : 8) : i.test(S) ? e : +S; } - return fS = y, fS; + return cS = y, cS; } -tX(); -function rX() { +rX(); +function nX() { const [r, e] = me.useState(null), t = me.useCallback(async (n) => { if (!(navigator != null && navigator.clipboard)) return console.warn("Clipboard not supported"), !1; @@ -16301,13 +16313,13 @@ function Cx(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Cx(r); } -var nX = /^\s+/, iX = /\s+$/; +var iX = /^\s+/, aX = /\s+$/; function dr(r, e) { if (r = r || "", e = e || {}, r instanceof dr) return r; if (!(this instanceof dr)) return new dr(r, e); - var t = aX(r); + var t = oX(r); this._originalInput = r, this._r = t.r, this._g = t.g, this._b = t.b, this._a = t.a, this._roundA = Math.round(100 * this._a) / 100, this._format = e.format || t.format, this._gradientType = e.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 = t.ok; } dr.prototype = { @@ -16373,7 +16385,7 @@ dr.prototype = { return "#" + this.toHex(e); }, toHex8: function(e) { - return lX(this._r, this._g, this._b, this._a, e); + return cX(this._r, this._g, this._b, this._a, e); }, toHex8String: function(e) { return "#" + this.toHex8(e); @@ -16401,7 +16413,7 @@ dr.prototype = { return this._a == 1 ? "rgb(" + Math.round(Ma(this._r, 255) * 100) + "%, " + Math.round(Ma(this._g, 255) * 100) + "%, " + Math.round(Ma(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(Ma(this._r, 255) * 100) + "%, " + Math.round(Ma(this._g, 255) * 100) + "%, " + Math.round(Ma(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, toName: function() { - return this._a === 0 ? "transparent" : this._a < 1 ? !1 : wX[Yk(this._r, this._g, this._b, !0)] || !1; + return this._a === 0 ? "transparent" : this._a < 1 ? !1 : xX[Yk(this._r, this._g, this._b, !0)] || !1; }, toFilter: function(e) { var t = "#" + Xk(this._r, this._g, this._b, this._a), n = t, i = this._gradientType ? "GradientType = 1, " : ""; @@ -16425,40 +16437,40 @@ dr.prototype = { return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this; }, lighten: function() { - return this._applyModification(hX, arguments); + return this._applyModification(vX, arguments); }, brighten: function() { - return this._applyModification(vX, arguments); + return this._applyModification(pX, arguments); }, darken: function() { - return this._applyModification(pX, arguments); + return this._applyModification(gX, arguments); }, desaturate: function() { - return this._applyModification(cX, arguments); + return this._applyModification(fX, arguments); }, saturate: function() { - return this._applyModification(fX, arguments); + return this._applyModification(dX, arguments); }, greyscale: function() { - return this._applyModification(dX, arguments); + return this._applyModification(hX, arguments); }, spin: function() { - return this._applyModification(gX, arguments); + return this._applyModification(yX, arguments); }, _applyCombination: function(e, t) { return e.apply(null, [this].concat([].slice.call(t))); }, analogous: function() { - return this._applyCombination(bX, arguments); + return this._applyCombination(_X, arguments); }, complement: function() { - return this._applyCombination(yX, arguments); + return this._applyCombination(mX, arguments); }, monochromatic: function() { - return this._applyCombination(_X, arguments); + return this._applyCombination(wX, arguments); }, splitcomplement: function() { - return this._applyCombination(mX, arguments); + return this._applyCombination(bX, arguments); }, // Disabled until https://github.com/bgrins/TinyColor/issues/254 // polyad: function (number) { @@ -16480,13 +16492,13 @@ dr.fromRatio = function(r, e) { } return dr(r, e); }; -function aX(r) { +function oX(r) { var e = { r: 0, g: 0, b: 0 }, t = 1, n = null, i = null, a = null, o = !1, s = !1; - return typeof r == "string" && (r = OX(r)), Cx(r) == "object" && (ev(r.r) && ev(r.g) && ev(r.b) ? (e = oX(r.r, r.g, r.b), o = !0, s = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : ev(r.h) && ev(r.s) && ev(r.v) ? (n = fb(r.s), i = fb(r.v), e = uX(r.h, n, i), o = !0, s = "hsv") : ev(r.h) && ev(r.s) && ev(r.l) && (n = fb(r.s), a = fb(r.l), e = sX(r.h, n, a), o = !0, s = "hsl"), r.hasOwnProperty("a") && (t = r.a)), t = j7(t), { + return typeof r == "string" && (r = TX(r)), Cx(r) == "object" && (ev(r.r) && ev(r.g) && ev(r.b) ? (e = sX(r.r, r.g, r.b), o = !0, s = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : ev(r.h) && ev(r.s) && ev(r.v) ? (n = fb(r.s), i = fb(r.v), e = lX(r.h, n, i), o = !0, s = "hsv") : ev(r.h) && ev(r.s) && ev(r.l) && (n = fb(r.s), a = fb(r.l), e = uX(r.h, n, a), o = !0, s = "hsl"), r.hasOwnProperty("a") && (t = r.a)), t = j7(t), { ok: o, format: r.format || s, r: Math.min(255, Math.max(e.r, 0)), @@ -16495,7 +16507,7 @@ function aX(r) { a: t }; } -function oX(r, e, t) { +function sX(r, e, t) { return { r: Ma(r, 255) * 255, g: Ma(e, 255) * 255, @@ -16528,7 +16540,7 @@ function Hk(r, e, t) { l: s }; } -function sX(r, e, t) { +function uX(r, e, t) { var n, i, a; r = Ma(r, 360), e = Ma(e, 100), t = Ma(t, 100); function o(l, c, f) { @@ -16571,7 +16583,7 @@ function Wk(r, e, t) { v: s }; } -function uX(r, e, t) { +function lX(r, e, t) { r = Ma(r, 360) * 6, e = Ma(e, 100), t = Ma(t, 100); var n = Math.floor(r), i = r - n, a = t * (1 - e), o = t * (1 - i * e), s = t * (1 - (1 - i) * e), u = n % 6, l = [t, o, a, a, s, t][u], c = [s, t, t, o, a, a][u], f = [a, a, s, t, t, o][u]; return { @@ -16584,7 +16596,7 @@ function Yk(r, e, t, n) { var i = [Sd(Math.round(r).toString(16)), Sd(Math.round(e).toString(16)), Sd(Math.round(t).toString(16))]; return n && 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[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join(""); } -function lX(r, e, t, n, i) { +function cX(r, e, t, n, i) { var a = [Sd(Math.round(r).toString(16)), Sd(Math.round(e).toString(16)), Sd(Math.round(t).toString(16)), Sd(B7(n))]; return i && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join(""); } @@ -16602,39 +16614,39 @@ dr.random = function() { b: Math.random() }); }; -function cX(r, e) { +function fX(r, e) { e = e === 0 ? 0 : e || 10; var t = dr(r).toHsl(); - return t.s -= e / 100, t.s = T2(t.s), dr(t); + return t.s -= e / 100, t.s = O2(t.s), dr(t); } -function fX(r, e) { +function dX(r, e) { e = e === 0 ? 0 : e || 10; var t = dr(r).toHsl(); - return t.s += e / 100, t.s = T2(t.s), dr(t); + return t.s += e / 100, t.s = O2(t.s), dr(t); } -function dX(r) { +function hX(r) { return dr(r).desaturate(100); } -function hX(r, e) { +function vX(r, e) { e = e === 0 ? 0 : e || 10; var t = dr(r).toHsl(); - return t.l += e / 100, t.l = T2(t.l), dr(t); + return t.l += e / 100, t.l = O2(t.l), dr(t); } -function vX(r, e) { +function pX(r, e) { e = e === 0 ? 0 : e || 10; var t = dr(r).toRgb(); return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), dr(t); } -function pX(r, e) { +function gX(r, e) { e = e === 0 ? 0 : e || 10; var t = dr(r).toHsl(); - return t.l -= e / 100, t.l = T2(t.l), dr(t); + return t.l -= e / 100, t.l = O2(t.l), dr(t); } -function gX(r, e) { +function yX(r, e) { var t = dr(r).toHsl(), n = (t.h + e) % 360; return t.h = n < 0 ? 360 + n : n, dr(t); } -function yX(r) { +function mX(r) { var e = dr(r).toHsl(); return e.h = (e.h + 180) % 360, dr(e); } @@ -16649,7 +16661,7 @@ function $k(r, e) { })); return n; } -function mX(r) { +function bX(r) { var e = dr(r).toHsl(), t = e.h; return [dr(r), dr({ h: (t + 72) % 360, @@ -16661,14 +16673,14 @@ function mX(r) { l: e.l })]; } -function bX(r, e, t) { +function _X(r, e, t) { e = e || 6, t = t || 30; var n = dr(r).toHsl(), i = 360 / t, a = [dr(r)]; for (n.h = (n.h - (i * e >> 1) + 720) % 360; --e; ) n.h = (n.h + i) % 360, a.push(dr(n)); return a; } -function _X(r, e) { +function wX(r, e) { e = e || 6; for (var t = dr(r).toHsv(), n = t.h, i = t.s, a = t.v, o = [], s = 1 / e; e--; ) o.push(dr({ @@ -16694,7 +16706,7 @@ dr.readability = function(r, e) { }; dr.isReadable = function(r, e, t) { var n = dr.readability(r, e), i, a; - switch (a = !1, i = TX(t), i.level + i.size) { + switch (a = !1, i = CX(t), i.level + i.size) { case "AAsmall": case "AAAlarge": a = n >= 4.5; @@ -16718,7 +16730,7 @@ dr.mostReadable = function(r, e, t) { size: u }) || !o ? n : (t.includeFallbackColors = !1, dr.mostReadable(r, ["#fff", "#000"], t)); }; -var sM = dr.names = { +var oM = dr.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", @@ -16868,8 +16880,8 @@ var sM = dr.names = { whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" -}, wX = dr.hexNames = xX(sM); -function xX(r) { +}, xX = dr.hexNames = EX(oM); +function EX(r) { var e = {}; for (var t in r) r.hasOwnProperty(t) && (e[r[t]] = t); @@ -16879,20 +16891,20 @@ function j7(r) { return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r; } function Ma(r, e) { - EX(r) && (r = "100%"); - var t = SX(r); + SX(r) && (r = "100%"); + var t = OX(r); return r = Math.min(e, Math.max(0, parseFloat(r))), t && (r = parseInt(r * e, 10) / 100), Math.abs(r - e) < 1e-6 ? 1 : r % e / parseFloat(e); } -function T2(r) { +function O2(r) { return Math.min(1, Math.max(0, r)); } function Jc(r) { return parseInt(r, 16); } -function EX(r) { +function SX(r) { return typeof r == "string" && r.indexOf(".") != -1 && parseFloat(r) === 1; } -function SX(r) { +function OX(r) { return typeof r == "string" && r.indexOf("%") != -1; } function Sd(r) { @@ -16926,11 +16938,11 @@ var md = (function() { function ev(r) { return !!md.CSS_UNIT.exec(r); } -function OX(r) { - r = r.replace(nX, "").replace(iX, "").toLowerCase(); +function TX(r) { + r = r.replace(iX, "").replace(aX, "").toLowerCase(); var e = !1; - if (sM[r]) - r = sM[r], e = !0; + if (oM[r]) + r = oM[r], e = !0; else if (r == "transparent") return { r: 0, @@ -16991,7 +17003,7 @@ function OX(r) { format: e ? "name" : "hex" } : !1; } -function TX(r) { +function CX(r) { var e, t; return r = r || { level: "AA", @@ -17001,18 +17013,18 @@ function TX(r) { size: t }; } -const CX = (r) => dr.mostReadable(r, [ +const AX = (r) => dr.mostReadable(r, [ Yu.theme.light.color.neutral.text.default, Yu.theme.light.color.neutral.text.inverse ], { includeFallbackColors: !0 -}).toString(), AX = (r) => dr(r).toHsl().l < 0.5 ? dr(r).lighten(10).toString() : dr(r).darken(10).toString(), RX = (r) => dr.mostReadable(r, [ +}).toString(), RX = (r) => dr(r).toHsl().l < 0.5 ? dr(r).lighten(10).toString() : dr(r).darken(10).toString(), PX = (r) => dr.mostReadable(r, [ Yu.theme.light.color.neutral.text.weakest, Yu.theme.light.color.neutral.text.weaker, Yu.theme.light.color.neutral.text.weak, Yu.theme.light.color.neutral.text.inverse ]).toString(); -var PX = function(r, e) { +var MX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17032,8 +17044,8 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 "ndl-right": r === "right" }); return Te.jsxs("div", Object.assign({ className: i }, n, { children: [Te.jsx("div", { className: "ndl-square-end-inner", style: { backgroundColor: e } }), Te.jsx("svg", { className: "ndl-square-end-active", width: "7", height: t + 6, preserveAspectRatio: "none", viewBox: "0 0 7 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 3.8774 2 C 3.2697 2 2.7917 2.248 2.3967 2.6605 C 1.928 3.1498 1.7993 3.8555 1.7993 4.5331 V 13.8775 V 25.4669 C 1.7993 26.1445 1.928 26.8502 2.3967 27.3395 C 2.7917 27.752 3.2697 28 3.8774 28 H 7 V 30 H 3.8774 C 2.6211 30 1.4369 29.4282 0.5895 28.4485 C 0.1462 27.936 0.0002 27.2467 0.0002 26.5691 L -0.0002 13.8775 L 0.0002 3.4309 C 0.0002 2.7533 0.1462 2.064 0.5895 1.5515 C 1.4368 0.5718 2.6211 0 3.8774 0 H 7 V 2 H 3.8774 Z" }) })] })); -}, MX = ({ height: r = 24 }) => Te.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: r + 6, preserveAspectRatio: "none", viewBox: "0 0 37 30", fill: "none", className: "ndl-relationship-label-lines", children: [Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 2 H 0 V 0 H 37 V 2 Z" }), Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 30 H 0 V 28 H 37 V 30 Z" })] }), dS = 200, Ax = (r) => { - var { type: e = "node", color: t, isDisabled: n = !1, isSelected: i = !1, as: a, onClick: o, className: s, style: u, children: l, htmlAttributes: c, isFluid: f = !1, size: d = "large", ref: h } = r, p = PX(r, ["type", "color", "isDisabled", "isSelected", "as", "onClick", "className", "style", "children", "htmlAttributes", "isFluid", "size", "ref"]); +}, DX = ({ height: r = 24 }) => Te.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: r + 6, preserveAspectRatio: "none", viewBox: "0 0 37 30", fill: "none", className: "ndl-relationship-label-lines", children: [Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 2 H 0 V 0 H 37 V 2 Z" }), Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 30 H 0 V 28 H 37 V 30 Z" })] }), fS = 200, Ax = (r) => { + var { type: e = "node", color: t, isDisabled: n = !1, isSelected: i = !1, as: a, onClick: o, className: s, style: u, children: l, htmlAttributes: c, isFluid: f = !1, size: d = "large", ref: h } = r, p = MX(r, ["type", "color", "isDisabled", "isSelected", "as", "onClick", "className", "style", "children", "htmlAttributes", "isFluid", "size", "ref"]); const [g, y] = me.useState(!1), b = (k) => { y(!0), c && c.onMouseEnter !== void 0 && c.onMouseEnter(k); }, _ = (k) => { @@ -17060,7 +17072,7 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 } return t; }, [t, e]); - const E = me.useMemo(() => AX(O || Yu.palette.lemon[40]), [O]), T = me.useMemo(() => CX(O || Yu.palette.lemon[40]), [O]), P = me.useMemo(() => RX(O || Yu.palette.lemon[40]), [O]); + const E = me.useMemo(() => RX(O || Yu.palette.lemon[40]), [O]), T = me.useMemo(() => AX(O || Yu.palette.lemon[40]), [O]), P = me.useMemo(() => PX(O || Yu.palette.lemon[40]), [O]); g && !n && (O = E); const I = Vn("ndl-graph-label", s, { "ndl-disabled": n, @@ -17070,7 +17082,7 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 }); if (e === "node") { const k = Vn("ndl-node-label", I); - return Te.jsx(m, Object.assign({ className: k, ref: h, style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : dS }, u) }, x && { + return Te.jsx(m, Object.assign({ className: k, ref: h, style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u) }, x && { disabled: n, onClick: S, onMouseEnter: b, @@ -17079,7 +17091,7 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 }, c, { children: Te.jsx("div", { className: "ndl-node-label-content", children: l }) })); } else if (e === "relationship" || e === "relationshipLeft" || e === "relationshipRight") { const k = Vn("ndl-relationship-label", I), L = d === "small" ? 20 : 24; - return Te.jsxs(m, Object.assign({ style: Object.assign(Object.assign({ maxWidth: f ? "100%" : dS }, u), { color: n ? P : T }), className: k }, x && { + return Te.jsxs(m, Object.assign({ style: Object.assign(Object.assign({ maxWidth: f ? "100%" : fS }, u), { color: n ? P : T }), className: k }, x && { disabled: n, onClick: S, onMouseEnter: b, @@ -17087,12 +17099,12 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 type: "button" }, { ref: h }, p, c, { children: [e === "relationshipLeft" || e === "relationship" ? Te.jsx(Zk, { direction: "left", color: O, height: L }) : Te.jsx(Qk, { direction: "left", color: O, height: L }), Te.jsxs("div", { className: "ndl-relationship-label-container", style: { backgroundColor: O - }, children: [Te.jsx("div", { className: "ndl-relationship-label-content", children: l }), Te.jsx(MX, { height: L })] }), e === "relationshipRight" || e === "relationship" ? Te.jsx(Zk, { direction: "right", color: O, height: L }) : Te.jsx(Qk, { direction: "right", color: O, height: L })] })); + }, children: [Te.jsx("div", { className: "ndl-relationship-label-content", children: l }), Te.jsx(DX, { height: L })] }), e === "relationshipRight" || e === "relationship" ? Te.jsx(Zk, { direction: "right", color: O, height: L }) : Te.jsx(Qk, { direction: "right", color: O, height: L })] })); } else { const k = Vn("ndl-property-key-label", I); return Te.jsx(m, Object.assign({}, x && { type: "button" - }, { style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : dS }, u), className: k, onClick: S, onMouseEnter: b, onMouseLeave: _, ref: h }, c, { children: Te.jsx("div", { className: "ndl-property-key-label-content", children: l }) })); + }, { style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u), className: k, onClick: S, onMouseEnter: b, onMouseLeave: _, ref: h }, c, { children: Te.jsx("div", { className: "ndl-property-key-label-content", children: l }) })); } }; var Bo = function() { @@ -17120,7 +17132,7 @@ var Bo = function() { height: "20px", position: "absolute", zIndex: 1 -}, DX = { +}, kX = { top: Bo(Bo({}, Jk), { top: "-5px" }), right: Bo(Bo({}, eI), { left: void 0, right: "-5px" }), bottom: Bo(Bo({}, Jk), { top: void 0, bottom: "-5px" }), @@ -17129,16 +17141,16 @@ var Bo = function() { bottomRight: Bo(Bo({}, ow), { right: "-10px", bottom: "-10px", cursor: "se-resize" }), bottomLeft: Bo(Bo({}, ow), { left: "-10px", bottom: "-10px", cursor: "sw-resize" }), topLeft: Bo(Bo({}, ow), { left: "-10px", top: "-10px", cursor: "nw-resize" }) -}, kX = me.memo(function(r) { +}, IX = me.memo(function(r) { var e = r.onResizeStart, t = r.direction, n = r.children, i = r.replaceStyles, a = r.className, o = me.useCallback(function(l) { e(l, t); }, [e, t]), s = me.useCallback(function(l) { e(l, t); }, [e, t]), u = me.useMemo(function() { - return Bo(Bo({ position: "absolute", userSelect: "none" }, DX[t]), i ?? {}); + return Bo(Bo({ position: "absolute", userSelect: "none" }, kX[t]), i ?? {}); }, [i, t]); return Te.jsx("div", { className: a || void 0, style: u, onMouseDown: o, onTouchStart: s, children: n }); -}), IX = /* @__PURE__ */ (function() { +}), NX = /* @__PURE__ */ (function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { n.__proto__ = i; @@ -17163,7 +17175,7 @@ var Bo = function() { } return r; }, gh.apply(this, arguments); -}, NX = { +}, LX = { width: "auto", height: "auto" }, sw = function(r, e, t) { @@ -17175,7 +17187,7 @@ var Bo = function() { return new RegExp(r, "i").test(e); }, uw = function(r) { return !!(r.touches && r.touches.length); -}, LX = function(r) { +}, jX = function(r) { return !!((r.clientX || r.clientX === 0) && (r.clientY || r.clientY === 0)); }, rI = function(r, e, t) { t === void 0 && (t = 0); @@ -17183,7 +17195,7 @@ var Bo = function() { return Math.abs(o - r) < Math.abs(e[a] - r) ? s : a; }, 0), i = Math.abs(e[n] - r); return t === 0 || i < t ? e[n] : r; -}, hS = function(r) { +}, dS = function(r) { return r = r.toString(), r === "auto" || r.endsWith("px") || r.endsWith("%") || r.endsWith("vh") || r.endsWith("vw") || r.endsWith("vmax") || r.endsWith("vmin") ? r : "".concat(r, "px"); }, lw = function(r, e, t, n) { if (r && typeof r == "string") { @@ -17203,16 +17215,16 @@ var Bo = function() { } } return r; -}, jX = function(r, e, t, n, i, a, o) { +}, BX = function(r, e, t, n, i, a, o) { return n = lw(n, r.width, e, t), i = lw(i, r.height, e, t), a = lw(a, r.width, e, t), o = lw(o, r.height, e, t), { maxWidth: typeof n > "u" ? void 0 : Number(n), maxHeight: typeof i > "u" ? void 0 : Number(i), minWidth: typeof a > "u" ? void 0 : Number(a), minHeight: typeof o > "u" ? void 0 : Number(o) }; -}, BX = function(r) { +}, FX = function(r) { return Array.isArray(r) ? r : [r, r]; -}, FX = [ +}, UX = [ "as", "ref", "style", @@ -17244,10 +17256,10 @@ var Bo = function() { "scale", "resizeRatio", "snapGap" -], nI = "__resizable_base__", UX = ( +], nI = "__resizable_base__", zX = ( /** @class */ (function(r) { - IX(e, r); + NX(e, r); function e(t) { var n, i, a, o, s = r.call(this, t) || this; return s.ratio = 1, s.resizable = null, s.parentLeft = 0, s.parentTop = 0, s.resizableLeft = 0, s.resizableRight = 0, s.resizableTop = 0, s.resizableBottom = 0, s.targetLeft = 0, s.targetTop = 0, s.delta = { @@ -17305,7 +17317,7 @@ var Bo = function() { configurable: !0 }), Object.defineProperty(e.prototype, "propsSize", { get: function() { - return this.props.size || this.props.defaultSize || NX; + return this.props.size || this.props.defaultSize || LX; }, enumerable: !1, configurable: !0 @@ -17332,8 +17344,8 @@ var Bo = function() { var l = t.getParentSize(), c = Number(t.state[s].toString().replace("px", "")), f = c / l[s] * 100; return "".concat(f, "%"); } - return hS(t.state[s]); - }, a = n && typeof n.width < "u" && !this.state.isResizing ? hS(n.width) : i("width"), o = n && typeof n.height < "u" && !this.state.isResizing ? hS(n.height) : i("height"); + return dS(t.state[s]); + }, a = n && typeof n.width < "u" && !this.state.isResizing ? dS(n.width) : i("width"), o = n && typeof n.height < "u" && !this.state.isResizing ? dS(n.height) : i("height"); return { width: a, height: o }; }, enumerable: !1, @@ -17380,7 +17392,7 @@ var Bo = function() { } else this.props.bounds === "window" ? this.window && (u = o ? this.resizableRight : this.window.innerWidth - this.resizableLeft, l = s ? this.resizableBottom : this.window.innerHeight - this.resizableTop) : this.props.bounds && (u = o ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft), l = s ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop)); return u && Number.isFinite(u) && (t = t && t < u ? t : u), l && Number.isFinite(l) && (n = n && n < l ? n : l), { maxWidth: t, maxHeight: n }; }, e.prototype.calculateNewSizeFromDirection = function(t, n) { - var i = this.props.scale || 1, a = BX(this.props.resizeRatio || 1), o = a[0], s = a[1], u = this.state, l = u.direction, c = u.original, f = this.props, d = f.lockAspectRatio, h = f.lockAspectRatioExtraHeight, p = f.lockAspectRatioExtraWidth, g = c.width, y = c.height, b = h || 0, _ = p || 0; + var i = this.props.scale || 1, a = FX(this.props.resizeRatio || 1), o = a[0], s = a[1], u = this.state, l = u.direction, c = u.original, f = this.props, d = f.lockAspectRatio, h = f.lockAspectRatioExtraHeight, p = f.lockAspectRatioExtraWidth, g = c.width, y = c.height, b = h || 0, _ = p || 0; return Xy("right", l) && (g = c.width + (t - c.x) * o / i, d && (y = (g - _) / this.ratio + b)), Xy("left", l) && (g = c.width - (t - c.x) * o / i, d && (y = (g - _) / this.ratio + b)), Xy("bottom", l) && (y = c.height + (n - c.y) * s / i, d && (g = (y - b) * this.ratio + _)), Xy("top", l) && (y = c.height - (n - c.y) * s / i, d && (g = (y - b) * this.ratio + _)), { newWidth: g, newHeight: y }; }, e.prototype.calculateNewSizeFromAspectRatio = function(t, n, i, a) { var o = this.props, s = o.lockAspectRatio, u = o.lockAspectRatioExtraHeight, l = o.lockAspectRatioExtraWidth, c = typeof a.width > "u" ? 10 : a.width, f = typeof i.width > "u" || i.width < 0 ? t : i.width, d = typeof a.height > "u" ? 10 : a.height, h = typeof i.height > "u" || i.height < 0 ? n : i.height, p = u || 0, g = l || 0; @@ -17410,7 +17422,7 @@ var Bo = function() { }, e.prototype.onResizeStart = function(t, n) { if (!(!this.resizable || !this.window)) { var i = 0, a = 0; - if (t.nativeEvent && LX(t.nativeEvent) ? (i = t.nativeEvent.clientX, a = t.nativeEvent.clientY) : t.nativeEvent && uw(t.nativeEvent) && (i = t.nativeEvent.touches[0].clientX, a = t.nativeEvent.touches[0].clientY), this.props.onResizeStart && this.resizable) { + if (t.nativeEvent && jX(t.nativeEvent) ? (i = t.nativeEvent.clientX, a = t.nativeEvent.clientY) : t.nativeEvent && uw(t.nativeEvent) && (i = t.nativeEvent.touches[0].clientX, a = t.nativeEvent.touches[0].clientY), this.props.onResizeStart && this.resizable) { var o = this.props.onResizeStart(t, n, this.resizable); if (o === !1) return; @@ -17447,7 +17459,7 @@ var Bo = function() { t.preventDefault(), t.stopPropagation(); } catch { } - var i = this.props, a = i.maxWidth, o = i.maxHeight, s = i.minWidth, u = i.minHeight, l = uw(t) ? t.touches[0].clientX : t.clientX, c = uw(t) ? t.touches[0].clientY : t.clientY, f = this.state, d = f.direction, h = f.original, p = f.width, g = f.height, y = this.getParentSize(), b = jX(y, this.window.innerWidth, this.window.innerHeight, a, o, s, u); + var i = this.props, a = i.maxWidth, o = i.maxHeight, s = i.minWidth, u = i.minHeight, l = uw(t) ? t.touches[0].clientX : t.clientX, c = uw(t) ? t.touches[0].clientY : t.clientY, f = this.state, d = f.direction, h = f.original, p = f.width, g = f.height, y = this.getParentSize(), b = BX(y, this.window.innerWidth, this.window.innerHeight, a, o, s, u); a = b.maxWidth, o = b.maxHeight, s = b.minWidth, u = b.minHeight; var _ = this.calculateNewSizeFromDirection(l, c), m = _.newHeight, x = _.newWidth, S = this.calculateNewMaxFromBoundary(a, o); this.props.snap && this.props.snap.x && (x = rI(x, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (m = rI(m, this.props.snap.y, this.props.snapGap)); @@ -17508,12 +17520,12 @@ var Bo = function() { if (!i) return null; var c = Object.keys(i).map(function(f) { - return i[f] !== !1 ? Te.jsx(kX, { direction: f, onResizeStart: t.onResizeStart, replaceStyles: a && a[f], className: o && o[f], children: l && l[f] ? l[f] : null }, f) : null; + return i[f] !== !1 ? Te.jsx(IX, { direction: f, onResizeStart: t.onResizeStart, replaceStyles: a && a[f], className: o && o[f], children: l && l[f] ? l[f] : null }, f) : null; }); return Te.jsx("div", { className: u, style: s, children: c }); }, e.prototype.render = function() { var t = this, n = Object.keys(this.props).reduce(function(o, s) { - return FX.indexOf(s) !== -1 || (o[s] = t.props[s]), o; + return UX.indexOf(s) !== -1 || (o[s] = t.props[s]), o; }, {}), i = gh(gh(gh({ position: "relative", userSelect: this.state.isResizing ? "none" : "auto" }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: "border-box", flexShrink: 0 }); this.state.flexBasis && (i.flexBasis = this.state.flexBasis); var a = this.props.as || "div"; @@ -17554,7 +17566,7 @@ var Bo = function() { snapGap: 0 }, e; })(me.PureComponent) -), zX = function(r, e) { +), qX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17562,7 +17574,7 @@ var Bo = function() { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const C2 = (r) => { +const T2 = (r) => { var { children: e, as: t, @@ -17580,10 +17592,10 @@ const C2 = (r) => { htmlAttributes: h, onClick: p, ref: g - } = r, y = zX(r, ["children", "as", "isLoading", "isDisabled", "size", "isFloating", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); + } = r, y = qX(r, ["children", "as", "isLoading", "isDisabled", "size", "isFloating", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); return Te.jsx(D7, Object.assign({ as: t, iconButtonVariant: "default", isDisabled: i, size: a, isLoading: n, isActive: s, isFloating: o, description: l, tooltipProps: c, className: f, style: d, variant: u, htmlAttributes: h, onClick: p, ref: g }, y, { children: e })); }; -var qX = function(r, e) { +var GX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17591,8 +17603,8 @@ var qX = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const GX = (r) => { - var { description: e, actionFeedbackText: t, icon: n, children: i, onClick: a, htmlAttributes: o, tooltipProps: s, type: u = "clean-icon-button" } = r, l = qX(r, ["description", "actionFeedbackText", "icon", "children", "onClick", "htmlAttributes", "tooltipProps", "type"]); +const VX = (r) => { + var { description: e, actionFeedbackText: t, icon: n, children: i, onClick: a, htmlAttributes: o, tooltipProps: s, type: u = "clean-icon-button" } = r, l = GX(r, ["description", "actionFeedbackText", "icon", "children", "onClick", "htmlAttributes", "tooltipProps", "type"]); const [c, f] = ao.useState(null), [d, h] = ao.useState(!1), p = () => { c !== null && clearTimeout(c); const _ = window.setTimeout(() => { @@ -17605,7 +17617,7 @@ const GX = (r) => { h(!0); }, b = c === null ? e : t; if (u === "clean-icon-button") - return Te.jsx(O2, Object.assign({}, l.cleanIconButtonProps, { description: b, tooltipProps: { + return Te.jsx(S2, Object.assign({}, l.cleanIconButtonProps, { description: b, tooltipProps: { root: Object.assign(Object.assign({}, s), { isOpen: d || c !== null }), trigger: { htmlAttributes: { @@ -17619,7 +17631,7 @@ const GX = (r) => { a && a(_), p(); }, className: l.className, htmlAttributes: o, children: n })); if (u === "icon-button") - return Te.jsx(C2, Object.assign({}, l.iconButtonProps, { description: b, tooltipProps: { + return Te.jsx(T2, Object.assign({}, l.iconButtonProps, { description: b, tooltipProps: { root: Object.assign(Object.assign({}, s), { isOpen: d || c !== null }), trigger: { htmlAttributes: { @@ -17642,11 +17654,11 @@ const GX = (r) => { onFocus: y, onMouseEnter: y, onMouseLeave: g - }, children: Te.jsx(QY, Object.assign({ variant: "neutral" }, l.buttonProps, { onClick: (_) => { + }, children: Te.jsx(JY, Object.assign({ variant: "neutral" }, l.buttonProps, { onClick: (_) => { a && a(_), p(); }, leadingVisual: n, className: l.className, htmlAttributes: o, children: i })) }), Te.jsx(Bf.Content, { children: b })] })); }, F7 = ({ textToCopy: r, isDisabled: e, size: t, tooltipProps: n, htmlAttributes: i, type: a }) => { - const [, o] = rX(), l = a === "outlined-button" ? { + const [, o] = nX(), l = a === "outlined-button" ? { outlinedButtonProps: { isDisabled: e, size: t @@ -17667,9 +17679,9 @@ const GX = (r) => { }, type: "clean-icon-button" }; - return Te.jsx(GX, Object.assign({ onClick: () => o(r), description: "Copy to clipboard", actionFeedbackText: "Copied" }, l, { tooltipProps: n, className: "n-gap-token-8", icon: Te.jsx(iH, { className: "ndl-icon-svg" }), htmlAttributes: Object.assign({ "aria-live": "polite" }, i), children: a === "outlined-button" && "Copy" })); + return Te.jsx(VX, Object.assign({ onClick: () => o(r), description: "Copy to clipboard", actionFeedbackText: "Copied" }, l, { tooltipProps: n, className: "n-gap-token-8", icon: Te.jsx(iH, { className: "ndl-icon-svg" }), htmlAttributes: Object.assign({ "aria-live": "polite" }, i), children: a === "outlined-button" && "Copy" })); }; -var VX = function(r, e) { +var HX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17679,15 +17691,15 @@ var VX = function(r, e) { }; const U7 = ({ children: r }) => Te.jsx(Te.Fragment, { children: r }); U7.displayName = "CollapsibleButtonWrapper"; -const HX = (r) => { - var { children: e, as: t, isFloating: n = !1, orientation: i = "horizontal", size: a = "medium", className: o, style: s, htmlAttributes: u, ref: l } = r, c = VX(r, ["children", "as", "isFloating", "orientation", "size", "className", "style", "htmlAttributes", "ref"]); +const WX = (r) => { + var { children: e, as: t, isFloating: n = !1, orientation: i = "horizontal", size: a = "medium", className: o, style: s, htmlAttributes: u, ref: l } = r, c = HX(r, ["children", "as", "isFloating", "orientation", "size", "className", "style", "htmlAttributes", "ref"]); const [f, d] = ao.useState(!0), h = Vn("ndl-icon-btn-array", o, { "ndl-array-floating": n, "ndl-col": i === "vertical", "ndl-row": i === "horizontal", [`ndl-${a}`]: a }), p = t || "div", g = ao.Children.toArray(e), y = g.filter((x) => !ao.isValidElement(x) || x.type.displayName !== "CollapsibleButtonWrapper"), b = g.find((x) => ao.isValidElement(x) && x.type.displayName === "CollapsibleButtonWrapper"), _ = b ? b.props.children : null, m = () => i === "horizontal" ? f ? Te.jsx(V9, {}) : Te.jsx(FV, {}) : f ? Te.jsx(G9, {}) : Te.jsx(VV, {}); - return Te.jsxs(p, Object.assign({ role: "group", className: h, ref: l, style: s }, c, u, { children: [y, _ && Te.jsxs(Te.Fragment, { children: [!f && _, Te.jsx(O2, { onClick: () => { + return Te.jsxs(p, Object.assign({ role: "group", className: h, ref: l, style: s }, c, u, { children: [y, _ && Te.jsxs(Te.Fragment, { children: [!f && _, Te.jsx(S2, { onClick: () => { d((x) => !x); }, size: a, description: f ? "Show more" : "Show less", tooltipProps: { root: { @@ -17696,7 +17708,7 @@ const HX = (r) => { }, htmlAttributes: { "aria-expanded": !f }, children: m() })] })] })); -}, WX = Object.assign(HX, { +}, YX = Object.assign(WX, { CollapsibleButtonWrapper: U7 }); function z7() { @@ -17705,7 +17717,7 @@ function z7() { const r = window.navigator.userAgent.toLowerCase(); return r.includes("mac") ? "mac" : r.includes("win") ? "windows" : "linux"; } -function YX(r = z7()) { +function XX(r = z7()) { return { alt: r === "mac" ? "⌥" : "alt", capslock: "⇪", @@ -17728,7 +17740,7 @@ function YX(r = z7()) { up: "↑" }; } -function XX(r = z7()) { +function $X(r = z7()) { return { alt: "Alt", capslock: "Caps Lock", @@ -17751,7 +17763,7 @@ function XX(r = z7()) { up: "Up" }; } -var $X = function(r, e) { +var KX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17759,17 +17771,17 @@ var $X = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const KX = (r) => { - var { modifierKeys: e, keys: t, os: n, as: i, className: a, style: o, htmlAttributes: s, ref: u } = r, l = $X(r, ["modifierKeys", "keys", "os", "as", "className", "style", "htmlAttributes", "ref"]); +const ZX = (r) => { + var { modifierKeys: e, keys: t, os: n, as: i, className: a, style: o, htmlAttributes: s, ref: u } = r, l = KX(r, ["modifierKeys", "keys", "os", "as", "className", "style", "htmlAttributes", "ref"]); const c = i ?? "span", f = me.useMemo(() => { if (e === void 0) return null; - const p = YX(n), g = XX(n); + const p = XX(n), g = $X(n); return e == null ? void 0 : e.map((y) => Te.jsx("abbr", { className: "ndl-kbd-key", title: g[y], children: p[y] }, y)); }, [e, n]), d = me.useMemo(() => t === void 0 ? null : t == null ? void 0 : t.map((p, g) => g === 0 ? Te.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString()) : Te.jsxs(Te.Fragment, { children: [Te.jsx("span", { className: "ndl-kbd-then", children: "Then" }), Te.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString())] })), [t]), h = Vn("ndl-kbd", a); return Te.jsxs(c, Object.assign({ className: h, style: o, ref: u }, l, s, { children: [f, d] })); }; -var ZX = function(r, e) { +var QX = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -17778,7 +17790,7 @@ var ZX = function(r, e) { return t; }; const q7 = (r) => { - var { children: e, size: t = "medium", isDisabled: n = !1, isLoading: i = !1, isOpen: a = !1, className: o, description: s, tooltipProps: u, onClick: l, style: c, htmlAttributes: f, ref: d } = r, h = ZX(r, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref"]); + var { children: e, size: t = "medium", isDisabled: n = !1, isLoading: i = !1, isOpen: a = !1, className: o, description: s, tooltipProps: u, onClick: l, style: c, htmlAttributes: f, ref: d } = r, h = QX(r, ["children", "size", "isDisabled", "isLoading", "isOpen", "className", "description", "tooltipProps", "onClick", "style", "htmlAttributes", "ref"]); const p = Vn("ndl-select-icon-btn", o, { "ndl-active": a, "ndl-disabled": n, @@ -17799,28 +17811,28 @@ const q7 = (r) => { }) })] })) })), Te.jsx(Bf.Content, Object.assign({}, u == null ? void 0 : u.content, { children: s }))] })); }; -function uM(r, e) { +function sM(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function QX(r) { +function JX(r) { if (Array.isArray(r)) return r; } -function JX(r) { - if (Array.isArray(r)) return uM(r); +function e$(r) { + if (Array.isArray(r)) return sM(r); } function zp(r, e) { if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function"); } -function e$(r, e) { +function t$(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, V7(n.key), n); } } function qp(r, e, t) { - return e && e$(r.prototype, e), Object.defineProperty(r, "prototype", { + return e && t$(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; } @@ -17879,10 +17891,10 @@ function G7(r, e, t) { writable: !0 }) : r[e] = t, r; } -function t$(r) { +function r$(r) { if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r); } -function r$(r, e) { +function n$(r, e) { var t = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (t != null) { var n, i, a, o, s = [], u = !0, l = !1; @@ -17903,21 +17915,21 @@ function r$(r, e) { return s; } } -function n$() { +function i$() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } -function i$() { +function a$() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function Uo(r, e) { - return QX(r) || r$(r, e) || U5(r, e) || n$(); + return JX(r) || n$(r, e) || U5(r, e) || i$(); } function Rx(r) { - return JX(r) || t$(r) || U5(r) || i$(); + return e$(r) || r$(r) || U5(r) || a$(); } -function a$(r, e) { +function o$(r, e) { if (typeof r != "object" || !r) return r; var t = r[Symbol.toPrimitive]; if (t !== void 0) { @@ -17928,7 +17940,7 @@ function a$(r, e) { return String(r); } function V7(r) { - var e = a$(r, "string"); + var e = o$(r, "string"); return typeof e == "symbol" ? e : e + ""; } function ls(r) { @@ -17941,32 +17953,32 @@ function ls(r) { } function U5(r, e) { if (r) { - if (typeof r == "string") return uM(r, e); + if (typeof r == "string") return sM(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? uM(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? sM(r, e) : void 0; } } var ss = typeof window > "u" ? null : window, iI = ss ? ss.navigator : null; ss && ss.document; -var o$ = ls(""), H7 = ls({}), s$ = ls(function() { -}), u$ = typeof HTMLElement > "u" ? "undefined" : ls(HTMLElement), V1 = function(e) { +var s$ = ls(""), H7 = ls({}), u$ = ls(function() { +}), l$ = typeof HTMLElement > "u" ? "undefined" : ls(HTMLElement), V1 = function(e) { return e && e.instanceString && Ya(e.instanceString) ? e.instanceString() : null; }, Ar = function(e) { - return e != null && ls(e) == o$; + return e != null && ls(e) == s$; }, Ya = function(e) { - return e != null && ls(e) === s$; + return e != null && ls(e) === u$; }, ra = function(e) { return !rf(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array); }, ai = function(e) { return e != null && ls(e) === H7 && !ra(e) && e.constructor === Object; -}, l$ = function(e) { +}, c$ = function(e) { return e != null && ls(e) === H7; }, Ht = function(e) { return e != null && ls(e) === ls(1) && !isNaN(e); -}, c$ = function(e) { +}, f$ = function(e) { return Ht(e) && Math.floor(e) === e; }, Px = function(e) { - if (u$ !== "undefined") + if (l$ !== "undefined") return e != null && e instanceof HTMLElement; }, rf = function(e) { return H1(e) || W7(e); @@ -17978,17 +17990,17 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { return V1(e) === "core"; }, Y7 = function(e) { return V1(e) === "stylesheet"; -}, f$ = function(e) { +}, d$ = function(e) { return V1(e) === "event"; }, Rp = function(e) { return e == null ? !0 : !!(e === "" || e.match(/^\s+$/)); -}, d$ = function(e) { - return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, h$ = function(e) { - return ai(e) && Ht(e.x1) && Ht(e.x2) && Ht(e.y1) && Ht(e.y2); + return typeof HTMLElement > "u" ? !1 : e instanceof HTMLElement; }, v$ = function(e) { - return l$(e) && Ya(e.then); -}, p$ = function() { + return ai(e) && Ht(e.x1) && Ht(e.x2) && Ht(e.y1) && Ht(e.y2); +}, p$ = function(e) { + return c$(e) && Ya(e.then); +}, g$ = function() { return iI && iI.userAgent.match(/msie|trident|edge/i); }, jm = function(e, t) { t || (t = function() { @@ -18009,7 +18021,7 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { return r.replace(/([A-Z])/g, function(e) { return "-" + e.toLowerCase(); }); -}), A2 = jm(function(r) { +}), C2 = jm(function(r) { return r.replace(/(-\w)/g, function(e) { return e[1].toUpperCase(); }); @@ -18021,9 +18033,9 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { return Rp(e) ? e : e.charAt(0).toUpperCase() + e.substring(1); }, vp = function(e, t) { return e.slice(-1 * t.length) === t; -}, us = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", g$ = "rgb[a]?\\((" + us + "[%]?)\\s*,\\s*(" + us + "[%]?)\\s*,\\s*(" + us + "[%]?)(?:\\s*,\\s*(" + us + "))?\\)", y$ = "rgb[a]?\\((?:" + us + "[%]?)\\s*,\\s*(?:" + us + "[%]?)\\s*,\\s*(?:" + us + "[%]?)(?:\\s*,\\s*(?:" + us + "))?\\)", m$ = "hsl[a]?\\((" + us + ")\\s*,\\s*(" + us + "[%])\\s*,\\s*(" + us + "[%])(?:\\s*,\\s*(" + us + "))?\\)", b$ = "hsl[a]?\\((?:" + us + ")\\s*,\\s*(?:" + us + "[%])\\s*,\\s*(?:" + us + "[%])(?:\\s*,\\s*(?:" + us + "))?\\)", _$ = "\\#[0-9a-fA-F]{3}", w$ = "\\#[0-9a-fA-F]{6}", $7 = function(e, t) { +}, us = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", y$ = "rgb[a]?\\((" + us + "[%]?)\\s*,\\s*(" + us + "[%]?)\\s*,\\s*(" + us + "[%]?)(?:\\s*,\\s*(" + us + "))?\\)", m$ = "rgb[a]?\\((?:" + us + "[%]?)\\s*,\\s*(?:" + us + "[%]?)\\s*,\\s*(?:" + us + "[%]?)(?:\\s*,\\s*(?:" + us + "))?\\)", b$ = "hsl[a]?\\((" + us + ")\\s*,\\s*(" + us + "[%])\\s*,\\s*(" + us + "[%])(?:\\s*,\\s*(" + us + "))?\\)", _$ = "hsl[a]?\\((?:" + us + ")\\s*,\\s*(?:" + us + "[%])\\s*,\\s*(?:" + us + "[%])(?:\\s*,\\s*(?:" + us + "))?\\)", w$ = "\\#[0-9a-fA-F]{3}", x$ = "\\#[0-9a-fA-F]{6}", $7 = function(e, t) { return e < t ? -1 : e > t ? 1 : 0; -}, x$ = function(e, t) { +}, E$ = function(e, t) { return -1 * $7(e, t); }, kr = Object.assign != null ? Object.assign.bind(Object) : function(r) { for (var e = arguments, t = 1; t < e.length; t++) { @@ -18035,17 +18047,17 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { } } return r; -}, E$ = function(e) { +}, S$ = function(e) { if (!(!(e.length === 4 || e.length === 7) || e[0] !== "#")) { var t = e.length === 4, n, i, a, o = 16; return t ? (n = parseInt(e[1] + e[1], o), i = parseInt(e[2] + e[2], o), a = parseInt(e[3] + e[3], o)) : (n = parseInt(e[1] + e[2], o), i = parseInt(e[3] + e[4], o), a = parseInt(e[5] + e[6], o)), [n, i, a]; } -}, S$ = function(e) { +}, O$ = function(e) { var t, n, i, a, o, s, u, l; function c(p, g, y) { return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? p + (g - p) * 6 * y : y < 1 / 2 ? g : y < 2 / 3 ? p + (g - p) * (2 / 3 - y) * 6 : p; } - var f = new RegExp("^" + m$ + "$").exec(e); + var f = new RegExp("^" + b$ + "$").exec(e); if (f) { if (n = parseInt(f[1]), n < 0 ? n = (360 - -1 * n % 360) % 360 : n > 360 && (n = n % 360), n /= 360, i = parseFloat(f[2]), i < 0 || i > 100 || (i = i / 100, a = parseFloat(f[3]), a < 0 || a > 100) || (a = a / 100, o = f[4], o !== void 0 && (o = parseFloat(o), o < 0 || o > 1))) return; @@ -18058,8 +18070,8 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { t = [s, u, l, o]; } return t; -}, O$ = function(e) { - var t, n = new RegExp("^" + g$ + "$").exec(e); +}, T$ = function(e) { + var t, n = new RegExp("^" + y$ + "$").exec(e); if (n) { t = []; for (var i = [], a = 1; a <= 3; a++) { @@ -18079,11 +18091,11 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { } } return t; -}, T$ = function(e) { - return C$[e.toLowerCase()]; +}, C$ = function(e) { + return A$[e.toLowerCase()]; }, K7 = function(e) { - return (ra(e) ? e : null) || T$(e) || E$(e) || O$(e) || S$(e); -}, C$ = { + return (ra(e) ? e : null) || C$(e) || S$(e) || T$(e) || O$(e); +}, A$ = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 @@ -18255,42 +18267,42 @@ var o$ = ls(""), H7 = ls({}), s$ = ls(function() { function W1(r) { return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r; } -var vS, oI; +var hS, oI; function Y1() { - if (oI) return vS; + if (oI) return hS; oI = 1; function r(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } - return vS = r, vS; + return hS = r, hS; } -var pS, sI; -function A$() { - if (sI) return pS; +var vS, sI; +function R$() { + if (sI) return vS; sI = 1; var r = typeof cw == "object" && cw && cw.Object === Object && cw; - return pS = r, pS; + return vS = r, vS; } -var gS, uI; -function R2() { - if (uI) return gS; +var pS, uI; +function A2() { + if (uI) return pS; uI = 1; - var r = A$(), e = typeof self == "object" && self && self.Object === Object && self, t = r || e || Function("return this")(); - return gS = t, gS; + var r = R$(), e = typeof self == "object" && self && self.Object === Object && self, t = r || e || Function("return this")(); + return pS = t, pS; } -var yS, lI; -function R$() { - if (lI) return yS; +var gS, lI; +function P$() { + if (lI) return gS; lI = 1; - var r = R2(), e = function() { + var r = A2(), e = function() { return r.Date.now(); }; - return yS = e, yS; + return gS = e, gS; } -var mS, cI; -function P$() { - if (cI) return mS; +var yS, cI; +function M$() { + if (cI) return yS; cI = 1; var r = /\s/; function e(t) { @@ -18298,28 +18310,28 @@ function P$() { ; return n; } - return mS = e, mS; + return yS = e, yS; } -var bS, fI; -function M$() { - if (fI) return bS; +var mS, fI; +function D$() { + if (fI) return mS; fI = 1; - var r = P$(), e = /^\s+/; + var r = M$(), e = /^\s+/; function t(n) { return n && n.slice(0, r(n) + 1).replace(e, ""); } - return bS = t, bS; + return mS = t, mS; } -var _S, dI; +var bS, dI; function G5() { - if (dI) return _S; + if (dI) return bS; dI = 1; - var r = R2(), e = r.Symbol; - return _S = e, _S; + var r = A2(), e = r.Symbol; + return bS = e, bS; } -var wS, hI; -function D$() { - if (hI) return wS; +var _S, hI; +function k$() { + if (hI) return _S; hI = 1; var r = G5(), e = Object.prototype, t = e.hasOwnProperty, n = e.toString, i = r ? r.toStringTag : void 0; function a(o) { @@ -18332,52 +18344,52 @@ function D$() { var c = n.call(o); return l && (s ? o[i] = u : delete o[i]), c; } - return wS = a, wS; + return _S = a, _S; } -var xS, vI; -function k$() { - if (vI) return xS; +var wS, vI; +function I$() { + if (vI) return wS; vI = 1; var r = Object.prototype, e = r.toString; function t(n) { return e.call(n); } - return xS = t, xS; + return wS = t, wS; } -var ES, pI; +var xS, pI; function J7() { - if (pI) return ES; + if (pI) return xS; pI = 1; - var r = G5(), e = D$(), t = k$(), n = "[object Null]", i = "[object Undefined]", a = r ? r.toStringTag : void 0; + var r = G5(), e = k$(), t = I$(), n = "[object Null]", i = "[object Undefined]", a = r ? r.toStringTag : void 0; function o(s) { return s == null ? s === void 0 ? i : n : a && a in Object(s) ? e(s) : t(s); } - return ES = o, ES; + return xS = o, xS; } -var SS, gI; -function I$() { - if (gI) return SS; +var ES, gI; +function N$() { + if (gI) return ES; gI = 1; function r(e) { return e != null && typeof e == "object"; } - return SS = r, SS; + return ES = r, ES; } -var OS, yI; +var SS, yI; function X1() { - if (yI) return OS; + if (yI) return SS; yI = 1; - var r = J7(), e = I$(), t = "[object Symbol]"; + var r = J7(), e = N$(), t = "[object Symbol]"; function n(i) { return typeof i == "symbol" || e(i) && r(i) == t; } - return OS = n, OS; + return SS = n, SS; } -var TS, mI; -function N$() { - if (mI) return TS; +var OS, mI; +function L$() { + if (mI) return OS; mI = 1; - var r = M$(), e = Y1(), t = X1(), n = NaN, i = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, o = /^0o[0-7]+$/i, s = parseInt; + var r = D$(), e = Y1(), t = X1(), n = NaN, i = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, o = /^0o[0-7]+$/i, s = parseInt; function u(l) { if (typeof l == "number") return l; @@ -18393,13 +18405,13 @@ function N$() { var f = a.test(l); return f || o.test(l) ? s(l.slice(2), f ? 2 : 8) : i.test(l) ? n : +l; } - return TS = u, TS; + return OS = u, OS; } -var CS, bI; -function L$() { - if (bI) return CS; +var TS, bI; +function j$() { + if (bI) return TS; bI = 1; - var r = Y1(), e = R$(), t = N$(), n = "Expected a function", i = Math.max, a = Math.min; + var r = Y1(), e = P$(), t = L$(), n = "Expected a function", i = Math.max, a = Math.min; function o(s, u, l) { var c, f, d, h, p, g, y = 0, b = !1, _ = !1, m = !0; if (typeof s != "function") @@ -18447,13 +18459,13 @@ function L$() { } return L.cancel = I, L.flush = k, L; } - return CS = o, CS; + return TS = o, TS; } -var j$ = L$(), $1 = /* @__PURE__ */ W1(j$), AS = ss ? ss.performance : null, eF = AS && AS.now ? function() { - return AS.now(); +var B$ = j$(), $1 = /* @__PURE__ */ W1(B$), CS = ss ? ss.performance : null, eF = CS && CS.now ? function() { + return CS.now(); } : function() { return Date.now(); -}, B$ = (function() { +}, F$ = (function() { if (ss) { if (ss.requestAnimationFrame) return function(r) { @@ -18478,7 +18490,7 @@ var j$ = L$(), $1 = /* @__PURE__ */ W1(j$), AS = ss ? ss.performance : null, eF }, 1e3 / 60); }; })(), Mx = function(e) { - return B$(e); + return F$(e); }, vv = eF, Ig = 9261, tF = 65599, lm = 5381, rF = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ig, n = t, i; i = e.next(), !i.done; ) n = n * tF + i.value | 0; @@ -18489,7 +18501,7 @@ var j$ = L$(), $1 = /* @__PURE__ */ W1(j$), AS = ss ? ss.performance : null, eF }, y1 = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : lm; return (t << 5) + t + e | 0; -}, F$ = function(e, t) { +}, U$ = function(e, t) { return e * 2097152 + t; }, ep = function(e) { return e[0] * 2097152 + e[1]; @@ -18516,36 +18528,36 @@ var j$ = L$(), $1 = /* @__PURE__ */ W1(j$), AS = ss ? ss.performance : null, eF }; return rF(o, t); }, nF = function() { - return U$(arguments); -}, U$ = function(e) { + return z$(arguments); +}, z$ = function(e) { for (var t, n = 0; n < e.length; n++) { var i = e[n]; n === 0 ? t = Hg(i) : t = Hg(i, t); } return t; }; -function z$(r, e, t, n, i) { +function q$(r, e, t, n, i) { var a = i * Math.PI / 180, o = Math.cos(a) * (r - t) - Math.sin(a) * (e - n) + t, s = Math.sin(a) * (r - t) + Math.cos(a) * (e - n) + n; return { x: o, y: s }; } -var q$ = function(e, t, n, i, a, o) { +var G$ = function(e, t, n, i, a, o) { return { x: (e - n) * a + n, y: (t - i) * o + i }; }; -function G$(r, e, t) { +function V$(r, e, t) { if (t === 0) return r; - var n = (e.x1 + e.x2) / 2, i = (e.y1 + e.y2) / 2, a = e.w / e.h, o = 1 / a, s = z$(r.x, r.y, n, i, t), u = q$(s.x, s.y, n, i, a, o); + var n = (e.x1 + e.x2) / 2, i = (e.y1 + e.y2) / 2, a = e.w / e.h, o = 1 / a, s = q$(r.x, r.y, n, i, t), u = G$(s.x, s.y, n, i, a, o); return { x: u.x, y: u.y }; } -var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number.MAX_SAFE_INTEGER || 9007199254740991, iF = function() { +var wI = !0, H$ = console.warn != null, W$ = console.trace != null, V5 = Number.MAX_SAFE_INTEGER || 9007199254740991, iF = function() { return !0; }, Dx = function() { return !1; @@ -18560,12 +18572,12 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. else return wI; }, Ai = function(e) { - aF() && (V$ ? console.warn(e) : (console.log(e), H$ && console.trace())); -}, W$ = function(e) { + aF() && (H$ ? console.warn(e) : (console.log(e), W$ && console.trace())); +}, Y$ = function(e) { return kr({}, e); }, bh = function(e) { - return e == null ? e : ra(e) ? e.slice() : ai(e) ? W$(e) : e; -}, Y$ = function(e) { + return e == null ? e : ra(e) ? e.slice() : ai(e) ? Y$(e) : e; +}, X$ = function(e) { return e.slice(); }, oF = function(e, t) { for ( @@ -18583,8 +18595,8 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. ) : "-" ) ; return t; -}, X$ = {}, sF = function() { - return X$; +}, $$ = {}, sF = function() { + return $$; }, fu = function(e) { var t = Object.keys(e); return function(n) { @@ -18599,7 +18611,7 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. e[i] === t && e.splice(i, 1); }, W5 = function(e) { e.splice(0, e.length); -}, $$ = function(e, t) { +}, K$ = function(e, t) { for (var n = 0; n < t.length; n++) { var i = t[n]; e.push(i); @@ -18608,7 +18620,7 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. return n && (t = X7(n, t)), e[t]; }, ov = function(e, t, n, i) { n && (t = X7(n, t)), e[t] = i; -}, K$ = /* @__PURE__ */ (function() { +}, Z$ = /* @__PURE__ */ (function() { function r() { zp(this, r), this._obj = {}; } @@ -18638,7 +18650,7 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. return this._obj[t]; } }]); -})(), sv = typeof Map < "u" ? Map : K$, Z$ = "undefined", Q$ = /* @__PURE__ */ (function() { +})(), sv = typeof Map < "u" ? Map : Z$, Q$ = "undefined", J$ = /* @__PURE__ */ (function() { function r(e) { if (zp(this, r), this._obj = /* @__PURE__ */ Object.create(null), this.size = 0, e != null) { var t; @@ -18688,7 +18700,7 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. return this.toArray().forEach(t, n); } }]); -})(), $m = (typeof Set > "u" ? "undefined" : ls(Set)) !== Z$ ? Set : Q$, P2 = function(e, t) { +})(), $m = (typeof Set > "u" ? "undefined" : ls(Set)) !== Q$ ? Set : J$, R2 = function(e, t) { var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0; if (e === void 0 || t === void 0 || !z5(e)) { Ia("An element must have a core reference and parameters set"); @@ -18834,8 +18846,8 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. return 1; for (var X = B.connectedEdges().filter(function(le) { return (!a || le.source().same(B)) && _.has(le); - }), Q = 0; Q < X.length; Q++) { - var ue = X[Q], re = ue.connectedNodes().filter(function(le) { + }), Z = 0; Z < X.length; Z++) { + var ue = X[Z], re = ue.connectedNodes().filter(function(le) { return !le.same(B) && b.has(le); }), ne = re.id(); re.length !== 0 && !h[ne] && (re = re[0], l.push(re), e.bfs && (h[ne] = !0, c.push(re)), f[ne] = ue, d[ne] = d[j] + 1); @@ -18861,8 +18873,8 @@ var wI = !0, V$ = console.warn != null, H$ = console.trace != null, V5 = Number. }; m1.bfs = m1.breadthFirstSearch; m1.dfs = m1.depthFirstSearch; -var Xw = { exports: {} }, J$ = Xw.exports, SI; -function eK() { +var Xw = { exports: {} }, eK = Xw.exports, SI; +function tK() { return SI || (SI = 1, (function(r, e) { (function() { var t, n, i, a, o, s, u, l, c, f, d, h, p, g, y; @@ -18972,20 +18984,20 @@ function eK() { })(this, function() { return t; }); - }).call(J$); + }).call(eK); })(Xw)), Xw.exports; } -var RS, OI; -function tK() { - return OI || (OI = 1, RS = eK()), RS; +var AS, OI; +function rK() { + return OI || (OI = 1, AS = tK()), AS; } -var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ +var nK = rK(), K1 = /* @__PURE__ */ W1(nK), iK = fu({ root: null, weight: function(e) { return 1; }, directed: !1 -}), iK = { +}), aK = { dijkstra: function(e) { if (!ai(e)) { var t = arguments; @@ -18995,7 +19007,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ directed: t[2] }; } - var n = nK(e), i = n.root, a = n.weight, o = n.directed, s = this, u = a, l = Ar(i) ? this.filter(i)[0] : i[0], c = {}, f = {}, d = {}, h = this.byGroup(), p = h.nodes, g = h.edges; + var n = iK(e), i = n.root, a = n.weight, o = n.directed, s = this, u = a, l = Ar(i) ? this.filter(i)[0] : i[0], c = {}, f = {}, d = {}, h = this.byGroup(), p = h.nodes, g = h.edges; g.unmergeBy(function(z) { return z.isLoop(); }); @@ -19011,8 +19023,8 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ } for (var S = function(H, q) { for (var W = (o ? H.edgesTo(q) : H.edgesWith(q)).intersect(g), $ = 1 / 0, J, X = 0; X < W.length; X++) { - var Q = W[X], ue = u(Q); - (ue < $ || !J) && ($ = ue, J = Q); + var Z = W[X], ue = u(Z); + (ue < $ || !J) && ($ = ue, J = Z); } return { edge: J, @@ -19045,7 +19057,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ } }; } -}, aK = { +}, oK = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function(e) { @@ -19068,7 +19080,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ } return s; } -}, oK = fu({ +}, sK = fu({ root: null, goal: null, weight: function(e) { @@ -19078,15 +19090,15 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ return 0; }, directed: !1 -}), sK = { +}), uK = { // Implemented from pseudocode from wikipedia aStar: function(e) { - var t = this.cy(), n = oK(e), i = n.root, a = n.goal, o = n.heuristic, s = n.directed, u = n.weight; + var t = this.cy(), n = sK(e), i = n.root, a = n.goal, o = n.heuristic, s = n.directed, u = n.weight; i = t.collection(i)[0], a = t.collection(a)[0]; var l = i.id(), c = a.id(), f = {}, d = {}, h = {}, p = new K1(function(J, X) { return d[J.id()] - d[X.id()]; - }), g = new $m(), y = {}, b = {}, _ = function(X, Q) { - p.push(X), g.add(Q); + }), g = new $m(), y = {}, b = {}, _ = function(X, Z) { + p.push(X), g.add(Z); }, m, x, S = function() { m = p.pop(), x = m.id(), g.delete(x); }, O = function(X) { @@ -19127,15 +19139,15 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ steps: E }; } -}, uK = fu({ +}, lK = fu({ weight: function(e) { return 1; }, directed: !1 -}), lK = { +}), cK = { // Implemented from pseudocode from wikipedia floydWarshall: function(e) { - for (var t = this.cy(), n = uK(e), i = n.weight, a = n.directed, o = i, s = this.byGroup(), u = s.nodes, l = s.edges, c = u.length, f = c * c, d = function(ue) { + for (var t = this.cy(), n = lK(e), i = n.weight, a = n.directed, o = i, s = this.byGroup(), u = s.nodes, l = s.edges, c = u.length, f = c * c, d = function(ue) { return u.indexOf(ue); }, h = function(ue) { return u[ue]; @@ -19183,32 +19195,32 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ return X; } // floydWarshall -}, cK = fu({ +}, fK = fu({ weight: function(e) { return 1; }, directed: !1, root: null -}), fK = { +}), dK = { // Implemented from pseudocode from wikipedia bellmanFord: function(e) { - var t = this, n = cK(e), i = n.weight, a = n.directed, o = n.root, s = i, u = this, l = this.cy(), c = this.byGroup(), f = c.edges, d = c.nodes, h = d.length, p = new sv(), g = !1, y = []; + var t = this, n = fK(e), i = n.weight, a = n.directed, o = n.root, s = i, u = this, l = this.cy(), c = this.byGroup(), f = c.edges, d = c.nodes, h = d.length, p = new sv(), g = !1, y = []; o = l.collection(o)[0], f.unmergeBy(function(Ce) { return Ce.isLoop(); }); for (var b = f.length, _ = function(Y) { - var Z = p.get(Y.id()); - return Z || (Z = {}, p.set(Y.id(), Z)), Z; + var Q = p.get(Y.id()); + return Q || (Q = {}, p.set(Y.id(), Q)), Q; }, m = function(Y) { return (Ar(Y) ? l.$(Y) : Y)[0]; }, x = function(Y) { return _(m(Y)).dist; }, S = function(Y) { - for (var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, ie = m(Y), we = [], Ee = ie; ; ) { + for (var Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : o, ie = m(Y), we = [], Ee = ie; ; ) { if (Ee == null) return t.spawn(); - var De = _(Ee), Ie = De.edge, Ye = De.pred; - if (we.unshift(Ee[0]), Ee.same(Z) && we.length > 0) + var Me = _(Ee), Ie = Me.edge, Ye = Me.pred; + if (we.unshift(Ee[0]), Ee.same(Q) && we.length > 0) break; Ie != null && we.unshift(Ie), Ee = Ye; } @@ -19217,8 +19229,8 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ var E = d[O], T = _(E); E.same(o) ? T.dist = 0 : T.dist = 1 / 0, T.pred = null, T.edge = null; } - for (var P = !1, I = function(Y, Z, ie, we, Ee, De) { - var Ie = we.dist + De; + for (var P = !1, I = function(Y, Q, ie, we, Ee, Me) { + var Ie = we.dist + Me; Ie < Ee.dist && !ie.same(we.edge) && (Ee.dist = Ie, Ee.pred = Y, Ee.edge = ie, P = !0); }, k = 1; k < h; k++) { P = !1; @@ -19231,19 +19243,19 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ } if (P) for (var $ = [], J = 0; J < b; J++) { - var X = f[J], Q = X.source(), ue = X.target(), re = s(X), ne = _(Q).dist, le = _(ue).dist; + var X = f[J], Z = X.source(), ue = X.target(), re = s(X), ne = _(Z).dist, le = _(ue).dist; if (ne + re < le || !a && le + re < ne) if (g || (Ai("Graph contains a negative weight cycle for Bellman-Ford"), g = !0), e.findNegativeWeightCycles !== !1) { var ce = []; - ne + re < le && ce.push(Q), !a && le + re < ne && ce.push(ue); + ne + re < le && ce.push(Z), !a && le + re < ne && ce.push(ue); for (var pe = ce.length, fe = 0; fe < pe; fe++) { var se = ce[fe], de = [se]; de.push(_(se).edge); for (var ge = _(se).pred; de.indexOf(ge) === -1; ) de.push(ge), de.push(_(ge).edge), ge = _(ge).pred; de = de.slice(de.indexOf(ge)); - for (var Oe = de[0].id(), ke = 0, Me = 2; Me < de.length; Me += 2) - de[Me].id() < Oe && (Oe = de[Me].id(), ke = Me); + for (var Oe = de[0].id(), ke = 0, De = 2; De < de.length; De += 2) + de[De].id() < Oe && (Oe = de[De].id(), ke = De); de = de.slice(ke).concat(de.slice(0, ke)), de.push(de[0]); var Ne = de.map(function(Ce) { return Ce.id(); @@ -19261,7 +19273,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ }; } // bellmanFord -}, dK = Math.sqrt(2), hK = function(e, t, n) { +}, hK = Math.sqrt(2), vK = function(e, t, n) { n.length === 0 && Ia("Karger-Stein must be run on a connected (sub)graph"); for (var i = n[e], a = i[1], o = i[2], s = t[a], u = t[o], l = n, c = l.length - 1; c >= 0; c--) { var f = l[c], d = f[1], h = f[2]; @@ -19274,13 +19286,13 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ for (var y = 0; y < t.length; y++) t[y] === u && (t[y] = s); return l; -}, PS = function(e, t, n, i) { +}, RS = function(e, t, n, i) { for (; n > i; ) { var a = Math.floor(Math.random() * t.length); - t = hK(a, e, t), n--; + t = vK(a, e, t), n--; } return t; -}, vK = { +}, pK = { // Computes the minimum cut of an undirected graph // Returns the correct answer with high probability kargerStein: function() { @@ -19288,7 +19300,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ i.unmergeBy(function(W) { return W.isLoop(); }); - var a = n.length, o = i.length, s = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), u = Math.floor(a / dK); + var a = n.length, o = i.length, s = Math.ceil(Math.pow(Math.log(a) / Math.LN2, 2)), u = Math.floor(a / hK); if (a < 2) { Ia("At least 2 nodes are required for Karger-Stein algorithm"); return; @@ -19303,9 +19315,9 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ }, _ = 0; _ <= s; _++) { for (var m = 0; m < a; m++) g[m] = m; - var x = PS(g, l.slice(), a, u), S = x.slice(); + var x = RS(g, l.slice(), a, u), S = x.slice(); b(g, y); - var O = PS(g, x, u, 2), E = PS(y, S, u, 2); + var O = RS(g, x, u, 2), E = RS(y, S, u, 2); O.length <= E.length && O.length < d ? (d = O.length, h = O, b(g, p)) : E.length <= O.length && E.length < d && (d = E.length, h = E, b(y, p)); } for (var T = this.spawn(h.map(function(W) { @@ -19317,8 +19329,8 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ var z = function($) { var J = e.spawn(); return $.forEach(function(X) { - J.merge(X), X.connectedEdges().forEach(function(Q) { - e.contains(Q) && !T.contains(Q) && J.merge(Q); + J.merge(X), X.connectedEdges().forEach(function(Z) { + e.contains(Z) && !T.contains(Z) && J.merge(Z); }); }), J; }, H = [z(P), z(I)], q = { @@ -19331,12 +19343,12 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ }; return q; } -}, MS, pK = function(e) { +}, PS, gK = function(e) { return { x: e.x, y: e.y }; -}, M2 = function(e, t, n) { +}, P2 = function(e, t, n) { return { x: e.x * t + n.x, y: e.y * t + n.y @@ -19351,25 +19363,25 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ x: e[0], y: e[1] }; -}, gK = function(e) { +}, yK = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, i = 1 / 0, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (i = Math.min(o, i)); } return i; -}, yK = function(e) { +}, mK = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, i = -1 / 0, a = t; a < n; a++) { var o = e[a]; isFinite(o) && (i = Math.max(o, i)); } return i; -}, mK = function(e) { +}, bK = function(e) { for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, i = 0, a = 0, o = t; o < n; o++) { var s = e[o]; isFinite(s) && (i += s, a++); } return i / a; -}, bK = function(e) { +}, _K = function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0; i ? e = e.slice(t, n) : (n < e.length && e.splice(n, e.length - n), t > 0 && e.splice(0, t)); for (var s = 0, u = e.length - 1; u >= 0; u--) { @@ -19381,7 +19393,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ }); var c = e.length, f = Math.floor(c / 2); return c % 2 !== 0 ? e[f + 1 + s] : (e[f - 1 + s] + e[f + s]) / 2; -}, _K = function(e) { +}, wK = function(e) { return Math.PI * e / 180; }, dw = function(e, t) { return Math.atan2(t, e) - Math.PI / 2; @@ -19394,7 +19406,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ }, Cg = function(e, t) { var n = t.x - e.x, i = t.y - e.y; return n * n + i * i; -}, wK = function(e) { +}, xK = function(e) { for (var t = e.length, n = 0, i = 0; i < t; i++) n += e[i]; for (var a = 0; a < t; a++) @@ -19407,7 +19419,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ x: ks(e.x, t.x, n.x, i), y: ks(e.y, t.y, n.y, i) }; -}, xK = function(e, t, n, i) { +}, EK = function(e, t, n, i) { var a = { x: t.x - e.x, y: t.y - e.y @@ -19451,7 +19463,7 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ h: e.h }; } -}, EK = function(e) { +}, SK = function(e) { return { x1: e.x1, x2: e.x2, @@ -19460,9 +19472,9 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ y2: e.y2, h: e.h }; -}, SK = function(e) { +}, OK = function(e) { e.x1 = 1 / 0, e.y1 = 1 / 0, e.x2 = -1 / 0, e.y2 = -1 / 0, e.w = 0, e.h = 0; -}, OK = function(e, t) { +}, TK = 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; }, lF = 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; @@ -19490,10 +19502,10 @@ var rK = tK(), K1 = /* @__PURE__ */ W1(rK), nK = fu({ return pp(e, t.x, t.y); }, cF = function(e, t) { return pp(e, t.x1, t.y1) && pp(e, t.x2, t.y2); -}, TK = (MS = Math.hypot) !== null && MS !== void 0 ? MS : function(r, e) { +}, CK = (PS = Math.hypot) !== null && PS !== void 0 ? PS : function(r, e) { return Math.sqrt(r * r + e * e); }; -function CK(r, e) { +function AK(r, e) { if (r.length < 3) throw new Error("Need at least 3 vertices"); var t = function(T, P) { @@ -19514,7 +19526,7 @@ function CK(r, e) { }, a = function(T, P) { return T.x * P.y - T.y * P.x; }, o = function(T) { - var P = TK(T.x, T.y); + var P = CK(T.x, T.y); return P === 0 ? { x: 0, y: 0 @@ -19560,8 +19572,8 @@ function CK(r, e) { } return _; } -function AK(r, e, t, n, i, a) { - var o = jK(r, e, t, n, i), s = CK(o, a), u = zl(); +function RK(r, e, t, n, i, a) { + var o = BK(r, e, t, n, i), s = AK(o, a), u = zl(); return s.forEach(function(l) { return lF(u, l.x, l.y); }), u; @@ -19607,15 +19619,15 @@ var fF = function(e, t, n, i, a, o, s) { return [z[0], z[1]]; } { - var Q = n - c + l, ue = i + f - l; - if (z = db(e, t, n, i, Q, ue, l + s), z.length > 0 && z[0] <= Q && z[1] >= ue) + var Z = n - c + l, ue = i + f - l; + if (z = db(e, t, n, i, Z, ue, l + s), z.length > 0 && z[0] <= Z && z[1] >= ue) return [z[0], z[1]]; } return []; -}, RK = function(e, t, n, i, a, o, s) { +}, PK = function(e, t, n, i, a, o, s) { var u = s, l = Math.min(n, a), c = Math.max(n, a), f = Math.min(i, o), d = Math.max(i, o); return l - u <= e && e <= c + u && f - u <= t && t <= d + u; -}, PK = function(e, t, n, i, a, o, s, u, l) { +}, MK = function(e, t, n, i, a, o, s, u, l) { var c = { x1: Math.min(n, s, a) - l, x2: Math.max(n, s, a) + l, @@ -19623,14 +19635,14 @@ var fF = function(e, t, n, i, a, o, s) { y2: Math.max(i, u, o) + l }; return !(e < c.x1 || e > c.x2 || t < c.y1 || t > c.y2); -}, MK = function(e, t, n, i) { +}, DK = function(e, t, n, i) { n -= i; var a = t * t - 4 * e * n; if (a < 0) return []; var o = Math.sqrt(a), s = 2 * e, u = (-t + o) / s, l = (-t - o) / s; return [u, l]; -}, DK = function(e, t, n, i, a) { +}, kK = function(e, t, n, i, a) { var o = 1e-5; e === 0 && (e = o), t /= e, n /= e, i /= e; var s, u, l, c, f, d, h, p; @@ -19643,16 +19655,16 @@ var fF = function(e, t, n, i, a, o, s) { return; } u = -u, c = u * u * u, c = Math.acos(l / Math.sqrt(c)), p = 2 * Math.sqrt(u), a[0] = -h + p * Math.cos(c / 3), a[2] = -h + p * Math.cos((c + 2 * Math.PI) / 3), a[4] = -h + p * Math.cos((c + 4 * Math.PI) / 3); -}, kK = function(e, t, n, i, a, o, s, u) { +}, IK = function(e, t, n, i, a, o, s, u) { var l = 1 * n * n - 4 * n * a + 2 * n * s + 4 * a * a - 4 * a * s + s * s + i * i - 4 * i * o + 2 * i * u + 4 * o * o - 4 * o * u + u * u, c = 9 * n * a - 3 * n * n - 3 * n * s - 6 * a * a + 3 * a * s + 9 * i * o - 3 * i * i - 3 * i * u - 6 * o * o + 3 * o * u, f = 3 * n * n - 6 * n * a + n * s - n * e + 2 * a * a + 2 * a * e - s * e + 3 * i * i - 6 * i * o + i * u - i * t + 2 * o * o + 2 * o * t - u * t, d = 1 * n * a - n * n + n * e - a * e + i * o - i * i + i * t - o * t, h = []; - DK(l, c, f, d, h); + kK(l, c, f, d, h); for (var p = 1e-7, g = [], y = 0; y < 6; y += 2) Math.abs(h[y + 1]) < p && h[y] >= 0 && h[y] <= 1 && g.push(h[y]); g.push(1), g.push(0); for (var b = -1, _, m, x, S = 0; S < g.length; S++) _ = Math.pow(1 - g[S], 2) * n + 2 * (1 - g[S]) * g[S] * a + g[S] * g[S] * s, m = Math.pow(1 - g[S], 2) * i + 2 * (1 - g[S]) * g[S] * o + g[S] * g[S] * u, x = Math.pow(_ - e, 2) + Math.pow(m - t, 2), b >= 0 ? x < b && (b = x) : b = x; return b; -}, IK = function(e, t, n, i, a, o) { +}, NK = function(e, t, n, i, a, o) { var s = [e - n, t - i], u = [a - n, o - i], l = u[0] * u[0] + u[1] * u[1], c = s[0] * s[0] + s[1] * s[1], f = s[0] * u[0] + s[1] * u[1], d = f * f / l; return f < 0 ? c : d > l ? (e - a) * (e - a) + (t - o) * (t - o) : c - d; }, Cc = function(e, t, n) { @@ -19674,7 +19686,7 @@ var fF = function(e, t, n, i, a, o, s) { } else g = c; return Cc(e, t, g); -}, NK = function(e, t, n, i, a, o, s, u) { +}, LK = function(e, t, n, i, a, o, s, u) { for (var l = new Array(n.length * 2), c = 0; c < u.length; c++) { var f = u[c]; l[c * 4 + 0] = f.startX, l[c * 4 + 1] = f.startY, l[c * 4 + 2] = f.stopX, l[c * 4 + 3] = f.stopY; @@ -19697,7 +19709,7 @@ var fF = function(e, t, n, i, a, o, s) { n[u * 4] = i + d * t, n[u * 4 + 1] = a + h * t, n[u * 4 + 2] = o + d * t, n[u * 4 + 3] = s + h * t; } return n; -}, LK = function(e, t, n, i, a, o) { +}, jK = function(e, t, n, i, a, o) { var s = n - e, u = i - t; s /= a, u /= o; var l = Math.sqrt(s * s + u * u), c = l - 1; @@ -19722,7 +19734,7 @@ var fF = function(e, t, n, i, a, o, s) { return [m, x, S, O]; } else return [m, x]; -}, DS = function(e, t, n) { +}, MS = function(e, t, n) { return t <= e && e <= n || n <= e && e <= t ? e : e <= t && t <= n || n <= t && t <= e ? t : n; }, gp = function(e, t, n, i, a, o, s, u, l) { var c = e - a, f = n - e, d = s - a, h = t - o, p = i - t, g = u - o, y = d * h - g * c, b = f * h - p * c, _ = g * f - d * p; @@ -19730,8 +19742,8 @@ var fF = function(e, t, n, i, a, o, s) { var m = y / _, x = b / _, S = 1e-3, O = 0 - S, E = 1 + S; return O <= m && m <= E && O <= x && x <= E ? [e + m * f, t + m * p] : l ? [e + m * f, t + m * p] : []; } else - return y === 0 || b === 0 ? DS(e, n, s) === s ? [s, u] : DS(e, n, a) === a ? [a, o] : DS(a, s, n) === n ? [n, i] : [] : []; -}, jK = function(e, t, n, i, a) { + return y === 0 || b === 0 ? MS(e, n, s) === s ? [s, u] : MS(e, n, a) === a ? [a, o] : MS(a, s, n) === n ? [n, i] : [] : []; +}, BK = function(e, t, n, i, a) { var o = [], s = i / 2, u = a / 2, l = t, c = n; o.push({ x: l + s * e[0], @@ -19760,7 +19772,7 @@ var fF = function(e, t, n, i, a, o, s) { for (var y, b, _, m, x = 0; x < h.length / 2; x++) y = h[x * 2], b = h[x * 2 + 1], x < h.length / 2 - 1 ? (_ = h[(x + 1) * 2], m = h[(x + 1) * 2 + 1]) : (_ = h[0], m = h[1]), c = gp(e, t, i, a, y, b, _, m), c.length !== 0 && l.push(c[0], c[1]); return l; -}, BK = function(e, t, n, i, a, o, s, u, l) { +}, FK = function(e, t, n, i, a, o, s, u, l) { var c = [], f, d = new Array(n.length * 2); l.forEach(function(_, m) { m === 0 ? (d[d.length - 2] = _.startX, d[d.length - 1] = _.startY) : (d[m * 4 - 2] = _.startX, d[m * 4 - 1] = _.startY), d[m * 4] = _.stopX, d[m * 4 + 1] = _.stopY, f = db(e, t, i, a, _.cx, _.cy, _.radius), f.length !== 0 && c.push(f[0], f[1]); @@ -19779,7 +19791,7 @@ var fF = function(e, t, n, i, a, o, s) { var i = [e[0] - t[0], e[1] - t[1]], a = Math.sqrt(i[0] * i[0] + i[1] * i[1]), o = (a - n) / a; return o < 0 && (o = 1e-5), [t[0] + o * i[0], t[1] + o * i[1]]; }, Bl = function(e, t) { - var n = lM(e, t); + var n = uM(e, t); return n = dF(n), n; }, dF = function(e) { for (var t, n, i = e.length / 2, a = 1 / 0, o = 1 / 0, s = -1 / 0, u = -1 / 0, l = 0; l < i; l++) @@ -19790,7 +19802,7 @@ var fF = function(e, t, n, i, a, o, s) { for (var h = 0; h < i; h++) n = e[2 * h + 1] = e[2 * h + 1] + (-1 - o); return e; -}, lM = function(e, t) { +}, uM = function(e, t) { var n = 1 / e * 2 * Math.PI, i = e % 2 === 0 ? Math.PI / 2 + n / 2 : Math.PI / 2; i += t; for (var a = new Array(e * 2), o, s = 0; s < e; s++) @@ -19802,16 +19814,16 @@ var fF = function(e, t, n, i, a, o, s) { return Math.min(e / 10, t / 10, 8); }, K5 = function() { return 8; -}, FK = function(e, t, n) { +}, UK = function(e, t, n) { return [e - 2 * t + n, 2 * (t - e), e]; -}, cM = function(e, t) { +}, lM = function(e, t) { return { heightOffset: Math.min(15, 0.05 * t), widthOffset: Math.min(100, 0.25 * e), ctrlPtOffsetPct: 0.05 }; }; -function kS(r, e) { +function DS(r, e) { function t(f) { for (var d = [], h = 0; h < f.length; h++) { var p = f[h], g = f[(h + 1) % f.length], y = { @@ -19862,16 +19874,16 @@ function kS(r, e) { } return !0; } -var UK = fu({ +var zK = fu({ dampingFactor: 0.8, precision: 1e-6, iterations: 200, weight: function(e) { return 1; } -}), zK = { +}), qK = { pageRank: function(e) { - for (var t = UK(e), n = t.dampingFactor, i = t.precision, a = t.iterations, o = t.weight, s = this._private.cy, u = this.byGroup(), l = u.nodes, c = u.edges, f = l.length, d = f * f, h = c.length, p = new Array(d), g = new Array(f), y = (1 - n) / f, b = 0; b < f; b++) { + for (var t = zK(e), n = t.dampingFactor, i = t.precision, a = t.iterations, o = t.weight, s = this._private.cy, u = this.byGroup(), l = u.nodes, c = u.edges, f = l.length, d = f * f, h = c.length, p = new Array(d), g = new Array(f), y = (1 - n) / f, b = 0; b < f; b++) { for (var _ = 0; _ < f; _++) { var m = b * f + _; p[m] = 0; @@ -19898,7 +19910,7 @@ var UK = fu({ } for (var W = new Array(f), $ = new Array(f), J, X = 0; X < f; X++) W[X] = 1; - for (var Q = 0; Q < a; Q++) { + for (var Z = 0; Z < a; Z++) { for (var ue = 0; ue < f; ue++) $[ue] = 0; for (var re = 0; re < f; re++) @@ -19906,7 +19918,7 @@ var UK = fu({ var le = re * f + ne; $[re] += p[le] * W[ne]; } - wK($), J = W, W = $, $ = J; + xK($), J = W, W = $, $ = J; for (var ce = 0, pe = 0; pe < f; pe++) { var fe = J[pe] - W[pe]; ce += fe * fe; @@ -20041,13 +20053,13 @@ var RI = fu({ }; Em.cc = Em.closenessCentrality; Em.ccn = Em.closenessCentralityNormalised = Em.closenessCentralityNormalized; -var qK = fu({ +var GK = fu({ weight: null, directed: !1 -}), fM = { +}), cM = { // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes betweennessCentrality: function(e) { - for (var t = qK(e), n = t.directed, i = t.weight, a = i != null, o = this.cy(), s = this.nodes(), u = {}, l = {}, c = 0, f = { + for (var t = GK(e), n = t.directed, i = t.weight, a = i != null, o = this.cy(), s = this.nodes(), u = {}, l = {}, c = 0, f = { set: function(m, x) { l[m] = x, x > c && (c = x); }, @@ -20083,8 +20095,8 @@ var qK = fu({ for (var $ = {}, J = 0; J < s.length; J++) $[s[J].id()] = 0; for (; x.length > 0; ) { - for (var X = x.pop(), Q = 0; Q < S[X].length; Q++) { - var ue = S[X][Q]; + for (var X = x.pop(), Z = 0; Z < S[X].length; Z++) { + var ue = S[X][Z]; $[ue] = $[ue] + O[ue] / O[X] * (1 + $[X]); } X != s[y].id() && f.set(X, f.get(X) + $[X]); @@ -20107,8 +20119,8 @@ var qK = fu({ } // betweennessCentrality }; -fM.bc = fM.betweennessCentrality; -var GK = fu({ +cM.bc = cM.betweennessCentrality; +var VK = fu({ expandFactor: 2, // affects time of computation and cluster granularity to some extent: M * M inflateFactor: 2, @@ -20123,13 +20135,13 @@ var GK = fu({ return 1; } ] -}), VK = function(e) { - return GK(e); -}, HK = function(e, t) { +}), HK = function(e) { + return VK(e); +}, WK = function(e, t) { for (var n = 0, i = 0; i < t.length; i++) n += t[i](e); return n; -}, WK = function(e, t, n) { +}, YK = function(e, t, n) { for (var i = 0; i < t; i++) e[i * t + i] = n; }, vF = function(e, t) { @@ -20140,7 +20152,7 @@ var GK = fu({ for (var o = 0; o < t; o++) e[o * t + i] = e[o * t + i] / n; } -}, YK = function(e, t, n) { +}, XK = function(e, t, n) { for (var i = new Array(n * n), a = 0; a < n; a++) { for (var o = 0; o < n; o++) i[a * n + o] = 0; @@ -20149,56 +20161,56 @@ var GK = fu({ i[a * n + u] += e[a * n + s] * t[s * n + u]; } return i; -}, XK = function(e, t, n) { +}, $K = function(e, t, n) { for (var i = e.slice(0), a = 1; a < n; a++) - e = YK(e, i, t); + e = XK(e, i, t); return e; -}, $K = function(e, t, n) { +}, KK = function(e, t, n) { for (var i = new Array(t * t), a = 0; a < t * t; a++) i[a] = Math.pow(e[a], n); return vF(i, t), i; -}, KK = function(e, t, n, i) { +}, ZK = function(e, t, n, i) { for (var a = 0; a < n; a++) { var o = Math.round(e[a] * Math.pow(10, i)) / Math.pow(10, i), s = Math.round(t[a] * Math.pow(10, i)) / Math.pow(10, i); if (o !== s) return !1; } return !0; -}, ZK = function(e, t, n, i) { +}, QK = function(e, t, n, i) { for (var a = [], o = 0; o < t; o++) { for (var s = [], u = 0; u < t; u++) Math.round(e[o * t + u] * 1e3) / 1e3 > 0 && s.push(n[u]); s.length !== 0 && a.push(i.collection(s)); } return a; -}, QK = function(e, t) { +}, JK = function(e, t) { for (var n = 0; n < e.length; n++) if (!t[n] || e[n].id() !== t[n].id()) return !1; return !0; -}, JK = function(e) { +}, eZ = function(e) { for (var t = 0; t < e.length; t++) for (var n = 0; n < e.length; n++) - t != n && QK(e[t], e[n]) && e.splice(n, 1); + t != n && JK(e[t], e[n]) && e.splice(n, 1); return e; }, PI = function(e) { - for (var t = this.nodes(), n = this.edges(), i = this.cy(), a = VK(e), o = {}, s = 0; s < t.length; s++) + for (var t = this.nodes(), n = this.edges(), i = this.cy(), a = HK(e), o = {}, s = 0; s < t.length; s++) o[t[s].id()] = s; for (var u = t.length, l = u * u, c = new Array(l), f, d = 0; d < l; d++) c[d] = 0; for (var h = 0; h < n.length; h++) { - var p = n[h], g = o[p.source().id()], y = o[p.target().id()], b = HK(p, a.attributes); + var p = n[h], g = o[p.source().id()], y = o[p.target().id()], b = WK(p, a.attributes); c[g * u + y] += b, c[y * u + g] += b; } - WK(c, u, a.multFactor), vF(c, u); + YK(c, u, a.multFactor), vF(c, u); for (var _ = !0, m = 0; _ && m < a.maxIterations; ) - _ = !1, f = XK(c, u, a.expandFactor), c = $K(f, u, a.inflateFactor), KK(c, f, l, 4) || (_ = !0), m++; - var x = ZK(c, u, t, i); - return x = JK(x), x; -}, eZ = { + _ = !1, f = $K(c, u, a.expandFactor), c = KK(f, u, a.inflateFactor), ZK(c, f, l, 4) || (_ = !0), m++; + var x = QK(c, u, t, i); + return x = eZ(x), x; +}, tZ = { markovClustering: PI, mcl: PI -}, tZ = function(e) { +}, rZ = function(e) { return e; }, pF = function(e, t) { return Math.abs(t - e); @@ -20206,17 +20218,17 @@ var GK = fu({ return e + pF(t, n); }, DI = function(e, t, n) { return e + Math.pow(n - t, 2); -}, rZ = function(e) { +}, nZ = function(e) { return Math.sqrt(e); -}, nZ = function(e, t, n) { +}, iZ = function(e, t, n) { return Math.max(e, pF(t, n)); }, q0 = function(e, t, n, i, a) { - for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : tZ, s = i, u, l, c = 0; c < e; c++) + for (var o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : rZ, s = i, u, l, c = 0; c < e; c++) u = t(c), l = n(c), s = a(s, u, l); return o(s); }, Bm = { euclidean: function(e, t, n) { - return e >= 2 ? q0(e, t, n, 0, DI, rZ) : q0(e, t, n, 0, MI); + return e >= 2 ? q0(e, t, n, 0, DI, nZ) : q0(e, t, n, 0, MI); }, squaredEuclidean: function(e, t, n) { return q0(e, t, n, 0, DI); @@ -20225,16 +20237,16 @@ var GK = fu({ return q0(e, t, n, 0, MI); }, max: function(e, t, n) { - return q0(e, t, n, -1 / 0, nZ); + return q0(e, t, n, -1 / 0, iZ); } }; Bm["squared-euclidean"] = Bm.squaredEuclidean; Bm.squaredeuclidean = Bm.squaredEuclidean; -function D2(r, e, t, n, i, a) { +function M2(r, e, t, n, i, a) { var o; return Ya(r) ? o = r : o = Bm[r] || Bm.euclidean, e === 0 && Ya(r) ? o(i, a) : o(e, t, n, i, a); } -var iZ = fu({ +var aZ = fu({ k: 2, m: 2, sensitivityThreshold: 1e-4, @@ -20244,7 +20256,7 @@ var iZ = fu({ testMode: !1, testCentroids: null }), Z5 = function(e) { - return iZ(e); + return aZ(e); }, Nx = function(e, t, n, i, a) { var o = a !== "kMedoids", s = o ? function(f) { return n[f]; @@ -20253,8 +20265,8 @@ var iZ = fu({ }, u = function(d) { return i[d](t); }, l = n, c = t; - return D2(e, i.length, s, u, l, c); -}, IS = function(e, t, n) { + return M2(e, i.length, s, u, l, c); +}, kS = function(e, t, n) { for (var i = n.length, a = new Array(i), o = new Array(i), s = new Array(t), u = null, l = 0; l < i; l++) a[l] = e.min(n[l]).value, o[l] = e.max(n[l]).value; for (var c = 0; c < t; c++) { @@ -20274,9 +20286,9 @@ var iZ = fu({ for (var i = [], a = null, o = 0; o < t.length; o++) a = t[o], n[a.id()] === e && i.push(a); return i; -}, aZ = function(e, t, n) { - return Math.abs(t - e) <= n; }, oZ = function(e, t, n) { + return Math.abs(t - e) <= n; +}, sZ = function(e, t, n) { for (var i = 0; i < e.length; i++) for (var a = 0; a < e[i].length; a++) { var o = Math.abs(e[i][a] - t[i][a]); @@ -20284,7 +20296,7 @@ var iZ = fu({ return !1; } return !0; -}, sZ = function(e, t, n) { +}, uZ = function(e, t, n) { for (var i = 0; i < n; i++) if (e === t[i]) return !0; return !1; @@ -20292,7 +20304,7 @@ var iZ = fu({ var n = new Array(t); if (e.length < 50) for (var i = 0; i < t; i++) { - for (var a = e[Math.floor(Math.random() * e.length)]; sZ(a, n, i); ) + for (var a = e[Math.floor(Math.random() * e.length)]; uZ(a, n, i); ) a = e[Math.floor(Math.random() * e.length)]; n[i] = a; } @@ -20304,9 +20316,9 @@ var iZ = fu({ for (var i = 0, a = 0; a < t.length; a++) i += Nx("manhattan", t[a], e, n, "kMedoids"); return i; -}, uZ = function(e) { +}, lZ = function(e) { var t = this.cy(), n = this.nodes(), i = null, a = Z5(e), o = new Array(a.k), s = {}, u; - a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, u = IS(n, a.k, a.attributes)) : ls(a.testCentroids) === "object" ? u = a.testCentroids : u = IS(n, a.k, a.attributes) : u = IS(n, a.k, a.attributes); + a.testMode ? typeof a.testCentroids == "number" ? (a.testCentroids, u = kS(n, a.k, a.attributes)) : ls(a.testCentroids) === "object" ? u = a.testCentroids : u = kS(n, a.k, a.attributes) : u = kS(n, a.k, a.attributes); for (var l = !0, c = 0; l && c < a.maxIterations; ) { for (var f = 0; f < n.length; f++) i = n[f], s[i.id()] = gF(i, u, a.distance, a.attributes, "kMeans"); @@ -20318,7 +20330,7 @@ var iZ = fu({ b[_] = 0; for (var m = 0; m < h.length; m++) i = h[m], b[_] += a.attributes[_](i); - y[_] = b[_] / h.length, aZ(y[_], g[_], a.sensitivityThreshold) || (l = !0); + y[_] = b[_] / h.length, oZ(y[_], g[_], a.sensitivityThreshold) || (l = !0); } u[d] = y, o[d] = t.collection(h); } @@ -20326,7 +20338,7 @@ var iZ = fu({ c++; } return o; -}, lZ = function(e) { +}, cZ = function(e) { var t = this.cy(), n = this.nodes(), i = null, a = Z5(e), o = new Array(a.k), s, u = {}, l, c = new Array(a.k); a.testMode ? typeof a.testCentroids == "number" || (ls(a.testCentroids) === "object" ? s = a.testCentroids : s = kI(n, a.k)) : s = kI(n, a.k); for (var f = !0, d = 0; f && d < a.maxIterations; ) { @@ -20345,7 +20357,7 @@ var iZ = fu({ d++; } return o; -}, cZ = function(e, t, n, i, a) { +}, fZ = function(e, t, n, i, a) { for (var o, s, u = 0; u < t.length; u++) for (var l = 0; l < e.length; l++) i[u][l] = Math.pow(n[u][l], a.m); @@ -20356,7 +20368,7 @@ var iZ = fu({ o += i[d][c] * a.attributes[f](t[d]), s += i[d][c]; e[c][f] = o / s; } -}, fZ = function(e, t, n, i, a) { +}, dZ = function(e, t, n, i, a) { for (var o = 0; o < e.length; o++) t[o] = e[o].slice(); for (var s, u, l, c = 2 / (a.m - 1), f = 0; f < n.length; f++) @@ -20366,7 +20378,7 @@ var iZ = fu({ u = Nx(a.distance, i[d], n[f], a.attributes, "cmeans"), l = Nx(a.distance, i[d], n[h], a.attributes, "cmeans"), s += Math.pow(u / l, c); e[d][f] = 1 / s; } -}, dZ = function(e, t, n, i) { +}, hZ = function(e, t, n, i) { for (var a = new Array(n.k), o = 0; o < a.length; o++) a[o] = []; for (var s, u, l = 0; l < t.length; l++) { @@ -20399,17 +20411,17 @@ var iZ = fu({ for (var b = 0; b < n.length; b++) l[b] = new Array(i.k); for (var _ = !0, m = 0; _ && m < i.maxIterations; ) - _ = !1, cZ(o, n, s, l, i), fZ(s, u, o, n, i), oZ(s, u, i.sensitivityThreshold) || (_ = !0), m++; - return a = dZ(n, s, i, t), { + _ = !1, fZ(o, n, s, l, i), dZ(s, u, o, n, i), sZ(s, u, i.sensitivityThreshold) || (_ = !0), m++; + return a = hZ(n, s, i, t), { clusters: a, degreeOfMembership: s }; -}, hZ = { - kMeans: uZ, - kMedoids: lZ, +}, vZ = { + kMeans: lZ, + kMedoids: cZ, fuzzyCMeans: NI, fcm: NI -}, vZ = fu({ +}, pZ = fu({ distance: "euclidean", // distance metric to compare nodes linkage: "min", @@ -20425,15 +20437,15 @@ var iZ = fu({ // depth at which dendrogram branches are merged into the returned clusters attributes: [] // array of attr functions -}), pZ = { +}), gZ = { single: "min", complete: "max" -}, gZ = function(e) { - var t = vZ(e), n = pZ[t.linkage]; +}, yZ = function(e) { + var t = pZ(e), n = gZ[t.linkage]; return n != null && (t.linkage = n), t; }, LI = function(e, t, n, i, a) { for (var o = 0, s = 1 / 0, u, l = a.attributes, c = function(P, I) { - return D2(a.distance, l.length, function(k) { + return M2(a.distance, l.length, function(k) { return l[k](P); }, function(k) { return l[k](I); @@ -20471,10 +20483,10 @@ var iZ = fu({ return p.key = g.key = p.index = g.index = null, !0; }, pm = function(e, t, n) { e && (e.value ? t.push(e.value) : (e.left && pm(e.left, t), e.right && pm(e.right, t))); -}, dM = function(e, t) { +}, fM = function(e, t) { if (!e) return ""; if (e.left && e.right) { - var n = dM(e.left, t), i = dM(e.right, t), a = t.add({ + var n = fM(e.left, t), i = fM(e.right, t), a = t.add({ group: "nodes", data: { id: n + "," + i @@ -20495,13 +20507,13 @@ var iZ = fu({ }), a.id(); } else if (e.value) return e.value.id(); -}, hM = function(e, t, n) { +}, dM = function(e, t, n) { if (!e) return []; var i = [], a = [], o = []; - return t === 0 ? (e.left && pm(e.left, i), e.right && pm(e.right, a), o = i.concat(a), [n.collection(o)]) : t === 1 ? e.value ? [n.collection(e.value)] : (e.left && pm(e.left, i), e.right && pm(e.right, a), [n.collection(i), n.collection(a)]) : e.value ? [n.collection(e.value)] : (e.left && (i = hM(e.left, t - 1, n)), e.right && (a = hM(e.right, t - 1, n)), i.concat(a)); + return t === 0 ? (e.left && pm(e.left, i), e.right && pm(e.right, a), o = i.concat(a), [n.collection(o)]) : t === 1 ? e.value ? [n.collection(e.value)] : (e.left && pm(e.left, i), e.right && pm(e.right, a), [n.collection(i), n.collection(a)]) : e.value ? [n.collection(e.value)] : (e.left && (i = dM(e.left, t - 1, n)), e.right && (a = dM(e.right, t - 1, n)), i.concat(a)); }, jI = function(e) { - for (var t = this.cy(), n = this.nodes(), i = gZ(e), a = i.attributes, o = function(m, x) { - return D2(i.distance, a.length, function(S) { + for (var t = this.cy(), n = this.nodes(), i = yZ(e), a = i.attributes, o = function(m, x) { + return M2(i.distance, a.length, function(S) { return a[S](m); }, function(S) { return a[S](x); @@ -20522,13 +20534,13 @@ var iZ = fu({ for (var y = LI(s, c, u, l, i); y; ) y = LI(s, c, u, l, i); var b; - return i.mode === "dendrogram" ? (b = hM(s[0], i.dendrogramDepth, t), i.addDendrogram && dM(s[0], t)) : (b = new Array(s.length), s.forEach(function(_, m) { + return i.mode === "dendrogram" ? (b = dM(s[0], i.dendrogramDepth, t), i.addDendrogram && fM(s[0], t)) : (b = new Array(s.length), s.forEach(function(_, m) { _.key = _.index = null, b[m] = t.collection(_.value); })), b; -}, yZ = { +}, mZ = { hierarchicalClustering: jI, hca: jI -}, mZ = fu({ +}, bZ = fu({ distance: "euclidean", // distance metric to compare attributes between two nodes preference: "median", @@ -20543,7 +20555,7 @@ var iZ = fu({ // functions to quantify the similarity between any two points // e.g. node => node.data('weight') ] -}), bZ = function(e) { +}), _Z = function(e) { var t = e.damping, n = e.preference; 0.5 <= t && t < 1 || Ia("Damping must range on [0.5, 1). Got: ".concat(t)); var i = ["median", "mean", "min", "max"]; @@ -20551,20 +20563,20 @@ var iZ = fu({ return a === n; }) || Ht(n) || Ia("Preference must be one of [".concat(i.map(function(a) { return "'".concat(a, "'"); - }).join(", "), "] or a number. Got: ").concat(n)), mZ(e); -}, _Z = function(e, t, n, i) { + }).join(", "), "] or a number. Got: ").concat(n)), bZ(e); +}, wZ = function(e, t, n, i) { var a = function(s, u) { return i[u](s); }; - return -D2(e, i.length, function(o) { + return -M2(e, i.length, function(o) { return a(t, o); }, function(o) { return a(n, o); }, t, n); -}, wZ = function(e, t) { +}, xZ = function(e, t) { var n = null; - return t === "median" ? n = bK(e) : t === "mean" ? n = mK(e) : t === "min" ? n = gK(e) : t === "max" ? n = yK(e) : n = t, n; -}, xZ = function(e, t, n) { + return t === "median" ? n = _K(e) : t === "mean" ? n = bK(e) : t === "min" ? n = yK(e) : t === "max" ? n = mK(e) : n = t, n; +}, EZ = function(e, t, n) { for (var i = [], a = 0; a < e; a++) t[a * e + a] + n[a * e + a] > 0 && i.push(a); return i; @@ -20579,7 +20591,7 @@ var iZ = fu({ for (var c = 0; c < n.length; c++) i[n[c]] = n[c]; return i; -}, EZ = function(e, t, n) { +}, SZ = function(e, t, n) { for (var i = BI(e, t, n), a = 0; a < n.length; a++) { for (var o = [], s = 0; s < i.length; s++) i[s] === n[a] && o.push(s); @@ -20592,7 +20604,7 @@ var iZ = fu({ } return i = BI(e, t, n), i; }, FI = function(e) { - for (var t = this.cy(), n = this.nodes(), i = bZ(e), a = {}, o = 0; o < n.length; o++) + for (var t = this.cy(), n = this.nodes(), i = _Z(e), a = {}, o = 0; o < n.length; o++) a[n[o].id()] = o; var s, u, l, c, f, d; s = n.length, u = s * s, l = new Array(u); @@ -20600,8 +20612,8 @@ var iZ = fu({ l[h] = -1 / 0; for (var p = 0; p < s; p++) for (var g = 0; g < s; g++) - p !== g && (l[p * s + g] = _Z(i.distance, n[p], n[g], i.attributes)); - c = wZ(l, i.preference); + p !== g && (l[p * s + g] = wZ(i.distance, n[p], n[g], i.attributes)); + c = xZ(l, i.preference); for (var y = 0; y < s; y++) l[y * s + y] = c; f = new Array(u); @@ -20631,9 +20643,9 @@ var iZ = fu({ d[J * s + q] = (1 - i.damping) * Math.min(0, W - x[J]) + i.damping * m[J]; d[q * s + q] = (1 - i.damping) * (W - x[q]) + i.damping * m[q]; } - for (var X = 0, Q = 0; Q < s; Q++) { - var ue = d[Q * s + Q] + f[Q * s + Q] > 0 ? 1 : 0; - E[P % i.minIterations * s + Q] = ue, X += ue; + for (var X = 0, Z = 0; Z < s; Z++) { + var ue = d[Z * s + Z] + f[Z * s + Z] > 0 ? 1 : 0; + E[P % i.minIterations * s + Z] = ue, X += ue; } if (X > 0 && (P >= i.minIterations - 1 || P == i.maxIterations - 1)) { for (var re = 0, ne = 0; ne < s; ne++) { @@ -20646,22 +20658,22 @@ var iZ = fu({ break; } } - for (var ce = xZ(s, f, d), pe = EZ(s, l, ce), fe = {}, se = 0; se < ce.length; se++) + for (var ce = EZ(s, f, d), pe = SZ(s, l, ce), fe = {}, se = 0; se < ce.length; se++) fe[ce[se]] = []; for (var de = 0; de < n.length; de++) { var ge = a[n[de].id()], Oe = pe[ge]; Oe != null && fe[Oe].push(n[de]); } - for (var ke = new Array(ce.length), Me = 0; Me < ce.length; Me++) - ke[Me] = t.collection(fe[ce[Me]]); + for (var ke = new Array(ce.length), De = 0; De < ce.length; De++) + ke[De] = t.collection(fe[ce[De]]); return ke; -}, SZ = { +}, OZ = { affinityPropagation: FI, ap: FI -}, OZ = fu({ +}, TZ = fu({ root: void 0, directed: !1 -}), TZ = { +}), CZ = { hierholzer: function(e) { if (!ai(e)) { var t = arguments; @@ -20670,7 +20682,7 @@ var iZ = fu({ directed: t[1] }; } - var n = OZ(e), i = n.root, a = n.directed, o = this, s = !1, u, l, c; + var n = TZ(e), i = n.root, a = n.directed, o = this, s = !1, u, l, c; i && (c = Ar(i) ? this.filter(i)[0].id() : i[0].id()); var f = {}, d = {}; a ? o.forEach(function(_) { @@ -20774,7 +20786,7 @@ var iZ = fu({ cut: e.spawn(c), components: a }; -}, CZ = { +}, AZ = { hopcroftTarjanBiconnected: vw, htbc: vw, htb: vw, @@ -20809,13 +20821,13 @@ var iZ = fu({ cut: o, components: i }; -}, AZ = { +}, RZ = { tarjanStronglyConnected: pw, tsc: pw, tscc: pw, tarjanStronglyConnectedComponents: pw }, mF = {}; -[m1, iK, aK, sK, lK, fK, vK, zK, xm, Em, fM, eZ, hZ, yZ, SZ, TZ, CZ, AZ].forEach(function(r) { +[m1, aK, oK, uK, cK, dK, pK, qK, xm, Em, cM, tZ, vZ, mZ, OZ, CZ, AZ, RZ].forEach(function(r) { kr(mF, r); }); /*! @@ -20937,7 +20949,7 @@ Pd.reject = function(r) { t(r); }); }; -var Km = typeof Promise < "u" ? Promise : Pd, vM = function(e, t, n) { +var Km = typeof Promise < "u" ? Promise : Pd, hM = function(e, t, n) { var i = z5(e), a = !i, o = this._private = kr({ duration: 1e3 }, t, n); @@ -20956,7 +20968,7 @@ var Km = typeof Promise < "u" ? Promise : Pd, vM = function(e, t, n) { }, o.startZoom = e.zoom(); } this.length = 1, this[0] = this; -}, Yg = vM.prototype; +}, Yg = hM.prototype; kr(Yg, { instanceString: function() { return "animation"; @@ -21043,7 +21055,7 @@ kr(Yg, { Yg.complete = Yg.completed; Yg.run = Yg.play; Yg.running = Yg.playing; -var RZ = { +var PZ = { animated: function() { return function() { var t = this, n = t.length !== void 0, i = n ? t : [t], a = this._private.cy || this; @@ -21099,7 +21111,7 @@ var RZ = { t = kr({}, t, n); var f = Object.keys(t).length === 0; if (f) - return new vM(o[0], t); + return new hM(o[0], t); switch (t.duration === void 0 && (t.duration = 400), t.duration) { case "slow": t.duration = 600; @@ -21132,7 +21144,7 @@ var RZ = { var S = s.getZoomedViewport(t.zoom); S != null ? (S.zoomed && (t.zoom = S.zoom), S.panned && (t.pan = S.pan)) : t.zoom = null; } - return new vM(o[0], t); + return new hM(o[0], t); }; }, // animate @@ -21168,29 +21180,29 @@ var RZ = { }; } // stop -}, NS, GI; -function k2() { - if (GI) return NS; +}, IS, GI; +function D2() { + if (GI) return IS; GI = 1; var r = Array.isArray; - return NS = r, NS; + return IS = r, IS; } -var LS, VI; -function PZ() { - if (VI) return LS; +var NS, VI; +function MZ() { + if (VI) return NS; VI = 1; - var r = k2(), e = X1(), t = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/; + var r = D2(), e = X1(), t = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/; function i(a, o) { if (r(a)) return !1; var s = typeof a; return s == "number" || s == "symbol" || s == "boolean" || a == null || e(a) ? !0 : n.test(a) || !t.test(a) || o != null && a in Object(o); } - return LS = i, LS; + return NS = i, NS; } -var jS, HI; -function MZ() { - if (HI) return jS; +var LS, HI; +function DZ() { + if (HI) return LS; HI = 1; var r = J7(), e = Y1(), t = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", a = "[object Proxy]"; function o(s) { @@ -21199,31 +21211,31 @@ function MZ() { var u = r(s); return u == n || u == i || u == t || u == a; } - return jS = o, jS; + return LS = o, LS; } -var BS, WI; -function DZ() { - if (WI) return BS; +var jS, WI; +function kZ() { + if (WI) return jS; WI = 1; - var r = R2(), e = r["__core-js_shared__"]; - return BS = e, BS; + var r = A2(), e = r["__core-js_shared__"]; + return jS = e, jS; } -var FS, YI; -function kZ() { - if (YI) return FS; +var BS, YI; +function IZ() { + if (YI) return BS; YI = 1; - var r = DZ(), e = (function() { + var r = kZ(), e = (function() { var n = /[^.]+$/.exec(r && r.keys && r.keys.IE_PROTO || ""); return n ? "Symbol(src)_1." + n : ""; })(); function t(n) { return !!e && e in n; } - return FS = t, FS; + return BS = t, BS; } -var US, XI; -function IZ() { - if (XI) return US; +var FS, XI; +function NZ() { + if (XI) return FS; XI = 1; var r = Function.prototype, e = r.toString; function t(n) { @@ -21239,13 +21251,13 @@ function IZ() { } return ""; } - return US = t, US; + return FS = t, FS; } -var zS, $I; -function NZ() { - if ($I) return zS; +var US, $I; +function LZ() { + if ($I) return US; $I = 1; - var r = MZ(), e = kZ(), t = Y1(), n = IZ(), i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, o = Function.prototype, s = Object.prototype, u = o.toString, l = s.hasOwnProperty, c = RegExp( + var r = DZ(), e = IZ(), t = Y1(), n = NZ(), i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, o = Function.prototype, s = Object.prototype, u = o.toString, l = s.hasOwnProperty, c = RegExp( "^" + u.call(l).replace(i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function f(d) { @@ -21254,60 +21266,60 @@ function NZ() { var h = r(d) ? c : a; return h.test(n(d)); } - return zS = f, zS; + return US = f, US; } -var qS, KI; -function LZ() { - if (KI) return qS; +var zS, KI; +function jZ() { + if (KI) return zS; KI = 1; function r(e, t) { return e == null ? void 0 : e[t]; } - return qS = r, qS; + return zS = r, zS; } -var GS, ZI; +var qS, ZI; function Q5() { - if (ZI) return GS; + if (ZI) return qS; ZI = 1; - var r = NZ(), e = LZ(); + var r = LZ(), e = jZ(); function t(n, i) { var a = e(n, i); return r(a) ? a : void 0; } - return GS = t, GS; + return qS = t, qS; } -var VS, QI; -function I2() { - if (QI) return VS; +var GS, QI; +function k2() { + if (QI) return GS; QI = 1; var r = Q5(), e = r(Object, "create"); - return VS = e, VS; + return GS = e, GS; } -var HS, JI; -function jZ() { - if (JI) return HS; +var VS, JI; +function BZ() { + if (JI) return VS; JI = 1; - var r = I2(); + var r = k2(); function e() { this.__data__ = r ? r(null) : {}, this.size = 0; } - return HS = e, HS; + return VS = e, VS; } -var WS, eN; -function BZ() { - if (eN) return WS; +var HS, eN; +function FZ() { + if (eN) return HS; eN = 1; function r(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } - return WS = r, WS; + return HS = r, HS; } -var YS, tN; -function FZ() { - if (tN) return YS; +var WS, tN; +function UZ() { + if (tN) return WS; tN = 1; - var r = I2(), e = "__lodash_hash_undefined__", t = Object.prototype, n = t.hasOwnProperty; + var r = k2(), e = "__lodash_hash_undefined__", t = Object.prototype, n = t.hasOwnProperty; function i(a) { var o = this.__data__; if (r) { @@ -21316,35 +21328,35 @@ function FZ() { } return n.call(o, a) ? o[a] : void 0; } - return YS = i, YS; + return WS = i, WS; } -var XS, rN; -function UZ() { - if (rN) return XS; +var YS, rN; +function zZ() { + if (rN) return YS; rN = 1; - var r = I2(), e = Object.prototype, t = e.hasOwnProperty; + var r = k2(), e = Object.prototype, t = e.hasOwnProperty; function n(i) { var a = this.__data__; return r ? a[i] !== void 0 : t.call(a, i); } - return XS = n, XS; + return YS = n, YS; } -var $S, nN; -function zZ() { - if (nN) return $S; +var XS, nN; +function qZ() { + if (nN) return XS; nN = 1; - var r = I2(), e = "__lodash_hash_undefined__"; + var r = k2(), e = "__lodash_hash_undefined__"; function t(n, i) { var a = this.__data__; return this.size += this.has(n) ? 0 : 1, a[n] = r && i === void 0 ? e : i, this; } - return $S = t, $S; + return XS = t, XS; } -var KS, iN; -function qZ() { - if (iN) return KS; +var $S, iN; +function GZ() { + if (iN) return $S; iN = 1; - var r = jZ(), e = BZ(), t = FZ(), n = UZ(), i = zZ(); + var r = BZ(), e = FZ(), t = UZ(), n = zZ(), i = qZ(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -21352,29 +21364,29 @@ function qZ() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, KS = a, KS; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, $S = a, $S; } -var ZS, aN; -function GZ() { - if (aN) return ZS; +var KS, aN; +function VZ() { + if (aN) return KS; aN = 1; function r() { this.__data__ = [], this.size = 0; } - return ZS = r, ZS; + return KS = r, KS; } -var QS, oN; +var ZS, oN; function SF() { - if (oN) return QS; + if (oN) return ZS; oN = 1; function r(e, t) { return e === t || e !== e && t !== t; } - return QS = r, QS; + return ZS = r, ZS; } -var JS, sN; -function N2() { - if (sN) return JS; +var QS, sN; +function I2() { + if (sN) return QS; sN = 1; var r = SF(); function e(t, n) { @@ -21383,13 +21395,13 @@ function N2() { return i; return -1; } - return JS = e, JS; + return QS = e, QS; } -var eO, uN; -function VZ() { - if (uN) return eO; +var JS, uN; +function HZ() { + if (uN) return JS; uN = 1; - var r = N2(), e = Array.prototype, t = e.splice; + var r = I2(), e = Array.prototype, t = e.splice; function n(i) { var a = this.__data__, o = r(a, i); if (o < 0) @@ -21397,45 +21409,45 @@ function VZ() { var s = a.length - 1; return o == s ? a.pop() : t.call(a, o, 1), --this.size, !0; } - return eO = n, eO; + return JS = n, JS; } -var tO, lN; -function HZ() { - if (lN) return tO; +var eO, lN; +function WZ() { + if (lN) return eO; lN = 1; - var r = N2(); + var r = I2(); function e(t) { var n = this.__data__, i = r(n, t); return i < 0 ? void 0 : n[i][1]; } - return tO = e, tO; + return eO = e, eO; } -var rO, cN; -function WZ() { - if (cN) return rO; +var tO, cN; +function YZ() { + if (cN) return tO; cN = 1; - var r = N2(); + var r = I2(); function e(t) { return r(this.__data__, t) > -1; } - return rO = e, rO; + return tO = e, tO; } -var nO, fN; -function YZ() { - if (fN) return nO; +var rO, fN; +function XZ() { + if (fN) return rO; fN = 1; - var r = N2(); + var r = I2(); function e(t, n) { var i = this.__data__, a = r(i, t); return a < 0 ? (++this.size, i.push([t, n])) : i[a][1] = n, this; } - return nO = e, nO; + return rO = e, rO; } -var iO, dN; -function XZ() { - if (dN) return iO; +var nO, dN; +function $Z() { + if (dN) return nO; dN = 1; - var r = GZ(), e = VZ(), t = HZ(), n = WZ(), i = YZ(); + var r = VZ(), e = HZ(), t = WZ(), n = YZ(), i = XZ(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -21443,20 +21455,20 @@ function XZ() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, iO = a, iO; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, nO = a, nO; } -var aO, hN; -function $Z() { - if (hN) return aO; +var iO, hN; +function KZ() { + if (hN) return iO; hN = 1; - var r = Q5(), e = R2(), t = r(e, "Map"); - return aO = t, aO; + var r = Q5(), e = A2(), t = r(e, "Map"); + return iO = t, iO; } -var oO, vN; -function KZ() { - if (vN) return oO; +var aO, vN; +function ZZ() { + if (vN) return aO; vN = 1; - var r = qZ(), e = XZ(), t = $Z(); + var r = GZ(), e = $Z(), t = KZ(); function n() { this.size = 0, this.__data__ = { hash: new r(), @@ -21464,76 +21476,76 @@ function KZ() { string: new r() }; } - return oO = n, oO; + return aO = n, aO; } -var sO, pN; -function ZZ() { - if (pN) return sO; +var oO, pN; +function QZ() { + if (pN) return oO; pN = 1; function r(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } - return sO = r, sO; + return oO = r, oO; } -var uO, gN; -function L2() { - if (gN) return uO; +var sO, gN; +function N2() { + if (gN) return sO; gN = 1; - var r = ZZ(); + var r = QZ(); function e(t, n) { var i = t.__data__; return r(n) ? i[typeof n == "string" ? "string" : "hash"] : i.map; } - return uO = e, uO; + return sO = e, sO; } -var lO, yN; -function QZ() { - if (yN) return lO; +var uO, yN; +function JZ() { + if (yN) return uO; yN = 1; - var r = L2(); + var r = N2(); function e(t) { var n = r(this, t).delete(t); return this.size -= n ? 1 : 0, n; } - return lO = e, lO; + return uO = e, uO; } -var cO, mN; -function JZ() { - if (mN) return cO; +var lO, mN; +function eQ() { + if (mN) return lO; mN = 1; - var r = L2(); + var r = N2(); function e(t) { return r(this, t).get(t); } - return cO = e, cO; + return lO = e, lO; } -var fO, bN; -function eQ() { - if (bN) return fO; +var cO, bN; +function tQ() { + if (bN) return cO; bN = 1; - var r = L2(); + var r = N2(); function e(t) { return r(this, t).has(t); } - return fO = e, fO; + return cO = e, cO; } -var dO, _N; -function tQ() { - if (_N) return dO; +var fO, _N; +function rQ() { + if (_N) return fO; _N = 1; - var r = L2(); + var r = N2(); function e(t, n) { var i = r(this, t), a = i.size; return i.set(t, n), this.size += i.size == a ? 0 : 1, this; } - return dO = e, dO; + return fO = e, fO; } -var hO, wN; -function rQ() { - if (wN) return hO; +var dO, wN; +function nQ() { + if (wN) return dO; wN = 1; - var r = KZ(), e = QZ(), t = JZ(), n = eQ(), i = tQ(); + var r = ZZ(), e = JZ(), t = eQ(), n = tQ(), i = rQ(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -21541,13 +21553,13 @@ function rQ() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, hO = a, hO; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, dO = a, dO; } -var vO, xN; -function nQ() { - if (xN) return vO; +var hO, xN; +function iQ() { + if (xN) return hO; xN = 1; - var r = rQ(), e = "Expected a function"; + var r = nQ(), e = "Expected a function"; function t(n, i) { if (typeof n != "function" || i != null && typeof i != "function") throw new TypeError(e); @@ -21560,49 +21572,49 @@ function nQ() { }; return a.cache = new (t.Cache || r)(), a; } - return t.Cache = r, vO = t, vO; + return t.Cache = r, hO = t, hO; } -var pO, EN; -function iQ() { - if (EN) return pO; +var vO, EN; +function aQ() { + if (EN) return vO; EN = 1; - var r = nQ(), e = 500; + var r = iQ(), e = 500; function t(n) { var i = r(n, function(o) { return a.size === e && a.clear(), o; }), a = i.cache; return i; } - return pO = t, pO; + return vO = t, vO; } -var gO, SN; +var pO, SN; function OF() { - if (SN) return gO; + if (SN) return pO; SN = 1; - var r = iQ(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, t = /\\(\\)?/g, n = r(function(i) { + var r = aQ(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, t = /\\(\\)?/g, n = r(function(i) { var a = []; return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(o, s, u, l) { a.push(u ? l.replace(t, "$1") : s || o); }), a; }); - return gO = n, gO; + return pO = n, pO; } -var yO, ON; +var gO, ON; function TF() { - if (ON) return yO; + if (ON) return gO; ON = 1; function r(e, t) { for (var n = -1, i = e == null ? 0 : e.length, a = Array(i); ++n < i; ) a[n] = t(e[n], n, e); return a; } - return yO = r, yO; + return gO = r, gO; } -var mO, TN; -function aQ() { - if (TN) return mO; +var yO, TN; +function oQ() { + if (TN) return yO; TN = 1; - var r = G5(), e = TF(), t = k2(), n = X1(), i = r ? r.prototype : void 0, a = i ? i.toString : void 0; + var r = G5(), e = TF(), t = D2(), n = X1(), i = r ? r.prototype : void 0, a = i ? i.toString : void 0; function o(s) { if (typeof s == "string") return s; @@ -21613,31 +21625,31 @@ function aQ() { var u = s + ""; return u == "0" && 1 / s == -1 / 0 ? "-0" : u; } - return mO = o, mO; + return yO = o, yO; } -var bO, CN; +var mO, CN; function CF() { - if (CN) return bO; + if (CN) return mO; CN = 1; - var r = aQ(); + var r = oQ(); function e(t) { return t == null ? "" : r(t); } - return bO = e, bO; + return mO = e, mO; } -var _O, AN; +var bO, AN; function AF() { - if (AN) return _O; + if (AN) return bO; AN = 1; - var r = k2(), e = PZ(), t = OF(), n = CF(); + var r = D2(), e = MZ(), t = OF(), n = CF(); function i(a, o) { return r(a) ? a : e(a, o) ? [a] : t(n(a)); } - return _O = i, _O; + return bO = i, bO; } -var wO, RN; +var _O, RN; function J5() { - if (RN) return wO; + if (RN) return _O; RN = 1; var r = X1(); function e(t) { @@ -21646,11 +21658,11 @@ function J5() { var n = t + ""; return n == "0" && 1 / t == -1 / 0 ? "-0" : n; } - return wO = e, wO; + return _O = e, _O; } -var xO, PN; -function oQ() { - if (PN) return xO; +var wO, PN; +function sQ() { + if (PN) return wO; PN = 1; var r = AF(), e = J5(); function t(n, i) { @@ -21659,22 +21671,22 @@ function oQ() { n = n[e(i[a++])]; return a && a == o ? n : void 0; } - return xO = t, xO; + return wO = t, wO; } -var EO, MN; -function sQ() { - if (MN) return EO; +var xO, MN; +function uQ() { + if (MN) return xO; MN = 1; - var r = oQ(); + var r = sQ(); function e(t, n, i) { var a = t == null ? void 0 : r(t, n); return a === void 0 ? i : a; } - return EO = e, EO; + return xO = e, xO; } -var uQ = sQ(), lQ = /* @__PURE__ */ W1(uQ), SO, DN; -function cQ() { - if (DN) return SO; +var lQ = uQ(), cQ = /* @__PURE__ */ W1(lQ), EO, DN; +function fQ() { + if (DN) return EO; DN = 1; var r = Q5(), e = (function() { try { @@ -21683,13 +21695,13 @@ function cQ() { } catch { } })(); - return SO = e, SO; + return EO = e, EO; } -var OO, kN; -function fQ() { - if (kN) return OO; +var SO, kN; +function dQ() { + if (kN) return SO; kN = 1; - var r = cQ(); + var r = fQ(); function e(t, n, i) { n == "__proto__" && r ? r(t, n, { configurable: !0, @@ -21698,35 +21710,35 @@ function fQ() { writable: !0 }) : t[n] = i; } - return OO = e, OO; + return SO = e, SO; } -var TO, IN; -function dQ() { - if (IN) return TO; +var OO, IN; +function hQ() { + if (IN) return OO; IN = 1; - var r = fQ(), e = SF(), t = Object.prototype, n = t.hasOwnProperty; + var r = dQ(), e = SF(), t = Object.prototype, n = t.hasOwnProperty; function i(a, o, s) { var u = a[o]; (!(n.call(a, o) && e(u, s)) || s === void 0 && !(o in a)) && r(a, o, s); } - return TO = i, TO; + return OO = i, OO; } -var CO, NN; -function hQ() { - if (NN) return CO; +var TO, NN; +function vQ() { + if (NN) return TO; NN = 1; var r = 9007199254740991, e = /^(?:0|[1-9]\d*)$/; function t(n, i) { var a = typeof n; return i = i ?? r, !!i && (a == "number" || a != "symbol" && e.test(n)) && n > -1 && n % 1 == 0 && n < i; } - return CO = t, CO; + return TO = t, TO; } -var AO, LN; -function vQ() { - if (LN) return AO; +var CO, LN; +function pQ() { + if (LN) return CO; LN = 1; - var r = dQ(), e = AF(), t = hQ(), n = Y1(), i = J5(); + var r = hQ(), e = AF(), t = vQ(), n = Y1(), i = J5(); function a(o, s, u, l) { if (!n(o)) return o; @@ -21743,21 +21755,21 @@ function vQ() { } return o; } - return AO = a, AO; + return CO = a, CO; } -var RO, jN; -function pQ() { - if (jN) return RO; +var AO, jN; +function gQ() { + if (jN) return AO; jN = 1; - var r = vQ(); + var r = pQ(); function e(t, n, i) { return t == null ? t : r(t, n, i); } - return RO = e, RO; + return AO = e, AO; } -var gQ = pQ(), yQ = /* @__PURE__ */ W1(gQ), PO, BN; -function mQ() { - if (BN) return PO; +var yQ = gQ(), mQ = /* @__PURE__ */ W1(yQ), RO, BN; +function bQ() { + if (BN) return RO; BN = 1; function r(e, t) { var n = -1, i = e.length; @@ -21765,19 +21777,19 @@ function mQ() { t[n] = e[n]; return t; } - return PO = r, PO; + return RO = r, RO; } -var MO, FN; -function bQ() { - if (FN) return MO; +var PO, FN; +function _Q() { + if (FN) return PO; FN = 1; - var r = TF(), e = mQ(), t = k2(), n = X1(), i = OF(), a = J5(), o = CF(); + var r = TF(), e = bQ(), t = D2(), n = X1(), i = OF(), a = J5(), o = CF(); function s(u) { return t(u) ? r(u, a) : n(u) ? [u] : e(i(o(u))); } - return MO = s, MO; + return PO = s, PO; } -var _Q = bQ(), wQ = /* @__PURE__ */ W1(_Q), xQ = { +var wQ = _Q(), xQ = /* @__PURE__ */ W1(wQ), EQ = { // access data field data: function(e) { var t = { @@ -21805,10 +21817,10 @@ var _Q = bQ(), wQ = /* @__PURE__ */ W1(_Q), xQ = { return e = kr({}, t, e), function(i, a) { var o = e, s = this, u = s.length !== void 0, l = u ? s : [s], c = u ? s[0] : s; if (Ar(i)) { - var f = i.indexOf(".") !== -1, d = f && wQ(i); + var f = i.indexOf(".") !== -1, d = f && xQ(i); if (o.allowGetting && a === void 0) { var h; - return c && (o.beforeGet(c), d && c._private[o.field][i] === void 0 ? h = lQ(c._private[o.field], d) : h = c._private[o.field][i]), h; + return c && (o.beforeGet(c), d && c._private[o.field][i] === void 0 ? h = cQ(c._private[o.field], d) : h = c._private[o.field][i]), h; } else if (o.allowSetting && a !== void 0) { var p = !o.immutableKeys[i]; if (p) { @@ -21816,7 +21828,7 @@ var _Q = bQ(), wQ = /* @__PURE__ */ W1(_Q), xQ = { o.beforeSet(s, g); for (var y = 0, b = l.length; y < b; y++) { var _ = l[y]; - o.canSet(_) && (d && c._private[o.field][i] === void 0 ? yQ(_._private[o.field], d, a) : _._private[o.field][i] = a); + o.canSet(_) && (d && c._private[o.field][i] === void 0 ? mQ(_._private[o.field], d, a) : _._private[o.field][i] = a); } o.updateStyle && s.updateStyle(), o.onSet(s), o.settingTriggersEvent && s[o.triggerFnName](o.settingEvent); } @@ -21880,7 +21892,7 @@ var _Q = bQ(), wQ = /* @__PURE__ */ W1(_Q), xQ = { }; } // removeData -}, EQ = { +}, SQ = { eventAliasesOn: function(e) { var t = e; t.addListener = t.listen = t.bind = t.on, t.unlisten = t.unbind = t.off = t.removeListener, t.trigger = t.emit, t.pon = t.promiseOn = function(n, i) { @@ -21894,10 +21906,10 @@ var _Q = bQ(), wQ = /* @__PURE__ */ W1(_Q), xQ = { }; } }, Ci = {}; -[RZ, xQ, EQ].forEach(function(r) { +[PZ, EQ, SQ].forEach(function(r) { kr(Ci, r); }); -var SQ = { +var OQ = { animate: Ci.animate(), animation: Ci.animation(), animated: Ci.animated(), @@ -22037,7 +22049,7 @@ var Vi = function() { COMPOUND_SPLIT: 19, /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ TRUE: 20 -}, pM = [{ +}, vM = [{ selector: ":selected", matches: function(e) { return e.selected(); @@ -22183,14 +22195,14 @@ var Vi = function() { return !e.backgrounding(); } }].sort(function(r, e) { - return x$(r.selector, e.selector); -}), OQ = (function() { - for (var r = {}, e, t = 0; t < pM.length; t++) - e = pM[t], r[e.selector] = e.matches; + return E$(r.selector, e.selector); +}), TQ = (function() { + for (var r = {}, e, t = 0; t < vM.length; t++) + e = vM[t], r[e.selector] = e.matches; return r; -})(), TQ = function(e, t) { - return OQ[e](t); -}, CQ = "(" + pM.map(function(r) { +})(), CQ = function(e, t) { + return TQ[e](t); +}, AQ = "(" + vM.map(function(r) { return r.selector; }).join("|") + ")", $y = function(e) { return e.replace(new RegExp("\\\\(" + ni.metaChar + ")", "g"), function(t, n) { @@ -22198,7 +22210,7 @@ var Vi = function() { }); }, tp = function(e, t, n) { e[e.length - 1] = n; -}, gM = [{ +}, pM = [{ name: "group", // just used for identifying when debugging query: !0, @@ -22213,7 +22225,7 @@ var Vi = function() { }, { name: "state", query: !0, - regex: CQ, + regex: AQ, populate: function(e, t, n) { var i = Uo(n, 1), a = i[0]; t.checks.push({ @@ -22433,12 +22445,12 @@ var Vi = function() { a === nr.DIRECTED_EDGE ? i.type = nr.NODE_TARGET : a === nr.UNDIRECTED_EDGE && (i.type = nr.NODE_NEIGHBOR, i.node = i.nodes[1], i.neighbor = i.nodes[0], i.nodes = null); } }]; -gM.forEach(function(r) { +pM.forEach(function(r) { return r.regexObj = new RegExp("^" + r.regex); }); -var AQ = function(e) { - for (var t, n, i, a = 0; a < gM.length; a++) { - var o = gM[a], s = o.name, u = e.match(o.regexObj); +var RQ = function(e) { + for (var t, n, i, a = 0; a < pM.length; a++) { + var o = pM[a], s = o.name, u = e.match(o.regexObj); if (u != null) { n = u, t = o, i = s; var l = u[0]; @@ -22452,17 +22464,17 @@ var AQ = function(e) { name: i, remaining: e }; -}, RQ = function(e) { +}, PQ = function(e) { var t = e.match(/^\s+/); if (t) { var n = t[0]; e = e.substring(n.length); } return e; -}, PQ = function(e) { +}, MQ = function(e) { var t = this, n = t.inputText = e, i = t[0] = Vi(); - for (t.length = 1, n = RQ(n); ; ) { - var a = AQ(n); + for (t.length = 1, n = PQ(n); ; ) { + var a = RQ(n); if (a.expr == null) return Ai("The selector `" + e + "`is invalid"), !1; var o = a.match.slice(1), s = a.expr.populate(t, i, o); @@ -22482,7 +22494,7 @@ var AQ = function(e) { c.edgeCount === 1 && Ai("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; -}, MQ = function() { +}, DQ = function() { if (this.toStringCache != null) return this.toStringCache; for (var e = function(c) { @@ -22542,9 +22554,9 @@ var AQ = function(e) { o += a(u, u.subject), this.length > 1 && s < this.length - 1 && (o += ", "); } return this.toStringCache = o, o; -}, DQ = { - parse: PQ, - toString: MQ +}, kQ = { + parse: MQ, + toString: DQ }, RF = function(e, t, n) { var i, a = Ar(e), o = Ht(e), s = Ar(n), u, l, c = !1, f = !1, d = !1; switch (t.indexOf("!") >= 0 && (t = t.replace("!", ""), f = !0), t.indexOf("@") >= 0 && (t = t.replace("@", ""), c = !0), (a || s || c) && (u = !a && !o ? "" : "" + e, l = "" + n), c && (e = u = u.toLowerCase(), n = l = l.toLowerCase()), t) { @@ -22577,7 +22589,7 @@ var AQ = function(e) { break; } return f && (e != null || !d) && (i = !i), i; -}, kQ = function(e, t) { +}, IQ = function(e, t) { switch (t) { case "?": return !!e; @@ -22586,11 +22598,11 @@ var AQ = function(e) { case "^": return e === void 0; } -}, IQ = function(e) { +}, NQ = function(e) { return e !== void 0; }, eD = function(e, t) { return e.data(t); -}, NQ = function(e, t) { +}, LQ = function(e, t) { return e[t](); }, oo = [], Ea = function(e, t) { return e.checks.every(function(n) { @@ -22603,7 +22615,7 @@ oo[nr.GROUP] = function(r, e) { }; oo[nr.STATE] = function(r, e) { var t = r.value; - return TQ(t, e); + return CQ(t, e); }; oo[nr.ID] = function(r, e) { var t = r.value; @@ -22615,7 +22627,7 @@ oo[nr.CLASS] = function(r, e) { }; oo[nr.META_COMPARE] = function(r, e) { var t = r.field, n = r.operator, i = r.value; - return RF(NQ(e, t), n, i); + return RF(LQ(e, t), n, i); }; oo[nr.DATA_COMPARE] = function(r, e) { var t = r.field, n = r.operator, i = r.value; @@ -22623,11 +22635,11 @@ oo[nr.DATA_COMPARE] = function(r, e) { }; oo[nr.DATA_BOOL] = function(r, e) { var t = r.field, n = r.operator; - return kQ(eD(e, t), n); + return IQ(eD(e, t), n); }; oo[nr.DATA_EXIST] = function(r, e) { var t = r.field; - return r.operator, IQ(eD(e, t)); + return r.operator, NQ(eD(e, t)); }; oo[nr.UNDIRECTED_EDGE] = function(r, e) { var t = r.nodes[0], n = r.nodes[1], i = e.source(), a = e.target(); @@ -22683,7 +22695,7 @@ oo[nr.FILTER] = function(r, e) { var t = r.value; return t(e); }; -var LQ = function(e) { +var jQ = function(e) { var t = this; if (t.length === 1 && t[0].checks.length === 1 && t[0].checks[0].type === nr.ID) return e.getElementById(t[0].checks[0].value).collection(); @@ -22698,16 +22710,16 @@ var LQ = function(e) { return t.text() == null && (n = function() { return !0; }), e.filter(n); -}, jQ = function(e) { +}, BQ = function(e) { for (var t = this, n = 0; n < t.length; n++) { var i = t[n]; if (Ea(i, e)) return !0; } return !1; -}, BQ = { - matches: jQ, - filter: LQ +}, FQ = { + matches: BQ, + filter: jQ }, Dp = function(e) { this.inputText = e, this.currentSubject = null, this.compoundCount = 0, this.edgeCount = 0, this.length = 0, e == null || Ar(e) && e.match(/^\s*$/) || (rf(e) ? this.addQuery({ checks: [{ @@ -22721,7 +22733,7 @@ var LQ = function(e) { }] }) : Ar(e) ? this.parse(e) || (this.invalid = !0) : Ia("A selector must be created from a string; found ")); }, kp = Dp.prototype; -[DQ, BQ].forEach(function(r) { +[kQ, FQ].forEach(function(r) { return kr(kp, r); }); kp.text = function() { @@ -22923,12 +22935,12 @@ Fm.forEachUp = function(r) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; return tD(this, r, e, MF); }; -function FQ(r, e, t) { +function UQ(r, e, t) { MF(r, e, t), PF(r, e, t); } Fm.forEachUpAndDown = function(r) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; - return tD(this, r, e, FQ); + return tD(this, r, e, UQ); }; Fm.ancestors = Fm.parents; var w1, DF; @@ -23000,8 +23012,8 @@ w1 = DF = { }; w1.attr = w1.data; w1.removeAttr = w1.removeData; -var UQ = DF, j2 = {}; -function DO(r) { +var zQ = DF, L2 = {}; +function MO(r) { return function(e) { var t = this; if (e === void 0 && (e = !0), t.length !== 0) @@ -23015,14 +23027,14 @@ function DO(r) { return; }; } -kr(j2, { - degree: DO(function(r, e) { +kr(L2, { + degree: MO(function(r, e) { return e.source().same(e.target()) ? 2 : 1; }), - indegree: DO(function(r, e) { + indegree: MO(function(r, e) { return e.target().same(r) ? 1 : 0; }), - outdegree: DO(function(r, e) { + outdegree: MO(function(r, e) { return e.source().same(r) ? 1 : 0; }) }); @@ -23035,7 +23047,7 @@ function Ky(r, e) { return n; }; } -kr(j2, { +kr(L2, { minDegree: Ky("degree", function(r, e) { return r < e; }), @@ -23055,7 +23067,7 @@ kr(j2, { return r > e; }) }); -kr(j2, { +kr(L2, { totalDegree: function(e) { for (var t = 0, n = this.nodes(), i = 0; i < n.length; i++) t += n[i].degree(e); @@ -23167,7 +23179,7 @@ Cd = kF = { } else { var f = n.position(); - return s = M2(f, a, o), e === void 0 ? s : s[e]; + return s = P2(f, a, o), e === void 0 ? s : s[e]; } else if (!u) return; @@ -23211,7 +23223,7 @@ Cd.modelPosition = Cd.point = Cd.position; Cd.modelPositions = Cd.points = Cd.positions; Cd.renderedPoint = Cd.renderedPosition; Cd.relativePoint = Cd.relativePosition; -var zQ = kF, Sm, Gp; +var qQ = kF, Sm, Gp; Sm = Gp = {}; Gp.renderedBoundingBox = function(r) { var e = this.boundingBox(r), t = this.cy(), n = t.zoom(), i = t.pan(), a = e.x1 * n + i.x, o = e.x2 * n + i.x, s = e.y1 * n + i.y, u = e.y2 * n + i.y; @@ -23323,7 +23335,7 @@ var If = function(e) { f.x1 = u - o, f.y1 = l - o, f.x2 = u + o, f.y2 = l + o, f.w = f.x2 - f.x1, f.h = f.y2 - f.y1, $w(f, 1), xd(e, f.x1, f.y1, f.x2, f.y2); } } -}, kO = function(e, t, n) { +}, DO = function(e, t, n) { if (!t.cy().headless()) { var i; n ? i = n + "-" : i = ""; @@ -23360,9 +23372,9 @@ var If = function(e) { k += z, L += H, B += q, j += W; var $ = n || "main", J = a.labelBounds, X = J[$] = J[$] || {}; X.x1 = k, X.y1 = B, X.x2 = L, X.y2 = j, X.w = L - k, X.h = j - B, X.leftPad = z, X.rightPad = H, X.topPad = q, X.botPad = W; - var Q = y && b.strValue === "autorotate", ue = b.pfValue != null && b.pfValue !== 0; - if (Q || ue) { - var re = Q ? G0(a.rstyle, "labelAngle", n) : b.pfValue, ne = Math.cos(re), le = Math.sin(re), ce = (k + L) / 2, pe = (B + j) / 2; + var Z = y && b.strValue === "autorotate", ue = b.pfValue != null && b.pfValue !== 0; + if (Z || ue) { + var re = Z ? G0(a.rstyle, "labelAngle", n) : b.pfValue, ne = Math.cos(re), le = Math.sin(re), ce = (k + L) / 2, pe = (B + j) / 2; if (!y) { switch (u.value) { case "left": @@ -23389,8 +23401,8 @@ var If = function(e) { }, se = fe(k, B), de = fe(k, j), ge = fe(L, B), Oe = fe(L, j); k = Math.min(se.x, de.x, ge.x, Oe.x), L = Math.max(se.x, de.x, ge.x, Oe.x), B = Math.min(se.y, de.y, ge.y, Oe.y), j = Math.max(se.y, de.y, ge.y, Oe.y); } - var ke = $ + "Rot", Me = J[ke] = J[ke] || {}; - Me.x1 = k, Me.y1 = B, Me.x2 = L, Me.y2 = j, Me.w = L - k, Me.h = j - B, xd(e, k, B, L, j), xd(a.labelBounds.all, k, B, L, j); + var ke = $ + "Rot", De = J[ke] = J[ke] || {}; + De.x1 = k, De.y1 = B, De.x2 = L, De.y2 = j, De.w = L - k, De.h = j - B, xd(e, k, B, L, j), xd(a.labelBounds.all, k, B, L, j); } return e; } @@ -23408,12 +23420,12 @@ var If = function(e) { cp(e, g); } else o != null && o > 0 && Kw(e, [o, o, o, o]); } -}, qQ = function(e, t) { +}, GQ = function(e, t) { if (!t.cy().headless()) { var n = t.pstyle("border-opacity").value, i = t.pstyle("border-width").pfValue, a = t.pstyle("border-position").value; NF(e, t, n, i, a); } -}, GQ = function(e, t) { +}, VQ = function(e, t) { var n = e._private.cy, i = n.styleEnabled(), a = n.headless(), o = zl(), s = e._private, u = e.isNode(), l = e.isEdge(), c, f, d, h, p, g, y = s.rstyle, b = u && i ? e.pstyle("bounds-expansion").pfValue : [0], _ = function(Ne) { return Ne.pstyle("display").value !== "none"; }, m = !i || _(e) && (!l || _(e.source()) && _(e.target())); @@ -23427,7 +23439,7 @@ var If = function(e) { var k = e.position(); p = k.x, g = k.y; var L = e.outerWidth(), B = L / 2, j = e.outerHeight(), z = j / 2; - c = p - B, f = p + B, d = g - z, h = g + z, xd(o, c, d, f, h), i && zN(o, e), i && t.includeOutlines && !a && zN(o, e), i && qQ(o, e); + c = p - B, f = p + B, d = g - z, h = g + z, xd(o, c, d, f, h), i && zN(o, e), i && t.includeOutlines && !a && zN(o, e), i && GQ(o, e); } else if (l && t.includeEdges) if (i && !a) { var H = e.pstyle("curve-style").strValue; @@ -23460,8 +23472,8 @@ var If = function(e) { } if (J != null) for (var X = 0; X < J.length; X++) { - var Q = J[X]; - c = Q.x - I, f = Q.x + I, d = Q.y - I, h = Q.y + I, xd(o, c, d, f, h); + var Z = J[X]; + c = Z.x - I, f = Z.x + I, d = Z.y - I, h = Z.y + I, xd(o, c, d, f, h); } } } else { @@ -23488,7 +23500,7 @@ var If = function(e) { var Oe = s.overlayBounds = s.overlayBounds || {}; TI(Oe, o), Kw(Oe, b), $w(Oe, 1); var ke = s.labelBounds = s.labelBounds || {}; - ke.all != null ? SK(ke.all) : ke.all = zl(), i && t.includeLabels && (t.includeMainLabels && kO(o, e, null), l && (t.includeSourceLabels && kO(o, e, "source"), t.includeTargetLabels && kO(o, e, "target"))); + ke.all != null ? OK(ke.all) : ke.all = zl(), i && t.includeLabels && (t.includeMainLabels && DO(o, e, null), l && (t.includeSourceLabels && DO(o, e, "source"), t.includeTargetLabels && DO(o, e, "target"))); } return o.x1 = If(o.x1), o.y1 = If(o.y1), o.x2 = If(o.x2), o.y2 = If(o.y2), o.w = If(o.x2 - o.x1), o.h = If(o.y2 - o.y1), o.w > 0 && o.h > 0 && m && (Kw(o, b), $w(o, 1)), o; }, LF = function(e) { @@ -23509,7 +23521,7 @@ var If = function(e) { } }, qN = function(e, t) { var n = e._private, i, a = e.isEdge(), o = t == null ? GN : LF(t), s = o === GN; - if (n.bbCache == null ? (i = GQ(e, x1), n.bbCache = i, n.bbCachePosKey = jF(e)) : i = n.bbCache, !s) { + if (n.bbCache == null ? (i = VQ(e, x1), n.bbCache = i, n.bbCachePosKey = jF(e)) : i = n.bbCache, !s) { var u = e.isNode(); i = zl(), (t.includeNodes && u || t.includeEdges && !u) && (t.includeOverlays ? cp(i, n.overlayBounds) : cp(i, n.bodyBounds)), t.includeLabels && (t.includeMainLabels && (!a || t.includeSourceLabels && t.includeTargetLabels) ? cp(i, n.labelBounds.all) : (t.includeMainLabels && cp(i, n.labelBounds.mainRot), t.includeSourceLabels && cp(i, n.labelBounds.sourceRot), t.includeTargetLabels && cp(i, n.labelBounds.targetRot))), i.w = i.x2 - i.x1, i.h = i.y2 - i.y1; } @@ -23569,14 +23581,14 @@ Gp.boundingBoxAt = function(r) { return c._private.bbAtOldPos; }; t.startBatch(), e.forEach(o).silentPositions(r), n && (i.dirtyCompoundBoundsCache(), i.dirtyBoundingBoxCache(), i.updateCompoundBounds(!0)); - var u = EK(this.boundingBox({ + var u = SK(this.boundingBox({ useCache: !1 })); return e.silentPositions(s), n && (i.dirtyCompoundBoundsCache(), i.dirtyBoundingBoxCache(), i.updateCompoundBounds(!0)), t.endBatch(), u; }; Sm.boundingbox = Sm.bb = Sm.boundingBox; Sm.renderedBoundingbox = Sm.renderedBoundingBox; -var VQ = Gp, hb, Z1; +var HQ = Gp, hb, Z1; hb = Z1 = {}; var BF = function(e) { e.uppercaseName = aI(e.name), e.autoName = "auto" + e.uppercaseName, e.labelName = "label" + e.uppercaseName, e.outerName = "outer" + e.uppercaseName, e.uppercaseOuterName = aI(e.outerName), hb[e.name] = function() { @@ -23636,61 +23648,61 @@ Z1.paddedWidth = function() { var r = this[0]; return r.width() + 2 * r.padding(); }; -var HQ = Z1, WQ = function(e, t) { +var WQ = Z1, YQ = function(e, t) { if (e.isEdge() && e.takesUpSpace()) return t(e); -}, YQ = function(e, t) { +}, XQ = function(e, t) { if (e.isEdge() && e.takesUpSpace()) { var n = e.cy(); - return M2(t(e), n.zoom(), n.pan()); + return P2(t(e), n.zoom(), n.pan()); } -}, XQ = function(e, t) { +}, $Q = function(e, t) { if (e.isEdge() && e.takesUpSpace()) { var n = e.cy(), i = n.pan(), a = n.zoom(); return t(e).map(function(o) { - return M2(o, a, i); + return P2(o, a, i); }); } -}, $Q = function(e) { - return e.renderer().getControlPoints(e); }, KQ = function(e) { - return e.renderer().getSegmentPoints(e); + return e.renderer().getControlPoints(e); }, ZQ = function(e) { - return e.renderer().getSourceEndpoint(e); + return e.renderer().getSegmentPoints(e); }, QQ = function(e) { - return e.renderer().getTargetEndpoint(e); + return e.renderer().getSourceEndpoint(e); }, JQ = function(e) { + return e.renderer().getTargetEndpoint(e); +}, eJ = function(e) { return e.renderer().getEdgeMidpoint(e); }, HN = { controlPoints: { - get: $Q, + get: KQ, mult: !0 }, segmentPoints: { - get: KQ, + get: ZQ, mult: !0 }, sourceEndpoint: { - get: ZQ + get: QQ }, targetEndpoint: { - get: QQ + get: JQ }, midpoint: { - get: JQ + get: eJ } -}, eJ = function(e) { +}, tJ = function(e) { return "rendered" + e[0].toUpperCase() + e.substr(1); -}, tJ = Object.keys(HN).reduce(function(r, e) { - var t = HN[e], n = eJ(e); +}, rJ = Object.keys(HN).reduce(function(r, e) { + var t = HN[e], n = tJ(e); return r[e] = function() { - return WQ(this, t.get); + return YQ(this, t.get); }, t.mult ? r[n] = function() { - return XQ(this, t.get); + return $Q(this, t.get); } : r[n] = function() { - return YQ(this, t.get); + return XQ(this, t.get); }, r; -}, {}), rJ = kr({}, zQ, VQ, HQ, tJ); +}, {}), nJ = kr({}, qQ, HQ, WQ, rJ); /*! Event object based on jQuery events, MIT license @@ -23738,7 +23750,7 @@ FF.prototype = { isPropagationStopped: V0, isImmediatePropagationStopped: V0 }; -var UF = /^([^.]+)(\.(?:[^.]+))?$/, nJ = ".*", zF = { +var UF = /^([^.]+)(\.(?:[^.]+))?$/, iJ = ".*", zF = { qualifierCompare: function(e, t) { return e === t; }, @@ -23761,15 +23773,15 @@ var UF = /^([^.]+)(\.(?:[^.]+))?$/, nJ = ".*", zF = { return null; }, context: null -}, WN = Object.keys(zF), iJ = {}; -function B2() { - for (var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iJ, e = arguments.length > 1 ? arguments[1] : void 0, t = 0; t < WN.length; t++) { +}, WN = Object.keys(zF), aJ = {}; +function j2() { + for (var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : aJ, e = arguments.length > 1 ? arguments[1] : void 0, t = 0; t < WN.length; t++) { var n = WN[t]; this[n] = r[n] || zF[n]; } this.context = e || this.context, this.listeners = [], this.emitting = 0; } -var Ip = B2.prototype, qF = function(e, t, n, i, a, o, s) { +var Ip = j2.prototype, qF = function(e, t, n, i, a, o, s) { Ya(i) && (a = i, i = null), s && (o == null ? o = s : o = kr({}, o, s)); for (var u = ra(n) ? n : n.split(/\s+/), l = 0; l < u.length; l++) { var c = u[l]; @@ -23784,8 +23796,8 @@ var Ip = B2.prototype, qF = function(e, t, n, i, a, o, s) { } }, YN = function(e, t) { return e.addEventFields(e.context, t), new FF(t.type, t); -}, aJ = function(e, t, n) { - if (f$(n)) { +}, oJ = function(e, t, n) { + if (d$(n)) { t(e, n); return; } else if (ai(n)) { @@ -23832,7 +23844,7 @@ Ip.one = function(r, e, t, n) { }; Ip.removeListener = Ip.off = function(r, e, t, n) { var i = this; - this.emitting !== 0 && (this.listeners = Y$(this.listeners)); + this.emitting !== 0 && (this.listeners = X$(this.listeners)); for (var a = this.listeners, o = function(l) { var c = a[l]; qF(i, function(f, d, h, p, g, y) { @@ -23848,7 +23860,7 @@ Ip.removeAllListeners = function() { }; Ip.emit = Ip.trigger = function(r, e, t) { var n = this.listeners, i = n.length; - return this.emitting++, ra(e) || (e = [e]), aJ(this, function(a, o) { + return this.emitting++, ra(e) || (e = [e]), oJ(this, function(a, o) { t != null && (n = [{ event: o.event, type: o.type, @@ -23857,9 +23869,9 @@ Ip.emit = Ip.trigger = function(r, e, t) { }], i = n.length); for (var s = function() { var c = n[u]; - if (c.type === o.type && (!c.namespace || c.namespace === o.namespace || c.namespace === nJ) && a.eventMatches(a.context, c, o)) { + if (c.type === o.type && (!c.namespace || c.namespace === o.namespace || c.namespace === iJ) && a.eventMatches(a.context, c, o)) { var f = [o]; - e != null && $$(f, e), a.beforeEmit(a.context, c, o), c.conf && c.conf.one && (a.listeners = a.listeners.filter(function(p) { + e != null && K$(f, e), a.beforeEmit(a.context, c, o), c.conf && c.conf.one && (a.listeners = a.listeners.filter(function(p) { return p !== c; })); var d = a.callbackContext(a.context, c, o), h = c.callback.apply(d, f); @@ -23870,7 +23882,7 @@ Ip.emit = Ip.trigger = function(r, e, t) { a.bubble(a.context) && !o.isPropagationStopped() && a.parent(a.context).emit(o, e); }, r), this.emitting--, this; }; -var oJ = { +var sJ = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, @@ -23899,7 +23911,7 @@ var oJ = { createEmitter: function() { for (var e = 0; e < this.length; e++) { var t = this[e], n = t._private; - n.emitter || (n.emitter = new B2(oJ, t)); + n.emitter || (n.emitter = new j2(sJ, t)); } return this; }, @@ -24160,7 +24172,7 @@ ci.n = ci["&"] = ci["."] = ci.and = ci.intersection = ci.intersect; ci["^"] = ci["(+)"] = ci["(-)"] = ci.symmetricDifference = ci.symdiff = ci.xor; ci.fnFilter = ci.filterFn = ci.stdFilter = ci.filter; ci.complement = ci.abscomp = ci.absoluteComplement; -var sJ = { +var uJ = { isNode: function() { return this.group() === "nodes"; }, @@ -24260,7 +24272,7 @@ var sJ = { } }; Lx.each = Lx.forEach; -var uJ = function() { +var lJ = function() { var e = "undefined", t = (typeof Symbol > "u" ? "undefined" : ls(Symbol)) != e && ls(Symbol.iterator) != e; t && (Lx[Symbol.iterator] = function() { var n = this, i = { @@ -24276,13 +24288,13 @@ var uJ = function() { }); }); }; -uJ(); -var lJ = fu({ +lJ(); +var cJ = fu({ nodeDimensionsIncludeLabels: !1 }), Qw = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function(e) { - e = lJ(e); + e = cJ(e); var t; if (!this.takesUpSpace()) t = { @@ -24409,12 +24421,12 @@ function WF(r, e, t) { var n = t._private, i = n.styleCache = n.styleCache || [], a; return (a = i[r]) != null || (a = i[r] = e(t)), a; } -function F2(r, e) { +function B2(r, e) { return r = Hg(r), function(n) { return WF(r, e, n); }; } -function U2(r, e) { +function F2(r, e) { r = Hg(r); var t = function(i) { return e.call(i); @@ -24579,7 +24591,7 @@ var su = { return !!t._private.backgrounding; } }; -function IO(r, e) { +function kO(r, e) { var t = r._private, n = t.data.parent ? r.parents() : null; if (n) for (var i = 0; i < n.length; i++) { @@ -24601,26 +24613,26 @@ function rD(r) { if (!e(a)) return !1; if (a.isNode()) - return !o || IO(a, n); + return !o || kO(a, n); var u = s.source, l = s.target; - return t(u) && (!o || IO(u, t)) && (u === l || t(l) && (!o || IO(l, t))); + return t(u) && (!o || kO(u, t)) && (u === l || t(l) && (!o || kO(l, t))); } }; } -var Zm = F2("eleTakesUpSpace", function(r) { +var Zm = B2("eleTakesUpSpace", function(r) { return r.pstyle("display").value === "element" && r.width() !== 0 && (r.isNode() ? r.height() !== 0 : !0); }); -su.takesUpSpace = U2("takesUpSpace", rD({ +su.takesUpSpace = F2("takesUpSpace", rD({ ok: Zm })); -var cJ = F2("eleInteractive", function(r) { +var fJ = B2("eleInteractive", function(r) { return r.pstyle("events").value === "yes" && r.pstyle("visibility").value === "visible" && Zm(r); -}), fJ = F2("parentInteractive", function(r) { +}), dJ = B2("parentInteractive", function(r) { return r.pstyle("visibility").value === "visible" && Zm(r); }); -su.interactive = U2("interactive", rD({ - ok: cJ, - parentOk: fJ, +su.interactive = F2("interactive", rD({ + ok: fJ, + parentOk: dJ, edgeOkViaNode: Zm })); su.noninteractive = function() { @@ -24628,19 +24640,19 @@ su.noninteractive = function() { if (r) return !r.interactive(); }; -var dJ = F2("eleVisible", function(r) { +var hJ = B2("eleVisible", function(r) { return r.pstyle("visibility").value === "visible" && r.pstyle("opacity").pfValue !== 0 && Zm(r); -}), hJ = Zm; -su.visible = U2("visible", rD({ - ok: dJ, - edgeOkViaNode: hJ +}), vJ = Zm; +su.visible = F2("visible", rD({ + ok: hJ, + edgeOkViaNode: vJ })); su.hidden = function() { var r = this[0]; if (r) return !r.visible(); }; -su.isBundledBezier = U2("isBundledBezier", function() { +su.isBundledBezier = F2("isBundledBezier", function() { return this.cy().styleEnabled() ? !this.removed() && this.pstyle("curve-style").value === "bezier" && this.takesUpSpace() : !1; }); su.bypass = su.css = su.style; @@ -24982,7 +24994,7 @@ var uu = function(e, t) { d.id = oF(); else if (e.hasElementWithId(d.id) || u.has(d.id)) continue; - var h = new P2(e, f, !1); + var h = new R2(e, f, !1); s.push(h), u.add(d.id); } t = s; @@ -25017,7 +25029,7 @@ var uu = function(e, t) { } } }, n && (this._private.map = a), o && !i && this.restore(); -}, va = P2.prototype = uu.prototype = Object.create(Array.prototype); +}, va = R2.prototype = uu.prototype = Object.create(Array.prototype); va.instanceString = function() { return "collection"; }; @@ -25118,7 +25130,7 @@ va.jsons = function() { }; va.clone = function() { for (var r = this.cy(), e = [], t = 0; t < this.length; t++) { - var n = this[t], i = n.json(), a = new P2(r, i, !1); + var n = this[t], i = n.json(), a = new R2(r, i, !1); e.push(a); } return new uu(r, e); @@ -25197,8 +25209,8 @@ va.restore = function() { var X = $[J]; X.isNode() || (X.parallelEdges().clearTraversalCache(), X.source().clearTraversalCache(), X.target().clearTraversalCache()); } - var Q; - i.hasCompoundNodes ? Q = n.collection().merge($).merge($.connectedNodes()).merge($.parent()) : Q = $, Q.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r), r ? $.emitAndNotify("add") : e && $.emit("add"); + var Z; + i.hasCompoundNodes ? Z = n.collection().merge($).merge($.connectedNodes()).merge($.parent()) : Z = $, Z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r), r ? $.emitAndNotify("add") : e && $.emit("add"); } return t; }; @@ -25306,10 +25318,10 @@ va.move = function(r) { } return this; }; -[mF, SQ, Zw, xp, Fm, UQ, j2, rJ, GF, VF, sJ, Lx, Qw, su, Ep, $u].forEach(function(r) { +[mF, OQ, Zw, xp, Fm, zQ, L2, nJ, GF, VF, uJ, Lx, Qw, su, Ep, $u].forEach(function(r) { kr(va, r); }); -var vJ = { +var pJ = { add: function(e) { var t, n = this; if (rf(e)) { @@ -25340,7 +25352,7 @@ var vJ = { t = new uu(n, c); } else { var m = e; - t = new P2(n, m).collection(); + t = new R2(n, m).collection(); } return t; }, @@ -25355,7 +25367,7 @@ var vJ = { } }; /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ -function pJ(r, e, t, n) { +function gJ(r, e, t, n) { var i = 4, a = 1e-3, o = 1e-7, s = 10, u = 11, l = 1 / (u - 1), c = typeof Float32Array < "u"; if (arguments.length !== 4) return !1; @@ -25429,7 +25441,7 @@ function pJ(r, e, t, n) { }, T; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ -var gJ = /* @__PURE__ */ (function() { +var yJ = /* @__PURE__ */ (function() { function r(n) { return -n.tension * n.x - n.friction * n.v; } @@ -25466,7 +25478,7 @@ var gJ = /* @__PURE__ */ (function() { } : l; }; })(), fa = function(e, t, n, i) { - var a = pJ(e, t, n, i); + var a = gJ(e, t, n, i); return function(o, s, u) { return o + (s - o) * a(u); }; @@ -25511,7 +25523,7 @@ var gJ = /* @__PURE__ */ (function() { spring: function(e, t, n) { if (n === 0) return Jw.linear; - var i = gJ(e, t, n); + var i = yJ(e, t, n); return function(a, o, s) { return a + (o - a) * i(s); }; @@ -25545,7 +25557,7 @@ function Zy(r, e, t, n, i) { return u; } } -function yJ(r, e, t, n) { +function mJ(r, e, t, n) { var i = !n, a = r._private, o = e._private, s = o.easing, u = o.startTime, l = n ? r : r.cy(), c = l.style(); if (!o.easingImpl) if (s == null) @@ -25587,7 +25599,7 @@ function yJ(r, e, t, n) { function H0(r, e) { return r == null || e == null ? !1 : Ht(r) && Ht(e) ? !0 : !!(r && e); } -function mJ(r, e, t, n) { +function bJ(r, e, t, n) { var i = e._private; i.started = !0, i.startTime = t - i.progress * i.duration; } @@ -25611,7 +25623,7 @@ function n3(r, e) { h.splice(_, 1), x.hooked = !1, x.playing = !1, x.started = !1, b(x.frames); continue; } - !x.playing && !x.applying || (x.playing && x.applying && (x.applying = !1), x.started || mJ(c, m, r), yJ(c, m, r, f), x.applying && (x.applying = !1), b(x.frames), x.step != null && x.step(r), m.completed() && (h.splice(_, 1), x.hooked = !1, x.playing = !1, x.started = !1, b(x.completes)), g = !0); + !x.playing && !x.applying || (x.playing && x.applying && (x.applying = !1), x.started || bJ(c, m, r), mJ(c, m, r, f), x.applying && (x.applying = !1), b(x.frames), x.step != null && x.step(r), m.completed() && (h.splice(_, 1), x.hooked = !1, x.playing = !1, x.started = !1, b(x.completes)), g = !0); } return !f && h.length === 0 && p.length === 0 && n.push(c), g; } @@ -25622,7 +25634,7 @@ function n3(r, e) { var l = i(e, !0); (a || l) && (t.length > 0 ? e.notify("draw", t) : e.notify("draw")), t.unmerge(n), e.emit("step"); } -var bJ = { +var _J = { // pull in animation functions animate: Ci.animate(), animation: Ci.animation(), @@ -25652,7 +25664,7 @@ var bJ = { n3(o, e); }, n.beforeRenderPriorities.animations) : t(); } -}, _J = { +}, wJ = { qualifierCompare: function(e, t) { return e == null || t == null ? e == null && t == null : e.sameText(t); }, @@ -25671,7 +25683,7 @@ var bJ = { }, YF = { createEmitter: function() { var e = this._private; - return e.emitter || (e.emitter = new B2(_J, this)), this; + return e.emitter || (e.emitter = new j2(wJ, this)), this; }, emitter: function() { return this._private.emitter; @@ -25699,7 +25711,7 @@ var bJ = { } }; Ci.eventAliasesOn(YF); -var yM = { +var gM = { png: function(e) { var t = this._private.renderer; return e = e || {}, t.png(e); @@ -25709,7 +25721,7 @@ var yM = { return e = e || {}, e.bg = e.bg || "#fff", t.jpg(e); } }; -yM.jpeg = yM.jpg; +gM.jpeg = gM.jpg; var ex = { layout: function(e) { var t = this; @@ -25736,7 +25748,7 @@ var ex = { } }; ex.createLayout = ex.makeLayout = ex.layout; -var wJ = { +var xJ = { notify: function(e, t) { var n = this._private; if (this.batching()) { @@ -25791,7 +25803,7 @@ var wJ = { } }); } -}, xJ = fu({ +}, EJ = fu({ hideEdgesOnViewport: !1, textureOnViewport: !1, motionBlur: !1, @@ -25813,7 +25825,7 @@ var wJ = { webglBatchSize: 2048, webglTexPerBatch: 14, webglBgColor: [255, 255, 255] -}), mM = { +}), yM = { renderTo: function(e, t, n, i) { var a = this._private.renderer; return a.renderTo(e, t, n, i), this; @@ -25834,7 +25846,7 @@ var wJ = { return; } e.wheelSensitivity !== void 0 && Ai("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); - var i = xJ(e); + var i = EJ(e); i.cy = t, t._private.renderer = new n(i), this.notify("init"); }, destroyRenderer: function() { @@ -25856,7 +25868,7 @@ var wJ = { return this.off("render", e); } }; -mM.invalidateDimensions = mM.resize; +yM.invalidateDimensions = yM.resize; var tx = { // get a collection // - empty collection on no args @@ -25887,7 +25899,7 @@ var tx = { } }; tx.elements = tx.filter = tx.$; -var js = {}, Mb = "t", EJ = "f"; +var js = {}, Mb = "t", SJ = "f"; js.apply = function(r) { for (var e = this, t = e._private, n = t.cy, i = n.collection(), a = 0; a < r.length; a++) { var o = r[a], s = e.getContextMeta(o); @@ -25924,7 +25936,7 @@ js.getPropertiesDiff = function(r, e) { js.getContextMeta = function(r) { for (var e = this, t = "", n, i = r._private.styleCxtKey || "", a = 0; a < e.length; a++) { var o = e[a], s = o.selector && o.selector.matches(r); - s ? t += Mb : t += EJ; + s ? t += Mb : t += SJ; } return n = e.getPropertiesDiff(i, t), r._private.styleCxtKey = t, { key: t, @@ -25999,8 +26011,8 @@ js.updateStyleHints = function(r) { f(ge, Oe), d(ge, Oe); }, p = function(ge, Oe) { for (var ke = 0; ke < ge.length; ke++) { - var Me = ge.charCodeAt(ke); - f(Me, Oe), d(Me, Oe); + var De = ge.charCodeAt(ke); + f(De, Oe), d(De, Oe); } }, g = 2e9, y = function(ge) { return -128 < ge && ge < 128 && Math.floor(ge) !== ge ? g - (ge * 1024 | 0) : ge; @@ -26021,7 +26033,7 @@ js.updateStyleHints = function(r) { var H = i[z], q = e.styleKeys[H]; j[0] = g1(q[0], j[0]), j[1] = y1(q[1], j[1]); } - e.styleKey = F$(j[0], j[1]); + e.styleKey = U$(j[0], j[1]); var W = e.styleKeys; e.labelDimsKey = ep(W.labelDimensions); var $ = a(r, ["label"], W.labelDimensions); @@ -26032,7 +26044,7 @@ js.updateStyleHints = function(r) { e.targetLabelKey = ep(X), e.targetLabelStyleKey = ep(fw(W.commonLabel, X)); } if (s) { - var Q = e.styleKeys, ue = Q.nodeBody, re = Q.nodeBorder, ne = Q.nodeOutline, le = Q.backgroundImage, ce = Q.compound, pe = Q.pie, fe = Q.stripe, se = [ue, re, ne, le, ce, pe, fe].filter(function(de) { + var Z = e.styleKeys, ue = Z.nodeBody, re = Z.nodeBorder, ne = Z.nodeOutline, le = Z.backgroundImage, ce = Z.compound, pe = Z.pie, fe = Z.stripe, se = [ue, re, ne, le, ce, pe, fe].filter(function(de) { return de != null; }).reduce(fw, [Ig, lm]); e.nodeKey = ep(se), e.hasPie = pe != null && pe[0] !== Ig && pe[1] !== lm, e.hasStripe = fe != null && fe[0] !== Ig && fe[1] !== lm; @@ -26223,7 +26235,7 @@ Q1.applyBypass = function(r, e, t, n) { n = t; for (var h = Object.keys(d), p = 0; p < h.length; p++) { var g = h[p], y = d[g]; - if (y === void 0 && (y = d[A2(g)]), y !== void 0) { + if (y === void 0 && (y = d[C2(g)]), y !== void 0) { var b = this.parse(g, y, !0); b && a.push(b); } @@ -26290,7 +26302,7 @@ wh.getRawStyle = function(r, e) { if (r = r[0], r) { for (var n = {}, i = 0; i < t.properties.length; i++) { var a = t.properties[i], o = t.getStylePropertyValue(r, a.name, e); - o != null && (n[a.name] = o, n[A2(a.name)] = o); + o != null && (n[a.name] = o, n[C2(a.name)] = o); } return n; } @@ -26354,8 +26366,8 @@ wh.getNonDefaultPropertiesHash = function(r, e, t) { return n; }; wh.getPropertiesHash = wh.getNonDefaultPropertiesHash; -var z2 = {}; -z2.appendFromJson = function(r) { +var U2 = {}; +U2.appendFromJson = function(r) { for (var e = this, t = 0; t < r.length; t++) { var n = r[t], i = n.selector, a = n.style || n.css, o = Object.keys(a); e.selector(i); @@ -26366,11 +26378,11 @@ z2.appendFromJson = function(r) { } return e; }; -z2.fromJson = function(r) { +U2.fromJson = function(r) { var e = this; return e.resetToDefault(), e.appendFromJson(r), e; }; -z2.json = function() { +U2.json = function() { for (var r = [], e = this.defaultLength; e < this.length; e++) { for (var t = this[e], n = t.selector, i = t.properties, a = {}, o = 0; o < i.length; o++) { var s = i[o]; @@ -26457,7 +26469,7 @@ iD.fromString = function(r) { }; var Fo = {}; (function() { - var r = us, e = y$, t = b$, n = _$, i = w$, a = function(de) { + var r = us, e = m$, t = _$, n = w$, i = x$, a = function(de) { return "^" + de + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"; }, o = function(de) { var ge = r + "|\\w+|" + e + "|" + t + "|" + n + "|" + i; @@ -27528,8 +27540,8 @@ var Fo = {}; edgeLine: I, edgeArrow: q, core: L - }, X = Fo.propertyGroupNames = {}, Q = Fo.propertyGroupKeys = Object.keys(J); - Q.forEach(function(se) { + }, X = Fo.propertyGroupNames = {}, Z = Fo.propertyGroupKeys = Object.keys(J); + Z.forEach(function(se) { X[se] = J[se].map(function(de) { return de.name; }), J[se].forEach(function(de) { @@ -27860,19 +27872,19 @@ Fo.addDefaultStylesheet = function() { "overlay-opacity": 0.25 }), this.defaultLength = this.length; }; -var q2 = {}; -q2.parse = function(r, e, t, n) { +var z2 = {}; +z2.parse = function(r, e, t, n) { var i = this; if (Ya(e)) return i.parseImplWarn(r, e, t, n); var a = n === "mapping" || n === !0 || n === !1 || n == null ? "dontcare" : n, o = t ? "t" : "f", s = "" + e, u = nF(r, s, o, a), l = i.propCache = i.propCache || [], c; return (c = l[u]) || (c = l[u] = i.parseImplWarn(r, e, t, n)), (t || n === "mapping") && (c = bh(c), c && (c.value = bh(c.value))), c; }; -q2.parseImplWarn = function(r, e, t, n) { +z2.parseImplWarn = function(r, e, t, n) { var i = this.parseImpl(r, e, t, n); return !i && e != null && Ai("The style property `".concat(r, ": ").concat(e, "` is invalid")), i && (i.name === "width" || i.name === "height") && e === "label" && Ai("The style value of `label` is deprecated for `" + i.name + "`"), i; }; -q2.parseImpl = function(r, e, t, n) { +z2.parseImpl = function(r, e, t, n) { var i = this; r = q5(r); var a = i.properties[r], o = e, s = i.types; @@ -27996,7 +28008,7 @@ q2.parseImpl = function(r, e, t, n) { return null; if (isNaN(e) && l.enums !== void 0) return e = o, k(); - if (l.integer && !c$(e) || l.min !== void 0 && (e < l.min || l.strictMin && e === l.min) || l.max !== void 0 && (e > l.max || l.strictMax && e === l.max)) + if (l.integer && !f$(e) || l.min !== void 0 && (e < l.min || l.strictMin && e === l.min) || l.max !== void 0 && (e > l.max || l.strictMax && e === l.max)) return null; var H = { name: r, @@ -28005,7 +28017,7 @@ q2.parseImpl = function(r, e, t, n) { units: L, bypass: t }; - return l.unitless || L !== "px" && L !== "em" ? H.pfValue = e : H.pfValue = L === "px" || !L ? e : this.getEmSizeInPixels() * e, (L === "ms" || L === "s") && (H.pfValue = L === "ms" ? e : 1e3 * e), (L === "deg" || L === "rad") && (H.pfValue = L === "rad" ? e : _K(e)), L === "%" && (H.pfValue = e / 100), H; + return l.unitless || L !== "px" && L !== "em" ? H.pfValue = e : H.pfValue = L === "px" || !L ? e : this.getEmSizeInPixels() * e, (L === "ms" || L === "s") && (H.pfValue = L === "ms" ? e : 1e3 * e), (L === "deg" || L === "rad") && (H.pfValue = L === "rad" ? e : wK(e)), L === "%" && (H.pfValue = e / 100), H; } else if (l.propList) { var q = [], W = "" + e; if (W !== "none") { @@ -28023,12 +28035,12 @@ q2.parseImpl = function(r, e, t, n) { bypass: t }; } else if (l.color) { - var Q = K7(e); - return Q ? { + var Z = K7(e); + return Z ? { name: r, - value: Q, - pfValue: Q, - strValue: "rgb(" + Q[0] + "," + Q[1] + "," + Q[2] + ")", + value: Z, + pfValue: Z, + strValue: "rgb(" + Z[0] + "," + Z[1] + "," + Z[2] + ")", // n.b. no spaces b/c of multiple support bypass: t } : null; @@ -28099,7 +28111,7 @@ Ku.css = function() { if (e.length === 1) for (var t = e[0], n = 0; n < r.properties.length; n++) { var i = r.properties[n], a = t[i.name]; - a === void 0 && (a = t[A2(i.name)]), a !== void 0 && this.cssRule(i.name, a); + a === void 0 && (a = t[C2(i.name)]), a !== void 0 && this.cssRule(i.name, a); } else e.length === 2 && this.cssRule(e[0], e[1]); return this; @@ -28125,7 +28137,7 @@ Ls.fromJson = function(r, e) { Ls.fromString = function(r, e) { return new Ls(r).fromString(e); }; -[js, Q1, nD, wh, z2, iD, Fo, q2].forEach(function(r) { +[js, Q1, nD, wh, U2, iD, Fo, z2].forEach(function(r) { kr(Ku, r); }); Ls.types = Ku.types; @@ -28133,7 +28145,7 @@ Ls.properties = Ku.properties; Ls.propertyGroups = Ku.propertyGroups; Ls.propertyGroupNames = Ku.propertyGroupNames; Ls.propertyGroupKeys = Ku.propertyGroupKeys; -var SJ = { +var OJ = { style: function(e) { if (e) { var t = this.setStyle(e); @@ -28149,7 +28161,7 @@ var SJ = { updateStyle: function() { this.mutableElements().updateStyle(); } -}, OJ = "single", Xg = { +}, TJ = "single", Xg = { autolock: function(e) { if (e !== void 0) this._private.autolock = !!e; @@ -28173,7 +28185,7 @@ var SJ = { }, selectionType: function(e) { var t = this._private; - if (t.selectionType == null && (t.selectionType = OJ), e !== void 0) + if (t.selectionType == null && (t.selectionType = TJ), e !== void 0) (e === "additive" || e === "single") && (t.selectionType = e); else return t.selectionType; @@ -28267,7 +28279,7 @@ var SJ = { if (Ar(e)) { var i = e; e = this.$(i); - } else if (h$(e)) { + } else if (v$(e)) { var a = e; n = { x1: a.x1, @@ -28314,7 +28326,7 @@ var SJ = { }, getZoomedViewport: function(e) { var t = this._private, n = t.pan, i = t.zoom, a, o, s = !1; - if (t.zoomingEnabled || (s = !0), Ht(e) ? o = e : ai(e) && (o = e.level, e.position != null ? a = M2(e.position, i, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (s = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, s || !Ht(o) || o === i || a != null && (!Ht(a.x) || !Ht(a.y))) + if (t.zoomingEnabled || (s = !0), Ht(e) ? o = e : ai(e) && (o = e.level, e.position != null ? a = P2(e.position, i, n) : e.renderedPosition != null && (a = e.renderedPosition), a != null && !t.panningEnabled && (s = !0)), o = o > t.maxZoom ? t.maxZoom : o, o = o < t.minZoom ? t.minZoom : o, s || !Ht(o) || o === i || a != null && (!Ht(a.x) || !Ht(a.y))) return null; if (a != null) { var u = n, l = i, c = o, f = { @@ -28551,7 +28563,7 @@ var S1 = function(e) { max: s.maxZoom }); var c = function(p, g) { - var y = p.some(v$); + var y = p.some(p$); if (y) return Km.all(p).then(g); g(p); @@ -28713,10 +28725,10 @@ kr(jx, { } }); jx.$id = jx.getElementById; -[vJ, bJ, YF, yM, ex, wJ, mM, tx, SJ, Xg, E1].forEach(function(r) { +[pJ, _J, YF, gM, ex, xJ, yM, tx, OJ, Xg, E1].forEach(function(r) { kr(jx, r); }); -var TJ = { +var CJ = { fit: !0, // whether to fit the viewport to the graph directed: !1, @@ -28759,7 +28771,7 @@ var TJ = { return t; } // transform a given node position. Useful for changing flow direction in discrete layouts -}, CJ = { +}, AJ = { maximal: !1, // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also acyclic: !1 @@ -28770,11 +28782,11 @@ var TJ = { return e.scratch("breadthfirst", t); }; function XF(r) { - this.options = kr({}, TJ, CJ, r); + this.options = kr({}, CJ, AJ, r); } XF.prototype.run = function() { - var r = this.options, e = r.cy, t = r.eles, n = t.nodes().filter(function(Z) { - return Z.isChildless(); + var r = this.options, e = r.cy, t = r.eles, n = t.nodes().filter(function(Q) { + return Q.isChildless(); }), i = t, a = r.directed, o = r.acyclic || r.maximal || r.maximalAdjustments > 0, s = !!r.boundingBox, u = zl(s ? r.boundingBox : structuredClone(e.extent())), l; if (rf(r.roots)) l = r.roots; @@ -28792,8 +28804,8 @@ XF.prototype.run = function() { var p = t.components(); l = e.collection(); for (var g = function() { - var ie = p[y], we = ie.maxDegree(!1), Ee = ie.filter(function(De) { - return De.degree(!1) === we; + var ie = p[y], we = ie.maxDegree(!1), Ee = ie.filter(function(Me) { + return Me.degree(!1) === we; }); l = l.add(Ee); }, y = 0; y < p.length; y++) @@ -28807,13 +28819,13 @@ XF.prototype.run = function() { depth: we }); }, x = function(ie, we) { - var Ee = Qy(ie), De = Ee.depth, Ie = Ee.index; - b[De][Ie] = null, ie.isChildless() && m(ie, we); + var Ee = Qy(ie), Me = Ee.depth, Ie = Ee.index; + b[Me][Ie] = null, ie.isChildless() && m(ie, we); }; i.bfs({ roots: l, directed: r.directed, - visit: function(ie, we, Ee, De, Ie) { + visit: function(ie, we, Ee, Me, Ie) { var Ye = ie[0], ot = Ye.id(); Ye.isChildless() && m(Ye, Ie), _[ot] = !0; } @@ -28824,21 +28836,21 @@ XF.prototype.run = function() { } var T = function(ie) { for (var we = b[ie], Ee = 0; Ee < we.length; Ee++) { - var De = we[Ee]; - if (De == null) { + var Me = we[Ee]; + if (Me == null) { we.splice(Ee, 1), Ee--; continue; } - i3(De, { + i3(Me, { depth: ie, index: Ee }); } }, P = function(ie, we) { - for (var Ee = Qy(ie), De = ie.incomers().filter(function(Dt) { + for (var Ee = Qy(ie), Me = ie.incomers().filter(function(Dt) { return Dt.isNode() && t.has(Dt); - }), Ie = -1, Ye = ie.id(), ot = 0; ot < De.length; ot++) { - var mt = De[ot], wt = Qy(mt); + }), Ie = -1, Ye = ie.id(), ot = 0; ot < Me.length; ot++) { + var mt = Me[ot], wt = Qy(mt); Ie = Math.max(Ie, wt.depth); } if (Ee.depth <= Ie) { @@ -28855,13 +28867,13 @@ XF.prototype.run = function() { }, B = function() { return I.shift(); }; - for (n.forEach(function(Z) { - return I.push(Z); + for (n.forEach(function(Q) { + return I.push(Q); }); I.length > 0; ) { var j = B(), z = P(j, k); if (z) - j.outgoers().filter(function(Z) { - return Z.isNode() && t.has(Z); + j.outgoers().filter(function(Q) { + return Q.isNode() && t.has(Q); }).forEach(L); else if (z === null) { Ai("Detected double maximal shift for node `" + j.id() + "`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs."); @@ -28875,10 +28887,10 @@ XF.prototype.run = function() { var W = n[q], $ = W.layoutDimensions(r), J = $.w, X = $.h; H = Math.max(H, J, X); } - var Q = {}, ue = function(ie) { - if (Q[ie.id()]) - return Q[ie.id()]; - for (var we = Qy(ie).depth, Ee = ie.neighborhood(), De = 0, Ie = 0, Ye = 0; Ye < Ee.length; Ye++) { + var Z = {}, ue = function(ie) { + if (Z[ie.id()]) + return Z[ie.id()]; + for (var we = Qy(ie).depth, Ee = ie.neighborhood(), Me = 0, Ie = 0, Ye = 0; Ye < Ee.length; Ye++) { var ot = Ee[Ye]; if (!(ot.isEdge() || ot.isParent() || !n.has(ot))) { var mt = Qy(ot); @@ -28886,14 +28898,14 @@ XF.prototype.run = function() { var wt = mt.index, Mt = mt.depth; if (!(wt == null || Mt == null)) { var Dt = b[Mt].length; - Mt < we && (De += wt / Dt, Ie++); + Mt < we && (Me += wt / Dt, Ie++); } } } } - return Ie = Math.max(1, Ie), De = De / Ie, Ie === 0 && (De = 0), Q[ie.id()] = De, De; + return Ie = Math.max(1, Ie), Me = Me / Ie, Ie === 0 && (Me = 0), Z[ie.id()] = Me, Me; }, re = function(ie, we) { - var Ee = ue(ie), De = ue(we), Ie = Ee - De; + var Ee = ue(ie), Me = ue(we), Ie = Ee - Me; return Ie === 0 ? $7(ie.id(), we.id()) : Ie; }; r.depthSort !== void 0 && (re = r.depthSort); @@ -28911,11 +28923,11 @@ XF.prototype.run = function() { var ge = { x: u.x1 + u.w / 2, y: u.y1 + u.h / 2 - }, Oe = n.reduce(function(Z, ie) { + }, Oe = n.reduce(function(Q, ie) { return (function(we) { return { - w: Z.w === -1 ? we.w : (Z.w + we.w) / 2, - h: Z.h === -1 ? we.h : (Z.h + we.h) / 2 + w: Q.w === -1 ? we.w : (Q.w + we.w) / 2, + h: Q.h === -1 ? we.h : (Q.h + we.h) / 2 }; })(ie.boundingBox({ includeLabels: r.nodeDimensionsIncludeLabels @@ -28930,14 +28942,14 @@ XF.prototype.run = function() { s ? (u.h - r.padding * 2 - Oe.h) / (ne - 1) : (u.h - r.padding * 2 - Oe.h) / (ne + 1) ), H - ), Me = b.reduce(function(Z, ie) { - return Math.max(Z, ie.length); + ), De = b.reduce(function(Q, ie) { + return Math.max(Q, ie.length); }, 0), Ne = function(ie) { - var we = Qy(ie), Ee = we.depth, De = we.index; + var we = Qy(ie), Ee = we.depth, Me = we.index; if (r.circle) { var Ie = Math.min(u.w / 2 / ne, u.h / 2 / ne); Ie = Math.max(Ie, H); - var Ye = Ie * Ee + Ie - (ne > 0 && b[0].length <= 3 ? Ie / 2 : 0), ot = 2 * Math.PI / b[Ee].length * De; + var Ye = Ie * Ee + Ie - (ne > 0 && b[0].length <= 3 ? Ie / 2 : 0), ot = 2 * Math.PI / b[Ee].length * Me; return Ee === 0 && b[0].length === 1 && (Ye = 1), { x: ge.x + Ye * Math.cos(ot), y: ge.y + Ye * Math.sin(ot) @@ -28947,11 +28959,11 @@ XF.prototype.run = function() { // only one depth mt === 1 ? 0 : ( // inside a bounding box, no need for left & right padding - s ? (u.w - r.padding * 2 - Oe.w) / ((r.grid ? Me : mt) - 1) : (u.w - r.padding * 2 - Oe.w) / ((r.grid ? Me : mt) + 1) + s ? (u.w - r.padding * 2 - Oe.w) / ((r.grid ? De : mt) - 1) : (u.w - r.padding * 2 - Oe.w) / ((r.grid ? De : mt) + 1) ), H ), Mt = { - x: ge.x + (De + 1 - (mt + 1) / 2) * wt, + x: ge.x + (Me + 1 - (mt + 1) / 2) * wt, y: ge.y + (Ee + 1 - (ne + 1) / 2) * ke }; return Mt; @@ -28964,11 +28976,11 @@ XF.prototype.run = function() { }; Object.keys(Ce).indexOf(r.direction) === -1 && Ia("Invalid direction '".concat(r.direction, "' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ce).join(", "))); var Y = function(ie) { - return G$(Ne(ie), u, Ce[r.direction]); + return V$(Ne(ie), u, Ce[r.direction]); }; return t.nodes().layoutPositions(this, r, Y), this; }; -var AJ = { +var RJ = { fit: !0, // whether to fit the viewport to the graph padding: 30, @@ -29011,7 +29023,7 @@ var AJ = { // transform a given node position. Useful for changing flow direction in discrete layouts }; function $F(r) { - this.options = kr({}, AJ, r); + this.options = kr({}, RJ, r); } $F.prototype.run = function() { var r = this.options, e = r, t = r.cy, n = e.eles, i = e.counterclockwise !== void 0 ? !e.counterclockwise : e.clockwise, a = n.nodes().not(":parent"); @@ -29042,7 +29054,7 @@ $F.prototype.run = function() { }; return n.nodes().layoutPositions(this, e, x), this; }; -var RJ = { +var PJ = { fit: !0, // whether to fit the viewport to the graph padding: 30, @@ -29095,7 +29107,7 @@ var RJ = { // transform a given node position. Useful for changing flow direction in discrete layouts }; function KF(r) { - this.options = kr({}, RJ, r); + this.options = kr({}, PJ, r); } KF.prototype.run = function() { for (var r = this.options, e = r, t = e.counterclockwise !== void 0 ? !e.counterclockwise : e.clockwise, n = r.cy, i = e.eles, a = i.nodes().not(":parent"), o = zl(e.boundingBox ? e.boundingBox : { @@ -29118,8 +29130,8 @@ KF.prototype.run = function() { var p = a[h], g = p.layoutDimensions(e); l = Math.max(l, g.w, g.h); } - u.sort(function(ke, Me) { - return Me.value - ke.value; + u.sort(function(ke, De) { + return De.value - ke.value; }); for (var y = e.levelWidth(a), b = [[]], _ = b[0], m = 0; m < u.length; m++) { var x = u[m]; @@ -29144,8 +29156,8 @@ KF.prototype.run = function() { } if (e.equidistant) { for (var W = 0, $ = 0, J = 0; J < b.length; J++) { - var X = b[J], Q = X.r - $; - W = Math.max(W, Q); + var X = b[J], Z = X.r - $; + W = Math.max(W, Z); } $ = 0; for (var ue = 0; ue < b.length; ue++) { @@ -29162,11 +29174,11 @@ KF.prototype.run = function() { ne[de.node.id()] = Oe; } return i.nodes().layoutPositions(this, e, function(ke) { - var Me = ke.id(); - return ne[Me]; + var De = ke.id(); + return ne[De]; }), this; }; -var NO, PJ = { +var IO, MJ = { // Called on `layoutready` ready: function() { }, @@ -29232,8 +29244,8 @@ var NO, PJ = { // Lower temperature threshold (below this point the layout will end) minTemp: 1 }; -function G2(r) { - this.options = kr({}, PJ, r), this.options.layout = this; +function q2(r) { + this.options = kr({}, MJ, r), this.options.layout = this; var e = this.options.eles.nodes(), t = this.options.eles.edges(), n = t.filter(function(i) { var a = i.source().data("id"), o = i.target().data("id"), s = e.some(function(l) { return l.data("id") === a; @@ -29244,18 +29256,18 @@ function G2(r) { }); this.options.eles = this.options.eles.not(n); } -G2.prototype.run = function() { +q2.prototype.run = function() { var r = this.options, e = r.cy, t = this; t.stopped = !1, (r.animate === !0 || r.animate === !1) && t.emit({ type: "layoutstart", layout: t - }), r.debug === !0 ? NO = !0 : NO = !1; - var n = MJ(e, t, r); - NO && kJ(n), r.randomize && IJ(n); + }), r.debug === !0 ? IO = !0 : IO = !1; + var n = DJ(e, t, r); + IO && IJ(n), r.randomize && NJ(n); var i = vv(), a = function() { - NJ(n, e, r), r.fit === !0 && e.fit(r.padding); + LJ(n, e, r), r.fit === !0 && e.fit(r.padding); }, o = function(d) { - return !(t.stopped || d >= r.numIter || (LJ(n, r), n.temperature = n.temperature * r.coolingFactor, n.temperature < r.minTemp)); + return !(t.stopped || d >= r.numIter || (jJ(n, r), n.temperature = n.temperature * r.coolingFactor, n.temperature < r.minTemp)); }, s = function() { if (r.animate === !0 || r.animate === !1) a(), t.one("layoutstop", r.stop), t.emit({ @@ -29286,13 +29298,13 @@ G2.prototype.run = function() { } return this; }; -G2.prototype.stop = function() { +q2.prototype.stop = function() { return this.stopped = !0, this.thread && this.thread.stop(), this.emit("layoutstop"), this; }; -G2.prototype.destroy = function() { +q2.prototype.destroy = function() { return this.thread && this.thread.stop(), this; }; -var MJ = function(e, t, n) { +var DJ = function(e, t, n) { for (var i = n.eles.edges(), a = n.eles.nodes(), o = zl(n.boundingBox ? n.boundingBox : { x1: 0, y1: 0, @@ -29342,7 +29354,7 @@ var MJ = function(e, t, n) { L.id = k.data("id"), L.sourceId = k.data("source"), L.targetId = k.data("target"); var B = Ya(n.idealEdgeLength) ? n.idealEdgeLength(k) : n.idealEdgeLength, j = Ya(n.edgeElasticity) ? n.edgeElasticity(k) : n.edgeElasticity, z = s.idToIndex[L.sourceId], H = s.idToIndex[L.targetId], q = s.indexToGraph[z], W = s.indexToGraph[H]; if (q != W) { - for (var $ = DJ(L.sourceId, L.targetId, s), J = s.graphSet[$], X = 0, y = s.layoutNodes[z]; J.indexOf(y.id) === -1; ) + for (var $ = kJ(L.sourceId, L.targetId, s), J = s.graphSet[$], X = 0, y = s.layoutNodes[z]; J.indexOf(y.id) === -1; ) y = s.layoutNodes[s.idToIndex[y.parentId]], X++; for (y = s.layoutNodes[H]; J.indexOf(y.id) === -1; ) y = s.layoutNodes[s.idToIndex[y.parentId]], X++; @@ -29351,7 +29363,7 @@ var MJ = function(e, t, n) { L.idealLength = B, L.elasticity = j, s.layoutEdges.push(L); } return s; -}, DJ = function(e, t, n) { +}, kJ = function(e, t, n) { var i = ZF(e, t, 0, n); return 2 > i.count ? 0 : i.graph; }, ZF = function(e, t, n, i) { @@ -29377,7 +29389,7 @@ var MJ = function(e, t, n) { count: o, graph: n }; -}, kJ, IJ = function(e, t) { +}, IJ, NJ = function(e, t) { for (var n = e.clientWidth, i = e.clientHeight, a = 0; a < e.nodeSize; a++) { var o = e.layoutNodes[a]; o.children.length === 0 && !o.isLocked && (o.positionX = Math.random() * n, o.positionY = Math.random() * i); @@ -29406,36 +29418,36 @@ var MJ = function(e, t, n) { y: u.positionY }; }; -}, NJ = function(e, t, n) { +}, LJ = function(e, t, n) { var i = n.layout, a = n.eles.nodes(), o = QF(e, n, a); a.positions(o), e.ready !== !0 && (e.ready = !0, i.one("layoutready", n.ready), i.emit({ type: "layoutready", layout: this })); -}, LJ = function(e, t, n) { - jJ(e, t), UJ(e), zJ(e, t), qJ(e), GJ(e); -}, jJ = function(e, t) { +}, jJ = function(e, t, n) { + BJ(e, t), zJ(e), qJ(e, t), GJ(e), VJ(e); +}, BJ = function(e, t) { for (var n = 0; n < e.graphSet.length; n++) for (var i = e.graphSet[n], a = i.length, o = 0; o < a; o++) for (var s = e.layoutNodes[e.idToIndex[i[o]]], u = o + 1; u < a; u++) { var l = e.layoutNodes[e.idToIndex[i[u]]]; - BJ(s, l, e, t); + FJ(s, l, e, t); } }, a3 = function(e) { return -1 + 2 * e * Math.random(); -}, BJ = function(e, t, n, i) { +}, FJ = function(e, t, n, i) { var a = e.cmptId, o = t.cmptId; if (!(a !== o && !n.isCompound)) { var s = t.positionX - e.positionX, u = t.positionY - e.positionY, l = 1; s === 0 && u === 0 && (s = a3(l), u = a3(l)); - var c = FJ(e, t, s, u); + var c = UJ(e, t, s, u); if (c > 0) var f = i.nodeOverlap * c, d = Math.sqrt(s * s + u * u), h = f * s / d, p = f * u / d; else var g = Bx(e, s, u), y = Bx(t, -1 * s, -1 * u), b = y.x - g.x, _ = y.y - g.y, m = b * b + _ * _, d = Math.sqrt(m), f = (e.nodeRepulsion + t.nodeRepulsion) / m, h = f * b / d, p = f * _ / d; e.isLocked || (e.offsetX -= h, e.offsetY -= p), t.isLocked || (t.offsetX += h, t.offsetY += p); } -}, FJ = function(e, t, n, i) { +}, UJ = function(e, t, n, i) { if (n > 0) var a = e.maxX - t.minX; else @@ -29448,7 +29460,7 @@ var MJ = function(e, t, n) { }, Bx = function(e, t, n) { var i = e.positionX, a = e.positionY, o = e.height || 1, s = e.width || 1, u = n / t, l = o / s, c = {}; return t === 0 && 0 < n || t === 0 && 0 > n ? (c.x = i, c.y = a + o / 2, c) : 0 < t && -1 * l <= u && u <= l ? (c.x = i + s / 2, c.y = a + s * n / 2 / t, c) : 0 > t && -1 * l <= u && u <= l ? (c.x = i - s / 2, c.y = a - s * n / 2 / t, c) : 0 < n && (u <= -1 * l || u >= l) ? (c.x = i + o * t / 2 / n, c.y = a + o / 2, c) : (0 > n && (u <= -1 * l || u >= l) && (c.x = i - o * t / 2 / n, c.y = a - o / 2), c); -}, UJ = function(e, t) { +}, zJ = function(e, t) { for (var n = 0; n < e.edgeSize; n++) { var i = e.layoutEdges[n], a = e.idToIndex[i.sourceId], o = e.layoutNodes[a], s = e.idToIndex[i.targetId], u = e.layoutNodes[s], l = u.positionX - o.positionX, c = u.positionY - o.positionY; if (!(l === 0 && c === 0)) { @@ -29460,7 +29472,7 @@ var MJ = function(e, t, n) { o.isLocked || (o.offsetX += b, o.offsetY += _), u.isLocked || (u.offsetX -= b, u.offsetY -= _); } } -}, zJ = function(e, t) { +}, qJ = function(e, t) { if (t.gravity !== 0) for (var n = 1, i = 0; i < e.graphSet.length; i++) { var a = e.graphSet[i], o = a.length; @@ -29479,7 +29491,7 @@ var MJ = function(e, t, n) { } } } -}, qJ = function(e, t) { +}, GJ = function(e, t) { var n = [], i = 0, a = -1; for (n.push.apply(n, e.graphSet[0]), a += e.graphSet[0].length; i <= a; ) { var o = n[i++], s = e.idToIndex[o], u = e.layoutNodes[s], l = u.children; @@ -29491,7 +29503,7 @@ var MJ = function(e, t, n) { u.offsetX = 0, u.offsetY = 0; } } -}, GJ = function(e, t) { +}, VJ = function(e, t) { for (var n = 0; n < e.nodeSize; n++) { var i = e.layoutNodes[n]; 0 < i.children.length && (i.maxX = void 0, i.minX = void 0, i.maxY = void 0, i.minY = void 0); @@ -29499,7 +29511,7 @@ var MJ = function(e, t, n) { for (var n = 0; n < e.nodeSize; n++) { var i = e.layoutNodes[n]; if (!(0 < i.children.length || i.isLocked)) { - var a = VJ(i.offsetX, i.offsetY, e.temperature); + var a = HJ(i.offsetX, i.offsetY, e.temperature); i.positionX += a.x, i.positionY += a.y, i.offsetX = 0, i.offsetY = 0, i.minX = i.positionX - i.width, i.maxX = i.positionX + i.width, i.minY = i.positionY - i.height, i.maxY = i.positionY + i.height, JF(i, e); } } @@ -29507,7 +29519,7 @@ var MJ = function(e, t, n) { var i = e.layoutNodes[n]; 0 < i.children.length && !i.isLocked && (i.positionX = (i.maxX + i.minX) / 2, i.positionY = (i.maxY + i.minY) / 2, i.width = i.maxX - i.minX, i.height = i.maxY - i.minY); } -}, VJ = function(e, t, n) { +}, HJ = function(e, t, n) { var i = Math.sqrt(e * e + t * t); if (i > n) var a = { @@ -29556,7 +29568,7 @@ var MJ = function(e, t, n) { h += c.w + t.componentSpacing, g += c.w + t.componentSpacing, y = Math.max(y, c.h), g > b && (p += y + t.componentSpacing, h = 0, g = 0, y = 0); } } -}, HJ = { +}, WJ = { fit: !0, // whether to fit the viewport to the graph padding: 30, @@ -29602,7 +29614,7 @@ var MJ = function(e, t, n) { // transform a given node position. Useful for changing flow direction in discrete layouts }; function eU(r) { - this.options = kr({}, HJ, r); + this.options = kr({}, WJ, r); } eU.prototype.run = function() { var r = this.options, e = r, t = r.cy, n = e.eles, i = n.nodes().not(":parent"); @@ -29676,7 +29688,7 @@ eU.prototype.run = function() { q[$.id()] = X, B(X.row, X.col); } } - var Q = function(re, ne) { + var Z = function(re, ne) { var le, ce; if (re.locked() || re.isParent()) return !1; @@ -29693,11 +29705,11 @@ eU.prototype.run = function() { y: ce }; }; - i.layoutPositions(this, e, Q); + i.layoutPositions(this, e, Z); } return this; }; -var WJ = { +var YJ = { ready: function() { }, // on layoutready @@ -29706,7 +29718,7 @@ var WJ = { // on layoutstop }; function aD(r) { - this.options = kr({}, WJ, r); + this.options = kr({}, YJ, r); } aD.prototype.run = function() { var r = this.options, e = r.eles, t = this; @@ -29720,7 +29732,7 @@ aD.prototype.run = function() { aD.prototype.stop = function() { return this; }; -var YJ = { +var XJ = { positions: void 0, // map of (node id) => (position obj); or function(node){ return somPos; } zoom: void 0, @@ -29753,13 +29765,13 @@ var YJ = { // transform a given node position. Useful for changing flow direction in discrete layouts }; function tU(r) { - this.options = kr({}, YJ, r); + this.options = kr({}, XJ, r); } tU.prototype.run = function() { var r = this.options, e = r.eles, t = e.nodes(), n = Ya(r.positions); function i(a) { if (r.positions == null) - return pK(a.position()); + return gK(a.position()); if (n) return r.positions(a); var o = r.positions[a._private.data.id]; @@ -29770,7 +29782,7 @@ tU.prototype.run = function() { return a.locked() || s == null ? !1 : s; }), this; }; -var XJ = { +var $J = { fit: !0, // whether to fit to viewport padding: 30, @@ -29797,7 +29809,7 @@ var XJ = { // transform a given node position. Useful for changing flow direction in discrete layouts }; function rU(r) { - this.options = kr({}, XJ, r); + this.options = kr({}, $J, r); } rU.prototype.run = function() { var r = this.options, e = r.cy, t = r.eles, n = zl(r.boundingBox ? r.boundingBox : { @@ -29813,7 +29825,7 @@ rU.prototype.run = function() { }; return t.nodes().layoutPositions(this, r, i), this; }; -var $J = [{ +var KJ = [{ name: "breadthfirst", impl: XF }, { @@ -29824,7 +29836,7 @@ var $J = [{ impl: KF }, { name: "cose", - impl: G2 + impl: q2 }, { name: "grid", impl: eU @@ -30073,11 +30085,11 @@ ry.findNearestElements = function(r, e, t, n) { var T = E._private, P = T.rscratch, I = E.pstyle("width").pfValue, k = E.pstyle("arrow-scale").value, L = I / 2 + c, B = L * L, j = L * 2, W = T.source, $ = T.target, z; if (P.edgeType === "segments" || P.edgeType === "straight" || P.edgeType === "haystack") { for (var H = P.allpts, q = 0; q + 3 < H.length; q += 2) - if (RK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], j) && B > (z = IK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3]))) + if (PK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], j) && B > (z = NK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3]))) return y(E, z), !0; } else if (P.edgeType === "bezier" || P.edgeType === "multibezier" || P.edgeType === "self" || P.edgeType === "compound") { for (var H = P.allpts, q = 0; q + 5 < P.allpts.length; q += 4) - if (PK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], H[q + 4], H[q + 5], j) && B > (z = kK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], H[q + 4], H[q + 5]))) + if (MK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], H[q + 4], H[q + 5], j) && B > (z = IK(r, e, H[q], H[q + 1], H[q + 2], H[q + 3], H[q + 4], H[q + 5]))) return y(E, z), !0; } for (var W = W || T.source, $ = $ || T.target, J = i.getArrowWidth(I, k), X = [{ @@ -30101,13 +30113,13 @@ ry.findNearestElements = function(r, e, t, n) { y: P.midY, angle: P.midtgtArrowAngle }], q = 0; q < X.length; q++) { - var Q = X[q], ue = a.arrowShapes[E.pstyle(Q.name + "-arrow-shape").value], re = E.pstyle("width").pfValue; - if (ue.roughCollide(r, e, J, Q.angle, { - x: Q.x, - y: Q.y - }, re, c) && ue.collide(r, e, J, Q.angle, { - x: Q.x, - y: Q.y + var Z = X[q], ue = a.arrowShapes[E.pstyle(Z.name + "-arrow-shape").value], re = E.pstyle("width").pfValue; + if (ue.roughCollide(r, e, J, Z.angle, { + x: Z.x, + y: Z.y + }, re, c) && ue.collide(r, e, J, Z.angle, { + x: Z.x, + y: Z.y }, re, c)) return y(E), !0; } @@ -30121,14 +30133,14 @@ ry.findNearestElements = function(r, e, t, n) { T ? k = T + "-" : k = "", E.boundingBox(); var L = P.labelBounds[T || "main"], B = E.pstyle(k + "label").value, j = E.pstyle("text-events").strValue === "yes"; if (!(!j || !B)) { - var z = m(P.rscratch, "labelX", T), H = m(P.rscratch, "labelY", T), q = m(P.rscratch, "labelAngle", T), W = E.pstyle(k + "text-margin-x").pfValue, $ = E.pstyle(k + "text-margin-y").pfValue, J = L.x1 - I - W, X = L.x2 + I - W, Q = L.y1 - I - $, ue = L.y2 + I - $; + var z = m(P.rscratch, "labelX", T), H = m(P.rscratch, "labelY", T), q = m(P.rscratch, "labelAngle", T), W = E.pstyle(k + "text-margin-x").pfValue, $ = E.pstyle(k + "text-margin-y").pfValue, J = L.x1 - I - W, X = L.x2 + I - W, Z = L.y1 - I - $, ue = L.y2 + I - $; if (q) { var re = Math.cos(q), ne = Math.sin(q), le = function(Oe, ke) { return Oe = Oe - z, ke = ke - H, { x: Oe * re - ke * ne + z, y: Oe * ne + ke * re + H }; - }, ce = le(J, Q), pe = le(J, ue), fe = le(X, Q), se = le(X, ue), de = [ + }, ce = le(J, Z), pe = le(J, ue), fe = le(X, Z), se = le(X, ue), de = [ // with the margin added after the rotation is applied ce.x + W, ce.y + $, @@ -30172,20 +30184,20 @@ ry.getAllInBox = function(r, e, t, n) { x: d.x1, y: d.y2 }], p = [[h[0], h[1]], [h[1], h[2]], [h[2], h[3]], [h[3], h[0]]]; - function g(Oe, ke, Me) { - return Tc(Oe, ke, Me); + function g(Oe, ke, De) { + return Tc(Oe, ke, De); } function y(Oe, ke) { - var Me = Oe._private, Ne = o, Ce = ""; + var De = Oe._private, Ne = o, Ce = ""; Oe.boundingBox(); - var Y = Me.labelBounds.main; + var Y = De.labelBounds.main; if (!Y) return null; - var Z = g(Me.rscratch, "labelX", ke), ie = g(Me.rscratch, "labelY", ke), we = g(Me.rscratch, "labelAngle", ke), Ee = Oe.pstyle(Ce + "text-margin-x").pfValue, De = Oe.pstyle(Ce + "text-margin-y").pfValue, Ie = Y.x1 - Ne - Ee, Ye = Y.x2 + Ne - Ee, ot = Y.y1 - Ne - De, mt = Y.y2 + Ne - De; + var Q = g(De.rscratch, "labelX", ke), ie = g(De.rscratch, "labelY", ke), we = g(De.rscratch, "labelAngle", ke), Ee = Oe.pstyle(Ce + "text-margin-x").pfValue, Me = Oe.pstyle(Ce + "text-margin-y").pfValue, Ie = Y.x1 - Ne - Ee, Ye = Y.x2 + Ne - Ee, ot = Y.y1 - Ne - Me, mt = Y.y2 + Ne - Me; if (we) { var wt = Math.cos(we), Mt = Math.sin(we), Dt = function(tt, _e) { - return tt = tt - Z, _e = _e - ie, { - x: tt * wt - _e * Mt + Z, + return tt = tt - Q, _e = _e - ie, { + x: tt * wt - _e * Mt + Q, y: tt * Mt + _e * wt + ie }; }; @@ -30205,11 +30217,11 @@ ry.getAllInBox = function(r, e, t, n) { y: mt }]; } - function b(Oe, ke, Me, Ne) { - function Ce(Y, Z, ie) { - return (ie.y - Y.y) * (Z.x - Y.x) > (Z.y - Y.y) * (ie.x - Y.x); + function b(Oe, ke, De, Ne) { + function Ce(Y, Q, ie) { + return (ie.y - Y.y) * (Q.x - Y.x) > (Q.y - Y.y) * (ie.x - Y.x); } - return Ce(Oe, Me, Ne) !== Ce(ke, Me, Ne) && Ce(Oe, ke, Me) !== Ce(Oe, ke, Ne); + return Ce(Oe, De, Ne) !== Ce(ke, De, Ne) && Ce(Oe, ke, De) !== Ce(Oe, ke, Ne); } for (var _ = 0; _ < i.length; _++) { var m = i[_]; @@ -30226,7 +30238,7 @@ ry.getAllInBox = function(r, e, t, n) { var I = !1; if (E && S) { var k = y(x); - k && kS(k, h) && (s.push(x), I = !0); + k && DS(k, h) && (s.push(x), I = !0); } !I && cF(d, P) && s.push(x); } else if (O === "overlap" && $5(d, P)) { @@ -30250,11 +30262,11 @@ ry.getAllInBox = function(r, e, t, n) { x: L.x1, y: L.y2 }]; - if (kS(B, h)) + if (DS(B, h)) s.push(x); else { var j = y(x); - j && kS(j, h) && s.push(x); + j && DS(j, h) && s.push(x); } } } else { @@ -30273,17 +30285,17 @@ ry.getAllInBox = function(r, e, t, n) { J && s.push(z); } else q.edgeType === "straight" && s.push(z); } else if (W === "overlap") { - var Q = !1; + var Z = !1; if (q.startX != null && q.startY != null && q.endX != null && q.endY != null && (pp(d, q.startX, q.startY) || pp(d, q.endX, q.endY))) - s.push(z), Q = !0; - else if (!Q && q.edgeType === "haystack") { + s.push(z), Z = !0; + else if (!Z && q.edgeType === "haystack") { for (var ue = H.rstyle.haystackPts, re = 0; re < ue.length; re++) if (CI(d, ue[re])) { - s.push(z), Q = !0; + s.push(z), Z = !0; break; } } - if (!Q) { + if (!Z) { var ne = H.rstyle.bezierPts || H.rstyle.linePts || H.rstyle.haystackPts; if ((!ne || ne.length < 2) && q.edgeType === "straight" && q.startX != null && q.startY != null && q.endX != null && q.endY != null && (ne = [{ x: q.startX, @@ -30296,11 +30308,11 @@ ry.getAllInBox = function(r, e, t, n) { for (var ce = ne[le], pe = ne[le + 1], fe = 0; fe < p.length; fe++) { var se = Uo(p[fe], 2), de = se[0], ge = se[1]; if (b(ce, pe, de, ge)) { - s.push(z), Q = !0; + s.push(z), Z = !0; break; } } - if (Q) break; + if (Z) break; } } } @@ -30364,16 +30376,16 @@ Fx.getArrowWidth = Fx.getArrowHeight = function(r, e) { var t = this.arrowWidthCache = this.arrowWidthCache || {}, n = t[r + ", " + e]; return n || (n = Math.max(Math.pow(r * 13.37, 0.9), 29) * e, t[r + ", " + e] = n, n); }; -var bM, _M, ph = {}, Df = {}, l3, c3, Ng, rx, tv, Eg, Ag, sh, Jy, _w, iU, aU, wM, xM, f3, d3 = function(e, t, n) { +var mM, bM, ph = {}, Df = {}, l3, c3, Ng, rx, tv, Eg, Ag, sh, Jy, _w, iU, aU, _M, wM, f3, d3 = function(e, t, n) { n.x = t.x - e.x, n.y = t.y - e.y, n.len = Math.sqrt(n.x * n.x + n.y * n.y), n.nx = n.x / n.len, n.ny = n.y / n.len, n.ang = Math.atan2(n.ny, n.nx); -}, KJ = function(e, t) { +}, ZJ = function(e, t) { t.x = e.x * -1, t.y = e.y * -1, t.nx = e.nx * -1, t.ny = e.ny * -1, t.ang = e.ang > 0 ? -(Math.PI - e.ang) : Math.PI + e.ang; -}, ZJ = function(e, t, n, i, a) { - if (e !== f3 ? d3(t, e, ph) : KJ(Df, ph), d3(t, n, Df), l3 = ph.nx * Df.ny - ph.ny * Df.nx, c3 = ph.nx * Df.nx - ph.ny * -Df.ny, tv = Math.asin(Math.max(-1, Math.min(1, l3))), Math.abs(tv) < 1e-6) { - bM = t.x, _M = t.y, Ag = Jy = 0; +}, QJ = function(e, t, n, i, a) { + if (e !== f3 ? d3(t, e, ph) : ZJ(Df, ph), d3(t, n, Df), l3 = ph.nx * Df.ny - ph.ny * Df.nx, c3 = ph.nx * Df.nx - ph.ny * -Df.ny, tv = Math.asin(Math.max(-1, Math.min(1, l3))), Math.abs(tv) < 1e-6) { + mM = t.x, bM = t.y, Ag = Jy = 0; return; } - Ng = 1, rx = !1, c3 < 0 ? tv < 0 ? tv = Math.PI + tv : (tv = Math.PI - tv, Ng = -1, rx = !0) : tv > 0 && (Ng = -1, rx = !0), t.radius !== void 0 ? Jy = t.radius : Jy = i, Eg = tv / 2, _w = Math.min(ph.len / 2, Df.len / 2), a ? (sh = Math.abs(Math.cos(Eg) * Jy / Math.sin(Eg)), sh > _w ? (sh = _w, Ag = Math.abs(sh * Math.sin(Eg) / Math.cos(Eg))) : Ag = Jy) : (sh = Math.min(_w, Jy), Ag = Math.abs(sh * Math.sin(Eg) / Math.cos(Eg))), wM = t.x + Df.nx * sh, xM = t.y + Df.ny * sh, bM = wM - Df.ny * Ag * Ng, _M = xM + Df.nx * Ag * Ng, iU = t.x + ph.nx * sh, aU = t.y + ph.ny * sh, f3 = t; + Ng = 1, rx = !1, c3 < 0 ? tv < 0 ? tv = Math.PI + tv : (tv = Math.PI - tv, Ng = -1, rx = !0) : tv > 0 && (Ng = -1, rx = !0), t.radius !== void 0 ? Jy = t.radius : Jy = i, Eg = tv / 2, _w = Math.min(ph.len / 2, Df.len / 2), a ? (sh = Math.abs(Math.cos(Eg) * Jy / Math.sin(Eg)), sh > _w ? (sh = _w, Ag = Math.abs(sh * Math.sin(Eg) / Math.cos(Eg))) : Ag = Jy) : (sh = Math.min(_w, Jy), Ag = Math.abs(sh * Math.sin(Eg) / Math.cos(Eg))), _M = t.x + Df.nx * sh, wM = t.y + Df.ny * sh, mM = _M - Df.ny * Ag * Ng, bM = wM + Df.nx * Ag * Ng, iU = t.x + ph.nx * sh, aU = t.y + ph.ny * sh, f3 = t; }; function oU(r, e) { e.radius === 0 ? r.lineTo(e.cx, e.cy) : r.arc(e.cx, e.cy, e.radius, e.startAngle, e.endAngle, e.counterClockwise); @@ -30391,20 +30403,20 @@ function sD(r, e, t, n) { startAngle: void 0, endAngle: void 0, counterClockwise: void 0 - } : (ZJ(r, e, t, n, i), { - cx: bM, - cy: _M, + } : (QJ(r, e, t, n, i), { + cx: mM, + cy: bM, radius: Ag, startX: iU, startY: aU, - stopX: wM, - stopY: xM, + stopX: _M, + stopY: wM, startAngle: ph.ang + Math.PI / 2 * Ng, endAngle: Df.ang - Math.PI / 2 * Ng, counterClockwise: rx }); } -var O1 = 0.01, QJ = Math.sqrt(2 * O1), Zu = {}; +var O1 = 0.01, JJ = Math.sqrt(2 * O1), Zu = {}; Zu.findMidptPtsEtc = function(r, e) { var t = e.posPts, n = e.intersectionPts, i = e.vectorNormInverse, a, o = r.pstyle("source-endpoint"), s = r.pstyle("target-endpoint"), u = o.units != null && s.units != null, l = function(S, O, E, T) { var P = T - O, I = E - S, k = Math.sqrt(I * I + P * P); @@ -30519,8 +30531,8 @@ Zu.findTaxiPoints = function(r, e) { !(z && (x || O)) && (_ === s && W < 0 || _ === u && W > 0 || _ === a && W > 0 || _ === o && W < 0) && ($ *= -1, q = $ * Math.abs(q), J = !0); var X; if (x) { - var Q = S < 0 ? 1 + S : S; - X = Q * q; + var Z = S < 0 ? 1 + S : S; + X = Z * q; } else { var ue = S < 0 ? q : 0; X = ue + S * $; @@ -30535,18 +30547,18 @@ Zu.findTaxiPoints = function(r, e) { var se = (c.x1 + c.x2) / 2, de = c.y1, ge = c.y2; t.segpts = [se, de, se, ge]; } else if (fe) { - var Oe = (c.y1 + c.y2) / 2, ke = c.x1, Me = c.x2; - t.segpts = [ke, Oe, Me, Oe]; + var Oe = (c.y1 + c.y2) / 2, ke = c.x1, De = c.x2; + t.segpts = [ke, Oe, De, Oe]; } else t.segpts = [c.x1, c.y2]; } else { var Ne = Math.abs(W) <= f / 2, Ce = Math.abs(k) <= p / 2; if (Ne) { - var Y = (c.y1 + c.y2) / 2, Z = c.x1, ie = c.x2; - t.segpts = [Z, Y, ie, Y]; + var Y = (c.y1 + c.y2) / 2, Q = c.x1, ie = c.x2; + t.segpts = [Q, Y, ie, Y]; } else if (Ce) { - var we = (c.x1 + c.x2) / 2, Ee = c.y1, De = c.y2; - t.segpts = [we, Ee, we, De]; + var we = (c.x1 + c.x2) / 2, Ee = c.y1, Me = c.y2; + t.segpts = [we, Ee, we, Me]; } else t.segpts = [c.x2, c.y1]; } @@ -30609,8 +30621,8 @@ Zu.tryToCorrectInvalidPoints = function(r, e) { // *2 radius guarantees outside shape x: t.ctrlpts[0] + $.x * 2 * J, y: t.ctrlpts[1] + $.y * 2 * J - }, Q = c.intersectLine(i.x, i.y, s, u, X.x, X.y, 0, d, p); - P ? (t.ctrlpts[0] = t.ctrlpts[0] + $.x * (S - T), t.ctrlpts[1] = t.ctrlpts[1] + $.y * (S - T)) : (t.ctrlpts[0] = Q[0] + $.x * S, t.ctrlpts[1] = Q[1] + $.y * S); + }, Z = c.intersectLine(i.x, i.y, s, u, X.x, X.y, 0, d, p); + P ? (t.ctrlpts[0] = t.ctrlpts[0] + $.x * (S - T), t.ctrlpts[1] = t.ctrlpts[1] + $.y * (S - T)) : (t.ctrlpts[0] = Z[0] + $.x * S, t.ctrlpts[1] = Z[1] + $.y * S); } I && this.findEndpoints(r); } @@ -30714,7 +30726,7 @@ Zu.findEdgeControlPoints = function(r) { var $ = q; q = W, W = $; } - var J = B.srcPos = q.position(), X = B.tgtPos = W.position(), Q = B.srcW = q.outerWidth(), ue = B.srcH = q.outerHeight(), re = B.tgtW = W.outerWidth(), ne = B.tgtH = W.outerHeight(), le = B.srcShape = t.nodeShapes[e.getNodeShape(q)], ce = B.tgtShape = t.nodeShapes[e.getNodeShape(W)], pe = B.srcCornerRadius = q.pstyle("corner-radius").value === "auto" ? "auto" : q.pstyle("corner-radius").pfValue, fe = B.tgtCornerRadius = W.pstyle("corner-radius").value === "auto" ? "auto" : W.pstyle("corner-radius").pfValue, se = B.tgtRs = W._private.rscratch, de = B.srcRs = q._private.rscratch; + var J = B.srcPos = q.position(), X = B.tgtPos = W.position(), Z = B.srcW = q.outerWidth(), ue = B.srcH = q.outerHeight(), re = B.tgtW = W.outerWidth(), ne = B.tgtH = W.outerHeight(), le = B.srcShape = t.nodeShapes[e.getNodeShape(q)], ce = B.tgtShape = t.nodeShapes[e.getNodeShape(W)], pe = B.srcCornerRadius = q.pstyle("corner-radius").value === "auto" ? "auto" : q.pstyle("corner-radius").pfValue, fe = B.tgtCornerRadius = W.pstyle("corner-radius").value === "auto" ? "auto" : W.pstyle("corner-radius").pfValue, se = B.tgtRs = W._private.rscratch, de = B.srcRs = q._private.rscratch; B.dirCounts = { north: 0, west: 0, @@ -30726,21 +30738,21 @@ Zu.findEdgeControlPoints = function(r) { southeast: 0 }; for (var ge = 0; ge < B.eles.length; ge++) { - var Oe = B.eles[ge], ke = Oe[0]._private.rscratch, Me = Oe.pstyle("curve-style").value, Ne = Me === "unbundled-bezier" || vp(Me, "segments") || vp(Me, "taxi"), Ce = !q.same(Oe.source()); + var Oe = B.eles[ge], ke = Oe[0]._private.rscratch, De = Oe.pstyle("curve-style").value, Ne = De === "unbundled-bezier" || vp(De, "segments") || vp(De, "taxi"), Ce = !q.same(Oe.source()); if (!B.calculatedIntersection && q !== W && (B.hasBezier || B.hasUnbundled)) { B.calculatedIntersection = !0; - var Y = le.intersectLine(J.x, J.y, Q, ue, X.x, X.y, 0, pe, de), Z = B.srcIntn = Y, ie = ce.intersectLine(X.x, X.y, re, ne, J.x, J.y, 0, fe, se), we = B.tgtIntn = ie, Ee = B.intersectionPts = { + var Y = le.intersectLine(J.x, J.y, Z, ue, X.x, X.y, 0, pe, de), Q = B.srcIntn = Y, ie = ce.intersectLine(X.x, X.y, re, ne, J.x, J.y, 0, fe, se), we = B.tgtIntn = ie, Ee = B.intersectionPts = { x1: Y[0], x2: ie[0], y1: Y[1], y2: ie[1] - }, De = B.posPts = { + }, Me = B.posPts = { x1: J.x, x2: X.x, y1: J.y, y2: X.y }, Ie = ie[1] - Y[1], Ye = ie[0] - Y[0], ot = Math.sqrt(Ye * Ye + Ie * Ie); - Ht(ot) && ot >= QJ || (ot = Math.sqrt(Math.max(Ye * Ye, O1) + Math.max(Ie * Ie, O1))); + Ht(ot) && ot >= JJ || (ot = Math.sqrt(Math.max(Ye * Ye, O1) + Math.max(Ie * Ie, O1))); var mt = B.vector = { x: Ye, y: Ie @@ -30751,7 +30763,7 @@ Zu.findEdgeControlPoints = function(r) { x: -wt.y, y: wt.x }; - B.nodesOverlap = !Ht(ot) || ce.checkPoint(Y[0], Y[1], 0, re, ne, X.x, X.y, fe, se) || le.checkPoint(ie[0], ie[1], 0, Q, ue, J.x, J.y, pe, de), B.vectorNormInverse = Mt, j = { + B.nodesOverlap = !Ht(ot) || ce.checkPoint(Y[0], Y[1], 0, re, ne, X.x, X.y, fe, se) || le.checkPoint(ie[0], ie[1], 0, Z, ue, J.x, J.y, pe, de), B.vectorNormInverse = Mt, j = { nodesOverlap: B.nodesOverlap, dirCounts: B.dirCounts, calculatedIntersection: !0, @@ -30764,17 +30776,17 @@ Zu.findEdgeControlPoints = function(r) { tgtRs: de, srcW: re, srcH: ne, - tgtW: Q, + tgtW: Z, tgtH: ue, srcIntn: we, - tgtIntn: Z, + tgtIntn: Q, srcShape: ce, tgtShape: le, posPts: { - x1: De.x2, - y1: De.y2, - x2: De.x1, - y2: De.y1 + x1: Me.x2, + y1: Me.y2, + x2: Me.x1, + y2: Me.y1 }, intersectionPts: { x1: Ee.x2, @@ -30797,7 +30809,7 @@ Zu.findEdgeControlPoints = function(r) { }; } var Dt = Ce ? j : B; - ke.nodesOverlap = Dt.nodesOverlap, ke.srcIntn = Dt.srcIntn, ke.tgtIntn = Dt.tgtIntn, ke.isRound = Me.startsWith("round"), i && (q.isParent() || q.isChild() || W.isParent() || W.isChild()) && (q.parents().anySame(W) || W.parents().anySame(q) || q.same(W) && q.isParent()) ? e.findCompoundLoopPoints(Oe, Dt, ge, Ne) : q === W ? e.findLoopPoints(Oe, Dt, ge, Ne) : Me.endsWith("segments") ? e.findSegmentsPoints(Oe, Dt) : Me.endsWith("taxi") ? e.findTaxiPoints(Oe, Dt) : Me === "straight" || !Ne && B.eles.length % 2 === 1 && ge === Math.floor(B.eles.length / 2) ? e.findStraightEdgePoints(Oe) : e.findBezierPoints(Oe, Dt, ge, Ne, Ce), e.findEndpoints(Oe), e.tryToCorrectInvalidPoints(Oe, Dt), e.checkForInvalidEdgeWarning(Oe), e.storeAllpts(Oe), e.storeEdgeProjections(Oe), e.calculateArrowAngles(Oe), e.recalculateEdgeLabelProjections(Oe), e.calculateLabelAngles(Oe); + ke.nodesOverlap = Dt.nodesOverlap, ke.srcIntn = Dt.srcIntn, ke.tgtIntn = Dt.tgtIntn, ke.isRound = De.startsWith("round"), i && (q.isParent() || q.isChild() || W.isParent() || W.isChild()) && (q.parents().anySame(W) || W.parents().anySame(q) || q.same(W) && q.isParent()) ? e.findCompoundLoopPoints(Oe, Dt, ge, Ne) : q === W ? e.findLoopPoints(Oe, Dt, ge, Ne) : De.endsWith("segments") ? e.findSegmentsPoints(Oe, Dt) : De.endsWith("taxi") ? e.findTaxiPoints(Oe, Dt) : De === "straight" || !Ne && B.eles.length % 2 === 1 && ge === Math.floor(B.eles.length / 2) ? e.findStraightEdgePoints(Oe) : e.findBezierPoints(Oe, Dt, ge, Ne, Ce), e.findEndpoints(Oe), e.tryToCorrectInvalidPoints(Oe, Dt), e.checkForInvalidEdgeWarning(Oe), e.storeAllpts(Oe), e.storeEdgeProjections(Oe), e.calculateArrowAngles(Oe), e.recalculateEdgeLabelProjections(Oe), e.calculateLabelAngles(Oe); } }, E = 0; E < s.length; E++) O(); @@ -30854,12 +30866,12 @@ J1.manualEndptToPx = function(r, e) { J1.findEndpoints = function(r) { var e, t, n, i, a = this, o, s = r.source()[0], u = r.target()[0], l = s.position(), c = u.position(), f = r.pstyle("target-arrow-shape").value, d = r.pstyle("source-arrow-shape").value, h = r.pstyle("target-distance-from-node").pfValue, p = r.pstyle("source-distance-from-node").pfValue, g = s._private.rscratch, y = u._private.rscratch, b = r.pstyle("curve-style").value, _ = r._private.rscratch, m = _.edgeType, x = vp(b, "taxi"), S = m === "self" || m === "compound", O = m === "bezier" || m === "multibezier" || S, E = m !== "bezier", T = m === "straight" || m === "segments", P = m === "segments", I = O || E || T, k = S || x, L = r.pstyle("source-endpoint"), B = k ? "outside-to-node" : L.value, j = s.pstyle("corner-radius").value === "auto" ? "auto" : s.pstyle("corner-radius").pfValue, z = r.pstyle("target-endpoint"), H = k ? "outside-to-node" : z.value, q = u.pstyle("corner-radius").value === "auto" ? "auto" : u.pstyle("corner-radius").pfValue; _.srcManEndpt = L, _.tgtManEndpt = z; - var W, $, J, X, Q = (e = (z == null || (t = z.pfValue) === null || t === void 0 ? void 0 : t.length) === 2 ? z.pfValue : null) !== null && e !== void 0 ? e : [0, 0], ue = (n = (L == null || (i = L.pfValue) === null || i === void 0 ? void 0 : i.length) === 2 ? L.pfValue : null) !== null && n !== void 0 ? n : [0, 0]; + var W, $, J, X, Z = (e = (z == null || (t = z.pfValue) === null || t === void 0 ? void 0 : t.length) === 2 ? z.pfValue : null) !== null && e !== void 0 ? e : [0, 0], ue = (n = (L == null || (i = L.pfValue) === null || i === void 0 ? void 0 : i.length) === 2 ? L.pfValue : null) !== null && n !== void 0 ? n : [0, 0]; if (O) { var re = [_.ctrlpts[0], _.ctrlpts[1]], ne = E ? [_.ctrlpts[_.ctrlpts.length - 2], _.ctrlpts[_.ctrlpts.length - 1]] : re; W = ne, $ = re; } else if (T) { - var le = P ? _.segpts.slice(0, 2) : [c.x + Q[0], c.y + Q[1]], ce = P ? _.segpts.slice(_.segpts.length - 2) : [l.x + ue[0], l.y + ue[1]]; + var le = P ? _.segpts.slice(0, 2) : [c.x + Z[0], c.y + Z[1]], ce = P ? _.segpts.slice(_.segpts.length - 2) : [l.x + ue[0], l.y + ue[1]]; W = ce, $ = le; } if (H === "inside-to-node") @@ -30869,14 +30881,14 @@ J1.findEndpoints = function(r) { else if (H === "outside-to-line") o = _.tgtIntn; else if (H === "outside-to-node" || H === "outside-to-node-or-label" ? J = W : (H === "outside-to-line" || H === "outside-to-line-or-label") && (J = [l.x, l.y]), o = a.nodeShapes[this.getNodeShape(u)].intersectLine(c.x, c.y, u.outerWidth(), u.outerHeight(), J[0], J[1], 0, q, y), H === "outside-to-node-or-label" || H === "outside-to-line-or-label") { - var pe = u._private.rscratch, fe = pe.labelWidth, se = pe.labelHeight, de = pe.labelX, ge = pe.labelY, Oe = fe / 2, ke = se / 2, Me = u.pstyle("text-valign").value; - Me === "top" ? ge -= ke : Me === "bottom" && (ge += ke); + var pe = u._private.rscratch, fe = pe.labelWidth, se = pe.labelHeight, de = pe.labelX, ge = pe.labelY, Oe = fe / 2, ke = se / 2, De = u.pstyle("text-valign").value; + De === "top" ? ge -= ke : De === "bottom" && (ge += ke); var Ne = u.pstyle("text-halign").value; Ne === "left" ? de -= Oe : Ne === "right" && (de += Oe); var Ce = _1(J[0], J[1], [de - Oe, ge - ke, de + Oe, ge - ke, de + Oe, ge + ke, de - Oe, ge + ke], c.x, c.y); if (Ce.length > 0) { - var Y = l, Z = Cg(Y, vm(o)), ie = Cg(Y, vm(Ce)), we = Z; - if (ie < Z && (o = Ce, we = ie), Ce.length > 2) { + var Y = l, Q = Cg(Y, vm(o)), ie = Cg(Y, vm(Ce)), we = Q; + if (ie < Q && (o = Ce, we = ie), Ce.length > 2) { var Ee = Cg(Y, { x: Ce[2], y: Ce[3] @@ -30885,8 +30897,8 @@ J1.findEndpoints = function(r) { } } } - var De = hw(o, W, a.arrowShapes[f].spacing(r) + h), Ie = hw(o, W, a.arrowShapes[f].gap(r) + h); - if (_.endX = Ie[0], _.endY = Ie[1], _.arrowEndX = De[0], _.arrowEndY = De[1], B === "inside-to-node") + var Me = hw(o, W, a.arrowShapes[f].spacing(r) + h), Ie = hw(o, W, a.arrowShapes[f].gap(r) + h); + if (_.endX = Ie[0], _.endY = Ie[1], _.arrowEndX = Me[0], _.arrowEndY = Me[1], B === "inside-to-node") o = [l.x, l.y]; else if (L.units) o = this.manualEndptToPx(s, L); @@ -30943,7 +30955,7 @@ J1.getTargetEndpoint = function(r) { } }; var uD = {}; -function JJ(r, e, t) { +function eee(r, e, t) { for (var n = function(l, c, f, d) { return ks(l, c, f, d); }, i = e._private, a = i.rstyle.bezierPts, o = 0; o < r.bezierProjPcts.length; o++) { @@ -30959,7 +30971,7 @@ uD.storeEdgeProjections = function(r) { if (e.rstyle.bezierPts = null, e.rstyle.linePts = null, e.rstyle.haystackPts = null, n === "multibezier" || n === "bezier" || n === "self" || n === "compound") { e.rstyle.bezierPts = []; for (var i = 0; i + 5 < t.allpts.length; i += 4) - JJ(this, r, t.allpts.slice(i, i + 6)); + eee(this, r, t.allpts.slice(i, i + 6)); } else if (n === "segments") for (var a = e.rstyle.linePts = [], i = 0; i + 1 < t.allpts.length; i += 2) a.push({ @@ -31015,7 +31027,7 @@ var uU = function(e, t) { }, lU = function(e, t) { var n = t.x - e.x, i = t.y - e.y; return uU(n, i); -}, eee = function(e, t, n, i) { +}, tee = function(e, t, n, i) { var a = b1(0, i - 1e-3, 1), o = b1(0, i + 1e-3, 1), s = wm(e, t, n, a), u = wm(e, t, n, o); return lU(s, u); }; @@ -31103,7 +31115,7 @@ Oh.recalculateEdgeLabelProjections = function(r) { break; } var T = y.cp, P = y.segment, I = (p - b) / P.length, k = P.t1 - P.t0, L = h ? P.t0 + k * I : P.t1 - k * I; - L = b1(0, L, 1), e = wm(T.p0, T.p1, T.p2, L), d = eee(T.p0, T.p1, T.p2, L); + L = b1(0, L, 1), e = wm(T.p0, T.p1, T.p2, L), d = tee(T.p0, T.p1, T.p2, L); break; } case "straight": @@ -31124,7 +31136,7 @@ Oh.recalculateEdgeLabelProjections = function(r) { }), j = Wg(H, q), z = B, B += j, !(B >= p)); $ += 2) ; var J = p - z, X = J / j; - X = b1(0, X, 1), e = xK(H, q, X), d = lU(H, q); + X = b1(0, X, 1), e = EK(H, q, X), d = lU(H, q); break; } } @@ -31173,8 +31185,8 @@ Oh.getLabelText = function(r, e) { var B = O.length === 0 ? L : O + L + k, j = this.calculateLabelDimensions(r, B), z = j.width; z <= f ? O += L + k : (O && p.push(O), O = L + k); } - } catch (Q) { - T.e(Q); + } catch (Z) { + T.e(Z); } finally { T.f(); } @@ -31254,8 +31266,8 @@ cU.getNodeShape = function(r) { } return t; }; -var V2 = {}; -V2.registerCalculationListeners = function() { +var G2 = {}; +G2.registerCalculationListeners = function() { var r = this.cy, e = r.collection(), t = this, n = function(o) { var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; if (e.merge(o), s) @@ -31291,11 +31303,11 @@ V2.registerCalculationListeners = function() { i(!0); }, t.beforeRender(i, t.beforeRenderPriorities.eleCalcs); }; -V2.onUpdateEleCalcs = function(r) { +G2.onUpdateEleCalcs = function(r) { var e = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; e.push(r); }; -V2.recalculateRenderedStyle = function(r, e) { +G2.recalculateRenderedStyle = function(r, e) { var t = function(x) { return x._private.rstyle.cleanConnected; }; @@ -31321,8 +31333,8 @@ V2.recalculateRenderedStyle = function(r, e) { } } }; -var H2 = {}; -H2.updateCachedGrabbedEles = function() { +var V2 = {}; +V2.updateCachedGrabbedEles = function() { var r = this.cachedZSortedEles; if (r) { r.drag = [], r.nondrag = []; @@ -31336,10 +31348,10 @@ H2.updateCachedGrabbedEles = function() { } } }; -H2.invalidateCachedZSortedEles = function() { +V2.invalidateCachedZSortedEles = function() { this.cachedZSortedEles = null; }; -H2.getCachedZSortedEles = function(r) { +V2.getCachedZSortedEles = function(r) { if (r || !this.cachedZSortedEles) { var e = this.cy.mutableElements().toArray(); e.sort(HF), e.interactive = e.filter(function(t) { @@ -31350,7 +31362,7 @@ H2.getCachedZSortedEles = function(r) { return e; }; var fU = {}; -[ry, Fx, Zu, J1, uD, Oh, cU, V2, H2].forEach(function(r) { +[ry, Fx, Zu, J1, uD, Oh, cU, G2, V2].forEach(function(r) { kr(fU, r); }); var dU = {}; @@ -31383,7 +31395,7 @@ Jm.registerBinding = function(r, e, t, n) { return u.on.apply(u, i); }; Jm.binder = function(r) { - var e = this, t = e.cy.window(), n = r === t || r === t.document || r === t.document.body || d$(r); + var e = this, t = e.cy.window(), n = r === t || r === t.document || r === t.document.body || h$(r); if (e.supportsPassiveEvents == null) { var i = !1; try { @@ -31871,7 +31883,7 @@ Jm.load = function() { } }); }, !1); - var Q, ue, re, ne, le, ce, pe, fe, se, de, ge, Oe, ke, Me = function(_e, Ue, Qe, Ze) { + var Z, ue, re, ne, le, ce, pe, fe, se, de, ge, Oe, ke, De = function(_e, Ue, Qe, Ze) { return Math.sqrt((Qe - _e) * (Qe - _e) + (Ze - Ue) * (Ze - Ue)); }, Ne = function(_e, Ue, Qe, Ze) { return (Qe - _e) * (Qe - _e) + (Ze - Ue) * (Ze - Ue); @@ -31905,9 +31917,9 @@ Jm.load = function() { if (_e.touches[1]) { r.touchData.singleTouchMoved = !0, b(r.dragData.touchDragEles); var ct = r.findContainerClientCoords(); - se = ct[0], de = ct[1], ge = ct[2], Oe = ct[3], Q = _e.touches[0].clientX - se, ue = _e.touches[0].clientY - de, re = _e.touches[1].clientX - se, ne = _e.touches[1].clientY - de, ke = 0 <= Q && Q <= ge && 0 <= re && re <= ge && 0 <= ue && ue <= Oe && 0 <= ne && ne <= Oe; + se = ct[0], de = ct[1], ge = ct[2], Oe = ct[3], Z = _e.touches[0].clientX - se, ue = _e.touches[0].clientY - de, re = _e.touches[1].clientX - se, ne = _e.touches[1].clientY - de, ke = 0 <= Z && Z <= ge && 0 <= re && re <= ge && 0 <= ue && ue <= Oe && 0 <= ne && ne <= Oe; var Lt = Ue.pan(), Rt = Ue.zoom(); - le = Me(Q, ue, re, ne), ce = Ne(Q, ue, re, ne), pe = [(Q + re) / 2, (ue + ne) / 2], fe = [(pe[0] - Lt.x) / Rt, (pe[1] - Lt.y) / Rt]; + le = De(Z, ue, re, ne), ce = Ne(Z, ue, re, ne), pe = [(Z + re) / 2, (ue + ne) / 2], fe = [(pe[0] - Lt.x) / Rt, (pe[1] - Lt.y) / Rt]; var jt = 200, Yt = jt * jt; if (ce < Yt && !_e.touches[2]) { var sr = r.findNearestElement(Qe[0], Qe[1], !0, !0), Ut = r.findNearestElement(Qe[2], Qe[3], !0, !0); @@ -32013,9 +32025,9 @@ Jm.load = function() { _i.grabbed = !1, _i.rscratch.inDragLayer = !1; } } - var Ir = r.touchData.start, ur = _e.touches[0].clientX - se, sn = _e.touches[0].clientY - de, Fr = _e.touches[1].clientX - se, un = _e.touches[1].clientY - de, pa = Me(ur, sn, Fr, un), di = pa / le; + var Ir = r.touchData.start, ur = _e.touches[0].clientX - se, sn = _e.touches[0].clientY - de, Fr = _e.touches[1].clientX - se, un = _e.touches[1].clientY - de, pa = De(ur, sn, Fr, un), di = pa / le; if (ke) { - var Bt = ur - Q, hr = sn - ue, ei = Fr - re, Hn = un - ne, fs = (Bt + ei) / 2, Na = (hr + Hn) / 2, ki = Ze.zoom(), Wr = ki * di, Nr = Ze.pan(), na = fe[0] * ki + Nr.x, Fs = fe[1] * ki + Nr.y, hu = { + var Bt = ur - Z, hr = sn - ue, ei = Fr - re, Hn = un - ne, fs = (Bt + ei) / 2, Na = (hr + Hn) / 2, ki = Ze.zoom(), Wr = ki * di, Nr = Ze.pan(), na = fe[0] * ki + Nr.x, Fs = fe[1] * ki + Nr.y, hu = { x: -Wr / ki * (na - Nr.x - fs) + na, y: -Wr / ki * (Fs - Nr.y - Na) + Fs }; @@ -32027,7 +32039,7 @@ Jm.load = function() { zoom: Wr, pan: hu, cancelOnFailedZoom: !0 - }), Ze.emit(Rt("pinchzoom")), le = pa, Q = ur, ue = sn, re = Fr, ne = un, r.pinching = !0; + }), Ze.emit(Rt("pinchzoom")), le = pa, Z = ur, ue = sn, re = Fr, ne = un, r.pinching = !0; } if (_e.touches[0]) { var Lt = r.projectIntoViewport(_e.touches[0].clientX, _e.touches[0].clientY); @@ -32087,12 +32099,12 @@ Jm.load = function() { Ue && _e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null && (r.data.bgActivePosistion = void 0, r.redrawHint("select", !0), r.redraw()); } }, !1); - var Z; - r.registerBinding(e, "touchcancel", Z = function(_e) { + var Q; + r.registerBinding(e, "touchcancel", Q = function(_e) { var Ue = r.touchData.start; r.touchData.capture = !1, Ue && Ue.unactivate(); }); - var ie, we, Ee, De; + var ie, we, Ee, Me; if (r.registerBinding(e, "touchend", ie = function(_e) { var Ue = r.touchData.start, Qe = r.touchData.capture; if (Qe) @@ -32167,7 +32179,7 @@ Jm.load = function() { r.touchData.singleTouchMoved || (Ue || nt.$(":selected").unselect(["tapunselect"]), i(Ue, ["tap", "vclick"], _e, { x: ct[0], y: ct[1] - }), we = !1, _e.timeStamp - De <= nt.multiClickDebounceTime() ? (Ee && clearTimeout(Ee), we = !0, De = null, i(Ue, ["dbltap", "vdblclick"], _e, { + }), we = !1, _e.timeStamp - Me <= nt.multiClickDebounceTime() ? (Ee && clearTimeout(Ee), we = !0, Me = null, i(Ue, ["dbltap", "vdblclick"], _e, { x: ct[0], y: ct[1] })) : (Ee = setTimeout(function() { @@ -32175,7 +32187,7 @@ Jm.load = function() { x: ct[0], y: ct[1] }); - }, nt.multiClickDebounceTime()), De = _e.timeStamp)), Ue != null && !r.dragData.didDrag && Ue._private.selectable && bn < r.touchTapThreshold2 && !r.pinching && (nt.selectionType() === "single" ? (nt.$(t).unmerge(Ue).unselect(["tapunselect"]), Ue.select(["tapselect"])) : Ue.selected() ? Ue.unselect(["tapunselect"]) : Ue.select(["tapselect"]), r.redrawHint("eles", !0)), r.touchData.singleTouchMoved = !0; + }, nt.multiClickDebounceTime()), Me = _e.timeStamp)), Ue != null && !r.dragData.didDrag && Ue._private.selectable && bn < r.touchTapThreshold2 && !r.pinching && (nt.selectionType() === "single" ? (nt.$(t).unmerge(Ue).unselect(["tapunselect"]), Ue.select(["tapselect"])) : Ue.selected() ? Ue.unselect(["tapunselect"]) : Ue.select(["tapselect"]), r.redrawHint("eles", !0)), r.touchData.singleTouchMoved = !0; } } } @@ -32229,7 +32241,7 @@ Jm.load = function() { }), r.registerBinding(r.container, "pointerup", function(tt) { vt(tt) || (wt(tt), Dt(tt), ie(tt)); }), r.registerBinding(r.container, "pointercancel", function(tt) { - vt(tt) || (wt(tt), Dt(tt), Z(tt)); + vt(tt) || (wt(tt), Dt(tt), Q(tt)); }), r.registerBinding(r.container, "pointermove", function(tt) { vt(tt) || (tt.preventDefault(), Mt(tt), Dt(tt), Y(tt)); }); @@ -32252,7 +32264,7 @@ _v.generatePolygon = function(r, e) { }, hasMiterBounds: r !== "rectangle", miterBounds: function(n, i, a, o, s, u) { - return AK(this.points, n, i, a, o, s); + return RK(this.points, n, i, a, o, s); } }; }; @@ -32264,7 +32276,7 @@ _v.generateEllipse = function() { this.renderer.nodeShapeImpl(this.name, e, t, n, i, a); }, intersectLine: function(e, t, n, i, a, o, s, u) { - return LK(a, o, e, t, n / 2 + s, i / 2 + s); + return jK(a, o, e, t, n / 2 + s, i / 2 + s); }, checkPoint: function(e, t, n, i, a, o, s, u) { return jg(e, t, i, a, o, s, n); @@ -32296,10 +32308,10 @@ _v.generateRoundPolygon = function(r, e) { this.renderer.nodeShapeImpl("round-polygon", n, i, a, o, s, this.points, this.getOrCreateCorners(i, a, o, s, u, l, "drawCorners")); }, intersectLine: function(n, i, a, o, s, u, l, c, f) { - return BK(s, u, this.points, n, i, a, o, l, this.getOrCreateCorners(n, i, a, o, c, f, "corners")); + return FK(s, u, this.points, n, i, a, o, l, this.getOrCreateCorners(n, i, a, o, c, f, "corners")); }, checkPoint: function(n, i, a, o, s, u, l, c, f) { - return NK(n, i, this.points, u, l, o, s, this.getOrCreateCorners(u, l, o, s, c, f, "corners")); + return LK(n, i, this.points, u, l, o, s, this.getOrCreateCorners(u, l, o, s, c, f, "corners")); } }; }; @@ -32396,7 +32408,7 @@ _v.generateBarrel = function() { return _1(a, o, p, e, t); }, generateBarrelBezierPts: function(e, t, n, i) { - var a = t / 2, o = e / 2, s = n - o, u = n + o, l = i - a, c = i + a, f = cM(e, t), d = f.heightOffset, h = f.widthOffset, p = f.ctrlPtOffsetPct * e, g = { + var a = t / 2, o = e / 2, s = n - o, u = n + o, l = i - a, c = i + a, f = lM(e, t), d = f.heightOffset, h = f.widthOffset, p = f.ctrlPtOffsetPct * e, g = { topLeft: [s, l + d, s + p, l, s + h, l], topRight: [u - h, l, u - p, l, u, l + d], bottomRight: [u, c - d, u - p, c, u - h, c], @@ -32405,17 +32417,17 @@ _v.generateBarrel = function() { return g.topLeft.isTop = !0, g.topRight.isTop = !0, g.bottomLeft.isBottom = !0, g.bottomRight.isBottom = !0, g; }, checkPoint: function(e, t, n, i, a, o, s, u) { - var l = cM(i, a), c = l.heightOffset, f = l.widthOffset; + var l = lM(i, a), c = l.heightOffset, f = l.widthOffset; if (pv(e, t, this.points, o, s, i, a - 2 * c, [0, -1], n) || pv(e, t, this.points, o, s, i - 2 * f, a, [0, -1], n)) return !0; for (var d = this.generateBarrelBezierPts(i, a, o, s), h = function(T, P, I) { var k = I[4], L = I[2], B = I[0], j = I[5], z = I[1], H = Math.min(k, B), q = Math.max(k, B), W = Math.min(j, z), $ = Math.max(j, z); if (H <= T && T <= q && W <= P && P <= $) { - var J = FK(k, L, B), X = MK(J[0], J[1], J[2], T), Q = X.filter(function(ue) { + var J = UK(k, L, B), X = DK(J[0], J[1], J[2], T), Z = X.filter(function(ue) { return 0 <= ue && ue <= 1; }); - if (Q.length > 0) - return Q[0]; + if (Z.length > 0) + return Z[0]; } return null; }, p = Object.keys(d), g = 0; g < p.length; g++) { @@ -32462,7 +32474,7 @@ _v.registerNodeShapes = function() { this.generatePolygon("pentagon", Bl(5, 0)), this.generateRoundPolygon("round-pentagon", Bl(5, 0)), this.generatePolygon("hexagon", Bl(6, 0)), this.generateRoundPolygon("round-hexagon", Bl(6, 0)), this.generatePolygon("heptagon", Bl(7, 0)), this.generateRoundPolygon("round-heptagon", Bl(7, 0)), this.generatePolygon("octagon", Bl(8, 0)), this.generateRoundPolygon("round-octagon", Bl(8, 0)); var n = new Array(20); { - var i = lM(5, 0), a = lM(5, Math.PI / 5), o = 0.5 * (3 - Math.sqrt(5)); + var i = uM(5, 0), a = uM(5, Math.PI / 5), o = 0.5 * (3 - Math.sqrt(5)); o *= 1.57; for (var s = 0; s < a.length / 2; s++) a[s * 2] *= o, a[s * 2 + 1] *= o; @@ -32526,9 +32538,9 @@ e_.startRenderLoop = function() { Mx(t); } }; -var tee = function(e) { +var ree = function(e) { this.init(e); -}, hU = tee, e0 = hU.prototype; +}, hU = ree, e0 = hU.prototype; e0.clientFunctions = ["redrawHint", "render", "renderTo", "matchCanvasSize", "nodeShapeImpl", "arrowShapeImpl"]; e0.init = function(r) { var e = this; @@ -32604,7 +32616,7 @@ e0.isHeadless = function() { [oD, fU, dU, Jm, _v, e_].forEach(function(r) { kr(e0, r); }); -var LO = 1e3 / 60, vU = { +var NO = 1e3 / 60, vU = { setupDequeueing: function(e) { return function() { var n = this, i = this.renderer; @@ -32616,14 +32628,14 @@ var LO = 1e3 / 60, vU = { var f = vv(), d = i.averageRedrawTime, h = i.lastRedrawTime, p = [], g = i.cy.extent(), y = i.getPixelRatio(); for (l || i.flushRenderedStyleQueue(); ; ) { var b = vv(), _ = b - f, m = b - c; - if (h < LO) { - var x = LO - (l ? d : 0); + if (h < NO) { + var x = NO - (l ? d : 0); if (m >= e.deqFastCost * x) break; } else if (l) { if (_ >= e.deqCost * h || _ >= e.deqAvgCost * d) break; - } else if (m >= e.deqNoDrawCost * LO) + } else if (m >= e.deqNoDrawCost * NO) break; var S = e.deq(n, y, g); if (S.length > 0) @@ -32638,7 +32650,7 @@ var LO = 1e3 / 60, vU = { } }; } -}, ree = /* @__PURE__ */ (function() { +}, nee = /* @__PURE__ */ (function() { function r(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dx; zp(this, r), this.idsByKey = new sv(), this.keyForId = new sv(), this.cachesByLvl = new sv(), this.lvls = [], this.getKey = e, this.doesEleInvalidateKey = t; @@ -32762,11 +32774,11 @@ var LO = 1e3 / 60, vU = { return a && this.invalidateKey(i), a || this.getNumberOfIdsForKey(i) === 0; } }]); -})(), g3 = 25, ww = 50, nx = -4, EM = 3, pU = 7.99, nee = 8, iee = 1024, aee = 1024, oee = 1024, see = 0.2, uee = 0.8, lee = 10, cee = 0.15, fee = 0.1, dee = 0.9, hee = 0.9, vee = 100, pee = 1, gm = { +})(), g3 = 25, ww = 50, nx = -4, xM = 3, pU = 7.99, iee = 8, aee = 1024, oee = 1024, see = 1024, uee = 0.2, lee = 0.8, cee = 10, fee = 0.15, dee = 0.1, hee = 0.9, vee = 0.9, pee = 100, gee = 1, gm = { dequeue: "dequeue", downscale: "downscale", highQuality: "highQuality" -}, gee = fu({ +}, yee = fu({ getKey: null, doesEleInvalidateKey: Dx, drawElement: null, @@ -32779,8 +32791,8 @@ var LO = 1e3 / 60, vU = { }), vb = function(e, t) { var n = this; n.renderer = e, n.onDequeues = []; - var i = gee(t); - kr(n, i), n.lookup = new ree(i.getKey, i.doesEleInvalidateKey), n.setupDequeueing(); + var i = yee(t); + kr(n, i), n.lookup = new nee(i.getKey, i.doesEleInvalidateKey), n.setupDequeueing(); }, cs = vb.prototype; cs.reasons = gm; cs.getTextureQueue = function(r) { @@ -32807,7 +32819,7 @@ cs.getElement = function(r, e, t, n, i) { return null; if (n == null && (n = Math.ceil(Y5(s * t))), n < nx) n = nx; - else if (s >= pU || n > EM) + else if (s >= pU || n > xM) return null; var l = Math.pow(2, n), c = e.h * l, f = e.w * l, d = o.eleTextBiggerThanMin(r, l); if (!this.isVisible(r, d)) @@ -32816,7 +32828,7 @@ cs.getElement = function(r, e, t, n, i) { if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h) return h; var p; - if (c <= g3 ? p = g3 : c <= ww ? p = ww : p = Math.ceil(c / ww) * ww, c > oee || f > aee) + if (c <= g3 ? p = g3 : c <= ww ? p = ww : p = Math.ceil(c / ww) * ww, c > see || f > oee) return null; var g = a.getTextureQueue(p), y = g[g.length - 2], b = function() { return a.recycleTexture(p, f) || a.addTexture(p, f); @@ -32824,7 +32836,7 @@ cs.getElement = function(r, e, t, n, i) { y || (y = g[g.length - 1]), y || (y = b()), y.width - y.usedWidth < f && (y = b()); for (var _ = function(H) { return H && H.scaledLabelShown === d; - }, m = i && i === gm.dequeue, x = i && i === gm.highQuality, S = i && i === gm.downscale, O, E = n + 1; E <= EM; E++) { + }, m = i && i === gm.dequeue, x = i && i === gm.highQuality, S = i && i === gm.downscale, O, E = n + 1; E <= xM; E++) { var T = u.get(r, E); if (T) { O = T; @@ -32865,7 +32877,7 @@ cs.getElement = function(r, e, t, n, i) { width: f, height: c, scaledLabelShown: d - }, y.usedWidth += Math.ceil(f + nee), y.eleCaches.push(h), u.set(r, n, h), a.checkTextureFullness(y), h; + }, y.usedWidth += Math.ceil(f + iee), y.eleCaches.push(h), u.set(r, n, h), a.checkTextureFullness(y), h; }; cs.invalidateElements = function(r) { for (var e = 0; e < r.length; e++) @@ -32874,7 +32886,7 @@ cs.invalidateElements = function(r) { cs.invalidateElement = function(r) { var e = this, t = e.lookup, n = [], i = t.isInvalid(r); if (i) { - for (var a = nx; a <= EM; a++) { + for (var a = nx; a <= xM; a++) { var o = t.getForCachedKey(r, a); o && n.push(o); } @@ -32888,11 +32900,11 @@ cs.invalidateElement = function(r) { } }; cs.checkTextureUtility = function(r) { - r.invalidatedWidth >= see * r.width && this.retireTexture(r); + r.invalidatedWidth >= uee * r.width && this.retireTexture(r); }; cs.checkTextureFullness = function(r) { var e = this, t = e.getTextureQueue(r.height); - r.usedWidth / r.width > uee && r.fullnessChecks >= lee ? Pp(t, r) : r.fullnessChecks++; + r.usedWidth / r.width > lee && r.fullnessChecks >= cee ? Pp(t, r) : r.fullnessChecks++; }; cs.retireTexture = function(r) { var e = this, t = r.height, n = e.getTextureQueue(t), i = this.lookup; @@ -32907,7 +32919,7 @@ cs.retireTexture = function(r) { }; cs.addTexture = function(r, e) { var t = this, n = t.getTextureQueue(r), i = {}; - return n.push(i), i.eleCaches = [], i.height = r, i.width = Math.max(iee, e), i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, i.canvas = t.renderer.makeOffscreenCanvas(i.width, i.height), i.context = i.canvas.getContext("2d"), i; + return n.push(i), i.eleCaches = [], i.height = r, i.width = Math.max(aee, e), i.usedWidth = 0, i.invalidatedWidth = 0, i.fullnessChecks = 0, i.canvas = t.renderer.makeOffscreenCanvas(i.width, i.height), i.context = i.canvas.getContext("2d"), i; }; cs.recycleTexture = function(r, e) { for (var t = this, n = t.getTextureQueue(r), i = t.getRetiredTextureQueue(r), a = 0; a < i.length; a++) { @@ -32931,7 +32943,7 @@ cs.queueElement = function(r, e) { } }; cs.dequeue = function(r) { - for (var e = this, t = e.getElementQueue(), n = e.getElementKeyToQueue(), i = [], a = e.lookup, o = 0; o < pee && t.size() > 0; o++) { + for (var e = this, t = e.getElementQueue(), n = e.getElementKeyToQueue(), i = [], a = e.lookup, o = 0; o < gee && t.size() > 0; o++) { var s = t.pop(), u = s.key, l = s.eles[0], c = a.hasCache(l, s.level); if (n[u] = null, c) continue; @@ -32952,11 +32964,11 @@ cs.offDequeue = function(r) { Pp(this.onDequeues, r); }; cs.setupDequeueing = vU.setupDequeueing({ - deqRedrawThreshold: vee, - deqCost: cee, - deqAvgCost: fee, - deqNoDrawCost: dee, - deqFastCost: hee, + deqRedrawThreshold: pee, + deqCost: fee, + deqAvgCost: dee, + deqNoDrawCost: hee, + deqFastCost: vee, deq: function(e, t, n) { return e.dequeue(t, n); }, @@ -32979,21 +32991,21 @@ cs.setupDequeueing = vU.setupDequeueing({ return e.renderer.beforeRenderPriorities.eleTxrDeq; } }); -var yee = 1, Db = -4, Ux = 2, mee = 3.99, bee = 50, _ee = 50, wee = 0.15, xee = 0.1, Eee = 0.9, See = 0.9, Oee = 1, y3 = 250, Tee = 4e3 * 4e3, m3 = 32767, Cee = !0, gU = function(e) { +var mee = 1, Db = -4, Ux = 2, bee = 3.99, _ee = 50, wee = 50, xee = 0.15, Eee = 0.1, See = 0.9, Oee = 0.9, Tee = 1, y3 = 250, Cee = 4e3 * 4e3, m3 = 32767, Aee = !0, gU = function(e) { var t = this, n = t.renderer = e, i = n.cy; t.layersByLevel = {}, t.firstGet = !0, t.lastInvalidationTime = vv() - 2 * y3, t.skipping = !1, t.eleTxrDeqs = i.collection(), t.scheduleElementRefinement = $1(function() { t.refineElementTextures(t.eleTxrDeqs), t.eleTxrDeqs.unmerge(t.eleTxrDeqs); - }, _ee), n.beforeRender(function(o, s) { + }, wee), n.beforeRender(function(o, s) { s - t.lastInvalidationTime <= y3 ? t.skipping = !0 : t.skipping = !1; }, n.beforeRenderPriorities.lyrTxrSkip); var a = function(s, u) { return u.reqs - s.reqs; }; t.layersQueue = new K1(a), t.setupDequeueing(); -}, du = gU.prototype, b3 = 0, Aee = Math.pow(2, 53) - 1; +}, du = gU.prototype, b3 = 0, Ree = Math.pow(2, 53) - 1; du.makeLayer = function(r, e) { var t = Math.pow(2, e), n = Math.ceil(r.w * t), i = Math.ceil(r.h * t), a = this.renderer.makeOffscreenCanvas(n, i), o = { - id: b3 = ++b3 % Aee, + id: b3 = ++b3 % Ree, bb: r, level: e, width: n, @@ -33011,7 +33023,7 @@ du.getLayers = function(r, e, t) { if (n.firstGet = !1, t == null) { if (t = Math.ceil(Y5(o * e)), t < Db) t = Db; - else if (o >= mee || t > Ux) + else if (o >= bee || t > Ux) return null; } n.validateLayersElesOrdering(t, r); @@ -33038,7 +33050,7 @@ du.getLayers = function(r, e, t) { if (!f) { f = zl(); for (var I = 0; I < r.length; I++) - OK(f, r[I].boundingBox()); + TK(f, r[I].boundingBox()); } return f; }, y = function(I) { @@ -33049,7 +33061,7 @@ du.getLayers = function(r, e, t) { if (L > m3 || B > m3) return null; var j = L * B; - if (j > Tee) + if (j > Cee) return null; var z = n.makeLayer(f, t); if (k != null) { @@ -33060,7 +33072,7 @@ du.getLayers = function(r, e, t) { }; if (n.skipping && !s) return null; - for (var b = null, _ = r.length / yee, m = !s, x = 0; x < r.length; x++) { + for (var b = null, _ = r.length / mee, m = !s, x = 0; x < r.length; x++) { var S = r[x], O = S._private.rscratch, E = O.imgLayerCaches = O.imgLayerCaches || {}, T = E[t]; if (T) { b = T; @@ -33080,7 +33092,7 @@ du.getEleLevelForLayerLevel = function(r, e) { }; du.drawEleInLayer = function(r, e, t, n) { var i = this, a = this.renderer, o = r.context, s = e.boundingBox(); - s.w === 0 || s.h === 0 || !e.visible() || (t = i.getEleLevelForLayerLevel(t, n), a.setImgSmoothing(o, !1), a.drawCachedElement(o, e, null, null, t, Cee), a.setImgSmoothing(o, !0)); + s.w === 0 || s.h === 0 || !e.visible() || (t = i.getEleLevelForLayerLevel(t, n), a.setImgSmoothing(o, !1), a.drawCachedElement(o, e, null, null, t, Aee), a.setImgSmoothing(o, !0)); }; du.levelIsComplete = function(r, e) { var t = this, n = t.layersByLevel[r]; @@ -33171,7 +33183,7 @@ du.queueLayer = function(r, e) { } }; du.dequeue = function(r) { - for (var e = this, t = e.layersQueue, n = [], i = 0; i < Oee && t.size() !== 0; ) { + for (var e = this, t = e.layersQueue, n = [], i = 0; i < Tee && t.size() !== 0; ) { var a = t.peek(); if (a.replacement) { t.pop(); @@ -33206,11 +33218,11 @@ du.requestRedraw = $1(function() { r.redrawHint("eles", !0), r.redrawHint("drag", !0), r.redraw(); }, 100); du.setupDequeueing = vU.setupDequeueing({ - deqRedrawThreshold: bee, - deqCost: wee, - deqAvgCost: xee, - deqNoDrawCost: Eee, - deqFastCost: See, + deqRedrawThreshold: _ee, + deqCost: xee, + deqAvgCost: Eee, + deqNoDrawCost: See, + deqFastCost: Oee, deq: function(e, t) { return e.dequeue(t); }, @@ -33221,13 +33233,13 @@ du.setupDequeueing = vU.setupDequeueing({ } }); var yU = {}, _3; -function Ree(r, e) { +function Pee(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; r.lineTo(n.x, n.y); } } -function Pee(r, e, t) { +function Mee(r, e, t) { for (var n, i = 0; i < e.length; i++) { var a = e[i]; i === 0 && (n = a), r.lineTo(a.x, a.y); @@ -33248,7 +33260,7 @@ function w3(r, e, t) { } r.closePath && r.closePath(); } -function Mee(r, e, t, n, i) { +function Dee(r, e, t, n, i) { r.beginPath && r.beginPath(), r.arc(t, n, i, 0, Math.PI * 2, !1); var a = e, o = a[0]; r.moveTo(o.x, o.y); @@ -33258,17 +33270,17 @@ function Mee(r, e, t, n, i) { } r.closePath && r.closePath(); } -function Dee(r, e, t, n) { +function kee(r, e, t, n) { r.arc(e, t, n, 0, Math.PI * 2, !1); } yU.arrowShapeImpl = function(r) { return (_3 || (_3 = { - polygon: Ree, - "triangle-backcurve": Pee, + polygon: Pee, + "triangle-backcurve": Mee, "triangle-tee": w3, - "circle-triangle": Mee, + "circle-triangle": Dee, "triangle-cross": w3, - circle: Dee + circle: kee }))[r]; }; var Th = {}; @@ -33306,24 +33318,24 @@ Th.drawCachedElementPortion = function(r, e, t, n, i, a, o, s) { t.drawElement(r, e); } }; -var kee = function() { +var Iee = function() { return 0; -}, Iee = function(e, t) { - return e.getTextAngle(t, null); }, Nee = function(e, t) { - return e.getTextAngle(t, "source"); + return e.getTextAngle(t, null); }, Lee = function(e, t) { - return e.getTextAngle(t, "target"); + return e.getTextAngle(t, "source"); }, jee = function(e, t) { + return e.getTextAngle(t, "target"); +}, Bee = function(e, t) { return t.effectiveOpacity(); -}, jO = function(e, t) { +}, LO = function(e, t) { return t.pstyle("text-opacity").pfValue * t.effectiveOpacity(); }; Th.drawCachedElement = function(r, e, t, n, i, a) { var o = this, s = o.data, u = s.eleTxrCache, l = s.lblTxrCache, c = s.slbTxrCache, f = s.tlbTxrCache, d = e.boundingBox(), h = a === !0 ? u.reasons.highQuality : null; if (!(d.w === 0 || d.h === 0 || !e.visible()) && (!n || $5(d, n))) { var p = e.isEdge(), g = e.element()._private.rscratch.badLine; - o.drawElementUnderlay(r, e), o.drawCachedElementPortion(r, e, u, t, i, h, kee, jee), (!p || !g) && o.drawCachedElementPortion(r, e, l, t, i, h, Iee, jO), p && !g && (o.drawCachedElementPortion(r, e, c, t, i, h, Nee, jO), o.drawCachedElementPortion(r, e, f, t, i, h, Lee, jO)), o.drawElementOverlay(r, e); + o.drawElementUnderlay(r, e), o.drawCachedElementPortion(r, e, u, t, i, h, Iee, Bee), (!p || !g) && o.drawCachedElementPortion(r, e, l, t, i, h, Nee, LO), p && !g && (o.drawCachedElementPortion(r, e, c, t, i, h, Lee, LO), o.drawCachedElementPortion(r, e, f, t, i, h, jee, LO)), o.drawElementOverlay(r, e); } }; Th.drawElements = function(r, e) { @@ -33529,8 +33541,8 @@ lD.drawInscribedImage = function(r, e, t, n, i) { H === "%" ? B += (y - I) * q : B += q; var W = u - b / 2, $ = c(t, "background-position-y", "units", n), J = c(t, "background-position-y", "pfValue", n); $ === "%" ? W += (b - k) * J : W += J; - var X = c(t, "background-offset-y", "units", n), Q = c(t, "background-offset-y", "pfValue", n); - X === "%" ? W += (b - k) * Q : W += Q, _.pathCache && (B -= s, W -= u, s = 0, u = 0); + var X = c(t, "background-offset-y", "units", n), Z = c(t, "background-offset-y", "pfValue", n); + X === "%" ? W += (b - k) * Z : W += Z, _.pathCache && (B -= s, W -= u, s = 0, u = 0); var ue = r.globalAlpha; r.globalAlpha = S; var re = a.getImgSmoothing(r), ne = !1; @@ -33588,7 +33600,7 @@ ny.setupTextStyle = function(r, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, n = e.pstyle("font-style").strValue, i = e.pstyle("font-size").pfValue + "px", a = e.pstyle("font-family").strValue, o = e.pstyle("font-weight").strValue, s = t ? e.effectiveOpacity() * e.pstyle("text-opacity").value : 1, u = e.pstyle("text-outline-opacity").value * s, l = e.pstyle("color").value, c = e.pstyle("text-outline-color").value; r.font = n + " " + o + " " + i + " " + a, r.lineJoin = "round", this.colorFillStyle(r, l[0], l[1], l[2], s), this.colorStrokeStyle(r, c[0], c[1], c[2], u); }; -function Bee(r, e, t, n, i) { +function Fee(r, e, t, n, i) { var a = Math.min(n, i), o = a / 2, s = e + n / 2, u = t + i / 2; r.beginPath(), r.arc(s, u, o, 0, Math.PI * 2), r.closePath(); } @@ -33626,13 +33638,13 @@ ny.drawText = function(r, e, t) { } var O = e.pstyle("text-background-opacity").value, E = e.pstyle("text-border-opacity").value, T = e.pstyle("text-border-width").pfValue, P = e.pstyle("text-background-padding").pfValue, I = e.pstyle("text-background-shape").strValue, k = I === "round-rectangle" || I === "roundrectangle", L = I === "circle", B = 2; if (O > 0 || T > 0 && E > 0) { - var j = r.fillStyle, z = r.strokeStyle, H = r.lineWidth, q = e.pstyle("text-background-color").value, W = e.pstyle("text-border-color").value, $ = e.pstyle("text-border-style").value, J = O > 0, X = T > 0 && E > 0, Q = u - P; + var j = r.fillStyle, z = r.strokeStyle, H = r.lineWidth, q = e.pstyle("text-background-color").value, W = e.pstyle("text-border-color").value, $ = e.pstyle("text-border-style").value, J = O > 0, X = T > 0 && E > 0, Z = u - P; switch (m) { case "left": - Q -= p; + Z -= p; break; case "center": - Q -= p / 2; + Z -= p / 2; break; } var ue = l - g - P, re = p + 2 * P, ne = g + 2 * P; @@ -33652,9 +33664,9 @@ ny.drawText = function(r, e, t) { r.setLineDash([]); break; } - if (k ? (r.beginPath(), x3(r, Q, ue, re, ne, B)) : L ? (r.beginPath(), Bee(r, Q, ue, re, ne)) : (r.beginPath(), r.rect(Q, ue, re, ne)), J && r.fill(), X && r.stroke(), X && $ === "double") { + if (k ? (r.beginPath(), x3(r, Z, ue, re, ne, B)) : L ? (r.beginPath(), Fee(r, Z, ue, re, ne)) : (r.beginPath(), r.rect(Z, ue, re, ne)), J && r.fill(), X && r.stroke(), X && $ === "double") { var le = T / 2; - r.beginPath(), k ? x3(r, Q + le, ue + le, re - 2 * le, ne - 2 * le, B) : r.rect(Q + le, ue + le, re - 2 * le, ne - 2 * le), r.stroke(); + r.beginPath(), k ? x3(r, Z + le, ue + le, re - 2 * le, ne - 2 * le, B) : r.rect(Z + le, ue + le, re - 2 * le, ne - 2 * le), r.stroke(); } r.fillStyle = j, r.strokeStyle = z, r.lineWidth = H, r.setLineDash && r.setLineDash([]); } @@ -33695,7 +33707,7 @@ Vp.drawNode = function(r, e, t) { }); } } - var k = e.pstyle("background-blacken").value, L = e.pstyle("border-width").pfValue, B = e.pstyle("background-opacity").value * d, j = e.pstyle("border-color").value, z = e.pstyle("border-style").value, H = e.pstyle("border-join").value, q = e.pstyle("border-cap").value, W = e.pstyle("border-position").value, $ = e.pstyle("border-dash-pattern").pfValue, J = e.pstyle("border-dash-offset").pfValue, X = e.pstyle("border-opacity").value * d, Q = e.pstyle("outline-width").pfValue, ue = e.pstyle("outline-color").value, re = e.pstyle("outline-style").value, ne = e.pstyle("outline-opacity").value * d, le = e.pstyle("outline-offset").value, ce = e.pstyle("corner-radius").value; + var k = e.pstyle("background-blacken").value, L = e.pstyle("border-width").pfValue, B = e.pstyle("background-opacity").value * d, j = e.pstyle("border-color").value, z = e.pstyle("border-style").value, H = e.pstyle("border-join").value, q = e.pstyle("border-cap").value, W = e.pstyle("border-position").value, $ = e.pstyle("border-dash-pattern").pfValue, J = e.pstyle("border-dash-offset").pfValue, X = e.pstyle("border-opacity").value * d, Z = e.pstyle("outline-width").pfValue, ue = e.pstyle("outline-color").value, re = e.pstyle("outline-style").value, ne = e.pstyle("outline-opacity").value * d, le = e.pstyle("outline-offset").value, ce = e.pstyle("corner-radius").value; ce !== "auto" && (ce = e.pstyle("corner-radius").pfValue); var pe = function() { var vt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : B; @@ -33718,7 +33730,7 @@ Vp.drawNode = function(r, e, t) { var ke = de(s, u, ge, Oe); p = ke.path, g = ke.cacheHit; } - var Me = function() { + var De = function() { if (!g) { var vt = f; h && (vt = { @@ -33743,7 +33755,7 @@ Vp.drawNode = function(r, e, t) { }, Y = function() { var vt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d; o.hasStripe(e) && (r.save(), h ? r.clip(c.pathCache) : (o.nodeShapes[o.getNodeShape(e)].draw(r, f.x, f.y, s, u, ce, c), r.clip()), o.drawStripe(r, e, tt), r.restore(), vt && (h || o.nodeShapes[o.getNodeShape(e)].draw(r, f.x, f.y, s, u, ce, c))); - }, Z = function() { + }, Q = function() { var vt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : d, tt = (k > 0 ? k : -k) * vt, _e = k > 0 ? 0 : 255; k !== 0 && (o.colorFillStyle(r, _e, _e, _e, tt), h ? r.fill(p) : r.fill()); }, ie = function() { @@ -33779,8 +33791,8 @@ Vp.drawNode = function(r, e, t) { r.setLineDash && r.setLineDash([]); } }, we = function() { - if (Q > 0) { - if (r.lineWidth = Q, r.lineCap = "butt", r.setLineDash) + if (Z > 0) { + if (r.lineWidth = Z, r.lineCap = "butt", r.setLineDash) switch (re) { case "dotted": r.setLineDash([1, 1]); @@ -33800,7 +33812,7 @@ Vp.drawNode = function(r, e, t) { }); var tt = o.getNodeShape(e), _e = L; W === "inside" && (_e = 0), W === "outside" && (_e *= 2); - var Ue = (s + _e + (Q + le)) / s, Qe = (u + _e + (Q + le)) / u, Ze = s * Ue, nt = u * Qe, It = o.nodeShapes[tt].points, ct; + var Ue = (s + _e + (Z + le)) / s, Qe = (u + _e + (Z + le)) / u, Ze = s * Ue, nt = u * Qe, It = o.nodeShapes[tt].points, ct; if (h) { var Lt = de(Ze, nt, tt, It); ct = Lt.path; @@ -33809,8 +33821,8 @@ Vp.drawNode = function(r, e, t) { o.drawEllipsePath(ct || r, vt.x, vt.y, Ze, nt); else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(tt)) { var Rt = 0, jt = 0, Yt = 0; - tt === "round-diamond" ? Rt = (_e + le + Q) * 1.4 : tt === "round-heptagon" ? (Rt = (_e + le + Q) * 1.075, Yt = -(_e / 2 + le + Q) / 35) : tt === "round-hexagon" ? Rt = (_e + le + Q) * 1.12 : tt === "round-pentagon" ? (Rt = (_e + le + Q) * 1.13, Yt = -(_e / 2 + le + Q) / 15) : tt === "round-tag" ? (Rt = (_e + le + Q) * 1.12, jt = (_e / 2 + Q + le) * 0.07) : tt === "round-triangle" && (Rt = (_e + le + Q) * (Math.PI / 2), Yt = -(_e + le / 2 + Q) / Math.PI), Rt !== 0 && (Ue = (s + Rt) / s, Ze = s * Ue, ["round-hexagon", "round-tag"].includes(tt) || (Qe = (u + Rt) / u, nt = u * Qe)), ce = ce === "auto" ? hF(Ze, nt) : ce; - for (var sr = Ze / 2, Ut = nt / 2, Rr = ce + (_e + Q + le) / 2, Xt = new Array(It.length / 2), Vr = new Array(It.length / 2), Br = 0; Br < It.length / 2; Br++) + tt === "round-diamond" ? Rt = (_e + le + Z) * 1.4 : tt === "round-heptagon" ? (Rt = (_e + le + Z) * 1.075, Yt = -(_e / 2 + le + Z) / 35) : tt === "round-hexagon" ? Rt = (_e + le + Z) * 1.12 : tt === "round-pentagon" ? (Rt = (_e + le + Z) * 1.13, Yt = -(_e / 2 + le + Z) / 15) : tt === "round-tag" ? (Rt = (_e + le + Z) * 1.12, jt = (_e / 2 + Z + le) * 0.07) : tt === "round-triangle" && (Rt = (_e + le + Z) * (Math.PI / 2), Yt = -(_e + le / 2 + Z) / Math.PI), Rt !== 0 && (Ue = (s + Rt) / s, Ze = s * Ue, ["round-hexagon", "round-tag"].includes(tt) || (Qe = (u + Rt) / u, nt = u * Qe)), ce = ce === "auto" ? hF(Ze, nt) : ce; + for (var sr = Ze / 2, Ut = nt / 2, Rr = ce + (_e + Z + le) / 2, Xt = new Array(It.length / 2), Vr = new Array(It.length / 2), Br = 0; Br < It.length / 2; Br++) Xt[Br] = { x: vt.x + jt + sr * It[Br * 2], y: vt.y + Yt + Ut * It[Br * 2 + 1] @@ -33820,18 +33832,18 @@ Vp.drawNode = function(r, e, t) { sn = Xt[mr % un], Fr = Xt[(mr + 1) % un], Vr[mr] = sD(ur, sn, Fr, Rr), ur = sn, sn = Fr; o.drawRoundPolygonPath(ct || r, vt.x + jt, vt.y + Yt, s * Ue, u * Qe, It, Vr); } else if (["roundrectangle", "round-rectangle"].includes(tt)) - ce = ce === "auto" ? Mp(Ze, nt) : ce, o.drawRoundRectanglePath(ct || r, vt.x, vt.y, Ze, nt, ce + (_e + Q + le) / 2); + ce = ce === "auto" ? Mp(Ze, nt) : ce, o.drawRoundRectanglePath(ct || r, vt.x, vt.y, Ze, nt, ce + (_e + Z + le) / 2); else if (["cutrectangle", "cut-rectangle"].includes(tt)) - ce = ce === "auto" ? K5() : ce, o.drawCutRectanglePath(ct || r, vt.x, vt.y, Ze, nt, null, ce + (_e + Q + le) / 4); + ce = ce === "auto" ? K5() : ce, o.drawCutRectanglePath(ct || r, vt.x, vt.y, Ze, nt, null, ce + (_e + Z + le) / 4); else if (["bottomroundrectangle", "bottom-round-rectangle"].includes(tt)) - ce = ce === "auto" ? Mp(Ze, nt) : ce, o.drawBottomRoundRectanglePath(ct || r, vt.x, vt.y, Ze, nt, ce + (_e + Q + le) / 2); + ce = ce === "auto" ? Mp(Ze, nt) : ce, o.drawBottomRoundRectanglePath(ct || r, vt.x, vt.y, Ze, nt, ce + (_e + Z + le) / 2); else if (tt === "barrel") o.drawBarrelPath(ct || r, vt.x, vt.y, Ze, nt); else if (tt.startsWith("polygon") || ["rhomboid", "right-rhomboid", "round-tag", "tag", "vee"].includes(tt)) { - var bn = (_e + Q + le) / s; + var bn = (_e + Z + le) / s; It = kx(Ix(It, bn)), o.drawPolygonPath(ct || r, vt.x, vt.y, s, u, It); } else { - var wn = (_e + Q + le) / s; + var wn = (_e + Z + le) / s; It = kx(Ix(It, -wn)), o.drawPolygonPath(ct || r, vt.x, vt.y, s, u, It); } if (h ? r.stroke(ct) : r.stroke(), re === "double") { @@ -33843,16 +33855,16 @@ Vp.drawNode = function(r, e, t) { } }, Ee = function() { i && o.drawNodeOverlay(r, e, f, s, u); - }, De = function() { + }, Me = function() { i && o.drawNodeUnderlay(r, e, f, s, u); }, Ie = function() { o.drawElementText(r, e, null, n); }, Ye = e.pstyle("ghost").value === "yes"; if (Ye) { var ot = e.pstyle("ghost-offset-x").pfValue, mt = e.pstyle("ghost-offset-y").pfValue, wt = e.pstyle("ghost-opacity").value, Mt = wt * d; - r.translate(ot, mt), se(), we(), pe(wt * B), Me(), Ne(Mt, !0), fe(wt * X), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(Mt, !1), Z(Mt), r.translate(-ot, -mt); + r.translate(ot, mt), se(), we(), pe(wt * B), De(), Ne(Mt, !0), fe(wt * X), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(Mt, !1), Q(Mt), r.translate(-ot, -mt); } - h && r.translate(-f.x, -f.y), De(), h && r.translate(f.x, f.y), se(), we(), pe(), Me(), Ne(d, !0), fe(), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(d, !1), Z(), h && r.translate(-f.x, -f.y), Ie(), Ee(), t && r.translate(b.x1, b.y1); + h && r.translate(-f.x, -f.y), Me(), h && r.translate(f.x, f.y), se(), we(), pe(), De(), Ne(d, !0), fe(), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(d, !1), Q(), h && r.translate(-f.x, -f.y), Ie(), Ee(), t && r.translate(b.x1, b.y1); } }; var bU = function(e) { @@ -33914,7 +33926,7 @@ Vp.drawStripe = function(r, e, t, n) { } r.restore(); }; -var Gl = {}, Fee = 100; +var Gl = {}, Uee = 100; Gl.getPixelRatio = function() { var r = this.data.contexts[0]; if (this.forcedPixelRatio != null) @@ -34114,12 +34126,12 @@ Gl.render = function(r) { } else e.textureOnViewport && !n && (e.textureCache = null); var W = t.extent(), $ = e.pinching || e.hoverData.dragging || e.swipePanning || e.data.wheelZooming || e.hoverData.draggingEles || e.cy.animated(), J = e.hideEdgesOnViewport && $, X = []; if (X[e.NODE] = !c[e.NODE] && d && !e.clearedForMotionBlur[e.NODE] || e.clearingMotionBlur, X[e.NODE] && (e.clearedForMotionBlur[e.NODE] = !0), X[e.DRAG] = !c[e.DRAG] && d && !e.clearedForMotionBlur[e.DRAG] || e.clearingMotionBlur, X[e.DRAG] && (e.clearedForMotionBlur[e.DRAG] = !0), c[e.NODE] || i || a || X[e.NODE]) { - var Q = d && !X[e.NODE] && h !== 1, j = n || (Q ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE] : l.contexts[e.NODE]), ue = d && !Q ? "motionBlur" : void 0; + var Z = d && !X[e.NODE] && h !== 1, j = n || (Z ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE] : l.contexts[e.NODE]), ue = d && !Z ? "motionBlur" : void 0; L(j, ue), J ? e.drawCachedNodes(j, I.nondrag, u, W) : e.drawLayeredElements(j, I.nondrag, u, W), e.debug && e.drawDebugPoints(j, I.nondrag), !i && !d && (c[e.NODE] = !1); } if (!a && (c[e.DRAG] || i || X[e.DRAG])) { - var Q = d && !X[e.DRAG] && h !== 1, j = n || (Q ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG] : l.contexts[e.DRAG]); - L(j, d && !Q ? "motionBlur" : void 0), J ? e.drawCachedNodes(j, I.drag, u, W) : e.drawCachedElements(j, I.drag, u, W), e.debug && e.drawDebugPoints(j, I.drag), !i && !d && (c[e.DRAG] = !1); + var Z = d && !X[e.DRAG] && h !== 1, j = n || (Z ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG] : l.contexts[e.DRAG]); + L(j, d && !Z ? "motionBlur" : void 0), J ? e.drawCachedNodes(j, I.drag, u, W) : e.drawCachedElements(j, I.drag, u, W), e.debug && e.drawDebugPoints(j, I.drag), !i && !d && (c[e.DRAG] = !1); } if (this.drawSelectionRectangle(r, L), d && h !== 1) { var re = l.contexts[e.NODE], ne = e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE], le = l.contexts[e.DRAG], ce = e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG], pe = function(se, de, ge) { @@ -34146,7 +34158,7 @@ Gl.render = function(r) { } e.prevViewport = E, e.clearingMotionBlur && (e.clearingMotionBlur = !1, e.motionBlurCleared = !0, e.motionBlur = !0), d && (e.motionBlurTimeout = setTimeout(function() { e.motionBlurTimeout = null, e.clearedForMotionBlur[e.NODE] = !1, e.clearedForMotionBlur[e.DRAG] = !1, e.motionBlur = !1, e.clearingMotionBlur = !f, e.mbFrames = 0, c[e.NODE] = !0, c[e.DRAG] = !0, e.redraw(); - }, Fee)), n || t.emit("render"); + }, Uee)), n || t.emit("render"); }; var W0; Gl.drawSelectionRectangle = function(r, e) { @@ -34182,13 +34194,13 @@ function E3(r, e, t) { throw new Error(r.getShaderInfoLog(n)); return n; } -function Uee(r, e, t) { +function zee(r, e, t) { var n = E3(r, r.VERTEX_SHADER, e), i = E3(r, r.FRAGMENT_SHADER, t), a = r.createProgram(); if (r.attachShader(a, n), r.attachShader(a, i), r.linkProgram(a), !r.getProgramParameter(a, r.LINK_STATUS)) throw new Error("Could not initialize shaders"); return a; } -function zee(r, e, t) { +function qee(r, e, t) { t === void 0 && (t = e); var n = r.makeOffscreenCanvas(e, t), i = n.context = n.getContext("2d"); return n.clear = function() { @@ -34205,18 +34217,18 @@ function cD(r) { } }; } -function qee(r) { +function Gee(r) { var e = r.pixelRatio, t = r.cy.zoom(); return t * e; } -function Gee(r, e, t, n, i) { +function Vee(r, e, t, n, i) { var a = n * t + e.x, o = i * t + e.y; return o = Math.round(r.canvasHeight - o), [a, o]; } -function Vee(r) { +function Hee(r) { return r.pstyle("background-fill").value !== "solid" || r.pstyle("background-image").strValue !== "none" ? !1 : r.pstyle("border-width").value === 0 || r.pstyle("border-opacity").value === 0 ? !0 : r.pstyle("border-style").value === "solid"; } -function Hee(r, e) { +function Wee(r, e) { if (r.length !== e.length) return !1; for (var t = 0; t < r.length; t++) @@ -34232,10 +34244,10 @@ function em(r, e) { var t = e || new Array(4); return t[0] = (r >> 0 & 255) / 255, t[1] = (r >> 8 & 255) / 255, t[2] = (r >> 16 & 255) / 255, t[3] = (r >> 24 & 255) / 255, t; } -function Wee(r) { +function Yee(r) { return r[0] + (r[1] << 8) + (r[2] << 16) + (r[3] << 24); } -function Yee(r, e) { +function Xee(r, e) { var t = r.createTexture(); return t.buffer = function(n) { r.bindTexture(r.TEXTURE_2D, t), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_NEAREST), r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0), r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, r.RGBA, r.UNSIGNED_BYTE, n), r.generateMipmap(r.TEXTURE_2D), r.bindTexture(r.TEXTURE_2D, null); @@ -34267,7 +34279,7 @@ function wU(r, e, t) { return new Int32Array(t); } } -function Xee(r, e, t, n, i, a) { +function $ee(r, e, t, n, i, a) { switch (e) { case r.FLOAT: return new Float32Array(t.buffer, a * n, i); @@ -34275,7 +34287,7 @@ function Xee(r, e, t, n, i, a) { return new Int32Array(t.buffer, a * n, i); } } -function $ee(r, e, t, n) { +function Kee(r, e, t, n) { var i = _U(r, e), a = Uo(i, 2), o = a[0], s = a[1], u = wU(r, s, n), l = r.createBuffer(); return r.bindBuffer(r.ARRAY_BUFFER, l), r.bufferData(r.ARRAY_BUFFER, u, r.STATIC_DRAW), s === r.FLOAT ? r.vertexAttribPointer(t, o, s, !1, 0, 0) : s === r.INT && r.vertexAttribIPointer(t, o, s, 0, 0), r.enableVertexAttribArray(t), r.bindBuffer(r.ARRAY_BUFFER, null), l; } @@ -34283,7 +34295,7 @@ function uh(r, e, t, n) { var i = _U(r, t), a = Uo(i, 3), o = a[0], s = a[1], u = a[2], l = wU(r, s, e * o), c = o * u, f = r.createBuffer(); r.bindBuffer(r.ARRAY_BUFFER, f), r.bufferData(r.ARRAY_BUFFER, e * c, r.DYNAMIC_DRAW), r.enableVertexAttribArray(n), s === r.FLOAT ? r.vertexAttribPointer(n, o, s, !1, c, 0) : s === r.INT && r.vertexAttribIPointer(n, o, s, c, 0), r.vertexAttribDivisor(n, 1), r.bindBuffer(r.ARRAY_BUFFER, null); for (var d = new Array(e), h = 0; h < e; h++) - d[h] = Xee(r, s, l, c, o, h); + d[h] = $ee(r, s, l, c, o, h); return f.dataArray = l, f.stride = c, f.size = o, f.getView = function(p) { return d[p]; }, f.setPoint = function(p, g, y) { @@ -34293,7 +34305,7 @@ function uh(r, e, t, n) { r.bindBuffer(r.ARRAY_BUFFER, f), p ? r.bufferSubData(r.ARRAY_BUFFER, 0, l, 0, p * o) : r.bufferSubData(r.ARRAY_BUFFER, 0, l); }, f; } -function Kee(r, e, t) { +function Zee(r, e, t) { for (var n = 9, i = new Float32Array(e * n), a = new Array(e), o = 0; o < e; o++) { var s = o * n * 4; a[o] = new Float32Array(i.buffer, s, n); @@ -34312,7 +34324,7 @@ function Kee(r, e, t) { r.bindBuffer(r.ARRAY_BUFFER, u), r.bufferSubData(r.ARRAY_BUFFER, 0, i); }, u; } -function Zee(r) { +function Qee(r) { var e = r.createFramebuffer(); r.bindFramebuffer(r.FRAMEBUFFER, e); var t = r.createTexture(); @@ -34326,14 +34338,14 @@ Math.hypot || (Math.hypot = function() { r += arguments[e] * arguments[e]; return Math.sqrt(r); }); -function BO() { +function jO() { var r = new S3(9); return S3 != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[5] = 0, r[6] = 0, r[7] = 0), r[0] = 1, r[4] = 1, r[8] = 1, r; } function O3(r) { return r[0] = 1, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 1, r[5] = 0, r[6] = 0, r[7] = 0, r[8] = 1, r; } -function Qee(r, e, t) { +function Jee(r, e, t) { var n = e[0], i = e[1], a = e[2], o = e[3], s = e[4], u = e[5], l = e[6], c = e[7], f = e[8], d = t[0], h = t[1], p = t[2], g = t[3], y = t[4], b = t[5], _ = t[6], m = t[7], x = t[8]; return r[0] = d * n + h * o + p * l, r[1] = d * i + h * s + p * c, r[2] = d * a + h * u + p * f, r[3] = g * n + y * o + b * l, r[4] = g * i + y * s + b * c, r[5] = g * a + y * u + b * f, r[6] = _ * n + m * o + x * l, r[7] = _ * i + m * s + x * c, r[8] = _ * a + m * u + x * f, r; } @@ -34345,14 +34357,14 @@ function T3(r, e, t) { var n = e[0], i = e[1], a = e[2], o = e[3], s = e[4], u = e[5], l = e[6], c = e[7], f = e[8], d = Math.sin(t), h = Math.cos(t); return r[0] = h * n + d * o, r[1] = h * i + d * s, r[2] = h * a + d * u, r[3] = h * o - d * n, r[4] = h * s - d * i, r[5] = h * u - d * a, r[6] = l, r[7] = c, r[8] = f, r; } -function SM(r, e, t) { +function EM(r, e, t) { var n = t[0], i = t[1]; return r[0] = n * e[0], r[1] = n * e[1], r[2] = n * e[2], r[3] = i * e[3], r[4] = i * e[4], r[5] = i * e[5], r[6] = e[6], r[7] = e[7], r[8] = e[8], r; } -function Jee(r, e, t) { +function ete(r, e, t) { return r[0] = 2 / e, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = -2 / t, r[5] = 0, r[6] = -1, r[7] = 1, r[8] = 1, r; } -var ete = /* @__PURE__ */ (function() { +var tte = /* @__PURE__ */ (function() { function r(e, t, n, i) { zp(this, r), this.debugID = Math.floor(Math.random() * 1e4), this.r = e, this.texSize = t, this.texRows = n, this.texHeight = Math.floor(t / n), this.enableWrapping = !0, this.locked = !1, this.texture = null, this.needsBuffer = !0, this.freePointer = { x: 0, @@ -34461,7 +34473,7 @@ var ete = /* @__PURE__ */ (function() { }, { key: "bufferIfNeeded", value: function(t) { - this.texture || (this.texture = Yee(t, this.debugID)), this.needsBuffer && (this.texture.buffer(this.canvas), this.needsBuffer = !1, this.locked && (this.canvas = null, this.scratch = null)); + this.texture || (this.texture = Xee(t, this.debugID)), this.needsBuffer && (this.texture.buffer(this.canvas), this.needsBuffer = !1, this.locked && (this.canvas = null, this.scratch = null)); } }, { key: "dispose", @@ -34469,7 +34481,7 @@ var ete = /* @__PURE__ */ (function() { this.texture && (this.texture.deleteTexture(), this.texture = null), this.canvas = null, this.scratch = null, this.locked = !0; } }]); -})(), tte = /* @__PURE__ */ (function() { +})(), rte = /* @__PURE__ */ (function() { function r(e, t, n, i) { zp(this, r), this.r = e, this.texSize = t, this.texRows = n, this.createTextureCanvas = i, this.atlases = [], this.styleKeyToAtlas = /* @__PURE__ */ new Map(), this.markedKeys = /* @__PURE__ */ new Set(); } @@ -34482,7 +34494,7 @@ var ete = /* @__PURE__ */ (function() { key: "_createAtlas", value: function() { var t = this.r, n = this.texSize, i = this.texRows, a = this.createTextureCanvas; - return new ete(t, n, i, a); + return new tte(t, n, i, a); } }, { key: "_getScratchCanvas", @@ -34525,7 +34537,7 @@ var ete = /* @__PURE__ */ (function() { var i = [], a = /* @__PURE__ */ new Map(), o = null, s = Ac(this.atlases), u; try { var l = function() { - var f = u.value, d = f.getKeys(), h = rte(n, d); + var f = u.value, d = f.getKeys(), h = nte(n, d); if (h.size === 0) return i.push(f), d.forEach(function(S) { return a.set(S, f); @@ -34600,12 +34612,12 @@ var ete = /* @__PURE__ */ (function() { } }]); })(); -function rte(r, e) { +function nte(r, e) { return r.intersection ? r.intersection(e) : new Set(Rx(r).filter(function(t) { return e.has(t); })); } -var nte = /* @__PURE__ */ (function() { +var ite = /* @__PURE__ */ (function() { function r(e, t) { zp(this, r), this.r = e, this.globalOptions = t, this.atlasSize = t.webglTexSize, this.maxAtlasesPerBatch = t.webglTexPerBatch, this.renderTypes = /* @__PURE__ */ new Map(), this.collections = /* @__PURE__ */ new Map(), this.typeAndIdToKey = /* @__PURE__ */ new Map(); } @@ -34617,7 +34629,7 @@ var nte = /* @__PURE__ */ (function() { }, { key: "addAtlasCollection", value: function(t, n) { - var i = this.globalOptions, a = i.webglTexSize, o = i.createTextureCanvas, s = n.texRows, u = this._cacheScratchCanvas(o), l = new tte(this.r, a, s, u); + var i = this.globalOptions, a = i.webglTexSize, o = i.createTextureCanvas, s = n.texRows, u = this._cacheScratchCanvas(o), l = new rte(this.r, a, s, u); this.collections.set(t, l); } }, { @@ -34679,7 +34691,7 @@ var nte = /* @__PURE__ */ (function() { }), d = !0; else { var P = x.getID ? x.getID(g) : g.id(), I = n._key(S, P), k = n.typeAndIdToKey.get(I); - k !== void 0 && !Hee(T, k) && (f = !0, n.typeAndIdToKey.delete(I), k.forEach(function(L) { + k !== void 0 && !Wee(T, k) && (f = !0, n.typeAndIdToKey.delete(I), k.forEach(function(L) { return O.markKeyForGC(L); })); } @@ -34765,7 +34777,7 @@ var nte = /* @__PURE__ */ (function() { return t; } }]); -})(), ite = /* @__PURE__ */ (function() { +})(), ate = /* @__PURE__ */ (function() { function r(e) { zp(this, r), this.globalOptions = e, this.atlasSize = e.webglTexSize, this.maxAtlasesPerBatch = e.webglTexPerBatch, this.batchAtlases = []; } @@ -34820,23 +34832,23 @@ var nte = /* @__PURE__ */ (function() { return n; } }]); -})(), ate = ` +})(), ote = ` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } -`, ote = ` +`, ste = ` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } -`, ste = ` +`, ute = ` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } -`, ute = ` +`, lte = ` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry @@ -34871,9 +34883,9 @@ var nte = /* @__PURE__ */ (function() { // don't render the texture at all USE_BB: 2 // render the bounding box as an opaque rectangle -}, FO = 0, C3 = 1, A3 = 2, UO = 3, tm = 4, xw = 5, Y0 = 6, X0 = 7, lte = /* @__PURE__ */ (function() { +}, BO = 0, C3 = 1, A3 = 2, FO = 3, tm = 4, xw = 5, Y0 = 6, X0 = 7, cte = /* @__PURE__ */ (function() { function r(e, t, n) { - zp(this, r), this.r = e, this.gl = t, this.maxInstances = n.webglBatchSize, this.atlasSize = n.webglTexSize, this.bgColor = n.bgColor, this.debug = n.webglDebug, this.batchDebugInfo = [], n.enableWrapping = !0, n.createTextureCanvas = zee, this.atlasManager = new nte(e, n), this.batchManager = new ite(n), this.simpleShapeOptions = /* @__PURE__ */ new Map(), this.program = this._createShaderProgram(kb.SCREEN), this.pickingProgram = this._createShaderProgram(kb.PICKING), this.vao = this._createVAO(); + zp(this, r), this.r = e, this.gl = t, this.maxInstances = n.webglBatchSize, this.atlasSize = n.webglTexSize, this.bgColor = n.bgColor, this.debug = n.webglDebug, this.batchDebugInfo = [], n.enableWrapping = !0, n.createTextureCanvas = qee, this.atlasManager = new ite(e, n), this.batchManager = new ate(n), this.simpleShapeOptions = /* @__PURE__ */ new Map(), this.program = this._createShaderProgram(kb.SCREEN), this.pickingProgram = this._createShaderProgram(kb.PICKING), this.vao = this._createVAO(); } return qp(r, [{ key: "addAtlasCollection", @@ -35000,7 +35012,7 @@ var nte = /* @__PURE__ */ (function() { int vid = gl_VertexID; vec2 position = aPosition; // TODO make this a vec3, simplifies some code below - if(aVertType == `.concat(FO, `) { + if(aVertType == `.concat(BO, `) { float texX = aTex.x; // texture coordinates float texY = aTex.y; float texW = aTex.z; @@ -35098,7 +35110,7 @@ var nte = /* @__PURE__ */ (function() { vColor = aColor; } - else if(aVertType == `).concat(UO, ` && vid < 3) { + else if(aVertType == `).concat(FO, ` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); @@ -35145,10 +35157,10 @@ var nte = /* @__PURE__ */ (function() { out vec4 outColor; - `).concat(ate, ` `).concat(ote, ` `).concat(ste, ` `).concat(ute, ` + `).concat(lte, ` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( @@ -35164,14 +35176,14 @@ var nte = /* @__PURE__ */ (function() { } void main(void) { - if(vVertType == `).concat(FO, `) { + if(vVertType == `).concat(BO, `) { // look up the texel from the texture unit `).concat(a.map(function(l) { return "if(vAtlasId == ".concat(l, ") outColor = texture(uTexture").concat(l, ", vTexCoord);"); }).join(` else `), ` } - else if(vVertType == `).concat(UO, `) { + else if(vVertType == `).concat(FO, `) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow @@ -35235,7 +35247,7 @@ var nte = /* @__PURE__ */ (function() { `).concat(t.picking ? `if(outColor.a == 0.0) discard; else outColor = vIndex;` : "", ` } - `), s = Uee(n, i, o); + `), s = zee(n, i, o); s.aPosition = n.getAttribLocation(s, "aPosition"), s.aIndex = n.getAttribLocation(s, "aIndex"), s.aVertType = n.getAttribLocation(s, "aVertType"), s.aTransform = n.getAttribLocation(s, "aTransform"), s.aAtlasId = n.getAttribLocation(s, "aAtlasId"), s.aTex = n.getAttribLocation(s, "aTex"), s.aPointAPointB = n.getAttribLocation(s, "aPointAPointB"), s.aPointCPointD = n.getAttribLocation(s, "aPointCPointD"), s.aLineWidth = n.getAttribLocation(s, "aLineWidth"), s.aColor = n.getAttribLocation(s, "aColor"), s.aCornerRadius = n.getAttribLocation(s, "aCornerRadius"), s.aBorderColor = n.getAttribLocation(s, "aBorderColor"), s.uPanZoomMatrix = n.getUniformLocation(s, "uPanZoomMatrix"), s.uAtlasSize = n.getUniformLocation(s, "uAtlasSize"), s.uBGColor = n.getUniformLocation(s, "uBGColor"), s.uZoom = n.getUniformLocation(s, "uZoom"), s.uTextures = []; for (var u = 0; u < this.batchManager.getMaxAtlasesPerBatch(); u++) s.uTextures.push(n.getUniformLocation(s, "uTexture".concat(u))); @@ -35247,7 +35259,7 @@ var nte = /* @__PURE__ */ (function() { var t = [0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1]; this.vertexCount = t.length / 2; var n = this.maxInstances, i = this.gl, a = this.program, o = i.createVertexArray(); - return i.bindVertexArray(o), $ee(i, "vec2", a.aPosition, t), this.transformBuffer = Kee(i, n, a.aTransform), this.indexBuffer = uh(i, n, "vec4", a.aIndex), this.vertTypeBuffer = uh(i, n, "int", a.aVertType), this.atlasIdBuffer = uh(i, n, "int", a.aAtlasId), this.texBuffer = uh(i, n, "vec4", a.aTex), this.pointAPointBBuffer = uh(i, n, "vec4", a.aPointAPointB), this.pointCPointDBuffer = uh(i, n, "vec4", a.aPointCPointD), this.lineWidthBuffer = uh(i, n, "vec2", a.aLineWidth), this.colorBuffer = uh(i, n, "vec4", a.aColor), this.cornerRadiusBuffer = uh(i, n, "vec4", a.aCornerRadius), this.borderColorBuffer = uh(i, n, "vec4", a.aBorderColor), i.bindVertexArray(null), o; + return i.bindVertexArray(o), Kee(i, "vec2", a.aPosition, t), this.transformBuffer = Zee(i, n, a.aTransform), this.indexBuffer = uh(i, n, "vec4", a.aIndex), this.vertTypeBuffer = uh(i, n, "int", a.aVertType), this.atlasIdBuffer = uh(i, n, "int", a.aAtlasId), this.texBuffer = uh(i, n, "vec4", a.aTex), this.pointAPointBBuffer = uh(i, n, "vec4", a.aPointAPointB), this.pointCPointDBuffer = uh(i, n, "vec4", a.aPointCPointD), this.lineWidthBuffer = uh(i, n, "vec2", a.aLineWidth), this.colorBuffer = uh(i, n, "vec4", a.aColor), this.cornerRadiusBuffer = uh(i, n, "vec4", a.aCornerRadius), this.borderColorBuffer = uh(i, n, "vec4", a.aBorderColor), i.bindVertexArray(null), o; } }, { key: "buffers", @@ -35306,7 +35318,7 @@ var nte = /* @__PURE__ */ (function() { var m = Uo(_[b], 2), x = m[0], S = m[1]; if (x.w != 0) { var O = this.instanceCount; - this.vertTypeBuffer.getView(O)[0] = FO; + this.vertTypeBuffer.getView(O)[0] = BO; var E = this.indexBuffer.getView(O); em(n, E); var T = this.atlasIdBuffer.getView(O); @@ -35356,7 +35368,7 @@ var nte = /* @__PURE__ */ (function() { o = d.x + (n.xOffset || 0), s = d.y + (n.yOffset || 0); } else o = n.x1, s = n.y1; - ix(t, t, [o, s]), SM(t, t, [n.w, n.h]); + ix(t, t, [o, s]), EM(t, t, [n.w, n.h]); } /** * Adjusts a node or label BB to accomodate padding and split for wrapped textures. @@ -35478,7 +35490,7 @@ var nte = /* @__PURE__ */ (function() { var l = t.pstyle(i + "-arrow-shape").value; if (l !== "none") { var c = t.pstyle(i + "-arrow-color").value, f = t.pstyle("opacity").value, d = t.pstyle("line-opacity").value, h = f * d, p = t.pstyle("width").pfValue, g = t.pstyle("arrow-scale").value, y = this.r.getArrowWidth(p, g), b = this.instanceCount, _ = this.transformBuffer.getMatrixView(b); - O3(_), ix(_, _, [o, s]), SM(_, _, [y, y]), T3(_, _, u), this.vertTypeBuffer.getView(b)[0] = UO; + O3(_), ix(_, _, [o, s]), EM(_, _, [y, y]), T3(_, _, u), this.vertTypeBuffer.getView(b)[0] = FO; var m = this.indexBuffer.getView(b); em(n, m); var x = this.colorBuffer.getView(b); @@ -35603,7 +35615,7 @@ var nte = /* @__PURE__ */ (function() { c[f].bufferIfNeeded(t); for (var d = 0; d < c.length; d++) t.activeTexture(t.TEXTURE0 + d), t.bindTexture(t.TEXTURE_2D, c[d].texture), t.uniform1i(o.uTextures[d], d); - t.uniform1f(o.uZoom, qee(this.r)), t.uniformMatrix3fv(o.uPanZoomMatrix, !1, this.panZoomMatrix), t.uniform1i(o.uAtlasSize, this.batchManager.getAtlasSize()); + t.uniform1f(o.uZoom, Gee(this.r)), t.uniformMatrix3fv(o.uPanZoomMatrix, !1, this.panZoomMatrix), t.uniform1i(o.uAtlasSize, this.batchManager.getAtlasSize()); var h = Sg(this.bgColor, 1); t.uniform4fv(o.uBGColor, h), t.drawArraysInstanced(t.TRIANGLES, 0, i, a), t.bindVertexArray(null), t.bindTexture(t.TEXTURE_2D, null), this.debug && this.batchDebugInfo.push({ count: a, @@ -35634,7 +35646,7 @@ var nte = /* @__PURE__ */ (function() { })(), xU = {}; xU.initWebgl = function(r, e) { var t = this, n = t.data.contexts[t.WEBGL]; - r.bgColor = cte(t), r.webglTexSize = Math.min(r.webglTexSize, n.getParameter(n.MAX_TEXTURE_SIZE)), r.webglTexRows = Math.min(r.webglTexRows, 54), r.webglTexRowsNodes = Math.min(r.webglTexRowsNodes, 54), r.webglBatchSize = Math.min(r.webglBatchSize, 16384), r.webglTexPerBatch = Math.min(r.webglTexPerBatch, n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)), t.webglDebug = r.webglDebug, t.webglDebugShowAtlases = r.webglDebugShowAtlases, t.pickingFrameBuffer = Zee(n), t.pickingFrameBuffer.needsDraw = !0, t.drawing = new lte(t, n, r); + r.bgColor = fte(t), r.webglTexSize = Math.min(r.webglTexSize, n.getParameter(n.MAX_TEXTURE_SIZE)), r.webglTexRows = Math.min(r.webglTexRows, 54), r.webglTexRowsNodes = Math.min(r.webglTexRowsNodes, 54), r.webglBatchSize = Math.min(r.webglBatchSize, 16384), r.webglTexPerBatch = Math.min(r.webglTexPerBatch, n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)), t.webglDebug = r.webglDebug, t.webglDebugShowAtlases = r.webglDebugShowAtlases, t.pickingFrameBuffer = Qee(n), t.pickingFrameBuffer.needsDraw = !0, t.drawing = new cte(t, n, r); var i = function(f) { return function(d) { return t.getTextAngle(d, f); @@ -35671,7 +35683,7 @@ xU.initWebgl = function(r, e) { drawElement: e.drawElement }), t.drawing.addSimpleShapeRenderType("node-body", { getBoundingBox: u, - isSimple: Vee, + isSimple: Hee, shapeProps: { shape: "shape", color: "background-color", @@ -35703,8 +35715,8 @@ xU.initWebgl = function(r, e) { // node label or edge mid label collection: "label", getTexPickingMode: s, - getKey: zO(e.getLabelKey, null), - getBoundingBox: qO(e.getLabelBox, null), + getKey: UO(e.getLabelKey, null), + getBoundingBox: zO(e.getLabelBox, null), drawClipped: !0, drawElement: e.drawLabel, getRotation: i(null), @@ -35714,8 +35726,8 @@ xU.initWebgl = function(r, e) { }), t.drawing.addTextureAtlasRenderType("edge-source-label", { collection: "label", getTexPickingMode: s, - getKey: zO(e.getSourceLabelKey, "source"), - getBoundingBox: qO(e.getSourceLabelBox, "source"), + getKey: UO(e.getSourceLabelKey, "source"), + getBoundingBox: zO(e.getSourceLabelBox, "source"), drawClipped: !0, drawElement: e.drawSourceLabel, getRotation: i("source"), @@ -35725,8 +35737,8 @@ xU.initWebgl = function(r, e) { }), t.drawing.addTextureAtlasRenderType("edge-target-label", { collection: "label", getTexPickingMode: s, - getKey: zO(e.getTargetLabelKey, "target"), - getBoundingBox: qO(e.getTargetLabelBox, "target"), + getKey: UO(e.getTargetLabelKey, "target"), + getBoundingBox: zO(e.getTargetLabelBox, "target"), drawClipped: !0, drawElement: e.drawTargetLabel, getRotation: i("target"), @@ -35740,9 +35752,9 @@ xU.initWebgl = function(r, e) { t.onUpdateEleCalcs(function(c, f) { var d = !1; f && f.length > 0 && (d |= t.drawing.invalidate(f)), d && l(); - }), fte(t); + }), dte(t); }; -function cte(r) { +function fte(r) { var e = r.cy.container(), t = e && e.style && e.style.backgroundColor || "white"; return K7(t); } @@ -35750,14 +35762,14 @@ function EU(r, e) { var t = r._private.rscratch; return Tc(t, "labelWrapCachedLines", e) || []; } -var zO = function(e, t) { +var UO = function(e, t) { return function(n) { var i = e(n), a = EU(n, t); return a.length > 1 ? a.map(function(o, s) { return "".concat(i, "_").concat(s); }) : i; }; -}, qO = function(e, t) { +}, zO = function(e, t) { return function(n, i) { var a = e(n); if (typeof i == "string") { @@ -35776,13 +35788,13 @@ var zO = function(e, t) { return a; }; }; -function fte(r) { +function dte(r) { { var e = r.render; r.render = function(a) { a = a || {}; var o = r.cy; - r.webgl && (o.zoom() > pU ? (dte(r), e.call(r, a)) : (hte(r), OU(r, a, kb.SCREEN))); + r.webgl && (o.zoom() > pU ? (hte(r), e.call(r, a)) : (vte(r), OU(r, a, kb.SCREEN))); }; } { @@ -35792,7 +35804,7 @@ function fte(r) { }; } r.findNearestElements = function(a, o, s, u) { - return bte(r, a, o); + return _te(r, a, o); }; { var n = r.invalidateCachedZSortedEles; @@ -35809,38 +35821,38 @@ function fte(r) { }; } } -function dte(r) { +function hte(r) { var e = r.data.contexts[r.WEBGL]; e.clear(e.COLOR_BUFFER_BIT | e.DEPTH_BUFFER_BIT); } -function hte(r) { +function vte(r) { var e = function(n) { n.save(), n.setTransform(1, 0, 0, 1, 0, 0), n.clearRect(0, 0, r.canvasWidth, r.canvasHeight), n.restore(); }; e(r.data.contexts[r.NODE]), e(r.data.contexts[r.DRAG]); } -function vte(r) { - var e = r.canvasWidth, t = r.canvasHeight, n = cD(r), i = n.pan, a = n.zoom, o = BO(); - ix(o, o, [i.x, i.y]), SM(o, o, [a, a]); - var s = BO(); - Jee(s, e, t); - var u = BO(); - return Qee(u, s, o), u; +function pte(r) { + var e = r.canvasWidth, t = r.canvasHeight, n = cD(r), i = n.pan, a = n.zoom, o = jO(); + ix(o, o, [i.x, i.y]), EM(o, o, [a, a]); + var s = jO(); + ete(s, e, t); + var u = jO(); + return Jee(u, s, o), u; } function SU(r, e) { var t = r.canvasWidth, n = r.canvasHeight, i = cD(r), a = i.pan, o = i.zoom; e.setTransform(1, 0, 0, 1, 0, 0), e.clearRect(0, 0, t, n), e.translate(a.x, a.y), e.scale(o, o); } -function pte(r, e) { +function gte(r, e) { r.drawSelectionRectangle(e, function(t) { return SU(r, t); }); } -function gte(r) { +function yte(r) { var e = r.data.contexts[r.NODE]; e.save(), SU(r, e), e.strokeStyle = "rgba(0, 0, 0, 0.3)", e.beginPath(), e.moveTo(-1e3, 0), e.lineTo(1e3, 0), e.stroke(), e.beginPath(), e.moveTo(0, -1e3), e.lineTo(0, 1e3), e.stroke(), e.restore(); } -function yte(r) { +function mte(r) { var e = function(i, a, o) { for (var s = i.atlasManager.getAtlasCollection(a), u = r.data.contexts[r.NODE], l = s.atlases, c = 0; c < l.length; c++) { var f = l[c], d = f.canvas; @@ -35852,10 +35864,10 @@ function yte(r) { }, t = 0; e(r.drawing, "node", t++), e(r.drawing, "label", t++); } -function mte(r, e, t, n, i) { +function bte(r, e, t, n, i) { var a, o, s, u, l = cD(r), c = l.pan, f = l.zoom; { - var d = Gee(r, c, f, e, t), h = Uo(d, 2), p = h[0], g = h[1], y = 6; + var d = Vee(r, c, f, e, t), h = Uo(d, 2), p = h[0], g = h[1], y = 6; a = p - y / 2, o = g - y / 2, s = y, u = y; } if (s === 0 || u === 0) @@ -35865,13 +35877,13 @@ function mte(r, e, t, n, i) { var _ = s * u, m = new Uint8Array(_ * 4); b.readPixels(a, o, s, u, b.RGBA, b.UNSIGNED_BYTE, m), b.bindFramebuffer(b.FRAMEBUFFER, null); for (var x = /* @__PURE__ */ new Set(), S = 0; S < _; S++) { - var O = m.slice(S * 4, S * 4 + 4), E = Wee(O) - 1; + var O = m.slice(S * 4, S * 4 + 4), E = Yee(O) - 1; E >= 0 && x.add(E); } return x; } -function bte(r, e, t) { - var n = mte(r, e, t), i = r.getCachedZSortedEles(), a, o, s = Ac(n), u; +function _te(r, e, t) { + var n = bte(r, e, t), i = r.getCachedZSortedEles(), a, o, s = Ac(n), u; try { for (s.s(); !(u = s.n()).done; ) { var l = u.value, c = i[l]; @@ -35885,7 +35897,7 @@ function bte(r, e, t) { } return [a, o].filter(Boolean); } -function GO(r, e, t) { +function qO(r, e, t) { var n = r.drawing; e += 1, t.isNode() ? (n.drawNode(t, e, "node-underlay"), n.drawNode(t, e, "node-body"), n.drawTexture(t, e, "label"), n.drawNode(t, e, "node-overlay")) : (n.drawEdgeLine(t, e), n.drawEdgeArrow(t, e, "source"), n.drawEdgeArrow(t, e, "target"), n.drawTexture(t, e, "label"), n.drawTexture(t, e, "edge-source-label"), n.drawTexture(t, e, "edge-target-label")); } @@ -35893,19 +35905,19 @@ function OU(r, e, t) { var n; r.webglDebug && (n = performance.now()); var i = r.drawing, a = 0; - if (t.screen && r.data.canvasNeedsRedraw[r.SELECT_BOX] && pte(r, e), r.data.canvasNeedsRedraw[r.NODE] || t.picking) { + if (t.screen && r.data.canvasNeedsRedraw[r.SELECT_BOX] && gte(r, e), r.data.canvasNeedsRedraw[r.NODE] || t.picking) { var o = r.data.contexts[r.WEBGL]; t.screen ? (o.clearColor(0, 0, 0, 0), o.enable(o.BLEND), o.blendFunc(o.ONE, o.ONE_MINUS_SRC_ALPHA)) : o.disable(o.BLEND), o.clear(o.COLOR_BUFFER_BIT | o.DEPTH_BUFFER_BIT), o.viewport(0, 0, o.canvas.width, o.canvas.height); - var s = vte(r), u = r.getCachedZSortedEles(); + var s = pte(r), u = r.getCachedZSortedEles(); if (a = u.length, i.startFrame(s, t), t.screen) { for (var l = 0; l < u.nondrag.length; l++) - GO(r, l, u.nondrag[l]); + qO(r, l, u.nondrag[l]); for (var c = 0; c < u.drag.length; c++) - GO(r, c, u.drag[c]); + qO(r, c, u.drag[c]); } else if (t.picking) for (var f = 0; f < u.length; f++) - GO(r, f, u[f]); - i.endFrame(), t.screen && r.webglDebugShowAtlases && (gte(r), yte(r)), r.data.canvasNeedsRedraw[r.NODE] = !1, r.data.canvasNeedsRedraw[r.DRAG] = !1; + qO(r, f, u[f]); + i.endFrame(), t.screen && r.webglDebugShowAtlases && (yte(r), mte(r)), r.data.canvasNeedsRedraw[r.NODE] = !1, r.data.canvasNeedsRedraw[r.DRAG] = !1; } if (r.webglDebug) { var d = performance.now(), h = !1, p = Math.ceil(d - n), g = i.getDebugInfo(), y = ["".concat(a, " elements"), "".concat(g.totalInstances, " instances"), "".concat(g.batchCount, " batches"), "".concat(g.totalAtlases, " atlases"), "".concat(g.wrappedCount, " wrapped textures"), "".concat(g.simpleCount, " simple shapes")].join(", "); @@ -35955,18 +35967,18 @@ Hp.drawCutRectanglePath = function(r, e, t, n, i, a, o) { r.beginPath && r.beginPath(), r.moveTo(e - s + l, t - u), r.lineTo(e + s - l, t - u), r.lineTo(e + s, t - u + l), r.lineTo(e + s, t + u - l), r.lineTo(e + s - l, t + u), r.lineTo(e - s + l, t + u), r.lineTo(e - s, t + u - l), r.lineTo(e - s, t - u + l), r.closePath(); }; Hp.drawBarrelPath = function(r, e, t, n, i) { - var a = n / 2, o = i / 2, s = e - a, u = e + a, l = t - o, c = t + o, f = cM(n, i), d = f.widthOffset, h = f.heightOffset, p = f.ctrlPtOffsetPct * d; + var a = n / 2, o = i / 2, s = e - a, u = e + a, l = t - o, c = t + o, f = lM(n, i), d = f.widthOffset, h = f.heightOffset, p = f.ctrlPtOffsetPct * d; r.beginPath && r.beginPath(), r.moveTo(s, l + h), r.lineTo(s, c - h), r.quadraticCurveTo(s + p, c, s + d, c), r.lineTo(u - d, c), r.quadraticCurveTo(u - p, c, u, c - h), r.lineTo(u, l + h), r.quadraticCurveTo(u - p, l, u - d, l), r.lineTo(s + d, l), r.quadraticCurveTo(s + p, l, s, l + h), r.closePath(); }; -var R3 = Math.sin(0), P3 = Math.cos(0), OM = {}, TM = {}, TU = Math.PI / 40; +var R3 = Math.sin(0), P3 = Math.cos(0), SM = {}, OM = {}, TU = Math.PI / 40; for (var rm = 0 * Math.PI; rm < 2 * Math.PI; rm += TU) - OM[rm] = Math.sin(rm), TM[rm] = Math.cos(rm); + SM[rm] = Math.sin(rm), OM[rm] = Math.cos(rm); Hp.drawEllipsePath = function(r, e, t, n, i) { if (r.beginPath && r.beginPath(), r.ellipse) r.ellipse(e, t, n / 2, i / 2, 0, 0, 2 * Math.PI); else for (var a, o, s = n / 2, u = i / 2, l = 0 * Math.PI; l < 2 * Math.PI; l += TU) - a = e - s * OM[l] * R3 + s * TM[l] * P3, o = t + u * TM[l] * R3 + u * OM[l] * P3, l === 0 ? r.moveTo(a, o) : r.lineTo(a, o); + a = e - s * SM[l] * R3 + s * OM[l] * P3, o = t + u * OM[l] * R3 + u * SM[l] * P3, l === 0 ? r.moveTo(a, o) : r.lineTo(a, o); r.closePath(); }; var t_ = {}; @@ -36002,7 +36014,7 @@ t_.bufferCanvasImage = function(r) { } return d; }; -function _te(r, e) { +function wte(r, e) { for (var t = atob(r), n = new ArrayBuffer(t.length), i = new Uint8Array(n), a = 0; a < t.length; a++) i[a] = t.charCodeAt(a); return new Blob([n], { @@ -36029,7 +36041,7 @@ function CU(r, e, t) { } }); case "blob": - return _te(M3(n()), t); + return wte(M3(n()), t); case "base64": return M3(n()); case "base64uri": @@ -36065,7 +36077,7 @@ AU.nodeShapeImpl = function(r, e, t, n, i, a, o, s) { return this.drawBarrelPath(e, t, n, i, a); } }; -var wte = RU, An = RU.prototype; +var xte = RU, An = RU.prototype; An.CANVAS_LAYERS = 3; An.SELECT_BOX = 0; An.DRAG = 1; @@ -36098,7 +36110,7 @@ function RU(r) { "-webkit-tap-highlight-color": "rgba(0,0,0,0)", "outline-style": "none" }; - p$() && (u["-ms-touch-action"] = "none", u["touch-action"] = "none"); + g$() && (u["-ms-touch-action"] = "none", u["touch-action"] = "none"); for (var l = 0; l < An.CANVAS_LAYERS; l++) { var c = e.data.canvases[l] = n.createElement("canvas"), f = An.CANVAS_TYPES[l]; e.data.contexts[l] = c.getContext(f), e.data.contexts[l] || Ia("Could not create canvas of type " + f), Object.keys(u).forEach(function(fe) { @@ -36174,7 +36186,7 @@ function RU(r) { return p(I(se)); }, X = function(se) { return p(k(se)); - }, Q = function(se) { + }, Z = function(se) { var de = P(se), ge = p(P(se)); if (se.isNode()) { switch (se.pstyle("text-halign").value) { @@ -36209,7 +36221,7 @@ function RU(r) { drawElement: S, getBoundingBox: P, getRotationPoint: H, - getRotationOffset: Q, + getRotationOffset: Z, isVisible: L }), ne = e.data.slbTxrCache = new vb(e, { getKey: _, @@ -36255,7 +36267,7 @@ function RU(r) { getLabelRotationPoint: H, getSourceLabelRotationPoint: q, getTargetLabelRotationPoint: W, - getLabelRotationOffset: Q, + getLabelRotationOffset: Z, getSourceLabelRotationOffset: J, getTargetLabelRotationOffset: X }); @@ -36277,14 +36289,14 @@ An.redrawHint = function(r, e) { break; } }; -var xte = typeof Path2D < "u"; +var Ete = typeof Path2D < "u"; An.path2dEnabled = function(r) { if (r === void 0) return this.pathsEnabled; this.pathsEnabled = !!r; }; An.usePaths = function() { - return xte && this.pathsEnabled; + return Ete && this.pathsEnabled; }; An.setImgSmoothing = function(r, e) { r.imageSmoothingEnabled != null ? r.imageSmoothingEnabled = e : (r.webkitImageSmoothingEnabled = e, r.mozImageSmoothingEnabled = e, r.msImageSmoothingEnabled = e); @@ -36305,7 +36317,7 @@ An.makeOffscreenCanvas = function(r, e) { [yU, Th, wv, lD, ny, Vp, Gl, xU, Hp, t_, AU].forEach(function(r) { kr(An, r); }); -var Ete = [{ +var Ste = [{ name: "null", impl: nU }, { @@ -36313,13 +36325,13 @@ var Ete = [{ impl: hU }, { name: "canvas", - impl: wte -}], Ste = [{ + impl: xte +}], Ote = [{ type: "layout", - extensions: $J + extensions: KJ }, { type: "renderer", - extensions: Ete + extensions: Ste }], PU = {}, MU = {}; function DU(r, e, t) { var n = t, i = function(T) { @@ -36377,7 +36389,7 @@ function DU(r, e, t) { }; kr(o, { createEmitter: function() { - return this._private.emitter = new B2(d, this), this; + return this._private.emitter = new j2(d, this), this; }, emitter: function() { return this._private.emitter; @@ -36432,32 +36444,32 @@ function kU(r, e) { keys: [r, e] }); } -function Ote(r, e, t, n, i) { +function Tte(r, e, t, n, i) { return Z7({ map: MU, keys: [r, e, t, n], value: i }); } -function Tte(r, e, t, n) { +function Cte(r, e, t, n) { return Q7({ map: MU, keys: [r, e, t, n] }); } -var CM = function() { +var TM = function() { if (arguments.length === 2) return kU.apply(null, arguments); if (arguments.length === 3) return DU.apply(null, arguments); if (arguments.length === 4) - return Tte.apply(null, arguments); + return Cte.apply(null, arguments); if (arguments.length === 5) - return Ote.apply(null, arguments); + return Tte.apply(null, arguments); Ia("Invalid extension access syntax"); }; -S1.prototype.extension = CM; -Ste.forEach(function(r) { +S1.prototype.extension = TM; +Ote.forEach(function(r) { r.extensions.forEach(function(e) { DU(r.type, e.name, e.impl); }); @@ -36488,7 +36500,7 @@ $g.css = function(r, e) { for (var n = r, i = Object.keys(n), a = 0; a < i.length; a++) { var o = i[a], s = n[o]; if (s != null) { - var u = Ls.properties[o] || Ls.properties[A2(o)]; + var u = Ls.properties[o] || Ls.properties[C2(o)]; if (u != null) { var l = u.name, c = s; this[t].properties.push({ @@ -36516,11 +36528,11 @@ $g.appendToStyle = function(r) { } return r; }; -var Cte = "3.33.1", Np = function(e) { +var Ate = "3.33.1", Np = function(e) { if (e === void 0 && (e = {}), ai(e)) return new S1(e); if (Ar(e)) - return CM.apply(CM, arguments); + return TM.apply(TM, arguments); }; Np.use = function(r) { var e = Array.prototype.slice.call(arguments, 1); @@ -36529,14 +36541,14 @@ Np.use = function(r) { Np.warnings = function(r) { return aF(r); }; -Np.version = Cte; +Np.version = Ate; Np.stylesheet = Np.Stylesheet = qx; -var ax = { exports: {} }, ox = { exports: {} }, sx = { exports: {} }, Ate = sx.exports, D3; -function Rte() { +var ax = { exports: {} }, ox = { exports: {} }, sx = { exports: {} }, Rte = sx.exports, D3; +function Pte() { return D3 || (D3 = 1, (function(r, e) { (function(n, i) { r.exports = i(); - })(Ate, function() { + })(Rte, function() { return ( /******/ (function(t) { @@ -37177,22 +37189,22 @@ function Rte() { if (c < d) return l[0] = y, l[1] = f, l[2] = O, l[3] = h, !1; } else { - var H = s.height / s.width, q = u.height / u.width, W = (h - f) / (d - c), $ = void 0, J = void 0, X = void 0, Q = void 0, ue = void 0, re = void 0; + var H = s.height / s.width, q = u.height / u.width, W = (h - f) / (d - c), $ = void 0, J = void 0, X = void 0, Z = void 0, ue = void 0, re = void 0; if (-H === W ? c > d ? (l[0] = b, l[1] = _, j = !0) : (l[0] = y, l[1] = g, j = !0) : H === W && (c > d ? (l[0] = p, l[1] = g, j = !0) : (l[0] = m, l[1] = _, j = !0)), -q === W ? d > c ? (l[2] = P, l[3] = I, z = !0) : (l[2] = T, l[3] = E, z = !0) : q === W && (d > c ? (l[2] = O, l[3] = E, z = !0) : (l[2] = k, l[3] = I, z = !0)), j && z) return !1; if (c > d ? f > h ? ($ = this.getCardinalDirection(H, W, 4), J = this.getCardinalDirection(q, W, 2)) : ($ = this.getCardinalDirection(-H, W, 3), J = this.getCardinalDirection(-q, W, 1)) : f > h ? ($ = this.getCardinalDirection(-H, W, 1), J = this.getCardinalDirection(-q, W, 3)) : ($ = this.getCardinalDirection(H, W, 2), J = this.getCardinalDirection(q, W, 4)), !j) switch ($) { case 1: - Q = g, X = c + -S / W, l[0] = X, l[1] = Q; + Z = g, X = c + -S / W, l[0] = X, l[1] = Z; break; case 2: - X = m, Q = f + x * W, l[0] = X, l[1] = Q; + X = m, Z = f + x * W, l[0] = X, l[1] = Z; break; case 3: - Q = _, X = c + S / W, l[0] = X, l[1] = Q; + Z = _, X = c + S / W, l[0] = X, l[1] = Z; break; case 4: - X = b, Q = f + -x * W, l[0] = X, l[1] = Q; + X = b, Z = f + -x * W, l[0] = X, l[1] = Z; break; } if (!z) @@ -38135,12 +38147,12 @@ function Rte() { }); })(sx)), sx.exports; } -var Pte = ox.exports, k3; -function Mte() { +var Mte = ox.exports, k3; +function Dte() { return k3 || (k3 = 1, (function(r, e) { (function(n, i) { - r.exports = i(Rte()); - })(Pte, function(t) { + r.exports = i(Pte()); + })(Mte, function(t) { return ( /******/ (function(n) { @@ -38433,14 +38445,14 @@ function Mte() { W = W.concat(E.getEdges()); var $ = W.length; T != null && $--; - for (var J = 0, X = W.length, Q, ue = E.getEdgesBetween(T); ue.length > 1; ) { + for (var J = 0, X = W.length, Z, ue = E.getEdgesBetween(T); ue.length > 1; ) { var re = ue[0]; ue.splice(0, 1); var ne = W.indexOf(re); ne >= 0 && W.splice(ne, 1), X--, $--; } - T != null ? Q = (W.indexOf(ue[0]) + 1) % X : Q = 0; - for (var le = Math.abs(I - P) / $, ce = Q; J != $; ce = ++ce % X) { + T != null ? Z = (W.indexOf(ue[0]) + 1) % X : Z = 0; + for (var le = Math.abs(I - P) / $, ce = Z; J != $; ce = ++ce % X) { var pe = W[ce].getOtherEnd(E); if (pe != T) { var fe = (P + J * le) % 360, se = (fe + le) % 360; @@ -38475,8 +38487,8 @@ function Mte() { var $ = E.getGraphManager().add(E.newGraph(), W), J = q.getChild(); J.add(W); for (var X = 0; X < T[z].length; X++) { - var Q = T[z][X]; - J.remove(Q), $.add(Q); + var Z = T[z][X]; + J.remove(Z), $.add(Z); } } }); @@ -38662,14 +38674,14 @@ function Mte() { if (k > 0) for (var J = B; J <= j; J++) $[3] += this.grid[k - 1][J].length + this.grid[k][J].length - 1; - for (var X = b.MAX_VALUE, Q, ue, re = 0; re < $.length; re++) - $[re] < X ? (X = $[re], Q = 1, ue = re) : $[re] == X && Q++; - if (Q == 3 && X == 0) + for (var X = b.MAX_VALUE, Z, ue, re = 0; re < $.length; re++) + $[re] < X ? (X = $[re], Z = 1, ue = re) : $[re] == X && Z++; + if (Z == 3 && X == 0) $[0] == 0 && $[1] == 0 && $[2] == 0 ? T = 1 : $[0] == 0 && $[1] == 0 && $[3] == 0 ? T = 0 : $[0] == 0 && $[2] == 0 && $[3] == 0 ? T = 3 : $[1] == 0 && $[2] == 0 && $[3] == 0 && (T = 2); - else if (Q == 2 && X == 0) { + else if (Z == 2 && X == 0) { var ne = Math.floor(Math.random() * 2); $[0] == 0 && $[1] == 0 ? ne == 0 ? T = 0 : T = 1 : $[0] == 0 && $[2] == 0 ? ne == 0 ? T = 0 : T = 2 : $[0] == 0 && $[3] == 0 ? ne == 0 ? T = 0 : T = 3 : $[1] == 0 && $[2] == 0 ? ne == 0 ? T = 1 : T = 2 : $[1] == 0 && $[3] == 0 ? ne == 0 ? T = 1 : T = 3 : ne == 0 ? T = 2 : T = 3; - } else if (Q == 4 && X == 0) { + } else if (Z == 4 && X == 0) { var ne = Math.floor(Math.random() * 4); T = ne; } else @@ -38689,12 +38701,12 @@ function Mte() { }); })(ox)), ox.exports; } -var Dte = ax.exports, I3; -function kte() { +var kte = ax.exports, I3; +function Ite() { return I3 || (I3 = 1, (function(r, e) { (function(n, i) { - r.exports = i(Mte()); - })(Dte, function(t) { + r.exports = i(Dte()); + })(kte, function(t) { return ( /******/ (function(n) { @@ -38849,10 +38861,10 @@ function kte() { S.checkLayoutSuccess() && !S.isSubLayout && S.doPostLayout(), S.tilingPostLayout && S.tilingPostLayout(), S.isLayoutFinished = !0, O.options.eles.nodes().positions(z), W(), O.cy.one("layoutstop", O.options.stop), O.cy.trigger({ type: "layoutstop", layout: O }), m && cancelAnimationFrame(m), _ = !1; return; } - var Q = O.layout.getPositionsData(); + var Z = O.layout.getPositionsData(); x.eles.nodes().positions(function(ue, re) { if (typeof ue == "number" && (ue = re), !ue.isParent()) { - for (var ne = ue.id(), le = Q[ne], ce = ue; le == null && (le = Q[ce.data("parent")] || Q["DummyCompound_" + ce.data("parent")], Q[ne] = le, ce = ce.parent()[0], ce != null); ) + for (var ne = ue.id(), le = Z[ne], ce = ue; le == null && (le = Z[ce.data("parent")] || Z["DummyCompound_" + ce.data("parent")], Z[ne] = le, ce = ce.parent()[0], ce != null); ) ; return le != null ? { x: le.x, @@ -38908,10 +38920,10 @@ function kte() { }); })(ax)), ax.exports; } -var Ite = kte(); -const Nte = /* @__PURE__ */ Bp(Ite); -Np.use(Nte); -const Lte = "cose-bilkent", jte = (r, e) => { +var Nte = Ite(); +const Lte = /* @__PURE__ */ Bp(Nte); +Np.use(Lte); +const jte = "cose-bilkent", Bte = (r, e) => { const t = Np({ headless: !0, styleEnabled: !1 @@ -38919,7 +38931,7 @@ const Lte = "cose-bilkent", jte = (r, e) => { t.add(r); const n = {}; return t.layout({ - name: Lte, + name: jte, animate: !1, spacingFactor: e, quality: "default", @@ -38934,11 +38946,11 @@ const Lte = "cose-bilkent", jte = (r, e) => { positions: n }; }; -class Bte { +class Fte { start() { } postMessage(e) { - const { elements: t, spacingFactor: n } = e, i = jte(t, n); + const { elements: t, spacingFactor: n } = e, i = Bte(t, n); this.onmessage({ data: i }); } onmessage() { @@ -38946,9 +38958,9 @@ class Bte { close() { } } -const Fte = { - port: new Bte() -}, Ute = () => new SharedWorker(new URL( +const Ute = { + port: new Fte() +}, zte = () => new SharedWorker(new URL( /* @vite-ignore */ "/assets/CoseBilkentLayout.worker-DQV9PnDH.js", import.meta.url @@ -38956,30 +38968,30 @@ const Fte = { type: "module", name: "CoseBilkentLayout" }); -function zte(r) { +function qte(r) { throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } -var VO, N3; -function qte() { - if (N3) return VO; +var GO, N3; +function Gte() { + if (N3) return GO; N3 = 1; function r() { this.__data__ = [], this.size = 0; } - return VO = r, VO; + return GO = r, GO; } -var HO, L3; +var VO, L3; function fD() { - if (L3) return HO; + if (L3) return VO; L3 = 1; function r(e, t) { return e === t || e !== e && t !== t; } - return HO = r, HO; + return VO = r, VO; } -var WO, j3; -function W2() { - if (j3) return WO; +var HO, j3; +function H2() { + if (j3) return HO; j3 = 1; var r = fD(); function e(t, n) { @@ -38988,13 +39000,13 @@ function W2() { return i; return -1; } - return WO = e, WO; + return HO = e, HO; } -var YO, B3; -function Gte() { - if (B3) return YO; +var WO, B3; +function Vte() { + if (B3) return WO; B3 = 1; - var r = W2(), e = Array.prototype, t = e.splice; + var r = H2(), e = Array.prototype, t = e.splice; function n(i) { var a = this.__data__, o = r(a, i); if (o < 0) @@ -39002,45 +39014,45 @@ function Gte() { var s = a.length - 1; return o == s ? a.pop() : t.call(a, o, 1), --this.size, !0; } - return YO = n, YO; + return WO = n, WO; } -var XO, F3; -function Vte() { - if (F3) return XO; +var YO, F3; +function Hte() { + if (F3) return YO; F3 = 1; - var r = W2(); + var r = H2(); function e(t) { var n = this.__data__, i = r(n, t); return i < 0 ? void 0 : n[i][1]; } - return XO = e, XO; + return YO = e, YO; } -var $O, U3; -function Hte() { - if (U3) return $O; +var XO, U3; +function Wte() { + if (U3) return XO; U3 = 1; - var r = W2(); + var r = H2(); function e(t) { return r(this.__data__, t) > -1; } - return $O = e, $O; + return XO = e, XO; } -var KO, z3; -function Wte() { - if (z3) return KO; +var $O, z3; +function Yte() { + if (z3) return $O; z3 = 1; - var r = W2(); + var r = H2(); function e(t, n) { var i = this.__data__, a = r(i, t); return a < 0 ? (++this.size, i.push([t, n])) : i[a][1] = n, this; } - return KO = e, KO; + return $O = e, $O; } -var ZO, q3; -function Y2() { - if (q3) return ZO; +var KO, q3; +function W2() { + if (q3) return KO; q3 = 1; - var r = qte(), e = Gte(), t = Vte(), n = Hte(), i = Wte(); + var r = Gte(), e = Vte(), t = Hte(), n = Wte(), i = Yte(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -39048,70 +39060,70 @@ function Y2() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, ZO = a, ZO; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, KO = a, KO; } -var QO, G3; -function Yte() { - if (G3) return QO; +var ZO, G3; +function Xte() { + if (G3) return ZO; G3 = 1; - var r = Y2(); + var r = W2(); function e() { this.__data__ = new r(), this.size = 0; } - return QO = e, QO; + return ZO = e, ZO; } -var JO, V3; -function Xte() { - if (V3) return JO; +var QO, V3; +function $te() { + if (V3) return QO; V3 = 1; function r(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } - return JO = r, JO; + return QO = r, QO; } -var eT, H3; -function $te() { - if (H3) return eT; +var JO, H3; +function Kte() { + if (H3) return JO; H3 = 1; function r(e) { return this.__data__.get(e); } - return eT = r, eT; + return JO = r, JO; } -var tT, W3; -function Kte() { - if (W3) return tT; +var eT, W3; +function Zte() { + if (W3) return eT; W3 = 1; function r(e) { return this.__data__.has(e); } - return tT = r, tT; + return eT = r, eT; } -var rT, Y3; +var tT, Y3; function IU() { - if (Y3) return rT; + if (Y3) return tT; Y3 = 1; var r = typeof Lf == "object" && Lf && Lf.Object === Object && Lf; - return rT = r, rT; + return tT = r, tT; } -var nT, X3; +var rT, X3; function Ch() { - if (X3) return nT; + if (X3) return rT; X3 = 1; var r = IU(), e = typeof self == "object" && self && self.Object === Object && self, t = r || e || Function("return this")(); - return nT = t, nT; + return rT = t, rT; } -var iT, $3; +var nT, $3; function t0() { - if ($3) return iT; + if ($3) return nT; $3 = 1; var r = Ch(), e = r.Symbol; - return iT = e, iT; + return nT = e, nT; } -var aT, K3; -function Zte() { - if (K3) return aT; +var iT, K3; +function Qte() { + if (K3) return iT; K3 = 1; var r = t0(), e = Object.prototype, t = e.hasOwnProperty, n = e.toString, i = r ? r.toStringTag : void 0; function a(o) { @@ -39124,41 +39136,41 @@ function Zte() { var c = n.call(o); return l && (s ? o[i] = u : delete o[i]), c; } - return aT = a, aT; + return iT = a, iT; } -var oT, Z3; -function Qte() { - if (Z3) return oT; +var aT, Z3; +function Jte() { + if (Z3) return aT; Z3 = 1; var r = Object.prototype, e = r.toString; function t(n) { return e.call(n); } - return oT = t, oT; + return aT = t, aT; } -var sT, Q3; +var oT, Q3; function r0() { - if (Q3) return sT; + if (Q3) return oT; Q3 = 1; - var r = t0(), e = Zte(), t = Qte(), n = "[object Null]", i = "[object Undefined]", a = r ? r.toStringTag : void 0; + var r = t0(), e = Qte(), t = Jte(), n = "[object Null]", i = "[object Undefined]", a = r ? r.toStringTag : void 0; function o(s) { return s == null ? s === void 0 ? i : n : a && a in Object(s) ? e(s) : t(s); } - return sT = o, sT; + return oT = o, oT; } -var uT, J3; +var sT, J3; function iy() { - if (J3) return uT; + if (J3) return sT; J3 = 1; function r(e) { var t = typeof e; return e != null && (t == "object" || t == "function"); } - return uT = r, uT; + return sT = r, sT; } -var lT, eL; -function X2() { - if (eL) return lT; +var uT, eL; +function Y2() { + if (eL) return uT; eL = 1; var r = r0(), e = iy(), t = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", a = "[object Proxy]"; function o(s) { @@ -39167,31 +39179,31 @@ function X2() { var u = r(s); return u == n || u == i || u == t || u == a; } - return lT = o, lT; + return uT = o, uT; } -var cT, tL; -function Jte() { - if (tL) return cT; +var lT, tL; +function ere() { + if (tL) return lT; tL = 1; var r = Ch(), e = r["__core-js_shared__"]; - return cT = e, cT; + return lT = e, lT; } -var fT, rL; -function ere() { - if (rL) return fT; +var cT, rL; +function tre() { + if (rL) return cT; rL = 1; - var r = Jte(), e = (function() { + var r = ere(), e = (function() { var n = /[^.]+$/.exec(r && r.keys && r.keys.IE_PROTO || ""); return n ? "Symbol(src)_1." + n : ""; })(); function t(n) { return !!e && e in n; } - return fT = t, fT; + return cT = t, cT; } -var dT, nL; +var fT, nL; function NU() { - if (nL) return dT; + if (nL) return fT; nL = 1; var r = Function.prototype, e = r.toString; function t(n) { @@ -39207,13 +39219,13 @@ function NU() { } return ""; } - return dT = t, dT; + return fT = t, fT; } -var hT, iL; -function tre() { - if (iL) return hT; +var dT, iL; +function rre() { + if (iL) return dT; iL = 1; - var r = X2(), e = ere(), t = iy(), n = NU(), i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, o = Function.prototype, s = Object.prototype, u = o.toString, l = s.hasOwnProperty, c = RegExp( + var r = Y2(), e = tre(), t = iy(), n = NU(), i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, o = Function.prototype, s = Object.prototype, u = o.toString, l = s.hasOwnProperty, c = RegExp( "^" + u.call(l).replace(i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); function f(d) { @@ -39222,67 +39234,67 @@ function tre() { var h = r(d) ? c : a; return h.test(n(d)); } - return hT = f, hT; + return dT = f, dT; } -var vT, aL; -function rre() { - if (aL) return vT; +var hT, aL; +function nre() { + if (aL) return hT; aL = 1; function r(e, t) { return e == null ? void 0 : e[t]; } - return vT = r, vT; + return hT = r, hT; } -var pT, oL; +var vT, oL; function ay() { - if (oL) return pT; + if (oL) return vT; oL = 1; - var r = tre(), e = rre(); + var r = rre(), e = nre(); function t(n, i) { var a = e(n, i); return r(a) ? a : void 0; } - return pT = t, pT; + return vT = t, vT; } -var gT, sL; +var pT, sL; function dD() { - if (sL) return gT; + if (sL) return pT; sL = 1; var r = ay(), e = Ch(), t = r(e, "Map"); - return gT = t, gT; + return pT = t, pT; } -var yT, uL; -function $2() { - if (uL) return yT; +var gT, uL; +function X2() { + if (uL) return gT; uL = 1; var r = ay(), e = r(Object, "create"); - return yT = e, yT; + return gT = e, gT; } -var mT, lL; -function nre() { - if (lL) return mT; +var yT, lL; +function ire() { + if (lL) return yT; lL = 1; - var r = $2(); + var r = X2(); function e() { this.__data__ = r ? r(null) : {}, this.size = 0; } - return mT = e, mT; + return yT = e, yT; } -var bT, cL; -function ire() { - if (cL) return bT; +var mT, cL; +function are() { + if (cL) return mT; cL = 1; function r(e) { var t = this.has(e) && delete this.__data__[e]; return this.size -= t ? 1 : 0, t; } - return bT = r, bT; + return mT = r, mT; } -var _T, fL; -function are() { - if (fL) return _T; +var bT, fL; +function ore() { + if (fL) return bT; fL = 1; - var r = $2(), e = "__lodash_hash_undefined__", t = Object.prototype, n = t.hasOwnProperty; + var r = X2(), e = "__lodash_hash_undefined__", t = Object.prototype, n = t.hasOwnProperty; function i(a) { var o = this.__data__; if (r) { @@ -39291,35 +39303,35 @@ function are() { } return n.call(o, a) ? o[a] : void 0; } - return _T = i, _T; + return bT = i, bT; } -var wT, dL; -function ore() { - if (dL) return wT; +var _T, dL; +function sre() { + if (dL) return _T; dL = 1; - var r = $2(), e = Object.prototype, t = e.hasOwnProperty; + var r = X2(), e = Object.prototype, t = e.hasOwnProperty; function n(i) { var a = this.__data__; return r ? a[i] !== void 0 : t.call(a, i); } - return wT = n, wT; + return _T = n, _T; } -var xT, hL; -function sre() { - if (hL) return xT; +var wT, hL; +function ure() { + if (hL) return wT; hL = 1; - var r = $2(), e = "__lodash_hash_undefined__"; + var r = X2(), e = "__lodash_hash_undefined__"; function t(n, i) { var a = this.__data__; return this.size += this.has(n) ? 0 : 1, a[n] = r && i === void 0 ? e : i, this; } - return xT = t, xT; + return wT = t, wT; } -var ET, vL; -function ure() { - if (vL) return ET; +var xT, vL; +function lre() { + if (vL) return xT; vL = 1; - var r = nre(), e = ire(), t = are(), n = ore(), i = sre(); + var r = ire(), e = are(), t = ore(), n = sre(), i = ure(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -39327,13 +39339,13 @@ function ure() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, ET = a, ET; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, xT = a, xT; } -var ST, pL; -function lre() { - if (pL) return ST; +var ET, pL; +function cre() { + if (pL) return ET; pL = 1; - var r = ure(), e = Y2(), t = dD(); + var r = lre(), e = W2(), t = dD(); function n() { this.size = 0, this.__data__ = { hash: new r(), @@ -39341,76 +39353,76 @@ function lre() { string: new r() }; } - return ST = n, ST; + return ET = n, ET; } -var OT, gL; -function cre() { - if (gL) return OT; +var ST, gL; +function fre() { + if (gL) return ST; gL = 1; function r(e) { var t = typeof e; return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null; } - return OT = r, OT; + return ST = r, ST; } -var TT, yL; -function K2() { - if (yL) return TT; +var OT, yL; +function $2() { + if (yL) return OT; yL = 1; - var r = cre(); + var r = fre(); function e(t, n) { var i = t.__data__; return r(n) ? i[typeof n == "string" ? "string" : "hash"] : i.map; } - return TT = e, TT; + return OT = e, OT; } -var CT, mL; -function fre() { - if (mL) return CT; +var TT, mL; +function dre() { + if (mL) return TT; mL = 1; - var r = K2(); + var r = $2(); function e(t) { var n = r(this, t).delete(t); return this.size -= n ? 1 : 0, n; } - return CT = e, CT; + return TT = e, TT; } -var AT, bL; -function dre() { - if (bL) return AT; +var CT, bL; +function hre() { + if (bL) return CT; bL = 1; - var r = K2(); + var r = $2(); function e(t) { return r(this, t).get(t); } - return AT = e, AT; + return CT = e, CT; } -var RT, _L; -function hre() { - if (_L) return RT; +var AT, _L; +function vre() { + if (_L) return AT; _L = 1; - var r = K2(); + var r = $2(); function e(t) { return r(this, t).has(t); } - return RT = e, RT; + return AT = e, AT; } -var PT, wL; -function vre() { - if (wL) return PT; +var RT, wL; +function pre() { + if (wL) return RT; wL = 1; - var r = K2(); + var r = $2(); function e(t, n) { var i = r(this, t), a = i.size; return i.set(t, n), this.size += i.size == a ? 0 : 1, this; } - return PT = e, PT; + return RT = e, RT; } -var MT, xL; +var PT, xL; function hD() { - if (xL) return MT; + if (xL) return PT; xL = 1; - var r = lre(), e = fre(), t = dre(), n = hre(), i = vre(); + var r = cre(), e = dre(), t = hre(), n = vre(), i = pre(); function a(o) { var s = -1, u = o == null ? 0 : o.length; for (this.clear(); ++s < u; ) { @@ -39418,13 +39430,13 @@ function hD() { this.set(l[0], l[1]); } } - return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, MT = a, MT; + return a.prototype.clear = r, a.prototype.delete = e, a.prototype.get = t, a.prototype.has = n, a.prototype.set = i, PT = a, PT; } -var DT, EL; -function pre() { - if (EL) return DT; +var MT, EL; +function gre() { + if (EL) return MT; EL = 1; - var r = Y2(), e = dD(), t = hD(), n = 200; + var r = W2(), e = dD(), t = hD(), n = 200; function i(a, o) { var s = this.__data__; if (s instanceof r) { @@ -39435,33 +39447,33 @@ function pre() { } return s.set(a, o), this.size = s.size, this; } - return DT = i, DT; + return MT = i, MT; } -var kT, SL; +var DT, SL; function vD() { - if (SL) return kT; + if (SL) return DT; SL = 1; - var r = Y2(), e = Yte(), t = Xte(), n = $te(), i = Kte(), a = pre(); + var r = W2(), e = Xte(), t = $te(), n = Kte(), i = Zte(), a = gre(); function o(s) { var u = this.__data__ = new r(s); this.size = u.size; } - return o.prototype.clear = e, o.prototype.delete = t, o.prototype.get = n, o.prototype.has = i, o.prototype.set = a, kT = o, kT; + return o.prototype.clear = e, o.prototype.delete = t, o.prototype.get = n, o.prototype.has = i, o.prototype.set = a, DT = o, DT; } -var IT, OL; +var kT, OL; function pD() { - if (OL) return IT; + if (OL) return kT; OL = 1; function r(e, t) { for (var n = -1, i = e == null ? 0 : e.length; ++n < i && t(e[n], n, e) !== !1; ) ; return e; } - return IT = r, IT; + return kT = r, kT; } -var NT, TL; +var IT, TL; function LU() { - if (TL) return NT; + if (TL) return IT; TL = 1; var r = ay(), e = (function() { try { @@ -39470,11 +39482,11 @@ function LU() { } catch { } })(); - return NT = e, NT; + return IT = e, IT; } -var LT, CL; +var NT, CL; function jU() { - if (CL) return LT; + if (CL) return NT; CL = 1; var r = LU(); function e(t, n, i) { @@ -39485,22 +39497,22 @@ function jU() { writable: !0 }) : t[n] = i; } - return LT = e, LT; + return NT = e, NT; } -var jT, AL; +var LT, AL; function BU() { - if (AL) return jT; + if (AL) return LT; AL = 1; var r = jU(), e = fD(), t = Object.prototype, n = t.hasOwnProperty; function i(a, o, s) { var u = a[o]; (!(n.call(a, o) && e(u, s)) || s === void 0 && !(o in a)) && r(a, o, s); } - return jT = i, jT; + return LT = i, LT; } -var BT, RL; -function Z2() { - if (RL) return BT; +var jT, RL; +function K2() { + if (RL) return jT; RL = 1; var r = BU(), e = jU(); function t(n, i, a, o) { @@ -39512,115 +39524,115 @@ function Z2() { } return a; } - return BT = t, BT; + return jT = t, jT; } -var FT, PL; -function gre() { - if (PL) return FT; +var BT, PL; +function yre() { + if (PL) return BT; PL = 1; function r(e, t) { for (var n = -1, i = Array(e); ++n < e; ) i[n] = t(n); return i; } - return FT = r, FT; + return BT = r, BT; } -var UT, ML; +var FT, ML; function xv() { - if (ML) return UT; + if (ML) return FT; ML = 1; function r(e) { return e != null && typeof e == "object"; } - return UT = r, UT; + return FT = r, FT; } -var zT, DL; -function yre() { - if (DL) return zT; +var UT, DL; +function mre() { + if (DL) return UT; DL = 1; var r = r0(), e = xv(), t = "[object Arguments]"; function n(i) { return e(i) && r(i) == t; } - return zT = n, zT; + return UT = n, UT; } -var qT, kL; -function Q2() { - if (kL) return qT; +var zT, kL; +function Z2() { + if (kL) return zT; kL = 1; - var r = yre(), e = xv(), t = Object.prototype, n = t.hasOwnProperty, i = t.propertyIsEnumerable, a = r(/* @__PURE__ */ (function() { + var r = mre(), e = xv(), t = Object.prototype, n = t.hasOwnProperty, i = t.propertyIsEnumerable, a = r(/* @__PURE__ */ (function() { return arguments; })()) ? r : function(o) { return e(o) && n.call(o, "callee") && !i.call(o, "callee"); }; - return qT = a, qT; + return zT = a, zT; } -var GT, IL; +var qT, IL; function Bs() { - if (IL) return GT; + if (IL) return qT; IL = 1; var r = Array.isArray; - return GT = r, GT; + return qT = r, qT; } -var pb = { exports: {} }, VT, NL; -function mre() { - if (NL) return VT; +var pb = { exports: {} }, GT, NL; +function bre() { + if (NL) return GT; NL = 1; function r() { return !1; } - return VT = r, VT; + return GT = r, GT; } pb.exports; var LL; function r_() { return LL || (LL = 1, (function(r, e) { - var t = Ch(), n = mre(), i = e && !e.nodeType && e, a = i && !0 && r && !r.nodeType && r, o = a && a.exports === i, s = o ? t.Buffer : void 0, u = s ? s.isBuffer : void 0, l = u || n; + var t = Ch(), n = bre(), i = e && !e.nodeType && e, a = i && !0 && r && !r.nodeType && r, o = a && a.exports === i, s = o ? t.Buffer : void 0, u = s ? s.isBuffer : void 0, l = u || n; r.exports = l; })(pb, pb.exports)), pb.exports; } -var HT, jL; +var VT, jL; function FU() { - if (jL) return HT; + if (jL) return VT; jL = 1; var r = 9007199254740991, e = /^(?:0|[1-9]\d*)$/; function t(n, i) { var a = typeof n; return i = i ?? r, !!i && (a == "number" || a != "symbol" && e.test(n)) && n > -1 && n % 1 == 0 && n < i; } - return HT = t, HT; + return VT = t, VT; } -var WT, BL; +var HT, BL; function gD() { - if (BL) return WT; + if (BL) return HT; BL = 1; var r = 9007199254740991; function e(t) { return typeof t == "number" && t > -1 && t % 1 == 0 && t <= r; } - return WT = e, WT; + return HT = e, HT; } -var YT, FL; -function bre() { - if (FL) return YT; +var WT, FL; +function _re() { + if (FL) return WT; FL = 1; var r = r0(), e = gD(), t = xv(), n = "[object Arguments]", i = "[object Array]", a = "[object Boolean]", o = "[object Date]", s = "[object Error]", u = "[object Function]", l = "[object Map]", c = "[object Number]", f = "[object Object]", d = "[object RegExp]", h = "[object Set]", p = "[object String]", g = "[object WeakMap]", y = "[object ArrayBuffer]", b = "[object DataView]", _ = "[object Float32Array]", m = "[object Float64Array]", x = "[object Int8Array]", S = "[object Int16Array]", O = "[object Int32Array]", E = "[object Uint8Array]", T = "[object Uint8ClampedArray]", P = "[object Uint16Array]", I = "[object Uint32Array]", k = {}; k[_] = k[m] = k[x] = k[S] = k[O] = k[E] = k[T] = k[P] = k[I] = !0, k[n] = k[i] = k[y] = k[a] = k[b] = k[o] = k[s] = k[u] = k[l] = k[c] = k[f] = k[d] = k[h] = k[p] = k[g] = !1; function L(B) { return t(B) && e(B.length) && !!k[r(B)]; } - return YT = L, YT; + return WT = L, WT; } -var XT, UL; +var YT, UL; function yD() { - if (UL) return XT; + if (UL) return YT; UL = 1; function r(e) { return function(t) { return e(t); }; } - return XT = r, XT; + return YT = r, YT; } var gb = { exports: {} }; gb.exports; @@ -39637,18 +39649,18 @@ function mD() { r.exports = s; })(gb, gb.exports)), gb.exports; } -var $T, qL; -function J2() { - if (qL) return $T; +var XT, qL; +function Q2() { + if (qL) return XT; qL = 1; - var r = bre(), e = yD(), t = mD(), n = t && t.isTypedArray, i = n ? e(n) : r; - return $T = i, $T; + var r = _re(), e = yD(), t = mD(), n = t && t.isTypedArray, i = n ? e(n) : r; + return XT = i, XT; } -var KT, GL; +var $T, GL; function UU() { - if (GL) return KT; + if (GL) return $T; GL = 1; - var r = gre(), e = Q2(), t = Bs(), n = r_(), i = FU(), a = J2(), o = Object.prototype, s = o.hasOwnProperty; + var r = yre(), e = Z2(), t = Bs(), n = r_(), i = FU(), a = Q2(), o = Object.prototype, s = o.hasOwnProperty; function u(l, c) { var f = t(l), d = !f && e(l), h = !f && !d && n(l), p = !f && !d && !h && a(l), g = f || d || h || p, y = g ? r(l.length, String) : [], b = y.length; for (var _ in l) @@ -39659,42 +39671,42 @@ function UU() { i(_, b))) && y.push(_); return y; } - return KT = u, KT; + return $T = u, $T; } -var ZT, VL; -function eE() { - if (VL) return ZT; +var KT, VL; +function J2() { + if (VL) return KT; VL = 1; var r = Object.prototype; function e(t) { var n = t && t.constructor, i = typeof n == "function" && n.prototype || r; return t === i; } - return ZT = e, ZT; + return KT = e, KT; } -var QT, HL; +var ZT, HL; function zU() { - if (HL) return QT; + if (HL) return ZT; HL = 1; function r(e, t) { return function(n) { return e(t(n)); }; } - return QT = r, QT; + return ZT = r, ZT; } -var JT, WL; -function _re() { - if (WL) return JT; +var QT, WL; +function wre() { + if (WL) return QT; WL = 1; var r = zU(), e = r(Object.keys, Object); - return JT = e, JT; + return QT = e, QT; } -var eC, YL; +var JT, YL; function bD() { - if (YL) return eC; + if (YL) return JT; YL = 1; - var r = eE(), e = _re(), t = Object.prototype, n = t.hasOwnProperty; + var r = J2(), e = wre(), t = Object.prototype, n = t.hasOwnProperty; function i(a) { if (!r(a)) return e(a); @@ -39703,41 +39715,41 @@ function bD() { n.call(a, s) && s != "constructor" && o.push(s); return o; } - return eC = i, eC; + return JT = i, JT; } -var tC, XL; +var eC, XL; function oy() { - if (XL) return tC; + if (XL) return eC; XL = 1; - var r = X2(), e = gD(); + var r = Y2(), e = gD(); function t(n) { return n != null && e(n.length) && !r(n); } - return tC = t, tC; + return eC = t, eC; } -var rC, $L; +var tC, $L; function sy() { - if ($L) return rC; + if ($L) return tC; $L = 1; var r = UU(), e = bD(), t = oy(); function n(i) { return t(i) ? r(i) : e(i); } - return rC = n, rC; + return tC = n, tC; } -var nC, KL; -function wre() { - if (KL) return nC; +var rC, KL; +function xre() { + if (KL) return rC; KL = 1; - var r = Z2(), e = sy(); + var r = K2(), e = sy(); function t(n, i) { return n && r(i, e(i), n); } - return nC = t, nC; + return rC = t, rC; } -var iC, ZL; -function xre() { - if (ZL) return iC; +var nC, ZL; +function Ere() { + if (ZL) return nC; ZL = 1; function r(e) { var t = []; @@ -39746,13 +39758,13 @@ function xre() { t.push(n); return t; } - return iC = r, iC; + return nC = r, nC; } -var aC, QL; -function Ere() { - if (QL) return aC; +var iC, QL; +function Sre() { + if (QL) return iC; QL = 1; - var r = iy(), e = eE(), t = xre(), n = Object.prototype, i = n.hasOwnProperty; + var r = iy(), e = J2(), t = Ere(), n = Object.prototype, i = n.hasOwnProperty; function a(o) { if (!r(o)) return t(o); @@ -39761,32 +39773,32 @@ function Ere() { l == "constructor" && (s || !i.call(o, l)) || u.push(l); return u; } - return aC = a, aC; + return iC = a, iC; } -var oC, JL; +var aC, JL; function _D() { - if (JL) return oC; + if (JL) return aC; JL = 1; - var r = UU(), e = Ere(), t = oy(); + var r = UU(), e = Sre(), t = oy(); function n(i) { return t(i) ? r(i, !0) : e(i); } - return oC = n, oC; + return aC = n, aC; } -var sC, e4; -function Sre() { - if (e4) return sC; +var oC, e4; +function Ore() { + if (e4) return oC; e4 = 1; - var r = Z2(), e = _D(); + var r = K2(), e = _D(); function t(n, i) { return n && r(i, e(i), n); } - return sC = t, sC; + return oC = t, oC; } var yb = { exports: {} }; yb.exports; var t4; -function Ore() { +function Tre() { return t4 || (t4 = 1, (function(r, e) { var t = Ch(), n = e && !e.nodeType && e, i = n && !0 && r && !r.nodeType && r, a = i && i.exports === n, o = a ? t.Buffer : void 0, s = o ? o.allocUnsafe : void 0; function u(l, c) { @@ -39798,9 +39810,9 @@ function Ore() { r.exports = u; })(yb, yb.exports)), yb.exports; } -var uC, r4; -function Tre() { - if (r4) return uC; +var sC, r4; +function Cre() { + if (r4) return sC; r4 = 1; function r(e, t) { var n = -1, i = e.length; @@ -39808,11 +39820,11 @@ function Tre() { t[n] = e[n]; return t; } - return uC = r, uC; + return sC = r, sC; } -var lC, n4; +var uC, n4; function qU() { - if (n4) return lC; + if (n4) return uC; n4 = 1; function r(e, t) { for (var n = -1, i = e == null ? 0 : e.length, a = 0, o = []; ++n < i; ) { @@ -39821,141 +39833,141 @@ function qU() { } return o; } - return lC = r, lC; + return uC = r, uC; } -var cC, i4; +var lC, i4; function GU() { - if (i4) return cC; + if (i4) return lC; i4 = 1; function r() { return []; } - return cC = r, cC; + return lC = r, lC; } -var fC, a4; +var cC, a4; function wD() { - if (a4) return fC; + if (a4) return cC; a4 = 1; var r = qU(), e = GU(), t = Object.prototype, n = t.propertyIsEnumerable, i = Object.getOwnPropertySymbols, a = i ? function(o) { return o == null ? [] : (o = Object(o), r(i(o), function(s) { return n.call(o, s); })); } : e; - return fC = a, fC; + return cC = a, cC; } -var dC, o4; -function Cre() { - if (o4) return dC; +var fC, o4; +function Are() { + if (o4) return fC; o4 = 1; - var r = Z2(), e = wD(); + var r = K2(), e = wD(); function t(n, i) { return r(n, e(n), i); } - return dC = t, dC; + return fC = t, fC; } -var hC, s4; +var dC, s4; function xD() { - if (s4) return hC; + if (s4) return dC; s4 = 1; function r(e, t) { for (var n = -1, i = t.length, a = e.length; ++n < i; ) e[a + n] = t[n]; return e; } - return hC = r, hC; + return dC = r, dC; } -var vC, u4; +var hC, u4; function ED() { - if (u4) return vC; + if (u4) return hC; u4 = 1; var r = zU(), e = r(Object.getPrototypeOf, Object); - return vC = e, vC; + return hC = e, hC; } -var pC, l4; +var vC, l4; function VU() { - if (l4) return pC; + if (l4) return vC; l4 = 1; var r = xD(), e = ED(), t = wD(), n = GU(), i = Object.getOwnPropertySymbols, a = i ? function(o) { for (var s = []; o; ) r(s, t(o)), o = e(o); return s; } : n; - return pC = a, pC; + return vC = a, vC; } -var gC, c4; -function Are() { - if (c4) return gC; +var pC, c4; +function Rre() { + if (c4) return pC; c4 = 1; - var r = Z2(), e = VU(); + var r = K2(), e = VU(); function t(n, i) { return r(n, e(n), i); } - return gC = t, gC; + return pC = t, pC; } -var yC, f4; +var gC, f4; function HU() { - if (f4) return yC; + if (f4) return gC; f4 = 1; var r = xD(), e = Bs(); function t(n, i, a) { var o = i(n); return e(n) ? o : r(o, a(n)); } - return yC = t, yC; + return gC = t, gC; } -var mC, d4; +var yC, d4; function WU() { - if (d4) return mC; + if (d4) return yC; d4 = 1; var r = HU(), e = wD(), t = sy(); function n(i) { return r(i, t, e); } - return mC = n, mC; + return yC = n, yC; } -var bC, h4; -function Rre() { - if (h4) return bC; +var mC, h4; +function Pre() { + if (h4) return mC; h4 = 1; var r = HU(), e = VU(), t = _D(); function n(i) { return r(i, t, e); } - return bC = n, bC; + return mC = n, mC; } -var _C, v4; -function Pre() { - if (v4) return _C; +var bC, v4; +function Mre() { + if (v4) return bC; v4 = 1; var r = ay(), e = Ch(), t = r(e, "DataView"); - return _C = t, _C; + return bC = t, bC; } -var wC, p4; -function Mre() { - if (p4) return wC; +var _C, p4; +function Dre() { + if (p4) return _C; p4 = 1; var r = ay(), e = Ch(), t = r(e, "Promise"); - return wC = t, wC; + return _C = t, _C; } -var xC, g4; +var wC, g4; function YU() { - if (g4) return xC; + if (g4) return wC; g4 = 1; var r = ay(), e = Ch(), t = r(e, "Set"); - return xC = t, xC; + return wC = t, wC; } -var EC, y4; -function Dre() { - if (y4) return EC; +var xC, y4; +function kre() { + if (y4) return xC; y4 = 1; var r = ay(), e = Ch(), t = r(e, "WeakMap"); - return EC = t, EC; + return xC = t, xC; } -var SC, m4; +var EC, m4; function n0() { - if (m4) return SC; + if (m4) return EC; m4 = 1; - var r = Pre(), e = dD(), t = Mre(), n = YU(), i = Dre(), a = r0(), o = NU(), s = "[object Map]", u = "[object Object]", l = "[object Promise]", c = "[object Set]", f = "[object WeakMap]", d = "[object DataView]", h = o(r), p = o(e), g = o(t), y = o(n), b = o(i), _ = a; + var r = Mre(), e = dD(), t = Dre(), n = YU(), i = kre(), a = r0(), o = NU(), s = "[object Map]", u = "[object Object]", l = "[object Promise]", c = "[object Set]", f = "[object WeakMap]", d = "[object DataView]", h = o(r), p = o(e), g = o(t), y = o(n), b = o(i), _ = a; return (r && _(new r(new ArrayBuffer(1))) != d || e && _(new e()) != s || t && _(t.resolve()) != l || n && _(new n()) != c || i && _(new i()) != f) && (_ = function(m) { var x = a(m), S = x == u ? m.constructor : void 0, O = S ? o(S) : ""; if (O) @@ -39972,85 +39984,85 @@ function n0() { return f; } return x; - }), SC = _, SC; + }), EC = _, EC; } -var OC, b4; -function kre() { - if (b4) return OC; +var SC, b4; +function Ire() { + if (b4) return SC; b4 = 1; var r = Object.prototype, e = r.hasOwnProperty; function t(n) { var i = n.length, a = new n.constructor(i); return i && typeof n[0] == "string" && e.call(n, "index") && (a.index = n.index, a.input = n.input), a; } - return OC = t, OC; + return SC = t, SC; } -var TC, _4; +var OC, _4; function XU() { - if (_4) return TC; + if (_4) return OC; _4 = 1; var r = Ch(), e = r.Uint8Array; - return TC = e, TC; + return OC = e, OC; } -var CC, w4; +var TC, w4; function SD() { - if (w4) return CC; + if (w4) return TC; w4 = 1; var r = XU(); function e(t) { var n = new t.constructor(t.byteLength); return new r(n).set(new r(t)), n; } - return CC = e, CC; + return TC = e, TC; } -var AC, x4; -function Ire() { - if (x4) return AC; +var CC, x4; +function Nre() { + if (x4) return CC; x4 = 1; var r = SD(); function e(t, n) { var i = n ? r(t.buffer) : t.buffer; return new t.constructor(i, t.byteOffset, t.byteLength); } - return AC = e, AC; + return CC = e, CC; } -var RC, E4; -function Nre() { - if (E4) return RC; +var AC, E4; +function Lre() { + if (E4) return AC; E4 = 1; var r = /\w*$/; function e(t) { var n = new t.constructor(t.source, r.exec(t)); return n.lastIndex = t.lastIndex, n; } - return RC = e, RC; + return AC = e, AC; } -var PC, S4; -function Lre() { - if (S4) return PC; +var RC, S4; +function jre() { + if (S4) return RC; S4 = 1; var r = t0(), e = r ? r.prototype : void 0, t = e ? e.valueOf : void 0; function n(i) { return t ? Object(t.call(i)) : {}; } - return PC = n, PC; + return RC = n, RC; } -var MC, O4; -function jre() { - if (O4) return MC; +var PC, O4; +function Bre() { + if (O4) return PC; O4 = 1; var r = SD(); function e(t, n) { var i = n ? r(t.buffer) : t.buffer; return new t.constructor(i, t.byteOffset, t.length); } - return MC = e, MC; + return PC = e, PC; } -var DC, T4; -function Bre() { - if (T4) return DC; +var MC, T4; +function Fre() { + if (T4) return MC; T4 = 1; - var r = SD(), e = Ire(), t = Nre(), n = Lre(), i = jre(), a = "[object Boolean]", o = "[object Date]", s = "[object Map]", u = "[object Number]", l = "[object RegExp]", c = "[object Set]", f = "[object String]", d = "[object Symbol]", h = "[object ArrayBuffer]", p = "[object DataView]", g = "[object Float32Array]", y = "[object Float64Array]", b = "[object Int8Array]", _ = "[object Int16Array]", m = "[object Int32Array]", x = "[object Uint8Array]", S = "[object Uint8ClampedArray]", O = "[object Uint16Array]", E = "[object Uint32Array]"; + var r = SD(), e = Nre(), t = Lre(), n = jre(), i = Bre(), a = "[object Boolean]", o = "[object Date]", s = "[object Map]", u = "[object Number]", l = "[object RegExp]", c = "[object Set]", f = "[object String]", d = "[object Symbol]", h = "[object ArrayBuffer]", p = "[object DataView]", g = "[object Float32Array]", y = "[object Float64Array]", b = "[object Int8Array]", _ = "[object Int16Array]", m = "[object Int32Array]", x = "[object Uint8Array]", S = "[object Uint8ClampedArray]", O = "[object Uint16Array]", E = "[object Uint32Array]"; function T(P, I, k) { var L = P.constructor; switch (I) { @@ -40084,11 +40096,11 @@ function Bre() { return n(P); } } - return DC = T, DC; + return MC = T, MC; } -var kC, C4; +var DC, C4; function $U() { - if (C4) return kC; + if (C4) return DC; C4 = 1; var r = iy(), e = Object.create, t = /* @__PURE__ */ (function() { function n() { @@ -40103,121 +40115,121 @@ function $U() { return n.prototype = void 0, a; }; })(); - return kC = t, kC; + return DC = t, DC; } -var IC, A4; -function Fre() { - if (A4) return IC; +var kC, A4; +function Ure() { + if (A4) return kC; A4 = 1; - var r = $U(), e = ED(), t = eE(); + var r = $U(), e = ED(), t = J2(); function n(i) { return typeof i.constructor == "function" && !t(i) ? r(e(i)) : {}; } - return IC = n, IC; + return kC = n, kC; } -var NC, R4; -function Ure() { - if (R4) return NC; +var IC, R4; +function zre() { + if (R4) return IC; R4 = 1; var r = n0(), e = xv(), t = "[object Map]"; function n(i) { return e(i) && r(i) == t; } - return NC = n, NC; + return IC = n, IC; } -var LC, P4; -function zre() { - if (P4) return LC; +var NC, P4; +function qre() { + if (P4) return NC; P4 = 1; - var r = Ure(), e = yD(), t = mD(), n = t && t.isMap, i = n ? e(n) : r; - return LC = i, LC; + var r = zre(), e = yD(), t = mD(), n = t && t.isMap, i = n ? e(n) : r; + return NC = i, NC; } -var jC, M4; -function qre() { - if (M4) return jC; +var LC, M4; +function Gre() { + if (M4) return LC; M4 = 1; var r = n0(), e = xv(), t = "[object Set]"; function n(i) { return e(i) && r(i) == t; } - return jC = n, jC; + return LC = n, LC; } -var BC, D4; -function Gre() { - if (D4) return BC; +var jC, D4; +function Vre() { + if (D4) return jC; D4 = 1; - var r = qre(), e = yD(), t = mD(), n = t && t.isSet, i = n ? e(n) : r; - return BC = i, BC; + var r = Gre(), e = yD(), t = mD(), n = t && t.isSet, i = n ? e(n) : r; + return jC = i, jC; } -var FC, k4; -function Vre() { - if (k4) return FC; +var BC, k4; +function Hre() { + if (k4) return BC; k4 = 1; - var r = vD(), e = pD(), t = BU(), n = wre(), i = Sre(), a = Ore(), o = Tre(), s = Cre(), u = Are(), l = WU(), c = Rre(), f = n0(), d = kre(), h = Bre(), p = Fre(), g = Bs(), y = r_(), b = zre(), _ = iy(), m = Gre(), x = sy(), S = _D(), O = 1, E = 2, T = 4, P = "[object Arguments]", I = "[object Array]", k = "[object Boolean]", L = "[object Date]", B = "[object Error]", j = "[object Function]", z = "[object GeneratorFunction]", H = "[object Map]", q = "[object Number]", W = "[object Object]", $ = "[object RegExp]", J = "[object Set]", X = "[object String]", Q = "[object Symbol]", ue = "[object WeakMap]", re = "[object ArrayBuffer]", ne = "[object DataView]", le = "[object Float32Array]", ce = "[object Float64Array]", pe = "[object Int8Array]", fe = "[object Int16Array]", se = "[object Int32Array]", de = "[object Uint8Array]", ge = "[object Uint8ClampedArray]", Oe = "[object Uint16Array]", ke = "[object Uint32Array]", Me = {}; - Me[P] = Me[I] = Me[re] = Me[ne] = Me[k] = Me[L] = Me[le] = Me[ce] = Me[pe] = Me[fe] = Me[se] = Me[H] = Me[q] = Me[W] = Me[$] = Me[J] = Me[X] = Me[Q] = Me[de] = Me[ge] = Me[Oe] = Me[ke] = !0, Me[B] = Me[j] = Me[ue] = !1; - function Ne(Ce, Y, Z, ie, we, Ee) { - var De, Ie = Y & O, Ye = Y & E, ot = Y & T; - if (Z && (De = we ? Z(Ce, ie, we, Ee) : Z(Ce)), De !== void 0) - return De; + var r = vD(), e = pD(), t = BU(), n = xre(), i = Ore(), a = Tre(), o = Cre(), s = Are(), u = Rre(), l = WU(), c = Pre(), f = n0(), d = Ire(), h = Fre(), p = Ure(), g = Bs(), y = r_(), b = qre(), _ = iy(), m = Vre(), x = sy(), S = _D(), O = 1, E = 2, T = 4, P = "[object Arguments]", I = "[object Array]", k = "[object Boolean]", L = "[object Date]", B = "[object Error]", j = "[object Function]", z = "[object GeneratorFunction]", H = "[object Map]", q = "[object Number]", W = "[object Object]", $ = "[object RegExp]", J = "[object Set]", X = "[object String]", Z = "[object Symbol]", ue = "[object WeakMap]", re = "[object ArrayBuffer]", ne = "[object DataView]", le = "[object Float32Array]", ce = "[object Float64Array]", pe = "[object Int8Array]", fe = "[object Int16Array]", se = "[object Int32Array]", de = "[object Uint8Array]", ge = "[object Uint8ClampedArray]", Oe = "[object Uint16Array]", ke = "[object Uint32Array]", De = {}; + De[P] = De[I] = De[re] = De[ne] = De[k] = De[L] = De[le] = De[ce] = De[pe] = De[fe] = De[se] = De[H] = De[q] = De[W] = De[$] = De[J] = De[X] = De[Z] = De[de] = De[ge] = De[Oe] = De[ke] = !0, De[B] = De[j] = De[ue] = !1; + function Ne(Ce, Y, Q, ie, we, Ee) { + var Me, Ie = Y & O, Ye = Y & E, ot = Y & T; + if (Q && (Me = we ? Q(Ce, ie, we, Ee) : Q(Ce)), Me !== void 0) + return Me; if (!_(Ce)) return Ce; var mt = g(Ce); if (mt) { - if (De = d(Ce), !Ie) - return o(Ce, De); + if (Me = d(Ce), !Ie) + return o(Ce, Me); } else { var wt = f(Ce), Mt = wt == j || wt == z; if (y(Ce)) return a(Ce, Ie); if (wt == W || wt == P || Mt && !we) { - if (De = Ye || Mt ? {} : p(Ce), !Ie) - return Ye ? u(Ce, i(De, Ce)) : s(Ce, n(De, Ce)); + if (Me = Ye || Mt ? {} : p(Ce), !Ie) + return Ye ? u(Ce, i(Me, Ce)) : s(Ce, n(Me, Ce)); } else { - if (!Me[wt]) + if (!De[wt]) return we ? Ce : {}; - De = h(Ce, wt, Ie); + Me = h(Ce, wt, Ie); } } Ee || (Ee = new r()); var Dt = Ee.get(Ce); if (Dt) return Dt; - Ee.set(Ce, De), m(Ce) ? Ce.forEach(function(_e) { - De.add(Ne(_e, Y, Z, _e, Ce, Ee)); + Ee.set(Ce, Me), m(Ce) ? Ce.forEach(function(_e) { + Me.add(Ne(_e, Y, Q, _e, Ce, Ee)); }) : b(Ce) && Ce.forEach(function(_e, Ue) { - De.set(Ue, Ne(_e, Y, Z, Ue, Ce, Ee)); + Me.set(Ue, Ne(_e, Y, Q, Ue, Ce, Ee)); }); var vt = ot ? Ye ? c : l : Ye ? S : x, tt = mt ? void 0 : vt(Ce); return e(tt || Ce, function(_e, Ue) { - tt && (Ue = _e, _e = Ce[Ue]), t(De, Ue, Ne(_e, Y, Z, Ue, Ce, Ee)); - }), De; + tt && (Ue = _e, _e = Ce[Ue]), t(Me, Ue, Ne(_e, Y, Q, Ue, Ce, Ee)); + }), Me; } - return FC = Ne, FC; + return BC = Ne, BC; } -var UC, I4; -function Hre() { - if (I4) return UC; +var FC, I4; +function Wre() { + if (I4) return FC; I4 = 1; - var r = Vre(), e = 4; + var r = Hre(), e = 4; function t(n) { return r(n, e); } - return UC = t, UC; + return FC = t, FC; } -var zC, N4; +var UC, N4; function KU() { - if (N4) return zC; + if (N4) return UC; N4 = 1; function r(e) { return function() { return e; }; } - return zC = r, zC; + return UC = r, UC; } -var qC, L4; -function Wre() { - if (L4) return qC; +var zC, L4; +function Yre() { + if (L4) return zC; L4 = 1; function r(e) { return function(t, n, i) { @@ -40229,28 +40241,28 @@ function Wre() { return t; }; } - return qC = r, qC; + return zC = r, zC; } -var GC, j4; -function Yre() { - if (j4) return GC; +var qC, j4; +function Xre() { + if (j4) return qC; j4 = 1; - var r = Wre(), e = r(); - return GC = e, GC; + var r = Yre(), e = r(); + return qC = e, qC; } -var VC, B4; +var GC, B4; function ZU() { - if (B4) return VC; + if (B4) return GC; B4 = 1; - var r = Yre(), e = sy(); + var r = Xre(), e = sy(); function t(n, i) { return n && r(n, i, e); } - return VC = t, VC; + return GC = t, GC; } -var HC, F4; -function Xre() { - if (F4) return HC; +var VC, F4; +function $re() { + if (F4) return VC; F4 = 1; var r = oy(); function e(t, n) { @@ -40264,96 +40276,96 @@ function Xre() { return i; }; } - return HC = e, HC; + return VC = e, VC; } -var WC, U4; -function tE() { - if (U4) return WC; +var HC, U4; +function eE() { + if (U4) return HC; U4 = 1; - var r = ZU(), e = Xre(), t = e(r); - return WC = t, WC; + var r = ZU(), e = $re(), t = e(r); + return HC = t, HC; } -var YC, z4; -function rE() { - if (z4) return YC; +var WC, z4; +function tE() { + if (z4) return WC; z4 = 1; function r(e) { return e; } - return YC = r, YC; + return WC = r, WC; } -var XC, q4; -function $re() { - if (q4) return XC; +var YC, q4; +function Kre() { + if (q4) return YC; q4 = 1; - var r = rE(); + var r = tE(); function e(t) { return typeof t == "function" ? t : r; } - return XC = e, XC; + return YC = e, YC; } -var $C, G4; -function Kre() { - if (G4) return $C; +var XC, G4; +function Zre() { + if (G4) return XC; G4 = 1; - var r = pD(), e = tE(), t = $re(), n = Bs(); + var r = pD(), e = eE(), t = Kre(), n = Bs(); function i(a, o) { var s = n(a) ? r : e; return s(a, t(o)); } - return $C = i, $C; + return XC = i, XC; } -var KC, V4; -function Zre() { - return V4 || (V4 = 1, KC = Kre()), KC; -} -var ZC, H4; +var $C, V4; function Qre() { - if (H4) return ZC; + return V4 || (V4 = 1, $C = Zre()), $C; +} +var KC, H4; +function Jre() { + if (H4) return KC; H4 = 1; - var r = tE(); + var r = eE(); function e(t, n) { var i = []; return r(t, function(a, o, s) { n(a, o, s) && i.push(a); }), i; } - return ZC = e, ZC; + return KC = e, KC; } -var QC, W4; -function Jre() { - if (W4) return QC; +var ZC, W4; +function ene() { + if (W4) return ZC; W4 = 1; var r = "__lodash_hash_undefined__"; function e(t) { return this.__data__.set(t, r), this; } - return QC = e, QC; + return ZC = e, ZC; } -var JC, Y4; -function ene() { - if (Y4) return JC; +var QC, Y4; +function tne() { + if (Y4) return QC; Y4 = 1; function r(e) { return this.__data__.has(e); } - return JC = r, JC; + return QC = r, QC; } -var eA, X4; +var JC, X4; function QU() { - if (X4) return eA; + if (X4) return JC; X4 = 1; - var r = hD(), e = Jre(), t = ene(); + var r = hD(), e = ene(), t = tne(); function n(i) { var a = -1, o = i == null ? 0 : i.length; for (this.__data__ = new r(); ++a < o; ) this.add(i[a]); } - return n.prototype.add = n.prototype.push = e, n.prototype.has = t, eA = n, eA; + return n.prototype.add = n.prototype.push = e, n.prototype.has = t, JC = n, JC; } -var tA, $4; -function tne() { - if ($4) return tA; +var eA, $4; +function rne() { + if ($4) return eA; $4 = 1; function r(e, t) { for (var n = -1, i = e == null ? 0 : e.length; ++n < i; ) @@ -40361,22 +40373,22 @@ function tne() { return !0; return !1; } - return tA = r, tA; + return eA = r, eA; } -var rA, K4; +var tA, K4; function JU() { - if (K4) return rA; + if (K4) return tA; K4 = 1; function r(e, t) { return e.has(t); } - return rA = r, rA; + return tA = r, tA; } -var nA, Z4; +var rA, Z4; function ez() { - if (Z4) return nA; + if (Z4) return rA; Z4 = 1; - var r = QU(), e = tne(), t = JU(), n = 1, i = 2; + var r = QU(), e = rne(), t = JU(), n = 1, i = 2; function a(o, s, u, l, c, f) { var d = u & n, h = o.length, p = s.length; if (h != p && !(d && p > h)) @@ -40410,11 +40422,11 @@ function ez() { } return f.delete(o), f.delete(s), _; } - return nA = a, nA; + return rA = a, rA; } -var iA, Q4; -function rne() { - if (Q4) return iA; +var nA, Q4; +function nne() { + if (Q4) return nA; Q4 = 1; function r(e) { var t = -1, n = Array(e.size); @@ -40422,11 +40434,11 @@ function rne() { n[++t] = [a, i]; }), n; } - return iA = r, iA; + return nA = r, nA; } -var aA, J4; +var iA, J4; function OD() { - if (J4) return aA; + if (J4) return iA; J4 = 1; function r(e) { var t = -1, n = Array(e.size); @@ -40434,13 +40446,13 @@ function OD() { n[++t] = i; }), n; } - return aA = r, aA; + return iA = r, iA; } -var oA, ej; -function nne() { - if (ej) return oA; +var aA, ej; +function ine() { + if (ej) return aA; ej = 1; - var r = t0(), e = XU(), t = fD(), n = ez(), i = rne(), a = OD(), o = 1, s = 2, u = "[object Boolean]", l = "[object Date]", c = "[object Error]", f = "[object Map]", d = "[object Number]", h = "[object RegExp]", p = "[object Set]", g = "[object String]", y = "[object Symbol]", b = "[object ArrayBuffer]", _ = "[object DataView]", m = r ? r.prototype : void 0, x = m ? m.valueOf : void 0; + var r = t0(), e = XU(), t = fD(), n = ez(), i = nne(), a = OD(), o = 1, s = 2, u = "[object Boolean]", l = "[object Date]", c = "[object Error]", f = "[object Map]", d = "[object Number]", h = "[object RegExp]", p = "[object Set]", g = "[object String]", y = "[object Symbol]", b = "[object ArrayBuffer]", _ = "[object DataView]", m = r ? r.prototype : void 0, x = m ? m.valueOf : void 0; function S(O, E, T, P, I, k, L) { switch (T) { case _: @@ -40476,11 +40488,11 @@ function nne() { } return !1; } - return oA = S, oA; + return aA = S, aA; } -var sA, tj; -function ine() { - if (tj) return sA; +var oA, tj; +function ane() { + if (tj) return oA; tj = 1; var r = WU(), e = 1, t = Object.prototype, n = t.hasOwnProperty; function i(a, o, s, u, l, c) { @@ -40514,13 +40526,13 @@ function ine() { } return c.delete(a), c.delete(o), x; } - return sA = i, sA; + return oA = i, oA; } -var uA, rj; -function ane() { - if (rj) return uA; +var sA, rj; +function one() { + if (rj) return sA; rj = 1; - var r = vD(), e = ez(), t = nne(), n = ine(), i = n0(), a = Bs(), o = r_(), s = J2(), u = 1, l = "[object Arguments]", c = "[object Array]", f = "[object Object]", d = Object.prototype, h = d.hasOwnProperty; + var r = vD(), e = ez(), t = ine(), n = ane(), i = n0(), a = Bs(), o = r_(), s = Q2(), u = 1, l = "[object Arguments]", c = "[object Array]", f = "[object Object]", d = Object.prototype, h = d.hasOwnProperty; function p(g, y, b, _, m, x) { var S = a(g), O = a(y), E = S ? c : i(g), T = O ? c : i(y); E = E == l ? f : E, T = T == l ? f : T; @@ -40541,21 +40553,21 @@ function ane() { } return k ? (x || (x = new r()), n(g, y, b, _, m, x)) : !1; } - return uA = p, uA; + return sA = p, sA; } -var lA, nj; +var uA, nj; function tz() { - if (nj) return lA; + if (nj) return uA; nj = 1; - var r = ane(), e = xv(); + var r = one(), e = xv(); function t(n, i, a, o, s) { return n === i ? !0 : n == null || i == null || !e(n) && !e(i) ? n !== n && i !== i : r(n, i, a, o, t, s); } - return lA = t, lA; + return uA = t, uA; } -var cA, ij; -function one() { - if (ij) return cA; +var lA, ij; +function sne() { + if (ij) return lA; ij = 1; var r = vD(), e = tz(), t = 1, n = 2; function i(a, o, s, u) { @@ -40583,21 +40595,21 @@ function one() { } return !0; } - return cA = i, cA; + return lA = i, lA; } -var fA, aj; +var cA, aj; function rz() { - if (aj) return fA; + if (aj) return cA; aj = 1; var r = iy(); function e(t) { return t === t && !r(t); } - return fA = e, fA; + return cA = e, cA; } -var dA, oj; -function sne() { - if (oj) return dA; +var fA, oj; +function une() { + if (oj) return fA; oj = 1; var r = rz(), e = sy(); function t(n) { @@ -40607,45 +40619,45 @@ function sne() { } return i; } - return dA = t, dA; + return fA = t, fA; } -var hA, sj; +var dA, sj; function nz() { - if (sj) return hA; + if (sj) return dA; sj = 1; function r(e, t) { return function(n) { return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n)); }; } - return hA = r, hA; + return dA = r, dA; } -var vA, uj; -function une() { - if (uj) return vA; +var hA, uj; +function lne() { + if (uj) return hA; uj = 1; - var r = one(), e = sne(), t = nz(); + var r = sne(), e = une(), t = nz(); function n(i) { var a = e(i); return a.length == 1 && a[0][2] ? t(a[0][0], a[0][1]) : function(o) { return o === i || r(o, i, a); }; } - return vA = n, vA; + return hA = n, hA; } -var pA, lj; +var vA, lj; function TD() { - if (lj) return pA; + if (lj) return vA; lj = 1; var r = r0(), e = xv(), t = "[object Symbol]"; function n(i) { return typeof i == "symbol" || e(i) && r(i) == t; } - return pA = n, pA; + return vA = n, vA; } -var gA, cj; +var pA, cj; function CD() { - if (cj) return gA; + if (cj) return pA; cj = 1; var r = Bs(), e = TD(), t = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/; function i(a, o) { @@ -40654,11 +40666,11 @@ function CD() { var s = typeof a; return s == "number" || s == "symbol" || s == "boolean" || a == null || e(a) ? !0 : n.test(a) || !t.test(a) || o != null && a in Object(o); } - return gA = i, gA; + return pA = i, pA; } -var yA, fj; -function lne() { - if (fj) return yA; +var gA, fj; +function cne() { + if (fj) return gA; fj = 1; var r = hD(), e = "Expected a function"; function t(n, i) { @@ -40673,47 +40685,47 @@ function lne() { }; return a.cache = new (t.Cache || r)(), a; } - return t.Cache = r, yA = t, yA; + return t.Cache = r, gA = t, gA; } -var mA, dj; -function cne() { - if (dj) return mA; +var yA, dj; +function fne() { + if (dj) return yA; dj = 1; - var r = lne(), e = 500; + var r = cne(), e = 500; function t(n) { var i = r(n, function(o) { return a.size === e && a.clear(), o; }), a = i.cache; return i; } - return mA = t, mA; + return yA = t, yA; } -var bA, hj; -function fne() { - if (hj) return bA; +var mA, hj; +function dne() { + if (hj) return mA; hj = 1; - var r = cne(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, t = /\\(\\)?/g, n = r(function(i) { + var r = fne(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, t = /\\(\\)?/g, n = r(function(i) { var a = []; return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(o, s, u, l) { a.push(u ? l.replace(t, "$1") : s || o); }), a; }); - return bA = n, bA; + return mA = n, mA; } -var _A, vj; +var bA, vj; function AD() { - if (vj) return _A; + if (vj) return bA; vj = 1; function r(e, t) { for (var n = -1, i = e == null ? 0 : e.length, a = Array(i); ++n < i; ) a[n] = t(e[n], n, e); return a; } - return _A = r, _A; + return bA = r, bA; } -var wA, pj; -function dne() { - if (pj) return wA; +var _A, pj; +function hne() { + if (pj) return _A; pj = 1; var r = t0(), e = AD(), t = Bs(), n = TD(), i = r ? r.prototype : void 0, a = i ? i.toString : void 0; function o(s) { @@ -40726,31 +40738,31 @@ function dne() { var u = s + ""; return u == "0" && 1 / s == -1 / 0 ? "-0" : u; } - return wA = o, wA; + return _A = o, _A; } -var xA, gj; -function hne() { - if (gj) return xA; +var wA, gj; +function vne() { + if (gj) return wA; gj = 1; - var r = dne(); + var r = hne(); function e(t) { return t == null ? "" : r(t); } - return xA = e, xA; + return wA = e, wA; } -var EA, yj; +var xA, yj; function iz() { - if (yj) return EA; + if (yj) return xA; yj = 1; - var r = Bs(), e = CD(), t = fne(), n = hne(); + var r = Bs(), e = CD(), t = dne(), n = vne(); function i(a, o) { return r(a) ? a : e(a, o) ? [a] : t(n(a)); } - return EA = i, EA; + return xA = i, xA; } -var SA, mj; -function nE() { - if (mj) return SA; +var EA, mj; +function rE() { + if (mj) return EA; mj = 1; var r = TD(); function e(t) { @@ -40759,46 +40771,46 @@ function nE() { var n = t + ""; return n == "0" && 1 / t == -1 / 0 ? "-0" : n; } - return SA = e, SA; + return EA = e, EA; } -var OA, bj; +var SA, bj; function az() { - if (bj) return OA; + if (bj) return SA; bj = 1; - var r = iz(), e = nE(); + var r = iz(), e = rE(); function t(n, i) { i = r(i, n); for (var a = 0, o = i.length; n != null && a < o; ) n = n[e(i[a++])]; return a && a == o ? n : void 0; } - return OA = t, OA; + return SA = t, SA; } -var TA, _j; -function vne() { - if (_j) return TA; +var OA, _j; +function pne() { + if (_j) return OA; _j = 1; var r = az(); function e(t, n, i) { var a = t == null ? void 0 : r(t, n); return a === void 0 ? i : a; } - return TA = e, TA; + return OA = e, OA; } -var CA, wj; -function pne() { - if (wj) return CA; +var TA, wj; +function gne() { + if (wj) return TA; wj = 1; function r(e, t) { return e != null && t in Object(e); } - return CA = r, CA; + return TA = r, TA; } -var AA, xj; +var CA, xj; function oz() { - if (xj) return AA; + if (xj) return CA; xj = 1; - var r = iz(), e = Q2(), t = Bs(), n = FU(), i = gD(), a = nE(); + var r = iz(), e = Z2(), t = Bs(), n = FU(), i = gD(), a = rE(); function o(s, u, l) { u = r(u, s); for (var c = -1, f = u.length, d = !1; ++c < f; ) { @@ -40809,45 +40821,45 @@ function oz() { } return d || ++c != f ? d : (f = s == null ? 0 : s.length, !!f && i(f) && n(h, f) && (t(s) || e(s))); } - return AA = o, AA; + return CA = o, CA; } -var RA, Ej; -function gne() { - if (Ej) return RA; +var AA, Ej; +function yne() { + if (Ej) return AA; Ej = 1; - var r = pne(), e = oz(); + var r = gne(), e = oz(); function t(n, i) { return n != null && e(n, i, r); } - return RA = t, RA; + return AA = t, AA; } -var PA, Sj; -function yne() { - if (Sj) return PA; +var RA, Sj; +function mne() { + if (Sj) return RA; Sj = 1; - var r = tz(), e = vne(), t = gne(), n = CD(), i = rz(), a = nz(), o = nE(), s = 1, u = 2; + var r = tz(), e = pne(), t = yne(), n = CD(), i = rz(), a = nz(), o = rE(), s = 1, u = 2; function l(c, f) { return n(c) && i(f) ? a(o(c), f) : function(d) { var h = e(d, c); return h === void 0 && h === f ? t(d, c) : r(f, h, s | u); }; } - return PA = l, PA; + return RA = l, RA; } -var MA, Oj; +var PA, Oj; function sz() { - if (Oj) return MA; + if (Oj) return PA; Oj = 1; function r(e) { return function(t) { return t == null ? void 0 : t[e]; }; } - return MA = r, MA; + return PA = r, PA; } -var DA, Tj; -function mne() { - if (Tj) return DA; +var MA, Tj; +function bne() { + if (Tj) return MA; Tj = 1; var r = az(); function e(t) { @@ -40855,64 +40867,64 @@ function mne() { return r(n, t); }; } - return DA = e, DA; + return MA = e, MA; } -var kA, Cj; -function bne() { - if (Cj) return kA; +var DA, Cj; +function _ne() { + if (Cj) return DA; Cj = 1; - var r = sz(), e = mne(), t = CD(), n = nE(); + var r = sz(), e = bne(), t = CD(), n = rE(); function i(a) { return t(a) ? r(n(a)) : e(a); } - return kA = i, kA; + return DA = i, DA; } -var IA, Aj; -function iE() { - if (Aj) return IA; +var kA, Aj; +function nE() { + if (Aj) return kA; Aj = 1; - var r = une(), e = yne(), t = rE(), n = Bs(), i = bne(); + var r = lne(), e = mne(), t = tE(), n = Bs(), i = _ne(); function a(o) { return typeof o == "function" ? o : o == null ? t : typeof o == "object" ? n(o) ? e(o[0], o[1]) : r(o) : i(o); } - return IA = a, IA; + return kA = a, kA; } -var NA, Rj; -function _ne() { - if (Rj) return NA; +var IA, Rj; +function wne() { + if (Rj) return IA; Rj = 1; - var r = qU(), e = Qre(), t = iE(), n = Bs(); + var r = qU(), e = Jre(), t = nE(), n = Bs(); function i(a, o) { var s = n(a) ? r : e; return s(a, t(o, 3)); } - return NA = i, NA; + return IA = i, IA; } -var LA, Pj; -function wne() { - if (Pj) return LA; +var NA, Pj; +function xne() { + if (Pj) return NA; Pj = 1; var r = Object.prototype, e = r.hasOwnProperty; function t(n, i) { return n != null && e.call(n, i); } - return LA = t, LA; + return NA = t, NA; } -var jA, Mj; -function xne() { - if (Mj) return jA; +var LA, Mj; +function Ene() { + if (Mj) return LA; Mj = 1; - var r = wne(), e = oz(); + var r = xne(), e = oz(); function t(n, i) { return n != null && e(n, i, r); } - return jA = t, jA; + return LA = t, LA; } -var BA, Dj; -function Ene() { - if (Dj) return BA; +var jA, Dj; +function Sne() { + if (Dj) return jA; Dj = 1; - var r = bD(), e = n0(), t = Q2(), n = Bs(), i = oy(), a = r_(), o = eE(), s = J2(), u = "[object Map]", l = "[object Set]", c = Object.prototype, f = c.hasOwnProperty; + var r = bD(), e = n0(), t = Z2(), n = Bs(), i = oy(), a = r_(), o = J2(), s = Q2(), u = "[object Map]", l = "[object Set]", c = Object.prototype, f = c.hasOwnProperty; function d(h) { if (h == null) return !0; @@ -40928,44 +40940,44 @@ function Ene() { return !1; return !0; } - return BA = d, BA; + return jA = d, jA; } -var FA, kj; -function Sne() { - if (kj) return FA; +var BA, kj; +function One() { + if (kj) return BA; kj = 1; function r(e) { return e === void 0; } - return FA = r, FA; + return BA = r, BA; } -var UA, Ij; -function One() { - if (Ij) return UA; +var FA, Ij; +function Tne() { + if (Ij) return FA; Ij = 1; - var r = tE(), e = oy(); + var r = eE(), e = oy(); function t(n, i) { var a = -1, o = e(n) ? Array(n.length) : []; return r(n, function(s, u, l) { o[++a] = i(s, u, l); }), o; } - return UA = t, UA; + return FA = t, FA; } -var zA, Nj; -function Tne() { - if (Nj) return zA; +var UA, Nj; +function Cne() { + if (Nj) return UA; Nj = 1; - var r = AD(), e = iE(), t = One(), n = Bs(); + var r = AD(), e = nE(), t = Tne(), n = Bs(); function i(a, o) { var s = n(a) ? r : t; return s(a, e(o, 3)); } - return zA = i, zA; + return UA = i, UA; } -var qA, Lj; -function Cne() { - if (Lj) return qA; +var zA, Lj; +function Ane() { + if (Lj) return zA; Lj = 1; function r(e, t, n, i) { var a = -1, o = e == null ? 0 : e.length; @@ -40973,60 +40985,60 @@ function Cne() { n = t(n, e[a], a, e); return n; } - return qA = r, qA; + return zA = r, zA; } -var GA, jj; -function Ane() { - if (jj) return GA; +var qA, jj; +function Rne() { + if (jj) return qA; jj = 1; function r(e, t, n, i, a) { return a(e, function(o, s, u) { n = i ? (i = !1, o) : t(n, o, s, u); }), n; } - return GA = r, GA; + return qA = r, qA; } -var VA, Bj; -function Rne() { - if (Bj) return VA; +var GA, Bj; +function Pne() { + if (Bj) return GA; Bj = 1; - var r = Cne(), e = tE(), t = iE(), n = Ane(), i = Bs(); + var r = Ane(), e = eE(), t = nE(), n = Rne(), i = Bs(); function a(o, s, u) { var l = i(o) ? r : n, c = arguments.length < 3; return l(o, t(s, 4), u, c, e); } - return VA = a, VA; + return GA = a, GA; } -var HA, Fj; -function Pne() { - if (Fj) return HA; +var VA, Fj; +function Mne() { + if (Fj) return VA; Fj = 1; var r = r0(), e = Bs(), t = xv(), n = "[object String]"; function i(a) { return typeof a == "string" || !e(a) && t(a) && r(a) == n; } - return HA = i, HA; + return VA = i, VA; } -var WA, Uj; -function Mne() { - if (Uj) return WA; +var HA, Uj; +function Dne() { + if (Uj) return HA; Uj = 1; var r = sz(), e = r("length"); - return WA = e, WA; + return HA = e, HA; } -var YA, zj; -function Dne() { - if (zj) return YA; +var WA, zj; +function kne() { + if (zj) return WA; zj = 1; var r = "\\ud800-\\udfff", e = "\\u0300-\\u036f", t = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + t + n, a = "\\ufe0e\\ufe0f", o = "\\u200d", s = RegExp("[" + o + r + i + a + "]"); function u(l) { return s.test(l); } - return YA = u, YA; + return WA = u, WA; } -var XA, qj; -function kne() { - if (qj) return XA; +var YA, qj; +function Ine() { + if (qj) return YA; qj = 1; var r = "\\ud800-\\udfff", e = "\\u0300-\\u036f", t = "\\ufe20-\\ufe2f", n = "\\u20d0-\\u20ff", i = e + t + n, a = "\\ufe0e\\ufe0f", o = "[" + r + "]", s = "[" + i + "]", u = "\\ud83c[\\udffb-\\udfff]", l = "(?:" + s + "|" + u + ")", c = "[^" + r + "]", f = "(?:\\ud83c[\\udde6-\\uddff]){2}", d = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "\\u200d", p = l + "?", g = "[" + a + "]?", y = "(?:" + h + "(?:" + [c, f, d].join("|") + ")" + g + p + ")*", b = g + p + y, _ = "(?:" + [c + s + "?", s, f, d, o].join("|") + ")", m = RegExp(u + "(?=" + u + ")|" + _ + b, "g"); function x(S) { @@ -41034,23 +41046,23 @@ function kne() { ++O; return O; } - return XA = x, XA; + return YA = x, YA; } -var $A, Gj; -function Ine() { - if (Gj) return $A; +var XA, Gj; +function Nne() { + if (Gj) return XA; Gj = 1; - var r = Mne(), e = Dne(), t = kne(); + var r = Dne(), e = kne(), t = Ine(); function n(i) { return e(i) ? t(i) : r(i); } - return $A = n, $A; + return XA = n, XA; } -var KA, Vj; -function Nne() { - if (Vj) return KA; +var $A, Vj; +function Lne() { + if (Vj) return $A; Vj = 1; - var r = bD(), e = n0(), t = oy(), n = Pne(), i = Ine(), a = "[object Map]", o = "[object Set]"; + var r = bD(), e = n0(), t = oy(), n = Mne(), i = Nne(), a = "[object Map]", o = "[object Set]"; function s(u) { if (u == null) return 0; @@ -41059,13 +41071,13 @@ function Nne() { var l = e(u); return l == a || l == o ? u.size : r(u).length; } - return KA = s, KA; + return $A = s, $A; } -var ZA, Hj; -function Lne() { - if (Hj) return ZA; +var KA, Hj; +function jne() { + if (Hj) return KA; Hj = 1; - var r = pD(), e = $U(), t = ZU(), n = iE(), i = ED(), a = Bs(), o = r_(), s = X2(), u = iy(), l = J2(); + var r = pD(), e = $U(), t = ZU(), n = nE(), i = ED(), a = Bs(), o = r_(), s = Y2(), u = iy(), l = Q2(); function c(f, d, h) { var p = a(f), g = p || o(f) || l(f); if (d = n(d, 4), h == null) { @@ -41076,23 +41088,23 @@ function Lne() { return d(h, b, _, m); }), h; } - return ZA = c, ZA; + return KA = c, KA; } -var QA, Wj; -function jne() { - if (Wj) return QA; +var ZA, Wj; +function Bne() { + if (Wj) return ZA; Wj = 1; - var r = t0(), e = Q2(), t = Bs(), n = r ? r.isConcatSpreadable : void 0; + var r = t0(), e = Z2(), t = Bs(), n = r ? r.isConcatSpreadable : void 0; function i(a) { return t(a) || e(a) || !!(n && a && a[n]); } - return QA = i, QA; + return ZA = i, ZA; } -var JA, Yj; -function Bne() { - if (Yj) return JA; +var QA, Yj; +function Fne() { + if (Yj) return QA; Yj = 1; - var r = xD(), e = jne(); + var r = xD(), e = Bne(); function t(n, i, a, o, s) { var u = -1, l = n.length; for (a || (a = e), s || (s = []); ++u < l; ) { @@ -41101,11 +41113,11 @@ function Bne() { } return s; } - return JA = t, JA; + return QA = t, QA; } -var eR, Xj; -function Fne() { - if (Xj) return eR; +var JA, Xj; +function Une() { + if (Xj) return JA; Xj = 1; function r(e, t, n) { switch (n.length) { @@ -41120,13 +41132,13 @@ function Fne() { } return e.apply(t, n); } - return eR = r, eR; + return JA = r, JA; } -var tR, $j; -function Une() { - if ($j) return tR; +var eR, $j; +function zne() { + if ($j) return eR; $j = 1; - var r = Fne(), e = Math.max; + var r = Une(), e = Math.max; function t(n, i, a) { return i = e(i === void 0 ? n.length - 1 : i, 0), function() { for (var o = arguments, s = -1, u = e(o.length - i, 0), l = Array(u); ++s < u; ) @@ -41137,13 +41149,13 @@ function Une() { return c[i] = a(l), r(n, this, c); }; } - return tR = t, tR; + return eR = t, eR; } -var rR, Kj; -function zne() { - if (Kj) return rR; +var tR, Kj; +function qne() { + if (Kj) return tR; Kj = 1; - var r = KU(), e = LU(), t = rE(), n = e ? function(i, a) { + var r = KU(), e = LU(), t = tE(), n = e ? function(i, a) { return e(i, "toString", { configurable: !0, enumerable: !1, @@ -41151,11 +41163,11 @@ function zne() { writable: !0 }); } : t; - return rR = n, rR; + return tR = n, tR; } -var nR, Zj; -function qne() { - if (Zj) return nR; +var rR, Zj; +function Gne() { + if (Zj) return rR; Zj = 1; var r = 800, e = 16, t = Date.now; function n(i) { @@ -41170,28 +41182,28 @@ function qne() { return i.apply(void 0, arguments); }; } - return nR = n, nR; + return rR = n, rR; } -var iR, Qj; -function Gne() { - if (Qj) return iR; +var nR, Qj; +function Vne() { + if (Qj) return nR; Qj = 1; - var r = zne(), e = qne(), t = e(r); - return iR = t, iR; + var r = qne(), e = Gne(), t = e(r); + return nR = t, nR; } -var aR, Jj; -function Vne() { - if (Jj) return aR; +var iR, Jj; +function Hne() { + if (Jj) return iR; Jj = 1; - var r = rE(), e = Une(), t = Gne(); + var r = tE(), e = zne(), t = Vne(); function n(i, a) { return t(e(i, a, r), i + ""); } - return aR = n, aR; + return iR = n, iR; } -var oR, e6; -function Hne() { - if (e6) return oR; +var aR, e6; +function Wne() { + if (e6) return aR; e6 = 1; function r(e, t, n, i) { for (var a = e.length, o = n + (i ? 1 : -1); i ? o-- : ++o < a; ) @@ -41199,20 +41211,20 @@ function Hne() { return o; return -1; } - return oR = r, oR; + return aR = r, aR; } -var sR, t6; -function Wne() { - if (t6) return sR; +var oR, t6; +function Yne() { + if (t6) return oR; t6 = 1; function r(e) { return e !== e; } - return sR = r, sR; + return oR = r, oR; } -var uR, r6; -function Yne() { - if (r6) return uR; +var sR, r6; +function Xne() { + if (r6) return sR; r6 = 1; function r(e, t, n) { for (var i = n - 1, a = e.length; ++i < a; ) @@ -41220,32 +41232,32 @@ function Yne() { return i; return -1; } - return uR = r, uR; + return sR = r, sR; } -var lR, n6; -function Xne() { - if (n6) return lR; +var uR, n6; +function $ne() { + if (n6) return uR; n6 = 1; - var r = Hne(), e = Wne(), t = Yne(); + var r = Wne(), e = Yne(), t = Xne(); function n(i, a, o) { return a === a ? t(i, a, o) : r(i, e, o); } - return lR = n, lR; + return uR = n, uR; } -var cR, i6; -function $ne() { - if (i6) return cR; +var lR, i6; +function Kne() { + if (i6) return lR; i6 = 1; - var r = Xne(); + var r = $ne(); function e(t, n) { var i = t == null ? 0 : t.length; return !!i && r(t, n, 0) > -1; } - return cR = e, cR; + return lR = e, lR; } -var fR, a6; -function Kne() { - if (a6) return fR; +var cR, a6; +function Zne() { + if (a6) return cR; a6 = 1; function r(e, t, n) { for (var i = -1, a = e == null ? 0 : e.length; ++i < a; ) @@ -41253,30 +41265,30 @@ function Kne() { return !0; return !1; } - return fR = r, fR; + return cR = r, cR; } -var dR, o6; -function Zne() { - if (o6) return dR; +var fR, o6; +function Qne() { + if (o6) return fR; o6 = 1; function r() { } - return dR = r, dR; + return fR = r, fR; } -var hR, s6; -function Qne() { - if (s6) return hR; +var dR, s6; +function Jne() { + if (s6) return dR; s6 = 1; - var r = YU(), e = Zne(), t = OD(), n = 1 / 0, i = r && 1 / t(new r([, -0]))[1] == n ? function(a) { + var r = YU(), e = Qne(), t = OD(), n = 1 / 0, i = r && 1 / t(new r([, -0]))[1] == n ? function(a) { return new r(a); } : e; - return hR = i, hR; + return dR = i, dR; } -var vR, u6; -function Jne() { - if (u6) return vR; +var hR, u6; +function eie() { + if (u6) return hR; u6 = 1; - var r = QU(), e = $ne(), t = Kne(), n = JU(), i = Qne(), a = OD(), o = 200; + var r = QU(), e = Kne(), t = Zne(), n = JU(), i = Jne(), a = OD(), o = 200; function s(u, l, c) { var f = -1, d = e, h = u.length, p = !0, g = [], y = g; if (c) @@ -41300,30 +41312,30 @@ function Jne() { } return g; } - return vR = s, vR; + return hR = s, hR; } -var pR, l6; -function eie() { - if (l6) return pR; +var vR, l6; +function tie() { + if (l6) return vR; l6 = 1; var r = oy(), e = xv(); function t(n) { return e(n) && r(n); } - return pR = t, pR; + return vR = t, vR; } -var gR, c6; -function tie() { - if (c6) return gR; +var pR, c6; +function rie() { + if (c6) return pR; c6 = 1; - var r = Bne(), e = Vne(), t = Jne(), n = eie(), i = e(function(a) { + var r = Fne(), e = Hne(), t = eie(), n = tie(), i = e(function(a) { return t(r(a, 1, n, !0)); }); - return gR = i, gR; + return pR = i, pR; } -var yR, f6; -function rie() { - if (f6) return yR; +var gR, f6; +function nie() { + if (f6) return gR; f6 = 1; var r = AD(); function e(t, n) { @@ -41331,53 +41343,53 @@ function rie() { return t[i]; }); } - return yR = e, yR; + return gR = e, gR; } -var mR, d6; -function nie() { - if (d6) return mR; +var yR, d6; +function iie() { + if (d6) return yR; d6 = 1; - var r = rie(), e = sy(); + var r = nie(), e = sy(); function t(n) { return n == null ? [] : r(n, e(n)); } - return mR = t, mR; + return yR = t, yR; } -var bR, h6; +var mR, h6; function qf() { - if (h6) return bR; + if (h6) return mR; h6 = 1; var r; - if (typeof zte == "function") + if (typeof qte == "function") try { r = { - clone: Hre(), + clone: Wre(), constant: KU(), - each: Zre(), - filter: _ne(), - has: xne(), + each: Qre(), + filter: wne(), + has: Ene(), isArray: Bs(), - isEmpty: Ene(), - isFunction: X2(), - isUndefined: Sne(), + isEmpty: Sne(), + isFunction: Y2(), + isUndefined: One(), keys: sy(), - map: Tne(), - reduce: Rne(), - size: Nne(), - transform: Lne(), - union: tie(), - values: nie() + map: Cne(), + reduce: Pne(), + size: Lne(), + transform: jne(), + union: rie(), + values: iie() }; } catch { } - return r || (r = window._), bR = r, bR; + return r || (r = window._), mR = r, mR; } -var _R, v6; +var bR, v6; function RD() { - if (v6) return _R; + if (v6) return bR; v6 = 1; var r = qf(); - _R = i; + bR = i; var e = "\0", t = "\0", n = ""; function i(c) { this._isDirected = r.has(c, "directed") ? c.directed : !0, this._isMultigraph = r.has(c, "multigraph") ? c.multigraph : !1, this._isCompound = r.has(c, "compound") ? c.compound : !1, 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[t] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {}; @@ -41576,25 +41588,25 @@ function RD() { function l(c, f) { return s(c, f.v, f.w, f.name); } - return _R; + return bR; } -var wR, p6; -function iie() { - return p6 || (p6 = 1, wR = "2.1.8"), wR; -} -var xR, g6; +var _R, p6; function aie() { - return g6 || (g6 = 1, xR = { - Graph: RD(), - version: iie() - }), xR; + return p6 || (p6 = 1, _R = "2.1.8"), _R; } -var ER, y6; +var wR, g6; function oie() { - if (y6) return ER; + return g6 || (g6 = 1, wR = { + Graph: RD(), + version: aie() + }), wR; +} +var xR, y6; +function sie() { + if (y6) return xR; y6 = 1; var r = qf(), e = RD(); - ER = { + xR = { write: t, read: a }; @@ -41630,14 +41642,14 @@ function oie() { s.setEdge({ v: u.v, w: u.w, name: u.name }, u.value); }), s; } - return ER; + return xR; } -var SR, m6; -function sie() { - if (m6) return SR; +var ER, m6; +function uie() { + if (m6) return ER; m6 = 1; var r = qf(); - SR = e; + ER = e; function e(t) { var n = {}, i = [], a; function o(s) { @@ -41647,14 +41659,14 @@ function sie() { a = [], o(s), a.length && i.push(a); }), i; } - return SR; + return ER; } -var OR, b6; +var SR, b6; function uz() { - if (b6) return OR; + if (b6) return SR; b6 = 1; var r = qf(); - OR = e; + SR = e; function e() { this._arr = [], this._keyIndices = {}; } @@ -41699,14 +41711,14 @@ function uz() { }, e.prototype._swap = function(t, n) { var i = this._arr, a = this._keyIndices, o = i[t], s = i[n]; i[t] = s, i[n] = o, a[s.key] = t, a[o.key] = n; - }, OR; + }, SR; } -var TR, _6; +var OR, _6; function lz() { - if (_6) return TR; + if (_6) return OR; _6 = 1; var r = qf(), e = uz(); - TR = n; + OR = n; var t = r.constant(1); function n(a, o, s, u) { return i( @@ -41732,27 +41744,27 @@ function lz() { u(f).forEach(h); return l; } - return TR; + return OR; } -var CR, w6; -function uie() { - if (w6) return CR; +var TR, w6; +function lie() { + if (w6) return TR; w6 = 1; var r = lz(), e = qf(); - CR = t; + TR = t; function t(n, i, a) { return e.transform(n.nodes(), function(o, s) { o[s] = r(n, s, i, a); }, {}); } - return CR; + return TR; } -var AR, x6; +var CR, x6; function cz() { - if (x6) return AR; + if (x6) return CR; x6 = 1; var r = qf(); - AR = e; + CR = e; function e(t) { var n = 0, i = [], a = {}, o = []; function s(u) { @@ -41775,27 +41787,27 @@ function cz() { r.has(a, u) || s(u); }), o; } - return AR; + return CR; } -var RR, E6; -function lie() { - if (E6) return RR; +var AR, E6; +function cie() { + if (E6) return AR; E6 = 1; var r = qf(), e = cz(); - RR = t; + AR = t; function t(n) { return r.filter(e(n), function(i) { return i.length > 1 || i.length === 1 && n.hasEdge(i[0], i[0]); }); } - return RR; + return AR; } -var PR, S6; -function cie() { - if (S6) return PR; +var RR, S6; +function fie() { + if (S6) return RR; S6 = 1; var r = qf(); - PR = t; + RR = t; var e = r.constant(1); function t(i, a, o) { return n( @@ -41826,14 +41838,14 @@ function cie() { }); }), s; } - return PR; + return RR; } -var MR, O6; +var PR, O6; function fz() { - if (O6) return MR; + if (O6) return PR; O6 = 1; var r = qf(); - MR = e, e.CycleException = t; + PR = e, e.CycleException = t; function e(n) { var i = {}, a = {}, o = []; function s(u) { @@ -41847,14 +41859,14 @@ function fz() { } function t() { } - return t.prototype = new Error(), MR; + return t.prototype = new Error(), PR; } -var DR, T6; -function fie() { - if (T6) return DR; +var MR, T6; +function die() { + if (T6) return MR; T6 = 1; var r = fz(); - DR = e; + MR = e; function e(t) { try { r(t); @@ -41865,14 +41877,14 @@ function fie() { } return !0; } - return DR; + return MR; } -var kR, C6; +var DR, C6; function dz() { - if (C6) return kR; + if (C6) return DR; C6 = 1; var r = qf(); - kR = e; + DR = e; function e(n, i, a) { r.isArray(i) || (i = [i]); var o = (n.isDirected() ? n.successors : n.neighbors).bind(n), s = [], u = {}; @@ -41887,36 +41899,36 @@ function dz() { t(n, l, a, o, s, u); }), a && u.push(i)); } - return kR; + return DR; } -var IR, A6; -function die() { - if (A6) return IR; +var kR, A6; +function hie() { + if (A6) return kR; A6 = 1; var r = dz(); - IR = e; + kR = e; function e(t, n) { return r(t, n, "post"); } - return IR; + return kR; } -var NR, R6; -function hie() { - if (R6) return NR; +var IR, R6; +function vie() { + if (R6) return IR; R6 = 1; var r = dz(); - NR = e; + IR = e; function e(t, n) { return r(t, n, "pre"); } - return NR; + return IR; } -var LR, P6; -function vie() { - if (P6) return LR; +var NR, P6; +function pie() { + if (P6) return NR; P6 = 1; var r = qf(), e = RD(), t = uz(); - LR = n; + NR = n; function n(i, a) { var o = new e(), s = {}, u = new t(), l; function c(d) { @@ -41943,35 +41955,35 @@ function vie() { } return o; } - return LR; + return NR; } -var jR, M6; -function pie() { - return M6 || (M6 = 1, jR = { - components: sie(), +var LR, M6; +function gie() { + return M6 || (M6 = 1, LR = { + components: uie(), dijkstra: lz(), - dijkstraAll: uie(), - findCycles: lie(), - floydWarshall: cie(), - isAcyclic: fie(), - postorder: die(), - preorder: hie(), - prim: vie(), + dijkstraAll: lie(), + findCycles: cie(), + floydWarshall: fie(), + isAcyclic: die(), + postorder: hie(), + preorder: vie(), + prim: pie(), tarjan: cz(), topsort: fz() - }), jR; + }), LR; } -var BR, D6; +var jR, D6; function Uf() { - if (D6) return BR; + if (D6) return jR; D6 = 1; - var r = aie(); - return BR = { + var r = oie(); + return jR = { Graph: r.Graph, - json: oie(), - alg: pie(), + json: sie(), + alg: gie(), version: r.version - }, BR; + }, jR; } var mb = { exports: {} }; /** @@ -41982,11 +41994,11 @@ var mb = { exports: {} }; * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ -var gie = mb.exports, k6; +var yie = mb.exports, k6; function Sa() { return k6 || (k6 = 1, (function(r, e) { (function() { - var t, n = "4.17.23", i = 200, a = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", s = "Invalid `variable` option passed into `_.template`", u = "__lodash_hash_undefined__", l = 500, c = "__lodash_placeholder__", f = 1, d = 2, h = 4, p = 1, g = 2, y = 1, b = 2, _ = 4, m = 8, x = 16, S = 32, O = 64, E = 128, T = 256, P = 512, I = 30, k = "...", L = 800, B = 16, j = 1, z = 2, H = 3, q = 1 / 0, W = 9007199254740991, $ = 17976931348623157e292, J = NaN, X = 4294967295, Q = X - 1, ue = X >>> 1, re = [ + var t, n = "4.17.23", i = 200, a = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", s = "Invalid `variable` option passed into `_.template`", u = "__lodash_hash_undefined__", l = 500, c = "__lodash_placeholder__", f = 1, d = 2, h = 4, p = 1, g = 2, y = 1, b = 2, _ = 4, m = 8, x = 16, S = 32, O = 64, E = 128, T = 256, P = 512, I = 30, k = "...", L = 800, B = 16, j = 1, z = 2, H = 3, q = 1 / 0, W = 9007199254740991, $ = 17976931348623157e292, J = NaN, X = 4294967295, Z = X - 1, ue = X >>> 1, re = [ ["ary", E], ["bind", y], ["bindKey", b], @@ -41996,7 +42008,7 @@ function Sa() { ["partial", S], ["partialRight", O], ["rearg", T] - ], ne = "[object Arguments]", le = "[object Array]", ce = "[object AsyncFunction]", pe = "[object Boolean]", fe = "[object Date]", se = "[object DOMException]", de = "[object Error]", ge = "[object Function]", Oe = "[object GeneratorFunction]", ke = "[object Map]", Me = "[object Number]", Ne = "[object Null]", Ce = "[object Object]", Y = "[object Promise]", Z = "[object Proxy]", ie = "[object RegExp]", we = "[object Set]", Ee = "[object String]", De = "[object Symbol]", Ie = "[object Undefined]", Ye = "[object WeakMap]", ot = "[object WeakSet]", mt = "[object ArrayBuffer]", wt = "[object DataView]", Mt = "[object Float32Array]", Dt = "[object Float64Array]", vt = "[object Int8Array]", tt = "[object Int16Array]", _e = "[object Int32Array]", Ue = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", Ze = "[object Uint16Array]", nt = "[object Uint32Array]", It = /\b__p \+= '';/g, ct = /\b(__p \+=) '' \+/g, Lt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Rt = /&(?:amp|lt|gt|quot|#39);/g, jt = /[&<>"']/g, Yt = RegExp(Rt.source), sr = RegExp(jt.source), Ut = /<%-([\s\S]+?)%>/g, Rr = /<%([\s\S]+?)%>/g, Xt = /<%=([\s\S]+?)%>/g, Vr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Br = /^\w*$/, mr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /[\\^$.*+?()[\]{}|]/g, sn = RegExp(ur.source), Fr = /^\s+/, un = /\s/, bn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, wn = /\{\n\/\* \[wrapped with (.+)\] \*/, _n = /,? & /, xn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, on = /[()=,{}\[\]\/\s]/, Nn = /\\(\\)?/g, fi = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, gn = /\w*$/, yn = /^[-+]0x[0-9a-f]+$/i, Jn = /^0b[01]+$/i, _i = /^\[object .+?Constructor\]$/, Ir = /^0o[0-7]+$/i, pa = /^(?:0|[1-9]\d*)$/, di = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Bt = /($^)/, hr = /['\n\r\u2028\u2029\\]/g, ei = "\\ud800-\\udfff", Hn = "\\u0300-\\u036f", fs = "\\ufe20-\\ufe2f", Na = "\\u20d0-\\u20ff", ki = Hn + fs + Na, Wr = "\\u2700-\\u27bf", Nr = "a-z\\xdf-\\xf6\\xf8-\\xff", na = "\\xac\\xb1\\xd7\\xf7", Fs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hu = "\\u2000-\\u206f", ga = " \\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", Us = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ln = "\\ufe0e\\ufe0f", Ii = na + Fs + hu + ga, Ni = "['’]", Pc = "[" + ei + "]", vu = "[" + Ii + "]", ia = "[" + ki + "]", Hl = "\\d+", Md = "[" + Wr + "]", Xa = "[" + Nr + "]", Wl = "[^" + ei + Ii + Hl + Wr + Nr + Us + "]", Yl = "\\ud83c[\\udffb-\\udfff]", nf = "(?:" + ia + "|" + Yl + ")", Wi = "[^" + ei + "]", af = "(?:\\ud83c[\\udde6-\\uddff]){2}", La = "[\\ud800-\\udbff][\\udc00-\\udfff]", qo = "[" + Us + "]", Gf = "\\u200d", ds = "(?:" + Xa + "|" + Wl + ")", Mc = "(?:" + qo + "|" + Wl + ")", Xl = "(?:" + Ni + "(?:d|ll|m|re|s|t|ve))?", ti = "(?:" + Ni + "(?:D|LL|M|RE|S|T|VE))?", zs = nf + "?", Qu = "[" + Ln + "]?", qs = "(?:" + Gf + "(?:" + [Wi, af, La].join("|") + ")" + Qu + zs + ")*", $l = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", of = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", pu = Qu + zs + qs, _o = "(?:" + [Md, af, La].join("|") + ")" + pu, wo = "(?:" + [Wi + ia + "?", ia, af, La, Pc].join("|") + ")", Vf = RegExp(Ni, "g"), sf = RegExp(ia, "g"), gu = RegExp(Yl + "(?=" + Yl + ")|" + wo + pu, "g"), so = RegExp([ + ], ne = "[object Arguments]", le = "[object Array]", ce = "[object AsyncFunction]", pe = "[object Boolean]", fe = "[object Date]", se = "[object DOMException]", de = "[object Error]", ge = "[object Function]", Oe = "[object GeneratorFunction]", ke = "[object Map]", De = "[object Number]", Ne = "[object Null]", Ce = "[object Object]", Y = "[object Promise]", Q = "[object Proxy]", ie = "[object RegExp]", we = "[object Set]", Ee = "[object String]", Me = "[object Symbol]", Ie = "[object Undefined]", Ye = "[object WeakMap]", ot = "[object WeakSet]", mt = "[object ArrayBuffer]", wt = "[object DataView]", Mt = "[object Float32Array]", Dt = "[object Float64Array]", vt = "[object Int8Array]", tt = "[object Int16Array]", _e = "[object Int32Array]", Ue = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", Ze = "[object Uint16Array]", nt = "[object Uint32Array]", It = /\b__p \+= '';/g, ct = /\b(__p \+=) '' \+/g, Lt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Rt = /&(?:amp|lt|gt|quot|#39);/g, jt = /[&<>"']/g, Yt = RegExp(Rt.source), sr = RegExp(jt.source), Ut = /<%-([\s\S]+?)%>/g, Rr = /<%([\s\S]+?)%>/g, Xt = /<%=([\s\S]+?)%>/g, Vr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Br = /^\w*$/, mr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /[\\^$.*+?()[\]{}|]/g, sn = RegExp(ur.source), Fr = /^\s+/, un = /\s/, bn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, wn = /\{\n\/\* \[wrapped with (.+)\] \*/, _n = /,? & /, xn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, on = /[()=,{}\[\]\/\s]/, Nn = /\\(\\)?/g, fi = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, gn = /\w*$/, yn = /^[-+]0x[0-9a-f]+$/i, Jn = /^0b[01]+$/i, _i = /^\[object .+?Constructor\]$/, Ir = /^0o[0-7]+$/i, pa = /^(?:0|[1-9]\d*)$/, di = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Bt = /($^)/, hr = /['\n\r\u2028\u2029\\]/g, ei = "\\ud800-\\udfff", Hn = "\\u0300-\\u036f", fs = "\\ufe20-\\ufe2f", Na = "\\u20d0-\\u20ff", ki = Hn + fs + Na, Wr = "\\u2700-\\u27bf", Nr = "a-z\\xdf-\\xf6\\xf8-\\xff", na = "\\xac\\xb1\\xd7\\xf7", Fs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hu = "\\u2000-\\u206f", ga = " \\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", Us = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ln = "\\ufe0e\\ufe0f", Ii = na + Fs + hu + ga, Ni = "['’]", Pc = "[" + ei + "]", vu = "[" + Ii + "]", ia = "[" + ki + "]", Hl = "\\d+", Md = "[" + Wr + "]", Xa = "[" + Nr + "]", Wl = "[^" + ei + Ii + Hl + Wr + Nr + Us + "]", Yl = "\\ud83c[\\udffb-\\udfff]", nf = "(?:" + ia + "|" + Yl + ")", Wi = "[^" + ei + "]", af = "(?:\\ud83c[\\udde6-\\uddff]){2}", La = "[\\ud800-\\udbff][\\udc00-\\udfff]", qo = "[" + Us + "]", Gf = "\\u200d", ds = "(?:" + Xa + "|" + Wl + ")", Mc = "(?:" + qo + "|" + Wl + ")", Xl = "(?:" + Ni + "(?:d|ll|m|re|s|t|ve))?", ti = "(?:" + Ni + "(?:D|LL|M|RE|S|T|VE))?", zs = nf + "?", Qu = "[" + Ln + "]?", qs = "(?:" + Gf + "(?:" + [Wi, af, La].join("|") + ")" + Qu + zs + ")*", $l = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", of = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", pu = Qu + zs + qs, _o = "(?:" + [Md, af, La].join("|") + ")" + pu, wo = "(?:" + [Wi + ia + "?", ia, af, La, Pc].join("|") + ")", Vf = RegExp(Ni, "g"), sf = RegExp(ia, "g"), gu = RegExp(Yl + "(?=" + Yl + ")|" + wo + pu, "g"), so = RegExp([ qo + "?" + Xa + "+" + Xl + "(?=" + [vu, qo, "$"].join("|") + ")", Mc + "+" + ti + "(?=" + [vu, qo + ds, "$"].join("|") + ")", qo + "?" + ds + "+" + Xl, @@ -42037,9 +42049,9 @@ function Sa() { "parseInt", "setTimeout" ], hs = -1, jn = {}; - jn[Mt] = jn[Dt] = jn[vt] = jn[tt] = jn[_e] = jn[Ue] = jn[Qe] = jn[Ze] = jn[nt] = !0, jn[ne] = jn[le] = jn[mt] = jn[pe] = jn[wt] = jn[fe] = jn[de] = jn[ge] = jn[ke] = jn[Me] = jn[Ce] = jn[ie] = jn[we] = jn[Ee] = jn[Ye] = !1; + jn[Mt] = jn[Dt] = jn[vt] = jn[tt] = jn[_e] = jn[Ue] = jn[Qe] = jn[Ze] = jn[nt] = !0, jn[ne] = jn[le] = jn[mt] = jn[pe] = jn[wt] = jn[fe] = jn[de] = jn[ge] = jn[ke] = jn[De] = jn[Ce] = jn[ie] = jn[we] = jn[Ee] = jn[Ye] = !1; var Zr = {}; - Zr[ne] = Zr[le] = Zr[mt] = Zr[wt] = Zr[pe] = Zr[fe] = Zr[Mt] = Zr[Dt] = Zr[vt] = Zr[tt] = Zr[_e] = Zr[ke] = Zr[Me] = Zr[Ce] = Zr[ie] = Zr[we] = Zr[Ee] = Zr[De] = Zr[Ue] = Zr[Qe] = Zr[Ze] = Zr[nt] = !0, Zr[de] = Zr[ge] = Zr[Ye] = !1; + Zr[ne] = Zr[le] = Zr[mt] = Zr[wt] = Zr[pe] = Zr[fe] = Zr[Mt] = Zr[Dt] = Zr[vt] = Zr[tt] = Zr[_e] = Zr[ke] = Zr[De] = Zr[Ce] = Zr[ie] = Zr[we] = Zr[Ee] = Zr[Me] = Zr[Ue] = Zr[Qe] = Zr[Ze] = Zr[nt] = !0, Zr[de] = Zr[ge] = Zr[Ye] = !1; var Zl = { // Latin-1 Supplement block. À: "A", @@ -43309,7 +43321,7 @@ function Sa() { else Ot ? Gr = qr && (ee || Qt) : qe ? Gr = qr && Qt && (ee || !pr) : $e ? Gr = qr && Qt && !pr && (ee || !Tn) : pr || Tn ? Gr = !1 : Gr = ee ? Pt <= D : Pt < D; Gr ? ve = Tt + 1 : Ae = Tt; } - return Sn(Ae, Q); + return Sn(Ae, Z); } function Zt(A, D) { for (var U = -1, ee = A.length, ve = 0, Ae = []; ++U < ee; ) { @@ -43853,7 +43865,7 @@ function Sa() { return !(A.byteLength != D.byteLength || !Ae(new ac(A), new ac(D))); case pe: case fe: - case Me: + case De: return Al(+A, +D); case de: return A.name == D.name && A.message == D.message; @@ -43872,7 +43884,7 @@ function Sa() { ee |= g, Le.set(A, D); var Tt = qd(qe(A), qe(D), ee, ve, Ae, Le); return Le.delete(A), Tt; - case De: + case Me: if (bs) return bs.call(A) == bs.call(D); } @@ -44051,14 +44063,14 @@ function Sa() { return ju(A, U); case ke: return new ee(); - case Me: + case De: case Ee: return new ee(A); case ie: return ts(A); case we: return new ee(); - case De: + case Me: return _l(A); } } @@ -44630,15 +44642,15 @@ function Sa() { var ee = rn(A) ? Ev : kc, ve = arguments.length < 3; return ee(A, br(D, 4), U, ve, nd); } - function gE(A, D) { + function pE(A, D) { var U = rn(A) ? ja : ws; return U(A, Cy(br(D, 3))); } - function yE(A) { + function gE(A) { var D = rn(A) ? Ca : ze; return D(A); } - function mE(A, D, U) { + function yE(A, D, U) { (U ? Io(A, D, U) : D === t) ? D = 1 : D = zr(D); var ee = rn(A) ? Qo : Ge; return ee(A, D); @@ -44763,7 +44775,7 @@ function Sa() { }), m0 = Pe(function(A, D, U) { return wf(A, Pl(D) || 0, U); }); - function bE(A) { + function mE(A) { return eo(A, P); } function cg(A, D) { @@ -44797,10 +44809,10 @@ function Sa() { return !A.apply(this, D); }; } - function _E(A) { + function bE(A) { return v0(2, A); } - var wE = Ji(function(A, D) { + var _E = Ji(function(A, D) { D = D.length == 1 && rn(D[0]) ? xi(D[0], xo(br())) : xi(Zi(D, 1), xo(br())); var U = D.length; return Pe(function(ee) { @@ -44846,7 +44858,7 @@ function Sa() { function fg(A, D) { return Vv(tn(D), A); } - function xE() { + function wE() { if (!arguments.length) return []; var A = arguments[0]; @@ -44864,7 +44876,7 @@ function Sa() { function w_(A, D) { return D = typeof D == "function" ? D : t, Qa(A, f | h, D); } - function EE(A, D) { + function xE(A, D) { return D == null || ku(A, D, jo(D)); } function Al(A, D) { @@ -44926,7 +44938,7 @@ function Sa() { if (!ca(A)) return !1; var D = Qi(A); - return D == ge || D == Oe || D == ce || D == Z; + return D == ge || D == Oe || D == ce || D == Q; } function hg(A) { return typeof A == "number" && A == zr(A); @@ -44959,11 +44971,11 @@ function Sa() { function as(A) { return A === null; } - function SE(A) { + function EE(A) { return A == null; } function T0(A) { - return typeof A == "number" || Pa(A) && Qi(A) == Me; + return typeof A == "number" || Pa(A) && Qi(A) == De; } function vg(A) { if (!Pa(A) || Qi(A) != Ce) @@ -44983,19 +44995,19 @@ function Sa() { return typeof A == "string" || !rn(A) && Pa(A) && Qi(A) == Ee; } function qu(A) { - return typeof A == "symbol" || Pa(A) && Qi(A) == De; + return typeof A == "symbol" || Pa(A) && Qi(A) == Me; } var eh = xt ? xo(xt) : ad; function A0(A) { return A === t; } - function OE(A) { + function SE(A) { return Pa(A) && vo(A) == Ye; } function A_(A) { return Pa(A) && Qi(A) == ot; } - var TE = Fu(si), R_ = Fu(function(A, D) { + var OE = Fu(si), R_ = Fu(function(A, D) { return A <= D; }); function P_(A) { @@ -45042,7 +45054,7 @@ function Sa() { function Dy(A) { return wa(A, Gu(A)); } - function CE(A) { + function TE(A) { return A ? Po(zr(A), -W, W) : A === 0 ? A : 0; } function li(A) { @@ -45059,7 +45071,7 @@ function Sa() { wa(D, Gu(D), A); }), Hv = Vc(function(A, D, U, ee) { wa(D, Gu(D), A, ee); - }), AE = Vc(function(A, D, U, ee) { + }), CE = Vc(function(A, D, U, ee) { wa(D, jo(D), A, ee); }), Ec = El(Uc); function P0(A, D) { @@ -45096,10 +45108,10 @@ function Sa() { function gd(A, D) { return A && Es(A, br(D, 3)); } - function RE(A) { + function AE(A) { return A == null ? [] : Zs(A, jo(A)); } - function PE(A) { + function RE(A) { return A == null ? [] : Zs(A, Gu(A)); } function th(A, D, U) { @@ -45112,18 +45124,18 @@ function Sa() { function M0(A, D) { return A != null && Dv(A, D, ho); } - var ME = jh(function(A, D, U) { + var PE = jh(function(A, D, U) { D != null && typeof D.toString != "function" && (D = Eo.call(D)), A[D] = U; - }, Qv(tu)), DE = jh(function(A, D, U) { + }, Qv(tu)), ME = jh(function(A, D, U) { D != null && typeof D.toString != "function" && (D = Eo.call(D)), Jr.call(A, D) ? A[D].push(U) : A[D] = [U]; - }, br), kE = Pe(Mo); + }, br), DE = Pe(Mo); function jo(A) { return zu(A) ? gl(A) : bl(A); } function Gu(A) { return zu(A) ? gl(A, !0) : Nh(A); } - function IE(A, D) { + function kE(A, D) { var U = {}; return D = br(D, 3), xs(A, function(ee, ve, Ae) { Ro(U, D(ee, ve, Ae), ee); @@ -45151,7 +45163,7 @@ function Sa() { vn(U, D[ve]); return U; }); - function NE(A, D) { + function IE(A, D) { return $v(A, Cy(br(D))); } var Xv = El(function(A, D) { @@ -45196,7 +45208,7 @@ function Sa() { function z_(A, D) { return A == null ? !0 : vn(A, D); } - function LE(A, D, U) { + function NE(A, D, U) { return A == null ? A : ua(A, D, tn(U)); } function q_(A, D, U, ee) { @@ -45208,7 +45220,7 @@ function Sa() { function k0(A) { return A == null ? [] : Nc(A, Gu(A)); } - function jE(A, D, U) { + function LE(A, D, U) { return U === t && (U = D, D = t), U !== t && (U = Pl(U), U = U === U ? U : 0), D !== t && (D = Pl(D), D = D === D ? D : 0), Po(Pl(A), D, U); } function jy(A, D, U) { @@ -45234,7 +45246,7 @@ function Sa() { function Zv(A) { return A = li(A), A && A.replace(di, $f).replace(sf, ""); } - function BE(A, D, U) { + function jE(A, D, U) { A = li(A), D = Or(D); var ee = A.length; U = U === t ? ee : Po(zr(U), 0, ee); @@ -45270,10 +45282,10 @@ function Sa() { var ee = D ? il(A) : 0; return D && ee < D ? Cf(D - ee, U) + A : A; } - function FE(A, D, U) { + function BE(A, D, U) { return U || D == null ? D = 0 : D && (D = +D), Co(li(A).replace(Fr, ""), D || 0); } - function UE(A, D, U) { + function FE(A, D, U) { return (U ? Io(A, D, U) : D === t) ? D = 1 : D = zr(D), ye(li(A), D); } function N0() { @@ -45395,7 +45407,7 @@ function print() { __p += __j.call(arguments, '') } } return $e + ee; } - function zE(A) { + function UE(A) { return A = li(A), A && Yt.test(A) ? A.replace(Rt, jc) : A; } var Z_ = ud(function(A, D, U) { @@ -45429,7 +45441,7 @@ function print() { __p += __j.call(arguments, '') } } }); } - function qE(A) { + function zE(A) { return rd(Qa(A, f)); } function Qv(A) { @@ -45453,7 +45465,7 @@ function print() { __p += __j.call(arguments, '') } function tw(A, D) { return Sf(A, Qa(D, f)); } - var GE = Pe(function(A, D) { + var qE = Pe(function(A, D) { return function(U) { return Mo(U, A, D); }; @@ -45549,7 +45561,7 @@ function print() { __p += __j.call(arguments, '') } function oh(A) { return A && A.length ? Ks(A, tu, si) : t; } - function VE(A, D) { + function GE(A, D) { return A && A.length ? Ks(A, br(D, 2), si) : t; } var qG = xl(function(A, D) { @@ -45563,7 +45575,7 @@ function print() { __p += __j.call(arguments, '') } function WG(A, D) { return A && A.length ? tc(A, br(D, 2)) : 0; } - return xe.after = y_, xe.ary = h0, xe.assign = M_, xe.assignIn = ky, xe.assignInWith = Hv, xe.assignWith = AE, xe.at = Ec, xe.before = v0, xe.bind = Ty, xe.bindAll = qy, xe.bindKey = p0, xe.castArray = xE, xe.chain = ag, xe.chunk = is, xe.compact = Wh, xe.concat = tg, xe.cond = J_, xe.conforms = qE, xe.constant = Qv, xe.countBy = s_, xe.create = P0, xe.curry = lg, xe.curryRight = g0, xe.debounce = y0, xe.defaults = D_, xe.defaultsDeep = k_, xe.defer = yi, xe.delay = m0, xe.difference = Bv, xe.differenceBy = Fv, xe.differenceWith = Tl, xe.drop = Ra, xe.dropRight = rg, xe.dropRightWhile = by, xe.dropWhile = qa, xe.fill = o0, xe.filter = c0, xe.flatMap = Uu, xe.flatMapDeep = l_, xe.flatMapDepth = c_, xe.flatten = gi, xe.flattenDeep = No, xe.flattenDepth = Wc, xe.flip = bE, xe.flow = ew, xe.flowRight = Jv, xe.fromPairs = _y, xe.functions = RE, xe.functionsIn = PE, xe.groupBy = Ey, xe.initial = s0, xe.intersection = Uv, xe.intersectionBy = Ps, xe.intersectionWith = R, xe.invert = ME, xe.invertBy = DE, xe.invokeMap = qv, xe.iteratee = xg, xe.keyBy = d_, xe.keys = jo, xe.keysIn = Gu, xe.map = sg, xe.mapKeys = IE, xe.mapValues = j_, xe.matches = Vy, xe.matchesProperty = tw, xe.memoize = cg, xe.merge = Wv, xe.mergeWith = Yv, xe.method = GE, xe.methodOf = Hy, xe.mixin = v, xe.negate = Cy, xe.nthArg = M, xe.omit = B_, xe.omitBy = NE, xe.once = _E, xe.orderBy = h_, xe.over = F, xe.overArgs = wE, xe.overEvery = V, xe.overSome = ae, xe.partial = Vv, xe.partialRight = Kh, xe.partition = v_, xe.pick = Xv, xe.pickBy = $v, xe.property = Se, xe.propertyOf = Fe, xe.pull = Re, xe.pullAll = je, xe.pullAllBy = He, xe.pullAllWith = et, xe.pullAt = yt, xe.range = it, xe.rangeRight = ht, xe.rearg = b0, xe.reject = gE, xe.remove = Et, xe.rest = Ay, xe.reverse = At, xe.sampleSize = mE, xe.set = Ny, xe.setWith = D0, xe.shuffle = p_, xe.slice = $t, xe.sortBy = Oy, xe.sortedUniq = Lr, xe.sortedUniqBy = jr, xe.split = zy, xe.spread = _0, xe.tail = qn, xe.take = vr, xe.takeRight = zt, xe.takeRightWhile = Hr, xe.takeWhile = fr, xe.tap = o_, xe.throttle = Qd, xe.thru = $h, xe.toArray = P_, xe.toPairs = Ly, xe.toPairsIn = bg, xe.toPath = Xe, xe.toPlainObject = Dy, xe.transform = U_, xe.unary = Af, xe.union = Mr, xe.unionBy = _r, xe.unionWith = ui, xe.uniq = po, xe.uniqBy = eu, xe.uniqWith = Yc, xe.unset = z_, xe.unzip = Ga, xe.unzipWith = qi, xe.update = LE, xe.updateWith = q_, xe.values = Kv, xe.valuesIn = k0, xe.without = Xc, xe.words = Q_, xe.wrap = fg, xe.xor = xc, xe.xorBy = Xh, xe.xorWith = Lo, xe.zip = $c, xe.zipObject = Xd, xe.zipObjectDeep = go, xe.zipWith = $d, xe.entries = Ly, xe.entriesIn = bg, xe.extend = ky, xe.extendWith = Hv, v(xe, xe), xe.add = rt, xe.attempt = F0, xe.camelCase = Fy, xe.capitalize = G_, xe.ceil = bt, xe.clamp = jE, xe.clone = m_, xe.cloneDeep = __, xe.cloneDeepWith = w_, xe.cloneWith = b_, xe.conformsTo = EE, xe.deburr = Zv, xe.defaultTo = Gy, xe.divide = wr, xe.endsWith = BE, xe.eq = Al, xe.escape = V_, xe.escapeRegExp = H_, xe.every = og, xe.find = Cl, xe.findIndex = ng, xe.findKey = I_, xe.findLast = u_, xe.findLastIndex = Yh, xe.findLastKey = mg, xe.floor = Zn, xe.forEach = f_, xe.forEachRight = vd, xe.forIn = Sc, xe.forInRight = N_, xe.forOwn = Iy, xe.forOwnRight = gd, xe.get = th, xe.gt = x_, xe.gte = E_, xe.has = L_, xe.hasIn = M0, xe.head = ig, xe.identity = tu, xe.includes = f0, xe.indexOf = wy, xe.inRange = jy, xe.invoke = kE, xe.isArguments = Zh, xe.isArray = rn, xe.isArrayBuffer = w0, xe.isArrayLike = zu, xe.isArrayLikeObject = Va, xe.isBoolean = dg, xe.isBuffer = Jd, xe.isDate = S_, xe.isElement = Cn, xe.isEmpty = x0, xe.isEqual = Ry, xe.isEqualWith = E0, xe.isError = Py, xe.isFinite = S0, xe.isFunction = Rl, xe.isInteger = hg, xe.isLength = My, xe.isMap = O_, xe.isMatch = T_, xe.isMatchWith = C_, xe.isNaN = Oi, xe.isNative = O0, xe.isNil = SE, xe.isNull = as, xe.isNumber = T0, xe.isObject = ca, xe.isObjectLike = Pa, xe.isPlainObject = vg, xe.isRegExp = pg, xe.isSafeInteger = C0, xe.isSet = gg, xe.isString = yg, xe.isSymbol = qu, xe.isTypedArray = eh, xe.isUndefined = A0, xe.isWeakMap = OE, xe.isWeakSet = A_, xe.join = N, xe.kebabCase = W_, xe.last = G, xe.lastIndexOf = te, xe.lowerCase = Y_, xe.lowerFirst = I0, xe.lt = TE, xe.lte = R_, xe.max = or, xe.maxBy = pn, xe.mean = kn, xe.meanBy = Qn, xe.min = oh, xe.minBy = VE, xe.stubArray = _t, xe.stubFalse = at, xe.stubObject = lt, xe.stubString = rr, xe.stubTrue = Dr, xe.multiply = qG, xe.nth = he, xe.noConflict = w, xe.noop = C, xe.now = ug, xe.pad = X_, xe.padEnd = $_, xe.padStart = Uy, xe.parseInt = FE, xe.random = By, xe.reduce = Sy, xe.reduceRight = d0, xe.repeat = UE, xe.replace = N0, xe.result = F_, xe.round = GG, xe.runInContext = We, xe.sample = yE, xe.size = g_, xe.snakeCase = L0, xe.some = Gv, xe.sortedIndex = tr, xe.sortedIndexBy = cr, xe.sortedIndexOf = St, xe.sortedLastIndex = Nt, xe.sortedLastIndexBy = lr, xe.sortedLastIndexOf = Gt, xe.startCase = j0, xe.startsWith = K_, xe.subtract = VG, xe.sum = HG, xe.sumBy = WG, xe.template = B0, xe.times = Ti, xe.toFinite = pd, xe.toInteger = zr, xe.toLength = R0, xe.toLower = rh, xe.toNumber = Pl, xe.toSafeInteger = CE, xe.toString = li, xe.toUpper = nh, xe.trim = ih, xe.trimEnd = _g, xe.trimStart = wg, xe.truncate = ah, xe.unescape = zE, xe.uniqueId = Ve, xe.upperCase = Z_, xe.upperFirst = Qh, xe.each = f_, xe.eachRight = vd, xe.first = ig, v(xe, (function() { + return xe.after = y_, xe.ary = h0, xe.assign = M_, xe.assignIn = ky, xe.assignInWith = Hv, xe.assignWith = CE, xe.at = Ec, xe.before = v0, xe.bind = Ty, xe.bindAll = qy, xe.bindKey = p0, xe.castArray = wE, xe.chain = ag, xe.chunk = is, xe.compact = Wh, xe.concat = tg, xe.cond = J_, xe.conforms = zE, xe.constant = Qv, xe.countBy = s_, xe.create = P0, xe.curry = lg, xe.curryRight = g0, xe.debounce = y0, xe.defaults = D_, xe.defaultsDeep = k_, xe.defer = yi, xe.delay = m0, xe.difference = Bv, xe.differenceBy = Fv, xe.differenceWith = Tl, xe.drop = Ra, xe.dropRight = rg, xe.dropRightWhile = by, xe.dropWhile = qa, xe.fill = o0, xe.filter = c0, xe.flatMap = Uu, xe.flatMapDeep = l_, xe.flatMapDepth = c_, xe.flatten = gi, xe.flattenDeep = No, xe.flattenDepth = Wc, xe.flip = mE, xe.flow = ew, xe.flowRight = Jv, xe.fromPairs = _y, xe.functions = AE, xe.functionsIn = RE, xe.groupBy = Ey, xe.initial = s0, xe.intersection = Uv, xe.intersectionBy = Ps, xe.intersectionWith = R, xe.invert = PE, xe.invertBy = ME, xe.invokeMap = qv, xe.iteratee = xg, xe.keyBy = d_, xe.keys = jo, xe.keysIn = Gu, xe.map = sg, xe.mapKeys = kE, xe.mapValues = j_, xe.matches = Vy, xe.matchesProperty = tw, xe.memoize = cg, xe.merge = Wv, xe.mergeWith = Yv, xe.method = qE, xe.methodOf = Hy, xe.mixin = v, xe.negate = Cy, xe.nthArg = M, xe.omit = B_, xe.omitBy = IE, xe.once = bE, xe.orderBy = h_, xe.over = F, xe.overArgs = _E, xe.overEvery = V, xe.overSome = ae, xe.partial = Vv, xe.partialRight = Kh, xe.partition = v_, xe.pick = Xv, xe.pickBy = $v, xe.property = Se, xe.propertyOf = Fe, xe.pull = Re, xe.pullAll = je, xe.pullAllBy = He, xe.pullAllWith = et, xe.pullAt = yt, xe.range = it, xe.rangeRight = ht, xe.rearg = b0, xe.reject = pE, xe.remove = Et, xe.rest = Ay, xe.reverse = At, xe.sampleSize = yE, xe.set = Ny, xe.setWith = D0, xe.shuffle = p_, xe.slice = $t, xe.sortBy = Oy, xe.sortedUniq = Lr, xe.sortedUniqBy = jr, xe.split = zy, xe.spread = _0, xe.tail = qn, xe.take = vr, xe.takeRight = zt, xe.takeRightWhile = Hr, xe.takeWhile = fr, xe.tap = o_, xe.throttle = Qd, xe.thru = $h, xe.toArray = P_, xe.toPairs = Ly, xe.toPairsIn = bg, xe.toPath = Xe, xe.toPlainObject = Dy, xe.transform = U_, xe.unary = Af, xe.union = Mr, xe.unionBy = _r, xe.unionWith = ui, xe.uniq = po, xe.uniqBy = eu, xe.uniqWith = Yc, xe.unset = z_, xe.unzip = Ga, xe.unzipWith = qi, xe.update = NE, xe.updateWith = q_, xe.values = Kv, xe.valuesIn = k0, xe.without = Xc, xe.words = Q_, xe.wrap = fg, xe.xor = xc, xe.xorBy = Xh, xe.xorWith = Lo, xe.zip = $c, xe.zipObject = Xd, xe.zipObjectDeep = go, xe.zipWith = $d, xe.entries = Ly, xe.entriesIn = bg, xe.extend = ky, xe.extendWith = Hv, v(xe, xe), xe.add = rt, xe.attempt = F0, xe.camelCase = Fy, xe.capitalize = G_, xe.ceil = bt, xe.clamp = LE, xe.clone = m_, xe.cloneDeep = __, xe.cloneDeepWith = w_, xe.cloneWith = b_, xe.conformsTo = xE, xe.deburr = Zv, xe.defaultTo = Gy, xe.divide = wr, xe.endsWith = jE, xe.eq = Al, xe.escape = V_, xe.escapeRegExp = H_, xe.every = og, xe.find = Cl, xe.findIndex = ng, xe.findKey = I_, xe.findLast = u_, xe.findLastIndex = Yh, xe.findLastKey = mg, xe.floor = Zn, xe.forEach = f_, xe.forEachRight = vd, xe.forIn = Sc, xe.forInRight = N_, xe.forOwn = Iy, xe.forOwnRight = gd, xe.get = th, xe.gt = x_, xe.gte = E_, xe.has = L_, xe.hasIn = M0, xe.head = ig, xe.identity = tu, xe.includes = f0, xe.indexOf = wy, xe.inRange = jy, xe.invoke = DE, xe.isArguments = Zh, xe.isArray = rn, xe.isArrayBuffer = w0, xe.isArrayLike = zu, xe.isArrayLikeObject = Va, xe.isBoolean = dg, xe.isBuffer = Jd, xe.isDate = S_, xe.isElement = Cn, xe.isEmpty = x0, xe.isEqual = Ry, xe.isEqualWith = E0, xe.isError = Py, xe.isFinite = S0, xe.isFunction = Rl, xe.isInteger = hg, xe.isLength = My, xe.isMap = O_, xe.isMatch = T_, xe.isMatchWith = C_, xe.isNaN = Oi, xe.isNative = O0, xe.isNil = EE, xe.isNull = as, xe.isNumber = T0, xe.isObject = ca, xe.isObjectLike = Pa, xe.isPlainObject = vg, xe.isRegExp = pg, xe.isSafeInteger = C0, xe.isSet = gg, xe.isString = yg, xe.isSymbol = qu, xe.isTypedArray = eh, xe.isUndefined = A0, xe.isWeakMap = SE, xe.isWeakSet = A_, xe.join = N, xe.kebabCase = W_, xe.last = G, xe.lastIndexOf = te, xe.lowerCase = Y_, xe.lowerFirst = I0, xe.lt = OE, xe.lte = R_, xe.max = or, xe.maxBy = pn, xe.mean = kn, xe.meanBy = Qn, xe.min = oh, xe.minBy = GE, xe.stubArray = _t, xe.stubFalse = at, xe.stubObject = lt, xe.stubString = rr, xe.stubTrue = Dr, xe.multiply = qG, xe.nth = he, xe.noConflict = w, xe.noop = C, xe.now = ug, xe.pad = X_, xe.padEnd = $_, xe.padStart = Uy, xe.parseInt = BE, xe.random = By, xe.reduce = Sy, xe.reduceRight = d0, xe.repeat = FE, xe.replace = N0, xe.result = F_, xe.round = GG, xe.runInContext = We, xe.sample = gE, xe.size = g_, xe.snakeCase = L0, xe.some = Gv, xe.sortedIndex = tr, xe.sortedIndexBy = cr, xe.sortedIndexOf = St, xe.sortedLastIndex = Nt, xe.sortedLastIndexBy = lr, xe.sortedLastIndexOf = Gt, xe.startCase = j0, xe.startsWith = K_, xe.subtract = VG, xe.sum = HG, xe.sumBy = WG, xe.template = B0, xe.times = Ti, xe.toFinite = pd, xe.toInteger = zr, xe.toLength = R0, xe.toLower = rh, xe.toNumber = Pl, xe.toSafeInteger = TE, xe.toString = li, xe.toUpper = nh, xe.trim = ih, xe.trimEnd = _g, xe.trimStart = wg, xe.truncate = ah, xe.unescape = UE, xe.uniqueId = Ve, xe.upperCase = Z_, xe.upperFirst = Qh, xe.each = f_, xe.eachRight = vd, xe.first = ig, v(xe, (function() { var A = {}; return xs(xe, function(D, U) { Jr.call(xe.prototype, U) || (A[U] = D); @@ -45660,13 +45672,13 @@ function print() { __p += __j.call(arguments, '') } }], Yr.prototype.clone = Tu, Yr.prototype.reverse = _s, Yr.prototype.value = Cu, xe.prototype.at = xy, xe.prototype.chain = Kd, xe.prototype.commit = yo, xe.prototype.next = Zd, xe.prototype.plant = hd, xe.prototype.reverse = u0, xe.prototype.toJSON = xe.prototype.valueOf = xe.prototype.value = l0, xe.prototype.first = xe.prototype.head, Yi && (xe.prototype[Yi] = zv), xe; }), ic = Hs(); aa ? ((aa.exports = ic)._ = ic, Jl._ = ic) : wi._ = ic; - }).call(gie); + }).call(yie); })(mb, mb.exports)), mb.exports; } -var FR, I6; -function yie() { - if (I6) return FR; - I6 = 1, FR = r; +var BR, I6; +function mie() { + if (I6) return BR; + I6 = 1, BR = r; function r() { var n = {}; n._next = n._prev = n, this._sentinel = n; @@ -45690,14 +45702,14 @@ function yie() { if (n !== "_next" && n !== "_prev") return i; } - return FR; + return BR; } -var UR, N6; -function mie() { - if (N6) return UR; +var FR, N6; +function bie() { + if (N6) return FR; N6 = 1; - var r = Sa(), e = Uf().Graph, t = yie(); - UR = i; + var r = Sa(), e = Uf().Graph, t = mie(); + FR = i; var n = r.constant(1); function i(l, c) { if (l.nodeCount() <= 1) @@ -45751,14 +45763,14 @@ function mie() { function u(l, c, f) { f.out ? f.in ? l[f.out - f.in + c].enqueue(f) : l[l.length - 1].enqueue(f) : l[0].enqueue(f); } - return UR; + return FR; } -var zR, L6; -function bie() { - if (L6) return zR; +var UR, L6; +function _ie() { + if (L6) return UR; L6 = 1; - var r = Sa(), e = mie(); - zR = { + var r = Sa(), e = bie(); + UR = { run: t, undo: i }; @@ -45793,14 +45805,14 @@ function bie() { } }); } - return zR; + return UR; } -var qR, j6; +var zR, j6; function Rc() { - if (j6) return qR; + if (j6) return zR; j6 = 1; var r = Sa(), e = Uf().Graph; - qR = { + zR = { addDummyNode: t, simplify: n, asNonCompoundGraph: i, @@ -45932,14 +45944,14 @@ function Rc() { function g(y, b) { return b(); } - return qR; + return zR; } -var GR, B6; -function _ie() { - if (B6) return GR; +var qR, B6; +function wie() { + if (B6) return qR; B6 = 1; var r = Sa(), e = Rc(); - GR = { + qR = { run: t, undo: i }; @@ -45971,14 +45983,14 @@ function _ie() { l = a.successors(o)[0], a.removeNode(o), u.points.push({ x: s.x, y: s.y }), s.dummy === "edge-label" && (u.x = s.x, u.y = s.y, u.width = s.width, u.height = s.height), o = l, s = a.node(o); }); } - return GR; + return qR; } -var VR, F6; +var GR, F6; function Gx() { - if (F6) return VR; + if (F6) return GR; F6 = 1; var r = Sa(); - VR = { + GR = { longestPath: e, slack: t }; @@ -46001,14 +46013,14 @@ function Gx() { function t(n, i) { return n.node(i.w).rank - n.node(i.v).rank - n.edge(i).minlen; } - return VR; + return GR; } -var HR, U6; +var VR, U6; function hz() { - if (U6) return HR; + if (U6) return VR; U6 = 1; var r = Sa(), e = Uf().Graph, t = Gx().slack; - HR = n; + VR = n; function n(s) { var u = new e({ directed: !1 }), l = s.nodes()[0], c = s.nodeCount(); u.setNode(l, {}); @@ -46036,14 +46048,14 @@ function hz() { u.node(c).rank += l; }); } - return HR; + return VR; } -var WR, z6; -function wie() { - if (z6) return WR; +var HR, z6; +function xie() { + if (z6) return HR; z6 = 1; var r = Sa(), e = hz(), t = Gx().slack, n = Gx().longestPath, i = Uf().alg.preorder, a = Uf().alg.postorder, o = Rc().simplify; - WR = s, s.initLowLimValues = f, s.initCutValues = u, s.calcCutValue = c, s.leaveEdge = h, s.enterEdge = p, s.exchangeEdges = g; + HR = s, s.initLowLimValues = f, s.initCutValues = u, s.calcCutValue = c, s.leaveEdge = h, s.enterEdge = p, s.exchangeEdges = g; function s(m) { m = o(m), n(m); var x = e(m); @@ -46119,14 +46131,14 @@ function wie() { function _(m, x, S) { return S.low <= x.lim && x.lim <= S.lim; } - return WR; + return HR; } -var YR, q6; -function xie() { - if (q6) return YR; +var WR, q6; +function Eie() { + if (q6) return WR; q6 = 1; - var r = Gx(), e = r.longestPath, t = hz(), n = wie(); - YR = i; + var r = Gx(), e = r.longestPath, t = hz(), n = xie(); + WR = i; function i(u) { switch (u.graph().ranker) { case "network-simplex": @@ -46149,14 +46161,14 @@ function xie() { function s(u) { n(u); } - return YR; + return WR; } -var XR, G6; -function Eie() { - if (G6) return XR; +var YR, G6; +function Sie() { + if (G6) return YR; G6 = 1; var r = Sa(); - XR = e; + YR = e; function e(i) { var a = n(i); r.forEach(i.graph().dummyChains, function(o) { @@ -46193,14 +46205,14 @@ function Eie() { } return r.forEach(i.children(), s), a; } - return XR; + return YR; } -var $R, V6; -function Sie() { - if (V6) return $R; +var XR, V6; +function Oie() { + if (V6) return XR; V6 = 1; var r = Sa(), e = Rc(); - $R = { + XR = { run: t, cleanup: o }; @@ -46259,14 +46271,14 @@ function Sie() { c.nestingEdge && s.removeEdge(l); }); } - return $R; + return XR; } -var KR, H6; -function Oie() { - if (H6) return KR; +var $R, H6; +function Tie() { + if (H6) return $R; H6 = 1; var r = Sa(), e = Rc(); - KR = t; + $R = t; function t(i) { function a(o) { var s = i.children(o), u = i.node(o); @@ -46282,14 +46294,14 @@ function Oie() { var c = { width: 0, height: 0, rank: l, borderType: a }, f = u[a][l - 1], d = e.addDummyNode(i, "border", c, o); u[a][l] = d, i.setParent(d, s), f && i.setEdge(f, d, { weight: 1 }); } - return KR; + return $R; } -var ZR, W6; -function Tie() { - if (W6) return ZR; +var KR, W6; +function Cie() { + if (W6) return KR; W6 = 1; var r = Sa(); - ZR = { + KR = { adjust: e, undo: t }; @@ -46335,14 +46347,14 @@ function Tie() { var c = l.x; l.x = l.y, l.y = c; } - return ZR; + return KR; } -var QR, Y6; -function Cie() { - if (Y6) return QR; +var ZR, Y6; +function Aie() { + if (Y6) return ZR; Y6 = 1; var r = Sa(); - QR = e; + ZR = e; function e(t) { var n = {}, i = r.filter(t.nodes(), function(l) { return !t.children(l).length; @@ -46363,14 +46375,14 @@ function Cie() { }); return r.forEach(u, s), o; } - return QR; + return ZR; } -var JR, X6; -function Aie() { - if (X6) return JR; +var QR, X6; +function Rie() { + if (X6) return QR; X6 = 1; var r = Sa(); - JR = e; + QR = e; function e(n, i) { for (var a = 0, o = 1; o < i.length; ++o) a += t(n, i[o - 1], i[o]); @@ -46400,14 +46412,14 @@ function Aie() { f += d.weight * p; })), f; } - return JR; + return QR; } -var eP, $6; -function Rie() { - if ($6) return eP; +var JR, $6; +function Pie() { + if ($6) return JR; $6 = 1; var r = Sa(); - eP = e; + JR = e; function e(t, n) { return r.map(n, function(i) { var a = t.inEdges(i); @@ -46428,14 +46440,14 @@ function Rie() { return { v: i }; }); } - return eP; + return JR; } -var tP, K6; -function Pie() { - if (K6) return tP; +var eP, K6; +function Mie() { + if (K6) return eP; K6 = 1; var r = Sa(); - tP = e; + eP = e; function e(i, a) { var o = {}; r.forEach(i, function(u, l) { @@ -46485,14 +46497,14 @@ function Pie() { var o = 0, s = 0; i.weight && (o += i.barycenter * i.weight, s += i.weight), a.weight && (o += a.barycenter * a.weight, s += a.weight), i.vs = a.vs.concat(i.vs), i.barycenter = o / s, i.weight = s, i.i = Math.min(a.i, i.i), a.merged = !0; } - return tP; + return eP; } -var rP, Z6; -function Mie() { - if (Z6) return rP; +var tP, Z6; +function Die() { + if (Z6) return tP; Z6 = 1; var r = Sa(), e = Rc(); - rP = t; + tP = t; function t(a, o) { var s = e.partition(a, function(g) { return r.has(g, "barycenter"); @@ -46515,14 +46527,14 @@ function Mie() { return o.barycenter < s.barycenter ? -1 : o.barycenter > s.barycenter ? 1 : a ? s.i - o.i : o.i - s.i; }; } - return rP; + return tP; } -var nP, Q6; -function Die() { - if (Q6) return nP; +var rP, Q6; +function kie() { + if (Q6) return rP; Q6 = 1; - var r = Sa(), e = Rie(), t = Pie(), n = Mie(); - nP = i; + var r = Sa(), e = Pie(), t = Mie(), n = Die(); + rP = i; function i(s, u, l, c) { var f = s.children(u), d = s.node(u), h = d ? d.borderLeft : void 0, p = d ? d.borderRight : void 0, g = {}; h && (f = r.filter(f, function(S) { @@ -46554,14 +46566,14 @@ function Die() { function o(s, u) { r.isUndefined(s.barycenter) ? (s.barycenter = u.barycenter, s.weight = u.weight) : (s.barycenter = (s.barycenter * s.weight + u.barycenter * u.weight) / (s.weight + u.weight), s.weight += u.weight); } - return nP; + return rP; } -var iP, J6; -function kie() { - if (J6) return iP; +var nP, J6; +function Iie() { + if (J6) return nP; J6 = 1; var r = Sa(), e = Uf().Graph; - iP = t; + nP = t; function t(i, a, o) { var s = n(i), u = new e({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel(function(l) { return i.node(l); @@ -46581,14 +46593,14 @@ function kie() { for (var a; i.hasNode(a = r.uniqueId("_root")); ) ; return a; } - return iP; + return nP; } -var aP, e8; -function Iie() { - if (e8) return aP; +var iP, e8; +function Nie() { + if (e8) return iP; e8 = 1; var r = Sa(); - aP = e; + iP = e; function e(t, n, i) { var a = {}, o; r.forEach(i, function(s) { @@ -46601,14 +46613,14 @@ function Iie() { } }); } - return aP; + return iP; } -var oP, t8; -function Nie() { - if (t8) return oP; +var aP, t8; +function Lie() { + if (t8) return aP; t8 = 1; - var r = Sa(), e = Cie(), t = Aie(), n = Die(), i = kie(), a = Iie(), o = Uf().Graph, s = Rc(); - oP = u; + var r = Sa(), e = Aie(), t = Rie(), n = kie(), i = Iie(), a = Nie(), o = Uf().Graph, s = Rc(); + aP = u; function u(d) { var h = s.maxRank(d), p = l(d, r.range(1, h + 1), "inEdges"), g = l(d, r.range(h - 1, -1, -1), "outEdges"), y = e(d); f(d, y); @@ -46640,14 +46652,14 @@ function Nie() { }); }); } - return oP; + return aP; } -var sP, r8; -function Lie() { - if (r8) return sP; +var oP, r8; +function jie() { + if (r8) return oP; r8 = 1; var r = Sa(), e = Uf().Graph, t = Rc(); - sP = { + oP = { positionX: p, findType1Conflicts: n, findType2Conflicts: i, @@ -46861,14 +46873,14 @@ function Lie() { function y(b, _) { return b.node(_).width; } - return sP; + return oP; } -var uP, n8; -function jie() { - if (n8) return uP; +var sP, n8; +function Bie() { + if (n8) return sP; n8 = 1; - var r = Sa(), e = Rc(), t = Lie().positionX; - uP = n; + var r = Sa(), e = Rc(), t = jie().positionX; + sP = n; function n(a) { a = e.asNonCompoundGraph(a), i(a), r.forEach(t(a), function(o, s) { a.node(s).x = o; @@ -46885,14 +46897,14 @@ function jie() { }), u += c + s; }); } - return uP; + return sP; } -var lP, i8; -function Bie() { - if (i8) return lP; +var uP, i8; +function Fie() { + if (i8) return uP; i8 = 1; - var r = Sa(), e = bie(), t = _ie(), n = xie(), i = Rc().normalizeRanks, a = Eie(), o = Rc().removeEmptyRanks, s = Sie(), u = Oie(), l = Tie(), c = Nie(), f = jie(), d = Rc(), h = Uf().Graph; - lP = p; + var r = Sa(), e = _ie(), t = wie(), n = Eie(), i = Rc().normalizeRanks, a = Sie(), o = Rc().removeEmptyRanks, s = Oie(), u = Tie(), l = Cie(), c = Lie(), f = Bie(), d = Rc(), h = Uf().Graph; + uP = p; function p(re, ne) { var le = ne && ne.debugTiming ? d.time : d.notime, ce = le("layout", function() { return ce = le(" buildLayoutGraph", function() { @@ -46984,17 +46996,17 @@ function Bie() { return ne.setGraph(r.merge( {}, _, - Q(le, b), + Z(le, b), r.pick(le, m) )), r.forEach(re.nodes(), function(ce) { var pe = ue(re.node(ce)); - ne.setNode(ce, r.defaults(Q(pe, x), S)), ne.setParent(ce, re.parent(ce)); + ne.setNode(ce, r.defaults(Z(pe, x), S)), ne.setParent(ce, re.parent(ce)); }), r.forEach(re.edges(), function(ce) { var pe = ue(re.edge(ce)); ne.setEdge(ce, r.merge( {}, E, - Q(pe, O), + Z(pe, O), r.pick(pe, T) )); }), ne; @@ -47031,8 +47043,8 @@ function Bie() { function j(re) { var ne = Number.POSITIVE_INFINITY, le = 0, ce = Number.POSITIVE_INFINITY, pe = 0, fe = re.graph(), se = fe.marginx || 0, de = fe.marginy || 0; function ge(Oe) { - var ke = Oe.x, Me = Oe.y, Ne = Oe.width, Ce = Oe.height; - ne = Math.min(ne, ke - Ne / 2), le = Math.max(le, ke + Ne / 2), ce = Math.min(ce, Me - Ce / 2), pe = Math.max(pe, Me + Ce / 2); + var ke = Oe.x, De = Oe.y, Ne = Oe.width, Ce = Oe.height; + ne = Math.min(ne, ke - Ne / 2), le = Math.max(le, ke + Ne / 2), ce = Math.min(ce, De - Ce / 2), pe = Math.max(pe, De + Ce / 2); } r.forEach(re.nodes(), function(Oe) { ge(re.node(Oe)); @@ -47044,8 +47056,8 @@ function Bie() { ke.x -= ne, ke.y -= ce; }), r.forEach(re.edges(), function(Oe) { var ke = re.edge(Oe); - r.forEach(ke.points, function(Me) { - Me.x -= ne, Me.y -= ce; + r.forEach(ke.points, function(De) { + De.x -= ne, De.y -= ce; }), r.has(ke, "x") && (ke.x -= ne), r.has(ke, "y") && (ke.y -= ce); }), fe.width = le - ne + se, fe.height = pe - ce + de; } @@ -47127,7 +47139,7 @@ function Bie() { } }); } - function Q(re, ne) { + function Z(re, ne) { return r.mapValues(r.pick(re, ne), Number); } function ue(re) { @@ -47136,14 +47148,14 @@ function Bie() { ne[ce.toLowerCase()] = le; }), ne; } - return lP; + return uP; } -var cP, a8; -function Fie() { - if (a8) return cP; +var lP, a8; +function Uie() { + if (a8) return lP; a8 = 1; var r = Sa(), e = Rc(), t = Uf().Graph; - cP = { + lP = { debugOrdering: n }; function n(i) { @@ -47159,30 +47171,30 @@ function Fie() { }); }), o; } - return cP; -} -var fP, o8; -function Uie() { - return o8 || (o8 = 1, fP = "0.8.14"), fP; + return lP; } -var dP, s8; +var cP, o8; function zie() { - return s8 || (s8 = 1, dP = { + return o8 || (o8 = 1, cP = "0.8.14"), cP; +} +var fP, s8; +function qie() { + return s8 || (s8 = 1, fP = { graphlib: Uf(), - layout: Bie(), - debug: Fie(), + layout: Fie(), + debug: Uie(), util: { time: Rc().time, notime: Rc().notime }, - version: Uie() - }), dP; -} -var qie = zie(); -const vz = /* @__PURE__ */ Bp(qie); -var hP, u8; -function Gie() { - if (u8) return hP; + version: zie() + }), fP; +} +var Gie = qie(); +const vz = /* @__PURE__ */ Bp(Gie); +var dP, u8; +function Vie() { + if (u8) return dP; u8 = 1; var r = function() { }; @@ -47228,14 +47240,14 @@ function Gie() { var n; return (n = this.findNode(this.root, e, t)) ? this.splitNode(n, e, t) : null; } - }, hP = r, hP; + }, dP = r, dP; } -var vP, l8; -function Vie() { - if (l8) return vP; +var hP, l8; +function Hie() { + if (l8) return hP; l8 = 1; - var r = Gie(); - return vP = function(e, t) { + var r = Vie(); + return hP = function(e, t) { t = t || {}; var n = new r(), i = t.inPlace || !1, a = e.map(function(l) { return i ? l : { width: l.width, height: l.height, item: l }; @@ -47252,17 +47264,17 @@ function Vie() { height: s }; return i || (u.items = a), u; - }, vP; + }, hP; } -var Hie = Vie(); -const Wie = /* @__PURE__ */ Bp(Hie); -var Yie = Uf(); -const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD = "down", Kie = "left", gz = "right", Zie = { +var Wie = Hie(); +const Yie = /* @__PURE__ */ Bp(Wie); +var Xie = Uf(); +const $ie = /* @__PURE__ */ Bp(Xie), Kie = "tight-tree", rv = 100, pz = "up", PD = "down", Zie = "left", gz = "right", Qie = { [pz]: "BT", [PD]: "TB", - [Kie]: "RL", + [Zie]: "RL", [gz]: "LR" -}, Qie = "bin", Jie = 25, eae = 1 / 0.38, tae = (r) => r === pz || r === PD, rae = (r) => r === PD || r === gz, pP = (r) => { +}, Jie = "bin", eae = 25, tae = 1 / 0.38, rae = (r) => r === pz || r === PD, nae = (r) => r === PD || r === gz, vP = (r) => { let e = null, t = null, n = null, i = null, a = null, o = null, s = null, u = null; for (const l of r.nodes()) { const c = r.node(l); @@ -47299,11 +47311,11 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD } else (i === null && a === null || s > i) && (i = s, a = o); } return a; -}, nae = (r, e) => { +}, iae = (r, e) => { let t = c8(r, e.predecessors(r), e); return t === null && (t = c8(r, e.successors(r), e)), t; -}, iae = (r, e) => { - const t = [], n = Xie.alg.components(r); +}, aae = (r, e) => { + const t = [], n = $ie.alg.components(r); if (n.length > 1) for (const i of n) { const a = yz(e); @@ -47321,27 +47333,27 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD t.push(r); return t; }, f8 = (r, e, t) => { - r.graph().ranker = $ie, r.graph().rankdir = Zie[e]; + r.graph().ranker = Kie, r.graph().rankdir = Qie[e]; const n = vz.layout(r); for (const i of n.nodes()) { - const a = nae(i, n); + const a = iae(i, n); a !== null && (t[i] = a); } -}, gP = (r, e) => Math.sqrt((r.x - e.x) * (r.x - e.x) + (r.y - e.y) * (r.y - e.y)), aae = (r) => { +}, pP = (r, e) => Math.sqrt((r.x - e.x) * (r.x - e.x) + (r.y - e.y) * (r.y - e.y)), oae = (r) => { const e = [r[0]]; - let t = { p1: r[0], p2: r[1] }, n = gP(t.p1, t.p2); + let t = { p1: r[0], p2: r[1] }, n = pP(t.p1, t.p2); for (let i = 2; i < r.length; i++) { - let a = { p1: r[i - 1], p2: r[i] }, o = gP(a.p1, a.p2); - const s = { p1: t.p1, p2: a.p2 }, u = gP(s.p1, s.p2); + let a = { p1: r[i - 1], p2: r[i] }, o = pP(a.p1, a.p2); + const s = { p1: t.p1, p2: a.p2 }, u = pP(s.p1, s.p2); o + n - u < 0.1 && (e.pop(), a = s, o = u), e.push(a.p1), t = a, n = o; } return e.push(r[r.length - 1]), e; -}, oae = (r, e, t, n, i, a, o = 1) => { +}, sae = (r, e, t, n, i, a, o = 1) => { const s = yz(o), u = {}, l = { x: 0, y: 0 }, c = r.length; for (const m of r) { const x = t[m.id]; l.x += (x == null ? void 0 : x.x) || 0, l.y += (x == null ? void 0 : x.y) || 0; - const S = (m.size || Jie) * eae * o; + const S = (m.size || eae) * tae * o; s.setNode(m.id, { width: S, height: S }); } const f = c ? [l.x / c, l.y / c] : [0, 0], d = {}; @@ -47350,11 +47362,11 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD const x = m.from < m.to ? `${m.from}-${m.to}` : `${m.to}-${m.from}`; d[x] || (d[x] = 1, s.setEdge(m.from, m.to)); } - const h = iae(s, o); + const h = aae(s, o); if (h.length > 1) { h.forEach((E) => f8(E, i, u)); - const m = tae(i), x = rae(i), S = h.filter((E) => E.nodeCount() === 1), O = h.filter((E) => E.nodeCount() !== 1); - if (a === Qie) { + const m = rae(i), x = nae(i), S = h.filter((E) => E.nodeCount() === 1), O = h.filter((E) => E.nodeCount() !== 1); + if (a === Jie) { O.sort((q, W) => W.nodeCount() - q.nodeCount()); const P = m ? ({ width: q, height: W, ...$ }) => ({ ...$, @@ -47364,11 +47376,11 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD ...$, width: W + rv, height: q + rv - }), I = O.map(pP).map(P), k = S.map(pP).map(P), L = I.concat(k); - Wie(L, { inPlace: !0 }); + }), I = O.map(vP).map(P), k = S.map(vP).map(P), L = I.concat(k); + Yie(L, { inPlace: !0 }); const B = Math.floor(rv / 2), j = m ? "x" : "y", z = m ? "y" : "x"; if (!x) { - const q = m ? "y" : "x", W = m ? "height" : "width", $ = L.reduce((X, Q) => X === null ? Q[q] : Math.min(Q[q], X[W] || 0), null), J = L.reduce((X, Q) => X === null ? Q[q] + Q[W] : Math.max(Q[q] + Q[W], X[W] || 0), null); + const q = m ? "y" : "x", W = m ? "height" : "width", $ = L.reduce((X, Z) => X === null ? Z[q] : Math.min(Z[q], X[W] || 0), null), J = L.reduce((X, Z) => X === null ? Z[q] + Z[W] : Math.max(Z[q] + Z[W], X[W] || 0), null); L.forEach((X) => { X[q] = $ + (J - (X[q] + X[W])); }); @@ -47389,17 +47401,17 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD } } else { O.sort(x ? (W, $) => $.nodeCount() - W.nodeCount() : (W, $) => W.nodeCount() - $.nodeCount()); - const E = O.map(pP), T = S.reduce((W, $) => W + s.node($.nodes()[0]).width, 0), P = S.reduce((W, $) => Math.max(W, s.node($.nodes()[0]).width), 0), I = S.length > 0 ? T + (S.length - 1) * rv : 0, k = E.reduce((W, { width: $ }) => Math.max(W, $), 0), L = Math.max(k, I), B = E.reduce((W, { height: $ }) => Math.max(W, $), 0), j = Math.max(B, I); + const E = O.map(vP), T = S.reduce((W, $) => W + s.node($.nodes()[0]).width, 0), P = S.reduce((W, $) => Math.max(W, s.node($.nodes()[0]).width), 0), I = S.length > 0 ? T + (S.length - 1) * rv : 0, k = E.reduce((W, { width: $ }) => Math.max(W, $), 0), L = Math.max(k, I), B = E.reduce((W, { height: $ }) => Math.max(W, $), 0), j = Math.max(B, I); let z = 0; const H = () => { for (let W = 0; W < O.length; W++) { const $ = O[W], J = E[W], X = Math.floor(m ? (L - J.width) / 2 : (j - J.height) / 2); - for (const Q of $.nodes()) { - const ue = $.node(Q), re = s.node(Q); + for (const Z of $.nodes()) { + const ue = $.node(Z), re = s.node(Z); m ? (re.x = ue.x - J.minX + X, re.y = ue.y - J.minY + z) : (re.x = ue.x - J.minX + z, re.y = ue.y - J.minY + X); } - for (const Q of $.edges()) { - const ue = $.edge(Q), re = s.edge(Q); + for (const Z of $.edges()) { + const ue = $.edge(Z), re = s.edge(Z); ue.points && ue.points.length > 3 && (re.points = ue.points.map(({ x: ne, y: le }) => ({ x: ne - J.minX + (m ? X : z), y: le - J.minY + (m ? z : X) @@ -47412,8 +47424,8 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD z += Math.floor(P / 2); let $ = W; for (const J of S) { - const X = J.nodes()[0], Q = s.node(X); - m ? (Q.x = $ + Math.floor(Q.width / 2), Q.y = z) : (Q.x = z, Q.y = $ + Math.floor(Q.width / 2)), $ += rv + Q.width; + const X = J.nodes()[0], Z = s.node(X); + m ? (Z.x = $ + Math.floor(Z.width / 2), Z.y = z) : (Z.x = z, Z.y = $ + Math.floor(Z.width / 2)), $ += rv + Z.width; } z = P + rv; }; @@ -47434,7 +47446,7 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD for (const m of s.edges()) { const x = s.edge(m); if (x.points && x.points.length > 3) { - const S = aae(x.points); + const S = oae(x.points); for (const O of S) O.x += y, O.y += b; _[`${m.v}-${m.w}`] = { @@ -47466,11 +47478,11 @@ const Xie = /* @__PURE__ */ Bp(Yie), $ie = "tight-tree", rv = 100, pz = "up", PD waypoints: _ }; }; -class sae { +class uae { start() { } postMessage(e) { - const { nodes: t, nodeIds: n, idToPosition: i, rels: a, direction: o, packing: s, pixelRatio: u, forcedDelay: l = 0 } = e, c = oae(t, n, i, a, o, s, u); + const { nodes: t, nodeIds: n, idToPosition: i, rels: a, direction: o, packing: s, pixelRatio: u, forcedDelay: l = 0 } = e, c = sae(t, n, i, a, o, s, u); l ? setTimeout(() => { this.onmessage({ data: c }); }, l) : this.onmessage({ data: c }); @@ -47480,24 +47492,24 @@ class sae { close() { } } -const uae = { - port: new sae() -}, lae = () => new SharedWorker(new URL( +const lae = { + port: new uae() +}, cae = () => new SharedWorker(new URL( /* @vite-ignore */ "/assets/HierarchicalLayout.worker-DFULhk2a.js", import.meta.url ), { type: "module", name: "HierarchicalLayout" -}), cae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}), fae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - coseBilkentLayoutFallbackWorker: Fte, - createCoseBilkentLayoutWorker: Ute, - createHierarchicalLayoutWorker: lae, - hierarchicalLayoutFallbackWorker: uae + coseBilkentLayoutFallbackWorker: Ute, + createCoseBilkentLayoutWorker: zte, + createHierarchicalLayoutWorker: cae, + hierarchicalLayoutFallbackWorker: lae }, Symbol.toStringTag, { value: "Module" })); /*! For license information please see base.mjs.LICENSE.txt */ -var fae = { 5: function(r, e, t) { +var dae = { 5: function(r, e, t) { var n = this && this.__extends || /* @__PURE__ */ (function() { var m = function(x, S) { return m = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(O, E) { @@ -48149,8 +48161,8 @@ var fae = { 5: function(r, e, t) { var I, k, L, B, j = {}; (k = P, L = "@", B = k.lastIndexOf(L), I = B >= 0 ? [k.substring(0, B), k[B], k.substring(B + 1)] : ["", "", k])[1] === "@" && (j.userInfo = decodeURIComponent(I[0]), P = I[2]); var z = i((function(W, $, J) { - var X = O(W, $), Q = O(X[2], J); - return [Q[0], Q[2]]; + var X = O(W, $), Z = O(X[2], J); + return [Z[0], Z[2]]; })(P, "[", "]"), 2), H = z[0], q = z[1]; return H !== "" ? (j.host = H, I = O(q, ":")) : (I = O(P, ":"), j.host = I[0]), I[1] === ":" && (j.port = I[2]), j; })(E[0]))).path = E[1] + E[2]) : T.path = S, T; @@ -48579,8 +48591,8 @@ var fae = { 5: function(r, e, t) { var _ = b === void 0 ? {} : b, m = _.bookmarks, x = _.txConfig, S = _.database, O = _.mode, E = _.impersonatedUser, T = _.notificationFilter, P = _.beforeError, I = _.afterError, k = _.beforeComplete, L = _.afterComplete, B = new c.ResultStreamObserver({ server: this._server, beforeError: P, afterError: I, beforeComplete: k, afterComplete: L }); return B.prepareToHandleSingleResponse(), this.write(l.default.begin({ bookmarks: m, txConfig: x, database: S, mode: O, impersonatedUser: E, notificationFilter: T }), B, !0), B; }, y.prototype.run = function(b, _, m) { - var x = m === void 0 ? {} : m, S = x.bookmarks, O = x.txConfig, E = x.database, T = x.mode, P = x.impersonatedUser, I = x.notificationFilter, k = x.beforeKeys, L = x.afterKeys, B = x.beforeError, j = x.afterError, z = x.beforeComplete, H = x.afterComplete, q = x.flush, W = q === void 0 || q, $ = x.reactive, J = $ !== void 0 && $, X = x.fetchSize, Q = X === void 0 ? h : X, ue = x.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = x.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new c.ResultStreamObserver({ server: this._server, reactive: J, fetchSize: Q, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: k, afterKeys: L, beforeError: B, afterError: j, beforeComplete: z, afterComplete: H, highRecordWatermark: re, lowRecordWatermark: le }), pe = J; - return this.write(l.default.runWithMetadata(b, _, { bookmarks: S, txConfig: O, database: E, mode: T, impersonatedUser: P, notificationFilter: I }), ce, pe && W), J || this.write(l.default.pull({ n: Q }), ce, W), ce; + var x = m === void 0 ? {} : m, S = x.bookmarks, O = x.txConfig, E = x.database, T = x.mode, P = x.impersonatedUser, I = x.notificationFilter, k = x.beforeKeys, L = x.afterKeys, B = x.beforeError, j = x.afterError, z = x.beforeComplete, H = x.afterComplete, q = x.flush, W = q === void 0 || q, $ = x.reactive, J = $ !== void 0 && $, X = x.fetchSize, Z = X === void 0 ? h : X, ue = x.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = x.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new c.ResultStreamObserver({ server: this._server, reactive: J, fetchSize: Z, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: k, afterKeys: L, beforeError: B, afterError: j, beforeComplete: z, afterComplete: H, highRecordWatermark: re, lowRecordWatermark: le }), pe = J; + return this.write(l.default.runWithMetadata(b, _, { bookmarks: S, txConfig: O, database: E, mode: T, impersonatedUser: P, notificationFilter: I }), ce, pe && W), J || this.write(l.default.pull({ n: Z }), ce, W), ce; }, y; })(o.default); e.default = p; @@ -48624,45 +48636,45 @@ var fae = { 5: function(r, e, t) { const o = 2147483647; function s(Y) { if (Y > o) throw new RangeError('The value "' + Y + '" is invalid for option "size"'); - const Z = new Uint8Array(Y); - return Object.setPrototypeOf(Z, u.prototype), Z; + const Q = new Uint8Array(Y); + return Object.setPrototypeOf(Q, u.prototype), Q; } - function u(Y, Z, ie) { + function u(Y, Q, ie) { if (typeof Y == "number") { - if (typeof Z == "string") throw new TypeError('The "string" argument must be of type string. Received type number'); + if (typeof Q == "string") throw new TypeError('The "string" argument must be of type string. Received type number'); return f(Y); } - return l(Y, Z, ie); + return l(Y, Q, ie); } - function l(Y, Z, ie) { - if (typeof Y == "string") return (function(De, Ie) { + function l(Y, Q, ie) { + if (typeof Y == "string") return (function(Me, Ie) { if (typeof Ie == "string" && Ie !== "" || (Ie = "utf8"), !u.isEncoding(Ie)) throw new TypeError("Unknown encoding: " + Ie); - const Ye = 0 | g(De, Ie); + const Ye = 0 | g(Me, Ie); let ot = s(Ye); - const mt = ot.write(De, Ie); + const mt = ot.write(Me, Ie); return mt !== Ye && (ot = ot.slice(0, mt)), ot; - })(Y, Z); - if (ArrayBuffer.isView(Y)) return (function(De) { - if (Oe(De, Uint8Array)) { - const Ie = new Uint8Array(De); + })(Y, Q); + if (ArrayBuffer.isView(Y)) return (function(Me) { + if (Oe(Me, Uint8Array)) { + const Ie = new Uint8Array(Me); return h(Ie.buffer, Ie.byteOffset, Ie.byteLength); } - return d(De); + return d(Me); })(Y); if (Y == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof Y); - if (Oe(Y, ArrayBuffer) || Y && Oe(Y.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Oe(Y, SharedArrayBuffer) || Y && Oe(Y.buffer, SharedArrayBuffer))) return h(Y, Z, ie); + if (Oe(Y, ArrayBuffer) || Y && Oe(Y.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Oe(Y, SharedArrayBuffer) || Y && Oe(Y.buffer, SharedArrayBuffer))) return h(Y, Q, ie); if (typeof Y == "number") throw new TypeError('The "value" argument must not be of type number. Received type number'); const we = Y.valueOf && Y.valueOf(); - if (we != null && we !== Y) return u.from(we, Z, ie); - const Ee = (function(De) { - if (u.isBuffer(De)) { - const Ie = 0 | p(De.length), Ye = s(Ie); - return Ye.length === 0 || De.copy(Ye, 0, 0, Ie), Ye; + if (we != null && we !== Y) return u.from(we, Q, ie); + const Ee = (function(Me) { + if (u.isBuffer(Me)) { + const Ie = 0 | p(Me.length), Ye = s(Ie); + return Ye.length === 0 || Me.copy(Ye, 0, 0, Ie), Ye; } - return De.length !== void 0 ? typeof De.length != "number" || ke(De.length) ? s(0) : d(De) : De.type === "Buffer" && Array.isArray(De.data) ? d(De.data) : void 0; + return Me.length !== void 0 ? typeof Me.length != "number" || ke(Me.length) ? s(0) : d(Me) : Me.type === "Buffer" && Array.isArray(Me.data) ? d(Me.data) : void 0; })(Y); if (Ee) return Ee; - if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof Y[Symbol.toPrimitive] == "function") return u.from(Y[Symbol.toPrimitive]("string"), Z, ie); + if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof Y[Symbol.toPrimitive] == "function") return u.from(Y[Symbol.toPrimitive]("string"), Q, ie); throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof Y); } function c(Y) { @@ -48673,28 +48685,28 @@ var fae = { 5: function(r, e, t) { return c(Y), s(Y < 0 ? 0 : 0 | p(Y)); } function d(Y) { - const Z = Y.length < 0 ? 0 : 0 | p(Y.length), ie = s(Z); - for (let we = 0; we < Z; we += 1) ie[we] = 255 & Y[we]; + const Q = Y.length < 0 ? 0 : 0 | p(Y.length), ie = s(Q); + for (let we = 0; we < Q; we += 1) ie[we] = 255 & Y[we]; return ie; } - function h(Y, Z, ie) { - if (Z < 0 || Y.byteLength < Z) throw new RangeError('"offset" is outside of buffer bounds'); - if (Y.byteLength < Z + (ie || 0)) throw new RangeError('"length" is outside of buffer bounds'); + function h(Y, Q, ie) { + if (Q < 0 || Y.byteLength < Q) throw new RangeError('"offset" is outside of buffer bounds'); + if (Y.byteLength < Q + (ie || 0)) throw new RangeError('"length" is outside of buffer bounds'); let we; - return we = Z === void 0 && ie === void 0 ? new Uint8Array(Y) : ie === void 0 ? new Uint8Array(Y, Z) : new Uint8Array(Y, Z, ie), Object.setPrototypeOf(we, u.prototype), we; + return we = Q === void 0 && ie === void 0 ? new Uint8Array(Y) : ie === void 0 ? new Uint8Array(Y, Q) : new Uint8Array(Y, Q, ie), Object.setPrototypeOf(we, u.prototype), we; } function p(Y) { if (Y >= o) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o.toString(16) + " bytes"); return 0 | Y; } - function g(Y, Z) { + function g(Y, Q) { if (u.isBuffer(Y)) return Y.length; if (ArrayBuffer.isView(Y) || Oe(Y, ArrayBuffer)) return Y.byteLength; if (typeof Y != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof Y); const ie = Y.length, we = arguments.length > 2 && arguments[2] === !0; if (!we && ie === 0) return 0; let Ee = !1; - for (; ; ) switch (Z) { + for (; ; ) switch (Q) { case "ascii": case "latin1": case "binary": @@ -48713,40 +48725,40 @@ var fae = { 5: function(r, e, t) { return de(Y).length; default: if (Ee) return we ? -1 : se(Y).length; - Z = ("" + Z).toLowerCase(), Ee = !0; + Q = ("" + Q).toLowerCase(), Ee = !0; } } - function y(Y, Z, ie) { + function y(Y, Q, ie) { let we = !1; - if ((Z === void 0 || Z < 0) && (Z = 0), Z > this.length || ((ie === void 0 || ie > this.length) && (ie = this.length), ie <= 0) || (ie >>>= 0) <= (Z >>>= 0)) return ""; + if ((Q === void 0 || Q < 0) && (Q = 0), Q > this.length || ((ie === void 0 || ie > this.length) && (ie = this.length), ie <= 0) || (ie >>>= 0) <= (Q >>>= 0)) return ""; for (Y || (Y = "utf8"); ; ) switch (Y) { case "hex": - return j(this, Z, ie); + return j(this, Q, ie); case "utf8": case "utf-8": - return I(this, Z, ie); + return I(this, Q, ie); case "ascii": - return L(this, Z, ie); + return L(this, Q, ie); case "latin1": case "binary": - return B(this, Z, ie); + return B(this, Q, ie); case "base64": - return P(this, Z, ie); + return P(this, Q, ie); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return z(this, Z, ie); + return z(this, Q, ie); default: if (we) throw new TypeError("Unknown encoding: " + Y); Y = (Y + "").toLowerCase(), we = !0; } } - function b(Y, Z, ie) { - const we = Y[Z]; - Y[Z] = Y[ie], Y[ie] = we; + function b(Y, Q, ie) { + const we = Y[Q]; + Y[Q] = Y[ie], Y[ie] = we; } - function _(Y, Z, ie, we, Ee) { + function _(Y, Q, ie, we, Ee) { if (Y.length === 0) return -1; if (typeof ie == "string" ? (we = ie, ie = 0) : ie > 2147483647 ? ie = 2147483647 : ie < -2147483648 && (ie = -2147483648), ke(ie = +ie) && (ie = Ee ? 0 : Y.length - 1), ie < 0 && (ie = Y.length + ie), ie >= Y.length) { if (Ee) return -1; @@ -48755,14 +48767,14 @@ var fae = { 5: function(r, e, t) { if (!Ee) return -1; ie = 0; } - if (typeof Z == "string" && (Z = u.from(Z, we)), u.isBuffer(Z)) return Z.length === 0 ? -1 : m(Y, Z, ie, we, Ee); - if (typeof Z == "number") return Z &= 255, typeof Uint8Array.prototype.indexOf == "function" ? Ee ? Uint8Array.prototype.indexOf.call(Y, Z, ie) : Uint8Array.prototype.lastIndexOf.call(Y, Z, ie) : m(Y, [Z], ie, we, Ee); + if (typeof Q == "string" && (Q = u.from(Q, we)), u.isBuffer(Q)) return Q.length === 0 ? -1 : m(Y, Q, ie, we, Ee); + if (typeof Q == "number") return Q &= 255, typeof Uint8Array.prototype.indexOf == "function" ? Ee ? Uint8Array.prototype.indexOf.call(Y, Q, ie) : Uint8Array.prototype.lastIndexOf.call(Y, Q, ie) : m(Y, [Q], ie, we, Ee); throw new TypeError("val must be string, number or Buffer"); } - function m(Y, Z, ie, we, Ee) { - let De, Ie = 1, Ye = Y.length, ot = Z.length; + function m(Y, Q, ie, we, Ee) { + let Me, Ie = 1, Ye = Y.length, ot = Q.length; if (we !== void 0 && ((we = String(we).toLowerCase()) === "ucs2" || we === "ucs-2" || we === "utf16le" || we === "utf-16le")) { - if (Y.length < 2 || Z.length < 2) return -1; + if (Y.length < 2 || Q.length < 2) return -1; Ie = 2, Ye /= 2, ot /= 2, ie /= 2; } function mt(wt, Mt) { @@ -48770,95 +48782,95 @@ var fae = { 5: function(r, e, t) { } if (Ee) { let wt = -1; - for (De = ie; De < Ye; De++) if (mt(Y, De) === mt(Z, wt === -1 ? 0 : De - wt)) { - if (wt === -1 && (wt = De), De - wt + 1 === ot) return wt * Ie; - } else wt !== -1 && (De -= De - wt), wt = -1; - } else for (ie + ot > Ye && (ie = Ye - ot), De = ie; De >= 0; De--) { + for (Me = ie; Me < Ye; Me++) if (mt(Y, Me) === mt(Q, wt === -1 ? 0 : Me - wt)) { + if (wt === -1 && (wt = Me), Me - wt + 1 === ot) return wt * Ie; + } else wt !== -1 && (Me -= Me - wt), wt = -1; + } else for (ie + ot > Ye && (ie = Ye - ot), Me = ie; Me >= 0; Me--) { let wt = !0; - for (let Mt = 0; Mt < ot; Mt++) if (mt(Y, De + Mt) !== mt(Z, Mt)) { + for (let Mt = 0; Mt < ot; Mt++) if (mt(Y, Me + Mt) !== mt(Q, Mt)) { wt = !1; break; } - if (wt) return De; + if (wt) return Me; } return -1; } - function x(Y, Z, ie, we) { + function x(Y, Q, ie, we) { ie = Number(ie) || 0; const Ee = Y.length - ie; we ? (we = Number(we)) > Ee && (we = Ee) : we = Ee; - const De = Z.length; + const Me = Q.length; let Ie; - for (we > De / 2 && (we = De / 2), Ie = 0; Ie < we; ++Ie) { - const Ye = parseInt(Z.substr(2 * Ie, 2), 16); + for (we > Me / 2 && (we = Me / 2), Ie = 0; Ie < we; ++Ie) { + const Ye = parseInt(Q.substr(2 * Ie, 2), 16); if (ke(Ye)) return Ie; Y[ie + Ie] = Ye; } return Ie; } - function S(Y, Z, ie, we) { - return ge(se(Z, Y.length - ie), Y, ie, we); + function S(Y, Q, ie, we) { + return ge(se(Q, Y.length - ie), Y, ie, we); } - function O(Y, Z, ie, we) { + function O(Y, Q, ie, we) { return ge((function(Ee) { - const De = []; - for (let Ie = 0; Ie < Ee.length; ++Ie) De.push(255 & Ee.charCodeAt(Ie)); - return De; - })(Z), Y, ie, we); + const Me = []; + for (let Ie = 0; Ie < Ee.length; ++Ie) Me.push(255 & Ee.charCodeAt(Ie)); + return Me; + })(Q), Y, ie, we); } - function E(Y, Z, ie, we) { - return ge(de(Z), Y, ie, we); + function E(Y, Q, ie, we) { + return ge(de(Q), Y, ie, we); } - function T(Y, Z, ie, we) { - return ge((function(Ee, De) { + function T(Y, Q, ie, we) { + return ge((function(Ee, Me) { let Ie, Ye, ot; const mt = []; - for (let wt = 0; wt < Ee.length && !((De -= 2) < 0); ++wt) Ie = Ee.charCodeAt(wt), Ye = Ie >> 8, ot = Ie % 256, mt.push(ot), mt.push(Ye); + for (let wt = 0; wt < Ee.length && !((Me -= 2) < 0); ++wt) Ie = Ee.charCodeAt(wt), Ye = Ie >> 8, ot = Ie % 256, mt.push(ot), mt.push(Ye); return mt; - })(Z, Y.length - ie), Y, ie, we); + })(Q, Y.length - ie), Y, ie, we); } - function P(Y, Z, ie) { - return Z === 0 && ie === Y.length ? n.fromByteArray(Y) : n.fromByteArray(Y.slice(Z, ie)); + function P(Y, Q, ie) { + return Q === 0 && ie === Y.length ? n.fromByteArray(Y) : n.fromByteArray(Y.slice(Q, ie)); } - function I(Y, Z, ie) { + function I(Y, Q, ie) { ie = Math.min(Y.length, ie); const we = []; - let Ee = Z; + let Ee = Q; for (; Ee < ie; ) { - const De = Y[Ee]; - let Ie = null, Ye = De > 239 ? 4 : De > 223 ? 3 : De > 191 ? 2 : 1; + const Me = Y[Ee]; + let Ie = null, Ye = Me > 239 ? 4 : Me > 223 ? 3 : Me > 191 ? 2 : 1; if (Ee + Ye <= ie) { let ot, mt, wt, Mt; switch (Ye) { case 1: - De < 128 && (Ie = De); + Me < 128 && (Ie = Me); break; case 2: - ot = Y[Ee + 1], (192 & ot) == 128 && (Mt = (31 & De) << 6 | 63 & ot, Mt > 127 && (Ie = Mt)); + ot = Y[Ee + 1], (192 & ot) == 128 && (Mt = (31 & Me) << 6 | 63 & ot, Mt > 127 && (Ie = Mt)); break; case 3: - ot = Y[Ee + 1], mt = Y[Ee + 2], (192 & ot) == 128 && (192 & mt) == 128 && (Mt = (15 & De) << 12 | (63 & ot) << 6 | 63 & mt, Mt > 2047 && (Mt < 55296 || Mt > 57343) && (Ie = Mt)); + ot = Y[Ee + 1], mt = Y[Ee + 2], (192 & ot) == 128 && (192 & mt) == 128 && (Mt = (15 & Me) << 12 | (63 & ot) << 6 | 63 & mt, Mt > 2047 && (Mt < 55296 || Mt > 57343) && (Ie = Mt)); break; case 4: - ot = Y[Ee + 1], mt = Y[Ee + 2], wt = Y[Ee + 3], (192 & ot) == 128 && (192 & mt) == 128 && (192 & wt) == 128 && (Mt = (15 & De) << 18 | (63 & ot) << 12 | (63 & mt) << 6 | 63 & wt, Mt > 65535 && Mt < 1114112 && (Ie = Mt)); + ot = Y[Ee + 1], mt = Y[Ee + 2], wt = Y[Ee + 3], (192 & ot) == 128 && (192 & mt) == 128 && (192 & wt) == 128 && (Mt = (15 & Me) << 18 | (63 & ot) << 12 | (63 & mt) << 6 | 63 & wt, Mt > 65535 && Mt < 1114112 && (Ie = Mt)); } } Ie === null ? (Ie = 65533, Ye = 1) : Ie > 65535 && (Ie -= 65536, we.push(Ie >>> 10 & 1023 | 55296), Ie = 56320 | 1023 & Ie), we.push(Ie), Ee += Ye; } - return (function(De) { - const Ie = De.length; - if (Ie <= k) return String.fromCharCode.apply(String, De); + return (function(Me) { + const Ie = Me.length; + if (Ie <= k) return String.fromCharCode.apply(String, Me); let Ye = "", ot = 0; - for (; ot < Ie; ) Ye += String.fromCharCode.apply(String, De.slice(ot, ot += k)); + for (; ot < Ie; ) Ye += String.fromCharCode.apply(String, Me.slice(ot, ot += k)); return Ye; })(we); } e.kMaxLength = o, u.TYPED_ARRAY_SUPPORT = (function() { try { - const Y = new Uint8Array(1), Z = { foo: function() { + const Y = new Uint8Array(1), Q = { foo: function() { return 42; } }; - return Object.setPrototypeOf(Z, Uint8Array.prototype), Object.setPrototypeOf(Y, Z), Y.foo() === 42; + return Object.setPrototypeOf(Q, Uint8Array.prototype), Object.setPrototypeOf(Y, Q), Y.foo() === 42; } catch { return !1; } @@ -48866,24 +48878,24 @@ var fae = { 5: function(r, e, t) { if (u.isBuffer(this)) return this.buffer; } }), Object.defineProperty(u.prototype, "offset", { enumerable: !0, get: function() { if (u.isBuffer(this)) return this.byteOffset; - } }), u.poolSize = 8192, u.from = function(Y, Z, ie) { - return l(Y, Z, ie); - }, Object.setPrototypeOf(u.prototype, Uint8Array.prototype), Object.setPrototypeOf(u, Uint8Array), u.alloc = function(Y, Z, ie) { - return (function(we, Ee, De) { - return c(we), we <= 0 ? s(we) : Ee !== void 0 ? typeof De == "string" ? s(we).fill(Ee, De) : s(we).fill(Ee) : s(we); - })(Y, Z, ie); + } }), u.poolSize = 8192, u.from = function(Y, Q, ie) { + return l(Y, Q, ie); + }, Object.setPrototypeOf(u.prototype, Uint8Array.prototype), Object.setPrototypeOf(u, Uint8Array), u.alloc = function(Y, Q, ie) { + return (function(we, Ee, Me) { + return c(we), we <= 0 ? s(we) : Ee !== void 0 ? typeof Me == "string" ? s(we).fill(Ee, Me) : s(we).fill(Ee) : s(we); + })(Y, Q, ie); }, u.allocUnsafe = function(Y) { return f(Y); }, u.allocUnsafeSlow = function(Y) { return f(Y); }, u.isBuffer = function(Y) { return Y != null && Y._isBuffer === !0 && Y !== u.prototype; - }, u.compare = function(Y, Z) { - if (Oe(Y, Uint8Array) && (Y = u.from(Y, Y.offset, Y.byteLength)), Oe(Z, Uint8Array) && (Z = u.from(Z, Z.offset, Z.byteLength)), !u.isBuffer(Y) || !u.isBuffer(Z)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (Y === Z) return 0; - let ie = Y.length, we = Z.length; - for (let Ee = 0, De = Math.min(ie, we); Ee < De; ++Ee) if (Y[Ee] !== Z[Ee]) { - ie = Y[Ee], we = Z[Ee]; + }, u.compare = function(Y, Q) { + if (Oe(Y, Uint8Array) && (Y = u.from(Y, Y.offset, Y.byteLength)), Oe(Q, Uint8Array) && (Q = u.from(Q, Q.offset, Q.byteLength)), !u.isBuffer(Y) || !u.isBuffer(Q)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); + if (Y === Q) return 0; + let ie = Y.length, we = Q.length; + for (let Ee = 0, Me = Math.min(ie, we); Ee < Me; ++Ee) if (Y[Ee] !== Q[Ee]) { + ie = Y[Ee], we = Q[Ee]; break; } return ie < we ? -1 : we < ie ? 1 : 0; @@ -48904,37 +48916,37 @@ var fae = { 5: function(r, e, t) { default: return !1; } - }, u.concat = function(Y, Z) { + }, u.concat = function(Y, Q) { if (!Array.isArray(Y)) throw new TypeError('"list" argument must be an Array of Buffers'); if (Y.length === 0) return u.alloc(0); let ie; - if (Z === void 0) for (Z = 0, ie = 0; ie < Y.length; ++ie) Z += Y[ie].length; - const we = u.allocUnsafe(Z); + if (Q === void 0) for (Q = 0, ie = 0; ie < Y.length; ++ie) Q += Y[ie].length; + const we = u.allocUnsafe(Q); let Ee = 0; for (ie = 0; ie < Y.length; ++ie) { - let De = Y[ie]; - if (Oe(De, Uint8Array)) Ee + De.length > we.length ? (u.isBuffer(De) || (De = u.from(De)), De.copy(we, Ee)) : Uint8Array.prototype.set.call(we, De, Ee); + let Me = Y[ie]; + if (Oe(Me, Uint8Array)) Ee + Me.length > we.length ? (u.isBuffer(Me) || (Me = u.from(Me)), Me.copy(we, Ee)) : Uint8Array.prototype.set.call(we, Me, Ee); else { - if (!u.isBuffer(De)) throw new TypeError('"list" argument must be an Array of Buffers'); - De.copy(we, Ee); + if (!u.isBuffer(Me)) throw new TypeError('"list" argument must be an Array of Buffers'); + Me.copy(we, Ee); } - Ee += De.length; + Ee += Me.length; } return we; }, u.byteLength = g, u.prototype._isBuffer = !0, u.prototype.swap16 = function() { const Y = this.length; if (Y % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); - for (let Z = 0; Z < Y; Z += 2) b(this, Z, Z + 1); + for (let Q = 0; Q < Y; Q += 2) b(this, Q, Q + 1); return this; }, u.prototype.swap32 = function() { const Y = this.length; if (Y % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); - for (let Z = 0; Z < Y; Z += 4) b(this, Z, Z + 3), b(this, Z + 1, Z + 2); + for (let Q = 0; Q < Y; Q += 4) b(this, Q, Q + 3), b(this, Q + 1, Q + 2); return this; }, u.prototype.swap64 = function() { const Y = this.length; if (Y % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); - for (let Z = 0; Z < Y; Z += 8) b(this, Z, Z + 7), b(this, Z + 1, Z + 6), b(this, Z + 2, Z + 5), b(this, Z + 3, Z + 4); + for (let Q = 0; Q < Y; Q += 8) b(this, Q, Q + 7), b(this, Q + 1, Q + 6), b(this, Q + 2, Q + 5), b(this, Q + 3, Q + 4); return this; }, u.prototype.toString = function() { const Y = this.length; @@ -48944,299 +48956,299 @@ var fae = { 5: function(r, e, t) { return this === Y || u.compare(this, Y) === 0; }, u.prototype.inspect = function() { let Y = ""; - const Z = e.INSPECT_MAX_BYTES; - return Y = this.toString("hex", 0, Z).replace(/(.{2})/g, "$1 ").trim(), this.length > Z && (Y += " ... "), ""; - }, a && (u.prototype[a] = u.prototype.inspect), u.prototype.compare = function(Y, Z, ie, we, Ee) { + const Q = e.INSPECT_MAX_BYTES; + return Y = this.toString("hex", 0, Q).replace(/(.{2})/g, "$1 ").trim(), this.length > Q && (Y += " ... "), ""; + }, a && (u.prototype[a] = u.prototype.inspect), u.prototype.compare = function(Y, Q, ie, we, Ee) { if (Oe(Y, Uint8Array) && (Y = u.from(Y, Y.offset, Y.byteLength)), !u.isBuffer(Y)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof Y); - if (Z === void 0 && (Z = 0), ie === void 0 && (ie = Y ? Y.length : 0), we === void 0 && (we = 0), Ee === void 0 && (Ee = this.length), Z < 0 || ie > Y.length || we < 0 || Ee > this.length) throw new RangeError("out of range index"); - if (we >= Ee && Z >= ie) return 0; + if (Q === void 0 && (Q = 0), ie === void 0 && (ie = Y ? Y.length : 0), we === void 0 && (we = 0), Ee === void 0 && (Ee = this.length), Q < 0 || ie > Y.length || we < 0 || Ee > this.length) throw new RangeError("out of range index"); + if (we >= Ee && Q >= ie) return 0; if (we >= Ee) return -1; - if (Z >= ie) return 1; + if (Q >= ie) return 1; if (this === Y) return 0; - let De = (Ee >>>= 0) - (we >>>= 0), Ie = (ie >>>= 0) - (Z >>>= 0); - const Ye = Math.min(De, Ie), ot = this.slice(we, Ee), mt = Y.slice(Z, ie); + let Me = (Ee >>>= 0) - (we >>>= 0), Ie = (ie >>>= 0) - (Q >>>= 0); + const Ye = Math.min(Me, Ie), ot = this.slice(we, Ee), mt = Y.slice(Q, ie); for (let wt = 0; wt < Ye; ++wt) if (ot[wt] !== mt[wt]) { - De = ot[wt], Ie = mt[wt]; + Me = ot[wt], Ie = mt[wt]; break; } - return De < Ie ? -1 : Ie < De ? 1 : 0; - }, u.prototype.includes = function(Y, Z, ie) { - return this.indexOf(Y, Z, ie) !== -1; - }, u.prototype.indexOf = function(Y, Z, ie) { - return _(this, Y, Z, ie, !0); - }, u.prototype.lastIndexOf = function(Y, Z, ie) { - return _(this, Y, Z, ie, !1); - }, u.prototype.write = function(Y, Z, ie, we) { - if (Z === void 0) we = "utf8", ie = this.length, Z = 0; - else if (ie === void 0 && typeof Z == "string") we = Z, ie = this.length, Z = 0; + return Me < Ie ? -1 : Ie < Me ? 1 : 0; + }, u.prototype.includes = function(Y, Q, ie) { + return this.indexOf(Y, Q, ie) !== -1; + }, u.prototype.indexOf = function(Y, Q, ie) { + return _(this, Y, Q, ie, !0); + }, u.prototype.lastIndexOf = function(Y, Q, ie) { + return _(this, Y, Q, ie, !1); + }, u.prototype.write = function(Y, Q, ie, we) { + if (Q === void 0) we = "utf8", ie = this.length, Q = 0; + else if (ie === void 0 && typeof Q == "string") we = Q, ie = this.length, Q = 0; else { - if (!isFinite(Z)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); - Z >>>= 0, isFinite(ie) ? (ie >>>= 0, we === void 0 && (we = "utf8")) : (we = ie, ie = void 0); + if (!isFinite(Q)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); + Q >>>= 0, isFinite(ie) ? (ie >>>= 0, we === void 0 && (we = "utf8")) : (we = ie, ie = void 0); } - const Ee = this.length - Z; - if ((ie === void 0 || ie > Ee) && (ie = Ee), Y.length > 0 && (ie < 0 || Z < 0) || Z > this.length) throw new RangeError("Attempt to write outside buffer bounds"); + const Ee = this.length - Q; + if ((ie === void 0 || ie > Ee) && (ie = Ee), Y.length > 0 && (ie < 0 || Q < 0) || Q > this.length) throw new RangeError("Attempt to write outside buffer bounds"); we || (we = "utf8"); - let De = !1; + let Me = !1; for (; ; ) switch (we) { case "hex": - return x(this, Y, Z, ie); + return x(this, Y, Q, ie); case "utf8": case "utf-8": - return S(this, Y, Z, ie); + return S(this, Y, Q, ie); case "ascii": case "latin1": case "binary": - return O(this, Y, Z, ie); + return O(this, Y, Q, ie); case "base64": - return E(this, Y, Z, ie); + return E(this, Y, Q, ie); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": - return T(this, Y, Z, ie); + return T(this, Y, Q, ie); default: - if (De) throw new TypeError("Unknown encoding: " + we); - we = ("" + we).toLowerCase(), De = !0; + if (Me) throw new TypeError("Unknown encoding: " + we); + we = ("" + we).toLowerCase(), Me = !0; } }, u.prototype.toJSON = function() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; }; const k = 4096; - function L(Y, Z, ie) { + function L(Y, Q, ie) { let we = ""; ie = Math.min(Y.length, ie); - for (let Ee = Z; Ee < ie; ++Ee) we += String.fromCharCode(127 & Y[Ee]); + for (let Ee = Q; Ee < ie; ++Ee) we += String.fromCharCode(127 & Y[Ee]); return we; } - function B(Y, Z, ie) { + function B(Y, Q, ie) { let we = ""; ie = Math.min(Y.length, ie); - for (let Ee = Z; Ee < ie; ++Ee) we += String.fromCharCode(Y[Ee]); + for (let Ee = Q; Ee < ie; ++Ee) we += String.fromCharCode(Y[Ee]); return we; } - function j(Y, Z, ie) { + function j(Y, Q, ie) { const we = Y.length; - (!Z || Z < 0) && (Z = 0), (!ie || ie < 0 || ie > we) && (ie = we); + (!Q || Q < 0) && (Q = 0), (!ie || ie < 0 || ie > we) && (ie = we); let Ee = ""; - for (let De = Z; De < ie; ++De) Ee += Me[Y[De]]; + for (let Me = Q; Me < ie; ++Me) Ee += De[Y[Me]]; return Ee; } - function z(Y, Z, ie) { - const we = Y.slice(Z, ie); + function z(Y, Q, ie) { + const we = Y.slice(Q, ie); let Ee = ""; - for (let De = 0; De < we.length - 1; De += 2) Ee += String.fromCharCode(we[De] + 256 * we[De + 1]); + for (let Me = 0; Me < we.length - 1; Me += 2) Ee += String.fromCharCode(we[Me] + 256 * we[Me + 1]); return Ee; } - function H(Y, Z, ie) { + function H(Y, Q, ie) { if (Y % 1 != 0 || Y < 0) throw new RangeError("offset is not uint"); - if (Y + Z > ie) throw new RangeError("Trying to access beyond buffer length"); + if (Y + Q > ie) throw new RangeError("Trying to access beyond buffer length"); } - function q(Y, Z, ie, we, Ee, De) { + function q(Y, Q, ie, we, Ee, Me) { if (!u.isBuffer(Y)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (Z > Ee || Z < De) throw new RangeError('"value" argument is out of bounds'); + if (Q > Ee || Q < Me) throw new RangeError('"value" argument is out of bounds'); if (ie + we > Y.length) throw new RangeError("Index out of range"); } - function W(Y, Z, ie, we, Ee) { - le(Z, we, Ee, Y, ie, 7); - let De = Number(Z & BigInt(4294967295)); - Y[ie++] = De, De >>= 8, Y[ie++] = De, De >>= 8, Y[ie++] = De, De >>= 8, Y[ie++] = De; - let Ie = Number(Z >> BigInt(32) & BigInt(4294967295)); + function W(Y, Q, ie, we, Ee) { + le(Q, we, Ee, Y, ie, 7); + let Me = Number(Q & BigInt(4294967295)); + Y[ie++] = Me, Me >>= 8, Y[ie++] = Me, Me >>= 8, Y[ie++] = Me, Me >>= 8, Y[ie++] = Me; + let Ie = Number(Q >> BigInt(32) & BigInt(4294967295)); return Y[ie++] = Ie, Ie >>= 8, Y[ie++] = Ie, Ie >>= 8, Y[ie++] = Ie, Ie >>= 8, Y[ie++] = Ie, ie; } - function $(Y, Z, ie, we, Ee) { - le(Z, we, Ee, Y, ie, 7); - let De = Number(Z & BigInt(4294967295)); - Y[ie + 7] = De, De >>= 8, Y[ie + 6] = De, De >>= 8, Y[ie + 5] = De, De >>= 8, Y[ie + 4] = De; - let Ie = Number(Z >> BigInt(32) & BigInt(4294967295)); + function $(Y, Q, ie, we, Ee) { + le(Q, we, Ee, Y, ie, 7); + let Me = Number(Q & BigInt(4294967295)); + Y[ie + 7] = Me, Me >>= 8, Y[ie + 6] = Me, Me >>= 8, Y[ie + 5] = Me, Me >>= 8, Y[ie + 4] = Me; + let Ie = Number(Q >> BigInt(32) & BigInt(4294967295)); return Y[ie + 3] = Ie, Ie >>= 8, Y[ie + 2] = Ie, Ie >>= 8, Y[ie + 1] = Ie, Ie >>= 8, Y[ie] = Ie, ie + 8; } - function J(Y, Z, ie, we, Ee, De) { + function J(Y, Q, ie, we, Ee, Me) { if (ie + we > Y.length) throw new RangeError("Index out of range"); if (ie < 0) throw new RangeError("Index out of range"); } - function X(Y, Z, ie, we, Ee) { - return Z = +Z, ie >>>= 0, Ee || J(Y, 0, ie, 4), i.write(Y, Z, ie, we, 23, 4), ie + 4; + function X(Y, Q, ie, we, Ee) { + return Q = +Q, ie >>>= 0, Ee || J(Y, 0, ie, 4), i.write(Y, Q, ie, we, 23, 4), ie + 4; } - function Q(Y, Z, ie, we, Ee) { - return Z = +Z, ie >>>= 0, Ee || J(Y, 0, ie, 8), i.write(Y, Z, ie, we, 52, 8), ie + 8; + function Z(Y, Q, ie, we, Ee) { + return Q = +Q, ie >>>= 0, Ee || J(Y, 0, ie, 8), i.write(Y, Q, ie, we, 52, 8), ie + 8; } - u.prototype.slice = function(Y, Z) { + u.prototype.slice = function(Y, Q) { const ie = this.length; - (Y = ~~Y) < 0 ? (Y += ie) < 0 && (Y = 0) : Y > ie && (Y = ie), (Z = Z === void 0 ? ie : ~~Z) < 0 ? (Z += ie) < 0 && (Z = 0) : Z > ie && (Z = ie), Z < Y && (Z = Y); - const we = this.subarray(Y, Z); + (Y = ~~Y) < 0 ? (Y += ie) < 0 && (Y = 0) : Y > ie && (Y = ie), (Q = Q === void 0 ? ie : ~~Q) < 0 ? (Q += ie) < 0 && (Q = 0) : Q > ie && (Q = ie), Q < Y && (Q = Y); + const we = this.subarray(Y, Q); return Object.setPrototypeOf(we, u.prototype), we; - }, u.prototype.readUintLE = u.prototype.readUIntLE = function(Y, Z, ie) { - Y >>>= 0, Z >>>= 0, ie || H(Y, Z, this.length); - let we = this[Y], Ee = 1, De = 0; - for (; ++De < Z && (Ee *= 256); ) we += this[Y + De] * Ee; + }, u.prototype.readUintLE = u.prototype.readUIntLE = function(Y, Q, ie) { + Y >>>= 0, Q >>>= 0, ie || H(Y, Q, this.length); + let we = this[Y], Ee = 1, Me = 0; + for (; ++Me < Q && (Ee *= 256); ) we += this[Y + Me] * Ee; return we; - }, u.prototype.readUintBE = u.prototype.readUIntBE = function(Y, Z, ie) { - Y >>>= 0, Z >>>= 0, ie || H(Y, Z, this.length); - let we = this[Y + --Z], Ee = 1; - for (; Z > 0 && (Ee *= 256); ) we += this[Y + --Z] * Ee; + }, u.prototype.readUintBE = u.prototype.readUIntBE = function(Y, Q, ie) { + Y >>>= 0, Q >>>= 0, ie || H(Y, Q, this.length); + let we = this[Y + --Q], Ee = 1; + for (; Q > 0 && (Ee *= 256); ) we += this[Y + --Q] * Ee; return we; - }, u.prototype.readUint8 = u.prototype.readUInt8 = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 1, this.length), this[Y]; - }, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 2, this.length), this[Y] | this[Y + 1] << 8; - }, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 2, this.length), this[Y] << 8 | this[Y + 1]; - }, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), (this[Y] | this[Y + 1] << 8 | this[Y + 2] << 16) + 16777216 * this[Y + 3]; - }, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), 16777216 * this[Y] + (this[Y + 1] << 16 | this[Y + 2] << 8 | this[Y + 3]); + }, u.prototype.readUint8 = u.prototype.readUInt8 = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 1, this.length), this[Y]; + }, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 2, this.length), this[Y] | this[Y + 1] << 8; + }, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 2, this.length), this[Y] << 8 | this[Y + 1]; + }, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), (this[Y] | this[Y + 1] << 8 | this[Y + 2] << 16) + 16777216 * this[Y + 3]; + }, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), 16777216 * this[Y] + (this[Y + 1] << 16 | this[Y + 2] << 8 | this[Y + 3]); }, u.prototype.readBigUInt64LE = Ne(function(Y) { ce(Y >>>= 0, "offset"); - const Z = this[Y], ie = this[Y + 7]; - Z !== void 0 && ie !== void 0 || pe(Y, this.length - 8); - const we = Z + 256 * this[++Y] + 65536 * this[++Y] + this[++Y] * 2 ** 24, Ee = this[++Y] + 256 * this[++Y] + 65536 * this[++Y] + ie * 2 ** 24; + const Q = this[Y], ie = this[Y + 7]; + Q !== void 0 && ie !== void 0 || pe(Y, this.length - 8); + const we = Q + 256 * this[++Y] + 65536 * this[++Y] + this[++Y] * 2 ** 24, Ee = this[++Y] + 256 * this[++Y] + 65536 * this[++Y] + ie * 2 ** 24; return BigInt(we) + (BigInt(Ee) << BigInt(32)); }), u.prototype.readBigUInt64BE = Ne(function(Y) { ce(Y >>>= 0, "offset"); - const Z = this[Y], ie = this[Y + 7]; - Z !== void 0 && ie !== void 0 || pe(Y, this.length - 8); - const we = Z * 2 ** 24 + 65536 * this[++Y] + 256 * this[++Y] + this[++Y], Ee = this[++Y] * 2 ** 24 + 65536 * this[++Y] + 256 * this[++Y] + ie; + const Q = this[Y], ie = this[Y + 7]; + Q !== void 0 && ie !== void 0 || pe(Y, this.length - 8); + const we = Q * 2 ** 24 + 65536 * this[++Y] + 256 * this[++Y] + this[++Y], Ee = this[++Y] * 2 ** 24 + 65536 * this[++Y] + 256 * this[++Y] + ie; return (BigInt(we) << BigInt(32)) + BigInt(Ee); - }), u.prototype.readIntLE = function(Y, Z, ie) { - Y >>>= 0, Z >>>= 0, ie || H(Y, Z, this.length); - let we = this[Y], Ee = 1, De = 0; - for (; ++De < Z && (Ee *= 256); ) we += this[Y + De] * Ee; - return Ee *= 128, we >= Ee && (we -= Math.pow(2, 8 * Z)), we; - }, u.prototype.readIntBE = function(Y, Z, ie) { - Y >>>= 0, Z >>>= 0, ie || H(Y, Z, this.length); - let we = Z, Ee = 1, De = this[Y + --we]; - for (; we > 0 && (Ee *= 256); ) De += this[Y + --we] * Ee; - return Ee *= 128, De >= Ee && (De -= Math.pow(2, 8 * Z)), De; - }, u.prototype.readInt8 = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 1, this.length), 128 & this[Y] ? -1 * (255 - this[Y] + 1) : this[Y]; - }, u.prototype.readInt16LE = function(Y, Z) { - Y >>>= 0, Z || H(Y, 2, this.length); + }), u.prototype.readIntLE = function(Y, Q, ie) { + Y >>>= 0, Q >>>= 0, ie || H(Y, Q, this.length); + let we = this[Y], Ee = 1, Me = 0; + for (; ++Me < Q && (Ee *= 256); ) we += this[Y + Me] * Ee; + return Ee *= 128, we >= Ee && (we -= Math.pow(2, 8 * Q)), we; + }, u.prototype.readIntBE = function(Y, Q, ie) { + Y >>>= 0, Q >>>= 0, ie || H(Y, Q, this.length); + let we = Q, Ee = 1, Me = this[Y + --we]; + for (; we > 0 && (Ee *= 256); ) Me += this[Y + --we] * Ee; + return Ee *= 128, Me >= Ee && (Me -= Math.pow(2, 8 * Q)), Me; + }, u.prototype.readInt8 = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 1, this.length), 128 & this[Y] ? -1 * (255 - this[Y] + 1) : this[Y]; + }, u.prototype.readInt16LE = function(Y, Q) { + Y >>>= 0, Q || H(Y, 2, this.length); const ie = this[Y] | this[Y + 1] << 8; return 32768 & ie ? 4294901760 | ie : ie; - }, u.prototype.readInt16BE = function(Y, Z) { - Y >>>= 0, Z || H(Y, 2, this.length); + }, u.prototype.readInt16BE = function(Y, Q) { + Y >>>= 0, Q || H(Y, 2, this.length); const ie = this[Y + 1] | this[Y] << 8; return 32768 & ie ? 4294901760 | ie : ie; - }, u.prototype.readInt32LE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), this[Y] | this[Y + 1] << 8 | this[Y + 2] << 16 | this[Y + 3] << 24; - }, u.prototype.readInt32BE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), this[Y] << 24 | this[Y + 1] << 16 | this[Y + 2] << 8 | this[Y + 3]; + }, u.prototype.readInt32LE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), this[Y] | this[Y + 1] << 8 | this[Y + 2] << 16 | this[Y + 3] << 24; + }, u.prototype.readInt32BE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), this[Y] << 24 | this[Y + 1] << 16 | this[Y + 2] << 8 | this[Y + 3]; }, u.prototype.readBigInt64LE = Ne(function(Y) { ce(Y >>>= 0, "offset"); - const Z = this[Y], ie = this[Y + 7]; - Z !== void 0 && ie !== void 0 || pe(Y, this.length - 8); + const Q = this[Y], ie = this[Y + 7]; + Q !== void 0 && ie !== void 0 || pe(Y, this.length - 8); const we = this[Y + 4] + 256 * this[Y + 5] + 65536 * this[Y + 6] + (ie << 24); - return (BigInt(we) << BigInt(32)) + BigInt(Z + 256 * this[++Y] + 65536 * this[++Y] + this[++Y] * 2 ** 24); + return (BigInt(we) << BigInt(32)) + BigInt(Q + 256 * this[++Y] + 65536 * this[++Y] + this[++Y] * 2 ** 24); }), u.prototype.readBigInt64BE = Ne(function(Y) { ce(Y >>>= 0, "offset"); - const Z = this[Y], ie = this[Y + 7]; - Z !== void 0 && ie !== void 0 || pe(Y, this.length - 8); - const we = (Z << 24) + 65536 * this[++Y] + 256 * this[++Y] + this[++Y]; + const Q = this[Y], ie = this[Y + 7]; + Q !== void 0 && ie !== void 0 || pe(Y, this.length - 8); + const we = (Q << 24) + 65536 * this[++Y] + 256 * this[++Y] + this[++Y]; return (BigInt(we) << BigInt(32)) + BigInt(this[++Y] * 2 ** 24 + 65536 * this[++Y] + 256 * this[++Y] + ie); - }), u.prototype.readFloatLE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), i.read(this, Y, !0, 23, 4); - }, u.prototype.readFloatBE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 4, this.length), i.read(this, Y, !1, 23, 4); - }, u.prototype.readDoubleLE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 8, this.length), i.read(this, Y, !0, 52, 8); - }, u.prototype.readDoubleBE = function(Y, Z) { - return Y >>>= 0, Z || H(Y, 8, this.length), i.read(this, Y, !1, 52, 8); - }, u.prototype.writeUintLE = u.prototype.writeUIntLE = function(Y, Z, ie, we) { - Y = +Y, Z >>>= 0, ie >>>= 0, we || q(this, Y, Z, ie, Math.pow(2, 8 * ie) - 1, 0); - let Ee = 1, De = 0; - for (this[Z] = 255 & Y; ++De < ie && (Ee *= 256); ) this[Z + De] = Y / Ee & 255; - return Z + ie; - }, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(Y, Z, ie, we) { - Y = +Y, Z >>>= 0, ie >>>= 0, we || q(this, Y, Z, ie, Math.pow(2, 8 * ie) - 1, 0); - let Ee = ie - 1, De = 1; - for (this[Z + Ee] = 255 & Y; --Ee >= 0 && (De *= 256); ) this[Z + Ee] = Y / De & 255; - return Z + ie; - }, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 1, 255, 0), this[Z] = 255 & Y, Z + 1; - }, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 2, 65535, 0), this[Z] = 255 & Y, this[Z + 1] = Y >>> 8, Z + 2; - }, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 2, 65535, 0), this[Z] = Y >>> 8, this[Z + 1] = 255 & Y, Z + 2; - }, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 4, 4294967295, 0), this[Z + 3] = Y >>> 24, this[Z + 2] = Y >>> 16, this[Z + 1] = Y >>> 8, this[Z] = 255 & Y, Z + 4; - }, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 4, 4294967295, 0), this[Z] = Y >>> 24, this[Z + 1] = Y >>> 16, this[Z + 2] = Y >>> 8, this[Z + 3] = 255 & Y, Z + 4; - }, u.prototype.writeBigUInt64LE = Ne(function(Y, Z = 0) { - return W(this, Y, Z, BigInt(0), BigInt("0xffffffffffffffff")); - }), u.prototype.writeBigUInt64BE = Ne(function(Y, Z = 0) { - return $(this, Y, Z, BigInt(0), BigInt("0xffffffffffffffff")); - }), u.prototype.writeIntLE = function(Y, Z, ie, we) { - if (Y = +Y, Z >>>= 0, !we) { + }), u.prototype.readFloatLE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), i.read(this, Y, !0, 23, 4); + }, u.prototype.readFloatBE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 4, this.length), i.read(this, Y, !1, 23, 4); + }, u.prototype.readDoubleLE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 8, this.length), i.read(this, Y, !0, 52, 8); + }, u.prototype.readDoubleBE = function(Y, Q) { + return Y >>>= 0, Q || H(Y, 8, this.length), i.read(this, Y, !1, 52, 8); + }, u.prototype.writeUintLE = u.prototype.writeUIntLE = function(Y, Q, ie, we) { + Y = +Y, Q >>>= 0, ie >>>= 0, we || q(this, Y, Q, ie, Math.pow(2, 8 * ie) - 1, 0); + let Ee = 1, Me = 0; + for (this[Q] = 255 & Y; ++Me < ie && (Ee *= 256); ) this[Q + Me] = Y / Ee & 255; + return Q + ie; + }, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(Y, Q, ie, we) { + Y = +Y, Q >>>= 0, ie >>>= 0, we || q(this, Y, Q, ie, Math.pow(2, 8 * ie) - 1, 0); + let Ee = ie - 1, Me = 1; + for (this[Q + Ee] = 255 & Y; --Ee >= 0 && (Me *= 256); ) this[Q + Ee] = Y / Me & 255; + return Q + ie; + }, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 1, 255, 0), this[Q] = 255 & Y, Q + 1; + }, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 2, 65535, 0), this[Q] = 255 & Y, this[Q + 1] = Y >>> 8, Q + 2; + }, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 2, 65535, 0), this[Q] = Y >>> 8, this[Q + 1] = 255 & Y, Q + 2; + }, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 4, 4294967295, 0), this[Q + 3] = Y >>> 24, this[Q + 2] = Y >>> 16, this[Q + 1] = Y >>> 8, this[Q] = 255 & Y, Q + 4; + }, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 4, 4294967295, 0), this[Q] = Y >>> 24, this[Q + 1] = Y >>> 16, this[Q + 2] = Y >>> 8, this[Q + 3] = 255 & Y, Q + 4; + }, u.prototype.writeBigUInt64LE = Ne(function(Y, Q = 0) { + return W(this, Y, Q, BigInt(0), BigInt("0xffffffffffffffff")); + }), u.prototype.writeBigUInt64BE = Ne(function(Y, Q = 0) { + return $(this, Y, Q, BigInt(0), BigInt("0xffffffffffffffff")); + }), u.prototype.writeIntLE = function(Y, Q, ie, we) { + if (Y = +Y, Q >>>= 0, !we) { const Ye = Math.pow(2, 8 * ie - 1); - q(this, Y, Z, ie, Ye - 1, -Ye); + q(this, Y, Q, ie, Ye - 1, -Ye); } - let Ee = 0, De = 1, Ie = 0; - for (this[Z] = 255 & Y; ++Ee < ie && (De *= 256); ) Y < 0 && Ie === 0 && this[Z + Ee - 1] !== 0 && (Ie = 1), this[Z + Ee] = (Y / De | 0) - Ie & 255; - return Z + ie; - }, u.prototype.writeIntBE = function(Y, Z, ie, we) { - if (Y = +Y, Z >>>= 0, !we) { + let Ee = 0, Me = 1, Ie = 0; + for (this[Q] = 255 & Y; ++Ee < ie && (Me *= 256); ) Y < 0 && Ie === 0 && this[Q + Ee - 1] !== 0 && (Ie = 1), this[Q + Ee] = (Y / Me | 0) - Ie & 255; + return Q + ie; + }, u.prototype.writeIntBE = function(Y, Q, ie, we) { + if (Y = +Y, Q >>>= 0, !we) { const Ye = Math.pow(2, 8 * ie - 1); - q(this, Y, Z, ie, Ye - 1, -Ye); - } - let Ee = ie - 1, De = 1, Ie = 0; - for (this[Z + Ee] = 255 & Y; --Ee >= 0 && (De *= 256); ) Y < 0 && Ie === 0 && this[Z + Ee + 1] !== 0 && (Ie = 1), this[Z + Ee] = (Y / De | 0) - Ie & 255; - return Z + ie; - }, u.prototype.writeInt8 = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 1, 127, -128), Y < 0 && (Y = 255 + Y + 1), this[Z] = 255 & Y, Z + 1; - }, u.prototype.writeInt16LE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 2, 32767, -32768), this[Z] = 255 & Y, this[Z + 1] = Y >>> 8, Z + 2; - }, u.prototype.writeInt16BE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 2, 32767, -32768), this[Z] = Y >>> 8, this[Z + 1] = 255 & Y, Z + 2; - }, u.prototype.writeInt32LE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 4, 2147483647, -2147483648), this[Z] = 255 & Y, this[Z + 1] = Y >>> 8, this[Z + 2] = Y >>> 16, this[Z + 3] = Y >>> 24, Z + 4; - }, u.prototype.writeInt32BE = function(Y, Z, ie) { - return Y = +Y, Z >>>= 0, ie || q(this, Y, Z, 4, 2147483647, -2147483648), Y < 0 && (Y = 4294967295 + Y + 1), this[Z] = Y >>> 24, this[Z + 1] = Y >>> 16, this[Z + 2] = Y >>> 8, this[Z + 3] = 255 & Y, Z + 4; - }, u.prototype.writeBigInt64LE = Ne(function(Y, Z = 0) { - return W(this, Y, Z, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); - }), u.prototype.writeBigInt64BE = Ne(function(Y, Z = 0) { - return $(this, Y, Z, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); - }), u.prototype.writeFloatLE = function(Y, Z, ie) { - return X(this, Y, Z, !0, ie); - }, u.prototype.writeFloatBE = function(Y, Z, ie) { - return X(this, Y, Z, !1, ie); - }, u.prototype.writeDoubleLE = function(Y, Z, ie) { - return Q(this, Y, Z, !0, ie); - }, u.prototype.writeDoubleBE = function(Y, Z, ie) { - return Q(this, Y, Z, !1, ie); - }, u.prototype.copy = function(Y, Z, ie, we) { + q(this, Y, Q, ie, Ye - 1, -Ye); + } + let Ee = ie - 1, Me = 1, Ie = 0; + for (this[Q + Ee] = 255 & Y; --Ee >= 0 && (Me *= 256); ) Y < 0 && Ie === 0 && this[Q + Ee + 1] !== 0 && (Ie = 1), this[Q + Ee] = (Y / Me | 0) - Ie & 255; + return Q + ie; + }, u.prototype.writeInt8 = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 1, 127, -128), Y < 0 && (Y = 255 + Y + 1), this[Q] = 255 & Y, Q + 1; + }, u.prototype.writeInt16LE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 2, 32767, -32768), this[Q] = 255 & Y, this[Q + 1] = Y >>> 8, Q + 2; + }, u.prototype.writeInt16BE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 2, 32767, -32768), this[Q] = Y >>> 8, this[Q + 1] = 255 & Y, Q + 2; + }, u.prototype.writeInt32LE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 4, 2147483647, -2147483648), this[Q] = 255 & Y, this[Q + 1] = Y >>> 8, this[Q + 2] = Y >>> 16, this[Q + 3] = Y >>> 24, Q + 4; + }, u.prototype.writeInt32BE = function(Y, Q, ie) { + return Y = +Y, Q >>>= 0, ie || q(this, Y, Q, 4, 2147483647, -2147483648), Y < 0 && (Y = 4294967295 + Y + 1), this[Q] = Y >>> 24, this[Q + 1] = Y >>> 16, this[Q + 2] = Y >>> 8, this[Q + 3] = 255 & Y, Q + 4; + }, u.prototype.writeBigInt64LE = Ne(function(Y, Q = 0) { + return W(this, Y, Q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }), u.prototype.writeBigInt64BE = Ne(function(Y, Q = 0) { + return $(this, Y, Q, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }), u.prototype.writeFloatLE = function(Y, Q, ie) { + return X(this, Y, Q, !0, ie); + }, u.prototype.writeFloatBE = function(Y, Q, ie) { + return X(this, Y, Q, !1, ie); + }, u.prototype.writeDoubleLE = function(Y, Q, ie) { + return Z(this, Y, Q, !0, ie); + }, u.prototype.writeDoubleBE = function(Y, Q, ie) { + return Z(this, Y, Q, !1, ie); + }, u.prototype.copy = function(Y, Q, ie, we) { if (!u.isBuffer(Y)) throw new TypeError("argument should be a Buffer"); - if (ie || (ie = 0), we || we === 0 || (we = this.length), Z >= Y.length && (Z = Y.length), Z || (Z = 0), we > 0 && we < ie && (we = ie), we === ie || Y.length === 0 || this.length === 0) return 0; - if (Z < 0) throw new RangeError("targetStart out of bounds"); + if (ie || (ie = 0), we || we === 0 || (we = this.length), Q >= Y.length && (Q = Y.length), Q || (Q = 0), we > 0 && we < ie && (we = ie), we === ie || Y.length === 0 || this.length === 0) return 0; + if (Q < 0) throw new RangeError("targetStart out of bounds"); if (ie < 0 || ie >= this.length) throw new RangeError("Index out of range"); if (we < 0) throw new RangeError("sourceEnd out of bounds"); - we > this.length && (we = this.length), Y.length - Z < we - ie && (we = Y.length - Z + ie); + we > this.length && (we = this.length), Y.length - Q < we - ie && (we = Y.length - Q + ie); const Ee = we - ie; - return this === Y && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(Z, ie, we) : Uint8Array.prototype.set.call(Y, this.subarray(ie, we), Z), Ee; - }, u.prototype.fill = function(Y, Z, ie, we) { + return this === Y && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(Q, ie, we) : Uint8Array.prototype.set.call(Y, this.subarray(ie, we), Q), Ee; + }, u.prototype.fill = function(Y, Q, ie, we) { if (typeof Y == "string") { - if (typeof Z == "string" ? (we = Z, Z = 0, ie = this.length) : typeof ie == "string" && (we = ie, ie = this.length), we !== void 0 && typeof we != "string") throw new TypeError("encoding must be a string"); + if (typeof Q == "string" ? (we = Q, Q = 0, ie = this.length) : typeof ie == "string" && (we = ie, ie = this.length), we !== void 0 && typeof we != "string") throw new TypeError("encoding must be a string"); if (typeof we == "string" && !u.isEncoding(we)) throw new TypeError("Unknown encoding: " + we); if (Y.length === 1) { - const De = Y.charCodeAt(0); - (we === "utf8" && De < 128 || we === "latin1") && (Y = De); + const Me = Y.charCodeAt(0); + (we === "utf8" && Me < 128 || we === "latin1") && (Y = Me); } } else typeof Y == "number" ? Y &= 255 : typeof Y == "boolean" && (Y = Number(Y)); - if (Z < 0 || this.length < Z || this.length < ie) throw new RangeError("Out of range index"); - if (ie <= Z) return this; + if (Q < 0 || this.length < Q || this.length < ie) throw new RangeError("Out of range index"); + if (ie <= Q) return this; let Ee; - if (Z >>>= 0, ie = ie === void 0 ? this.length : ie >>> 0, Y || (Y = 0), typeof Y == "number") for (Ee = Z; Ee < ie; ++Ee) this[Ee] = Y; + if (Q >>>= 0, ie = ie === void 0 ? this.length : ie >>> 0, Y || (Y = 0), typeof Y == "number") for (Ee = Q; Ee < ie; ++Ee) this[Ee] = Y; else { - const De = u.isBuffer(Y) ? Y : u.from(Y, we), Ie = De.length; + const Me = u.isBuffer(Y) ? Y : u.from(Y, we), Ie = Me.length; if (Ie === 0) throw new TypeError('The value "' + Y + '" is invalid for argument "value"'); - for (Ee = 0; Ee < ie - Z; ++Ee) this[Ee + Z] = De[Ee % Ie]; + for (Ee = 0; Ee < ie - Q; ++Ee) this[Ee + Q] = Me[Ee % Ie]; } return this; }; const ue = {}; - function re(Y, Z, ie) { + function re(Y, Q, ie) { ue[Y] = class extends ie { constructor() { - super(), Object.defineProperty(this, "message", { value: Z.apply(this, arguments), writable: !0, configurable: !0 }), this.name = `${this.name} [${Y}]`, this.stack, delete this.name; + super(), Object.defineProperty(this, "message", { value: Q.apply(this, arguments), writable: !0, configurable: !0 }), this.name = `${this.name} [${Y}]`, this.stack, delete this.name; } get code() { return Y; @@ -49250,104 +49262,104 @@ var fae = { 5: function(r, e, t) { }; } function ne(Y) { - let Z = "", ie = Y.length; + let Q = "", ie = Y.length; const we = Y[0] === "-" ? 1 : 0; - for (; ie >= we + 4; ie -= 3) Z = `_${Y.slice(ie - 3, ie)}${Z}`; - return `${Y.slice(0, ie)}${Z}`; + for (; ie >= we + 4; ie -= 3) Q = `_${Y.slice(ie - 3, ie)}${Q}`; + return `${Y.slice(0, ie)}${Q}`; } - function le(Y, Z, ie, we, Ee, De) { - if (Y > ie || Y < Z) { - const Ie = typeof Z == "bigint" ? "n" : ""; + function le(Y, Q, ie, we, Ee, Me) { + if (Y > ie || Y < Q) { + const Ie = typeof Q == "bigint" ? "n" : ""; let Ye; - throw Ye = Z === 0 || Z === BigInt(0) ? `>= 0${Ie} and < 2${Ie} ** ${8 * (De + 1)}${Ie}` : `>= -(2${Ie} ** ${8 * (De + 1) - 1}${Ie}) and < 2 ** ${8 * (De + 1) - 1}${Ie}`, new ue.ERR_OUT_OF_RANGE("value", Ye, Y); + throw Ye = Q === 0 || Q === BigInt(0) ? `>= 0${Ie} and < 2${Ie} ** ${8 * (Me + 1)}${Ie}` : `>= -(2${Ie} ** ${8 * (Me + 1) - 1}${Ie}) and < 2 ** ${8 * (Me + 1) - 1}${Ie}`, new ue.ERR_OUT_OF_RANGE("value", Ye, Y); } (function(Ie, Ye, ot) { ce(Ye, "offset"), Ie[Ye] !== void 0 && Ie[Ye + ot] !== void 0 || pe(Ye, Ie.length - (ot + 1)); - })(we, Ee, De); + })(we, Ee, Me); } - function ce(Y, Z) { - if (typeof Y != "number") throw new ue.ERR_INVALID_ARG_TYPE(Z, "number", Y); + function ce(Y, Q) { + if (typeof Y != "number") throw new ue.ERR_INVALID_ARG_TYPE(Q, "number", Y); } - function pe(Y, Z, ie) { - throw Math.floor(Y) !== Y ? (ce(Y, ie), new ue.ERR_OUT_OF_RANGE("offset", "an integer", Y)) : Z < 0 ? new ue.ERR_BUFFER_OUT_OF_BOUNDS() : new ue.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${Z}`, Y); + function pe(Y, Q, ie) { + throw Math.floor(Y) !== Y ? (ce(Y, ie), new ue.ERR_OUT_OF_RANGE("offset", "an integer", Y)) : Q < 0 ? new ue.ERR_BUFFER_OUT_OF_BOUNDS() : new ue.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${Q}`, Y); } re("ERR_BUFFER_OUT_OF_BOUNDS", function(Y) { return Y ? `${Y} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds"; - }, RangeError), re("ERR_INVALID_ARG_TYPE", function(Y, Z) { - return `The "${Y}" argument must be of type number. Received type ${typeof Z}`; - }, TypeError), re("ERR_OUT_OF_RANGE", function(Y, Z, ie) { + }, RangeError), re("ERR_INVALID_ARG_TYPE", function(Y, Q) { + return `The "${Y}" argument must be of type number. Received type ${typeof Q}`; + }, TypeError), re("ERR_OUT_OF_RANGE", function(Y, Q, ie) { let we = `The value of "${Y}" is out of range.`, Ee = ie; - return Number.isInteger(ie) && Math.abs(ie) > 2 ** 32 ? Ee = ne(String(ie)) : typeof ie == "bigint" && (Ee = String(ie), (ie > BigInt(2) ** BigInt(32) || ie < -(BigInt(2) ** BigInt(32))) && (Ee = ne(Ee)), Ee += "n"), we += ` It must be ${Z}. Received ${Ee}`, we; + return Number.isInteger(ie) && Math.abs(ie) > 2 ** 32 ? Ee = ne(String(ie)) : typeof ie == "bigint" && (Ee = String(ie), (ie > BigInt(2) ** BigInt(32) || ie < -(BigInt(2) ** BigInt(32))) && (Ee = ne(Ee)), Ee += "n"), we += ` It must be ${Q}. Received ${Ee}`, we; }, RangeError); const fe = /[^+/0-9A-Za-z-_]/g; - function se(Y, Z) { + function se(Y, Q) { let ie; - Z = Z || 1 / 0; + Q = Q || 1 / 0; const we = Y.length; let Ee = null; - const De = []; + const Me = []; for (let Ie = 0; Ie < we; ++Ie) { if (ie = Y.charCodeAt(Ie), ie > 55295 && ie < 57344) { if (!Ee) { if (ie > 56319) { - (Z -= 3) > -1 && De.push(239, 191, 189); + (Q -= 3) > -1 && Me.push(239, 191, 189); continue; } if (Ie + 1 === we) { - (Z -= 3) > -1 && De.push(239, 191, 189); + (Q -= 3) > -1 && Me.push(239, 191, 189); continue; } Ee = ie; continue; } if (ie < 56320) { - (Z -= 3) > -1 && De.push(239, 191, 189), Ee = ie; + (Q -= 3) > -1 && Me.push(239, 191, 189), Ee = ie; continue; } ie = 65536 + (Ee - 55296 << 10 | ie - 56320); - } else Ee && (Z -= 3) > -1 && De.push(239, 191, 189); + } else Ee && (Q -= 3) > -1 && Me.push(239, 191, 189); if (Ee = null, ie < 128) { - if ((Z -= 1) < 0) break; - De.push(ie); + if ((Q -= 1) < 0) break; + Me.push(ie); } else if (ie < 2048) { - if ((Z -= 2) < 0) break; - De.push(ie >> 6 | 192, 63 & ie | 128); + if ((Q -= 2) < 0) break; + Me.push(ie >> 6 | 192, 63 & ie | 128); } else if (ie < 65536) { - if ((Z -= 3) < 0) break; - De.push(ie >> 12 | 224, ie >> 6 & 63 | 128, 63 & ie | 128); + if ((Q -= 3) < 0) break; + Me.push(ie >> 12 | 224, ie >> 6 & 63 | 128, 63 & ie | 128); } else { if (!(ie < 1114112)) throw new Error("Invalid code point"); - if ((Z -= 4) < 0) break; - De.push(ie >> 18 | 240, ie >> 12 & 63 | 128, ie >> 6 & 63 | 128, 63 & ie | 128); + if ((Q -= 4) < 0) break; + Me.push(ie >> 18 | 240, ie >> 12 & 63 | 128, ie >> 6 & 63 | 128, 63 & ie | 128); } } - return De; + return Me; } function de(Y) { - return n.toByteArray((function(Z) { - if ((Z = (Z = Z.split("=")[0]).trim().replace(fe, "")).length < 2) return ""; - for (; Z.length % 4 != 0; ) Z += "="; - return Z; + return n.toByteArray((function(Q) { + if ((Q = (Q = Q.split("=")[0]).trim().replace(fe, "")).length < 2) return ""; + for (; Q.length % 4 != 0; ) Q += "="; + return Q; })(Y)); } - function ge(Y, Z, ie, we) { + function ge(Y, Q, ie, we) { let Ee; - for (Ee = 0; Ee < we && !(Ee + ie >= Z.length || Ee >= Y.length); ++Ee) Z[Ee + ie] = Y[Ee]; + for (Ee = 0; Ee < we && !(Ee + ie >= Q.length || Ee >= Y.length); ++Ee) Q[Ee + ie] = Y[Ee]; return Ee; } - function Oe(Y, Z) { - return Y instanceof Z || Y != null && Y.constructor != null && Y.constructor.name != null && Y.constructor.name === Z.name; + function Oe(Y, Q) { + return Y instanceof Q || Y != null && Y.constructor != null && Y.constructor.name != null && Y.constructor.name === Q.name; } function ke(Y) { return Y != Y; } - const Me = (function() { - const Y = "0123456789abcdef", Z = new Array(256); + const De = (function() { + const Y = "0123456789abcdef", Q = new Array(256); for (let ie = 0; ie < 16; ++ie) { const we = 16 * ie; - for (let Ee = 0; Ee < 16; ++Ee) Z[we + Ee] = Y[ie] + Y[Ee]; + for (let Ee = 0; Ee < 16; ++Ee) Q[we + Ee] = Y[ie] + Y[Ee]; } - return Z; + return Q; })(); function Ne(Y) { return typeof BigInt > "u" ? Ce : Y; @@ -49393,7 +49405,7 @@ var fae = { 5: function(r, e, t) { return b(y._config, y._log); }))), this._transformer; }, enumerable: !1, configurable: !0 }), g.prototype.run = function(y, b, _) { - var m = _ === void 0 ? {} : _, x = m.bookmarks, S = m.txConfig, O = m.database, E = m.mode, T = m.impersonatedUser, P = m.notificationFilter, I = m.beforeKeys, k = m.afterKeys, L = m.beforeError, B = m.afterError, j = m.beforeComplete, z = m.afterComplete, H = m.flush, q = H === void 0 || H, W = m.reactive, $ = W !== void 0 && W, J = m.fetchSize, X = J === void 0 ? d : J, Q = m.highRecordWatermark, ue = Q === void 0 ? Number.MAX_VALUE : Q, re = m.lowRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = m.onDb, ce = new l.ResultStreamObserver({ server: this._server, reactive: $, fetchSize: X, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: I, afterKeys: k, beforeError: L, afterError: B, beforeComplete: j, afterComplete: z, highRecordWatermark: ue, lowRecordWatermark: ne, enrichMetadata: this._enrichMetadata, onDb: le }), pe = $; + var m = _ === void 0 ? {} : _, x = m.bookmarks, S = m.txConfig, O = m.database, E = m.mode, T = m.impersonatedUser, P = m.notificationFilter, I = m.beforeKeys, k = m.afterKeys, L = m.beforeError, B = m.afterError, j = m.beforeComplete, z = m.afterComplete, H = m.flush, q = H === void 0 || H, W = m.reactive, $ = W !== void 0 && W, J = m.fetchSize, X = J === void 0 ? d : J, Z = m.highRecordWatermark, ue = Z === void 0 ? Number.MAX_VALUE : Z, re = m.lowRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = m.onDb, ce = new l.ResultStreamObserver({ server: this._server, reactive: $, fetchSize: X, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: I, afterKeys: k, beforeError: L, afterError: B, beforeComplete: j, afterComplete: z, highRecordWatermark: ue, lowRecordWatermark: ne, enrichMetadata: this._enrichMetadata, onDb: le }), pe = $; return this.write(u.default.runWithMetadata5x5(y, b, { bookmarks: x, txConfig: S, database: O, mode: E, impersonatedUser: T, notificationFilter: P }), ce, pe && q), $ || this.write(u.default.pull({ n: X }), ce, q), ce; }, g; })(a.default); @@ -49478,7 +49490,7 @@ var fae = { 5: function(r, e, t) { J(ne); } } - function Q(re) { + function Z(re) { try { ue(W.throw(re)); } catch (ne) { @@ -49489,7 +49501,7 @@ var fae = { 5: function(r, e, t) { var ne; re.done ? $(re.value) : (ne = re.value, ne instanceof q ? ne : new q(function(le) { le(ne); - })).then(X, Q); + })).then(X, Z); } ue((W = W.apply(z, H || [])).next()); }); @@ -49498,10 +49510,10 @@ var fae = { 5: function(r, e, t) { if (1 & $[0]) throw $[1]; return $[1]; }, trys: [], ops: [] }; - return J = { next: Q(0), throw: Q(1), return: Q(2) }, typeof Symbol == "function" && (J[Symbol.iterator] = function() { + return J = { next: Z(0), throw: Z(1), return: Z(2) }, typeof Symbol == "function" && (J[Symbol.iterator] = function() { return this; }), J; - function Q(ue) { + function Z(ue) { return function(re) { return (function(ne) { if (q) throw new TypeError("Generator is already executing."); @@ -49708,7 +49720,7 @@ var fae = { 5: function(r, e, t) { if ("encrypted" in q || "trust" in q) throw new Error("Encryption/trust can only be configured either through URL or config, not both"); q.encrypted = g, q.trust = W, q.clientCertificate = (0, u.resolveCertificateProvider)(q.clientCertificate); } - var Q = (function(ne) { + var Z = (function(ne) { if (typeof (le = ne) == "object" && le != null && "getToken" in le && "handleSecurityException" in le && typeof le.getToken == "function" && typeof le.handleSecurityException == "function") return ne; var le, ce = ne; return (ce = ce || {}).scheme = ce.scheme || "none", (0, u.staticAuthTokenManager)({ authToken: ce }); @@ -49717,11 +49729,11 @@ var fae = { 5: function(r, e, t) { var ue = _.fromUrl($.hostAndPort), re = { address: ue, typename: J ? "Routing" : "Direct", routing: J }; return new o.Driver(re, q, (function() { if (J) return function(ne, le, ce, pe) { - return new l.RoutingConnectionProvider({ id: ne, config: le, log: ce, hostNameResolver: pe, authTokenManager: Q, address: ue, userAgent: le.userAgent, boltAgent: le.boltAgent, routingContext: $.query }); + return new l.RoutingConnectionProvider({ id: ne, config: le, log: ce, hostNameResolver: pe, authTokenManager: Z, address: ue, userAgent: le.userAgent, boltAgent: le.boltAgent, routingContext: $.query }); }; if (!b($.query)) throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(z, "'")); return function(ne, le, ce) { - return new l.DirectConnectionProvider({ id: ne, config: le, log: ce, authTokenManager: Q, address: ue, userAgent: le.userAgent, boltAgent: le.boltAgent }); + return new l.DirectConnectionProvider({ id: ne, config: le, log: ce, authTokenManager: Z, address: ue, userAgent: le.userAgent, boltAgent: le.boltAgent }); }; })()); } @@ -50447,10 +50459,10 @@ var fae = { 5: function(r, e, t) { var O = S.routingContext, E = O === void 0 ? {} : O, T = S.databaseName, P = T === void 0 ? null : T, I = S.impersonatedUser, k = I === void 0 ? null : I, L = S.sessionContext, B = L === void 0 ? {} : L, j = S.onError, z = S.onCompleted, H = new l.RouteObserver({ onProtocolError: this._onProtocolError, onError: j, onCompleted: z }), q = B.bookmarks || b.empty(); return this.write(u.default.routeV4x4(E, q.values(), { databaseName: P, impersonatedUser: k }), H, !0), H; }, x.prototype.run = function(S, O, E) { - var T = E === void 0 ? {} : E, P = T.bookmarks, I = T.txConfig, k = T.database, L = T.mode, B = T.impersonatedUser, j = T.notificationFilter, z = T.beforeKeys, H = T.afterKeys, q = T.beforeError, W = T.afterError, $ = T.beforeComplete, J = T.afterComplete, X = T.flush, Q = X === void 0 || X, ue = T.reactive, re = ue !== void 0 && ue, ne = T.fetchSize, le = ne === void 0 ? y : ne, ce = T.highRecordWatermark, pe = ce === void 0 ? Number.MAX_VALUE : ce, fe = T.lowRecordWatermark, se = fe === void 0 ? Number.MAX_VALUE : fe, de = new l.ResultStreamObserver({ server: this._server, reactive: re, fetchSize: le, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: pe, lowRecordWatermark: se }); + var T = E === void 0 ? {} : E, P = T.bookmarks, I = T.txConfig, k = T.database, L = T.mode, B = T.impersonatedUser, j = T.notificationFilter, z = T.beforeKeys, H = T.afterKeys, q = T.beforeError, W = T.afterError, $ = T.beforeComplete, J = T.afterComplete, X = T.flush, Z = X === void 0 || X, ue = T.reactive, re = ue !== void 0 && ue, ne = T.fetchSize, le = ne === void 0 ? y : ne, ce = T.highRecordWatermark, pe = ce === void 0 ? Number.MAX_VALUE : ce, fe = T.lowRecordWatermark, se = fe === void 0 ? Number.MAX_VALUE : fe, de = new l.ResultStreamObserver({ server: this._server, reactive: re, fetchSize: le, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: pe, lowRecordWatermark: se }); (0, c.assertNotificationFilterIsEmpty)(j, this._onProtocolError, de); var ge = re; - return this.write(u.default.runWithMetadata(S, O, { bookmarks: P, txConfig: I, database: k, mode: L, impersonatedUser: B }), de, ge && Q), re || this.write(u.default.pull({ n: le }), de, Q), de; + return this.write(u.default.runWithMetadata(S, O, { bookmarks: P, txConfig: I, database: k, mode: L, impersonatedUser: B }), de, ge && Z), re || this.write(u.default.pull({ n: le }), de, Z), de; }, x.prototype.beginTransaction = function(S) { var O = S === void 0 ? {} : S, E = O.bookmarks, T = O.txConfig, P = O.database, I = O.mode, k = O.impersonatedUser, L = O.notificationFilter, B = O.beforeError, j = O.afterError, z = O.beforeComplete, H = O.afterComplete, q = new l.ResultStreamObserver({ server: this._server, beforeError: B, afterError: j, beforeComplete: z, afterComplete: H }); return q.prepareToHandleSingleResponse(), (0, c.assertNotificationFilterIsEmpty)(L, this._onProtocolError, q), this.write(u.default.begin({ bookmarks: E, txConfig: T, database: P, mode: I, impersonatedUser: k }), q, !0), q; @@ -51486,7 +51498,7 @@ var fae = { 5: function(r, e, t) { var T = E === void 0 ? {} : E, P = T.bookmarks, I = T.txConfig, k = T.database, L = T.impersonatedUser, B = T.notificationFilter, j = T.mode, z = T.beforeError, H = T.afterError, q = T.beforeComplete, W = T.afterComplete, $ = new l.ResultStreamObserver({ server: this._server, beforeError: z, afterError: H, beforeComplete: q, afterComplete: W }); return $.prepareToHandleSingleResponse(), (0, u.assertImpersonatedUserIsEmpty)(L, this._onProtocolError, $), (0, u.assertNotificationFilterIsEmpty)(B, this._onProtocolError, $), this.write(s.default.begin({ bookmarks: P, txConfig: I, database: k, mode: j }), $, !0), $; }, O.prototype.run = function(E, T, P) { - var I = P === void 0 ? {} : P, k = I.bookmarks, L = I.txConfig, B = I.database, j = I.impersonatedUser, z = I.notificationFilter, H = I.mode, q = I.beforeKeys, W = I.afterKeys, $ = I.beforeError, J = I.afterError, X = I.beforeComplete, Q = I.afterComplete, ue = I.flush, re = ue === void 0 || ue, ne = I.reactive, le = ne !== void 0 && ne, ce = I.fetchSize, pe = ce === void 0 ? g : ce, fe = I.highRecordWatermark, se = fe === void 0 ? Number.MAX_VALUE : fe, de = I.lowRecordWatermark, ge = de === void 0 ? Number.MAX_VALUE : de, Oe = new l.ResultStreamObserver({ server: this._server, reactive: le, fetchSize: pe, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: q, afterKeys: W, beforeError: $, afterError: J, beforeComplete: X, afterComplete: Q, highRecordWatermark: se, lowRecordWatermark: ge }); + var I = P === void 0 ? {} : P, k = I.bookmarks, L = I.txConfig, B = I.database, j = I.impersonatedUser, z = I.notificationFilter, H = I.mode, q = I.beforeKeys, W = I.afterKeys, $ = I.beforeError, J = I.afterError, X = I.beforeComplete, Z = I.afterComplete, ue = I.flush, re = ue === void 0 || ue, ne = I.reactive, le = ne !== void 0 && ne, ce = I.fetchSize, pe = ce === void 0 ? g : ce, fe = I.highRecordWatermark, se = fe === void 0 ? Number.MAX_VALUE : fe, de = I.lowRecordWatermark, ge = de === void 0 ? Number.MAX_VALUE : de, Oe = new l.ResultStreamObserver({ server: this._server, reactive: le, fetchSize: pe, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: q, afterKeys: W, beforeError: $, afterError: J, beforeComplete: X, afterComplete: Z, highRecordWatermark: se, lowRecordWatermark: ge }); (0, u.assertImpersonatedUserIsEmpty)(j, this._onProtocolError, Oe), (0, u.assertNotificationFilterIsEmpty)(z, this._onProtocolError, Oe); var ke = le; return this.write(s.default.runWithMetadata(E, T, { bookmarks: k, txConfig: L, database: B, mode: H }), Oe, ke && re), le || this.write(s.default.pull({ n: pe }), Oe, re), Oe; @@ -52193,15 +52205,15 @@ var fae = { 5: function(r, e, t) { }; }, 3206: (r, e, t) => { r.exports = function(E) { - var T, P, I, k = 0, L = 0, B = u, j = [], z = [], H = 1, q = 0, W = 0, $ = !1, J = !1, X = "", Q = a, ue = n; - (E = E || {}).version === "300 es" && (Q = s, ue = o); + var T, P, I, k = 0, L = 0, B = u, j = [], z = [], H = 1, q = 0, W = 0, $ = !1, J = !1, X = "", Z = a, ue = n; + (E = E || {}).version === "300 es" && (Z = s, ue = o); var re = {}, ne = {}; - for (k = 0; k < Q.length; k++) re[Q[k]] = !0; + for (k = 0; k < Z.length; k++) re[Z[k]] = !0; for (k = 0; k < ue.length; k++) ne[ue[k]] = !0; return function(Y) { - return z = [], Y !== null ? (function(Z) { + return z = [], Y !== null ? (function(Q) { var ie; - for (k = 0, Z.toString && (Z = Z.toString()), X += Z.replace(/\r\n/g, ` + for (k = 0, Q.toString && (Q = Q.toString()), X += Q.replace(/\r\n/g, ` `), I = X.length; T = X[k], k < I; ) { switch (ie = k, B) { case c: @@ -52217,7 +52229,7 @@ var fae = { 5: function(r, e, t) { k = ge(); break; case p: - k = Me(); + k = De(); break; case S: k = ke(); @@ -52279,8 +52291,8 @@ var fae = { 5: function(r, e, t) { return j.push(T), P = T, k + 1; } function Oe(Y) { - for (var Z, ie, we = 0; ; ) { - if (Z = i.indexOf(Y.slice(0, Y.length + we).join("")), ie = i[Z], Z === -1) { + for (var Q, ie, we = 0; ; ) { + if (Q = i.indexOf(Y.slice(0, Y.length + we).join("")), ie = i[Q], Q === -1) { if (we-- + Y.length > 0) continue; ie = Y.slice(0, 1).join(""); } @@ -52290,7 +52302,7 @@ var fae = { 5: function(r, e, t) { function ke() { return /[^a-fA-F0-9]/.test(T) ? (le(j.join("")), B = u, k) : (j.push(T), P = T, k + 1); } - function Me() { + function De() { return T === "." || /[eE]/.test(T) ? (j.push(T), B = g, P = T, k + 1) : T === "x" && j.length === 1 && j[0] === "0" ? (B = S, j.push(T), P = T, k + 1) : /[^\d]/.test(T) ? (le(j.join("")), B = u, k) : (j.push(T), P = T, k + 1); } function Ne() { @@ -54879,10 +54891,10 @@ var fae = { 5: function(r, e, t) { }, 5250: function(r, e, t) { var n; r = t.nmd(r), (function() { - var i, a = "Expected a function", o = "__lodash_hash_undefined__", s = "__lodash_placeholder__", u = 32, l = 128, c = 1 / 0, f = 9007199254740991, d = NaN, h = 4294967295, p = [["ary", l], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", u], ["partialRight", 64], ["rearg", 256]], g = "[object Arguments]", y = "[object Array]", b = "[object Boolean]", _ = "[object Date]", m = "[object Error]", x = "[object Function]", S = "[object GeneratorFunction]", O = "[object Map]", E = "[object Number]", T = "[object Object]", P = "[object Promise]", I = "[object RegExp]", k = "[object Set]", L = "[object String]", B = "[object Symbol]", j = "[object WeakMap]", z = "[object ArrayBuffer]", H = "[object DataView]", q = "[object Float32Array]", W = "[object Float64Array]", $ = "[object Int8Array]", J = "[object Int16Array]", X = "[object Int32Array]", Q = "[object Uint8Array]", ue = "[object Uint8ClampedArray]", re = "[object Uint16Array]", ne = "[object Uint32Array]", le = /\b__p \+= '';/g, ce = /\b(__p \+=) '' \+/g, pe = /(__e\(.*?\)|\b__t\)) \+\n'';/g, fe = /&(?:amp|lt|gt|quot|#39);/g, se = /[&<>"']/g, de = RegExp(fe.source), ge = RegExp(se.source), Oe = /<%-([\s\S]+?)%>/g, ke = /<%([\s\S]+?)%>/g, Me = /<%=([\s\S]+?)%>/g, Ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ce = /^\w*$/, Y = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Z = /[\\^$.*+?()[\]{}|]/g, ie = RegExp(Z.source), we = /^\s+/, Ee = /\s/, De = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ie = /\{\n\/\* \[wrapped with (.+)\] \*/, Ye = /,? & /, ot = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, mt = /[()=,{}\[\]\/\s]/, wt = /\\(\\)?/g, Mt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Dt = /\w*$/, vt = /^[-+]0x[0-9a-f]+$/i, tt = /^0b[01]+$/i, _e = /^\[object .+?Constructor\]$/, Ue = /^0o[0-7]+$/i, Qe = /^(?:0|[1-9]\d*)$/, Ze = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, nt = /($^)/, It = /['\n\r\u2028\u2029\\]/g, ct = "\\ud800-\\udfff", Lt = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Rt = "\\u2700-\\u27bf", jt = "a-z\\xdf-\\xf6\\xf8-\\xff", Yt = "A-Z\\xc0-\\xd6\\xd8-\\xde", sr = "\\ufe0e\\ufe0f", Ut = "\\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", Rr = "[" + ct + "]", Xt = "[" + Ut + "]", Vr = "[" + Lt + "]", Br = "\\d+", mr = "[" + Rt + "]", ur = "[" + jt + "]", sn = "[^" + ct + Ut + Br + Rt + jt + Yt + "]", Fr = "\\ud83c[\\udffb-\\udfff]", un = "[^" + ct + "]", bn = "(?:\\ud83c[\\udde6-\\uddff]){2}", wn = "[\\ud800-\\udbff][\\udc00-\\udfff]", _n = "[" + Yt + "]", xn = "\\u200d", on = "(?:" + ur + "|" + sn + ")", Nn = "(?:" + _n + "|" + sn + ")", fi = "(?:['’](?:d|ll|m|re|s|t|ve))?", gn = "(?:['’](?:D|LL|M|RE|S|T|VE))?", yn = "(?:" + Vr + "|" + Fr + ")?", Jn = "[" + sr + "]?", _i = Jn + yn + "(?:" + xn + "(?:" + [un, bn, wn].join("|") + ")" + Jn + yn + ")*", Ir = "(?:" + [mr, bn, wn].join("|") + ")" + _i, pa = "(?:" + [un + Vr + "?", Vr, bn, wn, Rr].join("|") + ")", di = RegExp("['’]", "g"), Bt = RegExp(Vr, "g"), hr = RegExp(Fr + "(?=" + Fr + ")|" + pa + _i, "g"), ei = RegExp([_n + "?" + ur + "+" + fi + "(?=" + [Xt, _n, "$"].join("|") + ")", Nn + "+" + gn + "(?=" + [Xt, _n + on, "$"].join("|") + ")", _n + "?" + on + "+" + fi, _n + "+" + gn, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Br, Ir].join("|"), "g"), Hn = RegExp("[" + xn + ct + Lt + sr + "]"), fs = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Na = ["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"], ki = -1, Wr = {}; - Wr[q] = Wr[W] = Wr[$] = Wr[J] = Wr[X] = Wr[Q] = Wr[ue] = Wr[re] = Wr[ne] = !0, Wr[g] = Wr[y] = Wr[z] = Wr[b] = Wr[H] = Wr[_] = Wr[m] = Wr[x] = Wr[O] = Wr[E] = Wr[T] = Wr[I] = Wr[k] = Wr[L] = Wr[j] = !1; + var i, a = "Expected a function", o = "__lodash_hash_undefined__", s = "__lodash_placeholder__", u = 32, l = 128, c = 1 / 0, f = 9007199254740991, d = NaN, h = 4294967295, p = [["ary", l], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", u], ["partialRight", 64], ["rearg", 256]], g = "[object Arguments]", y = "[object Array]", b = "[object Boolean]", _ = "[object Date]", m = "[object Error]", x = "[object Function]", S = "[object GeneratorFunction]", O = "[object Map]", E = "[object Number]", T = "[object Object]", P = "[object Promise]", I = "[object RegExp]", k = "[object Set]", L = "[object String]", B = "[object Symbol]", j = "[object WeakMap]", z = "[object ArrayBuffer]", H = "[object DataView]", q = "[object Float32Array]", W = "[object Float64Array]", $ = "[object Int8Array]", J = "[object Int16Array]", X = "[object Int32Array]", Z = "[object Uint8Array]", ue = "[object Uint8ClampedArray]", re = "[object Uint16Array]", ne = "[object Uint32Array]", le = /\b__p \+= '';/g, ce = /\b(__p \+=) '' \+/g, pe = /(__e\(.*?\)|\b__t\)) \+\n'';/g, fe = /&(?:amp|lt|gt|quot|#39);/g, se = /[&<>"']/g, de = RegExp(fe.source), ge = RegExp(se.source), Oe = /<%-([\s\S]+?)%>/g, ke = /<%([\s\S]+?)%>/g, De = /<%=([\s\S]+?)%>/g, Ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ce = /^\w*$/, Y = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Q = /[\\^$.*+?()[\]{}|]/g, ie = RegExp(Q.source), we = /^\s+/, Ee = /\s/, Me = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ie = /\{\n\/\* \[wrapped with (.+)\] \*/, Ye = /,? & /, ot = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, mt = /[()=,{}\[\]\/\s]/, wt = /\\(\\)?/g, Mt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Dt = /\w*$/, vt = /^[-+]0x[0-9a-f]+$/i, tt = /^0b[01]+$/i, _e = /^\[object .+?Constructor\]$/, Ue = /^0o[0-7]+$/i, Qe = /^(?:0|[1-9]\d*)$/, Ze = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, nt = /($^)/, It = /['\n\r\u2028\u2029\\]/g, ct = "\\ud800-\\udfff", Lt = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Rt = "\\u2700-\\u27bf", jt = "a-z\\xdf-\\xf6\\xf8-\\xff", Yt = "A-Z\\xc0-\\xd6\\xd8-\\xde", sr = "\\ufe0e\\ufe0f", Ut = "\\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", Rr = "[" + ct + "]", Xt = "[" + Ut + "]", Vr = "[" + Lt + "]", Br = "\\d+", mr = "[" + Rt + "]", ur = "[" + jt + "]", sn = "[^" + ct + Ut + Br + Rt + jt + Yt + "]", Fr = "\\ud83c[\\udffb-\\udfff]", un = "[^" + ct + "]", bn = "(?:\\ud83c[\\udde6-\\uddff]){2}", wn = "[\\ud800-\\udbff][\\udc00-\\udfff]", _n = "[" + Yt + "]", xn = "\\u200d", on = "(?:" + ur + "|" + sn + ")", Nn = "(?:" + _n + "|" + sn + ")", fi = "(?:['’](?:d|ll|m|re|s|t|ve))?", gn = "(?:['’](?:D|LL|M|RE|S|T|VE))?", yn = "(?:" + Vr + "|" + Fr + ")?", Jn = "[" + sr + "]?", _i = Jn + yn + "(?:" + xn + "(?:" + [un, bn, wn].join("|") + ")" + Jn + yn + ")*", Ir = "(?:" + [mr, bn, wn].join("|") + ")" + _i, pa = "(?:" + [un + Vr + "?", Vr, bn, wn, Rr].join("|") + ")", di = RegExp("['’]", "g"), Bt = RegExp(Vr, "g"), hr = RegExp(Fr + "(?=" + Fr + ")|" + pa + _i, "g"), ei = RegExp([_n + "?" + ur + "+" + fi + "(?=" + [Xt, _n, "$"].join("|") + ")", Nn + "+" + gn + "(?=" + [Xt, _n + on, "$"].join("|") + ")", _n + "?" + on + "+" + fi, _n + "+" + gn, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Br, Ir].join("|"), "g"), Hn = RegExp("[" + xn + ct + Lt + sr + "]"), fs = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Na = ["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"], ki = -1, Wr = {}; + Wr[q] = Wr[W] = Wr[$] = Wr[J] = Wr[X] = Wr[Z] = Wr[ue] = Wr[re] = Wr[ne] = !0, Wr[g] = Wr[y] = Wr[z] = Wr[b] = Wr[H] = Wr[_] = Wr[m] = Wr[x] = Wr[O] = Wr[E] = Wr[T] = Wr[I] = Wr[k] = Wr[L] = Wr[j] = !1; var Nr = {}; - Nr[g] = Nr[y] = Nr[z] = Nr[H] = Nr[b] = Nr[_] = Nr[q] = Nr[W] = Nr[$] = Nr[J] = Nr[X] = Nr[O] = Nr[E] = Nr[T] = Nr[I] = Nr[k] = Nr[L] = Nr[B] = Nr[Q] = Nr[ue] = Nr[re] = Nr[ne] = !0, Nr[m] = Nr[x] = Nr[j] = !1; + Nr[g] = Nr[y] = Nr[z] = Nr[H] = Nr[b] = Nr[_] = Nr[q] = Nr[W] = Nr[$] = Nr[J] = Nr[X] = Nr[O] = Nr[E] = Nr[T] = Nr[I] = Nr[k] = Nr[L] = Nr[B] = Nr[Z] = Nr[ue] = Nr[re] = Nr[ne] = !0, Nr[m] = Nr[x] = Nr[j] = !1; var na = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }, Fs = parseFloat, hu = parseInt, ga = typeof t.g == "object" && t.g && t.g.Object === Object && t.g, Us = typeof self == "object" && self && self.Object === Object && self, Ln = ga || Us || Function("return this")(), Ii = e && !e.nodeType && e, Ni = Ii && r && !r.nodeType && r, Pc = Ni && Ni.exports === Ii, vu = Pc && ga.process, ia = (function() { try { return Ni && Ni.require && Ni.require("util").types || vu && vu.binding && vu.binding("util"); @@ -55090,7 +55102,7 @@ var fae = { 5: function(r, e, t) { return xt; } var uo = Ju({ "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }), Vo = (function st(xt) { - var pt, Wt = (xt = xt == null ? Ln : Vo.defaults(Ln.Object(), xt, Vo.pick(Ln, Na))).Array, ir = xt.Date, En = xt.Error, oa = xt.Function, ja = xt.Math, Kn = xt.Object, ec = xt.RegExp, xi = xt.String, ba = xt.TypeError, cf = Wt.prototype, Ev = oa.prototype, rl = Kn.prototype, Dd = xt["__core-js_shared__"], kd = Ev.toString, Fn = rl.hasOwnProperty, Sv = 0, Hf = (pt = /[^.]+$/.exec(Dd && Dd.keys && Dd.keys.IE_PROTO || "")) ? "Symbol(src)_1." + pt : "", nl = rl.toString, Ov = kd.call(Kn), Wf = Ln._, ff = ec("^" + kd.call(Fn).replace(Z, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Gs = Pc ? xt.Buffer : i, bu = xt.Symbol, kc = xt.Uint8Array, Ah = Gs ? Gs.allocUnsafe : i, tc = Jl(Kn.getPrototypeOf, Kn), Yf = Kn.create, Ic = rl.propertyIsEnumerable, _u = cf.splice, xo = bu ? bu.isConcatSpreadable : i, Nc = bu ? bu.iterator : i, Vs = bu ? bu.toStringTag : i, df = (function() { + var pt, Wt = (xt = xt == null ? Ln : Vo.defaults(Ln.Object(), xt, Vo.pick(Ln, Na))).Array, ir = xt.Date, En = xt.Error, oa = xt.Function, ja = xt.Math, Kn = xt.Object, ec = xt.RegExp, xi = xt.String, ba = xt.TypeError, cf = Wt.prototype, Ev = oa.prototype, rl = Kn.prototype, Dd = xt["__core-js_shared__"], kd = Ev.toString, Fn = rl.hasOwnProperty, Sv = 0, Hf = (pt = /[^.]+$/.exec(Dd && Dd.keys && Dd.keys.IE_PROTO || "")) ? "Symbol(src)_1." + pt : "", nl = rl.toString, Ov = kd.call(Kn), Wf = Ln._, ff = ec("^" + kd.call(Fn).replace(Q, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Gs = Pc ? xt.Buffer : i, bu = xt.Symbol, kc = xt.Uint8Array, Ah = Gs ? Gs.allocUnsafe : i, tc = Jl(Kn.getPrototypeOf, Kn), Yf = Kn.create, Ic = rl.propertyIsEnumerable, _u = cf.splice, xo = bu ? bu.isConcatSpreadable : i, Nc = bu ? bu.iterator : i, Vs = bu ? bu.toStringTag : i, df = (function() { try { var R = Os(Kn, "defineProperty"); return R({}, "", {}), R; @@ -55237,7 +55249,7 @@ var fae = { 5: function(r, e, t) { case $: case J: case X: - case Q: + case Z: case ue: case re: case ne: @@ -55301,7 +55313,7 @@ var fae = { 5: function(r, e, t) { } return et; } - be.templateSettings = { escape: Oe, evaluate: ke, interpolate: Me, variable: "", imports: { _: be } }, be.prototype = Ho.prototype, be.prototype.constructor = be, Ei.prototype = al(Ho.prototype), Ei.prototype.constructor = Ei, nn.prototype = al(Ho.prototype), nn.prototype.constructor = nn, ol.prototype.clear = function() { + be.templateSettings = { escape: Oe, evaluate: ke, interpolate: De, variable: "", imports: { _: be } }, be.prototype = Ho.prototype, be.prototype.constructor = be, Ei.prototype = al(Ho.prototype), Ei.prototype.constructor = Ei, nn.prototype = al(Ho.prototype), nn.prototype.constructor = nn, ol.prototype.clear = function() { this.__data__ = pf ? pf(null) : {}, this.size = 0; }, ol.prototype.delete = function(R) { var N = this.has(R) && delete this.__data__[R]; @@ -56301,7 +56313,7 @@ var fae = { 5: function(r, e, t) { var je = Re.length; if (!je) return he; var He = je - 1; - return Re[He] = (je > 1 ? "& " : "") + Re[He], Re = Re.join(je > 2 ? ", " : " "), he.replace(De, `{ + return Re[He] = (je > 1 ? "& " : "") + Re[He], Re = Re.join(je > 2 ? ", " : " "), he.replace(Me, `{ /* [wrapped with ` + Re + `] */ `); })(te, (function(he, Re) { @@ -57145,7 +57157,7 @@ var fae = { 5: function(r, e, t) { }, be.eq = Do, be.escape = function(R) { return (R = Dn(R)) && ge.test(R) ? R.replace(se, uf) : R; }, be.escapeRegExp = function(R) { - return (R = Dn(R)) && ie.test(R) ? R.replace(Z, "\\$&") : R; + return (R = Dn(R)) && ie.test(R) ? R.replace(Q, "\\$&") : R; }, be.every = function(R, N, G) { var te = Ur(R) ? Gf : Cv; return G && Xr(R, N, G) && (N = i), te(R, er(N, 3)); @@ -57332,7 +57344,7 @@ var fae = { 5: function(r, e, t) { }, be.template = function(R, N, G) { var te = be.templateSettings; G && Xr(R, N, G) && (N = i), R = Dn(R), N = dd({}, N, te, Zi); - var he, Re, je = dd({}, N.imports, te.imports, Zi), He = xa(je), et = Zl(je, He), yt = 0, Et = N.interpolate || nt, At = "__p += '", $t = ec((N.escape || nt).source + "|" + Et.source + "|" + (Et === Me ? Mt : nt).source + "|" + (N.evaluate || nt).source + "|$", "g"), tr = "//# sourceURL=" + (Fn.call(N, "sourceURL") ? (N.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++ki + "]") + ` + var he, Re, je = dd({}, N.imports, te.imports, Zi), He = xa(je), et = Zl(je, He), yt = 0, Et = N.interpolate || nt, At = "__p += '", $t = ec((N.escape || nt).source + "|" + Et.source + "|" + (Et === De ? Mt : nt).source + "|" + (N.evaluate || nt).source + "|$", "g"), tr = "//# sourceURL=" + (Fn.call(N, "sourceURL") ? (N.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++ki + "]") + ` `; R.replace($t, function(Nt, lr, Gt, Lr, jr, qn) { return Gt || (Gt = Lr), At += R.slice(yt, qn).replace(It, Ql), lr && (he = !0, At += `' + @@ -58139,8 +58151,8 @@ function print() { __p += __j.call(arguments, '') } if (!le && !ce) throw (0, l.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(re, " and id: ").concat(ne)); var pe = [void 0, void 0]; return le && ((0, u.assertNumberOrInteger)(re, "Time zone offset in seconds"), pe[0] = re), ce && ((0, u.assertString)(ne, "Time zone ID"), s.assertValidZoneId("Time zone ID", ne), pe[1] = ne), pe; - })($, J), 2), Q = X[0], ue = X[1]; - this.timeZoneOffsetSeconds = Q, this.timeZoneId = ue ?? void 0, Object.freeze(this); + })($, J), 2), Z = X[0], ue = X[1]; + this.timeZoneOffsetSeconds = Z, this.timeZoneId = ue ?? void 0, Object.freeze(this); } return k.fromStandardDate = function(L, B) { return I(L, B), new k(L.getFullYear(), L.getMonth() + 1, L.getDate(), L.getHours(), L.getMinutes(), L.getSeconds(), (0, c.toNumber)(s.totalNanoseconds(L, B)), s.timeZoneOffsetInSeconds(L), null); @@ -58309,8 +58321,8 @@ function print() { __p += __j.call(arguments, '') } var u = t(2696), l = t(6587), c = t(326), f = t(9691), d = s(t(9512)), h = t(3618), p = t(6189), g = t(9730), y = t(754), b = s(t(4569)), _ = s(t(5909)), m = t(6030), x = (function() { function S(O) { var E, T = O.mode, P = O.connectionProvider, I = O.bookmarks, k = O.database, L = O.config, B = O.reactive, j = O.fetchSize, z = O.impersonatedUser, H = O.bookmarkManager, q = O.notificationFilter, W = O.auth, $ = O.log, J = O.homeDatabaseCallback; - this._mode = T, this._database = k, this._reactive = B, this._fetchSize = j, this._homeDatabaseCallback = J, this._auth = W, this._getConnectionAcquistionBookmarks = this._getConnectionAcquistionBookmarks.bind(this), this._readConnectionHolder = new h.ConnectionHolder({ mode: c.ACCESS_MODE_READ, auth: W, database: k, bookmarks: I, connectionProvider: P, impersonatedUser: z, onDatabaseNameResolved: this._onDatabaseNameResolved.bind(this), getConnectionAcquistionBookmarks: this._getConnectionAcquistionBookmarks, log: $ }), this._writeConnectionHolder = new h.ConnectionHolder({ mode: c.ACCESS_MODE_WRITE, auth: W, database: k, bookmarks: I, connectionProvider: P, impersonatedUser: z, onDatabaseNameResolved: this._onDatabaseNameResolved.bind(this), getConnectionAcquistionBookmarks: this._getConnectionAcquistionBookmarks, log: $ }), this._open = !0, this._hasTx = !1, this._impersonatedUser = z, this._lastBookmarks = I ?? g.Bookmarks.empty(), this._configuredBookmarks = this._lastBookmarks, this._transactionExecutor = (function(Q) { - var ue, re = (ue = Q == null ? void 0 : Q.maxTransactionRetryTime) !== null && ue !== void 0 ? ue : null; + this._mode = T, this._database = k, this._reactive = B, this._fetchSize = j, this._homeDatabaseCallback = J, this._auth = W, this._getConnectionAcquistionBookmarks = this._getConnectionAcquistionBookmarks.bind(this), this._readConnectionHolder = new h.ConnectionHolder({ mode: c.ACCESS_MODE_READ, auth: W, database: k, bookmarks: I, connectionProvider: P, impersonatedUser: z, onDatabaseNameResolved: this._onDatabaseNameResolved.bind(this), getConnectionAcquistionBookmarks: this._getConnectionAcquistionBookmarks, log: $ }), this._writeConnectionHolder = new h.ConnectionHolder({ mode: c.ACCESS_MODE_WRITE, auth: W, database: k, bookmarks: I, connectionProvider: P, impersonatedUser: z, onDatabaseNameResolved: this._onDatabaseNameResolved.bind(this), getConnectionAcquistionBookmarks: this._getConnectionAcquistionBookmarks, log: $ }), this._open = !0, this._hasTx = !1, this._impersonatedUser = z, this._lastBookmarks = I ?? g.Bookmarks.empty(), this._configuredBookmarks = this._lastBookmarks, this._transactionExecutor = (function(Z) { + var ue, re = (ue = Z == null ? void 0 : Z.maxTransactionRetryTime) !== null && ue !== void 0 ? ue : null; return new p.TransactionExecutor(re); })(L), this._databaseNameResolved = this._database !== ""; var X = this._calculateWatermaks(); @@ -58731,8 +58743,8 @@ function print() { __p += __j.call(arguments, '') } var O = S === void 0 ? {} : S, E = O.beforeError, T = O.afterError, P = O.beforeComplete, I = O.afterComplete, k = new l.ResultStreamObserver({ server: this._server, beforeError: E, afterError: T, beforeComplete: P, afterComplete: I }); return k.prepareToHandleSingleResponse(), this.write(s.default.rollback(), k, !0), k; }, x.prototype.run = function(S, O, E) { - var T = E === void 0 ? {} : E, P = T.bookmarks, I = T.txConfig, k = T.database, L = T.impersonatedUser, B = T.notificationFilter, j = T.mode, z = T.beforeKeys, H = T.afterKeys, q = T.beforeError, W = T.afterError, $ = T.beforeComplete, J = T.afterComplete, X = T.flush, Q = X === void 0 || X, ue = T.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = T.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new l.ResultStreamObserver({ server: this._server, beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: re, lowRecordWatermark: le }); - return (0, u.assertDatabaseIsEmpty)(k, this._onProtocolError, ce), (0, u.assertImpersonatedUserIsEmpty)(L, this._onProtocolError, ce), (0, u.assertNotificationFilterIsEmpty)(B, this._onProtocolError, ce), this.write(s.default.runWithMetadata(S, O, { bookmarks: P, txConfig: I, mode: j }), ce, !1), this.write(s.default.pullAll(), ce, Q), ce; + var T = E === void 0 ? {} : E, P = T.bookmarks, I = T.txConfig, k = T.database, L = T.impersonatedUser, B = T.notificationFilter, j = T.mode, z = T.beforeKeys, H = T.afterKeys, q = T.beforeError, W = T.afterError, $ = T.beforeComplete, J = T.afterComplete, X = T.flush, Z = X === void 0 || X, ue = T.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = T.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new l.ResultStreamObserver({ server: this._server, beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: re, lowRecordWatermark: le }); + return (0, u.assertDatabaseIsEmpty)(k, this._onProtocolError, ce), (0, u.assertImpersonatedUserIsEmpty)(L, this._onProtocolError, ce), (0, u.assertNotificationFilterIsEmpty)(B, this._onProtocolError, ce), this.write(s.default.runWithMetadata(S, O, { bookmarks: P, txConfig: I, mode: j }), ce, !1), this.write(s.default.pullAll(), ce, Z), ce; }, x.prototype.requestRoutingInformation = function(S) { var O, E = S.routingContext, T = E === void 0 ? {} : E, P = S.sessionContext, I = P === void 0 ? {} : P, k = S.onError, L = S.onCompleted, B = this.run(y, ((O = {})[g] = T, O), i(i({}, I), { txConfig: p.empty() })); return new l.ProcedureRouteObserver({ resultObserver: B, onProtocolError: this._onProtocolError, onError: k, onCompleted: L }); @@ -58922,7 +58934,7 @@ function print() { __p += __j.call(arguments, '') } var m = _ === void 0 ? {} : _, x = m.bookmarks, S = m.txConfig, O = m.database, E = m.mode, T = m.impersonatedUser, P = m.notificationFilter, I = m.beforeError, k = m.afterError, L = m.beforeComplete, B = m.afterComplete, j = new c.ResultStreamObserver({ server: this._server, beforeError: I, afterError: k, beforeComplete: L, afterComplete: B }); return j.prepareToHandleSingleResponse(), this.write(l.default.begin5x5({ bookmarks: x, txConfig: S, database: O, mode: E, impersonatedUser: T, notificationFilter: P }), j, !0), j; }, b.prototype.run = function(_, m, x) { - var S = x === void 0 ? {} : x, O = S.bookmarks, E = S.txConfig, T = S.database, P = S.mode, I = S.impersonatedUser, k = S.notificationFilter, L = S.beforeKeys, B = S.afterKeys, j = S.beforeError, z = S.afterError, H = S.beforeComplete, q = S.afterComplete, W = S.flush, $ = W === void 0 || W, J = S.reactive, X = J !== void 0 && J, Q = S.fetchSize, ue = Q === void 0 ? h : Q, re = S.highRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = S.lowRecordWatermark, ce = le === void 0 ? Number.MAX_VALUE : le, pe = new c.ResultStreamObserver({ server: this._server, reactive: X, fetchSize: ue, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: L, afterKeys: B, beforeError: j, afterError: z, beforeComplete: H, afterComplete: q, highRecordWatermark: ne, lowRecordWatermark: ce, enrichMetadata: this._enrichMetadata }), fe = X; + var S = x === void 0 ? {} : x, O = S.bookmarks, E = S.txConfig, T = S.database, P = S.mode, I = S.impersonatedUser, k = S.notificationFilter, L = S.beforeKeys, B = S.afterKeys, j = S.beforeError, z = S.afterError, H = S.beforeComplete, q = S.afterComplete, W = S.flush, $ = W === void 0 || W, J = S.reactive, X = J !== void 0 && J, Z = S.fetchSize, ue = Z === void 0 ? h : Z, re = S.highRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = S.lowRecordWatermark, ce = le === void 0 ? Number.MAX_VALUE : le, pe = new c.ResultStreamObserver({ server: this._server, reactive: X, fetchSize: ue, moreFunction: this._requestMore.bind(this), discardFunction: this._requestDiscard.bind(this), beforeKeys: L, afterKeys: B, beforeError: j, afterError: z, beforeComplete: H, afterComplete: q, highRecordWatermark: ne, lowRecordWatermark: ce, enrichMetadata: this._enrichMetadata }), fe = X; return this.write(l.default.runWithMetadata5x5(_, m, { bookmarks: O, txConfig: E, database: T, mode: P, impersonatedUser: I, notificationFilter: k }), pe, fe && $), X || this.write(l.default.pull({ n: ue }), pe, $), pe; }, b.prototype._enrichMetadata = function(_) { return Array.isArray(_.statuses) && (_.statuses = _.statuses.map(function(m) { @@ -59866,42 +59878,42 @@ function print() { __p += __j.call(arguments, '') } var i = t(9305), a = n(t(8320)), o = n(t(2857)), s = n(t(5642)), u = n(t(2539)), l = n(t(4596)), c = n(t(6445)), f = n(t(9054)), d = n(t(1711)), h = n(t(844)), p = n(t(6345)), g = n(t(934)), y = n(t(9125)), b = n(t(9744)), _ = n(t(5815)), m = n(t(6890)), x = n(t(6377)), S = n(t(1092)), O = (t(7452), n(t(2578))); e.default = function(E) { var T = E === void 0 ? {} : E, P = T.version, I = T.chunker, k = T.dechunker, L = T.channel, B = T.disableLosslessIntegers, j = T.useBigInt, z = T.serversideRouting, H = T.server, q = T.log, W = T.observer; - return (function($, J, X, Q, ue, re, ne, le) { + return (function($, J, X, Z, ue, re, ne, le) { switch ($) { case 1: - return new a.default(J, X, Q, re, le, ne); + return new a.default(J, X, Z, re, le, ne); case 2: - return new o.default(J, X, Q, re, le, ne); + return new o.default(J, X, Z, re, le, ne); case 3: - return new s.default(J, X, Q, re, le, ne); + return new s.default(J, X, Z, re, le, ne); case 4: - return new u.default(J, X, Q, re, le, ne); + return new u.default(J, X, Z, re, le, ne); case 4.1: - return new l.default(J, X, Q, re, le, ne, ue); + return new l.default(J, X, Z, re, le, ne, ue); case 4.2: - return new c.default(J, X, Q, re, le, ne, ue); + return new c.default(J, X, Z, re, le, ne, ue); case 4.3: - return new f.default(J, X, Q, re, le, ne, ue); + return new f.default(J, X, Z, re, le, ne, ue); case 4.4: - return new d.default(J, X, Q, re, le, ne, ue); + return new d.default(J, X, Z, re, le, ne, ue); case 5: - return new h.default(J, X, Q, re, le, ne, ue); + return new h.default(J, X, Z, re, le, ne, ue); case 5.1: - return new p.default(J, X, Q, re, le, ne, ue); + return new p.default(J, X, Z, re, le, ne, ue); case 5.2: - return new g.default(J, X, Q, re, le, ne, ue); + return new g.default(J, X, Z, re, le, ne, ue); case 5.3: - return new y.default(J, X, Q, re, le, ne, ue); + return new y.default(J, X, Z, re, le, ne, ue); case 5.4: - return new b.default(J, X, Q, re, le, ne, ue); + return new b.default(J, X, Z, re, le, ne, ue); case 5.5: - return new _.default(J, X, Q, re, le, ne, ue); + return new _.default(J, X, Z, re, le, ne, ue); case 5.6: - return new m.default(J, X, Q, re, le, ne, ue); + return new m.default(J, X, Z, re, le, ne, ue); case 5.7: - return new x.default(J, X, Q, re, le, ne, ue); + return new x.default(J, X, Z, re, le, ne, ue); case 5.8: - return new S.default(J, X, Q, re, le, ne, ue); + return new S.default(J, X, Z, re, le, ne, ue); default: throw (0, i.newError)("Unknown Bolt protocol version: " + $); } @@ -59912,8 +59924,8 @@ function print() { __p += __j.call(arguments, '') } }, k.onmessage = function(X) { try { J.handleResponse($.unpack(X)); - } catch (Q) { - return W.onError(Q); + } catch (Z) { + return W.onError(Z); } }, J; }, W.onProtocolError.bind(W), q); @@ -61691,8 +61703,8 @@ function print() { __p += __j.call(arguments, '') } }, I.prototype._getTrust = function() { return this._config.trust; }, I.prototype.session = function(k) { - var L = k === void 0 ? {} : k, B = L.defaultAccessMode, j = B === void 0 ? x : B, z = L.bookmarks, H = L.database, q = H === void 0 ? "" : H, W = L.impersonatedUser, $ = L.fetchSize, J = L.bookmarkManager, X = L.notificationFilter, Q = L.auth; - return this._newSession({ defaultAccessMode: j, bookmarkOrBookmarks: z, database: q, reactive: !1, impersonatedUser: W, fetchSize: P($, this._config.fetchSize), bookmarkManager: J, notificationFilter: X, auth: Q }); + var L = k === void 0 ? {} : k, B = L.defaultAccessMode, j = B === void 0 ? x : B, z = L.bookmarks, H = L.database, q = H === void 0 ? "" : H, W = L.impersonatedUser, $ = L.fetchSize, J = L.bookmarkManager, X = L.notificationFilter, Z = L.auth; + return this._newSession({ defaultAccessMode: j, bookmarkOrBookmarks: z, database: q, reactive: !1, impersonatedUser: W, fetchSize: P($, this._config.fetchSize), bookmarkManager: J, notificationFilter: X, auth: Z }); }, I.prototype.close = function() { return this._log.info("Driver ".concat(this._id, " closing")), this._connectionProvider != null ? this._connectionProvider.close() : Promise.resolve(); }, I.prototype[Symbol.asyncDispose] = function() { @@ -61702,8 +61714,8 @@ function print() { __p += __j.call(arguments, '') } }, I.prototype._homeDatabaseCallback = function(k, L) { this.homeDatabaseCache.set(k, L); }, I.prototype._newSession = function(k) { - var L = k.defaultAccessMode, B = k.bookmarkOrBookmarks, j = k.database, z = k.reactive, H = k.impersonatedUser, q = k.fetchSize, W = k.bookmarkManager, $ = k.notificationFilter, J = k.auth, X = f.default._validateSessionMode(L), Q = this._getOrCreateConnectionProvider(), ue = this.homeDatabaseCache.get((0, _.cacheKey)(J, H)), re = this._homeDatabaseCallback.bind(this), ne = B != null ? new s.Bookmarks(B) : s.Bookmarks.empty(); - return this._createSession({ mode: X, database: j ?? "", connectionProvider: Q, bookmarks: ne, config: n({ cachedHomeDatabase: ue, routingDriver: this._supportsRouting() }, this._config), reactive: z, impersonatedUser: H, fetchSize: q, bookmarkManager: W, notificationFilter: $, auth: J, log: this._log, homeDatabaseCallback: re }); + var L = k.defaultAccessMode, B = k.bookmarkOrBookmarks, j = k.database, z = k.reactive, H = k.impersonatedUser, q = k.fetchSize, W = k.bookmarkManager, $ = k.notificationFilter, J = k.auth, X = f.default._validateSessionMode(L), Z = this._getOrCreateConnectionProvider(), ue = this.homeDatabaseCache.get((0, _.cacheKey)(J, H)), re = this._homeDatabaseCallback.bind(this), ne = B != null ? new s.Bookmarks(B) : s.Bookmarks.empty(); + return this._createSession({ mode: X, database: j ?? "", connectionProvider: Z, bookmarks: ne, config: n({ cachedHomeDatabase: ue, routingDriver: this._supportsRouting() }, this._config), reactive: z, impersonatedUser: H, fetchSize: q, bookmarkManager: W, notificationFilter: $, auth: J, log: this._log, homeDatabaseCallback: re }); }, I.prototype._getOrCreateConnectionProvider = function() { var k; return this._connectionProvider == null && (this._connectionProvider = this._createConnectionProvider(this._id, this._config, this._log, (k = this._config, new u.default(k.resolver)))), this._connectionProvider; @@ -61876,25 +61888,25 @@ function print() { __p += __j.call(arguments, '') } return new (fe || (fe = Promise))(function(de, ge) { function Oe(Ne) { try { - Me(se.next(Ne)); + De(se.next(Ne)); } catch (Ce) { ge(Ce); } } function ke(Ne) { try { - Me(se.throw(Ne)); + De(se.throw(Ne)); } catch (Ce) { ge(Ce); } } - function Me(Ne) { + function De(Ne) { var Ce; Ne.done ? de(Ne.value) : (Ce = Ne.value, Ce instanceof fe ? Ce : new fe(function(Y) { Y(Ce); })).then(Oe, ke); } - Me((se = se.apply(ce, pe || [])).next()); + De((se = se.apply(ce, pe || [])).next()); }); }, l = this && this.__generator || function(ce, pe) { var fe, se, de, ge, Oe = { label: 0, sent: function() { @@ -61904,7 +61916,7 @@ function print() { __p += __j.call(arguments, '') } return ge = { next: ke(0), throw: ke(1), return: ke(2) }, typeof Symbol == "function" && (ge[Symbol.iterator] = function() { return this; }), ge; - function ke(Me) { + function ke(De) { return function(Ne) { return (function(Ce) { if (fe) throw new TypeError("Generator is already executing."); @@ -61951,7 +61963,7 @@ function print() { __p += __j.call(arguments, '') } } if (5 & Ce[0]) throw Ce[1]; return { value: Ce[0] ? Ce[1] : void 0, done: !0 }; - })([Me, Ne]); + })([De, Ne]); }; } }, c = this && this.__values || function(ce) { @@ -61981,22 +61993,22 @@ function print() { __p += __j.call(arguments, '') } return ce && ce.__esModule ? ce : { default: ce }; }; Object.defineProperty(e, "__esModule", { value: !0 }); - var h = t(9305), p = s(t(206)), g = t(7452), y = d(t(4132)), b = d(t(8987)), _ = t(4455), m = t(7721), x = t(6781), S = h.error.SERVICE_UNAVAILABLE, O = h.error.SESSION_EXPIRED, E = h.internal.bookmarks.Bookmarks, T = h.internal.constants, P = T.ACCESS_MODE_READ, I = T.ACCESS_MODE_WRITE, k = T.BOLT_PROTOCOL_V3, L = T.BOLT_PROTOCOL_V4_0, B = T.BOLT_PROTOCOL_V4_4, j = T.BOLT_PROTOCOL_V5_1, z = "Neo.ClientError.Database.DatabaseNotFound", H = "Neo.ClientError.Transaction.InvalidBookmark", q = "Neo.ClientError.Transaction.InvalidBookmarkMixture", W = "Neo.ClientError.Security.AuthorizationExpired", $ = "Neo.ClientError.Statement.ArgumentError", J = "Neo.ClientError.Request.Invalid", X = "Neo.ClientError.Statement.TypeError", Q = "N/A", ue = null, re = (0, h.int)(3e4), ne = (function(ce) { + var h = t(9305), p = s(t(206)), g = t(7452), y = d(t(4132)), b = d(t(8987)), _ = t(4455), m = t(7721), x = t(6781), S = h.error.SERVICE_UNAVAILABLE, O = h.error.SESSION_EXPIRED, E = h.internal.bookmarks.Bookmarks, T = h.internal.constants, P = T.ACCESS_MODE_READ, I = T.ACCESS_MODE_WRITE, k = T.BOLT_PROTOCOL_V3, L = T.BOLT_PROTOCOL_V4_0, B = T.BOLT_PROTOCOL_V4_4, j = T.BOLT_PROTOCOL_V5_1, z = "Neo.ClientError.Database.DatabaseNotFound", H = "Neo.ClientError.Transaction.InvalidBookmark", q = "Neo.ClientError.Transaction.InvalidBookmarkMixture", W = "Neo.ClientError.Security.AuthorizationExpired", $ = "Neo.ClientError.Statement.ArgumentError", J = "Neo.ClientError.Request.Invalid", X = "Neo.ClientError.Statement.TypeError", Z = "N/A", ue = null, re = (0, h.int)(3e4), ne = (function(ce) { function pe(fe) { - var se = fe.id, de = fe.address, ge = fe.routingContext, Oe = fe.hostNameResolver, ke = fe.config, Me = fe.log, Ne = fe.userAgent, Ce = fe.boltAgent, Y = fe.authTokenManager, Z = fe.routingTablePurgeDelay, ie = fe.newPool, we = ce.call(this, { id: se, config: ke, log: Me, userAgent: Ne, boltAgent: Ce, authTokenManager: Y, newPool: ie }, function(Ee) { + var se = fe.id, de = fe.address, ge = fe.routingContext, Oe = fe.hostNameResolver, ke = fe.config, De = fe.log, Ne = fe.userAgent, Ce = fe.boltAgent, Y = fe.authTokenManager, Q = fe.routingTablePurgeDelay, ie = fe.newPool, we = ce.call(this, { id: se, config: ke, log: De, userAgent: Ne, boltAgent: Ce, authTokenManager: Y, newPool: ie }, function(Ee) { return u(we, void 0, void 0, function() { - var De, Ie; + var Me, Ie; return l(this, function(Ye) { switch (Ye.label) { case 0: - return De = m.createChannelConnection, Ie = [Ee, this._config, this._createConnectionErrorHandler(), this._log], [4, this._clientCertificateHolder.getClientCertificate()]; + return Me = m.createChannelConnection, Ie = [Ee, this._config, this._createConnectionErrorHandler(), this._log], [4, this._clientCertificateHolder.getClientCertificate()]; case 1: - return [2, De.apply(void 0, Ie.concat([Ye.sent(), this._routingContext, this._channelSsrCallback.bind(this)]))]; + return [2, Me.apply(void 0, Ie.concat([Ye.sent(), this._routingContext, this._channelSsrCallback.bind(this)]))]; } }); }); }) || this; - return we._routingContext = i(i({}, ge), { address: de.toString() }), we._seedRouter = de, we._rediscovery = new p.default(we._routingContext), we._loadBalancingStrategy = new _.LeastConnectedLoadBalancingStrategy(we._connectionPool), we._hostNameResolver = Oe, we._dnsResolver = new g.HostNameResolver(), we._log = Me, we._useSeedRouter = !0, we._routingTableRegistry = new le(Z ? (0, h.int)(Z) : re), we._refreshRoutingTable = x.functional.reuseOngoingRequest(we._refreshRoutingTable, we), we._withSSR = 0, we._withoutSSR = 0, we; + return we._routingContext = i(i({}, ge), { address: de.toString() }), we._seedRouter = de, we._rediscovery = new p.default(we._routingContext), we._loadBalancingStrategy = new _.LeastConnectedLoadBalancingStrategy(we._connectionPool), we._hostNameResolver = Oe, we._dnsResolver = new g.HostNameResolver(), we._log = De, we._useSeedRouter = !0, we._routingTableRegistry = new le(Q ? (0, h.int)(Q) : re), we._refreshRoutingTable = x.functional.reuseOngoingRequest(we._refreshRoutingTable, we), we._withSSR = 0, we._withoutSSR = 0, we; } return n(pe, ce), pe.prototype._createConnectionErrorHandler = function() { return new m.ConnectionErrorHandler(O); @@ -62007,36 +62019,36 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype._handleWriteFailure = function(fe, se, de) { return this._log.warn("Routing driver ".concat(this._id, " will forget writer ").concat(se, " for database '").concat(de, "' because of an error ").concat(fe.code, " '").concat(fe.message, "'")), this.forgetWriter(se, de || ue), (0, h.newError)("No longer possible to write to server at " + se, O, fe); }, pe.prototype.acquireConnection = function(fe) { - var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, Me = se.onDatabaseNameResolved, Ne = se.auth, Ce = se.homeDb; + var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Ce = se.homeDb; return u(this, void 0, void 0, function() { - var Y, Z, ie, we, Ee, De = this; + var Y, Q, ie, we, Ee, Me = this; return l(this, function(Ie) { switch (Ie.label) { case 0: - return Y = { database: ge || ue }, Z = new m.ConnectionErrorHandler(O, function(Ye, ot) { - return De._handleUnavailability(Ye, ot, Y.database); + return Y = { database: ge || ue }, Q = new m.ConnectionErrorHandler(O, function(Ye, ot) { + return Me._handleUnavailability(Ye, ot, Y.database); }, function(Ye, ot) { - return De._handleWriteFailure(Ye, ot, Ce ?? Y.database); + return Me._handleWriteFailure(Ye, ot, Ce ?? Y.database); }, function(Ye, ot, mt) { - return De._handleSecurityError(Ye, ot, mt, Y.database); + return Me._handleSecurityError(Ye, ot, mt, Y.database); }), this.SSREnabled() && Ce !== void 0 && ge === "" ? !(we = this._routingTableRegistry.get(Ce, function() { return new p.RoutingTable({ database: Ce }); - })) || we.isStaleFor(de) ? [3, 2] : [4, this.getConnectionFromRoutingTable(we, Ne, de, Z)] : [3, 2]; + })) || we.isStaleFor(de) ? [3, 2] : [4, this.getConnectionFromRoutingTable(we, Ne, de, Q)] : [3, 2]; case 1: if (ie = Ie.sent(), this.SSREnabled()) return [2, ie]; ie.release(), Ie.label = 2; case 2: return [4, this._freshRoutingTable({ accessMode: de, database: Y.database, bookmarks: Oe, impersonatedUser: ke, auth: Ne, onDatabaseNameResolved: function(Ye) { - Y.database = Y.database || Ye, Me && Me(Ye); + Y.database = Y.database || Ye, De && De(Ye); } })]; case 3: - return Ee = Ie.sent(), [2, this.getConnectionFromRoutingTable(Ee, Ne, de, Z)]; + return Ee = Ie.sent(), [2, this.getConnectionFromRoutingTable(Ee, Ne, de, Q)]; } }); }); }, pe.prototype.getConnectionFromRoutingTable = function(fe, se, de, ge) { return u(this, void 0, void 0, function() { - var Oe, ke, Me, Ne; + var Oe, ke, De, Ne; return l(this, function(Ce) { switch (Ce.label) { case 0: @@ -62050,11 +62062,11 @@ function print() { __p += __j.call(arguments, '') } case 1: return Ce.trys.push([1, 5, , 6]), [4, this._connectionPool.acquire({ auth: se }, ke)]; case 2: - return Me = Ce.sent(), se ? [4, this._verifyStickyConnection({ auth: se, connection: Me, address: ke })] : [3, 4]; + return De = Ce.sent(), se ? [4, this._verifyStickyConnection({ auth: se, connection: De, address: ke })] : [3, 4]; case 3: - return Ce.sent(), [2, Me]; + return Ce.sent(), [2, De]; case 4: - return [2, new m.DelegateConnection(Me, ge)]; + return [2, new m.DelegateConnection(De, ge)]; case 5: throw Ne = Ce.sent(), ge.handleAndTransformError(Ne, ke); case 6: @@ -62064,7 +62076,7 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._hasProtocolVersion = function(fe) { return u(this, void 0, void 0, function() { - var se, de, ge, Oe, ke, Me; + var se, de, ge, Oe, ke, De; return l(this, function(Ne) { switch (Ne.label) { case 0: @@ -62081,7 +62093,7 @@ function print() { __p += __j.call(arguments, '') } case 5: return Ne.sent(), ke ? [2, fe(ke)] : [2, !1]; case 6: - return Me = Ne.sent(), de = Me, [3, 7]; + return De = Ne.sent(), de = De, [3, 7]; case 7: return ge++, [3, 2]; case 8: @@ -62154,15 +62166,15 @@ function print() { __p += __j.call(arguments, '') } return l(this, function(ke) { return [2, this._verifyAuthentication({ auth: ge, getAddress: function() { return u(Oe, void 0, void 0, function() { - var Me, Ne, Ce; + var De, Ne, Ce; return l(this, function(Y) { switch (Y.label) { case 0: - return Me = { database: se || ue }, [4, this._freshRoutingTable({ accessMode: de, database: Me.database, auth: ge, onDatabaseNameResolved: function(Z) { - Me.database = Me.database || Z; + return De = { database: se || ue }, [4, this._freshRoutingTable({ accessMode: de, database: De.database, auth: ge, onDatabaseNameResolved: function(Q) { + De.database = De.database || Q; } })]; case 1: - if (Ne = Y.sent(), (Ce = de === I ? Ne.writers : Ne.readers).length === 0) throw (0, h.newError)("No servers available for database '".concat(Me.database, "' with access mode '").concat(de, "'"), S); + if (Ne = Y.sent(), (Ce = de === I ? Ne.writers : Ne.readers).length === 0) throw (0, h.newError)("No servers available for database '".concat(De.database, "' with access mode '").concat(de, "'"), S); return [2, Ce[0]]; } }); @@ -62173,32 +62185,32 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype.verifyConnectivityAndGetServerInfo = function(fe) { var se = fe.database, de = fe.accessMode; return u(this, void 0, void 0, function() { - var ge, Oe, ke, Me, Ne, Ce, Y, Z, ie, we, Ee; - return l(this, function(De) { - switch (De.label) { + var ge, Oe, ke, De, Ne, Ce, Y, Q, ie, we, Ee; + return l(this, function(Me) { + switch (Me.label) { case 0: return ge = { database: se || ue }, [4, this._freshRoutingTable({ accessMode: de, database: ge.database, onDatabaseNameResolved: function(Ie) { ge.database = ge.database || Ie; } })]; case 1: - Oe = De.sent(), ke = de === I ? Oe.writers : Oe.readers, Me = (0, h.newError)("No servers available for database '".concat(ge.database, "' with access mode '").concat(de, "'"), S), De.label = 2; + Oe = Me.sent(), ke = de === I ? Oe.writers : Oe.readers, De = (0, h.newError)("No servers available for database '".concat(ge.database, "' with access mode '").concat(de, "'"), S), Me.label = 2; case 2: - De.trys.push([2, 9, 10, 11]), Ne = c(ke), Ce = Ne.next(), De.label = 3; + Me.trys.push([2, 9, 10, 11]), Ne = c(ke), Ce = Ne.next(), Me.label = 3; case 3: if (Ce.done) return [3, 8]; - Y = Ce.value, De.label = 4; + Y = Ce.value, Me.label = 4; case 4: - return De.trys.push([4, 6, , 7]), [4, this._verifyConnectivityAndGetServerVersion({ address: Y })]; + return Me.trys.push([4, 6, , 7]), [4, this._verifyConnectivityAndGetServerVersion({ address: Y })]; case 5: - return [2, De.sent()]; + return [2, Me.sent()]; case 6: - return Z = De.sent(), Me = Z, [3, 7]; + return Q = Me.sent(), De = Q, [3, 7]; case 7: return Ce = Ne.next(), [3, 3]; case 8: return [3, 11]; case 9: - return ie = De.sent(), we = { error: ie }, [3, 11]; + return ie = Me.sent(), we = { error: ie }, [3, 11]; case 10: try { Ce && !Ce.done && (Ee = Ne.return) && Ee.call(Ne); @@ -62207,7 +62219,7 @@ function print() { __p += __j.call(arguments, '') } } return [7]; case 11: - throw Me; + throw De; } }); }); @@ -62221,28 +62233,28 @@ function print() { __p += __j.call(arguments, '') } return de.forgetWriter(fe); } }); }, pe.prototype._freshRoutingTable = function(fe) { - var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, Me = se.onDatabaseNameResolved, Ne = se.auth, Ce = this._routingTableRegistry.get(ge, function() { + var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Ce = this._routingTableRegistry.get(ge, function() { return new p.RoutingTable({ database: ge }); }); return Ce.isStaleFor(de) ? (this._log.info('Routing table is stale for database: "'.concat(ge, '" and access mode: "').concat(de, '": ').concat(Ce)), this._refreshRoutingTable(Ce, Oe, ke, Ne).then(function(Y) { - return Me(Y.database), Y; + return De(Y.database), Y; })) : Ce; }, pe.prototype._refreshRoutingTable = function(fe, se, de, ge) { var Oe = fe.routers; return this._useSeedRouter ? this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(Oe, fe, se, de, ge) : this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(Oe, fe, se, de, ge); }, pe.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, Me, Ne, Ce, Y, Z, ie; + var ke, De, Ne, Ce, Y, Q, ie; return l(this, function(we) { switch (we.label) { case 0: return ke = [], [4, this._fetchRoutingTableUsingSeedRouter(ke, this._seedRouter, se, de, ge, Oe)]; case 1: - return Me = f.apply(void 0, [we.sent(), 2]), Ne = Me[0], Ce = Me[1], Ne ? (this._useSeedRouter = !1, [3, 4]) : [3, 2]; + return De = f.apply(void 0, [we.sent(), 2]), Ne = De[0], Ce = De[1], Ne ? (this._useSeedRouter = !1, [3, 4]) : [3, 2]; case 2: return [4, this._fetchRoutingTableUsingKnownRouters(fe, se, de, ge, Oe)]; case 3: - Y = f.apply(void 0, [we.sent(), 2]), Z = Y[0], ie = Y[1], Ne = Z, Ce = ie || Ce, we.label = 4; + Y = f.apply(void 0, [we.sent(), 2]), Q = Y[0], ie = Y[1], Ne = Q, Ce = ie || Ce, we.label = 4; case 4: return [4, this._applyRoutingTableIfPossible(se, Ne, Ce)]; case 5: @@ -62252,17 +62264,17 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, Me, Ne, Ce; + var ke, De, Ne, Ce; return l(this, function(Y) { switch (Y.label) { case 0: return [4, this._fetchRoutingTableUsingKnownRouters(fe, se, de, ge, Oe)]; case 1: - return ke = f.apply(void 0, [Y.sent(), 2]), Me = ke[0], Ne = ke[1], Me ? [3, 3] : [4, this._fetchRoutingTableUsingSeedRouter(fe, this._seedRouter, se, de, ge, Oe)]; + return ke = f.apply(void 0, [Y.sent(), 2]), De = ke[0], Ne = ke[1], De ? [3, 3] : [4, this._fetchRoutingTableUsingSeedRouter(fe, this._seedRouter, se, de, ge, Oe)]; case 2: - Ce = f.apply(void 0, [Y.sent(), 2]), Me = Ce[0], Ne = Ce[1], Y.label = 3; + Ce = f.apply(void 0, [Y.sent(), 2]), De = Ce[0], Ne = Ce[1], Y.label = 3; case 3: - return [4, this._applyRoutingTableIfPossible(se, Me, Ne)]; + return [4, this._applyRoutingTableIfPossible(se, De, Ne)]; case 4: return [2, Y.sent()]; } @@ -62270,25 +62282,25 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._fetchRoutingTableUsingKnownRouters = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, Me, Ne, Ce; + var ke, De, Ne, Ce; return l(this, function(Y) { switch (Y.label) { case 0: return [4, this._fetchRoutingTable(fe, se, de, ge, Oe)]; case 1: - return ke = f.apply(void 0, [Y.sent(), 2]), Me = ke[0], Ne = ke[1], Me ? [2, [Me, null]] : (Ce = fe.length - 1, pe._forgetRouter(se, fe, Ce), [2, [null, Ne]]); + return ke = f.apply(void 0, [Y.sent(), 2]), De = ke[0], Ne = ke[1], De ? [2, [De, null]] : (Ce = fe.length - 1, pe._forgetRouter(se, fe, Ce), [2, [null, Ne]]); } }); }); }, pe.prototype._fetchRoutingTableUsingSeedRouter = function(fe, se, de, ge, Oe, ke) { return u(this, void 0, void 0, function() { - var Me, Ne; + var De, Ne; return l(this, function(Ce) { switch (Ce.label) { case 0: return [4, this._resolveSeedRouter(se)]; case 1: - return Me = Ce.sent(), Ne = Me.filter(function(Y) { + return De = Ce.sent(), Ne = De.filter(function(Y) { return fe.indexOf(Y) < 0; }), [4, this._fetchRoutingTable(Ne, de, ge, Oe, ke)]; case 2: @@ -62315,27 +62327,27 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype._fetchRoutingTable = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { var ke = this; - return l(this, function(Me) { + return l(this, function(De) { return [2, fe.reduce(function(Ne, Ce, Y) { return u(ke, void 0, void 0, function() { - var Z, ie, we, Ee, De, Ie, Ye; + var Q, ie, we, Ee, Me, Ie, Ye; return l(this, function(ot) { switch (ot.label) { case 0: return [4, Ne]; case 1: - return Z = f.apply(void 0, [ot.sent(), 1]), (ie = Z[0]) ? [2, [ie, null]] : (we = Y - 1, pe._forgetRouter(se, fe, we), [4, this._createSessionForRediscovery(Ce, de, ge, Oe)]); + return Q = f.apply(void 0, [ot.sent(), 1]), (ie = Q[0]) ? [2, [ie, null]] : (we = Y - 1, pe._forgetRouter(se, fe, we), [4, this._createSessionForRediscovery(Ce, de, ge, Oe)]); case 2: - if (Ee = f.apply(void 0, [ot.sent(), 2]), De = Ee[0], Ie = Ee[1], !De) return [3, 8]; + if (Ee = f.apply(void 0, [ot.sent(), 2]), Me = Ee[0], Ie = Ee[1], !Me) return [3, 8]; ot.label = 3; case 3: - return ot.trys.push([3, 5, 6, 7]), [4, this._rediscovery.lookupRoutingTableOnRouter(De, se.database, Ce, ge)]; + return ot.trys.push([3, 5, 6, 7]), [4, this._rediscovery.lookupRoutingTableOnRouter(Me, se.database, Ce, ge)]; case 4: return [2, [ot.sent(), null]]; case 5: return Ye = ot.sent(), [2, this._handleRediscoveryError(Ye, Ce)]; case 6: - return De.close(), [7]; + return Me.close(), [7]; case 7: return [3, 9]; case 8: @@ -62350,21 +62362,21 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._createSessionForRediscovery = function(fe, se, de, ge) { return u(this, void 0, void 0, function() { - var Oe, ke, Me, Ne, Ce, Y = this; - return l(this, function(Z) { - switch (Z.label) { + var Oe, ke, De, Ne, Ce, Y = this; + return l(this, function(Q) { + switch (Q.label) { case 0: - return Z.trys.push([0, 4, , 5]), [4, this._connectionPool.acquire({ auth: ge }, fe)]; + return Q.trys.push([0, 4, , 5]), [4, this._connectionPool.acquire({ auth: ge }, fe)]; case 1: - return Oe = Z.sent(), ge ? [4, this._verifyStickyConnection({ auth: ge, connection: Oe, address: fe })] : [3, 3]; + return Oe = Q.sent(), ge ? [4, this._verifyStickyConnection({ auth: ge, connection: Oe, address: fe })] : [3, 3]; case 2: - Z.sent(), Z.label = 3; + Q.sent(), Q.label = 3; case 3: return ke = m.ConnectionErrorHandler.create({ errorCode: O, handleSecurityError: function(ie, we, Ee) { return Y._handleSecurityError(ie, we, Ee); - } }), Me = Oe._sticky ? new m.DelegateConnection(Oe) : new m.DelegateConnection(Oe, ke), Ne = new y.default(Me), Oe.protocol().version < 4 ? [2, [new h.Session({ mode: I, bookmarks: E.empty(), connectionProvider: Ne }), null]] : [2, [new h.Session({ mode: P, database: "system", bookmarks: se, connectionProvider: Ne, impersonatedUser: de }), null]]; + } }), De = Oe._sticky ? new m.DelegateConnection(Oe) : new m.DelegateConnection(Oe, ke), Ne = new y.default(De), Oe.protocol().version < 4 ? [2, [new h.Session({ mode: I, bookmarks: E.empty(), connectionProvider: Ne }), null]] : [2, [new h.Session({ mode: P, database: "system", bookmarks: se, connectionProvider: Ne, impersonatedUser: de }), null]]; case 4: - return Ce = Z.sent(), [2, this._handleRediscoveryError(Ce, fe)]; + return Ce = Q.sent(), [2, this._handleRediscoveryError(Ce, fe)]; case 5: return [2]; } @@ -62372,7 +62384,7 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._handleRediscoveryError = function(fe, se) { if ((function(de) { - return [z, H, q, $, J, X, Q].includes(de.code); + return [z, H, q, $, J, X, Z].includes(de.code); })(fe) || (function(de) { var ge; return ((ge = de.code) === null || ge === void 0 ? void 0 : ge.startsWith("Neo.ClientError.Security.")) && ![W].includes(de.code); @@ -62456,8 +62468,8 @@ function print() { __p += __j.call(arguments, '') } var Oe = f(ge.value, 2), ke = Oe[0]; pe(Oe[1]) && this._remove(ke); } - } catch (Me) { - fe = { error: Me }; + } catch (De) { + fe = { error: De }; } finally { try { ge && !ge.done && (se = de.return) && se.call(de); @@ -64019,8 +64031,8 @@ function print() { __p += __j.call(arguments, '') } var T = E === void 0 ? {} : E, P = T.beforeError, I = T.afterError, k = T.beforeComplete, L = T.afterComplete; return this.run("ROLLBACK", {}, { bookmarks: g.empty(), txConfig: m.empty(), mode: b, beforeError: P, afterError: I, beforeComplete: k, afterComplete: L }); }, O.prototype.run = function(E, T, P) { - var I = P === void 0 ? {} : P, k = (I.bookmarks, I.txConfig), L = I.database, B = (I.mode, I.impersonatedUser), j = I.notificationFilter, z = I.beforeKeys, H = I.afterKeys, q = I.beforeError, W = I.afterError, $ = I.beforeComplete, J = I.afterComplete, X = I.flush, Q = X === void 0 || X, ue = I.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = I.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new f.ResultStreamObserver({ server: this._server, beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: re, lowRecordWatermark: le }); - return (0, u.assertTxConfigIsEmpty)(k, this._onProtocolError, ce), (0, u.assertDatabaseIsEmpty)(L, this._onProtocolError, ce), (0, u.assertImpersonatedUserIsEmpty)(B, this._onProtocolError, ce), (0, u.assertNotificationFilterIsEmpty)(j, this._onProtocolError, ce), this.write(c.default.run(E, T), ce, !1), this.write(c.default.pullAll(), ce, Q), ce; + var I = P === void 0 ? {} : P, k = (I.bookmarks, I.txConfig), L = I.database, B = (I.mode, I.impersonatedUser), j = I.notificationFilter, z = I.beforeKeys, H = I.afterKeys, q = I.beforeError, W = I.afterError, $ = I.beforeComplete, J = I.afterComplete, X = I.flush, Z = X === void 0 || X, ue = I.highRecordWatermark, re = ue === void 0 ? Number.MAX_VALUE : ue, ne = I.lowRecordWatermark, le = ne === void 0 ? Number.MAX_VALUE : ne, ce = new f.ResultStreamObserver({ server: this._server, beforeKeys: z, afterKeys: H, beforeError: q, afterError: W, beforeComplete: $, afterComplete: J, highRecordWatermark: re, lowRecordWatermark: le }); + return (0, u.assertTxConfigIsEmpty)(k, this._onProtocolError, ce), (0, u.assertDatabaseIsEmpty)(L, this._onProtocolError, ce), (0, u.assertImpersonatedUserIsEmpty)(B, this._onProtocolError, ce), (0, u.assertNotificationFilterIsEmpty)(j, this._onProtocolError, ce), this.write(c.default.run(E, T), ce, !1), this.write(c.default.pullAll(), ce, Z), ce; }, Object.defineProperty(O.prototype, "currentFailure", { get: function() { return this._responseHandler.currentFailure; }, enumerable: !1, configurable: !0 }), O.prototype.reset = function(E) { @@ -64525,9 +64537,9 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "combineLatest", { enumerable: !0, get: function() { return X.combineLatest; } }); - var Q = t(3865); + var Z = t(3865); Object.defineProperty(e, "concat", { enumerable: !0, get: function() { - return Q.concat; + return Z.concat; } }); var ue = t(7579); Object.defineProperty(e, "connectable", { enumerable: !0, get: function() { @@ -64577,9 +64589,9 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "never", { enumerable: !0, get: function() { return ke.never; } }); - var Me = t(1004); + var De = t(1004); Object.defineProperty(e, "of", { enumerable: !0, get: function() { - return Me.of; + return De.of; } }); var Ne = t(6102); Object.defineProperty(e, "onErrorResumeNext", { enumerable: !0, get: function() { @@ -64593,9 +64605,9 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "partition", { enumerable: !0, get: function() { return Y.partition; } }); - var Z = t(5584); + var Q = t(5584); Object.defineProperty(e, "race", { enumerable: !0, get: function() { - return Z.race; + return Q.race; } }); var ie = t(9376); Object.defineProperty(e, "range", { enumerable: !0, get: function() { @@ -64609,9 +64621,9 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "timer", { enumerable: !0, get: function() { return Ee.timer; } }); - var De = t(7853); + var Me = t(7853); Object.defineProperty(e, "using", { enumerable: !0, get: function() { - return De.using; + return Me.using; } }); var Ie = t(7286); Object.defineProperty(e, "zip", { enumerable: !0, get: function() { @@ -65762,7 +65774,7 @@ function print() { __p += __j.call(arguments, '') } e.StreamObserver = c; var f = (function(S) { function O(E) { - var T = E === void 0 ? {} : E, P = T.reactive, I = P !== void 0 && P, k = T.moreFunction, L = T.discardFunction, B = T.fetchSize, j = B === void 0 ? u : B, z = T.beforeError, H = T.afterError, q = T.beforeKeys, W = T.afterKeys, $ = T.beforeComplete, J = T.afterComplete, X = T.server, Q = T.highRecordWatermark, ue = Q === void 0 ? Number.MAX_VALUE : Q, re = T.lowRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = T.enrichMetadata, ce = T.onDb, pe = S.call(this) || this; + var T = E === void 0 ? {} : E, P = T.reactive, I = P !== void 0 && P, k = T.moreFunction, L = T.discardFunction, B = T.fetchSize, j = B === void 0 ? u : B, z = T.beforeError, H = T.afterError, q = T.beforeKeys, W = T.afterKeys, $ = T.beforeComplete, J = T.afterComplete, X = T.server, Z = T.highRecordWatermark, ue = Z === void 0 ? Number.MAX_VALUE : Z, re = T.lowRecordWatermark, ne = re === void 0 ? Number.MAX_VALUE : re, le = T.enrichMetadata, ce = T.onDb, pe = S.call(this) || this; return pe._fieldKeys = null, pe._fieldLookup = null, pe._head = null, pe._queuedRecords = [], pe._tail = null, pe._error = null, pe._observers = [], pe._meta = {}, pe._server = X, pe._beforeError = z, pe._afterError = H, pe._beforeKeys = q, pe._afterKeys = W, pe._beforeComplete = $, pe._afterComplete = J, pe._enrichMetadata = le || s.functional.identity, pe._queryId = null, pe._moreFunction = k, pe._discardFunction = L, pe._discard = !1, pe._fetchSize = j, pe._lowRecordWatermark = ne, pe._highRecordWatermark = ue, pe._setState(I ? x.READY : x.READY_STREAMING), pe._setupAutoPull(), pe._paused = !1, pe._pulled = !I, pe._haveRecordStreamed = !1, pe._onDb = ce, pe; } return n(O, S), O.prototype.pause = function() { @@ -66456,23 +66468,23 @@ Error message: `).concat(j.message), c); }; }; }, 9305: function(r, e, t) { - var n = this && this.__createBinding || (Object.create ? function(X, Q, ue, re) { + var n = this && this.__createBinding || (Object.create ? function(X, Z, ue, re) { re === void 0 && (re = ue); - var ne = Object.getOwnPropertyDescriptor(Q, ue); - ne && !("get" in ne ? !Q.__esModule : ne.writable || ne.configurable) || (ne = { enumerable: !0, get: function() { - return Q[ue]; + var ne = Object.getOwnPropertyDescriptor(Z, ue); + ne && !("get" in ne ? !Z.__esModule : ne.writable || ne.configurable) || (ne = { enumerable: !0, get: function() { + return Z[ue]; } }), Object.defineProperty(X, re, ne); - } : function(X, Q, ue, re) { - re === void 0 && (re = ue), X[re] = Q[ue]; - }), i = this && this.__setModuleDefault || (Object.create ? function(X, Q) { - Object.defineProperty(X, "default", { enumerable: !0, value: Q }); - } : function(X, Q) { - X.default = Q; + } : function(X, Z, ue, re) { + re === void 0 && (re = ue), X[re] = Z[ue]; + }), i = this && this.__setModuleDefault || (Object.create ? function(X, Z) { + Object.defineProperty(X, "default", { enumerable: !0, value: Z }); + } : function(X, Z) { + X.default = Z; }), a = this && this.__importStar || function(X) { if (X && X.__esModule) return X; - var Q = {}; - if (X != null) for (var ue in X) ue !== "default" && Object.prototype.hasOwnProperty.call(X, ue) && n(Q, X, ue); - return i(Q, X), Q; + var Z = {}; + if (X != null) for (var ue in X) ue !== "default" && Object.prototype.hasOwnProperty.call(X, ue) && n(Z, X, ue); + return i(Z, X), Z; }, o = this && this.__importDefault || function(X) { return X && X.__esModule ? X : { default: X }; }; @@ -66838,9 +66850,9 @@ Error message: `).concat(j.message), c); Object.defineProperty(e, "expand", { enumerable: !0, get: function() { return X.expand; } }); - var Q = t(783); + var Z = t(783); Object.defineProperty(e, "filter", { enumerable: !0, get: function() { - return Q.filter; + return Z.filter; } }); var ue = t(3555); Object.defineProperty(e, "finalize", { enumerable: !0, get: function() { @@ -66890,9 +66902,9 @@ Error message: `).concat(j.message), c); Object.defineProperty(e, "max", { enumerable: !0, get: function() { return ke.max; } }); - var Me = t(361); + var De = t(361); Object.defineProperty(e, "merge", { enumerable: !0, get: function() { - return Me.merge; + return De.merge; } }); var Ne = t(7302); Object.defineProperty(e, "mergeAll", { enumerable: !0, get: function() { @@ -66906,9 +66918,9 @@ Error message: `).concat(j.message), c); Object.defineProperty(e, "mergeMap", { enumerable: !0, get: function() { return Y.mergeMap; } }); - var Z = t(6586); + var Q = t(6586); Object.defineProperty(e, "mergeMapTo", { enumerable: !0, get: function() { - return Z.mergeMapTo; + return Q.mergeMapTo; } }); var ie = t(4408); Object.defineProperty(e, "mergeScan", { enumerable: !0, get: function() { @@ -66922,9 +66934,9 @@ Error message: `).concat(j.message), c); Object.defineProperty(e, "min", { enumerable: !0, get: function() { return Ee.min; } }); - var De = t(9247); + var Me = t(9247); Object.defineProperty(e, "multicast", { enumerable: !0, get: function() { - return De.multicast; + return Me.multicast; } }); var Ie = t(5184); Object.defineProperty(e, "observeOn", { enumerable: !0, get: function() { @@ -68447,7 +68459,7 @@ function io(r) { var e = d8[r]; if (e !== void 0) return e.exports; var t = d8[r] = { id: r, loaded: !1, exports: {} }; - return fae[r].call(t.exports, t, t.exports, io), t.loaded = !0, t.exports; + return dae[r].call(t.exports, t, t.exports, io), t.loaded = !0, t.exports; } io.n = (r) => { var e = r && r.__esModule ? () => r.default : () => r; @@ -68462,16 +68474,16 @@ io.n = (r) => { if (typeof window == "object") return window; } })(), io.o = (r, e) => Object.prototype.hasOwnProperty.call(r, e), io.nmd = (r) => (r.paths = [], r.children || (r.children = []), r); -var Hi = io(5250), dae = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, e) { +var Hi = io(5250), hae = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, e) { r.__proto__ = e; } || function(r, e) { for (var t in e) e.hasOwnProperty(t) && (r[t] = e[t]); }; -function aE(r, e) { +function iE(r, e) { function t() { this.constructor = r; } - dae(r, e), r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); + hae(r, e), r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t()); } var n_ = (function() { function r(e) { @@ -68493,13 +68505,13 @@ var n_ = (function() { }, r.prototype.toString = function() { return this.name; }, r; -})(), hae = (function(r) { +})(), vae = (function(r) { function e(t, n, i) { t === void 0 && (t = "Atom@" + lu()), n === void 0 && (n = O8), i === void 0 && (i = O8); var a = r.call(this, t) || this; return a.name = t, a.onBecomeObservedHandler = n, a.onBecomeUnobservedHandler = i, a.isPendingUnobservation = !1, a.isBeingTracked = !1, a; } - return aE(e, r), e.prototype.reportObserved = function() { + return iE(e, r), e.prototype.reportObserved = function() { return Tp(), r.prototype.reportObserved.call(this), this.isBeingTracked || (this.isBeingTracked = !0, this.onBecomeObservedHandler()), Cp(), !!Er.trackingDerivation; }, e.prototype.onBecomeUnobserved = function() { this.isBeingTracked = !1, this.onBecomeUnobservedHandler(); @@ -68508,7 +68520,7 @@ var n_ = (function() { function Kg(r) { return r.interceptors && r.interceptors.length > 0; } -function oE(r, e) { +function aE(r, e) { var t = r.interceptors || (r.interceptors = []); return t.push(e), LD(function() { var n = t.indexOf(e); @@ -68528,7 +68540,7 @@ function Zg(r, e) { function Sp(r) { return r.changeListeners && r.changeListeners.length > 0; } -function sE(r, e) { +function oE(r, e) { var t = r.changeListeners || (r.changeListeners = []); return t.push(e), LD(function() { var n = t.indexOf(e); @@ -68572,15 +68584,15 @@ function ux(r) { function bz(r, e) { R1(r, typeof Symbol == "function" && Symbol.iterator || "@@iterator", e); } -var $0, Ew, vae = (function() { +var $0, Ew, pae = (function() { var r = !1, e = {}; return Object.defineProperty(e, "0", { set: function() { r = !0; } }), Object.create(e)[0] = 1, r === !1; -})(), AM = 0, RM = function() { +})(), CM = 0, AM = function() { }; -$0 = RM, Ew = Array.prototype, Object.setPrototypeOf !== void 0 ? Object.setPrototypeOf($0.prototype, Ew) : $0.prototype.__proto__ !== void 0 ? $0.prototype.__proto__ = Ew : $0.prototype = Ew, Object.isFrozen(Array) && ["constructor", "push", "shift", "concat", "pop", "unshift", "replace", "find", "findIndex", "splice", "reverse", "sort"].forEach(function(r) { - Object.defineProperty(RM.prototype, r, { configurable: !0, writable: !0, value: Array.prototype[r] }); +$0 = AM, Ew = Array.prototype, Object.setPrototypeOf !== void 0 ? Object.setPrototypeOf($0.prototype, Ew) : $0.prototype.__proto__ !== void 0 ? $0.prototype.__proto__ = Ew : $0.prototype = Ew, Object.isFrozen(Array) && ["constructor", "push", "shift", "concat", "pop", "unshift", "replace", "find", "findIndex", "splice", "reverse", "sort"].forEach(function(r) { + Object.defineProperty(AM.prototype, r, { configurable: !0, writable: !0, value: Array.prototype[r] }); }); var _z = (function() { function r(e, t, n, i) { @@ -68593,9 +68605,9 @@ var _z = (function() { }, r.prototype.dehanceValues = function(e) { return this.dehancer !== void 0 ? e.map(this.dehancer) : e; }, r.prototype.intercept = function(e) { - return oE(this, e); + return aE(this, e); }, r.prototype.observe = function(e, t) { - return t === void 0 && (t = !1), t && e({ object: this.array, type: "splice", index: 0, added: this.values.slice(), addedCount: this.values.length, removed: [], removedCount: 0 }), sE(this, e); + return t === void 0 && (t = !1), t && e({ object: this.array, type: "splice", index: 0, added: this.values.slice(), addedCount: this.values.length, removed: [], removedCount: 0 }), oE(this, e); }, r.prototype.getArrayLength = function() { return this.atom.reportObserved(), this.values.length; }, r.prototype.setArrayLength = function(e) { @@ -68607,7 +68619,7 @@ var _z = (function() { } else this.spliceWithArray(e, t - e); }, r.prototype.updateArrayLength = function(e, t) { if (e !== this.lastKnownLength) throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?"); - this.lastKnownLength += t, t > 0 && e + t + 1 > AM && DD(e + t + 1); + this.lastKnownLength += t, t > 0 && e + t + 1 > CM && DD(e + t + 1); }, r.prototype.spliceWithArray = function(e, t, n) { var i = this; FD(this.atom); @@ -68638,9 +68650,9 @@ var _z = (function() { function e(t, n, i, a) { i === void 0 && (i = "ObservableArray@" + lu()), a === void 0 && (a = !1); var o = r.call(this) || this, s = new _z(i, n, o, a); - return R1(o, "$mobx", s), t && t.length && o.spliceWithArray(0, 0, t), vae && Object.defineProperty(s.array, "0", pae), o; + return R1(o, "$mobx", s), t && t.length && o.spliceWithArray(0, 0, t), pae && Object.defineProperty(s.array, "0", gae), o; } - return aE(e, r), e.prototype.intercept = function(t) { + return iE(e, r), e.prototype.intercept = function(t) { return this.$mobx.intercept(t); }, e.prototype.observe = function(t, n) { return n === void 0 && (n = !1), this.$mobx.observe(t, n); @@ -68733,7 +68745,7 @@ var _z = (function() { i.spliceWithArray(t, 0, [n]); } }, e; -})(RM); +})(AM); bz(uv.prototype, function() { return ux(this.slice()); }), Object.defineProperty(uv.prototype, "length", { enumerable: !1, configurable: !0, get: function() { @@ -68748,7 +68760,7 @@ bz(uv.prototype, function() { }), (function(r, e) { for (var t = 0; t < e.length; t++) jp(r, e[t], r[e[t]]); })(uv.prototype, ["constructor", "intercept", "observe", "clear", "concat", "get", "replace", "toJS", "toJSON", "peek", "find", "findIndex", "splice", "spliceWithArray", "push", "pop", "set", "shift", "unshift", "reverse", "sort", "remove", "move", "toString", "toLocaleString"]); -var pae = wz(0); +var gae = wz(0); function wz(r) { return { enumerable: !1, configurable: !1, get: function() { return this.get(r); @@ -68756,17 +68768,17 @@ function wz(r) { this.set(r, e); } }; } -function gae(r) { +function yae(r) { Object.defineProperty(uv.prototype, "" + r, wz(r)); } function DD(r) { - for (var e = AM; e < r; e++) gae(e); - AM = r; + for (var e = CM; e < r; e++) yae(e); + CM = r; } DD(1e3); -var yae = ly("ObservableArrayAdministration", _z); +var mae = ly("ObservableArrayAdministration", _z); function gv(r) { - return jD(r) && yae(r.$mobx); + return jD(r) && mae(r.$mobx); } var Ib = {}, Lp = (function(r) { function e(t, n, i, a) { @@ -68774,7 +68786,7 @@ var Ib = {}, Lp = (function(r) { var o = r.call(this, i) || this; return o.enhancer = n, o.hasUnreportedChange = !1, o.dehancer = void 0, o.value = n(t, void 0, i), a && Ul() && Qg({ type: "create", object: o, newValue: o.value }), o; } - return aE(e, r), e.prototype.dehanceValue = function(t) { + return iE(e, r), e.prototype.dehanceValue = function(t) { return this.dehancer !== void 0 ? this.dehancer(t) : t; }, e.prototype.set = function(t) { var n = this.value; @@ -68795,9 +68807,9 @@ var Ib = {}, Lp = (function(r) { }, e.prototype.get = function() { return this.reportObserved(), this.dehanceValue(this.value); }, e.prototype.intercept = function(t) { - return oE(this, t); + return aE(this, t); }, e.prototype.observe = function(t, n) { - return n && t({ object: this, type: "update", newValue: this.value, oldValue: void 0 }), sE(this, t); + return n && t({ object: this, type: "update", newValue: this.value, oldValue: void 0 }), oE(this, t); }, e.prototype.toJSON = function() { return this.get(); }, e.prototype.toString = function() { @@ -68807,7 +68819,7 @@ var Ib = {}, Lp = (function(r) { }, e; })(n_); Lp.prototype[Fz()] = Lp.prototype.valueOf; -var kD = ly("ObservableValue", Lp), mae = { m001: "It is not allowed to assign new values to @action fields", m002: "`runInAction` expects a function", m003: "`runInAction` expects a function without arguments", m004: "autorun expects a function", m005: "Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.", m006: "Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.", m007: "reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object", m008: "wrapping reaction expression in `asReference` is no longer supported, use options object instead", m009: "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.", m010: "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'", m011: "First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments", m012: "computed takes one or two arguments if used as function", m013: "[mobx.expr] 'expr' should only be used inside other reactive functions.", m014: "extendObservable expected 2 or more arguments", m015: "extendObservable expects an object as first argument", m016: "extendObservable should not be used on maps, use map.merge instead", m017: "all arguments of extendObservable should be objects", m018: "extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540", m019: "[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.", m020: "modifiers can only be used for individual object properties", m021: "observable expects zero or one arguments", m022: "@observable can not be used on getters, use @computed instead", m024: "whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.", m025: "whyRun can only be used on reactions and computed values", m026: "`action` can only be invoked on functions", m028: "It is not allowed to set `useStrict` when a derivation is running", m029: "INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row", m030a: "Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ", m030b: "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ", m031: "Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ", m032: `* This computation is suspended (not in use by any reaction) and won't run automatically. +var kD = ly("ObservableValue", Lp), bae = { m001: "It is not allowed to assign new values to @action fields", m002: "`runInAction` expects a function", m003: "`runInAction` expects a function without arguments", m004: "autorun expects a function", m005: "Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.", m006: "Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.", m007: "reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object", m008: "wrapping reaction expression in `asReference` is no longer supported, use options object instead", m009: "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.", m010: "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'", m011: "First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments", m012: "computed takes one or two arguments if used as function", m013: "[mobx.expr] 'expr' should only be used inside other reactive functions.", m014: "extendObservable expected 2 or more arguments", m015: "extendObservable expects an object as first argument", m016: "extendObservable should not be used on maps, use map.merge instead", m017: "all arguments of extendObservable should be objects", m018: "extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540", m019: "[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.", m020: "modifiers can only be used for individual object properties", m021: "observable expects zero or one arguments", m022: "@observable can not be used on getters, use @computed instead", m024: "whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.", m025: "whyRun can only be used on reactions and computed values", m026: "`action` can only be invoked on functions", m028: "It is not allowed to set `useStrict` when a derivation is running", m029: "INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row", m030a: "Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ", m030b: "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ", m031: "Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ", m032: `* This computation is suspended (not in use by any reaction) and won't run automatically. Didn't expect this computation to be suspended at this point? 1. Make sure this computation is used by a reaction (reaction, autorun, observer). 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).`, m033: "`observe` doesn't support the fire immediately property for observable maps.", m034: "`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead", m035: "Cannot make the designated object observable; it is not extensible", m036: "It is not possible to get index atoms from arrays", m037: `Hi there! I'm sorry you have just run into an exception. @@ -68832,7 +68844,7 @@ If that all doesn't help you out, feel free to open an issue https://github.com/ 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation. ` }; function Gn(r) { - return mae[r]; + return bae[r]; } function T1(r, e) { an(typeof e == "function", Gn("m026")), an(typeof r == "string" && r.length > 0, "actions should have valid names, got: '" + r + "'"); @@ -68871,10 +68883,10 @@ function Ez(r) { function Sz(r) { Er.allowStateChanges = r; } -function uE(r, e, t, n, i) { +function sE(r, e, t, n, i) { function a(o, s, u, l, c) { if (c === void 0 && (c = 0), an(i || g8(arguments), "This function is a decorator, but it wasn't invoked like a decorator"), u) { - cE(o, "__mobxLazyInitializers") || jp(o, "__mobxLazyInitializers", o.__mobxLazyInitializers && o.__mobxLazyInitializers.slice() || []); + lE(o, "__mobxLazyInitializers") || jp(o, "__mobxLazyInitializers", o.__mobxLazyInitializers && o.__mobxLazyInitializers.slice() || []); var f = u.value, d = u.initializer; return o.__mobxLazyInitializers.push(function(p) { r(p, s, d ? d.call(p) : f, l, u); @@ -68900,7 +68912,7 @@ function uE(r, e, t, n, i) { } : a; } function p8(r, e, t, n, i, a) { - cE(r, "__mobxInitializedProps") || jp(r, "__mobxInitializedProps", {}), r.__mobxInitializedProps[e] = !0, n(r, e, t, i, a); + lE(r, "__mobxInitializedProps") || jp(r, "__mobxInitializedProps", {}), r.__mobxInitializedProps[e] = !0, n(r, e, t, i, a); } function C1(r) { r.__mobxDidRunLazyInitializers !== !0 && r.__mobxLazyInitializers && (jp(r, "__mobxDidRunLazyInitializers", !0), r.__mobxDidRunLazyInitializers && r.__mobxLazyInitializers.forEach(function(e) { @@ -68910,14 +68922,14 @@ function C1(r) { function g8(r) { return (r.length === 2 || r.length === 3) && typeof r[1] == "string"; } -var bae = uE(function(r, e, t, n, i) { +var _ae = sE(function(r, e, t, n, i) { var a = n && n.length === 1 ? n[0] : t.name || e || ""; jp(r, e, ta(a, t)); }, function(r) { return this[r]; }, function() { an(!1, Gn("m001")); -}, !1, !0), _ae = uE(function(r, e, t) { +}, !1, !0), wae = sE(function(r, e, t) { Oz(r, e, t); }, function(r) { return this[r]; @@ -68930,7 +68942,7 @@ function y8(r) { return function(e, t, n) { if (n && typeof n.value == "function") return n.value = T1(r, n.value), n.enumerable = !1, n.configurable = !0, n; if (n !== void 0 && n.get !== void 0) throw new Error("[mobx] action is not expected to be used with getters"); - return bae(r).apply(this, arguments); + return _ae(r).apply(this, arguments); }; } function Vx(r) { @@ -68947,13 +68959,13 @@ ta.bound = function(r, e, t) { var n = T1("", r); return n.autoBind = !0, n; } - return _ae.apply(null, arguments); + return wae.apply(null, arguments); }; var m8 = Object.prototype.toString; -function lE(r, e) { - return PM(r, e); +function uE(r, e) { + return RM(r, e); } -function PM(r, e, t, n) { +function RM(r, e, t, n) { if (r === e) return r !== 0 || 1 / r == 1 / e; if (r == null || e == null) return !1; if (r != r) return e != e; @@ -68984,11 +68996,11 @@ function PM(r, e, t, n) { for (var h = (s = s || []).length; h--; ) if (s[h] === a) return u[h] === o; if (s.push(a), u.push(o), c) { if ((h = a.length) !== o.length) return !1; - for (; h--; ) if (!PM(a[h], o[h], s, u)) return !1; + for (; h--; ) if (!RM(a[h], o[h], s, u)) return !1; } else { var p, g = Object.keys(a); if (h = g.length, Object.keys(o).length !== h) return !1; - for (; h--; ) if (!wae(o, p = g[h]) || !PM(a[p], o[p], s, u)) return !1; + for (; h--; ) if (!xae(o, p = g[h]) || !RM(a[p], o[p], s, u)) return !1; } return s.pop(), u.pop(), !0; })(r, e, t, n); @@ -69003,14 +69015,14 @@ function b8(r) { return t; })(r.entries()) : r; } -function wae(r, e) { +function xae(r, e) { return Object.prototype.hasOwnProperty.call(r, e); } function _8(r, e) { return r === e; } var yv = { identity: _8, structural: function(r, e) { - return lE(r, e); + return uE(r, e); }, default: function(r, e) { return (function(t, n) { return typeof t == "number" && typeof n == "number" && isNaN(t) && isNaN(n); @@ -69061,9 +69073,9 @@ var Jg = (function() { } })(this); }, r.prototype.onBecomeUnobserved = function() { - NM(this), this.value = void 0; + IM(this), this.value = void 0; }, r.prototype.get = function() { - an(!this.isComputing, "Cycle detected in computation " + this.name, this.derivation), Er.inBatch === 0 ? (Tp(), IM(this) && (this.isTracing !== Od.NONE && console.log("[mobx.trace] '" + this.name + "' is being read outside a reactive context and doing a full recompute"), this.value = this.computeValue(!1)), Cp()) : (Kz(this), IM(this) && this.trackAndCompute() && (function(t) { + an(!this.isComputing, "Cycle detected in computation " + this.name, this.derivation), Er.inBatch === 0 ? (Tp(), kM(this) && (this.isTracing !== Od.NONE && console.log("[mobx.trace] '" + this.name + "' is being read outside a reactive context and doing a full recompute"), this.value = this.computeValue(!1)), Cp()) : (Kz(this), kM(this) && this.trackAndCompute() && (function(t) { if (t.lowestObserverState !== ii.STALE) { t.lowestObserverState = ii.STALE; for (var n = t.observers, i = n.length; i--; ) { @@ -69127,12 +69139,12 @@ var Jg = (function() { WhyRun? computation '` + this.name + `': * 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") + ` ` + (this.dependenciesState === ii.NOT_TRACKING ? Gn("m032") : ` * This computation will re-run if any of the following observables changes: - ` + DM(t) + ` + ` + MM(t) + ` ` + (this.isComputing && e ? " (... or any observable accessed during the remainder of the current run)" : "") + ` ` + Gn("m038") + ` * If the outcome of this computation changes, the following observers will be re-run: - ` + DM(n) + ` + ` + MM(n) + ` `); }, r; })(); @@ -69142,9 +69154,9 @@ var fv = ly("ComputedValue", Jg), Cz = (function() { this.target = e, this.name = t, this.values = {}, this.changeListeners = null, this.interceptors = null; } return r.prototype.observe = function(e, t) { - return an(t !== !0, "`observe` doesn't support the fire immediately property for observable objects."), sE(this, e); + return an(t !== !0, "`observe` doesn't support the fire immediately property for observable objects."), oE(this, e); }, r.prototype.intercept = function(e) { - return oE(this, e); + return aE(this, e); }, r; })(); function Um(r, e) { @@ -69153,18 +69165,18 @@ function Um(r, e) { var t = new Cz(r, e); return R1(r, "$mobx", t), t; } -function xae(r, e, t, n) { +function Eae(r, e, t, n) { if (r.values[e] && !fv(r.values[e])) return an("value" in t, "The property " + e + " in " + r.name + " is already observable, cannot redefine it as computed property"), void (r.target[e] = t.value); if ("value" in t) if (uy(t.value)) { var i = t.value; - MM(r, e, i.initialValue, i.enhancer); + PM(r, e, i.initialValue, i.enhancer); } else Vx(t.value) && t.value.autoBind === !0 ? Oz(r.target, e, t.value.originalFn) : fv(t.value) ? (function(a, o, s) { var u = a.name + "." + o; s.name = u, s.scope || (s.scope = a.target), a.values[o] = s, Object.defineProperty(a.target, o, Rz(o)); - })(r, e, t.value) : MM(r, e, t.value, n); + })(r, e, t.value) : PM(r, e, t.value, n); else Az(r, e, t.get, t.set, yv.default, !0); } -function MM(r, e, t, n) { +function PM(r, e, t, n) { if (BD(r.target, e), Kg(r)) { var i = Zg(r, { object: r.target, name: e, type: "add", newValue: t }); if (!i) return; @@ -69203,9 +69215,9 @@ function Pz(r, e, t) { o && Ad(s), i.setNewValue(t), a && Op(n, s), o && Rd(); } } -var Eae = ly("ObservableObjectAdministration", Cz); +var Sae = ly("ObservableObjectAdministration", Cz); function xh(r) { - return !!jD(r) && (C1(r), Eae(r.$mobx)); + return !!jD(r) && (C1(r), Sae(r.$mobx)); } function i0(r, e) { if (r == null) return !1; @@ -69220,8 +69232,8 @@ function i0(r, e) { return xh(r) || !!r.$mobx || MD(r) || Vm(r) || fv(r); } function i_(r) { - return an(!!r, ":("), uE(function(e, t, n, i, a) { - BD(e, t), an(!a || !a.get, Gn("m022")), MM(Um(e, void 0), t, n, r); + return an(!!r, ":("), sE(function(e, t, n, i, a) { + BD(e, t), an(!a || !a.get, Gn("m022")), PM(Um(e, void 0), t, n, r); }, function(e) { var t = this.$mobx.values[e]; if (t !== void 0) return t.get(); @@ -69243,14 +69255,14 @@ function ND(r, e, t) { }); for (var n = Um(r), i = {}, a = t.length - 1; a >= 0; a--) { var o = t[a]; - for (var s in o) if (i[s] !== !0 && cE(o, s)) { + for (var s in o) if (i[s] !== !0 && lE(o, s)) { if (i[s] = !0, r === o && !Bz(r, s)) continue; - xae(n, s, Object.getOwnPropertyDescriptor(o, s), e); + Eae(n, s, Object.getOwnPropertyDescriptor(o, s), e); } } return r; } -var kz = i_(yp), Sae = i_(Iz), Oae = i_(mp), Tae = i_(Nb), Cae = i_(Nz), E8 = { box: function(r, e) { +var kz = i_(yp), Oae = i_(Iz), Tae = i_(mp), Cae = i_(Nb), Aae = i_(Nz), E8 = { box: function(r, e) { return arguments.length > 2 && rp("box"), new Lp(r, yp, e); }, shallowBox: function(r, e) { return arguments.length > 2 && rp("shallowBox"), new Lp(r, mp, e); @@ -69271,13 +69283,13 @@ var kz = i_(yp), Sae = i_(Iz), Oae = i_(mp), Tae = i_(Nb), Cae = i_(Nz), E8 = { var t = {}; return Um(t, e), Dz(t, r), t; }, ref: function() { - return arguments.length < 2 ? bb(mp, arguments[0]) : Oae.apply(null, arguments); + return arguments.length < 2 ? bb(mp, arguments[0]) : Tae.apply(null, arguments); }, shallow: function() { - return arguments.length < 2 ? bb(Iz, arguments[0]) : Sae.apply(null, arguments); + return arguments.length < 2 ? bb(Iz, arguments[0]) : Oae.apply(null, arguments); }, deep: function() { return arguments.length < 2 ? bb(yp, arguments[0]) : kz.apply(null, arguments); }, struct: function() { - return arguments.length < 2 ? bb(Nb, arguments[0]) : Tae.apply(null, arguments); + return arguments.length < 2 ? bb(Nb, arguments[0]) : Cae.apply(null, arguments); } }, ka = function(r) { if (r === void 0 && (r = void 0), typeof arguments[1] == "string") return kz.apply(null, arguments); if (an(arguments.length <= 1, Gn("m021")), an(!uy(r), Gn("m020")), i0(r)) return r; @@ -69303,7 +69315,7 @@ function mp(r) { return r; } function Nb(r, e, t) { - if (lE(r, e)) return e; + if (uE(r, e)) return e; if (i0(r)) return r; if (Array.isArray(r)) return new uv(r, Nb, t); if (Gm(r)) return new zm(r, Nb, t); @@ -69314,7 +69326,7 @@ function Nb(r, e, t) { return r; } function Nz(r, e, t) { - return lE(r, e) ? e : r; + return uE(r, e) ? e : r; } function cm(r, e) { e === void 0 && (e = void 0), Tp(); @@ -69327,11 +69339,11 @@ function cm(r, e) { Object.keys(E8).forEach(function(r) { return ka[r] = E8[r]; }), ka.deep.struct = ka.struct, ka.ref.struct = function() { - return arguments.length < 2 ? bb(Nz, arguments[0]) : Cae.apply(null, arguments); + return arguments.length < 2 ? bb(Nz, arguments[0]) : Aae.apply(null, arguments); }; -var Aae = {}, zm = (function() { +var Rae = {}, zm = (function() { function r(e, t, n) { - t === void 0 && (t = yp), n === void 0 && (n = "ObservableMap@" + lu()), this.enhancer = t, this.name = n, this.$mobx = Aae, this._data = /* @__PURE__ */ Object.create(null), this._hasMap = /* @__PURE__ */ Object.create(null), this._keys = new uv(void 0, mp, this.name + ".keys()", !0), this.interceptors = null, this.changeListeners = null, this.dehancer = void 0, this.merge(e); + t === void 0 && (t = yp), n === void 0 && (n = "ObservableMap@" + lu()), this.enhancer = t, this.name = n, this.$mobx = Rae, this._data = /* @__PURE__ */ Object.create(null), this._hasMap = /* @__PURE__ */ Object.create(null), this._keys = new uv(void 0, mp, this.name + ".keys()", !0), this.interceptors = null, this.changeListeners = null, this.dehancer = void 0, this.merge(e); } return r.prototype._has = function(e) { return this._data[e] !== void 0; @@ -69441,9 +69453,9 @@ var Aae = {}, zm = (function() { return t + ": " + e.get(t); }).join(", ") + " }]"; }, r.prototype.observe = function(e, t) { - return an(t !== !0, Gn("m033")), sE(this, e); + return an(t !== !0, Gn("m033")), oE(this, e); }, r.prototype.intercept = function(e) { - return oE(this, e); + return aE(this, e); }, r; })(); bz(zm.prototype, function() { @@ -69481,7 +69493,7 @@ function Wx(r) { e.indexOf(t) === -1 && e.push(t); }), e; } -function DM(r, e, t) { +function MM(r, e, t) { return e === void 0 && (e = 100), t === void 0 && (t = " - "), r ? r.slice(0, e).join(t) + (r.length > e ? " (... and " + (r.length - e) + "more)" : "") : ""; } function jD(r) { @@ -69495,13 +69507,13 @@ function qm(r) { function jz() { for (var r = arguments[0], e = 1, t = arguments.length; e < t; e++) { var n = arguments[e]; - for (var i in n) cE(n, i) && (r[i] = n[i]); + for (var i in n) lE(n, i) && (r[i] = n[i]); } return r; } -var Rae = Object.prototype.hasOwnProperty; -function cE(r, e) { - return Rae.call(r, e); +var Pae = Object.prototype.hasOwnProperty; +function lE(r, e) { + return Pae.call(r, e); } function jp(r, e, t) { Object.defineProperty(r, e, { enumerable: !1, writable: !0, configurable: !0, value: t }); @@ -69531,18 +69543,18 @@ function Fz() { function Uz(r) { return r === null ? null : typeof r == "object" ? "" + r : r; } -var ii, Od, Pae = ["mobxGuid", "resetId", "spyListeners", "strictMode", "runId"], zz = function() { +var ii, Od, Mae = ["mobxGuid", "resetId", "spyListeners", "strictMode", "runId"], zz = function() { this.version = 5, this.trackingDerivation = null, this.computationDepth = 0, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0, this.strictMode = !1, this.resetId = 0, this.spyListeners = [], this.globalReactionErrorHandlers = []; -}, Er = new zz(), qz = !1, Gz = !1, T8 = !1, yP = A1(); +}, Er = new zz(), qz = !1, Gz = !1, T8 = !1, gP = A1(); function Eh(r, e) { if (typeof r == "object" && r !== null) { if (gv(r)) return an(e === void 0, Gn("m036")), r.$mobx.atom; if (zf(r)) { var t = r; - return e === void 0 ? Eh(t._keys) : (an(!!(n = t._data[e] || t._hasMap[e]), "the entry '" + e + "' does not exist in the observable map '" + kM(r) + "'"), n); + return e === void 0 ? Eh(t._keys) : (an(!!(n = t._data[e] || t._hasMap[e]), "the entry '" + e + "' does not exist in the observable map '" + DM(r) + "'"), n); } var n; - if (C1(r), e && !r.$mobx && r[e], xh(r)) return e ? (an(!!(n = r.$mobx.values[e]), "no observable property '" + e + "' found on the observable object '" + kM(r) + "'"), n) : cu("please specify a property"); + if (C1(r), e && !r.$mobx && r[e], xh(r)) return e ? (an(!!(n = r.$mobx.values[e]), "no observable property '" + e + "' found on the observable object '" + DM(r) + "'"), n) : cu("please specify a property"); if (MD(r) || fv(r) || Vm(r)) return r; } else if (typeof r == "function" && Vm(r.$mobx)) return r.$mobx; return cu("Cannot obtain atom from " + r); @@ -69550,7 +69562,7 @@ function Eh(r, e) { function lv(r, e) { return an(r, "Expecting some object"), e !== void 0 ? lv(Eh(r, e)) : MD(r) || fv(r) || Vm(r) || zf(r) ? r : (C1(r), r.$mobx ? r.$mobx : void an(!1, "Cannot obtain administration from " + r)); } -function kM(r, e) { +function DM(r, e) { return (e !== void 0 ? Eh(r, e) : xh(r) || zf(r) ? lv(r) : Eh(r)).name; } function Vz(r, e) { @@ -69569,7 +69581,7 @@ function Wz(r) { function Yz(r) { return r.observers; } -function Mae(r, e) { +function Dae(r, e) { var t = r.observers.length; t && (r.observersIndexes[e.__mapid] = t), r.observers[t] = e, r.lowestObserverState > e.dependenciesState && (r.lowestObserverState = e.dependenciesState); } @@ -69630,9 +69642,9 @@ function Qz(r, e, t) { return Qz(n, e, t + 1); })); } -yP.__mobxInstanceCount ? (yP.__mobxInstanceCount++, setTimeout(function() { +gP.__mobxInstanceCount ? (gP.__mobxInstanceCount++, setTimeout(function() { qz || Gz || T8 || (T8 = !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)) : yP.__mobxInstanceCount = 1, (function(r) { +}, 1)) : gP.__mobxInstanceCount = 1, (function(r) { r[r.NOT_TRACKING = -1] = "NOT_TRACKING", r[r.UP_TO_DATE = 0] = "UP_TO_DATE", r[r.POSSIBLY_STALE = 1] = "POSSIBLY_STALE", r[r.STALE = 2] = "STALE"; })(ii || (ii = {})), (function(r) { r[r.NONE = 0] = "NONE", r[r.LOG = 1] = "LOG", r[r.BREAK = 2] = "BREAK"; @@ -69643,7 +69655,7 @@ var Yx = function(r) { function _b(r) { return r instanceof Yx; } -function IM(r) { +function kM(r) { switch (r.dependenciesState) { case ii.UP_TO_DATE: return !1; @@ -69686,12 +69698,12 @@ function eq(r, e, t) { for (s.length = l, a.newObserving = null, c = o.length; c--; ) (d = o[c]).diffValue === 0 && Xz(d, a), d.diffValue = 0; for (; l--; ) { var d; - (d = s[l]).diffValue === 1 && (d.diffValue = 0, Mae(d, a)); + (d = s[l]).diffValue === 1 && (d.diffValue = 0, Dae(d, a)); } u !== ii.UP_TO_DATE && (a.dependenciesState = u, a.onBecomeStale()); })(r), n; } -function NM(r) { +function IM(r) { var e = r.observing; r.observing = []; for (var t = e.length; t--; ) Xz(e[t], r); @@ -69738,13 +69750,13 @@ var P1 = (function() { }, r.prototype.isScheduled = function() { return this._isScheduled; }, r.prototype.runReaction = function() { - this.isDisposed || (Tp(), this._isScheduled = !1, IM(this) && (this._isTrackPending = !0, this.onInvalidate(), this._isTrackPending && Ul() && Qg({ object: this, type: "scheduled-reaction" })), Cp()); + this.isDisposed || (Tp(), this._isScheduled = !1, kM(this) && (this._isTrackPending = !0, this.onInvalidate(), this._isTrackPending && Ul() && Qg({ object: this, type: "scheduled-reaction" })), Cp()); }, r.prototype.track = function(e) { Tp(); var t, n = Ul(); n && (t = Date.now(), Ad({ object: this, type: "reaction", fn: e })), this._isRunning = !0; var i = eq(this, e, void 0); - this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && NM(this), _b(i) && this.reportExceptionInDerivation(i.cause), n && Rd({ time: Date.now() - t }), Cp(); + this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && IM(this), _b(i) && this.reportExceptionInDerivation(i.cause), n && Rd({ time: Date.now() - t }), Cp(); }, r.prototype.reportExceptionInDerivation = function(e) { var t = this; if (this.errorHandler) this.errorHandler(e, this); @@ -69755,10 +69767,10 @@ var P1 = (function() { }); } }, r.prototype.dispose = function() { - this.isDisposed || (this.isDisposed = !0, this._isRunning || (Tp(), NM(this), Cp())); + this.isDisposed || (this.isDisposed = !0, this._isRunning || (Tp(), IM(this), Cp())); }, r.prototype.getDisposer = function() { var e = this.dispose.bind(this); - return e.$mobx = this, e.onError = Dae, e; + return e.$mobx = this, e.onError = kae, e; }, r.prototype.toString = function() { return "Reaction[" + this.name + "]"; }, r.prototype.whyRun = function() { @@ -69769,7 +69781,7 @@ var P1 = (function() { WhyRun? reaction '` + this.name + `': * Status: [` + (this.isDisposed ? "stopped" : this._isRunning ? "running" : this.isScheduled() ? "scheduled" : "idle") + `] * This reaction will re-run if any of the following observables changes: - ` + DM(e) + ` + ` + MM(e) + ` ` + (this._isRunning ? " (... or any observable accessed during the remainder of the current run)" : "") + ` ` + Gn("m038") + ` `; @@ -69784,16 +69796,16 @@ WhyRun? reaction '` + this.name + `': })(this, e); }, r; })(); -function Dae(r) { +function kae(r) { an(this && this.$mobx && Vm(this.$mobx), "Invalid `this`"), an(!this.$mobx.errorHandler, "Only one onErrorHandler can be registered"), this.$mobx.errorHandler = r; } -var A8 = 100, LM = function(r) { +var A8 = 100, NM = function(r) { return r(); }; function iq() { - Er.inBatch > 0 || Er.isRunningReactions || LM(kae); + Er.inBatch > 0 || Er.isRunningReactions || NM(Iae); } -function kae() { +function Iae() { Er.isRunningReactions = !0; for (var r = Er.pendingReactions, e = 0; r.length > 0; ) { ++e === A8 && (console.error("Reaction doesn't converge to a stable state after " + A8 + " iterations. Probably there is a cycle in the reactive function: " + r[0]), r.splice(0)); @@ -69803,7 +69815,7 @@ function kae() { } var Vm = ly("Reaction", P1); function UD(r) { - return uE(function(e, t, n, i, a) { + return sE(function(e, t, n, i, a) { an(a !== void 0, Gn("m009")), an(typeof a.get == "function", Gn("m010")), Az(Um(e, ""), t, a.get, a.set, r, !1); }, function(e) { var t = this.$mobx.values[e]; @@ -69812,8 +69824,8 @@ function UD(r) { this.$mobx.values[e].set(t); }, !1, !1); } -var Iae = UD(yv.default), Nae = UD(yv.structural), Xx = function(r, e, t) { - if (typeof e == "string") return Iae.apply(null, arguments); +var Nae = UD(yv.default), Lae = UD(yv.structural), Xx = function(r, e, t) { + if (typeof e == "string") return Nae.apply(null, arguments); an(typeof r == "function", Gn("m011")), an(arguments.length < 3, Gn("m012")); var n = typeof e == "object" ? e : {}; n.setter = typeof e == "function" ? e : n.setter; @@ -69849,7 +69861,7 @@ function Xu(r, e, t) { } return r; } -Xx.struct = Nae, Xx.equals = UD; +Xx.struct = Lae, Xx.equals = UD; var zD = { allowStateChanges: function(r, e) { var t, n = Ez(r); try { @@ -69858,7 +69870,7 @@ var zD = { allowStateChanges: function(r, e) { Sz(n); } return t; -}, deepEqual: lE, getAtom: Eh, getDebugName: kM, getDependencyTree: Vz, getAdministration: lv, getGlobalState: function() { +}, deepEqual: uE, getAtom: Eh, getDebugName: DM, getDependencyTree: Vz, getAdministration: lv, getGlobalState: function() { return Er; }, getObserverTree: function(r, e) { return Wz(Eh(r, e)); @@ -69881,7 +69893,7 @@ var zD = { allowStateChanges: function(r, e) { }, reserveArrayBuffer: DD, resetGlobalState: function() { Er.resetId++; var r = new zz(); - for (var e in r) Pae.indexOf(e) === -1 && (Er[e] = r[e]); + for (var e in r) Mae.indexOf(e) === -1 && (Er[e] = r[e]); Er.allowStateChanges = !Er.strictMode; }, isolateGlobalState: function() { Gz = !0, A1().__mobxInstanceCount--; @@ -69892,13 +69904,13 @@ var zD = { allowStateChanges: function(r, e) { if (r.__mobxGlobal && r.__mobxGlobal.version !== e.version) throw new Error("[mobx] An incompatible version of mobx is already loaded."); r.__mobxGlobal ? Er = r.__mobxGlobal : r.__mobxGlobal = e; }, spyReport: Qg, spyReportEnd: Rd, spyReportStart: Ad, setReactionScheduler: function(r) { - var e = LM; - LM = function(t) { + var e = NM; + NM = function(t) { return r(function() { return e(t); }); }; -} }, jM = { Reaction: P1, untracked: tq, Atom: hae, BaseAtom: n_, useStrict: xz, isStrictModeEnabled: function() { +} }, LM = { Reaction: P1, untracked: tq, Atom: vae, BaseAtom: n_, useStrict: xz, isStrictModeEnabled: function() { return Er.strictMode; }, spy: mz, comparer: yv, asReference: function(r) { return Rg("asReference is deprecated, use observable.ref instead"), ka.ref(r); @@ -69965,7 +69977,7 @@ var zD = { allowStateChanges: function(r, e) { }, void 0, yv.default, "Transformer-" + r.name + "-" + s, void 0) || this; return l.sourceIdentifier = s, l.sourceObject = u, l; } - return aE(o, a), o.prototype.onBecomeUnobserved = function() { + return iE(o, a), o.prototype.onBecomeUnobserved = function() { var s = this.value; a.prototype.onBecomeUnobserved.call(this), delete t[this.sourceIdentifier], e && e(s, this.sourceObject); }, o; @@ -69984,13 +69996,13 @@ var zD = { allowStateChanges: function(r, e) { return Rg("`whyRun` is deprecated in favor of `trace`"), (r = nq(arguments)) ? fv(r) || Vm(r) ? C8(r.whyRun()) : cu(Gn("m025")) : C8(Gn("m024")); }, isArrayLike: function(r) { return Array.isArray(r) || gv(r); -}, extras: zD }, R8 = !1, Lae = function(r) { - var e = jM[r]; - Object.defineProperty(jM, r, { get: function() { +}, extras: zD }, R8 = !1, jae = function(r) { + var e = LM[r]; + Object.defineProperty(LM, r, { get: function() { return R8 || (R8 = !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")), e; } }); }; -for (var jae in jM) Lae(jae); +for (var Bae in LM) jae(Bae); function Lb(r) { return Lb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -69998,7 +70010,7 @@ function Lb(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Lb(r); } -function Bae(r, e) { +function Fae(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, aq(n.key), n); @@ -70018,7 +70030,7 @@ function aq(r) { return Lb(e) == "symbol" ? e : e + ""; } typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ spy: mz, extras: zD }); -var Fae = ["onLayoutDone", "onLayoutStep", "onError", "onInitialization", "onLayoutComputing", "onWebGLContextLost", "onZoomTransitionDone", "restart"], Uae = (function() { +var Uae = ["onLayoutDone", "onLayoutStep", "onError", "onInitialization", "onLayoutComputing", "onWebGLContextLost", "onZoomTransitionDone", "restart"], zae = (function() { return r = function t() { var n, i, a, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; (function(s, u) { @@ -70040,12 +70052,12 @@ var Fae = ["onLayoutDone", "onLayoutStep", "onError", "onInitialization", "onLay this.isValidFunction(this.callbacks.onWebGLContextLost) && this.callbacks.onWebGLContextLost(t); } }, { key: "isValidFunction", value: function(t) { return t !== void 0 && typeof t == "function"; - } }], e && Bae(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Fae(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; -})(), zae = io(1803), P8 = io.n(zae), Cr = 256, K0 = 4096, ha = 25, oq = "#818790", sq = "#EDEDED", uq = "#CFD1D4", lq = "#F5F6F6", cq = "#8FE3E8", qD = "#1A1B1D", wb = '"Open Sans", sans-serif', BM = { position: "absolute", top: 0, bottom: 0, left: 0, right: 0 }, qae = 1 / 0.38, $n = function() { +})(), qae = io(1803), P8 = io.n(qae), Cr = 256, K0 = 4096, ha = 25, oq = "#818790", sq = "#EDEDED", uq = "#CFD1D4", lq = "#F5F6F6", cq = "#8FE3E8", qD = "#1A1B1D", wb = '"Open Sans", sans-serif', jM = { position: "absolute", top: 0, bottom: 0, left: 0, right: 0 }, Gae = 1 / 0.38, $n = function() { return window.devicePixelRatio || 1; }; -function Gae(r, e) { +function Vae(r, e) { return (function(t) { if (Array.isArray(t)) return t; })(r) || (function(t, n) { @@ -70114,7 +70126,7 @@ function D8(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -var Vae = -Math.PI / 2; +var Hae = -Math.PI / 2; function Z0(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { @@ -70167,7 +70179,7 @@ var dq = function(r, e) { var n = t.from, i = t.to, a = dq(n, i); e.has(a) || e.add(a); }), e; -}, FM = function(r) { +}, BM = function(r) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : sq, t = /* @__PURE__ */ new Map(); return r.forEach(function(n) { var i = n.id, a = n.from, o = n.to, s = n.color, u = n.width, l = n.disabled, c = dq(a, o), f = t.get(c); @@ -70209,7 +70221,7 @@ function I8(r, e) { } return t; } -function Hae(r) { +function Wae(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? I8(Object(t), !0).forEach(function(n) { @@ -70220,7 +70232,7 @@ function Hae(r) { } return r; } -function mP(r, e) { +function yP(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = (function(u, l) { @@ -70263,7 +70275,7 @@ function N8(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Wae(r, e) { +function Yae(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, hq(n.key), n); @@ -70297,7 +70309,7 @@ var L8 = function(r, e, t) { var i = n.state; this.positions = {}, this.oldPositions = {}, this.startTime = 0, this.t = 1, this.currentT = 1, this.state = i, this.shouldUpdateAnimator = !1, this.parents = {}, this.animationCompleteCallback = n.animationCompleteCallback; }, e = [{ key: "getPositionMapFromState", value: function() { - var t, n = this.state.nodes, i = n.idToPosition, a = {}, o = mP(n.items); + var t, n = this.state.nodes, i = n.idToPosition, a = {}, o = yP(n.items); try { for (o.s(); !(t = o.n()).done; ) { var s = t.value, u = i[s.id]; @@ -70319,7 +70331,7 @@ var L8 = function(r, e, t) { var t = this.shouldUpdateAnimator, n = (Date.now() - this.startTime) / 400; this.t = Math.min(n, 1), this.currentT < 1 ? this.shouldUpdateAnimator = !0 : (this.shouldUpdateAnimator = !1, t && !this.shouldUpdateAnimator && this.animationCompleteCallback !== void 0 && this.animationCompleteCallback(), this.shouldUpdateAnimator || this.updatePositionsFromState()); } }, { key: "updateNodes", value: function(t) { - var n, i = mP(t); + var n, i = yP(t); try { for (i.s(); !(n = i.n()).done; ) { var a = n.value; @@ -70337,12 +70349,12 @@ var L8 = function(r, e, t) { P === void 0 || isNaN(P.x) || isNaN(P.y) || P.x === 0 || P.y === 0 || (S.x += P.x, S.y += P.y, E += 1); } return E > 0 ? [S.x / E, S.y / E] : [0, 0]; - })(t, a), s = { x: o[0], y: o[1] }, u = [], l = mP(t); + })(t, a), s = { x: o[0], y: o[1] }, u = [], l = yP(t); try { for (l.s(); !(n = l.n()).done; ) { var c = n.value, f = this.positions[c.id], d = a[c.id], h = { id: c.id }; if (f !== void 0) { - for (var p, g, y, b = c.id, _ = (p = this.oldPositions[c.id]) !== null && p !== void 0 ? p : Hae({}, s); _ === void 0 && i[b] !== void 0; ) b = i[b], _ = this.oldPositions[b]; + for (var p, g, y, b = c.id, _ = (p = this.oldPositions[c.id]) !== null && p !== void 0 ? p : Wae({}, s); _ === void 0 && i[b] !== void 0; ) b = i[b], _ = this.oldPositions[b]; _.x = (g = _.x) !== null && g !== void 0 ? g : s.x, _.y = (y = _.y) !== null && y !== void 0 ? y : s.y, h.x = L8(_.x, f.x, this.t), h.y = L8(_.y, f.y, this.t); } else d !== void 0 && (h.x = d.x || s.x, h.y = d.y || s.y); u.push(h); @@ -70353,7 +70365,7 @@ var L8 = function(r, e, t) { l.f(); } return this.currentT = this.t, u; - } }], e && Wae(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Yae(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function Om(r) { @@ -70363,7 +70375,7 @@ function Om(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Om(r); } -function Yae(r, e) { +function Xae(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, pq(n.key), n); @@ -70379,8 +70391,8 @@ function vq() { return !!r; })(); } -function UM() { - return UM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { +function FM() { + return FM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { var n = (function(a, o) { for (; !{}.hasOwnProperty.call(a, o) && (a = Tm(a)) !== null; ) ; return a; @@ -70389,17 +70401,17 @@ function UM() { var i = Object.getOwnPropertyDescriptor(n, e); return i.get ? i.get.call(arguments.length < 3 ? r : t) : i.value; } - }, UM.apply(null, arguments); + }, FM.apply(null, arguments); } function Tm(r) { return Tm = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Tm(r); } -function zM(r, e) { - return zM = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { +function UM(r, e) { + return UM = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { return t.__proto__ = n, t; - }, zM(r, e); + }, UM(r, e); } function j8(r, e, t) { return (e = pq(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; @@ -70417,7 +70429,7 @@ function pq(r) { })(r); return Om(e) == "symbol" ? e : e + ""; } -var Dl = "CircularLayout", Xae = (function() { +var Dl = "CircularLayout", $ae = (function() { function r(n) { var i; (function(u, l) { @@ -70448,7 +70460,7 @@ var Dl = "CircularLayout", Xae = (function() { } return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); - n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && zM(n, i); + n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && UM(n, i); })(r, GD), e = r, t = [{ key: "setOptions", value: function(n) { n && "sortFunction" in n && (this.sortFunction = n.sortFunction); } }, { key: "update", value: function() { @@ -70458,7 +70470,7 @@ var Dl = "CircularLayout", Xae = (function() { (n || s || u || l || c || d) && this.layout(a.items), a.clearChannel(Dl), o.clearChannel(Dl); } (function(h, p, g) { - var y = UM(Tm(h.prototype), "update", g); + var y = FM(Tm(h.prototype), "update", g); return typeof y == "function" ? function(b) { return y.apply(g, b); } : y; @@ -70488,10 +70500,10 @@ var Dl = "CircularLayout", Xae = (function() { return d[z] = j * _; }), b = 250; } - var m, x = Vae, S = {}, O = M8(l.entries()); + var m, x = Hae, S = {}, O = M8(l.entries()); try { for (O.s(); !(m = O.n()).done; ) { - var E = Gae(m.value, 2), T = E[0], P = E[1], I = d[T] / b, k = x + I / 2; + var E = Vae(m.value, 2), T = E[0], P = E[1], I = d[T] / b, k = x + I / 2; x = k + I / 2; var L = Math.cos(k) * b, B = Math.sin(k) * b; S[P.id] = { id: P.id, x: L, y: B }; @@ -70510,9 +70522,9 @@ var Dl = "CircularLayout", Xae = (function() { this.stateDisposers.forEach(function(n) { n(); }), this.state.nodes.removeChannel(Dl), this.state.rels.removeChannel(Dl); - } }], t && Yae(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }], t && Xae(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; -})(), $ae = { value: () => { +})(), Kae = { value: () => { } }; function gq() { for (var r, e = 0, t = arguments.length, n = {}; e < t; ++e) { @@ -70524,12 +70536,12 @@ function gq() { function lx(r) { this._ = r; } -function Kae(r, e) { +function Zae(r, e) { for (var t, n = 0, i = r.length; n < i; ++n) if ((t = r[n]).name === e) return t.value; } function B8(r, e, t) { for (var n = 0, i = r.length; n < i; ++n) if (r[n].name === e) { - r[n] = $ae, r = r.slice(0, n).concat(r.slice(n + 1)); + r[n] = Kae, r = r.slice(0, n).concat(r.slice(n + 1)); break; } return t != null && r.push({ name: e, value: t }), r; @@ -70546,7 +70558,7 @@ lx.prototype = gq.prototype = { constructor: lx, on: function(r, e) { else if (e == null) for (t in i) i[t] = B8(i[t], r.name, null); return this; } - for (; ++o < s; ) if ((t = (r = a[o]).type) && (t = Kae(i[t], r.name))) return t; + for (; ++o < s; ) if ((t = (r = a[o]).type) && (t = Zae(i[t], r.name))) return t; }, copy: function() { var r = {}, e = this._; for (var t in e) r[t] = e[t].slice(); @@ -70559,25 +70571,25 @@ lx.prototype = gq.prototype = { constructor: lx, on: function(r, e) { if (!this._.hasOwnProperty(r)) throw new Error("unknown type: " + r); for (var n = this._[r], i = 0, a = n.length; i < a; ++i) n[i].value.apply(e, t); } }; -const Zae = gq; -var cx, xb, ym = 0, Eb = 0, Q0 = 0, $x = 0, Ug = 0, fE = 0, M1 = typeof performance == "object" && performance.now ? performance : Date, yq = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(r) { +const Qae = gq; +var cx, xb, ym = 0, Eb = 0, Q0 = 0, $x = 0, Ug = 0, cE = 0, M1 = typeof performance == "object" && performance.now ? performance : Date, yq = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(r) { setTimeout(r, 17); }; function mq() { - return Ug || (yq(Qae), Ug = M1.now() + fE); + return Ug || (yq(Jae), Ug = M1.now() + cE); } -function Qae() { +function Jae() { Ug = 0; } -function qM() { +function zM() { this._call = this._time = this._next = null; } function bq(r, e, t) { - var n = new qM(); + var n = new zM(); return n.restart(r, e, t), n; } function F8() { - Ug = ($x = M1.now()) + fE, ym = Eb = 0; + Ug = ($x = M1.now()) + cE, ym = Eb = 0; try { (function() { mq(), ++ym; @@ -70587,31 +70599,31 @@ function F8() { } finally { ym = 0, (function() { for (var r, e, t = cx, n = 1 / 0; t; ) t._call ? (n > t._time && (n = t._time), r = t, t = t._next) : (e = t._next, t._next = null, t = r ? r._next = e : cx = e); - xb = r, GM(n); + xb = r, qM(n); })(), Ug = 0; } } -function Jae() { +function eoe() { var r = M1.now(), e = r - $x; - e > 1e3 && (fE -= e, $x = r); + e > 1e3 && (cE -= e, $x = r); } -function GM(r) { - ym || (Eb && (Eb = clearTimeout(Eb)), r - Ug > 24 ? (r < 1 / 0 && (Eb = setTimeout(F8, r - M1.now() - fE)), Q0 && (Q0 = clearInterval(Q0))) : (Q0 || ($x = M1.now(), Q0 = setInterval(Jae, 1e3)), ym = 1, yq(F8))); +function qM(r) { + ym || (Eb && (Eb = clearTimeout(Eb)), r - Ug > 24 ? (r < 1 / 0 && (Eb = setTimeout(F8, r - M1.now() - cE)), Q0 && (Q0 = clearInterval(Q0))) : (Q0 || ($x = M1.now(), Q0 = setInterval(eoe, 1e3)), ym = 1, yq(F8))); } -qM.prototype = bq.prototype = { constructor: qM, restart: function(r, e, t) { +zM.prototype = bq.prototype = { constructor: zM, restart: function(r, e, t) { if (typeof r != "function") throw new TypeError("callback is not a function"); - t = (t == null ? mq() : +t) + (e == null ? 0 : +e), this._next || xb === this || (xb ? xb._next = this : cx = this, xb = this), this._call = r, this._time = t, GM(); + t = (t == null ? mq() : +t) + (e == null ? 0 : +e), this._next || xb === this || (xb ? xb._next = this : cx = this, xb = this), this._call = r, this._time = t, qM(); }, stop: function() { - this._call && (this._call = null, this._time = 1 / 0, GM()); + this._call && (this._call = null, this._time = 1 / 0, qM()); } }; const U8 = 4294967296; -function eoe(r) { +function toe(r) { return r.x; } -function toe(r) { +function roe(r) { return r.y; } -var roe = Math.PI * (3 - Math.sqrt(5)); +var noe = Math.PI * (3 - Math.sqrt(5)); function z8(r, e, t, n) { if (isNaN(e) || isNaN(t)) return r; var i, a, o, s, u, l, c, f, d, h = r._root, p = { data: n }, g = r._x0, y = r._y0, b = r._x1, _ = r._y1; @@ -70626,14 +70638,14 @@ function z8(r, e, t, n) { function kl(r, e, t, n, i) { this.node = r, this.x0 = e, this.y0 = t, this.x1 = n, this.y1 = i; } -function noe(r) { +function ioe(r) { return r[0]; } -function ioe(r) { +function aoe(r) { return r[1]; } function VD(r, e, t) { - var n = new HD(e ?? noe, t ?? ioe, NaN, NaN, NaN, NaN); + var n = new HD(e ?? ioe, t ?? aoe, NaN, NaN, NaN, NaN); return r == null ? n : n.addAll(r); } function HD(r, e, t, n, i, a) { @@ -70652,10 +70664,10 @@ function jl(r) { function bp(r) { return 1e-6 * (r() - 0.5); } -function bP() { +function mP() { var r, e, t, n, i, a = jl(-30), o = 1, s = 1 / 0, u = 0.81; function l(h) { - var p, g = r.length, y = VD(r, eoe, toe).visitAfter(f); + var p, g = r.length, y = VD(r, toe, roe).visitAfter(f); for (n = h, p = 0; p < g; ++p) e = r[p], y.visit(d); } function c() { @@ -70700,13 +70712,13 @@ function bP() { return arguments.length ? (u = h * h, l) : Math.sqrt(u); }, l; } -function aoe(r) { +function ooe(r) { return r.x + r.vx; } -function ooe(r) { +function soe(r) { return r.y + r.vy; } -function soe(r) { +function uoe(r) { return r.index; } function G8(r, e) { @@ -70819,28 +70831,28 @@ Il.copy = function() { }, Il.y = function(r) { return arguments.length ? (this._y = r, this) : this._y; }; -var uoe = io(5880), _q = io.n(uoe), bi = _q().getLogger("NVL"); -function VM(r) { - return VM = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { +var loe = io(5880), _q = io.n(loe), bi = _q().getLogger("NVL"); +function GM(r) { + return GM = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; - }, VM(r); + }, GM(r); } -var loe = function(r) { +var coe = function(r) { var e, t; return typeof r.source == "number" || typeof r.target == "number" || typeof r.source == "string" || typeof r.target == "string" ? 45 * devicePixelRatio : ((e = r.source.size) !== null && e !== void 0 ? e : ha) + ((t = r.target.size) !== null && t !== void 0 ? t : ha) + 90 * devicePixelRatio; }; function V8(r) { - return VM(r) === "object"; + return GM(r) === "object"; } -var coe = function(r) { +var foe = function(r) { var e; return ((e = r.size) !== null && e !== void 0 ? e : ha) + 25 * devicePixelRatio; -}, HM = function() { +}, VM = function() { return -400 * Math.pow(devicePixelRatio, 2); -}, foe = function() { - return 2 * HM(); +}, doe = function() { + return 2 * VM(); }; function zg(r) { return zg = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { @@ -70864,10 +70876,10 @@ function W8(r, e) { } return t; } -function doe(r, e, t) { +function hoe(r, e, t) { return (e = wq(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } -function hoe(r, e) { +function voe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, wq(n.key), n); @@ -70886,9 +70898,9 @@ function wq(r) { })(r); return zg(e) == "symbol" ? e : e + ""; } -var lh = "d3ForceLayout", _P = function(r) { +var lh = "d3ForceLayout", bP = function(r) { return r && Xu(r); -}, voe = (function() { +}, poe = (function() { return r = function t(n) { var i = this; (function(l, c) { @@ -70898,7 +70910,7 @@ var lh = "d3ForceLayout", _P = function(r) { this.state = a, this.d3Nodes = {}, this.d3RelList = {}, this.computing = !1, this.center = { x: 0, y: 0 }, this.nodeRelCount = []; var o = this.state, s = o.nodes, u = o.rels; s.addChannel(lh), u.addChannel(lh), this.simulation = (function(l) { - var c, f = 1, d = 1e-3, h = 1 - Math.pow(d, 1 / 300), p = 0, g = 0.6, y = /* @__PURE__ */ new Map(), b = bq(x), _ = Zae("tick", "end"), m = /* @__PURE__ */ (function() { + var c, f = 1, d = 1e-3, h = 1 - Math.pow(d, 1 / 300), p = 0, g = 0.6, y = /* @__PURE__ */ new Map(), b = bq(x), _ = Qae("tick", "end"), m = /* @__PURE__ */ (function() { let T = 1; return () => (T = (1664525 * T + 1013904223) % U8) / U8; })(); @@ -70916,7 +70928,7 @@ var lh = "d3ForceLayout", _P = function(r) { function O() { for (var T, P = 0, I = l.length; P < I; ++P) { if ((T = l[P]).index = P, T.fx != null && (T.x = T.fx), T.fy != null && (T.y = T.fy), isNaN(T.x) || isNaN(T.y)) { - var k = 10 * Math.sqrt(0.5 + P), L = P * roe; + var k = 10 * Math.sqrt(0.5 + P), L = P * noe; T.x = k * Math.cos(L), T.y = k * Math.sin(L); } (isNaN(T.vx) || isNaN(T.vy)) && (T.vx = T.vy = 0); @@ -70952,7 +70964,7 @@ var lh = "d3ForceLayout", _P = function(r) { }, on: function(T, P) { return arguments.length > 1 ? (_.on(T, P), c) : _.on(T); } }; - })().velocityDecay(0.4).force("charge", bP().strength(HM)).force("centerX", (function(l) { + })().velocityDecay(0.4).force("charge", mP().strength(VM)).force("centerX", (function(l) { var c, f, d, h = jl(0.1); function p(y) { for (var b, _ = 0, m = c.length; _ < m; ++_) (b = c[_]).vx += (d[_] - b.x) * f[_] * y; @@ -71015,17 +71027,17 @@ var lh = "d3ForceLayout", _P = function(r) { if (this.shouldUpdate || i) { var a = this.state, o = a.nodes, s = a.rels, u = o.channels[lh], l = s.channels[lh], c = Object.values(u.adds).length > 0, f = Object.values(l.adds).length > 0, d = Object.values(u.removes).length > 0, h = Object.values(l.removes).length > 0, p = Object.values(u.updates).length > 0; if (c || f || d || h || p) { - var g = c && Object.keys(this.d3Nodes).length === 0, y = _P(u.removes); + var g = c && Object.keys(this.d3Nodes).length === 0, y = bP(u.removes); Object.keys(y).forEach(function(m) { delete n.d3Nodes[m]; }); - var b = _P(u.adds); + var b = bP(u.adds); if (Object.keys(b).forEach(function(m) { n.d3Nodes[m] = (function(x) { for (var S = 1; S < arguments.length; S++) { var O = arguments[S] != null ? arguments[S] : {}; S % 2 ? W8(Object(O), !0).forEach(function(E) { - doe(x, E, O[E]); + hoe(x, E, O[E]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(x, Object.getOwnPropertyDescriptors(O)) : W8(Object(O)).forEach(function(E) { Object.defineProperty(x, E, Object.getOwnPropertyDescriptor(O, E)); }); @@ -71034,7 +71046,7 @@ var lh = "d3ForceLayout", _P = function(r) { })({}, b[m]); }), p && Object.values(u.updates).forEach(function(m) { m.pinned === !0 ? (n.d3Nodes[m.id].fx = n.d3Nodes[m.id].x, n.d3Nodes[m.id].fy = n.d3Nodes[m.id].y) : m.pinned === !1 && (n.d3Nodes[m.id].fx = null, n.d3Nodes[m.id].fy = null), m.size !== void 0 && (n.d3Nodes[m.id].size = m.size); - }), (f || h) && (this.d3RelList = FM(_P(s.items)).filter(function(m) { + }), (f || h) && (this.d3RelList = BM(bP(s.items)).filter(function(m) { return m.from !== m.to; }).map(function(m, x) { return { source: m.from, target: m.to, index: x }; @@ -71059,13 +71071,13 @@ var lh = "d3ForceLayout", _P = function(r) { if (bi.info("d3ForceLayout: start layout with ".concat(Object.keys(this.d3Nodes).length, " nodes and ").concat(this.d3RelList.length, " rels")), this.simulation.stop(), this.simulation.nodes(Object.values(this.d3Nodes)).force("collide", (function(l) { var c, f, d, h = 1, p = 1; function g() { - for (var _, m, x, S, O, E, T, P = c.length, I = 0; I < p; ++I) for (m = VD(c, aoe, ooe).visitAfter(y), _ = 0; _ < P; ++_) x = c[_], E = f[x.index], T = E * E, S = x.x + x.vx, O = x.y + x.vy, m.visit(k); + for (var _, m, x, S, O, E, T, P = c.length, I = 0; I < p; ++I) for (m = VD(c, ooe, soe).visitAfter(y), _ = 0; _ < P; ++_) x = c[_], E = f[x.index], T = E * E, S = x.x + x.vx, O = x.y + x.vy, m.visit(k); function k(L, B, j, z, H) { var q = L.data, W = L.r, $ = E + W; if (!q) return B > S + $ || z < S - $ || j > O + $ || H < O - $; if (q.index > x.index) { - var J = S - q.x - q.vx, X = O - q.y - q.vy, Q = J * J + X * X; - Q < $ * $ && (J === 0 && (Q += (J = bp(d)) * J), X === 0 && (Q += (X = bp(d)) * X), Q = ($ - (Q = Math.sqrt(Q))) / Q * h, x.vx += (J *= Q) * ($ = (W *= W) / (T + W)), x.vy += (X *= Q) * $, q.vx -= J * ($ = 1 - $), q.vy -= X * $); + var J = S - q.x - q.vx, X = O - q.y - q.vy, Z = J * J + X * X; + Z < $ * $ && (J === 0 && (Z += (J = bp(d)) * J), X === 0 && (Z += (X = bp(d)) * X), Z = ($ - (Z = Math.sqrt(Z))) / Z * h, x.vx += (J *= Z) * ($ = (W *= W) / (T + W)), x.vy += (X *= Z) * $, q.vx -= J * ($ = 1 - $), q.vy -= X * $); } } } @@ -71088,8 +71100,8 @@ var lh = "d3ForceLayout", _P = function(r) { }, g.radius = function(_) { return arguments.length ? (l = typeof _ == "function" ? _ : jl(+_), b(), g) : l; }, g; - })().radius(coe)), this.shouldCountNodeRels && (this.nodeRelCount = this.countNodeRels()), this.simulation.force("link", (function(l) { - var c, f, d, h, p, g, y = soe, b = function(T) { + })().radius(foe)), this.shouldCountNodeRels && (this.nodeRelCount = this.countNodeRels()), this.simulation.force("link", (function(l) { + var c, f, d, h, p, g, y = uoe, b = function(T) { return 1 / Math.min(h[T.source.index], h[T.target.index]); }, _ = jl(30), m = 1; function x(T) { @@ -71124,7 +71136,7 @@ var lh = "d3ForceLayout", _P = function(r) { }, x; })(this.d3RelList).id(function(l) { return l.id; - }).distance(loe).strength(function(l) { + }).distance(coe).strength(function(l) { return (function(c, f) { if (!V8(c.source) || !V8(c.target)) return 1; var d = 1.2 / (Math.min(f[c.source.index], f[c.target.index]) + (Math.max(f[c.source.index], f[c.target.index]) - 1) / 100); @@ -71133,9 +71145,9 @@ var lh = "d3ForceLayout", _P = function(r) { })), i) { this.computing = !0; var o = 0; - this.simulation.force("charge", bP().strength(foe)); + this.simulation.force("charge", mP().strength(doe)); for (var s = performance.now(); performance.now() - s < 300 && o < 200; ) this.simulation.alpha(1), this.simulation.tick(1), o += 1; - this.simulation.force("charge", bP().strength(HM)); + this.simulation.force("charge", mP().strength(VM)); for (var u = performance.now(); performance.now() - u < 100 && this.simulation.alpha() >= this.simulation.alphaMin(); ) this.simulation.tick(1); return requestAnimationFrame(function() { a.computing = !1; @@ -71214,17 +71226,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho o.index = a, zg(o.source) !== "object" && (o.source = t.get(o.source)), zg(o.target) !== "object" && (o.target = t.get(o.target)), i[o.source.index] = (i[o.source.index] || 0) + 1, i[o.target.index] = (i[o.target.index] || 0) + 1; } return i; - } }], e && hoe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && voe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); -const wP = cae; -var poe = { CoseBilkentLayout: { standard: "createCoseBilkentLayoutWorker", fallback: "coseBilkentLayoutFallbackWorker" }, HierarchicalLayout: { standard: "createHierarchicalLayoutWorker", fallback: "hierarchicalLayoutFallbackWorker" } }, xq = function(r) { - var e, t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = poe[r], i = n.standard, a = n.fallback; - if (t) e = wP[a]; +const _P = fae; +var goe = { CoseBilkentLayout: { standard: "createCoseBilkentLayoutWorker", fallback: "coseBilkentLayoutFallbackWorker" }, HierarchicalLayout: { standard: "createHierarchicalLayoutWorker", fallback: "hierarchicalLayoutFallbackWorker" } }, xq = function(r) { + var e, t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = goe[r], i = n.standard, a = n.fallback; + if (t) e = _P[a]; else try { - e = wP[i](); + e = _P[i](); } catch (o) { - console.warn("Failed to initialise ".concat(r, ' worker: "').concat(JSON.stringify(o), '". Falling back to syncronous code.')), e = wP[a]; + console.warn("Failed to initialise ".concat(r, ' worker: "').concat(JSON.stringify(o), '". Falling back to syncronous code.')), e = _P[a]; } if (e === void 0) throw new Error("".concat(r, " code could not be initialized.")); return e.port.start(), e; @@ -71246,7 +71258,7 @@ function Y8(r, e) { } return t; } -function goe(r) { +function yoe(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? Y8(Object(t), !0).forEach(function(n) { @@ -71257,7 +71269,7 @@ function goe(r) { } return r; } -function yoe(r, e) { +function moe(r, e) { return (function(t) { if (Array.isArray(t)) return t; })(r) || (function(t, n) { @@ -71284,7 +71296,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function X8(r) { return (function(e) { - if (Array.isArray(e)) return WM(e); + if (Array.isArray(e)) return HM(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || Eq(r) || (function() { @@ -71294,17 +71306,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function Eq(r, e) { if (r) { - if (typeof r == "string") return WM(r, e); + if (typeof r == "string") return HM(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? WM(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? HM(r, e) : void 0; } } -function WM(r, e) { +function HM(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function moe(r, e) { +function boe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Oq(n.key), n); @@ -71320,8 +71332,8 @@ function Sq() { return !!r; })(); } -function YM() { - return YM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { +function WM() { + return WM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { var n = (function(a, o) { for (; !{}.hasOwnProperty.call(a, o) && (a = Am(a)) !== null; ) ; return a; @@ -71330,17 +71342,17 @@ function YM() { var i = Object.getOwnPropertyDescriptor(n, e); return i.get ? i.get.call(arguments.length < 3 ? r : t) : i.value; } - }, YM.apply(null, arguments); + }, WM.apply(null, arguments); } function Am(r) { return Am = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Am(r); } -function XM(r, e) { - return XM = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { +function YM(r, e) { + return YM = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { return t.__proto__ = n, t; - }, XM(r, e); + }, YM(r, e); } function Pg(r, e, t) { return (e = Oq(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; @@ -71360,7 +71372,7 @@ function Oq(r) { } var $8 = function(r) { return r !== void 0 ? Xu(r) : r; -}, boe = (function() { +}, _oe = (function() { function r(n) { var i; return (function(a, o) { @@ -71382,7 +71394,7 @@ var $8 = function(r) { } return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); - n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && XM(n, i); + n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && YM(n, i); })(r, GD), e = r, t = [{ key: "setOptions", value: function() { this.shouldUpdate = !0; } }, { key: "update", value: function() { @@ -71392,7 +71404,7 @@ var $8 = function(r) { (o.length > 0 || s.length > 0) && (this.updatePositionsFromState(), this.layout(o, s)); } (function(u, l, c) { - var f = YM(Am(u.prototype), "update", c); + var f = WM(Am(u.prototype), "update", c); return typeof f == "function" ? function(d) { return f.apply(c, d); } : f; @@ -71417,8 +71429,8 @@ var $8 = function(r) { var c = l.data.positions; if (a.computing) { for (var f = 0, d = Object.entries(c); f < d.length; f++) { - var h = yoe(d[f], 2), p = h[0], g = h[1]; - a.positions[p] = goe({ id: p }, g); + var h = moe(d[f], 2), p = h[0], g = h[1]; + a.positions[p] = yoe({ id: p }, g); } a.cytoCompleteCallback(), a.startAnimation(); } @@ -71435,17 +71447,17 @@ var $8 = function(r) { this.stateDisposers.forEach(function(i) { i(); }), (n = this.worker) === null || n === void 0 || n.port.close(); - } }], t && moe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }], t && boe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; })(), K8 = typeof Float32Array < "u" ? Float32Array : Array; function Kx() { var r = new K8(16); return K8 != Float32Array && (r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[11] = 0, r[12] = 0, r[13] = 0, r[14] = 0), r[0] = 1, r[5] = 1, r[10] = 1, r[15] = 1, r; } -var $M = function(r, e, t, n, i, a, o) { +var XM = function(r, e, t, n, i, a, o) { var s = 1 / (e - t), u = 1 / (n - i), l = 1 / (a - o); return r[0] = -2 * s, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0, r[5] = -2 * u, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[10] = 2 * l, r[11] = 0, r[12] = (e + t) * s, r[13] = (i + n) * u, r[14] = (o + a) * l, r[15] = 1, r; -}, _oe = io(9792), Z8 = io.n(_oe); +}, woe = io(9792), Z8 = io.n(woe); function Bb(r) { return Bb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -71453,7 +71465,7 @@ function Bb(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Bb(r); } -function woe(r, e) { +function xoe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Tq(n.key), n); @@ -71562,7 +71574,7 @@ var _p = (function() { var o = t.getUniformLocation(this.shaderProgram, n.name), s = { type: n.type, location: o }; n.type === t.SAMPLER_2D && (s.texture = this.curTexture, this.curTexture += 1), this.uniformInfo[n.name] = s; } - } }]) && woe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }]) && xoe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function Rm(r) { @@ -71572,13 +71584,13 @@ function Rm(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Rm(r); } -function xoe(r, e) { +function Eoe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; - n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Eoe(n.key), n); + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Soe(n.key), n); } } -function Eoe(r) { +function Soe(r) { var e = (function(t) { if (Rm(t) != "object" || !t) return t; var n = t[Symbol.toPrimitive]; @@ -71591,9 +71603,9 @@ function Eoe(r) { })(r); return Rm(e) == "symbol" ? e : e + ""; } -function KM(r) { +function $M(r) { var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0; - return KM = function(t) { + return $M = function(t) { if (t === null || !(function(i) { try { return Function.toString.call(i).indexOf("[native code]") !== -1; @@ -71616,7 +71628,7 @@ function KM(r) { })(t, arguments, k1(this).constructor); } return n.prototype = Object.create(t.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), D1(n, t); - }, KM(r); + }, $M(r); } function WD() { try { @@ -71656,9 +71668,9 @@ var Cq = (function() { return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && D1(n, i); - })(r, KM(Error)), e = r, (t = [{ key: "toString", value: function() { + })(r, $M(Error)), e = r, (t = [{ key: "toString", value: function() { return this.message; - } }]) && xoe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }]) && Eoe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; })(); const Ow = `uniform mat4 u_projection; @@ -71700,7 +71712,7 @@ function J8(r) { } return r; } -function Soe(r, e) { +function Ooe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Aq(n.key), n); @@ -71864,7 +71876,7 @@ var eB = (function() { return i.relIdMap[E][I]; }))); }), S !== void 0 && S.length > 0 && (this.relIdMap = S), { output: { nodes: h, relationships: p, idToRel: this.graph.idToRel }, sortedInput: { nodes: b, relationships: x, idToRel: this.graph.idToRel }, nodeSortMap: m }; - } }], e && Soe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Ooe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(), tB = function(r, e, t) { for (var n = 2 * Math.PI / t, i = [], a = 0; a < t; a++) { @@ -71925,7 +71937,7 @@ function rB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Ooe(r, e) { +function Toe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Pq(n.key), n); @@ -71947,13 +71959,13 @@ function Pq(r) { })(r); return Ub(e) == "symbol" ? e : e + ""; } -var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, xP = function(r) { +var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, wP = function(r) { for (var e = {}, t = {}, n = 0; n < r.length; n++) { var i = r[n]; Rq(i) ? (e[i.originalId] = n, t[n] = i.originalId) : (e[i.id] = n, t[n] = i.id); } return { nodeIdToIndex: e, nodeIndexToId: t }; -}, Toe = (function() { +}, Coe = (function() { return r = function t(n) { var i = this; (function(d, h) { @@ -71968,7 +71980,7 @@ var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, xP = function(r) { var u = new Float32Array([0, 0, Cr, 0, 0, Cr, Cr, Cr]); s.bufferData(s.ARRAY_BUFFER, u, s.STATIC_DRAW), this.physSmallVbo = s.createBuffer(), s.bindBuffer(s.ARRAY_BUFFER, this.physSmallVbo); var l = new Float32Array([0, 0, Rf, 0, 0, Rf, Rf, Rf]); - s.bufferData(s.ARRAY_BUFFER, l, s.STATIC_DRAW), this.physProjection = Kx(), $M(this.physProjection, 0, Cr, Cr, 0, 0, 1e6), this.physSmallProjection = Kx(), $M(this.physSmallProjection, 0, Rf, Rf, 0, 0, 1e6), s.disable(s.DEPTH_TEST), this.gl = s, this.useReadpixelWorkaround && this.setupReadpixelWorkaround(), this.setupUpdates(), this.averageNodeSize = ha, this.shouldUpdate = !0, this.iterationCount = 0, this.lastSpeedValues = [], this.rollingAvgGraphSpeed = 0, this.nodeVariation = 0, this.nodeCenterPoint = [0, 0], this.peakIterationMultiplier = 160, this.setOptions(n, !0), this.definePhysicsArrays(), this.flatRelationshipKeys = /* @__PURE__ */ new Set(); + s.bufferData(s.ARRAY_BUFFER, l, s.STATIC_DRAW), this.physProjection = Kx(), XM(this.physProjection, 0, Cr, Cr, 0, 0, 1e6), this.physSmallProjection = Kx(), XM(this.physSmallProjection, 0, Rf, Rf, 0, 0, 1e6), s.disable(s.DEPTH_TEST), this.gl = s, this.useReadpixelWorkaround && this.setupReadpixelWorkaround(), this.setupUpdates(), this.averageNodeSize = ha, this.shouldUpdate = !0, this.iterationCount = 0, this.lastSpeedValues = [], this.rollingAvgGraphSpeed = 0, this.nodeVariation = 0, this.nodeCenterPoint = [0, 0], this.peakIterationMultiplier = 160, this.setOptions(n, !0), this.definePhysicsArrays(), this.flatRelationshipKeys = /* @__PURE__ */ new Set(); var c = a.nodes, f = a.rels; c.addChannel(ru), f.addChannel(ru), this.stateDisposers = [], this.stateDisposers.push(a.reaction(function() { return a.graphUpdates; @@ -71993,7 +72005,7 @@ var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, xP = function(r) { this.simulationStopVelocitySquared = s * s, this.gravity = 25, this.force = 0; } } }, { key: "setData", value: function(t) { - var n = xP(t.nodes), i = n.nodeIdToIndex, a = n.nodeIndexToId; + var n = wP(t.nodes), i = n.nodeIdToIndex, a = n.nodeIndexToId; return this.nodeIdToIndex = i, this.nodeIndexToId = a, this.numNodes = t.nodes.length, this.flatRelationshipKeys = Sw(t.rels), this.solarMerger = new eB(t, i), 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 t = arguments.length > 0 && arguments[0] !== void 0 && arguments[0], n = this.gl; @@ -72074,7 +72086,7 @@ var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, xP = function(r) { } }, { key: "addRemoveData", value: function(t, n, i) { var a = this.gl; this.numNodes = t.nodes.length, this.physShader.use(), this.physShader.setUniform("u_numNodes", this.numNodes), this.physShader.setUniform("u_baseLength", this.getBaseLength()); - var o = xP(t.nodes).nodeIdToIndex, s = new eB(t, o); + var o = wP(t.nodes).nodeIdToIndex, s = new eB(t, o); s.coarsenTo(1); var u = s.subGraphs[0], l = this.subGraphs[0], c = function(W) { return l.nodes.findIndex(function($) { @@ -72107,7 +72119,7 @@ var ru = "PhysLayout", tb = new Float32Array(4), Rf = 256, xP = function(r) { g.x += m || 0, g.y += x || 0; } this.nodeCenterPoint = y ? [g.x / y, g.y / y] : [0, 0], this.pinData = b, this.subGraphs = s.subGraphs, this.nodeSortMap = s.nodeSortMap, this.setupSprings(this.subGraphs[0]), this.setupSize(this.subGraphs[0]); - var B = xP(this.subGraphs[0].nodes), j = B.nodeIdToIndex, z = B.nodeIndexToId; + var B = wP(this.subGraphs[0].nodes), j = B.nodeIdToIndex, z = B.nodeIndexToId; this.nodeIdToIndex = j, this.nodeIndexToId = z, a.bindTexture(a.TEXTURE_2D, this.updateTexture), a.texSubImage2D(a.TEXTURE_2D, 0, 0, 0, Cr, Cr, a.ALPHA, a.FLOAT, this.updateData), bi.info("Setting gravity center to ", this.nodeCenterPoint), this.physShader.setUniform("u_gravityCenter", this.nodeCenterPoint), this.updateShader.use(), this.updateShader.setUniform("u_numNodesNew", u.nodes.length), this.updateShader.setUniform("u_physData", this.getPhysData(0).texture), this.updateShader.setUniform("u_updateData", this.updateTexture), a.disable(a.BLEND), this.vaoExt.bindVertexArrayOES(this.updateVao), a.bindFramebuffer(a.FRAMEBUFFER, this.getPhysData(1).frameBuffer), a.viewport(0, 0, Cr, Cr), a.drawArrays(a.TRIANGLE_STRIP, 0, 4), this.vaoExt.bindVertexArrayOES(null), this.curPhysData = (this.curPhysData + 1) % this.physData.length, this.useReadpixelWorkaround ? this.doReadpixelWorkaround() : (a.bindFramebuffer(a.FRAMEBUFFER, this.getPhysData().frameBuffer), a.readPixels(0, 0, Cr, Cr, a.RGBA, a.FLOAT, this.physPositions)), (f.length > 0 || d.length > 0) && (a.bindTexture(a.TEXTURE_2D, this.pinTexture), a.texSubImage2D(a.TEXTURE_2D, 0, 0, 0, Cr, Cr, a.ALPHA, a.UNSIGNED_BYTE, this.pinData)); var H = Sw(t.rels), q = this.hasRelationshipFlatMapChanged(H, i); return this.shouldUpdate = this.nodeVariation > 0 || q, this.iterationCount = 0, this.flatRelationshipKeys = H, this.setupPhysicsForCoarse(), this.subGraphs[0]; @@ -73054,7 +73066,7 @@ void main(void) { } } }, { key: "definePhysicsArrays", value: function() { this.physData = [], this.levelsData = [], this.levelsClusterTexture = [], this.levelsFinestIndexTexture = []; - } }], e && Ooe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Toe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function zb(r) { @@ -73066,26 +73078,26 @@ function zb(r) { } function Tw(r) { return (function(e) { - if (Array.isArray(e)) return EP(e); + if (Array.isArray(e)) return xP(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || (function(e, t) { if (e) { - if (typeof e == "string") return EP(e, t); + if (typeof e == "string") return xP(e, t); var n = {}.toString.call(e).slice(8, -1); - return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? EP(e, t) : void 0; + return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? xP(e, t) : void 0; } })(r) || (function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); })(); } -function EP(r, e) { +function xP(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Coe(r, e) { +function Aoe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Mq(n.key), n); @@ -73107,14 +73119,14 @@ function Mq(r) { })(r); return zb(e) == "symbol" ? e : e + ""; } -var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Aoe = (function() { +var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Roe = (function() { return r = function t(n) { var i = this; (function(l, c) { if (!(l instanceof c)) throw new TypeError("Cannot call a class as a function"); })(this, t), nm(this, "physLayout", void 0), nm(this, "coseBilkentLayout", void 0), nm(this, "state", void 0), nm(this, "currentLayoutType", void 0), nm(this, "enableCytoscape", void 0), nm(this, "currentLayout", void 0); var a = n.state, o = n.enableCytoscape; - this.enableCytoscape = o == null || o, this.physLayout = new Toe(n), this.coseBilkentLayout = new boe({ state: a, cytoCompleteCallback: function() { + this.enableCytoscape = o == null || o, this.physLayout = new Coe(n), this.coseBilkentLayout = new _oe({ state: a, cytoCompleteCallback: function() { for (i.physLayout.update(!0), i.copyLayoutPositions(i.state.nodes.items, i.coseBilkentLayout, i.physLayout); i.physLayout.update(!1); ) ; i.copyLayoutPositions(i.state.nodes.items, i.physLayout, i.coseBilkentLayout); }, animationCompleteCallback: function() { @@ -73169,11 +73181,11 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Aoe = (fun var fe, se = {}, de = {}, ge = Z0(pe); try { for (ge.s(); !(fe = ge.n()).done; ) { - for (var Oe = fe.value, ke = Oe.from, Me = Oe.to, Ne = "".concat(ke, "-").concat(Me), Ce = "".concat(Me, "-").concat(ke), Y = 0, Z = [Ne, Ce]; Y < Z.length; Y++) { - var ie = Z[Y]; + for (var Oe = fe.value, ke = Oe.from, De = Oe.to, Ne = "".concat(ke, "-").concat(De), Ce = "".concat(De, "-").concat(ke), Y = 0, Q = [Ne, Ce]; Y < Q.length; Y++) { + var ie = Q[Y]; de[ie] !== void 0 ? de[ie].push(Oe) : de[ie] = [Oe]; } - se[ke] || (se[ke] = /* @__PURE__ */ new Set()), se[Me] || (se[Me] = /* @__PURE__ */ new Set()), se[ke].add(Me), se[Me].add(ke); + se[ke] || (se[ke] = /* @__PURE__ */ new Set()), se[De] || (se[De] = /* @__PURE__ */ new Set()), se[ke].add(De), se[De].add(ke); } } catch (we) { ge.e(we); @@ -73181,12 +73193,12 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Aoe = (fun ge.f(); } return { adjNodesMap: se, relMap: de }; - })(L.items), Q = X.adjNodesMap, ue = X.relMap, re = {}, ne = {}, le = function(pe) { + })(L.items), Z = X.adjNodesMap, ue = X.relMap, re = {}, ne = {}, le = function(pe) { var fe = []; for (re[pe] || fe.push(pe); fe.length > 0; ) { var se = fe.shift(); - if (re[se] = k.idToItem[se], Q[se] !== void 0) { - var de, ge = Z0(Q[se]); + if (re[se] = k.idToItem[se], Z[se] !== void 0) { + var de, ge = Z0(Z[se]); try { for (ge.s(); !(de = ge.n()).done; ) { var Oe = de.value; @@ -73194,10 +73206,10 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Aoe = (fun fe.push(Oe); var ke = ue["".concat(se, "-").concat(Oe)]; if (ke) { - var Me, Ne = Z0(ke); + var De, Ne = Z0(ke); try { - for (Ne.s(); !(Me = Ne.n()).done; ) { - var Ce = Me.value; + for (Ne.s(); !(De = Ne.n()).done; ) { + var Ce = De.value; ne[Ce.id] || (ne[Ce.id] = Ce); } } catch (Y) { @@ -73241,7 +73253,7 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Aoe = (fun this.physLayout.terminateUpdate(), this.coseBilkentLayout.terminateUpdate(); } }, { key: "destroy", value: function() { this.physLayout.destroy(), this.coseBilkentLayout.destroy(); - } }], e && Coe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Aoe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function qb(r) { @@ -73261,7 +73273,7 @@ function nB(r, e) { } return t; } -function Roe(r) { +function Poe(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? nB(Object(t), !0).forEach(function(n) { @@ -73315,7 +73327,7 @@ function aB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Poe(r, e) { +function Moe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Dq(n.key), n); @@ -73337,7 +73349,7 @@ function Dq(r) { })(r); return qb(e) == "symbol" ? e : e + ""; } -var ch = "FreeLayout", Moe = (function() { +var ch = "FreeLayout", Doe = (function() { return r = function t(n) { var i = this; (function(l, c) { @@ -73386,7 +73398,7 @@ var ch = "FreeLayout", Moe = (function() { var n, i = [], a = iB(t); try { for (a.s(); !(n = a.n()).done; ) { - var o = n.value, s = this.positions[o.id], u = Roe({ id: o.id }, s); + var o = n.value, s = this.positions[o.id], u = Poe({ id: o.id }, s); i.push(u); } } catch (l) { @@ -73402,7 +73414,7 @@ var ch = "FreeLayout", Moe = (function() { } }, { key: "terminateUpdate", value: function() { } }, { key: "destroy", value: function() { this.state.nodes.removeChannel(ch), this.state.rels.removeChannel(ch); - } }], e && Poe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Moe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function Gb(r) { @@ -73426,14 +73438,14 @@ function sB(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? oB(Object(t), !0).forEach(function(n) { - Doe(r, n, t[n]); + koe(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : oB(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function Doe(r, e, t) { +function koe(r, e, t) { return (e = kq(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } function uB(r, e) { @@ -73479,7 +73491,7 @@ function lB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function koe(r, e) { +function Ioe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, kq(n.key), n); @@ -73498,7 +73510,7 @@ function kq(r) { })(r); return Gb(e) == "symbol" ? e : e + ""; } -var fh = "GridLayout", Ioe = (function() { +var fh = "GridLayout", Noe = (function() { return r = function t(n) { var i = this; (function(l, c) { @@ -73566,9 +73578,9 @@ var fh = "GridLayout", Ioe = (function() { this.shouldUpdate = !1; } }, { key: "destroy", value: function() { this.state.nodes.removeChannel(fh), this.state.rels.removeChannel(fh); - } }], e && koe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Ioe(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; -})(), Noe = /* @__PURE__ */ new Set(["direction", "packing"]), Loe = "forceDirected", Zx = "hierarchical", joe = "grid", Boe = "free", Foe = "d3Force", Uoe = "circular", Mg = "webgl", fp = "canvas", am = "svg"; +})(), Loe = /* @__PURE__ */ new Set(["direction", "packing"]), joe = "forceDirected", Zx = "hierarchical", Boe = "grid", Foe = "free", Uoe = "d3Force", zoe = "circular", Mg = "webgl", fp = "canvas", am = "svg"; function Vb(r) { return Vb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -73591,7 +73603,7 @@ function Rw(r, e, t) { return Vb(i) == "symbol" ? i : i + ""; })(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } -var ZM = "down", zoe = Rw(Rw(Rw(Rw({}, "up", "BT"), ZM, "TB"), "left", "RL"), "right", "LR"), QM = "bin", qoe = [QM, "stack"], Goe = ["html"], Voe = ["html"], Hoe = ["captionHtml"]; +var KM = "down", qoe = Rw(Rw(Rw(Rw({}, "up", "BT"), KM, "TB"), "left", "RL"), "right", "LR"), ZM = "bin", Goe = [ZM, "stack"], Voe = ["html"], Hoe = ["html"], Woe = ["captionHtml"]; function Pm(r) { return Pm = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -73599,7 +73611,7 @@ function Pm(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Pm(r); } -function SP(r, e) { +function EP(r, e) { if (r == null) return {}; var t, n, i = (function(o, s) { if (o == null) return {}; @@ -73616,7 +73628,7 @@ function SP(r, e) { } return i; } -function Woe(r, e) { +function Yoe(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Nq(n.key), n); @@ -73632,8 +73644,8 @@ function Iq() { return !!r; })(); } -function JM() { - return JM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { +function QM() { + return QM = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { var n = (function(a, o) { for (; !{}.hasOwnProperty.call(a, o) && (a = Mm(a)) !== null; ) ; return a; @@ -73642,17 +73654,17 @@ function JM() { var i = Object.getOwnPropertyDescriptor(n, e); return i.get ? i.get.call(arguments.length < 3 ? r : t) : i.value; } - }, JM.apply(null, arguments); + }, QM.apply(null, arguments); } function Mm(r) { return Mm = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Mm(r); } -function e5(r, e) { - return e5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { +function JM(r, e) { + return JM = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { return t.__proto__ = n, t; - }, e5(r, e); + }, JM(r, e); } function dh(r, e, t) { return (e = Nq(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; @@ -73672,7 +73684,7 @@ function Nq(r) { } var Nl = "HierarchicalLayout", Pw = function(r) { return r !== void 0 ? Xu(r) : r; -}, Yoe = (function() { +}, Xoe = (function() { function r(n) { var i; (function(u, l) { @@ -73686,7 +73698,7 @@ var Nl = "HierarchicalLayout", Pw = function(r) { return h; })(f); })(u, Iq() ? Reflect.construct(l, c || [], Mm(u).constructor) : l.apply(u, c)); - })(this, r, [n]), "direction", void 0), dh(i, "packing", void 0), dh(i, "stateDisposers", void 0), dh(i, "oldComputing", void 0), dh(i, "computing", void 0), dh(i, "pendingLayoutData", void 0), dh(i, "worker", void 0), dh(i, "directionChanged", void 0), dh(i, "packingChanged", void 0), dh(i, "workersDisabled", void 0), i.direction = ZM, i.packing = QM; + })(this, r, [n]), "direction", void 0), dh(i, "packing", void 0), dh(i, "stateDisposers", void 0), dh(i, "oldComputing", void 0), dh(i, "computing", void 0), dh(i, "pendingLayoutData", void 0), dh(i, "worker", void 0), dh(i, "directionChanged", void 0), dh(i, "packingChanged", void 0), dh(i, "workersDisabled", void 0), i.direction = KM, i.packing = ZM; var a = i.state, o = a.nodes, s = a.rels; return o.addChannel(Nl), s.addChannel(Nl), i.stateDisposers = [i.state.reaction(function() { return i.state.graphUpdates; @@ -73703,15 +73715,15 @@ var Nl = "HierarchicalLayout", Pw = function(r) { } return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); - n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && e5(n, i); + n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && JM(n, i); })(r, GD), e = r, t = [{ key: "setOptions", value: function(n) { if (n !== void 0 && (function(u) { return Object.keys(u).every(function(l) { - return Noe.has(l); + return Loe.has(l); }); })(n)) { - var i = n.direction, a = i === void 0 ? ZM : i, o = n.packing, s = o === void 0 ? QM : o; - Object.keys(zoe).includes(a) && (this.directionChanged = this.direction && this.direction !== a, this.direction = a), qoe.includes(s) && (this.packingChanged = this.packing && this.packing !== s, this.packing = s), this.shouldUpdate = this.shouldUpdate || this.directionChanged || this.packingChanged; + var i = n.direction, a = i === void 0 ? KM : i, o = n.packing, s = o === void 0 ? ZM : o; + Object.keys(qoe).includes(a) && (this.directionChanged = this.direction && this.direction !== a, this.direction = a), Goe.includes(s) && (this.packingChanged = this.packing && this.packing !== s, this.packing = s), this.shouldUpdate = this.shouldUpdate || this.directionChanged || this.packingChanged; } } }, { key: "update", value: function() { var n = arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; @@ -73720,7 +73732,7 @@ var Nl = "HierarchicalLayout", Pw = function(r) { (n || l || c || f || d || s || u || p) && this.layout(a.items, a.idToItem, a.idToPosition, o.items), a.clearChannel(Nl), o.clearChannel(Nl), this.directionChanged = !1, this.packingChanged = !1; } (function(g, y, b) { - var _ = JM(Mm(g.prototype), "update", b); + var _ = QM(Mm(g.prototype), "update", b); return typeof _ == "function" ? function(m) { return _.apply(b, m); } : _; @@ -73733,14 +73745,14 @@ var Nl = "HierarchicalLayout", Pw = function(r) { var s = this; if (this.worker) { var u = Pw(n).map(function(b) { - return b.html, SP(b, Goe); + return b.html, EP(b, Voe); }), l = Pw(i), c = {}; Object.keys(l).forEach(function(b) { - var _ = l[b], m = (_.html, SP(_, Voe)); + var _ = l[b], m = (_.html, EP(_, Hoe)); c[b] = m; }); var f = Pw(o).map(function(b) { - return b.captionHtml, SP(b, Hoe); + return b.captionHtml, EP(b, Woe); }), d = Pw(a), h = this.direction, p = this.packing, g = window.devicePixelRatio, y = { nodes: u, nodeIds: c, idToPosition: d, rels: f, direction: h, packing: p, pixelRatio: g, forcedDelay: 0 }; this.computing ? this.pendingLayoutData = y : (this.worker.port.onmessage = function(b) { var _ = b.data, m = _.positions, x = _.parents, S = _.waypoints; @@ -73755,9 +73767,9 @@ var Nl = "HierarchicalLayout", Pw = function(r) { this.stateDisposers.forEach(function(i) { i(); }), this.state.nodes.removeChannel(Nl), this.state.rels.removeChannel(Nl), (n = this.worker) === null || n === void 0 || n.port.close(); - } }], t && Woe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }], t && Yoe(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; -})(), Xoe = io(3269), Lq = io.n(Xoe); +})(), $oe = io(3269), Lq = io.n($oe); function Qx(r) { return Qx = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -73765,16 +73777,16 @@ function Qx(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Qx(r); } -var $oe = /^\s+/, Koe = /\s+$/; +var Koe = /^\s+/, Zoe = /\s+$/; function xr(r, e) { if (e = e || {}, (r = r || "") instanceof xr) return r; if (!(this instanceof xr)) return new xr(r, e); var t = (function(n) { var i, a, o, s = { r: 0, g: 0, b: 0 }, u = 1, l = null, c = null, f = null, d = !1, h = !1; return typeof n == "string" && (n = (function(p) { - p = p.replace($oe, "").replace(Koe, "").toLowerCase(); + p = p.replace(Koe, "").replace(Zoe, "").toLowerCase(); var g, y = !1; - if (t5[p]) p = t5[p], y = !0; + if (e5[p]) p = e5[p], y = !0; else if (p == "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" }; return (g = _d.rgb.exec(p)) ? { r: g[1], g: g[2], b: g[3] } : (g = _d.rgba.exec(p)) ? { r: g[1], g: g[2], b: g[3], a: g[4] } : (g = _d.hsl.exec(p)) ? { h: g[1], s: g[2], l: g[3] } : (g = _d.hsla.exec(p)) ? { h: g[1], s: g[2], l: g[3], a: g[4] } : (g = _d.hsv.exec(p)) ? { h: g[1], s: g[2], v: g[3] } : (g = _d.hsva.exec(p)) ? { h: g[1], s: g[2], v: g[3], a: g[4] } : (g = _d.hex8.exec(p)) ? { r: ef(g[1]), g: ef(g[2]), b: ef(g[3]), a: pB(g[4]), format: y ? "name" : "hex8" } : (g = _d.hex6.exec(p)) ? { r: ef(g[1]), g: ef(g[2]), b: ef(g[3]), format: y ? "name" : "hex" } : (g = _d.hex4.exec(p)) ? { r: ef(g[1] + "" + g[1]), g: ef(g[2] + "" + g[2]), b: ef(g[3] + "" + g[3]), a: pB(g[4] + "" + g[4]), format: y ? "name" : "hex8" } : !!(g = _d.hex3.exec(p)) && { r: ef(g[1] + "" + g[1]), g: ef(g[2] + "" + g[2]), b: ef(g[3] + "" + g[3]), format: y ? "name" : "hex" }; })(n)), Qx(n) == "object" && (nv(n.r) && nv(n.g) && nv(n.b) ? (i = n.r, a = n.g, o = n.b, s = { r: 255 * Da(i, 255), g: 255 * Da(a, 255), b: 255 * Da(o, 255) }, d = !0, h = String(n.r).substr(-1) === "%" ? "prgb" : "rgb") : nv(n.h) && nv(n.s) && nv(n.v) ? (l = Ob(n.s), c = Ob(n.v), s = (function(p, g, y) { @@ -73842,39 +73854,39 @@ function dB(r, e, t, n) { function hB(r, e, t, n) { return [Td(Bq(n)), Td(Math.round(r).toString(16)), Td(Math.round(e).toString(16)), Td(Math.round(t).toString(16))].join(""); } -function Zoe(r, e) { +function Qoe(r, e) { e = e === 0 ? 0 : e || 10; var t = xr(r).toHsl(); - return t.s -= e / 100, t.s = dE(t.s), xr(t); + return t.s -= e / 100, t.s = fE(t.s), xr(t); } -function Qoe(r, e) { +function Joe(r, e) { e = e === 0 ? 0 : e || 10; var t = xr(r).toHsl(); - return t.s += e / 100, t.s = dE(t.s), xr(t); + return t.s += e / 100, t.s = fE(t.s), xr(t); } -function Joe(r) { +function ese(r) { return xr(r).desaturate(100); } -function ese(r, e) { +function tse(r, e) { e = e === 0 ? 0 : e || 10; var t = xr(r).toHsl(); - return t.l += e / 100, t.l = dE(t.l), xr(t); + return t.l += e / 100, t.l = fE(t.l), xr(t); } -function tse(r, e) { +function rse(r, e) { e = e === 0 ? 0 : e || 10; var t = xr(r).toRgb(); return t.r = Math.max(0, Math.min(255, t.r - Math.round(-e / 100 * 255))), t.g = Math.max(0, Math.min(255, t.g - Math.round(-e / 100 * 255))), t.b = Math.max(0, Math.min(255, t.b - Math.round(-e / 100 * 255))), xr(t); } -function rse(r, e) { +function nse(r, e) { e = e === 0 ? 0 : e || 10; var t = xr(r).toHsl(); - return t.l -= e / 100, t.l = dE(t.l), xr(t); + return t.l -= e / 100, t.l = fE(t.l), xr(t); } -function nse(r, e) { +function ise(r, e) { var t = xr(r).toHsl(), n = (t.h + e) % 360; return t.h = n < 0 ? 360 + n : n, xr(t); } -function ise(r) { +function ase(r) { var e = xr(r).toHsl(); return e.h = (e.h + 180) % 360, xr(e); } @@ -73883,17 +73895,17 @@ function vB(r, e) { for (var t = xr(r).toHsl(), n = [xr(r)], i = 360 / e, a = 1; a < e; a++) n.push(xr({ h: (t.h + a * i) % 360, s: t.s, l: t.l })); return n; } -function ase(r) { +function ose(r) { var e = xr(r).toHsl(), t = e.h; return [xr(r), xr({ h: (t + 72) % 360, s: e.s, l: e.l }), xr({ h: (t + 216) % 360, s: e.s, l: e.l })]; } -function ose(r, e, t) { +function sse(r, e, t) { e = e || 6, t = t || 30; var n = xr(r).toHsl(), i = 360 / t, a = [xr(r)]; for (n.h = (n.h - (i * e >> 1) + 720) % 360; --e; ) n.h = (n.h + i) % 360, a.push(xr(n)); return a; } -function sse(r, e) { +function use(r, e) { e = e || 6; for (var t = xr(r).toHsv(), n = t.h, i = t.s, a = t.v, o = [], s = 1 / e; e--; ) o.push(xr({ h: n, s: i, v: a })), a = (a + s) % 1; return o; @@ -73950,7 +73962,7 @@ xr.prototype = { isDark: function() { }, toPercentageRgbString: function() { return this._a == 1 ? "rgb(" + Math.round(100 * Da(this._r, 255)) + "%, " + Math.round(100 * Da(this._g, 255)) + "%, " + Math.round(100 * Da(this._b, 255)) + "%)" : "rgba(" + Math.round(100 * Da(this._r, 255)) + "%, " + Math.round(100 * Da(this._g, 255)) + "%, " + Math.round(100 * Da(this._b, 255)) + "%, " + this._roundA + ")"; }, toName: function() { - return this._a === 0 ? "transparent" : !(this._a < 1) && (use[dB(this._r, this._g, this._b, !0)] || !1); + return this._a === 0 ? "transparent" : !(this._a < 1) && (lse[dB(this._r, this._g, this._b, !0)] || !1); }, toFilter: function(r) { var e = "#" + hB(this._r, this._g, this._b, this._a), t = e, n = this._gradientType ? "GradientType = 1, " : ""; if (r) { @@ -73969,29 +73981,29 @@ xr.prototype = { isDark: function() { var t = r.apply(null, [this].concat([].slice.call(e))); return this._r = t._r, this._g = t._g, this._b = t._b, this.setAlpha(t._a), this; }, lighten: function() { - return this._applyModification(ese, arguments); -}, brighten: function() { return this._applyModification(tse, arguments); -}, darken: function() { +}, brighten: function() { return this._applyModification(rse, arguments); +}, darken: function() { + return this._applyModification(nse, arguments); }, desaturate: function() { - return this._applyModification(Zoe, arguments); -}, saturate: function() { return this._applyModification(Qoe, arguments); -}, greyscale: function() { +}, saturate: function() { return this._applyModification(Joe, arguments); +}, greyscale: function() { + return this._applyModification(ese, arguments); }, spin: function() { - return this._applyModification(nse, arguments); + return this._applyModification(ise, arguments); }, _applyCombination: function(r, e) { return r.apply(null, [this].concat([].slice.call(e))); }, analogous: function() { - return this._applyCombination(ose, arguments); + return this._applyCombination(sse, arguments); }, complement: function() { - return this._applyCombination(ise, arguments); + return this._applyCombination(ase, arguments); }, monochromatic: function() { - return this._applyCombination(sse, arguments); + return this._applyCombination(use, arguments); }, splitcomplement: function() { - return this._applyCombination(ase, arguments); + return this._applyCombination(ose, arguments); }, triad: function() { return this._applyCombination(vB, [3]); }, tetrad: function() { @@ -74034,11 +74046,11 @@ xr.prototype = { isDark: function() { for (var l = 0; l < e.length; l++) (n = xr.readability(r, e[l])) > u && (u = n, s = xr(e[l])); return xr.isReadable(r, s, { level: a, size: o }) || !i ? s : (t.includeFallbackColors = !1, xr.mostReadable(r, ["#fff", "#000"], t)); }; -var t5 = xr.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" }, use = xr.hexNames = (function(r) { +var e5 = xr.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" }, lse = xr.hexNames = (function(r) { var e = {}; for (var t in r) r.hasOwnProperty(t) && (e[r[t]] = t); return e; -})(t5); +})(e5); function jq(r) { return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r; } @@ -74051,7 +74063,7 @@ function Da(r, e) { })(r); return r = Math.min(e, Math.max(0, parseFloat(r))), t && (r = parseInt(r * e, 10) / 100), Math.abs(r - e) < 1e-6 ? 1 : r % e / parseFloat(e); } -function dE(r) { +function fE(r) { return Math.min(1, Math.max(0, r)); } function ef(r) { @@ -74073,7 +74085,7 @@ var np, Mw, Dw, _d = (Mw = "[\\s|\\(]+(" + (np = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[- function nv(r) { return !!_d.CSS_UNIT.exec(r); } -var r5 = function(r) { +var t5 = function(r) { return xr.mostReadable(r, [qD, "#FFFFFF"]).toString(); }, I1 = function(r) { return Lq().get.rgb(r); @@ -74083,7 +74095,7 @@ var r5 = function(r) { }, Iw = function(r) { return [(e = I1(r))[0] / 255, e[1] / 255, e[2] / 255]; var e; -}, gB = { selected: { rings: [{ widthFactor: 0.05, color: lq }, { widthFactor: 0.1, color: cq }], shadow: { width: 10, opacity: 1, color: uq } }, default: { rings: [] } }, yB = { selected: { rings: [{ color: lq, width: 2 }, { color: cq, width: 4 }], shadow: { width: 18, opacity: 1, color: uq } }, default: { rings: [] } }, OP = 0.75, TP = { noPan: !1, outOnly: !1, animated: !0 }; +}, gB = { selected: { rings: [{ widthFactor: 0.05, color: lq }, { widthFactor: 0.1, color: cq }], shadow: { width: 10, opacity: 1, color: uq } }, default: { rings: [] } }, yB = { selected: { rings: [{ color: lq, width: 2 }, { color: cq, width: 4 }], shadow: { width: 18, opacity: 1, color: uq } }, default: { rings: [] } }, SP = 0.75, OP = { noPan: !1, outOnly: !1, animated: !0 }; function Hb(r) { return Hb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -74091,7 +74103,7 @@ function Hb(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Hb(r); } -function CP(r, e) { +function TP(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; @@ -74106,18 +74118,18 @@ function mB(r, e) { } return t; } -function AP(r) { +function CP(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? mB(Object(t), !0).forEach(function(n) { - lse(r, n, t[n]); + cse(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : mB(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function lse(r, e, t) { +function cse(r, e, t) { return (e = (function(n) { var i = (function(a) { if (Hb(a) != "object" || !a) return a; @@ -74132,7 +74144,7 @@ function lse(r, e, t) { return Hb(i) == "symbol" ? i : i + ""; })(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } -var n5, Jx = function(r) { +var r5, Jx = function(r) { return r.captions && r.captions.length > 0 ? r.captions : r.caption && r.caption.length > 0 ? [{ value: r.caption }] : []; }, ip = function(r, e, t) { (0, Hi.isNil)(r) || ((function(n) { @@ -74142,14 +74154,14 @@ var n5, Jx = function(r) { var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : $n(); r.width = e * n, r.height = t * n, r.style.width = "".concat(e, "px"), r.style.height = "".concat(t, "px"); }, Uq = function(r) { - bi.warn("Error: WebGL context lost - visualization will stop working!", r), n5 !== void 0 && n5(r); + bi.warn("Error: WebGL context lost - visualization will stop working!", r), r5 !== void 0 && r5(r); }, fx = function(r) { var e = r.parentElement, t = e.getBoundingClientRect(), n = t.width, i = t.height; n !== 0 || i !== 0 || e.isConnected || (n = parseInt(e.style.width, 10) || 0, i = parseInt(e.style.height, 10) || 0), Fq(r, n, i); -}, RP = function(r, e) { +}, AP = function(r, e) { var t = document.createElement("canvas"); - return Object.assign(t.style, BM), r !== void 0 && (r.appendChild(t), fx(t)), (function(n, i) { - n5 = i, n.addEventListener("webglcontextlost", Uq); + return Object.assign(t.style, jM), r !== void 0 && (r.appendChild(t), fx(t)), (function(n, i) { + r5 = i, n.addEventListener("webglcontextlost", Uq); })(t, e), t; }, om = function(r) { r.width = 0, r.height = 0, r.remove(); @@ -74162,9 +74174,9 @@ var n5, Jx = function(r) { r.canvas.removeEventListener("webglcontextlost", Uq); var e = r.getExtension("WEBGL_lose_context"); e == null || e.loseContext(); -}, i5 = /* @__PURE__ */ new Map(), Tb = function(r, e) { - var t = r.font, n = i5.get(t); - n === void 0 && (n = /* @__PURE__ */ new Map(), i5.set(t, n)); +}, n5 = /* @__PURE__ */ new Map(), Tb = function(r, e) { + var t = r.font, n = n5.get(t); + n === void 0 && (n = /* @__PURE__ */ new Map(), n5.set(t, n)); var i = n.get(e); return i === void 0 && (i = r.measureText(e).width, n.set(e, i)), i; }; @@ -74185,7 +74197,7 @@ function wB(r, e) { } return t; } -function cse(r, e) { +function fse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, zq(n.key), n); @@ -74207,10 +74219,10 @@ function zq(r) { })(r); return Wb(e) == "symbol" ? e : e + ""; } -var a5 = function(r) { +var i5 = function(r) { return (0, Hi.isFinite)(r.x) && (0, Hi.isFinite)(r.y); }, N1 = function(r, e) { - return a5(r) && a5(e); + return i5(r) && i5(e); }, Nw = function(r, e) { if (r === void 0 || e === void 0 || !N1(r, e)) return !1; var t = e.x - r.x, n = e.y - r.y, i = $n(); @@ -74230,7 +74242,7 @@ var a5 = function(r) { return { x: t.x / n, y: t.y / n }; } }, { key: "getUnitNormalVector", value: function() { return { x: this.unit.y, y: -this.unit.x }; - } }], e && cse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && fse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(), YD = function(r, e, t) { var n = { x: e.x - r.x, y: e.y - r.y }, i = (function(l, c) { @@ -74238,11 +74250,11 @@ var a5 = function(r) { return (0, Hi.clamp)(f, 0, 1); })({ x: t.x - r.x, y: t.y - r.y }, n), a = r.x + i * n.x, o = r.y + i * n.y, s = a - t.x, u = o - t.y; return Math.sqrt(s * s + u * u); -}, fse = function(r, e, t, n) { +}, dse = function(r, e, t, n) { if (e.x === t.x && e.y === t.y) return e; var i = e.y - r.y, a = r.x - e.x, o = i * r.x + a * r.y, s = n.y - t.y, u = t.x - n.x, l = s * t.x + u * t.y, c = i * u - s * a; return c === 0 ? null : { x: (u * o - a * l) / c, y: (i * l - s * o) / c }; -}, PP = function(r, e, t, n) { +}, RP = function(r, e, t, n) { var i, a, o, s = 1e9, u = (function(c) { for (var f = 1; f < arguments.length; f++) { var d = arguments[f] != null ? arguments[f] : {}; @@ -74264,7 +74276,7 @@ function Yb(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Yb(r); } -function dse(r, e) { +function hse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, qq(n.key), n); @@ -74283,7 +74295,7 @@ function qq(r) { })(r); return Yb(e) == "symbol" ? e : e + ""; } -var Pf = 64, hse = (function() { +var Pf = 64, vse = (function() { return r = function t() { var n, i, a; (function(o, s) { @@ -74330,10 +74342,10 @@ var Pf = 64, hse = (function() { }, s = 0, u = ["image", "inverted"]; s < u.length; s++) o(); return t.length > 0 ? Promise.all(t).then(function() { }) : Promise.resolve(); - } }], e && dse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && hse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); -const vse = hse; +const pse = vse; function Xb(r) { return Xb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -74343,17 +74355,17 @@ function Xb(r) { } function xB(r, e) { if (r) { - if (typeof r == "string") return o5(r, e); + if (typeof r == "string") return a5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? o5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? a5(r, e) : void 0; } } -function o5(r, e) { +function a5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function pse(r, e) { +function gse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Gq(n.key), n); @@ -74375,7 +74387,7 @@ function Gq(r) { })(r); return Xb(e) == "symbol" ? e : e + ""; } -var gse = (function() { +var yse = (function() { return r = function t(n, i, a) { (function(o, s) { if (!(o instanceof s)) throw new TypeError("Cannot call a class as a function"); @@ -74428,7 +74440,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }); return Math.max.apply(Math, (function(n) { return (function(i) { - if (Array.isArray(i)) return o5(i); + if (Array.isArray(i)) return a5(i); })(n) || (function(i) { if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i); })(n) || xB(n) || (function() { @@ -74449,9 +74461,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho this.waypointPath = t; } }, { key: "setAngles", value: function(t) { this.angles = t; - } }], e && pse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && gse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; -})(), EB = oq, SB = 2 * Math.PI / 50, OB = 0.1 * Math.PI, hE = 1.5, s5 = wb; +})(), EB = oq, SB = 2 * Math.PI / 50, OB = 0.1 * Math.PI, dE = 1.5, o5 = wb; function $b(r) { return $b = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -74493,7 +74505,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function CB(r) { return (function(e) { - if (Array.isArray(e)) return u5(e); + if (Array.isArray(e)) return s5(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || Vq(r) || (function() { @@ -74503,17 +74515,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function Vq(r, e) { if (r) { - if (typeof r == "string") return u5(r, e); + if (typeof r == "string") return s5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? s5(r, e) : void 0; } } -function u5(r, e) { +function s5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function yse(r, e) { +function mse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, Hq(n.key), n); @@ -74535,7 +74547,7 @@ function Hq(r) { })(r); return $b(e) == "symbol" ? e : e + ""; } -var mse = function(r) { +var bse = function(r) { var e = []; if (r.length === 0) e.push({ size: 2 * Math.PI, start: 0 }); else { @@ -74548,12 +74560,12 @@ var mse = function(r) { }); } return e; -}, bse = function(r, e) { +}, _se = function(r, e) { for (; e > r.length || r[0].size > 2 * r[e - 1].size; ) r.push({ size: r[0].size / 2, start: r[0].start }), r.push({ size: r[0].size / 2, start: r[0].start + r[0].size / 2 }), r.shift(), r.sort(function(t, n) { return n.size - t.size; }); return r; -}, _se = (function() { +}, wse = (function() { return r = function t(n, i) { (function(o, s) { if (!(o instanceof s)) throw new TypeError("Cannot call a class as a function"); @@ -74564,7 +74576,7 @@ var mse = function(r) { this.updateData(a, {}, {}, i); }, e = [{ key: "getBundle", value: function(t) { var n = this.bundles, i = this.nodeToBundles, a = this.generatePairId(t.from, t.to), o = n[a]; - return o === void 0 && (o = new gse(a, t.from, t.to), n[a] = o, i[t.from] === void 0 && (i[t.from] = []), i[t.to] === void 0 && (i[t.to] = []), i[t.from].push(o), i[t.to].push(o)), o; + return o === void 0 && (o = new yse(a, t.from, t.to), n[a] = o, i[t.from] === void 0 && (i[t.from] = []), i[t.to] === void 0 && (i[t.to] = []), i[t.from].push(o), i[t.to].push(o)), o; } }, { key: "updateData", value: function(t, n, i, a) { var o, s = this.bundles, u = this.nodeToBundles, l = function(S, O) { var E = u[O].findIndex(function(T) { @@ -74617,8 +74629,8 @@ var mse = function(r) { } var S = d.map(function(T) { return (T + 2 * Math.PI) % (2 * Math.PI); - }).sort(), O = mse(S); - bse(O, l.size()); + }).sort(), O = bse(S); + _se(O, l.size()); var E = O.map(function(T) { return T.start + T.size / 2; }).slice(0, l.size()); @@ -74630,7 +74642,7 @@ var mse = function(r) { return [t.toString(), n.toString()].sort(function(i, a) { return i.localeCompare(a); }).join("-"); - } }], e && yse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && mse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(), rb = function(r, e) { return { x: r.x + e.x, y: r.y + e.y }; @@ -74638,7 +74650,7 @@ var mse = function(r) { return { x: r.x - e.x, y: r.y - e.y }; }, sm = function(r, e) { return { x: r.x * e, y: r.y * e }; -}, wse = function(r, e) { +}, xse = function(r, e) { return r.x * e.x + r.y * e.y; }, e2 = function(r, e) { return (function(t) { @@ -74650,7 +74662,7 @@ function RB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -var xse = 2 * Math.PI, t2 = function(r, e, t) { +var Ese = 2 * Math.PI, t2 = function(r, e, t) { var n, i, a, o, s, u, l, c, f = t.indexOf(r), d = (n = t.angles[f]) !== null && n !== void 0 ? n : 0, h = d - OB / 2, p = d + OB / 2, g = $n(), y = ((i = e.size) !== null && i !== void 0 ? i : ha) * g + 4 * g, b = (a = e.x) !== null && a !== void 0 ? a : 0, _ = (o = e.y) !== null && o !== void 0 ? o : 0, m = { x: b + Math.cos(h) * (y + ((s = r.width) !== null && s !== void 0 ? s : 2) / 2), y: _ + Math.sin(h) * (y + ((u = r.width) !== null && u !== void 0 ? u : 2) / 2) }, x = { x: b + Math.cos(p) * (y + ((l = r.width) !== null && l !== void 0 ? l : 2) / 2), y: _ + Math.sin(p) * (y + ((c = r.width) !== null && c !== void 0 ? c : 2) / 2) }, S = { x: b + Math.cos(d) * (y + 35 * g), y: _ + Math.sin(d) * (y + 35 * g) }; return { angle: d, startAngle: h, endAngle: p, startPoint: m, endPoint: x, apexPoint: S, control1Point: { x: S.x + 25 * Math.cos(d - Math.PI / 2) * g / 2, y: S.y + 25 * Math.sin(d - Math.PI / 2) * g / 2 }, control2Point: { x: S.x + 25 * Math.cos(d + Math.PI / 2) * g / 2, y: S.y + 25 * Math.sin(d + Math.PI / 2) * g / 2 }, nodeGap: y }; }, Yq = function(r, e, t, n, i, a, o) { @@ -74658,7 +74670,7 @@ var xse = 2 * Math.PI, t2 = function(r, e, t) { return { x: r.x - Math.cos(f) * (y / 4), y: r.y - Math.sin(f) * (y / 4), angle: (e + u) % l, flip: (e + l) % l < Math.PI }; }, r2 = function() { var r, e; - return ((r = (e = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [])[0]) === null || e === void 0 ? void 0 : e.width) !== null && r !== void 0 ? r : 0) * $n() * hE; + return ((r = (e = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [])[0]) === null || e === void 0 ? void 0 : e.width) !== null && r !== void 0 ? r : 0) * $n() * dE; }, Xq = function(r, e, t, n, i, a) { var o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : "top"; if (r.length === 0) return { x: 0, y: 0, angle: 0 }; @@ -74687,25 +74699,25 @@ var xse = 2 * Math.PI, t2 = function(r, e, t) { var H = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], q = z.norm.x, W = z.norm.y; return H ? { x: -q, y: -W } : z.norm; }, s = $n(), u = e.indexOf(r), l = (e.size() - 1) / 2, c = u > l, f = Math.abs(u - l), d = i ? 17 * e.maxFontSize() : 8, h = (e.size() - 1) * d * s, p = (function(z, H, q, W, $, J, X) { - var Q, ue = arguments.length > 7 && arguments[7] !== void 0 && arguments[7], re = $n(), ne = z.size(), le = ne > 1, ce = z.relIsOppositeDirection(J), pe = ce ? q : H, fe = ce ? H : q, se = z.waypointPath, de = se == null ? void 0 : se.points, ge = se == null ? void 0 : se.from, Oe = se == null ? void 0 : se.to, ke = Nw(pe, ge) && Nw(fe, Oe) || Nw(fe, ge) && Nw(pe, Oe), Me = ke ? de[1] : null, Ne = ke ? de[de.length - 2] : null, Ce = MB(pe), Y = MB(fe), Z = function(mr, ur) { + var Z, ue = arguments.length > 7 && arguments[7] !== void 0 && arguments[7], re = $n(), ne = z.size(), le = ne > 1, ce = z.relIsOppositeDirection(J), pe = ce ? q : H, fe = ce ? H : q, se = z.waypointPath, de = se == null ? void 0 : se.points, ge = se == null ? void 0 : se.from, Oe = se == null ? void 0 : se.to, ke = Nw(pe, ge) && Nw(fe, Oe) || Nw(fe, ge) && Nw(pe, Oe), De = ke ? de[1] : null, Ne = ke ? de[de.length - 2] : null, Ce = MB(pe), Y = MB(fe), Q = function(mr, ur) { return Math.atan2(mr.y - ur.y, mr.x - ur.x); - }, ie = Math.max(Math.PI, xse / (ne / 2)), we = le ? W * ie * (X ? 1 : -1) / ((Q = pe.size) !== null && Q !== void 0 ? Q : ha) : 0, Ee = Z(ke ? Me : fe, pe), De = ke ? Z(fe, Ne) : Ee, Ie = function(mr, ur, sn, Fr) { + }, ie = Math.max(Math.PI, Ese / (ne / 2)), we = le ? W * ie * (X ? 1 : -1) / ((Z = pe.size) !== null && Z !== void 0 ? Z : ha) : 0, Ee = Q(ke ? De : fe, pe), Me = ke ? Q(fe, Ne) : Ee, Ie = function(mr, ur, sn, Fr) { return { x: mr.x + Math.cos(ur) * sn * (Fr ? -1 : 1), y: mr.y + Math.sin(ur) * sn * (Fr ? -1 : 1) }; }, Ye = function(mr, ur) { return Ie(pe, Ee + mr, ur, !1); }, ot = function(mr, ur) { - return Ie(fe, De - mr, ur, !0); + return Ie(fe, Me - mr, ur, !0); }, mt = function(mr, ur) { return { x: mr.x + (ur.x - mr.x) / 2, y: mr.y + (ur.y - mr.y) / 2 }; }, wt = function(mr, ur) { return Math.sqrt((mr.x - ur.x) * (mr.x - ur.x) + (mr.y - ur.y) * (mr.y - ur.y)) * re; }, Mt = Ye(we, Ce), Dt = ot(we, Y), vt = le ? Ye(0, Ce) : null, tt = le ? ot(0, Y) : null, _e = 200 * re, Ue = []; if (ke) { - var Qe = wt(Mt, Me) < _e; + var Qe = wt(Mt, De) < _e; if (le && !Qe) { - var Ze = mt(vt, Me); - Ue.push(new Hu(Mt, Ze)), Ue.push(new Hu(Ze, Me)); - } else Ue.push(new Hu(Mt, Me)); + var Ze = mt(vt, De); + Ue.push(new Hu(Mt, Ze)), Ue.push(new Hu(Ze, De)); + } else Ue.push(new Hu(Mt, De)); for (var nt = 2; nt < de.length - 1; nt++) Ue.push(new Hu(de[nt - 1], de[nt])); var It = wt(Dt, Ne) < _e; if (le && !It) { @@ -74732,13 +74744,13 @@ var xse = 2 * Math.PI, t2 = function(r, e, t) { for (var _ = 1; _ < p.length; _++) if (e.size() === 1) g.push(p[_ - 1].p2); else { var m = p[_ - 1], x = p[_], S = o(m, c), O = o(x, c), E = rb(m.p1, sm(S, h / 2)), T = rb(m.p2, sm(S, h / 2)), P = rb(x.p1, sm(O, h / 2)), I = rb(x.p2, sm(O, h / 2)), k = null; - wse(S, O) < 0.99 && (k = fse(E, T, P, I)); + xse(S, O) < 0.99 && (k = dse(E, T, P, I)); var L = k !== null ? Wq(k, m.p2) : sm(S, h / 2); g.push(rb(m.p2, sm(L, f / l))); } var B = p[p.length - 1], j = o(B, c); return g.push({ x: B.p2.x + j.x, y: B.p2.y + j.y }), e.relIsOppositeDirection(r) ? g.reverse() : g; -}, Ese = function(r, e, t, n) { +}, Sse = function(r, e, t, n) { var i = arguments.length > 4 && arguments[4] !== void 0 && arguments[4], a = arguments.length > 5 && arguments[5] !== void 0 && arguments[5]; return N1(t, n) ? t.id === n.id ? (function(o, s, u) { for (var l = t2(o, s, u), c = { left: 1 / 0, top: 1 / 0, right: -1 / 0, bottom: -1 / 0 }, f = ["startPoint", "endPoint", "apexPoint", "control1Point", "control2Point"], d = 0; d < f.length; d++) { @@ -74798,7 +74810,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return h; })(r, e, t, n, i, a) : null; }, $q = function(r, e) { - var t, n = r.selected ? hE : 1; + var t, n = r.selected ? dE : 1; return ((t = r.width) !== null && t !== void 0 ? t : e) * n * $n(); }, Kq = function(r, e, t, n, i) { if (r.length < 2) return { tailOffset: null }; @@ -74817,7 +74829,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return 6 * r * $n(); }, kB = function(r, e, t) { return { widthAlign: e / 2 * r[0], heightAlign: t / 2 * r[1] }; -}, Sse = function(r) { +}, Ose = function(r) { var e = r.x, t = e === void 0 ? 0 : e, n = r.y, i = n === void 0 ? 0 : n, a = r.size, o = a === void 0 ? ha : a; return { top: i - o, left: t - o, right: t + o, bottom: i + o }; }, Qq = function(r, e, t, n) { @@ -74902,7 +74914,7 @@ function LB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Ose(r, e) { +function Tse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, rG(n.key), n); @@ -74929,7 +74941,7 @@ var nG = (function() { var a, o = this, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; (function(u, l) { if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function"); - })(this, t), kf(this, "arrowBundler", void 0), kf(this, "state", void 0), kf(this, "relationshipThreshold", void 0), kf(this, "stateDisposers", void 0), kf(this, "needsRun", void 0), kf(this, "imageCache", void 0), kf(this, "nodeVersion", void 0), kf(this, "relVersion", void 0), kf(this, "waypointVersion", void 0), kf(this, "channelId", void 0), kf(this, "activeNodes", void 0), this.state = n, this.relationshipThreshold = (a = s.relationshipThreshold) !== null && a !== void 0 ? a : 0, this.channelId = i, this.arrowBundler = new _se(n.rels.items, n.waypoints.data), this.stateDisposers = [], this.needsRun = !0, this.imageCache = new vse(), this.nodeVersion = n.nodes.version, this.relVersion = n.rels.version, this.waypointVersion = n.waypoints.counter, this.activeNodes = /* @__PURE__ */ new Set(), this.stateDisposers.push(this.state.autorun(function() { + })(this, t), kf(this, "arrowBundler", void 0), kf(this, "state", void 0), kf(this, "relationshipThreshold", void 0), kf(this, "stateDisposers", void 0), kf(this, "needsRun", void 0), kf(this, "imageCache", void 0), kf(this, "nodeVersion", void 0), kf(this, "relVersion", void 0), kf(this, "waypointVersion", void 0), kf(this, "channelId", void 0), kf(this, "activeNodes", void 0), this.state = n, this.relationshipThreshold = (a = s.relationshipThreshold) !== null && a !== void 0 ? a : 0, this.channelId = i, this.arrowBundler = new wse(n.rels.items, n.waypoints.data), this.stateDisposers = [], this.needsRun = !0, this.imageCache = new pse(), this.nodeVersion = n.nodes.version, this.relVersion = n.rels.version, this.waypointVersion = n.waypoints.counter, this.activeNodes = /* @__PURE__ */ new Set(), this.stateDisposers.push(this.state.autorun(function() { o.state.zoom !== void 0 && (o.needsRun = !0), o.state.panX !== void 0 && (o.needsRun = !0), o.state.panY !== void 0 && (o.needsRun = !0), o.state.nodes.version !== void 0 && (o.needsRun = !0), o.state.rels.version !== void 0 && (o.needsRun = !0), o.state.waypoints.counter > 0 && (o.needsRun = !0), o.state.layout !== void 0 && (o.needsRun = !0); })); }, (e = [{ key: "getRelationshipsToRender", value: function(t, n, i, a) { @@ -74938,7 +74950,7 @@ var nG = (function() { for (m.s(); !(o = m.n()).done; ) { var x = o.value, S = c.getBundle(x), O = Ll(Ll({}, y[x.from]), b[x.from]), E = Ll(Ll({}, y[x.to]), b[x.to]), T = n !== void 0 ? t || n > d || x.captionHtml !== void 0 : t, P = !0; if (i !== void 0 && a !== void 0) { - var I = Ese(x, S, O, E, T, _); + var I = Sse(x, S, O, E, T, _); if (I !== null) { var k, L, B, j, z, H, q = this.isBoundingBoxOffScreen(I, i, a), W = e2({ x: (k = O.x) !== null && k !== void 0 ? k : 0, y: (L = O.y) !== null && L !== void 0 ? L : 0 }, { x: (B = E.x) !== null && B !== void 0 ? B : 0, y: (j = E.y) !== null && j !== void 0 ? j : 0 }), $ = $n(), J = (((z = O.size) !== null && z !== void 0 ? z : ha) + ((H = E.size) !== null && H !== void 0 ? H : ha)) * $, X = O.id !== E.id && J > W; P = !(q || X); @@ -74946,8 +74958,8 @@ var nG = (function() { } P && (x.disabled ? u.push(Ll(Ll({}, x), {}, { fromNode: O, toNode: E, showLabel: T })) : x.selected ? s.push(Ll(Ll({}, x), {}, { fromNode: O, toNode: E, showLabel: T })) : l.push(Ll(Ll({}, x), {}, { fromNode: O, toNode: E, showLabel: T }))); } - } catch (Q) { - m.e(Q); + } catch (Z) { + m.e(Z); } finally { m.f(); } @@ -74958,7 +74970,7 @@ var nG = (function() { for (c.s(); !(a = c.n()).done; ) { var f = a.value, d = !0; if (n !== void 0 && i !== void 0) { - var h = Sse(f); + var h = Ose(f); d = !this.isBoundingBoxOffScreen(h, n, i); } d && (l[f.id].disabled ? o.push(Ll({}, f)) : l[f.id].selected ? s.push(Ll({}, f)) : u.push(Ll({}, f))); @@ -75002,9 +75014,9 @@ var nG = (function() { this.stateDisposers.forEach(function(t) { t(); }), this.state.nodes.removeChannel(this.channelId), this.state.rels.removeChannel(this.channelId); - } }]) && Ose(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }]) && Tse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; -})(), Tse = [[0.04, 1], [100, 2]], i2 = [[0.8, 1.1], [3, 1.6], [8, 2.5]], Cse = [[i2[0][0], 1], [100, 1.25]], Og = function(r, e) { +})(), Cse = [[0.04, 1], [100, 2]], i2 = [[0.8, 1.1], [3, 1.6], [8, 2.5]], Ase = [[i2[0][0], 1], [100, 1.25]], Og = function(r, e) { if (r.includes("rgba")) return r; if (r.includes("rgb")) { var t = r.substr(r.indexOf("(") + 1).replace(")", "").split(","); @@ -75013,7 +75025,7 @@ var nG = (function() { var n = Lq().get.rgb(r); return n === null ? r : "rgba(".concat(n[0], ",").concat(n[1], ",").concat(n[2], ",").concat(e, ")"); }; -function MP(r, e) { +function PP(r, e) { var t = e.find(function(i) { return r < i[0]; }), n = e[e.length - 1][1]; @@ -75022,7 +75034,7 @@ function MP(r, e) { function XD(r, e) { if (!r || !e) return { nodeInfoLevel: 0, fontInfoLevel: 1.25, iconInfoLevel: 1 }; var t = $n(), n = 1600 * t * (1200 * t), i = Math.pow(r, 2) * Math.PI * Math.pow(e, 2) / (n / 100); - return { nodeInfoLevel: MP(i, Tse), fontInfoLevel: MP(i, i2), iconInfoLevel: MP(i, Cse) }; + return { nodeInfoLevel: PP(i, Cse), fontInfoLevel: PP(i, i2), iconInfoLevel: PP(i, Ase) }; } function Zb(r) { return Zb = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { @@ -75033,7 +75045,7 @@ function Zb(r) { } function nb(r) { return (function(e) { - if (Array.isArray(e)) return l5(e); + if (Array.isArray(e)) return u5(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || iG(r) || (function() { @@ -75055,14 +75067,14 @@ function a2(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? jB(Object(t), !0).forEach(function(n) { - Ase(r, n, t[n]); + Rse(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : jB(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function Ase(r, e, t) { +function Rse(r, e, t) { return (e = (function(n) { var i = (function(a) { if (Zb(a) != "object" || !a) return a; @@ -75079,12 +75091,12 @@ function Ase(r, e, t) { } function iG(r, e) { if (r) { - if (typeof r == "string") return l5(r, e); + if (typeof r == "string") return u5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? l5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? u5(r, e) : void 0; } } -function l5(r, e) { +function u5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; @@ -75094,10 +75106,10 @@ var o2 = "…", aG = function(r) { return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)); }, BB = function(r) { return !(!r || !isNaN(Number(r)) || r.toLowerCase() === r.toUpperCase()) && r === r.toUpperCase(); -}, Rse = function(r) { +}, Pse = function(r) { var e = r[r.length - 1], t = r[r.length - 2]; return !(!e || !isNaN(Number(e)) || e.toLowerCase() === e.toUpperCase()) && !(!t || !isNaN(Number(t)) || t.toLowerCase() === t.toUpperCase()) && BB(e) && !BB(t); -}, Pse = function(r) { +}, Mse = function(r) { return ` \r\v`.includes(r); }, L1 = function(r, e, t, n) { @@ -75112,7 +75124,7 @@ var o2 = "…", aG = function(r) { for (var m = g, x = function() { return r[m - 1]; }; b > _; ) { - for (m -= 1; Pse(x()); ) m -= 1; + for (m -= 1; Mse(x()); ) m -= 1; if (!(m - u > 1)) { i = "", f = !0, c = !1; break; @@ -75129,7 +75141,7 @@ var o2 = "…", aG = function(r) { var k = E[E.length - (I + 1)]; if (k === " " || k.toLowerCase() === k.toUpperCase()) return { hyphen: !1, cnt: I + 1 }; var L = E.slice(0, E.length - I); - if (Rse(L)) return { hyphen: !1, cnt: I + 1 }; + if (Pse(L)) return { hyphen: !1, cnt: I + 1 }; } return { hyphen: !0, cnt: 1 }; })(i), O = g - S.cnt; @@ -75178,7 +75190,7 @@ function oG(r, e, t) { m === ((n = i2[1]) === null || n === void 0 ? void 0 : n[1]) ? I = 3 : m === ((i = i2[2]) === null || i === void 0 ? void 0 : i[1]) && (I = 4); var k = h === "center" ? 0.7 * _ : 2 * Math.sqrt(Math.pow(_ / 2, 2) - Math.pow(_ / 3, 2)), L = t; L || (L = document.createElement("canvas").getContext("2d")), L.font = "bold ".concat(x, "px ").concat(wb), a = (function(z, H, q, W, $, J, X) { - var Q = (function(fe) { + var Z = (function(fe) { return /[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(fe); })(H) ? H.split("").reverse().join("") : H; z.font = "bold ".concat(W, "px ").concat(q).replace(/"/g, ""); @@ -75186,16 +75198,16 @@ function oG(r, e, t) { return Tb(z, fe); }, re = J ? (X < 4 ? ["", ""] : [""]).length : 0, ne = function(fe, se) { return (function(de, ge, Oe) { - var ke = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "top", Me = 0.98 * Oe, Ne = 0.89 * Oe, Ce = 0.95 * Oe; - return ge === 1 ? Me : ge === 2 ? Ce : ge === 3 && ke === "top" ? de === 0 || de === 2 ? Ne : Me : ge === 4 && ke === "top" ? de === 0 || de === 3 ? 0.78 * Oe : Ce : ge === 5 && ke === "top" ? de === 0 || de === 4 ? 0.65 * Oe : de === 1 || de === 3 ? Ne : Ce : Me; + var ke = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "top", De = 0.98 * Oe, Ne = 0.89 * Oe, Ce = 0.95 * Oe; + return ge === 1 ? De : ge === 2 ? Ce : ge === 3 && ke === "top" ? de === 0 || de === 2 ? Ne : De : ge === 4 && ke === "top" ? de === 0 || de === 3 ? 0.78 * Oe : Ce : ge === 5 && ke === "top" ? de === 0 || de === 4 ? 0.65 * Oe : de === 1 || de === 3 ? Ne : Ce : De; })(fe + re, se + re, $); }, le = 1, ce = [], pe = function() { if ((ce = (function(se, de, ge, Oe) { - var ke, Me = se.split(/\s/g).filter(function(Ie) { + var ke, De = se.split(/\s/g).filter(function(Ie) { return Ie.length > 0; }), Ne = [], Ce = null, Y = function(Ie) { return de(Ie) > ge(Ne.length, Oe); - }, Z = (function(Ie) { + }, Q = (function(Ie) { var Ye = typeof Symbol < "u" && Ie[Symbol.iterator] || Ie["@@iterator"]; if (!Ye) { if (Array.isArray(Ie) || (Ye = iG(Ie))) { @@ -75226,9 +75238,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho if (Dt) throw wt; } } }; - })(Me); + })(De); try { - for (Z.s(); !(ke = Z.n()).done; ) { + for (Q.s(); !(ke = Q.n()).done; ) { var ie = ke.value, we = Ce ? "".concat(Ce, " ").concat(ie) : ie; if (de(we) < ge(Ne.length, Oe)) Ce = we; else { @@ -75240,16 +75252,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } } catch (Ie) { - Z.e(Ie); + Q.e(Ie); } finally { - Z.f(); + Q.f(); } if (Ce) { - var De = Y(Ce); - Ne.push({ text: Ce, overflowed: De }); + var Me = Y(Ce); + Ne.push({ text: Ce, overflowed: Me }); } return Ne.length <= Oe ? Ne : []; - })(Q, ue, ne, le)).length === 0) ce = L1(Q, ue, ne, le, X > le); + })(Z, ue, ne, le)).length === 0) ce = L1(Z, ue, ne, le, X > le); else if (ce.some(function(se) { return se.overflowed; })) { @@ -75283,7 +75295,7 @@ function Jb(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Jb(r); } -function Mse(r, e) { +function Dse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, sG(n.key), n); @@ -75305,7 +75317,7 @@ function sG(r) { })(r); return Jb(e) == "symbol" ? e : e + ""; } -var Dse = (function() { +var kse = (function() { return r = function t(n, i) { (function(a, o) { if (!(a instanceof o)) throw new TypeError("Cannot call a class as a function"); @@ -75323,7 +75335,7 @@ var Dse = (function() { this.endValue !== t && (t - this.currentValue !== 0 ? (this.currentTime = (/* @__PURE__ */ new Date()).getTime(), this.status = 1, this.startValue = this.currentValue, this.endValue = t, this.startTime = this.currentTime, this.setEndTime(this.startTime + this.duration)) : this.endValue = t); } }, { key: "setEndTime", value: function(t) { this.endTime = Math.max(t, this.startTime); - } }]) && Mse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }]) && Dse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function e1(r) { @@ -75354,7 +75366,7 @@ function UB(r) { } return r; } -function kse(r, e) { +function Ise(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, uG(n.key), n); @@ -75376,7 +75388,7 @@ function uG(r) { })(r); return e1(e) == "symbol" ? e : e + ""; } -var Ise = (function() { +var Nse = (function() { return r = function t() { (function(n, i) { if (!(n instanceof i)) throw new TypeError("Cannot call a class as a function"); @@ -75408,7 +75420,7 @@ var Ise = (function() { } return this.hasNextAnimation = !0, o; } }, { key: "createAnimation", value: function(t, n, i) { - var a, o = new Dse(n, t), s = (a = this.animations.get(n)) !== null && a !== void 0 ? a : {}; + var a, o = new kse(n, t), s = (a = this.animations.get(n)) !== null && a !== void 0 ? a : {}; return this.animations.set(n, UB(UB({}, s), {}, kg({}, i, o))), o; } }, { key: "getById", value: function(t) { return this.animations.get(t); @@ -75418,10 +75430,10 @@ var Ise = (function() { } }, { key: "createSizeAnimation", value: function(t, n, i) { var a, o = this.createAnimation(t, n, i); return o.setDuration((a = this.durations[1]) !== null && a !== void 0 ? a : this.defaultDuration), o; - } }], e && kse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Ise(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); -function DP(r, e) { +function MP(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; @@ -75441,7 +75453,7 @@ var op = function(r, e, t, n) { } y.closePath(), _ && y.fill(), m && y.stroke(); })(r, p, i, a), r.lineWidth = g.lineWidth, r.strokeStyle = g.strokeStyle, r.fillStyle = g.fillStyle; -}, Nse = function(r, e, t, n, i) { +}, Lse = function(r, e, t, n, i) { var a = n; i.forEach(function(o) { var s = o.width, u = o.color, l = a + s; @@ -75483,7 +75495,7 @@ function GB(r) { function ib(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { - if (Array.isArray(r) || (t = c5(r)) || e) { + if (Array.isArray(r) || (t = l5(r)) || e) { t && (r = t); var n = 0, i = function() { }; @@ -75512,19 +75524,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } }; } -function c5(r, e) { +function l5(r, e) { if (r) { - if (typeof r == "string") return f5(r, e); + if (typeof r == "string") return c5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? f5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? c5(r, e) : void 0; } } -function f5(r, e) { +function c5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Lse(r, e) { +function jse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, fG(n.key), n); @@ -75549,13 +75561,13 @@ function cG() { })(); } function Lw(r, e, t, n) { - var i = d5(Hm(r.prototype), e, t); + var i = f5(Hm(r.prototype), e, t); return 2 & n && typeof i == "function" ? function(a) { return i.apply(t, a); } : i; } -function d5() { - return d5 = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { +function f5() { + return f5 = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { var n = (function(a, o) { for (; !{}.hasOwnProperty.call(a, o) && (a = Hm(a)) !== null; ) ; return a; @@ -75564,17 +75576,17 @@ function d5() { var i = Object.getOwnPropertyDescriptor(n, e); return i.get ? i.get.call(arguments.length < 3 ? r : t) : i.value; } - }, d5.apply(null, arguments); + }, f5.apply(null, arguments); } function Hm(r) { return Hm = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Hm(r); } -function h5(r, e) { - return h5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { +function d5(r, e) { + return d5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { return t.__proto__ = n, t; - }, h5(r, e); + }, d5(r, e); } function dm(r, e, t) { return (e = fG(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; @@ -75592,16 +75604,16 @@ function fG(r) { })(r); return Dm(e) == "symbol" ? e : e + ""; } -var kP = "canvasRenderer", jse = (function() { +var DP = "canvasRenderer", Bse = (function() { function r(n, i, a) { var o, s, u, l, c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return (function(f, d) { if (!(f instanceof d)) throw new TypeError("Cannot call a class as a function"); - })(this, r), s = this, l = [a, kP, c], u = Hm(u = r), dm(o = VB(s, cG() ? Reflect.construct(u, l || [], Hm(s).constructor) : u.apply(s, l)), "canvas", void 0), dm(o, "context", void 0), dm(o, "animationHandler", void 0), dm(o, "ellipsisWidth", void 0), dm(o, "disableArrowShadow", !1), i === null ? VB(o) : (o.canvas = n, o.context = i, a.nodes.addChannel(kP), a.rels.addChannel(kP), o.animationHandler = new Ise(), o.animationHandler.setOptions({ fadeDuration: 150, sizeDuration: 150 }), o.ellipsisWidth = Tb(i, o2), o); + })(this, r), s = this, l = [a, DP, c], u = Hm(u = r), dm(o = VB(s, cG() ? Reflect.construct(u, l || [], Hm(s).constructor) : u.apply(s, l)), "canvas", void 0), dm(o, "context", void 0), dm(o, "animationHandler", void 0), dm(o, "ellipsisWidth", void 0), dm(o, "disableArrowShadow", !1), i === null ? VB(o) : (o.canvas = n, o.context = i, a.nodes.addChannel(DP), a.rels.addChannel(DP), o.animationHandler = new Nse(), o.animationHandler.setOptions({ fadeDuration: 150, sizeDuration: 150 }), o.ellipsisWidth = Tb(i, o2), o); } return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); - n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && h5(n, i); + n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && d5(n, i); })(r, nG), e = r, t = [{ key: "needsToRun", value: function() { return Lw(r, "needsToRun", this, 3)([]) || this.animationHandler.needsToRun() || this.activeNodes.size > 0; } }, { key: "processUpdates", value: function() { @@ -75613,8 +75625,8 @@ var kP = "canvasRenderer", jse = (function() { } }, { key: "drawNode", value: function(n, i, a, o, s, u, l, c, f) { var d = i.x, h = d === void 0 ? 0 : d, p = i.y, g = p === void 0 ? 0 : p, y = i.size, b = y === void 0 ? ha : y, _ = i.captionAlign, m = _ === void 0 ? "center" : _, x = i.disabled, S = i.activated, O = i.selected, E = i.hovered, T = i.id, P = i.icon, I = i.overlayIcon, k = Jx(i), L = $n(), B = this.getRingStyles(i, o, s), j = B.reduce(function(Xt, Vr) { return Xt + Vr.width; - }, 0), z = b * L, H = 2 * z, q = XD(z, f), W = q.nodeInfoLevel, $ = q.iconInfoLevel, J = i.color || l, X = r5(J), Q = z; - if (j > 0 && (Q = z + j), x) J = u.color, X = u.fontColor; + }, 0), z = b * L, H = 2 * z, q = XD(z, f), W = q.nodeInfoLevel, $ = q.iconInfoLevel, J = i.color || l, X = t5(J), Z = z; + if (j > 0 && (Z = z + j), x) J = u.color, X = u.fontColor; else { var ue; if (S) { @@ -75625,15 +75637,15 @@ var kP = "canvasRenderer", jse = (function() { ge > 0 && (function(Xt, Vr, Br, mr, ur, sn) { var Fr = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 1, un = ur + sn, bn = Xt.createRadialGradient(Vr, Br, ur, Vr, Br, un); bn.addColorStop(0, "transparent"), bn.addColorStop(0.01, Og(mr, 0.5 * Fr)), bn.addColorStop(0.05, Og(mr, 0.5 * Fr)), bn.addColorStop(0.5, Og(mr, 0.12 * Fr)), bn.addColorStop(0.75, Og(mr, 0.03 * Fr)), bn.addColorStop(1, Og(mr, 0)), Xt.fillStyle = bn, lG(Xt, Vr, Br, un), Xt.fill(); - })(n, h, g, se, Q, ge, fe); + })(n, h, g, se, Z, ge, fe); } - zB(n, h, g, J, z), j > 0 && Nse(n, h, g, z, B); + zB(n, h, g, J, z), j > 0 && Lse(n, h, g, z, B); var Oe = !!k.length; if (P) { - var ke = Qq(z, Oe, $, W), Me = W > 0 ? 1 : 0, Ne = Jq(ke, Oe, m, $, W), Ce = Ne.iconXPos, Y = Ne.iconYPos, Z = o.getValueForAnimationName(T, "iconSize", ke), ie = o.getValueForAnimationName(T, "iconXPos", Ce), we = o.getValueForAnimationName(T, "iconYPos", Y), Ee = n.globalAlpha, De = x ? 0.1 : Me; - n.globalAlpha = o.getValueForAnimationName(T, "iconOpacity", De); + var ke = Qq(z, Oe, $, W), De = W > 0 ? 1 : 0, Ne = Jq(ke, Oe, m, $, W), Ce = Ne.iconXPos, Y = Ne.iconYPos, Q = o.getValueForAnimationName(T, "iconSize", ke), ie = o.getValueForAnimationName(T, "iconXPos", Ce), we = o.getValueForAnimationName(T, "iconYPos", Y), Ee = n.globalAlpha, Me = x ? 0.1 : De; + n.globalAlpha = o.getValueForAnimationName(T, "iconOpacity", Me); var Ie = X === "#ffffff", Ye = a.getImage(P, Ie); - n.drawImage(Ye, h - ie, g - we, Math.floor(Z), Math.floor(Z)), n.globalAlpha = Ee; + n.drawImage(Ye, h - ie, g - we, Math.floor(Q), Math.floor(Q)), n.globalAlpha = Ee; } if (I !== void 0) { var ot, mt, wt, Mt, Dt = eG(H, (ot = I.size) !== null && ot !== void 0 ? ot : 1), vt = (mt = I.position) !== null && mt !== void 0 ? mt : [0, 0], tt = [(wt = vt[0]) !== null && wt !== void 0 ? wt : 0, (Mt = vt[1]) !== null && Mt !== void 0 ? Mt : 0], _e = tG(Dt, z, tt), Ue = _e.iconXPos, Qe = _e.iconYPos, Ze = n.globalAlpha, nt = x ? 0.1 : 1; @@ -75652,14 +75664,14 @@ var kP = "canvasRenderer", jse = (function() { Xt.font = fi; var yn = -Tb(Xt, gn.text) / 2, Jn = gn.text ? (function(_i) { return (function(Ir) { - if (Array.isArray(Ir)) return DP(Ir); + if (Array.isArray(Ir)) return MP(Ir); })(_i) || (function(Ir) { if (typeof Symbol < "u" && Ir[Symbol.iterator] != null || Ir["@@iterator"] != null) return Array.from(Ir); })(_i) || (function(Ir, pa) { if (Ir) { - if (typeof Ir == "string") return DP(Ir, pa); + if (typeof Ir == "string") return MP(Ir, pa); var di = {}.toString.call(Ir).slice(8, -1); - return di === "Object" && Ir.constructor && (di = Ir.constructor.name), di === "Map" || di === "Set" ? Array.from(Ir) : di === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(di) ? DP(Ir, pa) : void 0; + return di === "Object" && Ir.constructor && (di = Ir.constructor.name), di === "Map" || di === "Set" ? Array.from(Ir) : di === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(di) ? MP(Ir, pa) : void 0; } })(_i) || (function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. @@ -75693,11 +75705,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } }, { key: "drawLabel", value: function(n, i, a, o, s, u, l, c) { var f, d = arguments.length > 8 && arguments[8] !== void 0 && arguments[8], h = Math.PI / 2, p = $n(), g = s.selected, y = s.width, b = s.disabled, _ = s.captionAlign, m = _ === void 0 ? "top" : _, x = s.captionSize, S = x === void 0 ? 1 : x, O = Jx(s), E = O.length > 0 ? (f = Qb(O)) === null || f === void 0 ? void 0 : f.fullCaption : ""; if (E !== void 0) { - var T = 6 * S * p, P = s5, I = g === !0 ? "bold" : "normal", k = E; + var T = 6 * S * p, P = o5, I = g === !0 ? "bold" : "normal", k = E; n.fillStyle = b === !0 ? l.fontColor : c, n.font = "".concat(I, " ").concat(T, "px ").concat(P); var L = function(ce) { return Tb(n, ce); - }, B = (y ?? 1) * (g === !0 ? hE : 1), j = L(k); + }, B = (y ?? 1) * (g === !0 ? dE : 1), j = L(k); if (j > o) { var z = L1(k, L, function() { return o; @@ -75706,21 +75718,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } var H = Math.cos(a), q = Math.sin(a), W = { x: i.x, y: i.y }, $ = W.x, J = W.y, X = a; d && (X = a - h, $ += 2 * T * H, J += 2 * T * q, X -= h); - var Q = (1 + S) * p, ue = m === "bottom" ? T / 2 + B + Q : -(B + Q); + var Z = (1 + S) * p, ue = m === "bottom" ? T / 2 + B + Z : -(B + Z); n.translate($, J), n.rotate(X), n.fillText(k, -j / 2, ue), n.rotate(-X), n.translate(-$, -J); - var re = 2 * ue * Math.sin(a), ne = 2 * ue * Math.cos(a), le = { position: { x: i.x - re, y: i.y + ne }, rotation: d ? a - Math.PI : a, width: o / p, height: (T + Q) / p }; + var re = 2 * ue * Math.sin(a), ne = 2 * ue * Math.cos(a), le = { position: { x: i.x - re, y: i.y + ne }, rotation: d ? a - Math.PI : a, width: o / p, height: (T + Z) / p }; u.setLabelInfo(s.id, le); } } }, { key: "renderWaypointArrow", value: function(n, i, a, o, s, u, l, c, f, d) { - var h = arguments.length > 10 && arguments[10] !== void 0 ? arguments[10] : EB, p = Math.PI / 2, g = i.overlayIcon, y = i.color, b = i.disabled, _ = i.selected, m = i.width, x = i.hovered, S = i.captionAlign, O = _ === !0, E = b === !0, T = g !== void 0, P = f.rings, I = f.shadow, k = n2(i, s, a, o, l, c), L = $n(), B = $q(i, 1), j = !this.disableArrowShadow && l, z = E ? d.color : y ?? h, H = P[0].width * L, q = P[1].width * L, W = Zq(m, O, P), $ = W.headHeight, J = W.headChinHeight, X = W.headWidth, Q = W.headSelectedAdjustment, ue = W.headPositionOffset, re = e2(k[k.length - 2], k[k.length - 1]), ne = ue, le = Q; - Math.floor(k.length / 2), k.length > 2 && O && re < $ + Q - J && (ne += re, le -= re / 2 + J, k.pop(), Math.floor(k.length / 2)); + var h = arguments.length > 10 && arguments[10] !== void 0 ? arguments[10] : EB, p = Math.PI / 2, g = i.overlayIcon, y = i.color, b = i.disabled, _ = i.selected, m = i.width, x = i.hovered, S = i.captionAlign, O = _ === !0, E = b === !0, T = g !== void 0, P = f.rings, I = f.shadow, k = n2(i, s, a, o, l, c), L = $n(), B = $q(i, 1), j = !this.disableArrowShadow && l, z = E ? d.color : y ?? h, H = P[0].width * L, q = P[1].width * L, W = Zq(m, O, P), $ = W.headHeight, J = W.headChinHeight, X = W.headWidth, Z = W.headSelectedAdjustment, ue = W.headPositionOffset, re = e2(k[k.length - 2], k[k.length - 1]), ne = ue, le = Z; + Math.floor(k.length / 2), k.length > 2 && O && re < $ + Z - J && (ne += re, le -= re / 2 + J, k.pop(), Math.floor(k.length / 2)); var ce, pe, fe = k[k.length - 2], se = k[k.length - 1], de = (ce = fe, pe = se, Math.atan2(pe.y - ce.y, pe.x - ce.x)), ge = { headPosition: { x: se.x + Math.cos(de) * ne, y: se.y + Math.sin(de) * ne }, headAngle: de, headHeight: $, headChinHeight: J, headWidth: X }; Kq(k, O, $, le, P); var Oe, ke = ib(k); try { for (ke.s(); !(Oe = ke.n()).done; ) { - var Me = Oe.value; - Me.x = Math.round(Me.x), Me.y = Math.round(Me.y); + var De = Oe.value; + De.x = Math.round(De.x), De.y = Math.round(De.y); } } catch (jt) { ke.e(jt); @@ -75729,26 +75741,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } var Ne, Ce, Y = l || T ? (function(jt) { return (function(Yt) { - if (Array.isArray(Yt)) return f5(Yt); + if (Array.isArray(Yt)) return c5(Yt); })(jt) || (function(Yt) { if (typeof Symbol < "u" && Yt[Symbol.iterator] != null || Yt["@@iterator"] != null) return Array.from(Yt); - })(jt) || c5(jt) || (function() { + })(jt) || l5(jt) || (function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); })(); })(k) : null; if (n.save(), O) { - var Z = P[0].color, ie = P[1].color; - j && this.enableShadow(n, I), this.drawSegments(n, k, B + q, ie, c), op(n, q, ie, ge, !1, !0), j && this.disableShadow(n), this.drawSegments(n, k, B + H, Z, c), op(n, H, Z, ge, !1, !0); + var Q = P[0].color, ie = P[1].color; + j && this.enableShadow(n, I), this.drawSegments(n, k, B + q, ie, c), op(n, q, ie, ge, !1, !0), j && this.disableShadow(n), this.drawSegments(n, k, B + H, Q, c), op(n, H, Q, ge, !1, !0); } if (x === !0 && !O && !E) { var we = I.color; j && this.enableShadow(n, I), this.drawSegments(n, k, B, we, c), op(n, B, we, ge), j && this.disableShadow(n); } if (this.drawSegments(n, k, B, z, c), op(n, B, z, ge), l || T) { - var Ee = Xq(Y, a, o, c, O, P, S === "bottom" ? "bottom" : "top"), De = aG(Y); - if (l && this.drawLabel(n, { x: Ee.x, y: Ee.y }, Ee.angle, De, i, s, d, h), T) { - var Ie, Ye, ot = g.position, mt = ot === void 0 ? [0, 0] : ot, wt = g.url, Mt = g.size, Dt = DB(Mt === void 0 ? 1 : Mt), vt = [(Ie = mt[0]) !== null && Ie !== void 0 ? Ie : 0, (Ye = mt[1]) !== null && Ye !== void 0 ? Ye : 0], tt = kB(vt, De, Dt), _e = tt.widthAlign, Ue = tt.heightAlign, Qe = O ? (Ne = Ee.angle + p, Ce = r2(f.rings), { x: Math.cos(Ne) * Ce, y: Math.sin(Ne) * Ce }) : { x: 0, y: 0 }, Ze = mt[1] < 0 ? -1 : 1, nt = Qe.x * Ze, It = Qe.y * Ze, ct = Dt / 2; + var Ee = Xq(Y, a, o, c, O, P, S === "bottom" ? "bottom" : "top"), Me = aG(Y); + if (l && this.drawLabel(n, { x: Ee.x, y: Ee.y }, Ee.angle, Me, i, s, d, h), T) { + var Ie, Ye, ot = g.position, mt = ot === void 0 ? [0, 0] : ot, wt = g.url, Mt = g.size, Dt = DB(Mt === void 0 ? 1 : Mt), vt = [(Ie = mt[0]) !== null && Ie !== void 0 ? Ie : 0, (Ye = mt[1]) !== null && Ye !== void 0 ? Ye : 0], tt = kB(vt, Me, Dt), _e = tt.widthAlign, Ue = tt.heightAlign, Qe = O ? (Ne = Ee.angle + p, Ce = r2(f.rings), { x: Math.cos(Ne) * Ce, y: Math.sin(Ne) * Ce }) : { x: 0, y: 0 }, Ze = mt[1] < 0 ? -1 : 1, nt = Qe.x * Ze, It = Qe.y * Ze, ct = Dt / 2; n.translate(Ee.x, Ee.y), n.rotate(Ee.angle); var Lt = -ct + nt + _e, Rt = -ct + It + Ue; n.drawImage(u.getImage(wt), Lt, Rt, Dt, Dt), n.rotate(-Ee.angle), n.translate(-Ee.x, -Ee.y); @@ -75756,19 +75768,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } n.restore(); } }, { key: "renderSelfArrow", value: function(n, i, a, o, s, u, l, c) { - var f = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : EB, d = i.overlayIcon, h = i.selected, p = i.width, g = i.hovered, y = i.disabled, b = i.color, _ = t2(i, a, o), m = _.startPoint, x = _.endPoint, S = _.apexPoint, O = _.control1Point, E = _.control2Point, T = l.rings, P = l.shadow, I = $n(), k = T[0].color, L = T[1].color, B = T[0].width * I, j = T[1].width * I, z = 40 * I, H = (p ?? 1) * I, q = !this.disableArrowShadow && u, W = H > 1 ? H / 2 : 1, $ = 9 * W, J = 2 * W, X = 7 * W, Q = h === !0, ue = y === !0, re = d !== void 0, ne = Math.atan2(x.y - E.y, x.x - E.x), le = Q ? B * Math.sqrt(1 + 2 * $ / X * (2 * $ / X)) : 0, ce = { x: x.x - Math.cos(ne) * (0.5 * $ - J + le), y: x.y - Math.sin(ne) * (0.5 * $ - J + le) }, pe = { headPosition: { x: x.x + Math.cos(ne) * (0.5 * $ - J - le), y: x.y + Math.sin(ne) * (0.5 * $ - J - le) }, headAngle: ne, headHeight: $, headChinHeight: J, headWidth: X }; - if (n.save(), n.lineCap = "round", Q && (q && this.enableShadow(n, P), n.lineWidth = H + j, n.strokeStyle = L, this.drawLoop(n, m, ce, S, O, E), op(n, j, L, pe, !1, !0), q && this.disableShadow(n), n.lineWidth = H + B, n.strokeStyle = k, this.drawLoop(n, m, ce, S, O, E), op(n, B, k, pe, !1, !0)), n.lineWidth = H, g === !0 && !Q && !ue) { + var f = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : EB, d = i.overlayIcon, h = i.selected, p = i.width, g = i.hovered, y = i.disabled, b = i.color, _ = t2(i, a, o), m = _.startPoint, x = _.endPoint, S = _.apexPoint, O = _.control1Point, E = _.control2Point, T = l.rings, P = l.shadow, I = $n(), k = T[0].color, L = T[1].color, B = T[0].width * I, j = T[1].width * I, z = 40 * I, H = (p ?? 1) * I, q = !this.disableArrowShadow && u, W = H > 1 ? H / 2 : 1, $ = 9 * W, J = 2 * W, X = 7 * W, Z = h === !0, ue = y === !0, re = d !== void 0, ne = Math.atan2(x.y - E.y, x.x - E.x), le = Z ? B * Math.sqrt(1 + 2 * $ / X * (2 * $ / X)) : 0, ce = { x: x.x - Math.cos(ne) * (0.5 * $ - J + le), y: x.y - Math.sin(ne) * (0.5 * $ - J + le) }, pe = { headPosition: { x: x.x + Math.cos(ne) * (0.5 * $ - J - le), y: x.y + Math.sin(ne) * (0.5 * $ - J - le) }, headAngle: ne, headHeight: $, headChinHeight: J, headWidth: X }; + if (n.save(), n.lineCap = "round", Z && (q && this.enableShadow(n, P), n.lineWidth = H + j, n.strokeStyle = L, this.drawLoop(n, m, ce, S, O, E), op(n, j, L, pe, !1, !0), q && this.disableShadow(n), n.lineWidth = H + B, n.strokeStyle = k, this.drawLoop(n, m, ce, S, O, E), op(n, B, k, pe, !1, !0)), n.lineWidth = H, g === !0 && !Z && !ue) { var fe = P.color; q && this.enableShadow(n, P), n.strokeStyle = fe, n.fillStyle = fe, this.drawLoop(n, m, ce, S, O, E), op(n, H, fe, pe), q && this.disableShadow(n); } var se = ue ? c.color : b ?? f; if (n.fillStyle = se, n.strokeStyle = se, this.drawLoop(n, m, ce, S, O, E), op(n, H, se, pe), u || re) { - var de, ge = o.indexOf(i), Oe = (de = o.angles[ge]) !== null && de !== void 0 ? de : 0, ke = Yq(S, Oe, x, E, Q, T, p), Me = ke.x, Ne = ke.y, Ce = ke.angle, Y = ke.flip; - if (u && this.drawLabel(n, { x: Me, y: Ne }, Ce, z, i, o, c, f, Y), re) { - var Z, ie, we = d.position, Ee = we === void 0 ? [0, 0] : we, De = d.url, Ie = d.size, Ye = DB(Ie === void 0 ? 1 : Ie), ot = [(Z = Ee[0]) !== null && Z !== void 0 ? Z : 0, (ie = Ee[1]) !== null && ie !== void 0 ? ie : 0], mt = kB(ot, z, Ye), wt = mt.widthAlign, Mt = mt.heightAlign + (Q ? r2(l.rings) : 0) * (Ee[1] < 0 ? -1 : 1); - n.save(), n.translate(Me, Ne), Y ? (n.rotate(Ce - Math.PI), n.translate(2 * -wt, 2 * -Mt)) : n.rotate(Ce); + var de, ge = o.indexOf(i), Oe = (de = o.angles[ge]) !== null && de !== void 0 ? de : 0, ke = Yq(S, Oe, x, E, Z, T, p), De = ke.x, Ne = ke.y, Ce = ke.angle, Y = ke.flip; + if (u && this.drawLabel(n, { x: De, y: Ne }, Ce, z, i, o, c, f, Y), re) { + var Q, ie, we = d.position, Ee = we === void 0 ? [0, 0] : we, Me = d.url, Ie = d.size, Ye = DB(Ie === void 0 ? 1 : Ie), ot = [(Q = Ee[0]) !== null && Q !== void 0 ? Q : 0, (ie = Ee[1]) !== null && ie !== void 0 ? ie : 0], mt = kB(ot, z, Ye), wt = mt.widthAlign, Mt = mt.heightAlign + (Z ? r2(l.rings) : 0) * (Ee[1] < 0 ? -1 : 1); + n.save(), n.translate(De, Ne), Y ? (n.rotate(Ce - Math.PI), n.translate(2 * -wt, 2 * -Mt)) : n.rotate(Ce); var Dt = Ye / 2, vt = -Dt + wt, tt = -Dt + Mt; - n.drawImage(s.getImage(De), vt, tt, Ye, Ye), n.restore(); + n.drawImage(s.getImage(Me), vt, tt, Ye, Ye), n.restore(); } } n.restore(); @@ -75835,16 +75847,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho var L = arguments.length > 6 && arguments[6] !== void 0 && arguments[6]; if (!N1(T, P)) return 1 / 0; var B = T === P ? (function(j, z, H, q) { - var W = t2(z, H, q), $ = W.startPoint, J = W.endPoint, X = W.apexPoint, Q = W.control1Point, ue = W.control2Point, re = PP($, X, Q, j), ne = PP(X, J, ue, j); + var W = t2(z, H, q), $ = W.startPoint, J = W.endPoint, X = W.apexPoint, Z = W.control1Point, ue = W.control2Point, re = RP($, X, Z, j), ne = RP(X, J, ue, j); return Math.min(re, ne); })(O, E, T, I) : (function(j, z, H, q, W, $, J) { - var X = n2(z, H, q, W, $, J), Q = 1 / 0; - if (J && X.length === 3) Q = PP(X[0], X[2], X[1], j); + var X = n2(z, H, q, W, $, J), Z = 1 / 0; + if (J && X.length === 3) Z = RP(X[0], X[2], X[1], j); else for (var ue = 1; ue < X.length; ue++) { var re = X[ue - 1], ne = X[ue], le = YD(re, ne, j); - Q = le < Q ? le : Q; + Z = le < Z ? le : Z; } - return Q; + return Z; })(O, E, I, T, P, k, L); return B; })(n, y, _, m, b, h, d !== Zx); @@ -75888,7 +75900,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } return S; } - })(d, h) || c5(d, h) || (function() { + })(d, h) || l5(d, h) || (function() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); })(); @@ -75903,7 +75915,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } }, { key: "zoomAndPan", value: function(n, i) { var a = i.width, o = i.height, s = this.state, u = s.zoom, l = s.panX, c = s.panY; n.translate(-a / 2 * u, -o / 2 * u), n.translate(-l * u, -c * u), n.scale(u, u), n.translate(a / 2 / u, o / 2 / u), n.translate(a / 2, o / 2); - } }], t && Lse(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }], t && jse(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; })(); function HB(r, e) { @@ -75911,7 +75923,7 @@ function HB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -var Bse = function(r, e) { +var Fse = function(r, e) { e.includes("bold") && e.includes("italic") ? (r.setAttribute("font-weight", "bold"), r.setAttribute("font-style", "italic")) : e.includes("bold") ? r.setAttribute("font-weight", "bold") : e.includes("italic") && r.setAttribute("font-style", "italic"), e.includes("underline") && r.setAttribute("text-decoration", "underline"); }, WB = function(r, e, t, n) { for (var i = [], a = "".concat(r.tip.x, ",").concat(r.tip.y, " ").concat(r.base1.x, ",").concat(r.base1.y, " ").concat(r.base2.x, ",").concat(r.base2.y), o = t.length - 1; o >= 0; o--) { @@ -75920,7 +75932,7 @@ var Bse = function(r, e) { } var l = document.createElementNS("http://www.w3.org/2000/svg", "polygon"); return l.setAttribute("points", a), l.setAttribute("fill", e), i.push(l), i; -}, IP = function(r) { +}, kP = function(r) { var e = r.x, t = r.y, n = r.fontSize, i = r.fontFace, a = r.fontColor, o = r.textAnchor, s = r.dominantBaseline, u = r.lineSpans, l = r.transform, c = r.fontWeight, f = document.createElementNS("http://www.w3.org/2000/svg", "text"); f.setAttribute("x", String(e)), f.setAttribute("y", String(t)), f.setAttribute("text-anchor", o), f.setAttribute("dominant-baseline", s), f.setAttribute("font-size", String(n)), f.setAttribute("font-family", i), f.setAttribute("fill", a), l && f.setAttribute("transform", l), c && f.setAttribute("font-weight", c); var d, h = (function(y, b) { @@ -75964,7 +75976,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho try { for (h.s(); !(d = h.n()).done; ) { var p = d.value, g = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - g.textContent = p.text, Bse(g, p.style), f.appendChild(g); + g.textContent = p.text, Fse(g, p.style), f.appendChild(g); } } catch (y) { h.e(y); @@ -75982,7 +75994,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }, XB = function(r, e, t, n) { var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.3333333333333333, a = Math.atan2(e.y - r.y, e.x - r.x), o = { x: e.x + Math.cos(a) * (t * i), y: e.y + Math.sin(a) * (t * i) }; return { tip: o, base1: { x: o.x - t * Math.cos(a) + n / 2 * Math.sin(a), y: o.y - t * Math.sin(a) - n / 2 * Math.cos(a) }, base2: { x: o.x - t * Math.cos(a) - n / 2 * Math.sin(a), y: o.y - t * Math.sin(a) + n / 2 * Math.cos(a) }, angle: a }; -}, NP = function(r, e, t) { +}, IP = function(r, e, t) { for (var n = [], i = "", a = "", o = "", s = t, u = 0; u < r.length; u++) { var l, c = r[u], f = ((l = e[s]) !== null && l !== void 0 ? l : []).sort().join(","); u === 0 || f !== i ? (a.length > 0 && n.push({ text: a, style: o }), a = c, o = f, i = f) : a += c, s += 1; @@ -76015,14 +76027,14 @@ function jw(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? KB(Object(t), !0).forEach(function(n) { - y5(r, n, t[n]); + g5(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : KB(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function LP(r, e) { +function NP(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = dG(r)) || e) { @@ -76056,17 +76068,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function dG(r, e) { if (r) { - if (typeof r == "string") return v5(r, e); + if (typeof r == "string") return h5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? v5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? h5(r, e) : void 0; } } -function v5(r, e) { +function h5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Fse(r, e) { +function Use(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, vG(n.key), n); @@ -76083,13 +76095,13 @@ function hG() { })(); } function ZB(r, e, t, n) { - var i = p5(Wm(r.prototype), e, t); + var i = v5(Wm(r.prototype), e, t); return typeof i == "function" ? function(a) { return i.apply(t, a); } : i; } -function p5() { - return p5 = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { +function v5() { + return v5 = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(r, e, t) { var n = (function(a, o) { for (; !{}.hasOwnProperty.call(a, o) && (a = Wm(a)) !== null; ) ; return a; @@ -76098,19 +76110,19 @@ function p5() { var i = Object.getOwnPropertyDescriptor(n, e); return i.get ? i.get.call(arguments.length < 3 ? r : t) : i.value; } - }, p5.apply(null, arguments); + }, v5.apply(null, arguments); } function Wm(r) { return Wm = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Wm(r); } -function g5(r, e) { - return g5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { +function p5(r, e) { + return p5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) { return t.__proto__ = n, t; - }, g5(r, e); + }, p5(r, e); } -function y5(r, e, t) { +function g5(r, e, t) { return (e = vG(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } function vG(r) { @@ -76126,12 +76138,12 @@ function vG(r) { })(r); return km(e) == "symbol" ? e : e + ""; } -var jP = "svgRenderer", Use = (function() { +var LP = "svgRenderer", zse = (function() { function r(n, i) { var a, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; (function(u, l) { if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function"); - })(this, r), y5(a = (function(u, l, c) { + })(this, r), g5(a = (function(u, l, c) { return l = Wm(l), (function(f, d) { if (d && (km(d) == "object" || typeof d == "function")) return d; if (d !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); @@ -76140,13 +76152,13 @@ var jP = "svgRenderer", Use = (function() { return h; })(f); })(u, hG() ? Reflect.construct(l, c || [], Wm(u).constructor) : l.apply(u, c)); - })(this, r, [i, jP, o]), "svg", void 0), y5(a, "measurementContext", void 0), a.svg = n; + })(this, r, [i, LP, o]), "svg", void 0), g5(a, "measurementContext", void 0), a.svg = n; var s = document.createElement("canvas"); - return a.measurementContext = s.getContext("2d"), i.nodes.addChannel(jP), i.rels.addChannel(jP), a; + return a.measurementContext = s.getContext("2d"), i.nodes.addChannel(LP), i.rels.addChannel(LP), a; } return (function(n, i) { if (typeof i != "function" && i !== null) throw new TypeError("Super expression must either be null or a function"); - n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && g5(n, i); + n.prototype = Object.create(i && i.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), i && p5(n, i); })(r, nG), e = r, t = [{ key: "render", value: function(n, i) { var a, o, s, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = this.state, c = this.arrowBundler, f = l.layout, d = l.zoom, h = l.panX, p = l.panY, g = l.nodes.idToPosition, y = (a = u.svg) !== null && a !== void 0 ? a : this.svg, b = y.clientWidth || ((o = y.width) === null || o === void 0 || (o = o.baseVal) === null || o === void 0 ? void 0 : o.value) || parseInt(y.getAttribute("width"), 10) || 500, _ = y.clientHeight || ((s = y.height) === null || s === void 0 || (s = s.baseVal) === null || s === void 0 ? void 0 : s.value) || parseInt(y.getAttribute("height"), 10) || 500, m = d, x = h, S = p; for (i && (m = 1, x = i.centerX, S = i.centerY); y.firstChild; ) y.removeChild(y.firstChild); @@ -76162,11 +76174,11 @@ var jP = "svgRenderer", Use = (function() { var P = ZB(r, "getNodesToRender", this)([n]); this.renderNodes(P, E, m), y.appendChild(E), this.needsRun = !1; } }, { key: "renderNodes", value: function(n, i, a) { - var o, s = this, u = this.state, l = u.nodes.idToItem, c = u.disabledItemStyles, f = u.defaultNodeColor, d = u.nodeBorderStyles, h = LP(n); + var o, s = this, u = this.state, l = u.nodes.idToItem, c = u.disabledItemStyles, f = u.defaultNodeColor, d = u.nodeBorderStyles, h = NP(n); try { var p = function() { var g, y, b, _, m = o.value, x = jw(jw({}, l[m.id]), m); - if (!a5(x)) return 1; + if (!i5(x)) return 1; var S = document.createElementNS("http://www.w3.org/2000/svg", "g"); S.setAttribute("class", "node"), S.setAttribute("data-id", x.id); var O = $n(), E = (x.selected ? d.selected.rings : d.default.rings).map(function(Rt) { @@ -76181,7 +76193,7 @@ var jP = "svgRenderer", Use = (function() { P.setAttribute("cx", String((g = x.x) !== null && g !== void 0 ? g : 0)), P.setAttribute("cy", String((y = x.y) !== null && y !== void 0 ? y : 0)), P.setAttribute("r", String(T)); var I = x.disabled ? c.color : x.color || f; if (P.setAttribute("fill", I), S.appendChild(P), E.length > 0) { - var k, L = T, B = LP(E); + var k, L = T, B = NP(E); try { for (B.s(); !(k = B.n()).done; ) { var j = k.value; @@ -76198,23 +76210,23 @@ var jP = "svgRenderer", Use = (function() { B.f(); } } - var W = x.icon, $ = x.overlayIcon, J = T, X = 2 * J, Q = XD(J, a), ue = Q.nodeInfoLevel, re = Q.iconInfoLevel, ne = !!(!((b = x.captions) === null || b === void 0) && b.length || !((_ = x.caption) === null || _ === void 0) && _.length); + var W = x.icon, $ = x.overlayIcon, J = T, X = 2 * J, Z = XD(J, a), ue = Z.nodeInfoLevel, re = Z.iconInfoLevel, ne = !!(!((b = x.captions) === null || b === void 0) && b.length || !((_ = x.caption) === null || _ === void 0) && _.length); if (W) { - var le, ce = Qq(J, ne, re, ue), pe = Jq(ce, ne, (le = x.captionAlign) !== null && le !== void 0 ? le : "center", re, ue), fe = pe.iconXPos, se = pe.iconYPos, de = r5(I) === "#ffffff", ge = s.imageCache.getImage(W, de), Oe = $B({ nodeX: x.x, nodeY: x.y, iconXPos: fe, iconYPos: se, iconSize: ce, image: ge, isDisabled: x.disabled === !0 }); + var le, ce = Qq(J, ne, re, ue), pe = Jq(ce, ne, (le = x.captionAlign) !== null && le !== void 0 ? le : "center", re, ue), fe = pe.iconXPos, se = pe.iconYPos, de = t5(I) === "#ffffff", ge = s.imageCache.getImage(W, de), Oe = $B({ nodeX: x.x, nodeY: x.y, iconXPos: fe, iconYPos: se, iconSize: ce, image: ge, isDisabled: x.disabled === !0 }); S.appendChild(Oe); } if ($ !== void 0) { - var ke, Me, Ne, Ce, Y = eG(X, (ke = $.size) !== null && ke !== void 0 ? ke : 1), Z = (Me = $.position) !== null && Me !== void 0 ? Me : [0, 0], ie = [(Ne = Z[0]) !== null && Ne !== void 0 ? Ne : 0, (Ce = Z[1]) !== null && Ce !== void 0 ? Ce : 0], we = tG(Y, J, ie), Ee = we.iconXPos, De = we.iconYPos, Ie = s.imageCache.getImage($.url), Ye = $B({ nodeX: x.x, nodeY: x.y, iconXPos: Ee, iconYPos: De, iconSize: Y, image: Ie, isDisabled: x.disabled === !0 }); + var ke, De, Ne, Ce, Y = eG(X, (ke = $.size) !== null && ke !== void 0 ? ke : 1), Q = (De = $.position) !== null && De !== void 0 ? De : [0, 0], ie = [(Ne = Q[0]) !== null && Ne !== void 0 ? Ne : 0, (Ce = Q[1]) !== null && Ce !== void 0 ? Ce : 0], we = tG(Y, J, ie), Ee = we.iconXPos, Me = we.iconYPos, Ie = s.imageCache.getImage($.url), Ye = $B({ nodeX: x.x, nodeY: x.y, iconXPos: Ee, iconYPos: Me, iconSize: Y, image: Ie, isDisabled: x.disabled === !0 }); S.appendChild(Ye); } var ot = oG(x, a); if (ot.hasContent) { - var mt = ot.lines, wt = ot.stylesPerChar, Mt = ot.fontSize, Dt = ot.fontFace, vt = ot.yPos, tt = r5(x.color || f); + var mt = ot.lines, wt = ot.stylesPerChar, Mt = ot.fontSize, Dt = ot.fontFace, vt = ot.yPos, tt = t5(x.color || f); x.disabled && (tt = c.fontColor); for (var _e = 0, Ue = 0; Ue < mt.length; Ue++) { - var Qe, Ze, nt, It = (Qe = mt[Ue].text) !== null && Qe !== void 0 ? Qe : "", ct = NP(It, wt, _e); + var Qe, Ze, nt, It = (Qe = mt[Ue].text) !== null && Qe !== void 0 ? Qe : "", ct = IP(It, wt, _e); _e += It.length; - var Lt = IP({ x: (Ze = x.x) !== null && Ze !== void 0 ? Ze : 0, y: ((nt = x.y) !== null && nt !== void 0 ? nt : 0) + vt + Ue * Mt, fontSize: Mt, fontFace: Dt, fontColor: tt, textAnchor: "middle", dominantBaseline: "auto", lineSpans: ct }); + var Lt = kP({ x: (Ze = x.x) !== null && Ze !== void 0 ? Ze : 0, y: ((nt = x.y) !== null && nt !== void 0 ? nt : 0) + vt + Ue * Mt, fontSize: Mt, fontFace: Dt, fontColor: tt, textAnchor: "middle", dominantBaseline: "auto", lineSpans: ct }); S.appendChild(Lt); } } @@ -76227,7 +76239,7 @@ var jP = "svgRenderer", Use = (function() { h.f(); } } }, { key: "renderRelationships", value: function(n, i, a) { - var o, s = this, u = this.arrowBundler, l = this.state, c = l.disabledItemStyles, f = l.defaultRelationshipColor, d = l.relationshipBorderStyles, h = $n(), p = LP(n); + var o, s = this, u = this.arrowBundler, l = this.state, c = l.disabledItemStyles, f = l.defaultRelationshipColor, d = l.relationshipBorderStyles, h = $n(), p = NP(n); try { var g = function() { var y = o.value; @@ -76247,20 +76259,20 @@ var jP = "svgRenderer", Use = (function() { if (WB(q, W, H, h).forEach(function(Bt) { return i.appendChild(Bt); }), P && (y.captions && y.captions.length > 0 || y.caption && y.caption.length > 0)) { - var $, J = $n(), X = y.selected === !0, Q = X ? d.selected.rings : d.default.rings, ue = Yq(B.apexPoint, B.angle, B.endPoint, B.control2Point, X, Q, y.width), re = ue.x, ne = ue.y, le = ue.angle, ce = (ue.flip, Jx(y)), pe = ce.length > 0 ? ($ = Qb(ce)) === null || $ === void 0 ? void 0 : $.fullCaption : ""; + var $, J = $n(), X = y.selected === !0, Z = X ? d.selected.rings : d.default.rings, ue = Yq(B.apexPoint, B.angle, B.endPoint, B.control2Point, X, Z, y.width), re = ue.x, ne = ue.y, le = ue.angle, ce = (ue.flip, Jx(y)), pe = ce.length > 0 ? ($ = Qb(ce)) === null || $ === void 0 ? void 0 : $.fullCaption : ""; if (pe) { - var fe, se, de, ge, Oe = 40 * J, ke = (fe = y.captionSize) !== null && fe !== void 0 ? fe : 1, Me = 6 * ke * J, Ne = s5, Ce = y.selected ? "bold" : "normal"; - s.measurementContext.font = "".concat(Ce, " ").concat(Me, "px ").concat(Ne); + var fe, se, de, ge, Oe = 40 * J, ke = (fe = y.captionSize) !== null && fe !== void 0 ? fe : 1, De = 6 * ke * J, Ne = o5, Ce = y.selected ? "bold" : "normal"; + s.measurementContext.font = "".concat(Ce, " ").concat(De, "px ").concat(Ne); var Y = function(Bt) { return s.measurementContext.measureText(Bt).width; - }, Z = pe; - if (Y(Z) > Oe) { - var ie = L1(Z, Y, function() { + }, Q = pe; + if (Y(Q) > Oe) { + var ie = L1(Q, Y, function() { return Oe; }, 1, !1)[0]; - Z = ie.hasEllipsisChar ? "".concat(ie.text, "...") : Z; + Q = ie.hasEllipsisChar ? "".concat(ie.text, "...") : Q; } - var we = y.selected ? hE : 1, Ee = ((se = y.width) !== null && se !== void 0 ? se : 1) * we, De = (1 + ke) * J, Ie = ((de = y.captionAlign) !== null && de !== void 0 ? de : "top") === "bottom" ? Me / 2 + Ee + De : -(Ee + De), Ye = ((ge = Qb(ce)) !== null && ge !== void 0 ? ge : { stylesPerChar: [] }).stylesPerChar, ot = NP(Z, Ye, 0), mt = IP({ x: re, y: ne + Ie, fontSize: Me, fontFace: Ne, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: ot, transform: "rotate(".concat(180 * le / Math.PI, ",").concat(re, ",").concat(ne, ")"), fontWeight: Ce }); + var we = y.selected ? dE : 1, Ee = ((se = y.width) !== null && se !== void 0 ? se : 1) * we, Me = (1 + ke) * J, Ie = ((de = y.captionAlign) !== null && de !== void 0 ? de : "top") === "bottom" ? De / 2 + Ee + Me : -(Ee + Me), Ye = ((ge = Qb(ce)) !== null && ge !== void 0 ? ge : { stylesPerChar: [] }).stylesPerChar, ot = IP(Q, Ye, 0), mt = kP({ x: re, y: ne + Ie, fontSize: De, fontFace: Ne, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: ot, transform: "rotate(".concat(180 * le / Math.PI, ",").concat(re, ",").concat(ne, ")"), fontWeight: Ce }); i.appendChild(mt); } } @@ -76272,7 +76284,7 @@ var jP = "svgRenderer", Use = (function() { } var Rt = (function(Bt) { return (function(hr) { - if (Array.isArray(hr)) return v5(hr); + if (Array.isArray(hr)) return h5(hr); })(Bt) || (function(hr) { if (typeof Symbol < "u" && hr[Symbol.iterator] != null || hr["@@iterator"] != null) return Array.from(hr); })(Bt) || dG(Bt) || (function() { @@ -76333,7 +76345,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return i.appendChild(Bt); }); } - var mr = Jx(y), ur = (Mt = y.captionSize) !== null && Mt !== void 0 ? Mt : 1, sn = 6 * ur * h, Fr = s5, un = (Dt = Qb(mr)) !== null && Dt !== void 0 ? Dt : { fullCaption: "", stylesPerChar: [] }, bn = un.fullCaption, wn = un.stylesPerChar; + var mr = Jx(y), ur = (Mt = y.captionSize) !== null && Mt !== void 0 ? Mt : 1, sn = 6 * ur * h, Fr = o5, un = (Dt = Qb(mr)) !== null && Dt !== void 0 ? Dt : { fullCaption: "", stylesPerChar: [] }, bn = un.fullCaption, wn = un.stylesPerChar; if (P && bn.length > 0) { var _n; s.measurementContext.font = "bold ".concat(sn, "px ").concat(Fr); @@ -76349,7 +76361,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }, 1, !1)[0]; yn = Jn.hasEllipsisChar ? "".concat(Jn.text, "...") : yn; } - var _i = NP(yn, wn, 0), Ir = (1 + ur) * h, pa = xn === "bottom" ? sn / 2 + k + Ir : -(k + Ir), di = IP({ x: on.x, y: on.y + pa, fontSize: sn, fontFace: Fr, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: _i, transform: "rotate(".concat(fi, ",").concat(on.x, ",").concat(on.y, ")"), fontWeight: y.selected ? "bold" : void 0 }); + var _i = IP(yn, wn, 0), Ir = (1 + ur) * h, pa = xn === "bottom" ? sn / 2 + k + Ir : -(k + Ir), di = kP({ x: on.x, y: on.y + pa, fontSize: sn, fontFace: Fr, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: _i, transform: "rotate(".concat(fi, ",").concat(on.x, ",").concat(on.y, ")"), fontWeight: y.selected ? "bold" : void 0 }); i.appendChild(di); } } @@ -76363,7 +76375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } }, { key: "getSvgTransform", value: function(n, i, a, o, s) { var u = i / 2; return "translate(".concat(n / 2, ",").concat(u, ") scale(").concat(a, ") translate(").concat(-o, ",").concat(-s, ")"); - } }], t && Fse(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; + } }], t && Use(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; var e, t; })(), pG = function(r, e) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, a = (function(o, s) { @@ -76383,14 +76395,14 @@ function t1(r) { function gG(r, e) { if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function"); } -function zse(r, e) { +function qse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, mG(n.key), n); } } function yG(r, e, t) { - return e && zse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + return e && qse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; } function Nf(r, e, t) { return (e = mG(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; @@ -76408,7 +76420,7 @@ function mG(r) { })(r); return t1(e) == "symbol" ? e : e + ""; } -var Mf = "WebGLRenderer", qse = (function() { +var Mf = "WebGLRenderer", Gse = (function() { return yG(function r(e) { var t = this; if (gG(this, r), Nf(this, "mainSceneRenderer", void 0), Nf(this, "minimapRenderer", void 0), Nf(this, "needsRun", void 0), Nf(this, "minimapMouseDown", void 0), Nf(this, "stateDisposers", void 0), Nf(this, "state", void 0), e.state === void 0) throw new Error("Renderer missing options: state - state object"); @@ -76467,7 +76479,7 @@ var Mf = "WebGLRenderer", qse = (function() { r(); }), this.state.nodes.removeChannel(Mf), this.state.rels.removeChannel(Mf), this.mainSceneRenderer.destroy(), this.minimapRenderer.destroy(); } }]); -})(), Gse = (function() { +})(), Vse = (function() { return yG(function r() { gG(this, r), Nf(this, "mainSceneRenderer", void 0), Nf(this, "minimapRenderer", void 0), Nf(this, "needsRun", void 0), Nf(this, "minimapMouseDown", void 0), Nf(this, "stateDisposers", void 0), Nf(this, "state", void 0); }, [{ key: "renderMainScene", value: function(r) { @@ -76491,7 +76503,7 @@ function r1(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, r1(r); } -function BP(r, e) { +function jP(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = (function(u, l) { @@ -76534,7 +76546,7 @@ function QB(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function Vse(r, e) { +function Hse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, bG(n.key), n); @@ -76804,12 +76816,12 @@ void main(void) { var b = Iw(d), _ = Iw(h), m = Iw(y); this.nodeShader.setUniform("u_selectedBorderColor", b), this.nodeShader.setUniform("u_selectedInnerBorderColor", _), this.nodeShader.setUniform("u_shadowColor", m); } }, { key: "setData", value: function(t) { - var n = FM(t.rels, this.disableRelColor); + var n = BM(t.rels, this.disableRelColor); this.setupNodeRendering(t.nodes), this.setupRelationshipRendering(n); } }, { key: "render", value: function(t) { var n = this.gl, i = this.idToIndex, a = this.posBuffer, o = this.posTexture; if (this.numNodes !== 0 || this.numRels !== 0) { - var s, u = BP(t); + var s, u = jP(t); try { for (u.s(); !(s = u.n()).done; ) { var l = s.value, c = i[l.id]; @@ -76826,7 +76838,7 @@ void main(void) { var t = this.gl, n = this.projection, i = this.viewportBoxBuffer; this.viewportBoxShader.use(), this.viewportBoxShader.setUniform("u_projection", n), t.bindBuffer(t.ARRAY_BUFFER, i), this.viewportBoxShader.setAttributePointerFloat("coordinates", 2, 0, 0), t.drawArrays(t.LINES, 0, 8); } }, { key: "updateNodes", value: function(t) { - var n, i = this.gl, a = this.idToIndex, o = this.disableNodeColor, s = this.nodeBuffer, u = this.nodeDataByte, l = !1, c = BP(t); + var n, i = this.gl, a = this.idToIndex, o = this.disableNodeColor, s = this.nodeBuffer, u = this.nodeDataByte, l = !1, c = jP(t); try { for (c.s(); !(n = c.n()).done; ) { var f = n.value, d = a[f.id]; @@ -76854,7 +76866,7 @@ void main(void) { } l && (i.bindBuffer(i.ARRAY_BUFFER, s), i.bufferData(i.ARRAY_BUFFER, u, i.DYNAMIC_DRAW)); } }, { key: "updateRelationships", value: function(t) { - var n, i = FM(t, this.disableRelColor), a = this.gl, o = !1, s = BP(i); + var n, i = BM(t, this.disableRelColor), a = this.gl, o = !1, s = jP(i); try { for (s.s(); !(n = s.n()).done; ) { var u = n.value, l = u.key, c = u.width, f = u.color, d = u.disabled, h = this.relIdToIndex[l], p = (0, Hi.isNil)(f) ? this.defaultRelColor : f, g = kw(d ? this.disableRelColor : p); @@ -76873,8 +76885,8 @@ void main(void) { var s = this.gl, u = $n(), l = a * u, c = o * u, f = (0.5 * l + n * t) / t, d = (0.5 * c + i * t) / t, h = (0.5 * -l + n * t) / t, p = (0.5 * -c + i * t) / t, g = [f, d, h, d, h, d, h, p, h, p, f, p, f, p, f, d]; s.bindBuffer(s.ARRAY_BUFFER, this.viewportBoxBuffer), s.bufferData(s.ARRAY_BUFFER, new Float32Array(g), s.DYNAMIC_DRAW); } }, { key: "updateViewport", value: function(t, n, i) { - var a = this.gl, o = 1 / t, s = n - a.drawingBufferWidth * o * 0.5, u = i - a.drawingBufferHeight * o * 0.5, l = a.drawingBufferWidth * o, c = a.drawingBufferHeight * o, f = Kx(), d = qae * $n(); - $M(f, s, s + l, u + c, u, 0, 1e6), this.nodeShader.use(), this.nodeShader.setUniform("u_zoom", t), this.nodeShader.setUniform("u_glAdjust", d), this.nodeShader.setUniform("u_projection", f), this.nodeAnimShader.use(), this.nodeAnimShader.setUniform("u_zoom", t), this.nodeAnimShader.setUniform("u_glAdjust", d), this.nodeAnimShader.setUniform("u_projection", f), this.relShader.use(), this.relShader.setUniform("u_glAdjust", d), this.relShader.setUniform("u_projection", f), this.projection = f; + var a = this.gl, o = 1 / t, s = n - a.drawingBufferWidth * o * 0.5, u = i - a.drawingBufferHeight * o * 0.5, l = a.drawingBufferWidth * o, c = a.drawingBufferHeight * o, f = Kx(), d = Gae * $n(); + XM(f, s, s + l, u + c, u, 0, 1e6), this.nodeShader.use(), this.nodeShader.setUniform("u_zoom", t), this.nodeShader.setUniform("u_glAdjust", d), this.nodeShader.setUniform("u_projection", f), this.nodeAnimShader.use(), this.nodeAnimShader.setUniform("u_zoom", t), this.nodeAnimShader.setUniform("u_glAdjust", d), this.nodeAnimShader.setUniform("u_projection", f), this.relShader.use(), this.relShader.setUniform("u_glAdjust", d), this.relShader.setUniform("u_projection", f), this.projection = f; } }, { key: "setupViewportRendering", value: function() { var t, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qD; this.viewportBoxBuffer = this.gl.createBuffer(), this.viewportBoxShader.use(), this.viewportBoxShader.setUniform("u_minimapViewportBoxColor", [(t = I1(n))[0] / 255, t[1] / 255, t[2] / 255, t[3]]); @@ -76894,10 +76906,10 @@ void main(void) { for (var l = new ArrayBuffer(t.length * nu * 4), c = new Uint32Array(l), f = new Float32Array(l), d = function(p) { var g = t[p], y = g.from, b = g.to, _ = g.color, m = g.width, x = m === void 0 ? 1 : m, S = g.key, O = g.disabled, E = n.idToIndex[y], T = n.idToIndex[b], P = E % Cr, I = Math.floor(E / Cr), k = T % Cr, L = Math.floor(T / Cr), B = [P, I, k, L], j = [k, L, P, I], z = (0, Hi.isNil)(_) ? n.defaultRelColor : _, H = kw(O ? n.disableRelColor : z); u[S] = p; - var q = 0, W = function($, J, X, Q) { + var q = 0, W = function($, J, X, Z) { c[p * nu + q] = $, q += 1; for (var ue = 0; ue < J.length; ue++) s[ue] = J[ue]; - c[p * nu + q] = o[0], q += 1, s[0] = X, c[p * nu + q] = o[0], f[p * nu + (q += 1)] = Q, q += 1; + c[p * nu + q] = o[0], q += 1, s[0] = X, c[p * nu + q] = o[0], f[p * nu + (q += 1)] = Z, q += 1; }; W(H, B, 255, x), W(H, j, 0, x), W(H, B, 0, x), W(H, j, 0, x), W(H, B, 0, x), W(H, j, 255, x); }, h = 0; h < t.length; h++) d(h); @@ -76907,12 +76919,12 @@ void main(void) { this.nodeAnimShader.use(), this.nodeAnimShader.setUniform("u_positions", t), this.nodeAnimShader.setUniform("u_animPos", o), this.vaoExt.bindVertexArrayOES(this.nodeAnimVao), n.drawArrays(n.POINTS, 0, i), this.vaoExt.bindVertexArrayOES(null); } }, { key: "destroy", value: function() { this.gl.deleteBuffer(this.nodeBuffer), this.gl.deleteBuffer(this.relBuffer), this.vaoExt.deleteVertexArrayOES(this.nodeVao), this.vaoExt.deleteVertexArrayOES(this.relVao), this.vaoExt.deleteVertexArrayOES(this.nodeAnimVao), this.nodeShader.remove(), this.nodeAnimShader.remove(), this.relShader.remove(); - } }], e && Vse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Hse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function Bw(r) { return (function(e) { - if (Array.isArray(e)) return b5(e); + if (Array.isArray(e)) return m5(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || _G(r) || (function() { @@ -76920,7 +76932,7 @@ function Bw(r) { In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); })(); } -function m5(r, e) { +function y5(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _G(r)) || e) { @@ -76954,17 +76966,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } function _G(r, e) { if (r) { - if (typeof r == "string") return b5(r, e); + if (typeof r == "string") return m5(r, e); var t = {}.toString.call(r).slice(8, -1); - return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? b5(r, e) : void 0; + return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? m5(r, e) : void 0; } } -function b5(r, e) { +function m5(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -var Hse = ha * $n(); +var Wse = ha * $n(); function n1(r) { return n1 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -76986,14 +76998,14 @@ function Fw(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? e9(Object(t), !0).forEach(function(n) { - Wse(r, n, t[n]); + Yse(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : e9(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function Wse(r, e, t) { +function Yse(r, e, t) { return (e = (function(n) { var i = (function(a) { if (n1(a) != "object" || !a) return a; @@ -77012,7 +77024,7 @@ var i1 = function() { for (var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 50, t = { minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 }, n = 0; n < r.length; n++) t.minX > r[n].x && (t.minX = r[n].x), t.minY > r[n].y && (t.minY = r[n].y), t.maxX < r[n].x && (t.maxX = r[n].x), t.maxY < r[n].y && (t.maxY = r[n].y); var i = (t.minX + t.maxX) / 2, a = (t.minY + t.maxY) / 2, o = 2 * e, s = $n() * o; return { centerX: i, centerY: a, nodesWidth: t.maxX - t.minX + o + s, nodesHeight: t.maxY - t.minY + o + s }; -}, _5 = function(r, e, t, n) { +}, b5 = function(r, e, t, n) { var i = 1 / 0, a = 1 / 0; return r > 1 && (i = t / r), e > 1 && (a = n / e), { zoomX: i, zoomY: a }; }, wG = function(r, e) { @@ -77020,7 +77032,7 @@ var i1 = function() { return Math.min(n, Math.max(t, i)); }, a1 = function(r, e, t, n) { return Math.max(Math.min(e, t), Math.min(r, n)); -}, FP = function(r, e, t, n, i, a) { +}, BP = function(r, e, t, n, i, a) { var o = e; return (function(s, u, l) { return s < u && s < l; @@ -77044,7 +77056,7 @@ function o1(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, o1(r); } -function Yse(r, e) { +function Xse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, xG(n.key), n); @@ -77063,7 +77075,7 @@ function xG(r) { })(r); return o1(e) == "symbol" ? e : e + ""; } -var Xse = (function() { +var $se = (function() { return r = function t() { var n, i, a; (function(o, s) { @@ -77075,12 +77087,12 @@ var Xse = (function() { return this.callbacks[t] !== void 0; } }, { key: "callIfRegistered", value: function() { var t, n = arguments, i = Array.prototype.slice.call(arguments)[0]; - t = i, Fae.includes(t) && this.isCallbackRegistered(i) && this.callbacks[i].slice(0).forEach(function(a) { + t = i, Uae.includes(t) && this.isCallbackRegistered(i) && this.callbacks[i].slice(0).forEach(function(a) { return a.apply(null, Array.prototype.slice.call(n, 1)); }); - } }], e && Yse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && Xse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; -})(), $se = io(481), UP = io.n($se); +})(), Kse = io(481), FP = io.n(Kse); function s1(r) { return s1 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; @@ -77088,7 +77100,7 @@ function s1(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, s1(r); } -function Kse(r, e) { +function Zse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, EG(n.key), n); @@ -77110,12 +77122,12 @@ function EG(r) { })(r); return s1(e) == "symbol" ? e : e + ""; } -var t9 = 5e-5, Zse = (function() { +var t9 = 5e-5, Qse = (function() { return r = function t(n) { var i, a = this, o = n.state, s = n.getNodePositions, u = n.canvas; (function(l, c) { if (!(l instanceof c)) throw new TypeError("Cannot call a class as a function"); - })(this, t), sp(this, "xCtrl", void 0), sp(this, "yCtrl", void 0), sp(this, "zoomCtrl", void 0), sp(this, "getNodePositions", void 0), sp(this, "firstUpdate", void 0), sp(this, "state", void 0), sp(this, "canvas", void 0), sp(this, "stateDisposers", void 0), this.state = o, this.getNodePositions = s, this.canvas = u, this.xCtrl = new (UP())(0.35, t9, 0.05, 1), this.yCtrl = new (UP())(0.35, t9, 0.05, 1), this.zoomCtrl = new (UP())(0.3, 1e-5, 0.01, 1), this.stateDisposers = [], this.stateDisposers.push(o.autorun(function() { + })(this, t), sp(this, "xCtrl", void 0), sp(this, "yCtrl", void 0), sp(this, "zoomCtrl", void 0), sp(this, "getNodePositions", void 0), sp(this, "firstUpdate", void 0), sp(this, "state", void 0), sp(this, "canvas", void 0), sp(this, "stateDisposers", void 0), this.state = o, this.getNodePositions = s, this.canvas = u, this.xCtrl = new (FP())(0.35, t9, 0.05, 1), this.yCtrl = new (FP())(0.35, t9, 0.05, 1), this.zoomCtrl = new (FP())(0.3, 1e-5, 0.01, 1), this.stateDisposers = [], this.stateDisposers.push(o.autorun(function() { o.fitNodeIds === null && (a.xCtrl.reset(), a.yCtrl.reset(), a.zoomCtrl.reset()); })), this.stateDisposers.push(o.autorun(function() { i !== o.fitNodeIds && (i = o.fitNodeIds, a.firstUpdate = !0); @@ -77140,7 +77152,7 @@ var t9 = 5e-5, Zse = (function() { if (isNaN(x) || isNaN(S)) return bi.info("fit() function couldn't calculate center point, not updating viewport"), !1; var T = n.noPan, P = n.outOnly, I = n.minZoom, k = n.maxZoom; o.setTarget(T ? h : x), s.setTarget(T ? p : S); - var L = _5(O, E, i, a), B = L.zoomX, j = L.zoomY; + var L = b5(O, E, i, a), B = L.zoomX, j = L.zoomY; if (B === 1 / 0 && j === 1 / 0) u.setTarget(b); else { var z = wG(B, j, I, k); @@ -77148,7 +77160,7 @@ var t9 = 5e-5, Zse = (function() { } return !0; } }, { key: "allNodesAreVisible", value: function(t, n, i) { - var a = _5(n, i, this.canvas.width, this.canvas.height), o = a.zoomX, s = a.zoomY; + var a = b5(n, i, this.canvas.width, this.canvas.height), o = a.zoomX, s = a.zoomY; return t < o && t < s; } }, { key: "reset", value: function(t, n) { var i = this.xCtrl, a = this.yCtrl, o = this.zoomCtrl, s = this.state, u = this.firstUpdate, l = this.canvas, c = s.zoom, f = s.panX, d = s.panY, h = s.nodes, p = s.maxNodeRadius, g = s.defaultZoomLevel; @@ -77172,7 +77184,7 @@ var t9 = 5e-5, Zse = (function() { var O = Math.max(5, 10 / c.target), E = Math.min(0.01, 0.01 * c.target); !n && Math.abs(c.target - S) < E && Math.abs(u.target - m) < O && Math.abs(l.target - x) < O && (a.setZoom(c.target, s), a.clearFit(), i !== void 0 && i()); } - } }]) && Kse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }]) && Zse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function u1(r) { @@ -77308,7 +77320,7 @@ function no(r) { } return r; } -function Qse(r, e) { +function Jse(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, SG(n.key), n); @@ -77333,14 +77345,14 @@ function SG(r) { var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: "rgba(0,0,0,0)" }, up = "onError", o9 = "onLayoutDone", s9 = "onLayoutStep", s2 = {}, ob = function() { var r; return (r = s2[arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "default"]) !== null && r !== void 0 ? r : Object.values(s2).pop(); -}, Jse = (function() { +}, eue = (function() { return r = function i(a, o, s) { var u, l, c, f = this; (function(q, W) { if (!(q instanceof W)) throw new TypeError("Cannot call a class as a function"); })(this, i), dn(this, "destroyed", void 0), dn(this, "state", void 0), dn(this, "callbacks", void 0), dn(this, "instanceId", void 0), dn(this, "glController", void 0), dn(this, "webGLContext", void 0), dn(this, "webGLMinimapContext", void 0), dn(this, "htmlOverlay", void 0), dn(this, "hasResized", void 0), dn(this, "hierarchicalLayout", void 0), dn(this, "gridLayout", void 0), dn(this, "freeLayout", void 0), dn(this, "d3ForceLayout", void 0), dn(this, "circularLayout", void 0), dn(this, "forceLayout", void 0), dn(this, "canvasRenderer", void 0), dn(this, "svgRenderer", void 0), dn(this, "glCanvas", void 0), dn(this, "canvasRect", void 0), dn(this, "glMinimapCanvas", void 0), dn(this, "c2dCanvas", void 0), dn(this, "svg", void 0), dn(this, "isInRenderSwitchAnimation", void 0), dn(this, "justSwitchedRenderer", void 0), dn(this, "justSwitchedLayout", void 0), dn(this, "layoutUpdating", void 0), dn(this, "layoutComputing", void 0), dn(this, "isRenderingDisabled", void 0), dn(this, "setRenderSwitchAnimation", void 0), dn(this, "stateDisposers", void 0), dn(this, "zoomTransitionHandler", void 0), dn(this, "currentLayout", void 0), dn(this, "layoutTimeLimit", void 0), dn(this, "pixelRatio", void 0), dn(this, "removeResizeListener", void 0), dn(this, "removeMinimapResizeListener", void 0), dn(this, "pendingZoomOperation", void 0), dn(this, "layoutRunner", void 0), dn(this, "animationRequestId", void 0), dn(this, "layoutDoneCallback", void 0), dn(this, "layoutComputingCallback", void 0), dn(this, "currentLayoutType", void 0), dn(this, "descriptionElement", void 0), this.destroyed = !1; var d = s.minimapContainer, h = d === void 0 ? document.createElement("span") : d, p = s.layoutOptions, g = s.layout, y = s.instanceId, b = y === void 0 ? "default" : y, _ = s.disableAria, m = _ !== void 0 && _, x = a.nodes, S = a.rels, O = a.disableWebGL; - this.state = a, this.callbacks = new Xse(), this.instanceId = b; + this.state = a, this.callbacks = new $se(), this.instanceId = b; var E = o; E.setAttribute("instanceId", b), E.setAttribute("data-testid", "nvl-parent"), (u = E.style.height) !== null && u !== void 0 && u.length || Object.assign(E.style, { height: "100%" }), (l = E.style.outline) !== null && l !== void 0 && l.length || Object.assign(E.style, { outline: "none" }), this.descriptionElement = m ? document.createElement("div") : (function(q, W) { var $; @@ -77348,18 +77360,18 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: var J = "nvl-".concat(W, "-description"), X = ($ = document.getElementById(J)) !== null && $ !== void 0 ? $ : document.createElement("div"); return X.textContent = "", X.id = "nvl-".concat(W, "-description"), X.setAttribute("role", "status"), X.setAttribute("aria-live", "polite"), X.setAttribute("aria-atomic", "false"), X.style.display = "none", q.appendChild(X), q.setAttribute("aria-describedby", X.id), X; })(E, b); - var T = RP(E, this.onWebGLContextLost.bind(this)), P = RP(h, this.onWebGLContextLost.bind(this)); - if (T.setAttribute("data-testid", "nvl-gl-canvas"), O) this.glController = new Gse(); + var T = AP(E, this.onWebGLContextLost.bind(this)), P = AP(h, this.onWebGLContextLost.bind(this)); + if (T.setAttribute("data-testid", "nvl-gl-canvas"), O) this.glController = new Vse(); else { var I = bB(T), k = bB(P); - this.glController = new qse({ mainSceneRenderer: new JB(I, x, S, this.state), minimapRenderer: new JB(k, x, S, this.state), state: a }), this.webGLContext = I, this.webGLMinimapContext = k; + this.glController = new Gse({ mainSceneRenderer: new JB(I, x, S, this.state), minimapRenderer: new JB(k, x, S, this.state), state: a }), this.webGLContext = I, this.webGLMinimapContext = k; } - var L = RP(E, this.onWebGLContextLost.bind(this)); + var L = AP(E, this.onWebGLContextLost.bind(this)); L.setAttribute("data-testid", "nvl-c2d-canvas"); var B = L.getContext("2d"), j = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - Object.assign(j.style, no(no({}, BM), {}, { overflow: "hidden", width: "100%", height: "100%" })), E.appendChild(j); + Object.assign(j.style, no(no({}, jM), {}, { overflow: "hidden", width: "100%", height: "100%" })), E.appendChild(j); var z = document.createElement("div"); - Object.assign(z.style, no(no({}, BM), {}, { overflow: "hidden" })), E.appendChild(z), this.htmlOverlay = z, this.hasResized = !0, this.hierarchicalLayout = new Yoe(no(no({}, p), {}, { state: this.state })), this.gridLayout = new Ioe({ state: this.state }), this.freeLayout = new Moe({ state: this.state }), this.d3ForceLayout = new voe({ state: this.state }), this.circularLayout = new Xae(no(no({}, p), {}, { state: this.state })), this.forceLayout = O ? this.d3ForceLayout : new Aoe(no(no({}, p), {}, { webGLContext: this.webGLContext, state: this.state })), this.state.setLayout(g), this.state.setLayoutOptions(p), this.canvasRenderer = new jse(L, B, a, s), this.svgRenderer = new Use(j, a, s), this.glCanvas = T, this.canvasRect = T.getBoundingClientRect(), this.glMinimapCanvas = P, this.c2dCanvas = L, this.svg = j; + Object.assign(z.style, no(no({}, jM), {}, { overflow: "hidden" })), E.appendChild(z), this.htmlOverlay = z, this.hasResized = !0, this.hierarchicalLayout = new Xoe(no(no({}, p), {}, { state: this.state })), this.gridLayout = new Noe({ state: this.state }), this.freeLayout = new Doe({ state: this.state }), this.d3ForceLayout = new poe({ state: this.state }), this.circularLayout = new $ae(no(no({}, p), {}, { state: this.state })), this.forceLayout = O ? this.d3ForceLayout : new Roe(no(no({}, p), {}, { webGLContext: this.webGLContext, state: this.state })), this.state.setLayout(g), this.state.setLayoutOptions(p), this.canvasRenderer = new Bse(L, B, a, s), this.svgRenderer = new zse(j, a, s), this.glCanvas = T, this.canvasRect = T.getBoundingClientRect(), this.glMinimapCanvas = P, this.c2dCanvas = L, this.svg = j; var H = a.renderer; this.glCanvas.style.opacity = H === Mg ? "1" : "0", this.c2dCanvas.style.opacity = H === fp ? "1" : "0", this.svg.style.opacity = H === am ? "1" : "0", this.isInRenderSwitchAnimation = !1, this.justSwitchedRenderer = !1, this.justSwitchedLayout = !1, this.hasResized = !1, this.layoutUpdating = !1, this.layoutComputing = !1, this.isRenderingDisabled = !1, x.addChannel(Uw), S.addChannel(Uw), this.setRenderSwitchAnimation = function() { f.isInRenderSwitchAnimation = !1; @@ -77373,16 +77385,16 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: f.setLayoutOptions(a.layoutOptions); })), m || this.stateDisposers.push(a.autorun(function() { (function(q, W) { - var $ = q.nodes, J = q.rels, X = q.layout, Q = $.items.length, ue = J.items.length; - if (Q !== 0 || ue !== 0) { - var re = "".concat(Q, " node").concat(Q !== 1 ? "s" : ""), ne = "".concat(ue, " relationship").concat(ue !== 1 ? "s" : ""), le = "displayed using a ".concat(X ?? "forceDirected", " layout"); + var $ = q.nodes, J = q.rels, X = q.layout, Z = $.items.length, ue = J.items.length; + if (Z !== 0 || ue !== 0) { + var re = "".concat(Z, " node").concat(Z !== 1 ? "s" : ""), ne = "".concat(ue, " relationship").concat(ue !== 1 ? "s" : ""), le = "displayed using a ".concat(X ?? "forceDirected", " layout"); W.textContent = "A graph visualization with ".concat(re, " and ").concat(ne, ", ").concat(le, "."); } else W.textContent = "An empty graph visualization."; })(a, f.descriptionElement); })), this.stateDisposers.push(a.autorun(function() { var q = a.renderer; q !== (f.glCanvas.style.opacity === "1" ? Mg : f.c2dCanvas.style.opacity === "1" ? fp : f.svg.style.opacity === "1" ? am : fp) && (f.justSwitchedRenderer = !0, f.glCanvas.style.opacity = q === Mg ? "1" : "0", f.c2dCanvas.style.opacity = q === fp ? "1" : "0", f.svg.style.opacity = q === am ? "1" : "0"); - })), this.startMainLoop(), this.zoomTransitionHandler = new Zse({ state: a, getNodePositions: function(q) { + })), this.startMainLoop(), this.zoomTransitionHandler = new Qse({ state: a, getNodePositions: function(q) { return f.currentLayout.getNodePositions(q); }, canvas: T }), this.layoutTimeLimit = (c = s.layoutTimeLimit) !== null && c !== void 0 ? c : 16, this.pixelRatio = $n(), this.removeResizeListener = P8()(E, function() { fx(T), fx(L), f.canvasRect = T.getBoundingClientRect(), f.hasResized = !0; @@ -77407,7 +77419,7 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: }, e = [{ key: "onWebGLContextLost", value: function(i) { this.callIfRegistered("onWebGLContextLost", i); } }, { key: "updateMinimapZoom", value: function() { - var i = this.state, a = i.nodes, o = i.maxNodeRadius, s = i.maxMinimapZoom, u = i.minMinimapZoom, l = i1(Object.values(a.idToPosition), o), c = l.centerX, f = l.centerY, d = l.nodesWidth, h = l.nodesHeight, p = _5(d, h, this.glMinimapCanvas.width, this.glMinimapCanvas.height), g = p.zoomX, y = p.zoomY, b = wG(g, y, u, s); + var i = this.state, a = i.nodes, o = i.maxNodeRadius, s = i.maxMinimapZoom, u = i.minMinimapZoom, l = i1(Object.values(a.idToPosition), o), c = l.centerX, f = l.centerY, d = l.nodesWidth, h = l.nodesHeight, p = b5(d, h, this.glMinimapCanvas.width, this.glMinimapCanvas.height), g = p.zoomX, y = p.zoomY, b = wG(g, y, u, s); this.state.updateMinimapZoomToFit(b, c, f); } }, { key: "startMainLoop", value: function() { var i = this, a = this.state, o = a.nodes, s = a.rels; @@ -77450,7 +77462,7 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: for (var B = 0; B < s.items.length; B++) { var j = s.items[B].id, z = i.canvasRenderer.arrowBundler.getBundle(s.items[B]), H = s.idToHtmlOverlay[j], q = z.labelInfo[j]; if (H && q) { - var W = q.rotation, $ = q.position, J = q.width, X = q.height, Q = i.mapCanvasSpaceToRelativePosition($.x, $.y), ue = Q.x, re = Q.y, ne = J > 5 && L !== Mg; + var W = q.rotation, $ = q.position, J = q.width, X = q.height, Z = i.mapCanvasSpaceToRelativePosition($.x, $.y), ue = Z.x, re = Z.y, ne = J > 5 && L !== Mg; Object.assign(H.style, { top: "".concat(re, "px"), left: "".concat(ue, "px"), width: "".concat(J, "px"), height: "".concat(X, "px"), display: ne ? "block" : "none", transform: "translate(-50%, -50%) scale(".concat(Number(i.state.zoom), ") rotate(").concat(W, "rad") }); } } @@ -77459,8 +77471,8 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: for (var le = 0; le < o.items.length; le++) { var ce = o.items[le], pe = ce.id, fe = ce.size, se = o.idToHtmlOverlay[pe]; if (se) { - var de = i.state.nodes.idToPosition[pe], ge = i.mapCanvasSpaceToRelativePosition(de.x, de.y), Oe = ge.x, ke = ge.y, Me = "".concat(2 * (fe ?? ha), "px"); - Object.assign(se.style, { top: "".concat(ke, "px"), left: "".concat(Oe, "px"), width: Me, height: Me, transform: "translate(-50%, -50%) scale(".concat(Number(i.state.zoom), ")") }); + var de = i.state.nodes.idToPosition[pe], ge = i.mapCanvasSpaceToRelativePosition(de.x, de.y), Oe = ge.x, ke = ge.y, De = "".concat(2 * (fe ?? ha), "px"); + Object.assign(se.style, { top: "".concat(ke, "px"), left: "".concat(Oe, "px"), width: De, height: De, transform: "translate(-50%, -50%) scale(".concat(Number(i.state.zoom), ")") }); } } } @@ -77556,7 +77568,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho I !== void 0 && k !== void 0 && I > b && I < _ && k > m && k < x && S.push(P); } if (p.includes("relationship")) { - var L, B = m5(y.items); + var L, B = y5(y.items); try { for (B.s(); !(L = B.n()).done; ) { var j = L.value, z = j.from, H = j.to, q = g.idToPosition[z], W = g.idToPosition[H]; @@ -77613,7 +77625,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return this.destroyed; } }, { key: "destroy", value: function() { var i; - this.destroyed || (this.animationRequestId && window.cancelAnimationFrame(this.animationRequestId), this.layoutRunner !== void 0 && window.clearInterval(this.layoutRunner), this.glController.destroy(), this.glCanvas.removeEventListener("transitionend", this.setRenderSwitchAnimation), this.webGLContext !== void 0 && _B(this.webGLContext), this.webGLMinimapContext !== void 0 && _B(this.webGLMinimapContext), om(this.glCanvas), om(this.glMinimapCanvas), this.canvasRenderer.destroy(), om(this.c2dCanvas), i5.clear(), this.svgRenderer.destroy(), this.svg.remove(), this.removeResizeListener(), this.removeMinimapResizeListener(), this.forceLayout.destroy(), this.hierarchicalLayout.destroy(), this.gridLayout.destroy(), this.freeLayout.destroy(), this.circularLayout.destroy(), this.htmlOverlay.remove(), this.descriptionElement.remove(), this.zoomTransitionHandler.destroy(), this.stateDisposers.forEach(function(a) { + this.destroyed || (this.animationRequestId && window.cancelAnimationFrame(this.animationRequestId), this.layoutRunner !== void 0 && window.clearInterval(this.layoutRunner), this.glController.destroy(), this.glCanvas.removeEventListener("transitionend", this.setRenderSwitchAnimation), this.webGLContext !== void 0 && _B(this.webGLContext), this.webGLMinimapContext !== void 0 && _B(this.webGLMinimapContext), om(this.glCanvas), om(this.glMinimapCanvas), this.canvasRenderer.destroy(), om(this.c2dCanvas), n5.clear(), this.svgRenderer.destroy(), this.svg.remove(), this.removeResizeListener(), this.removeMinimapResizeListener(), this.forceLayout.destroy(), this.hierarchicalLayout.destroy(), this.gridLayout.destroy(), this.freeLayout.destroy(), this.circularLayout.destroy(), this.htmlOverlay.remove(), this.descriptionElement.remove(), this.zoomTransitionHandler.destroy(), this.stateDisposers.forEach(function(a) { a(); }), i = this.instanceId, delete s2[i], this.destroyed = !0); } }, { key: "callIfRegistered", value: function() { @@ -77625,7 +77637,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return this.canvasRenderer.getNodesAt(i, a); } }, { key: "getLayout", value: function(i) { - return i === Zx ? this.hierarchicalLayout : i === Loe ? this.forceLayout : i === joe ? this.gridLayout : i === Boe ? this.freeLayout : i === Foe ? this.d3ForceLayout : i === Uoe ? this.circularLayout : this.forceLayout; + return i === Zx ? this.hierarchicalLayout : i === joe ? this.forceLayout : i === Boe ? this.gridLayout : i === Foe ? this.freeLayout : i === Uoe ? this.d3ForceLayout : i === zoe ? this.circularLayout : this.forceLayout; } }, { key: "setLayout", value: function(i) { bi.info("Switching to layout: ".concat(i)); var a = this.currentLayoutType, o = this.getLayout(i); @@ -77730,10 +77742,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }, i, this, [[1, 3, 5, 6]]); })), function(i) { return t.apply(this, arguments); - }) }], e && Qse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + }) }], e && Jse(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e, t, n; })(); -function vE(r, e) { +function hE(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = (function(u, l) { @@ -77776,23 +77788,23 @@ function u9(r, e) { for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -function eue(r) { +function tue(r) { return "from" in r && "to" in r; } -function tue(r) { +function rue(r) { this.channels[r] = { adds: {}, updates: {}, removes: {} }; } -function rue(r) { +function nue(r) { delete this.channels[r]; } -function nue(r) { +function iue(r) { this.channels[r].adds = {}, this.channels[r].updates = {}, this.channels[r].removes = {}; } var OG = function(r) { return "html" in r ? r.html : "captionHtml" in r ? r.captionHtml : void 0; }; -function iue(r, e) { - var t, n = !1, i = vE(r); +function aue(r, e) { + var t, n = !1, i = hE(r); try { for (i.s(); !(t = i.n()).done; ) { var a = t.value, o = a.id; @@ -77820,8 +77832,8 @@ function iue(r, e) { } n && (this.version += 1, e !== void 0 && (e.added = !0)); } -function aue(r, e) { - var t, n = !1, i = vE(r); +function oue(r, e) { + var t, n = !1, i = hE(r); try { for (i.s(); !(t = i.n()).done; ) { var a = t.value, o = a.id, s = this.idToItem[o]; @@ -77838,7 +77850,7 @@ function aue(r, e) { var p = h[d]; if (p.adds[o] === void 0) { var g = p.updates[o]; - g === void 0 && (g = { id: o }, eue(s) && (g = { id: o, from: s.from, to: s.to }), p.updates[o] = g), Object.assign(g, a); + g === void 0 && (g = { id: o }, tue(s) && (g = { id: o, from: s.from, to: s.to }), p.updates[o] = g), Object.assign(g, a); } } e !== void 0 && (e.updated = !0); @@ -77852,8 +77864,8 @@ function aue(r, e) { } n && (this.version += 1); } -function oue(r, e) { - var t, n = !1, i = vE(r); +function sue(r, e) { + var t, n = !1, i = hE(r); try { for (i.s(); !(t = i.n()).done; ) { var a = t.value, o = this.idToItem[a]; @@ -77873,8 +77885,8 @@ function oue(r, e) { } n && (e !== void 0 && (e.removed = !0), this.version += 1); } -function sue(r) { - var e, t = vE(r); +function uue(r) { + var e, t = hE(r); try { for (t.s(); !(e = t.n()).done; ) { var n = e.value; @@ -77889,14 +77901,14 @@ function sue(r) { t.f(); } } -function uue(r) { +function lue(r) { for (var e in this.idToHtmlOverlay) { var t = this.idToHtmlOverlay[e]; r.appendChild(t); } } var l9 = function() { - return { idToItem: ka.shallow({}), items: ka.shallow([]), channels: ka.shallow({}), idToPosition: ka.shallow({}), idToHtmlOverlay: ka.shallow({}), version: 0, addChannel: ta(tue), removeChannel: ta(rue), clearChannel: ta(nue), add: ta(iue), update: ta(aue), remove: ta(oue), updatePositions: ta(sue), updateHtmlOverlay: ta(uue) }; + return { idToItem: ka.shallow({}), items: ka.shallow([]), channels: ka.shallow({}), idToPosition: ka.shallow({}), idToHtmlOverlay: ka.shallow({}), version: 0, addChannel: ta(rue), removeChannel: ta(nue), clearChannel: ta(iue), add: ta(aue), update: ta(oue), remove: ta(sue), updatePositions: ta(uue), updateHtmlOverlay: ta(lue) }; }; function l1(r) { return l1 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { @@ -77919,14 +77931,14 @@ function f9(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? c9(Object(t), !0).forEach(function(n) { - lue(r, n, t[n]); + cue(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : c9(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function lue(r, e, t) { +function cue(r, e, t) { return (e = (function(n) { var i = (function(a) { if (l1(a) != "object" || !a) return a; @@ -77941,11 +77953,11 @@ function lue(r, e, t) { return l1(i) == "symbol" ? i : i + ""; })(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } -var cue = function(r) { +var fue = function(r) { var e = r.minZoom, t = r.maxZoom, n = r.allowDynamicMinZoom, i = n === void 0 || n, a = r.layout, o = r.layoutOptions, s = r.styling, u = s === void 0 ? {} : s, l = r.panX, c = l === void 0 ? 0 : l, f = r.panY, d = f === void 0 ? 0 : f, h = r.initialZoom, p = r.renderer, g = p === void 0 ? fp : p, y = r.disableWebGL, b = y !== void 0 && y, _ = r.disableWebWorkers, m = _ !== void 0 && _, x = r.disableTelemetry, S = x !== void 0 && x; xz(!0), zD.isolateGlobalState(); var O = (function(j) { - var z = j.nodeDefaultBorderColor, H = j.selectedBorderColor, q = j.disabledItemColor, W = j.disabledItemFontColor, $ = j.selectedInnerBorderColor, J = j.dropShadowColor, X = j.defaultNodeColor, Q = j.defaultRelationshipColor, ue = j.minimapViewportBoxColor, re = AP({}, gB.default), ne = AP({}, gB.selected), le = AP({}, yB.selected), ce = { color: sq, fontColor: "#DDDDDD" }, pe = oq, fe = "#FFDF81"; + var z = j.nodeDefaultBorderColor, H = j.selectedBorderColor, q = j.disabledItemColor, W = j.disabledItemFontColor, $ = j.selectedInnerBorderColor, J = j.dropShadowColor, X = j.defaultNodeColor, Z = j.defaultRelationshipColor, ue = j.minimapViewportBoxColor, re = CP({}, gB.default), ne = CP({}, gB.selected), le = CP({}, yB.selected), ce = { color: sq, fontColor: "#DDDDDD" }, pe = oq, fe = "#FFDF81"; return ip($, function(se) { ne.rings[0].color = se, le.rings[0].color = se; }, "selectedInnerBorderColor"), ip(H, function(se) { @@ -77953,14 +77965,14 @@ var cue = function(r) { }, "selectedBorderColor"), ip(z, function(se) { var de; re.rings = [{ color: se, widthFactor: 0.025 }], ne.rings = [{ color: se, widthFactor: 0.025 }].concat((function(ge) { - if (Array.isArray(ge)) return CP(ge); + if (Array.isArray(ge)) return TP(ge); })(de = ne.rings) || (function(ge) { if (typeof Symbol < "u" && ge[Symbol.iterator] != null || ge["@@iterator"] != null) return Array.from(ge); })(de) || (function(ge, Oe) { if (ge) { - if (typeof ge == "string") return CP(ge, Oe); + if (typeof ge == "string") return TP(ge, Oe); var ke = {}.toString.call(ge).slice(8, -1); - return ke === "Object" && ge.constructor && (ke = ge.constructor.name), ke === "Map" || ke === "Set" ? Array.from(ge) : ke === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ke) ? CP(ge, Oe) : void 0; + return ke === "Object" && ge.constructor && (ke = ge.constructor.name), ke === "Map" || ke === "Set" ? Array.from(ge) : ke === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ke) ? TP(ge, Oe) : void 0; } })(de) || (function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. @@ -77974,10 +77986,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ce.fontColor = se; }, "disabledItemFontColor"), ip(X, function(se) { fe = se; - }, "defaultNodeColor"), ip(Q, function(se) { + }, "defaultNodeColor"), ip(Z, function(se) { pe = se; }, "defaultRelationshipColor"), { nodeBorderStyles: { default: re, selected: ne }, relationshipBorderStyles: { default: yB.default, selected: le }, disabledItemStyles: ce, defaultNodeColor: fe, defaultRelationshipColor: pe, minimapViewportBoxColor: ue || qD }; - })(u), E = O.nodeBorderStyles, T = O.relationshipBorderStyles, P = O.disabledItemStyles, I = O.defaultNodeColor, k = O.defaultRelationshipColor, L = O.minimapViewportBoxColor, B = ka({ zoom: h || OP, minimapZoom: OP, defaultZoomLevel: OP, panX: c, panY: d, minimapPanX: 0, minimapPanY: 0, fitNodeIds: [], resetZoom: !1, zoomOptions: TP, forceWebGL: !1, renderer: g, disableWebGL: b, disableWebWorkers: m, disableTelemetry: S, fitMovement: 0, layout: a, layoutOptions: o, maxDistance: 0, maxNodeRadius: 50, nodeBorderStyles: E, minZoom: (0, Hi.isNil)(e) ? 0.075 : e, maxZoom: (0, Hi.isNil)(t) ? 10 : t, relationshipBorderStyles: T, disabledItemStyles: P, defaultNodeColor: I, defaultRelationshipColor: k, minimapViewportBoxColor: L, get minMinimapZoom() { + })(u), E = O.nodeBorderStyles, T = O.relationshipBorderStyles, P = O.disabledItemStyles, I = O.defaultNodeColor, k = O.defaultRelationshipColor, L = O.minimapViewportBoxColor, B = ka({ zoom: h || SP, minimapZoom: SP, defaultZoomLevel: SP, panX: c, panY: d, minimapPanX: 0, minimapPanY: 0, fitNodeIds: [], resetZoom: !1, zoomOptions: OP, forceWebGL: !1, renderer: g, disableWebGL: b, disableWebWorkers: m, disableTelemetry: S, fitMovement: 0, layout: a, layoutOptions: o, maxDistance: 0, maxNodeRadius: 50, nodeBorderStyles: E, minZoom: (0, Hi.isNil)(e) ? 0.075 : e, maxZoom: (0, Hi.isNil)(t) ? 10 : t, relationshipBorderStyles: T, disabledItemStyles: P, defaultNodeColor: I, defaultRelationshipColor: k, minimapViewportBoxColor: L, get minMinimapZoom() { return 0; }, get maxMinimapZoom() { return 0.2; @@ -77991,7 +78003,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho this.waypoints.data = j, this.waypoints.counter += 1; }), setZoomPan: ta(function(j, z, H, q) { if (i) { - var W = Object.values(this.nodes.idToPosition), $ = FP(W, this.minZoom, this.maxZoom, q, j, this.zoom); + var W = Object.values(this.nodes.idToPosition), $ = BP(W, this.minZoom, this.maxZoom, q, j, this.zoom); $ !== this.zoom && (this.zoom = $, $ < this.minZoom && (this.minZoom = $), j === $ && (this.panX = z, this.panY = H)); } else { var J = a1(j, this.zoom, this.minZoom, this.maxZoom); @@ -78001,7 +78013,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }), setZoom: ta(function(j, z) { if (i) { var H = Object.values(this.nodes.idToPosition); - this.zoom = FP(H, this.minZoom, this.maxZoom, z, j, this.zoom), this.zoom < this.minZoom && (this.minZoom = this.zoom); + this.zoom = BP(H, this.minZoom, this.maxZoom, z, j, this.zoom), this.zoom < this.minZoom && (this.minZoom = this.zoom); } else this.zoom = a1(j, this.zoom, this.minZoom, this.maxZoom); this.fitNodeIds = [], this.fitMovement = 0, this.resetZoom = !1, this.forceWebGL = !1; }), setPan: ta(function(j, z) { @@ -78012,25 +78024,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho this.layoutOptions = j; }), fitNodes: ta(function(j) { var z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - this.fitNodeIds = (0, Hi.intersection)(j, (0, Hi.map)(this.nodes.items, "id")), this.zoomOptions = f9(f9({}, TP), z); + this.fitNodeIds = (0, Hi.intersection)(j, (0, Hi.map)(this.nodes.items, "id")), this.zoomOptions = f9(f9({}, OP), z); }), setZoomReset: ta(function() { this.resetZoom = !0; }), clearFit: ta(function() { - this.fitNodeIds = [], this.forceWebGL = !1, this.fitMovement = 0, this.zoomOptions = TP; + this.fitNodeIds = [], this.forceWebGL = !1, this.fitMovement = 0, this.zoomOptions = OP; }), clearReset: ta(function() { this.resetZoom = !1, this.fitMovement = 0; }), updateZoomToFit: ta(function(j, z, H, q) { var W; if (this.fitMovement = Math.abs(j - this.zoom) + Math.abs(z - this.panX) + Math.abs(H - this.panY), i) { var $ = Object.values(this.nodes.idToPosition); - (W = FP($, this.minZoom, this.maxZoom, q, j, this.zoom)) < this.minZoom && (this.minZoom = W); + (W = BP($, this.minZoom, this.maxZoom, q, j, this.zoom)) < this.minZoom && (this.minZoom = W); } else W = a1(j, this.zoom, this.minZoom, this.maxZoom); this.zoom = W, this.panX = z, this.panY = H; }), updateMinimapZoomToFit: ta(function(j, z, H) { this.minimapZoom = j, this.minimapPanX = z, this.minimapPanY = H; }), autorun: Hx, reaction: Tz }); return B; -}, fue = function(r) { +}, due = function(r) { return !!r && typeof r.id == "string" && r.id.length > 0; }, zw = io(1187); function c1(r) { @@ -78054,14 +78066,14 @@ function h9(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? d9(Object(t), !0).forEach(function(n) { - due(r, n, t[n]); + hue(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : d9(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function due(r, e, t) { +function hue(r, e, t) { return (e = (function(n) { var i = (function(a) { if (c1(a) != "object" || !a) return a; @@ -78078,26 +78090,26 @@ function due(r, e, t) { } function v9(r) { return (function(e) { - if (Array.isArray(e)) return zP(e); + if (Array.isArray(e)) return UP(e); })(r) || (function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); })(r) || (function(e, t) { if (e) { - if (typeof e == "string") return zP(e, t); + if (typeof e == "string") return UP(e, t); var n = {}.toString.call(e).slice(8, -1); - return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? zP(e, t) : void 0; + return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? UP(e, t) : void 0; } })(r) || (function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); })(); } -function zP(r, e) { +function UP(r, e) { (e == null || e > r.length) && (e = r.length); for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t]; return n; } -var qP = function(r) { +var zP = function(r) { return { id: r.elementId }; }, p9 = function(r) { return { id: r.elementId, from: r.startNodeElementId, to: r.endNodeElementId }; @@ -78113,8 +78125,8 @@ zw.resultTransformers.mappedResultTransformer({ map: function(r) { } return a; })(r).forEach(function(n) { - (0, zw.isNode)(n) ? (e.nodes.push(qP(n)), t.set(n.elementId, n)) : (0, zw.isPath)(n) ? n.segments.forEach(function(i) { - e.nodes.push(qP(i.start)), e.nodes.push(qP(i.end)), e.relationships.push(p9(i.relationship)), t.set(i.start.elementId, i.start), t.set(i.end.elementId, i.end), t.set(i.relationship.elementId, i.relationship); + (0, zw.isNode)(n) ? (e.nodes.push(zP(n)), t.set(n.elementId, n)) : (0, zw.isPath)(n) ? n.segments.forEach(function(i) { + e.nodes.push(zP(i.start)), e.nodes.push(zP(i.end)), e.relationships.push(p9(i.relationship)), t.set(i.start.elementId, i.start), t.set(i.end.elementId, i.end), t.set(i.relationship.elementId, i.relationship); }) : (0, zw.isRelationship)(n) && (e.relationships.push(p9(n)), t.set(n.elementId, n)); }), h9(h9({}, e), {}, { recordObjectMap: t }); } }); @@ -78125,7 +78137,7 @@ function f1(r) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, f1(r); } -function w5(r, e) { +function _5(r, e) { var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = TG(r)) || e) { @@ -78183,17 +78195,17 @@ function Ms(r) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? y9(Object(t), !0).forEach(function(n) { - hue(r, n, t[n]); + vue(r, n, t[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : y9(Object(t)).forEach(function(n) { Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n)); }); } return r; } -function hue(r, e, t) { +function vue(r, e, t) { return (e = CG(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r; } -function vue(r, e) { +function pue(r, e) { for (var t = 0; t < e.length; t++) { var n = e[t]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, CG(n.key), n); @@ -78228,20 +78240,20 @@ function Oc(r, e, t) { if (typeof r == "function" ? r === e : r.has(e)) return arguments.length < 3 ? e : t; throw new TypeError("Private element is not present on this object"); } -var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = /* @__PURE__ */ new WeakMap(), wd = /* @__PURE__ */ new WeakMap(), mm = /* @__PURE__ */ new WeakMap(), pue = /* @__PURE__ */ new WeakMap(), Qc = /* @__PURE__ */ new WeakSet(), gue = (function() { +var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = /* @__PURE__ */ new WeakMap(), wd = /* @__PURE__ */ new WeakMap(), mm = /* @__PURE__ */ new WeakMap(), gue = /* @__PURE__ */ new WeakMap(), Qc = /* @__PURE__ */ new WeakSet(), yue = (function() { return r = function t(n) { var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}; (function(u, l) { if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function"); })(this, t), (function(u, l) { AG(u, l), l.add(u); - })(this, Qc), um(this, u2, void 0), um(this, In, void 0), um(this, mi, void 0), um(this, wd, void 0), um(this, mm, void 0), um(this, pue, void 0), o.disableTelemetry, Oc(Qc, this, yue).call(this, o), d1(u2, this, new Uae(s)), d1(wd, this, o), d1(mm, this, n), this.checkWebGLCompatibility(), Oc(Qc, this, m9).call(this, i, a, o); + })(this, Qc), um(this, u2, void 0), um(this, In, void 0), um(this, mi, void 0), um(this, wd, void 0), um(this, mm, void 0), um(this, gue, void 0), o.disableTelemetry, Oc(Qc, this, mue).call(this, o), d1(u2, this, new zae(s)), d1(wd, this, o), d1(mm, this, n), this.checkWebGLCompatibility(), Oc(Qc, this, m9).call(this, i, a, o); }, e = [{ key: "restart", value: function() { var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], i = this.getNodePositions(), a = Vt(In, this), o = a.zoom, s = a.layout, u = a.layoutOptions, l = a.nodes, c = a.rels; Vt(mi, this).destroy(), Object.assign(Vt(wd, this), t), Oc(Qc, this, m9).call(this, l.items, c.items, Vt(wd, this)), this.setZoom(o), this.setLayout(s), this.setLayoutOptions(u), this.addAndUpdateElementsInGraph(l.items, c.items), n && this.setNodePositions(i); } }, { key: "addAndUpdateElementsInGraph", value: function() { var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : []; - Oc(Qc, this, GP).call(this, t), Oc(Qc, this, VP).call(this, n, t); + Oc(Qc, this, qP).call(this, t), Oc(Qc, this, GP).call(this, n, t); var i = { added: !1, updated: !1 }; Vt(In, this).nodes.update(t, Ms({}, i)), Vt(In, this).rels.update(n, Ms({}, i)), Vt(In, this).nodes.add(t, Ms({}, i)), Vt(In, this).rels.add(n, Ms({}, i)), Vt(In, this).setGraphUpdated(), Vt(mi, this).updateHtmlOverlay(); } }, { key: "getSelectedNodes", value: function() { @@ -78261,14 +78273,14 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = }), s = n.filter(function(u) { return Vt(In, i).rels.idToItem[u.id] !== void 0; }); - Oc(Qc, this, GP).call(this, o), Oc(Qc, this, VP).call(this, s, t), Vt(In, this).nodes.update(o, Ms({}, a)), Vt(In, this).rels.update(s, Ms({}, a)), Vt(mi, this).updateHtmlOverlay(); + Oc(Qc, this, qP).call(this, o), Oc(Qc, this, GP).call(this, s, t), Vt(In, this).nodes.update(o, Ms({}, a)), Vt(In, this).rels.update(s, Ms({}, a)), Vt(mi, this).updateHtmlOverlay(); } }, { key: "addElementsToGraph", value: function(t, n) { - Oc(Qc, this, GP).call(this, t), Oc(Qc, this, VP).call(this, n, t); + Oc(Qc, this, qP).call(this, t), Oc(Qc, this, GP).call(this, n, t); var i = { added: !1, updated: !1 }; Vt(In, this).nodes.add(t, Ms({}, i)), Vt(In, this).rels.add(n, Ms({}, i)), Vt(mi, this).updateHtmlOverlay(); } }, { key: "removeNodesWithIds", value: function(t) { if (Array.isArray(t) && !(0, Hi.isEmpty)(t)) { - var n, i = {}, a = w5(t); + var n, i = {}, a = _5(t); try { for (a.s(); !(n = a.n()).done; ) i[n.value] = !0; } catch (c) { @@ -78276,7 +78288,7 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = } finally { a.f(); } - var o, s = [], u = w5(Vt(In, this).rels.items); + var o, s = [], u = _5(Vt(In, this).rels.items); try { for (u.s(); !(o = u.n()).done; ) { var l = o.value; @@ -78287,7 +78299,7 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = } finally { u.f(); } - s.length > 0 && Oc(Qc, this, b9).call(this, s), Oc(Qc, this, mue).call(this, t), Vt(In, this).setGraphUpdated(), Vt(mi, this).updateHtmlOverlay(); + s.length > 0 && Oc(Qc, this, b9).call(this, s), Oc(Qc, this, bue).call(this, t), Vt(In, this).setGraphUpdated(), Vt(mi, this).updateHtmlOverlay(); } } }, { key: "removeRelationshipsWithIds", value: function(t) { Array.isArray(t) && !(0, Hi.isEmpty)(t) && (Oc(Qc, this, b9).call(this, t), Vt(In, this).setGraphUpdated(), Vt(mi, this).updateHtmlOverlay()); @@ -78367,17 +78379,17 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["node", "relationship"], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : { hitNodeMarginWidth: 0 }, a = Vt(In, this), o = a.zoom, s = a.panX, u = a.panY, l = a.renderer, c = pG(t, Vt(mm, this), o, s, u), f = c.x, d = c.y, h = l === Mg ? (function(p, g, y) { var b = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ["node", "relationship"], _ = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {}, m = [], x = [], S = y.nodes, O = y.rels; return b.includes("node") && m.push.apply(m, Bw((function(E, T) { - var P, I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, k = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, L = [], B = m5(arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []); + var P, I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, k = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, L = [], B = y5(arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []); try { var j = function() { var z, H = P.value, q = I[H.id]; if ((q == null ? void 0 : q.x) === void 0 || q.y === void 0) return 1; - var W = ((z = H.size) !== null && z !== void 0 ? z : ha) * $n(), $ = { x: q.x - E, y: q.y - T }, J = Math.pow(W, 2), X = Math.pow(W + k, 2), Q = Math.pow($.x, 2) + Math.pow($.y, 2), ue = Math.sqrt(Q); - if (Q < X) { + var W = ((z = H.size) !== null && z !== void 0 ? z : ha) * $n(), $ = { x: q.x - E, y: q.y - T }, J = Math.pow(W, 2), X = Math.pow(W + k, 2), Z = Math.pow($.x, 2) + Math.pow($.y, 2), ue = Math.sqrt(Z); + if (Z < X) { var re = L.findIndex(function(ne) { return ne.distance > ue; }); - L.splice(re !== -1 ? re : L.length, 0, { data: H, targetCoordinates: { x: q.x, y: q.y }, pointerCoordinates: { x: E, y: T }, distanceVector: $, distance: ue, insideNode: Q < J }); + L.splice(re !== -1 ? re : L.length, 0, { data: H, targetCoordinates: { x: q.x, y: q.y }, pointerCoordinates: { x: E, y: T }, distanceVector: $, distance: ue, insideNode: Z < J }); } }; for (B.s(); !(P = B.n()).done; ) j(); @@ -78388,7 +78400,7 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = } return L; })(p, g, S.items, S.idToPosition, _.hitNodeMarginWidth))), b.includes("relationship") && x.push.apply(x, Bw((function(E, T) { - var P, I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, k = [], L = {}, B = m5(arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []); + var P, I = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, k = [], L = {}, B = y5(arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []); try { var j = function() { var z = P.value, H = z.from, q = z.to; @@ -78396,9 +78408,9 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = var W = I[H], $ = I[q]; if ((W == null ? void 0 : W.x) === void 0 || W.y === void 0 || ($ == null ? void 0 : $.x) === void 0 || $.y === void 0) return 0; var J = YD({ x: W.x, y: W.y }, { x: $.x, y: $.y }, { x: E, y: T }); - if (J <= Hse) { - var X = k.findIndex(function(Q) { - return Q.distance > J; + if (J <= Wse) { + var X = k.findIndex(function(Z) { + return Z.distance > J; }); k.splice(X !== -1 ? X : k.length, 0, { data: z, fromTargetCoordinates: { x: W.x, y: W.y }, toTargetCoordinates: { x: $.x, y: $.y }, pointerCoordinates: { x: E, y: T }, distance: J }); } @@ -78437,13 +78449,13 @@ var u2 = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), mi = } t === void 0 && (Vt(wd, this).disableWebGL = !n); } - } }], e && vue(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; + } }], e && pue(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r; var r, e; })(); function m9() { var r, e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - d1(In, this, cue(i)), i.minimapContainer instanceof HTMLElement || delete i.minimapContainer, d1(mi, this, new Jse(Vt(In, this), Vt(mm, this), i)), this.addAndUpdateElementsInGraph(t, n), Vt(mi, this).on("restart", this.restart.bind(this)); - var a, o, s = w5((a = Vt(u2, this).callbacks, Object.entries(a))); + d1(In, this, fue(i)), i.minimapContainer instanceof HTMLElement || delete i.minimapContainer, d1(mi, this, new eue(Vt(In, this), Vt(mm, this), i)), this.addAndUpdateElementsInGraph(t, n), Vt(mi, this).on("restart", this.restart.bind(this)); + var a, o, s = _5((a = Vt(u2, this).callbacks, Object.entries(a))); try { var u = function() { var l, c, f = (l = o.value, c = 2, (function(p) { @@ -78487,7 +78499,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho Vt(mi, e).callIfRegistered("onInitialization"); }), (r = Vt(mm, this)) === null || r === void 0 || r.getAttribute("id"), Vt(wd, this).disableTelemetry; } -function yue(r) { +function mue(r) { var e, t = r.logging; (t == null ? void 0 : t.level) !== void 0 && (e = t.level, bi.setLevel(e), (function(n, i) { var a = n.methodFactory; @@ -78500,7 +78512,7 @@ function yue(r) { }, n.setLevel(n.getLevel()); })(bi, t)); } -function mue(r) { +function bue(r) { var e = Array.isArray(r) ? r : [r], t = Vt(In, this), n = t.nodes, i = t.fitNodeIds; n.remove(e, { removed: !1 }), i.length && e.find(function(a) { return i.includes(a); @@ -78512,7 +78524,7 @@ function b9(r) { var e = Array.isArray(r) ? r : [r]; Vt(In, this).rels.remove(e, { removed: !1 }); } -function GP(r) { +function qP(r) { var e = r.find(function(n) { return !(function(i) { return !!i && typeof i.id == "string" && i.id.length > 0; @@ -78523,14 +78535,14 @@ function GP(r) { throw /^\d+$/.test(e.id) || (t = " 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(e), ".").concat(t)); } } -function VP(r) { +function GP(r) { for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = "", n = null, i = Vt(In, this), a = i.nodes, o = i.rels, s = {}, u = 0; u < e.length; u++) { var l = e[u]; s[l.id] = l; } for (var c = Ms(Ms({}, a.idToItem), s), f = o.idToItem, d = 0; d < r.length; d++) { var h = r[d]; - if (!fue(h)) { + if (!due(h)) { n = h, /^\d+$/.test(h.id) && (t = " Node ids need to be numeric strings. Strings that contain anything other than numbers are not yet supported."); break; } @@ -78548,7 +78560,7 @@ function VP(r) { } if (n !== null) throw new TypeError("Invalid relationship provided: ".concat(JSON.stringify(n), ".").concat(t)); } -const _9 = gue, bue = "NVL_basic-wrapper", _ue = "NVL_interactive-wrapper"; +const _9 = yue, _ue = "NVL_basic-wrapper", wue = "NVL_interactive-wrapper"; var os = Sa(); const w9 = (r, e) => { const t = os.keyBy(r, "id"), n = os.keyBy(e, "id"), i = os.sortBy(os.keys(t)), a = os.sortBy(os.keys(n)), o = [], s = [], u = []; @@ -78570,7 +78582,7 @@ const w9 = (r, e) => { removed: s.map((f) => t[f]).filter((f) => !os.isNil(f)), updated: u.map((f) => n[f]).filter((f) => !os.isNil(f)) }; -}, wue = (r, e) => { +}, xue = (r, e) => { const t = os.keyBy(r, "id"); return e.map((n) => { const i = t[n.id]; @@ -78578,12 +78590,12 @@ const w9 = (r, e) => { (s === "id" || o !== i[s]) && Object.assign(a, { [s]: o }); }); }).filter((n) => n !== null && Object.keys(n).length > 1); -}, xue = (r, e) => os.isEqual(r, e), Eue = (r) => { +}, Eue = (r, e) => os.isEqual(r, e), Sue = (r) => { const e = me.useRef(); - return xue(r, e.current) || (e.current = r), e.current; -}, Sue = (r, e) => { - me.useEffect(r, e.map(Eue)); -}, Oue = me.memo(me.forwardRef(({ nodes: r, rels: e, layout: t, layoutOptions: n, nvlCallbacks: i = {}, nvlOptions: a = {}, positions: o = [], zoom: s, pan: u, onInitializationError: l, ...c }, f) => { + return Eue(r, e.current) || (e.current = r), e.current; +}, Oue = (r, e) => { + me.useEffect(r, e.map(Sue)); +}, Tue = me.memo(me.forwardRef(({ nodes: r, rels: e, layout: t, layoutOptions: n, nvlCallbacks: i = {}, nvlOptions: a = {}, positions: o = [], zoom: s, pan: u, onInitializationError: l, ...c }, f) => { const d = me.useRef(null), h = me.useRef(void 0), p = me.useRef(void 0); me.useImperativeHandle(f, () => Object.getOwnPropertyNames(_9.prototype).reduce((S, O) => ({ ...S, @@ -78611,7 +78623,7 @@ const w9 = (r, e) => { }, [g.current, a.minimapContainer]), me.useEffect(() => { if (d.current === null) return; - const x = w9(y, r), S = wue(y, r), O = w9(_, e); + const x = w9(y, r), S = xue(y, r), O = w9(_, e); if (x.added.length === 0 && x.removed.length === 0 && S.length === 0 && O.added.length === 0 && O.removed.length === 0 && O.updated.length === 0) return; m(e), b(r); @@ -78622,7 +78634,7 @@ const w9 = (r, e) => { }, [y, _, r, e]), me.useEffect(() => { const x = t ?? a.layout; d.current === null || x === void 0 || d.current.setLayout(x); - }, [t, a.layout]), Sue(() => { + }, [t, a.layout]), Oue(() => { const x = n ?? (a == null ? void 0 : a.layoutOptions); d.current === null || x === void 0 || d.current.setLayoutOptions(x); }, [n, a.layoutOptions]), me.useEffect(() => { @@ -78636,8 +78648,8 @@ const w9 = (r, e) => { return; const x = h.current, S = p.current, O = s !== void 0 && s !== x, E = u !== void 0 && (u.x !== (S == null ? void 0 : S.x) || u.y !== S.y); O && E ? d.current.setZoomAndPan(s, u.x, u.y) : O ? d.current.setZoom(s) : E && d.current.setPan(u.x, u.y), h.current = s, p.current = u; - }, [s, u]), Te.jsx("div", { id: bue, ref: g, style: { height: "100%", outline: "0" }, ...c }); -})), Ym = 10, HP = 10, vh = { + }, [s, u]), Te.jsx("div", { id: _ue, ref: g, style: { height: "100%", outline: "0" }, ...c }); +})), Ym = 10, VP = 10, vh = { frameWidth: 3, frameColor: "#a9a9a9", color: "#e0e0e0", @@ -78785,14 +78797,14 @@ class Wp { } const sb = (r) => Math.floor(Math.random() * Math.pow(10, r)).toString(), PG = (r, e) => { const t = Math.abs(r.clientX - e.x), n = Math.abs(r.clientY - e.y); - return t > HP || n > HP ? !0 : Math.pow(t, 2) + Math.pow(n, 2) > HP; + return t > VP || n > VP ? !0 : Math.pow(t, 2) + Math.pow(n, 2) > VP; }, Ap = (r, e) => { const t = r.getBoundingClientRect(), n = window.devicePixelRatio || 1; return { x: (e.clientX - t.left) * n, y: (e.clientY - t.top) * n }; -}, Tue = (r, e) => { +}, Cue = (r, e) => { const t = r.getBoundingClientRect(), n = window.devicePixelRatio || 1; return { x: (e.clientX - t.left - t.width * 0.5) * n, @@ -78939,7 +78951,7 @@ class iv extends Wp { this.addEventListener("mousedown", this.handleMouseDown, !0), this.addEventListener("click", this.handleClick, !0), this.addEventListener("dblclick", this.handleDoubleClick, !0), this.addEventListener("contextmenu", this.handleRightClick, !0); } } -class WP extends Wp { +class HP extends Wp { /** * Creates a new instance of the drag node interaction handler. * @param nvl - The NVL instance to attach the interaction handler to. @@ -78996,7 +79008,7 @@ const lp = { width: 1 } }; -class YP extends Wp { +class WP extends Wp { constructor(t, n = {}) { var i, a; super(t, n); @@ -79126,7 +79138,7 @@ class YP extends Wp { }); } } -class Cue extends Wp { +class Aue extends Wp { constructor(t, n = { drawShadowOnHover: !1 }) { super(t, n); Ft(this, "currentHoveredElementId"); @@ -79175,12 +79187,12 @@ class Cue extends Wp { this.removeEventListener("mousemove", this.handleHover, !0); } } -var qw = { exports: {} }, dx = { exports: {} }, Aue = dx.exports, E9; -function Rue() { +var qw = { exports: {} }, dx = { exports: {} }, Rue = dx.exports, E9; +function Pue() { return E9 || (E9 = 1, (function(r, e) { (function(t, n) { r.exports = n(); - })(Aue, function() { + })(Rue, function() { function t(_, m, x, S, O) { (function E(T, P, I, k, L) { for (; k > I; ) { @@ -79188,12 +79200,12 @@ function Rue() { var B = k - I + 1, j = P - I + 1, z = Math.log(B), H = 0.5 * Math.exp(2 * z / 3), q = 0.5 * Math.sqrt(z * H * (B - H) / B) * (j - B / 2 < 0 ? -1 : 1), W = Math.max(I, Math.floor(P - j * H / B + q)), $ = Math.min(k, Math.floor(P + (B - j) * H / B + q)); E(T, P, W, $, L); } - var J = T[P], X = I, Q = k; - for (n(T, I, P), L(T[k], J) > 0 && n(T, I, k); X < Q; ) { - for (n(T, X, Q), X++, Q--; L(T[X], J) < 0; ) X++; - for (; L(T[Q], J) > 0; ) Q--; + var J = T[P], X = I, Z = k; + for (n(T, I, P), L(T[k], J) > 0 && n(T, I, k); X < Z; ) { + for (n(T, X, Z), X++, Z--; L(T[X], J) < 0; ) X++; + for (; L(T[Z], J) > 0; ) Z--; } - L(T[I], J) === 0 ? n(T, I, Q) : n(T, ++Q, k), Q <= P && (I = Q + 1), P <= Q && (k = Q - 1); + L(T[I], J) === 0 ? n(T, I, Z) : n(T, ++Z, k), Z <= P && (I = Z + 1), P <= Z && (k = Z - 1); } })(_, m, x || 0, S || _.length - 1, O || i); } @@ -79388,8 +79400,8 @@ function Rue() { }); })(dx)), dx.exports; } -class Pue { - constructor(e = [], t = Mue) { +class Mue { + constructor(e = [], t = Due) { if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let n = (this.length >> 1) - 1; n >= 0; n--) this._down(n); } @@ -79424,16 +79436,16 @@ class Pue { t[e] = a; } } -function Mue(r, e) { +function Due(r, e) { return r < e ? -1 : r > e ? 1 : 0; } -const Due = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +const kue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - default: Pue -}, Symbol.toStringTag, { value: "Module" })), kue = /* @__PURE__ */ KG(Due); -var ub = { exports: {} }, XP, S9; -function Iue() { - return S9 || (S9 = 1, XP = function(e, t, n, i) { + default: Mue +}, Symbol.toStringTag, { value: "Module" })), Iue = /* @__PURE__ */ KG(kue); +var ub = { exports: {} }, YP, S9; +function Nue() { + return S9 || (S9 = 1, YP = function(e, t, n, i) { var a = e[0], o = e[1], s = !1; n === void 0 && (n = 0), i === void 0 && (i = t.length); for (var u = (i - n) / 2, l = 0, c = u - 1; l < u; c = l++) { @@ -79441,11 +79453,11 @@ function Iue() { g && (s = !s); } return s; - }), XP; + }), YP; } -var $P, O9; -function Nue() { - return O9 || (O9 = 1, $P = function(e, t, n, i) { +var XP, O9; +function Lue() { + return O9 || (O9 = 1, XP = function(e, t, n, i) { var a = e[0], o = e[1], s = !1; n === void 0 && (n = 0), i === void 0 && (i = t.length); for (var u = i - n, l = 0, c = u - 1; l < u; c = l++) { @@ -79453,23 +79465,23 @@ function Nue() { g && (s = !s); } return s; - }), $P; + }), XP; } var T9; -function Lue() { +function jue() { if (T9) return ub.exports; T9 = 1; - var r = Iue(), e = Nue(); + var r = Nue(), e = Lue(); return ub.exports = function(n, i, a, o) { return i.length > 0 && Array.isArray(i[0]) ? e(n, i, a, o) : r(n, i, a, o); }, ub.exports.nested = e, ub.exports.flat = r, ub.exports; } -var Ab = { exports: {} }, jue = Ab.exports, C9; -function Bue() { +var Ab = { exports: {} }, Bue = Ab.exports, C9; +function Fue() { return C9 || (C9 = 1, (function(r, e) { (function(t, n) { n(e); - })(jue, function(t) { + })(Bue, function(t) { const i = 33306690738754706e-32; function a(g, y, b, _, m) { let x, S, O, E, T = y[0], P = _[0], I = 0, k = 0; @@ -79489,20 +79501,20 @@ function Bue() { if (S === 0 || O === 0 || S > 0 != O > 0) return E; const T = Math.abs(S + O); return Math.abs(E) >= s * T ? E : -(function(P, I, k, L, B, j, z) { - let H, q, W, $, J, X, Q, ue, re, ne, le, ce, pe, fe, se, de, ge, Oe; - const ke = P - B, Me = k - B, Ne = I - j, Ce = L - j; - J = (se = (ue = ke - (Q = (X = 134217729 * ke) - (X - ke))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = ke * Ce) - Q * re - ue * re - Q * ne)) - (le = se - (ge = (ue = Ne - (Q = (X = 134217729 * Ne) - (X - Ne))) * (ne = Me - (re = (X = 134217729 * Me) - (X - Me))) - ((de = Ne * Me) - Q * re - ue * re - Q * ne))), c[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), c[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, c[2] = ce - (Oe - J) + (le - J), c[3] = Oe; - let Y = (function(De, Ie) { + let H, q, W, $, J, X, Z, ue, re, ne, le, ce, pe, fe, se, de, ge, Oe; + const ke = P - B, De = k - B, Ne = I - j, Ce = L - j; + J = (se = (ue = ke - (Z = (X = 134217729 * ke) - (X - ke))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = ke * Ce) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = Ne - (Z = (X = 134217729 * Ne) - (X - Ne))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = Ne * De) - Z * re - ue * re - Z * ne))), c[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), c[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, c[2] = ce - (Oe - J) + (le - J), c[3] = Oe; + let Y = (function(Me, Ie) { let Ye = Ie[0]; - for (let ot = 1; ot < De; ot++) Ye += Ie[ot]; + for (let ot = 1; ot < Me; ot++) Ye += Ie[ot]; return Ye; - })(4, c), Z = u * z; - if (Y >= Z || -Y >= Z || (H = P - (ke + (J = P - ke)) + (J - B), W = k - (Me + (J = k - Me)) + (J - B), q = I - (Ne + (J = I - Ne)) + (J - j), $ = L - (Ce + (J = L - Ce)) + (J - j), H === 0 && q === 0 && W === 0 && $ === 0) || (Z = l * z + i * Math.abs(Y), (Y += ke * $ + Ce * H - (Ne * W + Me * q)) >= Z || -Y >= Z)) return Y; - J = (se = (ue = H - (Q = (X = 134217729 * H) - (X - H))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = H * Ce) - Q * re - ue * re - Q * ne)) - (le = se - (ge = (ue = q - (Q = (X = 134217729 * q) - (X - q))) * (ne = Me - (re = (X = 134217729 * Me) - (X - Me))) - ((de = q * Me) - Q * re - ue * re - Q * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; + })(4, c), Q = u * z; + if (Y >= Q || -Y >= Q || (H = P - (ke + (J = P - ke)) + (J - B), W = k - (De + (J = k - De)) + (J - B), q = I - (Ne + (J = I - Ne)) + (J - j), $ = L - (Ce + (J = L - Ce)) + (J - j), H === 0 && q === 0 && W === 0 && $ === 0) || (Q = l * z + i * Math.abs(Y), (Y += ke * $ + Ce * H - (Ne * W + De * q)) >= Q || -Y >= Q)) return Y; + J = (se = (ue = H - (Z = (X = 134217729 * H) - (X - H))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = H * Ce) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = q - (Z = (X = 134217729 * q) - (X - q))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = q * De) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; const ie = a(4, c, 4, p, f); - J = (se = (ue = ke - (Q = (X = 134217729 * ke) - (X - ke))) * (ne = $ - (re = (X = 134217729 * $) - (X - $))) - ((fe = ke * $) - Q * re - ue * re - Q * ne)) - (le = se - (ge = (ue = Ne - (Q = (X = 134217729 * Ne) - (X - Ne))) * (ne = W - (re = (X = 134217729 * W) - (X - W))) - ((de = Ne * W) - Q * re - ue * re - Q * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; + J = (se = (ue = ke - (Z = (X = 134217729 * ke) - (X - ke))) * (ne = $ - (re = (X = 134217729 * $) - (X - $))) - ((fe = ke * $) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = Ne - (Z = (X = 134217729 * Ne) - (X - Ne))) * (ne = W - (re = (X = 134217729 * W) - (X - W))) - ((de = Ne * W) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; const we = a(ie, f, 4, p, d); - J = (se = (ue = H - (Q = (X = 134217729 * H) - (X - H))) * (ne = $ - (re = (X = 134217729 * $) - (X - $))) - ((fe = H * $) - Q * re - ue * re - Q * ne)) - (le = se - (ge = (ue = q - (Q = (X = 134217729 * q) - (X - q))) * (ne = W - (re = (X = 134217729 * W) - (X - W))) - ((de = q * W) - Q * re - ue * re - Q * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; + J = (se = (ue = H - (Z = (X = 134217729 * H) - (X - H))) * (ne = $ - (re = (X = 134217729 * $) - (X - $))) - ((fe = H * $) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = q - (Z = (X = 134217729 * q) - (X - q))) * (ne = W - (re = (X = 134217729 * W) - (X - W))) - ((de = q * W) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; const Ee = a(we, d, 4, p, h); return h[Ee - 1]; })(g, y, b, _, m, x, T); @@ -79513,25 +79525,25 @@ function Bue() { })(Ab, Ab.exports)), Ab.exports; } var A9; -function Fue() { +function Uue() { if (A9) return qw.exports; A9 = 1; - var r = Rue(), e = kue, t = Lue(), n = Bue().orient2d; + var r = Pue(), e = Iue, t = jue(), n = Fue().orient2d; e.default && (e = e.default), qw.exports = i, qw.exports.default = i; function i(x, S, O) { S = Math.max(0, S === void 0 ? 2 : S), O = O || 0; var E = h(x), T = new r(16); - T.toBBox = function(Q) { + T.toBBox = function(Z) { return { - minX: Q[0], - minY: Q[1], - maxX: Q[0], - maxY: Q[1] + minX: Z[0], + minY: Z[1], + maxX: Z[0], + maxY: Z[1] }; - }, T.compareMinX = function(Q, ue) { - return Q[0] - ue[0]; - }, T.compareMinY = function(Q, ue) { - return Q[1] - ue[1]; + }, T.compareMinX = function(Z, ue) { + return Z[0] - ue[0]; + }, T.compareMinY = function(Z, ue) { + return Z[1] - ue[1]; }, T.load(x); for (var P = [], I = 0, k; I < E.length; I++) { var L = E[I]; @@ -79637,10 +79649,10 @@ function Fue() { return P = x[0] - E, I = x[1] - T, P * P + I * I; } function b(x, S, O, E, T, P, I, k) { - var L = O - x, B = E - S, j = I - T, z = k - P, H = x - T, q = S - P, W = L * L + B * B, $ = L * j + B * z, J = j * j + z * z, X = L * H + B * q, Q = j * H + z * q, ue = W * J - $ * $, re, ne, le, ce, pe = ue, fe = ue; - ue === 0 ? (ne = 0, pe = 1, ce = Q, fe = J) : (ne = $ * Q - J * X, ce = W * Q - $ * X, ne < 0 ? (ne = 0, ce = Q, fe = J) : ne > pe && (ne = pe, ce = Q + $, fe = J)), ce < 0 ? (ce = 0, -X < 0 ? ne = 0 : -X > W ? ne = pe : (ne = -X, pe = W)) : ce > fe && (ce = fe, -X + $ < 0 ? ne = 0 : -X + $ > W ? ne = pe : (ne = -X + $, pe = W)), re = ne === 0 ? 0 : ne / pe, le = ce === 0 ? 0 : ce / fe; - var se = (1 - re) * x + re * O, de = (1 - re) * S + re * E, ge = (1 - le) * T + le * I, Oe = (1 - le) * P + le * k, ke = ge - se, Me = Oe - de; - return ke * ke + Me * Me; + var L = O - x, B = E - S, j = I - T, z = k - P, H = x - T, q = S - P, W = L * L + B * B, $ = L * j + B * z, J = j * j + z * z, X = L * H + B * q, Z = j * H + z * q, ue = W * J - $ * $, re, ne, le, ce, pe = ue, fe = ue; + ue === 0 ? (ne = 0, pe = 1, ce = Z, fe = J) : (ne = $ * Z - J * X, ce = W * Z - $ * X, ne < 0 ? (ne = 0, ce = Z, fe = J) : ne > pe && (ne = pe, ce = Z + $, fe = J)), ce < 0 ? (ce = 0, -X < 0 ? ne = 0 : -X > W ? ne = pe : (ne = -X, pe = W)) : ce > fe && (ce = fe, -X + $ < 0 ? ne = 0 : -X + $ > W ? ne = pe : (ne = -X + $, pe = W)), re = ne === 0 ? 0 : ne / pe, le = ce === 0 ? 0 : ce / fe; + var se = (1 - re) * x + re * O, de = (1 - re) * S + re * E, ge = (1 - le) * T + le * I, Oe = (1 - le) * P + le * k, ke = ge - se, De = Oe - de; + return ke * ke + De * De; } function _(x, S) { return x[0] === S[0] ? x[1] - S[1] : x[0] - S[0]; @@ -79661,22 +79673,22 @@ function Fue() { } return qw.exports; } -var Uue = Fue(); -const zue = /* @__PURE__ */ Bp(Uue), R9 = 10, que = 500, Gue = (r, e, t, n) => { +var zue = Uue(); +const que = /* @__PURE__ */ Bp(zue), R9 = 10, Gue = 500, Vue = (r, e, t, n) => { const i = (n[1] - t[1]) * (e[0] - r[0]) - (n[0] - t[0]) * (e[1] - r[1]); if (i === 0) return !1; const a = ((r[1] - t[1]) * (n[0] - t[0]) - (r[0] - t[0]) * (n[1] - t[1])) / i, o = ((t[0] - r[0]) * (e[1] - r[1]) - (t[1] - r[1]) * (e[0] - r[0])) / i; return a > 0 && a < 1 && o > 0 && o < 1; -}, Vue = (r) => { +}, Hue = (r) => { for (let e = 0; e < r.length - 1; e++) for (let t = e + 2; t < r.length; t++) { const n = r[e] ?? [0, 0], i = r[e + 1] ?? [0, 0], a = r[t] ?? [0, 0], o = t < r.length - 1 ? t + 1 : 0, s = r[o] ?? [0, 0]; - if (Gue(n, i, a, s)) + if (Vue(n, i, a, s)) return !0; } return !1; -}, Hue = (r, e, t) => { +}, Wue = (r, e, t) => { let n = !1; for (let i = 0, a = t.length - 1; i < t.length; a = i, i += 1) { const o = t[i], s = t[a]; @@ -79719,7 +79731,7 @@ class P9 extends Wp { Ft(this, "getLassoItems", (t) => { const n = t.map((l) => j1(this.nvlInstance, l)), i = this.nvlInstance.getNodePositions(), a = /* @__PURE__ */ new Set(); for (const l of i) - l.x === void 0 || l.y === void 0 || l.id === void 0 || Hue(l.x, l.y, n) && a.add(l.id); + l.x === void 0 || l.y === void 0 || l.id === void 0 || Wue(l.x, l.y, n) && a.add(l.id); const o = this.nvlInstance.getRelationships(), s = []; for (const l of o) a.has(l.from) && a.has(l.to) && s.push(l); @@ -79732,8 +79744,8 @@ class P9 extends Wp { if (!this.active) return; this.active = !1, this.toggleGlobalTextSelection(!0, this.endLasso); - const n = this.points.map((s) => [s.x, s.y]), a = (Vue(n) ? zue(n, 2) : n).map((s) => ({ x: s[0], y: s[1] })).filter((s) => s.x !== void 0 && s.y !== void 0); - this.overlayRenderer.drawLasso(a, !1, !0), setTimeout(() => this.overlayRenderer.clear(), que); + const n = this.points.map((s) => [s.x, s.y]), a = (Hue(n) ? que(n, 2) : n).map((s) => ({ x: s[0], y: s[1] })).filter((s) => s.x !== void 0 && s.y !== void 0); + this.overlayRenderer.drawLasso(a, !1, !0), setTimeout(() => this.overlayRenderer.clear(), Gue); const o = this.getLassoItems(a); this.currentOptions.selectOnRelease === !0 && this.nvlInstance.updateElementsInGraph(o.nodes.map((s) => ({ id: s.id, selected: !0 })), o.rels.map((s) => ({ id: s.id, selected: !0 }))), this.callCallbackIfRegistered("onLassoSelect", o, t); }); @@ -79746,7 +79758,7 @@ class P9 extends Wp { this.toggleGlobalTextSelection(!0, this.endLasso), this.removeEventListener("mousedown", this.handleMouseDown, !0), this.removeEventListener("mousemove", this.handleDrag, !0), this.removeEventListener("mouseup", this.handleMouseUp, !0), this.overlayRenderer.destroy(); } } -class Wue extends Wp { +class Yue extends Wp { /** * Creates a new instance of the pan interaction handler. * @param nvl - The NVL instance to attach the interaction handler to. @@ -79839,7 +79851,7 @@ class M9 extends Wp { Ft(this, "throttledZoom", os.throttle((t) => { const n = this.nvlInstance.getScale(), { x: i, y: a } = this.nvlInstance.getPan(); this.zoomLimits = this.nvlInstance.getZoomLimits(); - const s = t.ctrlKey || t.metaKey ? 75 : 500, u = t.deltaY / s, l = n >= 1 ? u * n : u, c = n - l * Math.min(1, n), f = c > this.zoomLimits.maxZoom || c < this.zoomLimits.minZoom, d = Tue(this.containerInstance, t); + const s = t.ctrlKey || t.metaKey ? 75 : 500, u = t.deltaY / s, l = n >= 1 ? u * n : u, c = n - l * Math.min(1, n), f = c > this.zoomLimits.maxZoom || c < this.zoomLimits.minZoom, d = Cue(this.containerInstance, t); let h = i, p = a; f || (h = i + (d.x / n - d.x / c), p = a + (d.y / n - d.y / c)), this.currentOptions.controlledZoom !== !0 && this.nvlInstance.setZoomAndPan(c, h, p), this.callCallbackIfRegistered("onZoom", c, t), this.callCallbackIfRegistered("onZoomAndPan", c, h, p, t); }, 25, { leading: !0 })); @@ -79860,28 +79872,28 @@ const av = (r) => { const o = i.current; os.isNil(o) || os.isNil(o.getContainer()) || (t === !0 || typeof t == "function" ? (os.isNil(e.current) && (e.current = new r(o, a)), typeof t == "function" ? e.current.updateCallback(n, t) : os.isNil(e.current.callbackMap[n]) || e.current.removeCallback(n)) : t === !1 && av(e)); }, [r, t, n, a, e, i]); -}, Yue = ({ nvlRef: r, mouseEventCallbacks: e, interactionOptions: t }) => { +}, Xue = ({ nvlRef: r, mouseEventCallbacks: e, interactionOptions: t }) => { const n = me.useRef(null), i = me.useRef(null), a = me.useRef(null), o = me.useRef(null), s = me.useRef(null), u = me.useRef(null), l = me.useRef(null), c = me.useRef(null); - return Ha(Cue, n, e.onHover, "onHover", r, t), Ha(iv, i, e.onNodeClick, "onNodeClick", r, t), Ha(iv, i, e.onNodeDoubleClick, "onNodeDoubleClick", r, t), Ha(iv, i, e.onNodeRightClick, "onNodeRightClick", r, t), Ha(iv, i, e.onRelationshipClick, "onRelationshipClick", r, t), Ha(iv, i, e.onRelationshipDoubleClick, "onRelationshipDoubleClick", r, t), Ha(iv, i, e.onRelationshipRightClick, "onRelationshipRightClick", r, t), Ha(iv, i, e.onCanvasClick, "onCanvasClick", r, t), Ha(iv, i, e.onCanvasDoubleClick, "onCanvasDoubleClick", r, t), Ha(iv, i, e.onCanvasRightClick, "onCanvasRightClick", r, t), Ha(Wue, a, e.onPan, "onPan", r, t), Ha(M9, o, e.onZoom, "onZoom", r, t), Ha(M9, o, e.onZoomAndPan, "onZoomAndPan", r, t), Ha(WP, s, e.onDrag, "onDrag", r, t), Ha(WP, s, e.onDragStart, "onDragStart", r, t), Ha(WP, s, e.onDragEnd, "onDragEnd", r, t), Ha(YP, u, e.onHoverNodeMargin, "onHoverNodeMargin", r, t), Ha(YP, u, e.onDrawStarted, "onDrawStarted", r, t), Ha(YP, u, e.onDrawEnded, "onDrawEnded", r, t), Ha(x9, l, e.onBoxStarted, "onBoxStarted", r, t), Ha(x9, l, e.onBoxSelect, "onBoxSelect", r, t), Ha(P9, c, e.onLassoStarted, "onLassoStarted", r, t), Ha(P9, c, e.onLassoSelect, "onLassoSelect", r, t), me.useEffect(() => () => { + return Ha(Aue, n, e.onHover, "onHover", r, t), Ha(iv, i, e.onNodeClick, "onNodeClick", r, t), Ha(iv, i, e.onNodeDoubleClick, "onNodeDoubleClick", r, t), Ha(iv, i, e.onNodeRightClick, "onNodeRightClick", r, t), Ha(iv, i, e.onRelationshipClick, "onRelationshipClick", r, t), Ha(iv, i, e.onRelationshipDoubleClick, "onRelationshipDoubleClick", r, t), Ha(iv, i, e.onRelationshipRightClick, "onRelationshipRightClick", r, t), Ha(iv, i, e.onCanvasClick, "onCanvasClick", r, t), Ha(iv, i, e.onCanvasDoubleClick, "onCanvasDoubleClick", r, t), Ha(iv, i, e.onCanvasRightClick, "onCanvasRightClick", r, t), Ha(Yue, a, e.onPan, "onPan", r, t), Ha(M9, o, e.onZoom, "onZoom", r, t), Ha(M9, o, e.onZoomAndPan, "onZoomAndPan", r, t), Ha(HP, s, e.onDrag, "onDrag", r, t), Ha(HP, s, e.onDragStart, "onDragStart", r, t), Ha(HP, s, e.onDragEnd, "onDragEnd", r, t), Ha(WP, u, e.onHoverNodeMargin, "onHoverNodeMargin", r, t), Ha(WP, u, e.onDrawStarted, "onDrawStarted", r, t), Ha(WP, u, e.onDrawEnded, "onDrawEnded", r, t), Ha(x9, l, e.onBoxStarted, "onBoxStarted", r, t), Ha(x9, l, e.onBoxSelect, "onBoxSelect", r, t), Ha(P9, c, e.onLassoStarted, "onLassoStarted", r, t), Ha(P9, c, e.onLassoSelect, "onLassoSelect", r, t), me.useEffect(() => () => { av(n), av(i), av(a), av(o), av(s), av(u), av(l), av(c); }, []), null; -}, Xue = { +}, $ue = { selectOnClick: !1, drawShadowOnHover: !0, selectOnRelease: !1, excludeNodeMargin: !0 -}, $ue = me.memo(me.forwardRef(({ nodes: r, rels: e, layout: t, layoutOptions: n, onInitializationError: i, mouseEventCallbacks: a = {}, nvlCallbacks: o = {}, nvlOptions: s = {}, interactionOptions: u = Xue, ...l }, c) => { +}, Kue = me.memo(me.forwardRef(({ nodes: r, rels: e, layout: t, layoutOptions: n, onInitializationError: i, mouseEventCallbacks: a = {}, nvlCallbacks: o = {}, nvlOptions: s = {}, interactionOptions: u = $ue, ...l }, c) => { const f = me.useRef(null), d = c ?? f, [h, p] = me.useState(!1), g = me.useCallback(() => { p(!0); }, []), y = me.useCallback((_) => { p(!1), i && i(_); }, [i]), b = h && d.current !== null; - return Te.jsxs(Te.Fragment, { children: [Te.jsx(Oue, { ref: d, nodes: r, id: _ue, rels: e, nvlOptions: s, nvlCallbacks: { + return Te.jsxs(Te.Fragment, { children: [Te.jsx(Tue, { ref: d, nodes: r, id: wue, rels: e, nvlOptions: s, nvlCallbacks: { ...o, onInitialization: () => { o.onInitialization !== void 0 && o.onInitialization(), g(); } - }, layout: t, layoutOptions: n, onInitializationError: y, ...l }), b && Te.jsx(Yue, { nvlRef: d, mouseEventCallbacks: a, interactionOptions: u })] }); + }, layout: t, layoutOptions: n, onInitializationError: y, ...l }), b && Te.jsx(Xue, { nvlRef: d, mouseEventCallbacks: a, interactionOptions: u })] }); })), MG = me.createContext(void 0), Vl = () => { const r = me.useContext(MG); if (!r) @@ -79903,28 +79915,28 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { return !0; } return !1; -}, Kue = (r, e) => { +}, Zue = (r, e) => { const t = e.toLowerCase(); return r.filter((n) => { var i; return !((i = n.labelsSorted) === null || i === void 0) && i.some((a) => a.toLowerCase().includes(t)) ? !0 : DG(n.properties, t); }).map((n) => n.id); -}, Zue = (r, e) => { +}, Que = (r, e) => { const t = e.toLowerCase(); return r.filter((n) => n.type.toLowerCase().includes(t) ? !0 : DG(n.properties, t)).map((n) => n.id); }, a0 = (r) => { const { isActive: e, ariaLabel: t, isDisabled: n, description: i, onClick: a, onMouseDown: o, tooltipPlacement: s, className: u, style: l, htmlAttributes: c, children: f } = r; - return Te.jsx(O2, { description: i ?? t, tooltipProps: { + return Te.jsx(S2, { description: i ?? t, tooltipProps: { content: { style: { whiteSpace: "nowrap" } }, root: { isPortaled: !1, placement: s } }, size: "small", className: u, style: l, isActive: e, isDisabled: n, onClick: a, htmlAttributes: Object.assign({ onMouseDown: o }, c), children: f }); -}, Que = (r) => r instanceof HTMLElement ? r.isContentEditable || ["INPUT", "TEXTAREA"].includes(r.tagName) : !1, Jue = (r) => Que(r.target), a_ = { +}, Jue = (r) => r instanceof HTMLElement ? r.isContentEditable || ["INPUT", "TEXTAREA"].includes(r.tagName) : !1, ele = (r) => Jue(r.target), a_ = { box: "B", lasso: "L", single: "S" -}, pE = (r) => { +}, vE = (r) => { const { setGesture: e } = Vl(), t = me.useCallback((n) => { - if (!Jue(n) && e !== void 0) { + if (!ele(n) && e !== void 0) { const i = n.key.toUpperCase(); for (const a of r) i === a_[a] && e(a); @@ -79933,19 +79945,19 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { me.useEffect(() => (document.addEventListener("keydown", t), () => { document.removeEventListener("keydown", t); }), [t]); -}, $D = " ", ele = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { +}, $D = " ", tle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return pE(["single"]), Te.jsx(a0, { isActive: i === "single", isDisabled: o !== "select", ariaLabel: "Individual Select Button", description: `Individual Select ${$D} ${a_.single}`, onClick: () => { + return vE(["single"]), Te.jsx(a0, { isActive: i === "single", isDisabled: o !== "select", ariaLabel: "Individual Select Button", description: `Individual Select ${$D} ${a_.single}`, onClick: () => { a == null || a("single"); }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-individual-select" }, t), className: r, style: e, children: Te.jsx(l2, { "aria-label": "Individual Select" }) }); -}, tle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { +}, rle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return pE(["box"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "box", ariaLabel: "Box Select Button", description: `Box Select ${$D} ${a_.box}`, onClick: () => { + return vE(["box"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "box", ariaLabel: "Box Select Button", description: `Box Select ${$D} ${a_.box}`, onClick: () => { a == null || a("box"); }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-box-select" }, t), className: r, style: e, children: Te.jsx(q9, { "aria-label": "Box select" }) }); -}, rle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { +}, nle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return pE(["lasso"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "lasso", ariaLabel: "Lasso Select Button", description: `Lasso Select ${$D} ${a_.lasso}`, onClick: () => { + return vE(["lasso"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "lasso", ariaLabel: "Lasso Select Button", description: `Lasso Select ${$D} ${a_.lasso}`, onClick: () => { a == null || a("lasso"); }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-lasso-select" }, t), className: r, style: e, children: Te.jsx(z9, { "aria-label": "Lasso select" }) }); }, kG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { @@ -79980,7 +79992,7 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { if (!i) throw new Error("Using the ToggleSidePanelButton requires having a sidepanel"); const { isSidePanelOpen: a, setIsSidePanelOpen: o } = i; - return Te.jsx(C2, { size: "small", onClick: () => o == null ? void 0 : o(!a), isFloating: !0, description: a ? "Close" : "Open", isActive: a, tooltipProps: { + return Te.jsx(T2, { size: "small", onClick: () => o == null ? void 0 : o(!a), isFloating: !0, description: a ? "Close" : "Open", isActive: a, tooltipProps: { content: { style: { whiteSpace: "nowrap" } }, root: { isPortaled: !1, @@ -79988,7 +80000,7 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { shouldCloseOnReferenceClick: !0 } }, className: Vn("ndl-graph-visualization-toggle-sidepanel", r), style: t, htmlAttributes: Object.assign({ "aria-label": "Toggle node properties panel" }, e), children: Te.jsx(TV, { className: "ndl-graph-visualization-toggle-icon" }) }); -}, nle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, open: i, setOpen: a, searchTerm: o, setSearchTerm: s, onSearch: u = () => { +}, ile = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, open: i, setOpen: a, searchTerm: o, setSearchTerm: s, onSearch: u = () => { } }) => { const l = me.useRef(null), [c, f] = Lg({ isControlled: i !== void 0, @@ -80004,9 +80016,9 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { return; } const b = Object.values(p.dataLookupTable.nodes), _ = Object.values(p.dataLookupTable.relationships); - u(Kue(b, y), Zue(_, y)); + u(Zue(b, y), Que(_, y)); }; - return Te.jsx(Te.Fragment, { children: c ? Te.jsx($Y, { ref: l, size: "small", leadingElement: Te.jsx(lk, {}), trailingElement: Te.jsx(O2, { onClick: () => { + return Te.jsx(Te.Fragment, { children: c ? Te.jsx(KY, { ref: l, size: "small", leadingElement: Te.jsx(lk, {}), trailingElement: Te.jsx(S2, { onClick: () => { var y; g(""), (y = l.current) === null || y === void 0 || y.focus(); }, description: "Clear search", children: Te.jsx(H9, {}) }), placeholder: "Search...", value: d, onChange: (y) => g(y.target.value), htmlAttributes: { @@ -80014,18 +80026,18 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { onBlur: () => { d === "" && f(!1); } - } }) : Te.jsx(C2, { size: "small", isFloating: !0, onClick: () => f((y) => !y), description: "Search", className: r, style: e, htmlAttributes: t, tooltipProps: { + } }) : Te.jsx(T2, { size: "small", isFloating: !0, onClick: () => f((y) => !y), description: "Search", className: r, style: e, htmlAttributes: t, tooltipProps: { root: { placement: n ?? "bottom" } }, children: Te.jsx(lk, {}) }) }); }, jG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { nvlInstance: i } = Vl(), [a, o] = me.useState(!1), s = () => o(!1), u = me.useRef(null); - return Te.jsxs(Te.Fragment, { children: [Te.jsx(C2, { ref: u, size: "small", isFloating: !0, onClick: () => o((l) => !l), description: "Download", tooltipProps: { + return Te.jsxs(Te.Fragment, { children: [Te.jsx(T2, { ref: u, size: "small", isFloating: !0, onClick: () => o((l) => !l), description: "Download", tooltipProps: { root: { placement: n ?? "bottom" } }, className: r, style: e, htmlAttributes: t, children: Te.jsx(MV, {}) }), Te.jsx(Lm, { isOpen: a, onClose: s, anchorRef: u, children: Te.jsx(Lm.Item, { title: "Download as PNG", onClick: () => { var l; (l = i.current) === null || l === void 0 || l.saveToFile({}), s(); } }) })] }); -}, ile = { +}, ale = { d3Force: { icon: Te.jsx(bV, {}), title: "Force-based layout" @@ -80034,13 +80046,13 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { icon: Te.jsx(EV, {}), title: "Hierarchical layout" } -}, ale = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, layoutOptions: a = ile }) => { +}, ole = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, layoutOptions: a = ale }) => { var o, s; const u = me.useRef(null), [l, c] = me.useState(!1), { layout: f, setLayout: d } = Vl(); return Te.jsxs(Te.Fragment, { children: [Te.jsx(q7, { description: "Select layout", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { root: { placement: n ?? "bottom" } }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Te.jsx(l2, {}) }), Te.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Te.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); -}, ole = { +}, sle = { single: { icon: Te.jsx(l2, {}), title: "Individual" @@ -80053,15 +80065,15 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { icon: Te.jsx(z9, {}), title: "Lasso" } -}, sle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, gestureOptions: a = ole }) => { +}, ule = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, gestureOptions: a = sle }) => { var o, s; const u = me.useRef(null), [l, c] = me.useState(!1), { gesture: f, setGesture: d } = Vl(); - return pE(Object.keys(a)), Te.jsxs(Te.Fragment, { children: [Te.jsx(q7, { description: "Select gesture", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { + return vE(Object.keys(a)), Te.jsxs(Te.Fragment, { children: [Te.jsx(q7, { description: "Select gesture", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { root: { placement: n ?? "bottom" } - }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Te.jsx(l2, {}) }), Te.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Te.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, trailingContent: Te.jsx(KX, { keys: [a_[h]] }), isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); + }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Te.jsx(l2, {}) }), Te.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Te.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, trailingContent: Te.jsx(ZX, { keys: [a_[h]] }), isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); }, ty = ({ sidepanel: r }) => { const { children: e, isSidePanelOpen: t, sidePanelWidth: n, onSidePanelResize: i, minWidth: a = 230 } = r; - return t ? Te.jsx(UX, { defaultSize: { + return t ? Te.jsx(zX, { defaultSize: { height: "100%", width: n ?? 400 }, className: "ndl-graph-resizable", minWidth: a, maxWidth: "66%", enable: { @@ -80076,10 +80088,10 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { }, handleClasses: { left: "ndl-sidepanel-handle" }, onResizeStop: (o, s, u) => { i(u.getBoundingClientRect().width); }, children: Te.jsx("div", { className: "ndl-graph-visualization-sidepanel-content", tabIndex: 0, children: e }) }) : null; -}, ule = ({ children: r }) => Te.jsx("div", { className: "ndl-graph-visualization-sidepanel-title ndl-grid-area-title", children: r }); -ty.Title = ule; -const lle = ({ children: r }) => Te.jsx("section", { className: "ndl-grid-area-content", children: r }); -ty.Content = lle; +}, lle = ({ children: r }) => Te.jsx("div", { className: "ndl-graph-visualization-sidepanel-title ndl-grid-area-title", children: r }); +ty.Title = lle; +const cle = ({ children: r }) => Te.jsx("section", { className: "ndl-grid-area-content", children: r }); +ty.Content = cle; var hx = { exports: {} }; /** * chroma.js - JavaScript library for color conversions @@ -80137,12 +80149,12 @@ var hx = { exports: {} }; * * @preserve */ -var cle = hx.exports, k9; -function fle() { +var fle = hx.exports, k9; +function dle() { return k9 || (k9 = 1, (function(r, e) { (function(t, n) { r.exports = n(); - })(cle, (function() { + })(fle, (function() { for (var t = function(K, oe, ye) { return oe === void 0 && (oe = 0), ye === void 0 && (ye = 1), K < oe ? oe : K > ye ? ye : K; }, n = t, i = function(K) { @@ -80244,11 +80256,11 @@ function fle() { return "cmyk"; } }); - var Q = g.unpack, ue = g.last, re = function(K) { + var Z = g.unpack, ue = g.last, re = function(K) { return Math.round(K * 100) / 100; }, ne = function() { for (var K = [], oe = arguments.length; oe--; ) K[oe] = arguments[oe]; - var ye = Q(K, "hsla"), Pe = ue(K) || "lsa"; + var ye = Z(K, "hsla"), Pe = ue(K) || "lsa"; return ye[0] = re(ye[0] || 0), ye[1] = re(ye[1] * 100) + "%", ye[2] = re(ye[2] * 100) + "%", Pe === "hsla" || ye.length > 3 && ye[3] < 1 ? (ye[3] = ye.length > 3 ? ye[3] : 1, Pe = "hsla") : ye.length = 3, Pe + "(" + ye.join(",") + ")"; }, le = ne, ce = g.unpack, pe = function() { for (var K = [], oe = arguments.length; oe--; ) K[oe] = arguments[oe]; @@ -80257,11 +80269,11 @@ function fle() { ye /= 255, Pe /= 255, ze /= 255; var Ge = Math.min(ye, Pe, ze), Be = Math.max(ye, Pe, ze), Ke = (Be + Ge) / 2, Je, gt; return Be === Ge ? (Je = 0, gt = Number.NaN) : Je = Ke < 0.5 ? (Be - Ge) / (Be + Ge) : (Be - Ge) / (2 - Be - Ge), ye == Be ? gt = (Pe - ze) / (Be - Ge) : Pe == Be ? gt = 2 + (ze - ye) / (Be - Ge) : ze == Be && (gt = 4 + (ye - Pe) / (Be - Ge)), gt *= 60, gt < 0 && (gt += 360), K.length > 3 && K[3] !== void 0 ? [gt, Je, Ke, K[3]] : [gt, Je, Ke]; - }, fe = pe, se = g.unpack, de = g.last, ge = le, Oe = fe, ke = Math.round, Me = function() { + }, fe = pe, se = g.unpack, de = g.last, ge = le, Oe = fe, ke = Math.round, De = function() { for (var K = [], oe = arguments.length; oe--; ) K[oe] = arguments[oe]; var ye = se(K, "rgba"), Pe = de(K) || "rgb"; return Pe.substr(0, 3) == "hsl" ? ge(Oe(ye), Pe) : (ye[0] = ke(ye[0]), ye[1] = ke(ye[1]), ye[2] = ke(ye[2]), (Pe === "rgba" || ye.length > 3 && ye[3] < 1) && (ye[3] = ye.length > 3 ? ye[3] : 1, Pe = "rgba"), Pe + "(" + ye.slice(0, Pe === "rgb" ? 3 : 4).join(",") + ")"); - }, Ne = Me, Ce = g.unpack, Y = Math.round, Z = function() { + }, Ne = De, Ce = g.unpack, Y = Math.round, Q = function() { for (var K, oe = [], ye = arguments.length; ye--; ) oe[ye] = arguments[ye]; oe = Ce(oe, "hsl"); var Pe = oe[0], ze = oe[1], Ge = oe[2], Be, Ke, Je; @@ -80275,7 +80287,7 @@ function fle() { K = [Y(dt[0] * 255), Y(dt[1] * 255), Y(dt[2] * 255)], Be = K[0], Ke = K[1], Je = K[2]; } return oe.length > 3 ? [Be, Ke, Je, oe[3]] : [Be, Ke, Je, 1]; - }, ie = Z, we = ie, Ee = y, De = /^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/, Ie = /^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/, Ye = /^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, ot = /^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, mt = /^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, wt = /^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, Mt = Math.round, Dt = function(K) { + }, ie = Q, we = ie, Ee = y, Me = /^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/, Ie = /^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/, Ye = /^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, ot = /^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, mt = /^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/, wt = /^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/, Mt = Math.round, Dt = function(K) { K = K.toLowerCase().trim(); var oe; if (Ee.format.named) @@ -80283,7 +80295,7 @@ function fle() { return Ee.format.named(K); } catch { } - if (oe = K.match(De)) { + if (oe = K.match(Me)) { for (var ye = oe.slice(1, 4), Pe = 0; Pe < 3; Pe++) ye[Pe] = +ye[Pe]; return ye[3] = 1, ye; @@ -80317,7 +80329,7 @@ function fle() { } }; Dt.test = function(K) { - return De.test(K) || Ie.test(K) || Ye.test(K) || ot.test(K) || mt.test(K) || wt.test(K); + return Me.test(K) || Ie.test(K) || Ye.test(K) || ot.test(K) || mt.test(K) || wt.test(K); }; var vt = Dt, tt = T, _e = O, Ue = y, Qe = g.type, Ze = Ne, nt = vt; _e.prototype.css = function(K) { @@ -81617,8 +81629,8 @@ function fle() { })); })(hx)), hx.exports; } -var dle = fle(); -const BG = /* @__PURE__ */ Bp(dle), hle = (r, e) => `#${[parseInt(r.substring(1, 3), 16), parseInt(r.substring(3, 5), 16), parseInt(r.substring(5, 7), 16)].map((t) => { +var hle = dle(); +const BG = /* @__PURE__ */ Bp(hle), vle = (r, e) => `#${[parseInt(r.substring(1, 3), 16), parseInt(r.substring(3, 5), 16), parseInt(r.substring(5, 7), 16)].map((t) => { let n = parseInt((t * (100 + e) / 100).toString(), 10); const i = (n = n < 255 ? n : 255).toString(16); return i.length === 1 ? `0${i}` : i; @@ -81630,7 +81642,7 @@ function FG(r) { e = (e << 5) - e + r.charCodeAt(t) << 0, t += 1; return e; } -function KP(r) { +function $P(r) { return FG(r) + 2147483647 + 1; } function UG(r, e, t = !1, n = 4.5) { @@ -81640,20 +81652,20 @@ function UG(r, e, t = !1, n = 4.5) { s > a && (i = o, a = s); }), a < n && t ? UG(r, [i, "#000000", "#ffffff"], !1, n) : i; } -function vle(r, e = {}) { - const { lightMax: t = 95, lightMin: n = 70, chromaMax: i = 20, chromaMin: a = 5 } = e, o = KP(FG(r).toString()), s = KP(o.toString()), u = KP(s.toString()), l = (c, f, d) => c % (d - f) + f; +function ple(r, e = {}) { + const { lightMax: t = 95, lightMin: n = 70, chromaMax: i = 20, chromaMin: a = 5 } = e, o = $P(FG(r).toString()), s = $P(o.toString()), u = $P(s.toString()), l = (c, f, d) => c % (d - f) + f; return BG.oklch(l(o, n, t) / 100, l(s, a, i) / 100, l(u, 0, 360)).hex(); } -function ple(r, e) { - const t = vle(r, e), n = hle(t, -20), i = UG(t, ["#2A2C34", "#FFFFFF"]); +function gle(r, e) { + const t = ple(r, e), n = vle(t, -20), i = UG(t, ["#2A2C34", "#FFFFFF"]); return { backgroundColor: t, borderColor: n, textColor: i }; } -const ZP = Yu.palette.neutral[40], zG = Yu.palette.neutral[40], QP = (r = "", e = "") => r.toLowerCase().localeCompare(e.toLowerCase()); -function gle(r) { +const KP = Yu.palette.neutral[40], zG = Yu.palette.neutral[40], ZP = (r = "", e = "") => r.toLowerCase().localeCompare(e.toLowerCase()); +function yle(r) { var e; const [t] = r; if (t === void 0) @@ -81668,11 +81680,11 @@ function gle(r) { } function I9(r) { return Object.entries(r).reduce((e, [t, n]) => (e[t] = { - mostCommonColor: gle(n), + mostCommonColor: yle(n), totalCount: n.length }, e), {}); } -const yle = [ +const mle = [ /^name$/i, /^title$/i, /^label$/i, @@ -81680,9 +81692,9 @@ const yle = [ /description$/i, /^.+/ ]; -function mle(r) { +function ble(r) { const e = r.filter((n) => n.type === "property").map((n) => n.captionKey); - for (const n of yle) { + for (const n of mle) { const i = e.find((a) => n.test(a)); if (i !== void 0) return { @@ -81693,13 +81705,13 @@ function mle(r) { const t = r.find((n) => n.type === "type"); return t || r.find((n) => n.type === "id"); } -const ble = (r) => { +const _le = (r) => { const e = Object.keys(r.properties).map((i) => ({ captionKey: i, type: "property" })); e.push({ type: "id" }, { type: "type" }); - const t = mle(e); + const t = ble(e); if ((t == null ? void 0 : t.type) === "property") { const i = r.properties[t.captionKey]; if (i !== void 0) @@ -81708,14 +81720,14 @@ const ble = (r) => { const [n] = r.labels; return (t == null ? void 0 : t.type) === "type" && n !== void 0 ? [{ value: n }] : [{ value: r.id }]; }; -function _le(r, e) { +function wle(r, e) { const t = {}, n = {}, i = {}, a = {}, o = r.map((f) => { var d; - const [h] = f.labels, p = Object.assign(Object.assign({ captions: ble(f), color: (d = f.color) !== null && d !== void 0 ? d : h === void 0 ? zG : ple(h).backgroundColor }, f), { labels: void 0, properties: void 0 }); + const [h] = f.labels, p = Object.assign(Object.assign({ captions: _le(f), color: (d = f.color) !== null && d !== void 0 ? d : h === void 0 ? zG : gle(h).backgroundColor }, f), { labels: void 0, properties: void 0 }); return i[f.id] = { color: p.color, id: f.id, - labelsSorted: [...f.labels].sort(QP), + labelsSorted: [...f.labels].sort(ZP), properties: f.properties }, f.labels.forEach((g) => { var y; @@ -81727,41 +81739,41 @@ function _le(r, e) { }), s = e.map((f) => { var d, h, p; return a[f.id] = { - color: (d = f.color) !== null && d !== void 0 ? d : ZP, + color: (d = f.color) !== null && d !== void 0 ? d : KP, id: f.id, properties: f.properties, type: f.type }, n[f.type] = [ ...(h = n[f.type]) !== null && h !== void 0 ? h : [], - (p = f.color) !== null && p !== void 0 ? p : ZP - ], Object.assign(Object.assign({ captions: [{ value: f.type }], color: ZP }, f), { properties: void 0, type: void 0 }); + (p = f.color) !== null && p !== void 0 ? p : KP + ], Object.assign(Object.assign({ captions: [{ value: f.type }], color: KP }, f), { properties: void 0, type: void 0 }); }), u = I9(t), l = I9(n); return { dataLookupTable: { labelMetaData: u, - labels: Object.keys(u).sort((f, d) => QP(f, d)), + labels: Object.keys(u).sort((f, d) => ZP(f, d)), nodes: i, relationships: a, typeMetaData: l, - types: Object.keys(l).sort((f, d) => QP(f, d)) + types: Object.keys(l).sort((f, d) => ZP(f, d)) }, nodes: o, rels: s }; } const N9 = ( // eslint-disable-next-line /(?:https?|s?ftp|bolt):\/\/(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi -), wle = ({ text: r }) => { +), xle = ({ text: r }) => { var e; const t = r ?? "", n = (e = t.match(N9)) !== null && e !== void 0 ? e : []; return Te.jsx(Te.Fragment, { children: t.split(N9).map((i, a) => Te.jsxs(ao.Fragment, { children: [i, n[a] && // Should be safe from XSS. // Ref: https://mathiasbynens.github.io/rel-noopener/ Te.jsx("a", { href: n[a], target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: n[a] })] }, `clickable-url-${a}`)) }); -}, xle = ao.memo(wle), Ele = "…", Sle = 900, Ole = 150, Tle = 300, Cle = ({ value: r, width: e, type: t }) => { - const [n, i] = me.useState(!1), a = e > Sle ? Tle : Ole, o = () => { +}, Ele = ao.memo(xle), Sle = "…", Ole = 900, Tle = 150, Cle = 300, Ale = ({ value: r, width: e, type: t }) => { + const [n, i] = me.useState(!1), a = e > Ole ? Cle : Tle, o = () => { i(!0); }; let s = n ? r : r.slice(0, a); const u = s.length !== r.length; - return s += u ? Ele : "", Te.jsxs(Te.Fragment, { children: [t.startsWith("Array") && "[", Te.jsx(xle, { text: s }), u && Te.jsx("button", { type: "button", onClick: o, className: "ndl-properties-show-all-button", children: " Show all" }), t.startsWith("Array") && "]"] }); -}, Ale = ({ properties: r, paneWidth: e }) => Te.jsxs("div", { className: "ndl-graph-visualization-properties-table", children: [Te.jsxs("div", { className: "ndl-properties-header", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), Te.jsx(Ed, { variant: "body-small", children: "Value" })] }), Object.entries(r).map(([t, { stringified: n, type: i }]) => Te.jsxs("div", { className: "ndl-properties-row", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-key", children: t }), Te.jsx("div", { className: "ndl-properties-value", children: Te.jsx(Cle, { value: n, width: e, type: i }) }), Te.jsx("div", { className: "ndl-properties-clipboard-button", children: Te.jsx(F7, { textToCopy: `${t}: ${n}`, size: "small", tooltipProps: { placement: "left", type: "simple" } }) })] }, t))] }), Rle = ({ paneWidth: r = 400 }) => { + return s += u ? Sle : "", Te.jsxs(Te.Fragment, { children: [t.startsWith("Array") && "[", Te.jsx(Ele, { text: s }), u && Te.jsx("button", { type: "button", onClick: o, className: "ndl-properties-show-all-button", children: " Show all" }), t.startsWith("Array") && "]"] }); +}, Rle = ({ properties: r, paneWidth: e }) => Te.jsxs("div", { className: "ndl-graph-visualization-properties-table", children: [Te.jsxs("div", { className: "ndl-properties-header", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), Te.jsx(Ed, { variant: "body-small", children: "Value" })] }), Object.entries(r).map(([t, { stringified: n, type: i }]) => Te.jsxs("div", { className: "ndl-properties-row", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-key", children: t }), Te.jsx("div", { className: "ndl-properties-value", children: Te.jsx(Ale, { value: n, width: e, type: i }) }), Te.jsx("div", { className: "ndl-properties-clipboard-button", children: Te.jsx(F7, { textToCopy: `${t}: ${n}`, size: "small", tooltipProps: { placement: "left", type: "simple" } }) })] }, t))] }), Ple = ({ paneWidth: r = 400 }) => { const { selected: e, nvlGraph: t } = Vl(), n = me.useMemo(() => { const [s] = e.nodeIds; if (s !== void 0) @@ -81798,8 +81810,8 @@ const N9 = ( }, children: s }, s); }) : Te.jsx(Ax, { type: "relationship", color: a.data.color, as: "span", htmlAttributes: { tabIndex: 0 - }, children: a.data.type }, a.data.type) }), Te.jsx("div", { className: "ndl-details-divider" }), Te.jsx(Ale, { properties: a.data.properties, paneWidth: r })] })] }); -}, Ple = ({ children: r }) => { + }, children: a.data.type }, a.data.type) }), Te.jsx("div", { className: "ndl-details-divider" }), Te.jsx(Rle, { properties: a.data.properties, paneWidth: r })] })] }); +}, Mle = ({ children: r }) => { const [e, t] = me.useState(0), n = me.useRef(null), i = (u) => { var l, c; const f = (c = (l = n.current) === null || l === void 0 ? void 0 : l.children[u]) === null || c === void 0 ? void 0 : c.children[0]; @@ -81821,15 +81833,15 @@ const N9 = ( return Te.jsx("li", { children: c }, l); }) }) ); -}, Mle = (r) => typeof r == "function"; +}, Dle = (r) => typeof r == "function"; function L9({ initiallyShown: r, children: e, isButtonGroup: t }) { const [n, i] = me.useState(!1), a = () => i((f) => !f), o = e.length, s = o > r, u = n ? o : r, l = o - u; if (o === 0) return null; - const c = e.slice(0, u).map((f) => Mle(f) ? f() : f); - return Te.jsxs(Te.Fragment, { children: [t === !0 ? Te.jsx(Ple, { children: c }) : Te.jsx("div", { style: { all: "inherit" }, children: c }), s && Te.jsx(eX, { size: "small", onClick: a, children: n ? "Show less" : `Show all (${l} more)` })] }); + const c = e.slice(0, u).map((f) => Dle(f) ? f() : f); + return Te.jsxs(Te.Fragment, { children: [t === !0 ? Te.jsx(Mle, { children: c }) : Te.jsx("div", { style: { all: "inherit" }, children: c }), s && Te.jsx(tX, { size: "small", onClick: a, children: n ? "Show less" : `Show all (${l} more)` })] }); } -const j9 = 25, Dle = () => { +const j9 = 25, kle = () => { const { nvlGraph: r } = Vl(); return Te.jsxs(Te.Fragment, { children: [Te.jsx(ty.Title, { children: Te.jsx(Ed, { variant: "title-4", children: "Results overview" }) }), Te.jsx(ty.Content, { children: Te.jsxs("div", { className: "ndl-graph-visualization-overview-panel", children: [r.dataLookupTable.labels.length > 0 && Te.jsxs("div", { className: "ndl-overview-section", children: [Te.jsx("div", { className: "ndl-overview-header", children: Te.jsxs("span", { children: ["Nodes", ` (${r.nodes.length.toLocaleString()})`] }) }), Te.jsx("div", { className: "ndl-overview-items", children: Te.jsx(L9, { initiallyShown: j9, isButtonGroup: !0, children: r.dataLookupTable.labels.map((e) => function() { var n, i, a, o; @@ -81842,24 +81854,24 @@ const j9 = 25, Dle = () => { tabIndex: -1 }, color: (n = (t = r.dataLookupTable.typeMetaData[e]) === null || t === void 0 ? void 0 : t.mostCommonColor) !== null && n !== void 0 ? n : "", as: "span", children: [e, " (", (a = (i = r.dataLookupTable.typeMetaData[e]) === null || i === void 0 ? void 0 : i.totalCount) !== null && a !== void 0 ? a : 0, ")"] }, e); }) }) })] })] }) })] }); -}, kle = () => { +}, Ile = () => { const { selected: r } = Vl(); - return me.useMemo(() => r.nodeIds.length > 0 || r.relationshipIds.length > 0, [r]) ? Te.jsx(Rle, {}) : Te.jsx(Dle, {}); + return me.useMemo(() => r.nodeIds.length > 0 || r.relationshipIds.length > 0, [r]) ? Te.jsx(Ple, {}) : Te.jsx(kle, {}); }, Gw = (r) => !D9 && r.ctrlKey || D9 && r.metaKey, lb = (r) => r.target instanceof HTMLElement ? r.target.isContentEditable || ["INPUT", "TEXTAREA"].includes(r.target.tagName) : !1; -function Ile({ selected: r, setSelected: e, gesture: t, interactionMode: n, setInteractionMode: i, mouseEventCallbacks: a, nvlGraph: o, highlightedNodeIds: s, highlightedRelationshipIds: u }) { - const l = me.useCallback((Me) => { - n === "select" && Me.key === " " && i("pan"); - }, [n, i]), c = me.useCallback((Me) => { - n === "pan" && Me.key === " " && i("select"); +function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setInteractionMode: i, mouseEventCallbacks: a, nvlGraph: o, highlightedNodeIds: s, highlightedRelationshipIds: u }) { + const l = me.useCallback((De) => { + n === "select" && De.key === " " && i("pan"); + }, [n, i]), c = me.useCallback((De) => { + n === "pan" && De.key === " " && i("select"); }, [n, i]); me.useEffect(() => (document.addEventListener("keydown", l), document.addEventListener("keyup", c), () => { document.removeEventListener("keydown", l), document.removeEventListener("keyup", c); }), [l, c]); - const { onBoxSelect: f, onLassoSelect: d, onLassoStarted: h, onBoxStarted: p, onPan: g = !0, onHover: y, onHoverNodeMargin: b, onNodeClick: _, onRelationshipClick: m, onDragStart: x, onDragEnd: S, onDrawEnded: O, onDrawStarted: E, onCanvasClick: T, onNodeDoubleClick: P, onRelationshipDoubleClick: I } = a, k = me.useCallback((Me) => { - lb(Me) || (e({ nodeIds: [], relationshipIds: [] }), typeof T == "function" && T(Me)); - }, [T, e]), L = me.useCallback((Me, Ne) => { + const { onBoxSelect: f, onLassoSelect: d, onLassoStarted: h, onBoxStarted: p, onPan: g = !0, onHover: y, onHoverNodeMargin: b, onNodeClick: _, onRelationshipClick: m, onDragStart: x, onDragEnd: S, onDrawEnded: O, onDrawStarted: E, onCanvasClick: T, onNodeDoubleClick: P, onRelationshipDoubleClick: I } = a, k = me.useCallback((De) => { + lb(De) || (e({ nodeIds: [], relationshipIds: [] }), typeof T == "function" && T(De)); + }, [T, e]), L = me.useCallback((De, Ne) => { i("drag"); - const Ce = Me.map((Y) => Y.id); + const Ce = De.map((Y) => Y.id); if (r.nodeIds.length === 0 || Gw(Ne)) { e({ nodeIds: Ce, @@ -81870,79 +81882,79 @@ function Ile({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI e({ nodeIds: Ce, relationshipIds: r.relationshipIds - }), typeof x == "function" && x(Me, Ne); - }, [e, x, r, i]), B = me.useCallback((Me, Ne) => { - typeof S == "function" && S(Me, Ne), i("select"); - }, [S, i]), j = me.useCallback((Me) => { - typeof E == "function" && E(Me); - }, [E]), z = me.useCallback((Me, Ne, Ce) => { - typeof O == "function" && O(Me, Ne, Ce); - }, [O]), H = me.useCallback((Me, Ne, Ce) => { + }), typeof x == "function" && x(De, Ne); + }, [e, x, r, i]), B = me.useCallback((De, Ne) => { + typeof S == "function" && S(De, Ne), i("select"); + }, [S, i]), j = me.useCallback((De) => { + typeof E == "function" && E(De); + }, [E]), z = me.useCallback((De, Ne, Ce) => { + typeof O == "function" && O(De, Ne, Ce); + }, [O]), H = me.useCallback((De, Ne, Ce) => { if (!lb(Ce)) { if (Gw(Ce)) - if (r.nodeIds.includes(Me.id)) { - const Z = r.nodeIds.filter((ie) => ie !== Me.id); + if (r.nodeIds.includes(De.id)) { + const Q = r.nodeIds.filter((ie) => ie !== De.id); e({ - nodeIds: Z, + nodeIds: Q, relationshipIds: r.relationshipIds }); } else { - const Z = [...r.nodeIds, Me.id]; + const Q = [...r.nodeIds, De.id]; e({ - nodeIds: Z, + nodeIds: Q, relationshipIds: r.relationshipIds }); } else - e({ nodeIds: [Me.id], relationshipIds: [] }); - typeof _ == "function" && _(Me, Ne, Ce); + e({ nodeIds: [De.id], relationshipIds: [] }); + typeof _ == "function" && _(De, Ne, Ce); } - }, [e, r, _]), q = me.useCallback((Me, Ne, Ce) => { + }, [e, r, _]), q = me.useCallback((De, Ne, Ce) => { if (!lb(Ce)) { if (Gw(Ce)) - if (r.relationshipIds.includes(Me.id)) { - const Z = r.relationshipIds.filter((ie) => ie !== Me.id); + if (r.relationshipIds.includes(De.id)) { + const Q = r.relationshipIds.filter((ie) => ie !== De.id); e({ nodeIds: r.nodeIds, - relationshipIds: Z + relationshipIds: Q }); } else { - const Z = [ + const Q = [ ...r.relationshipIds, - Me.id + De.id ]; e({ nodeIds: r.nodeIds, - relationshipIds: Z + relationshipIds: Q }); } else - e({ nodeIds: [], relationshipIds: [Me.id] }); - typeof m == "function" && m(Me, Ne, Ce); - } - }, [e, r, m]), W = me.useCallback((Me, Ne, Ce) => { - lb(Ce) || typeof P == "function" && P(Me, Ne, Ce); - }, [P]), $ = me.useCallback((Me, Ne, Ce) => { - lb(Ce) || typeof I == "function" && I(Me, Ne, Ce); - }, [I]), J = me.useCallback((Me, Ne, Ce) => { - const Y = Me.map((ie) => ie.id), Z = Ne.map((ie) => ie.id); + e({ nodeIds: [], relationshipIds: [De.id] }); + typeof m == "function" && m(De, Ne, Ce); + } + }, [e, r, m]), W = me.useCallback((De, Ne, Ce) => { + lb(Ce) || typeof P == "function" && P(De, Ne, Ce); + }, [P]), $ = me.useCallback((De, Ne, Ce) => { + lb(Ce) || typeof I == "function" && I(De, Ne, Ce); + }, [I]), J = me.useCallback((De, Ne, Ce) => { + const Y = De.map((ie) => ie.id), Q = Ne.map((ie) => ie.id); if (Gw(Ce)) { const ie = r.nodeIds, we = r.relationshipIds, Ee = (Ye, ot) => [ ...new Set([...Ye, ...ot].filter((mt) => !Ye.includes(mt) || !ot.includes(mt))) - ], De = Ee(ie, Y), Ie = Ee(we, Z); + ], Me = Ee(ie, Y), Ie = Ee(we, Q); e({ - nodeIds: De, + nodeIds: Me, relationshipIds: Ie }); } else - e({ nodeIds: Y, relationshipIds: Z }); - }, [e, r]), X = me.useCallback(({ nodes: Me, rels: Ne }, Ce) => { - J(Me, Ne, Ce), typeof d == "function" && d({ nodes: Me, rels: Ne }, Ce); - }, [J, d]), Q = me.useCallback(({ nodes: Me, rels: Ne }, Ce) => { - J(Me, Ne, Ce), typeof f == "function" && f({ nodes: Me, rels: Ne }, Ce); + e({ nodeIds: Y, relationshipIds: Q }); + }, [e, r]), X = me.useCallback(({ nodes: De, rels: Ne }, Ce) => { + J(De, Ne, Ce), typeof d == "function" && d({ nodes: De, rels: Ne }, Ce); + }, [J, d]), Z = me.useCallback(({ nodes: De, rels: Ne }, Ce) => { + J(De, Ne, Ce), typeof f == "function" && f({ nodes: De, rels: Ne }, Ce); }, [J, f]), ue = n === "draw", re = n === "select", ne = re && t === "box", le = re && t === "lasso", ce = n === "pan" || re && t === "single", pe = n === "drag" || n === "select", fe = me.useMemo(() => { - var Me; - return Object.assign(Object.assign({}, a), { onBoxSelect: ne ? Q : !1, onBoxStarted: ne ? p : !1, onCanvasClick: re ? k : !1, onDragEnd: pe ? B : !1, onDragStart: pe ? L : !1, onDrawEnded: ue ? z : !1, onDrawStarted: ue ? j : !1, onHover: re ? y : !1, onHoverNodeMargin: ue ? b : !1, onLassoSelect: le ? X : !1, onLassoStarted: le ? h : !1, onNodeClick: re ? H : !1, onNodeDoubleClick: re ? W : !1, onPan: ce ? g : !1, onRelationshipClick: re ? q : !1, onRelationshipDoubleClick: re ? $ : !1, onZoom: (Me = a.onZoom) !== null && Me !== void 0 ? Me : !0 }); + var De; + return Object.assign(Object.assign({}, a), { onBoxSelect: ne ? Z : !1, onBoxStarted: ne ? p : !1, onCanvasClick: re ? k : !1, onDragEnd: pe ? B : !1, onDragStart: pe ? L : !1, onDrawEnded: ue ? z : !1, onDrawStarted: ue ? j : !1, onHover: re ? y : !1, onHoverNodeMargin: ue ? b : !1, onLassoSelect: le ? X : !1, onLassoStarted: le ? h : !1, onNodeClick: re ? H : !1, onNodeDoubleClick: re ? W : !1, onPan: ce ? g : !1, onRelationshipClick: re ? q : !1, onRelationshipDoubleClick: re ? $ : !1, onZoom: (De = a.onZoom) !== null && De !== void 0 ? De : !0 }); }, [ pe, ne, @@ -81951,7 +81963,7 @@ function Ile({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI ue, re, a, - Q, + Z, p, k, B, @@ -81970,10 +81982,10 @@ function Ile({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI ]), se = me.useMemo(() => ({ nodeIds: new Set(r.nodeIds), relIds: new Set(r.relationshipIds) - }), [r]), de = me.useMemo(() => s !== void 0 ? new Set(s) : null, [s]), ge = me.useMemo(() => u !== void 0 ? new Set(u) : null, [u]), Oe = me.useMemo(() => o.nodes.map((Me) => Object.assign(Object.assign({}, Me), { disabled: de ? !de.has(Me.id) : !1, selected: se.nodeIds.has(Me.id) })), [o.nodes, se, de]), ke = me.useMemo(() => o.rels.map((Me) => Object.assign(Object.assign({}, Me), { disabled: ge ? !ge.has(Me.id) : !1, selected: se.relIds.has(Me.id) })), [o.rels, se, ge]); + }), [r]), de = me.useMemo(() => s !== void 0 ? new Set(s) : null, [s]), ge = me.useMemo(() => u !== void 0 ? new Set(u) : null, [u]), Oe = me.useMemo(() => o.nodes.map((De) => Object.assign(Object.assign({}, De), { disabled: de ? !de.has(De.id) : !1, selected: se.nodeIds.has(De.id) })), [o.nodes, se, de]), ke = me.useMemo(() => o.rels.map((De) => Object.assign(Object.assign({}, De), { disabled: ge ? !ge.has(De.id) : !1, selected: se.relIds.has(De.id) })), [o.rels, se, ge]); return { nodesWithState: Oe, relsWithState: ke, wrappedMouseEventCallbacks: fe }; } -var Nle = function(r, e) { +var Lle = function(r, e) { var t = {}; for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]); if (r != null && typeof Object.getOwnPropertySymbols == "function") @@ -81981,12 +81993,12 @@ var Nle = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const Lle = { +const jle = { "bottom-left": "ndl-graph-visualization-interaction-island ndl-bottom-left", "bottom-right": "ndl-graph-visualization-interaction-island ndl-bottom-right", "top-left": "ndl-graph-visualization-interaction-island ndl-top-left", "top-right": "ndl-graph-visualization-interaction-island ndl-top-right" -}, Vw = ({ children: r, className: e, placement: t }) => Te.jsx("div", { className: Vn(Lle[t], e), children: r }), jle = { +}, Vw = ({ children: r, className: e, placement: t }) => Te.jsx("div", { className: Vn(jle[t], e), children: r }), Ble = { disableTelemetry: !0, disableWebGL: !0, maxZoom: 3, @@ -81994,17 +82006,17 @@ const Lle = { relationshipThreshold: 0.55 }, Hw = { bottomLeftIsland: null, - bottomRightIsland: Te.jsxs(WX, { orientation: "vertical", isFloating: !0, size: "small", children: [Te.jsx(kG, {}), " ", Te.jsx(IG, {}), " ", Te.jsx(NG, {})] }), + bottomRightIsland: Te.jsxs(YX, { orientation: "vertical", isFloating: !0, size: "small", children: [Te.jsx(kG, {}), " ", Te.jsx(IG, {}), " ", Te.jsx(NG, {})] }), topLeftIsland: null, topRightIsland: Te.jsxs("div", { className: "ndl-graph-visualization-default-download-group", children: [Te.jsx(jG, {}), " ", Te.jsx(LG, {})] }) }; function ql(r) { - var e, t, { nvlRef: n, nvlCallbacks: i, nvlOptions: a, sidepanel: o, nodes: s, rels: u, highlightedNodeIds: l, highlightedRelationshipIds: c, topLeftIsland: f = Hw.topLeftIsland, topRightIsland: d = Hw.topRightIsland, bottomLeftIsland: h = Hw.bottomLeftIsland, bottomRightIsland: p = Hw.bottomRightIsland, gesture: g = "single", setGesture: y, layout: b, setLayout: _, selected: m, setSelected: x, interactionMode: S, setInteractionMode: O, mouseEventCallbacks: E = {}, className: T, style: P, htmlAttributes: I, ref: k, as: L } = r, B = Nle(r, ["nvlRef", "nvlCallbacks", "nvlOptions", "sidepanel", "nodes", "rels", "highlightedNodeIds", "highlightedRelationshipIds", "topLeftIsland", "topRightIsland", "bottomLeftIsland", "bottomRightIsland", "gesture", "setGesture", "layout", "setLayout", "selected", "setSelected", "interactionMode", "setInteractionMode", "mouseEventCallbacks", "className", "style", "htmlAttributes", "ref", "as"]); - const j = me.useMemo(() => n ?? ao.createRef(), [n]), z = me.useId(), { theme: H } = S2(), { bg: q, border: W, text: $ } = Yu.theme[H].color.neutral, [J, X] = me.useState(0); + var e, t, { nvlRef: n, nvlCallbacks: i, nvlOptions: a, sidepanel: o, nodes: s, rels: u, highlightedNodeIds: l, highlightedRelationshipIds: c, topLeftIsland: f = Hw.topLeftIsland, topRightIsland: d = Hw.topRightIsland, bottomLeftIsland: h = Hw.bottomLeftIsland, bottomRightIsland: p = Hw.bottomRightIsland, gesture: g = "single", setGesture: y, layout: b, setLayout: _, selected: m, setSelected: x, interactionMode: S, setInteractionMode: O, mouseEventCallbacks: E = {}, className: T, style: P, htmlAttributes: I, ref: k, as: L } = r, B = Lle(r, ["nvlRef", "nvlCallbacks", "nvlOptions", "sidepanel", "nodes", "rels", "highlightedNodeIds", "highlightedRelationshipIds", "topLeftIsland", "topRightIsland", "bottomLeftIsland", "bottomRightIsland", "gesture", "setGesture", "layout", "setLayout", "selected", "setSelected", "interactionMode", "setInteractionMode", "mouseEventCallbacks", "className", "style", "htmlAttributes", "ref", "as"]); + const j = me.useMemo(() => n ?? ao.createRef(), [n]), z = me.useId(), { theme: H } = E2(), { bg: q, border: W, text: $ } = Yu.theme[H].color.neutral, [J, X] = me.useState(0); me.useEffect(() => { X((Y) => Y + 1); }, [H]); - const [Q, ue] = Lg({ + const [Z, ue] = Lg({ isControlled: S !== void 0, onChange: O, state: S ?? "select" @@ -82016,11 +82028,11 @@ function ql(r) { isControlled: b !== void 0, onChange: _, state: b ?? "d3Force" - }), pe = me.useMemo(() => _le(s, u), [s, u]), { nodesWithState: fe, relsWithState: se, wrappedMouseEventCallbacks: de } = Ile({ + }), pe = me.useMemo(() => wle(s, u), [s, u]), { nodesWithState: fe, relsWithState: se, wrappedMouseEventCallbacks: de } = Nle({ gesture: g, highlightedNodeIds: l, highlightedRelationshipIds: c, - interactionMode: Q, + interactionMode: Z, mouseEventCallbacks: E, nvlGraph: pe, selected: re, @@ -82030,14 +82042,14 @@ function ql(r) { isControlled: (o == null ? void 0 : o.isSidePanelOpen) !== void 0, onChange: o == null ? void 0 : o.setIsSidePanelOpen, state: (e = o == null ? void 0 : o.isSidePanelOpen) !== null && e !== void 0 ? e : !0 - }), [ke, Me] = Lg({ + }), [ke, De] = Lg({ isControlled: (o == null ? void 0 : o.sidePanelWidth) !== void 0, onChange: o == null ? void 0 : o.onSidePanelResize, state: (t = o == null ? void 0 : o.sidePanelWidth) !== null && t !== void 0 ? t : 400 }), Ne = me.useMemo(() => o === void 0 ? { children: Te.jsx(ql.SingleSelectionSidePanelContents, {}), isSidePanelOpen: ge, - onSidePanelResize: Me, + onSidePanelResize: De, setIsSidePanelOpen: Oe, sidePanelWidth: ke } : o, [ @@ -82045,11 +82057,11 @@ function ql(r) { ge, Oe, ke, - Me + De ]), Ce = L ?? "div"; return Te.jsx(Ce, Object.assign({ ref: k, className: Vn("ndl-graph-visualization-container", T), style: P }, I, { children: Te.jsxs(MG.Provider, { value: { gesture: g, - interactionMode: Q, + interactionMode: Z, layout: le, nvlGraph: pe, nvlInstance: j, @@ -82057,15 +82069,15 @@ function ql(r) { setGesture: y, setLayout: ce, sidepanel: Ne - }, children: [Te.jsxs("div", { className: "ndl-graph-visualization", children: [Te.jsx($ue, Object.assign({ layout: le, nodes: fe, rels: se, nvlOptions: Object.assign(Object.assign(Object.assign({}, jle), { instanceId: z, styling: { + }, children: [Te.jsxs("div", { className: "ndl-graph-visualization", children: [Te.jsx(Kue, Object.assign({ layout: le, nodes: fe, rels: se, nvlOptions: Object.assign(Object.assign(Object.assign({}, Ble), { instanceId: z, styling: { defaultRelationshipColor: W.strongest, disabledItemColor: q.strong, disabledItemFontColor: $.weakest, dropShadowColor: W.weak, selectedInnerBorderColor: q.default } }), a), nvlCallbacks: Object.assign({ onLayoutComputing(Y) { - var Z; - Y || (Z = j.current) === null || Z === void 0 || Z.fit(j.current.getNodes().map((ie) => ie.id), { noPan: !0 }); + var Q; + Y || (Q = j.current) === null || Q === void 0 || Q.fit(j.current.getNodes().map((ie) => ie.id), { noPan: !0 }); } }, i), mouseEventCallbacks: de, ref: j }, B), J), f !== null && Te.jsx(Vw, { placement: "top-left", children: f }), d !== null && Te.jsx(Vw, { placement: "top-right", children: d }), h !== null && Te.jsx(Vw, { placement: "bottom-left", children: h }), p !== null && Te.jsx(Vw, { placement: "bottom-right", children: p })] }), Ne && Te.jsx(ty, { sidepanel: Ne })] }) })); } ql.ZoomInButton = kG; @@ -82073,19 +82085,19 @@ ql.ZoomOutButton = IG; ql.ZoomToFitButton = NG; ql.ToggleSidePanelButton = LG; ql.DownloadButton = jG; -ql.BoxSelectButton = tle; -ql.LassoSelectButton = rle; -ql.SingleSelectButton = ele; -ql.SearchButton = nle; -ql.SingleSelectionSidePanelContents = kle; -ql.LayoutSelectButton = ale; -ql.GestureSelectButton = sle; -function Ble(r) { +ql.BoxSelectButton = rle; +ql.LassoSelectButton = nle; +ql.SingleSelectButton = tle; +ql.SearchButton = ile; +ql.SingleSelectionSidePanelContents = Ile; +ql.LayoutSelectButton = ole; +ql.GestureSelectButton = ule; +function Fle(r) { return Array.isArray(r) && r.every((e) => typeof e == "string"); } -function Fle(r) { +function Ule(r) { return r.map((e) => { - const t = Ble(e.properties.labels) ? e.properties.labels : []; + const t = Fle(e.properties.labels) ? e.properties.labels : []; return { ...e, id: e.id, @@ -82102,7 +82114,7 @@ function Fle(r) { }; }); } -function Ule(r) { +function zle(r) { return r.map((e) => ({ ...e, id: e.id, @@ -82115,7 +82127,7 @@ function Ule(r) { to: e.to })); } -class zle extends me.Component { +class qle extends me.Component { constructor(e) { super(e), this.state = { error: null }; } @@ -82160,26 +82172,30 @@ class zle extends me.Component { ) : this.props.children; } } -function qle() { +function Gle() { + if (document.body.classList.contains("vscode-light")) + return "light"; + if (document.body.classList.contains("vscode-dark")) + return "dark"; const e = window.getComputedStyle(document.body, null).getPropertyValue("background-color").match(/\d+/g); if (!e || e.length < 3) return "light"; const t = Number(e[0]) * 0.2126 + Number(e[1]) * 0.7152 + Number(e[2]) * 0.0722; return t === 0 && e.length > 3 && e[3] === "0" ? "light" : t < 128 ? "dark" : "light"; } -function Gle(r) { +function Vle(r) { me.useEffect(() => { - const e = r === "auto" ? qle() : r; + const e = r === "auto" ? Gle() : r; document.documentElement.className = `ndl-theme-${e}`; }, [r]); } -function Vle() { +function Hle() { const [r] = Wy("nodes"), [e] = Wy("relationships"), [t] = Wy("options"), [n] = Wy("height"), [i] = Wy("width"), [a] = Wy("theme"); - Gle(a ?? "auto"); + Vle(a ?? "auto"); const { layout: o, nvlOptions: s, zoom: u, pan: l, layoutOptions: c } = t ?? {}, [f, d] = me.useMemo( () => [ - Fle(r ?? []), - Ule(e ?? []) + Ule(r ?? []), + zle(e ?? []) ], [r, e] ), h = me.useMemo( @@ -82211,10 +82227,13 @@ function Vle() { } ) }); } -function Hle() { - return /* @__PURE__ */ Te.jsx(zle, { children: /* @__PURE__ */ Te.jsx(Vle, {}) }); +function Wle() { + return /* @__PURE__ */ Te.jsxs(qle, { children: [ + /* @__PURE__ */ Te.jsx("h1", { children: Array.from(document.body.classList).join(", ") }), + /* @__PURE__ */ Te.jsx(Hle, {}) + ] }); } -const Wle = uV(Hle), Xle = { render: Wle }; +const Yle = uV(Wle), $le = { render: Yle }; export { - Xle as default + $le as default }; From 8a1ab9e7a612cd6f03fd8b9c4d7b785cf5882dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florentin=20D=C3=B6rre?= Date: Mon, 23 Feb 2026 12:07:56 +0100 Subject: [PATCH 4/4] Update nvl entrypoint --- .../resources/nvl_entrypoint/index.html | 58 +- .../resources/nvl_entrypoint/widget.js | 777 +++++++++--------- 2 files changed, 416 insertions(+), 419 deletions(-) diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html index 162d84f..f623001 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html @@ -23,7 +23,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var JD;function JG(){if(JD)return U0;JD=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var s in i)s!=="key"&&(a[s]=i[s])}else a=i;return i=a.ref,{$$typeof:r,type:n,key:o,ref:i!==void 0?i:null,props:a}}return U0.Fragment=e,U0.jsx=t,U0.jsxs=t,U0}var ek;function eV(){return ek||(ek=1,WE.exports=JG()),WE.exports}var Te=eV(),YE={exports:{}},fn={};/** + */var JD;function JG(){if(JD)return U0;JD=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var s in i)s!=="key"&&(a[s]=i[s])}else a=i;return i=a.ref,{$$typeof:r,type:n,key:o,ref:i!==void 0?i:null,props:a}}return U0.Fragment=e,U0.jsx=t,U0.jsxs=t,U0}var ek;function eV(){return ek||(ek=1,WE.exports=JG()),WE.exports}var Ce=eV(),YE={exports:{}},fn={};/** * @license React * react.production.js * @@ -60,33 +60,33 @@ `+ge+v+Oe}var De=!1;function Ne(v,w){if(!v||De)return"";De=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var M={DetermineComponentFrameRoot:function(){try{if(w){var _t=function(){throw Error()};if(Object.defineProperty(_t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_t,[])}catch(lt){var at=lt}Reflect.construct(v,[],_t)}else{try{_t.call()}catch(lt){at=lt}v.call(_t.prototype)}}else{try{throw Error()}catch(lt){at=lt}(_t=v())&&typeof _t.catch=="function"&&_t.catch(function(){})}}catch(lt){if(lt&&at&&typeof lt.stack=="string")return[lt.stack,at.stack]}return[null,null]}};M.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var F=Object.getOwnPropertyDescriptor(M.DetermineComponentFrameRoot,"name");F&&F.configurable&&Object.defineProperty(M.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var V=M.DetermineComponentFrameRoot(),ae=V[0],Se=V[1];if(ae&&Se){var Fe=ae.split(` `),it=Se.split(` `);for(F=M=0;MF||Fe[M]!==it[F]){var ht=` -`+Fe[M].replace(" at new "," at ");return v.displayName&&ht.includes("")&&(ht=ht.replace("",v.displayName)),ht}while(1<=M&&0<=F);break}}}finally{De=!1,Error.prepareStackTrace=C}return(C=v?v.displayName||v.name:"")?ke(C):""}function Ce(v,w){switch(v.tag){case 26:case 27:case 5:return ke(v.type);case 16:return ke("Lazy");case 13:return v.child!==w&&w!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Ne(v.type,!1);case 11:return Ne(v.type.render,!1);case 1:return Ne(v.type,!0);case 31:return ke("Activity");default:return""}}function Y(v){try{var w="",C=null;do w+=Ce(v,C),C=v,v=v.return;while(v);return w}catch(M){return` +`+Fe[M].replace(" at new "," at ");return v.displayName&&ht.includes("")&&(ht=ht.replace("",v.displayName)),ht}while(1<=M&&0<=F);break}}}finally{De=!1,Error.prepareStackTrace=C}return(C=v?v.displayName||v.name:"")?ke(C):""}function Te(v,w){switch(v.tag){case 26:case 27:case 5:return ke(v.type);case 16:return ke("Lazy");case 13:return v.child!==w&&w!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Ne(v.type,!1);case 11:return Ne(v.type.render,!1);case 1:return Ne(v.type,!0);case 31:return ke("Activity");default:return""}}function Y(v){try{var w="",C=null;do w+=Te(v,C),C=v,v=v.return;while(v);return w}catch(M){return` Error generating stack: `+M.message+` `+M.stack}}var Q=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,we=r.unstable_cancelCallback,Ee=r.unstable_shouldYield,Me=r.unstable_requestPaint,Ie=r.unstable_now,Ye=r.unstable_getCurrentPriorityLevel,ot=r.unstable_ImmediatePriority,mt=r.unstable_UserBlockingPriority,wt=r.unstable_NormalPriority,Mt=r.unstable_LowPriority,Dt=r.unstable_IdlePriority,vt=r.log,tt=r.unstable_setDisableYieldValue,_e=null,Ue=null;function Qe(v){if(typeof vt=="function"&&tt(v),Ue&&typeof Ue.setStrictMode=="function")try{Ue.setStrictMode(_e,v)}catch{}}var Ze=Math.clz32?Math.clz32:ct,nt=Math.log,It=Math.LN2;function ct(v){return v>>>=0,v===0?32:31-(nt(v)/It|0)|0}var Lt=256,Rt=262144,jt=4194304;function Yt(v){var w=v&42;if(w!==0)return w;switch(v&-v){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return v&261888;case 262144:case 524288:case 1048576:case 2097152:return v&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return v&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return v}}function sr(v,w,C){var M=v.pendingLanes;if(M===0)return 0;var F=0,V=v.suspendedLanes,ae=v.pingedLanes;v=v.warmLanes;var Se=M&134217727;return Se!==0?(M=Se&~V,M!==0?F=Yt(M):(ae&=Se,ae!==0?F=Yt(ae):C||(C=Se&~v,C!==0&&(F=Yt(C))))):(Se=M&~V,Se!==0?F=Yt(Se):ae!==0?F=Yt(ae):C||(C=M&~v,C!==0&&(F=Yt(C)))),F===0?0:w!==0&&w!==F&&(w&V)===0&&(V=F&-F,C=w&-w,V>=C||V===32&&(C&4194048)!==0)?w:F}function Ut(v,w){return(v.pendingLanes&~(v.suspendedLanes&~v.pingedLanes)&w)===0}function Rr(v,w){switch(v){case 1:case 2:case 4:case 8:case 64:return w+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return w+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xt(){var v=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),v}function Vr(v){for(var w=[],C=0;31>C;C++)w.push(v);return w}function Br(v,w){v.pendingLanes|=w,w!==268435456&&(v.suspendedLanes=0,v.pingedLanes=0,v.warmLanes=0)}function mr(v,w,C,M,F,V){var ae=v.pendingLanes;v.pendingLanes=C,v.suspendedLanes=0,v.pingedLanes=0,v.warmLanes=0,v.expiredLanes&=C,v.entangledLanes&=C,v.errorRecoveryDisabledLanes&=C,v.shellSuspendCounter=0;var Se=v.entanglements,Fe=v.expirationTimes,it=v.hiddenUpdates;for(C=ae&~C;0"u")return null;try{return v.activeElement||v.body}catch{return v.body}}var Md=/[\n"\\]/g;function Xa(v){return v.replace(Md,function(w){return"\\"+w.charCodeAt(0).toString(16)+" "})}function Wl(v,w,C,M,F,V,ae,Se){v.name="",ae!=null&&typeof ae!="function"&&typeof ae!="symbol"&&typeof ae!="boolean"?v.type=ae:v.removeAttribute("type"),w!=null?ae==="number"?(w===0&&v.value===""||v.value!=w)&&(v.value=""+Ii(w)):v.value!==""+Ii(w)&&(v.value=""+Ii(w)):ae!=="submit"&&ae!=="reset"||v.removeAttribute("value"),w!=null?nf(v,ae,Ii(w)):C!=null?nf(v,ae,Ii(C)):M!=null&&v.removeAttribute("value"),F==null&&V!=null&&(v.defaultChecked=!!V),F!=null&&(v.checked=F&&typeof F!="function"&&typeof F!="symbol"),Se!=null&&typeof Se!="function"&&typeof Se!="symbol"&&typeof Se!="boolean"?v.name=""+Ii(Se):v.removeAttribute("name")}function Yl(v,w,C,M,F,V,ae,Se){if(V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"&&(v.type=V),w!=null||C!=null){if(!(V!=="submit"&&V!=="reset"||w!=null)){vu(v);return}C=C!=null?""+Ii(C):"",w=w!=null?""+Ii(w):C,Se||w===v.value||(v.value=w),v.defaultValue=w}M=M??F,M=typeof M!="function"&&typeof M!="symbol"&&!!M,v.checked=Se?v.checked:!!M,v.defaultChecked=!!M,ae!=null&&typeof ae!="function"&&typeof ae!="symbol"&&typeof ae!="boolean"&&(v.name=ae),vu(v)}function nf(v,w,C){w==="number"&&Hl(v.ownerDocument)===v||v.defaultValue===""+C||(v.defaultValue=""+C)}function Wi(v,w,C,M){if(v=v.options,w){w={};for(var F=0;F"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=!1;if(so)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Ju=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Ju=!1}var Go=null,hs=null,jn=null;function Zr(){if(jn)return jn;var v,w=hs,C=w.length,M,F="value"in Go?Go.value:Go.textContent,V=F.length;for(v=0;v=Gs),Ah=" ",tc=!1;function Yf(v,w){switch(v){case"keyup":return Wf.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ic(v){return v=v.detail,typeof v=="object"&&"data"in v?v.data:null}var _u=!1;function xo(v,w){switch(v){case"compositionend":return Ic(w);case"keypress":return w.which!==32?null:(tc=!0,Ah);case"textInput":return v=w.data,v===Ah&&tc?null:v;default:return null}}function Nc(v,w){if(_u)return v==="compositionend"||!ff&&Yf(v,w)?(v=Zr(),jn=hs=Go=null,_u=!1,v):null;switch(v){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1=w)return{node:C,offset:w-v};v=M}e:{for(;C;){if(C.nextSibling){C=C.nextSibling;break e}C=C.parentNode}C=void 0}C=jc(C)}}function pf(v,w){return v&&w?v===w?!0:v&&v.nodeType===3?!1:w&&w.nodeType===3?pf(v,w.parentNode):"contains"in v?v.contains(w):v.compareDocumentPosition?!!(v.compareDocumentPosition(w)&16):!1:!1}function Bc(v){v=v!=null&&v.ownerDocument!=null&&v.ownerDocument.defaultView!=null?v.ownerDocument.defaultView:window;for(var w=Hl(v.document);w instanceof v.HTMLIFrameElement;){try{var C=typeof w.contentWindow.location.href=="string"}catch{C=!1}if(C)v=w.contentWindow;else break;w=Hl(v.document)}return w}function Hs(v){var w=v&&v.nodeName&&v.nodeName.toLowerCase();return w&&(w==="input"&&(v.type==="text"||v.type==="search"||v.type==="tel"||v.type==="url"||v.type==="password")||w==="textarea"||v.contentEditable==="true")}var ic=so&&"documentMode"in document&&11>=document.documentMode,We=null,ft=null,ut=null,Kt=!1;function Pr(v,w,C){var M=C.window===C?C.document:C.nodeType===9?C:C.ownerDocument;Kt||We==null||We!==Hl(M)||(M=We,"selectionStart"in M&&Hs(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),ut&&nc(ut,M)||(ut=M,M=hg(ft,"onSelect"),0>=ae,F-=ae,Yo=1<<32-Ze(w)+F|C<pn?(kn=or,or=null):kn=or.sibling;var Qn=at(Xe,or,rt[pn],bt);if(Qn===null){or===null&&(or=kn);break}v&&or&&Qn.alternate===null&&w(Xe,or),Ve=V(Qn,Ve,pn),Zn===null?wr=Qn:Zn.sibling=Qn,Zn=Qn,or=kn}if(pn===rt.length)return C(Xe,or),hn&&Ua(Xe,pn),wr;if(or===null){for(;pnpn?(kn=or,or=null):kn=or.sibling;var oh=at(Xe,or,Qn.value,bt);if(oh===null){or===null&&(or=kn);break}v&&or&&oh.alternate===null&&w(Xe,or),Ve=V(oh,Ve,pn),Zn===null?wr=oh:Zn.sibling=oh,Zn=oh,or=kn}if(Qn.done)return C(Xe,or),hn&&Ua(Xe,pn),wr;if(or===null){for(;!Qn.done;pn++,Qn=rt.next())Qn=_t(Xe,Qn.value,bt),Qn!==null&&(Ve=V(Qn,Ve,pn),Zn===null?wr=Qn:Zn.sibling=Qn,Zn=Qn);return hn&&Ua(Xe,pn),wr}for(or=M(or);!Qn.done;pn++,Qn=rt.next())Qn=lt(or,Xe,pn,Qn.value,bt),Qn!==null&&(v&&Qn.alternate!==null&&or.delete(Qn.key===null?pn:Qn.key),Ve=V(Qn,Ve,pn),Zn===null?wr=Qn:Zn.sibling=Qn,Zn=Qn);return v&&or.forEach(function(HE){return w(Xe,HE)}),hn&&Ua(Xe,pn),wr}function Ti(Xe,Ve,rt,bt){if(typeof rt=="object"&&rt!==null&&rt.type===g&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case h:e:{for(var wr=rt.key;Ve!==null;){if(Ve.key===wr){if(wr=rt.type,wr===g){if(Ve.tag===7){C(Xe,Ve.sibling),bt=F(Ve,rt.props.children),bt.return=Xe,Xe=bt;break e}}else if(Ve.elementType===wr||typeof wr=="object"&&wr!==null&&wr.$$typeof===T&&Ao(wr)===Ve.type){C(Xe,Ve.sibling),bt=F(Ve,rt.props),Po(bt,rt),bt.return=Xe,Xe=bt;break e}C(Xe,Ve);break}else w(Xe,Ve);Ve=Ve.sibling}rt.type===g?(bt=sc(rt.props.children,Xe.mode,bt,rt.key),bt.return=Xe,Xe=bt):(bt=oc(rt.type,rt.key,rt.props,null,Xe.mode,bt),Po(bt,rt),bt.return=Xe,Xe=bt)}return ae(Xe);case p:e:{for(wr=rt.key;Ve!==null;){if(Ve.key===wr)if(Ve.tag===4&&Ve.stateNode.containerInfo===rt.containerInfo&&Ve.stateNode.implementation===rt.implementation){C(Xe,Ve.sibling),bt=F(Ve,rt.children||[]),bt.return=Xe,Xe=bt;break e}else{C(Xe,Ve);break}else w(Xe,Ve);Ve=Ve.sibling}bt=yf(rt,Xe.mode,bt),bt.return=Xe,Xe=bt}return ae(Xe);case T:return rt=Ao(rt),Ti(Xe,Ve,rt,bt)}if(z(rt))return rr(Xe,Ve,rt,bt);if(L(rt)){if(wr=L(rt),typeof wr!="function")throw Error(n(150));return rt=wr.call(rt),Dr(Xe,Ve,rt,bt)}if(typeof rt.then=="function")return Ti(Xe,Ve,Uc(rt),bt);if(rt.$$typeof===m)return Ti(Xe,Ve,$o(Xe,rt),bt);Qa(Xe,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint"?(rt=""+rt,Ve!==null&&Ve.tag===6?(C(Xe,Ve.sibling),bt=F(Ve,rt),bt.return=Xe,Xe=bt):(C(Xe,Ve),bt=ji(rt,Xe.mode,bt),bt.return=Xe,Xe=bt),ae(Xe)):C(Xe,Ve)}return function(Xe,Ve,rt,bt){try{Ro=0;var wr=Ti(Xe,Ve,rt,bt);return Du=null,wr}catch(or){if(or===Fc||or===Ca)throw or;var Zn=Yi(29,or,null,Xe.mode);return Zn.lanes=bt,Zn.return=Xe,Zn}finally{}}}var ku=rd(!0),wf=rd(!1),Jo=!1;function fo(v){v.updateQueue={baseState:v.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nd(v,w){v=v.updateQueue,w.updateQueue===v&&(w.updateQueue={baseState:v.baseState,firstBaseUpdate:v.firstBaseUpdate,lastBaseUpdate:v.lastBaseUpdate,shared:v.shared,callbacks:null})}function Iu(v){return{lane:v,tag:0,payload:null,callback:null,next:null}}function Ks(v,w,C){var M=v.updateQueue;if(M===null)return null;if(M=M.shared,(zt&2)!==0){var F=M.pending;return F===null?w.next=w:(w.next=F.next,F.next=w),M.pending=w,w=Ka(v),ul(v,null,C),w}return ac(v,M,w,C),Ka(v)}function xf(v,w,C){if(w=w.updateQueue,w!==null&&(w=w.shared,(C&4194048)!==0)){var M=w.lanes;M&=v.pendingLanes,C|=M,w.lanes=C,sn(v,C)}}function ws(v,w){var C=v.updateQueue,M=v.alternate;if(M!==null&&(M=M.updateQueue,C===M)){var F=null,V=null;if(C=C.firstBaseUpdate,C!==null){do{var ae={lane:C.lane,tag:C.tag,payload:C.payload,callback:null,next:null};V===null?F=V=ae:V=V.next=ae,C=C.next}while(C!==null);V===null?F=V=w:V=V.next=w}else F=V=w;C={baseState:M.baseState,firstBaseUpdate:F,lastBaseUpdate:V,shared:M.shared,callbacks:M.callbacks},v.updateQueue=C;return}v=C.lastBaseUpdate,v===null?C.firstBaseUpdate=w:v.next=w,C.lastBaseUpdate=w}var Zi=!1;function hc(){if(Zi){var v=pl;if(v!==null)throw v}}function Ef(v,w,C,M){Zi=!1;var F=v.updateQueue;Jo=!1;var V=F.firstBaseUpdate,ae=F.lastBaseUpdate,Se=F.shared.pending;if(Se!==null){F.shared.pending=null;var Fe=Se,it=Fe.next;Fe.next=null,ae===null?V=it:ae.next=it,ae=Fe;var ht=v.alternate;ht!==null&&(ht=ht.updateQueue,Se=ht.lastBaseUpdate,Se!==ae&&(Se===null?ht.firstBaseUpdate=it:Se.next=it,ht.lastBaseUpdate=Fe))}if(V!==null){var _t=F.baseState;ae=0,ht=it=Fe=null,Se=V;do{var at=Se.lane&-536870913,lt=at!==Se.lane;if(lt?(Mr&at)===at:(M&at)===at){at!==0&&at===Ru&&(Zi=!0),ht!==null&&(ht=ht.next={lane:0,tag:Se.tag,payload:Se.payload,callback:null,next:null});e:{var rr=v,Dr=Se;at=w;var Ti=C;switch(Dr.tag){case 1:if(rr=Dr.payload,typeof rr=="function"){_t=rr.call(Ti,_t,at);break e}_t=rr;break e;case 3:rr.flags=rr.flags&-65537|128;case 0:if(rr=Dr.payload,at=typeof rr=="function"?rr.call(Ti,_t,at):rr,at==null)break e;_t=f({},_t,at);break e;case 2:Jo=!0}}at=Se.callback,at!==null&&(v.flags|=64,lt&&(v.flags|=8192),lt=F.callbacks,lt===null?F.callbacks=[at]:lt.push(at))}else lt={lane:at,tag:Se.tag,payload:Se.payload,callback:Se.callback,next:null},ht===null?(it=ht=lt,Fe=_t):ht=ht.next=lt,ae|=at;if(Se=Se.next,Se===null){if(Se=F.shared.pending,Se===null)break;lt=Se,Se=lt.next,lt.next=null,F.lastBaseUpdate=lt,F.shared.pending=null}}while(!0);ht===null&&(Fe=_t),F.baseState=Fe,F.firstBaseUpdate=it,F.lastBaseUpdate=ht,V===null&&(F.shared.lanes=0),Xc|=ae,v.lanes=ae,v.memoizedState=_t}}function xs(v,w){if(typeof v!="function")throw Error(n(191,v));v.call(w)}function Es(v,w){var C=v.callbacks;if(C!==null)for(v.callbacks=null,v=0;vV?V:8;var ae=H.T,Se={};H.T=Se,zd(v,!1,w,C);try{var Fe=F(),it=H.S;if(it!==null&&it(Se,Fe),Fe!==null&&typeof Fe=="object"&&typeof Fe.then=="function"){var ht=dc(Fe,M);Do(v,w,ht,Cl(v))}else Do(v,w,M,Cl(v))}catch(_t){Do(v,w,{then:function(){},status:"rejected",reason:_t},Cl())}finally{q.p=V,ae!==null&&Se.types!==null&&(ae.types=Se.types),H.T=ae}}function Lh(){}function Vc(v,w,C,M){if(v.tag!==5)throw Error(n(476));var F=Xp(v).queue;Tf(v,F,w,W,C===null?Lh:function(){return $p(v),C(M)})}function Xp(v){var w=v.memoizedState;if(w!==null)return w;w={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ye,lastRenderedState:W},next:null};var C={};return w.next={memoizedState:C,baseState:C,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ye,lastRenderedState:C},next:null},v.memoizedState=w,v=v.alternate,v!==null&&(v.memoizedState=w),w}function $p(v){var w=Xp(v);w.next===null&&(w=v.alternate.memoizedState),Do(v,w.next.queue,{},Cl())}function Fd(){return _a(Zv)}function Ud(){return Un().memoizedState}function ud(){return Un().memoizedState}function ld(v){for(var w=v.return;w!==null;){switch(w.tag){case 24:case 3:var C=Cl();v=Iu(C);var M=Ks(w,v,C);M!==null&&(Uu(M,w,C),xf(M,w,C)),w={cache:Za()},v.payload=w;return}w=w.return}}function fy(v,w,C){var M=Cl();C={lane:M,revertLane:0,gesture:null,action:C,hasEagerState:!1,eagerState:null,next:null},jh(v)?xl(w,C):(C=gs(v,w,C,M),C!==null&&(Uu(C,v,M),Ur(C,w,M)))}function Kp(v,w,C){var M=Cl();Do(v,w,C,M)}function Do(v,w,C,M){var F={lane:M,revertLane:0,gesture:null,action:C,hasEagerState:!1,eagerState:null,next:null};if(jh(v))xl(w,F);else{var V=v.alternate;if(v.lanes===0&&(V===null||V.lanes===0)&&(V=w.lastRenderedReducer,V!==null))try{var ae=w.lastRenderedState,Se=V(ae,C);if(F.hasEagerState=!0,F.eagerState=Se,ri(Se,ae))return ac(v,w,F,0),Hr===null&&Ws(),!1}catch{}finally{}if(C=gs(v,w,F,M),C!==null)return Uu(C,v,M),Ur(C,w,M),!0}return!1}function zd(v,w,C,M){if(M={lane:2,revertLane:Al(),gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null},jh(v)){if(w)throw Error(n(479))}else w=gs(v,C,M,2),w!==null&&Uu(w,v,2)}function jh(v){var w=v.alternate;return v===Sr||w!==null&&w===Sr}function xl(v,w){ml=vc=!0;var C=v.pending;C===null?w.next=w:(w.next=C.next,C.next=w),v.pending=w}function Ur(v,w,C){if((C&4194048)!==0){var M=w.lanes;M&=v.pendingLanes,C|=M,w.lanes=C,sn(v,C)}}var Cf={readContext:_a,use:K,useCallback:si,useContext:si,useEffect:si,useImperativeHandle:si,useLayoutEffect:si,useInsertionEffect:si,useMemo:si,useReducer:si,useRef:si,useState:si,useDebugValue:si,useDeferredValue:si,useTransition:si,useSyncExternalStore:si,useId:si,useHostTransitionStatus:si,useFormState:si,useActionState:si,useOptimistic:si,useMemoCache:si,useCacheRefresh:si};Cf.useEffectEvent=si;var rs={readContext:_a,use:K,useCallback:function(v,w){return Aa().memoizedState=[v,w===void 0?null:w],v},useContext:_a,useEffect:Mn,useImperativeHandle:function(v,w,C){C=C!=null?C.concat([v]):null,mn(4194308,4,mc.bind(null,w,v),C)},useLayoutEffect:function(v,w){return mn(4194308,4,v,w)},useInsertionEffect:function(v,w){mn(4,2,v,w)},useMemo:function(v,w){var C=Aa();w=w===void 0?null:w;var M=v();if(Ts){Qe(!0);try{v()}finally{Qe(!1)}}return C.memoizedState=[M,w],M},useReducer:function(v,w,C){var M=Aa();if(C!==void 0){var F=C(w);if(Ts){Qe(!0);try{C(w)}finally{Qe(!1)}}}else F=w;return M.memoizedState=M.baseState=F,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:v,lastRenderedState:F},M.queue=v,v=v.dispatch=fy.bind(null,Sr,v),[M.memoizedState,v]},useRef:function(v){var w=Aa();return v={current:v},w.memoizedState=v},useState:function(v){v=Ct(v);var w=v.queue,C=Kp.bind(null,Sr,w);return w.dispatch=C,[v.memoizedState,C]},useDebugValue:Cs,useDeferredValue:function(v,w){var C=Aa();return wa(C,v,w)},useTransition:function(){var v=Ct(!1);return v=Tf.bind(null,Sr,v.queue,!0,!1),Aa().memoizedState=v,[!1,v]},useSyncExternalStore:function(v,w,C){var M=Sr,F=Aa();if(hn){if(C===void 0)throw Error(n(407));C=C()}else{if(C=w(),Hr===null)throw Error(n(349));(Mr&127)!==0||Ke(M,w,C)}F.memoizedState=C;var V={value:C,getSnapshot:w};return F.queue=V,Mn(gt.bind(null,M,V,v),[v]),M.flags|=2048,yr(9,{destroy:void 0},Je.bind(null,M,V,C,w),null),C},useId:function(){var v=Aa(),w=Hr.identifierPrefix;if(hn){var C=Fa,M=Yo;C=(M&~(1<<32-Ze(M)-1)).toString(32)+C,w="_"+w+"R_"+C,C=ad++,0<\/script>",V=V.removeChild(V.firstChild);break;case"select":V=typeof M.is=="string"?ae.createElement("select",{is:M.is}):ae.createElement("select"),M.multiple?V.multiple=!0:M.size&&(V.size=M.size);break;default:V=typeof M.is=="string"?ae.createElement(F,{is:M.is}):ae.createElement(F)}}V[on]=w,V[Nn]=M;e:for(ae=w.child;ae!==null;){if(ae.tag===5||ae.tag===6)V.appendChild(ae.stateNode);else if(ae.tag!==4&&ae.tag!==27&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===w)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===w)break e;ae=ae.return}ae.sibling.return=ae.return,ae=ae.sibling}w.stateNode=V;e:switch(as(V,F,M),F){case"button":case"input":case"select":case"textarea":M=!!M.autoFocus;break e;case"img":M=!0;break e;default:M=!1}M&&As(w)}}return pi(w),eg(w,w.type,v===null?null:v.memoizedProps,w.pendingProps,C),null;case 6:if(v&&w.stateNode!=null)v.memoizedProps!==M&&As(w);else{if(typeof M!="string"&&w.stateNode===null)throw Error(n(166));if(v=le.current,dl(w)){if(v=w.stateNode,C=w.memoizedProps,M=null,F=Si,F!==null)switch(F.tag){case 27:case 5:M=F.memoizedProps}v[on]=w,v=!!(v.nodeValue===C||M!==null&&M.suppressHydrationWarning===!0||C_(v.nodeValue,C)),v||fl(w,!0)}else v=gg(v).createTextNode(M),v[on]=w,w.stateNode=v}return pi(w),null;case 31:if(C=w.memoizedState,v===null||v.memoizedState!==null){if(M=dl(w),C!==null){if(v===null){if(!M)throw Error(n(318));if(v=w.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(557));v[on]=w}else xe(),(w.flags&128)===0&&(w.memoizedState=null),w.flags|=4;pi(w),v=!1}else C=Ou(),v!==null&&v.memoizedState!==null&&(v.memoizedState.hydrationErrors=C),v=!0;if(!v)return w.flags&256?(Wn(w),w):(Wn(w),null);if((w.flags&128)!==0)throw Error(n(558))}return pi(w),null;case 13:if(M=w.memoizedState,v===null||v.memoizedState!==null&&v.memoizedState.dehydrated!==null){if(F=dl(w),M!==null&&M.dehydrated!==null){if(v===null){if(!F)throw Error(n(318));if(F=w.memoizedState,F=F!==null?F.dehydrated:null,!F)throw Error(n(317));F[on]=w}else xe(),(w.flags&128)===0&&(w.memoizedState=null),w.flags|=4;pi(w),F=!1}else F=Ou(),v!==null&&v.memoizedState!==null&&(v.memoizedState.hydrationErrors=F),F=!0;if(!F)return w.flags&256?(Wn(w),w):(Wn(w),null)}return Wn(w),(w.flags&128)!==0?(w.lanes=C,w):(C=M!==null,v=v!==null&&v.memoizedState!==null,C&&(M=w.child,F=null,M.alternate!==null&&M.alternate.memoizedState!==null&&M.alternate.memoizedState.cachePool!==null&&(F=M.alternate.memoizedState.cachePool.pool),V=null,M.memoizedState!==null&&M.memoizedState.cachePool!==null&&(V=M.memoizedState.cachePool.pool),V!==F&&(M.flags|=2048)),C!==v&&C&&(w.child.flags|=8192),Hd(w,w.updateQueue),pi(w),null);case 4:return fe(),v===null&&E0(w.stateNode.containerInfo),pi(w),null;case 10:return Cu(w.type),pi(w),null;case 19:if(Z(Pi),M=w.memoizedState,M===null)return pi(w),null;if(F=(w.flags&128)!==0,V=M.rendering,V===null)if(F)Vh(M,!1);else{if(qi!==0||v!==null&&(v.flags&128)!==0)for(v=w.child;v!==null;){if(V=es(v),V!==null){for(w.flags|=128,Vh(M,!1),v=V.updateQueue,w.updateQueue=v,Hd(w,v),w.subtreeFlags=0,v=C,C=w.child;C!==null;)Cv(C,v),C=C.sibling;return ue(Pi,Pi.current&1|2),hn&&Ua(w,M.treeForkCount),w.child}v=v.sibling}M.tail!==null&&Ie()>$h&&(w.flags|=128,F=!0,Vh(M,!1),w.lanes=4194304)}else{if(!F)if(v=es(V),v!==null){if(w.flags|=128,F=!0,v=v.updateQueue,w.updateQueue=v,Hd(w,v),Vh(M,!0),M.tail===null&&M.tailMode==="hidden"&&!V.alternate&&!hn)return pi(w),null}else 2*Ie()-M.renderingStartTime>$h&&C!==536870912&&(w.flags|=128,F=!0,Vh(M,!1),w.lanes=4194304);M.isBackwards?(V.sibling=w.child,w.child=V):(v=M.last,v!==null?v.sibling=V:w.child=V,M.last=V)}return M.tail!==null?(v=M.tail,M.rendering=v,M.tail=v.sibling,M.renderingStartTime=Ie(),v.sibling=null,C=Pi.current,ue(Pi,F?C&1|2:C&1),hn&&Ua(w,M.treeForkCount),v):(pi(w),null);case 22:case 23:return Wn(w),Nu(),M=w.memoizedState!==null,v!==null?v.memoizedState!==null!==M&&(w.flags|=8192):M&&(w.flags|=8192),M?(C&536870912)!==0&&(w.flags&128)===0&&(pi(w),w.subtreeFlags&6&&(w.flags|=8192)):pi(w),C=w.updateQueue,C!==null&&Hd(w,C.retryQueue),C=null,v!==null&&v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(C=v.memoizedState.cachePool.pool),M=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(M=w.memoizedState.cachePool.pool),M!==C&&(w.flags|=2048),v!==null&&Z(Ta),null;case 24:return C=null,v!==null&&(C=v.memoizedState.cache),w.memoizedState.cache!==C&&(w.flags|=2048),Cu($i),pi(w),null;case 25:return null;case 30:return null}throw Error(n(156,w.tag))}function Hh(v,w){switch(uc(w),w.tag){case 1:return v=w.flags,v&65536?(w.flags=v&-65537|128,w):null;case 3:return Cu($i),fe(),v=w.flags,(v&65536)!==0&&(v&128)===0?(w.flags=v&-65537|128,w):null;case 26:case 27:case 5:return de(w),null;case 31:if(w.memoizedState!==null){if(Wn(w),w.alternate===null)throw Error(n(340));xe()}return v=w.flags,v&65536?(w.flags=v&-65537|128,w):null;case 13:if(Wn(w),v=w.memoizedState,v!==null&&v.dehydrated!==null){if(w.alternate===null)throw Error(n(340));xe()}return v=w.flags,v&65536?(w.flags=v&-65537|128,w):null;case 19:return Z(Pi),null;case 4:return fe(),null;case 10:return Cu(w.type),null;case 22:case 23:return Wn(w),Nu(),v!==null&&Z(Ta),v=w.flags,v&65536?(w.flags=v&-65537|128,w):null;case 24:return Cu($i),null;case 25:return null;default:return null}}function Nv(v,w){switch(uc(w),w.tag){case 3:Cu($i),fe();break;case 26:case 27:case 5:de(w);break;case 4:fe();break;case 31:w.memoizedState!==null&&Wn(w);break;case 13:Wn(w);break;case 19:Z(Pi);break;case 10:Cu(w.type);break;case 22:case 23:Wn(w),Nu(),v!==null&&Z(Ta);break;case 24:Cu($i)}}function Wd(v,w){try{var C=w.updateQueue,M=C!==null?C.lastEffect:null;if(M!==null){var F=M.next;C=F;do{if((C.tag&v)===v){M=void 0;var V=C.create,ae=C.inst;M=V(),ae.destroy=M}C=C.next}while(C!==F)}}catch(Se){yi(w,w.return,Se)}}function Ol(v,w,C){try{var M=w.updateQueue,F=M!==null?M.lastEffect:null;if(F!==null){var V=F.next;M=V;do{if((M.tag&v)===v){var ae=M.inst,Se=ae.destroy;if(Se!==void 0){ae.destroy=void 0,F=w;var Fe=C,it=Se;try{it()}catch(ht){yi(F,Fe,ht)}}}M=M.next}while(M!==V)}}catch(ht){yi(w,w.return,ht)}}function Yd(v){var w=v.updateQueue;if(w!==null){var C=v.stateNode;try{Es(w,C)}catch(M){yi(v,v.return,M)}}}function Lv(v,w,C){C.props=eo(v.type,v.memoizedProps),C.state=v.memoizedState;try{C.componentWillUnmount()}catch(M){yi(v,w,M)}}function Rs(v,w){try{var C=v.ref;if(C!==null){switch(v.tag){case 26:case 27:case 5:var M=v.stateNode;break;case 30:M=v.stateNode;break;default:M=v.stateNode}typeof C=="function"?v.refCleanup=C(M):C.current=M}}catch(F){yi(v,w,F)}}function ro(v,w){var C=v.ref,M=v.refCleanup;if(C!==null)if(typeof M=="function")try{M()}catch(F){yi(v,w,F)}finally{v.refCleanup=null,v=v.alternate,v!=null&&(v.refCleanup=null)}else if(typeof C=="function")try{C(null)}catch(F){yi(v,w,F)}else C.current=null}function my(v){var w=v.type,C=v.memoizedProps,M=v.stateNode;try{e:switch(w){case"button":case"input":case"select":case"textarea":C.autoFocus&&M.focus();break e;case"img":C.src?M.src=C.src:C.srcSet&&(M.srcset=C.srcSet)}}catch(F){yi(v,v.return,F)}}function jv(v,w,C){try{var M=v.stateNode;OE(M,v.type,C,w),M[Nn]=w}catch(F){yi(v,v.return,F)}}function is(v){return v.tag===5||v.tag===3||v.tag===26||v.tag===27&&zr(v.type)||v.tag===4}function Wh(v){e:for(;;){for(;v.sibling===null;){if(v.return===null||is(v.return))return null;v=v.return}for(v.sibling.return=v.return,v=v.sibling;v.tag!==5&&v.tag!==6&&v.tag!==18;){if(v.tag===27&&zr(v.type)||v.flags&2||v.child===null||v.tag===4)continue e;v.child.return=v,v=v.child}if(!(v.flags&2))return v.stateNode}}function tg(v,w,C){var M=v.tag;if(M===5||M===6)v=v.stateNode,w?(C.nodeType===9?C.body:C.nodeName==="HTML"?C.ownerDocument.body:C).insertBefore(v,w):(w=C.nodeType===9?C.body:C.nodeName==="HTML"?C.ownerDocument.body:C,w.appendChild(v),C=C._reactRootContainer,C!=null||w.onclick!==null||(w.onclick=qs));else if(M!==4&&(M===27&&zr(v.type)&&(C=v.stateNode,w=null),v=v.child,v!==null))for(tg(v,w,C),v=v.sibling;v!==null;)tg(v,w,C),v=v.sibling}function Bv(v,w,C){var M=v.tag;if(M===5||M===6)v=v.stateNode,w?C.insertBefore(v,w):C.appendChild(v);else if(M!==4&&(M===27&&zr(v.type)&&(C=v.stateNode),v=v.child,v!==null))for(Bv(v,w,C),v=v.sibling;v!==null;)Bv(v,w,C),v=v.sibling}function Fv(v){var w=v.stateNode,C=v.memoizedProps;try{for(var M=v.type,F=w.attributes;F.length;)w.removeAttributeNode(F[0]);as(w,M,C),w[on]=v,w[Nn]=C}catch(V){yi(v,v.return,V)}}var Tl=!1,Ra=!1,rg=!1,by=typeof WeakSet=="function"?WeakSet:Set,qa=null;function o0(v,w){if(v=v.containerInfo,pg=Uy,v=Bc(v),Hs(v)){if("selectionStart"in v)var C={start:v.selectionStart,end:v.selectionEnd};else e:{C=(C=v.ownerDocument)&&C.defaultView||window;var M=C.getSelection&&C.getSelection();if(M&&M.rangeCount!==0){C=M.anchorNode;var F=M.anchorOffset,V=M.focusNode;M=M.focusOffset;try{C.nodeType,V.nodeType}catch{C=null;break e}var ae=0,Se=-1,Fe=-1,it=0,ht=0,_t=v,at=null;t:for(;;){for(var lt;_t!==C||F!==0&&_t.nodeType!==3||(Se=ae+F),_t!==V||M!==0&&_t.nodeType!==3||(Fe=ae+M),_t.nodeType===3&&(ae+=_t.nodeValue.length),(lt=_t.firstChild)!==null;)at=_t,_t=lt;for(;;){if(_t===v)break t;if(at===C&&++it===F&&(Se=ae),at===V&&++ht===M&&(Fe=ae),(lt=_t.nextSibling)!==null)break;_t=at,at=_t.parentNode}_t=lt}C=Se===-1||Fe===-1?null:{start:Se,end:Fe}}else C=null}C=C||{start:0,end:0}}else C=null;for(C0={focusedElem:v,selectionRange:C},Uy=!1,qa=w;qa!==null;)if(w=qa,v=w.child,(w.subtreeFlags&1028)!==0&&v!==null)v.return=w,qa=v;else for(;qa!==null;){switch(w=qa,V=w.alternate,v=w.flags,w.tag){case 0:if((v&4)!==0&&(v=w.updateQueue,v=v!==null?v.events:null,v!==null))for(C=0;C title"))),as(V,M,C),V[on]=v,Hn(V),M=V;break e;case"link":var ae=U_("link","href",F).get(M+(C.href||""));if(ae){for(var Se=0;SeTi&&(ae=Ti,Ti=Dr,Dr=ae);var Xe=vf(Se,Dr),Ve=vf(Se,Ti);if(Xe&&Ve&&(lt.rangeCount!==1||lt.anchorNode!==Xe.node||lt.anchorOffset!==Xe.offset||lt.focusNode!==Ve.node||lt.focusOffset!==Ve.offset)){var rt=_t.createRange();rt.setStart(Xe.node,Xe.offset),lt.removeAllRanges(),Dr>Ti?(lt.addRange(rt),lt.extend(Ve.node,Ve.offset)):(rt.setEnd(Ve.node,Ve.offset),lt.addRange(rt))}}}}for(_t=[],lt=Se;lt=lt.parentNode;)lt.nodeType===1&&_t.push({element:lt,left:lt.scrollLeft,top:lt.scrollTop});for(typeof Se.focus=="function"&&Se.focus(),Se=0;Se<_t.length;Se++){var bt=_t[Se];bt.element.scrollLeft=bt.left,bt.element.scrollTop=bt.top}}Uy=!!pg,C0=pg=null}finally{zt=F,q.p=M,H.T=C}}v.current=w,yo=2}}function v0(){if(yo===2){yo=0;var v=Zd,w=zv,C=(w.flags&8772)!==0;if((w.subtreeFlags&8772)!==0||C){C=H.T,H.T=null;var M=q.p;q.p=2;var F=zt;zt|=4;try{ng(v,w.alternate,w)}finally{zt=F,q.p=M,H.T=C}}yo=3}}function Ty(){if(yo===4||yo===3){yo=0,Me();var v=Zd,w=zv,C=hd,M=s_;(w.subtreeFlags&10256)!==0||(w.flags&10256)!==0?yo=5:(yo=0,zv=Zd=null,p0(v,v.pendingLanes));var F=v.pendingLanes;if(F===0&&(Kd=null),bn(C),w=w.stateNode,Ue&&typeof Ue.onCommitFiberRoot=="function")try{Ue.onCommitFiberRoot(_e,w,void 0,(w.current.flags&128)===128)}catch{}if(M!==null){w=H.T,F=q.p,q.p=2,H.T=null;try{for(var V=v.onRecoverableError,ae=0;aeC?32:C,H.T=null,C=l0,l0=null;var V=Zd,ae=hd;if(yo=0,zv=Zd=null,hd=0,(zt&6)!==0)throw Error(n(331));var Se=zt;if(zt|=4,Gt(V.current),Et(V,V.current,ae,C),zt=Se,fg(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot=="function")try{Ue.onPostCommitFiberRoot(_e,V)}catch{}return!0}finally{q.p=F,H.T=M,p0(v,w)}}function y0(v,w,C){w=sa(C,w),w=Bh(v.stateNode,w,2),v=Ks(v,w,2),v!==null&&(Br(v,2),Af(v))}function yi(v,w,C){if(v.tag===3)y0(v,v,C);else for(;w!==null;){if(w.tag===3){y0(w,v,C);break}else if(w.tag===1){var M=w.stateNode;if(typeof w.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(Kd===null||!Kd.has(M))){v=sa(C,v),C=El(2),M=Ks(w,C,2),M!==null&&(fd(C,M,w,v),Br(M,2),Af(M));break}}w=w.return}}function m0(v,w,C){var M=v.pingCache;if(M===null){M=v.pingCache=new vr;var F=new Set;M.set(w,F)}else F=M.get(w),F===void 0&&(F=new Set,M.set(w,F));F.has(C)||(Yc=!0,F.add(C),v=_E.bind(null,v,w,C),w.then(v,v))}function _E(v,w,C){var M=v.pingCache;M!==null&&M.delete(w),v.pingedLanes|=v.suspendedLanes&C,v.warmLanes&=~C,Hr===v&&(Mr&C)===C&&(qi===4||qi===3&&(Mr&62914560)===Mr&&300>Ie()-ag?(zt&2)===0&&qv(v,0):Xh|=C,$c===Mr&&($c=0)),Af(v)}function cg(v,w){w===0&&(w=Xt()),v=ys(v,w),v!==null&&(Br(v,w),Af(v))}function Cy(v){var w=v.memoizedState,C=0;w!==null&&(C=w.retryLane),cg(v,C)}function wE(v,w){var C=0;switch(v.tag){case 31:case 13:var M=v.stateNode,F=v.memoizedState;F!==null&&(C=F.retryLane);break;case 19:M=v.stateNode;break;case 22:M=v.stateNode._retryCache;break;default:throw Error(n(314))}M!==null&&M.delete(w),cg(v,C)}function xE(v,w){return ie(v,w)}var Vv=null,Kh=null,b0=!1,Ay=!1,_0=!1,Qd=0;function Af(v){v!==Kh&&v.next===null&&(Kh===null?Vv=Kh=v:Kh=Kh.next=v),Ay=!0,b0||(b0=!0,SE())}function fg(v,w){if(!_0&&Ay){_0=!0;do for(var C=!1,M=Vv;M!==null;){if(v!==0){var F=M.pendingLanes;if(F===0)var V=0;else{var ae=M.suspendedLanes,Se=M.pingedLanes;V=(1<<31-Ze(42|v)+1)-1,V&=F&~(ae&~Se),V=V&201326741?V&201326741|1:V?V|2:0}V!==0&&(C=!0,w_(M,V))}else V=Mr,V=sr(M,M===Hr?V:0,M.cancelPendingCommit!==null||M.timeoutHandle!==-1),(V&3)===0||Ut(M,V)||(C=!0,w_(M,V));M=M.next}while(C);_0=!1}}function EE(){m_()}function m_(){Ay=b0=!1;var v=0;Qd!==0&&TE()&&(v=Qd);for(var w=Ie(),C=null,M=Vv;M!==null;){var F=M.next,V=b_(M,w);V===0?(M.next=null,C===null?Vv=F:C.next=F,F===null&&(Kh=C)):(C=M,(v!==0||(V&3)!==0)&&(Ay=!0)),M=F}yo!==0&&yo!==5||fg(v),Qd!==0&&(Qd=0)}function b_(v,w){for(var C=v.suspendedLanes,M=v.pingedLanes,F=v.expirationTimes,V=v.pendingLanes&-62914561;0Se)break;var ht=Fe.transferSize,_t=Fe.initiatorType;ht&&T0(_t)&&(Fe=Fe.responseEnd,ae+=ht*(Fe"u"?null:document;function L_(v,w,C){var M=th;if(M&&typeof w=="string"&&w){var F=Xa(w);F='link[rel="'+v+'"][href="'+F+'"]',typeof C=="string"&&(F+='[crossorigin="'+C+'"]'),N_.has(F)||(N_.add(F),v={rel:v,crossOrigin:C,href:w},M.querySelector(F)===null&&(w=M.createElement("link"),as(w,"link",v),Hn(w),M.head.appendChild(w)))}}function M0(v){gd.D(v),L_("dns-prefetch",v,null)}function DE(v,w){gd.C(v,w),L_("preconnect",v,w)}function kE(v,w,C){gd.L(v,w,C);var M=th;if(M&&v&&w){var F='link[rel="preload"][as="'+Xa(w)+'"]';w==="image"&&C&&C.imageSrcSet?(F+='[imagesrcset="'+Xa(C.imageSrcSet)+'"]',typeof C.imageSizes=="string"&&(F+='[imagesizes="'+Xa(C.imageSizes)+'"]')):F+='[href="'+Xa(v)+'"]';var V=F;switch(w){case"style":V=Wv(v);break;case"script":V=Xv(v)}Sc.has(V)||(v=f({rel:"preload",href:w==="image"&&C&&C.imageSrcSet?void 0:v,as:w},C),Sc.set(V,v),M.querySelector(F)!==null||w==="style"&&M.querySelector(Yv(V))||w==="script"&&M.querySelector($v(V))||(w=M.createElement("link"),as(w,"link",v),Hn(w),M.head.appendChild(w)))}}function IE(v,w){gd.m(v,w);var C=th;if(C&&v){var M=w&&typeof w.as=="string"?w.as:"script",F='link[rel="modulepreload"][as="'+Xa(M)+'"][href="'+Xa(v)+'"]',V=F;switch(M){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":V=Xv(v)}if(!Sc.has(V)&&(v=f({rel:"modulepreload",href:v},w),Sc.set(V,v),C.querySelector(F)===null)){switch(M){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(C.querySelector($v(V)))return}M=C.createElement("link"),as(M,"link",v),Hn(M),C.head.appendChild(M)}}}function jo(v,w,C){gd.S(v,w,C);var M=th;if(M&&v){var F=ei(M).hoistableStyles,V=Wv(v);w=w||"default";var ae=F.get(V);if(!ae){var Se={loading:0,preload:null};if(ae=M.querySelector(Yv(V)))Se.loading=5;else{v=f({rel:"stylesheet",href:v,"data-precedence":w},C),(C=Sc.get(V))&&D0(v,C);var Fe=ae=M.createElement("link");Hn(Fe),as(Fe,"link",v),Fe._p=new Promise(function(it,ht){Fe.onload=it,Fe.onerror=ht}),Fe.addEventListener("load",function(){Se.loading|=1}),Fe.addEventListener("error",function(){Se.loading|=2}),Se.loading|=4,Ny(ae,w,M)}ae={type:"stylesheet",instance:ae,count:1,state:Se},F.set(V,ae)}}}function Gu(v,w){gd.X(v,w);var C=th;if(C&&v){var M=ei(C).hoistableScripts,F=Xv(v),V=M.get(F);V||(V=C.querySelector($v(F)),V||(v=f({src:v,async:!0},w),(w=Sc.get(F))&&Ly(v,w),V=C.createElement("script"),Hn(V),as(V,"link",v),C.head.appendChild(V)),V={type:"script",instance:V,count:1,state:null},M.set(F,V))}}function NE(v,w){gd.M(v,w);var C=th;if(C&&v){var M=ei(C).hoistableScripts,F=Xv(v),V=M.get(F);V||(V=C.querySelector($v(F)),V||(v=f({src:v,async:!0,type:"module"},w),(w=Sc.get(F))&&Ly(v,w),V=C.createElement("script"),Hn(V),as(V,"link",v),C.head.appendChild(V)),V={type:"script",instance:V,count:1,state:null},M.set(F,V))}}function j_(v,w,C,M){var F=(F=le.current)?Iy(F):null;if(!F)throw Error(n(446));switch(v){case"meta":case"title":return null;case"style":return typeof C.precedence=="string"&&typeof C.href=="string"?(w=Wv(C.href),C=ei(F).hoistableStyles,M=C.get(w),M||(M={type:"style",instance:null,count:0,state:null},C.set(w,M)),M):{type:"void",instance:null,count:0,state:null};case"link":if(C.rel==="stylesheet"&&typeof C.href=="string"&&typeof C.precedence=="string"){v=Wv(C.href);var V=ei(F).hoistableStyles,ae=V.get(v);if(ae||(F=F.ownerDocument||F,ae={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},V.set(v,ae),(V=F.querySelector(Yv(v)))&&!V._p&&(ae.instance=V,ae.state.loading=5),Sc.has(v)||(C={rel:"preload",as:"style",href:C.href,crossOrigin:C.crossOrigin,integrity:C.integrity,media:C.media,hrefLang:C.hrefLang,referrerPolicy:C.referrerPolicy},Sc.set(v,C),V||LE(F,v,C,ae.state))),w&&M===null)throw Error(n(528,""));return ae}if(w&&M!==null)throw Error(n(529,""));return null;case"script":return w=C.async,C=C.src,typeof C=="string"&&w&&typeof w!="function"&&typeof w!="symbol"?(w=Xv(C),C=ei(F).hoistableScripts,M=C.get(w),M||(M={type:"script",instance:null,count:0,state:null},C.set(w,M)),M):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,v))}}function Wv(v){return'href="'+Xa(v)+'"'}function Yv(v){return'link[rel="stylesheet"]['+v+"]"}function B_(v){return f({},v,{"data-precedence":v.precedence,precedence:null})}function LE(v,w,C,M){v.querySelector('link[rel="preload"][as="style"]['+w+"]")?M.loading=1:(w=v.createElement("link"),M.preload=w,w.addEventListener("load",function(){return M.loading|=1}),w.addEventListener("error",function(){return M.loading|=2}),as(w,"link",C),Hn(w),v.head.appendChild(w))}function Xv(v){return'[src="'+Xa(v)+'"]'}function $v(v){return"script[async]"+v}function F_(v,w,C){if(w.count++,w.instance===null)switch(w.type){case"style":var M=v.querySelector('style[data-href~="'+Xa(C.href)+'"]');if(M)return w.instance=M,Hn(M),M;var F=f({},C,{"data-href":C.href,"data-precedence":C.precedence,href:null,precedence:null});return M=(v.ownerDocument||v).createElement("style"),Hn(M),as(M,"style",F),Ny(M,C.precedence,v),w.instance=M;case"stylesheet":F=Wv(C.href);var V=v.querySelector(Yv(F));if(V)return w.state.loading|=4,w.instance=V,Hn(V),V;M=B_(C),(F=Sc.get(F))&&D0(M,F),V=(v.ownerDocument||v).createElement("link"),Hn(V);var ae=V;return ae._p=new Promise(function(Se,Fe){ae.onload=Se,ae.onerror=Fe}),as(V,"link",M),w.state.loading|=4,Ny(V,C.precedence,v),w.instance=V;case"script":return V=Xv(C.src),(F=v.querySelector($v(V)))?(w.instance=F,Hn(F),F):(M=C,(F=Sc.get(V))&&(M=f({},C),Ly(M,F)),v=v.ownerDocument||v,F=v.createElement("script"),Hn(F),as(F,"link",M),v.head.appendChild(F),w.instance=F);case"void":return null;default:throw Error(n(443,w.type))}else w.type==="stylesheet"&&(w.state.loading&4)===0&&(M=w.instance,w.state.loading|=4,Ny(M,C.precedence,v));return w.instance}function Ny(v,w,C){for(var M=C.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),F=M.length?M[M.length-1]:null,V=F,ae=0;ae title"):null)}function jE(v,w,C){if(C===1||w.itemProp!=null)return!1;switch(v){case"meta":case"title":return!0;case"style":if(typeof w.precedence!="string"||typeof w.href!="string"||w.href==="")break;return!0;case"link":if(typeof w.rel!="string"||typeof w.href!="string"||w.href===""||w.onLoad||w.onError)break;switch(w.rel){case"stylesheet":return v=w.disabled,typeof w.precedence=="string"&&v==null;default:return!0}case"script":if(w.async&&typeof w.async!="function"&&typeof w.async!="symbol"&&!w.onLoad&&!w.onError&&w.src&&typeof w.src=="string")return!0}return!1}function q_(v){return!(v.type==="stylesheet"&&(v.state.loading&3)===0)}function Kv(v,w,C,M){if(C.type==="stylesheet"&&(typeof M.media!="string"||matchMedia(M.media).matches!==!1)&&(C.state.loading&4)===0){if(C.instance===null){var F=Wv(M.href),V=w.querySelector(Yv(F));if(V){w=V._p,w!==null&&typeof w=="object"&&typeof w.then=="function"&&(v.count++,v=jy.bind(v),w.then(v,v)),C.state.loading|=4,C.instance=V,Hn(V);return}V=w.ownerDocument||w,M=B_(M),(F=Sc.get(F))&&D0(M,F),V=V.createElement("link"),Hn(V);var ae=V;ae._p=new Promise(function(Se,Fe){ae.onload=Se,ae.onerror=Fe}),as(V,"link",M),C.instance=V}v.stylesheets===null&&(v.stylesheets=new Map),v.stylesheets.set(C,w),(w=C.state.preload)&&(C.state.loading&3)===0&&(v.count++,C=jy.bind(v),w.addEventListener("load",C),w.addEventListener("error",C))}}var k0=0;function BE(v,w){return v.stylesheets&&v.count===0&&Fy(v,v.stylesheets),0k0?50:800)+w);return v.unsuspend=C,function(){v.unsuspend=null,clearTimeout(M),clearTimeout(F)}}:null}function jy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fy(this,this.stylesheets);else if(this.unsuspend){var v=this.unsuspend;this.unsuspend=null,v()}}}var By=null;function Fy(v,w){v.stylesheets=null,v.unsuspend!==null&&(v.count++,By=new Map,w.forEach(G_,v),By=null,jy.call(v))}function G_(v,w){if(!(w.state.loading&4)){var C=By.get(v);if(C)var M=C.get(null);else{C=new Map,By.set(v,C);for(var F=v.querySelectorAll("link[data-precedence],style[data-precedence]"),V=0;V"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),XE.exports=aV(),XE.exports}var sV=oV();let q9=me.createContext(null);function uV(){let r=me.useContext(q9);if(!r)throw new Error("RenderContext not found");return r}function lV(){return uV().model}function Wy(r){let e=lV(),t=me.useSyncExternalStore(i=>(e.on(`change:${r}`,i),()=>e.off(`change:${r}`,i)),()=>e.get(r)),n=me.useCallback(i=>{e.set(r,typeof i=="function"?i(e.get(r)):i),e.save_changes()},[e,r]);return[t,n]}function cV(r){return({el:e,model:t,experimental:n})=>{let i=sV.createRoot(e);return i.render(me.createElement(me.StrictMode,null,me.createElement(q9.Provider,{value:{model:t,experimental:n}},me.createElement(r)))),()=>i.unmount()}}const Yu={graph:{1:"#ffdf81ff"},motion:{duration:{quick:"100ms"}},palette:{lemon:{40:"#d7aa0aff"},neutral:{40:"#959aa1ff"}},theme:{dark:{boxShadow:{raised:"0px 1px 2px 0px rgb(from #09090aff r g b / 0.50)",overlay:"0px 8px 20px 0px rgb(from #09090aff r g b / 0.50)"},color:{neutral:{text:{weakest:"#818790ff",weaker:"#a8acb2ff",weak:"#cfd1d4ff",default:"#f5f6f6ff",inverse:"#1a1b1dff"},icon:"#cfd1d4ff",bg:{weak:"#212325ff",default:"#1a1b1dff",strong:"#3c3f44ff",stronger:"#6f757eff",strongest:"#f5f6f6ff",status:"#a8acb2ff","on-bg-weak":"#81879014"},border:{weak:"#3c3f44ff",strong:"#5e636aff",strongest:"#bbbec3ff"},hover:"#959aa11a",pressed:"#959aa133"},primary:{text:"#8fe3e8ff",icon:"#8fe3e8ff",bg:{weak:"#262f31ff",strong:"#8fe3e8ff",status:"#5db3bfff",selected:"#262f31ff"},border:{strong:"#8fe3e8ff",weak:"#02507bff"},focus:"#5db3bfff",hover:{weak:"#8fe3e814",strong:"#5db3bfff"},pressed:{weak:"#8fe3e81f",strong:"#4c99a4ff"}},danger:{text:"#ffaa97ff",icon:"#ffaa97ff",bg:{strong:"#ffaa97ff",weak:"#432520ff",status:"#f96746ff"},border:{strong:"#ffaa97ff",weak:"#730e00ff"},hover:{weak:"#ffaa9714",strong:"#f96746ff"},pressed:{weak:"#ffaa971f"},strong:"#e84e2cff"},warning:{text:"#ffd600ff",icon:"#ffd600ff",bg:{strong:"#ffd600ff",weak:"#312e1aff",status:"#d7aa0aff"},border:{strong:"#ffd600ff",weak:"#765500ff"}},success:{text:"#90cb62ff",icon:"#90cb62ff",bg:{strong:"#90cb62ff",weak:"#262d24ff",status:"#6fa646ff"},border:{strong:"#90cb62ff",weak:"#296127ff"}},discovery:{text:"#ccb4ffff",icon:"#ccb4ffff",bg:{strong:"#ccb4ffff",weak:"#2c2a34ff",status:"#a07becff"},border:{strong:"#ccb4ffff",weak:"#4b2894ff"}}}},light:{boxShadow:{raised:"0px 1px 2px 0px rgb(from #1a1b1dff r g b / 0.18)",overlay:"0px 4px 8px 0px rgb(from #1a1b1dff r g b / 0.12)"},color:{neutral:{text:{weakest:"#a8acb2ff",weaker:"#5e636aff",weak:"#4d5157ff",default:"#1a1b1dff",inverse:"#ffffffff"},icon:"#4d5157ff",bg:{weak:"#ffffffff",default:"#f5f6f6ff","on-bg-weak":"#f5f6f6ff",strong:"#e2e3e5ff",stronger:"#a8acb2ff",strongest:"#3c3f44ff",status:"#a8acb2ff"},border:{weak:"#e2e3e5ff",strong:"#bbbec3ff",strongest:"#6f757eff"},hover:"#6f757e1a",pressed:"#6f757e33"},primary:{text:"#0a6190ff",icon:"#0a6190ff",bg:{weak:"#e7fafbff",strong:"#0a6190ff",status:"#4c99a4ff",selected:"#e7fafbff"},border:{strong:"#0a6190ff",weak:"#8fe3e8ff"},focus:"#30839dff",hover:{weak:"#30839d1a",strong:"#02507bff"},pressed:{weak:"#30839d1f",strong:"#014063ff"}},danger:{text:"#bb2d00ff",icon:"#bb2d00ff",bg:{strong:"#bb2d00ff",weak:"#ffe9e7ff",status:"#e84e2cff"},border:{strong:"#bb2d00ff",weak:"#ffaa97ff"},hover:{weak:"#d4330014",strong:"#961200ff"},pressed:{weak:"#d433001f",strong:"#730e00ff"}},warning:{text:"#765500ff",icon:"#765500ff",bg:{strong:"#765500ff",weak:"#fffad1ff",status:"#d7aa0aff"},border:{strong:"#996e00ff",weak:"#ffd600ff"}},success:{text:"#3f7824ff",icon:"#3f7824ff",bg:{strong:"#3f7824ff",weak:"#e7fcd7ff",status:"#5b992bff"},border:{strong:"#3f7824ff",weak:"#90cb62ff"}},discovery:{text:"#5a34aaff",icon:"#5a34aaff",bg:{strong:"#5a34aaff",weak:"#e9deffff",status:"#754ec8ff"},border:{strong:"#5a34aaff",weak:"#b38effff"}}}}}},Ds={breakpoint:{"5xs":"320px","4xs":"360px","3xs":"375px","2xs":"512px",xs:"768px",sm:"864px",md:"1024px",lg:"1280px",xl:"1440px","2xl":"1680px","3xl":"1920px"},categorical:{1:"#55bdc5ff",2:"#4d49cbff",3:"#dc8b39ff",4:"#c9458dff",5:"#8e8cf3ff",6:"#78de7cff",7:"#3f80e3ff",8:"#673fabff",9:"#dbbf40ff",10:"#bf732dff",11:"#478a6eff",12:"#ade86bff"},graph:{1:"#ffdf81ff",2:"#c990c0ff",3:"#f79767ff",4:"#56c7e4ff",5:"#f16767ff",6:"#d8c7aeff",7:"#8dcc93ff",8:"#ecb4c9ff",9:"#4d8ddaff",10:"#ffc354ff",11:"#da7294ff",12:"#579380ff"},motion:{duration:{quick:"100ms",slow:"250ms"},easing:{standard:"cubic-bezier(0.42, 0, 0.58, 1)"}},palette:{baltic:{10:"#e7fafbff",15:"#c3f8fbff",20:"#8fe3e8ff",25:"#5cc3c9ff",30:"#5db3bfff",35:"#51a6b1ff",40:"#4c99a4ff",45:"#30839dff",50:"#0a6190ff",55:"#02507bff",60:"#014063ff",65:"#262f31ff",70:"#081e2bff",75:"#041823ff",80:"#01121cff"},hibiscus:{10:"#ffe9e7ff",15:"#ffd7d2ff",20:"#ffaa97ff",25:"#ff8e6aff",30:"#f96746ff",35:"#e84e2cff",40:"#d43300ff",45:"#bb2d00ff",50:"#961200ff",55:"#730e00ff",60:"#432520ff",65:"#4e0900ff",70:"#3f0800ff",75:"#360700ff",80:"#280500ff"},forest:{10:"#e7fcd7ff",15:"#bcf194ff",20:"#90cb62ff",25:"#80bb53ff",30:"#6fa646ff",35:"#5b992bff",40:"#4d8622ff",45:"#3f7824ff",50:"#296127ff",55:"#145439ff",60:"#0c4d31ff",65:"#0a4324ff",70:"#262d24ff",75:"#052618ff",80:"#021d11ff"},lemon:{10:"#fffad1ff",15:"#fff8bdff",20:"#fff178ff",25:"#ffe500ff",30:"#ffd600ff",35:"#f4c318ff",40:"#d7aa0aff",45:"#b48409ff",50:"#996e00ff",55:"#765500ff",60:"#614600ff",65:"#4d3700ff",70:"#312e1aff",75:"#2e2100ff",80:"#251b00ff"},lavender:{10:"#f7f3ffff",15:"#e9deffff",20:"#ccb4ffff",25:"#b38effff",30:"#a07becff",35:"#8c68d9ff",40:"#754ec8ff",45:"#5a34aaff",50:"#4b2894ff",55:"#3b1982ff",60:"#2c2a34ff",65:"#220954ff",70:"#170146ff",75:"#0e002dff",80:"#09001cff"},marigold:{10:"#fff0d2ff",15:"#ffde9dff",20:"#ffcf72ff",25:"#ffc450ff",30:"#ffb422ff",35:"#ffa901ff",40:"#ec9c00ff",45:"#da9105ff",50:"#ba7a00ff",55:"#986400ff",60:"#795000ff",65:"#624100ff",70:"#543800ff",75:"#422c00ff",80:"#251900ff"},earth:{10:"#fff7f0ff",15:"#fdeddaff",20:"#ffe1c5ff",25:"#f8d1aeff",30:"#ecbf96ff",35:"#e0ae7fff",40:"#d19660ff",45:"#af7c4dff",50:"#8d5d31ff",55:"#763f18ff",60:"#66310bff",65:"#5b2b09ff",70:"#481f01ff",75:"#361700ff",80:"#220e00ff"},neutral:{10:"#ffffffff",15:"#f5f6f6ff",20:"#e2e3e5ff",25:"#cfd1d4ff",30:"#bbbec3ff",35:"#a8acb2ff",40:"#959aa1ff",45:"#818790ff",50:"#6f757eff",55:"#5e636aff",60:"#4d5157ff",65:"#3c3f44ff",70:"#212325ff",75:"#1a1b1dff",80:"#09090aff"},beige:{10:"#fffcf4ff",20:"#fff7e3ff",30:"#f2ead4ff",40:"#c1b9a0ff",50:"#999384ff",60:"#666050ff",70:"#3f3824ff"},highlights:{yellow:"#faff00ff",periwinkle:"#6a82ffff"}},borderRadius:{none:"0px",sm:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px",full:"9999px"},space:{2:"2px",4:"4px",6:"6px",8:"8px",12:"12px",16:"16px",20:"20px",24:"24px",32:"32px",48:"48px",64:"64px"},theme:{dark:{boxShadow:{raised:"0px 1px 2px 0px rgb(from #09090aff r g b / 0.50)",overlay:"0px 8px 20px 0px rgb(from #09090aff r g b / 0.50)"},color:{neutral:{text:{weakest:"#818790ff",weaker:"#a8acb2ff",weak:"#cfd1d4ff",default:"#f5f6f6ff",inverse:"#1a1b1dff"},icon:"#cfd1d4ff",bg:{weak:"#212325ff",default:"#1a1b1dff",strong:"#3c3f44ff",stronger:"#6f757eff",strongest:"#f5f6f6ff",status:"#a8acb2ff","on-bg-weak":"#81879014"},border:{weak:"#3c3f44ff",strong:"#5e636aff",strongest:"#bbbec3ff"},hover:"#959aa11a",pressed:"#959aa133"},primary:{text:"#8fe3e8ff",icon:"#8fe3e8ff",bg:{weak:"#262f31ff",strong:"#8fe3e8ff",status:"#5db3bfff",selected:"#262f31ff"},border:{strong:"#8fe3e8ff",weak:"#02507bff"},focus:"#5db3bfff",hover:{weak:"#8fe3e814",strong:"#5db3bfff"},pressed:{weak:"#8fe3e81f",strong:"#4c99a4ff"}},danger:{text:"#ffaa97ff",icon:"#ffaa97ff",bg:{strong:"#ffaa97ff",weak:"#432520ff",status:"#f96746ff"},border:{strong:"#ffaa97ff",weak:"#730e00ff"},hover:{weak:"#ffaa9714",strong:"#f96746ff"},pressed:{weak:"#ffaa971f"},strong:"#e84e2cff"},warning:{text:"#ffd600ff",icon:"#ffd600ff",bg:{strong:"#ffd600ff",weak:"#312e1aff",status:"#d7aa0aff"},border:{strong:"#ffd600ff",weak:"#765500ff"}},success:{text:"#90cb62ff",icon:"#90cb62ff",bg:{strong:"#90cb62ff",weak:"#262d24ff",status:"#6fa646ff"},border:{strong:"#90cb62ff",weak:"#296127ff"}},discovery:{text:"#ccb4ffff",icon:"#ccb4ffff",bg:{strong:"#ccb4ffff",weak:"#2c2a34ff",status:"#a07becff"},border:{strong:"#ccb4ffff",weak:"#4b2894ff"}}}},light:{boxShadow:{raised:"0px 1px 2px 0px rgb(from #1a1b1dff r g b / 0.18)",overlay:"0px 4px 8px 0px rgb(from #1a1b1dff r g b / 0.12)"},color:{neutral:{text:{weakest:"#a8acb2ff",weaker:"#5e636aff",weak:"#4d5157ff",default:"#1a1b1dff",inverse:"#ffffffff"},icon:"#4d5157ff",bg:{weak:"#ffffffff",default:"#f5f6f6ff","on-bg-weak":"#f5f6f6ff",strong:"#e2e3e5ff",stronger:"#a8acb2ff",strongest:"#3c3f44ff",status:"#a8acb2ff"},border:{weak:"#e2e3e5ff",strong:"#bbbec3ff",strongest:"#6f757eff"},hover:"#6f757e1a",pressed:"#6f757e33"},primary:{text:"#0a6190ff",icon:"#0a6190ff",bg:{weak:"#e7fafbff",strong:"#0a6190ff",status:"#4c99a4ff",selected:"#e7fafbff"},border:{strong:"#0a6190ff",weak:"#8fe3e8ff"},focus:"#30839dff",hover:{weak:"#30839d1a",strong:"#02507bff"},pressed:{weak:"#30839d1f",strong:"#014063ff"}},danger:{text:"#bb2d00ff",icon:"#bb2d00ff",bg:{strong:"#bb2d00ff",weak:"#ffe9e7ff",status:"#e84e2cff"},border:{strong:"#bb2d00ff",weak:"#ffaa97ff"},hover:{weak:"#d4330014",strong:"#961200ff"},pressed:{weak:"#d433001f",strong:"#730e00ff"}},warning:{text:"#765500ff",icon:"#765500ff",bg:{strong:"#765500ff",weak:"#fffad1ff",status:"#d7aa0aff"},border:{strong:"#996e00ff",weak:"#ffd600ff"}},success:{text:"#3f7824ff",icon:"#3f7824ff",bg:{strong:"#3f7824ff",weak:"#e7fcd7ff",status:"#5b992bff"},border:{strong:"#3f7824ff",weak:"#90cb62ff"}},discovery:{text:"#5a34aaff",icon:"#5a34aaff",bg:{strong:"#5a34aaff",weak:"#e9deffff",status:"#754ec8ff"},border:{strong:"#5a34aaff",weak:"#b38effff"}}}}},zIndex:{deep:-999999,base:0,overlay:10,banner:20,blanket:30,popover:40,tooltip:50,modal:60}},fV=()=>{const e={},t=(n,i="")=>{typeof n=="object"&&Object.keys(n).forEach(a=>{i===""?t(n[a],`${a}`):t(n[a],`${i}-${a}`)}),typeof n=="string"&&(i=i.replace("light-",""),e[i]=`var(--theme-color-${i})`)};return t(Ds.theme.light.color,""),e},dV=()=>{const r={},e=(t,n="")=>{if(typeof t=="object"&&Object.keys(t).forEach(i=>{e(t[i],`${n}-${i}`)}),typeof t=="string"){n=n.replace("light-","");const i=n.replace("shadow-","");r[i]=`var(--theme-${n})`}};return e(Ds.theme.light.boxShadow,"shadow"),r},lk=(r,e)=>Object.keys(r).reduce((t,n)=>(t[`${e}-${n}`]=r[n],t),{}),hV={colors:Object.assign(Object.assign(Object.assign({},Ds.palette),{graph:Ds.graph,categorical:Ds.categorical,dark:Object.assign({},Ds.theme.dark.color),light:Object.assign({},Ds.theme.light.color)}),fV()),borderRadius:Ds.borderRadius,boxShadow:Object.assign(Object.assign(Object.assign({},lk(Ds.theme.dark.boxShadow,"dark")),lk(Ds.theme.light.boxShadow,"light")),dV()),boxShadowColor:{},fontFamily:{sans:['"Public Sans"'],mono:['"Fira Code"'],syne:['"Syne Neo"']},screens:Object.assign({},Ds.breakpoint),transitionTimingFunction:{DEFAULT:Ds.motion.easing.standard},transitionDuration:{DEFAULT:Ds.motion.duration.quick,quick:Ds.motion.duration.quick,slow:Ds.motion.duration.slow},transitionDelay:{DEFAULT:"0ms",none:"0ms",delayed:"100ms"},transitionProperty:{all:"all"}};Object.assign(Object.assign({},hV),{extend:{colors:{transparent:"transparent",current:"currentColor",inherit:"inherit"},zIndex:Object.assign({},Ds.zIndex),spacing:Object.assign(Object.assign({},Object.keys(Ds.space).reduce((r,e)=>Object.assign(Object.assign({},r),{[`token-${e}`]:Ds.space[e]}),{})),{0:"0px",px:"1px",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"20px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"})}});var QE={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/var ck;function vV(){return ck||(ck=1,(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var a="",o=0;oconsole.warn(`[🪡 Needle]: ${r}`);var gV=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{orientation:e="horizontal",as:t,style:n,className:i,htmlAttributes:a,ref:o}=r,s=gV(r,["orientation","as","style","className","htmlAttributes","ref"]);const u=Vn("ndl-divider",i,{"ndl-divider-horizontal":e==="horizontal","ndl-divider-vertical":e==="vertical"}),l=t||"div";return Te.jsx(l,Object.assign({className:u,style:n,role:"separator","aria-orientation":e,ref:o},s,a))};var mV=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{className:n="",style:i,ref:a,htmlAttributes:o}=t,s=mV(t,["className","style","ref","htmlAttributes"]);return Te.jsx(r,Object.assign({strokeWidth:1.5,style:i,className:`${bV} ${n}`.trim(),"aria-hidden":"true"},s,o,{ref:a}))};return ao.memo(e)}const _V=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M13.0312 13.5625C12.6824 13.5625 12.337 13.4938 12.0147 13.3603C11.6925 13.2268 11.3997 13.0312 11.153 12.7845C10.9063 12.5378 10.7107 12.245 10.5772 11.9228C10.4437 11.6005 10.375 11.2551 10.375 10.9062C10.375 10.5574 10.4437 10.212 10.5772 9.88975C10.7107 9.56748 10.9063 9.27465 11.153 9.028C11.3997 8.78134 11.6925 8.58568 12.0147 8.45219C12.337 8.31871 12.6824 8.25 13.0312 8.25C13.3801 8.25 13.7255 8.31871 14.0478 8.45219C14.37 8.58568 14.6628 8.78134 14.9095 9.028C15.1562 9.27465 15.3518 9.56748 15.4853 9.88975C15.6188 10.212 15.6875 10.5574 15.6875 10.9062C15.6875 11.2551 15.6188 11.6005 15.4853 11.9228C15.3518 12.245 15.1562 12.5378 14.9095 12.7845C14.6628 13.0312 14.37 13.2268 14.0478 13.3603C13.7255 13.4938 13.3801 13.5625 13.0312 13.5625ZM13.0312 13.5625V16.75M13.0312 16.75C13.4539 16.75 13.8593 16.9179 14.1582 17.2168C14.4571 17.5157 14.625 17.9211 14.625 18.3438C14.625 18.7664 14.4571 19.1718 14.1582 19.4707C13.8593 19.7696 13.4539 19.9375 13.0312 19.9375C12.6086 19.9375 12.2032 19.7696 11.9043 19.4707C11.6054 19.1718 11.4375 18.7664 11.4375 18.3438C11.4375 17.9211 11.6054 17.5157 11.9043 17.2168C12.2032 16.9179 12.6086 16.75 13.0312 16.75ZM14.9091 9.02926L17.2182 6.72009M15.3645 12.177L16.983 13.7955M11.1548 12.7827L6.71997 17.2176M10.5528 9.95081L7.4425 8.08435M16.75 5.59375C16.75 6.01644 16.9179 6.42182 17.2168 6.7207C17.5157 7.01959 17.9211 7.1875 18.3438 7.1875C18.7664 7.1875 19.1718 7.01959 19.4707 6.7207C19.7696 6.42182 19.9375 6.01644 19.9375 5.59375C19.9375 5.17106 19.7696 4.76568 19.4707 4.4668C19.1718 4.16791 18.7664 4 18.3438 4C17.9211 4 17.5157 4.16791 17.2168 4.4668C16.9179 4.76568 16.75 5.17106 16.75 5.59375ZM16.75 14.625C16.75 15.0477 16.9179 15.4531 17.2168 15.752C17.5157 16.0508 17.9211 16.2187 18.3438 16.2187C18.7664 16.2187 19.1718 16.0508 19.4707 15.752C19.7696 15.4531 19.9375 15.0477 19.9375 14.625C19.9375 14.2023 19.7696 13.7969 19.4707 13.498C19.1718 13.1992 18.7664 13.0312 18.3438 13.0312C17.9211 13.0312 17.5157 13.1992 17.2168 13.498C16.9179 13.7969 16.75 14.2023 16.75 14.625ZM4 18.3438C4 18.553 4.04122 18.7603 4.12132 18.9537C4.20141 19.147 4.31881 19.3227 4.4668 19.4707C4.61479 19.6187 4.79049 19.7361 4.98385 19.8162C5.17721 19.8963 5.38446 19.9375 5.59375 19.9375C5.80304 19.9375 6.01029 19.8963 6.20365 19.8162C6.39701 19.7361 6.57271 19.6187 6.7207 19.4707C6.86869 19.3227 6.98609 19.147 7.06618 18.9537C7.14628 18.7603 7.1875 18.553 7.1875 18.3438C7.1875 18.1345 7.14628 17.9272 7.06618 17.7338C6.98609 17.5405 6.86869 17.3648 6.7207 17.2168C6.57271 17.0688 6.39701 16.9514 6.20365 16.8713C6.01029 16.7912 5.80304 16.75 5.59375 16.75C5.38446 16.75 5.17721 16.7912 4.98385 16.8713C4.79049 16.9514 4.61479 17.0688 4.4668 17.2168C4.31881 17.3648 4.20141 17.5405 4.12132 17.7338C4.04122 17.9272 4 18.1345 4 18.3438ZM4.53125 7.1875C4.53125 7.61019 4.69916 8.01557 4.99805 8.31445C5.29693 8.61334 5.70231 8.78125 6.125 8.78125C6.54769 8.78125 6.95307 8.61334 7.25195 8.31445C7.55084 8.01557 7.71875 7.61019 7.71875 7.1875C7.71875 6.76481 7.55084 6.35943 7.25195 6.06055C6.95307 5.76166 6.54769 5.59375 6.125 5.59375C5.70231 5.59375 5.29693 5.76166 4.99805 6.06055C4.69916 6.35943 4.53125 6.76481 4.53125 7.1875Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),wV=zo(_V),xV=r=>Te.jsxs("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:[Te.jsx("rect",{x:5.94,y:5.94,width:12.12,height:12.12,rx:1.5,stroke:"currentColor",strokeWidth:1.5}),Te.jsx("path",{d:"M3 9.75V5.25C3 4.01 4.01 3 5.25 3H9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Te.jsx("path",{d:"M14.25 3H18.75C19.99 3 21 4.01 21 5.25V9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Te.jsx("path",{d:"M3 14.25V18.75C3 19.99 4.01 21 5.25 21H9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Te.jsx("path",{d:"M21 14.25V18.75C21 19.99 19.99 21 18.75 21H14.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"})]})),EV=zo(xV),SV=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M11.9992 6.60001C11.5218 6.60001 11.064 6.41036 10.7264 6.0728C10.3889 5.73523 10.1992 5.27739 10.1992 4.8C10.1992 4.32261 10.3889 3.86477 10.7264 3.52721C11.064 3.18964 11.5218 3 11.9992 3C12.4766 3 12.9344 3.18964 13.272 3.52721C13.6096 3.86477 13.7992 4.32261 13.7992 4.8C13.7992 5.27739 13.6096 5.73523 13.272 6.0728C12.9344 6.41036 12.4766 6.60001 11.9992 6.60001ZM11.9992 6.60001V17.4M11.9992 17.4C12.4766 17.4 12.9344 17.5897 13.272 17.9272C13.6096 18.2648 13.7992 18.7226 13.7992 19.2C13.7992 19.6774 13.6096 20.1353 13.272 20.4728C12.9344 20.8104 12.4766 21 11.9992 21C11.5218 21 11.064 20.8104 10.7264 20.4728C10.3889 20.1353 10.1992 19.6774 10.1992 19.2C10.1992 18.7226 10.3889 18.2648 10.7264 17.9272C11.064 17.5897 11.5218 17.4 11.9992 17.4ZM5.39844 17.4C5.39844 16.1269 5.90415 14.906 6.80433 14.0059C7.7045 13.1057 8.9254 12.6 10.1984 12.6H13.7984C15.0715 12.6 16.2924 13.1057 17.1926 14.0059C18.0927 14.906 18.5985 16.1269 18.5985 17.4M3.59961 19.2C3.59961 19.6774 3.78925 20.1353 4.12682 20.4728C4.46438 20.8104 4.92222 21 5.39961 21C5.877 21 6.33484 20.8104 6.67241 20.4728C7.00997 20.1353 7.19961 19.6774 7.19961 19.2C7.19961 18.7226 7.00997 18.2648 6.67241 17.9272C6.33484 17.5897 5.877 17.4 5.39961 17.4C4.92222 17.4 4.46438 17.5897 4.12682 17.9272C3.78925 18.2648 3.59961 18.7226 3.59961 19.2ZM16.8008 19.2C16.8008 19.6774 16.9904 20.1353 17.328 20.4728C17.6656 20.8104 18.1234 21 18.6008 21C19.0782 21 19.536 20.8104 19.8736 20.4728C20.2111 20.1353 20.4008 19.6774 20.4008 19.2C20.4008 18.7226 20.2111 18.2648 19.8736 17.9272C19.536 17.5897 19.0782 17.4 18.6008 17.4C18.1234 17.4 17.6656 17.5897 17.328 17.9272C16.9904 18.2648 16.8008 18.7226 16.8008 19.2Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),OV=zo(SV),TV=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M9.95398 16.3762C11.4106 18.0304 12.3812 19.1337 12.3768 21.2003M7.8431 20.2339C10.0323 20.2339 10.5789 18.6865 10.5789 17.912C10.5789 17.1405 10.0309 15.593 7.8431 15.593C5.65388 15.593 5.1073 17.1405 5.1073 17.9135C5.1073 18.6865 5.65532 20.2339 7.8431 20.2339ZM11.9941 16.0464C4.49482 16.0464 2.62 11.6305 2.62 9.4225C2.62 7.21598 4.49482 2.80005 11.9941 2.80005C19.4934 2.80005 21.3682 7.21598 21.3682 9.4225C21.3682 11.6305 19.4934 16.0464 11.9941 16.0464Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),G9=zo(TV),CV=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M14.0601 5.25V18.75M20.4351 18C20.4351 18.45 20.1351 18.75 19.6851 18.75H4.31006C3.86006 18.75 3.56006 18.45 3.56006 18V6C3.56006 5.55 3.86006 5.25 4.31006 5.25H19.6851C20.1351 5.25 20.4351 5.55 20.4351 6V18Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),AV=zo(CV),RV=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M16.3229 22.0811L11.9385 14.4876M11.9385 14.4876L8.6037 19.5387L5.09035 2.62536L17.9807 14.1249L11.9385 14.4876Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),l2=zo(RV),PV=r=>Te.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Te.jsx("path",{d:"M20.9998 19.0001C20.9998 20.1046 20.1046 20.9998 19.0001 20.9998M3 4.99969C3 3.8953 3.8953 3 4.99969 3M19.0001 3C20.1046 3 20.9998 3.8953 20.9998 4.99969M3 19.0001C3 20.1046 3.8953 20.9998 4.99969 20.9998M20.9972 10.0067V14.0061M3 14.0061V10.0067M9.99854 3H13.9979M9.99854 20.9972H13.9979",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),V9=zo(PV);function MV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const DV=me.forwardRef(MV),kV=zo(DV);function IV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const NV=me.forwardRef(IV),LV=zo(NV);function jV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const BV=me.forwardRef(jV),H9=zo(BV);function FV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))}const UV=me.forwardRef(FV),zV=zo(UV);function qV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const GV=me.forwardRef(qV),W9=zo(GV);function VV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const HV=me.forwardRef(VV),WV=zo(HV);function YV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const XV=me.forwardRef(YV),$V=zo(XV);function KV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6"}))}const ZV=me.forwardRef(KV),QV=zo(ZV);function JV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"}))}const eH=me.forwardRef(JV),tH=zo(eH);function rH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const nH=me.forwardRef(rH),fk=zo(nH);function iH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))}const aH=me.forwardRef(iH),oH=zo(aH);function sH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const uH=me.forwardRef(sH),Y9=zo(uH);function lH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const cH=me.forwardRef(lH),fH=zo(cH);var dH=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const{as:e,className:t="",children:n,variant:i,htmlAttributes:a,ref:o}=r,s=dH(r,["as","className","children","variant","htmlAttributes","ref"]),u=Vn(`n-${i}`,t),l=e??"span";return Te.jsx(l,Object.assign({className:u,ref:o},s,a,{children:n}))};var hH=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,size:t="small",className:n,htmlAttributes:i,ref:a}=r,o=hH(r,["as","size","className","htmlAttributes","ref"]);const s=e||"div",u=Vn("ndl-spin-wrapper",n,{"ndl-large":t==="large","ndl-medium":t==="medium","ndl-small":t==="small"});return Te.jsx(s,Object.assign({className:u,role:"status","aria-label":"Loading content","aria-live":"polite",ref:a},o,i,{children:Te.jsx("div",{className:"ndl-spin"})}))};function c2(){return typeof window<"u"}function Fp(r){return S5(r)?(r.nodeName||"").toLowerCase():"#document"}function Fl(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Sh(r){var e;return(e=(S5(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function S5(r){return c2()?r instanceof Node||r instanceof Fl(r).Node:!1}function da(r){return c2()?r instanceof Element||r instanceof Fl(r).Element:!1}function bo(r){return c2()?r instanceof HTMLElement||r instanceof Fl(r).HTMLElement:!1}function vx(r){return!c2()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Fl(r).ShadowRoot}const vH=new Set(["inline","contents"]);function B1(r){const{overflow:e,overflowX:t,overflowY:n,display:i}=Ff(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!vH.has(i)}const pH=new Set(["table","td","th"]);function gH(r){return pH.has(Fp(r))}const yH=[":popover-open",":modal"];function f2(r){return yH.some(e=>{try{return r.matches(e)}catch{return!1}})}const mH=["transform","translate","scale","rotate","perspective"],bH=["transform","translate","scale","rotate","perspective","filter"],_H=["paint","layout","strict","content"];function O5(r){const e=d2(),t=da(r)?Ff(r):r;return mH.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||bH.some(n=>(t.willChange||"").includes(n))||_H.some(n=>(t.contain||"").includes(n))}function wH(r){let e=hv(r);for(;bo(e)&&!cv(e);){if(O5(e))return e;if(f2(e))return null;e=hv(e)}return null}function d2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xH=new Set(["html","body","#document"]);function cv(r){return xH.has(Fp(r))}function Ff(r){return Fl(r).getComputedStyle(r)}function h2(r){return da(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function hv(r){if(Fp(r)==="html")return r;const e=r.assignedSlot||r.parentNode||vx(r)&&r.host||Sh(r);return vx(e)?e.host:e}function X9(r){const e=hv(r);return cv(e)?r.ownerDocument?r.ownerDocument.body:r.body:bo(e)&&B1(e)?e:X9(e)}function wp(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=X9(r),a=i===((n=r.ownerDocument)==null?void 0:n.body),o=Fl(i);if(a){const s=tM(o);return e.concat(o,o.visualViewport||[],B1(i)?i:[],s&&t?wp(s):[])}return e.concat(i,wp(i,[],t))}function tM(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}const px=Math.min,Bg=Math.max,gx=Math.round,hm=Math.floor,_h=r=>({x:r,y:r}),EH={left:"right",right:"left",bottom:"top",top:"bottom"},SH={start:"end",end:"start"};function dk(r,e,t){return Bg(r,px(e,t))}function v2(r,e){return typeof r=="function"?r(e):r}function qg(r){return r.split("-")[0]}function p2(r){return r.split("-")[1]}function $9(r){return r==="x"?"y":"x"}function K9(r){return r==="y"?"height":"width"}const OH=new Set(["top","bottom"]);function dp(r){return OH.has(qg(r))?"y":"x"}function Z9(r){return $9(dp(r))}function TH(r,e,t){t===void 0&&(t=!1);const n=p2(r),i=Z9(r),a=K9(i);let o=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=yx(o)),[o,yx(o)]}function CH(r){const e=yx(r);return[rM(r),e,rM(e)]}function rM(r){return r.replace(/start|end/g,e=>SH[e])}const hk=["left","right"],vk=["right","left"],AH=["top","bottom"],RH=["bottom","top"];function PH(r,e,t){switch(r){case"top":case"bottom":return t?e?vk:hk:e?hk:vk;case"left":case"right":return e?AH:RH;default:return[]}}function MH(r,e,t,n){const i=p2(r);let a=PH(qg(r),t==="start",n);return i&&(a=a.map(o=>o+"-"+i),e&&(a=a.concat(a.map(rM)))),a}function yx(r){return r.replace(/left|right|bottom|top/g,e=>EH[e])}function DH(r){return{top:0,right:0,bottom:0,left:0,...r}}function kH(r){return typeof r!="number"?DH(r):{top:r,right:r,bottom:r,left:r}}function mx(r){const{x:e,y:t,width:n,height:i}=r;return{width:n,height:i,top:t,left:e,right:e+n,bottom:t+i,x:e,y:t}}/*! +*/var ck;function vV(){return ck||(ck=1,(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var a="",o=0;oconsole.warn(`[🪡 Needle]: ${r}`);var gV=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{orientation:e="horizontal",as:t,style:n,className:i,htmlAttributes:a,ref:o}=r,s=gV(r,["orientation","as","style","className","htmlAttributes","ref"]);const u=Vn("ndl-divider",i,{"ndl-divider-horizontal":e==="horizontal","ndl-divider-vertical":e==="vertical"}),l=t||"div";return Ce.jsx(l,Object.assign({className:u,style:n,role:"separator","aria-orientation":e,ref:o},s,a))};var mV=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{className:n="",style:i,ref:a,htmlAttributes:o}=t,s=mV(t,["className","style","ref","htmlAttributes"]);return Ce.jsx(r,Object.assign({strokeWidth:1.5,style:i,className:`${bV} ${n}`.trim(),"aria-hidden":"true"},s,o,{ref:a}))};return ao.memo(e)}const _V=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M13.0312 13.5625C12.6824 13.5625 12.337 13.4938 12.0147 13.3603C11.6925 13.2268 11.3997 13.0312 11.153 12.7845C10.9063 12.5378 10.7107 12.245 10.5772 11.9228C10.4437 11.6005 10.375 11.2551 10.375 10.9062C10.375 10.5574 10.4437 10.212 10.5772 9.88975C10.7107 9.56748 10.9063 9.27465 11.153 9.028C11.3997 8.78134 11.6925 8.58568 12.0147 8.45219C12.337 8.31871 12.6824 8.25 13.0312 8.25C13.3801 8.25 13.7255 8.31871 14.0478 8.45219C14.37 8.58568 14.6628 8.78134 14.9095 9.028C15.1562 9.27465 15.3518 9.56748 15.4853 9.88975C15.6188 10.212 15.6875 10.5574 15.6875 10.9062C15.6875 11.2551 15.6188 11.6005 15.4853 11.9228C15.3518 12.245 15.1562 12.5378 14.9095 12.7845C14.6628 13.0312 14.37 13.2268 14.0478 13.3603C13.7255 13.4938 13.3801 13.5625 13.0312 13.5625ZM13.0312 13.5625V16.75M13.0312 16.75C13.4539 16.75 13.8593 16.9179 14.1582 17.2168C14.4571 17.5157 14.625 17.9211 14.625 18.3438C14.625 18.7664 14.4571 19.1718 14.1582 19.4707C13.8593 19.7696 13.4539 19.9375 13.0312 19.9375C12.6086 19.9375 12.2032 19.7696 11.9043 19.4707C11.6054 19.1718 11.4375 18.7664 11.4375 18.3438C11.4375 17.9211 11.6054 17.5157 11.9043 17.2168C12.2032 16.9179 12.6086 16.75 13.0312 16.75ZM14.9091 9.02926L17.2182 6.72009M15.3645 12.177L16.983 13.7955M11.1548 12.7827L6.71997 17.2176M10.5528 9.95081L7.4425 8.08435M16.75 5.59375C16.75 6.01644 16.9179 6.42182 17.2168 6.7207C17.5157 7.01959 17.9211 7.1875 18.3438 7.1875C18.7664 7.1875 19.1718 7.01959 19.4707 6.7207C19.7696 6.42182 19.9375 6.01644 19.9375 5.59375C19.9375 5.17106 19.7696 4.76568 19.4707 4.4668C19.1718 4.16791 18.7664 4 18.3438 4C17.9211 4 17.5157 4.16791 17.2168 4.4668C16.9179 4.76568 16.75 5.17106 16.75 5.59375ZM16.75 14.625C16.75 15.0477 16.9179 15.4531 17.2168 15.752C17.5157 16.0508 17.9211 16.2187 18.3438 16.2187C18.7664 16.2187 19.1718 16.0508 19.4707 15.752C19.7696 15.4531 19.9375 15.0477 19.9375 14.625C19.9375 14.2023 19.7696 13.7969 19.4707 13.498C19.1718 13.1992 18.7664 13.0312 18.3438 13.0312C17.9211 13.0312 17.5157 13.1992 17.2168 13.498C16.9179 13.7969 16.75 14.2023 16.75 14.625ZM4 18.3438C4 18.553 4.04122 18.7603 4.12132 18.9537C4.20141 19.147 4.31881 19.3227 4.4668 19.4707C4.61479 19.6187 4.79049 19.7361 4.98385 19.8162C5.17721 19.8963 5.38446 19.9375 5.59375 19.9375C5.80304 19.9375 6.01029 19.8963 6.20365 19.8162C6.39701 19.7361 6.57271 19.6187 6.7207 19.4707C6.86869 19.3227 6.98609 19.147 7.06618 18.9537C7.14628 18.7603 7.1875 18.553 7.1875 18.3438C7.1875 18.1345 7.14628 17.9272 7.06618 17.7338C6.98609 17.5405 6.86869 17.3648 6.7207 17.2168C6.57271 17.0688 6.39701 16.9514 6.20365 16.8713C6.01029 16.7912 5.80304 16.75 5.59375 16.75C5.38446 16.75 5.17721 16.7912 4.98385 16.8713C4.79049 16.9514 4.61479 17.0688 4.4668 17.2168C4.31881 17.3648 4.20141 17.5405 4.12132 17.7338C4.04122 17.9272 4 18.1345 4 18.3438ZM4.53125 7.1875C4.53125 7.61019 4.69916 8.01557 4.99805 8.31445C5.29693 8.61334 5.70231 8.78125 6.125 8.78125C6.54769 8.78125 6.95307 8.61334 7.25195 8.31445C7.55084 8.01557 7.71875 7.61019 7.71875 7.1875C7.71875 6.76481 7.55084 6.35943 7.25195 6.06055C6.95307 5.76166 6.54769 5.59375 6.125 5.59375C5.70231 5.59375 5.29693 5.76166 4.99805 6.06055C4.69916 6.35943 4.53125 6.76481 4.53125 7.1875Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),wV=zo(_V),xV=r=>Ce.jsxs("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:[Ce.jsx("rect",{x:5.94,y:5.94,width:12.12,height:12.12,rx:1.5,stroke:"currentColor",strokeWidth:1.5}),Ce.jsx("path",{d:"M3 9.75V5.25C3 4.01 4.01 3 5.25 3H9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Ce.jsx("path",{d:"M14.25 3H18.75C19.99 3 21 4.01 21 5.25V9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Ce.jsx("path",{d:"M3 14.25V18.75C3 19.99 4.01 21 5.25 21H9.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"}),Ce.jsx("path",{d:"M21 14.25V18.75C21 19.99 19.99 21 18.75 21H14.25",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round"})]})),EV=zo(xV),SV=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M11.9992 6.60001C11.5218 6.60001 11.064 6.41036 10.7264 6.0728C10.3889 5.73523 10.1992 5.27739 10.1992 4.8C10.1992 4.32261 10.3889 3.86477 10.7264 3.52721C11.064 3.18964 11.5218 3 11.9992 3C12.4766 3 12.9344 3.18964 13.272 3.52721C13.6096 3.86477 13.7992 4.32261 13.7992 4.8C13.7992 5.27739 13.6096 5.73523 13.272 6.0728C12.9344 6.41036 12.4766 6.60001 11.9992 6.60001ZM11.9992 6.60001V17.4M11.9992 17.4C12.4766 17.4 12.9344 17.5897 13.272 17.9272C13.6096 18.2648 13.7992 18.7226 13.7992 19.2C13.7992 19.6774 13.6096 20.1353 13.272 20.4728C12.9344 20.8104 12.4766 21 11.9992 21C11.5218 21 11.064 20.8104 10.7264 20.4728C10.3889 20.1353 10.1992 19.6774 10.1992 19.2C10.1992 18.7226 10.3889 18.2648 10.7264 17.9272C11.064 17.5897 11.5218 17.4 11.9992 17.4ZM5.39844 17.4C5.39844 16.1269 5.90415 14.906 6.80433 14.0059C7.7045 13.1057 8.9254 12.6 10.1984 12.6H13.7984C15.0715 12.6 16.2924 13.1057 17.1926 14.0059C18.0927 14.906 18.5985 16.1269 18.5985 17.4M3.59961 19.2C3.59961 19.6774 3.78925 20.1353 4.12682 20.4728C4.46438 20.8104 4.92222 21 5.39961 21C5.877 21 6.33484 20.8104 6.67241 20.4728C7.00997 20.1353 7.19961 19.6774 7.19961 19.2C7.19961 18.7226 7.00997 18.2648 6.67241 17.9272C6.33484 17.5897 5.877 17.4 5.39961 17.4C4.92222 17.4 4.46438 17.5897 4.12682 17.9272C3.78925 18.2648 3.59961 18.7226 3.59961 19.2ZM16.8008 19.2C16.8008 19.6774 16.9904 20.1353 17.328 20.4728C17.6656 20.8104 18.1234 21 18.6008 21C19.0782 21 19.536 20.8104 19.8736 20.4728C20.2111 20.1353 20.4008 19.6774 20.4008 19.2C20.4008 18.7226 20.2111 18.2648 19.8736 17.9272C19.536 17.5897 19.0782 17.4 18.6008 17.4C18.1234 17.4 17.6656 17.5897 17.328 17.9272C16.9904 18.2648 16.8008 18.7226 16.8008 19.2Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),OV=zo(SV),TV=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M9.95398 16.3762C11.4106 18.0304 12.3812 19.1337 12.3768 21.2003M7.8431 20.2339C10.0323 20.2339 10.5789 18.6865 10.5789 17.912C10.5789 17.1405 10.0309 15.593 7.8431 15.593C5.65388 15.593 5.1073 17.1405 5.1073 17.9135C5.1073 18.6865 5.65532 20.2339 7.8431 20.2339ZM11.9941 16.0464C4.49482 16.0464 2.62 11.6305 2.62 9.4225C2.62 7.21598 4.49482 2.80005 11.9941 2.80005C19.4934 2.80005 21.3682 7.21598 21.3682 9.4225C21.3682 11.6305 19.4934 16.0464 11.9941 16.0464Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),G9=zo(TV),CV=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M14.0601 5.25V18.75M20.4351 18C20.4351 18.45 20.1351 18.75 19.6851 18.75H4.31006C3.86006 18.75 3.56006 18.45 3.56006 18V6C3.56006 5.55 3.86006 5.25 4.31006 5.25H19.6851C20.1351 5.25 20.4351 5.55 20.4351 6V18Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),AV=zo(CV),RV=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M16.3229 22.0811L11.9385 14.4876M11.9385 14.4876L8.6037 19.5387L5.09035 2.62536L17.9807 14.1249L11.9385 14.4876Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),l2=zo(RV),PV=r=>Ce.jsx("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{children:Ce.jsx("path",{d:"M20.9998 19.0001C20.9998 20.1046 20.1046 20.9998 19.0001 20.9998M3 4.99969C3 3.8953 3.8953 3 4.99969 3M19.0001 3C20.1046 3 20.9998 3.8953 20.9998 4.99969M3 19.0001C3 20.1046 3.8953 20.9998 4.99969 20.9998M20.9972 10.0067V14.0061M3 14.0061V10.0067M9.99854 3H13.9979M9.99854 20.9972H13.9979",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})),V9=zo(PV);function MV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const DV=me.forwardRef(MV),kV=zo(DV);function IV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const NV=me.forwardRef(IV),LV=zo(NV);function jV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const BV=me.forwardRef(jV),H9=zo(BV);function FV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))}const UV=me.forwardRef(FV),zV=zo(UV);function qV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const GV=me.forwardRef(qV),W9=zo(GV);function VV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const HV=me.forwardRef(VV),WV=zo(HV);function YV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const XV=me.forwardRef(YV),$V=zo(XV);function KV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM13.5 10.5h-6"}))}const ZV=me.forwardRef(KV),QV=zo(ZV);function JV({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"}))}const eH=me.forwardRef(JV),tH=zo(eH);function rH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const nH=me.forwardRef(rH),fk=zo(nH);function iH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))}const aH=me.forwardRef(iH),oH=zo(aH);function sH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const uH=me.forwardRef(sH),Y9=zo(uH);function lH({title:r,titleId:e,...t},n){return me.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},t),r?me.createElement("title",{id:e},r):null,me.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const cH=me.forwardRef(lH),fH=zo(cH);var dH=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const{as:e,className:t="",children:n,variant:i,htmlAttributes:a,ref:o}=r,s=dH(r,["as","className","children","variant","htmlAttributes","ref"]),u=Vn(`n-${i}`,t),l=e??"span";return Ce.jsx(l,Object.assign({className:u,ref:o},s,a,{children:n}))};var hH=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,size:t="small",className:n,htmlAttributes:i,ref:a}=r,o=hH(r,["as","size","className","htmlAttributes","ref"]);const s=e||"div",u=Vn("ndl-spin-wrapper",n,{"ndl-large":t==="large","ndl-medium":t==="medium","ndl-small":t==="small"});return Ce.jsx(s,Object.assign({className:u,role:"status","aria-label":"Loading content","aria-live":"polite",ref:a},o,i,{children:Ce.jsx("div",{className:"ndl-spin"})}))};function c2(){return typeof window<"u"}function Fp(r){return S5(r)?(r.nodeName||"").toLowerCase():"#document"}function Fl(r){var e;return(r==null||(e=r.ownerDocument)==null?void 0:e.defaultView)||window}function Sh(r){var e;return(e=(S5(r)?r.ownerDocument:r.document)||window.document)==null?void 0:e.documentElement}function S5(r){return c2()?r instanceof Node||r instanceof Fl(r).Node:!1}function da(r){return c2()?r instanceof Element||r instanceof Fl(r).Element:!1}function bo(r){return c2()?r instanceof HTMLElement||r instanceof Fl(r).HTMLElement:!1}function vx(r){return!c2()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Fl(r).ShadowRoot}const vH=new Set(["inline","contents"]);function B1(r){const{overflow:e,overflowX:t,overflowY:n,display:i}=Ff(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!vH.has(i)}const pH=new Set(["table","td","th"]);function gH(r){return pH.has(Fp(r))}const yH=[":popover-open",":modal"];function f2(r){return yH.some(e=>{try{return r.matches(e)}catch{return!1}})}const mH=["transform","translate","scale","rotate","perspective"],bH=["transform","translate","scale","rotate","perspective","filter"],_H=["paint","layout","strict","content"];function O5(r){const e=d2(),t=da(r)?Ff(r):r;return mH.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||bH.some(n=>(t.willChange||"").includes(n))||_H.some(n=>(t.contain||"").includes(n))}function wH(r){let e=hv(r);for(;bo(e)&&!cv(e);){if(O5(e))return e;if(f2(e))return null;e=hv(e)}return null}function d2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xH=new Set(["html","body","#document"]);function cv(r){return xH.has(Fp(r))}function Ff(r){return Fl(r).getComputedStyle(r)}function h2(r){return da(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function hv(r){if(Fp(r)==="html")return r;const e=r.assignedSlot||r.parentNode||vx(r)&&r.host||Sh(r);return vx(e)?e.host:e}function X9(r){const e=hv(r);return cv(e)?r.ownerDocument?r.ownerDocument.body:r.body:bo(e)&&B1(e)?e:X9(e)}function wp(r,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=X9(r),a=i===((n=r.ownerDocument)==null?void 0:n.body),o=Fl(i);if(a){const s=tM(o);return e.concat(o,o.visualViewport||[],B1(i)?i:[],s&&t?wp(s):[])}return e.concat(i,wp(i,[],t))}function tM(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}const px=Math.min,Bg=Math.max,gx=Math.round,hm=Math.floor,_h=r=>({x:r,y:r}),EH={left:"right",right:"left",bottom:"top",top:"bottom"},SH={start:"end",end:"start"};function dk(r,e,t){return Bg(r,px(e,t))}function v2(r,e){return typeof r=="function"?r(e):r}function qg(r){return r.split("-")[0]}function p2(r){return r.split("-")[1]}function $9(r){return r==="x"?"y":"x"}function K9(r){return r==="y"?"height":"width"}const OH=new Set(["top","bottom"]);function dp(r){return OH.has(qg(r))?"y":"x"}function Z9(r){return $9(dp(r))}function TH(r,e,t){t===void 0&&(t=!1);const n=p2(r),i=Z9(r),a=K9(i);let o=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=yx(o)),[o,yx(o)]}function CH(r){const e=yx(r);return[rM(r),e,rM(e)]}function rM(r){return r.replace(/start|end/g,e=>SH[e])}const hk=["left","right"],vk=["right","left"],AH=["top","bottom"],RH=["bottom","top"];function PH(r,e,t){switch(r){case"top":case"bottom":return t?e?vk:hk:e?hk:vk;case"left":case"right":return e?AH:RH;default:return[]}}function MH(r,e,t,n){const i=p2(r);let a=PH(qg(r),t==="start",n);return i&&(a=a.map(o=>o+"-"+i),e&&(a=a.concat(a.map(rM)))),a}function yx(r){return r.replace(/left|right|bottom|top/g,e=>EH[e])}function DH(r){return{top:0,right:0,bottom:0,left:0,...r}}function kH(r){return typeof r!="number"?DH(r):{top:r,right:r,bottom:r,left:r}}function mx(r){const{x:e,y:t,width:n,height:i}=r;return{width:n,height:i,top:t,left:e,right:e+n,bottom:t+i,x:e,y:t}}/*! * tabbable 6.4.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE -*/var IH=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],bx=IH.join(","),Q9=typeof Element>"u",Im=Q9?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_x=!Q9&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r==null?void 0:r.ownerDocument},wx=function(e,t){var n;t===void 0&&(t=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),a=i===""||i==="true",o=a||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):wx(e.parentNode));return o},NH=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},J9=function(e,t,n){if(wx(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(bx));return t&&Im.call(e,bx)&&i.unshift(e),i=i.filter(n),i},xx=function(e,t,n){for(var i=[],a=Array.from(e);a.length;){var o=a.shift();if(!wx(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=xx(u,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Im.call(o,bx);c&&n.filter(o)&&(t||!e.includes(o))&&i.push(o);var f=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!wx(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(f&&d){var h=xx(f===!0?o.children:f.children,!0,n);n.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else a.unshift.apply(a,o.children)}}return i},e7=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},t7=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||NH(e))&&!e7(e)?0:e.tabIndex},LH=function(e,t){var n=t7(e);return n<0&&t&&!e7(e)?0:n},jH=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},r7=function(e){return e.tagName==="INPUT"},BH=function(e){return r7(e)&&e.type==="hidden"},FH=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},UH=function(e,t){for(var n=0;nsummary:first-of-type"),s=o?e.parentElement:e;if(Im.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var u=e;e;){var l=e.parentElement,c=_x(e);if(l&&!l.shadowRoot&&i(l)===!0)return pk(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=u}if(VH(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return pk(e);return!1},WH=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n=0)},n7=function(e){var t=[],n=[];return e.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=LH(s,o),l=o?n7(i.candidates):s;u===0?o?t.push.apply(t,l):t.push(s):n.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),n.sort(jH).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(t)},g2=function(e,t){t=t||{};var n;return t.getShadowRoot?n=xx([e],t.includeContainer,{filter:iM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:YH}):n=J9(e,t.includeContainer,iM.bind(null,t)),n7(n)},XH=function(e,t){t=t||{};var n;return t.getShadowRoot?n=xx([e],t.includeContainer,{filter:nM.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=J9(e,t.includeContainer,nM.bind(null,t)),n},i7=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Im.call(e,bx)===!1?!1:iM(t,e)};function a7(){const r=navigator.userAgentData;return r!=null&&r.platform?r.platform:navigator.platform}function o7(){const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?r.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function s7(){return/apple/i.test(navigator.vendor)}function aM(){const r=/android/i;return r.test(a7())||r.test(o7())}function $H(){return a7().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function u7(){return o7().includes("jsdom/")}const gk="data-floating-ui-focusable",KH="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",JE="ArrowLeft",eS="ArrowRight",ZH="ArrowUp",QH="ArrowDown";function yh(r){let e=r.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function Is(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&vx(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function mh(r){return"composedPath"in r?r.composedPath()[0]:r.target}function tS(r,e){if(e==null)return!1;if("composedPath"in r)return r.composedPath().includes(e);const t=r;return t.target!=null&&e.contains(t.target)}function JH(r){return r.matches("html,body")}function ou(r){return(r==null?void 0:r.ownerDocument)||document}function T5(r){return bo(r)&&r.matches(KH)}function oM(r){return r?r.getAttribute("role")==="combobox"&&T5(r):!1}function eW(r){if(!r||u7())return!0;try{return r.matches(":focus-visible")}catch{return!0}}function Ex(r){return r?r.hasAttribute(gk)?r:r.querySelector("["+gk+"]")||r:null}function Fg(r,e,t){return t===void 0&&(t=!0),r.filter(i=>{var a;return i.parentId===e&&(!t||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...Fg(r,i.id,t)])}function tW(r,e){let t,n=-1;function i(a,o){o>n&&(t=a,n=o),Fg(r,a).forEach(u=>{i(u.id,o+1)})}return i(e,0),r.find(a=>a.id===t)}function yk(r,e){var t;let n=[],i=(t=r.find(a=>a.id===e))==null?void 0:t.parentId;for(;i;){const a=r.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function au(r){r.preventDefault(),r.stopPropagation()}function rW(r){return"nativeEvent"in r}function l7(r){return r.mozInputSource===0&&r.isTrusted?!0:aM()&&r.pointerType?r.type==="click"&&r.buttons===1:r.detail===0&&!r.pointerType}function c7(r){return u7()?!1:!aM()&&r.width===0&&r.height===0||aM()&&r.width===1&&r.height===1&&r.pressure===0&&r.detail===0&&r.pointerType==="mouse"||r.width<1&&r.height<1&&r.pressure===0&&r.detail===0&&r.pointerType==="touch"}function Nm(r,e){const t=["mouse","pen"];return e||t.push("",void 0),t.includes(r)}var nW=typeof document<"u",iW=function(){},Di=nW?me.useLayoutEffect:iW;const aW={...U9};function Ns(r){const e=me.useRef(r);return Di(()=>{e.current=r}),e}const oW=aW.useInsertionEffect,sW=oW||(r=>r());function Wa(r){const e=me.useRef(()=>{});return sW(()=>{e.current=r}),me.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i=r.current.length}function rS(r,e){return Wu(r,{disabledIndices:e})}function mk(r,e){return Wu(r,{decrement:!0,startingIndex:r.current.length,disabledIndices:e})}function Wu(r,e){let{startingIndex:t=-1,decrement:n=!1,disabledIndices:i,amount:a=1}=e===void 0?{}:e,o=t;do o+=n?-a:a;while(o>=0&&o<=r.current.length-1&&Ww(r,o,i));return o}function uW(r,e){let{event:t,orientation:n,loop:i,rtl:a,cols:o,disabledIndices:s,minIndex:u,maxIndex:l,prevIndex:c,stopEvent:f=!1}=e,d=c;if(t.key===ZH){if(f&&au(t),c===-1)d=l;else if(d=Wu(r,{startingIndex:d,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?g:g-o}Rb(r,d)&&(d=c)}if(t.key===QH&&(f&&au(t),c===-1?d=u:(d=Wu(r,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(d=Wu(r,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Rb(r,d)&&(d=c)),n==="both"){const h=hm(c/o);t.key===(a?JE:eS)&&(f&&au(t),c%o!==o-1?(d=Wu(r,{startingIndex:c,disabledIndices:s}),i&&rw(d,o,h)&&(d=Wu(r,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(d=Wu(r,{startingIndex:c-c%o-1,disabledIndices:s})),rw(d,o,h)&&(d=c)),t.key===(a?eS:JE)&&(f&&au(t),c%o!==0?(d=Wu(r,{startingIndex:c,decrement:!0,disabledIndices:s}),i&&rw(d,o,h)&&(d=Wu(r,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(d=Wu(r,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),rw(d,o,h)&&(d=c));const p=hm(l/o)===h;Rb(r,d)&&(i&&p?d=t.key===(a?eS:JE)?l:Wu(r,{startingIndex:c-c%o-1,disabledIndices:s}):d=c)}return d}function lW(r,e,t){const n=[];let i=0;return r.forEach((a,o)=>{let{width:s,height:u}=a,l=!1;for(t&&(i=0);!l;){const c=[];for(let f=0;fn[f]==null)?(c.forEach(f=>{n[f]=o}),l=!0):i++}}),[...n]}function cW(r,e,t,n,i){if(r===-1)return-1;const a=t.indexOf(r),o=e[r];switch(i){case"tl":return a;case"tr":return o?a+o.width-1:a;case"bl":return o?a+(o.height-1)*n:a;case"br":return t.lastIndexOf(r)}}function fW(r,e){return e.flatMap((t,n)=>r.includes(t)?[n]:[])}function Ww(r,e,t){if(typeof t=="function")return t(e);if(t)return t.includes(e);const n=r.current[e];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const F1=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function f7(r,e){const t=g2(r,F1()),n=t.length;if(n===0)return;const i=yh(ou(r)),a=t.indexOf(i),o=a===-1?e===1?0:n-1:a+e;return t[o]}function d7(r){return f7(ou(r).body,1)||r}function h7(r){return f7(ou(r).body,-1)||r}function Pb(r,e){const t=e||r.currentTarget,n=r.relatedTarget;return!n||!Is(t,n)}function dW(r){g2(r,F1()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function bk(r){r.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}var y2=z9();function _k(r,e,t){let{reference:n,floating:i}=r;const a=dp(e),o=Z9(e),s=K9(o),u=qg(e),l=a==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[s]/2-i[s]/2;let h;switch(u){case"top":h={x:c,y:n.y-i.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(p2(e)){case"start":h[o]-=d*(t&&l?-1:1);break;case"end":h[o]+=d*(t&&l?-1:1);break}return h}async function hW(r,e){var t;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:u}=r,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=v2(e,r),p=kH(h),y=s[d?f==="floating"?"reference":"floating":f],b=mx(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(y)))==null||t?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),_=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,m=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(m))?await(a.getScale==null?void 0:a.getScale(m))||{x:1,y:1}:{x:1,y:1},S=mx(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:m,strategy:u}):_);return{top:(b.top-S.top+p.top)/x.y,bottom:(S.bottom-b.bottom+p.bottom)/x.y,left:(b.left-S.left+p.left)/x.x,right:(S.right-b.right+p.right)/x.x}}const vW=async(r,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=t,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:f}=_k(l,n,u),d=n,h={},p=0;for(let y=0;yj<=0)){var k,L;const j=(((k=a.flip)==null?void 0:k.index)||0)+1,z=E[j];if(z&&(!(f==="alignment"?_!==dp(z):!1)||I.every(W=>dp(W.placement)===_?W.overflows[0]>0:!0)))return{data:{index:j,overflows:I},reset:{placement:z}};let H=(L=I.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:L.placement;if(!H)switch(h){case"bestFit":{var B;const q=(B=I.filter(W=>{if(O){const $=dp(W.placement);return $===_||$==="y"}return!0}).map(W=>[W.placement,W.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((W,$)=>W[1]-$[1])[0])==null?void 0:B[0];q&&(H=q);break}case"initialPlacement":H=s;break}if(i!==H)return{reset:{placement:H}}}return{}}}},gW=new Set(["left","top"]);async function yW(r,e){const{placement:t,platform:n,elements:i}=r,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=qg(t),s=p2(t),u=dp(t)==="y",l=gW.has(o)?-1:1,c=a&&u?-1:1,f=v2(e,r);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),u?{x:h*c,y:d*l}:{x:d*l,y:h*c}}const mW=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:i,y:a,placement:o,middlewareData:s}=e,u=await yW(e,r);return o===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},bW=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:i,platform:a}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:u={fn:b=>{let{x:_,y:m}=b;return{x:_,y:m}}},...l}=v2(r,e),c={x:t,y:n},f=await a.detectOverflow(e,l),d=dp(qg(i)),h=$9(d);let p=c[h],g=c[d];if(o){const b=h==="y"?"top":"left",_=h==="y"?"bottom":"right",m=p+f[b],x=p-f[_];p=dk(m,p,x)}if(s){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",m=g+f[b],x=g-f[_];g=dk(m,g,x)}const y=u.fn({...e,[h]:p,[d]:g});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[h]:o,[d]:s}}}}}};function v7(r){const e=Ff(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=bo(r),a=i?r.offsetWidth:t,o=i?r.offsetHeight:n,s=gx(t)!==a||gx(n)!==o;return s&&(t=a,n=o),{width:t,height:n,$:s}}function C5(r){return da(r)?r:r.contextElement}function bm(r){const e=C5(r);if(!bo(e))return _h(1);const t=e.getBoundingClientRect(),{width:n,height:i,$:a}=v7(e);let o=(a?gx(t.width):t.width)/n,s=(a?gx(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const _W=_h(0);function p7(r){const e=Fl(r);return!d2()||!e.visualViewport?_W:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wW(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Fl(r)?!1:e}function Gg(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=r.getBoundingClientRect(),a=C5(r);let o=_h(1);e&&(n?da(n)&&(o=bm(n)):o=bm(r));const s=wW(a,t,n)?p7(a):_h(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=Fl(a),h=n&&da(n)?Fl(n):n;let p=d,g=tM(p);for(;g&&n&&h!==p;){const y=bm(g),b=g.getBoundingClientRect(),_=Ff(g),m=b.left+(g.clientLeft+parseFloat(_.paddingLeft))*y.x,x=b.top+(g.clientTop+parseFloat(_.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=m,l+=x,p=Fl(g),g=tM(p)}}return mx({width:c,height:f,x:u,y:l})}function m2(r,e){const t=h2(r).scrollLeft;return e?e.left+t:Gg(Sh(r)).left+t}function g7(r,e){const t=r.getBoundingClientRect(),n=t.left+e.scrollLeft-m2(r,t),i=t.top+e.scrollTop;return{x:n,y:i}}function xW(r){let{elements:e,rect:t,offsetParent:n,strategy:i}=r;const a=i==="fixed",o=Sh(n),s=e?f2(e.floating):!1;if(n===o||s&&a)return t;let u={scrollLeft:0,scrollTop:0},l=_h(1);const c=_h(0),f=bo(n);if((f||!f&&!a)&&((Fp(n)!=="body"||B1(o))&&(u=h2(n)),bo(n))){const h=Gg(n);l=bm(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const d=o&&!f&&!a?g7(o,u):_h(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-u.scrollLeft*l.x+c.x+d.x,y:t.y*l.y-u.scrollTop*l.y+c.y+d.y}}function EW(r){return Array.from(r.getClientRects())}function SW(r){const e=Sh(r),t=h2(r),n=r.ownerDocument.body,i=Bg(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Bg(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+m2(r);const s=-t.scrollTop;return Ff(n).direction==="rtl"&&(o+=Bg(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}const wk=25;function OW(r,e){const t=Fl(r),n=Sh(r),i=t.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const c=d2();(!c||c&&e==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}const l=m2(n);if(l<=0){const c=n.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(n.clientWidth-f.clientWidth-h);p<=wk&&(a-=p)}else l<=wk&&(a+=l);return{width:a,height:o,x:s,y:u}}const TW=new Set(["absolute","fixed"]);function CW(r,e){const t=Gg(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,a=bo(r)?bm(r):_h(1),o=r.clientWidth*a.x,s=r.clientHeight*a.y,u=i*a.x,l=n*a.y;return{width:o,height:s,x:u,y:l}}function xk(r,e,t){let n;if(e==="viewport")n=OW(r,t);else if(e==="document")n=SW(Sh(r));else if(da(e))n=CW(e,t);else{const i=p7(r);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mx(n)}function y7(r,e){const t=hv(r);return t===e||!da(t)||cv(t)?!1:Ff(t).position==="fixed"||y7(t,e)}function AW(r,e){const t=e.get(r);if(t)return t;let n=wp(r,[],!1).filter(s=>da(s)&&Fp(s)!=="body"),i=null;const a=Ff(r).position==="fixed";let o=a?hv(r):r;for(;da(o)&&!cv(o);){const s=Ff(o),u=O5(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&TW.has(i.position)||B1(o)&&!u&&y7(r,o))?n=n.filter(c=>c!==o):i=s,o=hv(o)}return e.set(r,n),n}function RW(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r;const o=[...t==="clippingAncestors"?f2(e)?[]:AW(e,this._c):[].concat(t),n],s=o[0],u=o.reduce((l,c)=>{const f=xk(e,c,i);return l.top=Bg(f.top,l.top),l.right=px(f.right,l.right),l.bottom=px(f.bottom,l.bottom),l.left=Bg(f.left,l.left),l},xk(e,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function PW(r){const{width:e,height:t}=v7(r);return{width:e,height:t}}function MW(r,e,t){const n=bo(e),i=Sh(e),a=t==="fixed",o=Gg(r,!0,a,e);let s={scrollLeft:0,scrollTop:0};const u=_h(0);function l(){u.x=m2(i)}if(n||!n&&!a)if((Fp(e)!=="body"||B1(i))&&(s=h2(e)),n){const h=Gg(e,!0,a,e);u.x=h.x+e.clientLeft,u.y=h.y+e.clientTop}else i&&l();a&&!n&&i&&l();const c=i&&!n&&!a?g7(i,s):_h(0),f=o.left+s.scrollLeft-u.x-c.x,d=o.top+s.scrollTop-u.y-c.y;return{x:f,y:d,width:o.width,height:o.height}}function nS(r){return Ff(r).position==="static"}function Ek(r,e){if(!bo(r)||Ff(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Sh(r)===t&&(t=t.ownerDocument.body),t}function m7(r,e){const t=Fl(r);if(f2(r))return t;if(!bo(r)){let i=hv(r);for(;i&&!cv(i);){if(da(i)&&!nS(i))return i;i=hv(i)}return t}let n=Ek(r,e);for(;n&&gH(n)&&nS(n);)n=Ek(n,e);return n&&cv(n)&&nS(n)&&!O5(n)?t:n||wH(r)||t}const DW=async function(r){const e=this.getOffsetParent||m7,t=this.getDimensions,n=await t(r.floating);return{reference:MW(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function kW(r){return Ff(r).direction==="rtl"}const IW={convertOffsetParentRelativeRectToViewportRelativeRect:xW,getDocumentElement:Sh,getClippingRect:RW,getOffsetParent:m7,getElementRects:DW,getClientRects:EW,getDimensions:PW,getScale:bm,isElement:da,isRTL:kW};function b7(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function NW(r,e){let t=null,n;const i=Sh(r);function a(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const l=r.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=l;if(s||e(),!d||!h)return;const p=hm(f),g=hm(i.clientWidth-(c+d)),y=hm(i.clientHeight-(f+h)),b=hm(c),m={rootMargin:-p+"px "+-g+"px "+-y+"px "+-b+"px",threshold:Bg(0,px(1,u))||1};let x=!0;function S(O){const E=O[0].intersectionRatio;if(E!==u){if(!x)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!b7(l,r.getBoundingClientRect())&&o(),x=!1}try{t=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{t=new IntersectionObserver(S,m)}t.observe(r)}return o(!0),a}function A5(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,l=C5(r),c=i||a?[...l?wp(l):[],...wp(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",t,{passive:!0}),a&&b.addEventListener("resize",t)});const f=l&&s?NW(l,t):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[_]=b;_&&_.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var m;(m=h)==null||m.observe(e)})),t()}),l&&!u&&h.observe(l),h.observe(e));let p,g=u?Gg(r):null;u&&y();function y(){const b=Gg(r);g&&!b7(g,b)&&t(),g=b,p=requestAnimationFrame(y)}return t(),()=>{var b;c.forEach(_=>{i&&_.removeEventListener("scroll",t),a&&_.removeEventListener("resize",t)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,u&&cancelAnimationFrame(p)}}const LW=mW,jW=bW,BW=pW,FW=(r,e,t)=>{const n=new Map,i={platform:IW,...t},a={...i.platform,_c:n};return vW(r,e,{...i,platform:a})};var UW=typeof document<"u",zW=function(){},Yw=UW?me.useLayoutEffect:zW;function Sx(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let t,n,i;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Sx(r[n],e[n]))return!1;return!0}if(i=Object.keys(r),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const a=i[n];if(!(a==="_owner"&&r.$$typeof)&&!Sx(r[a],e[a]))return!1}return!0}return r!==r&&e!==e}function _7(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Sk(r,e){const t=_7(r);return Math.round(e*t)/t}function iS(r){const e=me.useRef(r);return Yw(()=>{e.current=r}),e}function qW(r){r===void 0&&(r={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=r,[c,f]=me.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=me.useState(n);Sx(d,n)||h(n);const[p,g]=me.useState(null),[y,b]=me.useState(null),_=me.useCallback(W=>{W!==O.current&&(O.current=W,g(W))},[]),m=me.useCallback(W=>{W!==E.current&&(E.current=W,b(W))},[]),x=a||p,S=o||y,O=me.useRef(null),E=me.useRef(null),T=me.useRef(c),P=u!=null,I=iS(u),k=iS(i),L=iS(l),B=me.useCallback(()=>{if(!O.current||!E.current)return;const W={placement:e,strategy:t,middleware:d};k.current&&(W.platform=k.current),FW(O.current,E.current,W).then($=>{const J={...$,isPositioned:L.current!==!1};j.current&&!Sx(T.current,J)&&(T.current=J,y2.flushSync(()=>{f(J)}))})},[d,e,t,k,L]);Yw(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const j=me.useRef(!1);Yw(()=>(j.current=!0,()=>{j.current=!1}),[]),Yw(()=>{if(x&&(O.current=x),S&&(E.current=S),x&&S){if(I.current)return I.current(x,S,B);B()}},[x,S,B,I,P]);const z=me.useMemo(()=>({reference:O,floating:E,setReference:_,setFloating:m}),[_,m]),H=me.useMemo(()=>({reference:x,floating:S}),[x,S]),q=me.useMemo(()=>{const W={position:t,left:0,top:0};if(!H.floating)return W;const $=Sk(H.floating,c.x),J=Sk(H.floating,c.y);return s?{...W,transform:"translate("+$+"px, "+J+"px)",..._7(H.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:$,top:J}},[t,s,H.floating,c.x,c.y]);return me.useMemo(()=>({...c,update:B,refs:z,elements:H,floatingStyles:q}),[c,B,z,H,q])}const R5=(r,e)=>({...LW(r),options:[r,e]}),P5=(r,e)=>({...jW(r),options:[r,e]}),M5=(r,e)=>({...BW(r),options:[r,e]});function mv(r){const e=me.useRef(void 0),t=me.useCallback(n=>{const i=r.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}}});return()=>{i.forEach(a=>a==null?void 0:a())}},r);return me.useMemo(()=>r.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=t(n))},r)}function GW(r,e){const t=r.compareDocumentPosition(e);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}const w7=me.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VW(r){const{children:e,elementsRef:t,labelsRef:n}=r,[i,a]=me.useState(()=>new Set),o=me.useCallback(l=>{a(c=>new Set(c).add(l))},[]),s=me.useCallback(l=>{a(c=>{const f=new Set(c);return f.delete(l),f})},[]),u=me.useMemo(()=>{const l=new Map;return Array.from(i.keys()).sort(GW).forEach((f,d)=>{l.set(f,d)}),l},[i]);return Te.jsx(w7.Provider,{value:me.useMemo(()=>({register:o,unregister:s,map:u,elementsRef:t,labelsRef:n}),[o,s,u,t,n]),children:e})}function b2(r){r===void 0&&(r={});const{label:e}=r,{register:t,unregister:n,map:i,elementsRef:a,labelsRef:o}=me.useContext(w7),[s,u]=me.useState(null),l=me.useRef(null),c=me.useCallback(f=>{if(l.current=f,s!==null&&(a.current[s]=f,o)){var d;const h=e!==void 0;o.current[s]=h?e:(d=f==null?void 0:f.textContent)!=null?d:null}},[s,a,o,e]);return Di(()=>{const f=l.current;if(f)return t(f),()=>{n(f)}},[t,n]),Di(()=>{const f=l.current?i.get(l.current):null;f!=null&&u(f)},[i]),me.useMemo(()=>({ref:c,index:s??-1}),[s,c])}const HW="data-floating-ui-focusable",Ok="active",Tk="selected",U1="ArrowLeft",z1="ArrowRight",x7="ArrowUp",_2="ArrowDown",WW={...U9};let Ck=!1,YW=0;const Ak=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+YW++;function XW(){const[r,e]=me.useState(()=>Ck?Ak():void 0);return Di(()=>{r==null&&e(Ak())},[]),me.useEffect(()=>{Ck=!0},[]),r}const $W=WW.useId,w2=$W||XW;function E7(){const r=new Map;return{emit(e,t){var n;(n=r.get(e))==null||n.forEach(i=>i(t))},on(e,t){r.has(e)||r.set(e,new Set),r.get(e).add(t)},off(e,t){var n;(n=r.get(e))==null||n.delete(t)}}}const S7=me.createContext(null),O7=me.createContext(null),Up=()=>{var r;return((r=me.useContext(S7))==null?void 0:r.id)||null},bv=()=>me.useContext(O7);function KW(r){const e=w2(),t=bv(),i=Up();return Di(()=>{if(!e)return;const a={id:e,parentId:i};return t==null||t.addNode(a),()=>{t==null||t.removeNode(a)}},[t,e,i]),e}function ZW(r){const{children:e,id:t}=r,n=Up();return Te.jsx(S7.Provider,{value:me.useMemo(()=>({id:t,parentId:n}),[t,n]),children:e})}function QW(r){const{children:e}=r,t=me.useRef([]),n=me.useCallback(o=>{t.current=[...t.current,o]},[]),i=me.useCallback(o=>{t.current=t.current.filter(s=>s!==o)},[]),[a]=me.useState(()=>E7());return Te.jsx(O7.Provider,{value:me.useMemo(()=>({nodesRef:t,addNode:n,removeNode:i,events:a}),[n,i,a]),children:e})}function Vg(r){return"data-floating-ui-"+r}function iu(r){r.current!==-1&&(clearTimeout(r.current),r.current=-1)}const Rk=Vg("safe-polygon");function aS(r,e,t){if(t&&!Nm(t))return 0;if(typeof r=="number")return r;if(typeof r=="function"){const n=r();return typeof n=="number"?n:n==null?void 0:n[e]}return r==null?void 0:r[e]}function oS(r){return typeof r=="function"?r():r}function T7(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,events:a,elements:o}=r,{enabled:s=!0,delay:u=0,handleClose:l=null,mouseOnly:c=!1,restMs:f=0,move:d=!0}=e,h=bv(),p=Up(),g=Ns(l),y=Ns(u),b=Ns(t),_=Ns(f),m=me.useRef(),x=me.useRef(-1),S=me.useRef(),O=me.useRef(-1),E=me.useRef(!0),T=me.useRef(!1),P=me.useRef(()=>{}),I=me.useRef(!1),k=Wa(()=>{var q;const W=(q=i.current.openEvent)==null?void 0:q.type;return(W==null?void 0:W.includes("mouse"))&&W!=="mousedown"});me.useEffect(()=>{if(!s)return;function q(W){let{open:$}=W;$||(iu(x),iu(O),E.current=!0,I.current=!1)}return a.on("openchange",q),()=>{a.off("openchange",q)}},[s,a]),me.useEffect(()=>{if(!s||!g.current||!t)return;function q($){k()&&n(!1,$,"hover")}const W=ou(o.floating).documentElement;return W.addEventListener("mouseleave",q),()=>{W.removeEventListener("mouseleave",q)}},[o.floating,t,n,s,g,k]);const L=me.useCallback(function(q,W,$){W===void 0&&(W=!0),$===void 0&&($="hover");const J=aS(y.current,"close",m.current);J&&!S.current?(iu(x),x.current=window.setTimeout(()=>n(!1,q,$),J)):W&&(iu(x),n(!1,q,$))},[y,n]),B=Wa(()=>{P.current(),S.current=void 0}),j=Wa(()=>{if(T.current){const q=ou(o.floating).body;q.style.pointerEvents="",q.removeAttribute(Rk),T.current=!1}}),z=Wa(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);me.useEffect(()=>{if(!s)return;function q(Z){if(iu(x),E.current=!1,c&&!Nm(m.current)||oS(_.current)>0&&!aS(y.current,"open"))return;const ue=aS(y.current,"open",m.current);ue?x.current=window.setTimeout(()=>{b.current||n(!0,Z,"hover")},ue):t||n(!0,Z,"hover")}function W(Z){if(z()){j();return}P.current();const ue=ou(o.floating);if(iu(O),I.current=!1,g.current&&i.current.floatingContext){t||iu(x),S.current=g.current({...i.current.floatingContext,tree:h,x:Z.clientX,y:Z.clientY,onClose(){j(),B(),z()||L(Z,!0,"safe-polygon")}});const ne=S.current;ue.addEventListener("mousemove",ne),P.current=()=>{ue.removeEventListener("mousemove",ne)};return}(m.current==="touch"?!Is(o.floating,Z.relatedTarget):!0)&&L(Z)}function $(Z){z()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:h,x:Z.clientX,y:Z.clientY,onClose(){j(),B(),z()||L(Z)}})(Z))}function J(){iu(x)}function X(Z){z()||L(Z,!1)}if(da(o.domReference)){const Z=o.domReference,ue=o.floating;return t&&Z.addEventListener("mouseleave",$),d&&Z.addEventListener("mousemove",q,{once:!0}),Z.addEventListener("mouseenter",q),Z.addEventListener("mouseleave",W),ue&&(ue.addEventListener("mouseleave",$),ue.addEventListener("mouseenter",J),ue.addEventListener("mouseleave",X)),()=>{t&&Z.removeEventListener("mouseleave",$),d&&Z.removeEventListener("mousemove",q),Z.removeEventListener("mouseenter",q),Z.removeEventListener("mouseleave",W),ue&&(ue.removeEventListener("mouseleave",$),ue.removeEventListener("mouseenter",J),ue.removeEventListener("mouseleave",X))}}},[o,s,r,c,d,L,B,j,n,t,b,h,y,g,i,z,_]),Di(()=>{var q;if(s&&t&&(q=g.current)!=null&&(q=q.__options)!=null&&q.blockPointerEvents&&k()){T.current=!0;const $=o.floating;if(da(o.domReference)&&$){var W;const J=ou(o.floating).body;J.setAttribute(Rk,"");const X=o.domReference,Z=h==null||(W=h.nodesRef.current.find(ue=>ue.id===p))==null||(W=W.context)==null?void 0:W.elements.floating;return Z&&(Z.style.pointerEvents=""),J.style.pointerEvents="none",X.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{J.style.pointerEvents="",X.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,t,p,o,h,g,k]),Di(()=>{t||(m.current=void 0,I.current=!1,B(),j())},[t,B,j]),me.useEffect(()=>()=>{B(),iu(x),iu(O),j()},[s,o.domReference,B,j]);const H=me.useMemo(()=>{function q(W){m.current=W.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(W){const{nativeEvent:$}=W;function J(){!E.current&&!b.current&&n(!0,$,"hover")}c&&!Nm(m.current)||t||oS(_.current)===0||I.current&&W.movementX**2+W.movementY**2<2||(iu(O),m.current==="touch"?J():(I.current=!0,O.current=window.setTimeout(J,oS(_.current))))}}},[c,n,t,b,_]);return me.useMemo(()=>s?{reference:H}:{},[s,H])}let Pk=0;function Tg(r,e){e===void 0&&(e={});const{preventScroll:t=!1,cancelPrevious:n=!0,sync:i=!1}=e;n&&cancelAnimationFrame(Pk);const a=()=>r==null?void 0:r.focus({preventScroll:t});i?a():Pk=requestAnimationFrame(a)}function sS(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&vx(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function JW(r){return"composedPath"in r?r.composedPath()[0]:r.target}function eY(r){return(r==null?void 0:r.ownerDocument)||document}const _m={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Mk(r){return r==="inert"?_m.inert:r==="aria-hidden"?_m["aria-hidden"]:_m.none}let nw=new WeakSet,iw={},uS=0;const tY=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,C7=r=>r&&(r.host||C7(r.parentNode)),rY=(r,e)=>e.map(t=>{if(r.contains(t))return t;const n=C7(t);return r.contains(n)?n:null}).filter(t=>t!=null);function nY(r,e,t,n){const i="data-floating-ui-inert",a=n?"inert":t?"aria-hidden":null,o=rY(e,r),s=new Set,u=new Set(o),l=[];iw[i]||(iw[i]=new WeakMap);const c=iw[i];o.forEach(f),d(e),s.clear();function f(h){!h||s.has(h)||(s.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||u.has(h)||[].forEach.call(h.children,p=>{if(Fp(p)!=="script")if(s.has(p))d(p);else{const g=a?p.getAttribute(a):null,y=g!==null&&g!=="false",b=Mk(a),_=(b.get(p)||0)+1,m=(c.get(p)||0)+1;b.set(p,_),c.set(p,m),l.push(p),_===1&&y&&nw.add(p),m===1&&p.setAttribute(i,""),!y&&a&&p.setAttribute(a,a==="inert"?"":"true")}})}return uS++,()=>{l.forEach(h=>{const p=Mk(a),y=(p.get(h)||0)-1,b=(c.get(h)||0)-1;p.set(h,y),c.set(h,b),y||(!nw.has(h)&&a&&h.removeAttribute(a),nw.delete(h)),b||h.removeAttribute(i)}),uS--,uS||(_m.inert=new WeakMap,_m["aria-hidden"]=new WeakMap,_m.none=new WeakMap,nw=new WeakSet,iw={})}}function Dk(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=eY(r[0]).body;return nY(r.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,e,t)}const D5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ox=me.forwardRef(function(e,t){const[n,i]=me.useState();Di(()=>{s7()&&i("button")},[]);const a={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Vg("focus-guard")]:"",style:D5};return Te.jsx("span",{...e,...a})}),iY={clipPath:"inset(50%)",position:"fixed",top:0,left:0},A7=me.createContext(null),kk=Vg("portal");function aY(r){r===void 0&&(r={});const{id:e,root:t}=r,n=w2(),i=R7(),[a,o]=me.useState(null),s=me.useRef(null);return Di(()=>()=>{a==null||a.remove(),queueMicrotask(()=>{s.current=null})},[a]),Di(()=>{if(!n||s.current)return;const u=e?document.getElementById(e):null;if(!u)return;const l=document.createElement("div");l.id=n,l.setAttribute(kk,""),u.appendChild(l),s.current=l,o(l)},[e,n]),Di(()=>{if(t===null||!n||s.current)return;let u=t||(i==null?void 0:i.portalNode);u&&!S5(u)&&(u=u.current),u=u||document.body;let l=null;e&&(l=document.createElement("div"),l.id=e,u.appendChild(l));const c=document.createElement("div");c.id=n,c.setAttribute(kk,""),u=l||u,u.appendChild(c),s.current=c,o(c)},[e,t,n,i]),a}function Tx(r){const{children:e,id:t,root:n,preserveTabOrder:i=!0}=r,a=aY({id:t,root:n}),[o,s]=me.useState(null),u=me.useRef(null),l=me.useRef(null),c=me.useRef(null),f=me.useRef(null),d=o==null?void 0:o.modal,h=o==null?void 0:o.open,p=!!o&&!o.modal&&o.open&&i&&!!(n||a);return me.useEffect(()=>{if(!a||!i||d)return;function g(y){a&&Pb(y)&&(y.type==="focusin"?bk:dW)(a)}return a.addEventListener("focusin",g,!0),a.addEventListener("focusout",g,!0),()=>{a.removeEventListener("focusin",g,!0),a.removeEventListener("focusout",g,!0)}},[a,i,d]),me.useEffect(()=>{a&&(h||bk(a))},[h,a]),Te.jsxs(A7.Provider,{value:me.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a]),children:[p&&a&&Te.jsx(Ox,{"data-type":"outside",ref:u,onFocus:g=>{if(Pb(g,a)){var y;(y=c.current)==null||y.focus()}else{const b=o?o.domReference:null,_=h7(b);_==null||_.focus()}}}),p&&a&&Te.jsx("span",{"aria-owns":a.id,style:iY}),a&&y2.createPortal(e,a),p&&a&&Te.jsx(Ox,{"data-type":"outside",ref:l,onFocus:g=>{if(Pb(g,a)){var y;(y=f.current)==null||y.focus()}else{const b=o?o.domReference:null,_=d7(b);_==null||_.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}const R7=()=>me.useContext(A7);function Ik(r){return me.useMemo(()=>e=>{r.forEach(t=>{t&&(t.current=e)})},r)}const oY=20;let hp=[];function k5(){hp=hp.filter(r=>r.isConnected)}function sY(r){k5(),r&&Fp(r)!=="body"&&(hp.push(r),hp.length>oY&&(hp=hp.slice(-20)))}function Nk(){return k5(),hp[hp.length-1]}function uY(r){const e=F1();return i7(r,e)?r:g2(r,e)[0]||r}function Lk(r,e){var t;if(!e.current.includes("floating")&&!((t=r.getAttribute("role"))!=null&&t.includes("dialog")))return;const n=F1(),a=XH(r,n).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return i7(s,n)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=r.getAttribute("tabindex");e.current.includes("floating")||a.length===0?o!=="0"&&r.setAttribute("tabindex","0"):(o!=="-1"||r.hasAttribute("data-tabindex")&&r.getAttribute("data-tabindex")!=="-1")&&(r.setAttribute("tabindex","-1"),r.setAttribute("data-tabindex","-1"))}const lY=me.forwardRef(function(e,t){return Te.jsx("button",{...e,type:"button",ref:t,tabIndex:-1,style:D5})});function I5(r){const{context:e,children:t,disabled:n=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:u=!1,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:h=()=>[]}=r,{open:p,onOpenChange:g,events:y,dataRef:b,elements:{domReference:_,floating:m}}=e,x=Wa(()=>{var ge;return(ge=b.current.floatingContext)==null?void 0:ge.nodeId}),S=Wa(h),O=typeof o=="number"&&o<0,E=oM(_)&&O,T=tY(),P=T?a:!0,I=!P||T&&d,k=Ns(i),L=Ns(o),B=Ns(s),j=bv(),z=R7(),H=me.useRef(null),q=me.useRef(null),W=me.useRef(!1),$=me.useRef(!1),J=me.useRef(-1),X=me.useRef(-1),Z=z!=null,ue=Ex(m),re=Wa(function(ge){return ge===void 0&&(ge=ue),ge?g2(ge,F1()):[]}),ne=Wa(ge=>{const Oe=re(ge);return k.current.map(ke=>_&&ke==="reference"?_:ue&&ke==="floating"?ue:Oe).filter(Boolean).flat()});me.useEffect(()=>{if(n||!l)return;function ge(ke){if(ke.key==="Tab"){Is(ue,yh(ou(ue)))&&re().length===0&&!E&&au(ke);const De=ne(),Ne=mh(ke);k.current[0]==="reference"&&Ne===_&&(au(ke),ke.shiftKey?Tg(De[De.length-1]):Tg(De[1])),k.current[1]==="floating"&&Ne===ue&&ke.shiftKey&&(au(ke),Tg(De[0]))}}const Oe=ou(ue);return Oe.addEventListener("keydown",ge),()=>{Oe.removeEventListener("keydown",ge)}},[n,_,ue,l,k,E,re,ne]),me.useEffect(()=>{if(n||!m)return;function ge(Oe){const ke=mh(Oe),Ne=re().indexOf(ke);Ne!==-1&&(J.current=Ne)}return m.addEventListener("focusin",ge),()=>{m.removeEventListener("focusin",ge)}},[n,m,re]),me.useEffect(()=>{if(n||!f)return;function ge(){$.current=!0,setTimeout(()=>{$.current=!1})}function Oe(Ne){const Ce=Ne.relatedTarget,Y=Ne.currentTarget,Q=mh(Ne);queueMicrotask(()=>{const ie=x(),we=!(Is(_,Ce)||Is(m,Ce)||Is(Ce,m)||Is(z==null?void 0:z.portalNode,Ce)||Ce!=null&&Ce.hasAttribute(Vg("focus-guard"))||j&&(Fg(j.nodesRef.current,ie).find(Ee=>{var Me,Ie;return Is((Me=Ee.context)==null?void 0:Me.elements.floating,Ce)||Is((Ie=Ee.context)==null?void 0:Ie.elements.domReference,Ce)})||yk(j.nodesRef.current,ie).find(Ee=>{var Me,Ie,Ye;return[(Me=Ee.context)==null?void 0:Me.elements.floating,Ex((Ie=Ee.context)==null?void 0:Ie.elements.floating)].includes(Ce)||((Ye=Ee.context)==null?void 0:Ye.elements.domReference)===Ce})));if(Y===_&&ue&&Lk(ue,k),u&&Y!==_&&!(Q!=null&&Q.isConnected)&&yh(ou(ue))===ou(ue).body){bo(ue)&&ue.focus();const Ee=J.current,Me=re(),Ie=Me[Ee]||Me[Me.length-1]||ue;bo(Ie)&&Ie.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(E||!l)&&Ce&&we&&!$.current&&Ce!==Nk()&&(W.current=!0,g(!1,Ne,"focus-out"))})}const ke=!!(!j&&z);function De(){iu(X),b.current.insideReactTree=!0,X.current=window.setTimeout(()=>{b.current.insideReactTree=!1})}if(m&&bo(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ge),m.addEventListener("focusout",Oe),ke&&m.addEventListener("focusout",De,!0),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ge),m.removeEventListener("focusout",Oe),ke&&m.removeEventListener("focusout",De,!0)}},[n,_,m,ue,l,j,z,g,f,u,re,E,x,k,b]);const le=me.useRef(null),ce=me.useRef(null),pe=Ik([le,z==null?void 0:z.beforeInsideRef]),fe=Ik([ce,z==null?void 0:z.afterInsideRef]);me.useEffect(()=>{var ge,Oe;if(n||!m)return;const ke=Array.from((z==null||(ge=z.portalNode)==null?void 0:ge.querySelectorAll("["+Vg("portal")+"]"))||[]),Ne=(Oe=(j?yk(j.nodesRef.current,x()):[]).find(Q=>{var ie;return oM(((ie=Q.context)==null?void 0:ie.elements.domReference)||null)}))==null||(Oe=Oe.context)==null?void 0:Oe.elements.domReference,Ce=[m,Ne,...ke,...S(),H.current,q.current,le.current,ce.current,z==null?void 0:z.beforeOutsideRef.current,z==null?void 0:z.afterOutsideRef.current,k.current.includes("reference")||E?_:null].filter(Q=>Q!=null),Y=l||E?Dk(Ce,!I,I):Dk(Ce);return()=>{Y()}},[n,_,m,l,k,z,E,P,I,j,x,S]),Di(()=>{if(n||!bo(ue))return;const ge=ou(ue),Oe=yh(ge);queueMicrotask(()=>{const ke=ne(ue),De=L.current,Ne=(typeof De=="number"?ke[De]:De.current)||ue,Ce=Is(ue,Oe);!O&&!Ce&&p&&Tg(Ne,{preventScroll:Ne===ue})})},[n,p,ue,O,ne,L]),Di(()=>{if(n||!ue)return;const ge=ou(ue),Oe=yh(ge);sY(Oe);function ke(Ce){let{reason:Y,event:Q,nested:ie}=Ce;if(["hover","safe-polygon"].includes(Y)&&Q.type==="mouseleave"&&(W.current=!0),Y==="outside-press")if(ie)W.current=!1;else if(l7(Q)||c7(Q))W.current=!1;else{let we=!1;document.createElement("div").focus({get preventScroll(){return we=!0,!1}}),we?W.current=!1:W.current=!0}}y.on("openchange",ke);const De=ge.createElement("span");De.setAttribute("tabindex","-1"),De.setAttribute("aria-hidden","true"),Object.assign(De.style,D5),Z&&_&&_.insertAdjacentElement("afterend",De);function Ne(){if(typeof B.current=="boolean"){const Ce=_||Nk();return Ce&&Ce.isConnected?Ce:De}return B.current.current||De}return()=>{y.off("openchange",ke);const Ce=yh(ge),Y=Is(m,Ce)||j&&Fg(j.nodesRef.current,x(),!1).some(ie=>{var we;return Is((we=ie.context)==null?void 0:we.elements.floating,Ce)}),Q=Ne();queueMicrotask(()=>{const ie=uY(Q);B.current&&!W.current&&bo(ie)&&(!(ie!==Ce&&Ce!==ge.body)||Y)&&ie.focus({preventScroll:!0}),De.remove()})}},[n,m,ue,B,b,y,j,Z,_,x]),me.useEffect(()=>(queueMicrotask(()=>{W.current=!1}),()=>{queueMicrotask(k5)}),[n]),Di(()=>{if(!n&&z)return z.setFocusManagerState({modal:l,closeOnFocusOut:f,open:p,onOpenChange:g,domReference:_}),()=>{z.setFocusManagerState(null)}},[n,z,l,p,g,f,_]),Di(()=>{n||ue&&Lk(ue,k)},[n,ue,k]);function se(ge){return n||!c||!l?null:Te.jsx(lY,{ref:ge==="start"?H:q,onClick:Oe=>g(!1,Oe.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}const de=!n&&P&&(l?!E:!0)&&(Z||l);return Te.jsxs(Te.Fragment,{children:[de&&Te.jsx(Ox,{"data-type":"inside",ref:pe,onFocus:ge=>{if(l){const ke=ne();Tg(i[0]==="reference"?ke[0]:ke[ke.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(W.current=!1,Pb(ge,z.portalNode)){const ke=d7(_);ke==null||ke.focus()}else{var Oe;(Oe=z.beforeOutsideRef.current)==null||Oe.focus()}}}),!E&&se("start"),t,se("end"),de&&Te.jsx(Ox,{"data-type":"inside",ref:fe,onFocus:ge=>{if(l)Tg(ne()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(f&&(W.current=!0),Pb(ge,z.portalNode)){const ke=h7(_);ke==null||ke.focus()}else{var Oe;(Oe=z.afterOutsideRef.current)==null||Oe.focus()}}})]})}function jk(r){return bo(r.target)&&r.target.tagName==="BUTTON"}function cY(r){return bo(r.target)&&r.target.tagName==="A"}function Bk(r){return T5(r)}function N5(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,elements:{domReference:a}}=r,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0,stickIfOpen:f=!0}=e,d=me.useRef(),h=me.useRef(!1),p=me.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&s!=="click"&&(Nm(y,!0)&&l||(t&&u&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?n(!1,g.nativeEvent,"click"):(g.preventDefault(),n(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Nm(y,!0)&&l||(t&&u&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?n(!1,g.nativeEvent,"click"):n(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!c||jk(g))&&(g.key===" "&&!Bk(a)&&(g.preventDefault(),h.current=!0),!cY(g)&&g.key==="Enter"&&n(!(t&&u),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!c||jk(g)||Bk(a)||g.key===" "&&h.current&&(h.current=!1,n(!(t&&u),g.nativeEvent,"click"))}}),[i,a,s,l,c,n,t,f,u]);return me.useMemo(()=>o?{reference:p}:{},[o,p])}function fY(r,e){let t=null,n=null,i=!1;return{contextElement:r||void 0,getBoundingClientRect(){var a;const o=(r==null?void 0:r.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=e.axis==="x"||e.axis==="both",u=e.axis==="y"||e.axis==="both",l=["mouseenter","mousemove"].includes(((a=e.dataRef.current.openEvent)==null?void 0:a.type)||"")&&e.pointerType!=="touch";let c=o.width,f=o.height,d=o.x,h=o.y;return t==null&&e.x&&s&&(t=o.x-e.x),n==null&&e.y&&u&&(n=o.y-e.y),d-=t||0,h-=n||0,c=0,f=0,!i||l?(c=e.axis==="y"?o.width:0,f=e.axis==="x"?o.height:0,d=s&&e.x!=null?e.x:d,h=u&&e.y!=null?e.y:h):i&&!l&&(f=e.axis==="x"?o.height:f,c=e.axis==="y"?o.width:c),i=!0,{width:c,height:f,x:d,y:h,top:h,right:d+c,bottom:h+f,left:d}}}}function Fk(r){return r!=null&&r.clientX!=null}function dY(r,e){e===void 0&&(e={});const{open:t,dataRef:n,elements:{floating:i,domReference:a},refs:o}=r,{enabled:s=!0,axis:u="both",x:l=null,y:c=null}=e,f=me.useRef(!1),d=me.useRef(null),[h,p]=me.useState(),[g,y]=me.useState([]),b=Wa((O,E)=>{f.current||n.current.openEvent&&!Fk(n.current.openEvent)||o.setPositionReference(fY(a,{x:O,y:E,axis:u,dataRef:n,pointerType:h}))}),_=Wa(O=>{l!=null||c!=null||(t?d.current||y([]):b(O.clientX,O.clientY))}),m=Nm(h)?i:t,x=me.useCallback(()=>{if(!m||!s||l!=null||c!=null)return;const O=Fl(i);function E(T){const P=mh(T);Is(i,P)?(O.removeEventListener("mousemove",E),d.current=null):b(T.clientX,T.clientY)}if(!n.current.openEvent||Fk(n.current.openEvent)){O.addEventListener("mousemove",E);const T=()=>{O.removeEventListener("mousemove",E),d.current=null};return d.current=T,T}o.setPositionReference(a)},[m,s,l,c,i,n,o,a,b]);me.useEffect(()=>x(),[x,g]),me.useEffect(()=>{s&&!i&&(f.current=!1)},[s,i]),me.useEffect(()=>{!s&&t&&(f.current=!0)},[s,t]),Di(()=>{s&&(l!=null||c!=null)&&(f.current=!1,b(l,c))},[s,l,c,b]);const S=me.useMemo(()=>{function O(E){let{pointerType:T}=E;p(T)}return{onPointerDown:O,onPointerEnter:O,onMouseMove:_,onMouseEnter:_}},[_]);return me.useMemo(()=>s?{reference:S}:{},[s,S])}const hY={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vY={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uk=r=>{var e,t;return{escapeKey:typeof r=="boolean"?r:(e=r==null?void 0:r.escapeKey)!=null?e:!1,outsidePress:typeof r=="boolean"?r:(t=r==null?void 0:r.outsidePress)!=null?t:!0}};function L5(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,elements:i,dataRef:a}=r,{enabled:o=!0,escapeKey:s=!0,outsidePress:u=!0,outsidePressEvent:l="pointerdown",referencePress:c=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,g=bv(),y=Wa(typeof u=="function"?u:()=>!1),b=typeof u=="function"?y:u,_=me.useRef(!1),{escapeKey:m,outsidePress:x}=Uk(h),{escapeKey:S,outsidePress:O}=Uk(p),E=me.useRef(!1),T=Wa(j=>{var z;if(!t||!o||!s||j.key!=="Escape"||E.current)return;const H=(z=a.current.floatingContext)==null?void 0:z.nodeId,q=g?Fg(g.nodesRef.current,H):[];if(!m&&(j.stopPropagation(),q.length>0)){let W=!0;if(q.forEach($=>{var J;if((J=$.context)!=null&&J.open&&!$.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}n(!1,rW(j)?j.nativeEvent:j,"escape-key")}),P=Wa(j=>{var z;const H=()=>{var q;T(j),(q=mh(j))==null||q.removeEventListener("keydown",H)};(z=mh(j))==null||z.addEventListener("keydown",H)}),I=Wa(j=>{var z;const H=a.current.insideReactTree;a.current.insideReactTree=!1;const q=_.current;if(_.current=!1,l==="click"&&q||H||typeof b=="function"&&!b(j))return;const W=mh(j),$="["+Vg("inert")+"]",J=ou(i.floating).querySelectorAll($);let X=da(W)?W:null;for(;X&&!cv(X);){const ne=hv(X);if(cv(ne)||!da(ne))break;X=ne}if(J.length&&da(W)&&!JH(W)&&!Is(W,i.floating)&&Array.from(J).every(ne=>!Is(X,ne)))return;if(bo(W)&&B){const ne=cv(W),le=Ff(W),ce=/auto|scroll/,pe=ne||ce.test(le.overflowX),fe=ne||ce.test(le.overflowY),se=pe&&W.clientWidth>0&&W.scrollWidth>W.clientWidth,de=fe&&W.clientHeight>0&&W.scrollHeight>W.clientHeight,ge=le.direction==="rtl",Oe=de&&(ge?j.offsetX<=W.offsetWidth-W.clientWidth:j.offsetX>W.clientWidth),ke=se&&j.offsetY>W.clientHeight;if(Oe||ke)return}const Z=(z=a.current.floatingContext)==null?void 0:z.nodeId,ue=g&&Fg(g.nodesRef.current,Z).some(ne=>{var le;return tS(j,(le=ne.context)==null?void 0:le.elements.floating)});if(tS(j,i.floating)||tS(j,i.domReference)||ue)return;const re=g?Fg(g.nodesRef.current,Z):[];if(re.length>0){let ne=!0;if(re.forEach(le=>{var ce;if((ce=le.context)!=null&&ce.open&&!le.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}n(!1,j,"outside-press")}),k=Wa(j=>{var z;const H=()=>{var q;I(j),(q=mh(j))==null||q.removeEventListener(l,H)};(z=mh(j))==null||z.addEventListener(l,H)});me.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=m,a.current.__outsidePressBubbles=x;let j=-1;function z(J){n(!1,J,"ancestor-scroll")}function H(){window.clearTimeout(j),E.current=!0}function q(){j=window.setTimeout(()=>{E.current=!1},d2()?5:0)}const W=ou(i.floating);s&&(W.addEventListener("keydown",S?P:T,S),W.addEventListener("compositionstart",H),W.addEventListener("compositionend",q)),b&&W.addEventListener(l,O?k:I,O);let $=[];return d&&(da(i.domReference)&&($=wp(i.domReference)),da(i.floating)&&($=$.concat(wp(i.floating))),!da(i.reference)&&i.reference&&i.reference.contextElement&&($=$.concat(wp(i.reference.contextElement)))),$=$.filter(J=>{var X;return J!==((X=W.defaultView)==null?void 0:X.visualViewport)}),$.forEach(J=>{J.addEventListener("scroll",z,{passive:!0})}),()=>{s&&(W.removeEventListener("keydown",S?P:T,S),W.removeEventListener("compositionstart",H),W.removeEventListener("compositionend",q)),b&&W.removeEventListener(l,O?k:I,O),$.forEach(J=>{J.removeEventListener("scroll",z)}),window.clearTimeout(j)}},[a,i,s,b,l,t,n,d,o,m,x,T,S,P,I,O,k]),me.useEffect(()=>{a.current.insideReactTree=!1},[a,b,l]);const L=me.useMemo(()=>({onKeyDown:T,...c&&{[hY[f]]:j=>{n(!1,j.nativeEvent,"reference-press")},...f!=="click"&&{onClick(j){n(!1,j.nativeEvent,"reference-press")}}}}),[T,n,c,f]),B=me.useMemo(()=>({onKeyDown:T,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[vY[l]]:()=>{a.current.insideReactTree=!0}}),[T,l,a]);return me.useMemo(()=>o?{reference:L,floating:B}:{},[o,L,B])}function pY(r){const{open:e=!1,onOpenChange:t,elements:n}=r,i=w2(),a=me.useRef({}),[o]=me.useState(()=>E7()),s=Up()!=null,[u,l]=me.useState(n.reference),c=Wa((h,p,g)=>{a.current.openEvent=h?p:void 0,o.emit("openchange",{open:h,event:p,reason:g,nested:s}),t==null||t(h,p,g)}),f=me.useMemo(()=>({setPositionReference:l}),[]),d=me.useMemo(()=>({reference:u||n.reference||null,floating:n.floating||null,domReference:n.reference}),[u,n.reference,n.floating]);return me.useMemo(()=>({dataRef:a,open:e,onOpenChange:c,elements:d,events:o,floatingId:i,refs:f}),[e,c,d,o,i,f])}function j5(r){r===void 0&&(r={});const{nodeId:e}=r,t=pY({...r,elements:{reference:null,floating:null,...r.elements}}),n=r.rootContext||t,i=n.elements,[a,o]=me.useState(null),[s,u]=me.useState(null),c=(i==null?void 0:i.domReference)||a,f=me.useRef(null),d=bv();Di(()=>{c&&(f.current=c)},[c]);const h=qW({...r,elements:{...i,...s&&{reference:s}}}),p=me.useCallback(m=>{const x=da(m)?{getBoundingClientRect:()=>m.getBoundingClientRect(),getClientRects:()=>m.getClientRects(),contextElement:m}:m;u(x),h.refs.setReference(x)},[h.refs]),g=me.useCallback(m=>{(da(m)||m===null)&&(f.current=m,o(m)),(da(h.refs.reference.current)||h.refs.reference.current===null||m!==null&&!da(m))&&h.refs.setReference(m)},[h.refs]),y=me.useMemo(()=>({...h.refs,setReference:g,setPositionReference:p,domReference:f}),[h.refs,g,p]),b=me.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),_=me.useMemo(()=>({...h,...n,refs:y,elements:b,nodeId:e}),[h,y,b,e,n]);return Di(()=>{n.dataRef.current.floatingContext=_;const m=d==null?void 0:d.nodesRef.current.find(x=>x.id===e);m&&(m.context=_)}),me.useMemo(()=>({...h,context:_,refs:y,elements:b}),[h,y,b,_])}function lS(){return $H()&&s7()}function gY(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,events:i,dataRef:a,elements:o}=r,{enabled:s=!0,visibleOnly:u=!0}=e,l=me.useRef(!1),c=me.useRef(-1),f=me.useRef(!0);me.useEffect(()=>{if(!s)return;const h=Fl(o.domReference);function p(){!t&&bo(o.domReference)&&o.domReference===yh(ou(o.domReference))&&(l.current=!0)}function g(){f.current=!0}function y(){f.current=!1}return h.addEventListener("blur",p),lS()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",y,!0)),()=>{h.removeEventListener("blur",p),lS()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",y,!0))}},[o.domReference,t,s]),me.useEffect(()=>{if(!s)return;function h(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(l.current=!0)}return i.on("openchange",h),()=>{i.off("openchange",h)}},[i,s]),me.useEffect(()=>()=>{iu(c)},[]);const d=me.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(h){if(l.current)return;const p=mh(h.nativeEvent);if(u&&da(p)){if(lS()&&!h.relatedTarget){if(!f.current&&!T5(p))return}else if(!eW(p))return}n(!0,h.nativeEvent,"focus")},onBlur(h){l.current=!1;const p=h.relatedTarget,g=h.nativeEvent,y=da(p)&&p.hasAttribute(Vg("focus-guard"))&&p.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var b;const _=yh(o.domReference?o.domReference.ownerDocument:document);!p&&_===o.domReference||Is((b=a.current.floatingContext)==null?void 0:b.refs.floating.current,_)||Is(o.domReference,_)||y||n(!1,g,"focus")})}}),[a,o.domReference,n,u]);return me.useMemo(()=>s?{reference:d}:{},[s,d])}function cS(r,e,t){const n=new Map,i=t==="item";let a=r;if(i&&r){const{[Ok]:o,[Tk]:s,...u}=r;a=u}return{...t==="floating"&&{tabIndex:-1,[HW]:""},...a,...e.map(o=>{const s=o?o[t]:null;return typeof s=="function"?r?s(r):null:s}).concat(r).reduce((o,s)=>(s&&Object.entries(s).forEach(u=>{let[l,c]=u;if(!(i&&[Ok,Tk].includes(l)))if(l.indexOf("on")===0){if(n.has(l)||n.set(l,[]),typeof c=="function"){var f;(f=n.get(l))==null||f.push(c),o[l]=function(){for(var d,h=arguments.length,p=new Array(h),g=0;gy(...p)).find(y=>y!==void 0)}}}else o[l]=c}),o),{})}}function B5(r){r===void 0&&(r=[]);const e=r.map(s=>s==null?void 0:s.reference),t=r.map(s=>s==null?void 0:s.floating),n=r.map(s=>s==null?void 0:s.item),i=me.useCallback(s=>cS(s,r,"reference"),e),a=me.useCallback(s=>cS(s,r,"floating"),t),o=me.useCallback(s=>cS(s,r,"item"),n);return me.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const yY="Escape";function x2(r,e,t){switch(r){case"vertical":return e;case"horizontal":return t;default:return e||t}}function aw(r,e){return x2(e,r===x7||r===_2,r===U1||r===z1)}function fS(r,e,t){return x2(e,r===_2,t?r===U1:r===z1)||r==="Enter"||r===" "||r===""}function zk(r,e,t){return x2(e,t?r===U1:r===z1,r===_2)}function qk(r,e,t,n){const i=t?r===z1:r===U1,a=r===x7;return e==="both"||e==="horizontal"&&n&&n>1?r===yY:x2(e,i,a)}function mY(r,e){const{open:t,onOpenChange:n,elements:i,floatingId:a}=r,{listRef:o,activeIndex:s,onNavigate:u=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:f=!1,loop:d=!1,nested:h=!1,rtl:p=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:_=!0,disabledIndices:m=void 0,orientation:x="vertical",parentOrientation:S,cols:O=1,scrollItemIntoView:E=!0,virtualItemRef:T,itemSizes:P,dense:I=!1}=e,k=Ex(i.floating),L=Ns(k),B=Up(),j=bv();Di(()=>{r.dataRef.current.orientation=x},[r,x]);const z=Wa(()=>{u(W.current===-1?null:W.current)}),H=oM(i.domReference),q=me.useRef(y),W=me.useRef(c??-1),$=me.useRef(null),J=me.useRef(!0),X=me.useRef(z),Z=me.useRef(!!i.floating),ue=me.useRef(t),re=me.useRef(!1),ne=me.useRef(!1),le=Ns(m),ce=Ns(t),pe=Ns(E),fe=Ns(c),[se,de]=me.useState(),[ge,Oe]=me.useState(),ke=Wa(()=>{function Ee(ot){if(g){var mt;(mt=ot.id)!=null&&mt.endsWith("-fui-option")&&(ot.id=a+"-"+Math.random().toString(16).slice(2,10)),de(ot.id),j==null||j.events.emit("virtualfocus",ot),T&&(T.current=ot)}else Tg(ot,{sync:re.current,preventScroll:!0})}const Me=o.current[W.current],Ie=ne.current;Me&&Ee(Me),(re.current?ot=>ot():requestAnimationFrame)(()=>{const ot=o.current[W.current]||Me;if(!ot)return;Me||Ee(ot);const mt=pe.current;mt&&Ne&&(Ie||!J.current)&&(ot.scrollIntoView==null||ot.scrollIntoView(typeof mt=="boolean"?{block:"nearest",inline:"nearest"}:mt))})});Di(()=>{l&&(t&&i.floating?q.current&&c!=null&&(ne.current=!0,W.current=c,z()):Z.current&&(W.current=-1,X.current()))},[l,t,i.floating,c,z]),Di(()=>{if(l&&t&&i.floating)if(s==null){if(re.current=!1,fe.current!=null)return;if(Z.current&&(W.current=-1,ke()),(!ue.current||!Z.current)&&q.current&&($.current!=null||q.current===!0&&$.current==null)){let Ee=0;const Me=()=>{o.current[0]==null?(Ee<2&&(Ee?requestAnimationFrame:queueMicrotask)(Me),Ee++):(W.current=$.current==null||fS($.current,x,p)||h?rS(o,le.current):mk(o,le.current),$.current=null,z())};Me()}}else Rb(o,s)||(W.current=s,ke(),ne.current=!1)},[l,t,i.floating,s,fe,h,o,x,p,z,ke,le]),Di(()=>{var Ee;if(!l||i.floating||!j||g||!Z.current)return;const Me=j.nodesRef.current,Ie=(Ee=Me.find(mt=>mt.id===B))==null||(Ee=Ee.context)==null?void 0:Ee.elements.floating,Ye=yh(ou(i.floating)),ot=Me.some(mt=>mt.context&&Is(mt.context.elements.floating,Ye));Ie&&!ot&&J.current&&Ie.focus({preventScroll:!0})},[l,i.floating,j,B,g]),Di(()=>{if(!l||!j||!g||B)return;function Ee(Me){Oe(Me.id),T&&(T.current=Me)}return j.events.on("virtualfocus",Ee),()=>{j.events.off("virtualfocus",Ee)}},[l,j,g,B,T]),Di(()=>{X.current=z,ue.current=t,Z.current=!!i.floating}),Di(()=>{t||($.current=null,q.current=y)},[t,y]);const De=s!=null,Ne=me.useMemo(()=>{function Ee(Ie){if(!ce.current)return;const Ye=o.current.indexOf(Ie);Ye!==-1&&W.current!==Ye&&(W.current=Ye,z())}return{onFocus(Ie){let{currentTarget:Ye}=Ie;re.current=!0,Ee(Ye)},onClick:Ie=>{let{currentTarget:Ye}=Ie;return Ye.focus({preventScroll:!0})},onMouseMove(Ie){let{currentTarget:Ye}=Ie;re.current=!0,ne.current=!1,b&&Ee(Ye)},onPointerLeave(Ie){let{pointerType:Ye}=Ie;if(!(!J.current||Ye==="touch")&&(re.current=!0,!!b&&(W.current=-1,z(),!g))){var ot;(ot=L.current)==null||ot.focus({preventScroll:!0})}}}},[ce,L,b,o,z,g]),Ce=me.useCallback(()=>{var Ee;return S??(j==null||(Ee=j.nodesRef.current.find(Me=>Me.id===B))==null||(Ee=Ee.context)==null||(Ee=Ee.dataRef)==null?void 0:Ee.current.orientation)},[B,j,S]),Y=Wa(Ee=>{if(J.current=!1,re.current=!0,Ee.which===229||!ce.current&&Ee.currentTarget===L.current)return;if(h&&qk(Ee.key,x,p,O)){aw(Ee.key,Ce())||au(Ee),n(!1,Ee.nativeEvent,"list-navigation"),bo(i.domReference)&&(g?j==null||j.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const Me=W.current,Ie=rS(o,m),Ye=mk(o,m);if(H||(Ee.key==="Home"&&(au(Ee),W.current=Ie,z()),Ee.key==="End"&&(au(Ee),W.current=Ye,z())),O>1){const ot=P||Array.from({length:o.current.length},()=>({width:1,height:1})),mt=lW(ot,O,I),wt=mt.findIndex(vt=>vt!=null&&!Ww(o,vt,m)),Mt=mt.reduce((vt,tt,_e)=>tt!=null&&!Ww(o,tt,m)?_e:vt,-1),Dt=mt[uW({current:mt.map(vt=>vt!=null?o.current[vt]:null)},{event:Ee,orientation:x,loop:d,rtl:p,cols:O,disabledIndices:fW([...(typeof m!="function"?m:null)||o.current.map((vt,tt)=>Ww(o,tt,m)?tt:void 0),void 0],mt),minIndex:wt,maxIndex:Mt,prevIndex:cW(W.current>Ye?Ie:W.current,ot,mt,O,Ee.key===_2?"bl":Ee.key===(p?U1:z1)?"tr":"tl"),stopEvent:!0})];if(Dt!=null&&(W.current=Dt,z()),x==="both")return}if(aw(Ee.key,x)){if(au(Ee),t&&!g&&yh(Ee.currentTarget.ownerDocument)===Ee.currentTarget){W.current=fS(Ee.key,x,p)?Ie:Ye,z();return}fS(Ee.key,x,p)?d?W.current=Me>=Ye?f&&Me!==o.current.length?-1:Ie:Wu(o,{startingIndex:Me,disabledIndices:m}):W.current=Math.min(Ye,Wu(o,{startingIndex:Me,disabledIndices:m})):d?W.current=Me<=Ie?f&&Me!==-1?o.current.length:Ye:Wu(o,{startingIndex:Me,decrement:!0,disabledIndices:m}):W.current=Math.max(Ie,Wu(o,{startingIndex:Me,decrement:!0,disabledIndices:m})),Rb(o,W.current)&&(W.current=-1),z()}}),Q=me.useMemo(()=>g&&t&&De&&{"aria-activedescendant":ge||se},[g,t,De,ge,se]),ie=me.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...H?{}:Q,onKeyDown:Y,onPointerMove(){J.current=!0}}),[Q,Y,x,H]),we=me.useMemo(()=>{function Ee(Ie){y==="auto"&&l7(Ie.nativeEvent)&&(q.current=!0)}function Me(Ie){q.current=y,y==="auto"&&c7(Ie.nativeEvent)&&(q.current=!0)}return{...Q,onKeyDown(Ie){J.current=!1;const Ye=Ie.key.startsWith("Arrow"),ot=["Home","End"].includes(Ie.key),mt=Ye||ot,wt=zk(Ie.key,x,p),Mt=qk(Ie.key,x,p,O),Dt=zk(Ie.key,Ce(),p),vt=aw(Ie.key,x),tt=(h?Dt:vt)||Ie.key==="Enter"||Ie.key.trim()==="";if(g&&t){const Ze=j==null?void 0:j.nodesRef.current.find(It=>It.parentId==null),nt=j&&Ze?tW(j.nodesRef.current,Ze.id):null;if(mt&&nt&&T){const It=new KeyboardEvent("keydown",{key:Ie.key,bubbles:!0});if(wt||Mt){var _e,Ue;const ct=((_e=nt.context)==null?void 0:_e.elements.domReference)===Ie.currentTarget,Lt=Mt&&!ct?(Ue=nt.context)==null?void 0:Ue.elements.domReference:wt?o.current.find(Rt=>(Rt==null?void 0:Rt.id)===se):null;Lt&&(au(Ie),Lt.dispatchEvent(It),Oe(void 0))}if((vt||ot)&&nt.context&&nt.context.open&&nt.parentId&&Ie.currentTarget!==nt.context.elements.domReference){var Qe;au(Ie),(Qe=nt.context.elements.domReference)==null||Qe.dispatchEvent(It);return}}return Y(Ie)}if(!(!t&&!_&&Ye)){if(tt){const Ze=aw(Ie.key,Ce());$.current=h&&Ze?null:Ie.key}if(h){Dt&&(au(Ie),t?(W.current=rS(o,le.current),z()):n(!0,Ie.nativeEvent,"list-navigation"));return}vt&&(c!=null&&(W.current=c),au(Ie),!t&&_?n(!0,Ie.nativeEvent,"list-navigation"):Y(Ie),t&&z())}},onFocus(){t&&!g&&(W.current=-1,z())},onPointerDown:Me,onPointerEnter:Me,onMouseDown:Ee,onClick:Ee}},[se,Q,O,Y,le,y,o,h,z,n,t,_,x,Ce,p,c,j,g,T]);return me.useMemo(()=>l?{reference:we,floating:ie,item:Ne}:{},[l,we,ie,Ne])}const bY=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function F5(r,e){var t,n;e===void 0&&(e={});const{open:i,elements:a,floatingId:o}=r,{enabled:s=!0,role:u="dialog"}=e,l=w2(),c=((t=a.domReference)==null?void 0:t.id)||l,f=me.useMemo(()=>{var _;return((_=Ex(a.floating))==null?void 0:_.id)||o},[a.floating,o]),d=(n=bY.get(u))!=null?n:u,p=Up()!=null,g=me.useMemo(()=>d==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:c},...d==="menu"&&p&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[d,f,p,i,c,u]),y=me.useMemo(()=>{const _={id:f,...d&&{role:d}};return d==="tooltip"||u==="label"?_:{..._,...d==="menu"&&{"aria-labelledby":c}}},[d,f,c,u]),b=me.useCallback(_=>{let{active:m,selected:x}=_;const S={role:"option",...m&&{id:f+"-fui-option"}};switch(u){case"select":case"combobox":return{...S,"aria-selected":x}}return{}},[f,u]);return me.useMemo(()=>s?{reference:g,floating:y,item:b}:{},[s,g,y,b])}const Gk=r=>r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function Yy(r,e){return typeof r=="function"?r(e):r}function _Y(r,e){const[t,n]=me.useState(r);return r&&!t&&n(!0),me.useEffect(()=>{if(!r&&t){const i=setTimeout(()=>n(!1),e);return()=>clearTimeout(i)}},[r,t,e]),t}function wY(r,e){e===void 0&&(e={});const{open:t,elements:{floating:n}}=r,{duration:i=250}=e,o=(typeof i=="number"?i:i.close)||0,[s,u]=me.useState("unmounted"),l=_Y(t,o);return!l&&s==="close"&&u("unmounted"),Di(()=>{if(n){if(t){u("initial");const c=requestAnimationFrame(()=>{y2.flushSync(()=>{u("open")})});return()=>{cancelAnimationFrame(c)}}u("close")}},[t,n]),{isMounted:l,status:s}}function xY(r,e){e===void 0&&(e={});const{initial:t={opacity:0},open:n,close:i,common:a,duration:o=250}=e,s=r.placement,u=s.split("-")[0],l=me.useMemo(()=>({side:u,placement:s}),[u,s]),c=typeof o=="number",f=(c?o:o.open)||0,d=(c?o:o.close)||0,[h,p]=me.useState(()=>({...Yy(a,l),...Yy(t,l)})),{isMounted:g,status:y}=wY(r,{duration:o}),b=Ns(t),_=Ns(n),m=Ns(i),x=Ns(a);return Di(()=>{const S=Yy(b.current,l),O=Yy(m.current,l),E=Yy(x.current,l),T=Yy(_.current,l)||Object.keys(S).reduce((P,I)=>(P[I]="",P),{});if(y==="initial"&&p(P=>({transitionProperty:P.transitionProperty,...E,...S})),y==="open"&&p({transitionProperty:Object.keys(T).map(Gk).join(","),transitionDuration:f+"ms",...E,...T}),y==="close"){const P=O||S;p({transitionProperty:Object.keys(P).map(Gk).join(","),transitionDuration:d+"ms",...E,...P})}},[d,m,b,_,x,f,y,l]),{isMounted:g,styles:h}}function EY(r,e){var t;const{open:n,dataRef:i}=r,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:h=null}=e,p=me.useRef(-1),g=me.useRef(""),y=me.useRef((t=h??o)!=null?t:-1),b=me.useRef(null),_=Wa(s),m=Wa(u),x=Ns(c),S=Ns(d);Di(()=>{n&&(iu(p),b.current=null,g.current="")},[n]),Di(()=>{if(n&&g.current===""){var I;y.current=(I=h??o)!=null?I:-1}},[n,h,o]);const O=Wa(I=>{I?i.current.typing||(i.current.typing=I,m(I)):i.current.typing&&(i.current.typing=I,m(I))}),E=Wa(I=>{function k(H,q,W){const $=x.current?x.current(q,W):q.find(J=>(J==null?void 0:J.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return $?H.indexOf($):-1}const L=a.current;if(g.current.length>0&&g.current[0]!==" "&&(k(L,L,g.current)===-1?O(!1):I.key===" "&&au(I)),L==null||S.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;n&&I.key!==" "&&(au(I),O(!0)),L.every(H=>{var q,W;return H?((q=H[0])==null?void 0:q.toLocaleLowerCase())!==((W=H[1])==null?void 0:W.toLocaleLowerCase()):!0})&&g.current===I.key&&(g.current="",y.current=b.current),g.current+=I.key,iu(p),p.current=window.setTimeout(()=>{g.current="",y.current=b.current,O(!1)},f);const j=y.current,z=k(L,[...L.slice((j||0)+1),...L.slice(0,(j||0)+1)],g.current);z!==-1?(_(z),b.current=z):I.key!==" "&&(g.current="",O(!1))}),T=me.useMemo(()=>({onKeyDown:E}),[E]),P=me.useMemo(()=>({onKeyDown:E,onKeyUp(I){I.key===" "&&O(!1)}}),[E,O]);return me.useMemo(()=>l?{reference:T,floating:P}:{},[l,T,P])}function P7(r,e,t){return t===void 0&&(t=!0),r.filter(i=>{var a;return i.parentId===e&&(!t||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...P7(r,i.id,t)])}function Vk(r,e){const[t,n]=r;let i=!1;const a=e.length;for(let o=0,s=a-1;o=n!=f>=n&&t<=(c-u)*(n-l)/(f-l)+u&&(i=!i)}return i}function SY(r,e){return r[0]>=e.x&&r[0]<=e.x+e.width&&r[1]>=e.y&&r[1]<=e.y+e.height}function M7(r){r===void 0&&(r={});const{buffer:e=.5,blockPointerEvents:t=!1,requireIntent:n=!0}=r,i={current:-1};let a=!1,o=null,s=null,u=typeof performance<"u"?performance.now():0;function l(f,d){const h=performance.now(),p=h-u;if(o===null||s===null||p===0)return o=f,s=d,u=h,null;const g=f-o,y=d-s,_=Math.sqrt(g*g+y*y)/p;return o=f,s=d,u=h,_}const c=f=>{let{x:d,y:h,placement:p,elements:g,onClose:y,nodeId:b,tree:_}=f;return function(x){function S(){iu(i),y()}if(iu(i),!g.domReference||!g.floating||p==null||d==null||h==null)return;const{clientX:O,clientY:E}=x,T=[O,E],P=JW(x),I=x.type==="mouseleave",k=sS(g.floating,P),L=sS(g.domReference,P),B=g.domReference.getBoundingClientRect(),j=g.floating.getBoundingClientRect(),z=p.split("-")[0],H=d>j.right-j.width/2,q=h>j.bottom-j.height/2,W=SY(T,B),$=j.width>B.width,J=j.height>B.height,X=($?B:j).left,Z=($?B:j).right,ue=(J?B:j).top,re=(J?B:j).bottom;if(k&&(a=!0,!I))return;if(L&&(a=!1),L&&!I){a=!0;return}if(I&&da(x.relatedTarget)&&sS(g.floating,x.relatedTarget)||_&&P7(_.nodesRef.current,b).length)return;if(z==="top"&&h>=B.bottom-1||z==="bottom"&&h<=B.top+1||z==="left"&&d>=B.right-1||z==="right"&&d<=B.left+1)return S();let ne=[];switch(z){case"top":ne=[[X,B.top+1],[X,j.bottom-1],[Z,j.bottom-1],[Z,B.top+1]];break;case"bottom":ne=[[X,j.top+1],[X,B.bottom-1],[Z,B.bottom-1],[Z,j.top+1]];break;case"left":ne=[[j.right-1,re],[j.right-1,ue],[B.left+1,ue],[B.left+1,re]];break;case"right":ne=[[B.right-1,re],[B.right-1,ue],[j.left+1,ue],[j.left+1,re]];break}function le(ce){let[pe,fe]=ce;switch(z){case"top":{const se=[$?pe+e/2:H?pe+e*4:pe-e*4,fe+e+1],de=[$?pe-e/2:H?pe+e*4:pe-e*4,fe+e+1],ge=[[j.left,H||$?j.bottom-e:j.top],[j.right,H?$?j.bottom-e:j.top:j.bottom-e]];return[se,de,...ge]}case"bottom":{const se=[$?pe+e/2:H?pe+e*4:pe-e*4,fe-e],de=[$?pe-e/2:H?pe+e*4:pe-e*4,fe-e],ge=[[j.left,H||$?j.top+e:j.bottom],[j.right,H?$?j.top+e:j.bottom:j.top+e]];return[se,de,...ge]}case"left":{const se=[pe+e+1,J?fe+e/2:q?fe+e*4:fe-e*4],de=[pe+e+1,J?fe-e/2:q?fe+e*4:fe-e*4];return[...[[q||J?j.right-e:j.left,j.top],[q?J?j.right-e:j.left:j.right-e,j.bottom]],se,de]}case"right":{const se=[pe-e,J?fe+e/2:q?fe+e*4:fe-e*4],de=[pe-e,J?fe-e/2:q?fe+e*4:fe-e*4],ge=[[q||J?j.left+e:j.right,j.top],[q?J?j.left+e:j.right:j.left+e,j.bottom]];return[se,de,...ge]}}}if(!Vk([O,E],ne)){if(a&&!W)return S();if(!I&&n){const ce=l(x.clientX,x.clientY);if(ce!==null&&ce<.1)return S()}Vk([O,E],le([d,h]))?!a&&n&&(i.current=window.setTimeout(S,40)):S()}}};return c.__options={blockPointerEvents:t},c}const v1=({shouldWrap:r,wrap:e,children:t})=>r?e(t):t,OY=ao.createContext(null),U5=()=>!!me.useContext(OY),TY=me.createContext(void 0),CY=me.createContext(void 0),E2=()=>{let r=me.useContext(TY);r===void 0&&(r="light");const e=me.useContext(CY);return{theme:r,themeClassName:`ndl-theme-${r}`,tokens:e}};function AY({isInitialOpen:r=!1,placement:e="top",isOpen:t,onOpenChange:n,type:i="simple",isPortaled:a=!0,strategy:o="absolute",hoverDelay:s=void 0,shouldCloseOnReferenceClick:u=!1,autoUpdateOptions:l,isDisabled:c=!1}={}){const[f,d]=me.useState(r),h=t??f,p=n??d,g=j5({middleware:[R5(5),M5({crossAxis:e.includes("-"),fallbackAxisSideDirection:"start",padding:5}),P5({padding:5})],onOpenChange:p,open:h,placement:e,strategy:o,whileElementsMounted(E,T,P){return A5(E,T,P,Object.assign({},l))}}),y=g.context,b=T7(y,{delay:s,enabled:i==="simple"&&!c,handleClose:M7(),move:!1}),_=N5(y,{enabled:i==="rich"&&!c}),m=gY(y,{enabled:i==="simple"&&!c,visibleOnly:!0}),x=L5(y,{escapeKey:!0,outsidePress:!0,referencePress:u}),S=F5(y,{role:i==="simple"?"tooltip":"dialog"}),O=B5([b,m,x,S,_]);return me.useMemo(()=>Object.assign(Object.assign({isOpen:h,isPortaled:a,setOpen:p,type:i},O),g),[h,p,i,a,O,g])}const D7=me.createContext(null),q1=()=>{const r=me.useContext(D7);if(r===null)throw new Error("Tooltip components must be wrapped in ");return r};var G1=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const d=U5(),g=AY({autoUpdateOptions:f,hoverDelay:l,isDisabled:e,isInitialOpen:n,isOpen:e===!0?!1:a,isPortaled:s??!d,onOpenChange:o,placement:i,shouldCloseOnReferenceClick:c,strategy:u??(d?"fixed":"absolute"),type:t});return Te.jsx(D7.Provider,{value:g,children:r})};k7.displayName="Tooltip";const RY=r=>{var{children:e,hasButtonWrapper:t=!1,htmlAttributes:n,className:i,style:a,ref:o}=r,s=G1(r,["children","hasButtonWrapper","htmlAttributes","className","style","ref"]);const u=q1(),l=e.props,c=mv([u.refs.setReference,o,l==null?void 0:l.ref]),f=Vn({"ndl-closed":!u.isOpen,"ndl-open":u.isOpen},"ndl-tooltip-trigger",i);if(t&&me.isValidElement(e)){const d=Object.assign(Object.assign(Object.assign({className:f},n),l),{ref:c});return me.cloneElement(e,u.getReferenceProps(d))}return Te.jsx("button",Object.assign({type:"button",className:f,style:a,ref:c},u.getReferenceProps(n),s,{children:e}))},PY=r=>{var{children:e,style:t,htmlAttributes:n,className:i,ref:a}=r,o=G1(r,["children","style","htmlAttributes","className","ref"]);const s=q1(),u=mv([s.refs.setFloating,a]),{themeClassName:l}=E2();if(!s.isOpen)return null;const c=Vn("ndl-tooltip-content",l,i,{"ndl-tooltip-content-rich":s.type==="rich","ndl-tooltip-content-simple":s.type==="simple"});return s.type==="simple"?Te.jsx(v1,{shouldWrap:s.isPortaled,wrap:f=>Te.jsx(Tx,{children:f}),children:Te.jsx("div",Object.assign({ref:u,className:c,style:Object.assign(Object.assign({},s.floatingStyles),t)},o,s.getFloatingProps(n),{children:Te.jsx(Ed,{variant:"body-medium",children:e})}))}):Te.jsx(v1,{shouldWrap:s.isPortaled,wrap:f=>Te.jsx(Tx,{children:f}),children:Te.jsx(I5,{context:s.context,returnFocus:!0,modal:!1,initialFocus:-1,closeOnFocusOut:!0,children:Te.jsx("div",Object.assign({ref:u,className:c,style:Object.assign(Object.assign({},s.floatingStyles),t)},o,s.getFloatingProps(n),{children:e}))})})},MY=r=>{var{children:e,passThroughProps:t,typographyVariant:n="subheading-medium",className:i,style:a,htmlAttributes:o,ref:s}=r,u=G1(r,["children","passThroughProps","typographyVariant","className","style","htmlAttributes","ref"]);const l=q1(),c=Vn("ndl-tooltip-header",i);return l.isOpen?Te.jsx(Ed,Object.assign({ref:s,variant:n,className:c,style:a,htmlAttributes:o},t,u,{children:e})):null},DY=r=>{var{children:e,className:t,style:n,htmlAttributes:i,passThroughProps:a,ref:o}=r,s=G1(r,["children","className","style","htmlAttributes","passThroughProps","ref"]);const u=q1(),l=Vn("ndl-tooltip-body",t);return u.isOpen?Te.jsx(Ed,Object.assign({ref:o,variant:"body-medium",className:l,style:n,htmlAttributes:i},a,s,{children:e})):null},kY=r=>{var{children:e,className:t,style:n,htmlAttributes:i,ref:a}=r,o=G1(r,["children","className","style","htmlAttributes","ref"]);const s=q1(),u=mv([s.refs.setFloating,a]);if(!s.isOpen)return null;const l=Vn("ndl-tooltip-actions",t);return Te.jsx("div",Object.assign({className:l,ref:u,style:n},o,i,{children:e}))},Bf=Object.assign(k7,{Actions:kY,Body:DY,Content:PY,Header:MY,Trigger:RY});var IY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,iconButtonVariant:n="default",isLoading:i=!1,isDisabled:a=!1,size:o="medium",isFloating:s=!1,isActive:u=void 0,description:l,tooltipProps:c,className:f,style:d,variant:h="neutral",htmlAttributes:p,onClick:g,ref:y}=r,b=IY(r,["children","as","iconButtonVariant","isLoading","isDisabled","size","isFloating","isActive","description","tooltipProps","className","style","variant","htmlAttributes","onClick","ref"]);const _=t??"button",m=!a&&!i,x=n==="clean",O=Vn("ndl-icon-btn",f,{"ndl-active":!!u,"ndl-clean":x,"ndl-danger":h==="danger","ndl-disabled":a,"ndl-floating":s,"ndl-large":o==="large","ndl-loading":i,"ndl-medium":o==="medium","ndl-small":o==="small"});if(x&&s)throw new Error('BaseIconButton: Cannot use isFloating and iconButtonVariant="clean" at the same time.');!l&&!(p!=null&&p["aria-label"])&&eM("Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI");const E=T=>{if(!m){T.preventDefault(),T.stopPropagation();return}g&&g(T)};return Te.jsxs(Bf,Object.assign({hoverDelay:{close:0,open:500}},c==null?void 0:c.root,{type:"simple",isDisabled:l===null||a,children:[Te.jsx(Bf.Trigger,Object.assign({},c==null?void 0:c.trigger,{hasButtonWrapper:!0,children:Te.jsx(_,Object.assign({type:"button",onClick:E,disabled:a,"aria-disabled":!m,"aria-label":l,"aria-pressed":u,className:O,style:d,ref:y},b,p,{children:Te.jsx("div",{className:"ndl-icon-btn-inner",children:i?Te.jsx(h1,{size:"small"}):Te.jsx("div",{className:"ndl-icon",children:e})})}))})),Te.jsx(Bf.Content,Object.assign({},c==null?void 0:c.content,{children:l}))]}))};var NY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,isLoading:n=!1,isDisabled:i=!1,size:a="medium",isActive:o,variant:s="neutral",description:u,tooltipProps:l,className:c,style:f,htmlAttributes:d,onClick:h,ref:p}=r,g=NY(r,["children","as","isLoading","isDisabled","size","isActive","variant","description","tooltipProps","className","style","htmlAttributes","onClick","ref"]);return Te.jsx(I7,Object.assign({as:t,iconButtonVariant:"clean",isDisabled:i,size:a,isLoading:n,isActive:o,variant:s,description:u,tooltipProps:l,className:c,style:f,htmlAttributes:d,onClick:h,ref:p},g,{children:e}))};function LY({state:r,onChange:e,isControlled:t,inputType:n="text"}){const[i,a]=me.useState(r),o=me.useMemo(()=>t===!0?r:i,[t,r,i]),s=me.useCallback(u=>{let l;["checkbox","radio","switch"].includes(n)?l=u.target.checked:l=u.target.value,t!==!0&&a(l),e==null||e(u)},[t,e,n]);return[o,s]}function jY({isInitialOpen:r=!1,placement:e="bottom",isOpen:t,onOpenChange:n,offsetOption:i=10,anchorElement:a,anchorPosition:o,anchorElementAsPortalAnchor:s,shouldCaptureFocus:u,initialFocus:l,role:c,closeOnClickOutside:f,strategy:d="absolute",isPortaled:h=!0}={}){var p;const[g,y]=me.useState(r),[b,_]=me.useState(),[m,x]=me.useState(),S=t??g,O=n??y,E=j5({elements:{reference:a},middleware:[R5(i),M5({crossAxis:e.includes("-"),fallbackAxisSideDirection:"end",padding:5}),P5()],onOpenChange:(z,H)=>{O(z),n==null||n(z,H)},open:S,placement:e,strategy:d,whileElementsMounted:A5}),T=E.context,P=N5(T,{enabled:t===void 0}),I=L5(T,{outsidePress:f}),k=F5(T,{role:c}),L=dY(T,{enabled:o!==void 0,x:o==null?void 0:o.x,y:o==null?void 0:o.y}),B=B5([P,I,k,L]),{styles:j}=xY(T,{duration:(p=Number.parseInt(Yu.motion.duration.quick))!==null&&p!==void 0?p:0});return me.useMemo(()=>Object.assign(Object.assign(Object.assign({isOpen:S,setIsOpen:O},B),E),{transitionStyles:j,labelId:b,descriptionId:m,setLabelId:_,setDescriptionId:x,anchorElementAsPortalAnchor:s,shouldCaptureFocus:u,initialFocus:l,isPortaled:h}),[S,O,B,E,j,b,m,s,u,l,h])}function BY(){me.useEffect(()=>{const r=()=>{document.querySelectorAll("[data-floating-ui-focus-guard]").forEach(n=>{n.setAttribute("aria-hidden","true"),n.removeAttribute("role")})};r();const e=new MutationObserver(()=>{r()});return e.observe(document.body,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[])}var sM=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const r=ao.useContext(L7);if(r===null)throw new Error("Popover components must be wrapped in ");return r},FY=({children:r,anchorElement:e,placement:t,isOpen:n,offset:i,anchorPosition:a,hasAnchorPortal:o,shouldCaptureFocus:s=!1,initialFocus:u,onOpenChange:l,role:c,closeOnClickOutside:f=!0,isPortaled:d,strategy:h})=>{const p=U5(),g=p?"fixed":"absolute",_=jY({anchorElement:e,anchorElementAsPortalAnchor:o??p,anchorPosition:a,closeOnClickOutside:f,initialFocus:u,isOpen:n,isPortaled:d??!p,offsetOption:i,onOpenChange:l,placement:t?N7[t]:void 0,role:c,shouldCaptureFocus:s,strategy:h??g});return Te.jsx(L7.Provider,{value:_,children:r})},UY=r=>{var{children:e,hasButtonWrapper:t=!1,ref:n}=r,i=sM(r,["children","hasButtonWrapper","ref"]);const a=j7(),o=e.props,s=mv([a.refs.setReference,n,o==null?void 0:o.ref]);return t&&ao.isValidElement(e)?ao.cloneElement(e,a.getReferenceProps(Object.assign(Object.assign(Object.assign({},i),o),{"data-state":a.isOpen?"open":"closed",ref:s}))):Te.jsx("button",Object.assign({ref:a.refs.setReference,type:"button","data-state":a.isOpen?"open":"closed"},a.getReferenceProps(i),{children:e}))},zY=r=>{var{as:e,className:t,style:n,children:i,htmlAttributes:a,ref:o}=r,s=sM(r,["as","className","style","children","htmlAttributes","ref"]);const u=j7(),{context:l}=u,c=sM(u,["context"]),f=mv([c.refs.setFloating,o]),{themeClassName:d}=E2(),h=Vn("ndl-popover",d,t),p=e??"div";return BY(),l.open?Te.jsx(v1,{shouldWrap:c.isPortaled,wrap:g=>{var y;return Te.jsx(Tx,{root:(y=c.anchorElementAsPortalAnchor)!==null&&y!==void 0&&y?c.refs.reference.current:void 0,children:g})},children:Te.jsx(I5,{context:l,modal:c.shouldCaptureFocus,initialFocus:c.initialFocus,children:Te.jsx(p,Object.assign({className:h,"aria-labelledby":c.labelId,"aria-describedby":c.descriptionId,style:Object.assign(Object.assign(Object.assign({},c.floatingStyles),c.transitionStyles),n),ref:f},c.getFloatingProps(Object.assign({},a)),s,{children:i}))})}):null};Object.assign(FY,{Content:zY,Trigger:UY});var Xm=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),qY=r=>Up()===null?Te.jsx(QW,{children:Te.jsx(Hk,Object.assign({},r,{isRoot:!0}))}):Te.jsx(Hk,Object.assign({},r)),Hk=({children:r,isOpen:e,onClose:t,isRoot:n,anchorRef:i,as:a,className:o,placement:s,minWidth:u,title:l,isDisabled:c,description:f,icon:d,isPortaled:h=!0,portalTarget:p,htmlAttributes:g,strategy:y,ref:b,style:_})=>{const[m,x]=me.useState(!1),[S,O]=me.useState(!1),[E,T]=me.useState(null),P=me.useRef([]),I=me.useRef([]),k=me.useContext(p1),L=U5(),B=bv(),j=KW(),z=Up(),H=b2(),{themeClassName:q}=E2();me.useEffect(()=>{e!==void 0&&x(e)},[e]),me.useEffect(()=>{m&&T(0)},[m]);const W=a??"div",$=z!==null,J=$?"right-start":"bottom-start",{floatingStyles:X,refs:Z,context:ue}=j5({elements:{reference:i==null?void 0:i.current},middleware:[R5({alignmentAxis:$?-4:0,mainAxis:$?0:4}),M5({fallbackPlacements:["left-start","right-start"]}),P5()],nodeId:j,onOpenChange:(Ne,Ce)=>{e===void 0&&x(Ne),Ne||(Ce instanceof PointerEvent?t==null||t(Ce,{type:"backdropClick"}):Ce instanceof KeyboardEvent?t==null||t(Ce,{type:"escapeKeyDown"}):Ce instanceof FocusEvent&&(t==null||t(Ce,{type:"focusOut"})))},open:m,placement:s?N7[s]:J,strategy:y??(L?"fixed":"absolute"),whileElementsMounted:A5}),re=T7(ue,{delay:{open:75},enabled:$,handleClose:M7({blockPointerEvents:!0})}),ne=N5(ue,{event:"mousedown",ignoreMouse:$,toggle:!$}),le=F5(ue,{role:"menu"}),ce=L5(ue,{bubbles:!0}),pe=mY(ue,{activeIndex:E,listRef:P,nested:$,onNavigate:T}),fe=EY(ue,{activeIndex:E,listRef:I,onMatch:m?T:void 0}),{getReferenceProps:se,getFloatingProps:de,getItemProps:ge}=B5([re,ne,le,ce,pe,fe]);me.useEffect(()=>{if(!B)return;function Ne(Y){e===void 0&&x(!1),t==null||t(void 0,{id:Y==null?void 0:Y.id,type:"itemClick"})}function Ce(Y){Y.nodeId!==j&&Y.parentId===z&&(e===void 0&&x(!1),t==null||t(void 0,{type:"itemClick"}))}return B.events.on("click",Ne),B.events.on("menuopen",Ce),()=>{B.events.off("click",Ne),B.events.off("menuopen",Ce)}},[B,j,z,t,e]),me.useEffect(()=>{m&&B&&B.events.emit("menuopen",{nodeId:j,parentId:z})},[B,m,j,z]);const Oe=me.useCallback(Ne=>{Ne.key==="Tab"&&Ne.shiftKey&&requestAnimationFrame(()=>{const Ce=Z.floating.current;Ce&&!Ce.contains(document.activeElement)&&(e===void 0&&x(!1),t==null||t(void 0,{type:"focusOut"}))})},[e,t,Z]),ke=Vn("ndl-menu",q,o),De=mv([Z.setReference,H.ref,b]);return Te.jsxs(ZW,{id:j,children:[n!==!0&&Te.jsx(VY,{ref:De,className:$?"MenuItem":"RootMenu",isDisabled:c,style:_,htmlAttributes:Object.assign(Object.assign({"data-focus-inside":S?"":void 0,"data-nested":$?"":void 0,"data-open":m?"":void 0,role:$?"menuitem":void 0,tabIndex:$?k.activeIndex===H.index?0:-1:void 0},g),se(k.getItemProps({onFocus(Ne){var Ce;(Ce=g==null?void 0:g.onFocus)===null||Ce===void 0||Ce.call(g,Ne),O(!1),k.setHasFocusInside(!0)}}))),title:l,description:f,leadingVisual:d}),Te.jsx(p1.Provider,{value:{activeIndex:E,getItemProps:ge,isOpen:c===!0?!1:m,setActiveIndex:T,setHasFocusInside:O},children:Te.jsx(VW,{elementsRef:P,labelsRef:I,children:m&&Te.jsx(v1,{shouldWrap:h,wrap:Ne=>Te.jsx(Tx,{root:p,children:Ne}),children:Te.jsx(I5,{context:ue,modal:!1,initialFocus:0,returnFocus:!$,closeOnFocusOut:!0,guards:!0,children:Te.jsx(W,Object.assign({ref:Z.setFloating,className:ke,style:Object.assign(Object.assign({minWidth:u!==void 0?`${u}px`:void 0},X),_)},de({onKeyDown:Oe}),{children:r}))})})})})]})},z5=r=>{var{title:e,leadingContent:t,trailingContent:n,preLeadingContent:i,description:a,isDisabled:o,as:s,className:u,style:l,htmlAttributes:c,ref:f}=r,d=Xm(r,["title","leadingContent","trailingContent","preLeadingContent","description","isDisabled","as","className","style","htmlAttributes","ref"]);const h=Vn("ndl-menu-item",u,{"ndl-disabled":o}),p=s??"button";return Te.jsx(p,Object.assign({className:h,ref:f,type:"button",role:"menuitem",disabled:o,style:l},d,c,{children:Te.jsxs("div",{className:"ndl-menu-item-inner",children:[!!i&&Te.jsx("div",{className:"ndl-menu-item-pre-leading-content",children:i}),!!t&&Te.jsx("div",{className:"ndl-menu-item-leading-content",children:t}),Te.jsxs("div",{className:"ndl-menu-item-title-wrapper",children:[Te.jsx("div",{className:"ndl-menu-item-title",children:e}),!!a&&Te.jsx("div",{className:"ndl-menu-item-description",children:a})]}),!!n&&Te.jsx("div",{className:"ndl-menu-item-trailing-content",children:n})]})}))},GY=r=>{var{title:e,className:t,style:n,leadingVisual:i,trailingContent:a,description:o,isDisabled:s,as:u,onClick:l,onFocus:c,htmlAttributes:f,id:d,ref:h}=r,p=Xm(r,["title","className","style","leadingVisual","trailingContent","description","isDisabled","as","onClick","onFocus","htmlAttributes","id","ref"]);const g=me.useContext(p1),b=b2({label:s===!0?null:typeof e=="string"?e:void 0}),_=bv(),m=b.index===g.activeIndex,x=mv([b.ref,h]);return Te.jsx(z5,Object.assign({as:u??"button",style:n,className:t,ref:x,title:e,description:o,leadingContent:i,trailingContent:a,isDisabled:s,htmlAttributes:Object.assign(Object.assign(Object.assign({},f),{tabIndex:m?0:-1}),g.getItemProps({id:d,onClick(S){l==null||l(S),_==null||_.events.emit("click",{id:d})},onFocus(S){c==null||c(S),g.setHasFocusInside(!0)}}))},p))},VY=({title:r,isDisabled:e,description:t,leadingVisual:n,as:i,onFocus:a,onClick:o,className:s,style:u,htmlAttributes:l,id:c,ref:f})=>{const d=me.useContext(p1),p=b2({label:e===!0?null:typeof r=="string"?r:void 0}),g=p.index===d.activeIndex,y=mv([p.ref,f]);return Te.jsx(z5,{as:i??"button",style:u,className:s,ref:y,title:r,description:t,leadingContent:n,trailingContent:Te.jsx(W9,{className:"ndl-menu-item-chevron"}),isDisabled:e,htmlAttributes:Object.assign(Object.assign(Object.assign(Object.assign({},l),{tabIndex:g?0:-1}),d.getItemProps({onClick(b){o==null||o(b)},onFocus(b){a==null||a(b),d.setHasFocusInside(!0)},onTouchStart(){d.setHasFocusInside(!0)}})),{id:c})})},HY=r=>{var{children:e,className:t,style:n,as:i,htmlAttributes:a,ref:o}=r,s=Xm(r,["children","className","style","as","htmlAttributes","ref"]);const u=Vn("ndl-menu-category-item",t),l=i??"div";return Te.jsx(l,Object.assign({className:u,style:n,ref:o},s,a,{children:e}))},WY=r=>{var{title:e,leadingVisual:t,trailingContent:n,description:i,isDisabled:a,isChecked:o=!1,onClick:s,onFocus:u,className:l,style:c,as:f,id:d,htmlAttributes:h,ref:p}=r,g=Xm(r,["title","leadingVisual","trailingContent","description","isDisabled","isChecked","onClick","onFocus","className","style","as","id","htmlAttributes","ref"]);const y=me.useContext(p1),_=b2({label:a===!0?null:typeof e=="string"?e:void 0}),m=bv(),x=_.index===y.activeIndex,S=mv([_.ref,p]),O=Vn("ndl-menu-radio-item",l,{"ndl-checked":o});return Te.jsx(z5,Object.assign({as:f??"button",style:c,className:O,ref:S,title:e,description:i,preLeadingContent:o?Te.jsx(LV,{className:"n-size-5 n-shrink-0 n-self-center"}):null,leadingContent:t,trailingContent:n,isDisabled:a,htmlAttributes:Object.assign(Object.assign(Object.assign({},h),{"aria-checked":o,role:"menuitemradio",tabIndex:x?0:-1}),y.getItemProps({id:d,onClick(E){s==null||s(E),m==null||m.events.emit("click",{id:d})},onFocus(E){u==null||u(E),y.setHasFocusInside(!0)}}))},g))},YY=r=>{var{as:e,children:t,className:n,htmlAttributes:i,style:a,ref:o}=r,s=Xm(r,["as","children","className","htmlAttributes","style","ref"]);const u=Vn("ndl-menu-items",n),l=e??"div";return Te.jsx(l,Object.assign({className:u,style:a,ref:o},s,i,{children:t}))},XY=r=>{var{children:e,className:t,htmlAttributes:n,style:i,ref:a}=r,o=Xm(r,["children","className","htmlAttributes","style","ref"]);const s=Vn("ndl-menu-group",t);return Te.jsx("div",Object.assign({className:s,style:i,ref:a,role:"group"},o,n,{children:e}))},Lm=Object.assign(qY,{CategoryItem:HY,Divider:yV,Group:XY,Item:GY,Items:YY,RadioItem:WY}),$Y="aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI";var KY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,shape:t="rectangular",className:n,style:i,height:a,width:o,isLoading:s=!0,children:u,htmlAttributes:l,onBackground:c="default",ref:f}=r,d=KY(r,["as","shape","className","style","height","width","isLoading","children","htmlAttributes","onBackground","ref"]);const h=e??"div",p=Vn(`ndl-skeleton ndl-skeleton-${t}`,c&&`ndl-skeleton-${c}`,n);return Te.jsx(v1,{shouldWrap:s,wrap:g=>Te.jsx(h,Object.assign({ref:f,className:p,style:Object.assign(Object.assign({},i),{height:a,width:o}),"aria-busy":!0,tabIndex:-1},d,l,{children:Te.jsx("div",{"aria-hidden":s,className:"ndl-skeleton-content",tabIndex:-1,children:g})})),children:u})};cb.displayName="Skeleton";var ZY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{label:e,isFluid:t,errorText:n,helpText:i,leadingElement:a,trailingElement:o,showRequiredOrOptionalLabel:s=!1,moreInformationText:u,size:l="medium",placeholder:c,value:f,tooltipProps:d,htmlAttributes:h,isDisabled:p,isReadOnly:g,isRequired:y,onChange:b,isClearable:_=!1,className:m,style:x,isSkeletonLoading:S=!1,isLoading:O=!1,skeletonProps:E,ref:T}=r,P=ZY(r,["label","isFluid","errorText","helpText","leadingElement","trailingElement","showRequiredOrOptionalLabel","moreInformationText","size","placeholder","value","tooltipProps","htmlAttributes","isDisabled","isReadOnly","isRequired","onChange","isClearable","className","style","isSkeletonLoading","isLoading","skeletonProps","ref"]);const[I,k]=LY({inputType:"text",isControlled:f!==void 0,onChange:b,state:f??""}),L=me.useId(),B=me.useId(),j=me.useId(),z=Vn("ndl-text-input",m,{"ndl-disabled":p,"ndl-has-error":n,"ndl-has-icon":a||o||n,"ndl-has-leading-icon":a,"ndl-has-trailing-icon":o||n,"ndl-large":l==="large","ndl-medium":l==="medium","ndl-read-only":g,"ndl-small":l==="small"}),H=e==null||e==="",q=Vn("ndl-form-item-label",{"ndl-fluid":t,"ndl-form-item-no-label":H}),W=Object.assign(Object.assign({},h),{className:Vn("ndl-input",h==null?void 0:h.className)}),$=W["aria-label"],X=!!e&&typeof e!="string"&&($===void 0||$===""),Z=_||O,ue=le=>{var ce;_&&le.key==="Escape"&&I&&(le.preventDefault(),le.stopPropagation(),k==null||k({target:{value:""}})),(ce=h==null?void 0:h.onKeyDown)===null||ce===void 0||ce.call(h,le)};me.useMemo(()=>{!e&&!$&&eM("A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"),X&&eM($Y)},[e,$,X]);const re=Vn({"ndl-information-icon-large":l==="large","ndl-information-icon-small":l==="small"||l==="medium"}),ne=me.useMemo(()=>{const le=[L];return i&&!n?le.push(B):n&&le.push(j),le.join(" ")},[L,i,n,B,j]);return Te.jsxs("div",{className:z,style:x,children:[Te.jsxs("label",{className:q,children:[!H&&Te.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular"},E,{isLoading:S,children:Te.jsxs("div",{className:"ndl-label-text-wrapper",children:[Te.jsx(Ed,{variant:l==="large"?"body-large":"body-medium",className:"ndl-label-text",children:e}),!!u&&Te.jsxs(Bf,Object.assign({},d==null?void 0:d.root,{type:"simple",children:[Te.jsx(Bf.Trigger,Object.assign({},d==null?void 0:d.trigger,{className:re,hasButtonWrapper:!0,children:Te.jsx("div",{tabIndex:0,role:"button","aria-label":"Information icon",children:Te.jsx($V,{})})})),Te.jsx(Bf.Content,Object.assign({},d==null?void 0:d.content,{children:u}))]})),s&&Te.jsx(Ed,{variant:l==="large"?"body-large":"body-medium",className:"ndl-form-item-optional",children:y===!0?"Required":"Optional"})]})})),Te.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular"},E,{isLoading:S,children:Te.jsxs("div",{className:"ndl-input-wrapper",children:[(a||O&&!o)&&Te.jsx("div",{className:"ndl-element-leading ndl-element",children:O?Te.jsx(h1,{size:l==="large"?"medium":"small",className:l==="large"?"ndl-medium-spinner":"ndl-small-spinner"}):a}),Te.jsxs("div",{className:Vn("ndl-input-container",{"ndl-clearable":_}),children:[Te.jsx("input",Object.assign({ref:T,readOnly:g,disabled:p,required:y,value:I,placeholder:c,type:"text",onChange:k,"aria-describedby":ne},W,{onKeyDown:ue},P)),Z&&Te.jsxs("span",{id:L,className:"ndl-text-input-hint","aria-hidden":!0,children:[O&&"Loading ",_&&"Press Escape to clear input."]}),_&&!!I&&Te.jsx("div",{className:"ndl-element-clear ndl-element",children:Te.jsx("button",{tabIndex:-1,"aria-hidden":!0,type:"button",title:"Clear input (Esc)",onClick:()=>{k==null||k({target:{value:""}})},children:Te.jsx(Y9,{className:"n-size-4"})})})]}),o&&Te.jsx("div",{className:"ndl-element-trailing ndl-element",children:O&&!a?Te.jsx(h1,{size:l==="large"?"medium":"small",className:l==="large"?"ndl-medium-spinner":"ndl-small-spinner"}):o})]})}))]}),!!i&&!n&&Te.jsx(cb,{onBackground:"weak",shape:"rectangular",isLoading:S,children:Te.jsx(Ed,{variant:l==="large"?"body-medium":"body-small",className:"ndl-form-message",htmlAttributes:{"aria-live":"polite",id:B},children:i})}),!!n&&Te.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular",width:"fit-content"},E,{isLoading:S,children:Te.jsxs("div",{className:"ndl-form-message",children:[Te.jsx("div",{className:"ndl-error-icon",children:Te.jsx(fH,{})}),Te.jsx(Ed,{className:"ndl-error-text",variant:l==="large"?"body-medium":"body-small",htmlAttributes:{"aria-live":"polite",id:j},children:n})]})}))]})};var JY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,buttonFill:t="filled",children:n,className:i,variant:a="primary",htmlAttributes:o,isDisabled:s=!1,isFloating:u=!1,isFluid:l=!1,isLoading:c=!1,leadingVisual:f,onClick:d,ref:h,size:p="medium",style:g,type:y="button"}=r,b=JY(r,["as","buttonFill","children","className","variant","htmlAttributes","isDisabled","isFloating","isFluid","isLoading","leadingVisual","onClick","ref","size","style","type"]);const _=e??"button",m=!s&&!c,x=Vn(i,"ndl-btn",{"ndl-disabled":s,"ndl-floating":u,"ndl-fluid":l,"ndl-loading":c,[`ndl-${p}`]:p,[`ndl-${t}-button`]:t,[`ndl-${a}`]:a}),S=O=>{if(!m){O.preventDefault(),O.stopPropagation();return}d&&d(O)};return Te.jsx(_,Object.assign({type:y,onClick:S,disabled:s,"aria-disabled":!m,className:x,style:g,ref:h},b,o,{children:Te.jsxs("div",{className:"ndl-btn-inner",children:[c&&Te.jsx("span",{className:"ndl-btn-spinner-wrapper",children:Te.jsx(h1,{size:p})}),!!f&&Te.jsx("div",{className:"ndl-btn-leading-element",children:f}),!!n&&Te.jsx("span",{className:"ndl-btn-content",children:n})]})}))};var eX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,type:n="button",isLoading:i=!1,variant:a="primary",isDisabled:o=!1,size:s="medium",onClick:u,isFloating:l=!1,className:c,style:f,htmlAttributes:d,ref:h}=r,p=eX(r,["children","as","type","isLoading","variant","isDisabled","size","onClick","isFloating","className","style","htmlAttributes","ref"]);return Te.jsx(B7,Object.assign({as:t,buttonFill:"outlined",variant:a,className:c,isDisabled:o,isFloating:l,isLoading:i,onClick:u,size:s,style:f,type:n,htmlAttributes:d,ref:h},p,{children:e}))};var rX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,type:n="button",isLoading:i=!1,variant:a="primary",isDisabled:o=!1,size:s="medium",onClick:u,className:l,style:c,htmlAttributes:f,ref:d}=r,h=rX(r,["children","as","type","isLoading","variant","isDisabled","size","onClick","className","style","htmlAttributes","ref"]);return Te.jsx(B7,Object.assign({as:t,buttonFill:"text",variant:a,className:l,isDisabled:o,isLoading:i,onClick:u,size:s,style:c,type:n,htmlAttributes:f,ref:d},h,{children:e}))};var dS,Wk;function iX(){if(Wk)return dS;Wk=1;var r="Expected a function",e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,u=typeof Lf=="object"&&Lf&&Lf.Object===Object&&Lf,l=typeof self=="object"&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return c.Date.now()};function y(S,O,E){var T,P,I,k,L,B,j=0,z=!1,H=!1,q=!0;if(typeof S!="function")throw new TypeError(r);O=x(O)||0,b(E)&&(z=!!E.leading,H="maxWait"in E,I=H?h(x(E.maxWait)||0,O):I,q="trailing"in E?!!E.trailing:q);function W(ce){var pe=T,fe=P;return T=P=void 0,j=ce,k=S.apply(fe,pe),k}function $(ce){return j=ce,L=setTimeout(Z,O),z?W(ce):k}function J(ce){var pe=ce-B,fe=ce-j,se=O-pe;return H?p(se,I-fe):se}function X(ce){var pe=ce-B,fe=ce-j;return B===void 0||pe>=O||pe<0||H&&fe>=I}function Z(){var ce=g();if(X(ce))return ue(ce);L=setTimeout(Z,J(ce))}function ue(ce){return L=void 0,q&&T?W(ce):(T=P=void 0,k)}function re(){L!==void 0&&clearTimeout(L),j=0,T=B=P=L=void 0}function ne(){return L===void 0?k:ue(g())}function le(){var ce=g(),pe=X(ce);if(T=arguments,P=this,B=ce,pe){if(L===void 0)return $(B);if(H)return L=setTimeout(Z,O),W(B)}return L===void 0&&(L=setTimeout(Z,O)),k}return le.cancel=re,le.flush=ne,le}function b(S){var O=typeof S;return!!S&&(O=="object"||O=="function")}function _(S){return!!S&&typeof S=="object"}function m(S){return typeof S=="symbol"||_(S)&&d.call(S)==t}function x(S){if(typeof S=="number")return S;if(m(S))return e;if(b(S)){var O=typeof S.valueOf=="function"?S.valueOf():S;S=b(O)?O+"":O}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var E=a.test(S);return E||o.test(S)?s(S.slice(2),E?2:8):i.test(S)?e:+S}return dS=y,dS}iX();function aX(){const[r,e]=me.useState(null),t=me.useCallback(async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),e(n),!0}catch(i){return console.warn("Copy failed",i),e(null),!1}},[]);return[r,t]}function Cx(r){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cx(r)}var oX=/^\s+/,sX=/\s+$/;function dr(r,e){if(r=r||"",e=e||{},r instanceof dr)return r;if(!(this instanceof dr))return new dr(r,e);var t=uX(r);this._originalInput=r,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.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=t.ok}dr.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,i,a,o,s;return t=e.r/255,n=e.g/255,i=e.b/255,t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=F7(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Xk(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Xk(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+i+"%)":"hsva("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Yk(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Yk(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+i+"%)":"hsla("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return $k(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return dX(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 this._a==1?"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(Ma(this._r,255)*100)+"%",g:Math.round(Ma(this._g,255)*100)+"%",b:Math.round(Ma(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ma(this._r,255)*100)+"%, "+Math.round(Ma(this._g,255)*100)+"%, "+Math.round(Ma(this._b,255)*100)+"%)":"rgba("+Math.round(Ma(this._r,255)*100)+"%, "+Math.round(Ma(this._g,255)*100)+"%, "+Math.round(Ma(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:SX[$k(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Kk(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var a=dr(e);n="#"+Kk(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,a=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return dr(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(gX,arguments)},brighten:function(){return this._applyModification(yX,arguments)},darken:function(){return this._applyModification(mX,arguments)},desaturate:function(){return this._applyModification(hX,arguments)},saturate:function(){return this._applyModification(vX,arguments)},greyscale:function(){return this._applyModification(pX,arguments)},spin:function(){return this._applyModification(bX,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(xX,arguments)},complement:function(){return this._applyCombination(_X,arguments)},monochromatic:function(){return this._applyCombination(EX,arguments)},splitcomplement:function(){return this._applyCombination(wX,arguments)},triad:function(){return this._applyCombination(Zk,[3])},tetrad:function(){return this._applyCombination(Zk,[4])}};dr.fromRatio=function(r,e){if(Cx(r)=="object"){var t={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?t[n]=r[n]:t[n]=fb(r[n]));r=t}return dr(r,e)};function uX(r){var e={r:0,g:0,b:0},t=1,n=null,i=null,a=null,o=!1,s=!1;return typeof r=="string"&&(r=AX(r)),Cx(r)=="object"&&(ev(r.r)&&ev(r.g)&&ev(r.b)?(e=lX(r.r,r.g,r.b),o=!0,s=String(r.r).substr(-1)==="%"?"prgb":"rgb"):ev(r.h)&&ev(r.s)&&ev(r.v)?(n=fb(r.s),i=fb(r.v),e=fX(r.h,n,i),o=!0,s="hsv"):ev(r.h)&&ev(r.s)&&ev(r.l)&&(n=fb(r.s),a=fb(r.l),e=cX(r.h,n,a),o=!0,s="hsl"),r.hasOwnProperty("a")&&(t=r.a)),t=F7(t),{ok:o,format:r.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function lX(r,e,t){return{r:Ma(r,255)*255,g:Ma(e,255)*255,b:Ma(t,255)*255}}function Yk(r,e,t){r=Ma(r,255),e=Ma(e,255),t=Ma(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),a,o,s=(n+i)/2;if(n==i)a=o=0;else{var u=n-i;switch(o=s>.5?u/(2-n-i):u/(n+i),n){case r:a=(e-t)/u+(e1&&(f-=1),f<1/6?l+(c-l)*6*f:f<1/2?c:f<2/3?l+(c-l)*(2/3-f)*6:l}if(e===0)n=i=a=t;else{var s=t<.5?t*(1+e):t+e-t*e,u=2*t-s;n=o(u,s,r+1/3),i=o(u,s,r),a=o(u,s,r-1/3)}return{r:n*255,g:i*255,b:a*255}}function Xk(r,e,t){r=Ma(r,255),e=Ma(e,255),t=Ma(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),a,o,s=n,u=n-i;if(o=n===0?0:u/n,n==i)a=0;else{switch(n){case r:a=(e-t)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(dr(n));return a}function EX(r,e){e=e||6;for(var t=dr(r).toHsv(),n=t.h,i=t.s,a=t.v,o=[],s=1/e;e--;)o.push(dr({h:n,s:i,v:a})),a=(a+s)%1;return o}dr.mix=function(r,e,t){t=t===0?0:t||50;var n=dr(r).toRgb(),i=dr(e).toRgb(),a=t/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return dr(o)};dr.readability=function(r,e){var t=dr(r),n=dr(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};dr.isReadable=function(r,e,t){var n=dr.readability(r,e),i,a;switch(a=!1,i=RX(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a};dr.mostReadable=function(r,e,t){var n=null,i=0,a,o,s,u;t=t||{},o=t.includeFallbackColors,s=t.level,u=t.size;for(var l=0;li&&(i=a,n=dr(e[l]));return dr.isReadable(r,n,{level:s,size:u})||!o?n:(t.includeFallbackColors=!1,dr.mostReadable(r,["#fff","#000"],t))};var uM=dr.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"},SX=dr.hexNames=OX(uM);function OX(r){var e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);return e}function F7(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function Ma(r,e){TX(r)&&(r="100%");var t=CX(r);return r=Math.min(e,Math.max(0,parseFloat(r))),t&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function O2(r){return Math.min(1,Math.max(0,r))}function Jc(r){return parseInt(r,16)}function TX(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function CX(r){return typeof r=="string"&&r.indexOf("%")!=-1}function Sd(r){return r.length==1?"0"+r:""+r}function fb(r){return r<=1&&(r=r*100+"%"),r}function U7(r){return Math.round(parseFloat(r)*255).toString(16)}function Qk(r){return Jc(r)/255}var md=(function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),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 ev(r){return!!md.CSS_UNIT.exec(r)}function AX(r){r=r.replace(oX,"").replace(sX,"").toLowerCase();var e=!1;if(uM[r])r=uM[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=md.rgb.exec(r))?{r:t[1],g:t[2],b:t[3]}:(t=md.rgba.exec(r))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=md.hsl.exec(r))?{h:t[1],s:t[2],l:t[3]}:(t=md.hsla.exec(r))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=md.hsv.exec(r))?{h:t[1],s:t[2],v:t[3]}:(t=md.hsva.exec(r))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=md.hex8.exec(r))?{r:Jc(t[1]),g:Jc(t[2]),b:Jc(t[3]),a:Qk(t[4]),format:e?"name":"hex8"}:(t=md.hex6.exec(r))?{r:Jc(t[1]),g:Jc(t[2]),b:Jc(t[3]),format:e?"name":"hex"}:(t=md.hex4.exec(r))?{r:Jc(t[1]+""+t[1]),g:Jc(t[2]+""+t[2]),b:Jc(t[3]+""+t[3]),a:Qk(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=md.hex3.exec(r))?{r:Jc(t[1]+""+t[1]),g:Jc(t[2]+""+t[2]),b:Jc(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function RX(r){var e,t;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),t=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}const PX=r=>dr.mostReadable(r,[Yu.theme.light.color.neutral.text.default,Yu.theme.light.color.neutral.text.inverse],{includeFallbackColors:!0}).toString(),MX=r=>dr(r).toHsl().l<.5?dr(r).lighten(10).toString():dr(r).darken(10).toString(),DX=r=>dr.mostReadable(r,[Yu.theme.light.color.neutral.text.weakest,Yu.theme.light.color.neutral.text.weaker,Yu.theme.light.color.neutral.text.weak,Yu.theme.light.color.neutral.text.inverse]).toString();var kX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const i=Vn("ndl-hexagon-end",{"ndl-left":r==="left","ndl-right":r==="right"});return Te.jsxs("div",Object.assign({className:i},t,{children:[Te.jsx("svg",{"aria-hidden":!0,className:"ndl-hexagon-end-inner",fill:"none",height:n,preserveAspectRatio:"none",viewBox:"0 0 9 24",width:"9",xmlns:"http://www.w3.org/2000/svg",children:Te.jsx("path",{style:{fill:e},fillRule:"evenodd",clipRule:"evenodd",d:"M5.73024 1.03676C6.08165 0.397331 6.75338 0 7.48301 0H9V24H7.483C6.75338 24 6.08165 23.6027 5.73024 22.9632L0.315027 13.1094C-0.105009 12.4376 -0.105009 11.5624 0.315026 10.8906L5.73024 1.03676Z"})}),Te.jsx("svg",{"aria-hidden":!0,className:"ndl-hexagon-end-active",fill:"none",height:n+6,preserveAspectRatio:"none",viewBox:"0 0 13 30",width:"13",xmlns:"http://www.w3.org/2000/svg",children:Te.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.075 2C9.12474 2 8.24318 2.54521 7.74867 3.43873L2.21419 13.4387C1.68353 14.3976 1.68353 15.6024 2.21419 16.5613L7.74867 26.5613C8.24318 27.4548 9.12474 28 10.075 28H13V30H10.075C8.49126 30 7.022 29.0913 6.1978 27.6021L0.663324 17.6021C-0.221109 16.0041 -0.221108 13.9959 0.663325 12.3979L6.1978 2.39789C7.022 0.90869 8.49126 0 10.075 0H13V2H10.075Z"})})]}))},eI=({direction:r="left",color:e,height:t=24,htmlAttributes:n})=>{const i=Vn("ndl-square-end",{"ndl-left":r==="left","ndl-right":r==="right"});return Te.jsxs("div",Object.assign({className:i},n,{children:[Te.jsx("div",{className:"ndl-square-end-inner",style:{backgroundColor:e}}),Te.jsx("svg",{className:"ndl-square-end-active",width:"7",height:t+6,preserveAspectRatio:"none",viewBox:"0 0 7 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Te.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 3.8774 2 C 3.2697 2 2.7917 2.248 2.3967 2.6605 C 1.928 3.1498 1.7993 3.8555 1.7993 4.5331 V 13.8775 V 25.4669 C 1.7993 26.1445 1.928 26.8502 2.3967 27.3395 C 2.7917 27.752 3.2697 28 3.8774 28 H 7 V 30 H 3.8774 C 2.6211 30 1.4369 29.4282 0.5895 28.4485 C 0.1462 27.936 0.0002 27.2467 0.0002 26.5691 L -0.0002 13.8775 L 0.0002 3.4309 C 0.0002 2.7533 0.1462 2.064 0.5895 1.5515 C 1.4368 0.5718 2.6211 0 3.8774 0 H 7 V 2 H 3.8774 Z"})})]}))},IX=({height:r=24})=>Te.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:r+6,preserveAspectRatio:"none",viewBox:"0 0 37 30",fill:"none",className:"ndl-relationship-label-lines",children:[Te.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 37 2 H 0 V 0 H 37 V 2 Z"}),Te.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 37 30 H 0 V 28 H 37 V 30 Z"})]}),hS=200,Ax=r=>{var{type:e="node",color:t,isDisabled:n=!1,isSelected:i=!1,as:a,onClick:o,className:s,style:u,children:l,htmlAttributes:c,isFluid:f=!1,size:d="large",ref:h}=r,p=kX(r,["type","color","isDisabled","isSelected","as","onClick","className","style","children","htmlAttributes","isFluid","size","ref"]);const[g,y]=me.useState(!1),b=k=>{y(!0),c&&c.onMouseEnter!==void 0&&c.onMouseEnter(k)},_=k=>{var L;y(!1),(L=c==null?void 0:c.onMouseLeave)===null||L===void 0||L.call(c,k)},m=a??"button",x=m==="button",S=k=>{if(n){k.preventDefault(),k.stopPropagation();return}o&&o(k)};let O=me.useMemo(()=>{if(t===void 0)switch(e){case"node":return Yu.graph[1];case"relationship":case"relationshipLeft":case"relationshipRight":return Yu.theme.light.color.neutral.bg.strong;default:return Yu.theme.light.color.neutral.bg.strongest}return t},[t,e]);const E=me.useMemo(()=>MX(O||Yu.palette.lemon[40]),[O]),T=me.useMemo(()=>PX(O||Yu.palette.lemon[40]),[O]),P=me.useMemo(()=>DX(O||Yu.palette.lemon[40]),[O]);g&&!n&&(O=E);const I=Vn("ndl-graph-label",s,{"ndl-disabled":n,"ndl-interactable":x,"ndl-selected":i,"ndl-small":d==="small"});if(e==="node"){const k=Vn("ndl-node-label",I);return Te.jsx(m,Object.assign({className:k,ref:h,style:Object.assign({backgroundColor:O,color:n?P:T,maxWidth:f?"100%":hS},u)},x&&{disabled:n,onClick:S,onMouseEnter:b,onMouseLeave:_,type:"button"},c,{children:Te.jsx("div",{className:"ndl-node-label-content",children:l})}))}else if(e==="relationship"||e==="relationshipLeft"||e==="relationshipRight"){const k=Vn("ndl-relationship-label",I),L=d==="small"?20:24;return Te.jsxs(m,Object.assign({style:Object.assign(Object.assign({maxWidth:f?"100%":hS},u),{color:n?P:T}),className:k},x&&{disabled:n,onClick:S,onMouseEnter:b,onMouseLeave:_,type:"button"},{ref:h},p,c,{children:[e==="relationshipLeft"||e==="relationship"?Te.jsx(Jk,{direction:"left",color:O,height:L}):Te.jsx(eI,{direction:"left",color:O,height:L}),Te.jsxs("div",{className:"ndl-relationship-label-container",style:{backgroundColor:O},children:[Te.jsx("div",{className:"ndl-relationship-label-content",children:l}),Te.jsx(IX,{height:L})]}),e==="relationshipRight"||e==="relationship"?Te.jsx(Jk,{direction:"right",color:O,height:L}):Te.jsx(eI,{direction:"right",color:O,height:L})]}))}else{const k=Vn("ndl-property-key-label",I);return Te.jsx(m,Object.assign({},x&&{type:"button"},{style:Object.assign({backgroundColor:O,color:n?P:T,maxWidth:f?"100%":hS},u),className:k,onClick:S,onMouseEnter:b,onMouseLeave:_,ref:h},c,{children:Te.jsx("div",{className:"ndl-property-key-label-content",children:l})}))}};var Bo=function(){return Bo=Object.assign||function(r){for(var e,t=1,n=arguments.length;t"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof o>"u"?void 0:Number(o)}},zX=function(r){return Array.isArray(r)?r:[r,r]},qX=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],aI="__resizable_base__",GX=(function(r){jX(e,r);function e(t){var n,i,a,o,s=r.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var u=s.parentNode;if(!u)return null;var l=s.window.document.createElement("div");return l.style.width="100%",l.style.height="100%",l.style.position="absolute",l.style.transform="scale(0, 0)",l.style.left="0",l.style.flex="0 0 100%",l.classList?l.classList.add(aI):l.className+=aI,u.appendChild(l),l},s.removeBase=function(u){var l=s.parentNode;l&&l.removeChild(u)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(o=(a=s.propsSize)===null||a===void 0?void 0:a.height)!==null&&o!==void 0?o:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||BX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,a=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),t=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=o}return{width:t,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,n=this.props.size,i=function(s){var u;if(typeof t.state[s]>"u"||t.state[s]==="auto")return"auto";if(t.propsSize&&t.propsSize[s]&&(!((u=t.propsSize[s])===null||u===void 0)&&u.toString().endsWith("%"))){if(t.state[s].toString().endsWith("%"))return t.state[s].toString();var l=t.getParentSize(),c=Number(t.state[s].toString().replace("px","")),f=c/l[s]*100;return"".concat(f,"%")}return vS(t.state[s])},a=n&&typeof n.width<"u"&&!this.state.isResizing?vS(n.width):i("width"),o=n&&typeof n.height<"u"&&!this.state.isResizing?vS(n.height):i("height");return{width:a,height:o}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var a={width:t.offsetWidth,height:t.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(t),a},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:t.flexBasis!=="auto"?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===t&&(typeof i>"u"||i==="auto")?"auto":t},e.prototype.calculateNewMaxFromBoundary=function(t,n){var i=this.props.boundsByDirection,a=this.state.direction,o=i&&Xy("left",a),s=i&&Xy("top",a),u,l;if(this.props.bounds==="parent"){var c=this.parentNode;c&&(u=o?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),l=s?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(u=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,l=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(u=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),l=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return u&&Number.isFinite(u)&&(t=t&&t"u"?10:a.width,f=typeof i.width>"u"||i.width<0?t:i.width,d=typeof a.height>"u"?10:a.height,h=typeof i.height>"u"||i.height<0?n:i.height,p=u||0,g=l||0;if(s){var y=(d-p)*this.ratio+g,b=(h-p)*this.ratio+g,_=(c-g)/this.ratio+p,m=(f-g)/this.ratio+p,x=Math.max(c,y),S=Math.min(f,b),O=Math.max(d,_),E=Math.min(h,m);t=sw(t,x,S),n=sw(n,O,E)}else t=sw(t,c,f),n=sw(n,d,h);return{newWidth:t,newHeight:n}},e.prototype.setBoundingClientRect=function(){var t=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*t,this.parentTop=i.top*t}}if(this.props.bounds&&typeof this.props.bounds!="string"){var a=this.props.bounds.getBoundingClientRect();this.targetLeft=a.left*t,this.targetTop=a.top*t}if(this.resizable){var o=this.resizable.getBoundingClientRect(),s=o.left,u=o.top,l=o.right,c=o.bottom;this.resizableLeft=s*t,this.resizableRight=l*t,this.resizableTop=u*t,this.resizableBottom=c*t}},e.prototype.onResizeStart=function(t,n){if(!(!this.resizable||!this.window)){var i=0,a=0;if(t.nativeEvent&&FX(t.nativeEvent)?(i=t.nativeEvent.clientX,a=t.nativeEvent.clientY):t.nativeEvent&&uw(t.nativeEvent)&&(i=t.nativeEvent.touches[0].clientX,a=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(t,n,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,u=this.window.getComputedStyle(this.resizable);if(u.flexBasis!=="auto"){var l=this.parentNode;if(l){var c=this.window.getComputedStyle(l).flexDirection;this.flexDir=c.startsWith("row")?"row":"column",s=u.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var f={original:{x:i,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gh(gh({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(f)}},e.prototype.onMouseMove=function(t){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&uw(t))try{t.preventDefault(),t.stopPropagation()}catch{}var i=this.props,a=i.maxWidth,o=i.maxHeight,s=i.minWidth,u=i.minHeight,l=uw(t)?t.touches[0].clientX:t.clientX,c=uw(t)?t.touches[0].clientY:t.clientY,f=this.state,d=f.direction,h=f.original,p=f.width,g=f.height,y=this.getParentSize(),b=UX(y,this.window.innerWidth,this.window.innerHeight,a,o,s,u);a=b.maxWidth,o=b.maxHeight,s=b.minWidth,u=b.minHeight;var _=this.calculateNewSizeFromDirection(l,c),m=_.newHeight,x=_.newWidth,S=this.calculateNewMaxFromBoundary(a,o);this.props.snap&&this.props.snap.x&&(x=iI(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=iI(m,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(x,m,{width:S.maxWidth,height:S.maxHeight},{width:s,height:u});if(x=O.newWidth,m=O.newHeight,this.props.grid){var E=nI(x,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=nI(m,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),P=this.props.snapGap||0,I=P===0||Math.abs(E-x)<=P?E:x,k=P===0||Math.abs(T-m)<=P?T:m;x=I,m=k}var L={width:x-h.width,height:m-h.height};if(this.delta=L,p&&typeof p=="string"){if(p.endsWith("%")){var B=x/y.width*100;x="".concat(B,"%")}else if(p.endsWith("vw")){var j=x/this.window.innerWidth*100;x="".concat(j,"vw")}else if(p.endsWith("vh")){var z=x/this.window.innerHeight*100;x="".concat(z,"vh")}}if(g&&typeof g=="string"){if(g.endsWith("%")){var B=m/y.height*100;m="".concat(B,"%")}else if(g.endsWith("vw")){var j=m/this.window.innerWidth*100;m="".concat(j,"vw")}else if(g.endsWith("vh")){var z=m/this.window.innerHeight*100;m="".concat(z,"vh")}}var H={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(m,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var q=this.state.width!==H.width,W=this.state.height!==H.height,$=this.state.flexBasis!==H.flexBasis,J=q||W||$;J&&y2.flushSync(function(){n.setState(H)}),this.props.onResize&&J&&this.props.onResize(t,d,this.resizable,L)}},e.prototype.onMouseUp=function(t){var n,i,a=this.state,o=a.isResizing,s=a.direction;a.original,!(!o||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(t,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gh(gh({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(t){var n,i;this.setState({width:(n=t.width)!==null&&n!==void 0?n:"auto",height:(i=t.height)!==null&&i!==void 0?i:"auto"})},e.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,a=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,u=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map(function(f){return i[f]!==!1?Te.jsx(LX,{direction:f,onResizeStart:t.onResizeStart,replaceStyles:a&&a[f],className:o&&o[f],children:l&&l[f]?l[f]:null},f):null});return Te.jsx("div",{className:u,style:s,children:c})},e.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(o,s){return qX.indexOf(s)!==-1||(o[s]=t.props[s]),o},{}),i=gh(gh(gh({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return Te.jsxs(a,gh({style:i,className:this.props.className},n,{ref:function(o){o&&(t.resizable=o)},children:[this.state.isResizing&&Te.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e})(me.PureComponent),VX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,isLoading:n=!1,isDisabled:i=!1,size:a="medium",isFloating:o=!1,isActive:s,variant:u="neutral",description:l,tooltipProps:c,className:f,style:d,htmlAttributes:h,onClick:p,ref:g}=r,y=VX(r,["children","as","isLoading","isDisabled","size","isFloating","isActive","variant","description","tooltipProps","className","style","htmlAttributes","onClick","ref"]);return Te.jsx(I7,Object.assign({as:t,iconButtonVariant:"default",isDisabled:i,size:a,isLoading:n,isActive:s,isFloating:o,description:l,tooltipProps:c,className:f,style:d,variant:u,htmlAttributes:h,onClick:p,ref:g},y,{children:e}))};var HX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{description:e,actionFeedbackText:t,icon:n,children:i,onClick:a,htmlAttributes:o,tooltipProps:s,type:u="clean-icon-button"}=r,l=HX(r,["description","actionFeedbackText","icon","children","onClick","htmlAttributes","tooltipProps","type"]);const[c,f]=ao.useState(null),[d,h]=ao.useState(!1),p=()=>{c!==null&&clearTimeout(c);const _=window.setTimeout(()=>{f(null)},2e3);f(_)},g=()=>{h(!1)},y=()=>{h(!0)},b=c===null?e:t;if(u==="clean-icon-button")return Te.jsx(S2,Object.assign({},l.cleanIconButtonProps,{description:b,tooltipProps:{root:Object.assign(Object.assign({},s),{isOpen:d||c!==null}),trigger:{htmlAttributes:{onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g}}},onClick:_=>{a&&a(_),p()},className:l.className,htmlAttributes:o,children:n}));if(u==="icon-button")return Te.jsx(T2,Object.assign({},l.iconButtonProps,{description:b,tooltipProps:{root:Object.assign(Object.assign({},s),{isOpen:d||c!==null}),trigger:{htmlAttributes:{onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g}}},onClick:_=>{a&&a(_),p()},className:l.className,htmlAttributes:o,children:n}));if(u==="outlined-button")return Te.jsxs(Bf,Object.assign({type:"simple",isOpen:d||c!==null},s,{onOpenChange:_=>{var m;_?y():g(),(m=s==null?void 0:s.onOpenChange)===null||m===void 0||m.call(s,_)},children:[Te.jsx(Bf.Trigger,{hasButtonWrapper:!0,htmlAttributes:{"aria-label":b,onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g},children:Te.jsx(tX,Object.assign({variant:"neutral"},l.buttonProps,{onClick:_=>{a&&a(_),p()},leadingVisual:n,className:l.className,htmlAttributes:o,children:i}))}),Te.jsx(Bf.Content,{children:b})]}))},z7=({textToCopy:r,isDisabled:e,size:t,tooltipProps:n,htmlAttributes:i,type:a})=>{const[,o]=aX(),l=a==="outlined-button"?{outlinedButtonProps:{isDisabled:e,size:t},type:"outlined-button"}:a==="icon-button"?{iconButtonProps:{description:"Copy to clipboard",isDisabled:e,size:t},type:"icon-button"}:{cleanIconButtonProps:{description:"Copy to clipboard",isDisabled:e,size:t},type:"clean-icon-button"};return Te.jsx(WX,Object.assign({onClick:()=>o(r),description:"Copy to clipboard",actionFeedbackText:"Copied"},l,{tooltipProps:n,className:"n-gap-token-8",icon:Te.jsx(oH,{className:"ndl-icon-svg"}),htmlAttributes:Object.assign({"aria-live":"polite"},i),children:a==="outlined-button"&&"Copy"}))};var YX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx(Te.Fragment,{children:r});q7.displayName="CollapsibleButtonWrapper";const XX=r=>{var{children:e,as:t,isFloating:n=!1,orientation:i="horizontal",size:a="medium",className:o,style:s,htmlAttributes:u,ref:l}=r,c=YX(r,["children","as","isFloating","orientation","size","className","style","htmlAttributes","ref"]);const[f,d]=ao.useState(!0),h=Vn("ndl-icon-btn-array",o,{"ndl-array-floating":n,"ndl-col":i==="vertical","ndl-row":i==="horizontal",[`ndl-${a}`]:a}),p=t||"div",g=ao.Children.toArray(e),y=g.filter(x=>!ao.isValidElement(x)||x.type.displayName!=="CollapsibleButtonWrapper"),b=g.find(x=>ao.isValidElement(x)&&x.type.displayName==="CollapsibleButtonWrapper"),_=b?b.props.children:null,m=()=>i==="horizontal"?f?Te.jsx(W9,{}):Te.jsx(zV,{}):f?Te.jsx(H9,{}):Te.jsx(WV,{});return Te.jsxs(p,Object.assign({role:"group",className:h,ref:l,style:s},c,u,{children:[y,_&&Te.jsxs(Te.Fragment,{children:[!f&&_,Te.jsx(S2,{onClick:()=>{d(x=>!x)},size:a,description:f?"Show more":"Show less",tooltipProps:{root:{shouldCloseOnReferenceClick:!0}},htmlAttributes:{"aria-expanded":!f},children:m()})]})]}))},$X=Object.assign(XX,{CollapsibleButtonWrapper:q7});function G7(){if(typeof window>"u")return"linux";const r=window.navigator.userAgent.toLowerCase();return r.includes("mac")?"mac":r.includes("win")?"windows":"linux"}function KX(r=G7()){return{alt:r==="mac"?"⌥":"alt",capslock:"⇪",ctrl:r==="mac"?"⌃":"ctrl",delete:r==="mac"?"⌫":"delete",down:"↓",end:"end",enter:"↵",escape:"⎋",fn:"Fn",home:"home",left:"←",meta:r==="mac"?"⌘":r==="windows"?"⊞":"meta",pagedown:"⇟",pageup:"⇞",right:"→",shift:"⇧",space:"␣",tab:"⇥",up:"↑"}}function ZX(r=G7()){return{alt:"Alt",capslock:"Caps Lock",ctrl:"Control",delete:"Delete",down:"Down",end:"End",enter:"Enter",escape:"Escape",fn:"Fn",home:"Home",left:"Left",meta:r==="mac"?"Command":r==="windows"?"Windows":"Meta",pagedown:"Page Down",pageup:"Page Up",right:"Right",shift:"Shift",space:"Space",tab:"Tab",up:"Up"}}var QX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{modifierKeys:e,keys:t,os:n,as:i,className:a,style:o,htmlAttributes:s,ref:u}=r,l=QX(r,["modifierKeys","keys","os","as","className","style","htmlAttributes","ref"]);const c=i??"span",f=me.useMemo(()=>{if(e===void 0)return null;const p=KX(n),g=ZX(n);return e==null?void 0:e.map(y=>Te.jsx("abbr",{className:"ndl-kbd-key",title:g[y],children:p[y]},y))},[e,n]),d=me.useMemo(()=>t===void 0?null:t==null?void 0:t.map((p,g)=>g===0?Te.jsx("span",{className:"ndl-kbd-key",children:p},p==null?void 0:p.toString()):Te.jsxs(Te.Fragment,{children:[Te.jsx("span",{className:"ndl-kbd-then",children:"Then"}),Te.jsx("span",{className:"ndl-kbd-key",children:p},p==null?void 0:p.toString())]})),[t]),h=Vn("ndl-kbd",a);return Te.jsxs(c,Object.assign({className:h,style:o,ref:u},l,s,{children:[f,d]}))};var e$=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,size:t="medium",isDisabled:n=!1,isLoading:i=!1,isOpen:a=!1,className:o,description:s,tooltipProps:u,onClick:l,style:c,htmlAttributes:f,ref:d}=r,h=e$(r,["children","size","isDisabled","isLoading","isOpen","className","description","tooltipProps","onClick","style","htmlAttributes","ref"]);const p=Vn("ndl-select-icon-btn",o,{"ndl-active":a,"ndl-disabled":n,"ndl-large":t==="large","ndl-loading":i,"ndl-medium":t==="medium","ndl-small":t==="small"}),g=!n&&!i;return Te.jsxs(Bf,Object.assign({hoverDelay:{close:0,open:500}},u==null?void 0:u.root,{type:"simple",isDisabled:s===null||n||a===!0,children:[Te.jsx(Bf.Trigger,Object.assign({},u==null?void 0:u.trigger,{hasButtonWrapper:!0,children:Te.jsxs("button",Object.assign({type:"button",ref:d,className:p,style:c,disabled:!g,"aria-disabled":!g,"aria-label":s??void 0,"aria-expanded":a,onClick:l},h,f,{children:[Te.jsx("div",{className:"ndl-select-icon-btn-inner",children:i?Te.jsx(h1,{size:"small"}):Te.jsx("div",{className:"ndl-icon",children:e})}),Te.jsx(H9,{className:Vn("ndl-select-icon-btn-icon",{"ndl-select-icon-btn-icon-open":a===!0})})]}))})),Te.jsx(Bf.Content,Object.assign({},u==null?void 0:u.content,{children:s}))]}))};function lM(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +*/var IH=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],bx=IH.join(","),Q9=typeof Element>"u",Im=Q9?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_x=!Q9&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r==null?void 0:r.ownerDocument},wx=function(e,t){var n;t===void 0&&(t=!0);var i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),a=i===""||i==="true",o=a||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):wx(e.parentNode));return o},NH=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},J9=function(e,t,n){if(wx(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(bx));return t&&Im.call(e,bx)&&i.unshift(e),i=i.filter(n),i},xx=function(e,t,n){for(var i=[],a=Array.from(e);a.length;){var o=a.shift();if(!wx(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=xx(u,!0,n);n.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Im.call(o,bx);c&&n.filter(o)&&(t||!e.includes(o))&&i.push(o);var f=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!wx(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(f&&d){var h=xx(f===!0?o.children:f.children,!0,n);n.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else a.unshift.apply(a,o.children)}}return i},e7=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},t7=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||NH(e))&&!e7(e)?0:e.tabIndex},LH=function(e,t){var n=t7(e);return n<0&&t&&!e7(e)?0:n},jH=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},r7=function(e){return e.tagName==="INPUT"},BH=function(e){return r7(e)&&e.type==="hidden"},FH=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},UH=function(e,t){for(var n=0;nsummary:first-of-type"),s=o?e.parentElement:e;if(Im.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var u=e;e;){var l=e.parentElement,c=_x(e);if(l&&!l.shadowRoot&&i(l)===!0)return pk(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=u}if(VH(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return pk(e);return!1},WH=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n=0)},n7=function(e){var t=[],n=[];return e.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=LH(s,o),l=o?n7(i.candidates):s;u===0?o?t.push.apply(t,l):t.push(s):n.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),n.sort(jH).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(t)},g2=function(e,t){t=t||{};var n;return t.getShadowRoot?n=xx([e],t.includeContainer,{filter:iM.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:YH}):n=J9(e,t.includeContainer,iM.bind(null,t)),n7(n)},XH=function(e,t){t=t||{};var n;return t.getShadowRoot?n=xx([e],t.includeContainer,{filter:nM.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=J9(e,t.includeContainer,nM.bind(null,t)),n},i7=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Im.call(e,bx)===!1?!1:iM(t,e)};function a7(){const r=navigator.userAgentData;return r!=null&&r.platform?r.platform:navigator.platform}function o7(){const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?r.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function s7(){return/apple/i.test(navigator.vendor)}function aM(){const r=/android/i;return r.test(a7())||r.test(o7())}function $H(){return a7().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function u7(){return o7().includes("jsdom/")}const gk="data-floating-ui-focusable",KH="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",JE="ArrowLeft",eS="ArrowRight",ZH="ArrowUp",QH="ArrowDown";function yh(r){let e=r.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function Is(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&vx(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function mh(r){return"composedPath"in r?r.composedPath()[0]:r.target}function tS(r,e){if(e==null)return!1;if("composedPath"in r)return r.composedPath().includes(e);const t=r;return t.target!=null&&e.contains(t.target)}function JH(r){return r.matches("html,body")}function ou(r){return(r==null?void 0:r.ownerDocument)||document}function T5(r){return bo(r)&&r.matches(KH)}function oM(r){return r?r.getAttribute("role")==="combobox"&&T5(r):!1}function eW(r){if(!r||u7())return!0;try{return r.matches(":focus-visible")}catch{return!0}}function Ex(r){return r?r.hasAttribute(gk)?r:r.querySelector("["+gk+"]")||r:null}function Fg(r,e,t){return t===void 0&&(t=!0),r.filter(i=>{var a;return i.parentId===e&&(!t||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...Fg(r,i.id,t)])}function tW(r,e){let t,n=-1;function i(a,o){o>n&&(t=a,n=o),Fg(r,a).forEach(u=>{i(u.id,o+1)})}return i(e,0),r.find(a=>a.id===t)}function yk(r,e){var t;let n=[],i=(t=r.find(a=>a.id===e))==null?void 0:t.parentId;for(;i;){const a=r.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function au(r){r.preventDefault(),r.stopPropagation()}function rW(r){return"nativeEvent"in r}function l7(r){return r.mozInputSource===0&&r.isTrusted?!0:aM()&&r.pointerType?r.type==="click"&&r.buttons===1:r.detail===0&&!r.pointerType}function c7(r){return u7()?!1:!aM()&&r.width===0&&r.height===0||aM()&&r.width===1&&r.height===1&&r.pressure===0&&r.detail===0&&r.pointerType==="mouse"||r.width<1&&r.height<1&&r.pressure===0&&r.detail===0&&r.pointerType==="touch"}function Nm(r,e){const t=["mouse","pen"];return e||t.push("",void 0),t.includes(r)}var nW=typeof document<"u",iW=function(){},Di=nW?me.useLayoutEffect:iW;const aW={...U9};function Ns(r){const e=me.useRef(r);return Di(()=>{e.current=r}),e}const oW=aW.useInsertionEffect,sW=oW||(r=>r());function Wa(r){const e=me.useRef(()=>{});return sW(()=>{e.current=r}),me.useCallback(function(){for(var t=arguments.length,n=new Array(t),i=0;i=r.current.length}function rS(r,e){return Wu(r,{disabledIndices:e})}function mk(r,e){return Wu(r,{decrement:!0,startingIndex:r.current.length,disabledIndices:e})}function Wu(r,e){let{startingIndex:t=-1,decrement:n=!1,disabledIndices:i,amount:a=1}=e===void 0?{}:e,o=t;do o+=n?-a:a;while(o>=0&&o<=r.current.length-1&&Ww(r,o,i));return o}function uW(r,e){let{event:t,orientation:n,loop:i,rtl:a,cols:o,disabledIndices:s,minIndex:u,maxIndex:l,prevIndex:c,stopEvent:f=!1}=e,d=c;if(t.key===ZH){if(f&&au(t),c===-1)d=l;else if(d=Wu(r,{startingIndex:d,amount:o,decrement:!0,disabledIndices:s}),i&&(c-oh?g:g-o}Rb(r,d)&&(d=c)}if(t.key===QH&&(f&&au(t),c===-1?d=u:(d=Wu(r,{startingIndex:c,amount:o,disabledIndices:s}),i&&c+o>l&&(d=Wu(r,{startingIndex:c%o-o,amount:o,disabledIndices:s}))),Rb(r,d)&&(d=c)),n==="both"){const h=hm(c/o);t.key===(a?JE:eS)&&(f&&au(t),c%o!==o-1?(d=Wu(r,{startingIndex:c,disabledIndices:s}),i&&rw(d,o,h)&&(d=Wu(r,{startingIndex:c-c%o-1,disabledIndices:s}))):i&&(d=Wu(r,{startingIndex:c-c%o-1,disabledIndices:s})),rw(d,o,h)&&(d=c)),t.key===(a?eS:JE)&&(f&&au(t),c%o!==0?(d=Wu(r,{startingIndex:c,decrement:!0,disabledIndices:s}),i&&rw(d,o,h)&&(d=Wu(r,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s}))):i&&(d=Wu(r,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:s})),rw(d,o,h)&&(d=c));const p=hm(l/o)===h;Rb(r,d)&&(i&&p?d=t.key===(a?eS:JE)?l:Wu(r,{startingIndex:c-c%o-1,disabledIndices:s}):d=c)}return d}function lW(r,e,t){const n=[];let i=0;return r.forEach((a,o)=>{let{width:s,height:u}=a,l=!1;for(t&&(i=0);!l;){const c=[];for(let f=0;fn[f]==null)?(c.forEach(f=>{n[f]=o}),l=!0):i++}}),[...n]}function cW(r,e,t,n,i){if(r===-1)return-1;const a=t.indexOf(r),o=e[r];switch(i){case"tl":return a;case"tr":return o?a+o.width-1:a;case"bl":return o?a+(o.height-1)*n:a;case"br":return t.lastIndexOf(r)}}function fW(r,e){return e.flatMap((t,n)=>r.includes(t)?[n]:[])}function Ww(r,e,t){if(typeof t=="function")return t(e);if(t)return t.includes(e);const n=r.current[e];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const F1=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function f7(r,e){const t=g2(r,F1()),n=t.length;if(n===0)return;const i=yh(ou(r)),a=t.indexOf(i),o=a===-1?e===1?0:n-1:a+e;return t[o]}function d7(r){return f7(ou(r).body,1)||r}function h7(r){return f7(ou(r).body,-1)||r}function Pb(r,e){const t=e||r.currentTarget,n=r.relatedTarget;return!n||!Is(t,n)}function dW(r){g2(r,F1()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function bk(r){r.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}var y2=z9();function _k(r,e,t){let{reference:n,floating:i}=r;const a=dp(e),o=Z9(e),s=K9(o),u=qg(e),l=a==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[s]/2-i[s]/2;let h;switch(u){case"top":h={x:c,y:n.y-i.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(p2(e)){case"start":h[o]-=d*(t&&l?-1:1);break;case"end":h[o]+=d*(t&&l?-1:1);break}return h}async function hW(r,e){var t;e===void 0&&(e={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:u}=r,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=v2(e,r),p=kH(h),y=s[d?f==="floating"?"reference":"floating":f],b=mx(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(y)))==null||t?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),_=f==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,m=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(m))?await(a.getScale==null?void 0:a.getScale(m))||{x:1,y:1}:{x:1,y:1},S=mx(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:m,strategy:u}):_);return{top:(b.top-S.top+p.top)/x.y,bottom:(S.bottom-b.bottom+p.bottom)/x.y,left:(b.left-S.left+p.left)/x.x,right:(S.right-b.right+p.right)/x.x}}const vW=async(r,e,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=t,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:r,floating:e,strategy:i}),{x:c,y:f}=_k(l,n,u),d=n,h={},p=0;for(let y=0;yj<=0)){var k,L;const j=(((k=a.flip)==null?void 0:k.index)||0)+1,z=E[j];if(z&&(!(f==="alignment"?_!==dp(z):!1)||I.every(W=>dp(W.placement)===_?W.overflows[0]>0:!0)))return{data:{index:j,overflows:I},reset:{placement:z}};let H=(L=I.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:L.placement;if(!H)switch(h){case"bestFit":{var B;const q=(B=I.filter(W=>{if(O){const $=dp(W.placement);return $===_||$==="y"}return!0}).map(W=>[W.placement,W.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((W,$)=>W[1]-$[1])[0])==null?void 0:B[0];q&&(H=q);break}case"initialPlacement":H=s;break}if(i!==H)return{reset:{placement:H}}}return{}}}},gW=new Set(["left","top"]);async function yW(r,e){const{placement:t,platform:n,elements:i}=r,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=qg(t),s=p2(t),u=dp(t)==="y",l=gW.has(o)?-1:1,c=a&&u?-1:1,f=v2(e,r);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),u?{x:h*c,y:d*l}:{x:d*l,y:h*c}}const mW=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var t,n;const{x:i,y:a,placement:o,middlewareData:s}=e,u=await yW(e,r);return o===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},bW=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:t,y:n,placement:i,platform:a}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:u={fn:b=>{let{x:_,y:m}=b;return{x:_,y:m}}},...l}=v2(r,e),c={x:t,y:n},f=await a.detectOverflow(e,l),d=dp(qg(i)),h=$9(d);let p=c[h],g=c[d];if(o){const b=h==="y"?"top":"left",_=h==="y"?"bottom":"right",m=p+f[b],x=p-f[_];p=dk(m,p,x)}if(s){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",m=g+f[b],x=g-f[_];g=dk(m,g,x)}const y=u.fn({...e,[h]:p,[d]:g});return{...y,data:{x:y.x-t,y:y.y-n,enabled:{[h]:o,[d]:s}}}}}};function v7(r){const e=Ff(r);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=bo(r),a=i?r.offsetWidth:t,o=i?r.offsetHeight:n,s=gx(t)!==a||gx(n)!==o;return s&&(t=a,n=o),{width:t,height:n,$:s}}function C5(r){return da(r)?r:r.contextElement}function bm(r){const e=C5(r);if(!bo(e))return _h(1);const t=e.getBoundingClientRect(),{width:n,height:i,$:a}=v7(e);let o=(a?gx(t.width):t.width)/n,s=(a?gx(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const _W=_h(0);function p7(r){const e=Fl(r);return!d2()||!e.visualViewport?_W:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function wW(r,e,t){return e===void 0&&(e=!1),!t||e&&t!==Fl(r)?!1:e}function Gg(r,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=r.getBoundingClientRect(),a=C5(r);let o=_h(1);e&&(n?da(n)&&(o=bm(n)):o=bm(r));const s=wW(a,t,n)?p7(a):_h(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=Fl(a),h=n&&da(n)?Fl(n):n;let p=d,g=tM(p);for(;g&&n&&h!==p;){const y=bm(g),b=g.getBoundingClientRect(),_=Ff(g),m=b.left+(g.clientLeft+parseFloat(_.paddingLeft))*y.x,x=b.top+(g.clientTop+parseFloat(_.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=m,l+=x,p=Fl(g),g=tM(p)}}return mx({width:c,height:f,x:u,y:l})}function m2(r,e){const t=h2(r).scrollLeft;return e?e.left+t:Gg(Sh(r)).left+t}function g7(r,e){const t=r.getBoundingClientRect(),n=t.left+e.scrollLeft-m2(r,t),i=t.top+e.scrollTop;return{x:n,y:i}}function xW(r){let{elements:e,rect:t,offsetParent:n,strategy:i}=r;const a=i==="fixed",o=Sh(n),s=e?f2(e.floating):!1;if(n===o||s&&a)return t;let u={scrollLeft:0,scrollTop:0},l=_h(1);const c=_h(0),f=bo(n);if((f||!f&&!a)&&((Fp(n)!=="body"||B1(o))&&(u=h2(n)),bo(n))){const h=Gg(n);l=bm(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const d=o&&!f&&!a?g7(o,u):_h(0);return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-u.scrollLeft*l.x+c.x+d.x,y:t.y*l.y-u.scrollTop*l.y+c.y+d.y}}function EW(r){return Array.from(r.getClientRects())}function SW(r){const e=Sh(r),t=h2(r),n=r.ownerDocument.body,i=Bg(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Bg(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+m2(r);const s=-t.scrollTop;return Ff(n).direction==="rtl"&&(o+=Bg(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}const wk=25;function OW(r,e){const t=Fl(r),n=Sh(r),i=t.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const c=d2();(!c||c&&e==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}const l=m2(n);if(l<=0){const c=n.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(n.clientWidth-f.clientWidth-h);p<=wk&&(a-=p)}else l<=wk&&(a+=l);return{width:a,height:o,x:s,y:u}}const TW=new Set(["absolute","fixed"]);function CW(r,e){const t=Gg(r,!0,e==="fixed"),n=t.top+r.clientTop,i=t.left+r.clientLeft,a=bo(r)?bm(r):_h(1),o=r.clientWidth*a.x,s=r.clientHeight*a.y,u=i*a.x,l=n*a.y;return{width:o,height:s,x:u,y:l}}function xk(r,e,t){let n;if(e==="viewport")n=OW(r,t);else if(e==="document")n=SW(Sh(r));else if(da(e))n=CW(e,t);else{const i=p7(r);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mx(n)}function y7(r,e){const t=hv(r);return t===e||!da(t)||cv(t)?!1:Ff(t).position==="fixed"||y7(t,e)}function AW(r,e){const t=e.get(r);if(t)return t;let n=wp(r,[],!1).filter(s=>da(s)&&Fp(s)!=="body"),i=null;const a=Ff(r).position==="fixed";let o=a?hv(r):r;for(;da(o)&&!cv(o);){const s=Ff(o),u=O5(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&TW.has(i.position)||B1(o)&&!u&&y7(r,o))?n=n.filter(c=>c!==o):i=s,o=hv(o)}return e.set(r,n),n}function RW(r){let{element:e,boundary:t,rootBoundary:n,strategy:i}=r;const o=[...t==="clippingAncestors"?f2(e)?[]:AW(e,this._c):[].concat(t),n],s=o[0],u=o.reduce((l,c)=>{const f=xk(e,c,i);return l.top=Bg(f.top,l.top),l.right=px(f.right,l.right),l.bottom=px(f.bottom,l.bottom),l.left=Bg(f.left,l.left),l},xk(e,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function PW(r){const{width:e,height:t}=v7(r);return{width:e,height:t}}function MW(r,e,t){const n=bo(e),i=Sh(e),a=t==="fixed",o=Gg(r,!0,a,e);let s={scrollLeft:0,scrollTop:0};const u=_h(0);function l(){u.x=m2(i)}if(n||!n&&!a)if((Fp(e)!=="body"||B1(i))&&(s=h2(e)),n){const h=Gg(e,!0,a,e);u.x=h.x+e.clientLeft,u.y=h.y+e.clientTop}else i&&l();a&&!n&&i&&l();const c=i&&!n&&!a?g7(i,s):_h(0),f=o.left+s.scrollLeft-u.x-c.x,d=o.top+s.scrollTop-u.y-c.y;return{x:f,y:d,width:o.width,height:o.height}}function nS(r){return Ff(r).position==="static"}function Ek(r,e){if(!bo(r)||Ff(r).position==="fixed")return null;if(e)return e(r);let t=r.offsetParent;return Sh(r)===t&&(t=t.ownerDocument.body),t}function m7(r,e){const t=Fl(r);if(f2(r))return t;if(!bo(r)){let i=hv(r);for(;i&&!cv(i);){if(da(i)&&!nS(i))return i;i=hv(i)}return t}let n=Ek(r,e);for(;n&&gH(n)&&nS(n);)n=Ek(n,e);return n&&cv(n)&&nS(n)&&!O5(n)?t:n||wH(r)||t}const DW=async function(r){const e=this.getOffsetParent||m7,t=this.getDimensions,n=await t(r.floating);return{reference:MW(r.reference,await e(r.floating),r.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function kW(r){return Ff(r).direction==="rtl"}const IW={convertOffsetParentRelativeRectToViewportRelativeRect:xW,getDocumentElement:Sh,getClippingRect:RW,getOffsetParent:m7,getElementRects:DW,getClientRects:EW,getDimensions:PW,getScale:bm,isElement:da,isRTL:kW};function b7(r,e){return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}function NW(r,e){let t=null,n;const i=Sh(r);function a(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const l=r.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=l;if(s||e(),!d||!h)return;const p=hm(f),g=hm(i.clientWidth-(c+d)),y=hm(i.clientHeight-(f+h)),b=hm(c),m={rootMargin:-p+"px "+-g+"px "+-y+"px "+-b+"px",threshold:Bg(0,px(1,u))||1};let x=!0;function S(O){const E=O[0].intersectionRatio;if(E!==u){if(!x)return o();E?o(!1,E):n=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!b7(l,r.getBoundingClientRect())&&o(),x=!1}try{t=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{t=new IntersectionObserver(S,m)}t.observe(r)}return o(!0),a}function A5(r,e,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,l=C5(r),c=i||a?[...l?wp(l):[],...wp(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",t,{passive:!0}),a&&b.addEventListener("resize",t)});const f=l&&s?NW(l,t):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[_]=b;_&&_.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var m;(m=h)==null||m.observe(e)})),t()}),l&&!u&&h.observe(l),h.observe(e));let p,g=u?Gg(r):null;u&&y();function y(){const b=Gg(r);g&&!b7(g,b)&&t(),g=b,p=requestAnimationFrame(y)}return t(),()=>{var b;c.forEach(_=>{i&&_.removeEventListener("scroll",t),a&&_.removeEventListener("resize",t)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,u&&cancelAnimationFrame(p)}}const LW=mW,jW=bW,BW=pW,FW=(r,e,t)=>{const n=new Map,i={platform:IW,...t},a={...i.platform,_c:n};return vW(r,e,{...i,platform:a})};var UW=typeof document<"u",zW=function(){},Yw=UW?me.useLayoutEffect:zW;function Sx(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(typeof r=="function"&&r.toString()===e.toString())return!0;let t,n,i;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(t=r.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Sx(r[n],e[n]))return!1;return!0}if(i=Object.keys(r),t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=t;n--!==0;){const a=i[n];if(!(a==="_owner"&&r.$$typeof)&&!Sx(r[a],e[a]))return!1}return!0}return r!==r&&e!==e}function _7(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Sk(r,e){const t=_7(r);return Math.round(e*t)/t}function iS(r){const e=me.useRef(r);return Yw(()=>{e.current=r}),e}function qW(r){r===void 0&&(r={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=r,[c,f]=me.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=me.useState(n);Sx(d,n)||h(n);const[p,g]=me.useState(null),[y,b]=me.useState(null),_=me.useCallback(W=>{W!==O.current&&(O.current=W,g(W))},[]),m=me.useCallback(W=>{W!==E.current&&(E.current=W,b(W))},[]),x=a||p,S=o||y,O=me.useRef(null),E=me.useRef(null),T=me.useRef(c),P=u!=null,I=iS(u),k=iS(i),L=iS(l),B=me.useCallback(()=>{if(!O.current||!E.current)return;const W={placement:e,strategy:t,middleware:d};k.current&&(W.platform=k.current),FW(O.current,E.current,W).then($=>{const J={...$,isPositioned:L.current!==!1};j.current&&!Sx(T.current,J)&&(T.current=J,y2.flushSync(()=>{f(J)}))})},[d,e,t,k,L]);Yw(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const j=me.useRef(!1);Yw(()=>(j.current=!0,()=>{j.current=!1}),[]),Yw(()=>{if(x&&(O.current=x),S&&(E.current=S),x&&S){if(I.current)return I.current(x,S,B);B()}},[x,S,B,I,P]);const z=me.useMemo(()=>({reference:O,floating:E,setReference:_,setFloating:m}),[_,m]),H=me.useMemo(()=>({reference:x,floating:S}),[x,S]),q=me.useMemo(()=>{const W={position:t,left:0,top:0};if(!H.floating)return W;const $=Sk(H.floating,c.x),J=Sk(H.floating,c.y);return s?{...W,transform:"translate("+$+"px, "+J+"px)",..._7(H.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:$,top:J}},[t,s,H.floating,c.x,c.y]);return me.useMemo(()=>({...c,update:B,refs:z,elements:H,floatingStyles:q}),[c,B,z,H,q])}const R5=(r,e)=>({...LW(r),options:[r,e]}),P5=(r,e)=>({...jW(r),options:[r,e]}),M5=(r,e)=>({...BW(r),options:[r,e]});function mv(r){const e=me.useRef(void 0),t=me.useCallback(n=>{const i=r.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,s=o(n);return typeof s=="function"?s:()=>{o(null)}}return a.current=n,()=>{a.current=null}}});return()=>{i.forEach(a=>a==null?void 0:a())}},r);return me.useMemo(()=>r.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=t(n))},r)}function GW(r,e){const t=r.compareDocumentPosition(e);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}const w7=me.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function VW(r){const{children:e,elementsRef:t,labelsRef:n}=r,[i,a]=me.useState(()=>new Set),o=me.useCallback(l=>{a(c=>new Set(c).add(l))},[]),s=me.useCallback(l=>{a(c=>{const f=new Set(c);return f.delete(l),f})},[]),u=me.useMemo(()=>{const l=new Map;return Array.from(i.keys()).sort(GW).forEach((f,d)=>{l.set(f,d)}),l},[i]);return Ce.jsx(w7.Provider,{value:me.useMemo(()=>({register:o,unregister:s,map:u,elementsRef:t,labelsRef:n}),[o,s,u,t,n]),children:e})}function b2(r){r===void 0&&(r={});const{label:e}=r,{register:t,unregister:n,map:i,elementsRef:a,labelsRef:o}=me.useContext(w7),[s,u]=me.useState(null),l=me.useRef(null),c=me.useCallback(f=>{if(l.current=f,s!==null&&(a.current[s]=f,o)){var d;const h=e!==void 0;o.current[s]=h?e:(d=f==null?void 0:f.textContent)!=null?d:null}},[s,a,o,e]);return Di(()=>{const f=l.current;if(f)return t(f),()=>{n(f)}},[t,n]),Di(()=>{const f=l.current?i.get(l.current):null;f!=null&&u(f)},[i]),me.useMemo(()=>({ref:c,index:s??-1}),[s,c])}const HW="data-floating-ui-focusable",Ok="active",Tk="selected",U1="ArrowLeft",z1="ArrowRight",x7="ArrowUp",_2="ArrowDown",WW={...U9};let Ck=!1,YW=0;const Ak=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+YW++;function XW(){const[r,e]=me.useState(()=>Ck?Ak():void 0);return Di(()=>{r==null&&e(Ak())},[]),me.useEffect(()=>{Ck=!0},[]),r}const $W=WW.useId,w2=$W||XW;function E7(){const r=new Map;return{emit(e,t){var n;(n=r.get(e))==null||n.forEach(i=>i(t))},on(e,t){r.has(e)||r.set(e,new Set),r.get(e).add(t)},off(e,t){var n;(n=r.get(e))==null||n.delete(t)}}}const S7=me.createContext(null),O7=me.createContext(null),Up=()=>{var r;return((r=me.useContext(S7))==null?void 0:r.id)||null},bv=()=>me.useContext(O7);function KW(r){const e=w2(),t=bv(),i=Up();return Di(()=>{if(!e)return;const a={id:e,parentId:i};return t==null||t.addNode(a),()=>{t==null||t.removeNode(a)}},[t,e,i]),e}function ZW(r){const{children:e,id:t}=r,n=Up();return Ce.jsx(S7.Provider,{value:me.useMemo(()=>({id:t,parentId:n}),[t,n]),children:e})}function QW(r){const{children:e}=r,t=me.useRef([]),n=me.useCallback(o=>{t.current=[...t.current,o]},[]),i=me.useCallback(o=>{t.current=t.current.filter(s=>s!==o)},[]),[a]=me.useState(()=>E7());return Ce.jsx(O7.Provider,{value:me.useMemo(()=>({nodesRef:t,addNode:n,removeNode:i,events:a}),[n,i,a]),children:e})}function Vg(r){return"data-floating-ui-"+r}function iu(r){r.current!==-1&&(clearTimeout(r.current),r.current=-1)}const Rk=Vg("safe-polygon");function aS(r,e,t){if(t&&!Nm(t))return 0;if(typeof r=="number")return r;if(typeof r=="function"){const n=r();return typeof n=="number"?n:n==null?void 0:n[e]}return r==null?void 0:r[e]}function oS(r){return typeof r=="function"?r():r}function T7(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,events:a,elements:o}=r,{enabled:s=!0,delay:u=0,handleClose:l=null,mouseOnly:c=!1,restMs:f=0,move:d=!0}=e,h=bv(),p=Up(),g=Ns(l),y=Ns(u),b=Ns(t),_=Ns(f),m=me.useRef(),x=me.useRef(-1),S=me.useRef(),O=me.useRef(-1),E=me.useRef(!0),T=me.useRef(!1),P=me.useRef(()=>{}),I=me.useRef(!1),k=Wa(()=>{var q;const W=(q=i.current.openEvent)==null?void 0:q.type;return(W==null?void 0:W.includes("mouse"))&&W!=="mousedown"});me.useEffect(()=>{if(!s)return;function q(W){let{open:$}=W;$||(iu(x),iu(O),E.current=!0,I.current=!1)}return a.on("openchange",q),()=>{a.off("openchange",q)}},[s,a]),me.useEffect(()=>{if(!s||!g.current||!t)return;function q($){k()&&n(!1,$,"hover")}const W=ou(o.floating).documentElement;return W.addEventListener("mouseleave",q),()=>{W.removeEventListener("mouseleave",q)}},[o.floating,t,n,s,g,k]);const L=me.useCallback(function(q,W,$){W===void 0&&(W=!0),$===void 0&&($="hover");const J=aS(y.current,"close",m.current);J&&!S.current?(iu(x),x.current=window.setTimeout(()=>n(!1,q,$),J)):W&&(iu(x),n(!1,q,$))},[y,n]),B=Wa(()=>{P.current(),S.current=void 0}),j=Wa(()=>{if(T.current){const q=ou(o.floating).body;q.style.pointerEvents="",q.removeAttribute(Rk),T.current=!1}}),z=Wa(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);me.useEffect(()=>{if(!s)return;function q(Z){if(iu(x),E.current=!1,c&&!Nm(m.current)||oS(_.current)>0&&!aS(y.current,"open"))return;const ue=aS(y.current,"open",m.current);ue?x.current=window.setTimeout(()=>{b.current||n(!0,Z,"hover")},ue):t||n(!0,Z,"hover")}function W(Z){if(z()){j();return}P.current();const ue=ou(o.floating);if(iu(O),I.current=!1,g.current&&i.current.floatingContext){t||iu(x),S.current=g.current({...i.current.floatingContext,tree:h,x:Z.clientX,y:Z.clientY,onClose(){j(),B(),z()||L(Z,!0,"safe-polygon")}});const ne=S.current;ue.addEventListener("mousemove",ne),P.current=()=>{ue.removeEventListener("mousemove",ne)};return}(m.current==="touch"?!Is(o.floating,Z.relatedTarget):!0)&&L(Z)}function $(Z){z()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:h,x:Z.clientX,y:Z.clientY,onClose(){j(),B(),z()||L(Z)}})(Z))}function J(){iu(x)}function X(Z){z()||L(Z,!1)}if(da(o.domReference)){const Z=o.domReference,ue=o.floating;return t&&Z.addEventListener("mouseleave",$),d&&Z.addEventListener("mousemove",q,{once:!0}),Z.addEventListener("mouseenter",q),Z.addEventListener("mouseleave",W),ue&&(ue.addEventListener("mouseleave",$),ue.addEventListener("mouseenter",J),ue.addEventListener("mouseleave",X)),()=>{t&&Z.removeEventListener("mouseleave",$),d&&Z.removeEventListener("mousemove",q),Z.removeEventListener("mouseenter",q),Z.removeEventListener("mouseleave",W),ue&&(ue.removeEventListener("mouseleave",$),ue.removeEventListener("mouseenter",J),ue.removeEventListener("mouseleave",X))}}},[o,s,r,c,d,L,B,j,n,t,b,h,y,g,i,z,_]),Di(()=>{var q;if(s&&t&&(q=g.current)!=null&&(q=q.__options)!=null&&q.blockPointerEvents&&k()){T.current=!0;const $=o.floating;if(da(o.domReference)&&$){var W;const J=ou(o.floating).body;J.setAttribute(Rk,"");const X=o.domReference,Z=h==null||(W=h.nodesRef.current.find(ue=>ue.id===p))==null||(W=W.context)==null?void 0:W.elements.floating;return Z&&(Z.style.pointerEvents=""),J.style.pointerEvents="none",X.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{J.style.pointerEvents="",X.style.pointerEvents="",$.style.pointerEvents=""}}}},[s,t,p,o,h,g,k]),Di(()=>{t||(m.current=void 0,I.current=!1,B(),j())},[t,B,j]),me.useEffect(()=>()=>{B(),iu(x),iu(O),j()},[s,o.domReference,B,j]);const H=me.useMemo(()=>{function q(W){m.current=W.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(W){const{nativeEvent:$}=W;function J(){!E.current&&!b.current&&n(!0,$,"hover")}c&&!Nm(m.current)||t||oS(_.current)===0||I.current&&W.movementX**2+W.movementY**2<2||(iu(O),m.current==="touch"?J():(I.current=!0,O.current=window.setTimeout(J,oS(_.current))))}}},[c,n,t,b,_]);return me.useMemo(()=>s?{reference:H}:{},[s,H])}let Pk=0;function Tg(r,e){e===void 0&&(e={});const{preventScroll:t=!1,cancelPrevious:n=!0,sync:i=!1}=e;n&&cancelAnimationFrame(Pk);const a=()=>r==null?void 0:r.focus({preventScroll:t});i?a():Pk=requestAnimationFrame(a)}function sS(r,e){if(!r||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(r.contains(e))return!0;if(t&&vx(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function JW(r){return"composedPath"in r?r.composedPath()[0]:r.target}function eY(r){return(r==null?void 0:r.ownerDocument)||document}const _m={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Mk(r){return r==="inert"?_m.inert:r==="aria-hidden"?_m["aria-hidden"]:_m.none}let nw=new WeakSet,iw={},uS=0;const tY=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,C7=r=>r&&(r.host||C7(r.parentNode)),rY=(r,e)=>e.map(t=>{if(r.contains(t))return t;const n=C7(t);return r.contains(n)?n:null}).filter(t=>t!=null);function nY(r,e,t,n){const i="data-floating-ui-inert",a=n?"inert":t?"aria-hidden":null,o=rY(e,r),s=new Set,u=new Set(o),l=[];iw[i]||(iw[i]=new WeakMap);const c=iw[i];o.forEach(f),d(e),s.clear();function f(h){!h||s.has(h)||(s.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||u.has(h)||[].forEach.call(h.children,p=>{if(Fp(p)!=="script")if(s.has(p))d(p);else{const g=a?p.getAttribute(a):null,y=g!==null&&g!=="false",b=Mk(a),_=(b.get(p)||0)+1,m=(c.get(p)||0)+1;b.set(p,_),c.set(p,m),l.push(p),_===1&&y&&nw.add(p),m===1&&p.setAttribute(i,""),!y&&a&&p.setAttribute(a,a==="inert"?"":"true")}})}return uS++,()=>{l.forEach(h=>{const p=Mk(a),y=(p.get(h)||0)-1,b=(c.get(h)||0)-1;p.set(h,y),c.set(h,b),y||(!nw.has(h)&&a&&h.removeAttribute(a),nw.delete(h)),b||h.removeAttribute(i)}),uS--,uS||(_m.inert=new WeakMap,_m["aria-hidden"]=new WeakMap,_m.none=new WeakMap,nw=new WeakSet,iw={})}}function Dk(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);const n=eY(r[0]).body;return nY(r.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,e,t)}const D5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ox=me.forwardRef(function(e,t){const[n,i]=me.useState();Di(()=>{s7()&&i("button")},[]);const a={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Vg("focus-guard")]:"",style:D5};return Ce.jsx("span",{...e,...a})}),iY={clipPath:"inset(50%)",position:"fixed",top:0,left:0},A7=me.createContext(null),kk=Vg("portal");function aY(r){r===void 0&&(r={});const{id:e,root:t}=r,n=w2(),i=R7(),[a,o]=me.useState(null),s=me.useRef(null);return Di(()=>()=>{a==null||a.remove(),queueMicrotask(()=>{s.current=null})},[a]),Di(()=>{if(!n||s.current)return;const u=e?document.getElementById(e):null;if(!u)return;const l=document.createElement("div");l.id=n,l.setAttribute(kk,""),u.appendChild(l),s.current=l,o(l)},[e,n]),Di(()=>{if(t===null||!n||s.current)return;let u=t||(i==null?void 0:i.portalNode);u&&!S5(u)&&(u=u.current),u=u||document.body;let l=null;e&&(l=document.createElement("div"),l.id=e,u.appendChild(l));const c=document.createElement("div");c.id=n,c.setAttribute(kk,""),u=l||u,u.appendChild(c),s.current=c,o(c)},[e,t,n,i]),a}function Tx(r){const{children:e,id:t,root:n,preserveTabOrder:i=!0}=r,a=aY({id:t,root:n}),[o,s]=me.useState(null),u=me.useRef(null),l=me.useRef(null),c=me.useRef(null),f=me.useRef(null),d=o==null?void 0:o.modal,h=o==null?void 0:o.open,p=!!o&&!o.modal&&o.open&&i&&!!(n||a);return me.useEffect(()=>{if(!a||!i||d)return;function g(y){a&&Pb(y)&&(y.type==="focusin"?bk:dW)(a)}return a.addEventListener("focusin",g,!0),a.addEventListener("focusout",g,!0),()=>{a.removeEventListener("focusin",g,!0),a.removeEventListener("focusout",g,!0)}},[a,i,d]),me.useEffect(()=>{a&&(h||bk(a))},[h,a]),Ce.jsxs(A7.Provider,{value:me.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a]),children:[p&&a&&Ce.jsx(Ox,{"data-type":"outside",ref:u,onFocus:g=>{if(Pb(g,a)){var y;(y=c.current)==null||y.focus()}else{const b=o?o.domReference:null,_=h7(b);_==null||_.focus()}}}),p&&a&&Ce.jsx("span",{"aria-owns":a.id,style:iY}),a&&y2.createPortal(e,a),p&&a&&Ce.jsx(Ox,{"data-type":"outside",ref:l,onFocus:g=>{if(Pb(g,a)){var y;(y=f.current)==null||y.focus()}else{const b=o?o.domReference:null,_=d7(b);_==null||_.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}const R7=()=>me.useContext(A7);function Ik(r){return me.useMemo(()=>e=>{r.forEach(t=>{t&&(t.current=e)})},r)}const oY=20;let hp=[];function k5(){hp=hp.filter(r=>r.isConnected)}function sY(r){k5(),r&&Fp(r)!=="body"&&(hp.push(r),hp.length>oY&&(hp=hp.slice(-20)))}function Nk(){return k5(),hp[hp.length-1]}function uY(r){const e=F1();return i7(r,e)?r:g2(r,e)[0]||r}function Lk(r,e){var t;if(!e.current.includes("floating")&&!((t=r.getAttribute("role"))!=null&&t.includes("dialog")))return;const n=F1(),a=XH(r,n).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return i7(s,n)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=r.getAttribute("tabindex");e.current.includes("floating")||a.length===0?o!=="0"&&r.setAttribute("tabindex","0"):(o!=="-1"||r.hasAttribute("data-tabindex")&&r.getAttribute("data-tabindex")!=="-1")&&(r.setAttribute("tabindex","-1"),r.setAttribute("data-tabindex","-1"))}const lY=me.forwardRef(function(e,t){return Ce.jsx("button",{...e,type:"button",ref:t,tabIndex:-1,style:D5})});function I5(r){const{context:e,children:t,disabled:n=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:u=!1,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1,getInsideElements:h=()=>[]}=r,{open:p,onOpenChange:g,events:y,dataRef:b,elements:{domReference:_,floating:m}}=e,x=Wa(()=>{var ge;return(ge=b.current.floatingContext)==null?void 0:ge.nodeId}),S=Wa(h),O=typeof o=="number"&&o<0,E=oM(_)&&O,T=tY(),P=T?a:!0,I=!P||T&&d,k=Ns(i),L=Ns(o),B=Ns(s),j=bv(),z=R7(),H=me.useRef(null),q=me.useRef(null),W=me.useRef(!1),$=me.useRef(!1),J=me.useRef(-1),X=me.useRef(-1),Z=z!=null,ue=Ex(m),re=Wa(function(ge){return ge===void 0&&(ge=ue),ge?g2(ge,F1()):[]}),ne=Wa(ge=>{const Oe=re(ge);return k.current.map(ke=>_&&ke==="reference"?_:ue&&ke==="floating"?ue:Oe).filter(Boolean).flat()});me.useEffect(()=>{if(n||!l)return;function ge(ke){if(ke.key==="Tab"){Is(ue,yh(ou(ue)))&&re().length===0&&!E&&au(ke);const De=ne(),Ne=mh(ke);k.current[0]==="reference"&&Ne===_&&(au(ke),ke.shiftKey?Tg(De[De.length-1]):Tg(De[1])),k.current[1]==="floating"&&Ne===ue&&ke.shiftKey&&(au(ke),Tg(De[0]))}}const Oe=ou(ue);return Oe.addEventListener("keydown",ge),()=>{Oe.removeEventListener("keydown",ge)}},[n,_,ue,l,k,E,re,ne]),me.useEffect(()=>{if(n||!m)return;function ge(Oe){const ke=mh(Oe),Ne=re().indexOf(ke);Ne!==-1&&(J.current=Ne)}return m.addEventListener("focusin",ge),()=>{m.removeEventListener("focusin",ge)}},[n,m,re]),me.useEffect(()=>{if(n||!f)return;function ge(){$.current=!0,setTimeout(()=>{$.current=!1})}function Oe(Ne){const Te=Ne.relatedTarget,Y=Ne.currentTarget,Q=mh(Ne);queueMicrotask(()=>{const ie=x(),we=!(Is(_,Te)||Is(m,Te)||Is(Te,m)||Is(z==null?void 0:z.portalNode,Te)||Te!=null&&Te.hasAttribute(Vg("focus-guard"))||j&&(Fg(j.nodesRef.current,ie).find(Ee=>{var Me,Ie;return Is((Me=Ee.context)==null?void 0:Me.elements.floating,Te)||Is((Ie=Ee.context)==null?void 0:Ie.elements.domReference,Te)})||yk(j.nodesRef.current,ie).find(Ee=>{var Me,Ie,Ye;return[(Me=Ee.context)==null?void 0:Me.elements.floating,Ex((Ie=Ee.context)==null?void 0:Ie.elements.floating)].includes(Te)||((Ye=Ee.context)==null?void 0:Ye.elements.domReference)===Te})));if(Y===_&&ue&&Lk(ue,k),u&&Y!==_&&!(Q!=null&&Q.isConnected)&&yh(ou(ue))===ou(ue).body){bo(ue)&&ue.focus();const Ee=J.current,Me=re(),Ie=Me[Ee]||Me[Me.length-1]||ue;bo(Ie)&&Ie.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(E||!l)&&Te&&we&&!$.current&&Te!==Nk()&&(W.current=!0,g(!1,Ne,"focus-out"))})}const ke=!!(!j&&z);function De(){iu(X),b.current.insideReactTree=!0,X.current=window.setTimeout(()=>{b.current.insideReactTree=!1})}if(m&&bo(_))return _.addEventListener("focusout",Oe),_.addEventListener("pointerdown",ge),m.addEventListener("focusout",Oe),ke&&m.addEventListener("focusout",De,!0),()=>{_.removeEventListener("focusout",Oe),_.removeEventListener("pointerdown",ge),m.removeEventListener("focusout",Oe),ke&&m.removeEventListener("focusout",De,!0)}},[n,_,m,ue,l,j,z,g,f,u,re,E,x,k,b]);const le=me.useRef(null),ce=me.useRef(null),pe=Ik([le,z==null?void 0:z.beforeInsideRef]),fe=Ik([ce,z==null?void 0:z.afterInsideRef]);me.useEffect(()=>{var ge,Oe;if(n||!m)return;const ke=Array.from((z==null||(ge=z.portalNode)==null?void 0:ge.querySelectorAll("["+Vg("portal")+"]"))||[]),Ne=(Oe=(j?yk(j.nodesRef.current,x()):[]).find(Q=>{var ie;return oM(((ie=Q.context)==null?void 0:ie.elements.domReference)||null)}))==null||(Oe=Oe.context)==null?void 0:Oe.elements.domReference,Te=[m,Ne,...ke,...S(),H.current,q.current,le.current,ce.current,z==null?void 0:z.beforeOutsideRef.current,z==null?void 0:z.afterOutsideRef.current,k.current.includes("reference")||E?_:null].filter(Q=>Q!=null),Y=l||E?Dk(Te,!I,I):Dk(Te);return()=>{Y()}},[n,_,m,l,k,z,E,P,I,j,x,S]),Di(()=>{if(n||!bo(ue))return;const ge=ou(ue),Oe=yh(ge);queueMicrotask(()=>{const ke=ne(ue),De=L.current,Ne=(typeof De=="number"?ke[De]:De.current)||ue,Te=Is(ue,Oe);!O&&!Te&&p&&Tg(Ne,{preventScroll:Ne===ue})})},[n,p,ue,O,ne,L]),Di(()=>{if(n||!ue)return;const ge=ou(ue),Oe=yh(ge);sY(Oe);function ke(Te){let{reason:Y,event:Q,nested:ie}=Te;if(["hover","safe-polygon"].includes(Y)&&Q.type==="mouseleave"&&(W.current=!0),Y==="outside-press")if(ie)W.current=!1;else if(l7(Q)||c7(Q))W.current=!1;else{let we=!1;document.createElement("div").focus({get preventScroll(){return we=!0,!1}}),we?W.current=!1:W.current=!0}}y.on("openchange",ke);const De=ge.createElement("span");De.setAttribute("tabindex","-1"),De.setAttribute("aria-hidden","true"),Object.assign(De.style,D5),Z&&_&&_.insertAdjacentElement("afterend",De);function Ne(){if(typeof B.current=="boolean"){const Te=_||Nk();return Te&&Te.isConnected?Te:De}return B.current.current||De}return()=>{y.off("openchange",ke);const Te=yh(ge),Y=Is(m,Te)||j&&Fg(j.nodesRef.current,x(),!1).some(ie=>{var we;return Is((we=ie.context)==null?void 0:we.elements.floating,Te)}),Q=Ne();queueMicrotask(()=>{const ie=uY(Q);B.current&&!W.current&&bo(ie)&&(!(ie!==Te&&Te!==ge.body)||Y)&&ie.focus({preventScroll:!0}),De.remove()})}},[n,m,ue,B,b,y,j,Z,_,x]),me.useEffect(()=>(queueMicrotask(()=>{W.current=!1}),()=>{queueMicrotask(k5)}),[n]),Di(()=>{if(!n&&z)return z.setFocusManagerState({modal:l,closeOnFocusOut:f,open:p,onOpenChange:g,domReference:_}),()=>{z.setFocusManagerState(null)}},[n,z,l,p,g,f,_]),Di(()=>{n||ue&&Lk(ue,k)},[n,ue,k]);function se(ge){return n||!c||!l?null:Ce.jsx(lY,{ref:ge==="start"?H:q,onClick:Oe=>g(!1,Oe.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}const de=!n&&P&&(l?!E:!0)&&(Z||l);return Ce.jsxs(Ce.Fragment,{children:[de&&Ce.jsx(Ox,{"data-type":"inside",ref:pe,onFocus:ge=>{if(l){const ke=ne();Tg(i[0]==="reference"?ke[0]:ke[ke.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(W.current=!1,Pb(ge,z.portalNode)){const ke=d7(_);ke==null||ke.focus()}else{var Oe;(Oe=z.beforeOutsideRef.current)==null||Oe.focus()}}}),!E&&se("start"),t,se("end"),de&&Ce.jsx(Ox,{"data-type":"inside",ref:fe,onFocus:ge=>{if(l)Tg(ne()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(f&&(W.current=!0),Pb(ge,z.portalNode)){const ke=h7(_);ke==null||ke.focus()}else{var Oe;(Oe=z.afterOutsideRef.current)==null||Oe.focus()}}})]})}function jk(r){return bo(r.target)&&r.target.tagName==="BUTTON"}function cY(r){return bo(r.target)&&r.target.tagName==="A"}function Bk(r){return T5(r)}function N5(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,dataRef:i,elements:{domReference:a}}=r,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0,stickIfOpen:f=!0}=e,d=me.useRef(),h=me.useRef(!1),p=me.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&s!=="click"&&(Nm(y,!0)&&l||(t&&u&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?n(!1,g.nativeEvent,"click"):(g.preventDefault(),n(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(s==="mousedown"&&d.current){d.current=void 0;return}Nm(y,!0)&&l||(t&&u&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?n(!1,g.nativeEvent,"click"):n(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!c||jk(g))&&(g.key===" "&&!Bk(a)&&(g.preventDefault(),h.current=!0),!cY(g)&&g.key==="Enter"&&n(!(t&&u),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!c||jk(g)||Bk(a)||g.key===" "&&h.current&&(h.current=!1,n(!(t&&u),g.nativeEvent,"click"))}}),[i,a,s,l,c,n,t,f,u]);return me.useMemo(()=>o?{reference:p}:{},[o,p])}function fY(r,e){let t=null,n=null,i=!1;return{contextElement:r||void 0,getBoundingClientRect(){var a;const o=(r==null?void 0:r.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s=e.axis==="x"||e.axis==="both",u=e.axis==="y"||e.axis==="both",l=["mouseenter","mousemove"].includes(((a=e.dataRef.current.openEvent)==null?void 0:a.type)||"")&&e.pointerType!=="touch";let c=o.width,f=o.height,d=o.x,h=o.y;return t==null&&e.x&&s&&(t=o.x-e.x),n==null&&e.y&&u&&(n=o.y-e.y),d-=t||0,h-=n||0,c=0,f=0,!i||l?(c=e.axis==="y"?o.width:0,f=e.axis==="x"?o.height:0,d=s&&e.x!=null?e.x:d,h=u&&e.y!=null?e.y:h):i&&!l&&(f=e.axis==="x"?o.height:f,c=e.axis==="y"?o.width:c),i=!0,{width:c,height:f,x:d,y:h,top:h,right:d+c,bottom:h+f,left:d}}}}function Fk(r){return r!=null&&r.clientX!=null}function dY(r,e){e===void 0&&(e={});const{open:t,dataRef:n,elements:{floating:i,domReference:a},refs:o}=r,{enabled:s=!0,axis:u="both",x:l=null,y:c=null}=e,f=me.useRef(!1),d=me.useRef(null),[h,p]=me.useState(),[g,y]=me.useState([]),b=Wa((O,E)=>{f.current||n.current.openEvent&&!Fk(n.current.openEvent)||o.setPositionReference(fY(a,{x:O,y:E,axis:u,dataRef:n,pointerType:h}))}),_=Wa(O=>{l!=null||c!=null||(t?d.current||y([]):b(O.clientX,O.clientY))}),m=Nm(h)?i:t,x=me.useCallback(()=>{if(!m||!s||l!=null||c!=null)return;const O=Fl(i);function E(T){const P=mh(T);Is(i,P)?(O.removeEventListener("mousemove",E),d.current=null):b(T.clientX,T.clientY)}if(!n.current.openEvent||Fk(n.current.openEvent)){O.addEventListener("mousemove",E);const T=()=>{O.removeEventListener("mousemove",E),d.current=null};return d.current=T,T}o.setPositionReference(a)},[m,s,l,c,i,n,o,a,b]);me.useEffect(()=>x(),[x,g]),me.useEffect(()=>{s&&!i&&(f.current=!1)},[s,i]),me.useEffect(()=>{!s&&t&&(f.current=!0)},[s,t]),Di(()=>{s&&(l!=null||c!=null)&&(f.current=!1,b(l,c))},[s,l,c,b]);const S=me.useMemo(()=>{function O(E){let{pointerType:T}=E;p(T)}return{onPointerDown:O,onPointerEnter:O,onMouseMove:_,onMouseEnter:_}},[_]);return me.useMemo(()=>s?{reference:S}:{},[s,S])}const hY={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vY={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uk=r=>{var e,t;return{escapeKey:typeof r=="boolean"?r:(e=r==null?void 0:r.escapeKey)!=null?e:!1,outsidePress:typeof r=="boolean"?r:(t=r==null?void 0:r.outsidePress)!=null?t:!0}};function L5(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,elements:i,dataRef:a}=r,{enabled:o=!0,escapeKey:s=!0,outsidePress:u=!0,outsidePressEvent:l="pointerdown",referencePress:c=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=e,g=bv(),y=Wa(typeof u=="function"?u:()=>!1),b=typeof u=="function"?y:u,_=me.useRef(!1),{escapeKey:m,outsidePress:x}=Uk(h),{escapeKey:S,outsidePress:O}=Uk(p),E=me.useRef(!1),T=Wa(j=>{var z;if(!t||!o||!s||j.key!=="Escape"||E.current)return;const H=(z=a.current.floatingContext)==null?void 0:z.nodeId,q=g?Fg(g.nodesRef.current,H):[];if(!m&&(j.stopPropagation(),q.length>0)){let W=!0;if(q.forEach($=>{var J;if((J=$.context)!=null&&J.open&&!$.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}n(!1,rW(j)?j.nativeEvent:j,"escape-key")}),P=Wa(j=>{var z;const H=()=>{var q;T(j),(q=mh(j))==null||q.removeEventListener("keydown",H)};(z=mh(j))==null||z.addEventListener("keydown",H)}),I=Wa(j=>{var z;const H=a.current.insideReactTree;a.current.insideReactTree=!1;const q=_.current;if(_.current=!1,l==="click"&&q||H||typeof b=="function"&&!b(j))return;const W=mh(j),$="["+Vg("inert")+"]",J=ou(i.floating).querySelectorAll($);let X=da(W)?W:null;for(;X&&!cv(X);){const ne=hv(X);if(cv(ne)||!da(ne))break;X=ne}if(J.length&&da(W)&&!JH(W)&&!Is(W,i.floating)&&Array.from(J).every(ne=>!Is(X,ne)))return;if(bo(W)&&B){const ne=cv(W),le=Ff(W),ce=/auto|scroll/,pe=ne||ce.test(le.overflowX),fe=ne||ce.test(le.overflowY),se=pe&&W.clientWidth>0&&W.scrollWidth>W.clientWidth,de=fe&&W.clientHeight>0&&W.scrollHeight>W.clientHeight,ge=le.direction==="rtl",Oe=de&&(ge?j.offsetX<=W.offsetWidth-W.clientWidth:j.offsetX>W.clientWidth),ke=se&&j.offsetY>W.clientHeight;if(Oe||ke)return}const Z=(z=a.current.floatingContext)==null?void 0:z.nodeId,ue=g&&Fg(g.nodesRef.current,Z).some(ne=>{var le;return tS(j,(le=ne.context)==null?void 0:le.elements.floating)});if(tS(j,i.floating)||tS(j,i.domReference)||ue)return;const re=g?Fg(g.nodesRef.current,Z):[];if(re.length>0){let ne=!0;if(re.forEach(le=>{var ce;if((ce=le.context)!=null&&ce.open&&!le.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}n(!1,j,"outside-press")}),k=Wa(j=>{var z;const H=()=>{var q;I(j),(q=mh(j))==null||q.removeEventListener(l,H)};(z=mh(j))==null||z.addEventListener(l,H)});me.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=m,a.current.__outsidePressBubbles=x;let j=-1;function z(J){n(!1,J,"ancestor-scroll")}function H(){window.clearTimeout(j),E.current=!0}function q(){j=window.setTimeout(()=>{E.current=!1},d2()?5:0)}const W=ou(i.floating);s&&(W.addEventListener("keydown",S?P:T,S),W.addEventListener("compositionstart",H),W.addEventListener("compositionend",q)),b&&W.addEventListener(l,O?k:I,O);let $=[];return d&&(da(i.domReference)&&($=wp(i.domReference)),da(i.floating)&&($=$.concat(wp(i.floating))),!da(i.reference)&&i.reference&&i.reference.contextElement&&($=$.concat(wp(i.reference.contextElement)))),$=$.filter(J=>{var X;return J!==((X=W.defaultView)==null?void 0:X.visualViewport)}),$.forEach(J=>{J.addEventListener("scroll",z,{passive:!0})}),()=>{s&&(W.removeEventListener("keydown",S?P:T,S),W.removeEventListener("compositionstart",H),W.removeEventListener("compositionend",q)),b&&W.removeEventListener(l,O?k:I,O),$.forEach(J=>{J.removeEventListener("scroll",z)}),window.clearTimeout(j)}},[a,i,s,b,l,t,n,d,o,m,x,T,S,P,I,O,k]),me.useEffect(()=>{a.current.insideReactTree=!1},[a,b,l]);const L=me.useMemo(()=>({onKeyDown:T,...c&&{[hY[f]]:j=>{n(!1,j.nativeEvent,"reference-press")},...f!=="click"&&{onClick(j){n(!1,j.nativeEvent,"reference-press")}}}}),[T,n,c,f]),B=me.useMemo(()=>({onKeyDown:T,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[vY[l]]:()=>{a.current.insideReactTree=!0}}),[T,l,a]);return me.useMemo(()=>o?{reference:L,floating:B}:{},[o,L,B])}function pY(r){const{open:e=!1,onOpenChange:t,elements:n}=r,i=w2(),a=me.useRef({}),[o]=me.useState(()=>E7()),s=Up()!=null,[u,l]=me.useState(n.reference),c=Wa((h,p,g)=>{a.current.openEvent=h?p:void 0,o.emit("openchange",{open:h,event:p,reason:g,nested:s}),t==null||t(h,p,g)}),f=me.useMemo(()=>({setPositionReference:l}),[]),d=me.useMemo(()=>({reference:u||n.reference||null,floating:n.floating||null,domReference:n.reference}),[u,n.reference,n.floating]);return me.useMemo(()=>({dataRef:a,open:e,onOpenChange:c,elements:d,events:o,floatingId:i,refs:f}),[e,c,d,o,i,f])}function j5(r){r===void 0&&(r={});const{nodeId:e}=r,t=pY({...r,elements:{reference:null,floating:null,...r.elements}}),n=r.rootContext||t,i=n.elements,[a,o]=me.useState(null),[s,u]=me.useState(null),c=(i==null?void 0:i.domReference)||a,f=me.useRef(null),d=bv();Di(()=>{c&&(f.current=c)},[c]);const h=qW({...r,elements:{...i,...s&&{reference:s}}}),p=me.useCallback(m=>{const x=da(m)?{getBoundingClientRect:()=>m.getBoundingClientRect(),getClientRects:()=>m.getClientRects(),contextElement:m}:m;u(x),h.refs.setReference(x)},[h.refs]),g=me.useCallback(m=>{(da(m)||m===null)&&(f.current=m,o(m)),(da(h.refs.reference.current)||h.refs.reference.current===null||m!==null&&!da(m))&&h.refs.setReference(m)},[h.refs]),y=me.useMemo(()=>({...h.refs,setReference:g,setPositionReference:p,domReference:f}),[h.refs,g,p]),b=me.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),_=me.useMemo(()=>({...h,...n,refs:y,elements:b,nodeId:e}),[h,y,b,e,n]);return Di(()=>{n.dataRef.current.floatingContext=_;const m=d==null?void 0:d.nodesRef.current.find(x=>x.id===e);m&&(m.context=_)}),me.useMemo(()=>({...h,context:_,refs:y,elements:b}),[h,y,b,_])}function lS(){return $H()&&s7()}function gY(r,e){e===void 0&&(e={});const{open:t,onOpenChange:n,events:i,dataRef:a,elements:o}=r,{enabled:s=!0,visibleOnly:u=!0}=e,l=me.useRef(!1),c=me.useRef(-1),f=me.useRef(!0);me.useEffect(()=>{if(!s)return;const h=Fl(o.domReference);function p(){!t&&bo(o.domReference)&&o.domReference===yh(ou(o.domReference))&&(l.current=!0)}function g(){f.current=!0}function y(){f.current=!1}return h.addEventListener("blur",p),lS()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",y,!0)),()=>{h.removeEventListener("blur",p),lS()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",y,!0))}},[o.domReference,t,s]),me.useEffect(()=>{if(!s)return;function h(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(l.current=!0)}return i.on("openchange",h),()=>{i.off("openchange",h)}},[i,s]),me.useEffect(()=>()=>{iu(c)},[]);const d=me.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(h){if(l.current)return;const p=mh(h.nativeEvent);if(u&&da(p)){if(lS()&&!h.relatedTarget){if(!f.current&&!T5(p))return}else if(!eW(p))return}n(!0,h.nativeEvent,"focus")},onBlur(h){l.current=!1;const p=h.relatedTarget,g=h.nativeEvent,y=da(p)&&p.hasAttribute(Vg("focus-guard"))&&p.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var b;const _=yh(o.domReference?o.domReference.ownerDocument:document);!p&&_===o.domReference||Is((b=a.current.floatingContext)==null?void 0:b.refs.floating.current,_)||Is(o.domReference,_)||y||n(!1,g,"focus")})}}),[a,o.domReference,n,u]);return me.useMemo(()=>s?{reference:d}:{},[s,d])}function cS(r,e,t){const n=new Map,i=t==="item";let a=r;if(i&&r){const{[Ok]:o,[Tk]:s,...u}=r;a=u}return{...t==="floating"&&{tabIndex:-1,[HW]:""},...a,...e.map(o=>{const s=o?o[t]:null;return typeof s=="function"?r?s(r):null:s}).concat(r).reduce((o,s)=>(s&&Object.entries(s).forEach(u=>{let[l,c]=u;if(!(i&&[Ok,Tk].includes(l)))if(l.indexOf("on")===0){if(n.has(l)||n.set(l,[]),typeof c=="function"){var f;(f=n.get(l))==null||f.push(c),o[l]=function(){for(var d,h=arguments.length,p=new Array(h),g=0;gy(...p)).find(y=>y!==void 0)}}}else o[l]=c}),o),{})}}function B5(r){r===void 0&&(r=[]);const e=r.map(s=>s==null?void 0:s.reference),t=r.map(s=>s==null?void 0:s.floating),n=r.map(s=>s==null?void 0:s.item),i=me.useCallback(s=>cS(s,r,"reference"),e),a=me.useCallback(s=>cS(s,r,"floating"),t),o=me.useCallback(s=>cS(s,r,"item"),n);return me.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const yY="Escape";function x2(r,e,t){switch(r){case"vertical":return e;case"horizontal":return t;default:return e||t}}function aw(r,e){return x2(e,r===x7||r===_2,r===U1||r===z1)}function fS(r,e,t){return x2(e,r===_2,t?r===U1:r===z1)||r==="Enter"||r===" "||r===""}function zk(r,e,t){return x2(e,t?r===U1:r===z1,r===_2)}function qk(r,e,t,n){const i=t?r===z1:r===U1,a=r===x7;return e==="both"||e==="horizontal"&&n&&n>1?r===yY:x2(e,i,a)}function mY(r,e){const{open:t,onOpenChange:n,elements:i,floatingId:a}=r,{listRef:o,activeIndex:s,onNavigate:u=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:f=!1,loop:d=!1,nested:h=!1,rtl:p=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:_=!0,disabledIndices:m=void 0,orientation:x="vertical",parentOrientation:S,cols:O=1,scrollItemIntoView:E=!0,virtualItemRef:T,itemSizes:P,dense:I=!1}=e,k=Ex(i.floating),L=Ns(k),B=Up(),j=bv();Di(()=>{r.dataRef.current.orientation=x},[r,x]);const z=Wa(()=>{u(W.current===-1?null:W.current)}),H=oM(i.domReference),q=me.useRef(y),W=me.useRef(c??-1),$=me.useRef(null),J=me.useRef(!0),X=me.useRef(z),Z=me.useRef(!!i.floating),ue=me.useRef(t),re=me.useRef(!1),ne=me.useRef(!1),le=Ns(m),ce=Ns(t),pe=Ns(E),fe=Ns(c),[se,de]=me.useState(),[ge,Oe]=me.useState(),ke=Wa(()=>{function Ee(ot){if(g){var mt;(mt=ot.id)!=null&&mt.endsWith("-fui-option")&&(ot.id=a+"-"+Math.random().toString(16).slice(2,10)),de(ot.id),j==null||j.events.emit("virtualfocus",ot),T&&(T.current=ot)}else Tg(ot,{sync:re.current,preventScroll:!0})}const Me=o.current[W.current],Ie=ne.current;Me&&Ee(Me),(re.current?ot=>ot():requestAnimationFrame)(()=>{const ot=o.current[W.current]||Me;if(!ot)return;Me||Ee(ot);const mt=pe.current;mt&&Ne&&(Ie||!J.current)&&(ot.scrollIntoView==null||ot.scrollIntoView(typeof mt=="boolean"?{block:"nearest",inline:"nearest"}:mt))})});Di(()=>{l&&(t&&i.floating?q.current&&c!=null&&(ne.current=!0,W.current=c,z()):Z.current&&(W.current=-1,X.current()))},[l,t,i.floating,c,z]),Di(()=>{if(l&&t&&i.floating)if(s==null){if(re.current=!1,fe.current!=null)return;if(Z.current&&(W.current=-1,ke()),(!ue.current||!Z.current)&&q.current&&($.current!=null||q.current===!0&&$.current==null)){let Ee=0;const Me=()=>{o.current[0]==null?(Ee<2&&(Ee?requestAnimationFrame:queueMicrotask)(Me),Ee++):(W.current=$.current==null||fS($.current,x,p)||h?rS(o,le.current):mk(o,le.current),$.current=null,z())};Me()}}else Rb(o,s)||(W.current=s,ke(),ne.current=!1)},[l,t,i.floating,s,fe,h,o,x,p,z,ke,le]),Di(()=>{var Ee;if(!l||i.floating||!j||g||!Z.current)return;const Me=j.nodesRef.current,Ie=(Ee=Me.find(mt=>mt.id===B))==null||(Ee=Ee.context)==null?void 0:Ee.elements.floating,Ye=yh(ou(i.floating)),ot=Me.some(mt=>mt.context&&Is(mt.context.elements.floating,Ye));Ie&&!ot&&J.current&&Ie.focus({preventScroll:!0})},[l,i.floating,j,B,g]),Di(()=>{if(!l||!j||!g||B)return;function Ee(Me){Oe(Me.id),T&&(T.current=Me)}return j.events.on("virtualfocus",Ee),()=>{j.events.off("virtualfocus",Ee)}},[l,j,g,B,T]),Di(()=>{X.current=z,ue.current=t,Z.current=!!i.floating}),Di(()=>{t||($.current=null,q.current=y)},[t,y]);const De=s!=null,Ne=me.useMemo(()=>{function Ee(Ie){if(!ce.current)return;const Ye=o.current.indexOf(Ie);Ye!==-1&&W.current!==Ye&&(W.current=Ye,z())}return{onFocus(Ie){let{currentTarget:Ye}=Ie;re.current=!0,Ee(Ye)},onClick:Ie=>{let{currentTarget:Ye}=Ie;return Ye.focus({preventScroll:!0})},onMouseMove(Ie){let{currentTarget:Ye}=Ie;re.current=!0,ne.current=!1,b&&Ee(Ye)},onPointerLeave(Ie){let{pointerType:Ye}=Ie;if(!(!J.current||Ye==="touch")&&(re.current=!0,!!b&&(W.current=-1,z(),!g))){var ot;(ot=L.current)==null||ot.focus({preventScroll:!0})}}}},[ce,L,b,o,z,g]),Te=me.useCallback(()=>{var Ee;return S??(j==null||(Ee=j.nodesRef.current.find(Me=>Me.id===B))==null||(Ee=Ee.context)==null||(Ee=Ee.dataRef)==null?void 0:Ee.current.orientation)},[B,j,S]),Y=Wa(Ee=>{if(J.current=!1,re.current=!0,Ee.which===229||!ce.current&&Ee.currentTarget===L.current)return;if(h&&qk(Ee.key,x,p,O)){aw(Ee.key,Te())||au(Ee),n(!1,Ee.nativeEvent,"list-navigation"),bo(i.domReference)&&(g?j==null||j.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const Me=W.current,Ie=rS(o,m),Ye=mk(o,m);if(H||(Ee.key==="Home"&&(au(Ee),W.current=Ie,z()),Ee.key==="End"&&(au(Ee),W.current=Ye,z())),O>1){const ot=P||Array.from({length:o.current.length},()=>({width:1,height:1})),mt=lW(ot,O,I),wt=mt.findIndex(vt=>vt!=null&&!Ww(o,vt,m)),Mt=mt.reduce((vt,tt,_e)=>tt!=null&&!Ww(o,tt,m)?_e:vt,-1),Dt=mt[uW({current:mt.map(vt=>vt!=null?o.current[vt]:null)},{event:Ee,orientation:x,loop:d,rtl:p,cols:O,disabledIndices:fW([...(typeof m!="function"?m:null)||o.current.map((vt,tt)=>Ww(o,tt,m)?tt:void 0),void 0],mt),minIndex:wt,maxIndex:Mt,prevIndex:cW(W.current>Ye?Ie:W.current,ot,mt,O,Ee.key===_2?"bl":Ee.key===(p?U1:z1)?"tr":"tl"),stopEvent:!0})];if(Dt!=null&&(W.current=Dt,z()),x==="both")return}if(aw(Ee.key,x)){if(au(Ee),t&&!g&&yh(Ee.currentTarget.ownerDocument)===Ee.currentTarget){W.current=fS(Ee.key,x,p)?Ie:Ye,z();return}fS(Ee.key,x,p)?d?W.current=Me>=Ye?f&&Me!==o.current.length?-1:Ie:Wu(o,{startingIndex:Me,disabledIndices:m}):W.current=Math.min(Ye,Wu(o,{startingIndex:Me,disabledIndices:m})):d?W.current=Me<=Ie?f&&Me!==-1?o.current.length:Ye:Wu(o,{startingIndex:Me,decrement:!0,disabledIndices:m}):W.current=Math.max(Ie,Wu(o,{startingIndex:Me,decrement:!0,disabledIndices:m})),Rb(o,W.current)&&(W.current=-1),z()}}),Q=me.useMemo(()=>g&&t&&De&&{"aria-activedescendant":ge||se},[g,t,De,ge,se]),ie=me.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...H?{}:Q,onKeyDown:Y,onPointerMove(){J.current=!0}}),[Q,Y,x,H]),we=me.useMemo(()=>{function Ee(Ie){y==="auto"&&l7(Ie.nativeEvent)&&(q.current=!0)}function Me(Ie){q.current=y,y==="auto"&&c7(Ie.nativeEvent)&&(q.current=!0)}return{...Q,onKeyDown(Ie){J.current=!1;const Ye=Ie.key.startsWith("Arrow"),ot=["Home","End"].includes(Ie.key),mt=Ye||ot,wt=zk(Ie.key,x,p),Mt=qk(Ie.key,x,p,O),Dt=zk(Ie.key,Te(),p),vt=aw(Ie.key,x),tt=(h?Dt:vt)||Ie.key==="Enter"||Ie.key.trim()==="";if(g&&t){const Ze=j==null?void 0:j.nodesRef.current.find(It=>It.parentId==null),nt=j&&Ze?tW(j.nodesRef.current,Ze.id):null;if(mt&&nt&&T){const It=new KeyboardEvent("keydown",{key:Ie.key,bubbles:!0});if(wt||Mt){var _e,Ue;const ct=((_e=nt.context)==null?void 0:_e.elements.domReference)===Ie.currentTarget,Lt=Mt&&!ct?(Ue=nt.context)==null?void 0:Ue.elements.domReference:wt?o.current.find(Rt=>(Rt==null?void 0:Rt.id)===se):null;Lt&&(au(Ie),Lt.dispatchEvent(It),Oe(void 0))}if((vt||ot)&&nt.context&&nt.context.open&&nt.parentId&&Ie.currentTarget!==nt.context.elements.domReference){var Qe;au(Ie),(Qe=nt.context.elements.domReference)==null||Qe.dispatchEvent(It);return}}return Y(Ie)}if(!(!t&&!_&&Ye)){if(tt){const Ze=aw(Ie.key,Te());$.current=h&&Ze?null:Ie.key}if(h){Dt&&(au(Ie),t?(W.current=rS(o,le.current),z()):n(!0,Ie.nativeEvent,"list-navigation"));return}vt&&(c!=null&&(W.current=c),au(Ie),!t&&_?n(!0,Ie.nativeEvent,"list-navigation"):Y(Ie),t&&z())}},onFocus(){t&&!g&&(W.current=-1,z())},onPointerDown:Me,onPointerEnter:Me,onMouseDown:Ee,onClick:Ee}},[se,Q,O,Y,le,y,o,h,z,n,t,_,x,Te,p,c,j,g,T]);return me.useMemo(()=>l?{reference:we,floating:ie,item:Ne}:{},[l,we,ie,Ne])}const bY=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function F5(r,e){var t,n;e===void 0&&(e={});const{open:i,elements:a,floatingId:o}=r,{enabled:s=!0,role:u="dialog"}=e,l=w2(),c=((t=a.domReference)==null?void 0:t.id)||l,f=me.useMemo(()=>{var _;return((_=Ex(a.floating))==null?void 0:_.id)||o},[a.floating,o]),d=(n=bY.get(u))!=null?n:u,p=Up()!=null,g=me.useMemo(()=>d==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:c},...d==="menu"&&p&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[d,f,p,i,c,u]),y=me.useMemo(()=>{const _={id:f,...d&&{role:d}};return d==="tooltip"||u==="label"?_:{..._,...d==="menu"&&{"aria-labelledby":c}}},[d,f,c,u]),b=me.useCallback(_=>{let{active:m,selected:x}=_;const S={role:"option",...m&&{id:f+"-fui-option"}};switch(u){case"select":case"combobox":return{...S,"aria-selected":x}}return{}},[f,u]);return me.useMemo(()=>s?{reference:g,floating:y,item:b}:{},[s,g,y,b])}const Gk=r=>r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function Yy(r,e){return typeof r=="function"?r(e):r}function _Y(r,e){const[t,n]=me.useState(r);return r&&!t&&n(!0),me.useEffect(()=>{if(!r&&t){const i=setTimeout(()=>n(!1),e);return()=>clearTimeout(i)}},[r,t,e]),t}function wY(r,e){e===void 0&&(e={});const{open:t,elements:{floating:n}}=r,{duration:i=250}=e,o=(typeof i=="number"?i:i.close)||0,[s,u]=me.useState("unmounted"),l=_Y(t,o);return!l&&s==="close"&&u("unmounted"),Di(()=>{if(n){if(t){u("initial");const c=requestAnimationFrame(()=>{y2.flushSync(()=>{u("open")})});return()=>{cancelAnimationFrame(c)}}u("close")}},[t,n]),{isMounted:l,status:s}}function xY(r,e){e===void 0&&(e={});const{initial:t={opacity:0},open:n,close:i,common:a,duration:o=250}=e,s=r.placement,u=s.split("-")[0],l=me.useMemo(()=>({side:u,placement:s}),[u,s]),c=typeof o=="number",f=(c?o:o.open)||0,d=(c?o:o.close)||0,[h,p]=me.useState(()=>({...Yy(a,l),...Yy(t,l)})),{isMounted:g,status:y}=wY(r,{duration:o}),b=Ns(t),_=Ns(n),m=Ns(i),x=Ns(a);return Di(()=>{const S=Yy(b.current,l),O=Yy(m.current,l),E=Yy(x.current,l),T=Yy(_.current,l)||Object.keys(S).reduce((P,I)=>(P[I]="",P),{});if(y==="initial"&&p(P=>({transitionProperty:P.transitionProperty,...E,...S})),y==="open"&&p({transitionProperty:Object.keys(T).map(Gk).join(","),transitionDuration:f+"ms",...E,...T}),y==="close"){const P=O||S;p({transitionProperty:Object.keys(P).map(Gk).join(","),transitionDuration:d+"ms",...E,...P})}},[d,m,b,_,x,f,y,l]),{isMounted:g,styles:h}}function EY(r,e){var t;const{open:n,dataRef:i}=r,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:h=null}=e,p=me.useRef(-1),g=me.useRef(""),y=me.useRef((t=h??o)!=null?t:-1),b=me.useRef(null),_=Wa(s),m=Wa(u),x=Ns(c),S=Ns(d);Di(()=>{n&&(iu(p),b.current=null,g.current="")},[n]),Di(()=>{if(n&&g.current===""){var I;y.current=(I=h??o)!=null?I:-1}},[n,h,o]);const O=Wa(I=>{I?i.current.typing||(i.current.typing=I,m(I)):i.current.typing&&(i.current.typing=I,m(I))}),E=Wa(I=>{function k(H,q,W){const $=x.current?x.current(q,W):q.find(J=>(J==null?void 0:J.toLocaleLowerCase().indexOf(W.toLocaleLowerCase()))===0);return $?H.indexOf($):-1}const L=a.current;if(g.current.length>0&&g.current[0]!==" "&&(k(L,L,g.current)===-1?O(!1):I.key===" "&&au(I)),L==null||S.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;n&&I.key!==" "&&(au(I),O(!0)),L.every(H=>{var q,W;return H?((q=H[0])==null?void 0:q.toLocaleLowerCase())!==((W=H[1])==null?void 0:W.toLocaleLowerCase()):!0})&&g.current===I.key&&(g.current="",y.current=b.current),g.current+=I.key,iu(p),p.current=window.setTimeout(()=>{g.current="",y.current=b.current,O(!1)},f);const j=y.current,z=k(L,[...L.slice((j||0)+1),...L.slice(0,(j||0)+1)],g.current);z!==-1?(_(z),b.current=z):I.key!==" "&&(g.current="",O(!1))}),T=me.useMemo(()=>({onKeyDown:E}),[E]),P=me.useMemo(()=>({onKeyDown:E,onKeyUp(I){I.key===" "&&O(!1)}}),[E,O]);return me.useMemo(()=>l?{reference:T,floating:P}:{},[l,T,P])}function P7(r,e,t){return t===void 0&&(t=!0),r.filter(i=>{var a;return i.parentId===e&&(!t||((a=i.context)==null?void 0:a.open))}).flatMap(i=>[i,...P7(r,i.id,t)])}function Vk(r,e){const[t,n]=r;let i=!1;const a=e.length;for(let o=0,s=a-1;o=n!=f>=n&&t<=(c-u)*(n-l)/(f-l)+u&&(i=!i)}return i}function SY(r,e){return r[0]>=e.x&&r[0]<=e.x+e.width&&r[1]>=e.y&&r[1]<=e.y+e.height}function M7(r){r===void 0&&(r={});const{buffer:e=.5,blockPointerEvents:t=!1,requireIntent:n=!0}=r,i={current:-1};let a=!1,o=null,s=null,u=typeof performance<"u"?performance.now():0;function l(f,d){const h=performance.now(),p=h-u;if(o===null||s===null||p===0)return o=f,s=d,u=h,null;const g=f-o,y=d-s,_=Math.sqrt(g*g+y*y)/p;return o=f,s=d,u=h,_}const c=f=>{let{x:d,y:h,placement:p,elements:g,onClose:y,nodeId:b,tree:_}=f;return function(x){function S(){iu(i),y()}if(iu(i),!g.domReference||!g.floating||p==null||d==null||h==null)return;const{clientX:O,clientY:E}=x,T=[O,E],P=JW(x),I=x.type==="mouseleave",k=sS(g.floating,P),L=sS(g.domReference,P),B=g.domReference.getBoundingClientRect(),j=g.floating.getBoundingClientRect(),z=p.split("-")[0],H=d>j.right-j.width/2,q=h>j.bottom-j.height/2,W=SY(T,B),$=j.width>B.width,J=j.height>B.height,X=($?B:j).left,Z=($?B:j).right,ue=(J?B:j).top,re=(J?B:j).bottom;if(k&&(a=!0,!I))return;if(L&&(a=!1),L&&!I){a=!0;return}if(I&&da(x.relatedTarget)&&sS(g.floating,x.relatedTarget)||_&&P7(_.nodesRef.current,b).length)return;if(z==="top"&&h>=B.bottom-1||z==="bottom"&&h<=B.top+1||z==="left"&&d>=B.right-1||z==="right"&&d<=B.left+1)return S();let ne=[];switch(z){case"top":ne=[[X,B.top+1],[X,j.bottom-1],[Z,j.bottom-1],[Z,B.top+1]];break;case"bottom":ne=[[X,j.top+1],[X,B.bottom-1],[Z,B.bottom-1],[Z,j.top+1]];break;case"left":ne=[[j.right-1,re],[j.right-1,ue],[B.left+1,ue],[B.left+1,re]];break;case"right":ne=[[B.right-1,re],[B.right-1,ue],[j.left+1,ue],[j.left+1,re]];break}function le(ce){let[pe,fe]=ce;switch(z){case"top":{const se=[$?pe+e/2:H?pe+e*4:pe-e*4,fe+e+1],de=[$?pe-e/2:H?pe+e*4:pe-e*4,fe+e+1],ge=[[j.left,H||$?j.bottom-e:j.top],[j.right,H?$?j.bottom-e:j.top:j.bottom-e]];return[se,de,...ge]}case"bottom":{const se=[$?pe+e/2:H?pe+e*4:pe-e*4,fe-e],de=[$?pe-e/2:H?pe+e*4:pe-e*4,fe-e],ge=[[j.left,H||$?j.top+e:j.bottom],[j.right,H?$?j.top+e:j.bottom:j.top+e]];return[se,de,...ge]}case"left":{const se=[pe+e+1,J?fe+e/2:q?fe+e*4:fe-e*4],de=[pe+e+1,J?fe-e/2:q?fe+e*4:fe-e*4];return[...[[q||J?j.right-e:j.left,j.top],[q?J?j.right-e:j.left:j.right-e,j.bottom]],se,de]}case"right":{const se=[pe-e,J?fe+e/2:q?fe+e*4:fe-e*4],de=[pe-e,J?fe-e/2:q?fe+e*4:fe-e*4],ge=[[q||J?j.left+e:j.right,j.top],[q?J?j.left+e:j.right:j.left+e,j.bottom]];return[se,de,...ge]}}}if(!Vk([O,E],ne)){if(a&&!W)return S();if(!I&&n){const ce=l(x.clientX,x.clientY);if(ce!==null&&ce<.1)return S()}Vk([O,E],le([d,h]))?!a&&n&&(i.current=window.setTimeout(S,40)):S()}}};return c.__options={blockPointerEvents:t},c}const v1=({shouldWrap:r,wrap:e,children:t})=>r?e(t):t,OY=ao.createContext(null),U5=()=>!!me.useContext(OY),TY=me.createContext(void 0),CY=me.createContext(void 0),E2=()=>{let r=me.useContext(TY);r===void 0&&(r="light");const e=me.useContext(CY);return{theme:r,themeClassName:`ndl-theme-${r}`,tokens:e}};function AY({isInitialOpen:r=!1,placement:e="top",isOpen:t,onOpenChange:n,type:i="simple",isPortaled:a=!0,strategy:o="absolute",hoverDelay:s=void 0,shouldCloseOnReferenceClick:u=!1,autoUpdateOptions:l,isDisabled:c=!1}={}){const[f,d]=me.useState(r),h=t??f,p=n??d,g=j5({middleware:[R5(5),M5({crossAxis:e.includes("-"),fallbackAxisSideDirection:"start",padding:5}),P5({padding:5})],onOpenChange:p,open:h,placement:e,strategy:o,whileElementsMounted(E,T,P){return A5(E,T,P,Object.assign({},l))}}),y=g.context,b=T7(y,{delay:s,enabled:i==="simple"&&!c,handleClose:M7(),move:!1}),_=N5(y,{enabled:i==="rich"&&!c}),m=gY(y,{enabled:i==="simple"&&!c,visibleOnly:!0}),x=L5(y,{escapeKey:!0,outsidePress:!0,referencePress:u}),S=F5(y,{role:i==="simple"?"tooltip":"dialog"}),O=B5([b,m,x,S,_]);return me.useMemo(()=>Object.assign(Object.assign({isOpen:h,isPortaled:a,setOpen:p,type:i},O),g),[h,p,i,a,O,g])}const D7=me.createContext(null),q1=()=>{const r=me.useContext(D7);if(r===null)throw new Error("Tooltip components must be wrapped in ");return r};var G1=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const d=U5(),g=AY({autoUpdateOptions:f,hoverDelay:l,isDisabled:e,isInitialOpen:n,isOpen:e===!0?!1:a,isPortaled:s??!d,onOpenChange:o,placement:i,shouldCloseOnReferenceClick:c,strategy:u??(d?"fixed":"absolute"),type:t});return Ce.jsx(D7.Provider,{value:g,children:r})};k7.displayName="Tooltip";const RY=r=>{var{children:e,hasButtonWrapper:t=!1,htmlAttributes:n,className:i,style:a,ref:o}=r,s=G1(r,["children","hasButtonWrapper","htmlAttributes","className","style","ref"]);const u=q1(),l=e.props,c=mv([u.refs.setReference,o,l==null?void 0:l.ref]),f=Vn({"ndl-closed":!u.isOpen,"ndl-open":u.isOpen},"ndl-tooltip-trigger",i);if(t&&me.isValidElement(e)){const d=Object.assign(Object.assign(Object.assign({className:f},n),l),{ref:c});return me.cloneElement(e,u.getReferenceProps(d))}return Ce.jsx("button",Object.assign({type:"button",className:f,style:a,ref:c},u.getReferenceProps(n),s,{children:e}))},PY=r=>{var{children:e,style:t,htmlAttributes:n,className:i,ref:a}=r,o=G1(r,["children","style","htmlAttributes","className","ref"]);const s=q1(),u=mv([s.refs.setFloating,a]),{themeClassName:l}=E2();if(!s.isOpen)return null;const c=Vn("ndl-tooltip-content",l,i,{"ndl-tooltip-content-rich":s.type==="rich","ndl-tooltip-content-simple":s.type==="simple"});return s.type==="simple"?Ce.jsx(v1,{shouldWrap:s.isPortaled,wrap:f=>Ce.jsx(Tx,{children:f}),children:Ce.jsx("div",Object.assign({ref:u,className:c,style:Object.assign(Object.assign({},s.floatingStyles),t)},o,s.getFloatingProps(n),{children:Ce.jsx(Ed,{variant:"body-medium",children:e})}))}):Ce.jsx(v1,{shouldWrap:s.isPortaled,wrap:f=>Ce.jsx(Tx,{children:f}),children:Ce.jsx(I5,{context:s.context,returnFocus:!0,modal:!1,initialFocus:-1,closeOnFocusOut:!0,children:Ce.jsx("div",Object.assign({ref:u,className:c,style:Object.assign(Object.assign({},s.floatingStyles),t)},o,s.getFloatingProps(n),{children:e}))})})},MY=r=>{var{children:e,passThroughProps:t,typographyVariant:n="subheading-medium",className:i,style:a,htmlAttributes:o,ref:s}=r,u=G1(r,["children","passThroughProps","typographyVariant","className","style","htmlAttributes","ref"]);const l=q1(),c=Vn("ndl-tooltip-header",i);return l.isOpen?Ce.jsx(Ed,Object.assign({ref:s,variant:n,className:c,style:a,htmlAttributes:o},t,u,{children:e})):null},DY=r=>{var{children:e,className:t,style:n,htmlAttributes:i,passThroughProps:a,ref:o}=r,s=G1(r,["children","className","style","htmlAttributes","passThroughProps","ref"]);const u=q1(),l=Vn("ndl-tooltip-body",t);return u.isOpen?Ce.jsx(Ed,Object.assign({ref:o,variant:"body-medium",className:l,style:n,htmlAttributes:i},a,s,{children:e})):null},kY=r=>{var{children:e,className:t,style:n,htmlAttributes:i,ref:a}=r,o=G1(r,["children","className","style","htmlAttributes","ref"]);const s=q1(),u=mv([s.refs.setFloating,a]);if(!s.isOpen)return null;const l=Vn("ndl-tooltip-actions",t);return Ce.jsx("div",Object.assign({className:l,ref:u,style:n},o,i,{children:e}))},Bf=Object.assign(k7,{Actions:kY,Body:DY,Content:PY,Header:MY,Trigger:RY});var IY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,iconButtonVariant:n="default",isLoading:i=!1,isDisabled:a=!1,size:o="medium",isFloating:s=!1,isActive:u=void 0,description:l,tooltipProps:c,className:f,style:d,variant:h="neutral",htmlAttributes:p,onClick:g,ref:y}=r,b=IY(r,["children","as","iconButtonVariant","isLoading","isDisabled","size","isFloating","isActive","description","tooltipProps","className","style","variant","htmlAttributes","onClick","ref"]);const _=t??"button",m=!a&&!i,x=n==="clean",O=Vn("ndl-icon-btn",f,{"ndl-active":!!u,"ndl-clean":x,"ndl-danger":h==="danger","ndl-disabled":a,"ndl-floating":s,"ndl-large":o==="large","ndl-loading":i,"ndl-medium":o==="medium","ndl-small":o==="small"});if(x&&s)throw new Error('BaseIconButton: Cannot use isFloating and iconButtonVariant="clean" at the same time.');!l&&!(p!=null&&p["aria-label"])&&eM("Icon buttons do not have text, be sure to include a description or an aria-label for screen readers link: https://dequeuniversity.com/rules/axe/4.4/button-name?application=axeAPI");const E=T=>{if(!m){T.preventDefault(),T.stopPropagation();return}g&&g(T)};return Ce.jsxs(Bf,Object.assign({hoverDelay:{close:0,open:500}},c==null?void 0:c.root,{type:"simple",isDisabled:l===null||a,children:[Ce.jsx(Bf.Trigger,Object.assign({},c==null?void 0:c.trigger,{hasButtonWrapper:!0,children:Ce.jsx(_,Object.assign({type:"button",onClick:E,disabled:a,"aria-disabled":!m,"aria-label":l,"aria-pressed":u,className:O,style:d,ref:y},b,p,{children:Ce.jsx("div",{className:"ndl-icon-btn-inner",children:i?Ce.jsx(h1,{size:"small"}):Ce.jsx("div",{className:"ndl-icon",children:e})})}))})),Ce.jsx(Bf.Content,Object.assign({},c==null?void 0:c.content,{children:l}))]}))};var NY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,isLoading:n=!1,isDisabled:i=!1,size:a="medium",isActive:o,variant:s="neutral",description:u,tooltipProps:l,className:c,style:f,htmlAttributes:d,onClick:h,ref:p}=r,g=NY(r,["children","as","isLoading","isDisabled","size","isActive","variant","description","tooltipProps","className","style","htmlAttributes","onClick","ref"]);return Ce.jsx(I7,Object.assign({as:t,iconButtonVariant:"clean",isDisabled:i,size:a,isLoading:n,isActive:o,variant:s,description:u,tooltipProps:l,className:c,style:f,htmlAttributes:d,onClick:h,ref:p},g,{children:e}))};function LY({state:r,onChange:e,isControlled:t,inputType:n="text"}){const[i,a]=me.useState(r),o=me.useMemo(()=>t===!0?r:i,[t,r,i]),s=me.useCallback(u=>{let l;["checkbox","radio","switch"].includes(n)?l=u.target.checked:l=u.target.value,t!==!0&&a(l),e==null||e(u)},[t,e,n]);return[o,s]}function jY({isInitialOpen:r=!1,placement:e="bottom",isOpen:t,onOpenChange:n,offsetOption:i=10,anchorElement:a,anchorPosition:o,anchorElementAsPortalAnchor:s,shouldCaptureFocus:u,initialFocus:l,role:c,closeOnClickOutside:f,strategy:d="absolute",isPortaled:h=!0}={}){var p;const[g,y]=me.useState(r),[b,_]=me.useState(),[m,x]=me.useState(),S=t??g,O=n??y,E=j5({elements:{reference:a},middleware:[R5(i),M5({crossAxis:e.includes("-"),fallbackAxisSideDirection:"end",padding:5}),P5()],onOpenChange:(z,H)=>{O(z),n==null||n(z,H)},open:S,placement:e,strategy:d,whileElementsMounted:A5}),T=E.context,P=N5(T,{enabled:t===void 0}),I=L5(T,{outsidePress:f}),k=F5(T,{role:c}),L=dY(T,{enabled:o!==void 0,x:o==null?void 0:o.x,y:o==null?void 0:o.y}),B=B5([P,I,k,L]),{styles:j}=xY(T,{duration:(p=Number.parseInt(Yu.motion.duration.quick))!==null&&p!==void 0?p:0});return me.useMemo(()=>Object.assign(Object.assign(Object.assign({isOpen:S,setIsOpen:O},B),E),{transitionStyles:j,labelId:b,descriptionId:m,setLabelId:_,setDescriptionId:x,anchorElementAsPortalAnchor:s,shouldCaptureFocus:u,initialFocus:l,isPortaled:h}),[S,O,B,E,j,b,m,s,u,l,h])}function BY(){me.useEffect(()=>{const r=()=>{document.querySelectorAll("[data-floating-ui-focus-guard]").forEach(n=>{n.setAttribute("aria-hidden","true"),n.removeAttribute("role")})};r();const e=new MutationObserver(()=>{r()});return e.observe(document.body,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[])}var sM=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const r=ao.useContext(L7);if(r===null)throw new Error("Popover components must be wrapped in ");return r},FY=({children:r,anchorElement:e,placement:t,isOpen:n,offset:i,anchorPosition:a,hasAnchorPortal:o,shouldCaptureFocus:s=!1,initialFocus:u,onOpenChange:l,role:c,closeOnClickOutside:f=!0,isPortaled:d,strategy:h})=>{const p=U5(),g=p?"fixed":"absolute",_=jY({anchorElement:e,anchorElementAsPortalAnchor:o??p,anchorPosition:a,closeOnClickOutside:f,initialFocus:u,isOpen:n,isPortaled:d??!p,offsetOption:i,onOpenChange:l,placement:t?N7[t]:void 0,role:c,shouldCaptureFocus:s,strategy:h??g});return Ce.jsx(L7.Provider,{value:_,children:r})},UY=r=>{var{children:e,hasButtonWrapper:t=!1,ref:n}=r,i=sM(r,["children","hasButtonWrapper","ref"]);const a=j7(),o=e.props,s=mv([a.refs.setReference,n,o==null?void 0:o.ref]);return t&&ao.isValidElement(e)?ao.cloneElement(e,a.getReferenceProps(Object.assign(Object.assign(Object.assign({},i),o),{"data-state":a.isOpen?"open":"closed",ref:s}))):Ce.jsx("button",Object.assign({ref:a.refs.setReference,type:"button","data-state":a.isOpen?"open":"closed"},a.getReferenceProps(i),{children:e}))},zY=r=>{var{as:e,className:t,style:n,children:i,htmlAttributes:a,ref:o}=r,s=sM(r,["as","className","style","children","htmlAttributes","ref"]);const u=j7(),{context:l}=u,c=sM(u,["context"]),f=mv([c.refs.setFloating,o]),{themeClassName:d}=E2(),h=Vn("ndl-popover",d,t),p=e??"div";return BY(),l.open?Ce.jsx(v1,{shouldWrap:c.isPortaled,wrap:g=>{var y;return Ce.jsx(Tx,{root:(y=c.anchorElementAsPortalAnchor)!==null&&y!==void 0&&y?c.refs.reference.current:void 0,children:g})},children:Ce.jsx(I5,{context:l,modal:c.shouldCaptureFocus,initialFocus:c.initialFocus,children:Ce.jsx(p,Object.assign({className:h,"aria-labelledby":c.labelId,"aria-describedby":c.descriptionId,style:Object.assign(Object.assign(Object.assign({},c.floatingStyles),c.transitionStyles),n),ref:f},c.getFloatingProps(Object.assign({},a)),s,{children:i}))})}):null};Object.assign(FY,{Content:zY,Trigger:UY});var Xm=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),qY=r=>Up()===null?Ce.jsx(QW,{children:Ce.jsx(Hk,Object.assign({},r,{isRoot:!0}))}):Ce.jsx(Hk,Object.assign({},r)),Hk=({children:r,isOpen:e,onClose:t,isRoot:n,anchorRef:i,as:a,className:o,placement:s,minWidth:u,title:l,isDisabled:c,description:f,icon:d,isPortaled:h=!0,portalTarget:p,htmlAttributes:g,strategy:y,ref:b,style:_})=>{const[m,x]=me.useState(!1),[S,O]=me.useState(!1),[E,T]=me.useState(null),P=me.useRef([]),I=me.useRef([]),k=me.useContext(p1),L=U5(),B=bv(),j=KW(),z=Up(),H=b2(),{themeClassName:q}=E2();me.useEffect(()=>{e!==void 0&&x(e)},[e]),me.useEffect(()=>{m&&T(0)},[m]);const W=a??"div",$=z!==null,J=$?"right-start":"bottom-start",{floatingStyles:X,refs:Z,context:ue}=j5({elements:{reference:i==null?void 0:i.current},middleware:[R5({alignmentAxis:$?-4:0,mainAxis:$?0:4}),M5({fallbackPlacements:["left-start","right-start"]}),P5()],nodeId:j,onOpenChange:(Ne,Te)=>{e===void 0&&x(Ne),Ne||(Te instanceof PointerEvent?t==null||t(Te,{type:"backdropClick"}):Te instanceof KeyboardEvent?t==null||t(Te,{type:"escapeKeyDown"}):Te instanceof FocusEvent&&(t==null||t(Te,{type:"focusOut"})))},open:m,placement:s?N7[s]:J,strategy:y??(L?"fixed":"absolute"),whileElementsMounted:A5}),re=T7(ue,{delay:{open:75},enabled:$,handleClose:M7({blockPointerEvents:!0})}),ne=N5(ue,{event:"mousedown",ignoreMouse:$,toggle:!$}),le=F5(ue,{role:"menu"}),ce=L5(ue,{bubbles:!0}),pe=mY(ue,{activeIndex:E,listRef:P,nested:$,onNavigate:T}),fe=EY(ue,{activeIndex:E,listRef:I,onMatch:m?T:void 0}),{getReferenceProps:se,getFloatingProps:de,getItemProps:ge}=B5([re,ne,le,ce,pe,fe]);me.useEffect(()=>{if(!B)return;function Ne(Y){e===void 0&&x(!1),t==null||t(void 0,{id:Y==null?void 0:Y.id,type:"itemClick"})}function Te(Y){Y.nodeId!==j&&Y.parentId===z&&(e===void 0&&x(!1),t==null||t(void 0,{type:"itemClick"}))}return B.events.on("click",Ne),B.events.on("menuopen",Te),()=>{B.events.off("click",Ne),B.events.off("menuopen",Te)}},[B,j,z,t,e]),me.useEffect(()=>{m&&B&&B.events.emit("menuopen",{nodeId:j,parentId:z})},[B,m,j,z]);const Oe=me.useCallback(Ne=>{Ne.key==="Tab"&&Ne.shiftKey&&requestAnimationFrame(()=>{const Te=Z.floating.current;Te&&!Te.contains(document.activeElement)&&(e===void 0&&x(!1),t==null||t(void 0,{type:"focusOut"}))})},[e,t,Z]),ke=Vn("ndl-menu",q,o),De=mv([Z.setReference,H.ref,b]);return Ce.jsxs(ZW,{id:j,children:[n!==!0&&Ce.jsx(VY,{ref:De,className:$?"MenuItem":"RootMenu",isDisabled:c,style:_,htmlAttributes:Object.assign(Object.assign({"data-focus-inside":S?"":void 0,"data-nested":$?"":void 0,"data-open":m?"":void 0,role:$?"menuitem":void 0,tabIndex:$?k.activeIndex===H.index?0:-1:void 0},g),se(k.getItemProps({onFocus(Ne){var Te;(Te=g==null?void 0:g.onFocus)===null||Te===void 0||Te.call(g,Ne),O(!1),k.setHasFocusInside(!0)}}))),title:l,description:f,leadingVisual:d}),Ce.jsx(p1.Provider,{value:{activeIndex:E,getItemProps:ge,isOpen:c===!0?!1:m,setActiveIndex:T,setHasFocusInside:O},children:Ce.jsx(VW,{elementsRef:P,labelsRef:I,children:m&&Ce.jsx(v1,{shouldWrap:h,wrap:Ne=>Ce.jsx(Tx,{root:p,children:Ne}),children:Ce.jsx(I5,{context:ue,modal:!1,initialFocus:0,returnFocus:!$,closeOnFocusOut:!0,guards:!0,children:Ce.jsx(W,Object.assign({ref:Z.setFloating,className:ke,style:Object.assign(Object.assign({minWidth:u!==void 0?`${u}px`:void 0},X),_)},de({onKeyDown:Oe}),{children:r}))})})})})]})},z5=r=>{var{title:e,leadingContent:t,trailingContent:n,preLeadingContent:i,description:a,isDisabled:o,as:s,className:u,style:l,htmlAttributes:c,ref:f}=r,d=Xm(r,["title","leadingContent","trailingContent","preLeadingContent","description","isDisabled","as","className","style","htmlAttributes","ref"]);const h=Vn("ndl-menu-item",u,{"ndl-disabled":o}),p=s??"button";return Ce.jsx(p,Object.assign({className:h,ref:f,type:"button",role:"menuitem",disabled:o,style:l},d,c,{children:Ce.jsxs("div",{className:"ndl-menu-item-inner",children:[!!i&&Ce.jsx("div",{className:"ndl-menu-item-pre-leading-content",children:i}),!!t&&Ce.jsx("div",{className:"ndl-menu-item-leading-content",children:t}),Ce.jsxs("div",{className:"ndl-menu-item-title-wrapper",children:[Ce.jsx("div",{className:"ndl-menu-item-title",children:e}),!!a&&Ce.jsx("div",{className:"ndl-menu-item-description",children:a})]}),!!n&&Ce.jsx("div",{className:"ndl-menu-item-trailing-content",children:n})]})}))},GY=r=>{var{title:e,className:t,style:n,leadingVisual:i,trailingContent:a,description:o,isDisabled:s,as:u,onClick:l,onFocus:c,htmlAttributes:f,id:d,ref:h}=r,p=Xm(r,["title","className","style","leadingVisual","trailingContent","description","isDisabled","as","onClick","onFocus","htmlAttributes","id","ref"]);const g=me.useContext(p1),b=b2({label:s===!0?null:typeof e=="string"?e:void 0}),_=bv(),m=b.index===g.activeIndex,x=mv([b.ref,h]);return Ce.jsx(z5,Object.assign({as:u??"button",style:n,className:t,ref:x,title:e,description:o,leadingContent:i,trailingContent:a,isDisabled:s,htmlAttributes:Object.assign(Object.assign(Object.assign({},f),{tabIndex:m?0:-1}),g.getItemProps({id:d,onClick(S){l==null||l(S),_==null||_.events.emit("click",{id:d})},onFocus(S){c==null||c(S),g.setHasFocusInside(!0)}}))},p))},VY=({title:r,isDisabled:e,description:t,leadingVisual:n,as:i,onFocus:a,onClick:o,className:s,style:u,htmlAttributes:l,id:c,ref:f})=>{const d=me.useContext(p1),p=b2({label:e===!0?null:typeof r=="string"?r:void 0}),g=p.index===d.activeIndex,y=mv([p.ref,f]);return Ce.jsx(z5,{as:i??"button",style:u,className:s,ref:y,title:r,description:t,leadingContent:n,trailingContent:Ce.jsx(W9,{className:"ndl-menu-item-chevron"}),isDisabled:e,htmlAttributes:Object.assign(Object.assign(Object.assign(Object.assign({},l),{tabIndex:g?0:-1}),d.getItemProps({onClick(b){o==null||o(b)},onFocus(b){a==null||a(b),d.setHasFocusInside(!0)},onTouchStart(){d.setHasFocusInside(!0)}})),{id:c})})},HY=r=>{var{children:e,className:t,style:n,as:i,htmlAttributes:a,ref:o}=r,s=Xm(r,["children","className","style","as","htmlAttributes","ref"]);const u=Vn("ndl-menu-category-item",t),l=i??"div";return Ce.jsx(l,Object.assign({className:u,style:n,ref:o},s,a,{children:e}))},WY=r=>{var{title:e,leadingVisual:t,trailingContent:n,description:i,isDisabled:a,isChecked:o=!1,onClick:s,onFocus:u,className:l,style:c,as:f,id:d,htmlAttributes:h,ref:p}=r,g=Xm(r,["title","leadingVisual","trailingContent","description","isDisabled","isChecked","onClick","onFocus","className","style","as","id","htmlAttributes","ref"]);const y=me.useContext(p1),_=b2({label:a===!0?null:typeof e=="string"?e:void 0}),m=bv(),x=_.index===y.activeIndex,S=mv([_.ref,p]),O=Vn("ndl-menu-radio-item",l,{"ndl-checked":o});return Ce.jsx(z5,Object.assign({as:f??"button",style:c,className:O,ref:S,title:e,description:i,preLeadingContent:o?Ce.jsx(LV,{className:"n-size-5 n-shrink-0 n-self-center"}):null,leadingContent:t,trailingContent:n,isDisabled:a,htmlAttributes:Object.assign(Object.assign(Object.assign({},h),{"aria-checked":o,role:"menuitemradio",tabIndex:x?0:-1}),y.getItemProps({id:d,onClick(E){s==null||s(E),m==null||m.events.emit("click",{id:d})},onFocus(E){u==null||u(E),y.setHasFocusInside(!0)}}))},g))},YY=r=>{var{as:e,children:t,className:n,htmlAttributes:i,style:a,ref:o}=r,s=Xm(r,["as","children","className","htmlAttributes","style","ref"]);const u=Vn("ndl-menu-items",n),l=e??"div";return Ce.jsx(l,Object.assign({className:u,style:a,ref:o},s,i,{children:t}))},XY=r=>{var{children:e,className:t,htmlAttributes:n,style:i,ref:a}=r,o=Xm(r,["children","className","htmlAttributes","style","ref"]);const s=Vn("ndl-menu-group",t);return Ce.jsx("div",Object.assign({className:s,style:i,ref:a,role:"group"},o,n,{children:e}))},Lm=Object.assign(qY,{CategoryItem:HY,Divider:yV,Group:XY,Item:GY,Items:YY,RadioItem:WY}),$Y="aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI";var KY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,shape:t="rectangular",className:n,style:i,height:a,width:o,isLoading:s=!0,children:u,htmlAttributes:l,onBackground:c="default",ref:f}=r,d=KY(r,["as","shape","className","style","height","width","isLoading","children","htmlAttributes","onBackground","ref"]);const h=e??"div",p=Vn(`ndl-skeleton ndl-skeleton-${t}`,c&&`ndl-skeleton-${c}`,n);return Ce.jsx(v1,{shouldWrap:s,wrap:g=>Ce.jsx(h,Object.assign({ref:f,className:p,style:Object.assign(Object.assign({},i),{height:a,width:o}),"aria-busy":!0,tabIndex:-1},d,l,{children:Ce.jsx("div",{"aria-hidden":s,className:"ndl-skeleton-content",tabIndex:-1,children:g})})),children:u})};cb.displayName="Skeleton";var ZY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{label:e,isFluid:t,errorText:n,helpText:i,leadingElement:a,trailingElement:o,showRequiredOrOptionalLabel:s=!1,moreInformationText:u,size:l="medium",placeholder:c,value:f,tooltipProps:d,htmlAttributes:h,isDisabled:p,isReadOnly:g,isRequired:y,onChange:b,isClearable:_=!1,className:m,style:x,isSkeletonLoading:S=!1,isLoading:O=!1,skeletonProps:E,ref:T}=r,P=ZY(r,["label","isFluid","errorText","helpText","leadingElement","trailingElement","showRequiredOrOptionalLabel","moreInformationText","size","placeholder","value","tooltipProps","htmlAttributes","isDisabled","isReadOnly","isRequired","onChange","isClearable","className","style","isSkeletonLoading","isLoading","skeletonProps","ref"]);const[I,k]=LY({inputType:"text",isControlled:f!==void 0,onChange:b,state:f??""}),L=me.useId(),B=me.useId(),j=me.useId(),z=Vn("ndl-text-input",m,{"ndl-disabled":p,"ndl-has-error":n,"ndl-has-icon":a||o||n,"ndl-has-leading-icon":a,"ndl-has-trailing-icon":o||n,"ndl-large":l==="large","ndl-medium":l==="medium","ndl-read-only":g,"ndl-small":l==="small"}),H=e==null||e==="",q=Vn("ndl-form-item-label",{"ndl-fluid":t,"ndl-form-item-no-label":H}),W=Object.assign(Object.assign({},h),{className:Vn("ndl-input",h==null?void 0:h.className)}),$=W["aria-label"],X=!!e&&typeof e!="string"&&($===void 0||$===""),Z=_||O,ue=le=>{var ce;_&&le.key==="Escape"&&I&&(le.preventDefault(),le.stopPropagation(),k==null||k({target:{value:""}})),(ce=h==null?void 0:h.onKeyDown)===null||ce===void 0||ce.call(h,le)};me.useMemo(()=>{!e&&!$&&eM("A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI"),X&&eM($Y)},[e,$,X]);const re=Vn({"ndl-information-icon-large":l==="large","ndl-information-icon-small":l==="small"||l==="medium"}),ne=me.useMemo(()=>{const le=[L];return i&&!n?le.push(B):n&&le.push(j),le.join(" ")},[L,i,n,B,j]);return Ce.jsxs("div",{className:z,style:x,children:[Ce.jsxs("label",{className:q,children:[!H&&Ce.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular"},E,{isLoading:S,children:Ce.jsxs("div",{className:"ndl-label-text-wrapper",children:[Ce.jsx(Ed,{variant:l==="large"?"body-large":"body-medium",className:"ndl-label-text",children:e}),!!u&&Ce.jsxs(Bf,Object.assign({},d==null?void 0:d.root,{type:"simple",children:[Ce.jsx(Bf.Trigger,Object.assign({},d==null?void 0:d.trigger,{className:re,hasButtonWrapper:!0,children:Ce.jsx("div",{tabIndex:0,role:"button","aria-label":"Information icon",children:Ce.jsx($V,{})})})),Ce.jsx(Bf.Content,Object.assign({},d==null?void 0:d.content,{children:u}))]})),s&&Ce.jsx(Ed,{variant:l==="large"?"body-large":"body-medium",className:"ndl-form-item-optional",children:y===!0?"Required":"Optional"})]})})),Ce.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular"},E,{isLoading:S,children:Ce.jsxs("div",{className:"ndl-input-wrapper",children:[(a||O&&!o)&&Ce.jsx("div",{className:"ndl-element-leading ndl-element",children:O?Ce.jsx(h1,{size:l==="large"?"medium":"small",className:l==="large"?"ndl-medium-spinner":"ndl-small-spinner"}):a}),Ce.jsxs("div",{className:Vn("ndl-input-container",{"ndl-clearable":_}),children:[Ce.jsx("input",Object.assign({ref:T,readOnly:g,disabled:p,required:y,value:I,placeholder:c,type:"text",onChange:k,"aria-describedby":ne},W,{onKeyDown:ue},P)),Z&&Ce.jsxs("span",{id:L,className:"ndl-text-input-hint","aria-hidden":!0,children:[O&&"Loading ",_&&"Press Escape to clear input."]}),_&&!!I&&Ce.jsx("div",{className:"ndl-element-clear ndl-element",children:Ce.jsx("button",{tabIndex:-1,"aria-hidden":!0,type:"button",title:"Clear input (Esc)",onClick:()=>{k==null||k({target:{value:""}})},children:Ce.jsx(Y9,{className:"n-size-4"})})})]}),o&&Ce.jsx("div",{className:"ndl-element-trailing ndl-element",children:O&&!a?Ce.jsx(h1,{size:l==="large"?"medium":"small",className:l==="large"?"ndl-medium-spinner":"ndl-small-spinner"}):o})]})}))]}),!!i&&!n&&Ce.jsx(cb,{onBackground:"weak",shape:"rectangular",isLoading:S,children:Ce.jsx(Ed,{variant:l==="large"?"body-medium":"body-small",className:"ndl-form-message",htmlAttributes:{"aria-live":"polite",id:B},children:i})}),!!n&&Ce.jsx(cb,Object.assign({onBackground:"weak",shape:"rectangular",width:"fit-content"},E,{isLoading:S,children:Ce.jsxs("div",{className:"ndl-form-message",children:[Ce.jsx("div",{className:"ndl-error-icon",children:Ce.jsx(fH,{})}),Ce.jsx(Ed,{className:"ndl-error-text",variant:l==="large"?"body-medium":"body-small",htmlAttributes:{"aria-live":"polite",id:j},children:n})]})}))]})};var JY=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{as:e,buttonFill:t="filled",children:n,className:i,variant:a="primary",htmlAttributes:o,isDisabled:s=!1,isFloating:u=!1,isFluid:l=!1,isLoading:c=!1,leadingVisual:f,onClick:d,ref:h,size:p="medium",style:g,type:y="button"}=r,b=JY(r,["as","buttonFill","children","className","variant","htmlAttributes","isDisabled","isFloating","isFluid","isLoading","leadingVisual","onClick","ref","size","style","type"]);const _=e??"button",m=!s&&!c,x=Vn(i,"ndl-btn",{"ndl-disabled":s,"ndl-floating":u,"ndl-fluid":l,"ndl-loading":c,[`ndl-${p}`]:p,[`ndl-${t}-button`]:t,[`ndl-${a}`]:a}),S=O=>{if(!m){O.preventDefault(),O.stopPropagation();return}d&&d(O)};return Ce.jsx(_,Object.assign({type:y,onClick:S,disabled:s,"aria-disabled":!m,className:x,style:g,ref:h},b,o,{children:Ce.jsxs("div",{className:"ndl-btn-inner",children:[c&&Ce.jsx("span",{className:"ndl-btn-spinner-wrapper",children:Ce.jsx(h1,{size:p})}),!!f&&Ce.jsx("div",{className:"ndl-btn-leading-element",children:f}),!!n&&Ce.jsx("span",{className:"ndl-btn-content",children:n})]})}))};var eX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,type:n="button",isLoading:i=!1,variant:a="primary",isDisabled:o=!1,size:s="medium",onClick:u,isFloating:l=!1,className:c,style:f,htmlAttributes:d,ref:h}=r,p=eX(r,["children","as","type","isLoading","variant","isDisabled","size","onClick","isFloating","className","style","htmlAttributes","ref"]);return Ce.jsx(B7,Object.assign({as:t,buttonFill:"outlined",variant:a,className:c,isDisabled:o,isFloating:l,isLoading:i,onClick:u,size:s,style:f,type:n,htmlAttributes:d,ref:h},p,{children:e}))};var rX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,type:n="button",isLoading:i=!1,variant:a="primary",isDisabled:o=!1,size:s="medium",onClick:u,className:l,style:c,htmlAttributes:f,ref:d}=r,h=rX(r,["children","as","type","isLoading","variant","isDisabled","size","onClick","className","style","htmlAttributes","ref"]);return Ce.jsx(B7,Object.assign({as:t,buttonFill:"text",variant:a,className:l,isDisabled:o,isLoading:i,onClick:u,size:s,style:c,type:n,htmlAttributes:f,ref:d},h,{children:e}))};var dS,Wk;function iX(){if(Wk)return dS;Wk=1;var r="Expected a function",e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,u=typeof Lf=="object"&&Lf&&Lf.Object===Object&&Lf,l=typeof self=="object"&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return c.Date.now()};function y(S,O,E){var T,P,I,k,L,B,j=0,z=!1,H=!1,q=!0;if(typeof S!="function")throw new TypeError(r);O=x(O)||0,b(E)&&(z=!!E.leading,H="maxWait"in E,I=H?h(x(E.maxWait)||0,O):I,q="trailing"in E?!!E.trailing:q);function W(ce){var pe=T,fe=P;return T=P=void 0,j=ce,k=S.apply(fe,pe),k}function $(ce){return j=ce,L=setTimeout(Z,O),z?W(ce):k}function J(ce){var pe=ce-B,fe=ce-j,se=O-pe;return H?p(se,I-fe):se}function X(ce){var pe=ce-B,fe=ce-j;return B===void 0||pe>=O||pe<0||H&&fe>=I}function Z(){var ce=g();if(X(ce))return ue(ce);L=setTimeout(Z,J(ce))}function ue(ce){return L=void 0,q&&T?W(ce):(T=P=void 0,k)}function re(){L!==void 0&&clearTimeout(L),j=0,T=B=P=L=void 0}function ne(){return L===void 0?k:ue(g())}function le(){var ce=g(),pe=X(ce);if(T=arguments,P=this,B=ce,pe){if(L===void 0)return $(B);if(H)return L=setTimeout(Z,O),W(B)}return L===void 0&&(L=setTimeout(Z,O)),k}return le.cancel=re,le.flush=ne,le}function b(S){var O=typeof S;return!!S&&(O=="object"||O=="function")}function _(S){return!!S&&typeof S=="object"}function m(S){return typeof S=="symbol"||_(S)&&d.call(S)==t}function x(S){if(typeof S=="number")return S;if(m(S))return e;if(b(S)){var O=typeof S.valueOf=="function"?S.valueOf():S;S=b(O)?O+"":O}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var E=a.test(S);return E||o.test(S)?s(S.slice(2),E?2:8):i.test(S)?e:+S}return dS=y,dS}iX();function aX(){const[r,e]=me.useState(null),t=me.useCallback(async n=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(n),e(n),!0}catch(i){return console.warn("Copy failed",i),e(null),!1}},[]);return[r,t]}function Cx(r){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cx(r)}var oX=/^\s+/,sX=/\s+$/;function dr(r,e){if(r=r||"",e=e||{},r instanceof dr)return r;if(!(this instanceof dr))return new dr(r,e);var t=uX(r);this._originalInput=r,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.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=t.ok}dr.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(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,n,i,a,o,s;return t=e.r/255,n=e.g/255,i=e.b/255,t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=F7(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Xk(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Xk(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+i+"%)":"hsva("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Yk(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Yk(this._r,this._g,this._b),t=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+i+"%)":"hsla("+t+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return $k(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return dX(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 this._a==1?"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(Ma(this._r,255)*100)+"%",g:Math.round(Ma(this._g,255)*100)+"%",b:Math.round(Ma(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ma(this._r,255)*100)+"%, "+Math.round(Ma(this._g,255)*100)+"%, "+Math.round(Ma(this._b,255)*100)+"%)":"rgba("+Math.round(Ma(this._r,255)*100)+"%, "+Math.round(Ma(this._g,255)*100)+"%, "+Math.round(Ma(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:SX[$k(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Kk(this._r,this._g,this._b,this._a),n=t,i=this._gradientType?"GradientType = 1, ":"";if(e){var a=dr(e);n="#"+Kk(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,a=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return a?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return dr(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(gX,arguments)},brighten:function(){return this._applyModification(yX,arguments)},darken:function(){return this._applyModification(mX,arguments)},desaturate:function(){return this._applyModification(hX,arguments)},saturate:function(){return this._applyModification(vX,arguments)},greyscale:function(){return this._applyModification(pX,arguments)},spin:function(){return this._applyModification(bX,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(xX,arguments)},complement:function(){return this._applyCombination(_X,arguments)},monochromatic:function(){return this._applyCombination(EX,arguments)},splitcomplement:function(){return this._applyCombination(wX,arguments)},triad:function(){return this._applyCombination(Zk,[3])},tetrad:function(){return this._applyCombination(Zk,[4])}};dr.fromRatio=function(r,e){if(Cx(r)=="object"){var t={};for(var n in r)r.hasOwnProperty(n)&&(n==="a"?t[n]=r[n]:t[n]=fb(r[n]));r=t}return dr(r,e)};function uX(r){var e={r:0,g:0,b:0},t=1,n=null,i=null,a=null,o=!1,s=!1;return typeof r=="string"&&(r=AX(r)),Cx(r)=="object"&&(ev(r.r)&&ev(r.g)&&ev(r.b)?(e=lX(r.r,r.g,r.b),o=!0,s=String(r.r).substr(-1)==="%"?"prgb":"rgb"):ev(r.h)&&ev(r.s)&&ev(r.v)?(n=fb(r.s),i=fb(r.v),e=fX(r.h,n,i),o=!0,s="hsv"):ev(r.h)&&ev(r.s)&&ev(r.l)&&(n=fb(r.s),a=fb(r.l),e=cX(r.h,n,a),o=!0,s="hsl"),r.hasOwnProperty("a")&&(t=r.a)),t=F7(t),{ok:o,format:r.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function lX(r,e,t){return{r:Ma(r,255)*255,g:Ma(e,255)*255,b:Ma(t,255)*255}}function Yk(r,e,t){r=Ma(r,255),e=Ma(e,255),t=Ma(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),a,o,s=(n+i)/2;if(n==i)a=o=0;else{var u=n-i;switch(o=s>.5?u/(2-n-i):u/(n+i),n){case r:a=(e-t)/u+(e1&&(f-=1),f<1/6?l+(c-l)*6*f:f<1/2?c:f<2/3?l+(c-l)*(2/3-f)*6:l}if(e===0)n=i=a=t;else{var s=t<.5?t*(1+e):t+e-t*e,u=2*t-s;n=o(u,s,r+1/3),i=o(u,s,r),a=o(u,s,r-1/3)}return{r:n*255,g:i*255,b:a*255}}function Xk(r,e,t){r=Ma(r,255),e=Ma(e,255),t=Ma(t,255);var n=Math.max(r,e,t),i=Math.min(r,e,t),a,o,s=n,u=n-i;if(o=n===0?0:u/n,n==i)a=0;else{switch(n){case r:a=(e-t)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(dr(n));return a}function EX(r,e){e=e||6;for(var t=dr(r).toHsv(),n=t.h,i=t.s,a=t.v,o=[],s=1/e;e--;)o.push(dr({h:n,s:i,v:a})),a=(a+s)%1;return o}dr.mix=function(r,e,t){t=t===0?0:t||50;var n=dr(r).toRgb(),i=dr(e).toRgb(),a=t/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return dr(o)};dr.readability=function(r,e){var t=dr(r),n=dr(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};dr.isReadable=function(r,e,t){var n=dr.readability(r,e),i,a;switch(a=!1,i=RX(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a};dr.mostReadable=function(r,e,t){var n=null,i=0,a,o,s,u;t=t||{},o=t.includeFallbackColors,s=t.level,u=t.size;for(var l=0;li&&(i=a,n=dr(e[l]));return dr.isReadable(r,n,{level:s,size:u})||!o?n:(t.includeFallbackColors=!1,dr.mostReadable(r,["#fff","#000"],t))};var uM=dr.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"},SX=dr.hexNames=OX(uM);function OX(r){var e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);return e}function F7(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function Ma(r,e){TX(r)&&(r="100%");var t=CX(r);return r=Math.min(e,Math.max(0,parseFloat(r))),t&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function O2(r){return Math.min(1,Math.max(0,r))}function Jc(r){return parseInt(r,16)}function TX(r){return typeof r=="string"&&r.indexOf(".")!=-1&&parseFloat(r)===1}function CX(r){return typeof r=="string"&&r.indexOf("%")!=-1}function Sd(r){return r.length==1?"0"+r:""+r}function fb(r){return r<=1&&(r=r*100+"%"),r}function U7(r){return Math.round(parseFloat(r)*255).toString(16)}function Qk(r){return Jc(r)/255}var md=(function(){var r="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+r+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),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 ev(r){return!!md.CSS_UNIT.exec(r)}function AX(r){r=r.replace(oX,"").replace(sX,"").toLowerCase();var e=!1;if(uM[r])r=uM[r],e=!0;else if(r=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=md.rgb.exec(r))?{r:t[1],g:t[2],b:t[3]}:(t=md.rgba.exec(r))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=md.hsl.exec(r))?{h:t[1],s:t[2],l:t[3]}:(t=md.hsla.exec(r))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=md.hsv.exec(r))?{h:t[1],s:t[2],v:t[3]}:(t=md.hsva.exec(r))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=md.hex8.exec(r))?{r:Jc(t[1]),g:Jc(t[2]),b:Jc(t[3]),a:Qk(t[4]),format:e?"name":"hex8"}:(t=md.hex6.exec(r))?{r:Jc(t[1]),g:Jc(t[2]),b:Jc(t[3]),format:e?"name":"hex"}:(t=md.hex4.exec(r))?{r:Jc(t[1]+""+t[1]),g:Jc(t[2]+""+t[2]),b:Jc(t[3]+""+t[3]),a:Qk(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=md.hex3.exec(r))?{r:Jc(t[1]+""+t[1]),g:Jc(t[2]+""+t[2]),b:Jc(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function RX(r){var e,t;return r=r||{level:"AA",size:"small"},e=(r.level||"AA").toUpperCase(),t=(r.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}const PX=r=>dr.mostReadable(r,[Yu.theme.light.color.neutral.text.default,Yu.theme.light.color.neutral.text.inverse],{includeFallbackColors:!0}).toString(),MX=r=>dr(r).toHsl().l<.5?dr(r).lighten(10).toString():dr(r).darken(10).toString(),DX=r=>dr.mostReadable(r,[Yu.theme.light.color.neutral.text.weakest,Yu.theme.light.color.neutral.text.weaker,Yu.theme.light.color.neutral.text.weak,Yu.theme.light.color.neutral.text.inverse]).toString();var kX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{const i=Vn("ndl-hexagon-end",{"ndl-left":r==="left","ndl-right":r==="right"});return Ce.jsxs("div",Object.assign({className:i},t,{children:[Ce.jsx("svg",{"aria-hidden":!0,className:"ndl-hexagon-end-inner",fill:"none",height:n,preserveAspectRatio:"none",viewBox:"0 0 9 24",width:"9",xmlns:"http://www.w3.org/2000/svg",children:Ce.jsx("path",{style:{fill:e},fillRule:"evenodd",clipRule:"evenodd",d:"M5.73024 1.03676C6.08165 0.397331 6.75338 0 7.48301 0H9V24H7.483C6.75338 24 6.08165 23.6027 5.73024 22.9632L0.315027 13.1094C-0.105009 12.4376 -0.105009 11.5624 0.315026 10.8906L5.73024 1.03676Z"})}),Ce.jsx("svg",{"aria-hidden":!0,className:"ndl-hexagon-end-active",fill:"none",height:n+6,preserveAspectRatio:"none",viewBox:"0 0 13 30",width:"13",xmlns:"http://www.w3.org/2000/svg",children:Ce.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.075 2C9.12474 2 8.24318 2.54521 7.74867 3.43873L2.21419 13.4387C1.68353 14.3976 1.68353 15.6024 2.21419 16.5613L7.74867 26.5613C8.24318 27.4548 9.12474 28 10.075 28H13V30H10.075C8.49126 30 7.022 29.0913 6.1978 27.6021L0.663324 17.6021C-0.221109 16.0041 -0.221108 13.9959 0.663325 12.3979L6.1978 2.39789C7.022 0.90869 8.49126 0 10.075 0H13V2H10.075Z"})})]}))},eI=({direction:r="left",color:e,height:t=24,htmlAttributes:n})=>{const i=Vn("ndl-square-end",{"ndl-left":r==="left","ndl-right":r==="right"});return Ce.jsxs("div",Object.assign({className:i},n,{children:[Ce.jsx("div",{className:"ndl-square-end-inner",style:{backgroundColor:e}}),Ce.jsx("svg",{className:"ndl-square-end-active",width:"7",height:t+6,preserveAspectRatio:"none",viewBox:"0 0 7 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ce.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 3.8774 2 C 3.2697 2 2.7917 2.248 2.3967 2.6605 C 1.928 3.1498 1.7993 3.8555 1.7993 4.5331 V 13.8775 V 25.4669 C 1.7993 26.1445 1.928 26.8502 2.3967 27.3395 C 2.7917 27.752 3.2697 28 3.8774 28 H 7 V 30 H 3.8774 C 2.6211 30 1.4369 29.4282 0.5895 28.4485 C 0.1462 27.936 0.0002 27.2467 0.0002 26.5691 L -0.0002 13.8775 L 0.0002 3.4309 C 0.0002 2.7533 0.1462 2.064 0.5895 1.5515 C 1.4368 0.5718 2.6211 0 3.8774 0 H 7 V 2 H 3.8774 Z"})})]}))},IX=({height:r=24})=>Ce.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:r+6,preserveAspectRatio:"none",viewBox:"0 0 37 30",fill:"none",className:"ndl-relationship-label-lines",children:[Ce.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 37 2 H 0 V 0 H 37 V 2 Z"}),Ce.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M 37 30 H 0 V 28 H 37 V 30 Z"})]}),hS=200,Ax=r=>{var{type:e="node",color:t,isDisabled:n=!1,isSelected:i=!1,as:a,onClick:o,className:s,style:u,children:l,htmlAttributes:c,isFluid:f=!1,size:d="large",ref:h}=r,p=kX(r,["type","color","isDisabled","isSelected","as","onClick","className","style","children","htmlAttributes","isFluid","size","ref"]);const[g,y]=me.useState(!1),b=k=>{y(!0),c&&c.onMouseEnter!==void 0&&c.onMouseEnter(k)},_=k=>{var L;y(!1),(L=c==null?void 0:c.onMouseLeave)===null||L===void 0||L.call(c,k)},m=a??"button",x=m==="button",S=k=>{if(n){k.preventDefault(),k.stopPropagation();return}o&&o(k)};let O=me.useMemo(()=>{if(t===void 0)switch(e){case"node":return Yu.graph[1];case"relationship":case"relationshipLeft":case"relationshipRight":return Yu.theme.light.color.neutral.bg.strong;default:return Yu.theme.light.color.neutral.bg.strongest}return t},[t,e]);const E=me.useMemo(()=>MX(O||Yu.palette.lemon[40]),[O]),T=me.useMemo(()=>PX(O||Yu.palette.lemon[40]),[O]),P=me.useMemo(()=>DX(O||Yu.palette.lemon[40]),[O]);g&&!n&&(O=E);const I=Vn("ndl-graph-label",s,{"ndl-disabled":n,"ndl-interactable":x,"ndl-selected":i,"ndl-small":d==="small"});if(e==="node"){const k=Vn("ndl-node-label",I);return Ce.jsx(m,Object.assign({className:k,ref:h,style:Object.assign({backgroundColor:O,color:n?P:T,maxWidth:f?"100%":hS},u)},x&&{disabled:n,onClick:S,onMouseEnter:b,onMouseLeave:_,type:"button"},c,{children:Ce.jsx("div",{className:"ndl-node-label-content",children:l})}))}else if(e==="relationship"||e==="relationshipLeft"||e==="relationshipRight"){const k=Vn("ndl-relationship-label",I),L=d==="small"?20:24;return Ce.jsxs(m,Object.assign({style:Object.assign(Object.assign({maxWidth:f?"100%":hS},u),{color:n?P:T}),className:k},x&&{disabled:n,onClick:S,onMouseEnter:b,onMouseLeave:_,type:"button"},{ref:h},p,c,{children:[e==="relationshipLeft"||e==="relationship"?Ce.jsx(Jk,{direction:"left",color:O,height:L}):Ce.jsx(eI,{direction:"left",color:O,height:L}),Ce.jsxs("div",{className:"ndl-relationship-label-container",style:{backgroundColor:O},children:[Ce.jsx("div",{className:"ndl-relationship-label-content",children:l}),Ce.jsx(IX,{height:L})]}),e==="relationshipRight"||e==="relationship"?Ce.jsx(Jk,{direction:"right",color:O,height:L}):Ce.jsx(eI,{direction:"right",color:O,height:L})]}))}else{const k=Vn("ndl-property-key-label",I);return Ce.jsx(m,Object.assign({},x&&{type:"button"},{style:Object.assign({backgroundColor:O,color:n?P:T,maxWidth:f?"100%":hS},u),className:k,onClick:S,onMouseEnter:b,onMouseLeave:_,ref:h},c,{children:Ce.jsx("div",{className:"ndl-property-key-label-content",children:l})}))}};var Bo=function(){return Bo=Object.assign||function(r){for(var e,t=1,n=arguments.length;t"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof o>"u"?void 0:Number(o)}},zX=function(r){return Array.isArray(r)?r:[r,r]},qX=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],aI="__resizable_base__",GX=(function(r){jX(e,r);function e(t){var n,i,a,o,s=r.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var u=s.parentNode;if(!u)return null;var l=s.window.document.createElement("div");return l.style.width="100%",l.style.height="100%",l.style.position="absolute",l.style.transform="scale(0, 0)",l.style.left="0",l.style.flex="0 0 100%",l.classList?l.classList.add(aI):l.className+=aI,u.appendChild(l),l},s.removeBase=function(u){var l=s.parentNode;l&&l.removeChild(u)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(o=(a=s.propsSize)===null||a===void 0?void 0:a.height)!==null&&o!==void 0?o:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||BX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,a=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),t=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=o}return{width:t,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,n=this.props.size,i=function(s){var u;if(typeof t.state[s]>"u"||t.state[s]==="auto")return"auto";if(t.propsSize&&t.propsSize[s]&&(!((u=t.propsSize[s])===null||u===void 0)&&u.toString().endsWith("%"))){if(t.state[s].toString().endsWith("%"))return t.state[s].toString();var l=t.getParentSize(),c=Number(t.state[s].toString().replace("px","")),f=c/l[s]*100;return"".concat(f,"%")}return vS(t.state[s])},a=n&&typeof n.width<"u"&&!this.state.isResizing?vS(n.width):i("width"),o=n&&typeof n.height<"u"&&!this.state.isResizing?vS(n.height):i("height");return{width:a,height:o}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var a={width:t.offsetWidth,height:t.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(t),a},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:t.flexBasis!=="auto"?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===t&&(typeof i>"u"||i==="auto")?"auto":t},e.prototype.calculateNewMaxFromBoundary=function(t,n){var i=this.props.boundsByDirection,a=this.state.direction,o=i&&Xy("left",a),s=i&&Xy("top",a),u,l;if(this.props.bounds==="parent"){var c=this.parentNode;c&&(u=o?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),l=s?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(u=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,l=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(u=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),l=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return u&&Number.isFinite(u)&&(t=t&&t"u"?10:a.width,f=typeof i.width>"u"||i.width<0?t:i.width,d=typeof a.height>"u"?10:a.height,h=typeof i.height>"u"||i.height<0?n:i.height,p=u||0,g=l||0;if(s){var y=(d-p)*this.ratio+g,b=(h-p)*this.ratio+g,_=(c-g)/this.ratio+p,m=(f-g)/this.ratio+p,x=Math.max(c,y),S=Math.min(f,b),O=Math.max(d,_),E=Math.min(h,m);t=sw(t,x,S),n=sw(n,O,E)}else t=sw(t,c,f),n=sw(n,d,h);return{newWidth:t,newHeight:n}},e.prototype.setBoundingClientRect=function(){var t=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*t,this.parentTop=i.top*t}}if(this.props.bounds&&typeof this.props.bounds!="string"){var a=this.props.bounds.getBoundingClientRect();this.targetLeft=a.left*t,this.targetTop=a.top*t}if(this.resizable){var o=this.resizable.getBoundingClientRect(),s=o.left,u=o.top,l=o.right,c=o.bottom;this.resizableLeft=s*t,this.resizableRight=l*t,this.resizableTop=u*t,this.resizableBottom=c*t}},e.prototype.onResizeStart=function(t,n){if(!(!this.resizable||!this.window)){var i=0,a=0;if(t.nativeEvent&&FX(t.nativeEvent)?(i=t.nativeEvent.clientX,a=t.nativeEvent.clientY):t.nativeEvent&&uw(t.nativeEvent)&&(i=t.nativeEvent.touches[0].clientX,a=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(t,n,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,u=this.window.getComputedStyle(this.resizable);if(u.flexBasis!=="auto"){var l=this.parentNode;if(l){var c=this.window.getComputedStyle(l).flexDirection;this.flexDir=c.startsWith("row")?"row":"column",s=u.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var f={original:{x:i,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gh(gh({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(f)}},e.prototype.onMouseMove=function(t){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&uw(t))try{t.preventDefault(),t.stopPropagation()}catch{}var i=this.props,a=i.maxWidth,o=i.maxHeight,s=i.minWidth,u=i.minHeight,l=uw(t)?t.touches[0].clientX:t.clientX,c=uw(t)?t.touches[0].clientY:t.clientY,f=this.state,d=f.direction,h=f.original,p=f.width,g=f.height,y=this.getParentSize(),b=UX(y,this.window.innerWidth,this.window.innerHeight,a,o,s,u);a=b.maxWidth,o=b.maxHeight,s=b.minWidth,u=b.minHeight;var _=this.calculateNewSizeFromDirection(l,c),m=_.newHeight,x=_.newWidth,S=this.calculateNewMaxFromBoundary(a,o);this.props.snap&&this.props.snap.x&&(x=iI(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=iI(m,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(x,m,{width:S.maxWidth,height:S.maxHeight},{width:s,height:u});if(x=O.newWidth,m=O.newHeight,this.props.grid){var E=nI(x,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=nI(m,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),P=this.props.snapGap||0,I=P===0||Math.abs(E-x)<=P?E:x,k=P===0||Math.abs(T-m)<=P?T:m;x=I,m=k}var L={width:x-h.width,height:m-h.height};if(this.delta=L,p&&typeof p=="string"){if(p.endsWith("%")){var B=x/y.width*100;x="".concat(B,"%")}else if(p.endsWith("vw")){var j=x/this.window.innerWidth*100;x="".concat(j,"vw")}else if(p.endsWith("vh")){var z=x/this.window.innerHeight*100;x="".concat(z,"vh")}}if(g&&typeof g=="string"){if(g.endsWith("%")){var B=m/y.height*100;m="".concat(B,"%")}else if(g.endsWith("vw")){var j=m/this.window.innerWidth*100;m="".concat(j,"vw")}else if(g.endsWith("vh")){var z=m/this.window.innerHeight*100;m="".concat(z,"vh")}}var H={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(m,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var q=this.state.width!==H.width,W=this.state.height!==H.height,$=this.state.flexBasis!==H.flexBasis,J=q||W||$;J&&y2.flushSync(function(){n.setState(H)}),this.props.onResize&&J&&this.props.onResize(t,d,this.resizable,L)}},e.prototype.onMouseUp=function(t){var n,i,a=this.state,o=a.isResizing,s=a.direction;a.original,!(!o||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(t,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gh(gh({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(t){var n,i;this.setState({width:(n=t.width)!==null&&n!==void 0?n:"auto",height:(i=t.height)!==null&&i!==void 0?i:"auto"})},e.prototype.renderResizer=function(){var t=this,n=this.props,i=n.enable,a=n.handleStyles,o=n.handleClasses,s=n.handleWrapperStyle,u=n.handleWrapperClass,l=n.handleComponent;if(!i)return null;var c=Object.keys(i).map(function(f){return i[f]!==!1?Ce.jsx(LX,{direction:f,onResizeStart:t.onResizeStart,replaceStyles:a&&a[f],className:o&&o[f],children:l&&l[f]?l[f]:null},f):null});return Ce.jsx("div",{className:u,style:s,children:c})},e.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(o,s){return qX.indexOf(s)!==-1||(o[s]=t.props[s]),o},{}),i=gh(gh(gh({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return Ce.jsxs(a,gh({style:i,className:this.props.className},n,{ref:function(o){o&&(t.resizable=o)},children:[this.state.isResizing&&Ce.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e})(me.PureComponent),VX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,as:t,isLoading:n=!1,isDisabled:i=!1,size:a="medium",isFloating:o=!1,isActive:s,variant:u="neutral",description:l,tooltipProps:c,className:f,style:d,htmlAttributes:h,onClick:p,ref:g}=r,y=VX(r,["children","as","isLoading","isDisabled","size","isFloating","isActive","variant","description","tooltipProps","className","style","htmlAttributes","onClick","ref"]);return Ce.jsx(I7,Object.assign({as:t,iconButtonVariant:"default",isDisabled:i,size:a,isLoading:n,isActive:s,isFloating:o,description:l,tooltipProps:c,className:f,style:d,variant:u,htmlAttributes:h,onClick:p,ref:g},y,{children:e}))};var HX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{description:e,actionFeedbackText:t,icon:n,children:i,onClick:a,htmlAttributes:o,tooltipProps:s,type:u="clean-icon-button"}=r,l=HX(r,["description","actionFeedbackText","icon","children","onClick","htmlAttributes","tooltipProps","type"]);const[c,f]=ao.useState(null),[d,h]=ao.useState(!1),p=()=>{c!==null&&clearTimeout(c);const _=window.setTimeout(()=>{f(null)},2e3);f(_)},g=()=>{h(!1)},y=()=>{h(!0)},b=c===null?e:t;if(u==="clean-icon-button")return Ce.jsx(S2,Object.assign({},l.cleanIconButtonProps,{description:b,tooltipProps:{root:Object.assign(Object.assign({},s),{isOpen:d||c!==null}),trigger:{htmlAttributes:{onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g}}},onClick:_=>{a&&a(_),p()},className:l.className,htmlAttributes:o,children:n}));if(u==="icon-button")return Ce.jsx(T2,Object.assign({},l.iconButtonProps,{description:b,tooltipProps:{root:Object.assign(Object.assign({},s),{isOpen:d||c!==null}),trigger:{htmlAttributes:{onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g}}},onClick:_=>{a&&a(_),p()},className:l.className,htmlAttributes:o,children:n}));if(u==="outlined-button")return Ce.jsxs(Bf,Object.assign({type:"simple",isOpen:d||c!==null},s,{onOpenChange:_=>{var m;_?y():g(),(m=s==null?void 0:s.onOpenChange)===null||m===void 0||m.call(s,_)},children:[Ce.jsx(Bf.Trigger,{hasButtonWrapper:!0,htmlAttributes:{"aria-label":b,onBlur:g,onFocus:y,onMouseEnter:y,onMouseLeave:g},children:Ce.jsx(tX,Object.assign({variant:"neutral"},l.buttonProps,{onClick:_=>{a&&a(_),p()},leadingVisual:n,className:l.className,htmlAttributes:o,children:i}))}),Ce.jsx(Bf.Content,{children:b})]}))},z7=({textToCopy:r,isDisabled:e,size:t,tooltipProps:n,htmlAttributes:i,type:a})=>{const[,o]=aX(),l=a==="outlined-button"?{outlinedButtonProps:{isDisabled:e,size:t},type:"outlined-button"}:a==="icon-button"?{iconButtonProps:{description:"Copy to clipboard",isDisabled:e,size:t},type:"icon-button"}:{cleanIconButtonProps:{description:"Copy to clipboard",isDisabled:e,size:t},type:"clean-icon-button"};return Ce.jsx(WX,Object.assign({onClick:()=>o(r),description:"Copy to clipboard",actionFeedbackText:"Copied"},l,{tooltipProps:n,className:"n-gap-token-8",icon:Ce.jsx(oH,{className:"ndl-icon-svg"}),htmlAttributes:Object.assign({"aria-live":"polite"},i),children:a==="outlined-button"&&"Copy"}))};var YX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iCe.jsx(Ce.Fragment,{children:r});q7.displayName="CollapsibleButtonWrapper";const XX=r=>{var{children:e,as:t,isFloating:n=!1,orientation:i="horizontal",size:a="medium",className:o,style:s,htmlAttributes:u,ref:l}=r,c=YX(r,["children","as","isFloating","orientation","size","className","style","htmlAttributes","ref"]);const[f,d]=ao.useState(!0),h=Vn("ndl-icon-btn-array",o,{"ndl-array-floating":n,"ndl-col":i==="vertical","ndl-row":i==="horizontal",[`ndl-${a}`]:a}),p=t||"div",g=ao.Children.toArray(e),y=g.filter(x=>!ao.isValidElement(x)||x.type.displayName!=="CollapsibleButtonWrapper"),b=g.find(x=>ao.isValidElement(x)&&x.type.displayName==="CollapsibleButtonWrapper"),_=b?b.props.children:null,m=()=>i==="horizontal"?f?Ce.jsx(W9,{}):Ce.jsx(zV,{}):f?Ce.jsx(H9,{}):Ce.jsx(WV,{});return Ce.jsxs(p,Object.assign({role:"group",className:h,ref:l,style:s},c,u,{children:[y,_&&Ce.jsxs(Ce.Fragment,{children:[!f&&_,Ce.jsx(S2,{onClick:()=>{d(x=>!x)},size:a,description:f?"Show more":"Show less",tooltipProps:{root:{shouldCloseOnReferenceClick:!0}},htmlAttributes:{"aria-expanded":!f},children:m()})]})]}))},$X=Object.assign(XX,{CollapsibleButtonWrapper:q7});function G7(){if(typeof window>"u")return"linux";const r=window.navigator.userAgent.toLowerCase();return r.includes("mac")?"mac":r.includes("win")?"windows":"linux"}function KX(r=G7()){return{alt:r==="mac"?"⌥":"alt",capslock:"⇪",ctrl:r==="mac"?"⌃":"ctrl",delete:r==="mac"?"⌫":"delete",down:"↓",end:"end",enter:"↵",escape:"⎋",fn:"Fn",home:"home",left:"←",meta:r==="mac"?"⌘":r==="windows"?"⊞":"meta",pagedown:"⇟",pageup:"⇞",right:"→",shift:"⇧",space:"␣",tab:"⇥",up:"↑"}}function ZX(r=G7()){return{alt:"Alt",capslock:"Caps Lock",ctrl:"Control",delete:"Delete",down:"Down",end:"End",enter:"Enter",escape:"Escape",fn:"Fn",home:"Home",left:"Left",meta:r==="mac"?"Command":r==="windows"?"Windows":"Meta",pagedown:"Page Down",pageup:"Page Up",right:"Right",shift:"Shift",space:"Space",tab:"Tab",up:"Up"}}var QX=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{modifierKeys:e,keys:t,os:n,as:i,className:a,style:o,htmlAttributes:s,ref:u}=r,l=QX(r,["modifierKeys","keys","os","as","className","style","htmlAttributes","ref"]);const c=i??"span",f=me.useMemo(()=>{if(e===void 0)return null;const p=KX(n),g=ZX(n);return e==null?void 0:e.map(y=>Ce.jsx("abbr",{className:"ndl-kbd-key",title:g[y],children:p[y]},y))},[e,n]),d=me.useMemo(()=>t===void 0?null:t==null?void 0:t.map((p,g)=>g===0?Ce.jsx("span",{className:"ndl-kbd-key",children:p},p==null?void 0:p.toString()):Ce.jsxs(Ce.Fragment,{children:[Ce.jsx("span",{className:"ndl-kbd-then",children:"Then"}),Ce.jsx("span",{className:"ndl-kbd-key",children:p},p==null?void 0:p.toString())]})),[t]),h=Vn("ndl-kbd",a);return Ce.jsxs(c,Object.assign({className:h,style:o,ref:u},l,s,{children:[f,d]}))};var e$=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i{var{children:e,size:t="medium",isDisabled:n=!1,isLoading:i=!1,isOpen:a=!1,className:o,description:s,tooltipProps:u,onClick:l,style:c,htmlAttributes:f,ref:d}=r,h=e$(r,["children","size","isDisabled","isLoading","isOpen","className","description","tooltipProps","onClick","style","htmlAttributes","ref"]);const p=Vn("ndl-select-icon-btn",o,{"ndl-active":a,"ndl-disabled":n,"ndl-large":t==="large","ndl-loading":i,"ndl-medium":t==="medium","ndl-small":t==="small"}),g=!n&&!i;return Ce.jsxs(Bf,Object.assign({hoverDelay:{close:0,open:500}},u==null?void 0:u.root,{type:"simple",isDisabled:s===null||n||a===!0,children:[Ce.jsx(Bf.Trigger,Object.assign({},u==null?void 0:u.trigger,{hasButtonWrapper:!0,children:Ce.jsxs("button",Object.assign({type:"button",ref:d,className:p,style:c,disabled:!g,"aria-disabled":!g,"aria-label":s??void 0,"aria-expanded":a,onClick:l},h,f,{children:[Ce.jsx("div",{className:"ndl-select-icon-btn-inner",children:i?Ce.jsx(h1,{size:"small"}):Ce.jsx("div",{className:"ndl-icon",children:e})}),Ce.jsx(H9,{className:Vn("ndl-select-icon-btn-icon",{"ndl-select-icon-btn-icon-open":a===!0})})]}))})),Ce.jsx(Bf.Content,Object.assign({},u==null?void 0:u.content,{children:s}))]}))};function lM(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function H7(r,e,t){return(e=W7(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function i$(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function a$(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=a.call(t)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function o$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s$(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(r,e){return t$(r)||a$(r,e)||q5(r,e)||o$()}function Rx(r){return r$(r)||i$(r)||q5(r)||s$()}function u$(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function W7(r){var e=u$(r,"string");return typeof e=="symbol"?e:e+""}function ls(r){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(r)}function q5(r,e){if(r){if(typeof r=="string")return lM(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lM(r,e):void 0}}var ss=typeof window>"u"?null:window,oI=ss?ss.navigator:null;ss&&ss.document;var l$=ls(""),Y7=ls({}),c$=ls(function(){}),f$=typeof HTMLElement>"u"?"undefined":ls(HTMLElement),V1=function(e){return e&&e.instanceString&&Ya(e.instanceString)?e.instanceString():null},Ar=function(e){return e!=null&&ls(e)==l$},Ya=function(e){return e!=null&&ls(e)===c$},ra=function(e){return!rf(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ai=function(e){return e!=null&&ls(e)===Y7&&!ra(e)&&e.constructor===Object},d$=function(e){return e!=null&&ls(e)===Y7},Ht=function(e){return e!=null&&ls(e)===ls(1)&&!isNaN(e)},h$=function(e){return Ht(e)&&Math.floor(e)===e},Px=function(e){if(f$!=="undefined")return e!=null&&e instanceof HTMLElement},rf=function(e){return H1(e)||X7(e)},H1=function(e){return V1(e)==="collection"&&e._private.single},X7=function(e){return V1(e)==="collection"&&!e._private.single},G5=function(e){return V1(e)==="core"},$7=function(e){return V1(e)==="stylesheet"},v$=function(e){return V1(e)==="event"},Rp=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},p$=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},g$=function(e){return ai(e)&&Ht(e.x1)&&Ht(e.x2)&&Ht(e.y1)&&Ht(e.y2)},y$=function(e){return d$(e)&&Ya(e.then)},m$=function(){return oI&&oI.userAgent.match(/msie|trident|edge/i)},jm=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;ot?1:0},O$=function(e,t){return-1*Z7(e,t)},kr=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(y-=1),y<1/6?p+(g-p)*6*y:y<1/2?g:y<2/3?p+(g-p)*(2/3-y)*6:p}var f=new RegExp("^"+w$+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)s=u=l=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,h=2*a-d;s=Math.round(255*c(h,d,n+1/3)),u=Math.round(255*c(h,d,n)),l=Math.round(255*c(h,d,n-1/3))}t=[s,u,l,o]}return t},A$=function(e){var t,n=new RegExp("^"+b$+"$").exec(e);if(n){t=[];for(var i=[],a=1;a<=3;a++){var o=n[a];if(o[o.length-1]==="%"&&(i[a]=!0),o=parseFloat(o),i[a]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var s=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(s&&!u)return;var l=n[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;t.push(l)}}return t},R$=function(e){return P$[e.toLowerCase()]},Q7=function(e){return(ra(e)?e:null)||R$(e)||T$(e)||A$(e)||C$(e)},P$={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},J7=function(e){for(var t=e.map,n=e.keys,i=n.length,a=0;a=u||j<0||_&&z>=d}function T(){var B=e();if(E(B))return P(B);p=setTimeout(T,O(B))}function P(B){return p=void 0,m&&c?x(B):(c=f=void 0,h)}function I(){p!==void 0&&clearTimeout(p),y=0,c=g=f=p=void 0}function k(){return p===void 0?h:P(e())}function L(){var B=e(),j=E(B);if(c=arguments,f=this,g=B,j){if(p===void 0)return S(g);if(_)return clearTimeout(p),p=setTimeout(T,u),x(g)}return p===void 0&&(p=setTimeout(T,u)),h}return L.cancel=I,L.flush=k,L}return AS=o,AS}var U$=F$(),$1=W1(U$),RS=ss?ss.performance:null,rF=RS&&RS.now?function(){return RS.now()}:function(){return Date.now()},z$=(function(){if(ss){if(ss.requestAnimationFrame)return function(r){ss.requestAnimationFrame(r)};if(ss.mozRequestAnimationFrame)return function(r){ss.mozRequestAnimationFrame(r)};if(ss.webkitRequestAnimationFrame)return function(r){ss.webkitRequestAnimationFrame(r)};if(ss.msRequestAnimationFrame)return function(r){ss.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(rF())},1e3/60)}})(),Mx=function(e){return z$(e)},vv=rF,Ig=9261,nF=65599,lm=5381,iF=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ig,n=t,i;i=e.next(),!i.done;)n=n*nF+i.value|0;return n},g1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ig;return t*nF+e|0},y1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lm;return(t<<5)+t+e|0},q$=function(e,t){return e*2097152+t},ep=function(e){return e[0]*2097152+e[1]},fw=function(e,t){return[g1(e[0],t[0]),y1(e[1],t[1])]},xI=function(e,t){var n={value:0,done:!1},i=0,a=e.length,o={next:function(){return i=0;i--)e[i]===t&&e.splice(i,1)},X5=function(e){e.splice(0,e.length)},Q$=function(e,t){for(var n=0;n"u"?"undefined":ls(Set))!==eK?Set:tK,R2=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!G5(e)){Ia("An element must have a core reference and parameters set");return}var i=t.group;if(i==null&&(t.data&&t.data.source!=null&&t.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Ia("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=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:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?i==="edges":!!t.pannable,active:!1,classes:new $m,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(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),t.renderedPosition){var o=t.renderedPosition,s=e.pan(),u=e.zoom();a.position={x:(o.x-s.x)/u,y:(o.y-s.y)/u}}var l=[];ra(t.classes)?l=t.classes:Ar(t.classes)&&(l=t.classes.split(/\s+/));for(var c=0,f=l.length;c_?1:0},c=function(b,_,m,x,S){var O;if(m==null&&(m=0),S==null&&(S=n),m<0)throw new Error("lo must be non-negative");for(x==null&&(x=b.length);mI;0<=I?P++:P--)T.push(P);return T}).apply(this).reverse(),E=[],x=0,S=O.length;xk;0<=k?++T:--T)L.push(o(b,m));return L},g=function(b,_,m,x){var S,O,E;for(x==null&&(x=n),S=b[m];m>_;){if(E=m-1>>1,O=b[E],x(S,O)<0){b[m]=O,m=E;continue}break}return b[m]=S},y=function(b,_,m){var x,S,O,E,T;for(m==null&&(m=n),S=b.length,T=_,O=b[_],x=2*_+1;x0;){var O=_.pop(),E=y(O),T=O.id();if(d[T]=E,E!==1/0)for(var P=O.neighborhood().intersect(p),I=0;I0)for(W.unshift(q);f[J];){var X=f[J];W.unshift(X.edge),W.unshift(X.node),$=X.node,J=$.id()}return s.spawn(W)}}}},uK={kruskal:function(e){e=e||function(m){return 1};for(var t=this.byGroup(),n=t.nodes,i=t.edges,a=n.length,o=new Array(a),s=n,u=function(x){for(var S=0;S0;){if(S(),E++,x===c){for(var T=[],P=a,I=c,k=b[I];T.unshift(P),k!=null&&T.unshift(k),P=y[I],P!=null;)I=P.id(),k=b[I];return{found:!0,distance:f[x],path:this.spawn(T),steps:E}}h[x]=!0;for(var L=m._private.edges,B=0;Bk&&(p[I]=k,_[I]=P,m[I]=S),!a){var L=P*c+T;!a&&p[L]>k&&(p[L]=k,_[L]=T,m[L]=S)}}}for(var B=0;B1&&arguments[1]!==void 0?arguments[1]:o,ie=m(Y),we=[],Ee=ie;;){if(Ee==null)return t.spawn();var Me=_(Ee),Ie=Me.edge,Ye=Me.pred;if(we.unshift(Ee[0]),Ee.same(Q)&&we.length>0)break;Ie!=null&&we.unshift(Ie),Ee=Ye}return u.spawn(we)},O=0;O=0;c--){var f=l[c],d=f[1],h=f[2];(t[d]===s&&t[h]===u||t[d]===u&&t[h]===s)&&l.splice(c,1)}for(var p=0;pi;){var a=Math.floor(Math.random()*t.length);t=gK(a,e,t),n--}return t},yK={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,i=t.edges;i.unmergeBy(function(W){return W.isLoop()});var a=n.length,o=i.length,s=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/pK);if(a<2){Ia("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],c=0;c1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,o=t;o1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(t,n):(n0&&e.splice(0,t));for(var s=0,u=e.length-1;u>=0;u--){var l=e[u];o?isFinite(l)||(e[u]=-1/0,s++):e.splice(u,1)}a&&e.sort(function(d,h){return d-h});var c=e.length,f=Math.floor(c/2);return c%2!==0?e[f+1+s]:(e[f-1+s]+e[f+s])/2},EK=function(e){return Math.PI*e/180},dw=function(e,t){return Math.atan2(t,e)-Math.PI/2},$5=Math.log2||function(r){return Math.log(r)/Math.log(2)},K5=function(e){return e>0?1:e<0?-1:0},Wg=function(e,t){return Math.sqrt(Cg(e,t))},Cg=function(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i},SK=function(e){for(var t=e.length,n=0,i=0;i=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(e.w!=null&&e.h!=null&&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}}},TK=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},CK=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},AK=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},fF=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},$w=function(e){var t=arguments.length>1&&arguments[1]!==void 0?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},Kw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,o;if(t.length===1)n=i=a=o=t[0];else if(t.length===2)n=a=t[0],o=i=t[1];else if(t.length===4){var s=Uo(t,4);n=s[0],i=s[1],a=s[2],o=s[3]}return e.x1-=o,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},AI=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},Z5=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},pp=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},RI=function(e,t){return pp(e,t.x,t.y)},dF=function(e,t){return pp(e,t.x1,t.y1)&&pp(e,t.x2,t.y2)},RK=(DS=Math.hypot)!==null&&DS!==void 0?DS:function(r,e){return Math.sqrt(r*r+e*e)};function PK(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(T,P){return{x:T.x+P.x,y:T.y+P.y}},n=function(T,P){return{x:T.x-P.x,y:T.y-P.y}},i=function(T,P){return{x:T.x*P,y:T.y*P}},a=function(T,P){return T.x*P.y-T.y*P.x},o=function(T){var P=RK(T.x,T.y);return P===0?{x:0,y:0}:{x:T.x/P,y:T.y/P}},s=function(T){for(var P=0,I=0;I7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?Mp(a,o):u,c=a/2,f=o/2;l=Math.min(l,c,f);var d=l!==c,h=l!==f,p;if(d){var g=n-c+l-s,y=i-f-s,b=n+c-l+s,_=y;if(p=gp(e,t,n,i,g,y,b,_,!1),p.length>0)return p}if(h){var m=n+c+s,x=i-f+l-s,S=m,O=i+f-l+s;if(p=gp(e,t,n,i,m,x,S,O,!1),p.length>0)return p}if(d){var E=n-c+l-s,T=i+f+s,P=n+c-l+s,I=T;if(p=gp(e,t,n,i,E,T,P,I,!1),p.length>0)return p}if(h){var k=n-c-s,L=i-f+l-s,B=k,j=i+f-l+s;if(p=gp(e,t,n,i,k,L,B,j,!1),p.length>0)return p}var z;{var H=n-c+l,q=i-f+l;if(z=db(e,t,n,i,H,q,l+s),z.length>0&&z[0]<=H&&z[1]<=q)return[z[0],z[1]]}{var W=n+c-l,$=i-f+l;if(z=db(e,t,n,i,W,$,l+s),z.length>0&&z[0]>=W&&z[1]<=$)return[z[0],z[1]]}{var J=n+c-l,X=i+f-l;if(z=db(e,t,n,i,J,X,l+s),z.length>0&&z[0]>=J&&z[1]>=X)return[z[0],z[1]]}{var Z=n-c+l,ue=i+f-l;if(z=db(e,t,n,i,Z,ue,l+s),z.length>0&&z[0]<=Z&&z[1]>=ue)return[z[0],z[1]]}return[]},DK=function(e,t,n,i,a,o,s){var u=s,l=Math.min(n,a),c=Math.max(n,a),f=Math.min(i,o),d=Math.max(i,o);return l-u<=e&&e<=c+u&&f-u<=t&&t<=d+u},kK=function(e,t,n,i,a,o,s,u,l){var c={x1:Math.min(n,s,a)-l,x2:Math.max(n,s,a)+l,y1:Math.min(i,u,o)-l,y2:Math.max(i,u,o)+l};return!(ec.x2||tc.y2)},IK=function(e,t,n,i){n-=i;var a=t*t-4*e*n;if(a<0)return[];var o=Math.sqrt(a),s=2*e,u=(-t+o)/s,l=(-t-o)/s;return[u,l]},NK=function(e,t,n,i,a){var o=1e-5;e===0&&(e=o),t/=e,n/=e,i/=e;var s,u,l,c,f,d,h,p;if(u=(3*n-t*t)/9,l=-(27*i)+t*(9*n-2*(t*t)),l/=54,s=u*u*u+l*l,a[1]=0,h=t/3,s>0){f=l+Math.sqrt(s),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=l-Math.sqrt(s),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-h+f+d,h+=(f+d)/2,a[4]=a[2]=-h,h=Math.sqrt(3)*(-d+f)/2,a[3]=h,a[5]=-h;return}if(a[5]=a[3]=0,s===0){p=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),a[0]=-h+2*p,a[4]=a[2]=-(p+h);return}u=-u,c=u*u*u,c=Math.acos(l/Math.sqrt(c)),p=2*Math.sqrt(u),a[0]=-h+p*Math.cos(c/3),a[2]=-h+p*Math.cos((c+2*Math.PI)/3),a[4]=-h+p*Math.cos((c+4*Math.PI)/3)},LK=function(e,t,n,i,a,o,s,u){var l=1*n*n-4*n*a+2*n*s+4*a*a-4*a*s+s*s+i*i-4*i*o+2*i*u+4*o*o-4*o*u+u*u,c=9*n*a-3*n*n-3*n*s-6*a*a+3*a*s+9*i*o-3*i*i-3*i*u-6*o*o+3*o*u,f=3*n*n-6*n*a+n*s-n*e+2*a*a+2*a*e-s*e+3*i*i-6*i*o+i*u-i*t+2*o*o+2*o*t-u*t,d=1*n*a-n*n+n*e-a*e+i*o-i*i+i*t-o*t,h=[];NK(l,c,f,d,h);for(var p=1e-7,g=[],y=0;y<6;y+=2)Math.abs(h[y+1])=0&&h[y]<=1&&g.push(h[y]);g.push(1),g.push(0);for(var b=-1,_,m,x,S=0;S=0?xl?(e-a)*(e-a)+(t-o)*(t-o):c-d},Cc=function(e,t,n){for(var i,a,o,s,u,l=0,c=0;c=e&&e>=o||i<=e&&e<=o)u=(e-i)/(o-i)*(s-a)+a,u>t&&l++;else continue;return l%2!==0},pv=function(e,t,n,i,a,o,s,u,l){var c=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var d=Math.cos(-f),h=Math.sin(-f),p=0;p0){var y=Ix(c,-l);g=kx(y)}else g=c;return Cc(e,t,g)},BK=function(e,t,n,i,a,o,s,u){for(var l=new Array(n.length*2),c=0;c=0&&y<=1&&_.push(y),b>=0&&b<=1&&_.push(b),_.length===0)return[];var m=_[0]*u[0]+e,x=_[0]*u[1]+t;if(_.length>1){if(_[0]==_[1])return[m,x];var S=_[1]*u[0]+e,O=_[1]*u[1]+t;return[m,x,S,O]}else return[m,x]},kS=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},gp=function(e,t,n,i,a,o,s,u,l){var c=e-a,f=n-e,d=s-a,h=t-o,p=i-t,g=u-o,y=d*h-g*c,b=f*h-p*c,_=g*f-d*p;if(_!==0){var m=y/_,x=b/_,S=.001,O=0-S,E=1+S;return O<=m&&m<=E&&O<=x&&x<=E?[e+m*f,t+m*p]:l?[e+m*f,t+m*p]:[]}else return y===0||b===0?kS(e,n,s)===s?[s,u]:kS(e,n,a)===a?[a,o]:kS(a,s,n)===n?[n,i]:[]:[]},UK=function(e,t,n,i,a){var o=[],s=i/2,u=a/2,l=t,c=n;o.push({x:l+s*e[0],y:c+u*e[1]});for(var f=1;f0){var g=Ix(f,-u);h=kx(g)}else h=f}else h=n;for(var y,b,_,m,x=0;x2){for(var p=[c[0],c[1]],g=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),y=1;yc&&(c=x)},get:function(m){return l[m]}},d=0;d0?z=j.edgesTo(B)[0]:z=B.edgesTo(j)[0];var H=i(z);B=B.id(),E[B]>E[k]+H&&(E[B]=E[k]+H,T.nodes.indexOf(B)<0?T.push(B):T.updateItem(B),O[B]=0,S[B]=[]),E[B]==E[k]+H&&(O[B]=O[B]+O[k],S[B].push(k))}else for(var q=0;q0;){for(var X=x.pop(),Z=0;Z0&&s.push(n[u]);s.length!==0&&a.push(i.collection(s))}return a},tZ=function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:iZ,s=i,u,l,c=0;c=2?q0(e,t,n,0,II,aZ):q0(e,t,n,0,kI)},squaredEuclidean:function(e,t,n){return q0(e,t,n,0,II)},manhattan:function(e,t,n){return q0(e,t,n,0,kI)},max:function(e,t,n){return q0(e,t,n,-1/0,oZ)}};Bm["squared-euclidean"]=Bm.squaredEuclidean;Bm.squaredeuclidean=Bm.squaredEuclidean;function M2(r,e,t,n,i,a){var o;return Ya(r)?o=r:o=Bm[r]||Bm.euclidean,e===0&&Ya(r)?o(i,a):o(e,t,n,i,a)}var sZ=fu({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),J5=function(e){return sZ(e)},Nx=function(e,t,n,i,a){var o=a!=="kMedoids",s=o?function(f){return n[f]}:function(f){return i[f](n)},u=function(d){return i[d](t)},l=n,c=t;return M2(e,i.length,s,u,l,c)},NS=function(e,t,n){for(var i=n.length,a=new Array(i),o=new Array(i),s=new Array(t),u=null,l=0;ln)return!1}return!0},cZ=function(e,t,n){for(var i=0;is&&(s=t[l][c],u=c);a[u].push(e[l])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var p=t[o],g=t[i[o]],y;a.mode==="dendrogram"?y={left:p,right:g,key:p.key}:y={value:p.value.concat(g.value),key:p.key},e[p.index]=y,e.splice(g.index,1),t[p.key]=y;for(var b=0;bn[g.key][_.key]&&(u=n[g.key][_.key])):a.linkage==="max"?(u=n[p.key][_.key],n[p.key][_.key]0&&i.push(a);return i},UI=function(e,t,n){for(var i=[],a=0;as&&(o=l,s=t[a*e+l])}o>0&&i.push(o)}for(var c=0;cl&&(u=c,l=f)}n[a]=o[u]}return i=UI(e,t,n),i},zI=function(e){for(var t=this.cy(),n=this.nodes(),i=xZ(e),a={},o=0;o=k?(L=k,k=j,B=z):j>L&&(L=j);for(var H=0;H0?1:0;E[P%i.minIterations*s+Z]=ue,X+=ue}if(X>0&&(P>=i.minIterations-1||P==i.maxIterations-1)){for(var re=0,ne=0;ne1||O>1)&&(s=!0),f[m]=[],_.outgoers().forEach(function(T){T.isEdge()&&f[m].push(T.id())})}else d[m]=[void 0,_.target().id()]}):o.forEach(function(_){var m=_.id();if(_.isNode()){var x=_.degree(!0);x%2&&(u?l?s=!0:l=m:u=m),f[m]=[],_.connectedEdges().forEach(function(S){return f[m].push(S.id())})}else d[m]=[_.source().id(),_.target().id()]});var h={found:!1,trail:void 0};if(s)return h;if(l&&u)if(a){if(c&&l!=c)return h;c=l}else{if(c&&l!=c&&u!=c)return h;c||(c=l)}else c||(c=o[0].id());var p=function(m){for(var x=m,S=[m],O,E,T;f[x].length;)O=f[x].shift(),E=d[O][0],T=d[O][1],x!=T?(f[T]=f[T].filter(function(P){return P!=O}),x=T):!a&&x!=E&&(f[E]=f[E].filter(function(P){return P!=O}),x=E),S.unshift(O),S.unshift(x);return S},g=[],y=[];for(y=p(c);y.length!=1;)f[y[0]].length==0?(g.unshift(o.getElementById(y.shift())),g.unshift(o.getElementById(y.shift()))):y=p(y.shift()).concat(y);g.unshift(o.getElementById(y.shift()));for(var b in f)if(f[b].length)return h;return h.found=!0,h.trail=this.spawn(g,!0),h}},vw=function(){var e=this,t={},n=0,i=0,a=[],o=[],s={},u=function(d,h){for(var p=o.length-1,g=[],y=e.spawn();o[p].x!=d||o[p].y!=h;)g.push(o.pop().edge),p--;g.push(o.pop().edge),g.forEach(function(b){var _=b.connectedNodes().intersection(e);y.merge(b),_.forEach(function(m){var x=m.id(),S=m.connectedEdges().intersection(e);y.merge(m),t[x].cutVertex?y.merge(S.filter(function(O){return O.isLoop()})):y.merge(S)})}),a.push(y)},l=function(d,h,p){d===p&&(i+=1),t[h]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(h).connectedEdges().intersection(e);if(g.size()===0)a.push(e.spawn(e.getElementById(h)));else{var y,b,_,m;g.forEach(function(x){y=x.source().id(),b=x.target().id(),_=y===h?b:y,_!==p&&(m=x.id(),s[m]||(s[m]=!0,o.push({x:h,y:_,edge:x})),_ in t?t[h].low=Math.min(t[h].low,t[_].id):(l(d,_,h),t[h].low=Math.min(t[h].low,t[_].low),t[h].id<=t[_].low&&(t[h].cutVertex=!0,u(h,_))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in t||(i=0,l(d,d),t[d].cutVertex=i>1)}});var c=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(c),components:a}},PZ={hopcroftTarjanBiconnected:vw,htbc:vw,htb:vw,hopcroftTarjanBiconnectedComponents:vw},pw=function(){var e=this,t={},n=0,i=[],a=[],o=e.spawn(e),s=function(l){a.push(l),t[l]={index:n,low:n++,explored:!1};var c=e.getElementById(l).connectedEdges().intersection(e);if(c.forEach(function(g){var y=g.target().id();y!==l&&(y in t||s(y),t[y].explored||(t[l].low=Math.min(t[l].low,t[y].low)))}),t[l].index===t[l].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),t[d].low=t[l].index,t[d].explored=!0,d===l)break}var h=f.edgesWith(f),p=f.merge(h);i.push(p),o=o.difference(p)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in t||s(l)}}),{cut:o,components:i}},MZ={tarjanStronglyConnected:pw,tsc:pw,tscc:pw,tarjanStronglyConnectedComponents:pw},_F={};[m1,sK,uK,cK,dK,vK,yK,VK,xm,Em,dM,nZ,gZ,_Z,CZ,RZ,PZ,MZ].forEach(function(r){kr(_F,r)});/*! +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(r,e){return t$(r)||a$(r,e)||q5(r,e)||o$()}function Rx(r){return r$(r)||i$(r)||q5(r)||s$()}function u$(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function W7(r){var e=u$(r,"string");return typeof e=="symbol"?e:e+""}function ls(r){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(r)}function q5(r,e){if(r){if(typeof r=="string")return lM(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lM(r,e):void 0}}var ss=typeof window>"u"?null:window,oI=ss?ss.navigator:null;ss&&ss.document;var l$=ls(""),Y7=ls({}),c$=ls(function(){}),f$=typeof HTMLElement>"u"?"undefined":ls(HTMLElement),V1=function(e){return e&&e.instanceString&&Ya(e.instanceString)?e.instanceString():null},Ar=function(e){return e!=null&&ls(e)==l$},Ya=function(e){return e!=null&&ls(e)===c$},ra=function(e){return!rf(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ai=function(e){return e!=null&&ls(e)===Y7&&!ra(e)&&e.constructor===Object},d$=function(e){return e!=null&&ls(e)===Y7},Ht=function(e){return e!=null&&ls(e)===ls(1)&&!isNaN(e)},h$=function(e){return Ht(e)&&Math.floor(e)===e},Px=function(e){if(f$!=="undefined")return e!=null&&e instanceof HTMLElement},rf=function(e){return H1(e)||X7(e)},H1=function(e){return V1(e)==="collection"&&e._private.single},X7=function(e){return V1(e)==="collection"&&!e._private.single},G5=function(e){return V1(e)==="core"},$7=function(e){return V1(e)==="stylesheet"},v$=function(e){return V1(e)==="event"},Rp=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},p$=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},g$=function(e){return ai(e)&&Ht(e.x1)&&Ht(e.x2)&&Ht(e.y1)&&Ht(e.y2)},y$=function(e){return d$(e)&&Ya(e.then)},m$=function(){return oI&&oI.userAgent.match(/msie|trident|edge/i)},jm=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;ot?1:0},O$=function(e,t){return-1*Z7(e,t)},kr=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(y-=1),y<1/6?p+(g-p)*6*y:y<1/2?g:y<2/3?p+(g-p)*(2/3-y)*6:p}var f=new RegExp("^"+w$+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)s=u=l=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,h=2*a-d;s=Math.round(255*c(h,d,n+1/3)),u=Math.round(255*c(h,d,n)),l=Math.round(255*c(h,d,n-1/3))}t=[s,u,l,o]}return t},A$=function(e){var t,n=new RegExp("^"+b$+"$").exec(e);if(n){t=[];for(var i=[],a=1;a<=3;a++){var o=n[a];if(o[o.length-1]==="%"&&(i[a]=!0),o=parseFloat(o),i[a]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var s=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(s&&!u)return;var l=n[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;t.push(l)}}return t},R$=function(e){return P$[e.toLowerCase()]},Q7=function(e){return(ra(e)?e:null)||R$(e)||T$(e)||A$(e)||C$(e)},P$={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},J7=function(e){for(var t=e.map,n=e.keys,i=n.length,a=0;a=u||j<0||_&&z>=d}function T(){var B=e();if(E(B))return P(B);p=setTimeout(T,O(B))}function P(B){return p=void 0,m&&c?x(B):(c=f=void 0,h)}function I(){p!==void 0&&clearTimeout(p),y=0,c=g=f=p=void 0}function k(){return p===void 0?h:P(e())}function L(){var B=e(),j=E(B);if(c=arguments,f=this,g=B,j){if(p===void 0)return S(g);if(_)return clearTimeout(p),p=setTimeout(T,u),x(g)}return p===void 0&&(p=setTimeout(T,u)),h}return L.cancel=I,L.flush=k,L}return AS=o,AS}var U$=F$(),$1=W1(U$),RS=ss?ss.performance:null,rF=RS&&RS.now?function(){return RS.now()}:function(){return Date.now()},z$=(function(){if(ss){if(ss.requestAnimationFrame)return function(r){ss.requestAnimationFrame(r)};if(ss.mozRequestAnimationFrame)return function(r){ss.mozRequestAnimationFrame(r)};if(ss.webkitRequestAnimationFrame)return function(r){ss.webkitRequestAnimationFrame(r)};if(ss.msRequestAnimationFrame)return function(r){ss.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(rF())},1e3/60)}})(),Mx=function(e){return z$(e)},vv=rF,Ig=9261,nF=65599,lm=5381,iF=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ig,n=t,i;i=e.next(),!i.done;)n=n*nF+i.value|0;return n},g1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ig;return t*nF+e|0},y1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lm;return(t<<5)+t+e|0},q$=function(e,t){return e*2097152+t},ep=function(e){return e[0]*2097152+e[1]},fw=function(e,t){return[g1(e[0],t[0]),y1(e[1],t[1])]},xI=function(e,t){var n={value:0,done:!1},i=0,a=e.length,o={next:function(){return i=0;i--)e[i]===t&&e.splice(i,1)},X5=function(e){e.splice(0,e.length)},Q$=function(e,t){for(var n=0;n"u"?"undefined":ls(Set))!==eK?Set:tK,R2=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!G5(e)){Ia("An element must have a core reference and parameters set");return}var i=t.group;if(i==null&&(t.data&&t.data.source!=null&&t.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Ia("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=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:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?i==="edges":!!t.pannable,active:!1,classes:new $m,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(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),t.renderedPosition){var o=t.renderedPosition,s=e.pan(),u=e.zoom();a.position={x:(o.x-s.x)/u,y:(o.y-s.y)/u}}var l=[];ra(t.classes)?l=t.classes:Ar(t.classes)&&(l=t.classes.split(/\s+/));for(var c=0,f=l.length;c_?1:0},c=function(b,_,m,x,S){var O;if(m==null&&(m=0),S==null&&(S=n),m<0)throw new Error("lo must be non-negative");for(x==null&&(x=b.length);mI;0<=I?P++:P--)T.push(P);return T}).apply(this).reverse(),E=[],x=0,S=O.length;xk;0<=k?++T:--T)L.push(o(b,m));return L},g=function(b,_,m,x){var S,O,E;for(x==null&&(x=n),S=b[m];m>_;){if(E=m-1>>1,O=b[E],x(S,O)<0){b[m]=O,m=E;continue}break}return b[m]=S},y=function(b,_,m){var x,S,O,E,T;for(m==null&&(m=n),S=b.length,T=_,O=b[_],x=2*_+1;x0;){var O=_.pop(),E=y(O),T=O.id();if(d[T]=E,E!==1/0)for(var P=O.neighborhood().intersect(p),I=0;I0)for(W.unshift(q);f[J];){var X=f[J];W.unshift(X.edge),W.unshift(X.node),$=X.node,J=$.id()}return s.spawn(W)}}}},uK={kruskal:function(e){e=e||function(m){return 1};for(var t=this.byGroup(),n=t.nodes,i=t.edges,a=n.length,o=new Array(a),s=n,u=function(x){for(var S=0;S0;){if(S(),E++,x===c){for(var T=[],P=a,I=c,k=b[I];T.unshift(P),k!=null&&T.unshift(k),P=y[I],P!=null;)I=P.id(),k=b[I];return{found:!0,distance:f[x],path:this.spawn(T),steps:E}}h[x]=!0;for(var L=m._private.edges,B=0;Bk&&(p[I]=k,_[I]=P,m[I]=S),!a){var L=P*c+T;!a&&p[L]>k&&(p[L]=k,_[L]=T,m[L]=S)}}}for(var B=0;B1&&arguments[1]!==void 0?arguments[1]:o,ie=m(Y),we=[],Ee=ie;;){if(Ee==null)return t.spawn();var Me=_(Ee),Ie=Me.edge,Ye=Me.pred;if(we.unshift(Ee[0]),Ee.same(Q)&&we.length>0)break;Ie!=null&&we.unshift(Ie),Ee=Ye}return u.spawn(we)},O=0;O=0;c--){var f=l[c],d=f[1],h=f[2];(t[d]===s&&t[h]===u||t[d]===u&&t[h]===s)&&l.splice(c,1)}for(var p=0;pi;){var a=Math.floor(Math.random()*t.length);t=gK(a,e,t),n--}return t},yK={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,i=t.edges;i.unmergeBy(function(W){return W.isLoop()});var a=n.length,o=i.length,s=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/pK);if(a<2){Ia("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],c=0;c1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,o=t;o1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(t,n):(n0&&e.splice(0,t));for(var s=0,u=e.length-1;u>=0;u--){var l=e[u];o?isFinite(l)||(e[u]=-1/0,s++):e.splice(u,1)}a&&e.sort(function(d,h){return d-h});var c=e.length,f=Math.floor(c/2);return c%2!==0?e[f+1+s]:(e[f-1+s]+e[f+s])/2},EK=function(e){return Math.PI*e/180},dw=function(e,t){return Math.atan2(t,e)-Math.PI/2},$5=Math.log2||function(r){return Math.log(r)/Math.log(2)},K5=function(e){return e>0?1:e<0?-1:0},Wg=function(e,t){return Math.sqrt(Cg(e,t))},Cg=function(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i},SK=function(e){for(var t=e.length,n=0,i=0;i=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(e.w!=null&&e.h!=null&&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}}},TK=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},CK=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},AK=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},fF=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},$w=function(e){var t=arguments.length>1&&arguments[1]!==void 0?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},Kw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,o;if(t.length===1)n=i=a=o=t[0];else if(t.length===2)n=a=t[0],o=i=t[1];else if(t.length===4){var s=Uo(t,4);n=s[0],i=s[1],a=s[2],o=s[3]}return e.x1-=o,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},AI=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},Z5=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},pp=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},RI=function(e,t){return pp(e,t.x,t.y)},dF=function(e,t){return pp(e,t.x1,t.y1)&&pp(e,t.x2,t.y2)},RK=(DS=Math.hypot)!==null&&DS!==void 0?DS:function(r,e){return Math.sqrt(r*r+e*e)};function PK(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(T,P){return{x:T.x+P.x,y:T.y+P.y}},n=function(T,P){return{x:T.x-P.x,y:T.y-P.y}},i=function(T,P){return{x:T.x*P,y:T.y*P}},a=function(T,P){return T.x*P.y-T.y*P.x},o=function(T){var P=RK(T.x,T.y);return P===0?{x:0,y:0}:{x:T.x/P,y:T.y/P}},s=function(T){for(var P=0,I=0;I7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?Mp(a,o):u,c=a/2,f=o/2;l=Math.min(l,c,f);var d=l!==c,h=l!==f,p;if(d){var g=n-c+l-s,y=i-f-s,b=n+c-l+s,_=y;if(p=gp(e,t,n,i,g,y,b,_,!1),p.length>0)return p}if(h){var m=n+c+s,x=i-f+l-s,S=m,O=i+f-l+s;if(p=gp(e,t,n,i,m,x,S,O,!1),p.length>0)return p}if(d){var E=n-c+l-s,T=i+f+s,P=n+c-l+s,I=T;if(p=gp(e,t,n,i,E,T,P,I,!1),p.length>0)return p}if(h){var k=n-c-s,L=i-f+l-s,B=k,j=i+f-l+s;if(p=gp(e,t,n,i,k,L,B,j,!1),p.length>0)return p}var z;{var H=n-c+l,q=i-f+l;if(z=db(e,t,n,i,H,q,l+s),z.length>0&&z[0]<=H&&z[1]<=q)return[z[0],z[1]]}{var W=n+c-l,$=i-f+l;if(z=db(e,t,n,i,W,$,l+s),z.length>0&&z[0]>=W&&z[1]<=$)return[z[0],z[1]]}{var J=n+c-l,X=i+f-l;if(z=db(e,t,n,i,J,X,l+s),z.length>0&&z[0]>=J&&z[1]>=X)return[z[0],z[1]]}{var Z=n-c+l,ue=i+f-l;if(z=db(e,t,n,i,Z,ue,l+s),z.length>0&&z[0]<=Z&&z[1]>=ue)return[z[0],z[1]]}return[]},DK=function(e,t,n,i,a,o,s){var u=s,l=Math.min(n,a),c=Math.max(n,a),f=Math.min(i,o),d=Math.max(i,o);return l-u<=e&&e<=c+u&&f-u<=t&&t<=d+u},kK=function(e,t,n,i,a,o,s,u,l){var c={x1:Math.min(n,s,a)-l,x2:Math.max(n,s,a)+l,y1:Math.min(i,u,o)-l,y2:Math.max(i,u,o)+l};return!(ec.x2||tc.y2)},IK=function(e,t,n,i){n-=i;var a=t*t-4*e*n;if(a<0)return[];var o=Math.sqrt(a),s=2*e,u=(-t+o)/s,l=(-t-o)/s;return[u,l]},NK=function(e,t,n,i,a){var o=1e-5;e===0&&(e=o),t/=e,n/=e,i/=e;var s,u,l,c,f,d,h,p;if(u=(3*n-t*t)/9,l=-(27*i)+t*(9*n-2*(t*t)),l/=54,s=u*u*u+l*l,a[1]=0,h=t/3,s>0){f=l+Math.sqrt(s),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=l-Math.sqrt(s),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-h+f+d,h+=(f+d)/2,a[4]=a[2]=-h,h=Math.sqrt(3)*(-d+f)/2,a[3]=h,a[5]=-h;return}if(a[5]=a[3]=0,s===0){p=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),a[0]=-h+2*p,a[4]=a[2]=-(p+h);return}u=-u,c=u*u*u,c=Math.acos(l/Math.sqrt(c)),p=2*Math.sqrt(u),a[0]=-h+p*Math.cos(c/3),a[2]=-h+p*Math.cos((c+2*Math.PI)/3),a[4]=-h+p*Math.cos((c+4*Math.PI)/3)},LK=function(e,t,n,i,a,o,s,u){var l=1*n*n-4*n*a+2*n*s+4*a*a-4*a*s+s*s+i*i-4*i*o+2*i*u+4*o*o-4*o*u+u*u,c=9*n*a-3*n*n-3*n*s-6*a*a+3*a*s+9*i*o-3*i*i-3*i*u-6*o*o+3*o*u,f=3*n*n-6*n*a+n*s-n*e+2*a*a+2*a*e-s*e+3*i*i-6*i*o+i*u-i*t+2*o*o+2*o*t-u*t,d=1*n*a-n*n+n*e-a*e+i*o-i*i+i*t-o*t,h=[];NK(l,c,f,d,h);for(var p=1e-7,g=[],y=0;y<6;y+=2)Math.abs(h[y+1])=0&&h[y]<=1&&g.push(h[y]);g.push(1),g.push(0);for(var b=-1,_,m,x,S=0;S=0?xl?(e-a)*(e-a)+(t-o)*(t-o):c-d},Cc=function(e,t,n){for(var i,a,o,s,u,l=0,c=0;c=e&&e>=o||i<=e&&e<=o)u=(e-i)/(o-i)*(s-a)+a,u>t&&l++;else continue;return l%2!==0},pv=function(e,t,n,i,a,o,s,u,l){var c=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var d=Math.cos(-f),h=Math.sin(-f),p=0;p0){var y=Ix(c,-l);g=kx(y)}else g=c;return Cc(e,t,g)},BK=function(e,t,n,i,a,o,s,u){for(var l=new Array(n.length*2),c=0;c=0&&y<=1&&_.push(y),b>=0&&b<=1&&_.push(b),_.length===0)return[];var m=_[0]*u[0]+e,x=_[0]*u[1]+t;if(_.length>1){if(_[0]==_[1])return[m,x];var S=_[1]*u[0]+e,O=_[1]*u[1]+t;return[m,x,S,O]}else return[m,x]},kS=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},gp=function(e,t,n,i,a,o,s,u,l){var c=e-a,f=n-e,d=s-a,h=t-o,p=i-t,g=u-o,y=d*h-g*c,b=f*h-p*c,_=g*f-d*p;if(_!==0){var m=y/_,x=b/_,S=.001,O=0-S,E=1+S;return O<=m&&m<=E&&O<=x&&x<=E?[e+m*f,t+m*p]:l?[e+m*f,t+m*p]:[]}else return y===0||b===0?kS(e,n,s)===s?[s,u]:kS(e,n,a)===a?[a,o]:kS(a,s,n)===n?[n,i]:[]:[]},UK=function(e,t,n,i,a){var o=[],s=i/2,u=a/2,l=t,c=n;o.push({x:l+s*e[0],y:c+u*e[1]});for(var f=1;f0){var g=Ix(f,-u);h=kx(g)}else h=f}else h=n;for(var y,b,_,m,x=0;x2){for(var p=[c[0],c[1]],g=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),y=1;yc&&(c=x)},get:function(m){return l[m]}},d=0;d0?z=j.edgesTo(B)[0]:z=B.edgesTo(j)[0];var H=i(z);B=B.id(),E[B]>E[k]+H&&(E[B]=E[k]+H,T.nodes.indexOf(B)<0?T.push(B):T.updateItem(B),O[B]=0,S[B]=[]),E[B]==E[k]+H&&(O[B]=O[B]+O[k],S[B].push(k))}else for(var q=0;q0;){for(var X=x.pop(),Z=0;Z0&&s.push(n[u]);s.length!==0&&a.push(i.collection(s))}return a},tZ=function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:iZ,s=i,u,l,c=0;c=2?q0(e,t,n,0,II,aZ):q0(e,t,n,0,kI)},squaredEuclidean:function(e,t,n){return q0(e,t,n,0,II)},manhattan:function(e,t,n){return q0(e,t,n,0,kI)},max:function(e,t,n){return q0(e,t,n,-1/0,oZ)}};Bm["squared-euclidean"]=Bm.squaredEuclidean;Bm.squaredeuclidean=Bm.squaredEuclidean;function M2(r,e,t,n,i,a){var o;return Ya(r)?o=r:o=Bm[r]||Bm.euclidean,e===0&&Ya(r)?o(i,a):o(e,t,n,i,a)}var sZ=fu({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),J5=function(e){return sZ(e)},Nx=function(e,t,n,i,a){var o=a!=="kMedoids",s=o?function(f){return n[f]}:function(f){return i[f](n)},u=function(d){return i[d](t)},l=n,c=t;return M2(e,i.length,s,u,l,c)},NS=function(e,t,n){for(var i=n.length,a=new Array(i),o=new Array(i),s=new Array(t),u=null,l=0;ln)return!1}return!0},cZ=function(e,t,n){for(var i=0;is&&(s=t[l][c],u=c);a[u].push(e[l])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var p=t[o],g=t[i[o]],y;a.mode==="dendrogram"?y={left:p,right:g,key:p.key}:y={value:p.value.concat(g.value),key:p.key},e[p.index]=y,e.splice(g.index,1),t[p.key]=y;for(var b=0;bn[g.key][_.key]&&(u=n[g.key][_.key])):a.linkage==="max"?(u=n[p.key][_.key],n[p.key][_.key]0&&i.push(a);return i},UI=function(e,t,n){for(var i=[],a=0;as&&(o=l,s=t[a*e+l])}o>0&&i.push(o)}for(var c=0;cl&&(u=c,l=f)}n[a]=o[u]}return i=UI(e,t,n),i},zI=function(e){for(var t=this.cy(),n=this.nodes(),i=xZ(e),a={},o=0;o=k?(L=k,k=j,B=z):j>L&&(L=j);for(var H=0;H0?1:0;E[P%i.minIterations*s+Z]=ue,X+=ue}if(X>0&&(P>=i.minIterations-1||P==i.maxIterations-1)){for(var re=0,ne=0;ne1||O>1)&&(s=!0),f[m]=[],_.outgoers().forEach(function(T){T.isEdge()&&f[m].push(T.id())})}else d[m]=[void 0,_.target().id()]}):o.forEach(function(_){var m=_.id();if(_.isNode()){var x=_.degree(!0);x%2&&(u?l?s=!0:l=m:u=m),f[m]=[],_.connectedEdges().forEach(function(S){return f[m].push(S.id())})}else d[m]=[_.source().id(),_.target().id()]});var h={found:!1,trail:void 0};if(s)return h;if(l&&u)if(a){if(c&&l!=c)return h;c=l}else{if(c&&l!=c&&u!=c)return h;c||(c=l)}else c||(c=o[0].id());var p=function(m){for(var x=m,S=[m],O,E,T;f[x].length;)O=f[x].shift(),E=d[O][0],T=d[O][1],x!=T?(f[T]=f[T].filter(function(P){return P!=O}),x=T):!a&&x!=E&&(f[E]=f[E].filter(function(P){return P!=O}),x=E),S.unshift(O),S.unshift(x);return S},g=[],y=[];for(y=p(c);y.length!=1;)f[y[0]].length==0?(g.unshift(o.getElementById(y.shift())),g.unshift(o.getElementById(y.shift()))):y=p(y.shift()).concat(y);g.unshift(o.getElementById(y.shift()));for(var b in f)if(f[b].length)return h;return h.found=!0,h.trail=this.spawn(g,!0),h}},vw=function(){var e=this,t={},n=0,i=0,a=[],o=[],s={},u=function(d,h){for(var p=o.length-1,g=[],y=e.spawn();o[p].x!=d||o[p].y!=h;)g.push(o.pop().edge),p--;g.push(o.pop().edge),g.forEach(function(b){var _=b.connectedNodes().intersection(e);y.merge(b),_.forEach(function(m){var x=m.id(),S=m.connectedEdges().intersection(e);y.merge(m),t[x].cutVertex?y.merge(S.filter(function(O){return O.isLoop()})):y.merge(S)})}),a.push(y)},l=function(d,h,p){d===p&&(i+=1),t[h]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(h).connectedEdges().intersection(e);if(g.size()===0)a.push(e.spawn(e.getElementById(h)));else{var y,b,_,m;g.forEach(function(x){y=x.source().id(),b=x.target().id(),_=y===h?b:y,_!==p&&(m=x.id(),s[m]||(s[m]=!0,o.push({x:h,y:_,edge:x})),_ in t?t[h].low=Math.min(t[h].low,t[_].id):(l(d,_,h),t[h].low=Math.min(t[h].low,t[_].low),t[h].id<=t[_].low&&(t[h].cutVertex=!0,u(h,_))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in t||(i=0,l(d,d),t[d].cutVertex=i>1)}});var c=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(c),components:a}},PZ={hopcroftTarjanBiconnected:vw,htbc:vw,htb:vw,hopcroftTarjanBiconnectedComponents:vw},pw=function(){var e=this,t={},n=0,i=[],a=[],o=e.spawn(e),s=function(l){a.push(l),t[l]={index:n,low:n++,explored:!1};var c=e.getElementById(l).connectedEdges().intersection(e);if(c.forEach(function(g){var y=g.target().id();y!==l&&(y in t||s(y),t[y].explored||(t[l].low=Math.min(t[l].low,t[y].low)))}),t[l].index===t[l].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),t[d].low=t[l].index,t[d].explored=!0,d===l)break}var h=f.edgesWith(f),p=f.merge(h);i.push(p),o=o.difference(p)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in t||s(l)}}),{cut:o,components:i}},MZ={tarjanStronglyConnected:pw,tsc:pw,tscc:pw,tarjanStronglyConnectedComponents:pw},_F={};[m1,sK,uK,cK,dK,vK,yK,VK,xm,Em,dM,nZ,gZ,_Z,CZ,RZ,PZ,MZ].forEach(function(r){kr(_F,r)});/*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) -*/var wF=0,xF=1,EF=2,Pd=function(e){if(!(this instanceof Pd))return new Pd(e);this.id="Thenable/1.0.7",this.state=wF,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Pd.prototype={fulfill:function(e){return qI(this,xF,"fulfillValue",e)},reject:function(e){return qI(this,EF,"rejectReason",e)},then:function(e,t){var n=this,i=new Pd;return n.onFulfilled.push(VI(e,i,"fulfill")),n.onRejected.push(VI(t,i,"reject")),SF(n),i.proxy}};var qI=function(e,t,n,i){return e.state===wF&&(e.state=t,e[n]=i,SF(e)),e},SF=function(e){e.state===xF?GI(e,"onFulfilled",e.fulfillValue):e.state===EF&&GI(e,"onRejected",e.rejectReason)},GI=function(e,t,n){if(e[t].length!==0){var i=e[t];e[t]=[];var a=function(){for(var s=0;s0}},clearQueue:function(){return function(){var t=this,n=t.length!==void 0,i=n?t:[t],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o-1}return nO=e,nO}var iO,hN;function KZ(){if(hN)return iO;hN=1;var r=I2();function e(t,n){var i=this.__data__,a=r(i,t);return a<0?(++this.size,i.push([t,n])):i[a][1]=n,this}return iO=e,iO}var aO,vN;function ZZ(){if(vN)return aO;vN=1;var r=WZ(),e=YZ(),t=XZ(),n=$Z(),i=KZ();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n0&&this.spawn(i).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){ra(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=t===void 0,a=[],o=0,s=n.length;o0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};Zw.className=Zw.classNames=Zw.classes;var ni={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:us,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ni.variable="(?:[\\w-.]|(?:\\\\"+ni.metaChar+"))+";ni.className="(?:[\\w-]|(?:\\\\"+ni.metaChar+"))+";ni.value=ni.string+"|"+ni.number;ni.id=ni.variable;(function(){var r,e,t;for(r=ni.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(ni.comparatorOp+="|\\!"+e)})();var Vi=function(){return{checks:[]}},nr={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},gM=[{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(r,e){return O$(r.selector,e.selector)}),AQ=(function(){for(var r={},e,t=0;t0&&c.edgeCount>0)return Ai("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return Ai("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;c.edgeCount===1&&Ai("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},IQ=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(c){return c??""},t=function(c){return Ar(c)?'"'+c+'"':e(c)},n=function(c){return" "+c+" "},i=function(c,f){var d=c.type,h=c.value;switch(d){case nr.GROUP:{var p=e(h);return p.substring(0,p.length-1)}case nr.DATA_COMPARE:{var g=c.field,y=c.operator;return"["+g+n(e(y))+t(h)+"]"}case nr.DATA_BOOL:{var b=c.operator,_=c.field;return"["+e(b)+_+"]"}case nr.DATA_EXIST:{var m=c.field;return"["+m+"]"}case nr.META_COMPARE:{var x=c.operator,S=c.field;return"[["+S+n(e(x))+t(h)+"]]"}case nr.STATE:return h;case nr.ID:return"#"+h;case nr.CLASS:return"."+h;case nr.PARENT:case nr.CHILD:return a(c.parent,f)+n(">")+a(c.child,f);case nr.ANCESTOR:case nr.DESCENDANT:return a(c.ancestor,f)+" "+a(c.descendant,f);case nr.COMPOUND_SPLIT:{var O=a(c.left,f),E=a(c.subject,f),T=a(c.right,f);return O+(O.length>0?" ":"")+E+T}case nr.TRUE:return""}},a=function(c,f){return c.checks.reduce(function(d,h,p){return d+(f===c&&p===0?"$":"")+i(h,f)},"")},o="",s=0;s1&&s=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),c=!0),(a||s||c)&&(u=!a&&!o?"":""+e,l=""+n),c&&(e=u=u.toLowerCase(),n=l=l.toLowerCase()),t){case"*=":i=u.indexOf(l)>=0;break;case"$=":i=u.indexOf(l,u.length-l.length)>=0;break;case"^=":i=u.indexOf(l)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e0;){var c=i.shift();e(c),a.add(c.id()),s&&n(i,a,c)}return r}function DF(r,e,t){if(t.isParent())for(var n=t._private.children,i=0;i1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,DF)};function kF(r,e,t){if(t.isChild()){var n=t._private.parent;e.has(n.id())||r.push(n)}}Fm.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,kF)};function qQ(r,e,t){kF(r,e,t),DF(r,e,t)}Fm.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,qQ)};Fm.ancestors=Fm.parents;var w1,IF;w1=IF={data:Ci.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:Ci.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ci.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ci.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ci.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ci.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};w1.attr=w1.data;w1.removeAttr=w1.removeData;var GQ=IF,L2={};function kO(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var n=0,i=t[0],a=i._private.edges,o=0;oe}),minIndegree:Ky("indegree",function(r,e){return re}),minOutdegree:Ky("outdegree",function(r,e){return re})});kr(L2,{totalDegree:function(e){for(var t=0,n=this.nodes(),i=0;i0,d=f;f&&(c=c[0]);var h=d?c.position():{x:0,y:0};t!==void 0?l.position(e,t+h[e]):a!==void 0&&l.position({x:a.x+h.x,y:a.y+h.y})}else{var p=n.position(),g=s?n.parent():null,y=g&&g.length>0,b=y;y&&(g=g[0]);var _=b?g.position():{x:0,y:0};return a={x:p.x-_.x,y:p.y-_.y},e===void 0?a:a[e]}else if(!o)return;return this}};Cd.modelPosition=Cd.point=Cd.position;Cd.modelPositions=Cd.points=Cd.positions;Cd.renderedPoint=Cd.renderedPosition;Cd.relativePoint=Cd.relativePosition;var VQ=NF,Sm,Gp;Sm=Gp={};Gp.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),n=t.zoom(),i=t.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,s=e.y1*n+i.y,u=e.y2*n+i.y;return{x1:a,x2:o,y1:s,y2:u,w:o-a,h:u-s}};Gp.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};Gp.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(o){if(!o.isParent())return;var s=o._private,u=o.children(),l=o.pstyle("compound-sizing-wrt-labels").value==="include",c={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:l,includeOverlays:!1,useCache:!1}),d=s.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function h(P,I,k){var L=0,B=0,j=I+k;return P>0&&j>0&&(L=I/j*P,B=k/j*P),{biasDiff:L,biasComplementDiff:B}}function p(P,I,k,L){if(k.units==="%")switch(L){case"width":return P>0?k.pfValue*P:0;case"height":return I>0?k.pfValue*I:0;case"average":return P>0&&I>0?k.pfValue*(P+I)/2:0;case"min":return P>0&&I>0?P>I?k.pfValue*I:k.pfValue*P:0;case"max":return P>0&&I>0?P>I?k.pfValue*P:k.pfValue*I:0;default:return 0}else return k.units==="px"?k.pfValue:0}var g=c.width.left.value;c.width.left.units==="px"&&c.width.val>0&&(g=g*100/c.width.val);var y=c.width.right.value;c.width.right.units==="px"&&c.width.val>0&&(y=y*100/c.width.val);var b=c.height.top.value;c.height.top.units==="px"&&c.height.val>0&&(b=b*100/c.height.val);var _=c.height.bottom.value;c.height.bottom.units==="px"&&c.height.val>0&&(_=_*100/c.height.val);var m=h(c.width.val-f.w,g,y),x=m.biasDiff,S=m.biasComplementDiff,O=h(c.height.val-f.h,b,_),E=O.biasDiff,T=O.biasComplementDiff;s.autoPadding=p(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),s.autoWidth=Math.max(f.w,c.width.val),d.x=(-x+f.x1+f.x2+S)/2,s.autoHeight=Math.max(f.h,c.height.val),d.y=(-E+f.y1+f.y2+T)/2}for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},cp=function(e,t){return t==null?e:xd(e,t.x1,t.y1,t.x2,t.y2)},G0=function(e,t,n){return Tc(e,t,n)},gw=function(e,t,n){if(!t.cy().headless()){var i=t._private,a=i.rstyle,o=a.arrowWidth/2,s=t.pstyle(n+"-arrow-shape").value,u,l;if(s!=="none"){n==="source"?(u=a.srcX,l=a.srcY):n==="target"?(u=a.tgtX,l=a.tgtY):(u=a.midX,l=a.midY);var c=i.arrowBounds=i.arrowBounds||{},f=c[n]=c[n]||{};f.x1=u-o,f.y1=l-o,f.x2=u+o,f.y2=l+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,$w(f,1),xd(e,f.x1,f.y1,f.x2,f.y2)}}},IO=function(e,t,n){if(!t.cy().headless()){var i;n?i=n+"-":i="";var a=t._private,o=a.rstyle,s=t.pstyle(i+"label").strValue;if(s){var u=t.pstyle("text-halign"),l=t.pstyle("text-valign"),c=G0(o,"labelWidth",n),f=G0(o,"labelHeight",n),d=G0(o,"labelX",n),h=G0(o,"labelY",n),p=t.pstyle(i+"text-margin-x").pfValue,g=t.pstyle(i+"text-margin-y").pfValue,y=t.isEdge(),b=t.pstyle(i+"text-rotation"),_=t.pstyle("text-outline-width").pfValue,m=t.pstyle("text-border-width").pfValue,x=m/2,S=t.pstyle("text-background-padding").pfValue,O=2,E=f,T=c,P=T/2,I=E/2,k,L,B,j;if(y)k=d-P,L=d+P,B=h-I,j=h+I;else{switch(u.value){case"left":k=d-T,L=d;break;case"center":k=d-P,L=d+P;break;case"right":k=d,L=d+T;break}switch(l.value){case"top":B=h-E,j=h;break;case"center":B=h-I,j=h+I;break;case"bottom":B=h,j=h+E;break}}var z=p-Math.max(_,x)-S-O,H=p+Math.max(_,x)+S+O,q=g-Math.max(_,x)-S-O,W=g+Math.max(_,x)+S+O;k+=z,L+=H,B+=q,j+=W;var $=n||"main",J=a.labelBounds,X=J[$]=J[$]||{};X.x1=k,X.y1=B,X.x2=L,X.y2=j,X.w=L-k,X.h=j-B,X.leftPad=z,X.rightPad=H,X.topPad=q,X.botPad=W;var Z=y&&b.strValue==="autorotate",ue=b.pfValue!=null&&b.pfValue!==0;if(Z||ue){var re=Z?G0(a.rstyle,"labelAngle",n):b.pfValue,ne=Math.cos(re),le=Math.sin(re),ce=(k+L)/2,pe=(B+j)/2;if(!y){switch(u.value){case"left":ce=L;break;case"right":ce=k;break}switch(l.value){case"top":pe=j;break;case"bottom":pe=B;break}}var fe=function(Ce,Y){return Ce=Ce-ce,Y=Y-pe,{x:Ce*ne-Y*le+ce,y:Ce*le+Y*ne+pe}},se=fe(k,B),de=fe(k,j),ge=fe(L,B),Oe=fe(L,j);k=Math.min(se.x,de.x,ge.x,Oe.x),L=Math.max(se.x,de.x,ge.x,Oe.x),B=Math.min(se.y,de.y,ge.y,Oe.y),j=Math.max(se.y,de.y,ge.y,Oe.y)}var ke=$+"Rot",De=J[ke]=J[ke]||{};De.x1=k,De.y1=B,De.x2=L,De.y2=j,De.w=L-k,De.h=j-B,xd(e,k,B,L,j),xd(a.labelBounds.all,k,B,L,j)}return e}},GN=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value,a=t.pstyle("outline-offset").value,o=i+a;jF(e,t,n,o,"outside",o/2)}},jF=function(e,t,n,i,a,o){if(!(n===0||i<=0||a==="inside")){var s=t.cy(),u=t.pstyle("shape").value,l=s.renderer().nodeShapes[u],c=t.position(),f=c.x,d=c.y,h=t.width(),p=t.height();if(l.hasMiterBounds){a==="center"&&(i/=2);var g=l.miterBounds(f,d,h,p,i);cp(e,g)}else o!=null&&o>0&&Kw(e,[o,o,o,o])}},HQ=function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,a=t.pstyle("border-position").value;jF(e,t,n,i,a)}},WQ=function(e,t){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),o=zl(),s=e._private,u=e.isNode(),l=e.isEdge(),c,f,d,h,p,g,y=s.rstyle,b=u&&i?e.pstyle("bounds-expansion").pfValue:[0],_=function(Ne){return Ne.pstyle("display").value!=="none"},m=!i||_(e)&&(!l||_(e.source())&&_(e.target()));if(m){var x=0,S=0;i&&t.includeOverlays&&(x=e.pstyle("overlay-opacity").value,x!==0&&(S=e.pstyle("overlay-padding").value));var O=0,E=0;i&&t.includeUnderlays&&(O=e.pstyle("underlay-opacity").value,O!==0&&(E=e.pstyle("underlay-padding").value));var T=Math.max(S,E),P=0,I=0;if(i&&(P=e.pstyle("width").pfValue,I=P/2),u&&t.includeNodes){var k=e.position();p=k.x,g=k.y;var L=e.outerWidth(),B=L/2,j=e.outerHeight(),z=j/2;c=p-B,f=p+B,d=g-z,h=g+z,xd(o,c,d,f,h),i&&GN(o,e),i&&t.includeOutlines&&!a&&GN(o,e),i&&HQ(o,e)}else if(l&&t.includeEdges)if(i&&!a){var H=e.pstyle("curve-style").strValue;if(c=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),d=Math.min(y.srcY,y.midY,y.tgtY),h=Math.max(y.srcY,y.midY,y.tgtY),c-=I,f+=I,d-=I,h+=I,xd(o,c,d,f,h),H==="haystack"){var q=y.haystackPts;if(q&&q.length===2){if(c=q[0].x,d=q[0].y,f=q[1].x,h=q[1].y,c>f){var W=c;c=f,f=W}if(d>h){var $=d;d=h,h=$}xd(o,c-I,d-I,f+I,h+I)}}else if(H==="bezier"||H==="unbundled-bezier"||vp(H,"segments")||vp(H,"taxi")){var J;switch(H){case"bezier":case"unbundled-bezier":J=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":J=y.linePts;break}if(J!=null)for(var X=0;Xf){var ce=c;c=f,f=ce}if(d>h){var pe=d;d=h,h=pe}c-=I,f+=I,d-=I,h+=I,xd(o,c,d,f,h)}if(i&&t.includeEdges&&l&&(gw(o,e,"mid-source"),gw(o,e,"mid-target"),gw(o,e,"source"),gw(o,e,"target")),i){var fe=e.pstyle("ghost").value==="yes";if(fe){var se=e.pstyle("ghost-offset-x").pfValue,de=e.pstyle("ghost-offset-y").pfValue;xd(o,o.x1+se,o.y1+de,o.x2+se,o.y2+de)}}var ge=s.bodyBounds=s.bodyBounds||{};AI(ge,o),Kw(ge,b),$w(ge,1),i&&(c=o.x1,f=o.x2,d=o.y1,h=o.y2,xd(o,c-T,d-T,f+T,h+T));var Oe=s.overlayBounds=s.overlayBounds||{};AI(Oe,o),Kw(Oe,b),$w(Oe,1);var ke=s.labelBounds=s.labelBounds||{};ke.all!=null?CK(ke.all):ke.all=zl(),i&&t.includeLabels&&(t.includeMainLabels&&IO(o,e,null),l&&(t.includeSourceLabels&&IO(o,e,"source"),t.includeTargetLabels&&IO(o,e,"target")))}return o.x1=If(o.x1),o.y1=If(o.y1),o.x2=If(o.x2),o.y2=If(o.y2),o.w=If(o.x2-o.x1),o.h=If(o.y2-o.y1),o.w>0&&o.h>0&&m&&(Kw(o,b),$w(o,1)),o},BF=function(e){var t=0,n=function(o){return(o?1:0)<0}},clearQueue:function(){return function(){var t=this,n=t.length!==void 0,i=n?t:[t],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o-1}return nO=e,nO}var iO,hN;function KZ(){if(hN)return iO;hN=1;var r=I2();function e(t,n){var i=this.__data__,a=r(i,t);return a<0?(++this.size,i.push([t,n])):i[a][1]=n,this}return iO=e,iO}var aO,vN;function ZZ(){if(vN)return aO;vN=1;var r=WZ(),e=YZ(),t=XZ(),n=$Z(),i=KZ();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n0&&this.spawn(i).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){ra(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=t===void 0,a=[],o=0,s=n.length;o0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};Zw.className=Zw.classNames=Zw.classes;var ni={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:us,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ni.variable="(?:[\\w-.]|(?:\\\\"+ni.metaChar+"))+";ni.className="(?:[\\w-]|(?:\\\\"+ni.metaChar+"))+";ni.value=ni.string+"|"+ni.number;ni.id=ni.variable;(function(){var r,e,t;for(r=ni.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(ni.comparatorOp+="|\\!"+e)})();var Vi=function(){return{checks:[]}},nr={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},gM=[{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(r,e){return O$(r.selector,e.selector)}),AQ=(function(){for(var r={},e,t=0;t0&&c.edgeCount>0)return Ai("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return Ai("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;c.edgeCount===1&&Ai("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},IQ=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(c){return c??""},t=function(c){return Ar(c)?'"'+c+'"':e(c)},n=function(c){return" "+c+" "},i=function(c,f){var d=c.type,h=c.value;switch(d){case nr.GROUP:{var p=e(h);return p.substring(0,p.length-1)}case nr.DATA_COMPARE:{var g=c.field,y=c.operator;return"["+g+n(e(y))+t(h)+"]"}case nr.DATA_BOOL:{var b=c.operator,_=c.field;return"["+e(b)+_+"]"}case nr.DATA_EXIST:{var m=c.field;return"["+m+"]"}case nr.META_COMPARE:{var x=c.operator,S=c.field;return"[["+S+n(e(x))+t(h)+"]]"}case nr.STATE:return h;case nr.ID:return"#"+h;case nr.CLASS:return"."+h;case nr.PARENT:case nr.CHILD:return a(c.parent,f)+n(">")+a(c.child,f);case nr.ANCESTOR:case nr.DESCENDANT:return a(c.ancestor,f)+" "+a(c.descendant,f);case nr.COMPOUND_SPLIT:{var O=a(c.left,f),E=a(c.subject,f),T=a(c.right,f);return O+(O.length>0?" ":"")+E+T}case nr.TRUE:return""}},a=function(c,f){return c.checks.reduce(function(d,h,p){return d+(f===c&&p===0?"$":"")+i(h,f)},"")},o="",s=0;s1&&s=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),c=!0),(a||s||c)&&(u=!a&&!o?"":""+e,l=""+n),c&&(e=u=u.toLowerCase(),n=l=l.toLowerCase()),t){case"*=":i=u.indexOf(l)>=0;break;case"$=":i=u.indexOf(l,u.length-l.length)>=0;break;case"^=":i=u.indexOf(l)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e0;){var c=i.shift();e(c),a.add(c.id()),s&&n(i,a,c)}return r}function DF(r,e,t){if(t.isParent())for(var n=t._private.children,i=0;i1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,DF)};function kF(r,e,t){if(t.isChild()){var n=t._private.parent;e.has(n.id())||r.push(n)}}Fm.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,kF)};function qQ(r,e,t){kF(r,e,t),DF(r,e,t)}Fm.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return nD(this,r,e,qQ)};Fm.ancestors=Fm.parents;var w1,IF;w1=IF={data:Ci.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:Ci.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ci.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ci.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ci.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ci.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};w1.attr=w1.data;w1.removeAttr=w1.removeData;var GQ=IF,L2={};function kO(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var n=0,i=t[0],a=i._private.edges,o=0;oe}),minIndegree:Ky("indegree",function(r,e){return re}),minOutdegree:Ky("outdegree",function(r,e){return re})});kr(L2,{totalDegree:function(e){for(var t=0,n=this.nodes(),i=0;i0,d=f;f&&(c=c[0]);var h=d?c.position():{x:0,y:0};t!==void 0?l.position(e,t+h[e]):a!==void 0&&l.position({x:a.x+h.x,y:a.y+h.y})}else{var p=n.position(),g=s?n.parent():null,y=g&&g.length>0,b=y;y&&(g=g[0]);var _=b?g.position():{x:0,y:0};return a={x:p.x-_.x,y:p.y-_.y},e===void 0?a:a[e]}else if(!o)return;return this}};Cd.modelPosition=Cd.point=Cd.position;Cd.modelPositions=Cd.points=Cd.positions;Cd.renderedPoint=Cd.renderedPosition;Cd.relativePoint=Cd.relativePosition;var VQ=NF,Sm,Gp;Sm=Gp={};Gp.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),n=t.zoom(),i=t.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,s=e.y1*n+i.y,u=e.y2*n+i.y;return{x1:a,x2:o,y1:s,y2:u,w:o-a,h:u-s}};Gp.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};Gp.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(o){if(!o.isParent())return;var s=o._private,u=o.children(),l=o.pstyle("compound-sizing-wrt-labels").value==="include",c={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:l,includeOverlays:!1,useCache:!1}),d=s.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function h(P,I,k){var L=0,B=0,j=I+k;return P>0&&j>0&&(L=I/j*P,B=k/j*P),{biasDiff:L,biasComplementDiff:B}}function p(P,I,k,L){if(k.units==="%")switch(L){case"width":return P>0?k.pfValue*P:0;case"height":return I>0?k.pfValue*I:0;case"average":return P>0&&I>0?k.pfValue*(P+I)/2:0;case"min":return P>0&&I>0?P>I?k.pfValue*I:k.pfValue*P:0;case"max":return P>0&&I>0?P>I?k.pfValue*P:k.pfValue*I:0;default:return 0}else return k.units==="px"?k.pfValue:0}var g=c.width.left.value;c.width.left.units==="px"&&c.width.val>0&&(g=g*100/c.width.val);var y=c.width.right.value;c.width.right.units==="px"&&c.width.val>0&&(y=y*100/c.width.val);var b=c.height.top.value;c.height.top.units==="px"&&c.height.val>0&&(b=b*100/c.height.val);var _=c.height.bottom.value;c.height.bottom.units==="px"&&c.height.val>0&&(_=_*100/c.height.val);var m=h(c.width.val-f.w,g,y),x=m.biasDiff,S=m.biasComplementDiff,O=h(c.height.val-f.h,b,_),E=O.biasDiff,T=O.biasComplementDiff;s.autoPadding=p(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),s.autoWidth=Math.max(f.w,c.width.val),d.x=(-x+f.x1+f.x2+S)/2,s.autoHeight=Math.max(f.h,c.height.val),d.y=(-E+f.y1+f.y2+T)/2}for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},cp=function(e,t){return t==null?e:xd(e,t.x1,t.y1,t.x2,t.y2)},G0=function(e,t,n){return Tc(e,t,n)},gw=function(e,t,n){if(!t.cy().headless()){var i=t._private,a=i.rstyle,o=a.arrowWidth/2,s=t.pstyle(n+"-arrow-shape").value,u,l;if(s!=="none"){n==="source"?(u=a.srcX,l=a.srcY):n==="target"?(u=a.tgtX,l=a.tgtY):(u=a.midX,l=a.midY);var c=i.arrowBounds=i.arrowBounds||{},f=c[n]=c[n]||{};f.x1=u-o,f.y1=l-o,f.x2=u+o,f.y2=l+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,$w(f,1),xd(e,f.x1,f.y1,f.x2,f.y2)}}},IO=function(e,t,n){if(!t.cy().headless()){var i;n?i=n+"-":i="";var a=t._private,o=a.rstyle,s=t.pstyle(i+"label").strValue;if(s){var u=t.pstyle("text-halign"),l=t.pstyle("text-valign"),c=G0(o,"labelWidth",n),f=G0(o,"labelHeight",n),d=G0(o,"labelX",n),h=G0(o,"labelY",n),p=t.pstyle(i+"text-margin-x").pfValue,g=t.pstyle(i+"text-margin-y").pfValue,y=t.isEdge(),b=t.pstyle(i+"text-rotation"),_=t.pstyle("text-outline-width").pfValue,m=t.pstyle("text-border-width").pfValue,x=m/2,S=t.pstyle("text-background-padding").pfValue,O=2,E=f,T=c,P=T/2,I=E/2,k,L,B,j;if(y)k=d-P,L=d+P,B=h-I,j=h+I;else{switch(u.value){case"left":k=d-T,L=d;break;case"center":k=d-P,L=d+P;break;case"right":k=d,L=d+T;break}switch(l.value){case"top":B=h-E,j=h;break;case"center":B=h-I,j=h+I;break;case"bottom":B=h,j=h+E;break}}var z=p-Math.max(_,x)-S-O,H=p+Math.max(_,x)+S+O,q=g-Math.max(_,x)-S-O,W=g+Math.max(_,x)+S+O;k+=z,L+=H,B+=q,j+=W;var $=n||"main",J=a.labelBounds,X=J[$]=J[$]||{};X.x1=k,X.y1=B,X.x2=L,X.y2=j,X.w=L-k,X.h=j-B,X.leftPad=z,X.rightPad=H,X.topPad=q,X.botPad=W;var Z=y&&b.strValue==="autorotate",ue=b.pfValue!=null&&b.pfValue!==0;if(Z||ue){var re=Z?G0(a.rstyle,"labelAngle",n):b.pfValue,ne=Math.cos(re),le=Math.sin(re),ce=(k+L)/2,pe=(B+j)/2;if(!y){switch(u.value){case"left":ce=L;break;case"right":ce=k;break}switch(l.value){case"top":pe=j;break;case"bottom":pe=B;break}}var fe=function(Te,Y){return Te=Te-ce,Y=Y-pe,{x:Te*ne-Y*le+ce,y:Te*le+Y*ne+pe}},se=fe(k,B),de=fe(k,j),ge=fe(L,B),Oe=fe(L,j);k=Math.min(se.x,de.x,ge.x,Oe.x),L=Math.max(se.x,de.x,ge.x,Oe.x),B=Math.min(se.y,de.y,ge.y,Oe.y),j=Math.max(se.y,de.y,ge.y,Oe.y)}var ke=$+"Rot",De=J[ke]=J[ke]||{};De.x1=k,De.y1=B,De.x2=L,De.y2=j,De.w=L-k,De.h=j-B,xd(e,k,B,L,j),xd(a.labelBounds.all,k,B,L,j)}return e}},GN=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value,a=t.pstyle("outline-offset").value,o=i+a;jF(e,t,n,o,"outside",o/2)}},jF=function(e,t,n,i,a,o){if(!(n===0||i<=0||a==="inside")){var s=t.cy(),u=t.pstyle("shape").value,l=s.renderer().nodeShapes[u],c=t.position(),f=c.x,d=c.y,h=t.width(),p=t.height();if(l.hasMiterBounds){a==="center"&&(i/=2);var g=l.miterBounds(f,d,h,p,i);cp(e,g)}else o!=null&&o>0&&Kw(e,[o,o,o,o])}},HQ=function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,a=t.pstyle("border-position").value;jF(e,t,n,i,a)}},WQ=function(e,t){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),o=zl(),s=e._private,u=e.isNode(),l=e.isEdge(),c,f,d,h,p,g,y=s.rstyle,b=u&&i?e.pstyle("bounds-expansion").pfValue:[0],_=function(Ne){return Ne.pstyle("display").value!=="none"},m=!i||_(e)&&(!l||_(e.source())&&_(e.target()));if(m){var x=0,S=0;i&&t.includeOverlays&&(x=e.pstyle("overlay-opacity").value,x!==0&&(S=e.pstyle("overlay-padding").value));var O=0,E=0;i&&t.includeUnderlays&&(O=e.pstyle("underlay-opacity").value,O!==0&&(E=e.pstyle("underlay-padding").value));var T=Math.max(S,E),P=0,I=0;if(i&&(P=e.pstyle("width").pfValue,I=P/2),u&&t.includeNodes){var k=e.position();p=k.x,g=k.y;var L=e.outerWidth(),B=L/2,j=e.outerHeight(),z=j/2;c=p-B,f=p+B,d=g-z,h=g+z,xd(o,c,d,f,h),i&&GN(o,e),i&&t.includeOutlines&&!a&&GN(o,e),i&&HQ(o,e)}else if(l&&t.includeEdges)if(i&&!a){var H=e.pstyle("curve-style").strValue;if(c=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),d=Math.min(y.srcY,y.midY,y.tgtY),h=Math.max(y.srcY,y.midY,y.tgtY),c-=I,f+=I,d-=I,h+=I,xd(o,c,d,f,h),H==="haystack"){var q=y.haystackPts;if(q&&q.length===2){if(c=q[0].x,d=q[0].y,f=q[1].x,h=q[1].y,c>f){var W=c;c=f,f=W}if(d>h){var $=d;d=h,h=$}xd(o,c-I,d-I,f+I,h+I)}}else if(H==="bezier"||H==="unbundled-bezier"||vp(H,"segments")||vp(H,"taxi")){var J;switch(H){case"bezier":case"unbundled-bezier":J=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":J=y.linePts;break}if(J!=null)for(var X=0;Xf){var ce=c;c=f,f=ce}if(d>h){var pe=d;d=h,h=pe}c-=I,f+=I,d-=I,h+=I,xd(o,c,d,f,h)}if(i&&t.includeEdges&&l&&(gw(o,e,"mid-source"),gw(o,e,"mid-target"),gw(o,e,"source"),gw(o,e,"target")),i){var fe=e.pstyle("ghost").value==="yes";if(fe){var se=e.pstyle("ghost-offset-x").pfValue,de=e.pstyle("ghost-offset-y").pfValue;xd(o,o.x1+se,o.y1+de,o.x2+se,o.y2+de)}}var ge=s.bodyBounds=s.bodyBounds||{};AI(ge,o),Kw(ge,b),$w(ge,1),i&&(c=o.x1,f=o.x2,d=o.y1,h=o.y2,xd(o,c-T,d-T,f+T,h+T));var Oe=s.overlayBounds=s.overlayBounds||{};AI(Oe,o),Kw(Oe,b),$w(Oe,1);var ke=s.labelBounds=s.labelBounds||{};ke.all!=null?CK(ke.all):ke.all=zl(),i&&t.includeLabels&&(t.includeMainLabels&&IO(o,e,null),l&&(t.includeSourceLabels&&IO(o,e,"source"),t.includeTargetLabels&&IO(o,e,"target")))}return o.x1=If(o.x1),o.y1=If(o.y1),o.x2=If(o.x2),o.y2=If(o.y2),o.w=If(o.x2-o.x1),o.h=If(o.y2-o.y1),o.w>0&&o.h>0&&m&&(Kw(o,b),$w(o,1)),o},BF=function(e){var t=0,n=function(o){return(o?1:0)<0&&arguments[0]!==void 0?arguments[0]:sJ,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;s--)o(s);return this};Ip.removeAllListeners=function(){return this.removeListener("*")};Ip.emit=Ip.trigger=function(r,e,t){var n=this.listeners,i=n.length;return this.emitting++,ra(e)||(e=[e]),uJ(this,function(a,o){t!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:t}],i=n.length);for(var s=function(){var c=n[u];if(c.type===o.type&&(!c.namespace||c.namespace===o.namespace||c.namespace===oJ)&&a.eventMatches(a.context,c,o)){var f=[o];e!=null&&Q$(f,e),a.beforeEmit(a.context,c,o),c.conf&&c.conf.one&&(a.listeners=a.listeners.filter(function(p){return p!==c}));var d=a.callbackContext(a.context,c,o),h=c.callback.apply(d,f);a.afterEmit(a.context,c,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u1&&!o){var s=this.length-1,u=this[s],l=u._private.data.id;this[s]=void 0,this[e]=u,a.set(l,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,i=t.map,a=i.get(n);if(!a)return this;var o=a.index;return this.unmergeAt(o),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&Ar(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],i=this,a=0;an&&(n=u,i=s)}return{value:n,ele:i}},min:function(e,t){for(var n=1/0,i,a=this,o=0;o=0&&a"u"?"undefined":ls(Symbol))!=e&&ls(Symbol.iterator)!=e;t&&(Lx[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,o=this.length;return H7({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[e];return a??(t?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(ai(e)){var o=e;a.applyBypass(this,o,i),this.emitAndNotify("style")}else if(Ar(e))if(t===void 0){var s=this[0];return s?a.getStylePropertyValue(s,e):void 0}else a.applyBypass(this,e,t,i),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,i=t.style(),a=this;if(e===void 0)for(var o=0;o0&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});$u.neighbourhood=$u.neighborhood;$u.closedNeighbourhood=$u.closedNeighborhood;$u.openNeighbourhood=$u.openNeighborhood;kr($u,{source:jf(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},"source"),target:jf(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},"target"),sources:e3({attr:"source"}),targets:e3({attr:"target"})});function e3(r){return function(t){for(var n=[],i=0;i0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});$u.componentsOf=$u.components;var uu=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ia("A collection must have a reference to the core");return}var a=new sv,o=!1;if(!t)t=[];else if(t.length>0&&ai(t[0])&&!H1(t[0])){o=!0;for(var s=[],u=new $m,l=0,c=t.length;l0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,n=t.cy(),i=n._private,a=[],o=[],s,u=0,l=t.length;u0){for(var $=s.length===t.length?t:new uu(n,s),J=0;J<$.length;J++){var X=$[J];X.isNode()||(X.parallelEdges().clearTraversalCache(),X.source().clearTraversalCache(),X.target().clearTraversalCache())}var Z;i.hasCompoundNodes?Z=n.collection().merge($).merge($.connectedNodes()).merge($.parent()):Z=$,Z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?$.emitAndNotify("add"):e&&$.emit("add")}return t};va.removed=function(){var r=this[0];return r&&r._private.removed};va.inside=function(){var r=this[0];return r&&!r._private.removed};va.remove=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,n=[],i={},a=t._private.cy;function o(j){for(var z=j._private.edges,H=0;H0&&(r?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var L=0;L0?L=j:k=j;while(Math.abs(B)>o&&++z=a?_(I,z):H===0?z:x(I,k,k+l)}var O=!1;function E(){O=!0,(r!==e||t!==n)&&m()}var T=function(k){return O||E(),r===e&&t===n?k:k===0?0:k===1?1:y(S(k),e,n)};T.getControlPoints=function(){return[{x:r,y:e},{x:t,y:n}]};var P="generateBezier("+[r,e,t,n]+")";return T.toString=function(){return P},T}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var bJ=(function(){function r(n){return-n.tension*n.x-n.friction*n.v}function e(n,i,a){var o={x:n.x+a.dx*i,v:n.v+a.dv*i,tension:n.tension,friction:n.friction};return{dx:o.v,dv:r(o)}}function t(n,i){var a={dx:n.v,dv:r(n)},o=e(n,i*.5,a),s=e(n,i*.5,o),u=e(n,i,s),l=1/6*(a.dx+2*(o.dx+s.dx)+u.dx),c=1/6*(a.dv+2*(o.dv+s.dv)+u.dv);return n.x=n.x+l*i,n.v=n.v+c*i,n}return function n(i,a,o){var s={x:-1,v:0,tension:null,friction:null},u=[0],l=0,c=1/1e4,f=16/1e3,d,h,p;for(i=parseFloat(i)||500,a=parseFloat(a)||20,o=o||null,s.tension=i,s.friction=a,d=o!==null,d?(l=n(i,a),h=l/o*f):h=f;p=t(p||s,h),u.push(1+p.x),l+=16,Math.abs(p.x)>c&&Math.abs(p.v)>c;);return d?function(g){return u[g*(u.length-1)|0]}:l}})(),fa=function(e,t,n,i){var a=mJ(e,t,n,i);return function(o,s,u){return o+(s-o)*a(u)}},Jw={linear:function(e,t,n){return e+(t-e)*n},ease:fa(.25,.1,.25,1),"ease-in":fa(.42,0,1,1),"ease-out":fa(0,0,.58,1),"ease-in-out":fa(.42,0,.58,1),"ease-in-sine":fa(.47,0,.745,.715),"ease-out-sine":fa(.39,.575,.565,1),"ease-in-out-sine":fa(.445,.05,.55,.95),"ease-in-quad":fa(.55,.085,.68,.53),"ease-out-quad":fa(.25,.46,.45,.94),"ease-in-out-quad":fa(.455,.03,.515,.955),"ease-in-cubic":fa(.55,.055,.675,.19),"ease-out-cubic":fa(.215,.61,.355,1),"ease-in-out-cubic":fa(.645,.045,.355,1),"ease-in-quart":fa(.895,.03,.685,.22),"ease-out-quart":fa(.165,.84,.44,1),"ease-in-out-quart":fa(.77,0,.175,1),"ease-in-quint":fa(.755,.05,.855,.06),"ease-out-quint":fa(.23,1,.32,1),"ease-in-out-quint":fa(.86,0,.07,1),"ease-in-expo":fa(.95,.05,.795,.035),"ease-out-expo":fa(.19,1,.22,1),"ease-in-out-expo":fa(1,0,0,1),"ease-in-circ":fa(.6,.04,.98,.335),"ease-out-circ":fa(.075,.82,.165,1),"ease-in-out-circ":fa(.785,.135,.15,.86),spring:function(e,t,n){if(n===0)return Jw.linear;var i=bJ(e,t,n);return function(a,o,s){return a+(o-a)*i(s)}},"cubic-bezier":fa};function n3(r,e,t,n,i){if(n===1||e===t)return t;var a=i(e,t,n);return r==null||((r.roundValue||r.color)&&(a=Math.round(a)),r.min!==void 0&&(a=Math.max(a,r.min)),r.max!==void 0&&(a=Math.min(a,r.max))),a}function i3(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Zy(r,e,t,n,i){var a=i!=null?i.type:null;t<0?t=0:t>1&&(t=1);var o=i3(r,i),s=i3(e,i);if(Ht(o)&&Ht(s))return n3(a,o,s,t,n);if(ra(o)&&ra(s)){for(var u=[],l=0;l0?(h==="spring"&&p.push(o.duration),o.easingImpl=Jw[h].apply(null,p)):o.easingImpl=Jw[h]}var g=o.easingImpl,y;if(o.duration===0?y=1:y=(t-u)/o.duration,o.applying&&(y=o.progress),y<0?y=0:y>1&&(y=1),o.delay==null){var b=o.startPosition,_=o.position;if(_&&i&&!r.locked()){var m={};H0(b.x,_.x)&&(m.x=Zy(b.x,_.x,y,g)),H0(b.y,_.y)&&(m.y=Zy(b.y,_.y,y,g)),r.position(m)}var x=o.startPan,S=o.pan,O=a.pan,E=S!=null&&n;E&&(H0(x.x,S.x)&&(O.x=Zy(x.x,S.x,y,g)),H0(x.y,S.y)&&(O.y=Zy(x.y,S.y,y,g)),r.emit("pan"));var T=o.startZoom,P=o.zoom,I=P!=null&&n;I&&(H0(T,P)&&(a.zoom=b1(a.minZoom,Zy(T,P,y,g),a.maxZoom)),r.emit("zoom")),(E||I)&&r.emit("viewport");var k=o.style;if(k&&k.length>0&&i){for(var L=0;L=0;E--){var T=O[E];T()}O.splice(0,O.length)},_=h.length-1;_>=0;_--){var m=h[_],x=m._private;if(x.stopped){h.splice(_,1),x.hooked=!1,x.playing=!1,x.started=!1,b(x.frames);continue}!x.playing&&!x.applying||(x.playing&&x.applying&&(x.applying=!1),x.started||wJ(c,m,r),_J(c,m,r,f),x.applying&&(x.applying=!1),b(x.frames),x.step!=null&&x.step(r),m.completed()&&(h.splice(_,1),x.hooked=!1,x.playing=!1,x.started=!1,b(x.completes)),g=!0)}return!f&&h.length===0&&p.length===0&&n.push(c),g}for(var a=!1,o=0;o0?e.notify("draw",t):e.notify("draw")),t.unmerge(n),e.emit("step")}var xJ={animate:Ci.animate(),animation:Ci.animation(),animated:Ci.animated(),clearQueue:Ci.clearQueue(),delay:Ci.delay(),delayAnimation:Ci.delayAnimation(),stop:Ci.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&Mx(function(a){a3(a,e),t()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,o){a3(o,e)},n.beforeRenderPriorities.animations):t()}},EJ={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var i=t.qualifier;return i!=null?e!==n.target&&H1(n.target)&&i.matches(n.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return t.qualifier!=null?n.target:e}},bw=function(e){return Ar(e)?new Dp(e):e},$F={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new j2(EJ,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,bw(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,bw(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,bw(t),n),this},once:function(e,t,n){return this.emitter().one(e,bw(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}};Ci.eventAliasesOn($F);var mM={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};mM.jpeg=mM.jpg;var ex={layout:function(e){var t=this;if(e==null){Ia("Layout options must be specified to make a layout");return}if(e.name==null){Ia("A `name` must be specified to make a layout");return}var n=e.name,i=t.extension("layout",n);if(i==null){Ia("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;Ar(e.eles)?a=t.$(e.eles):a=e.eles!=null?e.eles:t.$();var o=new i(kr({},e,{cy:t,eles:a}));return o}};ex.createLayout=ex.makeLayout=ex.layout;var SJ={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&i.merge(t);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?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 e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?t.notify(n):t.notify(n,i)})}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),i=0;i0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};bM.invalidateDimensions=bM.resize;var tx={collection:function(e,t){return Ar(e)?this.$(e):rf(e)?e.collection():ra(e)?(t||(t={}),new uu(this,e,t.unique,t.removed)):new uu(this)},nodes:function(e){var t=this.$(function(n){return n.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(n){return n.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}};tx.elements=tx.filter=tx.$;var js={},Mb="t",TJ="f";js.apply=function(r){for(var e=this,t=e._private,n=t.cy,i=n.collection(),a=0;a0;if(d||f&&h){var p=void 0;d&&h||d?p=l.properties:h&&(p=l.mappedProperties);for(var g=0;g1&&(x=1),s.color){var O=n.valueMin[0],E=n.valueMax[0],T=n.valueMin[1],P=n.valueMax[1],I=n.valueMin[2],k=n.valueMax[2],L=n.valueMin[3]==null?1:n.valueMin[3],B=n.valueMax[3]==null?1:n.valueMax[3],j=[Math.round(O+(E-O)*x),Math.round(T+(P-T)*x),Math.round(I+(k-I)*x),Math.round(L+(B-L)*x)];a={bypass:n.bypass,name:n.name,value:j,strValue:"rgb("+j[0]+", "+j[1]+", "+j[2]+")"}}else if(s.number){var z=n.valueMin+(n.valueMax-n.valueMin)*x;a=this.parse(n.name,z,n.bypass,d)}else return!1;if(!a)return g(),!1;a.mapping=n,n=a;break}case o.data:{for(var H=n.field.split("."),q=f.data,W=0;W0&&a>0){for(var s={},u=!1,l=0;l0?r.delayAnimation(o).play().promise().then(m):m()}).then(function(){return r.animation({style:s,duration:a,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1)};js.checkTrigger=function(r,e,t,n,i,a){var o=this.properties[e],s=i(o);r.removed()||s!=null&&s(t,n,r)&&a(o)};js.checkZOrderTrigger=function(r,e,t,n){var i=this;this.checkTrigger(r,e,t,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",r)})};js.checkBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBounds},function(i){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};js.checkConnectedEdgesBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){r.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};js.checkParallelEdgesBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){r.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};js.checkTriggers=function(r,e,t,n){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,n),this.checkBoundsTrigger(r,e,t,n),this.checkConnectedEdgesBoundsTrigger(r,e,t,n),this.checkParallelEdgesBoundsTrigger(r,e,t,n)};var Q1={};Q1.applyBypass=function(r,e,t,n){var i=this,a=[],o=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var s=0;si.length?n=n.substr(i.length):n=""}function u(){a.length>o.length?a=a.substr(o.length):a=""}for(;;){var l=n.match(/^\s*$/);if(l)break;var c=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){Ai("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=c[0];var f=c[1];if(f!=="core"){var d=new Dp(f);if(d.invalid){Ai("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),s();continue}}var h=c[2],p=!1;a=h;for(var g=[];;){var y=a.match(/^\s*$/);if(y)break;var b=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!b){Ai("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),p=!0;break}o=b[0];var _=b[1],m=b[2],x=e.properties[_];if(!x){Ai("Skipping property: Invalid property name in: "+o),u();continue}var S=t.parse(_,m);if(!S){Ai("Skipping property: Invalid property definition in: "+o),u();continue}g.push({name:_,val:m}),u()}if(p){s();break}t.selector(f);for(var O=0;O=7&&e[0]==="d"&&(c=new RegExp(s.data.regex).exec(e))){if(t)return!1;var d=s.data;return{name:r,value:c,strValue:""+e,mapped:d,field:c[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(s.mapData.regex).exec(e))){if(t||l.multiple)return!1;var h=s.mapData;if(!(l.color||l.number))return!1;var p=this.parse(r,f[4]);if(!p||p.mapped)return!1;var g=this.parse(r,f[5]);if(!g||g.mapped)return!1;if(p.pfValue===g.pfValue||p.strValue===g.strValue)return Ai("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+p.strValue+"`"),this.parse(r,p.strValue);if(l.color){var y=p.value,b=g.value,_=y[0]===b[0]&&y[1]===b[1]&&y[2]===b[2]&&(y[3]===b[3]||(y[3]==null||y[3]===1)&&(b[3]==null||b[3]===1));if(_)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:p.value,valueMax:g.value,bypass:t}}}if(l.multiple&&n!=="multiple"){var m;if(u?m=e.split(/\s+/):ra(e)?m=e:m=[e],l.evenMultiple&&m.length%2!==0)return null;for(var x=[],S=[],O=[],E="",T=!1,P=0;P0?" ":"")+I.strValue}return l.validate&&!l.validate(x,S)?null:l.singleEnum&&T?x.length===1&&Ar(x[0])?{name:r,value:x[0],strValue:x[0],bypass:t}:null:{name:r,value:x,pfValue:O,strValue:E,bypass:t,units:S}}var k=function(){for(var fe=0;fel.max||l.strictMax&&e===l.max))return null;var H={name:r,value:e,strValue:""+e+(L||""),units:L,bypass:t};return l.unitless||L!=="px"&&L!=="em"?H.pfValue=e:H.pfValue=L==="px"||!L?e:this.getEmSizeInPixels()*e,(L==="ms"||L==="s")&&(H.pfValue=L==="ms"?e:1e3*e),(L==="deg"||L==="rad")&&(H.pfValue=L==="rad"?e:EK(e)),L==="%"&&(H.pfValue=e/100),H}else if(l.propList){var q=[],W=""+e;if(W!=="none"){for(var $=W.split(/\s*,\s*|\s+/),J=0;J<$.length;J++){var X=$[J].trim();i.properties[X]?q.push(X):Ai("`"+X+"` is not a valid property name")}if(q.length===0)return null}return{name:r,value:q,strValue:q.length===0?"none":q.join(" "),bypass:t}}else if(l.color){var Z=Q7(e);return Z?{name:r,value:Z,pfValue:Z,strValue:"rgb("+Z[0]+","+Z[1]+","+Z[2]+")",bypass:t}:null}else if(l.regex||l.regexes){if(l.enums){var ue=k();if(ue)return ue}for(var re=l.regexes?l.regexes:[l.regex],ne=0;ne0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*t)/n.w,(s-2*t)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,n=t.pan,i=t.zoom,a,o,s=!1;if(t.zoomingEnabled||(s=!0),Ht(e)?o=e:ai(e)&&(o=e.level,e.position!=null?a=P2(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!t.panningEnabled&&(s=!0)),o=o>t.maxZoom?t.maxZoom:o,o=ot.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=u,a.push("zoom"))}if(i&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;Ht(l.x)&&(t.pan.x=l.x,s=!1),Ht(l.y)&&(t.pan.y=l.y,s=!1),s||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.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(Ar(e)){var n=e;e=this.mutableElements().filter(n)}else rf(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),o=this.height();t=t===void 0?this._private.zoom:t;var s={x:(a-t*(i.x1+i.x2))/2,y:(o-t*(i.y1+i.y2))/2};return s}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,n=this;return e.sizeCache=e.sizeCache||(t?(function(){var i=n.window().getComputedStyle(t),a=function(s){return parseFloat(i.getPropertyValue(s))};return{width:t.clientWidth-a("padding-left")-a("padding-right"),height:t.clientHeight-a("padding-top")-a("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(),i={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 i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},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){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Xg.centre=Xg.center;Xg.autolockNodes=Xg.autolock;Xg.autoungrabifyNodes=Xg.autoungrabify;var E1={data:Ci.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ci.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ci.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ci.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};E1.attr=E1.data;E1.removeAttr=E1.removeData;var S1=function(e){var t=this;e=kr({},e);var n=e.container;n&&!Px(n)&&Px(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=t;var o=ss!==void 0&&n!==void 0&&!e.headless,s=e;s.layout=kr({name:o?"grid":"null"},s.layout),s.renderer=kr({name:o?"canvas":"null"},s.renderer);var u=function(p,g,y){return g!==void 0?g:y!==void 0?y:p},l=this._private={container:n,ready:!1,options:s,elements:new uu(this),listeners:[],aniEles:new uu(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,s.zoomingEnabled),userZoomingEnabled:u(!0,s.userZoomingEnabled),panningEnabled:u(!0,s.panningEnabled),userPanningEnabled:u(!0,s.userPanningEnabled),boxSelectionEnabled:u(!0,s.boxSelectionEnabled),autolock:u(!1,s.autolock,s.autolockNodes),autoungrabify:u(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:u(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:Ht(s.zoom)?s.zoom:1,pan:{x:ai(s.pan)&&Ht(s.pan.x)?s.pan.x:0,y:ai(s.pan)&&Ht(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var c=function(p,g){var y=p.some(y$);if(y)return Km.all(p).then(g);g(p)};l.styleEnabled&&t.setStyle([]);var f=kr({},s,s.renderer);t.initRenderer(f);var d=function(p,g,y){t.notifications(!1);var b=t.mutableElements();b.length>0&&b.remove(),p!=null&&(ai(p)||ra(p))&&t.add(p),t.one("layoutready",function(m){t.notifications(!0),t.emit(m),t.one("load",g),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",y),t.emit("done")});var _=kr({},t._private.options.layout);_.eles=t.elements(),t.layout(_).run()};c([s.style,s.elements],function(h){var p=h[0],g=h[1];l.styleEnabled&&t.style().append(p),d(g,function(){t.startAnimationLoop(),l.ready=!0,Ya(s.ready)&&t.on("ready",s.ready);for(var y=0;y0,s=!!r.boundingBox,u=zl(s?r.boundingBox:structuredClone(e.extent())),l;if(rf(r.roots))l=r.roots;else if(ra(r.roots)){for(var c=[],f=0;f0;){var j=B(),z=P(j,k);if(z)j.outgoers().filter(function(Q){return Q.isNode()&&t.has(Q)}).forEach(L);else if(z===null){Ai("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var H=0;if(r.avoidOverlap)for(var q=0;q0&&b[0].length<=3?Ie/2:0),ot=2*Math.PI/b[Ee].length*Me;return Ee===0&&b[0].length===1&&(Ye=1),{x:ge.x+Ye*Math.cos(ot),y:ge.y+Ye*Math.sin(ot)}}else{var mt=b[Ee].length,wt=Math.max(mt===1?0:s?(u.w-r.padding*2-Oe.w)/((r.grid?De:mt)-1):(u.w-r.padding*2-Oe.w)/((r.grid?De:mt)+1),H),Mt={x:ge.x+(Me+1-(mt+1)/2)*wt,y:ge.y+(Ee+1-(ne+1)/2)*ke};return Mt}},Ce={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Ce).indexOf(r.direction)===-1&&Ia("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ce).join(", ")));var Y=function(ie){return W$(Ne(ie),u,Ce[r.direction])};return t.nodes().layoutPositions(this,r,Y),this};var MJ={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*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 ZF(r){this.options=kr({},MJ,r)}ZF.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var o=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,l=u/Math.max(1,a.length-1),c,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var b=Math.cos(l)-Math.cos(0),_=Math.sin(l)-Math.sin(0),m=Math.sqrt(f*f/(b*b+_*_));c=Math.max(m,c)}var x=function(O,E){var T=e.startAngle+E*l*(i?1:-1),P=c*Math.cos(T),I=c*Math.sin(T),k={x:s.x+P,y:s.y+I};return k};return n.nodes().layoutPositions(this,e,x),this};var DJ={fit:!0,padding:30,startAngle:3/2*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 QF(r){this.options=kr({},DJ,r)}QF.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=r.cy,i=e.eles,a=i.nodes().not(":parent"),o=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],l=0,c=0;c0){var S=Math.abs(_[0].value-x.value);S>=y&&(_=[],b.push(_))}_.push(x)}var O=l+e.minNodeSpacing;if(!e.avoidOverlap){var E=b.length>0&&b[0].length>1,T=Math.min(o.w,o.h)/2-O,P=T/(b.length+E?1:0);O=Math.min(O,P)}for(var I=0,k=0;k1&&e.avoidOverlap){var z=Math.cos(j)-Math.cos(0),H=Math.sin(j)-Math.sin(0),q=Math.sqrt(O*O/(z*z+H*H));I=Math.max(q,I)}L.r=I,I+=O}if(e.equidistant){for(var W=0,$=0,J=0;J=r.numIter||(FJ(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature=r.animationThreshold&&a(),Mx(c)}};c()}else{for(;l;)l=o(u),u++;u3(n,r),s()}return this};q2.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};q2.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var IJ=function(e,t,n){for(var i=n.eles.edges(),a=n.eles.nodes(),o=zl(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),l={},c=0;c0){s.graphSet.push(T);for(var c=0;ci.count?0:i.graph},JF=function(e,t,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*c,d=Math.sqrt(s*s+u*u),h=f*s/d,p=f*u/d;else var g=Bx(e,s,u),y=Bx(t,-1*s,-1*u),b=y.x-g.x,_=y.y-g.y,m=b*b+_*_,d=Math.sqrt(m),f=(e.nodeRepulsion+t.nodeRepulsion)/m,h=f*b/d,p=f*_/d;e.isLocked||(e.offsetX-=h,e.offsetY-=p),t.isLocked||(t.offsetX+=h,t.offsetY+=p)}},qJ=function(e,t,n,i){if(n>0)var a=e.maxX-t.minX;else var a=t.maxX-e.minX;if(i>0)var o=e.maxY-t.minY;else var o=t.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},Bx=function(e,t,n){var i=e.positionX,a=e.positionY,o=e.height||1,s=e.width||1,u=n/t,l=o/s,c={};return t===0&&0n?(c.x=i,c.y=a+o/2,c):0t&&-1*l<=u&&u<=l?(c.x=i-s/2,c.y=a-s*n/2/t,c):0=l)?(c.x=i+o*t/2/n,c.y=a+o/2,c):(0>n&&(u<=-1*l||u>=l)&&(c.x=i-o*t/2/n,c.y=a-o/2),c)},GJ=function(e,t){for(var n=0;nn){var y=t.gravity*h/g,b=t.gravity*p/g;d.offsetX+=y,d.offsetY+=b}}}}},HJ=function(e,t){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var o=n[i++],s=e.idToIndex[o],u=e.layoutNodes[s],l=u.children;if(0n)var a={x:n*e/i,y:n*t/i};else var a={x:e,y:t};return a},tU=function(e,t){var n=e.parentId;if(n!=null){var i=t.layoutNodes[t.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopb&&(p+=y+t.componentSpacing,h=0,g=0,y=0)}}},XJ={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 rU(r){this.options=kr({},XJ,r)}rU.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(ue){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),u=Math.round(s),l=Math.round(a.w/a.h*s),c=function(re){if(re==null)return Math.min(u,l);var ne=Math.min(u,l);ne==u?u=re:l=re},f=function(re){if(re==null)return Math.max(u,l);var ne=Math.max(u,l);ne==u?u=re:l=re},d=e.rows,h=e.cols!=null?e.cols:e.columns;if(d!=null&&h!=null)u=d,l=h;else if(d!=null&&h==null)u=d,l=Math.ceil(o/u);else if(d==null&&h!=null)l=h,u=Math.ceil(o/l);else if(l*u>o){var p=c(),g=f();(p-1)*g>=o?c(p-1):(g-1)*p>=o&&f(g-1)}else for(;l*u=o?f(b+1):c(y+1)}var _=a.w/l,m=a.h/u;if(e.condense&&(_=0,m=0),e.avoidOverlap)for(var x=0;x=l&&(z=0,j++)},q={},W=0;W(z=jK(r,e,H[q],H[q+1],H[q+2],H[q+3])))return y(E,z),!0}else if(P.edgeType==="bezier"||P.edgeType==="multibezier"||P.edgeType==="self"||P.edgeType==="compound"){for(var H=P.allpts,q=0;q+5(z=LK(r,e,H[q],H[q+1],H[q+2],H[q+3],H[q+4],H[q+5])))return y(E,z),!0}for(var W=W||T.source,$=$||T.target,J=i.getArrowWidth(I,k),X=[{name:"source",x:P.arrowStartX,y:P.arrowStartY,angle:P.srcArrowAngle},{name:"target",x:P.arrowEndX,y:P.arrowEndY,angle:P.tgtArrowAngle},{name:"mid-source",x:P.midX,y:P.midY,angle:P.midsrcArrowAngle},{name:"mid-target",x:P.midX,y:P.midY,angle:P.midtgtArrowAngle}],q=0;q0&&(b(W),b($))}function m(E,T,P){return Tc(E,T,P)}function x(E,T){var P=E._private,I=d,k;T?k=T+"-":k="",E.boundingBox();var L=P.labelBounds[T||"main"],B=E.pstyle(k+"label").value,j=E.pstyle("text-events").strValue==="yes";if(!(!j||!B)){var z=m(P.rscratch,"labelX",T),H=m(P.rscratch,"labelY",T),q=m(P.rscratch,"labelAngle",T),W=E.pstyle(k+"text-margin-x").pfValue,$=E.pstyle(k+"text-margin-y").pfValue,J=L.x1-I-W,X=L.x2+I-W,Z=L.y1-I-$,ue=L.y2+I-$;if(q){var re=Math.cos(q),ne=Math.sin(q),le=function(Oe,ke){return Oe=Oe-z,ke=ke-H,{x:Oe*re-ke*ne+z,y:Oe*ne+ke*re+H}},ce=le(J,Z),pe=le(J,ue),fe=le(X,Z),se=le(X,ue),de=[ce.x+W,ce.y+$,fe.x+W,fe.y+$,se.x+W,se.y+$,pe.x+W,pe.y+$];if(Cc(r,e,de))return y(E),!0}else if(pp(L,r,e))return y(E),!0}}for(var S=o.length-1;S>=0;S--){var O=o[S];O.isNode()?b(O)||x(O):_(O)||x(O)||x(O,"source")||x(O,"target")}return s};ry.getAllInBox=function(r,e,t,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),o=2/a,s=[],u=Math.min(r,t),l=Math.max(r,t),c=Math.min(e,n),f=Math.max(e,n);r=u,t=l,e=c,n=f;var d=zl({x1:r,y1:e,x2:t,y2:n}),h=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],p=[[h[0],h[1]],[h[1],h[2]],[h[2],h[3]],[h[3],h[0]]];function g(Oe,ke,De){return Tc(Oe,ke,De)}function y(Oe,ke){var De=Oe._private,Ne=o,Ce="";Oe.boundingBox();var Y=De.labelBounds.main;if(!Y)return null;var Q=g(De.rscratch,"labelX",ke),ie=g(De.rscratch,"labelY",ke),we=g(De.rscratch,"labelAngle",ke),Ee=Oe.pstyle(Ce+"text-margin-x").pfValue,Me=Oe.pstyle(Ce+"text-margin-y").pfValue,Ie=Y.x1-Ne-Ee,Ye=Y.x2+Ne-Ee,ot=Y.y1-Ne-Me,mt=Y.y2+Ne-Me;if(we){var wt=Math.cos(we),Mt=Math.sin(we),Dt=function(tt,_e){return tt=tt-Q,_e=_e-ie,{x:tt*wt-_e*Mt+Q,y:tt*Mt+_e*wt+ie}};return[Dt(Ie,ot),Dt(Ye,ot),Dt(Ye,mt),Dt(Ie,mt)]}else return[{x:Ie,y:ot},{x:Ye,y:ot},{x:Ye,y:mt},{x:Ie,y:mt}]}function b(Oe,ke,De,Ne){function Ce(Y,Q,ie){return(ie.y-Y.y)*(Q.x-Y.x)>(Q.y-Y.y)*(ie.x-Y.x)}return Ce(Oe,De,Ne)!==Ce(ke,De,Ne)&&Ce(Oe,ke,De)!==Ce(Oe,ke,Ne)}for(var _=0;_0?-(Math.PI-e.ang):Math.PI+e.ang},eee=function(e,t,n,i,a){if(e!==h3?v3(t,e,ph):JJ(Df,ph),v3(t,n,Df),f3=ph.nx*Df.ny-ph.ny*Df.nx,d3=ph.nx*Df.nx-ph.ny*-Df.ny,tv=Math.asin(Math.max(-1,Math.min(1,f3))),Math.abs(tv)<1e-6){_M=t.x,wM=t.y,Ag=Jy=0;return}Ng=1,rx=!1,d3<0?tv<0?tv=Math.PI+tv:(tv=Math.PI-tv,Ng=-1,rx=!0):tv>0&&(Ng=-1,rx=!0),t.radius!==void 0?Jy=t.radius:Jy=i,Eg=tv/2,_w=Math.min(ph.len/2,Df.len/2),a?(sh=Math.abs(Math.cos(Eg)*Jy/Math.sin(Eg)),sh>_w?(sh=_w,Ag=Math.abs(sh*Math.sin(Eg)/Math.cos(Eg))):Ag=Jy):(sh=Math.min(_w,Jy),Ag=Math.abs(sh*Math.sin(Eg)/Math.cos(Eg))),xM=t.x+Df.nx*sh,EM=t.y+Df.ny*sh,_M=xM-Df.ny*Ag*Ng,wM=EM+Df.nx*Ag*Ng,oU=t.x+ph.nx*sh,sU=t.y+ph.ny*sh,h3=t};function uU(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function lD(r,e,t,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(eee(r,e,t,n,i),{cx:_M,cy:wM,radius:Ag,startX:oU,startY:sU,stopX:xM,stopY:EM,startAngle:ph.ang+Math.PI/2*Ng,endAngle:Df.ang-Math.PI/2*Ng,counterClockwise:rx})}var O1=.01,tee=Math.sqrt(2*O1),Zu={};Zu.findMidptPtsEtc=function(r,e){var t=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,o=r.pstyle("source-endpoint"),s=r.pstyle("target-endpoint"),u=o.units!=null&&s.units!=null,l=function(S,O,E,T){var P=T-O,I=E-S,k=Math.sqrt(I*I+P*P);return{x:-P/k,y:I/k}},c=r.pstyle("edge-distances").value;switch(c){case"node-position":a=t;break;case"intersection":a=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(r.source()[0],o),d=Uo(f,2),h=d[0],p=d[1],g=this.manualEndptToPx(r.target()[0],s),y=Uo(g,2),b=y[0],_=y[1],m={x1:h,y1:p,x2:b,y2:_};i=l(h,p,b,_),a=m}else Ai("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Zu.findHaystackPoints=function(r){for(var e=0;e0?Math.max(_e-Ue,0):Math.min(_e+Ue,0)},B=L(I,T),j=L(k,P),z=!1;_===l?b=Math.abs(B)>Math.abs(j)?i:n:_===u||_===s?(b=n,z=!0):(_===a||_===o)&&(b=i,z=!0);var H=b===n,q=H?j:B,W=H?k:I,$=K5(W),J=!1;!(z&&(x||O))&&(_===s&&W<0||_===u&&W>0||_===a&&W>0||_===o&&W<0)&&($*=-1,q=$*Math.abs(q),J=!0);var X;if(x){var Z=S<0?1+S:S;X=Z*q}else{var ue=S<0?q:0;X=ue+S*$}var re=function(_e){return Math.abs(_e)=Math.abs(q)},ne=re(X),le=re(Math.abs(q)-Math.abs(X)),ce=ne||le;if(ce&&!J)if(H){var pe=Math.abs(W)<=d/2,fe=Math.abs(I)<=h/2;if(pe){var se=(c.x1+c.x2)/2,de=c.y1,ge=c.y2;t.segpts=[se,de,se,ge]}else if(fe){var Oe=(c.y1+c.y2)/2,ke=c.x1,De=c.x2;t.segpts=[ke,Oe,De,Oe]}else t.segpts=[c.x1,c.y2]}else{var Ne=Math.abs(W)<=f/2,Ce=Math.abs(k)<=p/2;if(Ne){var Y=(c.y1+c.y2)/2,Q=c.x1,ie=c.x2;t.segpts=[Q,Y,ie,Y]}else if(Ce){var we=(c.x1+c.x2)/2,Ee=c.y1,Me=c.y2;t.segpts=[we,Ee,we,Me]}else t.segpts=[c.x2,c.y1]}else if(H){var Ie=c.y1+X+(y?d/2*$:0),Ye=c.x1,ot=c.x2;t.segpts=[Ye,Ie,ot,Ie]}else{var mt=c.x1+X+(y?f/2*$:0),wt=c.y1,Mt=c.y2;t.segpts=[mt,wt,mt,Mt]}if(t.isRound){var Dt=r.pstyle("taxi-radius").value,vt=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(Dt),t.isArcRadius=new Array(t.segpts.length/2).fill(vt)}};Zu.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,s=e.tgtW,u=e.tgtH,l=e.srcShape,c=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,h=e.srcRs,p=e.tgtRs,g=!Ht(t.startX)||!Ht(t.startY),y=!Ht(t.arrowStartX)||!Ht(t.arrowStartY),b=!Ht(t.endX)||!Ht(t.endY),_=!Ht(t.arrowEndX)||!Ht(t.arrowEndY),m=3,x=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,S=m*x,O=Wg({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),E=OW.poolIndex()){var $=q;q=W,W=$}var J=B.srcPos=q.position(),X=B.tgtPos=W.position(),Z=B.srcW=q.outerWidth(),ue=B.srcH=q.outerHeight(),re=B.tgtW=W.outerWidth(),ne=B.tgtH=W.outerHeight(),le=B.srcShape=t.nodeShapes[e.getNodeShape(q)],ce=B.tgtShape=t.nodeShapes[e.getNodeShape(W)],pe=B.srcCornerRadius=q.pstyle("corner-radius").value==="auto"?"auto":q.pstyle("corner-radius").pfValue,fe=B.tgtCornerRadius=W.pstyle("corner-radius").value==="auto"?"auto":W.pstyle("corner-radius").pfValue,se=B.tgtRs=W._private.rscratch,de=B.srcRs=q._private.rscratch;B.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ge=0;ge=tee||(ot=Math.sqrt(Math.max(Ye*Ye,O1)+Math.max(Ie*Ie,O1)));var mt=B.vector={x:Ye,y:Ie},wt=B.vectorNorm={x:mt.x/ot,y:mt.y/ot},Mt={x:-wt.y,y:wt.x};B.nodesOverlap=!Ht(ot)||ce.checkPoint(Y[0],Y[1],0,re,ne,X.x,X.y,fe,se)||le.checkPoint(ie[0],ie[1],0,Z,ue,J.x,J.y,pe,de),B.vectorNormInverse=Mt,j={nodesOverlap:B.nodesOverlap,dirCounts:B.dirCounts,calculatedIntersection:!0,hasBezier:B.hasBezier,hasUnbundled:B.hasUnbundled,eles:B.eles,srcPos:X,srcRs:se,tgtPos:J,tgtRs:de,srcW:re,srcH:ne,tgtW:Z,tgtH:ue,srcIntn:we,tgtIntn:Q,srcShape:ce,tgtShape:le,posPts:{x1:Me.x2,y1:Me.y2,x2:Me.x1,y2:Me.y1},intersectionPts:{x1:Ee.x2,y1:Ee.y2,x2:Ee.x1,y2:Ee.y1},vector:{x:-mt.x,y:-mt.y},vectorNorm:{x:-wt.x,y:-wt.y},vectorNormInverse:{x:-Mt.x,y:-Mt.y}}}var Dt=Ce?j:B;ke.nodesOverlap=Dt.nodesOverlap,ke.srcIntn=Dt.srcIntn,ke.tgtIntn=Dt.tgtIntn,ke.isRound=De.startsWith("round"),i&&(q.isParent()||q.isChild()||W.isParent()||W.isChild())&&(q.parents().anySame(W)||W.parents().anySame(q)||q.same(W)&&q.isParent())?e.findCompoundLoopPoints(Oe,Dt,ge,Ne):q===W?e.findLoopPoints(Oe,Dt,ge,Ne):De.endsWith("segments")?e.findSegmentsPoints(Oe,Dt):De.endsWith("taxi")?e.findTaxiPoints(Oe,Dt):De==="straight"||!Ne&&B.eles.length%2===1&&ge===Math.floor(B.eles.length/2)?e.findStraightEdgePoints(Oe):e.findBezierPoints(Oe,Dt,ge,Ne,Ce),e.findEndpoints(Oe),e.tryToCorrectInvalidPoints(Oe,Dt),e.checkForInvalidEdgeWarning(Oe),e.storeAllpts(Oe),e.storeEdgeProjections(Oe),e.calculateArrowAngles(Oe),e.recalculateEdgeLabelProjections(Oe),e.calculateLabelAngles(Oe)}},E=0;E0){var Y=l,Q=Cg(Y,vm(o)),ie=Cg(Y,vm(Ce)),we=Q;if(ie2){var Ee=Cg(Y,{x:Ce[2],y:Ce[3]});Ee0){var Qe=c,Ze=Cg(Qe,vm(o)),nt=Cg(Qe,vm(Ue)),It=Ze;if(nt2){var ct=Cg(Qe,{x:Ue[2],y:Ue[3]});ct=p||E){y={cp:x,segment:O};break}}if(y)break}var T=y.cp,P=y.segment,I=(p-b)/P.length,k=P.t1-P.t0,L=h?P.t0+k*I:P.t1-k*I;L=b1(0,L,1),e=wm(T.p0,T.p1,T.p2,L),d=nee(T.p0,T.p1,T.p2,L);break}case"straight":case"segments":case"haystack":{for(var B=0,j,z,H,q,W=n.allpts.length,$=0;$+3=p));$+=2);var J=p-z,X=J/j;X=b1(0,X,1),e=OK(H,q,X),d=fU(H,q);break}}o("labelX",f,e.x),o("labelY",f,e.y),o("labelAutoAngle",f,d)}};l("source"),l("target"),this.applyLabelDimensions(r)}};Oh.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Oh.applyPrefixedLabelDimensions=function(r,e){var t=r._private,n=this.getLabelText(r,e),i=Hg(n,r._private.labelDimsKey);if(Tc(t.rscratch,"prefixedLabelDimsKey",e)!==i){ov(t.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(r,n),o=r.pstyle("line-height").pfValue,s=r.pstyle("text-wrap").strValue,u=Tc(t.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(u.length,1),c=a.height/l,f=c*o,d=a.width,h=a.height+(l-1)*(o-1)*c;ov(t.rstyle,"labelWidth",e,d),ov(t.rscratch,"labelWidth",e,d),ov(t.rstyle,"labelHeight",e,h),ov(t.rscratch,"labelHeight",e,h),ov(t.rscratch,"labelLineHeight",e,f)}};Oh.getLabelText=function(r,e){var t=r._private,n=e?e+"-":"",i=r.pstyle(n+"label").strValue,a=r.pstyle("text-transform").value,o=function(ue,re){return re?(ov(t.rscratch,ue,e,re),re):Tc(t.rscratch,ue,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var s=r.pstyle("text-wrap").value;if(s==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var l="​",c=i.split(` +*/var zF=function(e,t){this.recycle(e,t)};function V0(){return!1}function yw(){return!0}zF.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=V0,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?yw:V0):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type!=null?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,i=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*i+a.x,y:n.y*i+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=yw;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=yw;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=yw,this.stopPropagation()},isDefaultPrevented:V0,isPropagationStopped:V0,isImmediatePropagationStopped:V0};var qF=/^([^.]+)(\.(?:[^.]+))?$/,oJ=".*",GF={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},XN=Object.keys(GF),sJ={};function j2(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sJ,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;s--)o(s);return this};Ip.removeAllListeners=function(){return this.removeListener("*")};Ip.emit=Ip.trigger=function(r,e,t){var n=this.listeners,i=n.length;return this.emitting++,ra(e)||(e=[e]),uJ(this,function(a,o){t!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:t}],i=n.length);for(var s=function(){var c=n[u];if(c.type===o.type&&(!c.namespace||c.namespace===o.namespace||c.namespace===oJ)&&a.eventMatches(a.context,c,o)){var f=[o];e!=null&&Q$(f,e),a.beforeEmit(a.context,c,o),c.conf&&c.conf.one&&(a.listeners=a.listeners.filter(function(p){return p!==c}));var d=a.callbackContext(a.context,c,o),h=c.callback.apply(d,f);a.afterEmit(a.context,c,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u1&&!o){var s=this.length-1,u=this[s],l=u._private.data.id;this[s]=void 0,this[e]=u,a.set(l,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,i=t.map,a=i.get(n);if(!a)return this;var o=a.index;return this.unmergeAt(o),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&Ar(e)){var n=e;e=t.mutableElements().filter(n)}for(var i=0;i=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],i=this,a=0;an&&(n=u,i=s)}return{value:n,ele:i}},min:function(e,t){for(var n=1/0,i,a=this,o=0;o=0&&a"u"?"undefined":ls(Symbol))!=e&&ls(Symbol.iterator)!=e;t&&(Lx[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,o=this.length;return H7({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[e];return a??(t?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(ai(e)){var o=e;a.applyBypass(this,o,i),this.emitAndNotify("style")}else if(Ar(e))if(t===void 0){var s=this[0];return s?a.getStylePropertyValue(s,e):void 0}else a.applyBypass(this,e,t,i),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,i=t.style(),a=this;if(e===void 0)for(var o=0;o0&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});$u.neighbourhood=$u.neighborhood;$u.closedNeighbourhood=$u.closedNeighborhood;$u.openNeighbourhood=$u.openNeighborhood;kr($u,{source:jf(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},"source"),target:jf(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},"target"),sources:e3({attr:"source"}),targets:e3({attr:"target"})});function e3(r){return function(t){for(var n=[],i=0;i0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});$u.componentsOf=$u.components;var uu=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ia("A collection must have a reference to the core");return}var a=new sv,o=!1;if(!t)t=[];else if(t.length>0&&ai(t[0])&&!H1(t[0])){o=!0;for(var s=[],u=new $m,l=0,c=t.length;l0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,n=t.cy(),i=n._private,a=[],o=[],s,u=0,l=t.length;u0){for(var $=s.length===t.length?t:new uu(n,s),J=0;J<$.length;J++){var X=$[J];X.isNode()||(X.parallelEdges().clearTraversalCache(),X.source().clearTraversalCache(),X.target().clearTraversalCache())}var Z;i.hasCompoundNodes?Z=n.collection().merge($).merge($.connectedNodes()).merge($.parent()):Z=$,Z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?$.emitAndNotify("add"):e&&$.emit("add")}return t};va.removed=function(){var r=this[0];return r&&r._private.removed};va.inside=function(){var r=this[0];return r&&!r._private.removed};va.remove=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,n=[],i={},a=t._private.cy;function o(j){for(var z=j._private.edges,H=0;H0&&(r?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var L=0;L0?L=j:k=j;while(Math.abs(B)>o&&++z=a?_(I,z):H===0?z:x(I,k,k+l)}var O=!1;function E(){O=!0,(r!==e||t!==n)&&m()}var T=function(k){return O||E(),r===e&&t===n?k:k===0?0:k===1?1:y(S(k),e,n)};T.getControlPoints=function(){return[{x:r,y:e},{x:t,y:n}]};var P="generateBezier("+[r,e,t,n]+")";return T.toString=function(){return P},T}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var bJ=(function(){function r(n){return-n.tension*n.x-n.friction*n.v}function e(n,i,a){var o={x:n.x+a.dx*i,v:n.v+a.dv*i,tension:n.tension,friction:n.friction};return{dx:o.v,dv:r(o)}}function t(n,i){var a={dx:n.v,dv:r(n)},o=e(n,i*.5,a),s=e(n,i*.5,o),u=e(n,i,s),l=1/6*(a.dx+2*(o.dx+s.dx)+u.dx),c=1/6*(a.dv+2*(o.dv+s.dv)+u.dv);return n.x=n.x+l*i,n.v=n.v+c*i,n}return function n(i,a,o){var s={x:-1,v:0,tension:null,friction:null},u=[0],l=0,c=1/1e4,f=16/1e3,d,h,p;for(i=parseFloat(i)||500,a=parseFloat(a)||20,o=o||null,s.tension=i,s.friction=a,d=o!==null,d?(l=n(i,a),h=l/o*f):h=f;p=t(p||s,h),u.push(1+p.x),l+=16,Math.abs(p.x)>c&&Math.abs(p.v)>c;);return d?function(g){return u[g*(u.length-1)|0]}:l}})(),fa=function(e,t,n,i){var a=mJ(e,t,n,i);return function(o,s,u){return o+(s-o)*a(u)}},Jw={linear:function(e,t,n){return e+(t-e)*n},ease:fa(.25,.1,.25,1),"ease-in":fa(.42,0,1,1),"ease-out":fa(0,0,.58,1),"ease-in-out":fa(.42,0,.58,1),"ease-in-sine":fa(.47,0,.745,.715),"ease-out-sine":fa(.39,.575,.565,1),"ease-in-out-sine":fa(.445,.05,.55,.95),"ease-in-quad":fa(.55,.085,.68,.53),"ease-out-quad":fa(.25,.46,.45,.94),"ease-in-out-quad":fa(.455,.03,.515,.955),"ease-in-cubic":fa(.55,.055,.675,.19),"ease-out-cubic":fa(.215,.61,.355,1),"ease-in-out-cubic":fa(.645,.045,.355,1),"ease-in-quart":fa(.895,.03,.685,.22),"ease-out-quart":fa(.165,.84,.44,1),"ease-in-out-quart":fa(.77,0,.175,1),"ease-in-quint":fa(.755,.05,.855,.06),"ease-out-quint":fa(.23,1,.32,1),"ease-in-out-quint":fa(.86,0,.07,1),"ease-in-expo":fa(.95,.05,.795,.035),"ease-out-expo":fa(.19,1,.22,1),"ease-in-out-expo":fa(1,0,0,1),"ease-in-circ":fa(.6,.04,.98,.335),"ease-out-circ":fa(.075,.82,.165,1),"ease-in-out-circ":fa(.785,.135,.15,.86),spring:function(e,t,n){if(n===0)return Jw.linear;var i=bJ(e,t,n);return function(a,o,s){return a+(o-a)*i(s)}},"cubic-bezier":fa};function n3(r,e,t,n,i){if(n===1||e===t)return t;var a=i(e,t,n);return r==null||((r.roundValue||r.color)&&(a=Math.round(a)),r.min!==void 0&&(a=Math.max(a,r.min)),r.max!==void 0&&(a=Math.min(a,r.max))),a}function i3(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Zy(r,e,t,n,i){var a=i!=null?i.type:null;t<0?t=0:t>1&&(t=1);var o=i3(r,i),s=i3(e,i);if(Ht(o)&&Ht(s))return n3(a,o,s,t,n);if(ra(o)&&ra(s)){for(var u=[],l=0;l0?(h==="spring"&&p.push(o.duration),o.easingImpl=Jw[h].apply(null,p)):o.easingImpl=Jw[h]}var g=o.easingImpl,y;if(o.duration===0?y=1:y=(t-u)/o.duration,o.applying&&(y=o.progress),y<0?y=0:y>1&&(y=1),o.delay==null){var b=o.startPosition,_=o.position;if(_&&i&&!r.locked()){var m={};H0(b.x,_.x)&&(m.x=Zy(b.x,_.x,y,g)),H0(b.y,_.y)&&(m.y=Zy(b.y,_.y,y,g)),r.position(m)}var x=o.startPan,S=o.pan,O=a.pan,E=S!=null&&n;E&&(H0(x.x,S.x)&&(O.x=Zy(x.x,S.x,y,g)),H0(x.y,S.y)&&(O.y=Zy(x.y,S.y,y,g)),r.emit("pan"));var T=o.startZoom,P=o.zoom,I=P!=null&&n;I&&(H0(T,P)&&(a.zoom=b1(a.minZoom,Zy(T,P,y,g),a.maxZoom)),r.emit("zoom")),(E||I)&&r.emit("viewport");var k=o.style;if(k&&k.length>0&&i){for(var L=0;L=0;E--){var T=O[E];T()}O.splice(0,O.length)},_=h.length-1;_>=0;_--){var m=h[_],x=m._private;if(x.stopped){h.splice(_,1),x.hooked=!1,x.playing=!1,x.started=!1,b(x.frames);continue}!x.playing&&!x.applying||(x.playing&&x.applying&&(x.applying=!1),x.started||wJ(c,m,r),_J(c,m,r,f),x.applying&&(x.applying=!1),b(x.frames),x.step!=null&&x.step(r),m.completed()&&(h.splice(_,1),x.hooked=!1,x.playing=!1,x.started=!1,b(x.completes)),g=!0)}return!f&&h.length===0&&p.length===0&&n.push(c),g}for(var a=!1,o=0;o0?e.notify("draw",t):e.notify("draw")),t.unmerge(n),e.emit("step")}var xJ={animate:Ci.animate(),animation:Ci.animation(),animated:Ci.animated(),clearQueue:Ci.clearQueue(),delay:Ci.delay(),delayAnimation:Ci.delayAnimation(),stop:Ci.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&Mx(function(a){a3(a,e),t()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,o){a3(o,e)},n.beforeRenderPriorities.animations):t()}},EJ={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var i=t.qualifier;return i!=null?e!==n.target&&H1(n.target)&&i.matches(n.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return t.qualifier!=null?n.target:e}},bw=function(e){return Ar(e)?new Dp(e):e},$F={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new j2(EJ,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,bw(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,bw(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,bw(t),n),this},once:function(e,t,n){return this.emitter().one(e,bw(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}};Ci.eventAliasesOn($F);var mM={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};mM.jpeg=mM.jpg;var ex={layout:function(e){var t=this;if(e==null){Ia("Layout options must be specified to make a layout");return}if(e.name==null){Ia("A `name` must be specified to make a layout");return}var n=e.name,i=t.extension("layout",n);if(i==null){Ia("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;Ar(e.eles)?a=t.$(e.eles):a=e.eles!=null?e.eles:t.$();var o=new i(kr({},e,{cy:t,eles:a}));return o}};ex.createLayout=ex.makeLayout=ex.layout;var SJ={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&i.merge(t);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?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 e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?t.notify(n):t.notify(n,i)})}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),i=0;i0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};bM.invalidateDimensions=bM.resize;var tx={collection:function(e,t){return Ar(e)?this.$(e):rf(e)?e.collection():ra(e)?(t||(t={}),new uu(this,e,t.unique,t.removed)):new uu(this)},nodes:function(e){var t=this.$(function(n){return n.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(n){return n.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}};tx.elements=tx.filter=tx.$;var js={},Mb="t",TJ="f";js.apply=function(r){for(var e=this,t=e._private,n=t.cy,i=n.collection(),a=0;a0;if(d||f&&h){var p=void 0;d&&h||d?p=l.properties:h&&(p=l.mappedProperties);for(var g=0;g1&&(x=1),s.color){var O=n.valueMin[0],E=n.valueMax[0],T=n.valueMin[1],P=n.valueMax[1],I=n.valueMin[2],k=n.valueMax[2],L=n.valueMin[3]==null?1:n.valueMin[3],B=n.valueMax[3]==null?1:n.valueMax[3],j=[Math.round(O+(E-O)*x),Math.round(T+(P-T)*x),Math.round(I+(k-I)*x),Math.round(L+(B-L)*x)];a={bypass:n.bypass,name:n.name,value:j,strValue:"rgb("+j[0]+", "+j[1]+", "+j[2]+")"}}else if(s.number){var z=n.valueMin+(n.valueMax-n.valueMin)*x;a=this.parse(n.name,z,n.bypass,d)}else return!1;if(!a)return g(),!1;a.mapping=n,n=a;break}case o.data:{for(var H=n.field.split("."),q=f.data,W=0;W0&&a>0){for(var s={},u=!1,l=0;l0?r.delayAnimation(o).play().promise().then(m):m()}).then(function(){return r.animation({style:s,duration:a,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(r,i),r.emitAndNotify("style"),n.transitioning=!1)};js.checkTrigger=function(r,e,t,n,i,a){var o=this.properties[e],s=i(o);r.removed()||s!=null&&s(t,n,r)&&a(o)};js.checkZOrderTrigger=function(r,e,t,n){var i=this;this.checkTrigger(r,e,t,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",r)})};js.checkBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBounds},function(i){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};js.checkConnectedEdgesBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){r.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};js.checkParallelEdgesBoundsTrigger=function(r,e,t,n){this.checkTrigger(r,e,t,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){r.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};js.checkTriggers=function(r,e,t,n){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,n),this.checkBoundsTrigger(r,e,t,n),this.checkConnectedEdgesBoundsTrigger(r,e,t,n),this.checkParallelEdgesBoundsTrigger(r,e,t,n)};var Q1={};Q1.applyBypass=function(r,e,t,n){var i=this,a=[],o=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var s=0;si.length?n=n.substr(i.length):n=""}function u(){a.length>o.length?a=a.substr(o.length):a=""}for(;;){var l=n.match(/^\s*$/);if(l)break;var c=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){Ai("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=c[0];var f=c[1];if(f!=="core"){var d=new Dp(f);if(d.invalid){Ai("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),s();continue}}var h=c[2],p=!1;a=h;for(var g=[];;){var y=a.match(/^\s*$/);if(y)break;var b=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!b){Ai("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),p=!0;break}o=b[0];var _=b[1],m=b[2],x=e.properties[_];if(!x){Ai("Skipping property: Invalid property name in: "+o),u();continue}var S=t.parse(_,m);if(!S){Ai("Skipping property: Invalid property definition in: "+o),u();continue}g.push({name:_,val:m}),u()}if(p){s();break}t.selector(f);for(var O=0;O=7&&e[0]==="d"&&(c=new RegExp(s.data.regex).exec(e))){if(t)return!1;var d=s.data;return{name:r,value:c,strValue:""+e,mapped:d,field:c[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(s.mapData.regex).exec(e))){if(t||l.multiple)return!1;var h=s.mapData;if(!(l.color||l.number))return!1;var p=this.parse(r,f[4]);if(!p||p.mapped)return!1;var g=this.parse(r,f[5]);if(!g||g.mapped)return!1;if(p.pfValue===g.pfValue||p.strValue===g.strValue)return Ai("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+p.strValue+"`"),this.parse(r,p.strValue);if(l.color){var y=p.value,b=g.value,_=y[0]===b[0]&&y[1]===b[1]&&y[2]===b[2]&&(y[3]===b[3]||(y[3]==null||y[3]===1)&&(b[3]==null||b[3]===1));if(_)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:p.value,valueMax:g.value,bypass:t}}}if(l.multiple&&n!=="multiple"){var m;if(u?m=e.split(/\s+/):ra(e)?m=e:m=[e],l.evenMultiple&&m.length%2!==0)return null;for(var x=[],S=[],O=[],E="",T=!1,P=0;P0?" ":"")+I.strValue}return l.validate&&!l.validate(x,S)?null:l.singleEnum&&T?x.length===1&&Ar(x[0])?{name:r,value:x[0],strValue:x[0],bypass:t}:null:{name:r,value:x,pfValue:O,strValue:E,bypass:t,units:S}}var k=function(){for(var fe=0;fel.max||l.strictMax&&e===l.max))return null;var H={name:r,value:e,strValue:""+e+(L||""),units:L,bypass:t};return l.unitless||L!=="px"&&L!=="em"?H.pfValue=e:H.pfValue=L==="px"||!L?e:this.getEmSizeInPixels()*e,(L==="ms"||L==="s")&&(H.pfValue=L==="ms"?e:1e3*e),(L==="deg"||L==="rad")&&(H.pfValue=L==="rad"?e:EK(e)),L==="%"&&(H.pfValue=e/100),H}else if(l.propList){var q=[],W=""+e;if(W!=="none"){for(var $=W.split(/\s*,\s*|\s+/),J=0;J<$.length;J++){var X=$[J].trim();i.properties[X]?q.push(X):Ai("`"+X+"` is not a valid property name")}if(q.length===0)return null}return{name:r,value:q,strValue:q.length===0?"none":q.join(" "),bypass:t}}else if(l.color){var Z=Q7(e);return Z?{name:r,value:Z,pfValue:Z,strValue:"rgb("+Z[0]+","+Z[1]+","+Z[2]+")",bypass:t}:null}else if(l.regex||l.regexes){if(l.enums){var ue=k();if(ue)return ue}for(var re=l.regexes?l.regexes:[l.regex],ne=0;ne0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*t)/n.w,(s-2*t)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,n=t.pan,i=t.zoom,a,o,s=!1;if(t.zoomingEnabled||(s=!0),Ht(e)?o=e:ai(e)&&(o=e.level,e.position!=null?a=P2(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!t.panningEnabled&&(s=!0)),o=o>t.maxZoom?t.maxZoom:o,o=ot.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=u,a.push("zoom"))}if(i&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;Ht(l.x)&&(t.pan.x=l.x,s=!1),Ht(l.y)&&(t.pan.y=l.y,s=!1),s||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.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(Ar(e)){var n=e;e=this.mutableElements().filter(n)}else rf(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),o=this.height();t=t===void 0?this._private.zoom:t;var s={x:(a-t*(i.x1+i.x2))/2,y:(o-t*(i.y1+i.y2))/2};return s}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,n=this;return e.sizeCache=e.sizeCache||(t?(function(){var i=n.window().getComputedStyle(t),a=function(s){return parseFloat(i.getPropertyValue(s))};return{width:t.clientWidth-a("padding-left")-a("padding-right"),height:t.clientHeight-a("padding-top")-a("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(),i={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 i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},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){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Xg.centre=Xg.center;Xg.autolockNodes=Xg.autolock;Xg.autoungrabifyNodes=Xg.autoungrabify;var E1={data:Ci.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ci.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ci.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ci.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};E1.attr=E1.data;E1.removeAttr=E1.removeData;var S1=function(e){var t=this;e=kr({},e);var n=e.container;n&&!Px(n)&&Px(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=t;var o=ss!==void 0&&n!==void 0&&!e.headless,s=e;s.layout=kr({name:o?"grid":"null"},s.layout),s.renderer=kr({name:o?"canvas":"null"},s.renderer);var u=function(p,g,y){return g!==void 0?g:y!==void 0?y:p},l=this._private={container:n,ready:!1,options:s,elements:new uu(this),listeners:[],aniEles:new uu(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,s.zoomingEnabled),userZoomingEnabled:u(!0,s.userZoomingEnabled),panningEnabled:u(!0,s.panningEnabled),userPanningEnabled:u(!0,s.userPanningEnabled),boxSelectionEnabled:u(!0,s.boxSelectionEnabled),autolock:u(!1,s.autolock,s.autolockNodes),autoungrabify:u(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:u(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:Ht(s.zoom)?s.zoom:1,pan:{x:ai(s.pan)&&Ht(s.pan.x)?s.pan.x:0,y:ai(s.pan)&&Ht(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var c=function(p,g){var y=p.some(y$);if(y)return Km.all(p).then(g);g(p)};l.styleEnabled&&t.setStyle([]);var f=kr({},s,s.renderer);t.initRenderer(f);var d=function(p,g,y){t.notifications(!1);var b=t.mutableElements();b.length>0&&b.remove(),p!=null&&(ai(p)||ra(p))&&t.add(p),t.one("layoutready",function(m){t.notifications(!0),t.emit(m),t.one("load",g),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",y),t.emit("done")});var _=kr({},t._private.options.layout);_.eles=t.elements(),t.layout(_).run()};c([s.style,s.elements],function(h){var p=h[0],g=h[1];l.styleEnabled&&t.style().append(p),d(g,function(){t.startAnimationLoop(),l.ready=!0,Ya(s.ready)&&t.on("ready",s.ready);for(var y=0;y0,s=!!r.boundingBox,u=zl(s?r.boundingBox:structuredClone(e.extent())),l;if(rf(r.roots))l=r.roots;else if(ra(r.roots)){for(var c=[],f=0;f0;){var j=B(),z=P(j,k);if(z)j.outgoers().filter(function(Q){return Q.isNode()&&t.has(Q)}).forEach(L);else if(z===null){Ai("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var H=0;if(r.avoidOverlap)for(var q=0;q0&&b[0].length<=3?Ie/2:0),ot=2*Math.PI/b[Ee].length*Me;return Ee===0&&b[0].length===1&&(Ye=1),{x:ge.x+Ye*Math.cos(ot),y:ge.y+Ye*Math.sin(ot)}}else{var mt=b[Ee].length,wt=Math.max(mt===1?0:s?(u.w-r.padding*2-Oe.w)/((r.grid?De:mt)-1):(u.w-r.padding*2-Oe.w)/((r.grid?De:mt)+1),H),Mt={x:ge.x+(Me+1-(mt+1)/2)*wt,y:ge.y+(Ee+1-(ne+1)/2)*ke};return Mt}},Te={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Te).indexOf(r.direction)===-1&&Ia("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Te).join(", ")));var Y=function(ie){return W$(Ne(ie),u,Te[r.direction])};return t.nodes().layoutPositions(this,r,Y),this};var MJ={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*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 ZF(r){this.options=kr({},MJ,r)}ZF.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var o=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,l=u/Math.max(1,a.length-1),c,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var b=Math.cos(l)-Math.cos(0),_=Math.sin(l)-Math.sin(0),m=Math.sqrt(f*f/(b*b+_*_));c=Math.max(m,c)}var x=function(O,E){var T=e.startAngle+E*l*(i?1:-1),P=c*Math.cos(T),I=c*Math.sin(T),k={x:s.x+P,y:s.y+I};return k};return n.nodes().layoutPositions(this,e,x),this};var DJ={fit:!0,padding:30,startAngle:3/2*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 QF(r){this.options=kr({},DJ,r)}QF.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=r.cy,i=e.eles,a=i.nodes().not(":parent"),o=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],l=0,c=0;c0){var S=Math.abs(_[0].value-x.value);S>=y&&(_=[],b.push(_))}_.push(x)}var O=l+e.minNodeSpacing;if(!e.avoidOverlap){var E=b.length>0&&b[0].length>1,T=Math.min(o.w,o.h)/2-O,P=T/(b.length+E?1:0);O=Math.min(O,P)}for(var I=0,k=0;k1&&e.avoidOverlap){var z=Math.cos(j)-Math.cos(0),H=Math.sin(j)-Math.sin(0),q=Math.sqrt(O*O/(z*z+H*H));I=Math.max(q,I)}L.r=I,I+=O}if(e.equidistant){for(var W=0,$=0,J=0;J=r.numIter||(FJ(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature=r.animationThreshold&&a(),Mx(c)}};c()}else{for(;l;)l=o(u),u++;u3(n,r),s()}return this};q2.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};q2.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var IJ=function(e,t,n){for(var i=n.eles.edges(),a=n.eles.nodes(),o=zl(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),l={},c=0;c0){s.graphSet.push(T);for(var c=0;ci.count?0:i.graph},JF=function(e,t,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*c,d=Math.sqrt(s*s+u*u),h=f*s/d,p=f*u/d;else var g=Bx(e,s,u),y=Bx(t,-1*s,-1*u),b=y.x-g.x,_=y.y-g.y,m=b*b+_*_,d=Math.sqrt(m),f=(e.nodeRepulsion+t.nodeRepulsion)/m,h=f*b/d,p=f*_/d;e.isLocked||(e.offsetX-=h,e.offsetY-=p),t.isLocked||(t.offsetX+=h,t.offsetY+=p)}},qJ=function(e,t,n,i){if(n>0)var a=e.maxX-t.minX;else var a=t.maxX-e.minX;if(i>0)var o=e.maxY-t.minY;else var o=t.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},Bx=function(e,t,n){var i=e.positionX,a=e.positionY,o=e.height||1,s=e.width||1,u=n/t,l=o/s,c={};return t===0&&0n?(c.x=i,c.y=a+o/2,c):0t&&-1*l<=u&&u<=l?(c.x=i-s/2,c.y=a-s*n/2/t,c):0=l)?(c.x=i+o*t/2/n,c.y=a+o/2,c):(0>n&&(u<=-1*l||u>=l)&&(c.x=i-o*t/2/n,c.y=a-o/2),c)},GJ=function(e,t){for(var n=0;nn){var y=t.gravity*h/g,b=t.gravity*p/g;d.offsetX+=y,d.offsetY+=b}}}}},HJ=function(e,t){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var o=n[i++],s=e.idToIndex[o],u=e.layoutNodes[s],l=u.children;if(0n)var a={x:n*e/i,y:n*t/i};else var a={x:e,y:t};return a},tU=function(e,t){var n=e.parentId;if(n!=null){var i=t.layoutNodes[t.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopb&&(p+=y+t.componentSpacing,h=0,g=0,y=0)}}},XJ={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 rU(r){this.options=kr({},XJ,r)}rU.prototype.run=function(){var r=this.options,e=r,t=r.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=zl(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(ue){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),u=Math.round(s),l=Math.round(a.w/a.h*s),c=function(re){if(re==null)return Math.min(u,l);var ne=Math.min(u,l);ne==u?u=re:l=re},f=function(re){if(re==null)return Math.max(u,l);var ne=Math.max(u,l);ne==u?u=re:l=re},d=e.rows,h=e.cols!=null?e.cols:e.columns;if(d!=null&&h!=null)u=d,l=h;else if(d!=null&&h==null)u=d,l=Math.ceil(o/u);else if(d==null&&h!=null)l=h,u=Math.ceil(o/l);else if(l*u>o){var p=c(),g=f();(p-1)*g>=o?c(p-1):(g-1)*p>=o&&f(g-1)}else for(;l*u=o?f(b+1):c(y+1)}var _=a.w/l,m=a.h/u;if(e.condense&&(_=0,m=0),e.avoidOverlap)for(var x=0;x=l&&(z=0,j++)},q={},W=0;W(z=jK(r,e,H[q],H[q+1],H[q+2],H[q+3])))return y(E,z),!0}else if(P.edgeType==="bezier"||P.edgeType==="multibezier"||P.edgeType==="self"||P.edgeType==="compound"){for(var H=P.allpts,q=0;q+5(z=LK(r,e,H[q],H[q+1],H[q+2],H[q+3],H[q+4],H[q+5])))return y(E,z),!0}for(var W=W||T.source,$=$||T.target,J=i.getArrowWidth(I,k),X=[{name:"source",x:P.arrowStartX,y:P.arrowStartY,angle:P.srcArrowAngle},{name:"target",x:P.arrowEndX,y:P.arrowEndY,angle:P.tgtArrowAngle},{name:"mid-source",x:P.midX,y:P.midY,angle:P.midsrcArrowAngle},{name:"mid-target",x:P.midX,y:P.midY,angle:P.midtgtArrowAngle}],q=0;q0&&(b(W),b($))}function m(E,T,P){return Tc(E,T,P)}function x(E,T){var P=E._private,I=d,k;T?k=T+"-":k="",E.boundingBox();var L=P.labelBounds[T||"main"],B=E.pstyle(k+"label").value,j=E.pstyle("text-events").strValue==="yes";if(!(!j||!B)){var z=m(P.rscratch,"labelX",T),H=m(P.rscratch,"labelY",T),q=m(P.rscratch,"labelAngle",T),W=E.pstyle(k+"text-margin-x").pfValue,$=E.pstyle(k+"text-margin-y").pfValue,J=L.x1-I-W,X=L.x2+I-W,Z=L.y1-I-$,ue=L.y2+I-$;if(q){var re=Math.cos(q),ne=Math.sin(q),le=function(Oe,ke){return Oe=Oe-z,ke=ke-H,{x:Oe*re-ke*ne+z,y:Oe*ne+ke*re+H}},ce=le(J,Z),pe=le(J,ue),fe=le(X,Z),se=le(X,ue),de=[ce.x+W,ce.y+$,fe.x+W,fe.y+$,se.x+W,se.y+$,pe.x+W,pe.y+$];if(Cc(r,e,de))return y(E),!0}else if(pp(L,r,e))return y(E),!0}}for(var S=o.length-1;S>=0;S--){var O=o[S];O.isNode()?b(O)||x(O):_(O)||x(O)||x(O,"source")||x(O,"target")}return s};ry.getAllInBox=function(r,e,t,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),o=2/a,s=[],u=Math.min(r,t),l=Math.max(r,t),c=Math.min(e,n),f=Math.max(e,n);r=u,t=l,e=c,n=f;var d=zl({x1:r,y1:e,x2:t,y2:n}),h=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],p=[[h[0],h[1]],[h[1],h[2]],[h[2],h[3]],[h[3],h[0]]];function g(Oe,ke,De){return Tc(Oe,ke,De)}function y(Oe,ke){var De=Oe._private,Ne=o,Te="";Oe.boundingBox();var Y=De.labelBounds.main;if(!Y)return null;var Q=g(De.rscratch,"labelX",ke),ie=g(De.rscratch,"labelY",ke),we=g(De.rscratch,"labelAngle",ke),Ee=Oe.pstyle(Te+"text-margin-x").pfValue,Me=Oe.pstyle(Te+"text-margin-y").pfValue,Ie=Y.x1-Ne-Ee,Ye=Y.x2+Ne-Ee,ot=Y.y1-Ne-Me,mt=Y.y2+Ne-Me;if(we){var wt=Math.cos(we),Mt=Math.sin(we),Dt=function(tt,_e){return tt=tt-Q,_e=_e-ie,{x:tt*wt-_e*Mt+Q,y:tt*Mt+_e*wt+ie}};return[Dt(Ie,ot),Dt(Ye,ot),Dt(Ye,mt),Dt(Ie,mt)]}else return[{x:Ie,y:ot},{x:Ye,y:ot},{x:Ye,y:mt},{x:Ie,y:mt}]}function b(Oe,ke,De,Ne){function Te(Y,Q,ie){return(ie.y-Y.y)*(Q.x-Y.x)>(Q.y-Y.y)*(ie.x-Y.x)}return Te(Oe,De,Ne)!==Te(ke,De,Ne)&&Te(Oe,ke,De)!==Te(Oe,ke,Ne)}for(var _=0;_0?-(Math.PI-e.ang):Math.PI+e.ang},eee=function(e,t,n,i,a){if(e!==h3?v3(t,e,ph):JJ(Df,ph),v3(t,n,Df),f3=ph.nx*Df.ny-ph.ny*Df.nx,d3=ph.nx*Df.nx-ph.ny*-Df.ny,tv=Math.asin(Math.max(-1,Math.min(1,f3))),Math.abs(tv)<1e-6){_M=t.x,wM=t.y,Ag=Jy=0;return}Ng=1,rx=!1,d3<0?tv<0?tv=Math.PI+tv:(tv=Math.PI-tv,Ng=-1,rx=!0):tv>0&&(Ng=-1,rx=!0),t.radius!==void 0?Jy=t.radius:Jy=i,Eg=tv/2,_w=Math.min(ph.len/2,Df.len/2),a?(sh=Math.abs(Math.cos(Eg)*Jy/Math.sin(Eg)),sh>_w?(sh=_w,Ag=Math.abs(sh*Math.sin(Eg)/Math.cos(Eg))):Ag=Jy):(sh=Math.min(_w,Jy),Ag=Math.abs(sh*Math.sin(Eg)/Math.cos(Eg))),xM=t.x+Df.nx*sh,EM=t.y+Df.ny*sh,_M=xM-Df.ny*Ag*Ng,wM=EM+Df.nx*Ag*Ng,oU=t.x+ph.nx*sh,sU=t.y+ph.ny*sh,h3=t};function uU(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function lD(r,e,t,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(eee(r,e,t,n,i),{cx:_M,cy:wM,radius:Ag,startX:oU,startY:sU,stopX:xM,stopY:EM,startAngle:ph.ang+Math.PI/2*Ng,endAngle:Df.ang-Math.PI/2*Ng,counterClockwise:rx})}var O1=.01,tee=Math.sqrt(2*O1),Zu={};Zu.findMidptPtsEtc=function(r,e){var t=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,o=r.pstyle("source-endpoint"),s=r.pstyle("target-endpoint"),u=o.units!=null&&s.units!=null,l=function(S,O,E,T){var P=T-O,I=E-S,k=Math.sqrt(I*I+P*P);return{x:-P/k,y:I/k}},c=r.pstyle("edge-distances").value;switch(c){case"node-position":a=t;break;case"intersection":a=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(r.source()[0],o),d=Uo(f,2),h=d[0],p=d[1],g=this.manualEndptToPx(r.target()[0],s),y=Uo(g,2),b=y[0],_=y[1],m={x1:h,y1:p,x2:b,y2:_};i=l(h,p,b,_),a=m}else Ai("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Zu.findHaystackPoints=function(r){for(var e=0;e0?Math.max(_e-Ue,0):Math.min(_e+Ue,0)},B=L(I,T),j=L(k,P),z=!1;_===l?b=Math.abs(B)>Math.abs(j)?i:n:_===u||_===s?(b=n,z=!0):(_===a||_===o)&&(b=i,z=!0);var H=b===n,q=H?j:B,W=H?k:I,$=K5(W),J=!1;!(z&&(x||O))&&(_===s&&W<0||_===u&&W>0||_===a&&W>0||_===o&&W<0)&&($*=-1,q=$*Math.abs(q),J=!0);var X;if(x){var Z=S<0?1+S:S;X=Z*q}else{var ue=S<0?q:0;X=ue+S*$}var re=function(_e){return Math.abs(_e)=Math.abs(q)},ne=re(X),le=re(Math.abs(q)-Math.abs(X)),ce=ne||le;if(ce&&!J)if(H){var pe=Math.abs(W)<=d/2,fe=Math.abs(I)<=h/2;if(pe){var se=(c.x1+c.x2)/2,de=c.y1,ge=c.y2;t.segpts=[se,de,se,ge]}else if(fe){var Oe=(c.y1+c.y2)/2,ke=c.x1,De=c.x2;t.segpts=[ke,Oe,De,Oe]}else t.segpts=[c.x1,c.y2]}else{var Ne=Math.abs(W)<=f/2,Te=Math.abs(k)<=p/2;if(Ne){var Y=(c.y1+c.y2)/2,Q=c.x1,ie=c.x2;t.segpts=[Q,Y,ie,Y]}else if(Te){var we=(c.x1+c.x2)/2,Ee=c.y1,Me=c.y2;t.segpts=[we,Ee,we,Me]}else t.segpts=[c.x2,c.y1]}else if(H){var Ie=c.y1+X+(y?d/2*$:0),Ye=c.x1,ot=c.x2;t.segpts=[Ye,Ie,ot,Ie]}else{var mt=c.x1+X+(y?f/2*$:0),wt=c.y1,Mt=c.y2;t.segpts=[mt,wt,mt,Mt]}if(t.isRound){var Dt=r.pstyle("taxi-radius").value,vt=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(Dt),t.isArcRadius=new Array(t.segpts.length/2).fill(vt)}};Zu.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,s=e.tgtW,u=e.tgtH,l=e.srcShape,c=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,h=e.srcRs,p=e.tgtRs,g=!Ht(t.startX)||!Ht(t.startY),y=!Ht(t.arrowStartX)||!Ht(t.arrowStartY),b=!Ht(t.endX)||!Ht(t.endY),_=!Ht(t.arrowEndX)||!Ht(t.arrowEndY),m=3,x=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,S=m*x,O=Wg({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),E=OW.poolIndex()){var $=q;q=W,W=$}var J=B.srcPos=q.position(),X=B.tgtPos=W.position(),Z=B.srcW=q.outerWidth(),ue=B.srcH=q.outerHeight(),re=B.tgtW=W.outerWidth(),ne=B.tgtH=W.outerHeight(),le=B.srcShape=t.nodeShapes[e.getNodeShape(q)],ce=B.tgtShape=t.nodeShapes[e.getNodeShape(W)],pe=B.srcCornerRadius=q.pstyle("corner-radius").value==="auto"?"auto":q.pstyle("corner-radius").pfValue,fe=B.tgtCornerRadius=W.pstyle("corner-radius").value==="auto"?"auto":W.pstyle("corner-radius").pfValue,se=B.tgtRs=W._private.rscratch,de=B.srcRs=q._private.rscratch;B.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ge=0;ge=tee||(ot=Math.sqrt(Math.max(Ye*Ye,O1)+Math.max(Ie*Ie,O1)));var mt=B.vector={x:Ye,y:Ie},wt=B.vectorNorm={x:mt.x/ot,y:mt.y/ot},Mt={x:-wt.y,y:wt.x};B.nodesOverlap=!Ht(ot)||ce.checkPoint(Y[0],Y[1],0,re,ne,X.x,X.y,fe,se)||le.checkPoint(ie[0],ie[1],0,Z,ue,J.x,J.y,pe,de),B.vectorNormInverse=Mt,j={nodesOverlap:B.nodesOverlap,dirCounts:B.dirCounts,calculatedIntersection:!0,hasBezier:B.hasBezier,hasUnbundled:B.hasUnbundled,eles:B.eles,srcPos:X,srcRs:se,tgtPos:J,tgtRs:de,srcW:re,srcH:ne,tgtW:Z,tgtH:ue,srcIntn:we,tgtIntn:Q,srcShape:ce,tgtShape:le,posPts:{x1:Me.x2,y1:Me.y2,x2:Me.x1,y2:Me.y1},intersectionPts:{x1:Ee.x2,y1:Ee.y2,x2:Ee.x1,y2:Ee.y1},vector:{x:-mt.x,y:-mt.y},vectorNorm:{x:-wt.x,y:-wt.y},vectorNormInverse:{x:-Mt.x,y:-Mt.y}}}var Dt=Te?j:B;ke.nodesOverlap=Dt.nodesOverlap,ke.srcIntn=Dt.srcIntn,ke.tgtIntn=Dt.tgtIntn,ke.isRound=De.startsWith("round"),i&&(q.isParent()||q.isChild()||W.isParent()||W.isChild())&&(q.parents().anySame(W)||W.parents().anySame(q)||q.same(W)&&q.isParent())?e.findCompoundLoopPoints(Oe,Dt,ge,Ne):q===W?e.findLoopPoints(Oe,Dt,ge,Ne):De.endsWith("segments")?e.findSegmentsPoints(Oe,Dt):De.endsWith("taxi")?e.findTaxiPoints(Oe,Dt):De==="straight"||!Ne&&B.eles.length%2===1&&ge===Math.floor(B.eles.length/2)?e.findStraightEdgePoints(Oe):e.findBezierPoints(Oe,Dt,ge,Ne,Te),e.findEndpoints(Oe),e.tryToCorrectInvalidPoints(Oe,Dt),e.checkForInvalidEdgeWarning(Oe),e.storeAllpts(Oe),e.storeEdgeProjections(Oe),e.calculateArrowAngles(Oe),e.recalculateEdgeLabelProjections(Oe),e.calculateLabelAngles(Oe)}},E=0;E0){var Y=l,Q=Cg(Y,vm(o)),ie=Cg(Y,vm(Te)),we=Q;if(ie2){var Ee=Cg(Y,{x:Te[2],y:Te[3]});Ee0){var Qe=c,Ze=Cg(Qe,vm(o)),nt=Cg(Qe,vm(Ue)),It=Ze;if(nt2){var ct=Cg(Qe,{x:Ue[2],y:Ue[3]});ct=p||E){y={cp:x,segment:O};break}}if(y)break}var T=y.cp,P=y.segment,I=(p-b)/P.length,k=P.t1-P.t0,L=h?P.t0+k*I:P.t1-k*I;L=b1(0,L,1),e=wm(T.p0,T.p1,T.p2,L),d=nee(T.p0,T.p1,T.p2,L);break}case"straight":case"segments":case"haystack":{for(var B=0,j,z,H,q,W=n.allpts.length,$=0;$+3=p));$+=2);var J=p-z,X=J/j;X=b1(0,X,1),e=OK(H,q,X),d=fU(H,q);break}}o("labelX",f,e.x),o("labelY",f,e.y),o("labelAutoAngle",f,d)}};l("source"),l("target"),this.applyLabelDimensions(r)}};Oh.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Oh.applyPrefixedLabelDimensions=function(r,e){var t=r._private,n=this.getLabelText(r,e),i=Hg(n,r._private.labelDimsKey);if(Tc(t.rscratch,"prefixedLabelDimsKey",e)!==i){ov(t.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(r,n),o=r.pstyle("line-height").pfValue,s=r.pstyle("text-wrap").strValue,u=Tc(t.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(u.length,1),c=a.height/l,f=c*o,d=a.width,h=a.height+(l-1)*(o-1)*c;ov(t.rstyle,"labelWidth",e,d),ov(t.rscratch,"labelWidth",e,d),ov(t.rstyle,"labelHeight",e,h),ov(t.rscratch,"labelHeight",e,h),ov(t.rscratch,"labelLineHeight",e,f)}};Oh.getLabelText=function(r,e){var t=r._private,n=e?e+"-":"",i=r.pstyle(n+"label").strValue,a=r.pstyle("text-transform").value,o=function(ue,re){return re?(ov(t.rscratch,ue,e,re),re):Tc(t.rscratch,ue,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var s=r.pstyle("text-wrap").value;if(s==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var l="​",c=i.split(` `),f=r.pstyle("text-max-width").pfValue,d=r.pstyle("text-overflow-wrap").value,h=d==="anywhere",p=[],g=/[\s\u200b]+|$/g,y=0;yf){var S=b.matchAll(g),O="",E=0,T=Ac(S),P;try{for(T.s();!(P=T.n()).done;){var I=P.value,k=I[0],L=b.substring(E,I.index);E=I.index+k.length;var B=O.length===0?L:O+L+k,j=this.calculateLabelDimensions(r,B),z=j.width;z<=f?O+=L+k:(O&&p.push(O),O=L+k)}}catch(Z){T.e(Z)}finally{T.f()}O.match(/^[\s\u200b]+$/)||p.push(O)}else p.push(b)}o("labelWrapCachedLines",p),i=o("labelWrapCachedText",p.join(` `)),o("labelWrapKey",u)}else if(s==="ellipsis"){var H=r.pstyle("text-max-width").pfValue,q="",W="…",$=!1;if(this.calculateLabelDimensions(r,i).widthH)break;q+=i[J],J===i.length-1&&($=!0)}return $||(q+=W),q}return i};Oh.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Oh.calculateLabelDimensions=function(r,e){var t=this,n=t.cy.window(),i=n.document,a=0,o=r.pstyle("font-style").strValue,s=r.pstyle("font-size").pfValue,u=r.pstyle("font-family").strValue,l=r.pstyle("font-weight").strValue,c=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!c){c=this.labelCalcCanvas=i.createElement("canvas"),f=this.labelCalcCanvasContext=c.getContext("2d");var d=c.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}f.font="".concat(o," ").concat(l," ").concat(s,"px ").concat(u);for(var h=0,p=0,g=e.split(` -`),y=0;y1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var u=0;u=r.desktopTapThreshold2}var un=a(_e);Vr&&(r.hoverData.tapholdCancelled=!0);var bn=function(){var Ir=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Ir.length===0?(Ir.push(Rr[0]),Ir.push(Rr[1])):(Ir[0]+=Rr[0],Ir[1]+=Rr[1])};Qe=!0,i(Yt,["mousemove","vmousemove","tapdrag"],_e,{x:ct[0],y:ct[1]});var wn=function(Ir){return{originalEvent:_e,type:Ir,position:{x:ct[0],y:ct[1]}}},_n=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||Ze.emit(wn("boxstart")),jt[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Vr){var xn=wn("cxtdrag");Ut?Ut.emit(xn):Ze.emit(xn),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||Yt!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(wn("cxtdragout")),r.hoverData.cxtOver=Yt,Yt&&Yt.emit(wn("cxtdragover")))}}else if(r.hoverData.dragging){if(Qe=!0,Ze.panningEnabled()&&Ze.userPanningEnabled()){var on;if(r.hoverData.justStartedPan){var Nn=r.hoverData.mdownPos;on={x:(ct[0]-Nn[0])*nt,y:(ct[1]-Nn[1])*nt},r.hoverData.justStartedPan=!1}else on={x:Rr[0]*nt,y:Rr[1]*nt};Ze.panBy(on),Ze.emit(wn("dragpan")),r.hoverData.dragged=!0}ct=r.projectIntoViewport(_e.clientX,_e.clientY)}else if(jt[4]==1&&(Ut==null||Ut.pannable())){if(Vr){if(!r.hoverData.dragging&&Ze.boxSelectionEnabled()&&(un||!Ze.panningEnabled()||!Ze.userPanningEnabled()))_n();else if(!r.hoverData.selecting&&Ze.panningEnabled()&&Ze.userPanningEnabled()){var fi=o(Ut,r.hoverData.downs);fi&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,jt[4]=0,r.data.bgActivePosistion=vm(Lt),r.redrawHint("select",!0),r.redraw())}Ut&&Ut.pannable()&&Ut.active()&&Ut.unactivate()}}else{if(Ut&&Ut.pannable()&&Ut.active()&&Ut.unactivate(),(!Ut||!Ut.grabbed())&&Yt!=sr&&(sr&&i(sr,["mouseout","tapdragout"],_e,{x:ct[0],y:ct[1]}),Yt&&i(Yt,["mouseover","tapdragover"],_e,{x:ct[0],y:ct[1]}),r.hoverData.last=Yt),Ut)if(Vr){if(Ze.boxSelectionEnabled()&&un)Ut&&Ut.grabbed()&&(b(Xt),Ut.emit(wn("freeon")),Xt.emit(wn("free")),r.dragData.didDrag&&(Ut.emit(wn("dragfreeon")),Xt.emit(wn("dragfree")))),_n();else if(Ut&&Ut.grabbed()&&r.nodeIsDraggable(Ut)){var gn=!r.dragData.didDrag;gn&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||g(Xt,{inDragLayer:!0});var yn={x:0,y:0};if(Ht(Rr[0])&&Ht(Rr[1])&&(yn.x+=Rr[0],yn.y+=Rr[1],gn)){var Jn=r.hoverData.dragDelta;Jn&&Ht(Jn[0])&&Ht(Jn[1])&&(yn.x+=Jn[0],yn.y+=Jn[1])}r.hoverData.draggingEles=!0,Xt.silentShift(yn).emit(wn("position")).emit(wn("drag")),r.redrawHint("drag",!0),r.redraw()}}else bn();Qe=!0}if(jt[2]=ct[0],jt[3]=ct[1],Qe)return _e.stopPropagation&&_e.stopPropagation(),_e.preventDefault&&_e.preventDefault(),!1}},!1);var L,B,j;r.registerBinding(e,"mouseup",function(_e){if(!(r.hoverData.which===1&&_e.which!==1&&r.hoverData.capture)){var Ue=r.hoverData.capture;if(Ue){r.hoverData.capture=!1;var Qe=r.cy,Ze=r.projectIntoViewport(_e.clientX,_e.clientY),nt=r.selection,It=r.findNearestElement(Ze[0],Ze[1],!0,!1),ct=r.dragData.possibleDragElements,Lt=r.hoverData.down,Rt=a(_e);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,Lt&&Lt.unactivate();var jt=function(Br){return{originalEvent:_e,type:Br,position:{x:Ze[0],y:Ze[1]}}};if(r.hoverData.which===3){var Yt=jt("cxttapend");if(Lt?Lt.emit(Yt):Qe.emit(Yt),!r.hoverData.cxtDragged){var sr=jt("cxttap");Lt?Lt.emit(sr):Qe.emit(sr)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(i(It,["mouseup","tapend","vmouseup"],_e,{x:Ze[0],y:Ze[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(i(Lt,["click","tap","vclick"],_e,{x:Ze[0],y:Ze[1]}),B=!1,_e.timeStamp-j<=Qe.multiClickDebounceTime()?(L&&clearTimeout(L),B=!0,j=null,i(Lt,["dblclick","dbltap","vdblclick"],_e,{x:Ze[0],y:Ze[1]})):(L=setTimeout(function(){B||i(Lt,["oneclick","onetap","voneclick"],_e,{x:Ze[0],y:Ze[1]})},Qe.multiClickDebounceTime()),j=_e.timeStamp)),Lt==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!a(_e)&&(Qe.$(t).unselect(["tapunselect"]),ct.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=ct=Qe.collection()),It==Lt&&!r.dragData.didDrag&&!r.hoverData.selecting&&It!=null&&It._private.selectable&&(r.hoverData.dragging||(Qe.selectionType()==="additive"||Rt?It.selected()?It.unselect(["tapunselect"]):It.select(["tapselect"]):Rt||(Qe.$(t).unmerge(It).unselect(["tapunselect"]),It.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var Ut=Qe.collection(r.getAllInBox(nt[0],nt[1],nt[2],nt[3]));r.redrawHint("select",!0),Ut.length>0&&r.redrawHint("eles",!0),Qe.emit(jt("boxend"));var Rr=function(Br){return Br.selectable()&&!Br.selected()};Qe.selectionType()==="additive"||Rt||Qe.$(t).unmerge(Ut).unselect(),Ut.emit(jt("box")).stdFilter(Rr).select().emit(jt("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!nt[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Xt=Lt&&Lt.grabbed();b(ct),Xt&&(Lt.emit(jt("freeon")),ct.emit(jt("free")),r.dragData.didDrag&&(Lt.emit(jt("dragfreeon")),ct.emit(jt("dragfree"))))}}nt[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var z=[],H=4,q,W=1e5,$=function(_e,Ue){for(var Qe=0;Qe<_e.length;Qe++)if(_e[Qe]%Ue!==0)return!1;return!0},J=function(_e){for(var Ue=Math.abs(_e[0]),Qe=1;Qe<_e.length;Qe++)if(Math.abs(_e[Qe])!==Ue)return!1;return!0},X=function(_e){var Ue=!1,Qe=_e.deltaY;if(Qe==null&&(_e.wheelDeltaY!=null?Qe=_e.wheelDeltaY/4:_e.wheelDelta!=null&&(Qe=_e.wheelDelta/4)),Qe!==0){if(q==null)if(z.length>=H){var Ze=z;if(q=$(Ze,5),!q){var nt=Math.abs(Ze[0]);q=J(Ze)&&nt>5}if(q)for(var It=0;It5&&(Qe=K5(Qe)*5),sr=Qe/-250,q&&(sr/=W,sr*=3),sr=sr*r.wheelSensitivity;var Ut=_e.deltaMode===1;Ut&&(sr*=33);var Rr=ct.zoom()*Math.pow(10,sr);_e.type==="gesturechange"&&(Rr=r.gestureStartZoom*_e.scale),ct.zoom({level:Rr,renderedPosition:{x:Yt[0],y:Yt[1]}}),ct.emit({type:_e.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:_e,position:{x:jt[0],y:jt[1]}})}}}};r.registerBinding(r.container,"wheel",X,!0),r.registerBinding(e,"scroll",function(_e){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(_e){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||_e.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(tt){r.hasTouchStarted||X(tt)},!0),r.registerBinding(r.container,"mouseout",function(_e){var Ue=r.projectIntoViewport(_e.clientX,_e.clientY);r.cy.emit({originalEvent:_e,type:"mouseout",position:{x:Ue[0],y:Ue[1]}})},!1),r.registerBinding(r.container,"mouseover",function(_e){var Ue=r.projectIntoViewport(_e.clientX,_e.clientY);r.cy.emit({originalEvent:_e,type:"mouseover",position:{x:Ue[0],y:Ue[1]}})},!1);var Z,ue,re,ne,le,ce,pe,fe,se,de,ge,Oe,ke,De=function(_e,Ue,Qe,Ze){return Math.sqrt((Qe-_e)*(Qe-_e)+(Ze-Ue)*(Ze-Ue))},Ne=function(_e,Ue,Qe,Ze){return(Qe-_e)*(Qe-_e)+(Ze-Ue)*(Ze-Ue)},Ce;r.registerBinding(r.container,"touchstart",Ce=function(_e){if(r.hasTouchStarted=!0,!!I(_e)){m(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var Ue=r.cy,Qe=r.touchData.now,Ze=r.touchData.earlier;if(_e.touches[0]){var nt=r.projectIntoViewport(_e.touches[0].clientX,_e.touches[0].clientY);Qe[0]=nt[0],Qe[1]=nt[1]}if(_e.touches[1]){var nt=r.projectIntoViewport(_e.touches[1].clientX,_e.touches[1].clientY);Qe[2]=nt[0],Qe[3]=nt[1]}if(_e.touches[2]){var nt=r.projectIntoViewport(_e.touches[2].clientX,_e.touches[2].clientY);Qe[4]=nt[0],Qe[5]=nt[1]}var It=function(un){return{originalEvent:_e,type:un,position:{x:Qe[0],y:Qe[1]}}};if(_e.touches[1]){r.touchData.singleTouchMoved=!0,b(r.dragData.touchDragEles);var ct=r.findContainerClientCoords();se=ct[0],de=ct[1],ge=ct[2],Oe=ct[3],Z=_e.touches[0].clientX-se,ue=_e.touches[0].clientY-de,re=_e.touches[1].clientX-se,ne=_e.touches[1].clientY-de,ke=0<=Z&&Z<=ge&&0<=re&&re<=ge&&0<=ue&&ue<=Oe&&0<=ne&&ne<=Oe;var Lt=Ue.pan(),Rt=Ue.zoom();le=De(Z,ue,re,ne),ce=Ne(Z,ue,re,ne),pe=[(Z+re)/2,(ue+ne)/2],fe=[(pe[0]-Lt.x)/Rt,(pe[1]-Lt.y)/Rt];var jt=200,Yt=jt*jt;if(ce=1){for(var mr=r.touchData.startPosition=[null,null,null,null,null,null],ur=0;ur=r.touchTapThreshold2}if(Ue&&r.touchData.cxt){_e.preventDefault();var ur=_e.touches[0].clientX-se,sn=_e.touches[0].clientY-de,Fr=_e.touches[1].clientX-se,un=_e.touches[1].clientY-de,bn=Ne(ur,sn,Fr,un),wn=bn/ce,_n=150,xn=_n*_n,on=1.5,Nn=on*on;if(wn>=Nn||bn>=xn){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var fi=Rt("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(fi),r.touchData.start=null):Ze.emit(fi)}}if(Ue&&r.touchData.cxt){var fi=Rt("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(fi):Ze.emit(fi),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var gn=r.findNearestElement(nt[0],nt[1],!0,!0);(!r.touchData.cxtOver||gn!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(Rt("cxtdragout")),r.touchData.cxtOver=gn,gn&&gn.emit(Rt("cxtdragover")))}else if(Ue&&_e.touches[2]&&Ze.boxSelectionEnabled())_e.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||Ze.emit(Rt("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,Qe[4]=1,!Qe||Qe.length===0||Qe[0]===void 0?(Qe[0]=(nt[0]+nt[2]+nt[4])/3,Qe[1]=(nt[1]+nt[3]+nt[5])/3,Qe[2]=(nt[0]+nt[2]+nt[4])/3+1,Qe[3]=(nt[1]+nt[3]+nt[5])/3+1):(Qe[2]=(nt[0]+nt[2]+nt[4])/3,Qe[3]=(nt[1]+nt[3]+nt[5])/3),r.redrawHint("select",!0),r.redraw();else if(Ue&&_e.touches[1]&&!r.touchData.didSelect&&Ze.zoomingEnabled()&&Ze.panningEnabled()&&Ze.userZoomingEnabled()&&Ze.userPanningEnabled()){_e.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var yn=r.dragData.touchDragEles;if(yn){r.redrawHint("drag",!0);for(var Jn=0;Jn0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var Q;r.registerBinding(e,"touchcancel",Q=function(_e){var Ue=r.touchData.start;r.touchData.capture=!1,Ue&&Ue.unactivate()});var ie,we,Ee,Me;if(r.registerBinding(e,"touchend",ie=function(_e){var Ue=r.touchData.start,Qe=r.touchData.capture;if(Qe)_e.touches.length===0&&(r.touchData.capture=!1),_e.preventDefault();else return;var Ze=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var nt=r.cy,It=nt.zoom(),ct=r.touchData.now,Lt=r.touchData.earlier;if(_e.touches[0]){var Rt=r.projectIntoViewport(_e.touches[0].clientX,_e.touches[0].clientY);ct[0]=Rt[0],ct[1]=Rt[1]}if(_e.touches[1]){var Rt=r.projectIntoViewport(_e.touches[1].clientX,_e.touches[1].clientY);ct[2]=Rt[0],ct[3]=Rt[1]}if(_e.touches[2]){var Rt=r.projectIntoViewport(_e.touches[2].clientX,_e.touches[2].clientY);ct[4]=Rt[0],ct[5]=Rt[1]}var jt=function(xn){return{originalEvent:_e,type:xn,position:{x:ct[0],y:ct[1]}}};Ue&&Ue.unactivate();var Yt;if(r.touchData.cxt){if(Yt=jt("cxttapend"),Ue?Ue.emit(Yt):nt.emit(Yt),!r.touchData.cxtDragged){var sr=jt("cxttap");Ue?Ue.emit(sr):nt.emit(sr)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!_e.touches[2]&&nt.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var Ut=nt.collection(r.getAllInBox(Ze[0],Ze[1],Ze[2],Ze[3]));Ze[0]=void 0,Ze[1]=void 0,Ze[2]=void 0,Ze[3]=void 0,Ze[4]=0,r.redrawHint("select",!0),nt.emit(jt("boxend"));var Rr=function(xn){return xn.selectable()&&!xn.selected()};Ut.emit(jt("box")).stdFilter(Rr).select().emit(jt("boxselect")),Ut.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(Ue!=null&&Ue.unactivate(),_e.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!_e.touches[1]){if(!_e.touches[0]){if(!_e.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Xt=r.dragData.touchDragEles;if(Ue!=null){var Vr=Ue._private.grabbed;b(Xt),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Vr&&(Ue.emit(jt("freeon")),Xt.emit(jt("free")),r.dragData.didDrag&&(Ue.emit(jt("dragfreeon")),Xt.emit(jt("dragfree")))),i(Ue,["touchend","tapend","vmouseup","tapdragout"],_e,{x:ct[0],y:ct[1]}),Ue.unactivate(),r.touchData.start=null}else{var Br=r.findNearestElement(ct[0],ct[1],!0,!0);i(Br,["touchend","tapend","vmouseup","tapdragout"],_e,{x:ct[0],y:ct[1]})}var mr=r.touchData.startPosition[0]-ct[0],ur=mr*mr,sn=r.touchData.startPosition[1]-ct[1],Fr=sn*sn,un=ur+Fr,bn=un*It*It;r.touchData.singleTouchMoved||(Ue||nt.$(":selected").unselect(["tapunselect"]),i(Ue,["tap","vclick"],_e,{x:ct[0],y:ct[1]}),we=!1,_e.timeStamp-Me<=nt.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),we=!0,Me=null,i(Ue,["dbltap","vdblclick"],_e,{x:ct[0],y:ct[1]})):(Ee=setTimeout(function(){we||i(Ue,["onetap","voneclick"],_e,{x:ct[0],y:ct[1]})},nt.multiClickDebounceTime()),Me=_e.timeStamp)),Ue!=null&&!r.dragData.didDrag&&Ue._private.selectable&&bn"u"){var Ie=[],Ye=function(_e){return{clientX:_e.clientX,clientY:_e.clientY,force:1,identifier:_e.pointerId,pageX:_e.pageX,pageY:_e.pageY,radiusX:_e.width/2,radiusY:_e.height/2,screenX:_e.screenX,screenY:_e.screenY,target:_e.target}},ot=function(_e){return{event:_e,touch:Ye(_e)}},mt=function(_e){Ie.push(ot(_e))},wt=function(_e){for(var Ue=0;Ue0)return Z[0]}return null},p=Object.keys(d),g=0;g0?h:hF(a,o,e,t,n,i,s,u)},checkPoint:function(e,t,n,i,a,o,s,u){u=u==="auto"?Mp(i,a):u;var l=2*u;if(pv(e,t,this.points,o,s,i,a-l,[0,-1],n)||pv(e,t,this.points,o,s,i-l,a,[0,-1],n))return!0;var c=i/2+2*n,f=a/2+2*n,d=[o-c,s-f,o-c,s,o+c,s,o+c,s-f];return!!(Cc(e,t,d)||jg(e,t,l,l,o+i/2-u,s+a/2-u,n)||jg(e,t,l,l,o-i/2+u,s+a/2-u,n))}}};_v.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Bl(3,0)),this.generateRoundPolygon("round-triangle",Bl(3,0)),this.generatePolygon("rectangle",Bl(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",Bl(5,0)),this.generateRoundPolygon("round-pentagon",Bl(5,0)),this.generatePolygon("hexagon",Bl(6,0)),this.generateRoundPolygon("round-hexagon",Bl(6,0)),this.generatePolygon("heptagon",Bl(7,0)),this.generateRoundPolygon("round-heptagon",Bl(7,0)),this.generatePolygon("octagon",Bl(8,0)),this.generateRoundPolygon("round-octagon",Bl(8,0));var n=new Array(20);{var i=cM(5,0),a=cM(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*x)break}else if(l){if(_>=e.deqCost*h||_>=e.deqAvgCost*d)break}else if(m>=e.deqNoDrawCost*jO)break;var S=e.deq(n,y,g);if(S.length>0)for(var O=0;O0&&(e.onDeqd(n,p),!l&&e.shouldRedraw(n,p,y,g)&&a())},s=e.priority||Y5;i.beforeRender(o,s(n))}}}},aee=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dx;zp(this,r),this.idsByKey=new sv,this.keyForId=new sv,this.cachesByLvl=new sv,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return qp(r,[{key:"getIdsFor",value:function(t){t==null&&Ia("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(t);return i||(i=new $m,n.set(t,i)),i}},{key:"addIdForKey",value:function(t,n){t!=null&&this.getIdsFor(t).add(n)}},{key:"deleteIdForKey",value:function(t,n){t!=null&&this.getIdsFor(t).delete(n)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n),a=this.getKey(t);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(t){var n=t.id(),i=this.keyForId.get(n),a=this.getKey(t);return i!==a}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var n=this.cachesByLvl,i=this.lvls,a=n.get(t);return a||(a=new sv,n.set(t,a),i.push(t)),a}},{key:"getCache",value:function(t,n){return this.getCachesAt(n).get(t)}},{key:"get",value:function(t,n){var i=this.getKey(t),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(t),a}},{key:"getForCachedKey",value:function(t,n){var i=this.keyForId.get(t.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(t,n){return this.getCachesAt(n).has(t)}},{key:"has",value:function(t,n){var i=this.getKey(t);return this.hasCache(i,n)}},{key:"setCache",value:function(t,n,i){i.key=t,this.getCachesAt(n).set(t,i)}},{key:"set",value:function(t,n,i){var a=this.getKey(t);this.setCache(a,n,i),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,n){this.getCachesAt(n).delete(t)}},{key:"delete",value:function(t,n){var i=this.getKey(t);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(t){var n=this;this.lvls.forEach(function(i){return n.deleteCache(t,i)})}},{key:"invalidate",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(t);var a=this.doesEleInvalidateKey(t);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}])})(),m3=25,ww=50,nx=-4,SM=3,yU=7.99,oee=8,see=1024,uee=1024,lee=1024,cee=.2,fee=.8,dee=10,hee=.15,vee=.1,pee=.9,gee=.9,yee=100,mee=1,gm={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},bee=fu({getKey:null,doesEleInvalidateKey:Dx,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:oF,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vb=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var i=bee(t);kr(n,i),n.lookup=new aee(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},cs=vb.prototype;cs.reasons=gm;cs.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};cs.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=t[r]=t[r]||[];return n};cs.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new K1(function(t,n){return n.reqs-t.reqs});return e};cs.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};cs.getElement=function(r,e,t,n,i){var a=this,o=this.renderer,s=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!a.allowEdgeTxrCaching&&r.isEdge()||!a.allowParentTxrCaching&&r.isParent())return null;if(n==null&&(n=Math.ceil($5(s*t))),n=yU||n>SM)return null;var l=Math.pow(2,n),c=e.h*l,f=e.w*l,d=o.eleTextBiggerThanMin(r,l);if(!this.isVisible(r,d))return null;var h=u.get(r,n);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var p;if(c<=m3?p=m3:c<=ww?p=ww:p=Math.ceil(c/ww)*ww,c>lee||f>uee)return null;var g=a.getTextureQueue(p),y=g[g.length-2],b=function(){return a.recycleTexture(p,f)||a.addTexture(p,f)};y||(y=g[g.length-1]),y||(y=b()),y.width-y.usedWidthn;k--)P=a.getElement(r,e,t,k,gm.downscale);I()}else return a.queueElement(r,O.level-1),O;else{var L;if(!m&&!x&&!S)for(var B=n-1;B>=nx;B--){var j=u.get(r,B);if(j){L=j;break}}if(_(L))return a.queueElement(r,n),L;y.context.translate(y.usedWidth,0),y.context.scale(l,l),this.drawElement(y.context,r,e,d,!1),y.context.scale(1/l,1/l),y.context.translate(-y.usedWidth,0)}return h={x:y.usedWidth,texture:y,level:n,scale:l,width:f,height:c,scaledLabelShown:d},y.usedWidth+=Math.ceil(f+oee),y.eleCaches.push(h),u.set(r,n,h),a.checkTextureFullness(y),h};cs.invalidateElements=function(r){for(var e=0;e=cee*r.width&&this.retireTexture(r)};cs.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>fee&&r.fullnessChecks>=dee?Pp(t,r):r.fullnessChecks++};cs.retireTexture=function(r){var e=this,t=r.height,n=e.getTextureQueue(t),i=this.lookup;Pp(n,r),r.retired=!0;for(var a=r.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,X5(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Pp(i,o),n.push(o),o}};cs.queueElement=function(r,e){var t=this,n=t.getElementQueue(),i=t.getElementKeyToQueue(),a=this.getKey(r),o=i[a];if(o)o.level=Math.max(o.level,e),o.eles.merge(r),o.reqs++,n.updateItem(o);else{var s={eles:r.spawn().merge(r),level:e,reqs:1,key:a};n.push(s),i[a]=s}};cs.dequeue=function(r){for(var e=this,t=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o0;o++){var s=t.pop(),u=s.key,l=s.eles[0],c=a.hasCache(l,s.level);if(n[u]=null,c)continue;i.push(s);var f=e.getBoundingBox(l);e.getElement(l,f,r,s.level,gm.dequeue)}return i};cs.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(r),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=W5,t.updateItem(a),t.pop(),n[i]=null):a.eles.unmerge(r))};cs.onDequeue=function(r){this.onDequeues.push(r)};cs.offDequeue=function(r){Pp(this.onDequeues,r)};cs.setupDequeueing=gU.setupDequeueing({deqRedrawThreshold:yee,deqCost:hee,deqAvgCost:vee,deqNoDrawCost:pee,deqFastCost:gee,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=wee||t>Ux)return null}n.validateLayersElesOrdering(t,r);var u=n.layersByLevel,l=Math.pow(2,t),c=u[t]=u[t]||[],f,d=n.levelIsComplete(t,r),h,p=function(){var I=function(z){if(n.validateLayersElesOrdering(z,r),n.levelIsComplete(z,r))return h=u[z],!0},k=function(z){if(!h)for(var H=t+z;Db<=H&&H<=Ux&&!I(H);H+=z);};k(1),k(-1);for(var L=c.length-1;L>=0;L--){var B=c[L];B.invalid&&Pp(c,B)}};if(!d)p();else return c;var g=function(){if(!f){f=zl();for(var I=0;I_3||B>_3)return null;var j=L*B;if(j>Ree)return null;var z=n.makeLayer(f,t);if(k!=null){var H=c.indexOf(k)+1;c.splice(H,0,z)}else(I.insert===void 0||I.insert)&&c.unshift(z);return z};if(n.skipping&&!s)return null;for(var b=null,_=r.length/_ee,m=!s,x=0;x=_||!dF(b.bb,S.boundingBox()))&&(b=y({insert:!0,after:b}),!b))return null;h||m?n.queueLayer(b,S):n.drawEleInLayer(b,S,t,e),b.eles.push(S),E[t]=b}return h||(m?null:c)};du.getEleLevelForLayerLevel=function(r,e){return r};du.drawEleInLayer=function(r,e,t,n){var i=this,a=this.renderer,o=r.context,s=e.boundingBox();s.w===0||s.h===0||!e.visible()||(t=i.getEleLevelForLayerLevel(t,n),a.setImgSmoothing(o,!1),a.drawCachedElement(o,e,null,null,t,Pee),a.setImgSmoothing(o,!0))};du.levelIsComplete=function(r,e){var t=this,n=t.layersByLevel[r];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||o.invalid)return!1;i+=o.eles.length}return i===e.length};du.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var n=0;n0){e=!0;break}}return e};du.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=vv(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(n,i,a){e.invalidateLayer(n)}))};du.invalidateLayer=function(r){if(this.lastInvalidationTime=vv(),!r.invalid){var e=r.level,t=r.eles,n=this.layersByLevel[e];Pp(n,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=e._private.rscratch;if(!(a&&!e.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var u;t&&(u=t,r.translate(-u.x1,-u.y1));var l=a?e.pstyle("opacity").value:1,c=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,p=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,b=l*c,_=l*c,m=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;f==="straight-triangle"?(o.eleStrokeStyle(r,e,z),o.drawEdgeTrianglePath(e,r,s.allpts)):(r.lineWidth=h,r.lineCap=p,o.eleStrokeStyle(r,e,z),o.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")},x=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;if(r.lineWidth=h+g,r.lineCap=p,g>0)o.colorStrokeStyle(r,y[0],y[1],y[2],z);else{r.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(e,r,s.allpts):(o.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")},S=function(){i&&o.drawEdgeOverlay(r,e)},O=function(){i&&o.drawEdgeUnderlay(r,e)},E=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_;o.drawArrowheads(r,e,z)},T=function(){o.drawElementText(r,e,null,n)};r.lineJoin="round";var P=e.pstyle("ghost").value==="yes";if(P){var I=e.pstyle("ghost-offset-x").pfValue,k=e.pstyle("ghost-offset-y").pfValue,L=e.pstyle("ghost-opacity").value,B=b*L;r.translate(I,k),m(B),E(B),r.translate(-I,-k)}else x();O(),m(),E(),S(),T(),t&&r.translate(u.x1,u.y1)}};var _U=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,o=a.usePaths(),s=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,l=2*u,c=n.pstyle("".concat(e,"-color")).value;t.lineWidth=l,s.edgeType==="self"&&!o?t.lineCap="butt":t.lineCap="round",a.colorStrokeStyle(t,c[0],c[1],c[2],i),a.drawEdgePath(n,t,s.allpts,"solid")}}}};wv.drawEdgeOverlay=_U("overlay");wv.drawEdgeUnderlay=_U("underlay");wv.drawEdgePath=function(r,e,t,n){var i=r._private.rscratch,a=e,o,s=!1,u=this.usePaths(),l=r.pstyle("line-dash-pattern").pfValue,c=r.pstyle("line-dash-offset").pfValue;if(u){var f=t.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(o=e=i.pathCache,s=!0):(o=e=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([]);break}if(!s&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(a&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var u=o.getLabelJustification(e);r.textAlign=u,r.textBaseline="bottom"}else{var l=e.element()._private.rscratch.badLine,c=e.pstyle("label"),f=e.pstyle("source-label"),d=e.pstyle("target-label");if(l||(!c||!c.value)&&(!f||!f.value)&&(!d||!d.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,p;t&&(p=t,r.translate(-p.x1,-p.y1)),i==null?(o.drawText(r,e,null,h,a),e.isEdge()&&(o.drawText(r,e,"source",h,a),o.drawText(r,e,"target",h,a))):o.drawText(r,e,i,h,a),t&&r.translate(p.x1,p.y1)};ny.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*s,l=e.pstyle("color").value,c=e.pstyle("text-outline-color").value;r.font=n+" "+o+" "+i+" "+a,r.lineJoin="round",this.colorFillStyle(r,l[0],l[1],l[2],s),this.colorStrokeStyle(r,c[0],c[1],c[2],u)};function zee(r,e,t,n,i){var a=Math.min(n,i),o=a/2,s=e+n/2,u=t+i/2;r.beginPath(),r.arc(s,u,o,0,Math.PI*2),r.closePath()}function S3(r,e,t,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,n/2,i/2);r.beginPath(),r.moveTo(e+o,t),r.lineTo(e+n-o,t),r.quadraticCurveTo(e+n,t,e+n,t+o),r.lineTo(e+n,t+i-o),r.quadraticCurveTo(e+n,t+i,e+n-o,t+i),r.lineTo(e+o,t+i),r.quadraticCurveTo(e,t+i,e,t+i-o),r.lineTo(e,t+o),r.quadraticCurveTo(e,t,e+o,t),r.closePath()}ny.getTextAngle=function(r,e){var t,n=r._private,i=n.rscratch,a=e?e+"-":"",o=r.pstyle(a+"text-rotation");if(o.strValue==="autorotate"){var s=Tc(i,"labelAngle",e);t=r.isEdge()?s:0}else o.strValue==="none"?t=0:t=o.pfValue;return t};ny.drawText=function(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,o=a.rscratch,s=i?e.effectiveOpacity():1;if(!(i&&(s===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var u=Tc(o,"labelX",t),l=Tc(o,"labelY",t),c,f,d=this.getLabelText(e,t);if(d!=null&&d!==""&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(r,e,i);var h=t?t+"-":"",p=Tc(o,"labelWidth",t),g=Tc(o,"labelHeight",t),y=e.pstyle(h+"text-margin-x").pfValue,b=e.pstyle(h+"text-margin-y").pfValue,_=e.isEdge(),m=e.pstyle("text-halign").value,x=e.pstyle("text-valign").value;_&&(m="center",x="center"),u+=y,l+=b;var S;switch(n?S=this.getTextAngle(e,t):S=0,S!==0&&(c=u,f=l,r.translate(c,f),r.rotate(S),u=0,l=0),x){case"top":break;case"center":l+=g/2;break;case"bottom":l+=g;break}var O=e.pstyle("text-background-opacity").value,E=e.pstyle("text-border-opacity").value,T=e.pstyle("text-border-width").pfValue,P=e.pstyle("text-background-padding").pfValue,I=e.pstyle("text-background-shape").strValue,k=I==="round-rectangle"||I==="roundrectangle",L=I==="circle",B=2;if(O>0||T>0&&E>0){var j=r.fillStyle,z=r.strokeStyle,H=r.lineWidth,q=e.pstyle("text-background-color").value,W=e.pstyle("text-border-color").value,$=e.pstyle("text-border-style").value,J=O>0,X=T>0&&E>0,Z=u-P;switch(m){case"left":Z-=p;break;case"center":Z-=p/2;break}var ue=l-g-P,re=p+2*P,ne=g+2*P;if(J&&(r.fillStyle="rgba(".concat(q[0],",").concat(q[1],",").concat(q[2],",").concat(O*s,")")),X&&(r.strokeStyle="rgba(".concat(W[0],",").concat(W[1],",").concat(W[2],",").concat(E*s,")"),r.lineWidth=T,r.setLineDash))switch($){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=T/4,r.setLineDash([]);break;case"solid":default:r.setLineDash([]);break}if(k?(r.beginPath(),S3(r,Z,ue,re,ne,B)):L?(r.beginPath(),zee(r,Z,ue,re,ne)):(r.beginPath(),r.rect(Z,ue,re,ne)),J&&r.fill(),X&&r.stroke(),X&&$==="double"){var le=T/2;r.beginPath(),k?S3(r,Z+le,ue+le,re-2*le,ne-2*le,B):r.rect(Z+le,ue+le,re-2*le,ne-2*le),r.stroke()}r.fillStyle=j,r.strokeStyle=z,r.lineWidth=H,r.setLineDash&&r.setLineDash([])}var ce=2*e.pstyle("text-outline-width").pfValue;if(ce>0&&(r.lineWidth=ce),e.pstyle("text-wrap").value==="wrap"){var pe=Tc(o,"labelWrapCachedLines",t),fe=Tc(o,"labelLineHeight",t),se=p/2,de=this.getLabelJustification(e);switch(de==="auto"||(m==="left"?de==="left"?u+=-p:de==="center"&&(u+=-se):m==="center"?de==="left"?u+=-se:de==="right"&&(u+=se):m==="right"&&(de==="center"?u+=se:de==="right"&&(u+=p))),x){case"top":l-=(pe.length-1)*fe;break;case"center":case"bottom":l-=(pe.length-1)*fe;break}for(var ge=0;ge0&&r.strokeText(pe[ge],u,l),r.fillText(pe[ge],u,l),l+=fe}else ce>0&&r.strokeText(d,u,l),r.fillText(d,u,l);S!==0&&(r.rotate(-S),r.translate(-c,-f))}}};var Vp={};Vp.drawNode=function(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,u,l=e._private,c=l.rscratch,f=e.position();if(!(!Ht(f.x)||!Ht(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,h=o.usePaths(),p,g=!1,y=e.padding();s=e.width()+2*y,u=e.height()+2*y;var b;t&&(b=t,r.translate(-b.x1,-b.y1));for(var _=e.pstyle("background-image"),m=_.value,x=new Array(m.length),S=new Array(m.length),O=0,E=0;E0&&arguments[0]!==void 0?arguments[0]:B;o.eleFillStyle(r,e,vt)},fe=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X;o.colorStrokeStyle(r,j[0],j[1],j[2],vt)},se=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ne;o.colorStrokeStyle(r,ue[0],ue[1],ue[2],vt)},de=function(vt,tt,_e,Ue){var Qe=o.nodePathCache=o.nodePathCache||[],Ze=aF(_e==="polygon"?_e+","+Ue.join(","):_e,""+tt,""+vt,""+ce),nt=Qe[Ze],It,ct=!1;return nt!=null?(It=nt,ct=!0,c.pathCache=It):(It=new Path2D,Qe[Ze]=c.pathCache=It),{path:It,cacheHit:ct}},ge=e.pstyle("shape").strValue,Oe=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var ke=de(s,u,ge,Oe);p=ke.path,g=ke.cacheHit}var De=function(){if(!g){var vt=f;h&&(vt={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(p||r,vt.x,vt.y,s,u,ce,c)}h?r.fill(p):r.fill()},Ne=function(){for(var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,_e=l.backgrounding,Ue=0,Qe=0;Qe0&&arguments[0]!==void 0?arguments[0]:!1,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;o.hasPie(e)&&(o.drawPie(r,e,tt),vt&&(h||o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c)))},Y=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;o.hasStripe(e)&&(r.save(),h?r.clip(c.pathCache):(o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c),r.clip()),o.drawStripe(r,e,tt),r.restore(),vt&&(h||o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c)))},Q=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,tt=(k>0?k:-k)*vt,_e=k>0?0:255;k!==0&&(o.colorFillStyle(r,_e,_e,_e,tt),h?r.fill(p):r.fill())},ie=function(){if(L>0){if(r.lineWidth=L,r.lineCap=q,r.lineJoin=H,r.setLineDash)switch(z){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash($),r.lineDashOffset=J;break;case"solid":case"double":r.setLineDash([]);break}if(W!=="center"){if(r.save(),r.lineWidth*=2,W==="inside")h?r.clip(p):r.clip();else{var vt=new Path2D;vt.rect(-s/2-L,-u/2-L,s+2*L,u+2*L),vt.addPath(p),r.clip(vt,"evenodd")}h?r.stroke(p):r.stroke(),r.restore()}else h?r.stroke(p):r.stroke();if(z==="double"){r.lineWidth=L/3;var tt=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(p):r.stroke(),r.globalCompositeOperation=tt}r.setLineDash&&r.setLineDash([])}},we=function(){if(Z>0){if(r.lineWidth=Z,r.lineCap="butt",r.setLineDash)switch(re){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var vt=f;h&&(vt={x:0,y:0});var tt=o.getNodeShape(e),_e=L;W==="inside"&&(_e=0),W==="outside"&&(_e*=2);var Ue=(s+_e+(Z+le))/s,Qe=(u+_e+(Z+le))/u,Ze=s*Ue,nt=u*Qe,It=o.nodeShapes[tt].points,ct;if(h){var Lt=de(Ze,nt,tt,It);ct=Lt.path}if(tt==="ellipse")o.drawEllipsePath(ct||r,vt.x,vt.y,Ze,nt);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(tt)){var Rt=0,jt=0,Yt=0;tt==="round-diamond"?Rt=(_e+le+Z)*1.4:tt==="round-heptagon"?(Rt=(_e+le+Z)*1.075,Yt=-(_e/2+le+Z)/35):tt==="round-hexagon"?Rt=(_e+le+Z)*1.12:tt==="round-pentagon"?(Rt=(_e+le+Z)*1.13,Yt=-(_e/2+le+Z)/15):tt==="round-tag"?(Rt=(_e+le+Z)*1.12,jt=(_e/2+Z+le)*.07):tt==="round-triangle"&&(Rt=(_e+le+Z)*(Math.PI/2),Yt=-(_e+le/2+Z)/Math.PI),Rt!==0&&(Ue=(s+Rt)/s,Ze=s*Ue,["round-hexagon","round-tag"].includes(tt)||(Qe=(u+Rt)/u,nt=u*Qe)),ce=ce==="auto"?pF(Ze,nt):ce;for(var sr=Ze/2,Ut=nt/2,Rr=ce+(_e+Z+le)/2,Xt=new Array(It.length/2),Vr=new Array(It.length/2),Br=0;Br0){if(i=i||n.position(),a==null||o==null){var h=n.padding();a=n.width()+2*h,o=n.height()+2*h}s.colorFillStyle(t,c[0],c[1],c[2],l),s.nodeShapes[f].draw(t,i.x,i.y,a+u*2,o+u*2,d),t.fill()}}}};Vp.drawNodeOverlay=wU("overlay");Vp.drawNodeUnderlay=wU("underlay");Vp.hasPie=function(r){return r=r[0],r._private.hasPie};Vp.hasStripe=function(r){return r=r[0],r._private.hasStripe};Vp.drawPie=function(r,e,t,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),o=e.pstyle("pie-hole"),s=e.pstyle("pie-start-angle").pfValue,u=n.x,l=n.y,c=e.width(),f=e.height(),d=Math.min(c,f)/2,h,p=0,g=this.usePaths();if(g&&(u=0,l=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),o.units==="%"?h=d*o.pfValue:o.pfValue!==void 0&&(h=o.pfValue/2),!(h>=d))for(var y=1;y<=i.pieBackgroundN;y++){var b=e.pstyle("pie-"+y+"-background-size").value,_=e.pstyle("pie-"+y+"-background-color").value,m=e.pstyle("pie-"+y+"-background-opacity").value*t,x=b/100;x+p>1&&(x=1-p);var S=1.5*Math.PI+2*Math.PI*p;S+=s;var O=2*Math.PI*x,E=S+O;b===0||p>=1||p+x>1||(h===0?(r.beginPath(),r.moveTo(u,l),r.arc(u,l,d,S,E),r.closePath()):(r.beginPath(),r.arc(u,l,d,S,E),r.arc(u,l,h,E,S,!0),r.closePath()),this.colorFillStyle(r,_[0],_[1],_[2],m),r.fill(),p+=x)}};Vp.drawStripe=function(r,e,t,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,o=n.y,s=e.width(),u=e.height(),l=0,c=this.usePaths();r.save();var f=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var h=s,p=u;d.units==="%"?(h=h*d.pfValue,p=p*d.pfValue):d.pfValue!==void 0&&(h=d.pfValue,p=d.pfValue),c&&(a=0,o=0),o-=h/2,a-=p/2;for(var g=1;g<=i.stripeBackgroundN;g++){var y=e.pstyle("stripe-"+g+"-background-size").value,b=e.pstyle("stripe-"+g+"-background-color").value,_=e.pstyle("stripe-"+g+"-background-opacity").value*t,m=y/100;m+l>1&&(m=1-l),!(y===0||l>=1||l+m>1)&&(r.beginPath(),r.rect(a,o+p*l,h,p*m),r.closePath(),this.colorFillStyle(r,b[0],b[1],b[2],_),r.fill(),l+=m)}r.restore()};var Gl={},qee=100;Gl.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};Gl.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,n,i=0;ie.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(c[e.NODE]=!0,c[e.SELECT_BOX]=!0);var _=t.style(),m=t.zoom(),x=o!==void 0?o:m,S=t.pan(),O={x:S.x,y:S.y},E={zoom:m,pan:{x:S.x,y:S.y}},T=e.prevViewport,P=T===void 0||E.zoom!==T.zoom||E.pan.x!==T.pan.x||E.pan.y!==T.pan.y;!P&&!(g&&!p)&&(e.motionBlurPxRatio=1),s&&(O=s),x*=u,O.x*=u,O.y*=u;var I=e.getCachedZSortedEles();function k(fe,se,de,ge,Oe){var ke=fe.globalCompositeOperation;fe.globalCompositeOperation="destination-out",e.colorFillStyle(fe,255,255,255,e.motionBlurTransparency),fe.fillRect(se,de,ge,Oe),fe.globalCompositeOperation=ke}function L(fe,se){var de,ge,Oe,ke;!e.clearingMotionBlur&&(fe===l.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||fe===l.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(de={x:S.x*h,y:S.y*h},ge=m*h,Oe=e.canvasWidth*h,ke=e.canvasHeight*h):(de=O,ge=x,Oe=e.canvasWidth,ke=e.canvasHeight),fe.setTransform(1,0,0,1,0,0),se==="motionBlur"?k(fe,0,0,Oe,ke):!n&&(se===void 0||se)&&fe.clearRect(0,0,Oe,ke),i||(fe.translate(de.x,de.y),fe.scale(ge,ge)),s&&fe.translate(s.x,s.y),o&&fe.scale(o,o)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var B=e.data.bufferContexts[e.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var E=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};E.mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[e.DRAG]=!1,c[e.NODE]=!1;var j=l.contexts[e.NODE],z=e.textureCache.texture,E=e.textureCache.viewport;j.setTransform(1,0,0,1,0,0),d?k(j,0,0,E.width,E.height):j.clearRect(0,0,E.width,E.height);var H=_.core("outside-texture-bg-color").value,q=_.core("outside-texture-bg-opacity").value;e.colorFillStyle(j,H[0],H[1],H[2],q),j.fillRect(0,0,E.width,E.height);var m=t.zoom();L(j,!1),j.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u),j.drawImage(z,E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u)}else e.textureOnViewport&&!n&&(e.textureCache=null);var W=t.extent(),$=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),J=e.hideEdgesOnViewport&&$,X=[];if(X[e.NODE]=!c[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,X[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),X[e.DRAG]=!c[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,X[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),c[e.NODE]||i||a||X[e.NODE]){var Z=d&&!X[e.NODE]&&h!==1,j=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:l.contexts[e.NODE]),ue=d&&!Z?"motionBlur":void 0;L(j,ue),J?e.drawCachedNodes(j,I.nondrag,u,W):e.drawLayeredElements(j,I.nondrag,u,W),e.debug&&e.drawDebugPoints(j,I.nondrag),!i&&!d&&(c[e.NODE]=!1)}if(!a&&(c[e.DRAG]||i||X[e.DRAG])){var Z=d&&!X[e.DRAG]&&h!==1,j=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:l.contexts[e.DRAG]);L(j,d&&!Z?"motionBlur":void 0),J?e.drawCachedNodes(j,I.drag,u,W):e.drawCachedElements(j,I.drag,u,W),e.debug&&e.drawDebugPoints(j,I.drag),!i&&!d&&(c[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,L),d&&h!==1){var re=l.contexts[e.NODE],ne=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],le=l.contexts[e.DRAG],ce=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],pe=function(se,de,ge){se.setTransform(1,0,0,1,0,0),ge||!b?se.clearRect(0,0,e.canvasWidth,e.canvasHeight):k(se,0,0,e.canvasWidth,e.canvasHeight);var Oe=h;se.drawImage(de,0,0,e.canvasWidth*Oe,e.canvasHeight*Oe,0,0,e.canvasWidth,e.canvasHeight)};(c[e.NODE]||X[e.NODE])&&(pe(re,ne,X[e.NODE]),c[e.NODE]=!1),(c[e.DRAG]||X[e.DRAG])&&(pe(le,ce,X[e.DRAG]),c[e.DRAG]=!1)}e.prevViewport=E,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,c[e.NODE]=!0,c[e.DRAG]=!0,e.redraw()},qee)),n||t.emit("render")};var W0;Gl.drawSelectionRectangle=function(r,e){var t=this,n=t.cy,i=t.data,a=n.style(),o=r.drawOnlyNodeLayer,s=r.drawAllLayers,u=i.canvasNeedsRedraw,l=r.forcedContext;if(t.showFps||!o&&u[t.SELECT_BOX]&&!s){var c=l||i.contexts[t.SELECT_BOX];if(e(c),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),d=a.core("selection-box-border-width").value/f;c.lineWidth=d,c.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",c.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),d>0&&(c.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",c.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(i.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),h=i.bgActivePosistion;c.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",c.beginPath(),c.arc(h.x,h.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),c.fill()}var p=t.lastRedrawTime;if(t.showFps&&p){p=Math.round(p);var g=Math.round(1e3/p),y="1 frame = "+p+" ms = "+g+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!W0){var b=c.measureText(y);W0=b.actualBoundingBoxAscent}c.fillText(y,0,W0);var _=60;c.strokeRect(0,W0+10,250,20),c.fillRect(0,W0+10,250*Math.min(g/_,1),20)}s||(u[t.SELECT_BOX]=!1)}};function O3(r,e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(n));return n}function Gee(r,e,t){var n=O3(r,r.VERTEX_SHADER,e),i=O3(r,r.FRAGMENT_SHADER,t),a=r.createProgram();if(r.attachShader(a,n),r.attachShader(a,i),r.linkProgram(a),!r.getProgramParameter(a,r.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function Vee(r,e,t){t===void 0&&(t=e);var n=r.makeOffscreenCanvas(e,t),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function dD(r){var e=r.pixelRatio,t=r.cy.zoom(),n=r.cy.pan();return{zoom:t*e,pan:{x:n.x*e,y:n.y*e}}}function Hee(r){var e=r.pixelRatio,t=r.cy.zoom();return t*e}function Wee(r,e,t,n,i){var a=n*t+e.x,o=i*t+e.y;return o=Math.round(r.canvasHeight-o),[a,o]}function Yee(r){return r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function Xee(r,e){if(r.length!==e.length)return!1;for(var t=0;t>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function $ee(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function Kee(r,e){var t=r.createTexture();return t.buffer=function(n){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function xU(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function EU(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Zee(r,e,t,n,i,a){switch(e){case r.FLOAT:return new Float32Array(t.buffer,a*n,i);case r.INT:return new Int32Array(t.buffer,a*n,i)}}function Qee(r,e,t,n){var i=xU(r,e),a=Uo(i,2),o=a[0],s=a[1],u=EU(r,s,n),l=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferData(r.ARRAY_BUFFER,u,r.STATIC_DRAW),s===r.FLOAT?r.vertexAttribPointer(t,o,s,!1,0,0):s===r.INT&&r.vertexAttribIPointer(t,o,s,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),l}function uh(r,e,t,n){var i=xU(r,t),a=Uo(i,3),o=a[0],s=a[1],u=a[2],l=EU(r,s,e*o),c=o*u,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*c,r.DYNAMIC_DRAW),r.enableVertexAttribArray(n),s===r.FLOAT?r.vertexAttribPointer(n,o,s,!1,c,0):s===r.INT&&r.vertexAttribIPointer(n,o,s,c,0),r.vertexAttribDivisor(n,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var d=new Array(e),h=0;ho&&(s=o/n,u=n*s,l=i*s),{scale:s,texW:u,texH:l}}},{key:"draw",value:function(t,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,s=this.texRows,u=this.texHeight,l=this.getScale(n),c=l.scale,f=l.texW,d=l.texH,h=function(m,x){if(i&&x){var S=x.context,O=m.x,E=m.row,T=O,P=u*E;S.save(),S.translate(T,P),S.scale(c,c),i(S,n),S.restore()}},p=[null,null],g=function(){h(a.freePointer,a.canvas),p[0]={x:a.freePointer.x,y:a.freePointer.row*u,w:f,h:d},p[1]={x:a.freePointer.x+f,y:a.freePointer.row*u,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==o&&(a.freePointer.x=0,a.freePointer.row++)},y=function(){var m=a.scratch,x=a.canvas;m.clear(),h({x:0,row:0},m);var S=o-a.freePointer.x,O=f-S,E=u;{var T=a.freePointer.x,P=a.freePointer.row*u,I=S;x.context.drawImage(m,0,0,I,E,T,P,I,E),p[0]={x:T,y:P,w:I,h:d}}{var k=S,L=(a.freePointer.row+1)*u,B=O;x&&x.context.drawImage(m,k,0,B,E,0,L,B,E),p[1]={x:0,y:L,w:B,h:d}}a.freePointer.x=O,a.freePointer.row++},b=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=o)g();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===o?(b(),g()):this.enableWrapping?y():(b(),g())}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(t),o=a.texW;return this.freePointer.x+o>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,o=a===void 0?!1:a,s=i.filterEle,u=s===void 0?function(){return!0}:s,l=i.filterType,c=l===void 0?function(){return!0}:l,f=!1,d=!1,h=Ac(t),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;if(u(g)){var y=Ac(this.renderTypes.values()),b;try{var _=function(){var x=b.value,S=x.type;if(c(S)){var O=n.collections.get(x.collection),E=x.getKey(g),T=Array.isArray(E)?E:[E];if(o)T.forEach(function(L){return O.markKeyForGC(L)}),d=!0;else{var P=x.getID?x.getID(g):g.id(),I=n._key(S,P),k=n.typeAndIdToKey.get(I);k!==void 0&&!Xee(T,k)&&(f=!0,n.typeAndIdToKey.delete(I),k.forEach(function(L){return O.markKeyForGC(L)}))}}};for(y.s();!(b=y.n()).done;)_()}catch(m){y.e(m)}finally{y.f()}}}}catch(m){h.e(m)}finally{h.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var t=Ac(this.collections.values()),n;try{for(t.s();!(n=t.n()).done;){var i=n.value;i.gc()}}catch(a){t.e(a)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,n,i,a){var o=this.renderTypes.get(n),s=this.collections.get(o.collection),u=!1,l=s.draw(a,i,function(d){o.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),o.drawElement(d,t,i,!0,!0),d.restore()):o.drawElement(d,t,i,!0,!0),u=!0});if(u){var c=o.getID?o.getID(t):t.id(),f=this._key(n,c);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return l}},{key:"getAtlasInfo",value:function(t,n){var i=this,a=this.renderTypes.get(n),o=a.getKey(t),s=Array.isArray(o)?o:[o];return s.map(function(u){var l=a.getBoundingBox(t,u),c=i.getOrCreateAtlas(t,n,l,u),f=c.getOffsets(u),d=Uo(f,2),h=d[0],p=d[1];return{atlas:c,tex:h,tex1:h,tex2:p,bb:l}})}},{key:"getDebugInfo",value:function(){var t=[],n=Ac(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=Uo(i.value,2),o=a[0],s=a[1],u=s.getCounts(),l=u.keyCount,c=u.atlasCount;t.push({type:o,keyCount:l,atlasCount:c})}}catch(f){n.e(f)}finally{n.f()}return t}}])})(),ste=(function(){function r(e){zp(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return qp(r,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0}},{key:"getAtlasIndexForBatch",value:function(t){var n=this.batchAtlases.indexOf(t);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),n=this.batchAtlases.length-1}return n}}])})(),ute=` +`),y=0;y1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var u=0;u=r.desktopTapThreshold2}var un=a(_e);Vr&&(r.hoverData.tapholdCancelled=!0);var bn=function(){var Ir=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Ir.length===0?(Ir.push(Rr[0]),Ir.push(Rr[1])):(Ir[0]+=Rr[0],Ir[1]+=Rr[1])};Qe=!0,i(Yt,["mousemove","vmousemove","tapdrag"],_e,{x:ct[0],y:ct[1]});var wn=function(Ir){return{originalEvent:_e,type:Ir,position:{x:ct[0],y:ct[1]}}},_n=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||Ze.emit(wn("boxstart")),jt[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Vr){var xn=wn("cxtdrag");Ut?Ut.emit(xn):Ze.emit(xn),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||Yt!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(wn("cxtdragout")),r.hoverData.cxtOver=Yt,Yt&&Yt.emit(wn("cxtdragover")))}}else if(r.hoverData.dragging){if(Qe=!0,Ze.panningEnabled()&&Ze.userPanningEnabled()){var on;if(r.hoverData.justStartedPan){var Nn=r.hoverData.mdownPos;on={x:(ct[0]-Nn[0])*nt,y:(ct[1]-Nn[1])*nt},r.hoverData.justStartedPan=!1}else on={x:Rr[0]*nt,y:Rr[1]*nt};Ze.panBy(on),Ze.emit(wn("dragpan")),r.hoverData.dragged=!0}ct=r.projectIntoViewport(_e.clientX,_e.clientY)}else if(jt[4]==1&&(Ut==null||Ut.pannable())){if(Vr){if(!r.hoverData.dragging&&Ze.boxSelectionEnabled()&&(un||!Ze.panningEnabled()||!Ze.userPanningEnabled()))_n();else if(!r.hoverData.selecting&&Ze.panningEnabled()&&Ze.userPanningEnabled()){var fi=o(Ut,r.hoverData.downs);fi&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,jt[4]=0,r.data.bgActivePosistion=vm(Lt),r.redrawHint("select",!0),r.redraw())}Ut&&Ut.pannable()&&Ut.active()&&Ut.unactivate()}}else{if(Ut&&Ut.pannable()&&Ut.active()&&Ut.unactivate(),(!Ut||!Ut.grabbed())&&Yt!=sr&&(sr&&i(sr,["mouseout","tapdragout"],_e,{x:ct[0],y:ct[1]}),Yt&&i(Yt,["mouseover","tapdragover"],_e,{x:ct[0],y:ct[1]}),r.hoverData.last=Yt),Ut)if(Vr){if(Ze.boxSelectionEnabled()&&un)Ut&&Ut.grabbed()&&(b(Xt),Ut.emit(wn("freeon")),Xt.emit(wn("free")),r.dragData.didDrag&&(Ut.emit(wn("dragfreeon")),Xt.emit(wn("dragfree")))),_n();else if(Ut&&Ut.grabbed()&&r.nodeIsDraggable(Ut)){var gn=!r.dragData.didDrag;gn&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||g(Xt,{inDragLayer:!0});var yn={x:0,y:0};if(Ht(Rr[0])&&Ht(Rr[1])&&(yn.x+=Rr[0],yn.y+=Rr[1],gn)){var Jn=r.hoverData.dragDelta;Jn&&Ht(Jn[0])&&Ht(Jn[1])&&(yn.x+=Jn[0],yn.y+=Jn[1])}r.hoverData.draggingEles=!0,Xt.silentShift(yn).emit(wn("position")).emit(wn("drag")),r.redrawHint("drag",!0),r.redraw()}}else bn();Qe=!0}if(jt[2]=ct[0],jt[3]=ct[1],Qe)return _e.stopPropagation&&_e.stopPropagation(),_e.preventDefault&&_e.preventDefault(),!1}},!1);var L,B,j;r.registerBinding(e,"mouseup",function(_e){if(!(r.hoverData.which===1&&_e.which!==1&&r.hoverData.capture)){var Ue=r.hoverData.capture;if(Ue){r.hoverData.capture=!1;var Qe=r.cy,Ze=r.projectIntoViewport(_e.clientX,_e.clientY),nt=r.selection,It=r.findNearestElement(Ze[0],Ze[1],!0,!1),ct=r.dragData.possibleDragElements,Lt=r.hoverData.down,Rt=a(_e);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,Lt&&Lt.unactivate();var jt=function(Br){return{originalEvent:_e,type:Br,position:{x:Ze[0],y:Ze[1]}}};if(r.hoverData.which===3){var Yt=jt("cxttapend");if(Lt?Lt.emit(Yt):Qe.emit(Yt),!r.hoverData.cxtDragged){var sr=jt("cxttap");Lt?Lt.emit(sr):Qe.emit(sr)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(i(It,["mouseup","tapend","vmouseup"],_e,{x:Ze[0],y:Ze[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(i(Lt,["click","tap","vclick"],_e,{x:Ze[0],y:Ze[1]}),B=!1,_e.timeStamp-j<=Qe.multiClickDebounceTime()?(L&&clearTimeout(L),B=!0,j=null,i(Lt,["dblclick","dbltap","vdblclick"],_e,{x:Ze[0],y:Ze[1]})):(L=setTimeout(function(){B||i(Lt,["oneclick","onetap","voneclick"],_e,{x:Ze[0],y:Ze[1]})},Qe.multiClickDebounceTime()),j=_e.timeStamp)),Lt==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!a(_e)&&(Qe.$(t).unselect(["tapunselect"]),ct.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=ct=Qe.collection()),It==Lt&&!r.dragData.didDrag&&!r.hoverData.selecting&&It!=null&&It._private.selectable&&(r.hoverData.dragging||(Qe.selectionType()==="additive"||Rt?It.selected()?It.unselect(["tapunselect"]):It.select(["tapselect"]):Rt||(Qe.$(t).unmerge(It).unselect(["tapunselect"]),It.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var Ut=Qe.collection(r.getAllInBox(nt[0],nt[1],nt[2],nt[3]));r.redrawHint("select",!0),Ut.length>0&&r.redrawHint("eles",!0),Qe.emit(jt("boxend"));var Rr=function(Br){return Br.selectable()&&!Br.selected()};Qe.selectionType()==="additive"||Rt||Qe.$(t).unmerge(Ut).unselect(),Ut.emit(jt("box")).stdFilter(Rr).select().emit(jt("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!nt[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Xt=Lt&&Lt.grabbed();b(ct),Xt&&(Lt.emit(jt("freeon")),ct.emit(jt("free")),r.dragData.didDrag&&(Lt.emit(jt("dragfreeon")),ct.emit(jt("dragfree"))))}}nt[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var z=[],H=4,q,W=1e5,$=function(_e,Ue){for(var Qe=0;Qe<_e.length;Qe++)if(_e[Qe]%Ue!==0)return!1;return!0},J=function(_e){for(var Ue=Math.abs(_e[0]),Qe=1;Qe<_e.length;Qe++)if(Math.abs(_e[Qe])!==Ue)return!1;return!0},X=function(_e){var Ue=!1,Qe=_e.deltaY;if(Qe==null&&(_e.wheelDeltaY!=null?Qe=_e.wheelDeltaY/4:_e.wheelDelta!=null&&(Qe=_e.wheelDelta/4)),Qe!==0){if(q==null)if(z.length>=H){var Ze=z;if(q=$(Ze,5),!q){var nt=Math.abs(Ze[0]);q=J(Ze)&&nt>5}if(q)for(var It=0;It5&&(Qe=K5(Qe)*5),sr=Qe/-250,q&&(sr/=W,sr*=3),sr=sr*r.wheelSensitivity;var Ut=_e.deltaMode===1;Ut&&(sr*=33);var Rr=ct.zoom()*Math.pow(10,sr);_e.type==="gesturechange"&&(Rr=r.gestureStartZoom*_e.scale),ct.zoom({level:Rr,renderedPosition:{x:Yt[0],y:Yt[1]}}),ct.emit({type:_e.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:_e,position:{x:jt[0],y:jt[1]}})}}}};r.registerBinding(r.container,"wheel",X,!0),r.registerBinding(e,"scroll",function(_e){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(_e){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||_e.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(tt){r.hasTouchStarted||X(tt)},!0),r.registerBinding(r.container,"mouseout",function(_e){var Ue=r.projectIntoViewport(_e.clientX,_e.clientY);r.cy.emit({originalEvent:_e,type:"mouseout",position:{x:Ue[0],y:Ue[1]}})},!1),r.registerBinding(r.container,"mouseover",function(_e){var Ue=r.projectIntoViewport(_e.clientX,_e.clientY);r.cy.emit({originalEvent:_e,type:"mouseover",position:{x:Ue[0],y:Ue[1]}})},!1);var Z,ue,re,ne,le,ce,pe,fe,se,de,ge,Oe,ke,De=function(_e,Ue,Qe,Ze){return Math.sqrt((Qe-_e)*(Qe-_e)+(Ze-Ue)*(Ze-Ue))},Ne=function(_e,Ue,Qe,Ze){return(Qe-_e)*(Qe-_e)+(Ze-Ue)*(Ze-Ue)},Te;r.registerBinding(r.container,"touchstart",Te=function(_e){if(r.hasTouchStarted=!0,!!I(_e)){m(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var Ue=r.cy,Qe=r.touchData.now,Ze=r.touchData.earlier;if(_e.touches[0]){var nt=r.projectIntoViewport(_e.touches[0].clientX,_e.touches[0].clientY);Qe[0]=nt[0],Qe[1]=nt[1]}if(_e.touches[1]){var nt=r.projectIntoViewport(_e.touches[1].clientX,_e.touches[1].clientY);Qe[2]=nt[0],Qe[3]=nt[1]}if(_e.touches[2]){var nt=r.projectIntoViewport(_e.touches[2].clientX,_e.touches[2].clientY);Qe[4]=nt[0],Qe[5]=nt[1]}var It=function(un){return{originalEvent:_e,type:un,position:{x:Qe[0],y:Qe[1]}}};if(_e.touches[1]){r.touchData.singleTouchMoved=!0,b(r.dragData.touchDragEles);var ct=r.findContainerClientCoords();se=ct[0],de=ct[1],ge=ct[2],Oe=ct[3],Z=_e.touches[0].clientX-se,ue=_e.touches[0].clientY-de,re=_e.touches[1].clientX-se,ne=_e.touches[1].clientY-de,ke=0<=Z&&Z<=ge&&0<=re&&re<=ge&&0<=ue&&ue<=Oe&&0<=ne&&ne<=Oe;var Lt=Ue.pan(),Rt=Ue.zoom();le=De(Z,ue,re,ne),ce=Ne(Z,ue,re,ne),pe=[(Z+re)/2,(ue+ne)/2],fe=[(pe[0]-Lt.x)/Rt,(pe[1]-Lt.y)/Rt];var jt=200,Yt=jt*jt;if(ce=1){for(var mr=r.touchData.startPosition=[null,null,null,null,null,null],ur=0;ur=r.touchTapThreshold2}if(Ue&&r.touchData.cxt){_e.preventDefault();var ur=_e.touches[0].clientX-se,sn=_e.touches[0].clientY-de,Fr=_e.touches[1].clientX-se,un=_e.touches[1].clientY-de,bn=Ne(ur,sn,Fr,un),wn=bn/ce,_n=150,xn=_n*_n,on=1.5,Nn=on*on;if(wn>=Nn||bn>=xn){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var fi=Rt("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(fi),r.touchData.start=null):Ze.emit(fi)}}if(Ue&&r.touchData.cxt){var fi=Rt("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(fi):Ze.emit(fi),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var gn=r.findNearestElement(nt[0],nt[1],!0,!0);(!r.touchData.cxtOver||gn!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(Rt("cxtdragout")),r.touchData.cxtOver=gn,gn&&gn.emit(Rt("cxtdragover")))}else if(Ue&&_e.touches[2]&&Ze.boxSelectionEnabled())_e.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||Ze.emit(Rt("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,Qe[4]=1,!Qe||Qe.length===0||Qe[0]===void 0?(Qe[0]=(nt[0]+nt[2]+nt[4])/3,Qe[1]=(nt[1]+nt[3]+nt[5])/3,Qe[2]=(nt[0]+nt[2]+nt[4])/3+1,Qe[3]=(nt[1]+nt[3]+nt[5])/3+1):(Qe[2]=(nt[0]+nt[2]+nt[4])/3,Qe[3]=(nt[1]+nt[3]+nt[5])/3),r.redrawHint("select",!0),r.redraw();else if(Ue&&_e.touches[1]&&!r.touchData.didSelect&&Ze.zoomingEnabled()&&Ze.panningEnabled()&&Ze.userZoomingEnabled()&&Ze.userPanningEnabled()){_e.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var yn=r.dragData.touchDragEles;if(yn){r.redrawHint("drag",!0);for(var Jn=0;Jn0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var Q;r.registerBinding(e,"touchcancel",Q=function(_e){var Ue=r.touchData.start;r.touchData.capture=!1,Ue&&Ue.unactivate()});var ie,we,Ee,Me;if(r.registerBinding(e,"touchend",ie=function(_e){var Ue=r.touchData.start,Qe=r.touchData.capture;if(Qe)_e.touches.length===0&&(r.touchData.capture=!1),_e.preventDefault();else return;var Ze=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var nt=r.cy,It=nt.zoom(),ct=r.touchData.now,Lt=r.touchData.earlier;if(_e.touches[0]){var Rt=r.projectIntoViewport(_e.touches[0].clientX,_e.touches[0].clientY);ct[0]=Rt[0],ct[1]=Rt[1]}if(_e.touches[1]){var Rt=r.projectIntoViewport(_e.touches[1].clientX,_e.touches[1].clientY);ct[2]=Rt[0],ct[3]=Rt[1]}if(_e.touches[2]){var Rt=r.projectIntoViewport(_e.touches[2].clientX,_e.touches[2].clientY);ct[4]=Rt[0],ct[5]=Rt[1]}var jt=function(xn){return{originalEvent:_e,type:xn,position:{x:ct[0],y:ct[1]}}};Ue&&Ue.unactivate();var Yt;if(r.touchData.cxt){if(Yt=jt("cxttapend"),Ue?Ue.emit(Yt):nt.emit(Yt),!r.touchData.cxtDragged){var sr=jt("cxttap");Ue?Ue.emit(sr):nt.emit(sr)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!_e.touches[2]&&nt.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var Ut=nt.collection(r.getAllInBox(Ze[0],Ze[1],Ze[2],Ze[3]));Ze[0]=void 0,Ze[1]=void 0,Ze[2]=void 0,Ze[3]=void 0,Ze[4]=0,r.redrawHint("select",!0),nt.emit(jt("boxend"));var Rr=function(xn){return xn.selectable()&&!xn.selected()};Ut.emit(jt("box")).stdFilter(Rr).select().emit(jt("boxselect")),Ut.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(Ue!=null&&Ue.unactivate(),_e.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!_e.touches[1]){if(!_e.touches[0]){if(!_e.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Xt=r.dragData.touchDragEles;if(Ue!=null){var Vr=Ue._private.grabbed;b(Xt),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Vr&&(Ue.emit(jt("freeon")),Xt.emit(jt("free")),r.dragData.didDrag&&(Ue.emit(jt("dragfreeon")),Xt.emit(jt("dragfree")))),i(Ue,["touchend","tapend","vmouseup","tapdragout"],_e,{x:ct[0],y:ct[1]}),Ue.unactivate(),r.touchData.start=null}else{var Br=r.findNearestElement(ct[0],ct[1],!0,!0);i(Br,["touchend","tapend","vmouseup","tapdragout"],_e,{x:ct[0],y:ct[1]})}var mr=r.touchData.startPosition[0]-ct[0],ur=mr*mr,sn=r.touchData.startPosition[1]-ct[1],Fr=sn*sn,un=ur+Fr,bn=un*It*It;r.touchData.singleTouchMoved||(Ue||nt.$(":selected").unselect(["tapunselect"]),i(Ue,["tap","vclick"],_e,{x:ct[0],y:ct[1]}),we=!1,_e.timeStamp-Me<=nt.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),we=!0,Me=null,i(Ue,["dbltap","vdblclick"],_e,{x:ct[0],y:ct[1]})):(Ee=setTimeout(function(){we||i(Ue,["onetap","voneclick"],_e,{x:ct[0],y:ct[1]})},nt.multiClickDebounceTime()),Me=_e.timeStamp)),Ue!=null&&!r.dragData.didDrag&&Ue._private.selectable&&bn"u"){var Ie=[],Ye=function(_e){return{clientX:_e.clientX,clientY:_e.clientY,force:1,identifier:_e.pointerId,pageX:_e.pageX,pageY:_e.pageY,radiusX:_e.width/2,radiusY:_e.height/2,screenX:_e.screenX,screenY:_e.screenY,target:_e.target}},ot=function(_e){return{event:_e,touch:Ye(_e)}},mt=function(_e){Ie.push(ot(_e))},wt=function(_e){for(var Ue=0;Ue0)return Z[0]}return null},p=Object.keys(d),g=0;g0?h:hF(a,o,e,t,n,i,s,u)},checkPoint:function(e,t,n,i,a,o,s,u){u=u==="auto"?Mp(i,a):u;var l=2*u;if(pv(e,t,this.points,o,s,i,a-l,[0,-1],n)||pv(e,t,this.points,o,s,i-l,a,[0,-1],n))return!0;var c=i/2+2*n,f=a/2+2*n,d=[o-c,s-f,o-c,s,o+c,s,o+c,s-f];return!!(Cc(e,t,d)||jg(e,t,l,l,o+i/2-u,s+a/2-u,n)||jg(e,t,l,l,o-i/2+u,s+a/2-u,n))}}};_v.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Bl(3,0)),this.generateRoundPolygon("round-triangle",Bl(3,0)),this.generatePolygon("rectangle",Bl(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",Bl(5,0)),this.generateRoundPolygon("round-pentagon",Bl(5,0)),this.generatePolygon("hexagon",Bl(6,0)),this.generateRoundPolygon("round-hexagon",Bl(6,0)),this.generatePolygon("heptagon",Bl(7,0)),this.generateRoundPolygon("round-heptagon",Bl(7,0)),this.generatePolygon("octagon",Bl(8,0)),this.generateRoundPolygon("round-octagon",Bl(8,0));var n=new Array(20);{var i=cM(5,0),a=cM(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*x)break}else if(l){if(_>=e.deqCost*h||_>=e.deqAvgCost*d)break}else if(m>=e.deqNoDrawCost*jO)break;var S=e.deq(n,y,g);if(S.length>0)for(var O=0;O0&&(e.onDeqd(n,p),!l&&e.shouldRedraw(n,p,y,g)&&a())},s=e.priority||Y5;i.beforeRender(o,s(n))}}}},aee=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dx;zp(this,r),this.idsByKey=new sv,this.keyForId=new sv,this.cachesByLvl=new sv,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return qp(r,[{key:"getIdsFor",value:function(t){t==null&&Ia("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(t);return i||(i=new $m,n.set(t,i)),i}},{key:"addIdForKey",value:function(t,n){t!=null&&this.getIdsFor(t).add(n)}},{key:"deleteIdForKey",value:function(t,n){t!=null&&this.getIdsFor(t).delete(n)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n),a=this.getKey(t);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(t){var n=t.id(),i=this.keyForId.get(n),a=this.getKey(t);return i!==a}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var n=this.cachesByLvl,i=this.lvls,a=n.get(t);return a||(a=new sv,n.set(t,a),i.push(t)),a}},{key:"getCache",value:function(t,n){return this.getCachesAt(n).get(t)}},{key:"get",value:function(t,n){var i=this.getKey(t),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(t),a}},{key:"getForCachedKey",value:function(t,n){var i=this.keyForId.get(t.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(t,n){return this.getCachesAt(n).has(t)}},{key:"has",value:function(t,n){var i=this.getKey(t);return this.hasCache(i,n)}},{key:"setCache",value:function(t,n,i){i.key=t,this.getCachesAt(n).set(t,i)}},{key:"set",value:function(t,n,i){var a=this.getKey(t);this.setCache(a,n,i),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,n){this.getCachesAt(n).delete(t)}},{key:"delete",value:function(t,n){var i=this.getKey(t);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(t){var n=this;this.lvls.forEach(function(i){return n.deleteCache(t,i)})}},{key:"invalidate",value:function(t){var n=t.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(t);var a=this.doesEleInvalidateKey(t);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}])})(),m3=25,ww=50,nx=-4,SM=3,yU=7.99,oee=8,see=1024,uee=1024,lee=1024,cee=.2,fee=.8,dee=10,hee=.15,vee=.1,pee=.9,gee=.9,yee=100,mee=1,gm={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},bee=fu({getKey:null,doesEleInvalidateKey:Dx,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:oF,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vb=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var i=bee(t);kr(n,i),n.lookup=new aee(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},cs=vb.prototype;cs.reasons=gm;cs.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};cs.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=t[r]=t[r]||[];return n};cs.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new K1(function(t,n){return n.reqs-t.reqs});return e};cs.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};cs.getElement=function(r,e,t,n,i){var a=this,o=this.renderer,s=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!a.allowEdgeTxrCaching&&r.isEdge()||!a.allowParentTxrCaching&&r.isParent())return null;if(n==null&&(n=Math.ceil($5(s*t))),n=yU||n>SM)return null;var l=Math.pow(2,n),c=e.h*l,f=e.w*l,d=o.eleTextBiggerThanMin(r,l);if(!this.isVisible(r,d))return null;var h=u.get(r,n);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var p;if(c<=m3?p=m3:c<=ww?p=ww:p=Math.ceil(c/ww)*ww,c>lee||f>uee)return null;var g=a.getTextureQueue(p),y=g[g.length-2],b=function(){return a.recycleTexture(p,f)||a.addTexture(p,f)};y||(y=g[g.length-1]),y||(y=b()),y.width-y.usedWidthn;k--)P=a.getElement(r,e,t,k,gm.downscale);I()}else return a.queueElement(r,O.level-1),O;else{var L;if(!m&&!x&&!S)for(var B=n-1;B>=nx;B--){var j=u.get(r,B);if(j){L=j;break}}if(_(L))return a.queueElement(r,n),L;y.context.translate(y.usedWidth,0),y.context.scale(l,l),this.drawElement(y.context,r,e,d,!1),y.context.scale(1/l,1/l),y.context.translate(-y.usedWidth,0)}return h={x:y.usedWidth,texture:y,level:n,scale:l,width:f,height:c,scaledLabelShown:d},y.usedWidth+=Math.ceil(f+oee),y.eleCaches.push(h),u.set(r,n,h),a.checkTextureFullness(y),h};cs.invalidateElements=function(r){for(var e=0;e=cee*r.width&&this.retireTexture(r)};cs.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>fee&&r.fullnessChecks>=dee?Pp(t,r):r.fullnessChecks++};cs.retireTexture=function(r){var e=this,t=r.height,n=e.getTextureQueue(t),i=this.lookup;Pp(n,r),r.retired=!0;for(var a=r.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,X5(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Pp(i,o),n.push(o),o}};cs.queueElement=function(r,e){var t=this,n=t.getElementQueue(),i=t.getElementKeyToQueue(),a=this.getKey(r),o=i[a];if(o)o.level=Math.max(o.level,e),o.eles.merge(r),o.reqs++,n.updateItem(o);else{var s={eles:r.spawn().merge(r),level:e,reqs:1,key:a};n.push(s),i[a]=s}};cs.dequeue=function(r){for(var e=this,t=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o0;o++){var s=t.pop(),u=s.key,l=s.eles[0],c=a.hasCache(l,s.level);if(n[u]=null,c)continue;i.push(s);var f=e.getBoundingBox(l);e.getElement(l,f,r,s.level,gm.dequeue)}return i};cs.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(r),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=W5,t.updateItem(a),t.pop(),n[i]=null):a.eles.unmerge(r))};cs.onDequeue=function(r){this.onDequeues.push(r)};cs.offDequeue=function(r){Pp(this.onDequeues,r)};cs.setupDequeueing=gU.setupDequeueing({deqRedrawThreshold:yee,deqCost:hee,deqAvgCost:vee,deqNoDrawCost:pee,deqFastCost:gee,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=wee||t>Ux)return null}n.validateLayersElesOrdering(t,r);var u=n.layersByLevel,l=Math.pow(2,t),c=u[t]=u[t]||[],f,d=n.levelIsComplete(t,r),h,p=function(){var I=function(z){if(n.validateLayersElesOrdering(z,r),n.levelIsComplete(z,r))return h=u[z],!0},k=function(z){if(!h)for(var H=t+z;Db<=H&&H<=Ux&&!I(H);H+=z);};k(1),k(-1);for(var L=c.length-1;L>=0;L--){var B=c[L];B.invalid&&Pp(c,B)}};if(!d)p();else return c;var g=function(){if(!f){f=zl();for(var I=0;I_3||B>_3)return null;var j=L*B;if(j>Ree)return null;var z=n.makeLayer(f,t);if(k!=null){var H=c.indexOf(k)+1;c.splice(H,0,z)}else(I.insert===void 0||I.insert)&&c.unshift(z);return z};if(n.skipping&&!s)return null;for(var b=null,_=r.length/_ee,m=!s,x=0;x=_||!dF(b.bb,S.boundingBox()))&&(b=y({insert:!0,after:b}),!b))return null;h||m?n.queueLayer(b,S):n.drawEleInLayer(b,S,t,e),b.eles.push(S),E[t]=b}return h||(m?null:c)};du.getEleLevelForLayerLevel=function(r,e){return r};du.drawEleInLayer=function(r,e,t,n){var i=this,a=this.renderer,o=r.context,s=e.boundingBox();s.w===0||s.h===0||!e.visible()||(t=i.getEleLevelForLayerLevel(t,n),a.setImgSmoothing(o,!1),a.drawCachedElement(o,e,null,null,t,Pee),a.setImgSmoothing(o,!0))};du.levelIsComplete=function(r,e){var t=this,n=t.layersByLevel[r];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||o.invalid)return!1;i+=o.eles.length}return i===e.length};du.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var n=0;n0){e=!0;break}}return e};du.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=vv(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(n,i,a){e.invalidateLayer(n)}))};du.invalidateLayer=function(r){if(this.lastInvalidationTime=vv(),!r.invalid){var e=r.level,t=r.eles,n=this.layersByLevel[e];Pp(n,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=e._private.rscratch;if(!(a&&!e.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var u;t&&(u=t,r.translate(-u.x1,-u.y1));var l=a?e.pstyle("opacity").value:1,c=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,p=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,b=l*c,_=l*c,m=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;f==="straight-triangle"?(o.eleStrokeStyle(r,e,z),o.drawEdgeTrianglePath(e,r,s.allpts)):(r.lineWidth=h,r.lineCap=p,o.eleStrokeStyle(r,e,z),o.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")},x=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;if(r.lineWidth=h+g,r.lineCap=p,g>0)o.colorStrokeStyle(r,y[0],y[1],y[2],z);else{r.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(e,r,s.allpts):(o.drawEdgePath(e,r,s.allpts,d),r.lineCap="butt")},S=function(){i&&o.drawEdgeOverlay(r,e)},O=function(){i&&o.drawEdgeUnderlay(r,e)},E=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_;o.drawArrowheads(r,e,z)},T=function(){o.drawElementText(r,e,null,n)};r.lineJoin="round";var P=e.pstyle("ghost").value==="yes";if(P){var I=e.pstyle("ghost-offset-x").pfValue,k=e.pstyle("ghost-offset-y").pfValue,L=e.pstyle("ghost-opacity").value,B=b*L;r.translate(I,k),m(B),E(B),r.translate(-I,-k)}else x();O(),m(),E(),S(),T(),t&&r.translate(u.x1,u.y1)}};var _U=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,o=a.usePaths(),s=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,l=2*u,c=n.pstyle("".concat(e,"-color")).value;t.lineWidth=l,s.edgeType==="self"&&!o?t.lineCap="butt":t.lineCap="round",a.colorStrokeStyle(t,c[0],c[1],c[2],i),a.drawEdgePath(n,t,s.allpts,"solid")}}}};wv.drawEdgeOverlay=_U("overlay");wv.drawEdgeUnderlay=_U("underlay");wv.drawEdgePath=function(r,e,t,n){var i=r._private.rscratch,a=e,o,s=!1,u=this.usePaths(),l=r.pstyle("line-dash-pattern").pfValue,c=r.pstyle("line-dash-offset").pfValue;if(u){var f=t.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(o=e=i.pathCache,s=!0):(o=e=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([]);break}if(!s&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(a&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var u=o.getLabelJustification(e);r.textAlign=u,r.textBaseline="bottom"}else{var l=e.element()._private.rscratch.badLine,c=e.pstyle("label"),f=e.pstyle("source-label"),d=e.pstyle("target-label");if(l||(!c||!c.value)&&(!f||!f.value)&&(!d||!d.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,p;t&&(p=t,r.translate(-p.x1,-p.y1)),i==null?(o.drawText(r,e,null,h,a),e.isEdge()&&(o.drawText(r,e,"source",h,a),o.drawText(r,e,"target",h,a))):o.drawText(r,e,i,h,a),t&&r.translate(p.x1,p.y1)};ny.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*s,l=e.pstyle("color").value,c=e.pstyle("text-outline-color").value;r.font=n+" "+o+" "+i+" "+a,r.lineJoin="round",this.colorFillStyle(r,l[0],l[1],l[2],s),this.colorStrokeStyle(r,c[0],c[1],c[2],u)};function zee(r,e,t,n,i){var a=Math.min(n,i),o=a/2,s=e+n/2,u=t+i/2;r.beginPath(),r.arc(s,u,o,0,Math.PI*2),r.closePath()}function S3(r,e,t,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,n/2,i/2);r.beginPath(),r.moveTo(e+o,t),r.lineTo(e+n-o,t),r.quadraticCurveTo(e+n,t,e+n,t+o),r.lineTo(e+n,t+i-o),r.quadraticCurveTo(e+n,t+i,e+n-o,t+i),r.lineTo(e+o,t+i),r.quadraticCurveTo(e,t+i,e,t+i-o),r.lineTo(e,t+o),r.quadraticCurveTo(e,t,e+o,t),r.closePath()}ny.getTextAngle=function(r,e){var t,n=r._private,i=n.rscratch,a=e?e+"-":"",o=r.pstyle(a+"text-rotation");if(o.strValue==="autorotate"){var s=Tc(i,"labelAngle",e);t=r.isEdge()?s:0}else o.strValue==="none"?t=0:t=o.pfValue;return t};ny.drawText=function(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,o=a.rscratch,s=i?e.effectiveOpacity():1;if(!(i&&(s===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var u=Tc(o,"labelX",t),l=Tc(o,"labelY",t),c,f,d=this.getLabelText(e,t);if(d!=null&&d!==""&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(r,e,i);var h=t?t+"-":"",p=Tc(o,"labelWidth",t),g=Tc(o,"labelHeight",t),y=e.pstyle(h+"text-margin-x").pfValue,b=e.pstyle(h+"text-margin-y").pfValue,_=e.isEdge(),m=e.pstyle("text-halign").value,x=e.pstyle("text-valign").value;_&&(m="center",x="center"),u+=y,l+=b;var S;switch(n?S=this.getTextAngle(e,t):S=0,S!==0&&(c=u,f=l,r.translate(c,f),r.rotate(S),u=0,l=0),x){case"top":break;case"center":l+=g/2;break;case"bottom":l+=g;break}var O=e.pstyle("text-background-opacity").value,E=e.pstyle("text-border-opacity").value,T=e.pstyle("text-border-width").pfValue,P=e.pstyle("text-background-padding").pfValue,I=e.pstyle("text-background-shape").strValue,k=I==="round-rectangle"||I==="roundrectangle",L=I==="circle",B=2;if(O>0||T>0&&E>0){var j=r.fillStyle,z=r.strokeStyle,H=r.lineWidth,q=e.pstyle("text-background-color").value,W=e.pstyle("text-border-color").value,$=e.pstyle("text-border-style").value,J=O>0,X=T>0&&E>0,Z=u-P;switch(m){case"left":Z-=p;break;case"center":Z-=p/2;break}var ue=l-g-P,re=p+2*P,ne=g+2*P;if(J&&(r.fillStyle="rgba(".concat(q[0],",").concat(q[1],",").concat(q[2],",").concat(O*s,")")),X&&(r.strokeStyle="rgba(".concat(W[0],",").concat(W[1],",").concat(W[2],",").concat(E*s,")"),r.lineWidth=T,r.setLineDash))switch($){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=T/4,r.setLineDash([]);break;case"solid":default:r.setLineDash([]);break}if(k?(r.beginPath(),S3(r,Z,ue,re,ne,B)):L?(r.beginPath(),zee(r,Z,ue,re,ne)):(r.beginPath(),r.rect(Z,ue,re,ne)),J&&r.fill(),X&&r.stroke(),X&&$==="double"){var le=T/2;r.beginPath(),k?S3(r,Z+le,ue+le,re-2*le,ne-2*le,B):r.rect(Z+le,ue+le,re-2*le,ne-2*le),r.stroke()}r.fillStyle=j,r.strokeStyle=z,r.lineWidth=H,r.setLineDash&&r.setLineDash([])}var ce=2*e.pstyle("text-outline-width").pfValue;if(ce>0&&(r.lineWidth=ce),e.pstyle("text-wrap").value==="wrap"){var pe=Tc(o,"labelWrapCachedLines",t),fe=Tc(o,"labelLineHeight",t),se=p/2,de=this.getLabelJustification(e);switch(de==="auto"||(m==="left"?de==="left"?u+=-p:de==="center"&&(u+=-se):m==="center"?de==="left"?u+=-se:de==="right"&&(u+=se):m==="right"&&(de==="center"?u+=se:de==="right"&&(u+=p))),x){case"top":l-=(pe.length-1)*fe;break;case"center":case"bottom":l-=(pe.length-1)*fe;break}for(var ge=0;ge0&&r.strokeText(pe[ge],u,l),r.fillText(pe[ge],u,l),l+=fe}else ce>0&&r.strokeText(d,u,l),r.fillText(d,u,l);S!==0&&(r.rotate(-S),r.translate(-c,-f))}}};var Vp={};Vp.drawNode=function(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,u,l=e._private,c=l.rscratch,f=e.position();if(!(!Ht(f.x)||!Ht(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,h=o.usePaths(),p,g=!1,y=e.padding();s=e.width()+2*y,u=e.height()+2*y;var b;t&&(b=t,r.translate(-b.x1,-b.y1));for(var _=e.pstyle("background-image"),m=_.value,x=new Array(m.length),S=new Array(m.length),O=0,E=0;E0&&arguments[0]!==void 0?arguments[0]:B;o.eleFillStyle(r,e,vt)},fe=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X;o.colorStrokeStyle(r,j[0],j[1],j[2],vt)},se=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ne;o.colorStrokeStyle(r,ue[0],ue[1],ue[2],vt)},de=function(vt,tt,_e,Ue){var Qe=o.nodePathCache=o.nodePathCache||[],Ze=aF(_e==="polygon"?_e+","+Ue.join(","):_e,""+tt,""+vt,""+ce),nt=Qe[Ze],It,ct=!1;return nt!=null?(It=nt,ct=!0,c.pathCache=It):(It=new Path2D,Qe[Ze]=c.pathCache=It),{path:It,cacheHit:ct}},ge=e.pstyle("shape").strValue,Oe=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var ke=de(s,u,ge,Oe);p=ke.path,g=ke.cacheHit}var De=function(){if(!g){var vt=f;h&&(vt={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(p||r,vt.x,vt.y,s,u,ce,c)}h?r.fill(p):r.fill()},Ne=function(){for(var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,_e=l.backgrounding,Ue=0,Qe=0;Qe0&&arguments[0]!==void 0?arguments[0]:!1,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;o.hasPie(e)&&(o.drawPie(r,e,tt),vt&&(h||o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c)))},Y=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;o.hasStripe(e)&&(r.save(),h?r.clip(c.pathCache):(o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c),r.clip()),o.drawStripe(r,e,tt),r.restore(),vt&&(h||o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,u,ce,c)))},Q=function(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,tt=(k>0?k:-k)*vt,_e=k>0?0:255;k!==0&&(o.colorFillStyle(r,_e,_e,_e,tt),h?r.fill(p):r.fill())},ie=function(){if(L>0){if(r.lineWidth=L,r.lineCap=q,r.lineJoin=H,r.setLineDash)switch(z){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash($),r.lineDashOffset=J;break;case"solid":case"double":r.setLineDash([]);break}if(W!=="center"){if(r.save(),r.lineWidth*=2,W==="inside")h?r.clip(p):r.clip();else{var vt=new Path2D;vt.rect(-s/2-L,-u/2-L,s+2*L,u+2*L),vt.addPath(p),r.clip(vt,"evenodd")}h?r.stroke(p):r.stroke(),r.restore()}else h?r.stroke(p):r.stroke();if(z==="double"){r.lineWidth=L/3;var tt=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(p):r.stroke(),r.globalCompositeOperation=tt}r.setLineDash&&r.setLineDash([])}},we=function(){if(Z>0){if(r.lineWidth=Z,r.lineCap="butt",r.setLineDash)switch(re){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var vt=f;h&&(vt={x:0,y:0});var tt=o.getNodeShape(e),_e=L;W==="inside"&&(_e=0),W==="outside"&&(_e*=2);var Ue=(s+_e+(Z+le))/s,Qe=(u+_e+(Z+le))/u,Ze=s*Ue,nt=u*Qe,It=o.nodeShapes[tt].points,ct;if(h){var Lt=de(Ze,nt,tt,It);ct=Lt.path}if(tt==="ellipse")o.drawEllipsePath(ct||r,vt.x,vt.y,Ze,nt);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(tt)){var Rt=0,jt=0,Yt=0;tt==="round-diamond"?Rt=(_e+le+Z)*1.4:tt==="round-heptagon"?(Rt=(_e+le+Z)*1.075,Yt=-(_e/2+le+Z)/35):tt==="round-hexagon"?Rt=(_e+le+Z)*1.12:tt==="round-pentagon"?(Rt=(_e+le+Z)*1.13,Yt=-(_e/2+le+Z)/15):tt==="round-tag"?(Rt=(_e+le+Z)*1.12,jt=(_e/2+Z+le)*.07):tt==="round-triangle"&&(Rt=(_e+le+Z)*(Math.PI/2),Yt=-(_e+le/2+Z)/Math.PI),Rt!==0&&(Ue=(s+Rt)/s,Ze=s*Ue,["round-hexagon","round-tag"].includes(tt)||(Qe=(u+Rt)/u,nt=u*Qe)),ce=ce==="auto"?pF(Ze,nt):ce;for(var sr=Ze/2,Ut=nt/2,Rr=ce+(_e+Z+le)/2,Xt=new Array(It.length/2),Vr=new Array(It.length/2),Br=0;Br0){if(i=i||n.position(),a==null||o==null){var h=n.padding();a=n.width()+2*h,o=n.height()+2*h}s.colorFillStyle(t,c[0],c[1],c[2],l),s.nodeShapes[f].draw(t,i.x,i.y,a+u*2,o+u*2,d),t.fill()}}}};Vp.drawNodeOverlay=wU("overlay");Vp.drawNodeUnderlay=wU("underlay");Vp.hasPie=function(r){return r=r[0],r._private.hasPie};Vp.hasStripe=function(r){return r=r[0],r._private.hasStripe};Vp.drawPie=function(r,e,t,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),o=e.pstyle("pie-hole"),s=e.pstyle("pie-start-angle").pfValue,u=n.x,l=n.y,c=e.width(),f=e.height(),d=Math.min(c,f)/2,h,p=0,g=this.usePaths();if(g&&(u=0,l=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),o.units==="%"?h=d*o.pfValue:o.pfValue!==void 0&&(h=o.pfValue/2),!(h>=d))for(var y=1;y<=i.pieBackgroundN;y++){var b=e.pstyle("pie-"+y+"-background-size").value,_=e.pstyle("pie-"+y+"-background-color").value,m=e.pstyle("pie-"+y+"-background-opacity").value*t,x=b/100;x+p>1&&(x=1-p);var S=1.5*Math.PI+2*Math.PI*p;S+=s;var O=2*Math.PI*x,E=S+O;b===0||p>=1||p+x>1||(h===0?(r.beginPath(),r.moveTo(u,l),r.arc(u,l,d,S,E),r.closePath()):(r.beginPath(),r.arc(u,l,d,S,E),r.arc(u,l,h,E,S,!0),r.closePath()),this.colorFillStyle(r,_[0],_[1],_[2],m),r.fill(),p+=x)}};Vp.drawStripe=function(r,e,t,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,o=n.y,s=e.width(),u=e.height(),l=0,c=this.usePaths();r.save();var f=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var h=s,p=u;d.units==="%"?(h=h*d.pfValue,p=p*d.pfValue):d.pfValue!==void 0&&(h=d.pfValue,p=d.pfValue),c&&(a=0,o=0),o-=h/2,a-=p/2;for(var g=1;g<=i.stripeBackgroundN;g++){var y=e.pstyle("stripe-"+g+"-background-size").value,b=e.pstyle("stripe-"+g+"-background-color").value,_=e.pstyle("stripe-"+g+"-background-opacity").value*t,m=y/100;m+l>1&&(m=1-l),!(y===0||l>=1||l+m>1)&&(r.beginPath(),r.rect(a,o+p*l,h,p*m),r.closePath(),this.colorFillStyle(r,b[0],b[1],b[2],_),r.fill(),l+=m)}r.restore()};var Gl={},qee=100;Gl.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};Gl.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,n,i=0;ie.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(c[e.NODE]=!0,c[e.SELECT_BOX]=!0);var _=t.style(),m=t.zoom(),x=o!==void 0?o:m,S=t.pan(),O={x:S.x,y:S.y},E={zoom:m,pan:{x:S.x,y:S.y}},T=e.prevViewport,P=T===void 0||E.zoom!==T.zoom||E.pan.x!==T.pan.x||E.pan.y!==T.pan.y;!P&&!(g&&!p)&&(e.motionBlurPxRatio=1),s&&(O=s),x*=u,O.x*=u,O.y*=u;var I=e.getCachedZSortedEles();function k(fe,se,de,ge,Oe){var ke=fe.globalCompositeOperation;fe.globalCompositeOperation="destination-out",e.colorFillStyle(fe,255,255,255,e.motionBlurTransparency),fe.fillRect(se,de,ge,Oe),fe.globalCompositeOperation=ke}function L(fe,se){var de,ge,Oe,ke;!e.clearingMotionBlur&&(fe===l.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||fe===l.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(de={x:S.x*h,y:S.y*h},ge=m*h,Oe=e.canvasWidth*h,ke=e.canvasHeight*h):(de=O,ge=x,Oe=e.canvasWidth,ke=e.canvasHeight),fe.setTransform(1,0,0,1,0,0),se==="motionBlur"?k(fe,0,0,Oe,ke):!n&&(se===void 0||se)&&fe.clearRect(0,0,Oe,ke),i||(fe.translate(de.x,de.y),fe.scale(ge,ge)),s&&fe.translate(s.x,s.y),o&&fe.scale(o,o)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var B=e.data.bufferContexts[e.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var E=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};E.mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[e.DRAG]=!1,c[e.NODE]=!1;var j=l.contexts[e.NODE],z=e.textureCache.texture,E=e.textureCache.viewport;j.setTransform(1,0,0,1,0,0),d?k(j,0,0,E.width,E.height):j.clearRect(0,0,E.width,E.height);var H=_.core("outside-texture-bg-color").value,q=_.core("outside-texture-bg-opacity").value;e.colorFillStyle(j,H[0],H[1],H[2],q),j.fillRect(0,0,E.width,E.height);var m=t.zoom();L(j,!1),j.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u),j.drawImage(z,E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u)}else e.textureOnViewport&&!n&&(e.textureCache=null);var W=t.extent(),$=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),J=e.hideEdgesOnViewport&&$,X=[];if(X[e.NODE]=!c[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,X[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),X[e.DRAG]=!c[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,X[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),c[e.NODE]||i||a||X[e.NODE]){var Z=d&&!X[e.NODE]&&h!==1,j=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:l.contexts[e.NODE]),ue=d&&!Z?"motionBlur":void 0;L(j,ue),J?e.drawCachedNodes(j,I.nondrag,u,W):e.drawLayeredElements(j,I.nondrag,u,W),e.debug&&e.drawDebugPoints(j,I.nondrag),!i&&!d&&(c[e.NODE]=!1)}if(!a&&(c[e.DRAG]||i||X[e.DRAG])){var Z=d&&!X[e.DRAG]&&h!==1,j=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:l.contexts[e.DRAG]);L(j,d&&!Z?"motionBlur":void 0),J?e.drawCachedNodes(j,I.drag,u,W):e.drawCachedElements(j,I.drag,u,W),e.debug&&e.drawDebugPoints(j,I.drag),!i&&!d&&(c[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,L),d&&h!==1){var re=l.contexts[e.NODE],ne=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],le=l.contexts[e.DRAG],ce=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],pe=function(se,de,ge){se.setTransform(1,0,0,1,0,0),ge||!b?se.clearRect(0,0,e.canvasWidth,e.canvasHeight):k(se,0,0,e.canvasWidth,e.canvasHeight);var Oe=h;se.drawImage(de,0,0,e.canvasWidth*Oe,e.canvasHeight*Oe,0,0,e.canvasWidth,e.canvasHeight)};(c[e.NODE]||X[e.NODE])&&(pe(re,ne,X[e.NODE]),c[e.NODE]=!1),(c[e.DRAG]||X[e.DRAG])&&(pe(le,ce,X[e.DRAG]),c[e.DRAG]=!1)}e.prevViewport=E,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,c[e.NODE]=!0,c[e.DRAG]=!0,e.redraw()},qee)),n||t.emit("render")};var W0;Gl.drawSelectionRectangle=function(r,e){var t=this,n=t.cy,i=t.data,a=n.style(),o=r.drawOnlyNodeLayer,s=r.drawAllLayers,u=i.canvasNeedsRedraw,l=r.forcedContext;if(t.showFps||!o&&u[t.SELECT_BOX]&&!s){var c=l||i.contexts[t.SELECT_BOX];if(e(c),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),d=a.core("selection-box-border-width").value/f;c.lineWidth=d,c.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",c.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),d>0&&(c.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",c.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(i.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),h=i.bgActivePosistion;c.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",c.beginPath(),c.arc(h.x,h.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),c.fill()}var p=t.lastRedrawTime;if(t.showFps&&p){p=Math.round(p);var g=Math.round(1e3/p),y="1 frame = "+p+" ms = "+g+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!W0){var b=c.measureText(y);W0=b.actualBoundingBoxAscent}c.fillText(y,0,W0);var _=60;c.strokeRect(0,W0+10,250,20),c.fillRect(0,W0+10,250*Math.min(g/_,1),20)}s||(u[t.SELECT_BOX]=!1)}};function O3(r,e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(n));return n}function Gee(r,e,t){var n=O3(r,r.VERTEX_SHADER,e),i=O3(r,r.FRAGMENT_SHADER,t),a=r.createProgram();if(r.attachShader(a,n),r.attachShader(a,i),r.linkProgram(a),!r.getProgramParameter(a,r.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function Vee(r,e,t){t===void 0&&(t=e);var n=r.makeOffscreenCanvas(e,t),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function dD(r){var e=r.pixelRatio,t=r.cy.zoom(),n=r.cy.pan();return{zoom:t*e,pan:{x:n.x*e,y:n.y*e}}}function Hee(r){var e=r.pixelRatio,t=r.cy.zoom();return t*e}function Wee(r,e,t,n,i){var a=n*t+e.x,o=i*t+e.y;return o=Math.round(r.canvasHeight-o),[a,o]}function Yee(r){return r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function Xee(r,e){if(r.length!==e.length)return!1;for(var t=0;t>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function $ee(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function Kee(r,e){var t=r.createTexture();return t.buffer=function(n){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,n),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function xU(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function EU(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Zee(r,e,t,n,i,a){switch(e){case r.FLOAT:return new Float32Array(t.buffer,a*n,i);case r.INT:return new Int32Array(t.buffer,a*n,i)}}function Qee(r,e,t,n){var i=xU(r,e),a=Uo(i,2),o=a[0],s=a[1],u=EU(r,s,n),l=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,l),r.bufferData(r.ARRAY_BUFFER,u,r.STATIC_DRAW),s===r.FLOAT?r.vertexAttribPointer(t,o,s,!1,0,0):s===r.INT&&r.vertexAttribIPointer(t,o,s,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),l}function uh(r,e,t,n){var i=xU(r,t),a=Uo(i,3),o=a[0],s=a[1],u=a[2],l=EU(r,s,e*o),c=o*u,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*c,r.DYNAMIC_DRAW),r.enableVertexAttribArray(n),s===r.FLOAT?r.vertexAttribPointer(n,o,s,!1,c,0):s===r.INT&&r.vertexAttribIPointer(n,o,s,c,0),r.vertexAttribDivisor(n,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var d=new Array(e),h=0;ho&&(s=o/n,u=n*s,l=i*s),{scale:s,texW:u,texH:l}}},{key:"draw",value:function(t,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,s=this.texRows,u=this.texHeight,l=this.getScale(n),c=l.scale,f=l.texW,d=l.texH,h=function(m,x){if(i&&x){var S=x.context,O=m.x,E=m.row,T=O,P=u*E;S.save(),S.translate(T,P),S.scale(c,c),i(S,n),S.restore()}},p=[null,null],g=function(){h(a.freePointer,a.canvas),p[0]={x:a.freePointer.x,y:a.freePointer.row*u,w:f,h:d},p[1]={x:a.freePointer.x+f,y:a.freePointer.row*u,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==o&&(a.freePointer.x=0,a.freePointer.row++)},y=function(){var m=a.scratch,x=a.canvas;m.clear(),h({x:0,row:0},m);var S=o-a.freePointer.x,O=f-S,E=u;{var T=a.freePointer.x,P=a.freePointer.row*u,I=S;x.context.drawImage(m,0,0,I,E,T,P,I,E),p[0]={x:T,y:P,w:I,h:d}}{var k=S,L=(a.freePointer.row+1)*u,B=O;x&&x.context.drawImage(m,k,0,B,E,0,L,B,E),p[1]={x:0,y:L,w:B,h:d}}a.freePointer.x=O,a.freePointer.row++},b=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=o)g();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===o?(b(),g()):this.enableWrapping?y():(b(),g())}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(t),o=a.texW;return this.freePointer.x+o>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,o=a===void 0?!1:a,s=i.filterEle,u=s===void 0?function(){return!0}:s,l=i.filterType,c=l===void 0?function(){return!0}:l,f=!1,d=!1,h=Ac(t),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;if(u(g)){var y=Ac(this.renderTypes.values()),b;try{var _=function(){var x=b.value,S=x.type;if(c(S)){var O=n.collections.get(x.collection),E=x.getKey(g),T=Array.isArray(E)?E:[E];if(o)T.forEach(function(L){return O.markKeyForGC(L)}),d=!0;else{var P=x.getID?x.getID(g):g.id(),I=n._key(S,P),k=n.typeAndIdToKey.get(I);k!==void 0&&!Xee(T,k)&&(f=!0,n.typeAndIdToKey.delete(I),k.forEach(function(L){return O.markKeyForGC(L)}))}}};for(y.s();!(b=y.n()).done;)_()}catch(m){y.e(m)}finally{y.f()}}}}catch(m){h.e(m)}finally{h.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var t=Ac(this.collections.values()),n;try{for(t.s();!(n=t.n()).done;){var i=n.value;i.gc()}}catch(a){t.e(a)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,n,i,a){var o=this.renderTypes.get(n),s=this.collections.get(o.collection),u=!1,l=s.draw(a,i,function(d){o.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),o.drawElement(d,t,i,!0,!0),d.restore()):o.drawElement(d,t,i,!0,!0),u=!0});if(u){var c=o.getID?o.getID(t):t.id(),f=this._key(n,c);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return l}},{key:"getAtlasInfo",value:function(t,n){var i=this,a=this.renderTypes.get(n),o=a.getKey(t),s=Array.isArray(o)?o:[o];return s.map(function(u){var l=a.getBoundingBox(t,u),c=i.getOrCreateAtlas(t,n,l,u),f=c.getOffsets(u),d=Uo(f,2),h=d[0],p=d[1];return{atlas:c,tex:h,tex1:h,tex2:p,bb:l}})}},{key:"getDebugInfo",value:function(){var t=[],n=Ac(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=Uo(i.value,2),o=a[0],s=a[1],u=s.getCounts(),l=u.keyCount,c=u.atlasCount;t.push({type:o,keyCount:l,atlasCount:c})}}catch(f){n.e(f)}finally{n.f()}return t}}])})(),ste=(function(){function r(e){zp(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return qp(r,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0}},{key:"getAtlasIndexForBatch",value:function(t){var n=this.batchAtlases.indexOf(t);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),n=this.batchAtlases.length-1}return n}}])})(),ute=` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } @@ -400,16 +400,16 @@ `).concat(t.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } - `),s=Gee(n,i,o);s.aPosition=n.getAttribLocation(s,"aPosition"),s.aIndex=n.getAttribLocation(s,"aIndex"),s.aVertType=n.getAttribLocation(s,"aVertType"),s.aTransform=n.getAttribLocation(s,"aTransform"),s.aAtlasId=n.getAttribLocation(s,"aAtlasId"),s.aTex=n.getAttribLocation(s,"aTex"),s.aPointAPointB=n.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=n.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=n.getAttribLocation(s,"aLineWidth"),s.aColor=n.getAttribLocation(s,"aColor"),s.aCornerRadius=n.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=n.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=n.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=n.getUniformLocation(s,"uAtlasSize"),s.uBGColor=n.getUniformLocation(s,"uBGColor"),s.uZoom=n.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:kb.SCREEN;this.panZoomMatrix=t,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,n){return t.visible()?n&&n.isVisible?n.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,n,i){var a=this.atlasManager,o=this.batchManager,s=a.getRenderTypeOpts(i);if(this._isVisible(t,s)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(t);if(u===zx.IGNORE)return;if(u==zx.USE_BB){this.drawPickingRectangle(t,n,i);return}}var l=a.getAtlasInfo(t,i),c=Ac(l),f;try{for(c.s();!(f=c.n()).done;){var d=f.value,h=d.atlas,p=d.tex1,g=d.tex2;o.canAddToCurrentBatch(h)||this.endBatch();for(var y=o.getAtlasIndexForBatch(h),b=0,_=[[p,!0],[g,!1]];b<_.length;b++){var m=Uo(_[b],2),x=m[0],S=m[1];if(x.w!=0){var O=this.instanceCount;this.vertTypeBuffer.getView(O)[0]=UO;var E=this.indexBuffer.getView(O);em(n,E);var T=this.atlasIdBuffer.getView(O);T[0]=y;var P=this.texBuffer.getView(O);P[0]=x.x,P[1]=x.y,P[2]=x.w,P[3]=x.h;var I=this.transformBuffer.getMatrixView(O);this.setTransformMatrix(t,I,s,d,S),this.instanceCount++,S||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(k){c.e(k)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(t,n,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(i.shapeProps&&i.shapeProps.padding&&(s=t.pstyle(i.shapeProps.padding).pfValue),a){var u=a.bb,l=a.tex1,c=a.tex2,f=l.w/(l.w+c.w);o||(f=1-f);var d=this._getAdjustedBB(u,s,o,f);this._applyTransformMatrix(n,d,i,t)}else{var h=i.getBoundingBox(t),p=this._getAdjustedBB(h,s,!0,1);this._applyTransformMatrix(n,p,i,t)}}},{key:"_applyTransformMatrix",value:function(t,n,i,a){var o,s;C3(t);var u=i.getRotation?i.getRotation(a):0;if(u!==0){var l=i.getRotationPoint(a),c=l.x,f=l.y;ix(t,t,[c,f]),A3(t,t,u);var d=i.getRotationOffset(a);o=d.x+(n.xOffset||0),s=d.y+(n.yOffset||0)}else o=n.x1,s=n.y1;ix(t,t,[o,s]),OM(t,t,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(t,n,i,a){var o=t.x1,s=t.y1,u=t.w,l=t.h,c=t.yOffset;n&&(o-=n,s-=n,u+=2*n,l+=2*n);var f=0,d=u*a;return i&&a<1?u=d:!i&&a<1&&(f=u-d,o+=f,u=d),{x1:o,y1:s,w:u,h:l,xOffset:f,yOffset:c}}},{key:"drawPickingRectangle",value:function(t,n,i){var a=this.atlasManager.getRenderTypeOpts(i),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=tm;var s=this.indexBuffer.getView(o);em(n,s);var u=this.colorBuffer.getView(o);Sg([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(t,l,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(t,a)){var o=a.shapeProps,s=this._getVertTypeForShape(t,o.shape);if(s===void 0||a.isSimple&&!a.isSimple(t)){this.drawTexture(t,n,i);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=s,s===xw||s===Y0){var l=a.getBoundingBox(t),c=this._getCornerRadius(t,o.radius,l),f=this.cornerRadiusBuffer.getView(u);f[0]=c,f[1]=c,f[2]=c,f[3]=c,s===Y0&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(u);em(n,d);var h=t.pstyle(o.color).value,p=t.pstyle(o.opacity).value,g=this.colorBuffer.getView(u);Sg(h,p,g);var y=this.lineWidthBuffer.getView(u);if(y[0]=0,y[1]=0,o.border){var b=t.pstyle("border-width").value;if(b>0){var _=t.pstyle("border-color").value,m=t.pstyle("border-opacity").value,x=this.borderColorBuffer.getView(u);Sg(_,m,x);var S=t.pstyle("border-position").value;if(S==="inside")y[0]=0,y[1]=-b;else if(S==="outside")y[0]=b,y[1]=0;else{var O=b/2;y[0]=O,y[1]=-O}}}var E=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(t,E,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,n){var i=t.pstyle(n).value;switch(i){case"rectangle":return tm;case"ellipse":return X0;case"roundrectangle":case"round-rectangle":return xw;case"bottom-round-rectangle":return Y0;default:return}}},{key:"_getCornerRadius",value:function(t,n,i){var a=i.w,o=i.h;if(t.pstyle(n).value==="auto")return Mp(a,o);var s=t.pstyle(n).pfValue,u=a/2,l=o/2;return Math.min(s,l,u)}},{key:"drawEdgeArrow",value:function(t,n,i){if(t.visible()){var a=t._private.rscratch,o,s,u;if(i==="source"?(o=a.arrowStartX,s=a.arrowStartY,u=a.srcArrowAngle):(o=a.arrowEndX,s=a.arrowEndY,u=a.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(u)||u==null)){var l=t.pstyle(i+"-arrow-shape").value;if(l!=="none"){var c=t.pstyle(i+"-arrow-color").value,f=t.pstyle("opacity").value,d=t.pstyle("line-opacity").value,h=f*d,p=t.pstyle("width").pfValue,g=t.pstyle("arrow-scale").value,y=this.r.getArrowWidth(p,g),b=this.instanceCount,_=this.transformBuffer.getMatrixView(b);C3(_),ix(_,_,[o,s]),OM(_,_,[y,y]),A3(_,_,u),this.vertTypeBuffer.getView(b)[0]=zO;var m=this.indexBuffer.getView(b);em(n,m);var x=this.colorBuffer.getView(b);Sg(c,h,x),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,n){if(t.visible()){var i=this._getEdgePoints(t);if(i){var a=t.pstyle("opacity").value,o=t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,u=t.pstyle("line-color").value,l=a*o;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=R3;var f=this.indexBuffer.getView(c);em(n,f);var d=this.colorBuffer.getView(c);Sg(u,l,d);var h=this.lineWidthBuffer.getView(c);h[0]=s;var p=this.pointAPointBBuffer.getView(c);p[0]=i[0],p[1]=i[1],p[2]=i[2],p[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var n=t._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(t){var n=t._private.rscratch;if(this._isValidEdge(t)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(t);return this._getCurveSegmentPoints(i,a)}}},{key:"_getNumSegments",value:function(t){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,n){if(t.length==4)return t;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=t[0],i[1]=t[1];else if(a==n)i[a*2]=t[t.length-2],i[a*2+1]=t[t.length-1];else{var o=a/n;this._setCurvePoint(t,o,i,a*2)}return i}},{key:"_setCurvePoint",value:function(t,n,i,a){if(t.length<=2)i[a]=t[0],i[a+1]=t[1];else{for(var o=Array(t.length-2),s=0;s0}},s=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?zx.USE_BB:zx.IGNORE},u=function(f){var d=f.position(),h=d.x,p=d.y,g=f.outerWidth(),y=f.outerHeight();return{w:g,h:y,x1:h-g/2,y1:p-y/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:Yee,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getLabelKey,null),getBoundingBox:GO(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getSourceLabelKey,"source"),getBoundingBox:GO(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getTargetLabelKey,"target"),getBoundingBox:GO(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var l=$1(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(c,f){var d=!1;f&&f.length>0&&(d|=t.drawing.invalidate(f)),d&&l()}),vte(t)};function hte(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return Q7(t)}function OU(r,e){var t=r._private.rscratch;return Tc(t,"labelWrapCachedLines",e)||[]}var qO=function(e,t){return function(n){var i=e(n),a=OU(n,t);return a.length>1?a.map(function(o,s){return"".concat(i,"_").concat(s)}):i}},GO=function(e,t){return function(n,i){var a=e(n);if(typeof i=="string"){var o=i.indexOf("_");if(o>0){var s=Number(i.substring(o+1)),u=OU(n,t),l=a.h/u.length,c=l*s,f=a.y1+c;return{x1:a.x1,w:a.w,y1:f,h:l,yOffset:c}}}return a}};function vte(r){{var e=r.render;r.render=function(a){a=a||{};var o=r.cy;r.webgl&&(o.zoom()>yU?(pte(r),e.call(r,a)):(gte(r),CU(r,a,kb.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(a){t.call(r,a),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(a,o,s,u){return xte(r,a,o)};{var n=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){n.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var i=r.notify;r.notify=function(a,o){i.call(r,a,o),a==="viewport"||a==="bounds"?r.pickingFrameBuffer.needsDraw=!0:a==="background"&&r.drawing.invalidate(o,{type:"node-body"})}}}function pte(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function gte(r){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.canvasWidth,r.canvasHeight),n.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function yte(r){var e=r.canvasWidth,t=r.canvasHeight,n=dD(r),i=n.pan,a=n.zoom,o=FO();ix(o,o,[i.x,i.y]),OM(o,o,[a,a]);var s=FO();rte(s,e,t);var u=FO();return tte(u,s,o),u}function TU(r,e){var t=r.canvasWidth,n=r.canvasHeight,i=dD(r),a=i.pan,o=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,n),e.translate(a.x,a.y),e.scale(o,o)}function mte(r,e){r.drawSelectionRectangle(e,function(t){return TU(r,t)})}function bte(r){var e=r.data.contexts[r.NODE];e.save(),TU(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function _te(r){var e=function(i,a,o){for(var s=i.atlasManager.getAtlasCollection(a),u=r.data.contexts[r.NODE],l=s.atlases,c=0;c=0&&x.add(E)}return x}function xte(r,e,t){var n=wte(r,e,t),i=r.getCachedZSortedEles(),a,o,s=Ac(n),u;try{for(s.s();!(u=s.n()).done;){var l=u.value,c=i[l];if(!a&&c.isNode()&&(a=c),!o&&c.isEdge()&&(o=c),a&&o)break}}catch(f){s.e(f)}finally{s.f()}return[a,o].filter(Boolean)}function VO(r,e,t){var n=r.drawing;e+=1,t.isNode()?(n.drawNode(t,e,"node-underlay"),n.drawNode(t,e,"node-body"),n.drawTexture(t,e,"label"),n.drawNode(t,e,"node-overlay")):(n.drawEdgeLine(t,e),n.drawEdgeArrow(t,e,"source"),n.drawEdgeArrow(t,e,"target"),n.drawTexture(t,e,"label"),n.drawTexture(t,e,"edge-source-label"),n.drawTexture(t,e,"edge-target-label"))}function CU(r,e,t){var n;r.webglDebug&&(n=performance.now());var i=r.drawing,a=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&mte(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var o=r.data.contexts[r.WEBGL];t.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=yte(r),u=r.getCachedZSortedEles();if(a=u.length,i.startFrame(s,t),t.screen){for(var l=0;l0&&o>0){h.clearRect(0,0,a,o),h.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(r.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var g=e.pan(),y={x:g.x*l,y:g.y*l};l*=e.zoom(),h.translate(y.x,y.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-y.x,-y.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,a,o),h.fill())}return d};function Ete(r,e){for(var t=atob(r),n=new ArrayBuffer(t.length),i=new Uint8Array(n),a=0;a"u"?"undefined":ls(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var n=this.cy.window(),i=n.document;t=i.createElement("canvas"),t.width=r,t.height=e}return t};[bU,Th,wv,fD,ny,Vp,Gl,SU,Hp,t_,PU].forEach(function(r){kr(An,r)});var Tte=[{name:"null",impl:aU},{name:"base",impl:pU},{name:"canvas",impl:Ste}],Cte=[{type:"layout",extensions:QJ},{type:"renderer",extensions:Tte}],DU={},kU={};function IU(r,e,t){var n=t,i=function(T){Ai("Can not register `"+e+"` for `"+r+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(S1.prototype[e])return i(e);S1.prototype[e]=t}else if(r==="collection"){if(uu.prototype[e])return i(e);uu.prototype[e]=t}else if(r==="layout"){for(var a=function(T){this.options=T,t.call(this,T),ai(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(t.prototype),s=[],u=0;up&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>g&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-g)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-g),this.setHeight(this.labelHeight))}}},f.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},f.prototype.transform=function(h){var p=this.rect.x;p>u.WORLD_BOUNDARY?p=u.WORLD_BOUNDARY:p<-u.WORLD_BOUNDARY&&(p=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var y=new c(p,g),b=h.inverseTransformPoint(y);this.setLocation(b.x,b.y)},f.prototype.getLeft=function(){return this.rect.x},f.prototype.getRight=function(){return this.rect.x+this.rect.width},f.prototype.getTop=function(){return this.rect.y},f.prototype.getBottom=function(){return this.rect.y+this.rect.height},f.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=f}),(function(t,n,i){function a(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(o){this.x=o},a.prototype.setY=function(o){this.y=o},a.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},t.exports=a}),(function(t,n,i){var a=i(2),o=i(10),s=i(0),u=i(6),l=i(3),c=i(1),f=i(13),d=i(12),h=i(11);function p(y,b,_){a.call(this,_),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=y,b!=null&&b instanceof u?this.graphManager=b:b!=null&&b instanceof Layout&&(this.graphManager=b.graphManager)}p.prototype=Object.create(a.prototype);for(var g in a)p[g]=a[g];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(y,b,_){if(b==null&&_==null){var m=y;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var x=y;if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(_)>-1))throw"Source or target not in graph!";if(!(b.owner==_.owner&&b.owner==this))throw"Both owners must be this graph!";return b.owner!=_.owner?null:(x.source=b,x.target=_,x.isInterGraph=!1,this.getEdges().push(x),b.edges.push(x),_!=b&&_.edges.push(x),x)}},p.prototype.remove=function(y){var b=y;if(y instanceof l){if(b==null)throw"Node is null!";if(!(b.owner!=null&&b.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var _=b.edges.slice(),m,x=_.length,S=0;S-1&&T>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(E,1),m.target!=m.source&&m.target.edges.splice(T,1);var O=m.source.owner.getEdges().indexOf(m);if(O==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(O,1)}},p.prototype.updateLeftTop=function(){for(var y=o.MAX_VALUE,b=o.MAX_VALUE,_,m,x,S=this.getNodes(),O=S.length,E=0;E_&&(y=_),b>m&&(b=m)}return y==o.MAX_VALUE?null:(S[0].getParent().paddingLeft!=null?x=S[0].getParent().paddingLeft:x=this.margin,this.left=b-x,this.top=y-x,new d(this.left,this.top))},p.prototype.updateBounds=function(y){for(var b=o.MAX_VALUE,_=-o.MAX_VALUE,m=o.MAX_VALUE,x=-o.MAX_VALUE,S,O,E,T,P,I=this.nodes,k=I.length,L=0;LS&&(b=S),_E&&(m=E),xS&&(b=S),_E&&(m=E),x=this.nodes.length){var k=0;_.forEach(function(L){L.owner==y&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},t.exports=p}),(function(t,n,i){var a,o=i(1);function s(u){a=i(5),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),c=this.add(u,l);return this.setRootGraph(c),this.rootGraph},s.prototype.add=function(u,l,c,f,d){if(c==null&&f==null&&d==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{d=c,f=l,c=u;var h=f.getOwner(),p=d.getOwner();if(!(h!=null&&h.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(h==p)return c.isInterGraph=!1,h.add(c,f,d);if(c.isInterGraph=!0,c.source=f,c.target=d,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),!(c.source!=null&&c.target!=null))throw"Edge source and/or target is null!";if(!(c.source.edges.indexOf(c)==-1&&c.target.edges.indexOf(c)==-1))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c}},s.prototype.remove=function(u){if(u instanceof a){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var c=[];c=c.concat(l.getEdges());for(var f,d=c.length,h=0;h=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var d=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(d=1);var h=d*l[0],p=l[1]/d;l[0]h)return l[0]=c,l[1]=g,l[2]=d,l[3]=I,!1;if(fd)return l[0]=p,l[1]=f,l[2]=T,l[3]=h,!1;if(cd?(l[0]=b,l[1]=_,j=!0):(l[0]=y,l[1]=g,j=!0):H===W&&(c>d?(l[0]=p,l[1]=g,j=!0):(l[0]=m,l[1]=_,j=!0)),-q===W?d>c?(l[2]=P,l[3]=I,z=!0):(l[2]=T,l[3]=E,z=!0):q===W&&(d>c?(l[2]=O,l[3]=E,z=!0):(l[2]=k,l[3]=I,z=!0)),j&&z)return!1;if(c>d?f>h?($=this.getCardinalDirection(H,W,4),J=this.getCardinalDirection(q,W,2)):($=this.getCardinalDirection(-H,W,3),J=this.getCardinalDirection(-q,W,1)):f>h?($=this.getCardinalDirection(-H,W,1),J=this.getCardinalDirection(-q,W,3)):($=this.getCardinalDirection(H,W,2),J=this.getCardinalDirection(q,W,4)),!j)switch($){case 1:Z=g,X=c+-S/W,l[0]=X,l[1]=Z;break;case 2:X=m,Z=f+x*W,l[0]=X,l[1]=Z;break;case 3:Z=_,X=c+S/W,l[0]=X,l[1]=Z;break;case 4:X=b,Z=f+-x*W,l[0]=X,l[1]=Z;break}if(!z)switch(J){case 1:re=E,ue=d+-B/W,l[2]=ue,l[3]=re;break;case 2:ue=k,re=h+L*W,l[2]=ue,l[3]=re;break;case 3:re=I,ue=d+B/W,l[2]=ue,l[3]=re;break;case 4:ue=P,re=h+-L*W,l[2]=ue,l[3]=re;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,c){if(c==null)return this.getIntersection2(s,u,l);var f=s.x,d=s.y,h=u.x,p=u.y,g=l.x,y=l.y,b=c.x,_=c.y,m=void 0,x=void 0,S=void 0,O=void 0,E=void 0,T=void 0,P=void 0,I=void 0,k=void 0;return S=p-d,E=f-h,P=h*d-f*p,O=_-y,T=g-b,I=b*y-g*_,k=S*T-O*E,k===0?null:(m=(E*I-T*P)/k,x=(O*P-S*I)/k,new a(m,x))},o.angleOfVector=function(s,u,l,c){var f=void 0;return s!==l?(f=Math.atan((c-u)/(l-s)),l0?1:o<0?-1:0},a.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},a.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},t.exports=a}),(function(t,n,i){function a(){}a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,t.exports=a}),(function(t,n,i){var a=(function(){function f(d,h){for(var p=0;p"u"?"undefined":a(s);return s==null||u!="object"&&u!="function"},t.exports=o}),(function(t,n,i){function a(g){if(Array.isArray(g)){for(var y=0,b=Array(g.length);y0&&y;){for(S.push(E[0]);S.length>0&&y;){var T=S[0];S.splice(0,1),x.add(T);for(var P=T.getEdges(),m=0;m-1&&E.splice(B,1)}x=new Set,O=new Map}}return g},p.prototype.createDummyNodesForBendpoints=function(g){for(var y=[],b=g.source,_=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m0){for(var _=this.edgeToDummyNodes.get(b),m=0;m<_.length;m++){var x=_[m],S=new f(x.getCenterX(),x.getCenterY()),O=b.bendpoints.get(m);O.x=S.x,O.y=S.y,x.getOwner().remove(x)}this.graphManager.add(b,b.source,b.target)}}},p.transform=function(g,y,b,_){if(b!=null&&_!=null){var m=y;if(g<=50){var x=y/b;m-=(y-x)/50*(50-g)}else{var S=y*_;m+=(S-y)/50*(g-50)}return m}else{var O,E;return g<=50?(O=9*y/500,E=y/10):(O=9*y/50,E=-8*y),O*g+E}},p.findCenterOfTree=function(g){var y=[];y=y.concat(g);var b=[],_=new Map,m=!1,x=null;(y.length==1||y.length==2)&&(m=!0,x=y[0]);for(var S=0;S=0&&y.splice(I,1);var k=O.getNeighborsList();k.forEach(function(j){if(b.indexOf(j)<0){var z=_.get(j),H=z-1;H==1&&T.push(j),_.set(j,H)}})}b=b.concat(T),(y.length==1||y.length==2)&&(m=!0,x=y[0])}return x},p.prototype.setGraphManager=function(g){this.graphManager=g},t.exports=p}),(function(t,n,i){function a(){}a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},t.exports=a}),(function(t,n,i){var a=i(4);function o(s,u){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(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new a(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},t.exports=o}),(function(t,n,i){function a(h){if(Array.isArray(h)){for(var p=0,g=Array(h.length);ps.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(h-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(h>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(h-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},f.prototype.calcSpringForces=function(){for(var h=this.getAllEdges(),p,g=0;g0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,y,b,_,m=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&h&&this.updateGrid(),x=new Set,g=0;gS||x>S)&&(h.gravitationForceX=-this.gravityConstant*b,h.gravitationForceY=-this.gravityConstant*_)):(S=p.getEstimatedSize()*this.compoundGravityRangeFactor,(m>S||x>S)&&(h.gravitationForceX=-this.gravityConstant*b*this.compoundGravityConstant,h.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant))},f.prototype.isConverged=function(){var h,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),h=this.totalDisplacement=m.length||S>=m[0].length)){for(var O=0;Of}}]),l})();t.exports=u}),(function(t,n,i){var a=(function(){function u(l,c){for(var f=0;f2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=c,this.match_score=f,this.mismatch_penalty=d,this.gap_penalty=h,this.iMax=l.length+1,this.jMax=c.length+1,this.grid=new Array(this.iMax);for(var p=0;p=0;l--){var c=this.listeners[l];c.event===s&&c.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;lc.coolingFactor*c.maxNodeDisplacement&&(this.displacementX=c.coolingFactor*c.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>c.coolingFactor*c.maxNodeDisplacement&&(this.displacementY=c.coolingFactor*c.maxNodeDisplacement*s.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),c.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},u.prototype.propogateDisplacementToChildren=function(c,f){for(var d=this.getChild().getNodes(),h,p=0;p0)this.positionNodesRadially(E);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),P=this.nodesWithGravity.filter(function(I){return T.has(I)});this.graphManager.setAllNodesToApplyGravitation(P),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},S.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(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(k){return E.has(k)});this.graphManager.setAllNodesToApplyGravitation(T),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.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=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var P=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(P,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},S.prototype.getPositionsData=function(){for(var E=this.graphManager.getAllNodes(),T={},P=0;P1){var j;for(j=0;jI&&(I=Math.floor(B.y)),L=Math.floor(B.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(h.WORLD_CENTER_X-B.x/2,h.WORLD_CENTER_Y-B.y/2))},S.radialLayout=function(E,T,P){var I=Math.max(this.maxDiagonalInTree(E),f.DEFAULT_RADIAL_SEPARATION);S.branchRadialLayout(T,null,0,359,0,I);var k=m.calculateBounds(E),L=new x;L.setDeviceOrgX(k.getMinX()),L.setDeviceOrgY(k.getMinY()),L.setWorldOrgX(P.x),L.setWorldOrgY(P.y);for(var B=0;B1;){var re=ue[0];ue.splice(0,1);var ne=W.indexOf(re);ne>=0&&W.splice(ne,1),X--,$--}T!=null?Z=(W.indexOf(ue[0])+1)%X:Z=0;for(var le=Math.abs(I-P)/$,ce=Z;J!=$;ce=++ce%X){var pe=W[ce].getOtherEnd(E);if(pe!=T){var fe=(P+J*le)%360,se=(fe+le)%360;S.branchRadialLayout(pe,E,fe,se,k+L,L),J++}}},S.maxDiagonalInTree=function(E){for(var T=b.MIN_VALUE,P=0;PT&&(T=k)}return T},S.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},S.prototype.groupZeroDegreeMembers=function(){var E=this,T={};this.memberGroups={},this.idToDummyNode={};for(var P=[],I=this.graphManager.getAllNodes(),k=0;k"u"&&(T[j]=[]),T[j]=T[j].concat(L)}Object.keys(T).forEach(function(z){if(T[z].length>1){var H="DummyCompound_"+z;E.memberGroups[H]=T[z];var q=T[z][0].getParent(),W=new l(E.graphManager);W.id=H,W.paddingLeft=q.paddingLeft||0,W.paddingRight=q.paddingRight||0,W.paddingBottom=q.paddingBottom||0,W.paddingTop=q.paddingTop||0,E.idToDummyNode[H]=W;var $=E.getGraphManager().add(E.newGraph(),W),J=q.getChild();J.add(W);for(var X=0;X=0;E--){var T=this.compoundOrder[E],P=T.id,I=T.paddingLeft,k=T.paddingTop;this.adjustLocations(this.tiledMemberPack[P],T.rect.x,T.rect.y,I,k)}},S.prototype.repopulateZeroDegreeMembers=function(){var E=this,T=this.tiledZeroDegreePack;Object.keys(T).forEach(function(P){var I=E.idToDummyNode[P],k=I.paddingLeft,L=I.paddingTop;E.adjustLocations(T[P],I.rect.x,I.rect.y,k,L)})},S.prototype.getToBeTiled=function(E){var T=E.id;if(this.toBeTiled[T]!=null)return this.toBeTiled[T];var P=E.getChild();if(P==null)return this.toBeTiled[T]=!1,!1;for(var I=P.getNodes(),k=0;k0)return this.toBeTiled[T]=!1,!1;if(L.getChild()==null){this.toBeTiled[L.id]=!1;continue}if(!this.getToBeTiled(L))return this.toBeTiled[T]=!1,!1}return this.toBeTiled[T]=!0,!0},S.prototype.getNodeDegree=function(E){E.id;for(var T=E.getEdges(),P=0,I=0;Iz&&(z=q.rect.height)}P+=z+E.verticalPadding}},S.prototype.tileCompoundMembers=function(E,T){var P=this;this.tiledMemberPack=[],Object.keys(E).forEach(function(I){var k=T[I];P.tiledMemberPack[I]=P.tileNodes(E[I],k.paddingLeft+k.paddingRight),k.rect.width=P.tiledMemberPack[I].width,k.rect.height=P.tiledMemberPack[I].height})},S.prototype.tileNodes=function(E,T){var P=f.TILING_PADDING_VERTICAL,I=f.TILING_PADDING_HORIZONTAL,k={rows:[],rowWidth:[],rowHeight:[],width:0,height:T,verticalPadding:P,horizontalPadding:I};E.sort(function(j,z){return j.rect.width*j.rect.height>z.rect.width*z.rect.height?-1:j.rect.width*j.rect.height0&&(B+=E.horizontalPadding),E.rowWidth[P]=B,E.width0&&(j+=E.verticalPadding);var z=0;j>E.rowHeight[P]&&(z=E.rowHeight[P],E.rowHeight[P]=j,z=E.rowHeight[P]-z),E.height+=z,E.rows[P].push(T)},S.prototype.getShortestRowIndex=function(E){for(var T=-1,P=Number.MAX_VALUE,I=0;IP&&(T=I,P=E.rowWidth[I]);return T},S.prototype.canAddHorizontal=function(E,T,P){var I=this.getShortestRowIndex(E);if(I<0)return!0;var k=E.rowWidth[I];if(k+E.horizontalPadding+T<=E.width)return!0;var L=0;E.rowHeight[I]0&&(L=P+E.verticalPadding-E.rowHeight[I]);var B;E.width-k>=T+E.horizontalPadding?B=(E.height+L)/(k+T+E.horizontalPadding):B=(E.height+L)/E.width,L=P+E.verticalPadding;var j;return E.widthL&&T!=P){I.splice(-1,1),E.rows[P].push(k),E.rowWidth[T]=E.rowWidth[T]-L,E.rowWidth[P]=E.rowWidth[P]+L,E.width=E.rowWidth[instance.getLongestRowIndex(E)];for(var B=Number.MIN_VALUE,j=0;jB&&(B=I[j].height);T>0&&(B+=E.verticalPadding);var z=E.rowHeight[T]+E.rowHeight[P];E.rowHeight[T]=B,E.rowHeight[P]0)for(var J=k;J<=L;J++)$[0]+=this.grid[J][B-1].length+this.grid[J][B].length-1;if(L0)for(var J=B;J<=j;J++)$[3]+=this.grid[k-1][J].length+this.grid[k][J].length-1;for(var X=b.MAX_VALUE,Z,ue,re=0;re<$.length;re++)$[re]0){var j;j=x.getGraphManager().add(x.newGraph(),P),this.processChildrenList(j,T,x)}}},g.prototype.stop=function(){return this.stopped=!0,this};var b=function(m){m("layout","cose-bilkent",g)};typeof cytoscape<"u"&&b(cytoscape),n.exports=b})])})})(ax)),ax.exports}var jte=Lte();const Bte=Bp(jte);Np.use(Bte);const Fte="cose-bilkent",Ute=(r,e)=>{const t=Np({headless:!0,styleEnabled:!1});t.add(r);const n={};return t.layout({name:Fte,animate:!1,spacingFactor:e,quality:"default",tile:!1,randomize:!0,stop:()=>{t.nodes().forEach(a=>{n[a.id()]={...a.position()}})}}).run(),{positions:n}};class zte{start(){}postMessage(e){const{elements:t,spacingFactor:n}=e,i=Ute(t,n);this.onmessage({data:i})}onmessage(){}close(){}}const qte={port:new zte},Gte=()=>new SharedWorker(new URL(""+new URL("CoseBilkentLayout.worker-DQV9PnDH.js",import.meta.url).href,import.meta.url),{type:"module",name:"CoseBilkentLayout"});function Vte(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var HO,j3;function Hte(){if(j3)return HO;j3=1;function r(){this.__data__=[],this.size=0}return HO=r,HO}var WO,B3;function hD(){if(B3)return WO;B3=1;function r(e,t){return e===t||e!==e&&t!==t}return WO=r,WO}var YO,F3;function H2(){if(F3)return YO;F3=1;var r=hD();function e(t,n){for(var i=t.length;i--;)if(r(t[i][0],n))return i;return-1}return YO=e,YO}var XO,U3;function Wte(){if(U3)return XO;U3=1;var r=H2(),e=Array.prototype,t=e.splice;function n(i){var a=this.__data__,o=r(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():t.call(a,o,1),--this.size,!0}return XO=n,XO}var $O,z3;function Yte(){if(z3)return $O;z3=1;var r=H2();function e(t){var n=this.__data__,i=r(n,t);return i<0?void 0:n[i][1]}return $O=e,$O}var KO,q3;function Xte(){if(q3)return KO;q3=1;var r=H2();function e(t){return r(this.__data__,t)>-1}return KO=e,KO}var ZO,G3;function $te(){if(G3)return ZO;G3=1;var r=H2();function e(t,n){var i=this.__data__,a=r(i,t);return a<0?(++this.size,i.push([t,n])):i[a][1]=n,this}return ZO=e,ZO}var QO,V3;function W2(){if(V3)return QO;V3=1;var r=Hte(),e=Wte(),t=Yte(),n=Xte(),i=$te();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n-1&&t%1==0&&t<=r}return YT=e,YT}var XT,zL;function xre(){if(zL)return XT;zL=1;var r=r0(),e=mD(),t=xv(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",l="[object Map]",c="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",p="[object String]",g="[object WeakMap]",y="[object ArrayBuffer]",b="[object DataView]",_="[object Float32Array]",m="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",P="[object Uint16Array]",I="[object Uint32Array]",k={};k[_]=k[m]=k[x]=k[S]=k[O]=k[E]=k[T]=k[P]=k[I]=!0,k[n]=k[i]=k[y]=k[a]=k[b]=k[o]=k[s]=k[u]=k[l]=k[c]=k[f]=k[d]=k[h]=k[p]=k[g]=!1;function L(B){return t(B)&&e(B.length)&&!!k[r(B)]}return XT=L,XT}var $T,qL;function bD(){if(qL)return $T;qL=1;function r(e){return function(t){return e(t)}}return $T=r,$T}var gb={exports:{}};gb.exports;var GL;function _D(){return GL||(GL=1,(function(r,e){var t=LU(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();r.exports=s})(gb,gb.exports)),gb.exports}var KT,VL;function Q2(){if(VL)return KT;VL=1;var r=xre(),e=bD(),t=_D(),n=t&&t.isTypedArray,i=n?e(n):r;return KT=i,KT}var ZT,HL;function qU(){if(HL)return ZT;HL=1;var r=bre(),e=Z2(),t=Bs(),n=r_(),i=zU(),a=Q2(),o=Object.prototype,s=o.hasOwnProperty;function u(l,c){var f=t(l),d=!f&&e(l),h=!f&&!d&&n(l),p=!f&&!d&&!h&&a(l),g=f||d||h||p,y=g?r(l.length,String):[],b=y.length;for(var _ in l)(c||s.call(l,_))&&!(g&&(_=="length"||h&&(_=="offset"||_=="parent")||p&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,b)))&&y.push(_);return y}return ZT=u,ZT}var QT,WL;function J2(){if(WL)return QT;WL=1;var r=Object.prototype;function e(t){var n=t&&t.constructor,i=typeof n=="function"&&n.prototype||r;return t===i}return QT=e,QT}var JT,YL;function GU(){if(YL)return JT;YL=1;function r(e,t){return function(n){return e(t(n))}}return JT=r,JT}var eC,XL;function Ere(){if(XL)return eC;XL=1;var r=GU(),e=r(Object.keys,Object);return eC=e,eC}var tC,$L;function wD(){if($L)return tC;$L=1;var r=J2(),e=Ere(),t=Object.prototype,n=t.hasOwnProperty;function i(a){if(!r(a))return e(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return tC=i,tC}var rC,KL;function oy(){if(KL)return rC;KL=1;var r=Y2(),e=mD();function t(n){return n!=null&&e(n.length)&&!r(n)}return rC=t,rC}var nC,ZL;function sy(){if(ZL)return nC;ZL=1;var r=qU(),e=wD(),t=oy();function n(i){return t(i)?r(i):e(i)}return nC=n,nC}var iC,QL;function Sre(){if(QL)return iC;QL=1;var r=K2(),e=sy();function t(n,i){return n&&r(i,e(i),n)}return iC=t,iC}var aC,JL;function Ore(){if(JL)return aC;JL=1;function r(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}return aC=r,aC}var oC,e4;function Tre(){if(e4)return oC;e4=1;var r=iy(),e=J2(),t=Ore(),n=Object.prototype,i=n.hasOwnProperty;function a(o){if(!r(o))return t(o);var s=e(o),u=[];for(var l in o)l=="constructor"&&(s||!i.call(o,l))||u.push(l);return u}return oC=a,oC}var sC,t4;function xD(){if(t4)return sC;t4=1;var r=qU(),e=Tre(),t=oy();function n(i){return t(i)?r(i,!0):e(i)}return sC=n,sC}var uC,r4;function Cre(){if(r4)return uC;r4=1;var r=K2(),e=xD();function t(n,i){return n&&r(i,e(i),n)}return uC=t,uC}var yb={exports:{}};yb.exports;var n4;function Are(){return n4||(n4=1,(function(r,e){var t=Ch(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,d=s?s(f):new l.constructor(f);return l.copy(d),d}r.exports=u})(yb,yb.exports)),yb.exports}var lC,i4;function Rre(){if(i4)return lC;i4=1;function r(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++nh))return!1;var g=f.get(o),y=f.get(s);if(g&&y)return g==s&&y==o;var b=-1,_=!0,m=u&i?new r:void 0;for(f.set(o,s),f.set(s,o);++b0&&a(c)?i>1?t(c,i-1,a,o,s):r(s,c):o||(s[s.length]=c)}return s}return eR=t,eR}var tR,Kj;function qne(){if(Kj)return tR;Kj=1;function r(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)}return tR=r,tR}var rR,Zj;function Gne(){if(Zj)return rR;Zj=1;var r=qne(),e=Math.max;function t(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,u=e(o.length-i,0),l=Array(u);++s0){if(++a>=r)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return iR=n,iR}var aR,e6;function Wne(){if(e6)return aR;e6=1;var r=Vne(),e=Hne(),t=e(r);return aR=t,aR}var oR,t6;function Yne(){if(t6)return oR;t6=1;var r=tE(),e=Gne(),t=Wne();function n(i,a){return t(e(i,a,r),i+"")}return oR=n,oR}var sR,r6;function Xne(){if(r6)return sR;r6=1;function r(e,t,n,i){for(var a=e.length,o=n+(i?1:-1);i?o--:++o-1}return fR=e,fR}var dR,s6;function Jne(){if(s6)return dR;s6=1;function r(e,t,n){for(var i=-1,a=e==null?0:e.length;++i=o){var b=l?null:i(u);if(b)return a(b);p=!1,d=n,y=new r}else y=l?[]:g;e:for(;++f1?h.setNode(p,f):h.setNode(p)}),this},i.prototype.setNode=function(c,f){return r.has(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=f),this):(this._nodes[c]=arguments.length>1?f:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=t,this._children[c]={},this._children[t][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)},i.prototype.node=function(c){return this._nodes[c]},i.prototype.hasNode=function(c){return r.has(this._nodes,c)},i.prototype.removeNode=function(c){var f=this;if(r.has(this._nodes,c)){var d=function(h){f.removeEdge(f._edgeObjs[h])};delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],r.each(this.children(c),function(h){f.setParent(h)}),delete this._children[c]),r.each(r.keys(this._in[c]),d),delete this._in[c],delete this._preds[c],r.each(r.keys(this._out[c]),d),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this},i.prototype.setParent=function(c,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(f))f=t;else{f+="";for(var d=f;!r.isUndefined(d);d=this.parent(d))if(d===c)throw new Error("Setting "+f+" as parent of "+c+" would create a cycle");this.setNode(f)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=f,this._children[f][c]=!0,this},i.prototype._removeFromParentsChildList=function(c){delete this._children[this._parent[c]][c]},i.prototype.parent=function(c){if(this._isCompound){var f=this._parent[c];if(f!==t)return f}},i.prototype.children=function(c){if(r.isUndefined(c)&&(c=t),this._isCompound){var f=this._children[c];if(f)return r.keys(f)}else{if(c===t)return this.nodes();if(this.hasNode(c))return[]}},i.prototype.predecessors=function(c){var f=this._preds[c];if(f)return r.keys(f)},i.prototype.successors=function(c){var f=this._sucs[c];if(f)return r.keys(f)},i.prototype.neighbors=function(c){var f=this.predecessors(c);if(f)return r.union(f,this.successors(c))},i.prototype.isLeaf=function(c){var f;return this.isDirected()?f=this.successors(c):f=this.neighbors(c),f.length===0},i.prototype.filterNodes=function(c){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var d=this;r.each(this._nodes,function(g,y){c(y)&&f.setNode(y,g)}),r.each(this._edgeObjs,function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,d.edge(g))});var h={};function p(g){var y=d.parent(g);return y===void 0||f.hasNode(y)?(h[g]=y,y):y in h?h[y]:p(y)}return this._isCompound&&r.each(f.nodes(),function(g){f.setParent(g,p(g))}),f},i.prototype.setDefaultEdgeLabel=function(c){return r.isFunction(c)||(c=r.constant(c)),this._defaultEdgeLabelFn=c,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(c,f){var d=this,h=arguments;return r.reduce(c,function(p,g){return h.length>1?d.setEdge(p,g,f):d.setEdge(p,g),g}),this},i.prototype.setEdge=function(){var c,f,d,h,p=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(c=g.v,f=g.w,d=g.name,arguments.length===2&&(h=arguments[1],p=!0)):(c=g,f=arguments[1],d=arguments[3],arguments.length>2&&(h=arguments[2],p=!0)),c=""+c,f=""+f,r.isUndefined(d)||(d=""+d);var y=s(this._isDirected,c,f,d);if(r.has(this._edgeLabels,y))return p&&(this._edgeLabels[y]=h),this;if(!r.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(f),this._edgeLabels[y]=p?h:this._defaultEdgeLabelFn(c,f,d);var b=u(this._isDirected,c,f,d);return c=b.v,f=b.w,Object.freeze(b),this._edgeObjs[y]=b,a(this._preds[f],c),a(this._sucs[c],f),this._in[f][y]=b,this._out[c][y]=b,this._edgeCount++,this},i.prototype.edge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return this._edgeLabels[h]},i.prototype.hasEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return r.has(this._edgeLabels,h)},i.prototype.removeEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d),p=this._edgeObjs[h];return p&&(c=p.v,f=p.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[f],c),o(this._sucs[c],f),delete this._in[f][h],delete this._out[c][h],this._edgeCount--),this},i.prototype.inEdges=function(c,f){var d=this._in[c];if(d){var h=r.values(d);return f?r.filter(h,function(p){return p.v===f}):h}},i.prototype.outEdges=function(c,f){var d=this._out[c];if(d){var h=r.values(d);return f?r.filter(h,function(p){return p.w===f}):h}},i.prototype.nodeEdges=function(c,f){var d=this.inEdges(c,f);if(d)return d.concat(this.outEdges(c,f))};function a(c,f){c[f]?c[f]++:c[f]=1}function o(c,f){--c[f]||delete c[f]}function s(c,f,d,h){var p=""+f,g=""+d;if(!c&&p>g){var y=p;p=g,g=y}return p+n+g+n+(r.isUndefined(h)?e:h)}function u(c,f,d,h){var p=""+f,g=""+d;if(!c&&p>g){var y=p;p=g,g=y}var b={v:p,w:g};return h&&(b.name=h),b}function l(c,f){return s(c,f.v,f.w,f.name)}return wR}var xR,y6;function sie(){return y6||(y6=1,xR="2.1.8"),xR}var ER,m6;function uie(){return m6||(m6=1,ER={Graph:MD(),version:sie()}),ER}var SR,b6;function lie(){if(b6)return SR;b6=1;var r=qf(),e=MD();SR={write:t,read:a};function t(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:n(o),edges:i(o)};return r.isUndefined(o.graph())||(s.value=r.clone(o.graph())),s}function n(o){return r.map(o.nodes(),function(s){var u=o.node(s),l=o.parent(s),c={v:s};return r.isUndefined(u)||(c.value=u),r.isUndefined(l)||(c.parent=l),c})}function i(o){return r.map(o.edges(),function(s){var u=o.edge(s),l={v:s.v,w:s.w};return r.isUndefined(s.name)||(l.name=s.name),r.isUndefined(u)||(l.value=u),l})}function a(o){var s=new e(o.options).setGraph(o.value);return r.each(o.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),r.each(o.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return SR}var OR,_6;function cie(){if(_6)return OR;_6=1;var r=qf();OR=e;function e(t){var n={},i=[],a;function o(s){r.has(n,s)||(n[s]=!0,a.push(s),r.each(t.successors(s),o),r.each(t.predecessors(s),o))}return r.each(t.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return OR}var TR,w6;function cz(){if(w6)return TR;w6=1;var r=qf();TR=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(t){return t.key})},e.prototype.has=function(t){return r.has(this._keyIndices,t)},e.prototype.priority=function(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(t,n){var i=this._keyIndices;if(t=String(t),!r.has(i,t)){var a=this._arr,o=a.length;return i[t]=o,a.push({key:t,priority:n}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},e.prototype.decrease=function(t,n){var i=this._keyIndices[t];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},e.prototype._heapify=function(t){var n=this._arr,i=2*t,a=i+1,o=t;i>1,!(n[a].priority0&&(f=c.removeMin(),d=l[f],d.distance!==Number.POSITIVE_INFINITY);)u(f).forEach(h);return l}return CR}var AR,E6;function fie(){if(E6)return AR;E6=1;var r=fz(),e=qf();AR=t;function t(n,i,a){return e.transform(n.nodes(),function(o,s){o[s]=r(n,s,i,a)},{})}return AR}var RR,S6;function dz(){if(S6)return RR;S6=1;var r=qf();RR=e;function e(t){var n=0,i=[],a={},o=[];function s(u){var l=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(d){r.has(a,d)?a[d].onStack&&(l.lowlink=Math.min(l.lowlink,a[d].index)):(s(d),l.lowlink=Math.min(l.lowlink,a[d].lowlink))}),l.lowlink===l.index){var c=[],f;do f=i.pop(),a[f].onStack=!1,c.push(f);while(u!==f);o.push(c)}}return t.nodes().forEach(function(u){r.has(a,u)||s(u)}),o}return RR}var PR,O6;function die(){if(O6)return PR;O6=1;var r=qf(),e=dz();PR=t;function t(n){return r.filter(e(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return PR}var MR,T6;function hie(){if(T6)return MR;T6=1;var r=qf();MR=t;var e=r.constant(1);function t(i,a,o){return n(i,a||e,o||function(s){return i.outEdges(s)})}function n(i,a,o){var s={},u=i.nodes();return u.forEach(function(l){s[l]={},s[l][l]={distance:0},u.forEach(function(c){l!==c&&(s[l][c]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(c){var f=c.v===l?c.w:c.v,d=a(c);s[l][f]={distance:d,predecessor:l}})}),u.forEach(function(l){var c=s[l];u.forEach(function(f){var d=s[f];u.forEach(function(h){var p=d[l],g=c[h],y=d[h],b=p.distance+g.distance;b0;){if(l=u.removeMin(),r.has(s,l))o.setEdge(l,s[l]);else{if(f)throw new Error("Input graph is not connected: "+i);f=!0}i.nodeEdges(l).forEach(c)}return o}return jR}var BR,k6;function mie(){return k6||(k6=1,BR={components:cie(),dijkstra:fz(),dijkstraAll:fie(),findCycles:die(),floydWarshall:hie(),isAcyclic:vie(),postorder:pie(),preorder:gie(),prim:yie(),tarjan:dz(),topsort:hz()}),BR}var FR,I6;function Uf(){if(I6)return FR;I6=1;var r=uie();return FR={Graph:r.Graph,json:lie(),alg:mie(),version:r.version},FR}var mb={exports:{}};/** + `),s=Gee(n,i,o);s.aPosition=n.getAttribLocation(s,"aPosition"),s.aIndex=n.getAttribLocation(s,"aIndex"),s.aVertType=n.getAttribLocation(s,"aVertType"),s.aTransform=n.getAttribLocation(s,"aTransform"),s.aAtlasId=n.getAttribLocation(s,"aAtlasId"),s.aTex=n.getAttribLocation(s,"aTex"),s.aPointAPointB=n.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=n.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=n.getAttribLocation(s,"aLineWidth"),s.aColor=n.getAttribLocation(s,"aColor"),s.aCornerRadius=n.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=n.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=n.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=n.getUniformLocation(s,"uAtlasSize"),s.uBGColor=n.getUniformLocation(s,"uBGColor"),s.uZoom=n.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:kb.SCREEN;this.panZoomMatrix=t,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,n){return t.visible()?n&&n.isVisible?n.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,n,i){var a=this.atlasManager,o=this.batchManager,s=a.getRenderTypeOpts(i);if(this._isVisible(t,s)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(t);if(u===zx.IGNORE)return;if(u==zx.USE_BB){this.drawPickingRectangle(t,n,i);return}}var l=a.getAtlasInfo(t,i),c=Ac(l),f;try{for(c.s();!(f=c.n()).done;){var d=f.value,h=d.atlas,p=d.tex1,g=d.tex2;o.canAddToCurrentBatch(h)||this.endBatch();for(var y=o.getAtlasIndexForBatch(h),b=0,_=[[p,!0],[g,!1]];b<_.length;b++){var m=Uo(_[b],2),x=m[0],S=m[1];if(x.w!=0){var O=this.instanceCount;this.vertTypeBuffer.getView(O)[0]=UO;var E=this.indexBuffer.getView(O);em(n,E);var T=this.atlasIdBuffer.getView(O);T[0]=y;var P=this.texBuffer.getView(O);P[0]=x.x,P[1]=x.y,P[2]=x.w,P[3]=x.h;var I=this.transformBuffer.getMatrixView(O);this.setTransformMatrix(t,I,s,d,S),this.instanceCount++,S||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(k){c.e(k)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(t,n,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(i.shapeProps&&i.shapeProps.padding&&(s=t.pstyle(i.shapeProps.padding).pfValue),a){var u=a.bb,l=a.tex1,c=a.tex2,f=l.w/(l.w+c.w);o||(f=1-f);var d=this._getAdjustedBB(u,s,o,f);this._applyTransformMatrix(n,d,i,t)}else{var h=i.getBoundingBox(t),p=this._getAdjustedBB(h,s,!0,1);this._applyTransformMatrix(n,p,i,t)}}},{key:"_applyTransformMatrix",value:function(t,n,i,a){var o,s;C3(t);var u=i.getRotation?i.getRotation(a):0;if(u!==0){var l=i.getRotationPoint(a),c=l.x,f=l.y;ix(t,t,[c,f]),A3(t,t,u);var d=i.getRotationOffset(a);o=d.x+(n.xOffset||0),s=d.y+(n.yOffset||0)}else o=n.x1,s=n.y1;ix(t,t,[o,s]),OM(t,t,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(t,n,i,a){var o=t.x1,s=t.y1,u=t.w,l=t.h,c=t.yOffset;n&&(o-=n,s-=n,u+=2*n,l+=2*n);var f=0,d=u*a;return i&&a<1?u=d:!i&&a<1&&(f=u-d,o+=f,u=d),{x1:o,y1:s,w:u,h:l,xOffset:f,yOffset:c}}},{key:"drawPickingRectangle",value:function(t,n,i){var a=this.atlasManager.getRenderTypeOpts(i),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=tm;var s=this.indexBuffer.getView(o);em(n,s);var u=this.colorBuffer.getView(o);Sg([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(t,l,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(t,a)){var o=a.shapeProps,s=this._getVertTypeForShape(t,o.shape);if(s===void 0||a.isSimple&&!a.isSimple(t)){this.drawTexture(t,n,i);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=s,s===xw||s===Y0){var l=a.getBoundingBox(t),c=this._getCornerRadius(t,o.radius,l),f=this.cornerRadiusBuffer.getView(u);f[0]=c,f[1]=c,f[2]=c,f[3]=c,s===Y0&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(u);em(n,d);var h=t.pstyle(o.color).value,p=t.pstyle(o.opacity).value,g=this.colorBuffer.getView(u);Sg(h,p,g);var y=this.lineWidthBuffer.getView(u);if(y[0]=0,y[1]=0,o.border){var b=t.pstyle("border-width").value;if(b>0){var _=t.pstyle("border-color").value,m=t.pstyle("border-opacity").value,x=this.borderColorBuffer.getView(u);Sg(_,m,x);var S=t.pstyle("border-position").value;if(S==="inside")y[0]=0,y[1]=-b;else if(S==="outside")y[0]=b,y[1]=0;else{var O=b/2;y[0]=O,y[1]=-O}}}var E=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(t,E,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,n){var i=t.pstyle(n).value;switch(i){case"rectangle":return tm;case"ellipse":return X0;case"roundrectangle":case"round-rectangle":return xw;case"bottom-round-rectangle":return Y0;default:return}}},{key:"_getCornerRadius",value:function(t,n,i){var a=i.w,o=i.h;if(t.pstyle(n).value==="auto")return Mp(a,o);var s=t.pstyle(n).pfValue,u=a/2,l=o/2;return Math.min(s,l,u)}},{key:"drawEdgeArrow",value:function(t,n,i){if(t.visible()){var a=t._private.rscratch,o,s,u;if(i==="source"?(o=a.arrowStartX,s=a.arrowStartY,u=a.srcArrowAngle):(o=a.arrowEndX,s=a.arrowEndY,u=a.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(u)||u==null)){var l=t.pstyle(i+"-arrow-shape").value;if(l!=="none"){var c=t.pstyle(i+"-arrow-color").value,f=t.pstyle("opacity").value,d=t.pstyle("line-opacity").value,h=f*d,p=t.pstyle("width").pfValue,g=t.pstyle("arrow-scale").value,y=this.r.getArrowWidth(p,g),b=this.instanceCount,_=this.transformBuffer.getMatrixView(b);C3(_),ix(_,_,[o,s]),OM(_,_,[y,y]),A3(_,_,u),this.vertTypeBuffer.getView(b)[0]=zO;var m=this.indexBuffer.getView(b);em(n,m);var x=this.colorBuffer.getView(b);Sg(c,h,x),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,n){if(t.visible()){var i=this._getEdgePoints(t);if(i){var a=t.pstyle("opacity").value,o=t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,u=t.pstyle("line-color").value,l=a*o;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=R3;var f=this.indexBuffer.getView(c);em(n,f);var d=this.colorBuffer.getView(c);Sg(u,l,d);var h=this.lineWidthBuffer.getView(c);h[0]=s;var p=this.pointAPointBBuffer.getView(c);p[0]=i[0],p[1]=i[1],p[2]=i[2],p[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var n=t._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(t){var n=t._private.rscratch;if(this._isValidEdge(t)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(t);return this._getCurveSegmentPoints(i,a)}}},{key:"_getNumSegments",value:function(t){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,n){if(t.length==4)return t;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=t[0],i[1]=t[1];else if(a==n)i[a*2]=t[t.length-2],i[a*2+1]=t[t.length-1];else{var o=a/n;this._setCurvePoint(t,o,i,a*2)}return i}},{key:"_setCurvePoint",value:function(t,n,i,a){if(t.length<=2)i[a]=t[0],i[a+1]=t[1];else{for(var o=Array(t.length-2),s=0;s0}},s=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?zx.USE_BB:zx.IGNORE},u=function(f){var d=f.position(),h=d.x,p=d.y,g=f.outerWidth(),y=f.outerHeight();return{w:g,h:y,x1:h-g/2,y1:p-y/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:Yee,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getLabelKey,null),getBoundingBox:GO(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getSourceLabelKey,"source"),getBoundingBox:GO(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:qO(e.getTargetLabelKey,"target"),getBoundingBox:GO(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var l=$1(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(c,f){var d=!1;f&&f.length>0&&(d|=t.drawing.invalidate(f)),d&&l()}),vte(t)};function hte(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return Q7(t)}function OU(r,e){var t=r._private.rscratch;return Tc(t,"labelWrapCachedLines",e)||[]}var qO=function(e,t){return function(n){var i=e(n),a=OU(n,t);return a.length>1?a.map(function(o,s){return"".concat(i,"_").concat(s)}):i}},GO=function(e,t){return function(n,i){var a=e(n);if(typeof i=="string"){var o=i.indexOf("_");if(o>0){var s=Number(i.substring(o+1)),u=OU(n,t),l=a.h/u.length,c=l*s,f=a.y1+c;return{x1:a.x1,w:a.w,y1:f,h:l,yOffset:c}}}return a}};function vte(r){{var e=r.render;r.render=function(a){a=a||{};var o=r.cy;r.webgl&&(o.zoom()>yU?(pte(r),e.call(r,a)):(gte(r),CU(r,a,kb.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(a){t.call(r,a),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(a,o,s,u){return xte(r,a,o)};{var n=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){n.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var i=r.notify;r.notify=function(a,o){i.call(r,a,o),a==="viewport"||a==="bounds"?r.pickingFrameBuffer.needsDraw=!0:a==="background"&&r.drawing.invalidate(o,{type:"node-body"})}}}function pte(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function gte(r){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.canvasWidth,r.canvasHeight),n.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function yte(r){var e=r.canvasWidth,t=r.canvasHeight,n=dD(r),i=n.pan,a=n.zoom,o=FO();ix(o,o,[i.x,i.y]),OM(o,o,[a,a]);var s=FO();rte(s,e,t);var u=FO();return tte(u,s,o),u}function TU(r,e){var t=r.canvasWidth,n=r.canvasHeight,i=dD(r),a=i.pan,o=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,n),e.translate(a.x,a.y),e.scale(o,o)}function mte(r,e){r.drawSelectionRectangle(e,function(t){return TU(r,t)})}function bte(r){var e=r.data.contexts[r.NODE];e.save(),TU(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function _te(r){var e=function(i,a,o){for(var s=i.atlasManager.getAtlasCollection(a),u=r.data.contexts[r.NODE],l=s.atlases,c=0;c=0&&x.add(E)}return x}function xte(r,e,t){var n=wte(r,e,t),i=r.getCachedZSortedEles(),a,o,s=Ac(n),u;try{for(s.s();!(u=s.n()).done;){var l=u.value,c=i[l];if(!a&&c.isNode()&&(a=c),!o&&c.isEdge()&&(o=c),a&&o)break}}catch(f){s.e(f)}finally{s.f()}return[a,o].filter(Boolean)}function VO(r,e,t){var n=r.drawing;e+=1,t.isNode()?(n.drawNode(t,e,"node-underlay"),n.drawNode(t,e,"node-body"),n.drawTexture(t,e,"label"),n.drawNode(t,e,"node-overlay")):(n.drawEdgeLine(t,e),n.drawEdgeArrow(t,e,"source"),n.drawEdgeArrow(t,e,"target"),n.drawTexture(t,e,"label"),n.drawTexture(t,e,"edge-source-label"),n.drawTexture(t,e,"edge-target-label"))}function CU(r,e,t){var n;r.webglDebug&&(n=performance.now());var i=r.drawing,a=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&mte(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var o=r.data.contexts[r.WEBGL];t.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=yte(r),u=r.getCachedZSortedEles();if(a=u.length,i.startFrame(s,t),t.screen){for(var l=0;l0&&o>0){h.clearRect(0,0,a,o),h.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(r.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var g=e.pan(),y={x:g.x*l,y:g.y*l};l*=e.zoom(),h.translate(y.x,y.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-y.x,-y.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,a,o),h.fill())}return d};function Ete(r,e){for(var t=atob(r),n=new ArrayBuffer(t.length),i=new Uint8Array(n),a=0;a"u"?"undefined":ls(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var n=this.cy.window(),i=n.document;t=i.createElement("canvas"),t.width=r,t.height=e}return t};[bU,Th,wv,fD,ny,Vp,Gl,SU,Hp,t_,PU].forEach(function(r){kr(An,r)});var Tte=[{name:"null",impl:aU},{name:"base",impl:pU},{name:"canvas",impl:Ste}],Cte=[{type:"layout",extensions:QJ},{type:"renderer",extensions:Tte}],DU={},kU={};function IU(r,e,t){var n=t,i=function(T){Ai("Can not register `"+e+"` for `"+r+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(S1.prototype[e])return i(e);S1.prototype[e]=t}else if(r==="collection"){if(uu.prototype[e])return i(e);uu.prototype[e]=t}else if(r==="layout"){for(var a=function(T){this.options=T,t.call(this,T),ai(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(t.prototype),s=[],u=0;up&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>g&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-g)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-g),this.setHeight(this.labelHeight))}}},f.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},f.prototype.transform=function(h){var p=this.rect.x;p>u.WORLD_BOUNDARY?p=u.WORLD_BOUNDARY:p<-u.WORLD_BOUNDARY&&(p=-u.WORLD_BOUNDARY);var g=this.rect.y;g>u.WORLD_BOUNDARY?g=u.WORLD_BOUNDARY:g<-u.WORLD_BOUNDARY&&(g=-u.WORLD_BOUNDARY);var y=new c(p,g),b=h.inverseTransformPoint(y);this.setLocation(b.x,b.y)},f.prototype.getLeft=function(){return this.rect.x},f.prototype.getRight=function(){return this.rect.x+this.rect.width},f.prototype.getTop=function(){return this.rect.y},f.prototype.getBottom=function(){return this.rect.y+this.rect.height},f.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=f}),(function(t,n,i){function a(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(o){this.x=o},a.prototype.setY=function(o){this.y=o},a.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},t.exports=a}),(function(t,n,i){var a=i(2),o=i(10),s=i(0),u=i(6),l=i(3),c=i(1),f=i(13),d=i(12),h=i(11);function p(y,b,_){a.call(this,_),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=y,b!=null&&b instanceof u?this.graphManager=b:b!=null&&b instanceof Layout&&(this.graphManager=b.graphManager)}p.prototype=Object.create(a.prototype);for(var g in a)p[g]=a[g];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(y,b,_){if(b==null&&_==null){var m=y;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(m)>-1)throw"Node already in graph!";return m.owner=this,this.getNodes().push(m),m}else{var x=y;if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(_)>-1))throw"Source or target not in graph!";if(!(b.owner==_.owner&&b.owner==this))throw"Both owners must be this graph!";return b.owner!=_.owner?null:(x.source=b,x.target=_,x.isInterGraph=!1,this.getEdges().push(x),b.edges.push(x),_!=b&&_.edges.push(x),x)}},p.prototype.remove=function(y){var b=y;if(y instanceof l){if(b==null)throw"Node is null!";if(!(b.owner!=null&&b.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var _=b.edges.slice(),m,x=_.length,S=0;S-1&&T>-1))throw"Source and/or target doesn't know this edge!";m.source.edges.splice(E,1),m.target!=m.source&&m.target.edges.splice(T,1);var O=m.source.owner.getEdges().indexOf(m);if(O==-1)throw"Not in owner's edge list!";m.source.owner.getEdges().splice(O,1)}},p.prototype.updateLeftTop=function(){for(var y=o.MAX_VALUE,b=o.MAX_VALUE,_,m,x,S=this.getNodes(),O=S.length,E=0;E_&&(y=_),b>m&&(b=m)}return y==o.MAX_VALUE?null:(S[0].getParent().paddingLeft!=null?x=S[0].getParent().paddingLeft:x=this.margin,this.left=b-x,this.top=y-x,new d(this.left,this.top))},p.prototype.updateBounds=function(y){for(var b=o.MAX_VALUE,_=-o.MAX_VALUE,m=o.MAX_VALUE,x=-o.MAX_VALUE,S,O,E,T,P,I=this.nodes,k=I.length,L=0;LS&&(b=S),_E&&(m=E),xS&&(b=S),_E&&(m=E),x=this.nodes.length){var k=0;_.forEach(function(L){L.owner==y&&k++}),k==this.nodes.length&&(this.isConnected=!0)}},t.exports=p}),(function(t,n,i){var a,o=i(1);function s(u){a=i(5),this.layout=u,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var u=this.layout.newGraph(),l=this.layout.newNode(null),c=this.add(u,l);return this.setRootGraph(c),this.rootGraph},s.prototype.add=function(u,l,c,f,d){if(c==null&&f==null&&d==null){if(u==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return u.parent=l,l.child=u,u}else{d=c,f=l,c=u;var h=f.getOwner(),p=d.getOwner();if(!(h!=null&&h.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(h==p)return c.isInterGraph=!1,h.add(c,f,d);if(c.isInterGraph=!0,c.source=f,c.target=d,this.edges.indexOf(c)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(c),!(c.source!=null&&c.target!=null))throw"Edge source and/or target is null!";if(!(c.source.edges.indexOf(c)==-1&&c.target.edges.indexOf(c)==-1))throw"Edge already in source and/or target incidency list!";return c.source.edges.push(c),c.target.edges.push(c),c}},s.prototype.remove=function(u){if(u instanceof a){var l=u;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var c=[];c=c.concat(l.getEdges());for(var f,d=c.length,h=0;h=u.getRight()?l[0]+=Math.min(u.getX()-s.getX(),s.getRight()-u.getRight()):u.getX()<=s.getX()&&u.getRight()>=s.getRight()&&(l[0]+=Math.min(s.getX()-u.getX(),u.getRight()-s.getRight())),s.getY()<=u.getY()&&s.getBottom()>=u.getBottom()?l[1]+=Math.min(u.getY()-s.getY(),s.getBottom()-u.getBottom()):u.getY()<=s.getY()&&u.getBottom()>=s.getBottom()&&(l[1]+=Math.min(s.getY()-u.getY(),u.getBottom()-s.getBottom()));var d=Math.abs((u.getCenterY()-s.getCenterY())/(u.getCenterX()-s.getCenterX()));u.getCenterY()===s.getCenterY()&&u.getCenterX()===s.getCenterX()&&(d=1);var h=d*l[0],p=l[1]/d;l[0]h)return l[0]=c,l[1]=g,l[2]=d,l[3]=I,!1;if(fd)return l[0]=p,l[1]=f,l[2]=T,l[3]=h,!1;if(cd?(l[0]=b,l[1]=_,j=!0):(l[0]=y,l[1]=g,j=!0):H===W&&(c>d?(l[0]=p,l[1]=g,j=!0):(l[0]=m,l[1]=_,j=!0)),-q===W?d>c?(l[2]=P,l[3]=I,z=!0):(l[2]=T,l[3]=E,z=!0):q===W&&(d>c?(l[2]=O,l[3]=E,z=!0):(l[2]=k,l[3]=I,z=!0)),j&&z)return!1;if(c>d?f>h?($=this.getCardinalDirection(H,W,4),J=this.getCardinalDirection(q,W,2)):($=this.getCardinalDirection(-H,W,3),J=this.getCardinalDirection(-q,W,1)):f>h?($=this.getCardinalDirection(-H,W,1),J=this.getCardinalDirection(-q,W,3)):($=this.getCardinalDirection(H,W,2),J=this.getCardinalDirection(q,W,4)),!j)switch($){case 1:Z=g,X=c+-S/W,l[0]=X,l[1]=Z;break;case 2:X=m,Z=f+x*W,l[0]=X,l[1]=Z;break;case 3:Z=_,X=c+S/W,l[0]=X,l[1]=Z;break;case 4:X=b,Z=f+-x*W,l[0]=X,l[1]=Z;break}if(!z)switch(J){case 1:re=E,ue=d+-B/W,l[2]=ue,l[3]=re;break;case 2:ue=k,re=h+L*W,l[2]=ue,l[3]=re;break;case 3:re=I,ue=d+B/W,l[2]=ue,l[3]=re;break;case 4:ue=P,re=h+-L*W,l[2]=ue,l[3]=re;break}}return!1},o.getCardinalDirection=function(s,u,l){return s>u?l:1+l%4},o.getIntersection=function(s,u,l,c){if(c==null)return this.getIntersection2(s,u,l);var f=s.x,d=s.y,h=u.x,p=u.y,g=l.x,y=l.y,b=c.x,_=c.y,m=void 0,x=void 0,S=void 0,O=void 0,E=void 0,T=void 0,P=void 0,I=void 0,k=void 0;return S=p-d,E=f-h,P=h*d-f*p,O=_-y,T=g-b,I=b*y-g*_,k=S*T-O*E,k===0?null:(m=(E*I-T*P)/k,x=(O*P-S*I)/k,new a(m,x))},o.angleOfVector=function(s,u,l,c){var f=void 0;return s!==l?(f=Math.atan((c-u)/(l-s)),l0?1:o<0?-1:0},a.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},a.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},t.exports=a}),(function(t,n,i){function a(){}a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,t.exports=a}),(function(t,n,i){var a=(function(){function f(d,h){for(var p=0;p"u"?"undefined":a(s);return s==null||u!="object"&&u!="function"},t.exports=o}),(function(t,n,i){function a(g){if(Array.isArray(g)){for(var y=0,b=Array(g.length);y0&&y;){for(S.push(E[0]);S.length>0&&y;){var T=S[0];S.splice(0,1),x.add(T);for(var P=T.getEdges(),m=0;m-1&&E.splice(B,1)}x=new Set,O=new Map}}return g},p.prototype.createDummyNodesForBendpoints=function(g){for(var y=[],b=g.source,_=this.graphManager.calcLowestCommonAncestor(g.source,g.target),m=0;m0){for(var _=this.edgeToDummyNodes.get(b),m=0;m<_.length;m++){var x=_[m],S=new f(x.getCenterX(),x.getCenterY()),O=b.bendpoints.get(m);O.x=S.x,O.y=S.y,x.getOwner().remove(x)}this.graphManager.add(b,b.source,b.target)}}},p.transform=function(g,y,b,_){if(b!=null&&_!=null){var m=y;if(g<=50){var x=y/b;m-=(y-x)/50*(50-g)}else{var S=y*_;m+=(S-y)/50*(g-50)}return m}else{var O,E;return g<=50?(O=9*y/500,E=y/10):(O=9*y/50,E=-8*y),O*g+E}},p.findCenterOfTree=function(g){var y=[];y=y.concat(g);var b=[],_=new Map,m=!1,x=null;(y.length==1||y.length==2)&&(m=!0,x=y[0]);for(var S=0;S=0&&y.splice(I,1);var k=O.getNeighborsList();k.forEach(function(j){if(b.indexOf(j)<0){var z=_.get(j),H=z-1;H==1&&T.push(j),_.set(j,H)}})}b=b.concat(T),(y.length==1||y.length==2)&&(m=!0,x=y[0])}return x},p.prototype.setGraphManager=function(g){this.graphManager=g},t.exports=p}),(function(t,n,i){function a(){}a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},t.exports=a}),(function(t,n,i){var a=i(4);function o(s,u){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(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var u=0,l=this.lworldExtX;return l!=0&&(u=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/l),u},o.prototype.transformY=function(s){var u=0,l=this.lworldExtY;return l!=0&&(u=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/l),u},o.prototype.inverseTransformX=function(s){var u=0,l=this.ldeviceExtX;return l!=0&&(u=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/l),u},o.prototype.inverseTransformY=function(s){var u=0,l=this.ldeviceExtY;return l!=0&&(u=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/l),u},o.prototype.inverseTransformPoint=function(s){var u=new a(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return u},t.exports=o}),(function(t,n,i){function a(h){if(Array.isArray(h)){for(var p=0,g=Array(h.length);ps.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(h-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL):(h>s.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(h-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},f.prototype.calcSpringForces=function(){for(var h=this.getAllEdges(),p,g=0;g0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,y,b,_,m=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&h&&this.updateGrid(),x=new Set,g=0;gS||x>S)&&(h.gravitationForceX=-this.gravityConstant*b,h.gravitationForceY=-this.gravityConstant*_)):(S=p.getEstimatedSize()*this.compoundGravityRangeFactor,(m>S||x>S)&&(h.gravitationForceX=-this.gravityConstant*b*this.compoundGravityConstant,h.gravitationForceY=-this.gravityConstant*_*this.compoundGravityConstant))},f.prototype.isConverged=function(){var h,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),h=this.totalDisplacement=m.length||S>=m[0].length)){for(var O=0;Of}}]),l})();t.exports=u}),(function(t,n,i){var a=(function(){function u(l,c){for(var f=0;f2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;o(this,u),this.sequence1=l,this.sequence2=c,this.match_score=f,this.mismatch_penalty=d,this.gap_penalty=h,this.iMax=l.length+1,this.jMax=c.length+1,this.grid=new Array(this.iMax);for(var p=0;p=0;l--){var c=this.listeners[l];c.event===s&&c.callback===u&&this.listeners.splice(l,1)}},o.emit=function(s,u){for(var l=0;lc.coolingFactor*c.maxNodeDisplacement&&(this.displacementX=c.coolingFactor*c.maxNodeDisplacement*s.sign(this.displacementX)),Math.abs(this.displacementY)>c.coolingFactor*c.maxNodeDisplacement&&(this.displacementY=c.coolingFactor*c.maxNodeDisplacement*s.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),c.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},u.prototype.propogateDisplacementToChildren=function(c,f){for(var d=this.getChild().getNodes(),h,p=0;p0)this.positionNodesRadially(E);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),P=this.nodesWithGravity.filter(function(I){return T.has(I)});this.graphManager.setAllNodesToApplyGravitation(P),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},S.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(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(k){return E.has(k)});this.graphManager.setAllNodesToApplyGravitation(T),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.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=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var P=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(P,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},S.prototype.getPositionsData=function(){for(var E=this.graphManager.getAllNodes(),T={},P=0;P1){var j;for(j=0;jI&&(I=Math.floor(B.y)),L=Math.floor(B.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(h.WORLD_CENTER_X-B.x/2,h.WORLD_CENTER_Y-B.y/2))},S.radialLayout=function(E,T,P){var I=Math.max(this.maxDiagonalInTree(E),f.DEFAULT_RADIAL_SEPARATION);S.branchRadialLayout(T,null,0,359,0,I);var k=m.calculateBounds(E),L=new x;L.setDeviceOrgX(k.getMinX()),L.setDeviceOrgY(k.getMinY()),L.setWorldOrgX(P.x),L.setWorldOrgY(P.y);for(var B=0;B1;){var re=ue[0];ue.splice(0,1);var ne=W.indexOf(re);ne>=0&&W.splice(ne,1),X--,$--}T!=null?Z=(W.indexOf(ue[0])+1)%X:Z=0;for(var le=Math.abs(I-P)/$,ce=Z;J!=$;ce=++ce%X){var pe=W[ce].getOtherEnd(E);if(pe!=T){var fe=(P+J*le)%360,se=(fe+le)%360;S.branchRadialLayout(pe,E,fe,se,k+L,L),J++}}},S.maxDiagonalInTree=function(E){for(var T=b.MIN_VALUE,P=0;PT&&(T=k)}return T},S.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},S.prototype.groupZeroDegreeMembers=function(){var E=this,T={};this.memberGroups={},this.idToDummyNode={};for(var P=[],I=this.graphManager.getAllNodes(),k=0;k"u"&&(T[j]=[]),T[j]=T[j].concat(L)}Object.keys(T).forEach(function(z){if(T[z].length>1){var H="DummyCompound_"+z;E.memberGroups[H]=T[z];var q=T[z][0].getParent(),W=new l(E.graphManager);W.id=H,W.paddingLeft=q.paddingLeft||0,W.paddingRight=q.paddingRight||0,W.paddingBottom=q.paddingBottom||0,W.paddingTop=q.paddingTop||0,E.idToDummyNode[H]=W;var $=E.getGraphManager().add(E.newGraph(),W),J=q.getChild();J.add(W);for(var X=0;X=0;E--){var T=this.compoundOrder[E],P=T.id,I=T.paddingLeft,k=T.paddingTop;this.adjustLocations(this.tiledMemberPack[P],T.rect.x,T.rect.y,I,k)}},S.prototype.repopulateZeroDegreeMembers=function(){var E=this,T=this.tiledZeroDegreePack;Object.keys(T).forEach(function(P){var I=E.idToDummyNode[P],k=I.paddingLeft,L=I.paddingTop;E.adjustLocations(T[P],I.rect.x,I.rect.y,k,L)})},S.prototype.getToBeTiled=function(E){var T=E.id;if(this.toBeTiled[T]!=null)return this.toBeTiled[T];var P=E.getChild();if(P==null)return this.toBeTiled[T]=!1,!1;for(var I=P.getNodes(),k=0;k0)return this.toBeTiled[T]=!1,!1;if(L.getChild()==null){this.toBeTiled[L.id]=!1;continue}if(!this.getToBeTiled(L))return this.toBeTiled[T]=!1,!1}return this.toBeTiled[T]=!0,!0},S.prototype.getNodeDegree=function(E){E.id;for(var T=E.getEdges(),P=0,I=0;Iz&&(z=q.rect.height)}P+=z+E.verticalPadding}},S.prototype.tileCompoundMembers=function(E,T){var P=this;this.tiledMemberPack=[],Object.keys(E).forEach(function(I){var k=T[I];P.tiledMemberPack[I]=P.tileNodes(E[I],k.paddingLeft+k.paddingRight),k.rect.width=P.tiledMemberPack[I].width,k.rect.height=P.tiledMemberPack[I].height})},S.prototype.tileNodes=function(E,T){var P=f.TILING_PADDING_VERTICAL,I=f.TILING_PADDING_HORIZONTAL,k={rows:[],rowWidth:[],rowHeight:[],width:0,height:T,verticalPadding:P,horizontalPadding:I};E.sort(function(j,z){return j.rect.width*j.rect.height>z.rect.width*z.rect.height?-1:j.rect.width*j.rect.height0&&(B+=E.horizontalPadding),E.rowWidth[P]=B,E.width0&&(j+=E.verticalPadding);var z=0;j>E.rowHeight[P]&&(z=E.rowHeight[P],E.rowHeight[P]=j,z=E.rowHeight[P]-z),E.height+=z,E.rows[P].push(T)},S.prototype.getShortestRowIndex=function(E){for(var T=-1,P=Number.MAX_VALUE,I=0;IP&&(T=I,P=E.rowWidth[I]);return T},S.prototype.canAddHorizontal=function(E,T,P){var I=this.getShortestRowIndex(E);if(I<0)return!0;var k=E.rowWidth[I];if(k+E.horizontalPadding+T<=E.width)return!0;var L=0;E.rowHeight[I]0&&(L=P+E.verticalPadding-E.rowHeight[I]);var B;E.width-k>=T+E.horizontalPadding?B=(E.height+L)/(k+T+E.horizontalPadding):B=(E.height+L)/E.width,L=P+E.verticalPadding;var j;return E.widthL&&T!=P){I.splice(-1,1),E.rows[P].push(k),E.rowWidth[T]=E.rowWidth[T]-L,E.rowWidth[P]=E.rowWidth[P]+L,E.width=E.rowWidth[instance.getLongestRowIndex(E)];for(var B=Number.MIN_VALUE,j=0;jB&&(B=I[j].height);T>0&&(B+=E.verticalPadding);var z=E.rowHeight[T]+E.rowHeight[P];E.rowHeight[T]=B,E.rowHeight[P]0)for(var J=k;J<=L;J++)$[0]+=this.grid[J][B-1].length+this.grid[J][B].length-1;if(L0)for(var J=B;J<=j;J++)$[3]+=this.grid[k-1][J].length+this.grid[k][J].length-1;for(var X=b.MAX_VALUE,Z,ue,re=0;re<$.length;re++)$[re]0){var j;j=x.getGraphManager().add(x.newGraph(),P),this.processChildrenList(j,T,x)}}},g.prototype.stop=function(){return this.stopped=!0,this};var b=function(m){m("layout","cose-bilkent",g)};typeof cytoscape<"u"&&b(cytoscape),n.exports=b})])})})(ax)),ax.exports}var jte=Lte();const Bte=Bp(jte);Np.use(Bte);const Fte="cose-bilkent",Ute=(r,e)=>{const t=Np({headless:!0,styleEnabled:!1});t.add(r);const n={};return t.layout({name:Fte,animate:!1,spacingFactor:e,quality:"default",tile:!1,randomize:!0,stop:()=>{t.nodes().forEach(a=>{n[a.id()]={...a.position()}})}}).run(),{positions:n}};class zte{start(){}postMessage(e){const{elements:t,spacingFactor:n}=e,i=Ute(t,n);this.onmessage({data:i})}onmessage(){}close(){}}const qte={port:new zte},Gte=()=>new SharedWorker(new URL(""+new URL("CoseBilkentLayout.worker-DQV9PnDH.js",import.meta.url).href,import.meta.url),{type:"module",name:"CoseBilkentLayout"});function Vte(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var HO,j3;function Hte(){if(j3)return HO;j3=1;function r(){this.__data__=[],this.size=0}return HO=r,HO}var WO,B3;function hD(){if(B3)return WO;B3=1;function r(e,t){return e===t||e!==e&&t!==t}return WO=r,WO}var YO,F3;function H2(){if(F3)return YO;F3=1;var r=hD();function e(t,n){for(var i=t.length;i--;)if(r(t[i][0],n))return i;return-1}return YO=e,YO}var XO,U3;function Wte(){if(U3)return XO;U3=1;var r=H2(),e=Array.prototype,t=e.splice;function n(i){var a=this.__data__,o=r(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():t.call(a,o,1),--this.size,!0}return XO=n,XO}var $O,z3;function Yte(){if(z3)return $O;z3=1;var r=H2();function e(t){var n=this.__data__,i=r(n,t);return i<0?void 0:n[i][1]}return $O=e,$O}var KO,q3;function Xte(){if(q3)return KO;q3=1;var r=H2();function e(t){return r(this.__data__,t)>-1}return KO=e,KO}var ZO,G3;function $te(){if(G3)return ZO;G3=1;var r=H2();function e(t,n){var i=this.__data__,a=r(i,t);return a<0?(++this.size,i.push([t,n])):i[a][1]=n,this}return ZO=e,ZO}var QO,V3;function W2(){if(V3)return QO;V3=1;var r=Hte(),e=Wte(),t=Yte(),n=Xte(),i=$te();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n-1&&t%1==0&&t<=r}return YT=e,YT}var XT,zL;function xre(){if(zL)return XT;zL=1;var r=r0(),e=mD(),t=xv(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",l="[object Map]",c="[object Number]",f="[object Object]",d="[object RegExp]",h="[object Set]",p="[object String]",g="[object WeakMap]",y="[object ArrayBuffer]",b="[object DataView]",_="[object Float32Array]",m="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",O="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",P="[object Uint16Array]",I="[object Uint32Array]",k={};k[_]=k[m]=k[x]=k[S]=k[O]=k[E]=k[T]=k[P]=k[I]=!0,k[n]=k[i]=k[y]=k[a]=k[b]=k[o]=k[s]=k[u]=k[l]=k[c]=k[f]=k[d]=k[h]=k[p]=k[g]=!1;function L(B){return t(B)&&e(B.length)&&!!k[r(B)]}return XT=L,XT}var $T,qL;function bD(){if(qL)return $T;qL=1;function r(e){return function(t){return e(t)}}return $T=r,$T}var gb={exports:{}};gb.exports;var GL;function _D(){return GL||(GL=1,(function(r,e){var t=LU(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();r.exports=s})(gb,gb.exports)),gb.exports}var KT,VL;function Q2(){if(VL)return KT;VL=1;var r=xre(),e=bD(),t=_D(),n=t&&t.isTypedArray,i=n?e(n):r;return KT=i,KT}var ZT,HL;function qU(){if(HL)return ZT;HL=1;var r=bre(),e=Z2(),t=Bs(),n=r_(),i=zU(),a=Q2(),o=Object.prototype,s=o.hasOwnProperty;function u(l,c){var f=t(l),d=!f&&e(l),h=!f&&!d&&n(l),p=!f&&!d&&!h&&a(l),g=f||d||h||p,y=g?r(l.length,String):[],b=y.length;for(var _ in l)(c||s.call(l,_))&&!(g&&(_=="length"||h&&(_=="offset"||_=="parent")||p&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,b)))&&y.push(_);return y}return ZT=u,ZT}var QT,WL;function J2(){if(WL)return QT;WL=1;var r=Object.prototype;function e(t){var n=t&&t.constructor,i=typeof n=="function"&&n.prototype||r;return t===i}return QT=e,QT}var JT,YL;function GU(){if(YL)return JT;YL=1;function r(e,t){return function(n){return e(t(n))}}return JT=r,JT}var eC,XL;function Ere(){if(XL)return eC;XL=1;var r=GU(),e=r(Object.keys,Object);return eC=e,eC}var tC,$L;function wD(){if($L)return tC;$L=1;var r=J2(),e=Ere(),t=Object.prototype,n=t.hasOwnProperty;function i(a){if(!r(a))return e(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return tC=i,tC}var rC,KL;function oy(){if(KL)return rC;KL=1;var r=Y2(),e=mD();function t(n){return n!=null&&e(n.length)&&!r(n)}return rC=t,rC}var nC,ZL;function sy(){if(ZL)return nC;ZL=1;var r=qU(),e=wD(),t=oy();function n(i){return t(i)?r(i):e(i)}return nC=n,nC}var iC,QL;function Sre(){if(QL)return iC;QL=1;var r=K2(),e=sy();function t(n,i){return n&&r(i,e(i),n)}return iC=t,iC}var aC,JL;function Ore(){if(JL)return aC;JL=1;function r(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}return aC=r,aC}var oC,e4;function Tre(){if(e4)return oC;e4=1;var r=iy(),e=J2(),t=Ore(),n=Object.prototype,i=n.hasOwnProperty;function a(o){if(!r(o))return t(o);var s=e(o),u=[];for(var l in o)l=="constructor"&&(s||!i.call(o,l))||u.push(l);return u}return oC=a,oC}var sC,t4;function xD(){if(t4)return sC;t4=1;var r=qU(),e=Tre(),t=oy();function n(i){return t(i)?r(i,!0):e(i)}return sC=n,sC}var uC,r4;function Cre(){if(r4)return uC;r4=1;var r=K2(),e=xD();function t(n,i){return n&&r(i,e(i),n)}return uC=t,uC}var yb={exports:{}};yb.exports;var n4;function Are(){return n4||(n4=1,(function(r,e){var t=Ch(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,d=s?s(f):new l.constructor(f);return l.copy(d),d}r.exports=u})(yb,yb.exports)),yb.exports}var lC,i4;function Rre(){if(i4)return lC;i4=1;function r(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++nh))return!1;var g=f.get(o),y=f.get(s);if(g&&y)return g==s&&y==o;var b=-1,_=!0,m=u&i?new r:void 0;for(f.set(o,s),f.set(s,o);++b0&&a(c)?i>1?t(c,i-1,a,o,s):r(s,c):o||(s[s.length]=c)}return s}return eR=t,eR}var tR,Kj;function qne(){if(Kj)return tR;Kj=1;function r(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)}return tR=r,tR}var rR,Zj;function Gne(){if(Zj)return rR;Zj=1;var r=qne(),e=Math.max;function t(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var o=arguments,s=-1,u=e(o.length-i,0),l=Array(u);++s0){if(++a>=r)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return iR=n,iR}var aR,e6;function Wne(){if(e6)return aR;e6=1;var r=Vne(),e=Hne(),t=e(r);return aR=t,aR}var oR,t6;function Yne(){if(t6)return oR;t6=1;var r=tE(),e=Gne(),t=Wne();function n(i,a){return t(e(i,a,r),i+"")}return oR=n,oR}var sR,r6;function Xne(){if(r6)return sR;r6=1;function r(e,t,n,i){for(var a=e.length,o=n+(i?1:-1);i?o--:++o-1}return fR=e,fR}var dR,s6;function Jne(){if(s6)return dR;s6=1;function r(e,t,n){for(var i=-1,a=e==null?0:e.length;++i=o){var b=l?null:i(u);if(b)return a(b);p=!1,d=n,y=new r}else y=l?[]:g;e:for(;++f1?h.setNode(p,f):h.setNode(p)}),this},i.prototype.setNode=function(c,f){return r.has(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=f),this):(this._nodes[c]=arguments.length>1?f:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=t,this._children[c]={},this._children[t][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)},i.prototype.node=function(c){return this._nodes[c]},i.prototype.hasNode=function(c){return r.has(this._nodes,c)},i.prototype.removeNode=function(c){var f=this;if(r.has(this._nodes,c)){var d=function(h){f.removeEdge(f._edgeObjs[h])};delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],r.each(this.children(c),function(h){f.setParent(h)}),delete this._children[c]),r.each(r.keys(this._in[c]),d),delete this._in[c],delete this._preds[c],r.each(r.keys(this._out[c]),d),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this},i.prototype.setParent=function(c,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(f))f=t;else{f+="";for(var d=f;!r.isUndefined(d);d=this.parent(d))if(d===c)throw new Error("Setting "+f+" as parent of "+c+" would create a cycle");this.setNode(f)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=f,this._children[f][c]=!0,this},i.prototype._removeFromParentsChildList=function(c){delete this._children[this._parent[c]][c]},i.prototype.parent=function(c){if(this._isCompound){var f=this._parent[c];if(f!==t)return f}},i.prototype.children=function(c){if(r.isUndefined(c)&&(c=t),this._isCompound){var f=this._children[c];if(f)return r.keys(f)}else{if(c===t)return this.nodes();if(this.hasNode(c))return[]}},i.prototype.predecessors=function(c){var f=this._preds[c];if(f)return r.keys(f)},i.prototype.successors=function(c){var f=this._sucs[c];if(f)return r.keys(f)},i.prototype.neighbors=function(c){var f=this.predecessors(c);if(f)return r.union(f,this.successors(c))},i.prototype.isLeaf=function(c){var f;return this.isDirected()?f=this.successors(c):f=this.neighbors(c),f.length===0},i.prototype.filterNodes=function(c){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var d=this;r.each(this._nodes,function(g,y){c(y)&&f.setNode(y,g)}),r.each(this._edgeObjs,function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,d.edge(g))});var h={};function p(g){var y=d.parent(g);return y===void 0||f.hasNode(y)?(h[g]=y,y):y in h?h[y]:p(y)}return this._isCompound&&r.each(f.nodes(),function(g){f.setParent(g,p(g))}),f},i.prototype.setDefaultEdgeLabel=function(c){return r.isFunction(c)||(c=r.constant(c)),this._defaultEdgeLabelFn=c,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(c,f){var d=this,h=arguments;return r.reduce(c,function(p,g){return h.length>1?d.setEdge(p,g,f):d.setEdge(p,g),g}),this},i.prototype.setEdge=function(){var c,f,d,h,p=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(c=g.v,f=g.w,d=g.name,arguments.length===2&&(h=arguments[1],p=!0)):(c=g,f=arguments[1],d=arguments[3],arguments.length>2&&(h=arguments[2],p=!0)),c=""+c,f=""+f,r.isUndefined(d)||(d=""+d);var y=s(this._isDirected,c,f,d);if(r.has(this._edgeLabels,y))return p&&(this._edgeLabels[y]=h),this;if(!r.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(f),this._edgeLabels[y]=p?h:this._defaultEdgeLabelFn(c,f,d);var b=u(this._isDirected,c,f,d);return c=b.v,f=b.w,Object.freeze(b),this._edgeObjs[y]=b,a(this._preds[f],c),a(this._sucs[c],f),this._in[f][y]=b,this._out[c][y]=b,this._edgeCount++,this},i.prototype.edge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return this._edgeLabels[h]},i.prototype.hasEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d);return r.has(this._edgeLabels,h)},i.prototype.removeEdge=function(c,f,d){var h=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,c,f,d),p=this._edgeObjs[h];return p&&(c=p.v,f=p.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[f],c),o(this._sucs[c],f),delete this._in[f][h],delete this._out[c][h],this._edgeCount--),this},i.prototype.inEdges=function(c,f){var d=this._in[c];if(d){var h=r.values(d);return f?r.filter(h,function(p){return p.v===f}):h}},i.prototype.outEdges=function(c,f){var d=this._out[c];if(d){var h=r.values(d);return f?r.filter(h,function(p){return p.w===f}):h}},i.prototype.nodeEdges=function(c,f){var d=this.inEdges(c,f);if(d)return d.concat(this.outEdges(c,f))};function a(c,f){c[f]?c[f]++:c[f]=1}function o(c,f){--c[f]||delete c[f]}function s(c,f,d,h){var p=""+f,g=""+d;if(!c&&p>g){var y=p;p=g,g=y}return p+n+g+n+(r.isUndefined(h)?e:h)}function u(c,f,d,h){var p=""+f,g=""+d;if(!c&&p>g){var y=p;p=g,g=y}var b={v:p,w:g};return h&&(b.name=h),b}function l(c,f){return s(c,f.v,f.w,f.name)}return wR}var xR,y6;function sie(){return y6||(y6=1,xR="2.1.8"),xR}var ER,m6;function uie(){return m6||(m6=1,ER={Graph:MD(),version:sie()}),ER}var SR,b6;function lie(){if(b6)return SR;b6=1;var r=qf(),e=MD();SR={write:t,read:a};function t(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:n(o),edges:i(o)};return r.isUndefined(o.graph())||(s.value=r.clone(o.graph())),s}function n(o){return r.map(o.nodes(),function(s){var u=o.node(s),l=o.parent(s),c={v:s};return r.isUndefined(u)||(c.value=u),r.isUndefined(l)||(c.parent=l),c})}function i(o){return r.map(o.edges(),function(s){var u=o.edge(s),l={v:s.v,w:s.w};return r.isUndefined(s.name)||(l.name=s.name),r.isUndefined(u)||(l.value=u),l})}function a(o){var s=new e(o.options).setGraph(o.value);return r.each(o.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),r.each(o.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return SR}var OR,_6;function cie(){if(_6)return OR;_6=1;var r=qf();OR=e;function e(t){var n={},i=[],a;function o(s){r.has(n,s)||(n[s]=!0,a.push(s),r.each(t.successors(s),o),r.each(t.predecessors(s),o))}return r.each(t.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return OR}var TR,w6;function cz(){if(w6)return TR;w6=1;var r=qf();TR=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(t){return t.key})},e.prototype.has=function(t){return r.has(this._keyIndices,t)},e.prototype.priority=function(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(t,n){var i=this._keyIndices;if(t=String(t),!r.has(i,t)){var a=this._arr,o=a.length;return i[t]=o,a.push({key:t,priority:n}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},e.prototype.decrease=function(t,n){var i=this._keyIndices[t];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},e.prototype._heapify=function(t){var n=this._arr,i=2*t,a=i+1,o=t;i>1,!(n[a].priority0&&(f=c.removeMin(),d=l[f],d.distance!==Number.POSITIVE_INFINITY);)u(f).forEach(h);return l}return CR}var AR,E6;function fie(){if(E6)return AR;E6=1;var r=fz(),e=qf();AR=t;function t(n,i,a){return e.transform(n.nodes(),function(o,s){o[s]=r(n,s,i,a)},{})}return AR}var RR,S6;function dz(){if(S6)return RR;S6=1;var r=qf();RR=e;function e(t){var n=0,i=[],a={},o=[];function s(u){var l=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(d){r.has(a,d)?a[d].onStack&&(l.lowlink=Math.min(l.lowlink,a[d].index)):(s(d),l.lowlink=Math.min(l.lowlink,a[d].lowlink))}),l.lowlink===l.index){var c=[],f;do f=i.pop(),a[f].onStack=!1,c.push(f);while(u!==f);o.push(c)}}return t.nodes().forEach(function(u){r.has(a,u)||s(u)}),o}return RR}var PR,O6;function die(){if(O6)return PR;O6=1;var r=qf(),e=dz();PR=t;function t(n){return r.filter(e(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return PR}var MR,T6;function hie(){if(T6)return MR;T6=1;var r=qf();MR=t;var e=r.constant(1);function t(i,a,o){return n(i,a||e,o||function(s){return i.outEdges(s)})}function n(i,a,o){var s={},u=i.nodes();return u.forEach(function(l){s[l]={},s[l][l]={distance:0},u.forEach(function(c){l!==c&&(s[l][c]={distance:Number.POSITIVE_INFINITY})}),o(l).forEach(function(c){var f=c.v===l?c.w:c.v,d=a(c);s[l][f]={distance:d,predecessor:l}})}),u.forEach(function(l){var c=s[l];u.forEach(function(f){var d=s[f];u.forEach(function(h){var p=d[l],g=c[h],y=d[h],b=p.distance+g.distance;b0;){if(l=u.removeMin(),r.has(s,l))o.setEdge(l,s[l]);else{if(f)throw new Error("Input graph is not connected: "+i);f=!0}i.nodeEdges(l).forEach(c)}return o}return jR}var BR,k6;function mie(){return k6||(k6=1,BR={components:cie(),dijkstra:fz(),dijkstraAll:fie(),findCycles:die(),floydWarshall:hie(),isAcyclic:vie(),postorder:pie(),preorder:gie(),prim:yie(),tarjan:dz(),topsort:hz()}),BR}var FR,I6;function Uf(){if(I6)return FR;I6=1;var r=uie();return FR={Graph:r.Graph,json:lie(),alg:mie(),version:r.version},FR}var mb={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */var bie=mb.exports,N6;function Sa(){return N6||(N6=1,(function(r,e){(function(){var t,n="4.17.23",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,d=2,h=4,p=1,g=2,y=1,b=2,_=4,m=8,x=16,S=32,O=64,E=128,T=256,P=512,I=30,k="...",L=800,B=16,j=1,z=2,H=3,q=1/0,W=9007199254740991,$=17976931348623157e292,J=NaN,X=4294967295,Z=X-1,ue=X>>>1,re=[["ary",E],["bind",y],["bindKey",b],["curry",m],["curryRight",x],["flip",P],["partial",S],["partialRight",O],["rearg",T]],ne="[object Arguments]",le="[object Array]",ce="[object AsyncFunction]",pe="[object Boolean]",fe="[object Date]",se="[object DOMException]",de="[object Error]",ge="[object Function]",Oe="[object GeneratorFunction]",ke="[object Map]",De="[object Number]",Ne="[object Null]",Ce="[object Object]",Y="[object Promise]",Q="[object Proxy]",ie="[object RegExp]",we="[object Set]",Ee="[object String]",Me="[object Symbol]",Ie="[object Undefined]",Ye="[object WeakMap]",ot="[object WeakSet]",mt="[object ArrayBuffer]",wt="[object DataView]",Mt="[object Float32Array]",Dt="[object Float64Array]",vt="[object Int8Array]",tt="[object Int16Array]",_e="[object Int32Array]",Ue="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Ze="[object Uint16Array]",nt="[object Uint32Array]",It=/\b__p \+= '';/g,ct=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rt=/&(?:amp|lt|gt|quot|#39);/g,jt=/[&<>"']/g,Yt=RegExp(Rt.source),sr=RegExp(jt.source),Ut=/<%-([\s\S]+?)%>/g,Rr=/<%([\s\S]+?)%>/g,Xt=/<%=([\s\S]+?)%>/g,Vr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Br=/^\w*$/,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ur=/[\\^$.*+?()[\]{}|]/g,sn=RegExp(ur.source),Fr=/^\s+/,un=/\s/,bn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wn=/\{\n\/\* \[wrapped with (.+)\] \*/,_n=/,? & /,xn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,on=/[()=,{}\[\]\/\s]/,Nn=/\\(\\)?/g,fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,Jn=/^0b[01]+$/i,_i=/^\[object .+?Constructor\]$/,Ir=/^0o[0-7]+$/i,pa=/^(?:0|[1-9]\d*)$/,di=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bt=/($^)/,hr=/['\n\r\u2028\u2029\\]/g,ei="\\ud800-\\udfff",Hn="\\u0300-\\u036f",fs="\\ufe20-\\ufe2f",Na="\\u20d0-\\u20ff",ki=Hn+fs+Na,Wr="\\u2700-\\u27bf",Nr="a-z\\xdf-\\xf6\\xf8-\\xff",na="\\xac\\xb1\\xd7\\xf7",Fs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hu="\\u2000-\\u206f",ga=" \\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",Us="A-Z\\xc0-\\xd6\\xd8-\\xde",Ln="\\ufe0e\\ufe0f",Ii=na+Fs+hu+ga,Ni="['’]",Pc="["+ei+"]",vu="["+Ii+"]",ia="["+ki+"]",Hl="\\d+",Md="["+Wr+"]",Xa="["+Nr+"]",Wl="[^"+ei+Ii+Hl+Wr+Nr+Us+"]",Yl="\\ud83c[\\udffb-\\udfff]",nf="(?:"+ia+"|"+Yl+")",Wi="[^"+ei+"]",af="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",qo="["+Us+"]",Gf="\\u200d",ds="(?:"+Xa+"|"+Wl+")",Mc="(?:"+qo+"|"+Wl+")",Xl="(?:"+Ni+"(?:d|ll|m|re|s|t|ve))?",ti="(?:"+Ni+"(?:D|LL|M|RE|S|T|VE))?",zs=nf+"?",Qu="["+Ln+"]?",qs="(?:"+Gf+"(?:"+[Wi,af,La].join("|")+")"+Qu+zs+")*",$l="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",of="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pu=Qu+zs+qs,_o="(?:"+[Md,af,La].join("|")+")"+pu,wo="(?:"+[Wi+ia+"?",ia,af,La,Pc].join("|")+")",Vf=RegExp(Ni,"g"),sf=RegExp(ia,"g"),gu=RegExp(Yl+"(?="+Yl+")|"+wo+pu,"g"),so=RegExp([qo+"?"+Xa+"+"+Xl+"(?="+[vu,qo,"$"].join("|")+")",Mc+"+"+ti+"(?="+[vu,qo+ds,"$"].join("|")+")",qo+"?"+ds+"+"+Xl,qo+"+"+ti,of,$l,Hl,_o].join("|"),"g"),Ju=RegExp("["+Gf+ei+ki+Ln+"]"),Kl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Go=["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"],hs=-1,jn={};jn[Mt]=jn[Dt]=jn[vt]=jn[tt]=jn[_e]=jn[Ue]=jn[Qe]=jn[Ze]=jn[nt]=!0,jn[ne]=jn[le]=jn[mt]=jn[pe]=jn[wt]=jn[fe]=jn[de]=jn[ge]=jn[ke]=jn[De]=jn[Ce]=jn[ie]=jn[we]=jn[Ee]=jn[Ye]=!1;var Zr={};Zr[ne]=Zr[le]=Zr[mt]=Zr[wt]=Zr[pe]=Zr[fe]=Zr[Mt]=Zr[Dt]=Zr[vt]=Zr[tt]=Zr[_e]=Zr[ke]=Zr[De]=Zr[Ce]=Zr[ie]=Zr[we]=Zr[Ee]=Zr[Me]=Zr[Ue]=Zr[Qe]=Zr[Ze]=Zr[nt]=!0,Zr[de]=Zr[ge]=Zr[Ye]=!1;var Zl={À:"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"},vs={"&":"&","<":"<",">":">",'"':""","'":"'"},Dc={"&":"&","<":"<",">":">",""":'"',"'":"'"},Oa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},el=parseFloat,uf=parseInt,Ql=typeof Lf=="object"&&Lf&&Lf.Object===Object&&Lf,tl=typeof self=="object"&&self&&self.Object===Object&&self,wi=Ql||tl||Function("return this")(),Jl=e&&!e.nodeType&&e,aa=Jl&&!0&&r&&!r.nodeType&&r,yu=aa&&aa.exports===Jl,lf=yu&&Ql.process,ya=(function(){try{var We=aa&&aa.require&&aa.require("util").types;return We||lf&&lf.binding&&lf.binding("util")}catch{}})(),ma=ya&&ya.isArrayBuffer,mu=ya&&ya.isDate,uo=ya&&ya.isMap,Vo=ya&&ya.isRegExp,st=ya&&ya.isSet,xt=ya&&ya.isTypedArray;function pt(We,ft,ut){switch(ut.length){case 0:return We.call(ft);case 1:return We.call(ft,ut[0]);case 2:return We.call(ft,ut[0],ut[1]);case 3:return We.call(ft,ut[0],ut[1],ut[2])}return We.apply(ft,ut)}function Wt(We,ft,ut,Kt){for(var Pr=-1,Qr=We==null?0:We.length;++Pr-1}function ec(We,ft,ut){for(var Kt=-1,Pr=We==null?0:We.length;++Kt-1;);return ut}function Rh(We,ft){for(var ut=We.length;ut--&&nl(ft,We[ut],0)>-1;);return ut}function Xf(We,ft){for(var ut=We.length,Kt=0;ut--;)We[ut]===ft&&++Kt;return Kt}var $f=bu(Zl),Id=bu(vs);function rc(We){return"\\"+Oa[We]}function Kf(We,ft){return We==null?t:We[ft]}function Lc(We){return Ju.test(We)}function Nd(We){return Kl.test(We)}function Ph(We){for(var ft,ut=[];!(ft=We.next()).done;)ut.push(ft.value);return ut}function hf(We){var ft=-1,ut=Array(We.size);return We.forEach(function(Kt,Pr){ut[++ft]=[Pr,Kt]}),ut}function Li(We,ft){return function(ut){return We(ft(ut))}}function hi(We,ft){for(var ut=-1,Kt=We.length,Pr=0,Qr=[];++ut-1}function $i(A,D){var U=this.__data__,ee=Ki(U,A);return ee<0?(++this.size,U.push([A,D])):U[ee][1]=D,this}$o.prototype.clear=kh,$o.prototype.delete=Ko,$o.prototype.get=fc,$o.prototype.has=Ih,$o.prototype.set=$i;function Za(A){var D=-1,U=A==null?0:A.length;for(this.clear();++D=D?A:D)),A}function Qa(A,D,U,ee,ve,Ae){var Le,qe=D&f,$e=D&d,Ot=D&h;if(U&&(Le=ve?U(A,ee,ve,Ae):U(A)),Le!==t)return Le;if(!ca(A))return A;var Tt=rn(A);if(Tt){if(Le=hy(A),!qe)return Fi(A,Le)}else{var Pt=vo(A),Qt=Pt==ge||Pt==Oe;if(Jd(A))return Mn(A,qe);if(Pt==Ce||Pt==ne||Qt&&!ve){if(Le=$e||Qt?{}:Qp(A),!qe)return $e?Tf(A,Du(Le,A)):sd(A,co(Le,A))}else{if(!Zr[Pt])return ve?A:{};Le=vy(A,Pt,qe)}}Ae||(Ae=new Zo);var pr=Ae.get(A);if(pr)return pr;Ae.set(A,Le),gg(A)?A.forEach(function(Gr){Le.add(Qa(Gr,D,U,Gr,A,Ae))}):O_(A)&&A.forEach(function(Gr,Bn){Le.set(Bn,Qa(Gr,D,U,Bn,A,Ae))});var qr=Ot?$e?ns:fd:$e?Gu:jo,Tn=Tt?t:qr(A);return ir(Tn||A,function(Gr,Bn){Tn&&(Bn=Gr,Gr=A[Bn]),Ao(Le,Bn,Qa(Gr,D,U,Bn,A,Ae))}),Le}function rd(A){var D=jo(A);return function(U){return ku(U,A,D)}}function ku(A,D,U){var ee=U.length;if(A==null)return!ee;for(A=be(A);ee--;){var ve=U[ee],Ae=D[ve],Le=A[ve];if(Le===t&&!(ve in A)||!Ae(Le))return!1}return!0}function wf(A,D,U){if(typeof A!="function")throw new Ei(o);return Hh(function(){A.apply(t,U)},D)}function Jo(A,D,U,ee){var ve=-1,Ae=Kn,Le=!0,qe=A.length,$e=[],Ot=D.length;if(!qe)return $e;U&&(D=xi(D,xo(U))),ee?(Ae=ec,Le=!1):D.length>=i&&(Ae=Vs,Le=!1,D=new lo(D));e:for(;++veve?0:ve+U),ee=ee===t||ee>ve?ve:zr(ee),ee<0&&(ee+=ve),ee=U>ee?0:R0(ee);U0&&U(qe)?D>1?Zi(qe,D-1,U,ee,ve):ba(ve,qe):ee||(ve[ve.length]=qe)}return ve}var hc=$p(),Ef=$p(!0);function xs(A,D){return A&&hc(A,D,jo)}function Es(A,D){return A&&Ef(A,D,jo)}function Zs(A,D){return ja(D,function(U){return Rl(A[U])})}function Ss(A,D){D=yr(D,A);for(var U=0,ee=D.length;A!=null&&UD}function er(A,D){return A!=null&&Jr.call(A,D)}function ho(A,D){return A!=null&&D in be(A)}function Qs(A,D,U){return A>=Sn(D,U)&&A=120&&Tt.length>=120)?new lo(Le&&Tt):t}Tt=A[0];var Pt=-1,Qt=qe[0];e:for(;++Pt-1;)qe!==A&&Eu.call(qe,$e,1),Eu.call(A,$e,1);return A}function Gc(A,D){for(var U=A?D.length:0,ee=U-1;U--;){var ve=D[U];if(U==ee||ve!==Ae){var Ae=ve;Sl(ve)?Eu.call(A,ve,1):vn(A,ve)}}return A}function K(A,D){return A+Wo(Xi()*(D-A+1))}function oe(A,D,U,ee){for(var ve=-1,Ae=Ri(ji((D-A)/(U||1)),0),Le=ut(Ae);Ae--;)Le[ee?Ae:++ve]=A,A+=U;return Le}function ye(A,D){var U="";if(!A||D<1||D>W)return U;do D%2&&(U+=A),D=Wo(D/2),D&&(A+=A);while(D);return U}function Pe(A,D){return Nv(Iv(A,D,tu),A+"")}function ze(A){return Ca(Kv(A))}function Ge(A,D){var U=Kv(A);return Yd(U,Po(D,0,U.length))}function Be(A,D,U,ee){if(!ca(A))return A;D=yr(D,A);for(var ve=-1,Ae=D.length,Le=Ae-1,qe=A;qe!=null&&++veve?0:ve+D),U=U>ve?ve:U,U<0&&(U+=ve),ve=D>U?0:U-D>>>0,D>>>=0;for(var Ae=ut(ve);++ee>>1,Le=A[Ae];Le!==null&&!qu(Le)&&(U?Le<=D:Le=i){var Ot=D?null:bc(A);if(Ot)return Zf(Ot);Le=!1,ve=Vs,$e=new lo}else $e=D?[]:qe;e:for(;++ee=ee?A:dt(A,D,U)}var cn=Cv||function(A){return wi.clearTimeout(A)};function Mn(A,D){if(D)return A.slice();var U=A.length,ee=gs?gs(U):new A.constructor(U);return A.copy(ee),ee}function On(A){var D=new A.constructor(A.byteLength);return new ac(D).set(new ac(A)),D}function zn(A,D){var U=D?On(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.byteLength)}function ts(A){var D=new A.constructor(A.source,gn.exec(A));return D.lastIndex=A.lastIndex,D}function _l(A){return bs?be(bs.call(A)):{}}function ju(A,D){var U=D?On(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.length)}function mc(A,D){if(A!==D){var U=A!==t,ee=A===null,ve=A===A,Ae=qu(A),Le=D!==t,qe=D===null,$e=D===D,Ot=qu(D);if(!qe&&!Ot&&!Ae&&A>D||Ae&&Le&&$e&&!qe&&!Ot||ee&&Le&&$e||!U&&$e||!ve)return 1;if(!ee&&!Ae&&!Ot&&A=qe)return $e;var Ot=U[ee];return $e*(Ot=="desc"?-1:1)}}return A.index-D.index}function Cs(A,D,U,ee){for(var ve=-1,Ae=A.length,Le=U.length,qe=-1,$e=D.length,Ot=Ri(Ae-Le,0),Tt=ut($e+Ot),Pt=!ee;++qe<$e;)Tt[qe]=D[qe];for(;++ve1?U[ve-1]:t,Le=ve>2?U[2]:t;for(Ae=A.length>3&&typeof Ae=="function"?(ve--,Ae):t,Le&&Io(U[0],U[1],Le)&&(Ae=ve<3?t:Ae,ve=1),D=be(D);++ee-1?ve[Ae?D[Le]:Le]:t}}function Do(A){return El(function(D){var U=D.length,ee=U,ve=ar.prototype.thru;for(A&&D.reverse();ee--;){var Ae=D[ee];if(typeof Ae!="function")throw new Ei(o);if(ve&&!Le&&ea(Ae)=="wrapper")var Le=new ar([],!0)}for(ee=Le?ee:U;++ee1&&Xn.reverse(),Tt&&$eqe))return!1;var Ot=Ae.get(A),Tt=Ae.get(D);if(Ot&&Tt)return Ot==D&&Tt==A;var Pt=-1,Qt=!0,pr=U&g?new lo:t;for(Ae.set(A,D),Ae.set(D,A);++Pt1?"& ":"")+D[ee],D=D.join(U>2?", ":" "),A.replace(bn,`{ + */var bie=mb.exports,N6;function Sa(){return N6||(N6=1,(function(r,e){(function(){var t,n="4.17.23",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,d=2,h=4,p=1,g=2,y=1,b=2,_=4,m=8,x=16,S=32,O=64,E=128,T=256,P=512,I=30,k="...",L=800,B=16,j=1,z=2,H=3,q=1/0,W=9007199254740991,$=17976931348623157e292,J=NaN,X=4294967295,Z=X-1,ue=X>>>1,re=[["ary",E],["bind",y],["bindKey",b],["curry",m],["curryRight",x],["flip",P],["partial",S],["partialRight",O],["rearg",T]],ne="[object Arguments]",le="[object Array]",ce="[object AsyncFunction]",pe="[object Boolean]",fe="[object Date]",se="[object DOMException]",de="[object Error]",ge="[object Function]",Oe="[object GeneratorFunction]",ke="[object Map]",De="[object Number]",Ne="[object Null]",Te="[object Object]",Y="[object Promise]",Q="[object Proxy]",ie="[object RegExp]",we="[object Set]",Ee="[object String]",Me="[object Symbol]",Ie="[object Undefined]",Ye="[object WeakMap]",ot="[object WeakSet]",mt="[object ArrayBuffer]",wt="[object DataView]",Mt="[object Float32Array]",Dt="[object Float64Array]",vt="[object Int8Array]",tt="[object Int16Array]",_e="[object Int32Array]",Ue="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Ze="[object Uint16Array]",nt="[object Uint32Array]",It=/\b__p \+= '';/g,ct=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rt=/&(?:amp|lt|gt|quot|#39);/g,jt=/[&<>"']/g,Yt=RegExp(Rt.source),sr=RegExp(jt.source),Ut=/<%-([\s\S]+?)%>/g,Rr=/<%([\s\S]+?)%>/g,Xt=/<%=([\s\S]+?)%>/g,Vr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Br=/^\w*$/,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ur=/[\\^$.*+?()[\]{}|]/g,sn=RegExp(ur.source),Fr=/^\s+/,un=/\s/,bn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wn=/\{\n\/\* \[wrapped with (.+)\] \*/,_n=/,? & /,xn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,on=/[()=,{}\[\]\/\s]/,Nn=/\\(\\)?/g,fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,Jn=/^0b[01]+$/i,_i=/^\[object .+?Constructor\]$/,Ir=/^0o[0-7]+$/i,pa=/^(?:0|[1-9]\d*)$/,di=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bt=/($^)/,hr=/['\n\r\u2028\u2029\\]/g,ei="\\ud800-\\udfff",Hn="\\u0300-\\u036f",fs="\\ufe20-\\ufe2f",Na="\\u20d0-\\u20ff",ki=Hn+fs+Na,Wr="\\u2700-\\u27bf",Nr="a-z\\xdf-\\xf6\\xf8-\\xff",na="\\xac\\xb1\\xd7\\xf7",Fs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hu="\\u2000-\\u206f",ga=" \\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",Us="A-Z\\xc0-\\xd6\\xd8-\\xde",Ln="\\ufe0e\\ufe0f",Ii=na+Fs+hu+ga,Ni="['’]",Pc="["+ei+"]",vu="["+Ii+"]",ia="["+ki+"]",Hl="\\d+",Md="["+Wr+"]",Xa="["+Nr+"]",Wl="[^"+ei+Ii+Hl+Wr+Nr+Us+"]",Yl="\\ud83c[\\udffb-\\udfff]",nf="(?:"+ia+"|"+Yl+")",Wi="[^"+ei+"]",af="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",qo="["+Us+"]",Gf="\\u200d",ds="(?:"+Xa+"|"+Wl+")",Mc="(?:"+qo+"|"+Wl+")",Xl="(?:"+Ni+"(?:d|ll|m|re|s|t|ve))?",ti="(?:"+Ni+"(?:D|LL|M|RE|S|T|VE))?",zs=nf+"?",Qu="["+Ln+"]?",qs="(?:"+Gf+"(?:"+[Wi,af,La].join("|")+")"+Qu+zs+")*",$l="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",of="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",pu=Qu+zs+qs,_o="(?:"+[Md,af,La].join("|")+")"+pu,wo="(?:"+[Wi+ia+"?",ia,af,La,Pc].join("|")+")",Vf=RegExp(Ni,"g"),sf=RegExp(ia,"g"),gu=RegExp(Yl+"(?="+Yl+")|"+wo+pu,"g"),so=RegExp([qo+"?"+Xa+"+"+Xl+"(?="+[vu,qo,"$"].join("|")+")",Mc+"+"+ti+"(?="+[vu,qo+ds,"$"].join("|")+")",qo+"?"+ds+"+"+Xl,qo+"+"+ti,of,$l,Hl,_o].join("|"),"g"),Ju=RegExp("["+Gf+ei+ki+Ln+"]"),Kl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Go=["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"],hs=-1,jn={};jn[Mt]=jn[Dt]=jn[vt]=jn[tt]=jn[_e]=jn[Ue]=jn[Qe]=jn[Ze]=jn[nt]=!0,jn[ne]=jn[le]=jn[mt]=jn[pe]=jn[wt]=jn[fe]=jn[de]=jn[ge]=jn[ke]=jn[De]=jn[Te]=jn[ie]=jn[we]=jn[Ee]=jn[Ye]=!1;var Zr={};Zr[ne]=Zr[le]=Zr[mt]=Zr[wt]=Zr[pe]=Zr[fe]=Zr[Mt]=Zr[Dt]=Zr[vt]=Zr[tt]=Zr[_e]=Zr[ke]=Zr[De]=Zr[Te]=Zr[ie]=Zr[we]=Zr[Ee]=Zr[Me]=Zr[Ue]=Zr[Qe]=Zr[Ze]=Zr[nt]=!0,Zr[de]=Zr[ge]=Zr[Ye]=!1;var Zl={À:"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"},vs={"&":"&","<":"<",">":">",'"':""","'":"'"},Dc={"&":"&","<":"<",">":">",""":'"',"'":"'"},Oa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},el=parseFloat,uf=parseInt,Ql=typeof Lf=="object"&&Lf&&Lf.Object===Object&&Lf,tl=typeof self=="object"&&self&&self.Object===Object&&self,wi=Ql||tl||Function("return this")(),Jl=e&&!e.nodeType&&e,aa=Jl&&!0&&r&&!r.nodeType&&r,yu=aa&&aa.exports===Jl,lf=yu&&Ql.process,ya=(function(){try{var We=aa&&aa.require&&aa.require("util").types;return We||lf&&lf.binding&&lf.binding("util")}catch{}})(),ma=ya&&ya.isArrayBuffer,mu=ya&&ya.isDate,uo=ya&&ya.isMap,Vo=ya&&ya.isRegExp,st=ya&&ya.isSet,xt=ya&&ya.isTypedArray;function pt(We,ft,ut){switch(ut.length){case 0:return We.call(ft);case 1:return We.call(ft,ut[0]);case 2:return We.call(ft,ut[0],ut[1]);case 3:return We.call(ft,ut[0],ut[1],ut[2])}return We.apply(ft,ut)}function Wt(We,ft,ut,Kt){for(var Pr=-1,Qr=We==null?0:We.length;++Pr-1}function ec(We,ft,ut){for(var Kt=-1,Pr=We==null?0:We.length;++Kt-1;);return ut}function Rh(We,ft){for(var ut=We.length;ut--&&nl(ft,We[ut],0)>-1;);return ut}function Xf(We,ft){for(var ut=We.length,Kt=0;ut--;)We[ut]===ft&&++Kt;return Kt}var $f=bu(Zl),Id=bu(vs);function rc(We){return"\\"+Oa[We]}function Kf(We,ft){return We==null?t:We[ft]}function Lc(We){return Ju.test(We)}function Nd(We){return Kl.test(We)}function Ph(We){for(var ft,ut=[];!(ft=We.next()).done;)ut.push(ft.value);return ut}function hf(We){var ft=-1,ut=Array(We.size);return We.forEach(function(Kt,Pr){ut[++ft]=[Pr,Kt]}),ut}function Li(We,ft){return function(ut){return We(ft(ut))}}function hi(We,ft){for(var ut=-1,Kt=We.length,Pr=0,Qr=[];++ut-1}function $i(A,D){var U=this.__data__,ee=Ki(U,A);return ee<0?(++this.size,U.push([A,D])):U[ee][1]=D,this}$o.prototype.clear=kh,$o.prototype.delete=Ko,$o.prototype.get=fc,$o.prototype.has=Ih,$o.prototype.set=$i;function Za(A){var D=-1,U=A==null?0:A.length;for(this.clear();++D=D?A:D)),A}function Qa(A,D,U,ee,ve,Ae){var Le,qe=D&f,$e=D&d,Ot=D&h;if(U&&(Le=ve?U(A,ee,ve,Ae):U(A)),Le!==t)return Le;if(!ca(A))return A;var Tt=rn(A);if(Tt){if(Le=hy(A),!qe)return Fi(A,Le)}else{var Pt=vo(A),Qt=Pt==ge||Pt==Oe;if(Jd(A))return Mn(A,qe);if(Pt==Te||Pt==ne||Qt&&!ve){if(Le=$e||Qt?{}:Qp(A),!qe)return $e?Tf(A,Du(Le,A)):sd(A,co(Le,A))}else{if(!Zr[Pt])return ve?A:{};Le=vy(A,Pt,qe)}}Ae||(Ae=new Zo);var pr=Ae.get(A);if(pr)return pr;Ae.set(A,Le),gg(A)?A.forEach(function(Gr){Le.add(Qa(Gr,D,U,Gr,A,Ae))}):O_(A)&&A.forEach(function(Gr,Bn){Le.set(Bn,Qa(Gr,D,U,Bn,A,Ae))});var qr=Ot?$e?ns:fd:$e?Gu:jo,Tn=Tt?t:qr(A);return ir(Tn||A,function(Gr,Bn){Tn&&(Bn=Gr,Gr=A[Bn]),Ao(Le,Bn,Qa(Gr,D,U,Bn,A,Ae))}),Le}function rd(A){var D=jo(A);return function(U){return ku(U,A,D)}}function ku(A,D,U){var ee=U.length;if(A==null)return!ee;for(A=be(A);ee--;){var ve=U[ee],Ae=D[ve],Le=A[ve];if(Le===t&&!(ve in A)||!Ae(Le))return!1}return!0}function wf(A,D,U){if(typeof A!="function")throw new Ei(o);return Hh(function(){A.apply(t,U)},D)}function Jo(A,D,U,ee){var ve=-1,Ae=Kn,Le=!0,qe=A.length,$e=[],Ot=D.length;if(!qe)return $e;U&&(D=xi(D,xo(U))),ee?(Ae=ec,Le=!1):D.length>=i&&(Ae=Vs,Le=!1,D=new lo(D));e:for(;++veve?0:ve+U),ee=ee===t||ee>ve?ve:zr(ee),ee<0&&(ee+=ve),ee=U>ee?0:R0(ee);U0&&U(qe)?D>1?Zi(qe,D-1,U,ee,ve):ba(ve,qe):ee||(ve[ve.length]=qe)}return ve}var hc=$p(),Ef=$p(!0);function xs(A,D){return A&&hc(A,D,jo)}function Es(A,D){return A&&Ef(A,D,jo)}function Zs(A,D){return ja(D,function(U){return Rl(A[U])})}function Ss(A,D){D=yr(D,A);for(var U=0,ee=D.length;A!=null&&UD}function er(A,D){return A!=null&&Jr.call(A,D)}function ho(A,D){return A!=null&&D in be(A)}function Qs(A,D,U){return A>=Sn(D,U)&&A=120&&Tt.length>=120)?new lo(Le&&Tt):t}Tt=A[0];var Pt=-1,Qt=qe[0];e:for(;++Pt-1;)qe!==A&&Eu.call(qe,$e,1),Eu.call(A,$e,1);return A}function Gc(A,D){for(var U=A?D.length:0,ee=U-1;U--;){var ve=D[U];if(U==ee||ve!==Ae){var Ae=ve;Sl(ve)?Eu.call(A,ve,1):vn(A,ve)}}return A}function K(A,D){return A+Wo(Xi()*(D-A+1))}function oe(A,D,U,ee){for(var ve=-1,Ae=Ri(ji((D-A)/(U||1)),0),Le=ut(Ae);Ae--;)Le[ee?Ae:++ve]=A,A+=U;return Le}function ye(A,D){var U="";if(!A||D<1||D>W)return U;do D%2&&(U+=A),D=Wo(D/2),D&&(A+=A);while(D);return U}function Pe(A,D){return Nv(Iv(A,D,tu),A+"")}function ze(A){return Ca(Kv(A))}function Ge(A,D){var U=Kv(A);return Yd(U,Po(D,0,U.length))}function Be(A,D,U,ee){if(!ca(A))return A;D=yr(D,A);for(var ve=-1,Ae=D.length,Le=Ae-1,qe=A;qe!=null&&++veve?0:ve+D),U=U>ve?ve:U,U<0&&(U+=ve),ve=D>U?0:U-D>>>0,D>>>=0;for(var Ae=ut(ve);++ee>>1,Le=A[Ae];Le!==null&&!qu(Le)&&(U?Le<=D:Le=i){var Ot=D?null:bc(A);if(Ot)return Zf(Ot);Le=!1,ve=Vs,$e=new lo}else $e=D?[]:qe;e:for(;++ee=ee?A:dt(A,D,U)}var cn=Cv||function(A){return wi.clearTimeout(A)};function Mn(A,D){if(D)return A.slice();var U=A.length,ee=gs?gs(U):new A.constructor(U);return A.copy(ee),ee}function On(A){var D=new A.constructor(A.byteLength);return new ac(D).set(new ac(A)),D}function zn(A,D){var U=D?On(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.byteLength)}function ts(A){var D=new A.constructor(A.source,gn.exec(A));return D.lastIndex=A.lastIndex,D}function _l(A){return bs?be(bs.call(A)):{}}function ju(A,D){var U=D?On(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.length)}function mc(A,D){if(A!==D){var U=A!==t,ee=A===null,ve=A===A,Ae=qu(A),Le=D!==t,qe=D===null,$e=D===D,Ot=qu(D);if(!qe&&!Ot&&!Ae&&A>D||Ae&&Le&&$e&&!qe&&!Ot||ee&&Le&&$e||!U&&$e||!ve)return 1;if(!ee&&!Ae&&!Ot&&A=qe)return $e;var Ot=U[ee];return $e*(Ot=="desc"?-1:1)}}return A.index-D.index}function Cs(A,D,U,ee){for(var ve=-1,Ae=A.length,Le=U.length,qe=-1,$e=D.length,Ot=Ri(Ae-Le,0),Tt=ut($e+Ot),Pt=!ee;++qe<$e;)Tt[qe]=D[qe];for(;++ve1?U[ve-1]:t,Le=ve>2?U[2]:t;for(Ae=A.length>3&&typeof Ae=="function"?(ve--,Ae):t,Le&&Io(U[0],U[1],Le)&&(Ae=ve<3?t:Ae,ve=1),D=be(D);++ee-1?ve[Ae?D[Le]:Le]:t}}function Do(A){return El(function(D){var U=D.length,ee=U,ve=ar.prototype.thru;for(A&&D.reverse();ee--;){var Ae=D[ee];if(typeof Ae!="function")throw new Ei(o);if(ve&&!Le&&ea(Ae)=="wrapper")var Le=new ar([],!0)}for(ee=Le?ee:U;++ee1&&Xn.reverse(),Tt&&$eqe))return!1;var Ot=Ae.get(A),Tt=Ae.get(D);if(Ot&&Tt)return Ot==D&&Tt==A;var Pt=-1,Qt=!0,pr=U&g?new lo:t;for(Ae.set(A,D),Ae.set(D,A);++Pt1?"& ":"")+D[ee],D=D.join(U>2?", ":" "),A.replace(bn,`{ /* [wrapped with `+D+`] */ -`)}function zh(A){return rn(A)||Zh(A)||!!(Mh&&A&&A[Mh])}function Sl(A,D){var U=typeof A;return D=D??W,!!D&&(U=="number"||U!="symbol"&&pa.test(A))&&A>-1&&A%1==0&&A0){if(++D>=L)return arguments[0]}else D=0;return A.apply(t,arguments)}}function Yd(A,D){var U=-1,ee=A.length,ve=ee-1;for(D=D===t?ee:D;++U1?A[D-1]:t;return U=typeof U=="function"?(A.pop(),U):t,qi(A,U)});function ag(A){var D=xe(A);return D.__chain__=!0,D}function o_(A,D){return D(A),A}function $h(A,D){return D(A)}var xy=El(function(A){var D=A.length,U=D?A[0]:0,ee=this.__wrapped__,ve=function(Ae){return Uc(Ae,A)};return D>1||this.__actions__.length||!(ee instanceof Yr)||!Sl(U)?this.thru(ve):(ee=ee.slice(U,+U+(D?1:0)),ee.__actions__.push({func:$h,args:[ve],thisArg:t}),new ar(ee,this.__chain__).thru(function(Ae){return D&&!Ae.length&&Ae.push(t),Ae}))});function Kd(){return ag(this)}function yo(){return new ar(this.value(),this.__chain__)}function Zd(){this.__values__===t&&(this.__values__=P_(this.value()));var A=this.__index__>=this.__values__.length,D=A?t:this.__values__[this.__index__++];return{done:A,value:D}}function zv(){return this}function hd(A){for(var D,U=this;U instanceof $s;){var ee=jv(U);ee.__index__=0,ee.__values__=t,D?ve.__wrapped__=ee:D=ee;var ve=ee;U=U.__wrapped__}return ve.__wrapped__=A,D}function u0(){var A=this.__wrapped__;if(A instanceof Yr){var D=A;return this.__actions__.length&&(D=new Yr(this)),D=D.reverse(),D.__actions__.push({func:$h,args:[At],thisArg:t}),new ar(D,this.__chain__)}return this.thru(At)}function l0(){return Ja(this.__wrapped__,this.__actions__)}var s_=Lh(function(A,D,U){Jr.call(A,U)?++A[U]:Ro(A,U,1)});function og(A,D,U){var ee=rn(A)?oa:Iu;return U&&Io(A,D,U)&&(D=t),ee(A,br(D,3))}function c0(A,D){var U=rn(A)?ja:ws;return U(A,br(D,3))}var Cl=Kp(ng),u_=Kp(Yh);function Uu(A,D){return Zi(sg(A,D),1)}function l_(A,D){return Zi(sg(A,D),q)}function c_(A,D,U){return U=U===t?1:zr(U),Zi(sg(A,D),U)}function f_(A,D){var U=rn(A)?ir:fo;return U(A,br(D,3))}function vd(A,D){var U=rn(A)?En:nd;return U(A,br(D,3))}var Ey=Lh(function(A,D,U){Jr.call(A,U)?A[U].push(D):Ro(A,U,[D])});function f0(A,D,U,ee){A=zu(A)?A:Kv(A),U=U&&!ee?zr(U):0;var ve=A.length;return U<0&&(U=Ri(ve+U,0)),yg(A)?U<=ve&&A.indexOf(D,U)>-1:!!ve&&nl(A,D,U)>-1}var qv=Pe(function(A,D,U){var ee=-1,ve=typeof D=="function",Ae=zu(A)?ut(A.length):[];return fo(A,function(Le){Ae[++ee]=ve?pt(D,Le,U):Mo(Le,D,U)}),Ae}),d_=Lh(function(A,D,U){Ro(A,U,D)});function sg(A,D){var U=rn(A)?xi:od;return U(A,br(D,3))}function h_(A,D,U,ee){return A==null?[]:(rn(D)||(D=D==null?[]:[D]),U=ee?t:U,rn(U)||(U=U==null?[]:[U]),yc(A,D,U))}var v_=Lh(function(A,D,U){A[U?0:1].push(D)},function(){return[[],[]]});function Sy(A,D,U){var ee=rn(A)?cf:kc,ve=arguments.length<3;return ee(A,br(D,4),U,ve,fo)}function d0(A,D,U){var ee=rn(A)?Ev:kc,ve=arguments.length<3;return ee(A,br(D,4),U,ve,nd)}function yE(A,D){var U=rn(A)?ja:ws;return U(A,Cy(br(D,3)))}function mE(A){var D=rn(A)?Ca:ze;return D(A)}function bE(A,D,U){(U?Io(A,D,U):D===t)?D=1:D=zr(D);var ee=rn(A)?Qo:Ge;return ee(A,D)}function p_(A){var D=rn(A)?td:gt;return D(A)}function g_(A){if(A==null)return 0;if(zu(A))return yg(A)?il(A):A.length;var D=vo(A);return D==ke||D==we?A.size:bl(A).length}function Gv(A,D,U){var ee=rn(A)?rl:qt;return U&&Io(A,D,U)&&(D=t),ee(A,br(D,3))}var Oy=Pe(function(A,D){if(A==null)return[];var U=D.length;return U>1&&Io(A,D[0],D[1])?D=[]:U>2&&Io(D[0],D[1],D[2])&&(D=[D[0]]),yc(A,Zi(D,1),[])}),ug=oc||function(){return wi.Date.now()};function y_(A,D){if(typeof D!="function")throw new Ei(o);return A=zr(A),function(){if(--A<1)return D.apply(this,arguments)}}function h0(A,D,U){return D=U?t:D,D=A&&D==null?A.length:D,eo(A,E,t,t,t,t,D)}function v0(A,D){var U;if(typeof D!="function")throw new Ei(o);return A=zr(A),function(){return--A>0&&(U=D.apply(this,arguments)),A<=1&&(D=t),U}}var Ty=Pe(function(A,D,U){var ee=y;if(U.length){var ve=hi(U,la(Ty));ee|=S}return eo(A,ee,D,U,ve)}),p0=Pe(function(A,D,U){var ee=y|b;if(U.length){var ve=hi(U,la(p0));ee|=S}return eo(D,ee,A,U,ve)});function lg(A,D,U){D=U?t:D;var ee=eo(A,m,t,t,t,t,t,D);return ee.placeholder=lg.placeholder,ee}function g0(A,D,U){D=U?t:D;var ee=eo(A,x,t,t,t,t,t,D);return ee.placeholder=g0.placeholder,ee}function y0(A,D,U){var ee,ve,Ae,Le,qe,$e,Ot=0,Tt=!1,Pt=!1,Qt=!0;if(typeof A!="function")throw new Ei(o);D=Pl(D)||0,ca(U)&&(Tt=!!U.leading,Pt="maxWait"in U,Ae=Pt?Ri(Pl(U.maxWait)||0,D):Ae,Qt="trailing"in U?!!U.trailing:Qt);function pr(mo){var yd=ee,Jh=ve;return ee=ve=t,Ot=mo,Le=A.apply(Jh,yd),Le}function qr(mo){return Ot=mo,qe=Hh(Bn,D),Tt?pr(mo):Le}function Tn(mo){var yd=mo-$e,Jh=mo-Ot,QD=D-yd;return Pt?Sn(QD,Ae-Jh):QD}function Gr(mo){var yd=mo-$e,Jh=mo-Ot;return $e===t||yd>=D||yd<0||Pt&&Jh>=Ae}function Bn(){var mo=ug();if(Gr(mo))return Xn(mo);qe=Hh(Bn,Tn(mo))}function Xn(mo){return qe=t,Qt&&ee?pr(mo):(ee=ve=t,Le)}function Kc(){qe!==t&&cn(qe),Ot=0,ee=$e=ve=qe=t}function Ml(){return qe===t?Le:Xn(ug())}function Zc(){var mo=ug(),yd=Gr(mo);if(ee=arguments,ve=this,$e=mo,yd){if(qe===t)return qr($e);if(Pt)return cn(qe),qe=Hh(Bn,D),pr($e)}return qe===t&&(qe=Hh(Bn,D)),Le}return Zc.cancel=Kc,Zc.flush=Ml,Zc}var yi=Pe(function(A,D){return wf(A,1,D)}),m0=Pe(function(A,D,U){return wf(A,Pl(D)||0,U)});function _E(A){return eo(A,P)}function cg(A,D){if(typeof A!="function"||D!=null&&typeof D!="function")throw new Ei(o);var U=function(){var ee=arguments,ve=D?D.apply(this,ee):ee[0],Ae=U.cache;if(Ae.has(ve))return Ae.get(ve);var Le=A.apply(this,ee);return U.cache=Ae.set(ve,Le)||Ae,Le};return U.cache=new(cg.Cache||Za),U}cg.Cache=Za;function Cy(A){if(typeof A!="function")throw new Ei(o);return function(){var D=arguments;switch(D.length){case 0:return!A.call(this);case 1:return!A.call(this,D[0]);case 2:return!A.call(this,D[0],D[1]);case 3:return!A.call(this,D[0],D[1],D[2])}return!A.apply(this,D)}}function wE(A){return v0(2,A)}var xE=Ji(function(A,D){D=D.length==1&&rn(D[0])?xi(D[0],xo(br())):xi(Zi(D,1),xo(br()));var U=D.length;return Pe(function(ee){for(var ve=-1,Ae=Sn(ee.length,U);++ve=D}),Zh=Wn((function(){return arguments})())?Wn:function(A){return Pa(A)&&Jr.call(A,"callee")&&!Ka.call(A,"callee")},rn=ut.isArray,w0=ma?xo(ma):Pi;function zu(A){return A!=null&&My(A.length)&&!Rl(A)}function Va(A){return Pa(A)&&zu(A)}function dg(A){return A===!0||A===!1||Pa(A)&&Qi(A)==pe}var Jd=Ys||at,S_=mu?xo(mu):es;function Cn(A){return Pa(A)&&A.nodeType===1&&!vg(A)}function x0(A){if(A==null)return!0;if(zu(A)&&(rn(A)||typeof A=="string"||typeof A.splice=="function"||Jd(A)||eh(A)||Zh(A)))return!A.length;var D=vo(A);if(D==ke||D==we)return!A.size;if(Vd(A))return!bl(A).length;for(var U in A)if(Jr.call(A,U))return!1;return!0}function Ry(A,D){return Pn(A,D)}function E0(A,D,U){U=typeof U=="function"?U:t;var ee=U?U(A,D):t;return ee===t?Pn(A,D,t,U):!!ee}function Py(A){if(!Pa(A))return!1;var D=Qi(A);return D==de||D==se||typeof A.message=="string"&&typeof A.name=="string"&&!vg(A)}function S0(A){return typeof A=="number"&&sa(A)}function Rl(A){if(!ca(A))return!1;var D=Qi(A);return D==ge||D==Oe||D==ce||D==Q}function hg(A){return typeof A=="number"&&A==zr(A)}function My(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=W}function ca(A){var D=typeof A;return A!=null&&(D=="object"||D=="function")}function Pa(A){return A!=null&&typeof A=="object"}var O_=uo?xo(uo):Xr;function T_(A,D){return A===D||vi(A,D,Kr(D))}function C_(A,D,U){return U=typeof U=="function"?U:t,vi(A,D,Kr(D),U)}function Oi(A){return T0(A)&&A!=+A}function O0(A){if(kv(A))throw new Pr(a);return vc(A)}function as(A){return A===null}function OE(A){return A==null}function T0(A){return typeof A=="number"||Pa(A)&&Qi(A)==De}function vg(A){if(!Pa(A)||Qi(A)!=Ce)return!1;var D=ys(A);if(D===null)return!0;var U=Jr.call(D,"constructor")&&D.constructor;return typeof U=="function"&&U instanceof U&&wu.call(U)==jd}var pg=Vo?xo(Vo):ml;function C0(A){return hg(A)&&A>=-W&&A<=W}var gg=st?xo(st):Ts;function yg(A){return typeof A=="string"||!rn(A)&&Pa(A)&&Qi(A)==Ee}function qu(A){return typeof A=="symbol"||Pa(A)&&Qi(A)==Me}var eh=xt?xo(xt):ad;function A0(A){return A===t}function TE(A){return Pa(A)&&vo(A)==Ye}function A_(A){return Pa(A)&&Qi(A)==ot}var CE=Fu(si),R_=Fu(function(A,D){return A<=D});function P_(A){if(!A)return[];if(zu(A))return yg(A)?ri(A):Fi(A);if(Yi&&A[Yi])return Ph(A[Yi]());var D=vo(A),U=D==ke?hf:D==we?Zf:Kv;return U(A)}function pd(A){if(!A)return A===0?A:0;if(A=Pl(A),A===q||A===-q){var D=A<0?-1:1;return D*$}return A===A?A:0}function zr(A){var D=pd(A),U=D%1;return D===D?U?D-U:D:0}function R0(A){return A?Po(zr(A),0,X):0}function Pl(A){if(typeof A=="number")return A;if(qu(A))return J;if(ca(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=ca(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=_u(A);var U=Jn.test(A);return U||Ir.test(A)?uf(A.slice(2),U?2:8):yn.test(A)?J:+A}function Dy(A){return wa(A,Gu(A))}function AE(A){return A?Po(zr(A),-W,W):A===0?A:0}function li(A){return A==null?"":Or(A)}var M_=Vc(function(A,D){if(Vd(D)||zu(D)){wa(D,jo(D),A);return}for(var U in D)Jr.call(D,U)&&Ao(A,U,D[U])}),ky=Vc(function(A,D){wa(D,Gu(D),A)}),Hv=Vc(function(A,D,U,ee){wa(D,Gu(D),A,ee)}),RE=Vc(function(A,D,U,ee){wa(D,jo(D),A,ee)}),Ec=El(Uc);function P0(A,D){var U=Ou(A);return D==null?U:co(U,D)}var D_=Pe(function(A,D){A=be(A);var U=-1,ee=D.length,ve=ee>2?D[2]:t;for(ve&&Io(D[0],D[1],ve)&&(ee=1);++U1),Ae}),wa(A,ns(A),U),ee&&(U=Qa(U,f|d|h,Zp));for(var ve=D.length;ve--;)vn(U,D[ve]);return U});function LE(A,D){return $v(A,Cy(br(D)))}var Xv=El(function(A,D){return A==null?{}:Of(A,D)});function $v(A,D){if(A==null)return{};var U=xi(ns(A),function(ee){return[ee]});return D=br(D),Aa(A,U,function(ee,ve){return D(ee,ve[0])})}function F_(A,D,U){D=yr(D,A);var ee=-1,ve=D.length;for(ve||(ve=1,A=t);++eeD){var ee=A;A=D,D=ee}if(U||A%1||D%1){var ve=Xi();return Sn(A+ve*(D-A+el("1e-"+((ve+"").length-1))),D)}return K(A,D)}var Fy=ud(function(A,D,U){return D=D.toLowerCase(),A+(U?G_(D):D)});function G_(A){return Qh(li(A).toLowerCase())}function Zv(A){return A=li(A),A&&A.replace(di,$f).replace(sf,"")}function FE(A,D,U){A=li(A),D=Or(D);var ee=A.length;U=U===t?ee:Po(zr(U),0,ee);var ve=U;return U-=D.length,U>=0&&A.slice(U,ve)==D}function V_(A){return A=li(A),A&&sr.test(A)?A.replace(jt,Id):A}function H_(A){return A=li(A),A&&sn.test(A)?A.replace(ur,"\\$&"):A}var W_=ud(function(A,D,U){return A+(U?"-":"")+D.toLowerCase()}),Y_=ud(function(A,D,U){return A+(U?" ":"")+D.toLowerCase()}),I0=Ud("toLowerCase");function X_(A,D,U){A=li(A),D=zr(D);var ee=D?il(A):0;if(!D||ee>=D)return A;var ve=(D-ee)/2;return Cf(Wo(ve),U)+A+Cf(ji(ve),U)}function $_(A,D,U){A=li(A),D=zr(D);var ee=D?il(A):0;return D&&ee>>0,U?(A=li(A),A&&(typeof D=="string"||D!=null&&!pg(D))&&(D=Or(D),!D&&Lc(A))?mn(ri(A),0,U):A.split(D,U)):[]}var j0=ud(function(A,D,U){return A+(U?" ":"")+Qh(D)});function K_(A,D,U){return A=li(A),U=U==null?0:Po(zr(U),0,A.length),D=Or(D),A.slice(U,U+D.length)==D}function B0(A,D,U){var ee=xe.templateSettings;U&&Io(A,D,U)&&(D=t),A=li(A),D=Hv({},D,ee,Mi);var ve=Hv({},D.imports,ee.imports,Mi),Ae=jo(ve),Le=Nc(ve,Ae),qe,$e,Ot=0,Tt=D.interpolate||Bt,Pt="__p += '",Qt=al((D.escape||Bt).source+"|"+Tt.source+"|"+(Tt===Xt?fi:Bt).source+"|"+(D.evaluate||Bt).source+"|$","g"),pr="//# sourceURL="+(Jr.call(D,"sourceURL")?(D.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hs+"]")+` +`)}function zh(A){return rn(A)||Zh(A)||!!(Mh&&A&&A[Mh])}function Sl(A,D){var U=typeof A;return D=D??W,!!D&&(U=="number"||U!="symbol"&&pa.test(A))&&A>-1&&A%1==0&&A0){if(++D>=L)return arguments[0]}else D=0;return A.apply(t,arguments)}}function Yd(A,D){var U=-1,ee=A.length,ve=ee-1;for(D=D===t?ee:D;++U1?A[D-1]:t;return U=typeof U=="function"?(A.pop(),U):t,qi(A,U)});function ag(A){var D=xe(A);return D.__chain__=!0,D}function o_(A,D){return D(A),A}function $h(A,D){return D(A)}var xy=El(function(A){var D=A.length,U=D?A[0]:0,ee=this.__wrapped__,ve=function(Ae){return Uc(Ae,A)};return D>1||this.__actions__.length||!(ee instanceof Yr)||!Sl(U)?this.thru(ve):(ee=ee.slice(U,+U+(D?1:0)),ee.__actions__.push({func:$h,args:[ve],thisArg:t}),new ar(ee,this.__chain__).thru(function(Ae){return D&&!Ae.length&&Ae.push(t),Ae}))});function Kd(){return ag(this)}function yo(){return new ar(this.value(),this.__chain__)}function Zd(){this.__values__===t&&(this.__values__=P_(this.value()));var A=this.__index__>=this.__values__.length,D=A?t:this.__values__[this.__index__++];return{done:A,value:D}}function zv(){return this}function hd(A){for(var D,U=this;U instanceof $s;){var ee=jv(U);ee.__index__=0,ee.__values__=t,D?ve.__wrapped__=ee:D=ee;var ve=ee;U=U.__wrapped__}return ve.__wrapped__=A,D}function u0(){var A=this.__wrapped__;if(A instanceof Yr){var D=A;return this.__actions__.length&&(D=new Yr(this)),D=D.reverse(),D.__actions__.push({func:$h,args:[At],thisArg:t}),new ar(D,this.__chain__)}return this.thru(At)}function l0(){return Ja(this.__wrapped__,this.__actions__)}var s_=Lh(function(A,D,U){Jr.call(A,U)?++A[U]:Ro(A,U,1)});function og(A,D,U){var ee=rn(A)?oa:Iu;return U&&Io(A,D,U)&&(D=t),ee(A,br(D,3))}function c0(A,D){var U=rn(A)?ja:ws;return U(A,br(D,3))}var Cl=Kp(ng),u_=Kp(Yh);function Uu(A,D){return Zi(sg(A,D),1)}function l_(A,D){return Zi(sg(A,D),q)}function c_(A,D,U){return U=U===t?1:zr(U),Zi(sg(A,D),U)}function f_(A,D){var U=rn(A)?ir:fo;return U(A,br(D,3))}function vd(A,D){var U=rn(A)?En:nd;return U(A,br(D,3))}var Ey=Lh(function(A,D,U){Jr.call(A,U)?A[U].push(D):Ro(A,U,[D])});function f0(A,D,U,ee){A=zu(A)?A:Kv(A),U=U&&!ee?zr(U):0;var ve=A.length;return U<0&&(U=Ri(ve+U,0)),yg(A)?U<=ve&&A.indexOf(D,U)>-1:!!ve&&nl(A,D,U)>-1}var qv=Pe(function(A,D,U){var ee=-1,ve=typeof D=="function",Ae=zu(A)?ut(A.length):[];return fo(A,function(Le){Ae[++ee]=ve?pt(D,Le,U):Mo(Le,D,U)}),Ae}),d_=Lh(function(A,D,U){Ro(A,U,D)});function sg(A,D){var U=rn(A)?xi:od;return U(A,br(D,3))}function h_(A,D,U,ee){return A==null?[]:(rn(D)||(D=D==null?[]:[D]),U=ee?t:U,rn(U)||(U=U==null?[]:[U]),yc(A,D,U))}var v_=Lh(function(A,D,U){A[U?0:1].push(D)},function(){return[[],[]]});function Sy(A,D,U){var ee=rn(A)?cf:kc,ve=arguments.length<3;return ee(A,br(D,4),U,ve,fo)}function d0(A,D,U){var ee=rn(A)?Ev:kc,ve=arguments.length<3;return ee(A,br(D,4),U,ve,nd)}function yE(A,D){var U=rn(A)?ja:ws;return U(A,Cy(br(D,3)))}function mE(A){var D=rn(A)?Ca:ze;return D(A)}function bE(A,D,U){(U?Io(A,D,U):D===t)?D=1:D=zr(D);var ee=rn(A)?Qo:Ge;return ee(A,D)}function p_(A){var D=rn(A)?td:gt;return D(A)}function g_(A){if(A==null)return 0;if(zu(A))return yg(A)?il(A):A.length;var D=vo(A);return D==ke||D==we?A.size:bl(A).length}function Gv(A,D,U){var ee=rn(A)?rl:qt;return U&&Io(A,D,U)&&(D=t),ee(A,br(D,3))}var Oy=Pe(function(A,D){if(A==null)return[];var U=D.length;return U>1&&Io(A,D[0],D[1])?D=[]:U>2&&Io(D[0],D[1],D[2])&&(D=[D[0]]),yc(A,Zi(D,1),[])}),ug=oc||function(){return wi.Date.now()};function y_(A,D){if(typeof D!="function")throw new Ei(o);return A=zr(A),function(){if(--A<1)return D.apply(this,arguments)}}function h0(A,D,U){return D=U?t:D,D=A&&D==null?A.length:D,eo(A,E,t,t,t,t,D)}function v0(A,D){var U;if(typeof D!="function")throw new Ei(o);return A=zr(A),function(){return--A>0&&(U=D.apply(this,arguments)),A<=1&&(D=t),U}}var Ty=Pe(function(A,D,U){var ee=y;if(U.length){var ve=hi(U,la(Ty));ee|=S}return eo(A,ee,D,U,ve)}),p0=Pe(function(A,D,U){var ee=y|b;if(U.length){var ve=hi(U,la(p0));ee|=S}return eo(D,ee,A,U,ve)});function lg(A,D,U){D=U?t:D;var ee=eo(A,m,t,t,t,t,t,D);return ee.placeholder=lg.placeholder,ee}function g0(A,D,U){D=U?t:D;var ee=eo(A,x,t,t,t,t,t,D);return ee.placeholder=g0.placeholder,ee}function y0(A,D,U){var ee,ve,Ae,Le,qe,$e,Ot=0,Tt=!1,Pt=!1,Qt=!0;if(typeof A!="function")throw new Ei(o);D=Pl(D)||0,ca(U)&&(Tt=!!U.leading,Pt="maxWait"in U,Ae=Pt?Ri(Pl(U.maxWait)||0,D):Ae,Qt="trailing"in U?!!U.trailing:Qt);function pr(mo){var yd=ee,Jh=ve;return ee=ve=t,Ot=mo,Le=A.apply(Jh,yd),Le}function qr(mo){return Ot=mo,qe=Hh(Bn,D),Tt?pr(mo):Le}function Tn(mo){var yd=mo-$e,Jh=mo-Ot,QD=D-yd;return Pt?Sn(QD,Ae-Jh):QD}function Gr(mo){var yd=mo-$e,Jh=mo-Ot;return $e===t||yd>=D||yd<0||Pt&&Jh>=Ae}function Bn(){var mo=ug();if(Gr(mo))return Xn(mo);qe=Hh(Bn,Tn(mo))}function Xn(mo){return qe=t,Qt&&ee?pr(mo):(ee=ve=t,Le)}function Kc(){qe!==t&&cn(qe),Ot=0,ee=$e=ve=qe=t}function Ml(){return qe===t?Le:Xn(ug())}function Zc(){var mo=ug(),yd=Gr(mo);if(ee=arguments,ve=this,$e=mo,yd){if(qe===t)return qr($e);if(Pt)return cn(qe),qe=Hh(Bn,D),pr($e)}return qe===t&&(qe=Hh(Bn,D)),Le}return Zc.cancel=Kc,Zc.flush=Ml,Zc}var yi=Pe(function(A,D){return wf(A,1,D)}),m0=Pe(function(A,D,U){return wf(A,Pl(D)||0,U)});function _E(A){return eo(A,P)}function cg(A,D){if(typeof A!="function"||D!=null&&typeof D!="function")throw new Ei(o);var U=function(){var ee=arguments,ve=D?D.apply(this,ee):ee[0],Ae=U.cache;if(Ae.has(ve))return Ae.get(ve);var Le=A.apply(this,ee);return U.cache=Ae.set(ve,Le)||Ae,Le};return U.cache=new(cg.Cache||Za),U}cg.Cache=Za;function Cy(A){if(typeof A!="function")throw new Ei(o);return function(){var D=arguments;switch(D.length){case 0:return!A.call(this);case 1:return!A.call(this,D[0]);case 2:return!A.call(this,D[0],D[1]);case 3:return!A.call(this,D[0],D[1],D[2])}return!A.apply(this,D)}}function wE(A){return v0(2,A)}var xE=Ji(function(A,D){D=D.length==1&&rn(D[0])?xi(D[0],xo(br())):xi(Zi(D,1),xo(br()));var U=D.length;return Pe(function(ee){for(var ve=-1,Ae=Sn(ee.length,U);++ve=D}),Zh=Wn((function(){return arguments})())?Wn:function(A){return Pa(A)&&Jr.call(A,"callee")&&!Ka.call(A,"callee")},rn=ut.isArray,w0=ma?xo(ma):Pi;function zu(A){return A!=null&&My(A.length)&&!Rl(A)}function Va(A){return Pa(A)&&zu(A)}function dg(A){return A===!0||A===!1||Pa(A)&&Qi(A)==pe}var Jd=Ys||at,S_=mu?xo(mu):es;function Cn(A){return Pa(A)&&A.nodeType===1&&!vg(A)}function x0(A){if(A==null)return!0;if(zu(A)&&(rn(A)||typeof A=="string"||typeof A.splice=="function"||Jd(A)||eh(A)||Zh(A)))return!A.length;var D=vo(A);if(D==ke||D==we)return!A.size;if(Vd(A))return!bl(A).length;for(var U in A)if(Jr.call(A,U))return!1;return!0}function Ry(A,D){return Pn(A,D)}function E0(A,D,U){U=typeof U=="function"?U:t;var ee=U?U(A,D):t;return ee===t?Pn(A,D,t,U):!!ee}function Py(A){if(!Pa(A))return!1;var D=Qi(A);return D==de||D==se||typeof A.message=="string"&&typeof A.name=="string"&&!vg(A)}function S0(A){return typeof A=="number"&&sa(A)}function Rl(A){if(!ca(A))return!1;var D=Qi(A);return D==ge||D==Oe||D==ce||D==Q}function hg(A){return typeof A=="number"&&A==zr(A)}function My(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=W}function ca(A){var D=typeof A;return A!=null&&(D=="object"||D=="function")}function Pa(A){return A!=null&&typeof A=="object"}var O_=uo?xo(uo):Xr;function T_(A,D){return A===D||vi(A,D,Kr(D))}function C_(A,D,U){return U=typeof U=="function"?U:t,vi(A,D,Kr(D),U)}function Oi(A){return T0(A)&&A!=+A}function O0(A){if(kv(A))throw new Pr(a);return vc(A)}function as(A){return A===null}function OE(A){return A==null}function T0(A){return typeof A=="number"||Pa(A)&&Qi(A)==De}function vg(A){if(!Pa(A)||Qi(A)!=Te)return!1;var D=ys(A);if(D===null)return!0;var U=Jr.call(D,"constructor")&&D.constructor;return typeof U=="function"&&U instanceof U&&wu.call(U)==jd}var pg=Vo?xo(Vo):ml;function C0(A){return hg(A)&&A>=-W&&A<=W}var gg=st?xo(st):Ts;function yg(A){return typeof A=="string"||!rn(A)&&Pa(A)&&Qi(A)==Ee}function qu(A){return typeof A=="symbol"||Pa(A)&&Qi(A)==Me}var eh=xt?xo(xt):ad;function A0(A){return A===t}function TE(A){return Pa(A)&&vo(A)==Ye}function A_(A){return Pa(A)&&Qi(A)==ot}var CE=Fu(si),R_=Fu(function(A,D){return A<=D});function P_(A){if(!A)return[];if(zu(A))return yg(A)?ri(A):Fi(A);if(Yi&&A[Yi])return Ph(A[Yi]());var D=vo(A),U=D==ke?hf:D==we?Zf:Kv;return U(A)}function pd(A){if(!A)return A===0?A:0;if(A=Pl(A),A===q||A===-q){var D=A<0?-1:1;return D*$}return A===A?A:0}function zr(A){var D=pd(A),U=D%1;return D===D?U?D-U:D:0}function R0(A){return A?Po(zr(A),0,X):0}function Pl(A){if(typeof A=="number")return A;if(qu(A))return J;if(ca(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=ca(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=_u(A);var U=Jn.test(A);return U||Ir.test(A)?uf(A.slice(2),U?2:8):yn.test(A)?J:+A}function Dy(A){return wa(A,Gu(A))}function AE(A){return A?Po(zr(A),-W,W):A===0?A:0}function li(A){return A==null?"":Or(A)}var M_=Vc(function(A,D){if(Vd(D)||zu(D)){wa(D,jo(D),A);return}for(var U in D)Jr.call(D,U)&&Ao(A,U,D[U])}),ky=Vc(function(A,D){wa(D,Gu(D),A)}),Hv=Vc(function(A,D,U,ee){wa(D,Gu(D),A,ee)}),RE=Vc(function(A,D,U,ee){wa(D,jo(D),A,ee)}),Ec=El(Uc);function P0(A,D){var U=Ou(A);return D==null?U:co(U,D)}var D_=Pe(function(A,D){A=be(A);var U=-1,ee=D.length,ve=ee>2?D[2]:t;for(ve&&Io(D[0],D[1],ve)&&(ee=1);++U1),Ae}),wa(A,ns(A),U),ee&&(U=Qa(U,f|d|h,Zp));for(var ve=D.length;ve--;)vn(U,D[ve]);return U});function LE(A,D){return $v(A,Cy(br(D)))}var Xv=El(function(A,D){return A==null?{}:Of(A,D)});function $v(A,D){if(A==null)return{};var U=xi(ns(A),function(ee){return[ee]});return D=br(D),Aa(A,U,function(ee,ve){return D(ee,ve[0])})}function F_(A,D,U){D=yr(D,A);var ee=-1,ve=D.length;for(ve||(ve=1,A=t);++eeD){var ee=A;A=D,D=ee}if(U||A%1||D%1){var ve=Xi();return Sn(A+ve*(D-A+el("1e-"+((ve+"").length-1))),D)}return K(A,D)}var Fy=ud(function(A,D,U){return D=D.toLowerCase(),A+(U?G_(D):D)});function G_(A){return Qh(li(A).toLowerCase())}function Zv(A){return A=li(A),A&&A.replace(di,$f).replace(sf,"")}function FE(A,D,U){A=li(A),D=Or(D);var ee=A.length;U=U===t?ee:Po(zr(U),0,ee);var ve=U;return U-=D.length,U>=0&&A.slice(U,ve)==D}function V_(A){return A=li(A),A&&sr.test(A)?A.replace(jt,Id):A}function H_(A){return A=li(A),A&&sn.test(A)?A.replace(ur,"\\$&"):A}var W_=ud(function(A,D,U){return A+(U?"-":"")+D.toLowerCase()}),Y_=ud(function(A,D,U){return A+(U?" ":"")+D.toLowerCase()}),I0=Ud("toLowerCase");function X_(A,D,U){A=li(A),D=zr(D);var ee=D?il(A):0;if(!D||ee>=D)return A;var ve=(D-ee)/2;return Cf(Wo(ve),U)+A+Cf(ji(ve),U)}function $_(A,D,U){A=li(A),D=zr(D);var ee=D?il(A):0;return D&&ee>>0,U?(A=li(A),A&&(typeof D=="string"||D!=null&&!pg(D))&&(D=Or(D),!D&&Lc(A))?mn(ri(A),0,U):A.split(D,U)):[]}var j0=ud(function(A,D,U){return A+(U?" ":"")+Qh(D)});function K_(A,D,U){return A=li(A),U=U==null?0:Po(zr(U),0,A.length),D=Or(D),A.slice(U,U+D.length)==D}function B0(A,D,U){var ee=xe.templateSettings;U&&Io(A,D,U)&&(D=t),A=li(A),D=Hv({},D,ee,Mi);var ve=Hv({},D.imports,ee.imports,Mi),Ae=jo(ve),Le=Nc(ve,Ae),qe,$e,Ot=0,Tt=D.interpolate||Bt,Pt="__p += '",Qt=al((D.escape||Bt).source+"|"+Tt.source+"|"+(Tt===Xt?fi:Bt).source+"|"+(D.evaluate||Bt).source+"|$","g"),pr="//# sourceURL="+(Jr.call(D,"sourceURL")?(D.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hs+"]")+` `;A.replace(Qt,function(Gr,Bn,Xn,Kc,Ml,Zc){return Xn||(Xn=Kc),Pt+=A.slice(Ot,Zc).replace(hr,rc),Bn&&(qe=!0,Pt+=`' + __e(`+Bn+`) + '`),Ml&&($e=!0,Pt+=`'; @@ -426,11 +426,11 @@ function print() { __p += __j.call(arguments, '') } `:`; `)+Pt+`return __p -}`;var Tn=F0(function(){return Qr(Ae,pr+"return "+Pt).apply(t,Le)});if(Tn.source=Pt,Py(Tn))throw Tn;return Tn}function rh(A){return li(A).toLowerCase()}function nh(A){return li(A).toUpperCase()}function ih(A,D,U){if(A=li(A),A&&(U||D===t))return _u(A);if(!A||!(D=Or(D)))return A;var ee=ri(A),ve=ri(D),Ae=df(ee,ve),Le=Rh(ee,ve)+1;return mn(ee,Ae,Le).join("")}function _g(A,D,U){if(A=li(A),A&&(U||D===t))return A.slice(0,nc(A)+1);if(!A||!(D=Or(D)))return A;var ee=ri(A),ve=Rh(ee,ri(D))+1;return mn(ee,0,ve).join("")}function wg(A,D,U){if(A=li(A),A&&(U||D===t))return A.replace(Fr,"");if(!A||!(D=Or(D)))return A;var ee=ri(A),ve=df(ee,ri(D));return mn(ee,ve).join("")}function ah(A,D){var U=I,ee=k;if(ca(D)){var ve="separator"in D?D.separator:ve;U="length"in D?zr(D.length):U,ee="omission"in D?Or(D.omission):ee}A=li(A);var Ae=A.length;if(Lc(A)){var Le=ri(A);Ae=Le.length}if(U>=Ae)return A;var qe=U-il(ee);if(qe<1)return ee;var $e=Le?mn(Le,0,qe).join(""):A.slice(0,qe);if(ve===t)return $e+ee;if(Le&&(qe+=$e.length-qe),pg(ve)){if(A.slice(qe).search(ve)){var Ot,Tt=$e;for(ve.global||(ve=al(ve.source,li(gn.exec(ve))+"g")),ve.lastIndex=0;Ot=ve.exec(Tt);)var Pt=Ot.index;$e=$e.slice(0,Pt===t?qe:Pt)}}else if(A.indexOf(Or(ve),qe)!=qe){var Qt=$e.lastIndexOf(ve);Qt>-1&&($e=$e.slice(0,Qt))}return $e+ee}function qE(A){return A=li(A),A&&Yt.test(A)?A.replace(Rt,jc):A}var Z_=ud(function(A,D,U){return A+(U?" ":"")+D.toUpperCase()}),Qh=Ud("toUpperCase");function Q_(A,D,U){return A=li(A),D=U?t:D,D===t?Nd(A)?Bc(A):Fn(A):A.match(D)||[]}var F0=Pe(function(A,D){try{return pt(A,t,D)}catch(U){return Py(U)?U:new Pr(U)}}),qy=El(function(A,D){return ir(D,function(U){U=Rs(U),Ro(A,U,Ty(A[U],A))}),A});function J_(A){var D=A==null?0:A.length,U=br();return A=D?xi(A,function(ee){if(typeof ee[1]!="function")throw new Ei(o);return[U(ee[0]),ee[1]]}):[],Pe(function(ee){for(var ve=-1;++veW)return[];var U=X,ee=Sn(A,X);D=br(D),A-=X;for(var ve=Yf(ee,D);++U0||D<0)?new Yr(U):(A<0?U=U.takeRight(-A):A&&(U=U.drop(A)),D!==t&&(D=zr(D),U=D<0?U.dropRight(-D):U.take(D-A)),U)},Yr.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Yr.prototype.toArray=function(){return this.take(X)},xs(Yr.prototype,function(A,D){var U=/^(?:filter|find|map|reject)|While$/.test(D),ee=/^(?:head|last)$/.test(D),ve=xe[ee?"take"+(D=="last"?"Right":""):D],Ae=ee||/^find/.test(D);ve&&(xe.prototype[D]=function(){var Le=this.__wrapped__,qe=ee?[1]:arguments,$e=Le instanceof Yr,Ot=qe[0],Tt=$e||rn(Le),Pt=function(Bn){var Xn=ve.apply(xe,ba([Bn],qe));return ee&&Qt?Xn[0]:Xn};Tt&&U&&typeof Ot=="function"&&Ot.length!=1&&($e=Tt=!1);var Qt=this.__chain__,pr=!!this.__actions__.length,qr=Ae&&!Qt,Tn=$e&&!pr;if(!Ae&&Tt){Le=Tn?Le:new Yr(this);var Gr=A.apply(Le,qe);return Gr.__actions__.push({func:$h,args:[Pt],thisArg:t}),new ar(Gr,Qt)}return qr&&Tn?A.apply(this,qe):(Gr=this.thru(Pt),qr?ee?Gr.value()[0]:Gr.value():Gr)})}),ir(["pop","push","shift","sort","splice","unshift"],function(A){var D=nn[A],U=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",ee=/^(?:pop|shift)$/.test(A);xe.prototype[A]=function(){var ve=arguments;if(ee&&!this.__chain__){var Ae=this.value();return D.apply(rn(Ae)?Ae:[],ve)}return this[U](function(Le){return D.apply(rn(Le)?Le:[],ve)})}}),xs(Yr.prototype,function(A,D){var U=xe[D];if(U){var ee=U.name+"";Jr.call(Rn,ee)||(Rn[ee]=[]),Rn[ee].push({name:D,func:U})}}),Rn[zd(t,b).name]=[{name:"wrapper",func:t}],Yr.prototype.clone=Tu,Yr.prototype.reverse=_s,Yr.prototype.value=Cu,xe.prototype.at=xy,xe.prototype.chain=Kd,xe.prototype.commit=yo,xe.prototype.next=Zd,xe.prototype.plant=hd,xe.prototype.reverse=u0,xe.prototype.toJSON=xe.prototype.valueOf=xe.prototype.value=l0,xe.prototype.first=xe.prototype.head,Yi&&(xe.prototype[Yi]=zv),xe}),ic=Hs();aa?((aa.exports=ic)._=ic,Jl._=ic):wi._=ic}).call(bie)})(mb,mb.exports)),mb.exports}var UR,L6;function _ie(){if(L6)return UR;L6=1,UR=r;function r(){var n={};n._next=n._prev=n,this._sentinel=n}r.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return e(i),i},r.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&e(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},r.prototype.toString=function(){for(var n=[],i=this._sentinel,a=i._prev;a!==i;)n.push(JSON.stringify(a,t)),a=a._prev;return"["+n.join(", ")+"]"};function e(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function t(n,i){if(n!=="_next"&&n!=="_prev")return i}return UR}var zR,j6;function wie(){if(j6)return zR;j6=1;var r=Sa(),e=Uf().Graph,t=_ie();zR=i;var n=r.constant(1);function i(l,c){if(l.nodeCount()<=1)return[];var f=s(l,c||n),d=a(f.graph,f.buckets,f.zeroIdx);return r.flatten(r.map(d,function(h){return l.outEdges(h.v,h.w)}),!0)}function a(l,c,f){for(var d=[],h=c[c.length-1],p=c[0],g;l.nodeCount();){for(;g=p.dequeue();)o(l,c,f,g);for(;g=h.dequeue();)o(l,c,f,g);if(l.nodeCount()){for(var y=c.length-2;y>0;--y)if(g=c[y].dequeue(),g){d=d.concat(o(l,c,f,g,!0));break}}}return d}function o(l,c,f,d,h){var p=h?[]:void 0;return r.forEach(l.inEdges(d.v),function(g){var y=l.edge(g),b=l.node(g.v);h&&p.push({v:g.v,w:g.w}),b.out-=y,u(c,f,b)}),r.forEach(l.outEdges(d.v),function(g){var y=l.edge(g),b=g.w,_=l.node(b);_.in-=y,u(c,f,_)}),l.removeNode(d.v),p}function s(l,c){var f=new e,d=0,h=0;r.forEach(l.nodes(),function(y){f.setNode(y,{v:y,in:0,out:0})}),r.forEach(l.edges(),function(y){var b=f.edge(y.v,y.w)||0,_=c(y),m=b+_;f.setEdge(y.v,y.w,m),h=Math.max(h,f.node(y.v).out+=_),d=Math.max(d,f.node(y.w).in+=_)});var p=r.range(h+d+3).map(function(){return new t}),g=d+1;return r.forEach(f.nodes(),function(y){u(p,g,f.node(y))}),{graph:f,buckets:p,zeroIdx:g}}function u(l,c,f){f.out?f.in?l[f.out-f.in+c].enqueue(f):l[l.length-1].enqueue(f):l[0].enqueue(f)}return zR}var qR,B6;function xie(){if(B6)return qR;B6=1;var r=Sa(),e=wie();qR={run:t,undo:i};function t(a){var o=a.graph().acyclicer==="greedy"?e(a,s(a)):n(a);r.forEach(o,function(u){var l=a.edge(u);a.removeEdge(u),l.forwardName=u.name,l.reversed=!0,a.setEdge(u.w,u.v,l,r.uniqueId("rev"))});function s(u){return function(l){return u.edge(l).weight}}}function n(a){var o=[],s={},u={};function l(c){r.has(u,c)||(u[c]=!0,s[c]=!0,r.forEach(a.outEdges(c),function(f){r.has(s,f.w)?o.push(f):l(f.w)}),delete s[c])}return r.forEach(a.nodes(),l),o}function i(a){r.forEach(a.edges(),function(o){var s=a.edge(o);if(s.reversed){a.removeEdge(o);var u=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(o.w,o.v,s,u)}})}return qR}var GR,F6;function Rc(){if(F6)return GR;F6=1;var r=Sa(),e=Uf().Graph;GR={addDummyNode:t,simplify:n,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:s,buildLayerMatrix:u,normalizeRanks:l,removeEmptyRanks:c,addBorderNode:f,maxRank:d,partition:h,time:p,notime:g};function t(y,b,_,m){var x;do x=r.uniqueId(m);while(y.hasNode(x));return _.dummy=b,y.setNode(x,_),x}function n(y){var b=new e().setGraph(y.graph());return r.forEach(y.nodes(),function(_){b.setNode(_,y.node(_))}),r.forEach(y.edges(),function(_){var m=b.edge(_.v,_.w)||{weight:0,minlen:1},x=y.edge(_);b.setEdge(_.v,_.w,{weight:m.weight+x.weight,minlen:Math.max(m.minlen,x.minlen)})}),b}function i(y){var b=new e({multigraph:y.isMultigraph()}).setGraph(y.graph());return r.forEach(y.nodes(),function(_){y.children(_).length||b.setNode(_,y.node(_))}),r.forEach(y.edges(),function(_){b.setEdge(_,y.edge(_))}),b}function a(y){var b=r.map(y.nodes(),function(_){var m={};return r.forEach(y.outEdges(_),function(x){m[x.w]=(m[x.w]||0)+y.edge(x).weight}),m});return r.zipObject(y.nodes(),b)}function o(y){var b=r.map(y.nodes(),function(_){var m={};return r.forEach(y.inEdges(_),function(x){m[x.v]=(m[x.v]||0)+y.edge(x).weight}),m});return r.zipObject(y.nodes(),b)}function s(y,b){var _=y.x,m=y.y,x=b.x-_,S=b.y-m,O=y.width/2,E=y.height/2;if(!x&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var T,P;return Math.abs(S)*O>Math.abs(x)*E?(S<0&&(E=-E),T=E*x/S,P=E):(x<0&&(O=-O),T=O,P=O*S/x),{x:_+T,y:m+P}}function u(y){var b=r.map(r.range(d(y)+1),function(){return[]});return r.forEach(y.nodes(),function(_){var m=y.node(_),x=m.rank;r.isUndefined(x)||(b[x][m.order]=_)}),b}function l(y){var b=r.min(r.map(y.nodes(),function(_){return y.node(_).rank}));r.forEach(y.nodes(),function(_){var m=y.node(_);r.has(m,"rank")&&(m.rank-=b)})}function c(y){var b=r.min(r.map(y.nodes(),function(S){return y.node(S).rank})),_=[];r.forEach(y.nodes(),function(S){var O=y.node(S).rank-b;_[O]||(_[O]=[]),_[O].push(S)});var m=0,x=y.graph().nodeRankFactor;r.forEach(_,function(S,O){r.isUndefined(S)&&O%x!==0?--m:m&&r.forEach(S,function(E){y.node(E).rank+=m})})}function f(y,b,_,m){var x={width:0,height:0};return arguments.length>=4&&(x.rank=_,x.order=m),t(y,"border",x,b)}function d(y){return r.max(r.map(y.nodes(),function(b){var _=y.node(b).rank;if(!r.isUndefined(_))return _}))}function h(y,b){var _={lhs:[],rhs:[]};return r.forEach(y,function(m){b(m)?_.lhs.push(m):_.rhs.push(m)}),_}function p(y,b){var _=r.now();try{return b()}finally{console.log(y+" time: "+(r.now()-_)+"ms")}}function g(y,b){return b()}return GR}var VR,U6;function Eie(){if(U6)return VR;U6=1;var r=Sa(),e=Rc();VR={run:t,undo:i};function t(a){a.graph().dummyChains=[],r.forEach(a.edges(),function(o){n(a,o)})}function n(a,o){var s=o.v,u=a.node(s).rank,l=o.w,c=a.node(l).rank,f=o.name,d=a.edge(o),h=d.labelRank;if(c!==u+1){a.removeEdge(o);var p,g,y;for(y=0,++u;uP.lim&&(I=P,k=!0);var L=r.filter(x.edges(),function(B){return k===_(m,m.node(B.v),I)&&k!==_(m,m.node(B.w),I)});return r.minBy(L,function(B){return t(x,B)})}function g(m,x,S,O){var E=S.v,T=S.w;m.removeEdge(E,T),m.setEdge(O.v,O.w,{}),f(m),u(m,x),y(m,x)}function y(m,x){var S=r.find(m.nodes(),function(E){return!x.node(E).parent}),O=i(m,S);O=O.slice(1),r.forEach(O,function(E){var T=m.node(E).parent,P=x.edge(E,T),I=!1;P||(P=x.edge(T,E),I=!0),x.node(E).rank=x.node(T).rank+(I?P.minlen:-P.minlen)})}function b(m,x,S){return m.hasEdge(x,S)}function _(m,x,S){return S.low<=x.lim&&x.lim<=S.lim}return YR}var XR,V6;function Oie(){if(V6)return XR;V6=1;var r=Gx(),e=r.longestPath,t=pz(),n=Sie();XR=i;function i(u){switch(u.graph().ranker){case"network-simplex":s(u);break;case"tight-tree":o(u);break;case"longest-path":a(u);break;default:s(u)}}var a=e;function o(u){e(u),t(u)}function s(u){n(u)}return XR}var $R,H6;function Tie(){if(H6)return $R;H6=1;var r=Sa();$R=e;function e(i){var a=n(i);r.forEach(i.graph().dummyChains,function(o){for(var s=i.node(o),u=s.edgeObj,l=t(i,a,u.v,u.w),c=l.path,f=l.lca,d=0,h=c[d],p=!0;o!==u.w;){if(s=i.node(o),p){for(;(h=c[d])!==f&&i.node(h).maxRankc||f>a[d].lim));for(h=d,d=s;(d=i.parent(d))!==h;)l.push(d);return{path:u.concat(l.reverse()),lca:h}}function n(i){var a={},o=0;function s(u){var l=o;r.forEach(i.children(u),s),a[u]={low:l,lim:o++}}return r.forEach(i.children(),s),a}return $R}var KR,W6;function Cie(){if(W6)return KR;W6=1;var r=Sa(),e=Rc();KR={run:t,cleanup:o};function t(s){var u=e.addDummyNode(s,"root",{},"_root"),l=i(s),c=r.max(r.values(l))-1,f=2*c+1;s.graph().nestingRoot=u,r.forEach(s.edges(),function(h){s.edge(h).minlen*=f});var d=a(s)+1;r.forEach(s.children(),function(h){n(s,u,f,d,c,l,h)}),s.graph().nodeRankFactor=f}function n(s,u,l,c,f,d,h){var p=s.children(h);if(!p.length){h!==u&&s.setEdge(u,h,{weight:0,minlen:l});return}var g=e.addBorderNode(s,"_bt"),y=e.addBorderNode(s,"_bb"),b=s.node(h);s.setParent(g,h),b.borderTop=g,s.setParent(y,h),b.borderBottom=y,r.forEach(p,function(_){n(s,u,l,c,f,d,_);var m=s.node(_),x=m.borderTop?m.borderTop:_,S=m.borderBottom?m.borderBottom:_,O=m.borderTop?c:2*c,E=x!==S?1:f-d[h]+1;s.setEdge(g,x,{weight:O,minlen:E,nestingEdge:!0}),s.setEdge(S,y,{weight:O,minlen:E,nestingEdge:!0})}),s.parent(h)||s.setEdge(u,g,{weight:0,minlen:f+d[h]})}function i(s){var u={};function l(c,f){var d=s.children(c);d&&d.length&&r.forEach(d,function(h){l(h,f+1)}),u[c]=f}return r.forEach(s.children(),function(c){l(c,1)}),u}function a(s){return r.reduce(s.edges(),function(u,l){return u+s.edge(l).weight},0)}function o(s){var u=s.graph();s.removeNode(u.nestingRoot),delete u.nestingRoot,r.forEach(s.edges(),function(l){var c=s.edge(l);c.nestingEdge&&s.removeEdge(l)})}return KR}var ZR,Y6;function Aie(){if(Y6)return ZR;Y6=1;var r=Sa(),e=Rc();ZR=t;function t(i){function a(o){var s=i.children(o),u=i.node(o);if(s.length&&r.forEach(s,a),r.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var l=u.minRank,c=u.maxRank+1;l0;)h%2&&(p+=c[h+1]),h=h-1>>1,c[h]+=d.weight;f+=d.weight*p})),f}return eP}var tP,Z6;function Die(){if(Z6)return tP;Z6=1;var r=Sa();tP=e;function e(t,n){return r.map(n,function(i){var a=t.inEdges(i);if(a.length){var o=r.reduce(a,function(s,u){var l=t.edge(u),c=t.node(u.v);return{sum:s.sum+l.weight*c.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:i,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:i}})}return tP}var rP,Q6;function kie(){if(Q6)return rP;Q6=1;var r=Sa();rP=e;function e(i,a){var o={};r.forEach(i,function(u,l){var c=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:l};r.isUndefined(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),r.forEach(a.edges(),function(u){var l=o[u.v],c=o[u.w];!r.isUndefined(l)&&!r.isUndefined(c)&&(c.indegree++,l.out.push(o[u.w]))});var s=r.filter(o,function(u){return!u.indegree});return t(s)}function t(i){var a=[];function o(l){return function(c){c.merged||(r.isUndefined(c.barycenter)||r.isUndefined(l.barycenter)||c.barycenter>=l.barycenter)&&n(l,c)}}function s(l){return function(c){c.in.push(l),--c.indegree===0&&i.push(c)}}for(;i.length;){var u=i.pop();a.push(u),r.forEach(u.in.reverse(),o(u)),r.forEach(u.out,s(u))}return r.map(r.filter(a,function(l){return!l.merged}),function(l){return r.pick(l,["vs","i","barycenter","weight"])})}function n(i,a){var o=0,s=0;i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),a.weight&&(o+=a.barycenter*a.weight,s+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/s,i.weight=s,i.i=Math.min(a.i,i.i),a.merged=!0}return rP}var nP,J6;function Iie(){if(J6)return nP;J6=1;var r=Sa(),e=Rc();nP=t;function t(a,o){var s=e.partition(a,function(g){return r.has(g,"barycenter")}),u=s.lhs,l=r.sortBy(s.rhs,function(g){return-g.i}),c=[],f=0,d=0,h=0;u.sort(i(!!o)),h=n(c,l,h),r.forEach(u,function(g){h+=g.vs.length,c.push(g.vs),f+=g.barycenter*g.weight,d+=g.weight,h=n(c,l,h)});var p={vs:r.flatten(c,!0)};return d&&(p.barycenter=f/d,p.weight=d),p}function n(a,o,s){for(var u;o.length&&(u=r.last(o)).i<=s;)o.pop(),a.push(u.vs),s++;return s}function i(a){return function(o,s){return o.barycenters.barycenter?1:a?s.i-o.i:o.i-s.i}}return nP}var iP,e8;function Nie(){if(e8)return iP;e8=1;var r=Sa(),e=Die(),t=kie(),n=Iie();iP=i;function i(s,u,l,c){var f=s.children(u),d=s.node(u),h=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,g={};h&&(f=r.filter(f,function(S){return S!==h&&S!==p}));var y=e(s,f);r.forEach(y,function(S){if(s.children(S.v).length){var O=i(s,S.v,l,c);g[S.v]=O,r.has(O,"barycenter")&&o(S,O)}});var b=t(y,l);a(b,g);var _=n(b,c);if(h&&(_.vs=r.flatten([h,_.vs,p],!0),s.predecessors(h).length)){var m=s.node(s.predecessors(h)[0]),x=s.node(s.predecessors(p)[0]);r.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+m.order+x.order)/(_.weight+2),_.weight+=2}return _}function a(s,u){r.forEach(s,function(l){l.vs=r.flatten(l.vs.map(function(c){return u[c]?u[c].vs:c}),!0)})}function o(s,u){r.isUndefined(s.barycenter)?(s.barycenter=u.barycenter,s.weight=u.weight):(s.barycenter=(s.barycenter*s.weight+u.barycenter*u.weight)/(s.weight+u.weight),s.weight+=u.weight)}return iP}var aP,t8;function Lie(){if(t8)return aP;t8=1;var r=Sa(),e=Uf().Graph;aP=t;function t(i,a,o){var s=n(i),u=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(l){return i.node(l)});return r.forEach(i.nodes(),function(l){var c=i.node(l),f=i.parent(l);(c.rank===a||c.minRank<=a&&a<=c.maxRank)&&(u.setNode(l),u.setParent(l,f||s),r.forEach(i[o](l),function(d){var h=d.v===l?d.w:d.v,p=u.edge(h,l),g=r.isUndefined(p)?0:p.weight;u.setEdge(h,l,{weight:i.edge(d).weight+g})}),r.has(c,"minRank")&&u.setNode(l,{borderLeft:c.borderLeft[a],borderRight:c.borderRight[a]}))}),u}function n(i){for(var a;i.hasNode(a=r.uniqueId("_root")););return a}return aP}var oP,r8;function jie(){if(r8)return oP;r8=1;var r=Sa();oP=e;function e(t,n,i){var a={},o;r.forEach(i,function(s){for(var u=t.parent(s),l,c;u;){if(l=t.parent(u),l?(c=a[l],a[l]=u):(c=o,o=u),c&&c!==u){n.setEdge(c,u);return}u=l}})}return oP}var sP,n8;function Bie(){if(n8)return sP;n8=1;var r=Sa(),e=Pie(),t=Mie(),n=Nie(),i=Lie(),a=jie(),o=Uf().Graph,s=Rc();sP=u;function u(d){var h=s.maxRank(d),p=l(d,r.range(1,h+1),"inEdges"),g=l(d,r.range(h-1,-1,-1),"outEdges"),y=e(d);f(d,y);for(var b=Number.POSITIVE_INFINITY,_,m=0,x=0;x<4;++m,++x){c(m%2?p:g,m%4>=2),y=s.buildLayerMatrix(d);var S=t(d,y);S1e3)return m;function x(O,E,T,P,I){var k;r.forEach(r.range(E,T),function(L){k=O[L],b.node(k).dummy&&r.forEach(b.predecessors(k),function(B){var j=b.node(B);j.dummy&&(j.orderI)&&o(m,B,k)})})}function S(O,E){var T=-1,P,I=0;return r.forEach(E,function(k,L){if(b.node(k).dummy==="border"){var B=b.predecessors(k);B.length&&(P=b.node(B[0]).order,x(E,I,L,T,P),I=L,T=P)}x(E,I,E.length,P,O.length)}),E}return r.reduce(_,S),m}function a(b,_){if(b.node(_).dummy)return r.find(b.predecessors(_),function(m){return b.node(m).dummy})}function o(b,_,m){if(_>m){var x=_;_=m,m=x}var S=b[_];S||(b[_]=S={}),S[m]=!0}function s(b,_,m){if(_>m){var x=_;_=m,m=x}return r.has(b[_],m)}function u(b,_,m,x){var S={},O={},E={};return r.forEach(_,function(T){r.forEach(T,function(P,I){S[P]=P,O[P]=P,E[P]=I})}),r.forEach(_,function(T){var P=-1;r.forEach(T,function(I){var k=x(I);if(k.length){k=r.sortBy(k,function(H){return E[H]});for(var L=(k.length-1)/2,B=Math.floor(L),j=Math.ceil(L);B<=j;++B){var z=k[B];O[I]===I&&P0?e[0].width:0,u=a>0?e[0].height:0;for(this.root={x:0,y:0,width:s,height:u},t=0;t=this.root.width+e,o=n&&this.root.width>=this.root.height+t;return a?this.growRight(e,t):o?this.growDown(e,t):i?this.growRight(e,t):n?this.growDown(e,t):null},growRight:function(e,t){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}};var n;return(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null},growDown:function(e,t){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};var n;return(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null}},vP=r,vP}var pP,f8;function Yie(){if(f8)return pP;f8=1;var r=Wie();return pP=function(e,t){t=t||{};var n=new r,i=t.inPlace||!1,a=e.map(function(l){return i?l:{width:l.width,height:l.height,item:l}});a=a.sort(function(l,c){return c.width*c.height-l.width*l.height}),n.fit(a);var o=a.reduce(function(l,c){return Math.max(l,c.x+c.width)},0),s=a.reduce(function(l,c){return Math.max(l,c.y+c.height)},0),u={width:o,height:s};return i||(u.items=a),u},pP}var Xie=Yie();const $ie=Bp(Xie);var Kie=Uf();const Zie=Bp(Kie),Qie="tight-tree",rv=100,yz="up",DD="down",Jie="left",mz="right",eae={[yz]:"BT",[DD]:"TB",[Jie]:"RL",[mz]:"LR"},tae="bin",rae=25,nae=1/.38,iae=r=>r===yz||r===DD,aae=r=>r===DD||r===mz,gP=r=>{let e=null,t=null,n=null,i=null,a=null,o=null,s=null,u=null;for(const l of r.nodes()){const c=r.node(l);(a===null||c.xs)&&(s=c.x),(u===null||c.y>u)&&(u=c.y);const f=Math.ceil(c.width/2);(e===null||c.x-fn)&&(n=c.x+f),(i===null||c.y+f>i)&&(i=c.y+f)}return{minX:e,minY:t,maxX:n,maxY:i,minCenterX:a,minCenterY:o,maxCenterX:s,maxCenterY:u,width:n-e,height:i-t,xOffset:a-e,yOffset:o-t}},bz=r=>{const e=new gz.graphlib.Graph;return e.setGraph({}),e.setDefaultEdgeLabel(()=>({})),e.graph().nodesep=75*r,e.graph().ranksep=75*r,e},d8=(r,e,t)=>{const{rank:n}=t.node(r);let i=null,a=null;for(const o of e){const{rank:s}=t.node(o);if(!(o===r||s>=n))if(s===n-1){i=s,a=o;break}else(i===null&&a===null||s>i)&&(i=s,a=o)}return a},oae=(r,e)=>{let t=d8(r,e.predecessors(r),e);return t===null&&(t=d8(r,e.successors(r),e)),t},sae=(r,e)=>{const t=[],n=Zie.alg.components(r);if(n.length>1)for(const i of n){const a=bz(e);for(const o of i){const s=r.node(o);a.setNode(o,{width:s.width,height:s.height});const u=r.outEdges(o);if(u)for(const l of u)a.setEdge(l.v,l.w)}t.push(a)}else t.push(r);return t},h8=(r,e,t)=>{r.graph().ranker=Qie,r.graph().rankdir=eae[e];const n=gz.layout(r);for(const i of n.nodes()){const a=oae(i,n);a!==null&&(t[i]=a)}},yP=(r,e)=>Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y)),uae=r=>{const e=[r[0]];let t={p1:r[0],p2:r[1]},n=yP(t.p1,t.p2);for(let i=2;i{const s=bz(o),u={},l={x:0,y:0},c=r.length;for(const m of r){const x=t[m.id];l.x+=(x==null?void 0:x.x)||0,l.y+=(x==null?void 0:x.y)||0;const S=(m.size||rae)*nae*o;s.setNode(m.id,{width:S,height:S})}const f=c?[l.x/c,l.y/c]:[0,0],d={};for(const m of n)if(e[m.from]&&e[m.to]&&m.from!==m.to){const x=m.from1){h.forEach(E=>h8(E,i,u));const m=iae(i),x=aae(i),S=h.filter(E=>E.nodeCount()===1),O=h.filter(E=>E.nodeCount()!==1);if(a===tae){O.sort((q,W)=>W.nodeCount()-q.nodeCount());const P=m?({width:q,height:W,...$})=>({...$,width:q+rv,height:W+rv}):({width:q,height:W,...$})=>({...$,width:W+rv,height:q+rv}),I=O.map(gP).map(P),k=S.map(gP).map(P),L=I.concat(k);$ie(L,{inPlace:!0});const B=Math.floor(rv/2),j=m?"x":"y",z=m?"y":"x";if(!x){const q=m?"y":"x",W=m?"height":"width",$=L.reduce((X,Z)=>X===null?Z[q]:Math.min(Z[q],X[W]||0),null),J=L.reduce((X,Z)=>X===null?Z[q]+Z[W]:Math.max(Z[q]+Z[W],X[W]||0),null);L.forEach(X=>{X[q]=$+(J-(X[q]+X[W]))})}const H=(q,W)=>{for(const $ of q.nodes()){const J=q.node($),X=s.node($);X.x=J.x-W.xOffset+W[j]+B,X.y=J.y-W.yOffset+W[z]+B}};for(let q=0;q$.nodeCount()-W.nodeCount():(W,$)=>W.nodeCount()-$.nodeCount());const E=O.map(gP),T=S.reduce((W,$)=>W+s.node($.nodes()[0]).width,0),P=S.reduce((W,$)=>Math.max(W,s.node($.nodes()[0]).width),0),I=S.length>0?T+(S.length-1)*rv:0,k=E.reduce((W,{width:$})=>Math.max(W,$),0),L=Math.max(k,I),B=E.reduce((W,{height:$})=>Math.max(W,$),0),j=Math.max(B,I);let z=0;const H=()=>{for(let W=0;W3&&(re.points=ue.points.map(({x:ne,y:le})=>({x:ne-J.minX+(m?X:z),y:le-J.minY+(m?z:X)})))}z+=(m?J.height:J.width)+rv}},q=()=>{const W=Math.floor(((m?L:j)-I)/2);z+=Math.floor(P/2);let $=W;for(const J of S){const X=J.nodes()[0],Z=s.node(X);m?(Z.x=$+Math.floor(Z.width/2),Z.y=z):(Z.x=z,Z.y=$+Math.floor(Z.width/2)),$+=rv+Z.width}z=P+rv};x?(H(),q()):(q(),H())}}else h8(s,i,u);l.x=0,l.y=0;const p={};for(const m of s.nodes()){const x=s.node(m);l.x+=x.x||0,l.y+=x.y||0,p[m]={x:x.x,y:x.y}}const g=c?[l.x/c,l.y/c]:[0,0],y=f[0]-g[0],b=f[1]-g[1];for(const m in p)p[m].x+=y,p[m].y+=b;const _={};for(const m of s.edges()){const x=s.edge(m);if(x.points&&x.points.length>3){const S=uae(x.points);for(const O of S)O.x+=y,O.y+=b;_[`${m.v}-${m.w}`]={points:[...S],from:{x:p[m.v].x,y:p[m.v].y},to:{x:p[m.w].x,y:p[m.w].y}},_[`${m.w}-${m.v}`]={points:S.reverse(),from:{x:p[m.w].x,y:p[m.w].y},to:{x:p[m.v].x,y:p[m.v].y}}}}return{positions:p,parents:u,waypoints:_}};class cae{start(){}postMessage(e){const{nodes:t,nodeIds:n,idToPosition:i,rels:a,direction:o,packing:s,pixelRatio:u,forcedDelay:l=0}=e,c=lae(t,n,i,a,o,s,u);l?setTimeout(()=>{this.onmessage({data:c})},l):this.onmessage({data:c})}onmessage(){}close(){}}const fae={port:new cae},dae=()=>new SharedWorker(new URL(""+new URL("HierarchicalLayout.worker-DFULhk2a.js",import.meta.url).href,import.meta.url),{type:"module",name:"HierarchicalLayout"}),hae=Object.freeze(Object.defineProperty({__proto__:null,coseBilkentLayoutFallbackWorker:qte,createCoseBilkentLayoutWorker:Gte,createHierarchicalLayoutWorker:dae,hierarchicalLayoutFallbackWorker:fae},Symbol.toStringTag,{value:"Module"}));/*! For license information please see base.mjs.LICENSE.txt */var vae={5:function(r,e,t){var n=this&&this.__extends||(function(){var m=function(x,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(O[T]=E[T])},m(x,S)};return function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=x}m(x,S),x.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var i=t(1018),a=t(8014),o=t(3413),s=t(7315),u=t(1342),l=t(9052),c=t(9155),f=t(9223),d=(function(m){function x(S){var O=m.call(this)||this;return O.isStopped=!1,S?(O.destination=S,a.isSubscription(S)&&S.add(O)):O.destination=e.EMPTY_OBSERVER,O}return n(x,m),x.create=function(S,O,E){return new y(S,O,E)},x.prototype.next=function(S){this.isStopped?_(l.nextNotification(S),this):this._next(S)},x.prototype.error=function(S){this.isStopped?_(l.errorNotification(S),this):(this.isStopped=!0,this._error(S))},x.prototype.complete=function(){this.isStopped?_(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},x.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,m.prototype.unsubscribe.call(this),this.destination=null)},x.prototype._next=function(S){this.destination.next(S)},x.prototype._error=function(S){try{this.destination.error(S)}finally{this.unsubscribe()}},x.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},x})(a.Subscription);e.Subscriber=d;var h=Function.prototype.bind;function p(m,x){return h.call(m,x)}var g=(function(){function m(x){this.partialObserver=x}return m.prototype.next=function(x){var S=this.partialObserver;if(S.next)try{S.next(x)}catch(O){b(O)}},m.prototype.error=function(x){var S=this.partialObserver;if(S.error)try{S.error(x)}catch(O){b(O)}else b(x)},m.prototype.complete=function(){var x=this.partialObserver;if(x.complete)try{x.complete()}catch(S){b(S)}},m})(),y=(function(m){function x(S,O,E){var T,P,I=m.call(this)||this;return i.isFunction(S)||!S?T={next:S??void 0,error:O??void 0,complete:E??void 0}:I&&o.config.useDeprecatedNextContext?((P=Object.create(S)).unsubscribe=function(){return I.unsubscribe()},T={next:S.next&&p(S.next,P),error:S.error&&p(S.error,P),complete:S.complete&&p(S.complete,P)}):T=S,I.destination=new g(T),I}return n(x,m),x})(d);function b(m){o.config.useDeprecatedSynchronousErrorHandling?f.captureError(m):s.reportUnhandledError(m)}function _(m,x){var S=o.config.onStoppedNotification;S&&c.timeoutProvider.setTimeout(function(){return S(m,x)})}e.SafeSubscriber=y,e.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(m){throw m},complete:u.noop}},45:function(r,e){var t=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var n=(function(){function a(o){this.position=0,this.length=o}return a.prototype.getUInt8=function(o){throw new Error("Not implemented")},a.prototype.getInt8=function(o){throw new Error("Not implemented")},a.prototype.getFloat64=function(o){throw new Error("Not implemented")},a.prototype.getVarInt=function(o){throw new Error("Not implemented")},a.prototype.putUInt8=function(o,s){throw new Error("Not implemented")},a.prototype.putInt8=function(o,s){throw new Error("Not implemented")},a.prototype.putFloat64=function(o,s){throw new Error("Not implemented")},a.prototype.getInt16=function(o){return this.getInt8(o)<<8|this.getUInt8(o+1)},a.prototype.getUInt16=function(o){return this.getUInt8(o)<<8|this.getUInt8(o+1)},a.prototype.getInt32=function(o){return this.getInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},a.prototype.getUInt32=function(o){return this.getUInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},a.prototype.getInt64=function(o){return this.getInt8(o)<<56|this.getUInt8(o+1)<<48|this.getUInt8(o+2)<<40|this.getUInt8(o+3)<<32|this.getUInt8(o+4)<<24|this.getUInt8(o+5)<<16|this.getUInt8(o+6)<<8|this.getUInt8(o+7)},a.prototype.getSlice=function(o,s){return new i(o,s,this)},a.prototype.putInt16=function(o,s){this.putInt8(o,s>>8),this.putUInt8(o+1,255&s)},a.prototype.putUInt16=function(o,s){this.putUInt8(o,s>>8&255),this.putUInt8(o+1,255&s)},a.prototype.putInt32=function(o,s){this.putInt8(o,s>>24),this.putUInt8(o+1,s>>16&255),this.putUInt8(o+2,s>>8&255),this.putUInt8(o+3,255&s)},a.prototype.putUInt32=function(o,s){this.putUInt8(o,s>>24&255),this.putUInt8(o+1,s>>16&255),this.putUInt8(o+2,s>>8&255),this.putUInt8(o+3,255&s)},a.prototype.putInt64=function(o,s){this.putInt8(o,s>>48),this.putUInt8(o+1,s>>42&255),this.putUInt8(o+2,s>>36&255),this.putUInt8(o+3,s>>30&255),this.putUInt8(o+4,s>>24&255),this.putUInt8(o+5,s>>16&255),this.putUInt8(o+6,s>>8&255),this.putUInt8(o+7,255&s)},a.prototype.putVarInt=function(o,s){for(var u=0;s>1;){var l=s%128;s>=128&&(l+=128),s/=128,this.putUInt8(o+u,l),u+=1}return u},a.prototype.putBytes=function(o,s){for(var u=0,l=s.remaining();u0},a.prototype.reset=function(){this.position=0},a.prototype.toString=function(){return this.constructor.name+"( position="+this.position+` ) - `+this.toHex()},a.prototype.toHex=function(){for(var o="",s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.getBrokenObjectReason=e.isBrokenObject=e.createBrokenObject=void 0;var t="__isBrokenObject__",n="__reason__";e.createBrokenObject=function(i,a){a===void 0&&(a={});var o=function(){throw i};return new Proxy(a,{get:function(s,u){return u===t||(u===n?i:void(u!=="toJSON"&&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})},e.isBrokenObject=function(i){return i!==null&&typeof i=="object"&&i[t]===!0},e.getBrokenObjectReason=function(i){return i[n]}},95:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var i=(function(a){function o(){var s=a!==null&&a.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return n(o,a),o.prototype._checkFinalizedStatuses=function(s){var u=this,l=u.hasError,c=u._hasValue,f=u._value,d=u.thrownError,h=u.isStopped,p=u._isComplete;l?s.error(d):(h||p)&&(c&&s.next(f),s.complete())},o.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},o.prototype.complete=function(){var s=this,u=s._hasValue,l=s._value;s._isComplete||(this._isComplete=!0,u&&a.prototype.next.call(this,l),a.prototype.complete.call(this))},o})(t(2483).Subject);e.AsyncSubject=i},137:r=>{r.exports=class{constructor(e,t,n,i){let a;if(typeof e=="object"){let o=e;e=o.k_p,t=o.k_i,n=o.k_d,i=o.dt,a=o.i_max}this.k_p=typeof e=="number"?e:1,this.k_i=t||0,this.k_d=n||0,this.dt=i||0,this.i_max=a||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 a=Date.now();t=this.lastTime===0?0:(a-this.lastTime)/1e3,this.lastTime=a}typeof t=="number"&&t!==0||(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 a=this.sumError>0?1:-1;this.sumError=a*this.i_max}let i=(n-this.lastError)/t;return this.lastError=n,this.k_p*n+this.k_i*this.sumError+this.k_d*i}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},182:function(r,e,t){var n=this&&this.__extends||(function(){var u=function(l,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(f[h]=d[h])},u(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}u(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualAction=e.VirtualTimeScheduler=void 0;var i=t(5267),a=t(8014),o=(function(u){function l(c,f){c===void 0&&(c=s),f===void 0&&(f=1/0);var d=u.call(this,c,function(){return d.frame})||this;return d.maxFrames=f,d.frame=0,d.index=-1,d}return n(l,u),l.prototype.flush=function(){for(var c,f,d=this.actions,h=this.maxFrames;(f=d[0])&&f.delay<=h&&(d.shift(),this.frame=f.delay,!(c=f.execute(f.state,f.delay))););if(c){for(;f=d.shift();)f.unsubscribe();throw c}},l.frameTimeFactor=10,l})(t(5648).AsyncScheduler);e.VirtualTimeScheduler=o;var s=(function(u){function l(c,f,d){d===void 0&&(d=c.index+=1);var h=u.call(this,c,f)||this;return h.scheduler=c,h.work=f,h.index=d,h.active=!0,h.index=c.index=d,h}return n(l,u),l.prototype.schedule=function(c,f){if(f===void 0&&(f=0),Number.isFinite(f)){if(!this.id)return u.prototype.schedule.call(this,c,f);this.active=!1;var d=new l(this.scheduler,this.work);return this.add(d),d.schedule(c,f)}return a.Subscription.EMPTY},l.prototype.requestAsyncId=function(c,f,d){d===void 0&&(d=0),this.delay=c.frame+d;var h=c.actions;return h.push(this),h.sort(l.sortActions),1},l.prototype.recycleAsyncId=function(c,f,d){},l.prototype._execute=function(c,f){if(this.active===!0)return u.prototype._execute.call(this,c,f)},l.sortActions=function(c,f){return c.delay===f.delay?c.index===f.index?0:c.index>f.index?1:-1:c.delay>f.delay?1:-1},l})(i.AsyncAction);e.VirtualAction=s},187:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var n=t(7286),i=t(3638);e.zipAll=function(a){return i.joinAllInternals(n.zip,a)}},206:function(r,e,t){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingTable=e.Rediscovery=void 0;var i=n(t(4151));e.Rediscovery=i.default;var a=n(t(9018));e.RoutingTable=a.default,e.default=i.default},245:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0,e.not=function(t,n){return function(i,a){return!t.call(n,i,a)}}},269:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var n=t(3865),i=t(1107),a=t(7843);e.startWith=function(){for(var o=[],s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.TELEMETRY_APIS=e.BOLT_PROTOCOL_V5_8=e.BOLT_PROTOCOL_V5_7=e.BOLT_PROTOCOL_V5_6=e.BOLT_PROTOCOL_V5_5=e.BOLT_PROTOCOL_V5_4=e.BOLT_PROTOCOL_V5_3=e.BOLT_PROTOCOL_V5_2=e.BOLT_PROTOCOL_V5_1=e.BOLT_PROTOCOL_V5_0=e.BOLT_PROTOCOL_V4_4=e.BOLT_PROTOCOL_V4_3=e.BOLT_PROTOCOL_V4_2=e.BOLT_PROTOCOL_V4_1=e.BOLT_PROTOCOL_V4_0=e.BOLT_PROTOCOL_V3=e.BOLT_PROTOCOL_V2=e.BOLT_PROTOCOL_V1=e.DEFAULT_POOL_MAX_SIZE=e.DEFAULT_POOL_ACQUISITION_TIMEOUT=e.DEFAULT_CONNECTION_TIMEOUT_MILLIS=e.ACCESS_MODE_WRITE=e.ACCESS_MODE_READ=e.FETCH_ALL=void 0,e.FETCH_ALL=-1,e.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,e.DEFAULT_POOL_MAX_SIZE=100,e.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,e.ACCESS_MODE_READ="READ",e.ACCESS_MODE_WRITE="WRITE",e.BOLT_PROTOCOL_V1=1,e.BOLT_PROTOCOL_V2=2,e.BOLT_PROTOCOL_V3=3,e.BOLT_PROTOCOL_V4_0=4,e.BOLT_PROTOCOL_V4_1=4.1,e.BOLT_PROTOCOL_V4_2=4.2,e.BOLT_PROTOCOL_V4_3=4.3,e.BOLT_PROTOCOL_V4_4=4.4,e.BOLT_PROTOCOL_V5_0=5,e.BOLT_PROTOCOL_V5_1=5.1,e.BOLT_PROTOCOL_V5_2=5.2,e.BOLT_PROTOCOL_V5_3=5.3,e.BOLT_PROTOCOL_V5_4=5.4,e.BOLT_PROTOCOL_V5_5=5.5,e.BOLT_PROTOCOL_V5_6=5.6,e.BOLT_PROTOCOL_V5_7=5.7,e.BOLT_PROTOCOL_V5_8=5.8,e.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3}},347:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fromEventPattern=void 0;var n=t(4662),i=t(1018),a=t(1251);e.fromEventPattern=function o(s,u,l){return l?o(s,u).pipe(a.mapOneOrManyArgs(l)):new n.Observable(function(c){var f=function(){for(var h=[],p=0;p0)&&!(d=p.next()).done;)g.push(d.value)}catch(y){h={error:y}}finally{try{d&&!d.done&&(f=p.return)&&f.call(p)}finally{if(h)throw h.error}}return g},i=this&&this.__spreadArray||function(l,c){for(var f=0,d=c.length,h=l.length;f0;)this._ensure(1),this._buffer.remaining()>h.remaining()?this._buffer.writeBytes(h):this._buffer.writeBytes(h.readSlice(this._buffer.remaining()));return this},f.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var d=this._buffer;this._buffer=null,this._ch.write(d.getSlice(0,d.position)),this._buffer=(0,o.alloc)(this._bufferSize),this._chunkOpen=!1}return this},f.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},f.prototype._ensure=function(d){var h=this._chunkOpen?d:d+2;this._buffer.remaining()=2?this._onHeader(f.readUInt16()):(this._partialChunkHeader=f.readUInt8()<<8,this.IN_HEADER)},c.prototype.IN_HEADER=function(f){return this._onHeader(65535&(this._partialChunkHeader|f.readUInt8()))},c.prototype.IN_CHUNK=function(f){return this._chunkSize<=f.remaining()?(this._currentMessage.push(f.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=f.remaining(),this._currentMessage.push(f.readSlice(f.remaining())),this.IN_CHUNK)},c.prototype.CLOSED=function(f){},c.prototype._onHeader=function(f){if(f===0){var d=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:d=this._currentMessage[0];break;default:d=new s.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(d),this.AWAITING_CHUNK}return this._chunkSize=f,this.IN_CHUNK},c.prototype.write=function(f){for(;f.hasRemaining();)this._state=this._state(f)},c})();e.Dechunker=l},378:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var n=t(7843),i=t(3111);e.defaultIfEmpty=function(a){return n.operate(function(o,s){var u=!1;o.subscribe(i.createOperatorSubscriber(s,function(l){u=!0,s.next(l)},function(){u||s.next(a),s.complete()}))})}},397:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertNotificationFilterIsEmpty=e.assertImpersonatedUserIsEmpty=e.assertTxConfigIsEmpty=e.assertDatabaseIsEmpty=void 0;var n=t(9305);t(9014),e.assertTxConfigIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i&&!i.isEmpty()){var s=(0,n.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 a(s.message),o.onError(s),s}},e.assertDatabaseIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i){var s=(0,n.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 a(s.message),o.onError(s),s}},e.assertImpersonatedUserIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i){var s=(0,n.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(i,"."));throw a(s.message),o.onError(s),s}},e.assertNotificationFilterIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i!==void 0){var s=(0,n.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(n.json.stringify(i),"."));throw a(s.message),o.onError(s),s}}},407:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(c){for(var f,d=1,h=arguments.length;d0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y};Object.defineProperty(e,"__esModule",{value:!0}),e.Url=e.formatIPv6Address=e.formatIPv4Address=e.defaultPortForScheme=e.parseDatabaseUrl=void 0;var a=t(6587),o=function(c,f,d,h,p){this.scheme=c,this.host=f,this.port=d,this.hostAndPort=h,this.query=p};function s(c,f,d){if((c=(c??"").trim())==="")throw new Error("Illegal empty ".concat(f," in URL query '").concat(d,"'"));return c}function u(c){var f=c.charAt(0)==="[",d=c.charAt(c.length-1)==="]";if(f||d){if(f&&d)return c;throw new Error("Illegal IPv6 address ".concat(c))}return"[".concat(c,"]")}function l(c){return c==="http"?7474:c==="https"?7473:7687}e.Url=o,e.parseDatabaseUrl=function(c){var f;(0,a.assertString)(c,"URL");var d,h=(function(S){return(S=S.trim()).includes("://")?{schemeMissing:!1,url:S}:{schemeMissing:!0,url:"none://".concat(S)}})(c),p=(function(S){function O(P,I){var k=P.indexOf(I);return k>=0?[P.substring(0,k),P[k],P.substring(k+1)]:[P,"",""]}var E,T={};return(E=O(S,":"))[1]===":"&&(T.scheme=decodeURIComponent(E[0]),S=E[2]),(E=O(S,"#"))[1]==="#"&&(T.fragment=decodeURIComponent(E[2]),S=E[0]),(E=O(S,"?"))[1]==="?"&&(T.query=E[2],S=E[0]),S.startsWith("//")?(E=O(S.substr(2),"/"),(T=n(n({},T),(function(P){var I,k,L,B,j={};(k=P,L="@",B=k.lastIndexOf(L),I=B>=0?[k.substring(0,B),k[B],k.substring(B+1)]:["","",k])[1]==="@"&&(j.userInfo=decodeURIComponent(I[0]),P=I[2]);var z=i((function(W,$,J){var X=O(W,$),Z=O(X[2],J);return[Z[0],Z[2]]})(P,"[","]"),2),H=z[0],q=z[1];return H!==""?(j.host=H,I=O(q,":")):(I=O(P,":"),j.host=I[0]),I[1]===":"&&(j.port=I[2]),j})(E[0]))).path=E[1]+E[2]):T.path=S,T})(h.url),g=h.schemeMissing?null:(function(S){return S!=null?((S=S.trim()).charAt(S.length-1)===":"&&(S=S.substring(0,S.length-1)),S):null})(p.scheme),y=(function(S){if(S==null)throw new Error("Unable to extract host from null or undefined URL");return S.trim()})(p.host),b=(function(S){if(S===""||S==null)throw new Error("Illegal host ".concat(S));return S.includes(":")?u(S):S})(y),_=(function(S,O){var E=typeof S=="string"?parseInt(S,10):S;return E==null||isNaN(E)?l(O):E})(p.port,g),m="".concat(b,":").concat(_),x=(function(S,O){var E=S!=null?(function(P){return((P=(P??"").trim())==null?void 0:P.charAt(0))==="?"&&(P=P.substring(1,P.length)),P})(S):null,T={};return E!=null&&E.split("&").forEach(function(P){var I=P.split("=");if(I.length!==2)throw new Error("Invalid parameters: '".concat(I.toString(),"' in URL '").concat(O,"'."));var k=s(I[0],"key",O),L=s(I[1],"value",O);if(T[k]!==void 0)throw new Error("Duplicated query parameters with key '".concat(k,"' in URL '").concat(O,"'"));T[k]=L}),T})((f=p.query)!==null&&f!==void 0?f:typeof(d=p.resourceName)!="string"?null:i(d.split("?"),2)[1],c);return new o(g,y,_,m,x)},e.formatIPv4Address=function(c,f){return"".concat(c,":").concat(f)},e.formatIPv6Address=function(c,f){var d=u(c);return"".concat(d,":").concat(f)},e.defaultPortForScheme=l},481:(r,e,t)=>{r.exports=t(137)},489:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var n=t(7961),i=t(7843),a=t(3111);e.timeInterval=function(s){return s===void 0&&(s=n.asyncScheduler),i.operate(function(u,l){var c=s.now();u.subscribe(a.createOperatorSubscriber(l,function(f){var d=s.now(),h=d-c;c=d,l.next(new o(f,h))}))})};var o=function(s,u){this.value=s,this.interval=u};e.TimeInterval=o},490:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var n=t(7843),i=t(3111),a=t(1342);e.ignoreElements=function(){return n.operate(function(o,s){o.subscribe(i.createOperatorSubscriber(s,a.noop))})}},582:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var n=t(7843),i=t(3111),a=t(9445);e.sequenceEqual=function(o,s){return s===void 0&&(s=function(u,l){return u===l}),n.operate(function(u,l){var c={buffer:[],complete:!1},f={buffer:[],complete:!1},d=function(p){l.next(p),l.complete()},h=function(p,g){var y=i.createOperatorSubscriber(l,function(b){var _=g.buffer,m=g.complete;_.length===0?m?d(!1):p.buffer.push(b):!s(b,_.shift())&&d(!1)},function(){p.complete=!0;var b=g.complete,_=g.buffer;b&&d(_.length===0),y==null||y.unsubscribe()});return y};u.subscribe(h(c,f)),a.innerFrom(o).subscribe(h(f,c))})}},614:function(r,e){var t=this&&this.__awaiter||function(i,a,o,s){return new(o||(o=Promise))(function(u,l){function c(h){try{d(s.next(h))}catch(p){l(p)}}function f(h){try{d(s.throw(h))}catch(p){l(p)}}function d(h){var p;h.done?u(h.value):(p=h.value,p instanceof o?p:new o(function(g){g(p)})).then(c,f)}d((s=s.apply(i,a||[])).next())})},n=this&&this.__generator||function(i,a){var o,s,u,l,c={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(d){return function(h){return(function(p){if(o)throw new TypeError("Generator is already executing.");for(;l&&(l=0,p[0]&&(c=0)),c;)try{if(o=1,s&&(u=2&p[0]?s.return:p[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,p[1])).done)return u;switch(s=0,u&&(p=[2&p[0],u.value]),p[0]){case 0:case 1:u=p;break;case 4:return c.label++,{value:p[1],done:!1};case 5:c.label++,s=p[1],p=[0];continue;case 7:p=c.ops.pop(),c.trys.pop();continue;default:if(!((u=(u=c.trys).length>0&&u[u.length-1])||p[0]!==6&&p[0]!==2)){c=0;continue}if(p[0]===3&&(!u||p[1]>u[0]&&p[1]{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(i){this._offset=i||0}return n.prototype.next=function(i){if(i===0)return-1;var a=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),a%i},n})();e.default=t},754:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(f,d,h,p){p===void 0&&(p=h);var g=Object.getOwnPropertyDescriptor(d,h);g&&!("get"in g?!d.__esModule:g.writable||g.configurable)||(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(f,p,g)}:function(f,d,h,p){p===void 0&&(p=h),f[p]=d[h]}),i=this&&this.__setModuleDefault||(Object.create?function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}:function(f,d){f.default=d}),a=this&&this.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var h in f)h!=="default"&&Object.prototype.hasOwnProperty.call(f,h)&&n(d,f,h);return i(d,f),d};Object.defineProperty(e,"__esModule",{value:!0}),e.TxConfig=void 0;var o=a(t(6587)),s=t(9691),u=t(3371),l=(function(){function f(d,h){(function(p){p!=null&&o.assertObject(p,"Transaction config")})(d),this.timeout=(function(p,g){if(o.isObject(p)&&p.timeout!=null){o.assertNumberOrInteger(p.timeout,"Transaction timeout"),(function(b){return typeof b.timeout=="number"&&!Number.isInteger(b.timeout)})(p)&&(g==null?void 0:g.isInfoEnabled())===!0&&(g==null||g.info("Transaction timeout expected to be an integer, got: ".concat(p.timeout,". The value will be rounded up.")));var y=(0,u.int)(p.timeout,{ceilFloat:!0});if(y.isNegative())throw(0,s.newError)("Transaction timeout should not be negative");return y}return null})(d,h),this.metadata=(function(p){if(o.isObject(p)&&p.metadata!=null){var g=p.metadata;if(o.assertObject(g,"config.metadata"),Object.keys(g).length!==0)return g}return null})(d)}return f.empty=function(){return c},f.prototype.isEmpty=function(){return Object.values(this).every(function(d){return d==null})},f})();e.TxConfig=l;var c=new l({})},766:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var n=t(2483),i=t(9247),a=t(1483);e.publish=function(o){return o?function(s){return a.connect(o)(s)}:function(s){return i.multicast(new n.Subject)(s)}}},783:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var n=t(7843),i=t(3111);e.filter=function(a,o){return n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){return a.call(o,c,l++)&&u.next(c)}))})}},827:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapScheduler=void 0;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.flush=function(s){this._active=!0;var u=this._scheduled;this._scheduled=void 0;var l,c=this.actions;s=s||c.shift();do if(l=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===u&&c.shift());if(this._active=!1,l){for(;(s=c[0])&&s.id===u&&c.shift();)s.unsubscribe();throw l}},o})(t(5648).AsyncScheduler);e.AsapScheduler=i},844:function(r,e,t){var n=this&&this.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[_]=b[_])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function y(){this.constructor=p}h(p,g),p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}})(),i=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(1711)),o=t(397),s=i(t(7449)),u=i(t(3321)),l=i(t(7021)),c=t(9014),f=t(9305).internal.constants.BOLT_PROTOCOL_V5_0,d=(function(h){function p(){return h!==null&&h.apply(this,arguments)||this}return n(p,h),Object.defineProperty(p.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"transformer",{get:function(){var g=this;return this._transformer===void 0&&(this._transformer=new u.default(Object.values(s.default).map(function(y){return y(g._config,g._log)}))),this._transformer},enumerable:!1,configurable:!0}),p.prototype.initialize=function(g){var y=this,b=g===void 0?{}:g,_=b.userAgent,m=(b.boltAgent,b.authToken),x=b.notificationFilter,S=b.onError,O=b.onComplete,E=new c.LoginObserver({onError:function(T){return y._onLoginError(T,S)},onCompleted:function(T){return y._onLoginCompleted(T,m,O)}});return(0,o.assertNotificationFilterIsEmpty)(x,this._onProtocolError,E),this.write(l.default.hello(_,m,this._serversideRouting),E,!0),E},p})(a.default);e.default=d},846:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var n=t(8616),i=t(7843),a=t(3111);e.take=function(o){return o<=0?function(){return n.EMPTY}:i.operate(function(s,u){var l=0;s.subscribe(a.createOperatorSubscriber(u,function(c){++l<=o&&(u.next(c),o<=l&&u.complete())}))})}},854:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var n=t(4662),i=t(7110);e.scheduleAsyncIterable=function(a,o){if(!a)throw new Error("Iterable cannot be null");return new n.Observable(function(s){i.executeSchedule(s,o,function(){var u=a[Symbol.asyncIterator]();i.executeSchedule(s,o,function(){u.next().then(function(l){l.done?s.complete():s.next(l.value)})},0,!0)})})}},914:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var n=t(7961),i=t(8766),a=t(4092);e.delay=function(o,s){s===void 0&&(s=n.asyncScheduler);var u=a.timer(o,s);return i.delayWhen(function(){return u})}},934:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(g){for(var y,b=1,_=arguments.length;b<_;b++)for(var m in y=arguments[b])Object.prototype.hasOwnProperty.call(y,m)&&(g[m]=y[m]);return g},i.apply(this,arguments)},a=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0});var o=a(t(6345)),s=a(t(3019)),u=a(t(3321)),l=a(t(7021)),c=t(9014),f=t(9305).internal.constants,d=f.BOLT_PROTOCOL_V5_2,h=f.FETCH_ALL,p=(function(g){function y(){return g!==null&&g.apply(this,arguments)||this}return n(y,g),Object.defineProperty(y.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"transformer",{get:function(){var b=this;return this._transformer===void 0&&(this._transformer=new u.default(Object.values(s.default).map(function(_){return _(b._config,b._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),y.prototype.initialize=function(b){var _=this,m=b===void 0?{}:b,x=m.userAgent,S=(m.boltAgent,m.authToken),O=m.notificationFilter,E=m.onError,T=m.onComplete,P={},I=new c.LoginObserver({onError:function(k){return _._onLoginError(k,E)},onCompleted:function(k){return P.metadata=k,_._onLoginCompleted(k)}});return this.write(l.default.hello5x2(x,O,this._serversideRouting),I,!1),this.logon({authToken:S,onComplete:function(k){return T(i(i({},k),P.metadata))},onError:E,flush:!0})},y.prototype.beginTransaction=function(b){var _=b===void 0?{}:b,m=_.bookmarks,x=_.txConfig,S=_.database,O=_.mode,E=_.impersonatedUser,T=_.notificationFilter,P=_.beforeError,I=_.afterError,k=_.beforeComplete,L=_.afterComplete,B=new c.ResultStreamObserver({server:this._server,beforeError:P,afterError:I,beforeComplete:k,afterComplete:L});return B.prepareToHandleSingleResponse(),this.write(l.default.begin({bookmarks:m,txConfig:x,database:S,mode:O,impersonatedUser:E,notificationFilter:T}),B,!0),B},y.prototype.run=function(b,_,m){var x=m===void 0?{}:m,S=x.bookmarks,O=x.txConfig,E=x.database,T=x.mode,P=x.impersonatedUser,I=x.notificationFilter,k=x.beforeKeys,L=x.afterKeys,B=x.beforeError,j=x.afterError,z=x.beforeComplete,H=x.afterComplete,q=x.flush,W=q===void 0||q,$=x.reactive,J=$!==void 0&&$,X=x.fetchSize,Z=X===void 0?h:X,ue=x.highRecordWatermark,re=ue===void 0?Number.MAX_VALUE:ue,ne=x.lowRecordWatermark,le=ne===void 0?Number.MAX_VALUE:ne,ce=new c.ResultStreamObserver({server:this._server,reactive:J,fetchSize:Z,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:k,afterKeys:L,beforeError:B,afterError:j,beforeComplete:z,afterComplete:H,highRecordWatermark:re,lowRecordWatermark:le}),pe=J;return this.write(l.default.runWithMetadata(b,_,{bookmarks:S,txConfig:O,database:E,mode:T,impersonatedUser:P,notificationFilter:I}),ce,pe&&W),J||this.write(l.default.pull({n:Z}),ce,W),ce},y})(o.default);e.default=p},983:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var n=t(5471),i=t(9445),a=t(7843),o=t(1983),s=t(1018);e.mergeMap=function u(l,c,f){return f===void 0&&(f=1/0),s.isFunction(c)?u(function(d,h){return n.map(function(p,g){return c(d,p,h,g)})(i.innerFrom(l(d,h)))},f):(typeof c=="number"&&(f=c),a.operate(function(d,h){return o.mergeInternals(d,h,l,f)}))}},1004:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var n=t(1107),i=t(4917);e.of=function(){for(var a=[],o=0;o{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return typeof t=="function"}},1038:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var n=t(9139);e.count=function(i){return n.reduce(function(a,o,s){return!i||i(o,s)?a+1:a},0)}},1048:(r,e,t)=>{const n=t(7991),i=t(9318),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(Y){return+Y!=Y&&(Y=0),u.alloc(+Y)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function s(Y){if(Y>o)throw new RangeError('The value "'+Y+'" is invalid for option "size"');const Q=new Uint8Array(Y);return Object.setPrototypeOf(Q,u.prototype),Q}function u(Y,Q,ie){if(typeof Y=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(Y)}return l(Y,Q,ie)}function l(Y,Q,ie){if(typeof Y=="string")return(function(Me,Ie){if(typeof Ie=="string"&&Ie!==""||(Ie="utf8"),!u.isEncoding(Ie))throw new TypeError("Unknown encoding: "+Ie);const Ye=0|g(Me,Ie);let ot=s(Ye);const mt=ot.write(Me,Ie);return mt!==Ye&&(ot=ot.slice(0,mt)),ot})(Y,Q);if(ArrayBuffer.isView(Y))return(function(Me){if(Oe(Me,Uint8Array)){const Ie=new Uint8Array(Me);return h(Ie.buffer,Ie.byteOffset,Ie.byteLength)}return d(Me)})(Y);if(Y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y);if(Oe(Y,ArrayBuffer)||Y&&Oe(Y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Oe(Y,SharedArrayBuffer)||Y&&Oe(Y.buffer,SharedArrayBuffer)))return h(Y,Q,ie);if(typeof Y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const we=Y.valueOf&&Y.valueOf();if(we!=null&&we!==Y)return u.from(we,Q,ie);const Ee=(function(Me){if(u.isBuffer(Me)){const Ie=0|p(Me.length),Ye=s(Ie);return Ye.length===0||Me.copy(Ye,0,0,Ie),Ye}return Me.length!==void 0?typeof Me.length!="number"||ke(Me.length)?s(0):d(Me):Me.type==="Buffer"&&Array.isArray(Me.data)?d(Me.data):void 0})(Y);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Y[Symbol.toPrimitive]=="function")return u.from(Y[Symbol.toPrimitive]("string"),Q,ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y)}function c(Y){if(typeof Y!="number")throw new TypeError('"size" argument must be of type number');if(Y<0)throw new RangeError('The value "'+Y+'" is invalid for option "size"')}function f(Y){return c(Y),s(Y<0?0:0|p(Y))}function d(Y){const Q=Y.length<0?0:0|p(Y.length),ie=s(Q);for(let we=0;we=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|Y}function g(Y,Q){if(u.isBuffer(Y))return Y.length;if(ArrayBuffer.isView(Y)||Oe(Y,ArrayBuffer))return Y.byteLength;if(typeof Y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Y);const ie=Y.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&ie===0)return 0;let Ee=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return ie;case"utf8":case"utf-8":return se(Y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ie;case"hex":return ie>>>1;case"base64":return de(Y).length;default:if(Ee)return we?-1:se(Y).length;Q=(""+Q).toLowerCase(),Ee=!0}}function y(Y,Q,ie){let we=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((ie===void 0||ie>this.length)&&(ie=this.length),ie<=0)||(ie>>>=0)<=(Q>>>=0))return"";for(Y||(Y="utf8");;)switch(Y){case"hex":return j(this,Q,ie);case"utf8":case"utf-8":return I(this,Q,ie);case"ascii":return L(this,Q,ie);case"latin1":case"binary":return B(this,Q,ie);case"base64":return P(this,Q,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,Q,ie);default:if(we)throw new TypeError("Unknown encoding: "+Y);Y=(Y+"").toLowerCase(),we=!0}}function b(Y,Q,ie){const we=Y[Q];Y[Q]=Y[ie],Y[ie]=we}function _(Y,Q,ie,we,Ee){if(Y.length===0)return-1;if(typeof ie=="string"?(we=ie,ie=0):ie>2147483647?ie=2147483647:ie<-2147483648&&(ie=-2147483648),ke(ie=+ie)&&(ie=Ee?0:Y.length-1),ie<0&&(ie=Y.length+ie),ie>=Y.length){if(Ee)return-1;ie=Y.length-1}else if(ie<0){if(!Ee)return-1;ie=0}if(typeof Q=="string"&&(Q=u.from(Q,we)),u.isBuffer(Q))return Q.length===0?-1:m(Y,Q,ie,we,Ee);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(Y,Q,ie):Uint8Array.prototype.lastIndexOf.call(Y,Q,ie):m(Y,[Q],ie,we,Ee);throw new TypeError("val must be string, number or Buffer")}function m(Y,Q,ie,we,Ee){let Me,Ie=1,Ye=Y.length,ot=Q.length;if(we!==void 0&&((we=String(we).toLowerCase())==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(Y.length<2||Q.length<2)return-1;Ie=2,Ye/=2,ot/=2,ie/=2}function mt(wt,Mt){return Ie===1?wt[Mt]:wt.readUInt16BE(Mt*Ie)}if(Ee){let wt=-1;for(Me=ie;MeYe&&(ie=Ye-ot),Me=ie;Me>=0;Me--){let wt=!0;for(let Mt=0;MtEe&&(we=Ee):we=Ee;const Me=Q.length;let Ie;for(we>Me/2&&(we=Me/2),Ie=0;Ie>8,ot=Ie%256,mt.push(ot),mt.push(Ye);return mt})(Q,Y.length-ie),Y,ie,we)}function P(Y,Q,ie){return Q===0&&ie===Y.length?n.fromByteArray(Y):n.fromByteArray(Y.slice(Q,ie))}function I(Y,Q,ie){ie=Math.min(Y.length,ie);const we=[];let Ee=Q;for(;Ee239?4:Me>223?3:Me>191?2:1;if(Ee+Ye<=ie){let ot,mt,wt,Mt;switch(Ye){case 1:Me<128&&(Ie=Me);break;case 2:ot=Y[Ee+1],(192&ot)==128&&(Mt=(31&Me)<<6|63&ot,Mt>127&&(Ie=Mt));break;case 3:ot=Y[Ee+1],mt=Y[Ee+2],(192&ot)==128&&(192&mt)==128&&(Mt=(15&Me)<<12|(63&ot)<<6|63&mt,Mt>2047&&(Mt<55296||Mt>57343)&&(Ie=Mt));break;case 4:ot=Y[Ee+1],mt=Y[Ee+2],wt=Y[Ee+3],(192&ot)==128&&(192&mt)==128&&(192&wt)==128&&(Mt=(15&Me)<<18|(63&ot)<<12|(63&mt)<<6|63&wt,Mt>65535&&Mt<1114112&&(Ie=Mt))}}Ie===null?(Ie=65533,Ye=1):Ie>65535&&(Ie-=65536,we.push(Ie>>>10&1023|55296),Ie=56320|1023&Ie),we.push(Ie),Ee+=Ye}return(function(Me){const Ie=Me.length;if(Ie<=k)return String.fromCharCode.apply(String,Me);let Ye="",ot=0;for(;ot"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(Y,Q,ie){return l(Y,Q,ie)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(Y,Q,ie){return(function(we,Ee,Me){return c(we),we<=0?s(we):Ee!==void 0?typeof Me=="string"?s(we).fill(Ee,Me):s(we).fill(Ee):s(we)})(Y,Q,ie)},u.allocUnsafe=function(Y){return f(Y)},u.allocUnsafeSlow=function(Y){return f(Y)},u.isBuffer=function(Y){return Y!=null&&Y._isBuffer===!0&&Y!==u.prototype},u.compare=function(Y,Q){if(Oe(Y,Uint8Array)&&(Y=u.from(Y,Y.offset,Y.byteLength)),Oe(Q,Uint8Array)&&(Q=u.from(Q,Q.offset,Q.byteLength)),!u.isBuffer(Y)||!u.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Y===Q)return 0;let ie=Y.length,we=Q.length;for(let Ee=0,Me=Math.min(ie,we);Eewe.length?(u.isBuffer(Me)||(Me=u.from(Me)),Me.copy(we,Ee)):Uint8Array.prototype.set.call(we,Me,Ee);else{if(!u.isBuffer(Me))throw new TypeError('"list" argument must be an Array of Buffers');Me.copy(we,Ee)}Ee+=Me.length}return we},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const Y=this.length;if(Y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Q=0;QQ&&(Y+=" ... "),""},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(Y,Q,ie,we,Ee){if(Oe(Y,Uint8Array)&&(Y=u.from(Y,Y.offset,Y.byteLength)),!u.isBuffer(Y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Y);if(Q===void 0&&(Q=0),ie===void 0&&(ie=Y?Y.length:0),we===void 0&&(we=0),Ee===void 0&&(Ee=this.length),Q<0||ie>Y.length||we<0||Ee>this.length)throw new RangeError("out of range index");if(we>=Ee&&Q>=ie)return 0;if(we>=Ee)return-1;if(Q>=ie)return 1;if(this===Y)return 0;let Me=(Ee>>>=0)-(we>>>=0),Ie=(ie>>>=0)-(Q>>>=0);const Ye=Math.min(Me,Ie),ot=this.slice(we,Ee),mt=Y.slice(Q,ie);for(let wt=0;wt>>=0,isFinite(ie)?(ie>>>=0,we===void 0&&(we="utf8")):(we=ie,ie=void 0)}const Ee=this.length-Q;if((ie===void 0||ie>Ee)&&(ie=Ee),Y.length>0&&(ie<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let Me=!1;for(;;)switch(we){case"hex":return x(this,Y,Q,ie);case"utf8":case"utf-8":return S(this,Y,Q,ie);case"ascii":case"latin1":case"binary":return O(this,Y,Q,ie);case"base64":return E(this,Y,Q,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,Y,Q,ie);default:if(Me)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Me=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function L(Y,Q,ie){let we="";ie=Math.min(Y.length,ie);for(let Ee=Q;Eewe)&&(ie=we);let Ee="";for(let Me=Q;Meie)throw new RangeError("Trying to access beyond buffer length")}function q(Y,Q,ie,we,Ee,Me){if(!u.isBuffer(Y))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>Ee||QY.length)throw new RangeError("Index out of range")}function W(Y,Q,ie,we,Ee){le(Q,we,Ee,Y,ie,7);let Me=Number(Q&BigInt(4294967295));Y[ie++]=Me,Me>>=8,Y[ie++]=Me,Me>>=8,Y[ie++]=Me,Me>>=8,Y[ie++]=Me;let Ie=Number(Q>>BigInt(32)&BigInt(4294967295));return Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,ie}function $(Y,Q,ie,we,Ee){le(Q,we,Ee,Y,ie,7);let Me=Number(Q&BigInt(4294967295));Y[ie+7]=Me,Me>>=8,Y[ie+6]=Me,Me>>=8,Y[ie+5]=Me,Me>>=8,Y[ie+4]=Me;let Ie=Number(Q>>BigInt(32)&BigInt(4294967295));return Y[ie+3]=Ie,Ie>>=8,Y[ie+2]=Ie,Ie>>=8,Y[ie+1]=Ie,Ie>>=8,Y[ie]=Ie,ie+8}function J(Y,Q,ie,we,Ee,Me){if(ie+we>Y.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("Index out of range")}function X(Y,Q,ie,we,Ee){return Q=+Q,ie>>>=0,Ee||J(Y,0,ie,4),i.write(Y,Q,ie,we,23,4),ie+4}function Z(Y,Q,ie,we,Ee){return Q=+Q,ie>>>=0,Ee||J(Y,0,ie,8),i.write(Y,Q,ie,we,52,8),ie+8}u.prototype.slice=function(Y,Q){const ie=this.length;(Y=~~Y)<0?(Y+=ie)<0&&(Y=0):Y>ie&&(Y=ie),(Q=Q===void 0?ie:~~Q)<0?(Q+=ie)<0&&(Q=0):Q>ie&&(Q=ie),Q>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y],Ee=1,Me=0;for(;++Me>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y+--Q],Ee=1;for(;Q>0&&(Ee*=256);)we+=this[Y+--Q]*Ee;return we},u.prototype.readUint8=u.prototype.readUInt8=function(Y,Q){return Y>>>=0,Q||H(Y,1,this.length),this[Y]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(Y,Q){return Y>>>=0,Q||H(Y,2,this.length),this[Y]|this[Y+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(Y,Q){return Y>>>=0,Q||H(Y,2,this.length),this[Y]<<8|this[Y+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+16777216*this[Y+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),16777216*this[Y]+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},u.prototype.readBigUInt64LE=Ne(function(Y){ce(Y>>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=Q+256*this[++Y]+65536*this[++Y]+this[++Y]*2**24,Ee=this[++Y]+256*this[++Y]+65536*this[++Y]+ie*2**24;return BigInt(we)+(BigInt(Ee)<>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=Q*2**24+65536*this[++Y]+256*this[++Y]+this[++Y],Ee=this[++Y]*2**24+65536*this[++Y]+256*this[++Y]+ie;return(BigInt(we)<>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y],Ee=1,Me=0;for(;++Me=Ee&&(we-=Math.pow(2,8*Q)),we},u.prototype.readIntBE=function(Y,Q,ie){Y>>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=Q,Ee=1,Me=this[Y+--we];for(;we>0&&(Ee*=256);)Me+=this[Y+--we]*Ee;return Ee*=128,Me>=Ee&&(Me-=Math.pow(2,8*Q)),Me},u.prototype.readInt8=function(Y,Q){return Y>>>=0,Q||H(Y,1,this.length),128&this[Y]?-1*(255-this[Y]+1):this[Y]},u.prototype.readInt16LE=function(Y,Q){Y>>>=0,Q||H(Y,2,this.length);const ie=this[Y]|this[Y+1]<<8;return 32768&ie?4294901760|ie:ie},u.prototype.readInt16BE=function(Y,Q){Y>>>=0,Q||H(Y,2,this.length);const ie=this[Y+1]|this[Y]<<8;return 32768&ie?4294901760|ie:ie},u.prototype.readInt32LE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},u.prototype.readInt32BE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},u.prototype.readBigInt64LE=Ne(function(Y){ce(Y>>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=this[Y+4]+256*this[Y+5]+65536*this[Y+6]+(ie<<24);return(BigInt(we)<>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=(Q<<24)+65536*this[++Y]+256*this[++Y]+this[++Y];return(BigInt(we)<>>=0,Q||H(Y,4,this.length),i.read(this,Y,!0,23,4)},u.prototype.readFloatBE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),i.read(this,Y,!1,23,4)},u.prototype.readDoubleLE=function(Y,Q){return Y>>>=0,Q||H(Y,8,this.length),i.read(this,Y,!0,52,8)},u.prototype.readDoubleBE=function(Y,Q){return Y>>>=0,Q||H(Y,8,this.length),i.read(this,Y,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(Y,Q,ie,we){Y=+Y,Q>>>=0,ie>>>=0,we||q(this,Y,Q,ie,Math.pow(2,8*ie)-1,0);let Ee=1,Me=0;for(this[Q]=255&Y;++Me>>=0,ie>>>=0,we||q(this,Y,Q,ie,Math.pow(2,8*ie)-1,0);let Ee=ie-1,Me=1;for(this[Q+Ee]=255&Y;--Ee>=0&&(Me*=256);)this[Q+Ee]=Y/Me&255;return Q+ie},u.prototype.writeUint8=u.prototype.writeUInt8=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,1,255,0),this[Q]=255&Y,Q+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,65535,0),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,65535,0),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,4294967295,0),this[Q+3]=Y>>>24,this[Q+2]=Y>>>16,this[Q+1]=Y>>>8,this[Q]=255&Y,Q+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,4294967295,0),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},u.prototype.writeBigUInt64LE=Ne(function(Y,Q=0){return W(this,Y,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Ne(function(Y,Q=0){return $(this,Y,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(Y,Q,ie,we){if(Y=+Y,Q>>>=0,!we){const Ye=Math.pow(2,8*ie-1);q(this,Y,Q,ie,Ye-1,-Ye)}let Ee=0,Me=1,Ie=0;for(this[Q]=255&Y;++Ee>>=0,!we){const Ye=Math.pow(2,8*ie-1);q(this,Y,Q,ie,Ye-1,-Ye)}let Ee=ie-1,Me=1,Ie=0;for(this[Q+Ee]=255&Y;--Ee>=0&&(Me*=256);)Y<0&&Ie===0&&this[Q+Ee+1]!==0&&(Ie=1),this[Q+Ee]=(Y/Me|0)-Ie&255;return Q+ie},u.prototype.writeInt8=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,1,127,-128),Y<0&&(Y=255+Y+1),this[Q]=255&Y,Q+1},u.prototype.writeInt16LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,32767,-32768),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},u.prototype.writeInt16BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,32767,-32768),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},u.prototype.writeInt32LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,2147483647,-2147483648),this[Q]=255&Y,this[Q+1]=Y>>>8,this[Q+2]=Y>>>16,this[Q+3]=Y>>>24,Q+4},u.prototype.writeInt32BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},u.prototype.writeBigInt64LE=Ne(function(Y,Q=0){return W(this,Y,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Ne(function(Y,Q=0){return $(this,Y,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(Y,Q,ie){return X(this,Y,Q,!0,ie)},u.prototype.writeFloatBE=function(Y,Q,ie){return X(this,Y,Q,!1,ie)},u.prototype.writeDoubleLE=function(Y,Q,ie){return Z(this,Y,Q,!0,ie)},u.prototype.writeDoubleBE=function(Y,Q,ie){return Z(this,Y,Q,!1,ie)},u.prototype.copy=function(Y,Q,ie,we){if(!u.isBuffer(Y))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),we||we===0||(we=this.length),Q>=Y.length&&(Q=Y.length),Q||(Q=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),Y.length-Q>>=0,ie=ie===void 0?this.length:ie>>>0,Y||(Y=0),typeof Y=="number")for(Ee=Q;Ee=we+4;ie-=3)Q=`_${Y.slice(ie-3,ie)}${Q}`;return`${Y.slice(0,ie)}${Q}`}function le(Y,Q,ie,we,Ee,Me){if(Y>ie||Y= 0${Ie} and < 2${Ie} ** ${8*(Me+1)}${Ie}`:`>= -(2${Ie} ** ${8*(Me+1)-1}${Ie}) and < 2 ** ${8*(Me+1)-1}${Ie}`,new ue.ERR_OUT_OF_RANGE("value",Ye,Y)}(function(Ie,Ye,ot){ce(Ye,"offset"),Ie[Ye]!==void 0&&Ie[Ye+ot]!==void 0||pe(Ye,Ie.length-(ot+1))})(we,Ee,Me)}function ce(Y,Q){if(typeof Y!="number")throw new ue.ERR_INVALID_ARG_TYPE(Q,"number",Y)}function pe(Y,Q,ie){throw Math.floor(Y)!==Y?(ce(Y,ie),new ue.ERR_OUT_OF_RANGE("offset","an integer",Y)):Q<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Q}`,Y)}re("ERR_BUFFER_OUT_OF_BOUNDS",function(Y){return Y?`${Y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(Y,Q){return`The "${Y}" argument must be of type number. Received type ${typeof Q}`},TypeError),re("ERR_OUT_OF_RANGE",function(Y,Q,ie){let we=`The value of "${Y}" is out of range.`,Ee=ie;return Number.isInteger(ie)&&Math.abs(ie)>2**32?Ee=ne(String(ie)):typeof ie=="bigint"&&(Ee=String(ie),(ie>BigInt(2)**BigInt(32)||ie<-(BigInt(2)**BigInt(32)))&&(Ee=ne(Ee)),Ee+="n"),we+=` It must be ${Q}. Received ${Ee}`,we},RangeError);const fe=/[^+/0-9A-Za-z-_]/g;function se(Y,Q){let ie;Q=Q||1/0;const we=Y.length;let Ee=null;const Me=[];for(let Ie=0;Ie55295&&ie<57344){if(!Ee){if(ie>56319){(Q-=3)>-1&&Me.push(239,191,189);continue}if(Ie+1===we){(Q-=3)>-1&&Me.push(239,191,189);continue}Ee=ie;continue}if(ie<56320){(Q-=3)>-1&&Me.push(239,191,189),Ee=ie;continue}ie=65536+(Ee-55296<<10|ie-56320)}else Ee&&(Q-=3)>-1&&Me.push(239,191,189);if(Ee=null,ie<128){if((Q-=1)<0)break;Me.push(ie)}else if(ie<2048){if((Q-=2)<0)break;Me.push(ie>>6|192,63&ie|128)}else if(ie<65536){if((Q-=3)<0)break;Me.push(ie>>12|224,ie>>6&63|128,63&ie|128)}else{if(!(ie<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;Me.push(ie>>18|240,ie>>12&63|128,ie>>6&63|128,63&ie|128)}}return Me}function de(Y){return n.toByteArray((function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace(fe,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q})(Y))}function ge(Y,Q,ie,we){let Ee;for(Ee=0;Ee=Q.length||Ee>=Y.length);++Ee)Q[Ee+ie]=Y[Ee];return Ee}function Oe(Y,Q){return Y instanceof Q||Y!=null&&Y.constructor!=null&&Y.constructor.name!=null&&Y.constructor.name===Q.name}function ke(Y){return Y!=Y}const De=(function(){const Y="0123456789abcdef",Q=new Array(256);for(let ie=0;ie<16;++ie){const we=16*ie;for(let Ee=0;Ee<16;++Ee)Q[we+Ee]=Y[ie]+Y[Ee]}return Q})();function Ne(Y){return typeof BigInt>"u"?Ce:Y}function Ce(){throw new Error("BigInt not supported")}},1053:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rawPolyfilledDiagnosticRecord=void 0,e.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(e.rawPolyfilledDiagnosticRecord)},1074:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0,e.isValidDate=function(t){return t instanceof Date&&!isNaN(t)}},1092:function(r,e,t){var n=this&&this.__extends||(function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,_){b.__proto__=_}||function(b,_){for(var m in _)Object.prototype.hasOwnProperty.call(_,m)&&(b[m]=_[m])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=g}p(g,y),g.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}})(),i=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(6377)),o=i(t(6161)),s=i(t(3321)),u=i(t(7021)),l=t(9014),c=t(9305).internal.constants,f=c.BOLT_PROTOCOL_V5_8,d=c.FETCH_ALL,h=(function(p){function g(){return p!==null&&p.apply(this,arguments)||this}return n(g,p),Object.defineProperty(g.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"transformer",{get:function(){var y=this;return this._transformer===void 0&&(this._transformer=new s.default(Object.values(o.default).map(function(b){return b(y._config,y._log)}))),this._transformer},enumerable:!1,configurable:!0}),g.prototype.run=function(y,b,_){var m=_===void 0?{}:_,x=m.bookmarks,S=m.txConfig,O=m.database,E=m.mode,T=m.impersonatedUser,P=m.notificationFilter,I=m.beforeKeys,k=m.afterKeys,L=m.beforeError,B=m.afterError,j=m.beforeComplete,z=m.afterComplete,H=m.flush,q=H===void 0||H,W=m.reactive,$=W!==void 0&&W,J=m.fetchSize,X=J===void 0?d:J,Z=m.highRecordWatermark,ue=Z===void 0?Number.MAX_VALUE:Z,re=m.lowRecordWatermark,ne=re===void 0?Number.MAX_VALUE:re,le=m.onDb,ce=new l.ResultStreamObserver({server:this._server,reactive:$,fetchSize:X,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:I,afterKeys:k,beforeError:L,afterError:B,beforeComplete:j,afterComplete:z,highRecordWatermark:ue,lowRecordWatermark:ne,enrichMetadata:this._enrichMetadata,onDb:le}),pe=$;return this.write(u.default.runWithMetadata5x5(y,b,{bookmarks:x,txConfig:S,database:O,mode:E,impersonatedUser:T,notificationFilter:P}),ce,pe&&q),$||this.write(u.default.pull({n:X}),ce,q),ce},g})(a.default);e.default=h},1103:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var n=t(4662),i=t(1018);e.throwError=function(a,o){var s=i.isFunction(a)?a:function(){return a},u=function(l){return l.error(s())};return new n.Observable(o?function(l){return o.schedule(u,0,l)}:u)}},1107:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var n=t(1018),i=t(8613);function a(o){return o[o.length-1]}e.popResultSelector=function(o){return n.isFunction(a(o))?o.pop():void 0},e.popScheduler=function(o){return i.isScheduler(a(o))?o.pop():void 0},e.popNumber=function(o,s){return typeof a(o)=="number"?o.pop():s}},1116:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var n=t(3327),i=t(1018);e.isInteropObservable=function(a){return i.isFunction(a[n.observable])}},1141:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var n=t(2483),i=t(7843),a=t(3111),o=t(9445);e.windowWhen=function(s){return i.operate(function(u,l){var c,f,d=function(p){c.error(p),l.error(p)},h=function(){var p;f==null||f.unsubscribe(),c==null||c.complete(),c=new n.Subject,l.next(c.asObservable());try{p=o.innerFrom(s())}catch(g){return void d(g)}p.subscribe(f=a.createOperatorSubscriber(l,h,h,d))};h(),u.subscribe(a.createOperatorSubscriber(l,function(p){return c.next(p)},function(){c.complete(),l.complete()},d,function(){f==null||f.unsubscribe(),c=null}))})}},1175:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u0&&$[$.length-1])||ne[0]!==6&&ne[0]!==2)){X=0;continue}if(ne[0]===3&&(!$||ne[1]>$[0]&&ne[1]<$[3])){X.label=ne[1];break}if(ne[0]===6&&X.label<$[1]){X.label=$[1],$=ne;break}if($&&X.label<$[2]){X.label=$[2],X.ops.push(ne);break}$[2]&&X.ops.pop(),X.trys.pop();continue}ne=H.call(z,X)}catch(le){ne=[6,le],W=0}finally{q=$=0}if(5&ne[0])throw ne[1];return{value:ne[0]?ne[1]:void 0,done:!0}})([ue,re])}}},a=this&&this.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(e,"__esModule",{value:!0}),e.UnboundRelationship=e.Relationship=e.Node=e.Record=e.ServerInfo=e.GqlStatusObject=e.Notification=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.ResultSummary=e.RxResult=e.RxManagedTransaction=e.RxTransaction=e.RxSession=e.EagerResult=e.Result=e.ManagedTransaction=e.Transaction=e.Session=e.Driver=e.temporal=e.spatial=e.graph=e.error=e.routing=e.session=e.types=e.logging=e.auth=e.isRetriableError=e.Neo4jError=e.integer=e.isUnboundRelationship=e.isRelationship=e.isPathSegment=e.isPath=e.isNode=e.isDateTime=e.isLocalDateTime=e.isDate=e.isTime=e.isLocalTime=e.isDuration=e.isPoint=e.isInt=e.int=e.hasReachableServer=e.driver=e.authTokenManagers=void 0,e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.bookmarkManager=e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=e.Integer=e.Point=e.PathSegment=e.Path=void 0;var o=t(7857);Object.defineProperty(e,"Driver",{enumerable:!0,get:function(){return o.Driver}});var s=a(t(3659)),u=t(9305);Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return u.authTokenManagers}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return u.Neo4jError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return u.isRetriableError}}),Object.defineProperty(e,"error",{enumerable:!0,get:function(){return u.error}}),Object.defineProperty(e,"Integer",{enumerable:!0,get:function(){return u.Integer}}),Object.defineProperty(e,"int",{enumerable:!0,get:function(){return u.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return u.isInt}}),Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return u.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return u.Point}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return u.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return u.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return u.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return u.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return u.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return u.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return u.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return u.isLocalTime}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return u.isNode}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return u.isPath}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return u.isPathSegment}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return u.isRelationship}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return u.isTime}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return u.isUnboundRelationship}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return u.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return u.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return u.Time}}),Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return u.Node}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return u.Path}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return u.PathSegment}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return u.Relationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return u.UnboundRelationship}}),Object.defineProperty(e,"Record",{enumerable:!0,get:function(){return u.Record}}),Object.defineProperty(e,"ResultSummary",{enumerable:!0,get:function(){return u.ResultSummary}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return u.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return u.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return u.QueryStatistics}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return u.Notification}}),Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return u.GqlStatusObject}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return u.ServerInfo}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return u.Result}}),Object.defineProperty(e,"EagerResult",{enumerable:!0,get:function(){return u.EagerResult}}),Object.defineProperty(e,"auth",{enumerable:!0,get:function(){return u.auth}}),Object.defineProperty(e,"Session",{enumerable:!0,get:function(){return u.Session}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return u.Transaction}}),Object.defineProperty(e,"ManagedTransaction",{enumerable:!0,get:function(){return u.ManagedTransaction}}),Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return u.bookmarkManager}}),Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return u.routing}}),Object.defineProperty(e,"resultTransformers",{enumerable:!0,get:function(){return u.resultTransformers}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return u.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return u.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return u.notificationSeverityLevel}}),Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return u.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return u.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return u.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return u.clientCertificateProviders}});var l=t(6672),c=a(t(3466));e.RxSession=c.default;var f=a(t(5742));e.RxTransaction=f.default;var d=a(t(1530));e.RxManagedTransaction=d.default;var h=a(t(3057));e.RxResult=h.default;var p=u.internal.util,g=p.ENCRYPTION_ON,y=p.assertString,b=p.isEmptyObjectOrNull,_=u.internal.serverAddress.ServerAddress,m=u.internal.urlUtil,x="neo4j-javascript/"+s.default;function S(z,H,q){q===void 0&&(q={}),y(z,"Bolt URL");var W,$=m.parseDatabaseUrl(z),J=!1,X=!1;switch($.scheme){case"bolt":break;case"bolt+s":X=!0,W="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":X=!0,W="TRUST_ALL_CERTIFICATES";break;case"neo4j":J=!0;break;case"neo4j+s":X=!0,W="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",J=!0;break;case"neo4j+ssc":X=!0,W="TRUST_ALL_CERTIFICATES",J=!0;break;default:throw new Error("Unknown scheme: ".concat($.scheme))}if(X){if("encrypted"in q||"trust"in q)throw new Error("Encryption/trust can only be configured either through URL or config, not both");q.encrypted=g,q.trust=W,q.clientCertificate=(0,u.resolveCertificateProvider)(q.clientCertificate)}var Z=(function(ne){if(typeof(le=ne)=="object"&&le!=null&&"getToken"in le&&"handleSecurityException"in le&&typeof le.getToken=="function"&&typeof le.handleSecurityException=="function")return ne;var le,ce=ne;return(ce=ce||{}).scheme=ce.scheme||"none",(0,u.staticAuthTokenManager)({authToken:ce})})(H);q.userAgent=q.userAgent||x,q.boltAgent=u.internal.boltAgent.fromVersion(s.default);var ue=_.fromUrl($.hostAndPort),re={address:ue,typename:J?"Routing":"Direct",routing:J};return new o.Driver(re,q,(function(){if(J)return function(ne,le,ce,pe){return new l.RoutingConnectionProvider({id:ne,config:le,log:ce,hostNameResolver:pe,authTokenManager:Z,address:ue,userAgent:le.userAgent,boltAgent:le.boltAgent,routingContext:$.query})};if(!b($.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(z,"'"));return function(ne,le,ce){return new l.DirectConnectionProvider({id:ne,config:le,log:ce,authTokenManager:Z,address:ue,userAgent:le.userAgent,boltAgent:le.boltAgent})}})())}function O(z,H){return n(this,void 0,void 0,function(){var q;return i(this,function(W){switch(W.label){case 0:q=S(z,{scheme:"none",principal:"",credentials:""},H),W.label=1;case 1:return W.trys.push([1,,3,5]),[4,q.getNegotiatedProtocolVersion()];case 2:return W.sent(),[2,!0];case 3:return[4,q.close()];case 4:return W.sent(),[7];case 5:return[2]}})})}e.driver=S,e.hasReachableServer=O;var E={console:function(z){return{level:z,logger:function(H,q){return console.log("".concat(t.g.Date.now()," ").concat(H.toUpperCase()," ").concat(q))}}}};e.logging=E;var T={Node:u.Node,Relationship:u.Relationship,UnboundRelationship:u.UnboundRelationship,PathSegment:u.PathSegment,Path:u.Path,Result:u.Result,EagerResult:u.EagerResult,ResultSummary:u.ResultSummary,Record:u.Record,Point:u.Point,Date:u.Date,DateTime:u.DateTime,Duration:u.Duration,LocalDateTime:u.LocalDateTime,LocalTime:u.LocalTime,Time:u.Time,Integer:u.Integer};e.types=T;var P={READ:o.READ,WRITE:o.WRITE};e.session=P;var I={toNumber:u.toNumber,toString:u.toString,inSafeRange:u.inSafeRange};e.integer=I;var k={isPoint:u.isPoint};e.spatial=k;var L={isDuration:u.isDuration,isLocalTime:u.isLocalTime,isTime:u.isTime,isDate:u.isDate,isLocalDateTime:u.isLocalDateTime,isDateTime:u.isDateTime};e.temporal=L;var B={isNode:u.isNode,isPath:u.isPath,isPathSegment:u.isPathSegment,isRelationship:u.isRelationship,isUnboundRelationship:u.isUnboundRelationship};e.graph=B;var j={authTokenManagers:u.authTokenManagers,driver:S,hasReachableServer:O,int:u.int,isInt:u.isInt,isPoint:u.isPoint,isDuration:u.isDuration,isLocalTime:u.isLocalTime,isTime:u.isTime,isDate:u.isDate,isLocalDateTime:u.isLocalDateTime,isDateTime:u.isDateTime,isNode:u.isNode,isPath:u.isPath,isPathSegment:u.isPathSegment,isRelationship:u.isRelationship,isUnboundRelationship:u.isUnboundRelationship,integer:I,Neo4jError:u.Neo4jError,isRetriableError:u.isRetriableError,auth:u.auth,logging:E,types:T,session:P,routing:u.routing,error:u.error,graph:B,spatial:k,temporal:L,Driver:o.Driver,Session:u.Session,Transaction:u.Transaction,ManagedTransaction:u.ManagedTransaction,Result:u.Result,EagerResult:u.EagerResult,RxSession:c.default,RxTransaction:f.default,RxManagedTransaction:d.default,RxResult:h.default,ResultSummary:u.ResultSummary,Plan:u.Plan,ProfiledPlan:u.ProfiledPlan,QueryStatistics:u.QueryStatistics,Notification:u.Notification,GqlStatusObject:u.GqlStatusObject,ServerInfo:u.ServerInfo,Record:u.Record,Node:u.Node,Relationship:u.Relationship,UnboundRelationship:u.UnboundRelationship,Path:u.Path,PathSegment:u.PathSegment,Point:u.Point,Integer:u.Integer,Duration:u.Duration,LocalTime:u.LocalTime,Time:u.Time,Date:u.Date,LocalDateTime:u.LocalDateTime,DateTime:u.DateTime,bookmarkManager:u.bookmarkManager,resultTransformers:u.resultTransformers,notificationCategory:u.notificationCategory,notificationSeverityLevel:u.notificationSeverityLevel,notificationFilterDisabledCategory:u.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:u.notificationFilterMinimumSeverityLevel,clientCertificateProviders:u.clientCertificateProviders};e.default=j},1226:function(r,e,t){var n=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p},i=this&&this.__spreadArray||function(u,l){for(var c=0,f=l.length,d=u.length;c0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0,e.noop=function(){}},1358:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var n=t(1018);e.isAsyncIterable=function(i){return Symbol.asyncIterator&&n.isFunction(i==null?void 0:i[Symbol.asyncIterator])}},1409:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.beginTransaction=function(i){throw new Error("Not implemented")},n.prototype.run=function(i,a,o){throw new Error("Not implemented")},n.prototype.commitTransaction=function(i){throw new Error("Not implemented")},n.prototype.rollbackTransaction=function(i){throw new Error("Not implemented")},n.prototype.resetAndFlush=function(){throw new Error("Not implemented")},n.prototype.isOpen=function(){throw new Error("Not implemented")},n.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},n.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},n})();e.default=t},1415:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var n=t(9139),i=t(1018);e.max=function(a){return n.reduce(i.isFunction(a)?function(o,s){return a(o,s)>0?o:s}:function(o,s){return o>s?o:s})}},1439:function(r,e,t){var n=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var n=t(2483),i=t(9445),a=t(7843),o=t(6824),s={connector:function(){return new n.Subject}};e.connect=function(u,l){l===void 0&&(l=s);var c=l.connector;return a.operate(function(f,d){var h=c();i.innerFrom(u(o.fromSubscribable(h))).subscribe(d),d.add(f.subscribe(h))})}},1505:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var n=t(5568);e.SequenceError=n.createErrorClass(function(i){return function(a){i(this),this.name="SequenceError",this.message=a}})},1517:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=void 0;var n=t(4027),i={value:!0,enumerable:!1,configurable:!1,writable:!1},a="__isNode__",o="__isRelationship__",s="__isUnboundRelationship__",u="__isPath__",l="__isPathSegment__";function c(b,_){return b!=null&&b[_]===!0}var f=(function(){function b(_,m,x,S){this.identity=_,this.labels=m,this.properties=x,this.elementId=y(S,function(){return _.toString()})}return b.prototype.toString=function(){for(var _="("+this.elementId,m=0;m0){for(_+=" {",m=0;m0&&(_+=","),_+=x[m]+":"+(0,n.stringify)(this.properties[x[m]]);_+="}"}return _+")"},b})();e.Node=f,Object.defineProperty(f.prototype,a,i),e.isNode=function(b){return c(b,a)};var d=(function(){function b(_,m,x,S,O,E,T,P){this.identity=_,this.start=m,this.end=x,this.type=S,this.properties=O,this.elementId=y(E,function(){return _.toString()}),this.startNodeElementId=y(T,function(){return m.toString()}),this.endNodeElementId=y(P,function(){return x.toString()})}return b.prototype.toString=function(){var _="("+this.startNodeElementId+")-[:"+this.type,m=Object.keys(this.properties);if(m.length>0){_+=" {";for(var x=0;x0&&(_+=","),_+=m[x]+":"+(0,n.stringify)(this.properties[m[x]]);_+="}"}return _+"]->("+this.endNodeElementId+")"},b})();e.Relationship=d,Object.defineProperty(d.prototype,o,i),e.isRelationship=function(b){return c(b,o)};var h=(function(){function b(_,m,x,S){this.identity=_,this.type=m,this.properties=x,this.elementId=y(S,function(){return _.toString()})}return b.prototype.bind=function(_,m){return new d(this.identity,_,m,this.type,this.properties,this.elementId)},b.prototype.bindTo=function(_,m){return new d(this.identity,_.identity,m.identity,this.type,this.properties,this.elementId,_.elementId,m.elementId)},b.prototype.toString=function(){var _="-[:"+this.type,m=Object.keys(this.properties);if(m.length>0){_+=" {";for(var x=0;x0&&(_+=","),_+=m[x]+":"+(0,n.stringify)(this.properties[m[x]]);_+="}"}return _+"]->"},b})();e.UnboundRelationship=h,Object.defineProperty(h.prototype,s,i),e.isUnboundRelationship=function(b){return c(b,s)};var p=function(b,_,m){this.start=b,this.relationship=_,this.end=m};e.PathSegment=p,Object.defineProperty(p.prototype,l,i),e.isPathSegment=function(b){return c(b,l)};var g=function(b,_,m){this.start=b,this.end=_,this.segments=m,this.length=m.length};function y(b,_){return b??_()}e.Path=g,Object.defineProperty(g.prototype,u,i),e.isPath=function(b){return c(b,u)}},1518:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var n=t(7843),i=t(3111);e.pairwise=function(){return n.operate(function(a,o){var s,u=!1;a.subscribe(i.createOperatorSubscriber(o,function(l){var c=s;s=l,u&&o.next([c,l]),u=!0}))})}},1530:function(r,e,t){var n=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),n(t(3057)),n(t(5742));var i=(function(){function a(o){var s=o.run;this._run=s}return a.fromTransaction=function(o){return new a({run:o.run.bind(o)})},a.prototype.run=function(o,s){return this._run(o,s)},a})();e.default=i},1551:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var n=t(2752);e.exhaust=n.exhaustAll},1554:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var n=t(7961),i=t(1074),a=t(7843),o=t(9445),s=t(5568),u=t(3111),l=t(7110);function c(f){throw new e.TimeoutError(f)}e.TimeoutError=s.createErrorClass(function(f){return function(d){d===void 0&&(d=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=d}}),e.timeout=function(f,d){var h=i.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,p=h.first,g=h.each,y=h.with,b=y===void 0?c:y,_=h.scheduler,m=_===void 0?d??n.asyncScheduler:_,x=h.meta,S=x===void 0?null:x;if(p==null&&g==null)throw new TypeError("No timeout provided.");return a.operate(function(O,E){var T,P,I=null,k=0,L=function(B){P=l.executeSchedule(E,m,function(){try{T.unsubscribe(),o.innerFrom(b({meta:S,lastValue:I,seen:k})).subscribe(E)}catch(j){E.error(j)}},B)};T=O.subscribe(u.createOperatorSubscriber(E,function(B){P==null||P.unsubscribe(),k++,E.next(I=B),g>0&&L(g)},void 0,void 0,function(){P!=null&&P.closed||P==null||P.unsubscribe(),I=null})),!k&&L(p!=null?typeof p=="number"?p:+p-m.now():g)})}},1573:function(r,e,t){var n=this&&this.__awaiter||function(h,p,g,y){return new(g||(g=Promise))(function(b,_){function m(O){try{S(y.next(O))}catch(E){_(E)}}function x(O){try{S(y.throw(O))}catch(E){_(E)}}function S(O){var E;O.done?b(O.value):(E=O.value,E instanceof g?E:new g(function(T){T(E)})).then(m,x)}S((y=y.apply(h,p||[])).next())})},i=this&&this.__generator||function(h,p){var g,y,b,_,m={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return _={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function x(S){return function(O){return(function(E){if(g)throw new TypeError("Generator is already executing.");for(;_&&(_=0,E[0]&&(m=0)),m;)try{if(g=1,y&&(b=2&E[0]?y.return:E[0]?y.throw||((b=y.return)&&b.call(y),0):y.next)&&!(b=b.call(y,E[1])).done)return b;switch(y=0,b&&(E=[2&E[0],b.value]),E[0]){case 0:case 1:b=E;break;case 4:return m.label++,{value:E[1],done:!1};case 5:m.label++,y=E[1],E=[0];continue;case 7:E=m.ops.pop(),m.trys.pop();continue;default:if(!((b=(b=m.trys).length>0&&b[b.length-1])||E[0]!==6&&E[0]!==2)){m=0;continue}if(E[0]===3&&(!b||E[1]>b[0]&&E[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var n=t(9567),i=t(9589),a=t(6985),o=t(8808),s=t(854),u=t(1116),l=t(7629),c=t(8046),f=t(6368),d=t(1358),h=t(7614),p=t(9137),g=t(4953);e.scheduled=function(y,b){if(y!=null){if(u.isInteropObservable(y))return n.scheduleObservable(y,b);if(c.isArrayLike(y))return a.scheduleArray(y,b);if(l.isPromise(y))return i.schedulePromise(y,b);if(d.isAsyncIterable(y))return s.scheduleAsyncIterable(y,b);if(f.isIterable(y))return o.scheduleIterable(y,b);if(p.isReadableStreamLike(y))return g.scheduleReadableStreamLike(y,b)}throw h.createInvalidObservableTypeError(y)}},1699:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var n=t(245),i=t(783),a=t(9445);e.partition=function(o,s,u){return[i.filter(s,u)(a.innerFrom(o)),i.filter(n.not(s,u))(a.innerFrom(o))]}},1711:function(r,e,t){var n=this&&this.__extends||(function(){var m=function(x,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(O[T]=E[T])},m(x,S)};return function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=x}m(x,S),x.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var x,S=1,O=arguments.length;S{Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var n=t(9445),i=t(7843),a=t(1342),o=t(3111);e.sample=function(s){return i.operate(function(u,l){var c=!1,f=null;u.subscribe(o.createOperatorSubscriber(l,function(d){c=!0,f=d})),n.innerFrom(s).subscribe(o.createOperatorSubscriber(l,function(){if(c){c=!1;var d=f;f=null,l.next(d)}},a.noop))})}},1751:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isObservable=void 0;var n=t(4662),i=t(1018);e.isObservable=function(a){return!!a&&(a instanceof n.Observable||i.isFunction(a.lift)&&i.isFunction(a.subscribe))}},1759:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var n=t(5568);e.NotFoundError=n.createErrorClass(function(i){return function(a){i(this),this.name="NotFoundError",this.message=a}})},1776:function(r,e,t){var n=this&&this.__read||function(s,u){var l=typeof Symbol=="function"&&s[Symbol.iterator];if(!l)return s;var c,f,d=l.call(s),h=[];try{for(;(u===void 0||u-- >0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{var e,t,n=document.attachEvent,i=!1;function a(m){var x=m.__resizeTriggers__,S=x.firstElementChild,O=x.lastElementChild,E=S.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,E.style.width=S.offsetWidth+1+"px",E.style.height=S.offsetHeight+1+"px",S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight}function o(m){var x=this;a(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s(function(){(function(S){return S.offsetWidth!=S.__resizeLast__.width||S.offsetHeight!=S.__resizeLast__.height})(x)&&(x.__resizeLast__.width=x.offsetWidth,x.__resizeLast__.height=x.offsetHeight,x.__resizeListeners__.forEach(function(S){S.call(x,m)}))})}if(!n){var s=(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(m){return window.setTimeout(m,20)},function(m){return t(m)}),u=(e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(m){return e(m)}),l=!1,c="",f="animationstart",d="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(p.style.animationName!==void 0&&(l=!0),l===!1){for(var g=0;g 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%; }',O=document.head||document.getElementsByTagName("head")[0],E=document.createElement("style");E.type="text/css",E.styleSheet?E.styleSheet.cssText=S:E.appendChild(document.createTextNode(S)),O.appendChild(E),i=!0}})(),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=document.createElement("div")).className="resize-triggers",m.__resizeTriggers__.innerHTML='
',m.appendChild(m.__resizeTriggers__),a(m),m.addEventListener("scroll",o,!0),f&&m.__resizeTriggers__.addEventListener(f,function(S){S.animationName==y&&a(m)})),m.__resizeListeners__.push(x)),function(){n?m.detachEvent("onresize",x):(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(x),1),m.__resizeListeners__.length||(m.removeEventListener("scroll",o),m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)))}}},1839:function(r,e,t){var n=this&&this.__awaiter||function(u,l,c,f){return new(c||(c=Promise))(function(d,h){function p(b){try{y(f.next(b))}catch(_){h(_)}}function g(b){try{y(f.throw(b))}catch(_){h(_)}}function y(b){var _;b.done?d(b.value):(_=b.value,_ instanceof c?_:new c(function(m){m(_)})).then(p,g)}y((f=f.apply(u,l||[])).next())})},i=this&&this.__generator||function(u,l){var c,f,d,h,p={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(y){return function(b){return(function(_){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,_[0]&&(p=0)),p;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,f=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(!((d=(d=p.trys).length>0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]0)&&!(z=q.next()).done;)W.push(z.value)}catch($){H={error:$}}finally{try{z&&!z.done&&(j=q.return)&&j.call(q)}finally{if(H)throw H.error}}return W},u=this&&this.__spreadArray||function(L,B,j){if(j||arguments.length===2)for(var z,H=0,q=B.length;H{function t(){return typeof Symbol=="function"&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0,e.getSymbolIterator=t,e.iterator=t()},1967:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9691),i=t(4027),a={basic:function(s,u,l){return l!=null?{scheme:"basic",principal:s,credentials:u,realm:l}:{scheme:"basic",principal:s,credentials:u}},kerberos:function(s){return{scheme:"kerberos",principal:"",credentials:s}},bearer:function(s){return{scheme:"bearer",credentials:s}},none:function(){return{scheme:"none"}},custom:function(s,u,l,c,f){var d={scheme:c,principal:s};if(o(u)&&(d.credentials=u),o(l)&&(d.realm=l),o(f)){try{(0,i.stringify)(f)}catch(h){throw(0,n.newError)("Circular references in custom auth token parameters",void 0,h)}d.parameters=f}return d}};function o(s){return!(s==null||s===""||Object.getPrototypeOf(s)===Object.prototype&&Object.keys(s).length===0)}e.default=a},1983:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var n=t(9445),i=t(7110),a=t(3111);e.mergeInternals=function(o,s,u,l,c,f,d,h){var p=[],g=0,y=0,b=!1,_=function(){!b||p.length||g||s.complete()},m=function(S){return g{Object.defineProperty(e,"__esModule",{value:!0}),e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationFilterMinimumSeverityLevel=void 0;var t={OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"};e.notificationFilterMinimumSeverityLevel=t,Object.freeze(t);var n={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};e.notificationFilterDisabledCategory=n,Object.freeze(n);var i=n;e.notificationFilterDisabledClassification=i,e.default=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}},2007:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Releasable=void 0;var t=(function(){function i(){}return i.prototype.release=function(){throw new Error("Not implemented")},i})();e.Releasable=t;var n=(function(){function i(){}return i.prototype.acquireConnection=function(a){throw Error("Not implemented")},i.prototype.supportsMultiDb=function(){throw Error("Not implemented")},i.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},i.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},i.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},i.prototype.SSREnabled=function(){return!1},i.prototype.verifyConnectivityAndGetServerInfo=function(a){throw Error("Not implemented")},i.prototype.verifyAuthentication=function(a){throw Error("Not implemented")},i.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},i.prototype.close=function(){throw Error("Not implemented")},i})();e.default=n},2063:r=>{r.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},2066:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u0&&b[b.length-1])||E[0]!==6&&E[0]!==2)){m=0;continue}if(E[0]===3&&(!b||E[1]>b[0]&&E[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var n=t(7843),i=t(3111);e.takeWhile=function(a,o){return o===void 0&&(o=!1),n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){var f=a(c,l++);(f||o)&&u.next(c),!f&&u.complete()}))})}},2171:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var n=t(245),i=t(783);e.partition=function(a,o){return function(s){return[i.filter(a,o)(s),i.filter(n.not(a,o))(s)]}}},2199:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.resolve=function(s){return this._resolveToItself(s)},o})(t(9305).internal.resolver.BaseHostNameResolver);e.default=i},2204:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var n=t(9139),i=t(7843),a=function(o,s){return o.push(s),o};e.toArray=function(){return i.operate(function(o,s){n.reduce(a,[])(o).subscribe(s)})}},2360:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var n=t(7800),i=t(7843),a=t(3111);e.materialize=function(){return i.operate(function(o,s){o.subscribe(a.createOperatorSubscriber(s,function(u){s.next(n.Notification.createNext(u))},function(){s.next(n.Notification.createComplete()),s.complete()},function(u){s.next(n.Notification.createError(u)),s.complete()}))})}},2363:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305),i=n.error.SERVICE_UNAVAILABLE,a=n.error.SESSION_EXPIRED,o=(function(){function u(l,c,f,d){this._errorCode=l,this._handleUnavailability=c||s,this._handleWriteFailure=f||s,this._handleSecurityError=d||s}return u.create=function(l){return new u(l.errorCode,l.handleUnavailability,l.handleWriteFailure,l.handleSecurityError)},u.prototype.errorCode=function(){return this._errorCode},u.prototype.handleAndTransformError=function(l,c,f){return(function(d){return d!=null&&d.code!=null&&d.code.startsWith("Neo.ClientError.Security.")})(l)?this._handleSecurityError(l,c,f):(function(d){return!!d&&(d.code===a||d.code===i||d.code==="Neo.TransientError.General.DatabaseUnavailable")})(l)?this._handleUnavailability(l,c,f):(function(d){return!!d&&(d.code==="Neo.ClientError.Cluster.NotALeader"||d.code==="Neo.ClientError.General.ForbiddenOnReadOnlyDatabase")})(l)?this._handleWriteFailure(l,c,f):l},u})();function s(u){return u}e.default=o},2481:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305),i=n.internal.util,a=i.ENCRYPTION_OFF,o=i.ENCRYPTION_ON,s=n.error.SERVICE_UNAVAILABLE,u=[null,void 0,!0,!1,o,a],l=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];e.default=function(c,f,d,h){this.address=c,this.encrypted=(function(p){var g=p.encrypted;if(u.indexOf(g)===-1)throw(0,n.newError)("Illegal value of the encrypted setting ".concat(g,". Expected one of ").concat(u));return g})(f),this.trust=(function(p){var g=p.trust;if(l.indexOf(g)===-1)throw(0,n.newError)("Illegal value of the trust setting ".concat(g,". Expected one of ").concat(l));return g})(f),this.trustedCertificates=(function(p){return p.trustedCertificates||[]})(f),this.knownHostsPath=(function(p){return p.knownHosts||null})(f),this.connectionErrorCode=d||s,this.connectionTimeout=f.connectionTimeout,this.clientCertificate=h}},2483:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__values||function(d){var h=typeof Symbol=="function"&&Symbol.iterator,p=h&&d[h],g=0;if(p)return p.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&g>=d.length&&(d=void 0),{value:d&&d[g++],done:!d}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var a=t(4662),o=t(8014),s=t(9686),u=t(7479),l=t(9223),c=(function(d){function h(){var p=d.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return n(h,d),h.prototype.lift=function(p){var g=new f(this,this);return g.operator=p,g},h.prototype._throwIfClosed=function(){if(this.closed)throw new s.ObjectUnsubscribedError},h.prototype.next=function(p){var g=this;l.errorContext(function(){var y,b;if(g._throwIfClosed(),!g.isStopped){g.currentObservers||(g.currentObservers=Array.from(g.observers));try{for(var _=i(g.currentObservers),m=_.next();!m.done;m=_.next())m.value.next(p)}catch(x){y={error:x}}finally{try{m&&!m.done&&(b=_.return)&&b.call(_)}finally{if(y)throw y.error}}}})},h.prototype.error=function(p){var g=this;l.errorContext(function(){if(g._throwIfClosed(),!g.isStopped){g.hasError=g.isStopped=!0,g.thrownError=p;for(var y=g.observers;y.length;)y.shift().error(p)}})},h.prototype.complete=function(){var p=this;l.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var g=p.observers;g.length;)g.shift().complete()}})},h.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(h.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),h.prototype._trySubscribe=function(p){return this._throwIfClosed(),d.prototype._trySubscribe.call(this,p)},h.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},h.prototype._innerSubscribe=function(p){var g=this,y=this,b=y.hasError,_=y.isStopped,m=y.observers;return b||_?o.EMPTY_SUBSCRIPTION:(this.currentObservers=null,m.push(p),new o.Subscription(function(){g.currentObservers=null,u.arrRemove(m,p)}))},h.prototype._checkFinalizedStatuses=function(p){var g=this,y=g.hasError,b=g.thrownError,_=g.isStopped;y?p.error(b):_&&p.complete()},h.prototype.asObservable=function(){var p=new a.Observable;return p.source=this,p},h.create=function(p,g){return new f(p,g)},h})(a.Observable);e.Subject=c;var f=(function(d){function h(p,g){var y=d.call(this)||this;return y.destination=p,y.source=g,y}return n(h,d),h.prototype.next=function(p){var g,y;(y=(g=this.destination)===null||g===void 0?void 0:g.next)===null||y===void 0||y.call(g,p)},h.prototype.error=function(p){var g,y;(y=(g=this.destination)===null||g===void 0?void 0:g.error)===null||y===void 0||y.call(g,p)},h.prototype.complete=function(){var p,g;(g=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||g===void 0||g.call(p)},h.prototype._subscribe=function(p){var g,y;return(y=(g=this.source)===null||g===void 0?void 0:g.subscribe(p))!==null&&y!==void 0?y:o.EMPTY_SUBSCRIPTION},h})(c);e.AnonymousSubject=f},2533:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})(),i=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(715)),o=(function(s){function u(l){var c=s.call(this)||this;return c._readersIndex=new a.default,c._writersIndex=new a.default,c._connectionPool=l,c}return n(u,s),u.prototype.selectReader=function(l){return this._select(l,this._readersIndex)},u.prototype.selectWriter=function(l){return this._select(l,this._writersIndex)},u.prototype._select=function(l,c){var f=l.length;if(f===0)return null;var d=c.next(f),h=d,p=null,g=Number.MAX_SAFE_INTEGER;do{var y=l[h],b=this._connectionPool.activeResourceCount(y);b0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305);function i(){}function a(u){return u}var o={onNext:i,onCompleted:i,onError:i},s=(function(){function u(l){var c=l===void 0?{}:l,f=c.transformMetadata,d=c.enrichErrorMetadata,h=c.log,p=c.observer;this._pendingObservers=[],this._log=h,this._transformMetadata=f||a,this._enrichErrorMetadata=d||a,this._observer=Object.assign({onObserversCountChange:i,onError:i,onFailure:i,onErrorApplyTransformation:a},p)}return Object.defineProperty(u.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),u.prototype.handleResponse=function(l){var c=l.fields[0];switch(l.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(n.json.stringify(l))),this._currentObserver.onNext(c);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(n.json.stringify(l)));try{var f=this._transformMetadata(c);this._currentObserver.onCompleted(f)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(n.json.stringify(l)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(c)),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(n.json.stringify(l)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,n.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,n.newError)("Unknown Bolt protocol message: "+l))}},u.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(u.prototype,"_observersCount",{get:function(){return this._currentObserver==null?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),u.prototype._queueObserver=function(l){return(l=l||o).onCompleted=l.onCompleted||i,l.onError=l.onError||i,l.onNext=l.onNext||i,this._currentObserver===void 0?this._currentObserver=l:this._pendingObservers.push(l),this._observer.onObserversCountChange(this._observersCount),!0},u.prototype._notifyErrorToObservers=function(l){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(l);this._pendingObservers.length>0;){var c=this._pendingObservers.shift();c&&c.onError&&c.onError(l)}},u.prototype.hasOngoingObservableRequests=function(){return this._currentObserver!=null||this._pendingObservers.length>0},u.prototype._resetFailure=function(){this._currentFailure=null},u.prototype._handleErrorPayload=function(l){var c,f=(c=l.code)==="Neo.TransientError.Transaction.Terminated"?"Neo.ClientError.Transaction.Terminated":c==="Neo.TransientError.Transaction.LockClientStopped"?"Neo.ClientError.Transaction.LockClientStopped":c,d=l.cause!=null?this._handleErrorCause(l.cause):void 0,h=(0,n.newError)(l.message,f,d,l.gql_status,l.description,l.diagnostic_record);return this._observer.onErrorApplyTransformation(h)},u.prototype._handleErrorCause=function(l){var c=l.cause!=null?this._handleErrorCause(l.cause):void 0,f=(0,n.newGQLError)(l.message,c,l.gql_status,l.description,l.diagnostic_record);return this._observer.onErrorApplyTransformation(f)},u})();e.default=s},2628:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameAction=void 0;var i=t(5267),a=t(9507),o=(function(s){function u(l,c){var f=s.call(this,l,c)||this;return f.scheduler=l,f.work=c,f}return n(u,s),u.prototype.requestAsyncId=function(l,c,f){return f===void 0&&(f=0),f!==null&&f>0?s.prototype.requestAsyncId.call(this,l,c,f):(l.actions.push(this),l._scheduled||(l._scheduled=a.animationFrameProvider.requestAnimationFrame(function(){return l.flush(void 0)})))},u.prototype.recycleAsyncId=function(l,c,f){var d;if(f===void 0&&(f=0),f!=null?f>0:this.delay>0)return s.prototype.recycleAsyncId.call(this,l,c,f);var h=l.actions;c!=null&&c===l._scheduled&&((d=h[h.length-1])===null||d===void 0?void 0:d.id)!==c&&(a.animationFrameProvider.cancelAnimationFrame(c),l._scheduled=void 0)},u})(i.AsyncAction);e.AnimationFrameAction=o},2669:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var n=t(9139),i=t(1018);e.min=function(a){return n.reduce(i.isFunction(a)?function(o,s){return a(o,s)<0?o:s}:function(o,s){return o{Object.defineProperty(e,"__esModule",{value:!0}),e.FailedObserver=e.CompletedObserver=void 0;var t=(function(){function a(){}return a.prototype.subscribe=function(o){i(o,o.onKeys,[]),i(o,o.onCompleted,{})},a.prototype.cancel=function(){},a.prototype.pause=function(){},a.prototype.resume=function(){},a.prototype.prepareToHandleSingleResponse=function(){},a.prototype.markCompleted=function(){},a.prototype.onError=function(o){throw new Error("CompletedObserver not supposed to call onError",{cause:o})},a})();e.CompletedObserver=t;var n=(function(){function a(o){var s=o.error,u=o.onError;this._error=s,this._beforeError=u,this._observers=[],this.onError(s)}return a.prototype.subscribe=function(o){i(o,o.onError,this._error),this._observers.push(o)},a.prototype.onError=function(o){i(this,this._beforeError,o),this._observers.forEach(function(s){return i(s,s.onError,o)})},a.prototype.cancel=function(){},a.prototype.pause=function(){},a.prototype.resume=function(){},a.prototype.markCompleted=function(){},a.prototype.prepareToHandleSingleResponse=function(){},a})();function i(a,o,s){o!=null&&o.bind(a)(s)}e.FailedObserver=n},2706:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var n=t(6640);function i(a){return a.length===0?n.identity:a.length===1?a[0]:function(o){return a.reduce(function(s,u){return u(s)},o)}}e.pipe=function(){for(var a=[],o=0;o{Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallback=void 0;var n=t(1439);e.bindCallback=function(i,a,o){return n.bindCallbackInternals(!1,i,a,o)}},2752:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var n=t(4753),i=t(6640);e.exhaustAll=function(){return n.exhaustMap(i.identity)}},2823:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var n=t(5568);e.EmptyError=n.createErrorClass(function(i){return function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}})},2833:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var n=t(7302),i=t(9445),a=t(8616),o=t(1107),s=t(4917);e.merge=function(){for(var u=[],l=0;l{Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var n=t(4212),i=t(1293);e.queueScheduler=new i.QueueScheduler(n.QueueAction),e.queue=e.queueScheduler},2906:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c},o=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_MAX_SIZE=e.DEFAULT_ACQUISITION_TIMEOUT=e.PoolConfig=e.Pool=void 0;var s=a(t(7589));e.PoolConfig=s.default,Object.defineProperty(e,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return s.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(e,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return s.DEFAULT_MAX_SIZE}});var u=o(t(6842));e.Pool=u.default,e.default=u.default},3001:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(i){this.maxSize=i,this.pruneCount=Math.max(Math.round(.01*i*Math.log(i)),1),this.map=new Map}return n.prototype.set=function(i,a){this.map.set(i,{database:a,lastUsed:Date.now()}),this._pruneCache()},n.prototype.get=function(i){var a=this.map.get(i);if(a!==void 0)return a.lastUsed=Date.now(),a.database},n.prototype.delete=function(i){this.map.delete(i)},n.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var i=Array.from(this.map.entries()).sort(function(o,s){return o[1].lastUsed-s[1].lastUsed}),a=0;a0&&p[p.length-1])||x[0]!==6&&x[0]!==2)){y=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrames=void 0;var n=t(4662),i=t(4746),a=t(9507);function o(u){return new n.Observable(function(l){var c=u||i.performanceTimestampProvider,f=c.now(),d=0,h=function(){l.closed||(d=a.animationFrameProvider.requestAnimationFrame(function(p){d=0;var g=c.now();l.next({timestamp:u?g:p,elapsed:g-f}),h()}))};return h(),function(){d&&a.animationFrameProvider.cancelAnimationFrame(d)}})}e.animationFrames=function(u){return u?o(u):s};var s=o()},3111:function(r,e,t){var n=this&&this.__extends||(function(){var o=function(s,u){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(l[f]=c[f])},o(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=s}o(s,u),s.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var i=t(5);e.createOperatorSubscriber=function(o,s,u,l,c){return new a(o,s,u,l,c)};var a=(function(o){function s(u,l,c,f,d,h){var p=o.call(this,u)||this;return p.onFinalize=d,p.shouldUnsubscribe=h,p._next=l?function(g){try{l(g)}catch(y){u.error(y)}}:o.prototype._next,p._error=f?function(g){try{f(g)}catch(y){u.error(y)}finally{this.unsubscribe()}}:o.prototype._error,p._complete=c?function(){try{c()}catch(g){u.error(g)}finally{this.unsubscribe()}}:o.prototype._complete,p}return n(s,o),s.prototype.unsubscribe=function(){var u;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var l=this.closed;o.prototype.unsubscribe.call(this),!l&&((u=this.onFinalize)===null||u===void 0||u.call(this))}},s})(i.Subscriber);e.OperatorSubscriber=a},3133:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var n=t(1242),i=t(8977);e.shareReplay=function(a,o,s){var u,l,c,f,d=!1;return a&&typeof a=="object"?(u=a.bufferSize,f=u===void 0?1/0:u,l=a.windowTime,o=l===void 0?1/0:l,d=(c=a.refCount)!==void 0&&c,s=a.scheduler):f=a??1/0,i.share({connector:function(){return new n.ReplaySubject(f,o,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:d})}},3146:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var n=t(7843),i=t(9445),a=t(3111);e.audit=function(o){return n.operate(function(s,u){var l=!1,c=null,f=null,d=!1,h=function(){if(f==null||f.unsubscribe(),f=null,l){l=!1;var g=c;c=null,u.next(g)}d&&u.complete()},p=function(){f=null,d&&u.complete()};s.subscribe(a.createOperatorSubscriber(u,function(g){l=!0,c=g,f||i.innerFrom(o(g)).subscribe(f=a.createOperatorSubscriber(u,h,p))},function(){d=!0,(!l||!f||f.closed)&&u.complete()}))})}},3206:(r,e,t)=>{r.exports=function(E){var T,P,I,k=0,L=0,B=u,j=[],z=[],H=1,q=0,W=0,$=!1,J=!1,X="",Z=a,ue=n;(E=E||{}).version==="300 es"&&(Z=s,ue=o);var re={},ne={};for(k=0;k=Ae)return A;var qe=U-il(ee);if(qe<1)return ee;var $e=Le?mn(Le,0,qe).join(""):A.slice(0,qe);if(ve===t)return $e+ee;if(Le&&(qe+=$e.length-qe),pg(ve)){if(A.slice(qe).search(ve)){var Ot,Tt=$e;for(ve.global||(ve=al(ve.source,li(gn.exec(ve))+"g")),ve.lastIndex=0;Ot=ve.exec(Tt);)var Pt=Ot.index;$e=$e.slice(0,Pt===t?qe:Pt)}}else if(A.indexOf(Or(ve),qe)!=qe){var Qt=$e.lastIndexOf(ve);Qt>-1&&($e=$e.slice(0,Qt))}return $e+ee}function qE(A){return A=li(A),A&&Yt.test(A)?A.replace(Rt,jc):A}var Z_=ud(function(A,D,U){return A+(U?" ":"")+D.toUpperCase()}),Qh=Ud("toUpperCase");function Q_(A,D,U){return A=li(A),D=U?t:D,D===t?Nd(A)?Bc(A):Fn(A):A.match(D)||[]}var F0=Pe(function(A,D){try{return pt(A,t,D)}catch(U){return Py(U)?U:new Pr(U)}}),qy=El(function(A,D){return ir(D,function(U){U=Rs(U),Ro(A,U,Ty(A[U],A))}),A});function J_(A){var D=A==null?0:A.length,U=br();return A=D?xi(A,function(ee){if(typeof ee[1]!="function")throw new Ei(o);return[U(ee[0]),ee[1]]}):[],Pe(function(ee){for(var ve=-1;++veW)return[];var U=X,ee=Sn(A,X);D=br(D),A-=X;for(var ve=Yf(ee,D);++U0||D<0)?new Yr(U):(A<0?U=U.takeRight(-A):A&&(U=U.drop(A)),D!==t&&(D=zr(D),U=D<0?U.dropRight(-D):U.take(D-A)),U)},Yr.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Yr.prototype.toArray=function(){return this.take(X)},xs(Yr.prototype,function(A,D){var U=/^(?:filter|find|map|reject)|While$/.test(D),ee=/^(?:head|last)$/.test(D),ve=xe[ee?"take"+(D=="last"?"Right":""):D],Ae=ee||/^find/.test(D);ve&&(xe.prototype[D]=function(){var Le=this.__wrapped__,qe=ee?[1]:arguments,$e=Le instanceof Yr,Ot=qe[0],Tt=$e||rn(Le),Pt=function(Bn){var Xn=ve.apply(xe,ba([Bn],qe));return ee&&Qt?Xn[0]:Xn};Tt&&U&&typeof Ot=="function"&&Ot.length!=1&&($e=Tt=!1);var Qt=this.__chain__,pr=!!this.__actions__.length,qr=Ae&&!Qt,Tn=$e&&!pr;if(!Ae&&Tt){Le=Tn?Le:new Yr(this);var Gr=A.apply(Le,qe);return Gr.__actions__.push({func:$h,args:[Pt],thisArg:t}),new ar(Gr,Qt)}return qr&&Tn?A.apply(this,qe):(Gr=this.thru(Pt),qr?ee?Gr.value()[0]:Gr.value():Gr)})}),ir(["pop","push","shift","sort","splice","unshift"],function(A){var D=nn[A],U=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",ee=/^(?:pop|shift)$/.test(A);xe.prototype[A]=function(){var ve=arguments;if(ee&&!this.__chain__){var Ae=this.value();return D.apply(rn(Ae)?Ae:[],ve)}return this[U](function(Le){return D.apply(rn(Le)?Le:[],ve)})}}),xs(Yr.prototype,function(A,D){var U=xe[D];if(U){var ee=U.name+"";Jr.call(Rn,ee)||(Rn[ee]=[]),Rn[ee].push({name:D,func:U})}}),Rn[zd(t,b).name]=[{name:"wrapper",func:t}],Yr.prototype.clone=Tu,Yr.prototype.reverse=_s,Yr.prototype.value=Cu,xe.prototype.at=xy,xe.prototype.chain=Kd,xe.prototype.commit=yo,xe.prototype.next=Zd,xe.prototype.plant=hd,xe.prototype.reverse=u0,xe.prototype.toJSON=xe.prototype.valueOf=xe.prototype.value=l0,xe.prototype.first=xe.prototype.head,Yi&&(xe.prototype[Yi]=zv),xe}),ic=Hs();aa?((aa.exports=ic)._=ic,Jl._=ic):wi._=ic}).call(bie)})(mb,mb.exports)),mb.exports}var UR,L6;function _ie(){if(L6)return UR;L6=1,UR=r;function r(){var n={};n._next=n._prev=n,this._sentinel=n}r.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return e(i),i},r.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&e(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},r.prototype.toString=function(){for(var n=[],i=this._sentinel,a=i._prev;a!==i;)n.push(JSON.stringify(a,t)),a=a._prev;return"["+n.join(", ")+"]"};function e(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function t(n,i){if(n!=="_next"&&n!=="_prev")return i}return UR}var zR,j6;function wie(){if(j6)return zR;j6=1;var r=Sa(),e=Uf().Graph,t=_ie();zR=i;var n=r.constant(1);function i(l,c){if(l.nodeCount()<=1)return[];var f=s(l,c||n),d=a(f.graph,f.buckets,f.zeroIdx);return r.flatten(r.map(d,function(h){return l.outEdges(h.v,h.w)}),!0)}function a(l,c,f){for(var d=[],h=c[c.length-1],p=c[0],g;l.nodeCount();){for(;g=p.dequeue();)o(l,c,f,g);for(;g=h.dequeue();)o(l,c,f,g);if(l.nodeCount()){for(var y=c.length-2;y>0;--y)if(g=c[y].dequeue(),g){d=d.concat(o(l,c,f,g,!0));break}}}return d}function o(l,c,f,d,h){var p=h?[]:void 0;return r.forEach(l.inEdges(d.v),function(g){var y=l.edge(g),b=l.node(g.v);h&&p.push({v:g.v,w:g.w}),b.out-=y,u(c,f,b)}),r.forEach(l.outEdges(d.v),function(g){var y=l.edge(g),b=g.w,_=l.node(b);_.in-=y,u(c,f,_)}),l.removeNode(d.v),p}function s(l,c){var f=new e,d=0,h=0;r.forEach(l.nodes(),function(y){f.setNode(y,{v:y,in:0,out:0})}),r.forEach(l.edges(),function(y){var b=f.edge(y.v,y.w)||0,_=c(y),m=b+_;f.setEdge(y.v,y.w,m),h=Math.max(h,f.node(y.v).out+=_),d=Math.max(d,f.node(y.w).in+=_)});var p=r.range(h+d+3).map(function(){return new t}),g=d+1;return r.forEach(f.nodes(),function(y){u(p,g,f.node(y))}),{graph:f,buckets:p,zeroIdx:g}}function u(l,c,f){f.out?f.in?l[f.out-f.in+c].enqueue(f):l[l.length-1].enqueue(f):l[0].enqueue(f)}return zR}var qR,B6;function xie(){if(B6)return qR;B6=1;var r=Sa(),e=wie();qR={run:t,undo:i};function t(a){var o=a.graph().acyclicer==="greedy"?e(a,s(a)):n(a);r.forEach(o,function(u){var l=a.edge(u);a.removeEdge(u),l.forwardName=u.name,l.reversed=!0,a.setEdge(u.w,u.v,l,r.uniqueId("rev"))});function s(u){return function(l){return u.edge(l).weight}}}function n(a){var o=[],s={},u={};function l(c){r.has(u,c)||(u[c]=!0,s[c]=!0,r.forEach(a.outEdges(c),function(f){r.has(s,f.w)?o.push(f):l(f.w)}),delete s[c])}return r.forEach(a.nodes(),l),o}function i(a){r.forEach(a.edges(),function(o){var s=a.edge(o);if(s.reversed){a.removeEdge(o);var u=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(o.w,o.v,s,u)}})}return qR}var GR,F6;function Rc(){if(F6)return GR;F6=1;var r=Sa(),e=Uf().Graph;GR={addDummyNode:t,simplify:n,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:s,buildLayerMatrix:u,normalizeRanks:l,removeEmptyRanks:c,addBorderNode:f,maxRank:d,partition:h,time:p,notime:g};function t(y,b,_,m){var x;do x=r.uniqueId(m);while(y.hasNode(x));return _.dummy=b,y.setNode(x,_),x}function n(y){var b=new e().setGraph(y.graph());return r.forEach(y.nodes(),function(_){b.setNode(_,y.node(_))}),r.forEach(y.edges(),function(_){var m=b.edge(_.v,_.w)||{weight:0,minlen:1},x=y.edge(_);b.setEdge(_.v,_.w,{weight:m.weight+x.weight,minlen:Math.max(m.minlen,x.minlen)})}),b}function i(y){var b=new e({multigraph:y.isMultigraph()}).setGraph(y.graph());return r.forEach(y.nodes(),function(_){y.children(_).length||b.setNode(_,y.node(_))}),r.forEach(y.edges(),function(_){b.setEdge(_,y.edge(_))}),b}function a(y){var b=r.map(y.nodes(),function(_){var m={};return r.forEach(y.outEdges(_),function(x){m[x.w]=(m[x.w]||0)+y.edge(x).weight}),m});return r.zipObject(y.nodes(),b)}function o(y){var b=r.map(y.nodes(),function(_){var m={};return r.forEach(y.inEdges(_),function(x){m[x.v]=(m[x.v]||0)+y.edge(x).weight}),m});return r.zipObject(y.nodes(),b)}function s(y,b){var _=y.x,m=y.y,x=b.x-_,S=b.y-m,O=y.width/2,E=y.height/2;if(!x&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var T,P;return Math.abs(S)*O>Math.abs(x)*E?(S<0&&(E=-E),T=E*x/S,P=E):(x<0&&(O=-O),T=O,P=O*S/x),{x:_+T,y:m+P}}function u(y){var b=r.map(r.range(d(y)+1),function(){return[]});return r.forEach(y.nodes(),function(_){var m=y.node(_),x=m.rank;r.isUndefined(x)||(b[x][m.order]=_)}),b}function l(y){var b=r.min(r.map(y.nodes(),function(_){return y.node(_).rank}));r.forEach(y.nodes(),function(_){var m=y.node(_);r.has(m,"rank")&&(m.rank-=b)})}function c(y){var b=r.min(r.map(y.nodes(),function(S){return y.node(S).rank})),_=[];r.forEach(y.nodes(),function(S){var O=y.node(S).rank-b;_[O]||(_[O]=[]),_[O].push(S)});var m=0,x=y.graph().nodeRankFactor;r.forEach(_,function(S,O){r.isUndefined(S)&&O%x!==0?--m:m&&r.forEach(S,function(E){y.node(E).rank+=m})})}function f(y,b,_,m){var x={width:0,height:0};return arguments.length>=4&&(x.rank=_,x.order=m),t(y,"border",x,b)}function d(y){return r.max(r.map(y.nodes(),function(b){var _=y.node(b).rank;if(!r.isUndefined(_))return _}))}function h(y,b){var _={lhs:[],rhs:[]};return r.forEach(y,function(m){b(m)?_.lhs.push(m):_.rhs.push(m)}),_}function p(y,b){var _=r.now();try{return b()}finally{console.log(y+" time: "+(r.now()-_)+"ms")}}function g(y,b){return b()}return GR}var VR,U6;function Eie(){if(U6)return VR;U6=1;var r=Sa(),e=Rc();VR={run:t,undo:i};function t(a){a.graph().dummyChains=[],r.forEach(a.edges(),function(o){n(a,o)})}function n(a,o){var s=o.v,u=a.node(s).rank,l=o.w,c=a.node(l).rank,f=o.name,d=a.edge(o),h=d.labelRank;if(c!==u+1){a.removeEdge(o);var p,g,y;for(y=0,++u;uP.lim&&(I=P,k=!0);var L=r.filter(x.edges(),function(B){return k===_(m,m.node(B.v),I)&&k!==_(m,m.node(B.w),I)});return r.minBy(L,function(B){return t(x,B)})}function g(m,x,S,O){var E=S.v,T=S.w;m.removeEdge(E,T),m.setEdge(O.v,O.w,{}),f(m),u(m,x),y(m,x)}function y(m,x){var S=r.find(m.nodes(),function(E){return!x.node(E).parent}),O=i(m,S);O=O.slice(1),r.forEach(O,function(E){var T=m.node(E).parent,P=x.edge(E,T),I=!1;P||(P=x.edge(T,E),I=!0),x.node(E).rank=x.node(T).rank+(I?P.minlen:-P.minlen)})}function b(m,x,S){return m.hasEdge(x,S)}function _(m,x,S){return S.low<=x.lim&&x.lim<=S.lim}return YR}var XR,V6;function Oie(){if(V6)return XR;V6=1;var r=Gx(),e=r.longestPath,t=pz(),n=Sie();XR=i;function i(u){switch(u.graph().ranker){case"network-simplex":s(u);break;case"tight-tree":o(u);break;case"longest-path":a(u);break;default:s(u)}}var a=e;function o(u){e(u),t(u)}function s(u){n(u)}return XR}var $R,H6;function Tie(){if(H6)return $R;H6=1;var r=Sa();$R=e;function e(i){var a=n(i);r.forEach(i.graph().dummyChains,function(o){for(var s=i.node(o),u=s.edgeObj,l=t(i,a,u.v,u.w),c=l.path,f=l.lca,d=0,h=c[d],p=!0;o!==u.w;){if(s=i.node(o),p){for(;(h=c[d])!==f&&i.node(h).maxRankc||f>a[d].lim));for(h=d,d=s;(d=i.parent(d))!==h;)l.push(d);return{path:u.concat(l.reverse()),lca:h}}function n(i){var a={},o=0;function s(u){var l=o;r.forEach(i.children(u),s),a[u]={low:l,lim:o++}}return r.forEach(i.children(),s),a}return $R}var KR,W6;function Cie(){if(W6)return KR;W6=1;var r=Sa(),e=Rc();KR={run:t,cleanup:o};function t(s){var u=e.addDummyNode(s,"root",{},"_root"),l=i(s),c=r.max(r.values(l))-1,f=2*c+1;s.graph().nestingRoot=u,r.forEach(s.edges(),function(h){s.edge(h).minlen*=f});var d=a(s)+1;r.forEach(s.children(),function(h){n(s,u,f,d,c,l,h)}),s.graph().nodeRankFactor=f}function n(s,u,l,c,f,d,h){var p=s.children(h);if(!p.length){h!==u&&s.setEdge(u,h,{weight:0,minlen:l});return}var g=e.addBorderNode(s,"_bt"),y=e.addBorderNode(s,"_bb"),b=s.node(h);s.setParent(g,h),b.borderTop=g,s.setParent(y,h),b.borderBottom=y,r.forEach(p,function(_){n(s,u,l,c,f,d,_);var m=s.node(_),x=m.borderTop?m.borderTop:_,S=m.borderBottom?m.borderBottom:_,O=m.borderTop?c:2*c,E=x!==S?1:f-d[h]+1;s.setEdge(g,x,{weight:O,minlen:E,nestingEdge:!0}),s.setEdge(S,y,{weight:O,minlen:E,nestingEdge:!0})}),s.parent(h)||s.setEdge(u,g,{weight:0,minlen:f+d[h]})}function i(s){var u={};function l(c,f){var d=s.children(c);d&&d.length&&r.forEach(d,function(h){l(h,f+1)}),u[c]=f}return r.forEach(s.children(),function(c){l(c,1)}),u}function a(s){return r.reduce(s.edges(),function(u,l){return u+s.edge(l).weight},0)}function o(s){var u=s.graph();s.removeNode(u.nestingRoot),delete u.nestingRoot,r.forEach(s.edges(),function(l){var c=s.edge(l);c.nestingEdge&&s.removeEdge(l)})}return KR}var ZR,Y6;function Aie(){if(Y6)return ZR;Y6=1;var r=Sa(),e=Rc();ZR=t;function t(i){function a(o){var s=i.children(o),u=i.node(o);if(s.length&&r.forEach(s,a),r.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var l=u.minRank,c=u.maxRank+1;l0;)h%2&&(p+=c[h+1]),h=h-1>>1,c[h]+=d.weight;f+=d.weight*p})),f}return eP}var tP,Z6;function Die(){if(Z6)return tP;Z6=1;var r=Sa();tP=e;function e(t,n){return r.map(n,function(i){var a=t.inEdges(i);if(a.length){var o=r.reduce(a,function(s,u){var l=t.edge(u),c=t.node(u.v);return{sum:s.sum+l.weight*c.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:i,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:i}})}return tP}var rP,Q6;function kie(){if(Q6)return rP;Q6=1;var r=Sa();rP=e;function e(i,a){var o={};r.forEach(i,function(u,l){var c=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:l};r.isUndefined(u.barycenter)||(c.barycenter=u.barycenter,c.weight=u.weight)}),r.forEach(a.edges(),function(u){var l=o[u.v],c=o[u.w];!r.isUndefined(l)&&!r.isUndefined(c)&&(c.indegree++,l.out.push(o[u.w]))});var s=r.filter(o,function(u){return!u.indegree});return t(s)}function t(i){var a=[];function o(l){return function(c){c.merged||(r.isUndefined(c.barycenter)||r.isUndefined(l.barycenter)||c.barycenter>=l.barycenter)&&n(l,c)}}function s(l){return function(c){c.in.push(l),--c.indegree===0&&i.push(c)}}for(;i.length;){var u=i.pop();a.push(u),r.forEach(u.in.reverse(),o(u)),r.forEach(u.out,s(u))}return r.map(r.filter(a,function(l){return!l.merged}),function(l){return r.pick(l,["vs","i","barycenter","weight"])})}function n(i,a){var o=0,s=0;i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),a.weight&&(o+=a.barycenter*a.weight,s+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/s,i.weight=s,i.i=Math.min(a.i,i.i),a.merged=!0}return rP}var nP,J6;function Iie(){if(J6)return nP;J6=1;var r=Sa(),e=Rc();nP=t;function t(a,o){var s=e.partition(a,function(g){return r.has(g,"barycenter")}),u=s.lhs,l=r.sortBy(s.rhs,function(g){return-g.i}),c=[],f=0,d=0,h=0;u.sort(i(!!o)),h=n(c,l,h),r.forEach(u,function(g){h+=g.vs.length,c.push(g.vs),f+=g.barycenter*g.weight,d+=g.weight,h=n(c,l,h)});var p={vs:r.flatten(c,!0)};return d&&(p.barycenter=f/d,p.weight=d),p}function n(a,o,s){for(var u;o.length&&(u=r.last(o)).i<=s;)o.pop(),a.push(u.vs),s++;return s}function i(a){return function(o,s){return o.barycenters.barycenter?1:a?s.i-o.i:o.i-s.i}}return nP}var iP,e8;function Nie(){if(e8)return iP;e8=1;var r=Sa(),e=Die(),t=kie(),n=Iie();iP=i;function i(s,u,l,c){var f=s.children(u),d=s.node(u),h=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,g={};h&&(f=r.filter(f,function(S){return S!==h&&S!==p}));var y=e(s,f);r.forEach(y,function(S){if(s.children(S.v).length){var O=i(s,S.v,l,c);g[S.v]=O,r.has(O,"barycenter")&&o(S,O)}});var b=t(y,l);a(b,g);var _=n(b,c);if(h&&(_.vs=r.flatten([h,_.vs,p],!0),s.predecessors(h).length)){var m=s.node(s.predecessors(h)[0]),x=s.node(s.predecessors(p)[0]);r.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+m.order+x.order)/(_.weight+2),_.weight+=2}return _}function a(s,u){r.forEach(s,function(l){l.vs=r.flatten(l.vs.map(function(c){return u[c]?u[c].vs:c}),!0)})}function o(s,u){r.isUndefined(s.barycenter)?(s.barycenter=u.barycenter,s.weight=u.weight):(s.barycenter=(s.barycenter*s.weight+u.barycenter*u.weight)/(s.weight+u.weight),s.weight+=u.weight)}return iP}var aP,t8;function Lie(){if(t8)return aP;t8=1;var r=Sa(),e=Uf().Graph;aP=t;function t(i,a,o){var s=n(i),u=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(l){return i.node(l)});return r.forEach(i.nodes(),function(l){var c=i.node(l),f=i.parent(l);(c.rank===a||c.minRank<=a&&a<=c.maxRank)&&(u.setNode(l),u.setParent(l,f||s),r.forEach(i[o](l),function(d){var h=d.v===l?d.w:d.v,p=u.edge(h,l),g=r.isUndefined(p)?0:p.weight;u.setEdge(h,l,{weight:i.edge(d).weight+g})}),r.has(c,"minRank")&&u.setNode(l,{borderLeft:c.borderLeft[a],borderRight:c.borderRight[a]}))}),u}function n(i){for(var a;i.hasNode(a=r.uniqueId("_root")););return a}return aP}var oP,r8;function jie(){if(r8)return oP;r8=1;var r=Sa();oP=e;function e(t,n,i){var a={},o;r.forEach(i,function(s){for(var u=t.parent(s),l,c;u;){if(l=t.parent(u),l?(c=a[l],a[l]=u):(c=o,o=u),c&&c!==u){n.setEdge(c,u);return}u=l}})}return oP}var sP,n8;function Bie(){if(n8)return sP;n8=1;var r=Sa(),e=Pie(),t=Mie(),n=Nie(),i=Lie(),a=jie(),o=Uf().Graph,s=Rc();sP=u;function u(d){var h=s.maxRank(d),p=l(d,r.range(1,h+1),"inEdges"),g=l(d,r.range(h-1,-1,-1),"outEdges"),y=e(d);f(d,y);for(var b=Number.POSITIVE_INFINITY,_,m=0,x=0;x<4;++m,++x){c(m%2?p:g,m%4>=2),y=s.buildLayerMatrix(d);var S=t(d,y);S1e3)return m;function x(O,E,T,P,I){var k;r.forEach(r.range(E,T),function(L){k=O[L],b.node(k).dummy&&r.forEach(b.predecessors(k),function(B){var j=b.node(B);j.dummy&&(j.orderI)&&o(m,B,k)})})}function S(O,E){var T=-1,P,I=0;return r.forEach(E,function(k,L){if(b.node(k).dummy==="border"){var B=b.predecessors(k);B.length&&(P=b.node(B[0]).order,x(E,I,L,T,P),I=L,T=P)}x(E,I,E.length,P,O.length)}),E}return r.reduce(_,S),m}function a(b,_){if(b.node(_).dummy)return r.find(b.predecessors(_),function(m){return b.node(m).dummy})}function o(b,_,m){if(_>m){var x=_;_=m,m=x}var S=b[_];S||(b[_]=S={}),S[m]=!0}function s(b,_,m){if(_>m){var x=_;_=m,m=x}return r.has(b[_],m)}function u(b,_,m,x){var S={},O={},E={};return r.forEach(_,function(T){r.forEach(T,function(P,I){S[P]=P,O[P]=P,E[P]=I})}),r.forEach(_,function(T){var P=-1;r.forEach(T,function(I){var k=x(I);if(k.length){k=r.sortBy(k,function(H){return E[H]});for(var L=(k.length-1)/2,B=Math.floor(L),j=Math.ceil(L);B<=j;++B){var z=k[B];O[I]===I&&P0?e[0].width:0,u=a>0?e[0].height:0;for(this.root={x:0,y:0,width:s,height:u},t=0;t=this.root.width+e,o=n&&this.root.width>=this.root.height+t;return a?this.growRight(e,t):o?this.growDown(e,t):i?this.growRight(e,t):n?this.growDown(e,t):null},growRight:function(e,t){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}};var n;return(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null},growDown:function(e,t){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};var n;return(n=this.findNode(this.root,e,t))?this.splitNode(n,e,t):null}},vP=r,vP}var pP,f8;function Yie(){if(f8)return pP;f8=1;var r=Wie();return pP=function(e,t){t=t||{};var n=new r,i=t.inPlace||!1,a=e.map(function(l){return i?l:{width:l.width,height:l.height,item:l}});a=a.sort(function(l,c){return c.width*c.height-l.width*l.height}),n.fit(a);var o=a.reduce(function(l,c){return Math.max(l,c.x+c.width)},0),s=a.reduce(function(l,c){return Math.max(l,c.y+c.height)},0),u={width:o,height:s};return i||(u.items=a),u},pP}var Xie=Yie();const $ie=Bp(Xie);var Kie=Uf();const Zie=Bp(Kie),Qie="tight-tree",rv=100,yz="up",DD="down",Jie="left",mz="right",eae={[yz]:"BT",[DD]:"TB",[Jie]:"RL",[mz]:"LR"},tae="bin",rae=25,nae=1/.38,iae=r=>r===yz||r===DD,aae=r=>r===DD||r===mz,gP=r=>{let e=null,t=null,n=null,i=null,a=null,o=null,s=null,u=null;for(const l of r.nodes()){const c=r.node(l);(a===null||c.xs)&&(s=c.x),(u===null||c.y>u)&&(u=c.y);const f=Math.ceil(c.width/2);(e===null||c.x-fn)&&(n=c.x+f),(i===null||c.y+f>i)&&(i=c.y+f)}return{minX:e,minY:t,maxX:n,maxY:i,minCenterX:a,minCenterY:o,maxCenterX:s,maxCenterY:u,width:n-e,height:i-t,xOffset:a-e,yOffset:o-t}},bz=r=>{const e=new gz.graphlib.Graph;return e.setGraph({}),e.setDefaultEdgeLabel(()=>({})),e.graph().nodesep=75*r,e.graph().ranksep=75*r,e},d8=(r,e,t)=>{const{rank:n}=t.node(r);let i=null,a=null;for(const o of e){const{rank:s}=t.node(o);if(!(o===r||s>=n))if(s===n-1){i=s,a=o;break}else(i===null&&a===null||s>i)&&(i=s,a=o)}return a},oae=(r,e)=>{let t=d8(r,e.predecessors(r),e);return t===null&&(t=d8(r,e.successors(r),e)),t},sae=(r,e)=>{const t=[],n=Zie.alg.components(r);if(n.length>1)for(const i of n){const a=bz(e);for(const o of i){const s=r.node(o);a.setNode(o,{width:s.width,height:s.height});const u=r.outEdges(o);if(u)for(const l of u)a.setEdge(l.v,l.w)}t.push(a)}else t.push(r);return t},h8=(r,e,t)=>{r.graph().ranker=Qie,r.graph().rankdir=eae[e];const n=gz.layout(r);for(const i of n.nodes()){const a=oae(i,n);a!==null&&(t[i]=a)}},yP=(r,e)=>Math.sqrt((r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y)),uae=r=>{const e=[r[0]];let t={p1:r[0],p2:r[1]},n=yP(t.p1,t.p2);for(let i=2;i{const s=bz(o),u={},l={x:0,y:0},c=r.length;for(const m of r){const x=t[m.id];l.x+=(x==null?void 0:x.x)||0,l.y+=(x==null?void 0:x.y)||0;const S=(m.size||rae)*nae*o;s.setNode(m.id,{width:S,height:S})}const f=c?[l.x/c,l.y/c]:[0,0],d={};for(const m of n)if(e[m.from]&&e[m.to]&&m.from!==m.to){const x=m.from1){h.forEach(E=>h8(E,i,u));const m=iae(i),x=aae(i),S=h.filter(E=>E.nodeCount()===1),O=h.filter(E=>E.nodeCount()!==1);if(a===tae){O.sort((q,W)=>W.nodeCount()-q.nodeCount());const P=m?({width:q,height:W,...$})=>({...$,width:q+rv,height:W+rv}):({width:q,height:W,...$})=>({...$,width:W+rv,height:q+rv}),I=O.map(gP).map(P),k=S.map(gP).map(P),L=I.concat(k);$ie(L,{inPlace:!0});const B=Math.floor(rv/2),j=m?"x":"y",z=m?"y":"x";if(!x){const q=m?"y":"x",W=m?"height":"width",$=L.reduce((X,Z)=>X===null?Z[q]:Math.min(Z[q],X[W]||0),null),J=L.reduce((X,Z)=>X===null?Z[q]+Z[W]:Math.max(Z[q]+Z[W],X[W]||0),null);L.forEach(X=>{X[q]=$+(J-(X[q]+X[W]))})}const H=(q,W)=>{for(const $ of q.nodes()){const J=q.node($),X=s.node($);X.x=J.x-W.xOffset+W[j]+B,X.y=J.y-W.yOffset+W[z]+B}};for(let q=0;q$.nodeCount()-W.nodeCount():(W,$)=>W.nodeCount()-$.nodeCount());const E=O.map(gP),T=S.reduce((W,$)=>W+s.node($.nodes()[0]).width,0),P=S.reduce((W,$)=>Math.max(W,s.node($.nodes()[0]).width),0),I=S.length>0?T+(S.length-1)*rv:0,k=E.reduce((W,{width:$})=>Math.max(W,$),0),L=Math.max(k,I),B=E.reduce((W,{height:$})=>Math.max(W,$),0),j=Math.max(B,I);let z=0;const H=()=>{for(let W=0;W3&&(re.points=ue.points.map(({x:ne,y:le})=>({x:ne-J.minX+(m?X:z),y:le-J.minY+(m?z:X)})))}z+=(m?J.height:J.width)+rv}},q=()=>{const W=Math.floor(((m?L:j)-I)/2);z+=Math.floor(P/2);let $=W;for(const J of S){const X=J.nodes()[0],Z=s.node(X);m?(Z.x=$+Math.floor(Z.width/2),Z.y=z):(Z.x=z,Z.y=$+Math.floor(Z.width/2)),$+=rv+Z.width}z=P+rv};x?(H(),q()):(q(),H())}}else h8(s,i,u);l.x=0,l.y=0;const p={};for(const m of s.nodes()){const x=s.node(m);l.x+=x.x||0,l.y+=x.y||0,p[m]={x:x.x,y:x.y}}const g=c?[l.x/c,l.y/c]:[0,0],y=f[0]-g[0],b=f[1]-g[1];for(const m in p)p[m].x+=y,p[m].y+=b;const _={};for(const m of s.edges()){const x=s.edge(m);if(x.points&&x.points.length>3){const S=uae(x.points);for(const O of S)O.x+=y,O.y+=b;_[`${m.v}-${m.w}`]={points:[...S],from:{x:p[m.v].x,y:p[m.v].y},to:{x:p[m.w].x,y:p[m.w].y}},_[`${m.w}-${m.v}`]={points:S.reverse(),from:{x:p[m.w].x,y:p[m.w].y},to:{x:p[m.v].x,y:p[m.v].y}}}}return{positions:p,parents:u,waypoints:_}};class cae{start(){}postMessage(e){const{nodes:t,nodeIds:n,idToPosition:i,rels:a,direction:o,packing:s,pixelRatio:u,forcedDelay:l=0}=e,c=lae(t,n,i,a,o,s,u);l?setTimeout(()=>{this.onmessage({data:c})},l):this.onmessage({data:c})}onmessage(){}close(){}}const fae={port:new cae},dae=()=>new SharedWorker(new URL(""+new URL("HierarchicalLayout.worker-DFULhk2a.js",import.meta.url).href,import.meta.url),{type:"module",name:"HierarchicalLayout"}),hae=Object.freeze(Object.defineProperty({__proto__:null,coseBilkentLayoutFallbackWorker:qte,createCoseBilkentLayoutWorker:Gte,createHierarchicalLayoutWorker:dae,hierarchicalLayoutFallbackWorker:fae},Symbol.toStringTag,{value:"Module"}));/*! For license information please see base.mjs.LICENSE.txt */var vae={5:function(r,e,t){var n=this&&this.__extends||(function(){var m=function(x,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(O[T]=E[T])},m(x,S)};return function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=x}m(x,S),x.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var i=t(1018),a=t(8014),o=t(3413),s=t(7315),u=t(1342),l=t(9052),c=t(9155),f=t(9223),d=(function(m){function x(S){var O=m.call(this)||this;return O.isStopped=!1,S?(O.destination=S,a.isSubscription(S)&&S.add(O)):O.destination=e.EMPTY_OBSERVER,O}return n(x,m),x.create=function(S,O,E){return new y(S,O,E)},x.prototype.next=function(S){this.isStopped?_(l.nextNotification(S),this):this._next(S)},x.prototype.error=function(S){this.isStopped?_(l.errorNotification(S),this):(this.isStopped=!0,this._error(S))},x.prototype.complete=function(){this.isStopped?_(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},x.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,m.prototype.unsubscribe.call(this),this.destination=null)},x.prototype._next=function(S){this.destination.next(S)},x.prototype._error=function(S){try{this.destination.error(S)}finally{this.unsubscribe()}},x.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},x})(a.Subscription);e.Subscriber=d;var h=Function.prototype.bind;function p(m,x){return h.call(m,x)}var g=(function(){function m(x){this.partialObserver=x}return m.prototype.next=function(x){var S=this.partialObserver;if(S.next)try{S.next(x)}catch(O){b(O)}},m.prototype.error=function(x){var S=this.partialObserver;if(S.error)try{S.error(x)}catch(O){b(O)}else b(x)},m.prototype.complete=function(){var x=this.partialObserver;if(x.complete)try{x.complete()}catch(S){b(S)}},m})(),y=(function(m){function x(S,O,E){var T,P,I=m.call(this)||this;return i.isFunction(S)||!S?T={next:S??void 0,error:O??void 0,complete:E??void 0}:I&&o.config.useDeprecatedNextContext?((P=Object.create(S)).unsubscribe=function(){return I.unsubscribe()},T={next:S.next&&p(S.next,P),error:S.error&&p(S.error,P),complete:S.complete&&p(S.complete,P)}):T=S,I.destination=new g(T),I}return n(x,m),x})(d);function b(m){o.config.useDeprecatedSynchronousErrorHandling?f.captureError(m):s.reportUnhandledError(m)}function _(m,x){var S=o.config.onStoppedNotification;S&&c.timeoutProvider.setTimeout(function(){return S(m,x)})}e.SafeSubscriber=y,e.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(m){throw m},complete:u.noop}},45:function(r,e){var t=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var n=(function(){function a(o){this.position=0,this.length=o}return a.prototype.getUInt8=function(o){throw new Error("Not implemented")},a.prototype.getInt8=function(o){throw new Error("Not implemented")},a.prototype.getFloat64=function(o){throw new Error("Not implemented")},a.prototype.getVarInt=function(o){throw new Error("Not implemented")},a.prototype.putUInt8=function(o,s){throw new Error("Not implemented")},a.prototype.putInt8=function(o,s){throw new Error("Not implemented")},a.prototype.putFloat64=function(o,s){throw new Error("Not implemented")},a.prototype.getInt16=function(o){return this.getInt8(o)<<8|this.getUInt8(o+1)},a.prototype.getUInt16=function(o){return this.getUInt8(o)<<8|this.getUInt8(o+1)},a.prototype.getInt32=function(o){return this.getInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},a.prototype.getUInt32=function(o){return this.getUInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},a.prototype.getInt64=function(o){return this.getInt8(o)<<56|this.getUInt8(o+1)<<48|this.getUInt8(o+2)<<40|this.getUInt8(o+3)<<32|this.getUInt8(o+4)<<24|this.getUInt8(o+5)<<16|this.getUInt8(o+6)<<8|this.getUInt8(o+7)},a.prototype.getSlice=function(o,s){return new i(o,s,this)},a.prototype.putInt16=function(o,s){this.putInt8(o,s>>8),this.putUInt8(o+1,255&s)},a.prototype.putUInt16=function(o,s){this.putUInt8(o,s>>8&255),this.putUInt8(o+1,255&s)},a.prototype.putInt32=function(o,s){this.putInt8(o,s>>24),this.putUInt8(o+1,s>>16&255),this.putUInt8(o+2,s>>8&255),this.putUInt8(o+3,255&s)},a.prototype.putUInt32=function(o,s){this.putUInt8(o,s>>24&255),this.putUInt8(o+1,s>>16&255),this.putUInt8(o+2,s>>8&255),this.putUInt8(o+3,255&s)},a.prototype.putInt64=function(o,s){this.putInt8(o,s>>48),this.putUInt8(o+1,s>>42&255),this.putUInt8(o+2,s>>36&255),this.putUInt8(o+3,s>>30&255),this.putUInt8(o+4,s>>24&255),this.putUInt8(o+5,s>>16&255),this.putUInt8(o+6,s>>8&255),this.putUInt8(o+7,255&s)},a.prototype.putVarInt=function(o,s){for(var u=0;s>1;){var l=s%128;s>=128&&(l+=128),s/=128,this.putUInt8(o+u,l),u+=1}return u},a.prototype.putBytes=function(o,s){for(var u=0,l=s.remaining();u0},a.prototype.reset=function(){this.position=0},a.prototype.toString=function(){return this.constructor.name+"( position="+this.position+` ) + `+this.toHex()},a.prototype.toHex=function(){for(var o="",s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.getBrokenObjectReason=e.isBrokenObject=e.createBrokenObject=void 0;var t="__isBrokenObject__",n="__reason__";e.createBrokenObject=function(i,a){a===void 0&&(a={});var o=function(){throw i};return new Proxy(a,{get:function(s,u){return u===t||(u===n?i:void(u!=="toJSON"&&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})},e.isBrokenObject=function(i){return i!==null&&typeof i=="object"&&i[t]===!0},e.getBrokenObjectReason=function(i){return i[n]}},95:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncSubject=void 0;var i=(function(a){function o(){var s=a!==null&&a.apply(this,arguments)||this;return s._value=null,s._hasValue=!1,s._isComplete=!1,s}return n(o,a),o.prototype._checkFinalizedStatuses=function(s){var u=this,l=u.hasError,c=u._hasValue,f=u._value,d=u.thrownError,h=u.isStopped,p=u._isComplete;l?s.error(d):(h||p)&&(c&&s.next(f),s.complete())},o.prototype.next=function(s){this.isStopped||(this._value=s,this._hasValue=!0)},o.prototype.complete=function(){var s=this,u=s._hasValue,l=s._value;s._isComplete||(this._isComplete=!0,u&&a.prototype.next.call(this,l),a.prototype.complete.call(this))},o})(t(2483).Subject);e.AsyncSubject=i},137:r=>{r.exports=class{constructor(e,t,n,i){let a;if(typeof e=="object"){let o=e;e=o.k_p,t=o.k_i,n=o.k_d,i=o.dt,a=o.i_max}this.k_p=typeof e=="number"?e:1,this.k_i=t||0,this.k_d=n||0,this.dt=i||0,this.i_max=a||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 a=Date.now();t=this.lastTime===0?0:(a-this.lastTime)/1e3,this.lastTime=a}typeof t=="number"&&t!==0||(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 a=this.sumError>0?1:-1;this.sumError=a*this.i_max}let i=(n-this.lastError)/t;return this.lastError=n,this.k_p*n+this.k_i*this.sumError+this.k_d*i}reset(){this.sumError=0,this.lastError=0,this.lastTime=0}}},182:function(r,e,t){var n=this&&this.__extends||(function(){var u=function(l,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(f[h]=d[h])},u(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}u(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualAction=e.VirtualTimeScheduler=void 0;var i=t(5267),a=t(8014),o=(function(u){function l(c,f){c===void 0&&(c=s),f===void 0&&(f=1/0);var d=u.call(this,c,function(){return d.frame})||this;return d.maxFrames=f,d.frame=0,d.index=-1,d}return n(l,u),l.prototype.flush=function(){for(var c,f,d=this.actions,h=this.maxFrames;(f=d[0])&&f.delay<=h&&(d.shift(),this.frame=f.delay,!(c=f.execute(f.state,f.delay))););if(c){for(;f=d.shift();)f.unsubscribe();throw c}},l.frameTimeFactor=10,l})(t(5648).AsyncScheduler);e.VirtualTimeScheduler=o;var s=(function(u){function l(c,f,d){d===void 0&&(d=c.index+=1);var h=u.call(this,c,f)||this;return h.scheduler=c,h.work=f,h.index=d,h.active=!0,h.index=c.index=d,h}return n(l,u),l.prototype.schedule=function(c,f){if(f===void 0&&(f=0),Number.isFinite(f)){if(!this.id)return u.prototype.schedule.call(this,c,f);this.active=!1;var d=new l(this.scheduler,this.work);return this.add(d),d.schedule(c,f)}return a.Subscription.EMPTY},l.prototype.requestAsyncId=function(c,f,d){d===void 0&&(d=0),this.delay=c.frame+d;var h=c.actions;return h.push(this),h.sort(l.sortActions),1},l.prototype.recycleAsyncId=function(c,f,d){},l.prototype._execute=function(c,f){if(this.active===!0)return u.prototype._execute.call(this,c,f)},l.sortActions=function(c,f){return c.delay===f.delay?c.index===f.index?0:c.index>f.index?1:-1:c.delay>f.delay?1:-1},l})(i.AsyncAction);e.VirtualAction=s},187:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.zipAll=void 0;var n=t(7286),i=t(3638);e.zipAll=function(a){return i.joinAllInternals(n.zip,a)}},206:function(r,e,t){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingTable=e.Rediscovery=void 0;var i=n(t(4151));e.Rediscovery=i.default;var a=n(t(9018));e.RoutingTable=a.default,e.default=i.default},245:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.not=void 0,e.not=function(t,n){return function(i,a){return!t.call(n,i,a)}}},269:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.startWith=void 0;var n=t(3865),i=t(1107),a=t(7843);e.startWith=function(){for(var o=[],s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.TELEMETRY_APIS=e.BOLT_PROTOCOL_V5_8=e.BOLT_PROTOCOL_V5_7=e.BOLT_PROTOCOL_V5_6=e.BOLT_PROTOCOL_V5_5=e.BOLT_PROTOCOL_V5_4=e.BOLT_PROTOCOL_V5_3=e.BOLT_PROTOCOL_V5_2=e.BOLT_PROTOCOL_V5_1=e.BOLT_PROTOCOL_V5_0=e.BOLT_PROTOCOL_V4_4=e.BOLT_PROTOCOL_V4_3=e.BOLT_PROTOCOL_V4_2=e.BOLT_PROTOCOL_V4_1=e.BOLT_PROTOCOL_V4_0=e.BOLT_PROTOCOL_V3=e.BOLT_PROTOCOL_V2=e.BOLT_PROTOCOL_V1=e.DEFAULT_POOL_MAX_SIZE=e.DEFAULT_POOL_ACQUISITION_TIMEOUT=e.DEFAULT_CONNECTION_TIMEOUT_MILLIS=e.ACCESS_MODE_WRITE=e.ACCESS_MODE_READ=e.FETCH_ALL=void 0,e.FETCH_ALL=-1,e.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,e.DEFAULT_POOL_MAX_SIZE=100,e.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,e.ACCESS_MODE_READ="READ",e.ACCESS_MODE_WRITE="WRITE",e.BOLT_PROTOCOL_V1=1,e.BOLT_PROTOCOL_V2=2,e.BOLT_PROTOCOL_V3=3,e.BOLT_PROTOCOL_V4_0=4,e.BOLT_PROTOCOL_V4_1=4.1,e.BOLT_PROTOCOL_V4_2=4.2,e.BOLT_PROTOCOL_V4_3=4.3,e.BOLT_PROTOCOL_V4_4=4.4,e.BOLT_PROTOCOL_V5_0=5,e.BOLT_PROTOCOL_V5_1=5.1,e.BOLT_PROTOCOL_V5_2=5.2,e.BOLT_PROTOCOL_V5_3=5.3,e.BOLT_PROTOCOL_V5_4=5.4,e.BOLT_PROTOCOL_V5_5=5.5,e.BOLT_PROTOCOL_V5_6=5.6,e.BOLT_PROTOCOL_V5_7=5.7,e.BOLT_PROTOCOL_V5_8=5.8,e.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3}},347:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fromEventPattern=void 0;var n=t(4662),i=t(1018),a=t(1251);e.fromEventPattern=function o(s,u,l){return l?o(s,u).pipe(a.mapOneOrManyArgs(l)):new n.Observable(function(c){var f=function(){for(var h=[],p=0;p0)&&!(d=p.next()).done;)g.push(d.value)}catch(y){h={error:y}}finally{try{d&&!d.done&&(f=p.return)&&f.call(p)}finally{if(h)throw h.error}}return g},i=this&&this.__spreadArray||function(l,c){for(var f=0,d=c.length,h=l.length;f0;)this._ensure(1),this._buffer.remaining()>h.remaining()?this._buffer.writeBytes(h):this._buffer.writeBytes(h.readSlice(this._buffer.remaining()));return this},f.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var d=this._buffer;this._buffer=null,this._ch.write(d.getSlice(0,d.position)),this._buffer=(0,o.alloc)(this._bufferSize),this._chunkOpen=!1}return this},f.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},f.prototype._ensure=function(d){var h=this._chunkOpen?d:d+2;this._buffer.remaining()=2?this._onHeader(f.readUInt16()):(this._partialChunkHeader=f.readUInt8()<<8,this.IN_HEADER)},c.prototype.IN_HEADER=function(f){return this._onHeader(65535&(this._partialChunkHeader|f.readUInt8()))},c.prototype.IN_CHUNK=function(f){return this._chunkSize<=f.remaining()?(this._currentMessage.push(f.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=f.remaining(),this._currentMessage.push(f.readSlice(f.remaining())),this.IN_CHUNK)},c.prototype.CLOSED=function(f){},c.prototype._onHeader=function(f){if(f===0){var d=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:d=this._currentMessage[0];break;default:d=new s.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(d),this.AWAITING_CHUNK}return this._chunkSize=f,this.IN_CHUNK},c.prototype.write=function(f){for(;f.hasRemaining();)this._state=this._state(f)},c})();e.Dechunker=l},378:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultIfEmpty=void 0;var n=t(7843),i=t(3111);e.defaultIfEmpty=function(a){return n.operate(function(o,s){var u=!1;o.subscribe(i.createOperatorSubscriber(s,function(l){u=!0,s.next(l)},function(){u||s.next(a),s.complete()}))})}},397:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertNotificationFilterIsEmpty=e.assertImpersonatedUserIsEmpty=e.assertTxConfigIsEmpty=e.assertDatabaseIsEmpty=void 0;var n=t(9305);t(9014),e.assertTxConfigIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i&&!i.isEmpty()){var s=(0,n.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 a(s.message),o.onError(s),s}},e.assertDatabaseIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i){var s=(0,n.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 a(s.message),o.onError(s),s}},e.assertImpersonatedUserIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i){var s=(0,n.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(i,"."));throw a(s.message),o.onError(s),s}},e.assertNotificationFilterIsEmpty=function(i,a,o){if(a===void 0&&(a=function(){}),i!==void 0){var s=(0,n.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(n.json.stringify(i),"."));throw a(s.message),o.onError(s),s}}},407:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(c){for(var f,d=1,h=arguments.length;d0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y};Object.defineProperty(e,"__esModule",{value:!0}),e.Url=e.formatIPv6Address=e.formatIPv4Address=e.defaultPortForScheme=e.parseDatabaseUrl=void 0;var a=t(6587),o=function(c,f,d,h,p){this.scheme=c,this.host=f,this.port=d,this.hostAndPort=h,this.query=p};function s(c,f,d){if((c=(c??"").trim())==="")throw new Error("Illegal empty ".concat(f," in URL query '").concat(d,"'"));return c}function u(c){var f=c.charAt(0)==="[",d=c.charAt(c.length-1)==="]";if(f||d){if(f&&d)return c;throw new Error("Illegal IPv6 address ".concat(c))}return"[".concat(c,"]")}function l(c){return c==="http"?7474:c==="https"?7473:7687}e.Url=o,e.parseDatabaseUrl=function(c){var f;(0,a.assertString)(c,"URL");var d,h=(function(S){return(S=S.trim()).includes("://")?{schemeMissing:!1,url:S}:{schemeMissing:!0,url:"none://".concat(S)}})(c),p=(function(S){function O(P,I){var k=P.indexOf(I);return k>=0?[P.substring(0,k),P[k],P.substring(k+1)]:[P,"",""]}var E,T={};return(E=O(S,":"))[1]===":"&&(T.scheme=decodeURIComponent(E[0]),S=E[2]),(E=O(S,"#"))[1]==="#"&&(T.fragment=decodeURIComponent(E[2]),S=E[0]),(E=O(S,"?"))[1]==="?"&&(T.query=E[2],S=E[0]),S.startsWith("//")?(E=O(S.substr(2),"/"),(T=n(n({},T),(function(P){var I,k,L,B,j={};(k=P,L="@",B=k.lastIndexOf(L),I=B>=0?[k.substring(0,B),k[B],k.substring(B+1)]:["","",k])[1]==="@"&&(j.userInfo=decodeURIComponent(I[0]),P=I[2]);var z=i((function(W,$,J){var X=O(W,$),Z=O(X[2],J);return[Z[0],Z[2]]})(P,"[","]"),2),H=z[0],q=z[1];return H!==""?(j.host=H,I=O(q,":")):(I=O(P,":"),j.host=I[0]),I[1]===":"&&(j.port=I[2]),j})(E[0]))).path=E[1]+E[2]):T.path=S,T})(h.url),g=h.schemeMissing?null:(function(S){return S!=null?((S=S.trim()).charAt(S.length-1)===":"&&(S=S.substring(0,S.length-1)),S):null})(p.scheme),y=(function(S){if(S==null)throw new Error("Unable to extract host from null or undefined URL");return S.trim()})(p.host),b=(function(S){if(S===""||S==null)throw new Error("Illegal host ".concat(S));return S.includes(":")?u(S):S})(y),_=(function(S,O){var E=typeof S=="string"?parseInt(S,10):S;return E==null||isNaN(E)?l(O):E})(p.port,g),m="".concat(b,":").concat(_),x=(function(S,O){var E=S!=null?(function(P){return((P=(P??"").trim())==null?void 0:P.charAt(0))==="?"&&(P=P.substring(1,P.length)),P})(S):null,T={};return E!=null&&E.split("&").forEach(function(P){var I=P.split("=");if(I.length!==2)throw new Error("Invalid parameters: '".concat(I.toString(),"' in URL '").concat(O,"'."));var k=s(I[0],"key",O),L=s(I[1],"value",O);if(T[k]!==void 0)throw new Error("Duplicated query parameters with key '".concat(k,"' in URL '").concat(O,"'"));T[k]=L}),T})((f=p.query)!==null&&f!==void 0?f:typeof(d=p.resourceName)!="string"?null:i(d.split("?"),2)[1],c);return new o(g,y,_,m,x)},e.formatIPv4Address=function(c,f){return"".concat(c,":").concat(f)},e.formatIPv6Address=function(c,f){var d=u(c);return"".concat(d,":").concat(f)},e.defaultPortForScheme=l},481:(r,e,t)=>{r.exports=t(137)},489:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TimeInterval=e.timeInterval=void 0;var n=t(7961),i=t(7843),a=t(3111);e.timeInterval=function(s){return s===void 0&&(s=n.asyncScheduler),i.operate(function(u,l){var c=s.now();u.subscribe(a.createOperatorSubscriber(l,function(f){var d=s.now(),h=d-c;c=d,l.next(new o(f,h))}))})};var o=function(s,u){this.value=s,this.interval=u};e.TimeInterval=o},490:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreElements=void 0;var n=t(7843),i=t(3111),a=t(1342);e.ignoreElements=function(){return n.operate(function(o,s){o.subscribe(i.createOperatorSubscriber(s,a.noop))})}},582:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sequenceEqual=void 0;var n=t(7843),i=t(3111),a=t(9445);e.sequenceEqual=function(o,s){return s===void 0&&(s=function(u,l){return u===l}),n.operate(function(u,l){var c={buffer:[],complete:!1},f={buffer:[],complete:!1},d=function(p){l.next(p),l.complete()},h=function(p,g){var y=i.createOperatorSubscriber(l,function(b){var _=g.buffer,m=g.complete;_.length===0?m?d(!1):p.buffer.push(b):!s(b,_.shift())&&d(!1)},function(){p.complete=!0;var b=g.complete,_=g.buffer;b&&d(_.length===0),y==null||y.unsubscribe()});return y};u.subscribe(h(c,f)),a.innerFrom(o).subscribe(h(f,c))})}},614:function(r,e){var t=this&&this.__awaiter||function(i,a,o,s){return new(o||(o=Promise))(function(u,l){function c(h){try{d(s.next(h))}catch(p){l(p)}}function f(h){try{d(s.throw(h))}catch(p){l(p)}}function d(h){var p;h.done?u(h.value):(p=h.value,p instanceof o?p:new o(function(g){g(p)})).then(c,f)}d((s=s.apply(i,a||[])).next())})},n=this&&this.__generator||function(i,a){var o,s,u,l,c={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(d){return function(h){return(function(p){if(o)throw new TypeError("Generator is already executing.");for(;l&&(l=0,p[0]&&(c=0)),c;)try{if(o=1,s&&(u=2&p[0]?s.return:p[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,p[1])).done)return u;switch(s=0,u&&(p=[2&p[0],u.value]),p[0]){case 0:case 1:u=p;break;case 4:return c.label++,{value:p[1],done:!1};case 5:c.label++,s=p[1],p=[0];continue;case 7:p=c.ops.pop(),c.trys.pop();continue;default:if(!((u=(u=c.trys).length>0&&u[u.length-1])||p[0]!==6&&p[0]!==2)){c=0;continue}if(p[0]===3&&(!u||p[1]>u[0]&&p[1]{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(i){this._offset=i||0}return n.prototype.next=function(i){if(i===0)return-1;var a=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),a%i},n})();e.default=t},754:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(f,d,h,p){p===void 0&&(p=h);var g=Object.getOwnPropertyDescriptor(d,h);g&&!("get"in g?!d.__esModule:g.writable||g.configurable)||(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(f,p,g)}:function(f,d,h,p){p===void 0&&(p=h),f[p]=d[h]}),i=this&&this.__setModuleDefault||(Object.create?function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}:function(f,d){f.default=d}),a=this&&this.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var h in f)h!=="default"&&Object.prototype.hasOwnProperty.call(f,h)&&n(d,f,h);return i(d,f),d};Object.defineProperty(e,"__esModule",{value:!0}),e.TxConfig=void 0;var o=a(t(6587)),s=t(9691),u=t(3371),l=(function(){function f(d,h){(function(p){p!=null&&o.assertObject(p,"Transaction config")})(d),this.timeout=(function(p,g){if(o.isObject(p)&&p.timeout!=null){o.assertNumberOrInteger(p.timeout,"Transaction timeout"),(function(b){return typeof b.timeout=="number"&&!Number.isInteger(b.timeout)})(p)&&(g==null?void 0:g.isInfoEnabled())===!0&&(g==null||g.info("Transaction timeout expected to be an integer, got: ".concat(p.timeout,". The value will be rounded up.")));var y=(0,u.int)(p.timeout,{ceilFloat:!0});if(y.isNegative())throw(0,s.newError)("Transaction timeout should not be negative");return y}return null})(d,h),this.metadata=(function(p){if(o.isObject(p)&&p.metadata!=null){var g=p.metadata;if(o.assertObject(g,"config.metadata"),Object.keys(g).length!==0)return g}return null})(d)}return f.empty=function(){return c},f.prototype.isEmpty=function(){return Object.values(this).every(function(d){return d==null})},f})();e.TxConfig=l;var c=new l({})},766:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publish=void 0;var n=t(2483),i=t(9247),a=t(1483);e.publish=function(o){return o?function(s){return a.connect(o)(s)}:function(s){return i.multicast(new n.Subject)(s)}}},783:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.filter=void 0;var n=t(7843),i=t(3111);e.filter=function(a,o){return n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){return a.call(o,c,l++)&&u.next(c)}))})}},827:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapScheduler=void 0;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.flush=function(s){this._active=!0;var u=this._scheduled;this._scheduled=void 0;var l,c=this.actions;s=s||c.shift();do if(l=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===u&&c.shift());if(this._active=!1,l){for(;(s=c[0])&&s.id===u&&c.shift();)s.unsubscribe();throw l}},o})(t(5648).AsyncScheduler);e.AsapScheduler=i},844:function(r,e,t){var n=this&&this.__extends||(function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[_]=b[_])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function y(){this.constructor=p}h(p,g),p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}})(),i=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(1711)),o=t(397),s=i(t(7449)),u=i(t(3321)),l=i(t(7021)),c=t(9014),f=t(9305).internal.constants.BOLT_PROTOCOL_V5_0,d=(function(h){function p(){return h!==null&&h.apply(this,arguments)||this}return n(p,h),Object.defineProperty(p.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"transformer",{get:function(){var g=this;return this._transformer===void 0&&(this._transformer=new u.default(Object.values(s.default).map(function(y){return y(g._config,g._log)}))),this._transformer},enumerable:!1,configurable:!0}),p.prototype.initialize=function(g){var y=this,b=g===void 0?{}:g,_=b.userAgent,m=(b.boltAgent,b.authToken),x=b.notificationFilter,S=b.onError,O=b.onComplete,E=new c.LoginObserver({onError:function(T){return y._onLoginError(T,S)},onCompleted:function(T){return y._onLoginCompleted(T,m,O)}});return(0,o.assertNotificationFilterIsEmpty)(x,this._onProtocolError,E),this.write(l.default.hello(_,m,this._serversideRouting),E,!0),E},p})(a.default);e.default=d},846:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.take=void 0;var n=t(8616),i=t(7843),a=t(3111);e.take=function(o){return o<=0?function(){return n.EMPTY}:i.operate(function(s,u){var l=0;s.subscribe(a.createOperatorSubscriber(u,function(c){++l<=o&&(u.next(c),o<=l&&u.complete())}))})}},854:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAsyncIterable=void 0;var n=t(4662),i=t(7110);e.scheduleAsyncIterable=function(a,o){if(!a)throw new Error("Iterable cannot be null");return new n.Observable(function(s){i.executeSchedule(s,o,function(){var u=a[Symbol.asyncIterator]();i.executeSchedule(s,o,function(){u.next().then(function(l){l.done?s.complete():s.next(l.value)})},0,!0)})})}},914:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0;var n=t(7961),i=t(8766),a=t(4092);e.delay=function(o,s){s===void 0&&(s=n.asyncScheduler);var u=a.timer(o,s);return i.delayWhen(function(){return u})}},934:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(g){for(var y,b=1,_=arguments.length;b<_;b++)for(var m in y=arguments[b])Object.prototype.hasOwnProperty.call(y,m)&&(g[m]=y[m]);return g},i.apply(this,arguments)},a=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0});var o=a(t(6345)),s=a(t(3019)),u=a(t(3321)),l=a(t(7021)),c=t(9014),f=t(9305).internal.constants,d=f.BOLT_PROTOCOL_V5_2,h=f.FETCH_ALL,p=(function(g){function y(){return g!==null&&g.apply(this,arguments)||this}return n(y,g),Object.defineProperty(y.prototype,"version",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"transformer",{get:function(){var b=this;return this._transformer===void 0&&(this._transformer=new u.default(Object.values(s.default).map(function(_){return _(b._config,b._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),y.prototype.initialize=function(b){var _=this,m=b===void 0?{}:b,x=m.userAgent,S=(m.boltAgent,m.authToken),O=m.notificationFilter,E=m.onError,T=m.onComplete,P={},I=new c.LoginObserver({onError:function(k){return _._onLoginError(k,E)},onCompleted:function(k){return P.metadata=k,_._onLoginCompleted(k)}});return this.write(l.default.hello5x2(x,O,this._serversideRouting),I,!1),this.logon({authToken:S,onComplete:function(k){return T(i(i({},k),P.metadata))},onError:E,flush:!0})},y.prototype.beginTransaction=function(b){var _=b===void 0?{}:b,m=_.bookmarks,x=_.txConfig,S=_.database,O=_.mode,E=_.impersonatedUser,T=_.notificationFilter,P=_.beforeError,I=_.afterError,k=_.beforeComplete,L=_.afterComplete,B=new c.ResultStreamObserver({server:this._server,beforeError:P,afterError:I,beforeComplete:k,afterComplete:L});return B.prepareToHandleSingleResponse(),this.write(l.default.begin({bookmarks:m,txConfig:x,database:S,mode:O,impersonatedUser:E,notificationFilter:T}),B,!0),B},y.prototype.run=function(b,_,m){var x=m===void 0?{}:m,S=x.bookmarks,O=x.txConfig,E=x.database,T=x.mode,P=x.impersonatedUser,I=x.notificationFilter,k=x.beforeKeys,L=x.afterKeys,B=x.beforeError,j=x.afterError,z=x.beforeComplete,H=x.afterComplete,q=x.flush,W=q===void 0||q,$=x.reactive,J=$!==void 0&&$,X=x.fetchSize,Z=X===void 0?h:X,ue=x.highRecordWatermark,re=ue===void 0?Number.MAX_VALUE:ue,ne=x.lowRecordWatermark,le=ne===void 0?Number.MAX_VALUE:ne,ce=new c.ResultStreamObserver({server:this._server,reactive:J,fetchSize:Z,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:k,afterKeys:L,beforeError:B,afterError:j,beforeComplete:z,afterComplete:H,highRecordWatermark:re,lowRecordWatermark:le}),pe=J;return this.write(l.default.runWithMetadata(b,_,{bookmarks:S,txConfig:O,database:E,mode:T,impersonatedUser:P,notificationFilter:I}),ce,pe&&W),J||this.write(l.default.pull({n:Z}),ce,W),ce},y})(o.default);e.default=p},983:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMap=void 0;var n=t(5471),i=t(9445),a=t(7843),o=t(1983),s=t(1018);e.mergeMap=function u(l,c,f){return f===void 0&&(f=1/0),s.isFunction(c)?u(function(d,h){return n.map(function(p,g){return c(d,p,h,g)})(i.innerFrom(l(d,h)))},f):(typeof c=="number"&&(f=c),a.operate(function(d,h){return o.mergeInternals(d,h,l,f)}))}},1004:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.of=void 0;var n=t(1107),i=t(4917);e.of=function(){for(var a=[],o=0;o{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return typeof t=="function"}},1038:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.count=void 0;var n=t(9139);e.count=function(i){return n.reduce(function(a,o,s){return!i||i(o,s)?a+1:a},0)}},1048:(r,e,t)=>{const n=t(7991),i=t(9318),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(Y){return+Y!=Y&&(Y=0),u.alloc(+Y)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function s(Y){if(Y>o)throw new RangeError('The value "'+Y+'" is invalid for option "size"');const Q=new Uint8Array(Y);return Object.setPrototypeOf(Q,u.prototype),Q}function u(Y,Q,ie){if(typeof Y=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(Y)}return l(Y,Q,ie)}function l(Y,Q,ie){if(typeof Y=="string")return(function(Me,Ie){if(typeof Ie=="string"&&Ie!==""||(Ie="utf8"),!u.isEncoding(Ie))throw new TypeError("Unknown encoding: "+Ie);const Ye=0|g(Me,Ie);let ot=s(Ye);const mt=ot.write(Me,Ie);return mt!==Ye&&(ot=ot.slice(0,mt)),ot})(Y,Q);if(ArrayBuffer.isView(Y))return(function(Me){if(Oe(Me,Uint8Array)){const Ie=new Uint8Array(Me);return h(Ie.buffer,Ie.byteOffset,Ie.byteLength)}return d(Me)})(Y);if(Y==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y);if(Oe(Y,ArrayBuffer)||Y&&Oe(Y.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Oe(Y,SharedArrayBuffer)||Y&&Oe(Y.buffer,SharedArrayBuffer)))return h(Y,Q,ie);if(typeof Y=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const we=Y.valueOf&&Y.valueOf();if(we!=null&&we!==Y)return u.from(we,Q,ie);const Ee=(function(Me){if(u.isBuffer(Me)){const Ie=0|p(Me.length),Ye=s(Ie);return Ye.length===0||Me.copy(Ye,0,0,Ie),Ye}return Me.length!==void 0?typeof Me.length!="number"||ke(Me.length)?s(0):d(Me):Me.type==="Buffer"&&Array.isArray(Me.data)?d(Me.data):void 0})(Y);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Y[Symbol.toPrimitive]=="function")return u.from(Y[Symbol.toPrimitive]("string"),Q,ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Y)}function c(Y){if(typeof Y!="number")throw new TypeError('"size" argument must be of type number');if(Y<0)throw new RangeError('The value "'+Y+'" is invalid for option "size"')}function f(Y){return c(Y),s(Y<0?0:0|p(Y))}function d(Y){const Q=Y.length<0?0:0|p(Y.length),ie=s(Q);for(let we=0;we=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|Y}function g(Y,Q){if(u.isBuffer(Y))return Y.length;if(ArrayBuffer.isView(Y)||Oe(Y,ArrayBuffer))return Y.byteLength;if(typeof Y!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Y);const ie=Y.length,we=arguments.length>2&&arguments[2]===!0;if(!we&&ie===0)return 0;let Ee=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return ie;case"utf8":case"utf-8":return se(Y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ie;case"hex":return ie>>>1;case"base64":return de(Y).length;default:if(Ee)return we?-1:se(Y).length;Q=(""+Q).toLowerCase(),Ee=!0}}function y(Y,Q,ie){let we=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((ie===void 0||ie>this.length)&&(ie=this.length),ie<=0)||(ie>>>=0)<=(Q>>>=0))return"";for(Y||(Y="utf8");;)switch(Y){case"hex":return j(this,Q,ie);case"utf8":case"utf-8":return I(this,Q,ie);case"ascii":return L(this,Q,ie);case"latin1":case"binary":return B(this,Q,ie);case"base64":return P(this,Q,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,Q,ie);default:if(we)throw new TypeError("Unknown encoding: "+Y);Y=(Y+"").toLowerCase(),we=!0}}function b(Y,Q,ie){const we=Y[Q];Y[Q]=Y[ie],Y[ie]=we}function _(Y,Q,ie,we,Ee){if(Y.length===0)return-1;if(typeof ie=="string"?(we=ie,ie=0):ie>2147483647?ie=2147483647:ie<-2147483648&&(ie=-2147483648),ke(ie=+ie)&&(ie=Ee?0:Y.length-1),ie<0&&(ie=Y.length+ie),ie>=Y.length){if(Ee)return-1;ie=Y.length-1}else if(ie<0){if(!Ee)return-1;ie=0}if(typeof Q=="string"&&(Q=u.from(Q,we)),u.isBuffer(Q))return Q.length===0?-1:m(Y,Q,ie,we,Ee);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(Y,Q,ie):Uint8Array.prototype.lastIndexOf.call(Y,Q,ie):m(Y,[Q],ie,we,Ee);throw new TypeError("val must be string, number or Buffer")}function m(Y,Q,ie,we,Ee){let Me,Ie=1,Ye=Y.length,ot=Q.length;if(we!==void 0&&((we=String(we).toLowerCase())==="ucs2"||we==="ucs-2"||we==="utf16le"||we==="utf-16le")){if(Y.length<2||Q.length<2)return-1;Ie=2,Ye/=2,ot/=2,ie/=2}function mt(wt,Mt){return Ie===1?wt[Mt]:wt.readUInt16BE(Mt*Ie)}if(Ee){let wt=-1;for(Me=ie;MeYe&&(ie=Ye-ot),Me=ie;Me>=0;Me--){let wt=!0;for(let Mt=0;MtEe&&(we=Ee):we=Ee;const Me=Q.length;let Ie;for(we>Me/2&&(we=Me/2),Ie=0;Ie>8,ot=Ie%256,mt.push(ot),mt.push(Ye);return mt})(Q,Y.length-ie),Y,ie,we)}function P(Y,Q,ie){return Q===0&&ie===Y.length?n.fromByteArray(Y):n.fromByteArray(Y.slice(Q,ie))}function I(Y,Q,ie){ie=Math.min(Y.length,ie);const we=[];let Ee=Q;for(;Ee239?4:Me>223?3:Me>191?2:1;if(Ee+Ye<=ie){let ot,mt,wt,Mt;switch(Ye){case 1:Me<128&&(Ie=Me);break;case 2:ot=Y[Ee+1],(192&ot)==128&&(Mt=(31&Me)<<6|63&ot,Mt>127&&(Ie=Mt));break;case 3:ot=Y[Ee+1],mt=Y[Ee+2],(192&ot)==128&&(192&mt)==128&&(Mt=(15&Me)<<12|(63&ot)<<6|63&mt,Mt>2047&&(Mt<55296||Mt>57343)&&(Ie=Mt));break;case 4:ot=Y[Ee+1],mt=Y[Ee+2],wt=Y[Ee+3],(192&ot)==128&&(192&mt)==128&&(192&wt)==128&&(Mt=(15&Me)<<18|(63&ot)<<12|(63&mt)<<6|63&wt,Mt>65535&&Mt<1114112&&(Ie=Mt))}}Ie===null?(Ie=65533,Ye=1):Ie>65535&&(Ie-=65536,we.push(Ie>>>10&1023|55296),Ie=56320|1023&Ie),we.push(Ie),Ee+=Ye}return(function(Me){const Ie=Me.length;if(Ie<=k)return String.fromCharCode.apply(String,Me);let Ye="",ot=0;for(;ot"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(Y,Q,ie){return l(Y,Q,ie)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(Y,Q,ie){return(function(we,Ee,Me){return c(we),we<=0?s(we):Ee!==void 0?typeof Me=="string"?s(we).fill(Ee,Me):s(we).fill(Ee):s(we)})(Y,Q,ie)},u.allocUnsafe=function(Y){return f(Y)},u.allocUnsafeSlow=function(Y){return f(Y)},u.isBuffer=function(Y){return Y!=null&&Y._isBuffer===!0&&Y!==u.prototype},u.compare=function(Y,Q){if(Oe(Y,Uint8Array)&&(Y=u.from(Y,Y.offset,Y.byteLength)),Oe(Q,Uint8Array)&&(Q=u.from(Q,Q.offset,Q.byteLength)),!u.isBuffer(Y)||!u.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Y===Q)return 0;let ie=Y.length,we=Q.length;for(let Ee=0,Me=Math.min(ie,we);Eewe.length?(u.isBuffer(Me)||(Me=u.from(Me)),Me.copy(we,Ee)):Uint8Array.prototype.set.call(we,Me,Ee);else{if(!u.isBuffer(Me))throw new TypeError('"list" argument must be an Array of Buffers');Me.copy(we,Ee)}Ee+=Me.length}return we},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const Y=this.length;if(Y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Q=0;QQ&&(Y+=" ... "),""},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(Y,Q,ie,we,Ee){if(Oe(Y,Uint8Array)&&(Y=u.from(Y,Y.offset,Y.byteLength)),!u.isBuffer(Y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Y);if(Q===void 0&&(Q=0),ie===void 0&&(ie=Y?Y.length:0),we===void 0&&(we=0),Ee===void 0&&(Ee=this.length),Q<0||ie>Y.length||we<0||Ee>this.length)throw new RangeError("out of range index");if(we>=Ee&&Q>=ie)return 0;if(we>=Ee)return-1;if(Q>=ie)return 1;if(this===Y)return 0;let Me=(Ee>>>=0)-(we>>>=0),Ie=(ie>>>=0)-(Q>>>=0);const Ye=Math.min(Me,Ie),ot=this.slice(we,Ee),mt=Y.slice(Q,ie);for(let wt=0;wt>>=0,isFinite(ie)?(ie>>>=0,we===void 0&&(we="utf8")):(we=ie,ie=void 0)}const Ee=this.length-Q;if((ie===void 0||ie>Ee)&&(ie=Ee),Y.length>0&&(ie<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");let Me=!1;for(;;)switch(we){case"hex":return x(this,Y,Q,ie);case"utf8":case"utf-8":return S(this,Y,Q,ie);case"ascii":case"latin1":case"binary":return O(this,Y,Q,ie);case"base64":return E(this,Y,Q,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,Y,Q,ie);default:if(Me)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Me=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function L(Y,Q,ie){let we="";ie=Math.min(Y.length,ie);for(let Ee=Q;Eewe)&&(ie=we);let Ee="";for(let Me=Q;Meie)throw new RangeError("Trying to access beyond buffer length")}function q(Y,Q,ie,we,Ee,Me){if(!u.isBuffer(Y))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>Ee||QY.length)throw new RangeError("Index out of range")}function W(Y,Q,ie,we,Ee){le(Q,we,Ee,Y,ie,7);let Me=Number(Q&BigInt(4294967295));Y[ie++]=Me,Me>>=8,Y[ie++]=Me,Me>>=8,Y[ie++]=Me,Me>>=8,Y[ie++]=Me;let Ie=Number(Q>>BigInt(32)&BigInt(4294967295));return Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,Ie>>=8,Y[ie++]=Ie,ie}function $(Y,Q,ie,we,Ee){le(Q,we,Ee,Y,ie,7);let Me=Number(Q&BigInt(4294967295));Y[ie+7]=Me,Me>>=8,Y[ie+6]=Me,Me>>=8,Y[ie+5]=Me,Me>>=8,Y[ie+4]=Me;let Ie=Number(Q>>BigInt(32)&BigInt(4294967295));return Y[ie+3]=Ie,Ie>>=8,Y[ie+2]=Ie,Ie>>=8,Y[ie+1]=Ie,Ie>>=8,Y[ie]=Ie,ie+8}function J(Y,Q,ie,we,Ee,Me){if(ie+we>Y.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("Index out of range")}function X(Y,Q,ie,we,Ee){return Q=+Q,ie>>>=0,Ee||J(Y,0,ie,4),i.write(Y,Q,ie,we,23,4),ie+4}function Z(Y,Q,ie,we,Ee){return Q=+Q,ie>>>=0,Ee||J(Y,0,ie,8),i.write(Y,Q,ie,we,52,8),ie+8}u.prototype.slice=function(Y,Q){const ie=this.length;(Y=~~Y)<0?(Y+=ie)<0&&(Y=0):Y>ie&&(Y=ie),(Q=Q===void 0?ie:~~Q)<0?(Q+=ie)<0&&(Q=0):Q>ie&&(Q=ie),Q>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y],Ee=1,Me=0;for(;++Me>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y+--Q],Ee=1;for(;Q>0&&(Ee*=256);)we+=this[Y+--Q]*Ee;return we},u.prototype.readUint8=u.prototype.readUInt8=function(Y,Q){return Y>>>=0,Q||H(Y,1,this.length),this[Y]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(Y,Q){return Y>>>=0,Q||H(Y,2,this.length),this[Y]|this[Y+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(Y,Q){return Y>>>=0,Q||H(Y,2,this.length),this[Y]<<8|this[Y+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+16777216*this[Y+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),16777216*this[Y]+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},u.prototype.readBigUInt64LE=Ne(function(Y){ce(Y>>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=Q+256*this[++Y]+65536*this[++Y]+this[++Y]*2**24,Ee=this[++Y]+256*this[++Y]+65536*this[++Y]+ie*2**24;return BigInt(we)+(BigInt(Ee)<>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=Q*2**24+65536*this[++Y]+256*this[++Y]+this[++Y],Ee=this[++Y]*2**24+65536*this[++Y]+256*this[++Y]+ie;return(BigInt(we)<>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=this[Y],Ee=1,Me=0;for(;++Me=Ee&&(we-=Math.pow(2,8*Q)),we},u.prototype.readIntBE=function(Y,Q,ie){Y>>>=0,Q>>>=0,ie||H(Y,Q,this.length);let we=Q,Ee=1,Me=this[Y+--we];for(;we>0&&(Ee*=256);)Me+=this[Y+--we]*Ee;return Ee*=128,Me>=Ee&&(Me-=Math.pow(2,8*Q)),Me},u.prototype.readInt8=function(Y,Q){return Y>>>=0,Q||H(Y,1,this.length),128&this[Y]?-1*(255-this[Y]+1):this[Y]},u.prototype.readInt16LE=function(Y,Q){Y>>>=0,Q||H(Y,2,this.length);const ie=this[Y]|this[Y+1]<<8;return 32768&ie?4294901760|ie:ie},u.prototype.readInt16BE=function(Y,Q){Y>>>=0,Q||H(Y,2,this.length);const ie=this[Y+1]|this[Y]<<8;return 32768&ie?4294901760|ie:ie},u.prototype.readInt32LE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},u.prototype.readInt32BE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},u.prototype.readBigInt64LE=Ne(function(Y){ce(Y>>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=this[Y+4]+256*this[Y+5]+65536*this[Y+6]+(ie<<24);return(BigInt(we)<>>=0,"offset");const Q=this[Y],ie=this[Y+7];Q!==void 0&&ie!==void 0||pe(Y,this.length-8);const we=(Q<<24)+65536*this[++Y]+256*this[++Y]+this[++Y];return(BigInt(we)<>>=0,Q||H(Y,4,this.length),i.read(this,Y,!0,23,4)},u.prototype.readFloatBE=function(Y,Q){return Y>>>=0,Q||H(Y,4,this.length),i.read(this,Y,!1,23,4)},u.prototype.readDoubleLE=function(Y,Q){return Y>>>=0,Q||H(Y,8,this.length),i.read(this,Y,!0,52,8)},u.prototype.readDoubleBE=function(Y,Q){return Y>>>=0,Q||H(Y,8,this.length),i.read(this,Y,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(Y,Q,ie,we){Y=+Y,Q>>>=0,ie>>>=0,we||q(this,Y,Q,ie,Math.pow(2,8*ie)-1,0);let Ee=1,Me=0;for(this[Q]=255&Y;++Me>>=0,ie>>>=0,we||q(this,Y,Q,ie,Math.pow(2,8*ie)-1,0);let Ee=ie-1,Me=1;for(this[Q+Ee]=255&Y;--Ee>=0&&(Me*=256);)this[Q+Ee]=Y/Me&255;return Q+ie},u.prototype.writeUint8=u.prototype.writeUInt8=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,1,255,0),this[Q]=255&Y,Q+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,65535,0),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,65535,0),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,4294967295,0),this[Q+3]=Y>>>24,this[Q+2]=Y>>>16,this[Q+1]=Y>>>8,this[Q]=255&Y,Q+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,4294967295,0),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},u.prototype.writeBigUInt64LE=Ne(function(Y,Q=0){return W(this,Y,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Ne(function(Y,Q=0){return $(this,Y,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(Y,Q,ie,we){if(Y=+Y,Q>>>=0,!we){const Ye=Math.pow(2,8*ie-1);q(this,Y,Q,ie,Ye-1,-Ye)}let Ee=0,Me=1,Ie=0;for(this[Q]=255&Y;++Ee>>=0,!we){const Ye=Math.pow(2,8*ie-1);q(this,Y,Q,ie,Ye-1,-Ye)}let Ee=ie-1,Me=1,Ie=0;for(this[Q+Ee]=255&Y;--Ee>=0&&(Me*=256);)Y<0&&Ie===0&&this[Q+Ee+1]!==0&&(Ie=1),this[Q+Ee]=(Y/Me|0)-Ie&255;return Q+ie},u.prototype.writeInt8=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,1,127,-128),Y<0&&(Y=255+Y+1),this[Q]=255&Y,Q+1},u.prototype.writeInt16LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,32767,-32768),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},u.prototype.writeInt16BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,2,32767,-32768),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},u.prototype.writeInt32LE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,2147483647,-2147483648),this[Q]=255&Y,this[Q+1]=Y>>>8,this[Q+2]=Y>>>16,this[Q+3]=Y>>>24,Q+4},u.prototype.writeInt32BE=function(Y,Q,ie){return Y=+Y,Q>>>=0,ie||q(this,Y,Q,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},u.prototype.writeBigInt64LE=Ne(function(Y,Q=0){return W(this,Y,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Ne(function(Y,Q=0){return $(this,Y,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(Y,Q,ie){return X(this,Y,Q,!0,ie)},u.prototype.writeFloatBE=function(Y,Q,ie){return X(this,Y,Q,!1,ie)},u.prototype.writeDoubleLE=function(Y,Q,ie){return Z(this,Y,Q,!0,ie)},u.prototype.writeDoubleBE=function(Y,Q,ie){return Z(this,Y,Q,!1,ie)},u.prototype.copy=function(Y,Q,ie,we){if(!u.isBuffer(Y))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),we||we===0||(we=this.length),Q>=Y.length&&(Q=Y.length),Q||(Q=0),we>0&&we=this.length)throw new RangeError("Index out of range");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),Y.length-Q>>=0,ie=ie===void 0?this.length:ie>>>0,Y||(Y=0),typeof Y=="number")for(Ee=Q;Ee=we+4;ie-=3)Q=`_${Y.slice(ie-3,ie)}${Q}`;return`${Y.slice(0,ie)}${Q}`}function le(Y,Q,ie,we,Ee,Me){if(Y>ie||Y= 0${Ie} and < 2${Ie} ** ${8*(Me+1)}${Ie}`:`>= -(2${Ie} ** ${8*(Me+1)-1}${Ie}) and < 2 ** ${8*(Me+1)-1}${Ie}`,new ue.ERR_OUT_OF_RANGE("value",Ye,Y)}(function(Ie,Ye,ot){ce(Ye,"offset"),Ie[Ye]!==void 0&&Ie[Ye+ot]!==void 0||pe(Ye,Ie.length-(ot+1))})(we,Ee,Me)}function ce(Y,Q){if(typeof Y!="number")throw new ue.ERR_INVALID_ARG_TYPE(Q,"number",Y)}function pe(Y,Q,ie){throw Math.floor(Y)!==Y?(ce(Y,ie),new ue.ERR_OUT_OF_RANGE("offset","an integer",Y)):Q<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Q}`,Y)}re("ERR_BUFFER_OUT_OF_BOUNDS",function(Y){return Y?`${Y} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(Y,Q){return`The "${Y}" argument must be of type number. Received type ${typeof Q}`},TypeError),re("ERR_OUT_OF_RANGE",function(Y,Q,ie){let we=`The value of "${Y}" is out of range.`,Ee=ie;return Number.isInteger(ie)&&Math.abs(ie)>2**32?Ee=ne(String(ie)):typeof ie=="bigint"&&(Ee=String(ie),(ie>BigInt(2)**BigInt(32)||ie<-(BigInt(2)**BigInt(32)))&&(Ee=ne(Ee)),Ee+="n"),we+=` It must be ${Q}. Received ${Ee}`,we},RangeError);const fe=/[^+/0-9A-Za-z-_]/g;function se(Y,Q){let ie;Q=Q||1/0;const we=Y.length;let Ee=null;const Me=[];for(let Ie=0;Ie55295&&ie<57344){if(!Ee){if(ie>56319){(Q-=3)>-1&&Me.push(239,191,189);continue}if(Ie+1===we){(Q-=3)>-1&&Me.push(239,191,189);continue}Ee=ie;continue}if(ie<56320){(Q-=3)>-1&&Me.push(239,191,189),Ee=ie;continue}ie=65536+(Ee-55296<<10|ie-56320)}else Ee&&(Q-=3)>-1&&Me.push(239,191,189);if(Ee=null,ie<128){if((Q-=1)<0)break;Me.push(ie)}else if(ie<2048){if((Q-=2)<0)break;Me.push(ie>>6|192,63&ie|128)}else if(ie<65536){if((Q-=3)<0)break;Me.push(ie>>12|224,ie>>6&63|128,63&ie|128)}else{if(!(ie<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;Me.push(ie>>18|240,ie>>12&63|128,ie>>6&63|128,63&ie|128)}}return Me}function de(Y){return n.toByteArray((function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace(fe,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q})(Y))}function ge(Y,Q,ie,we){let Ee;for(Ee=0;Ee=Q.length||Ee>=Y.length);++Ee)Q[Ee+ie]=Y[Ee];return Ee}function Oe(Y,Q){return Y instanceof Q||Y!=null&&Y.constructor!=null&&Y.constructor.name!=null&&Y.constructor.name===Q.name}function ke(Y){return Y!=Y}const De=(function(){const Y="0123456789abcdef",Q=new Array(256);for(let ie=0;ie<16;++ie){const we=16*ie;for(let Ee=0;Ee<16;++Ee)Q[we+Ee]=Y[ie]+Y[Ee]}return Q})();function Ne(Y){return typeof BigInt>"u"?Te:Y}function Te(){throw new Error("BigInt not supported")}},1053:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.rawPolyfilledDiagnosticRecord=void 0,e.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(e.rawPolyfilledDiagnosticRecord)},1074:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isValidDate=void 0,e.isValidDate=function(t){return t instanceof Date&&!isNaN(t)}},1092:function(r,e,t){var n=this&&this.__extends||(function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,_){b.__proto__=_}||function(b,_){for(var m in _)Object.prototype.hasOwnProperty.call(_,m)&&(b[m]=_[m])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=g}p(g,y),g.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}})(),i=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(6377)),o=i(t(6161)),s=i(t(3321)),u=i(t(7021)),l=t(9014),c=t(9305).internal.constants,f=c.BOLT_PROTOCOL_V5_8,d=c.FETCH_ALL,h=(function(p){function g(){return p!==null&&p.apply(this,arguments)||this}return n(g,p),Object.defineProperty(g.prototype,"version",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"transformer",{get:function(){var y=this;return this._transformer===void 0&&(this._transformer=new s.default(Object.values(o.default).map(function(b){return b(y._config,y._log)}))),this._transformer},enumerable:!1,configurable:!0}),g.prototype.run=function(y,b,_){var m=_===void 0?{}:_,x=m.bookmarks,S=m.txConfig,O=m.database,E=m.mode,T=m.impersonatedUser,P=m.notificationFilter,I=m.beforeKeys,k=m.afterKeys,L=m.beforeError,B=m.afterError,j=m.beforeComplete,z=m.afterComplete,H=m.flush,q=H===void 0||H,W=m.reactive,$=W!==void 0&&W,J=m.fetchSize,X=J===void 0?d:J,Z=m.highRecordWatermark,ue=Z===void 0?Number.MAX_VALUE:Z,re=m.lowRecordWatermark,ne=re===void 0?Number.MAX_VALUE:re,le=m.onDb,ce=new l.ResultStreamObserver({server:this._server,reactive:$,fetchSize:X,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:I,afterKeys:k,beforeError:L,afterError:B,beforeComplete:j,afterComplete:z,highRecordWatermark:ue,lowRecordWatermark:ne,enrichMetadata:this._enrichMetadata,onDb:le}),pe=$;return this.write(u.default.runWithMetadata5x5(y,b,{bookmarks:x,txConfig:S,database:O,mode:E,impersonatedUser:T,notificationFilter:P}),ce,pe&&q),$||this.write(u.default.pull({n:X}),ce,q),ce},g})(a.default);e.default=h},1103:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0;var n=t(4662),i=t(1018);e.throwError=function(a,o){var s=i.isFunction(a)?a:function(){return a},u=function(l){return l.error(s())};return new n.Observable(o?function(l){return o.schedule(u,0,l)}:u)}},1107:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.popNumber=e.popScheduler=e.popResultSelector=void 0;var n=t(1018),i=t(8613);function a(o){return o[o.length-1]}e.popResultSelector=function(o){return n.isFunction(a(o))?o.pop():void 0},e.popScheduler=function(o){return i.isScheduler(a(o))?o.pop():void 0},e.popNumber=function(o,s){return typeof a(o)=="number"?o.pop():s}},1116:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isInteropObservable=void 0;var n=t(3327),i=t(1018);e.isInteropObservable=function(a){return i.isFunction(a[n.observable])}},1141:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.windowWhen=void 0;var n=t(2483),i=t(7843),a=t(3111),o=t(9445);e.windowWhen=function(s){return i.operate(function(u,l){var c,f,d=function(p){c.error(p),l.error(p)},h=function(){var p;f==null||f.unsubscribe(),c==null||c.complete(),c=new n.Subject,l.next(c.asObservable());try{p=o.innerFrom(s())}catch(g){return void d(g)}p.subscribe(f=a.createOperatorSubscriber(l,h,h,d))};h(),u.subscribe(a.createOperatorSubscriber(l,function(p){return c.next(p)},function(){c.complete(),l.complete()},d,function(){f==null||f.unsubscribe(),c=null}))})}},1175:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u0&&$[$.length-1])||ne[0]!==6&&ne[0]!==2)){X=0;continue}if(ne[0]===3&&(!$||ne[1]>$[0]&&ne[1]<$[3])){X.label=ne[1];break}if(ne[0]===6&&X.label<$[1]){X.label=$[1],$=ne;break}if($&&X.label<$[2]){X.label=$[2],X.ops.push(ne);break}$[2]&&X.ops.pop(),X.trys.pop();continue}ne=H.call(z,X)}catch(le){ne=[6,le],W=0}finally{q=$=0}if(5&ne[0])throw ne[1];return{value:ne[0]?ne[1]:void 0,done:!0}})([ue,re])}}},a=this&&this.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(e,"__esModule",{value:!0}),e.UnboundRelationship=e.Relationship=e.Node=e.Record=e.ServerInfo=e.GqlStatusObject=e.Notification=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.ResultSummary=e.RxResult=e.RxManagedTransaction=e.RxTransaction=e.RxSession=e.EagerResult=e.Result=e.ManagedTransaction=e.Transaction=e.Session=e.Driver=e.temporal=e.spatial=e.graph=e.error=e.routing=e.session=e.types=e.logging=e.auth=e.isRetriableError=e.Neo4jError=e.integer=e.isUnboundRelationship=e.isRelationship=e.isPathSegment=e.isPath=e.isNode=e.isDateTime=e.isLocalDateTime=e.isDate=e.isTime=e.isLocalTime=e.isDuration=e.isPoint=e.isInt=e.int=e.hasReachableServer=e.driver=e.authTokenManagers=void 0,e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.bookmarkManager=e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=e.Integer=e.Point=e.PathSegment=e.Path=void 0;var o=t(7857);Object.defineProperty(e,"Driver",{enumerable:!0,get:function(){return o.Driver}});var s=a(t(3659)),u=t(9305);Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return u.authTokenManagers}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return u.Neo4jError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return u.isRetriableError}}),Object.defineProperty(e,"error",{enumerable:!0,get:function(){return u.error}}),Object.defineProperty(e,"Integer",{enumerable:!0,get:function(){return u.Integer}}),Object.defineProperty(e,"int",{enumerable:!0,get:function(){return u.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return u.isInt}}),Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return u.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return u.Point}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return u.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return u.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return u.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return u.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return u.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return u.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return u.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return u.isLocalTime}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return u.isNode}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return u.isPath}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return u.isPathSegment}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return u.isRelationship}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return u.isTime}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return u.isUnboundRelationship}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return u.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return u.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return u.Time}}),Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return u.Node}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return u.Path}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return u.PathSegment}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return u.Relationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return u.UnboundRelationship}}),Object.defineProperty(e,"Record",{enumerable:!0,get:function(){return u.Record}}),Object.defineProperty(e,"ResultSummary",{enumerable:!0,get:function(){return u.ResultSummary}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return u.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return u.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return u.QueryStatistics}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return u.Notification}}),Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return u.GqlStatusObject}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return u.ServerInfo}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return u.Result}}),Object.defineProperty(e,"EagerResult",{enumerable:!0,get:function(){return u.EagerResult}}),Object.defineProperty(e,"auth",{enumerable:!0,get:function(){return u.auth}}),Object.defineProperty(e,"Session",{enumerable:!0,get:function(){return u.Session}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return u.Transaction}}),Object.defineProperty(e,"ManagedTransaction",{enumerable:!0,get:function(){return u.ManagedTransaction}}),Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return u.bookmarkManager}}),Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return u.routing}}),Object.defineProperty(e,"resultTransformers",{enumerable:!0,get:function(){return u.resultTransformers}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return u.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return u.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return u.notificationSeverityLevel}}),Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return u.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return u.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return u.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return u.clientCertificateProviders}});var l=t(6672),c=a(t(3466));e.RxSession=c.default;var f=a(t(5742));e.RxTransaction=f.default;var d=a(t(1530));e.RxManagedTransaction=d.default;var h=a(t(3057));e.RxResult=h.default;var p=u.internal.util,g=p.ENCRYPTION_ON,y=p.assertString,b=p.isEmptyObjectOrNull,_=u.internal.serverAddress.ServerAddress,m=u.internal.urlUtil,x="neo4j-javascript/"+s.default;function S(z,H,q){q===void 0&&(q={}),y(z,"Bolt URL");var W,$=m.parseDatabaseUrl(z),J=!1,X=!1;switch($.scheme){case"bolt":break;case"bolt+s":X=!0,W="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":X=!0,W="TRUST_ALL_CERTIFICATES";break;case"neo4j":J=!0;break;case"neo4j+s":X=!0,W="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",J=!0;break;case"neo4j+ssc":X=!0,W="TRUST_ALL_CERTIFICATES",J=!0;break;default:throw new Error("Unknown scheme: ".concat($.scheme))}if(X){if("encrypted"in q||"trust"in q)throw new Error("Encryption/trust can only be configured either through URL or config, not both");q.encrypted=g,q.trust=W,q.clientCertificate=(0,u.resolveCertificateProvider)(q.clientCertificate)}var Z=(function(ne){if(typeof(le=ne)=="object"&&le!=null&&"getToken"in le&&"handleSecurityException"in le&&typeof le.getToken=="function"&&typeof le.handleSecurityException=="function")return ne;var le,ce=ne;return(ce=ce||{}).scheme=ce.scheme||"none",(0,u.staticAuthTokenManager)({authToken:ce})})(H);q.userAgent=q.userAgent||x,q.boltAgent=u.internal.boltAgent.fromVersion(s.default);var ue=_.fromUrl($.hostAndPort),re={address:ue,typename:J?"Routing":"Direct",routing:J};return new o.Driver(re,q,(function(){if(J)return function(ne,le,ce,pe){return new l.RoutingConnectionProvider({id:ne,config:le,log:ce,hostNameResolver:pe,authTokenManager:Z,address:ue,userAgent:le.userAgent,boltAgent:le.boltAgent,routingContext:$.query})};if(!b($.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(z,"'"));return function(ne,le,ce){return new l.DirectConnectionProvider({id:ne,config:le,log:ce,authTokenManager:Z,address:ue,userAgent:le.userAgent,boltAgent:le.boltAgent})}})())}function O(z,H){return n(this,void 0,void 0,function(){var q;return i(this,function(W){switch(W.label){case 0:q=S(z,{scheme:"none",principal:"",credentials:""},H),W.label=1;case 1:return W.trys.push([1,,3,5]),[4,q.getNegotiatedProtocolVersion()];case 2:return W.sent(),[2,!0];case 3:return[4,q.close()];case 4:return W.sent(),[7];case 5:return[2]}})})}e.driver=S,e.hasReachableServer=O;var E={console:function(z){return{level:z,logger:function(H,q){return console.log("".concat(t.g.Date.now()," ").concat(H.toUpperCase()," ").concat(q))}}}};e.logging=E;var T={Node:u.Node,Relationship:u.Relationship,UnboundRelationship:u.UnboundRelationship,PathSegment:u.PathSegment,Path:u.Path,Result:u.Result,EagerResult:u.EagerResult,ResultSummary:u.ResultSummary,Record:u.Record,Point:u.Point,Date:u.Date,DateTime:u.DateTime,Duration:u.Duration,LocalDateTime:u.LocalDateTime,LocalTime:u.LocalTime,Time:u.Time,Integer:u.Integer};e.types=T;var P={READ:o.READ,WRITE:o.WRITE};e.session=P;var I={toNumber:u.toNumber,toString:u.toString,inSafeRange:u.inSafeRange};e.integer=I;var k={isPoint:u.isPoint};e.spatial=k;var L={isDuration:u.isDuration,isLocalTime:u.isLocalTime,isTime:u.isTime,isDate:u.isDate,isLocalDateTime:u.isLocalDateTime,isDateTime:u.isDateTime};e.temporal=L;var B={isNode:u.isNode,isPath:u.isPath,isPathSegment:u.isPathSegment,isRelationship:u.isRelationship,isUnboundRelationship:u.isUnboundRelationship};e.graph=B;var j={authTokenManagers:u.authTokenManagers,driver:S,hasReachableServer:O,int:u.int,isInt:u.isInt,isPoint:u.isPoint,isDuration:u.isDuration,isLocalTime:u.isLocalTime,isTime:u.isTime,isDate:u.isDate,isLocalDateTime:u.isLocalDateTime,isDateTime:u.isDateTime,isNode:u.isNode,isPath:u.isPath,isPathSegment:u.isPathSegment,isRelationship:u.isRelationship,isUnboundRelationship:u.isUnboundRelationship,integer:I,Neo4jError:u.Neo4jError,isRetriableError:u.isRetriableError,auth:u.auth,logging:E,types:T,session:P,routing:u.routing,error:u.error,graph:B,spatial:k,temporal:L,Driver:o.Driver,Session:u.Session,Transaction:u.Transaction,ManagedTransaction:u.ManagedTransaction,Result:u.Result,EagerResult:u.EagerResult,RxSession:c.default,RxTransaction:f.default,RxManagedTransaction:d.default,RxResult:h.default,ResultSummary:u.ResultSummary,Plan:u.Plan,ProfiledPlan:u.ProfiledPlan,QueryStatistics:u.QueryStatistics,Notification:u.Notification,GqlStatusObject:u.GqlStatusObject,ServerInfo:u.ServerInfo,Record:u.Record,Node:u.Node,Relationship:u.Relationship,UnboundRelationship:u.UnboundRelationship,Path:u.Path,PathSegment:u.PathSegment,Point:u.Point,Integer:u.Integer,Duration:u.Duration,LocalTime:u.LocalTime,Time:u.Time,Date:u.Date,LocalDateTime:u.LocalDateTime,DateTime:u.DateTime,bookmarkManager:u.bookmarkManager,resultTransformers:u.resultTransformers,notificationCategory:u.notificationCategory,notificationSeverityLevel:u.notificationSeverityLevel,notificationFilterDisabledCategory:u.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:u.notificationFilterMinimumSeverityLevel,clientCertificateProviders:u.clientCertificateProviders};e.default=j},1226:function(r,e,t){var n=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p},i=this&&this.__spreadArray||function(u,l){for(var c=0,f=l.length,d=u.length;c0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{Object.defineProperty(e,"__esModule",{value:!0}),e.noop=void 0,e.noop=function(){}},1358:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=void 0;var n=t(1018);e.isAsyncIterable=function(i){return Symbol.asyncIterator&&n.isFunction(i==null?void 0:i[Symbol.asyncIterator])}},1409:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.beginTransaction=function(i){throw new Error("Not implemented")},n.prototype.run=function(i,a,o){throw new Error("Not implemented")},n.prototype.commitTransaction=function(i){throw new Error("Not implemented")},n.prototype.rollbackTransaction=function(i){throw new Error("Not implemented")},n.prototype.resetAndFlush=function(){throw new Error("Not implemented")},n.prototype.isOpen=function(){throw new Error("Not implemented")},n.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},n.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},n})();e.default=t},1415:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.max=void 0;var n=t(9139),i=t(1018);e.max=function(a){return n.reduce(i.isFunction(a)?function(o,s){return a(o,s)>0?o:s}:function(o,s){return o>s?o:s})}},1439:function(r,e,t){var n=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.connect=void 0;var n=t(2483),i=t(9445),a=t(7843),o=t(6824),s={connector:function(){return new n.Subject}};e.connect=function(u,l){l===void 0&&(l=s);var c=l.connector;return a.operate(function(f,d){var h=c();i.innerFrom(u(o.fromSubscribable(h))).subscribe(d),d.add(f.subscribe(h))})}},1505:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceError=void 0;var n=t(5568);e.SequenceError=n.createErrorClass(function(i){return function(a){i(this),this.name="SequenceError",this.message=a}})},1517:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=void 0;var n=t(4027),i={value:!0,enumerable:!1,configurable:!1,writable:!1},a="__isNode__",o="__isRelationship__",s="__isUnboundRelationship__",u="__isPath__",l="__isPathSegment__";function c(b,_){return b!=null&&b[_]===!0}var f=(function(){function b(_,m,x,S){this.identity=_,this.labels=m,this.properties=x,this.elementId=y(S,function(){return _.toString()})}return b.prototype.toString=function(){for(var _="("+this.elementId,m=0;m0){for(_+=" {",m=0;m0&&(_+=","),_+=x[m]+":"+(0,n.stringify)(this.properties[x[m]]);_+="}"}return _+")"},b})();e.Node=f,Object.defineProperty(f.prototype,a,i),e.isNode=function(b){return c(b,a)};var d=(function(){function b(_,m,x,S,O,E,T,P){this.identity=_,this.start=m,this.end=x,this.type=S,this.properties=O,this.elementId=y(E,function(){return _.toString()}),this.startNodeElementId=y(T,function(){return m.toString()}),this.endNodeElementId=y(P,function(){return x.toString()})}return b.prototype.toString=function(){var _="("+this.startNodeElementId+")-[:"+this.type,m=Object.keys(this.properties);if(m.length>0){_+=" {";for(var x=0;x0&&(_+=","),_+=m[x]+":"+(0,n.stringify)(this.properties[m[x]]);_+="}"}return _+"]->("+this.endNodeElementId+")"},b})();e.Relationship=d,Object.defineProperty(d.prototype,o,i),e.isRelationship=function(b){return c(b,o)};var h=(function(){function b(_,m,x,S){this.identity=_,this.type=m,this.properties=x,this.elementId=y(S,function(){return _.toString()})}return b.prototype.bind=function(_,m){return new d(this.identity,_,m,this.type,this.properties,this.elementId)},b.prototype.bindTo=function(_,m){return new d(this.identity,_.identity,m.identity,this.type,this.properties,this.elementId,_.elementId,m.elementId)},b.prototype.toString=function(){var _="-[:"+this.type,m=Object.keys(this.properties);if(m.length>0){_+=" {";for(var x=0;x0&&(_+=","),_+=m[x]+":"+(0,n.stringify)(this.properties[m[x]]);_+="}"}return _+"]->"},b})();e.UnboundRelationship=h,Object.defineProperty(h.prototype,s,i),e.isUnboundRelationship=function(b){return c(b,s)};var p=function(b,_,m){this.start=b,this.relationship=_,this.end=m};e.PathSegment=p,Object.defineProperty(p.prototype,l,i),e.isPathSegment=function(b){return c(b,l)};var g=function(b,_,m){this.start=b,this.end=_,this.segments=m,this.length=m.length};function y(b,_){return b??_()}e.Path=g,Object.defineProperty(g.prototype,u,i),e.isPath=function(b){return c(b,u)}},1518:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pairwise=void 0;var n=t(7843),i=t(3111);e.pairwise=function(){return n.operate(function(a,o){var s,u=!1;a.subscribe(i.createOperatorSubscriber(o,function(l){var c=s;s=l,u&&o.next([c,l]),u=!0}))})}},1530:function(r,e,t){var n=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),n(t(3057)),n(t(5742));var i=(function(){function a(o){var s=o.run;this._run=s}return a.fromTransaction=function(o){return new a({run:o.run.bind(o)})},a.prototype.run=function(o,s){return this._run(o,s)},a})();e.default=i},1551:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaust=void 0;var n=t(2752);e.exhaust=n.exhaustAll},1554:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var n=t(7961),i=t(1074),a=t(7843),o=t(9445),s=t(5568),u=t(3111),l=t(7110);function c(f){throw new e.TimeoutError(f)}e.TimeoutError=s.createErrorClass(function(f){return function(d){d===void 0&&(d=null),f(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=d}}),e.timeout=function(f,d){var h=i.isValidDate(f)?{first:f}:typeof f=="number"?{each:f}:f,p=h.first,g=h.each,y=h.with,b=y===void 0?c:y,_=h.scheduler,m=_===void 0?d??n.asyncScheduler:_,x=h.meta,S=x===void 0?null:x;if(p==null&&g==null)throw new TypeError("No timeout provided.");return a.operate(function(O,E){var T,P,I=null,k=0,L=function(B){P=l.executeSchedule(E,m,function(){try{T.unsubscribe(),o.innerFrom(b({meta:S,lastValue:I,seen:k})).subscribe(E)}catch(j){E.error(j)}},B)};T=O.subscribe(u.createOperatorSubscriber(E,function(B){P==null||P.unsubscribe(),k++,E.next(I=B),g>0&&L(g)},void 0,void 0,function(){P!=null&&P.closed||P==null||P.unsubscribe(),I=null})),!k&&L(p!=null?typeof p=="number"?p:+p-m.now():g)})}},1573:function(r,e,t){var n=this&&this.__awaiter||function(h,p,g,y){return new(g||(g=Promise))(function(b,_){function m(O){try{S(y.next(O))}catch(E){_(E)}}function x(O){try{S(y.throw(O))}catch(E){_(E)}}function S(O){var E;O.done?b(O.value):(E=O.value,E instanceof g?E:new g(function(T){T(E)})).then(m,x)}S((y=y.apply(h,p||[])).next())})},i=this&&this.__generator||function(h,p){var g,y,b,_,m={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return _={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function x(S){return function(O){return(function(E){if(g)throw new TypeError("Generator is already executing.");for(;_&&(_=0,E[0]&&(m=0)),m;)try{if(g=1,y&&(b=2&E[0]?y.return:E[0]?y.throw||((b=y.return)&&b.call(y),0):y.next)&&!(b=b.call(y,E[1])).done)return b;switch(y=0,b&&(E=[2&E[0],b.value]),E[0]){case 0:case 1:b=E;break;case 4:return m.label++,{value:E[1],done:!1};case 5:m.label++,y=E[1],E=[0];continue;case 7:E=m.ops.pop(),m.trys.pop();continue;default:if(!((b=(b=m.trys).length>0&&b[b.length-1])||E[0]!==6&&E[0]!==2)){m=0;continue}if(E[0]===3&&(!b||E[1]>b[0]&&E[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduled=void 0;var n=t(9567),i=t(9589),a=t(6985),o=t(8808),s=t(854),u=t(1116),l=t(7629),c=t(8046),f=t(6368),d=t(1358),h=t(7614),p=t(9137),g=t(4953);e.scheduled=function(y,b){if(y!=null){if(u.isInteropObservable(y))return n.scheduleObservable(y,b);if(c.isArrayLike(y))return a.scheduleArray(y,b);if(l.isPromise(y))return i.schedulePromise(y,b);if(d.isAsyncIterable(y))return s.scheduleAsyncIterable(y,b);if(f.isIterable(y))return o.scheduleIterable(y,b);if(p.isReadableStreamLike(y))return g.scheduleReadableStreamLike(y,b)}throw h.createInvalidObservableTypeError(y)}},1699:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var n=t(245),i=t(783),a=t(9445);e.partition=function(o,s,u){return[i.filter(s,u)(a.innerFrom(o)),i.filter(n.not(s,u))(a.innerFrom(o))]}},1711:function(r,e,t){var n=this&&this.__extends||(function(){var m=function(x,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(O[T]=E[T])},m(x,S)};return function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=x}m(x,S),x.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var x,S=1,O=arguments.length;S{Object.defineProperty(e,"__esModule",{value:!0}),e.sample=void 0;var n=t(9445),i=t(7843),a=t(1342),o=t(3111);e.sample=function(s){return i.operate(function(u,l){var c=!1,f=null;u.subscribe(o.createOperatorSubscriber(l,function(d){c=!0,f=d})),n.innerFrom(s).subscribe(o.createOperatorSubscriber(l,function(){if(c){c=!1;var d=f;f=null,l.next(d)}},a.noop))})}},1751:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isObservable=void 0;var n=t(4662),i=t(1018);e.isObservable=function(a){return!!a&&(a instanceof n.Observable||i.isFunction(a.lift)&&i.isFunction(a.subscribe))}},1759:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NotFoundError=void 0;var n=t(5568);e.NotFoundError=n.createErrorClass(function(i){return function(a){i(this),this.name="NotFoundError",this.message=a}})},1776:function(r,e,t){var n=this&&this.__read||function(s,u){var l=typeof Symbol=="function"&&s[Symbol.iterator];if(!l)return s;var c,f,d=l.call(s),h=[];try{for(;(u===void 0||u-- >0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{var e,t,n=document.attachEvent,i=!1;function a(m){var x=m.__resizeTriggers__,S=x.firstElementChild,O=x.lastElementChild,E=S.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,E.style.width=S.offsetWidth+1+"px",E.style.height=S.offsetHeight+1+"px",S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight}function o(m){var x=this;a(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s(function(){(function(S){return S.offsetWidth!=S.__resizeLast__.width||S.offsetHeight!=S.__resizeLast__.height})(x)&&(x.__resizeLast__.width=x.offsetWidth,x.__resizeLast__.height=x.offsetHeight,x.__resizeListeners__.forEach(function(S){S.call(x,m)}))})}if(!n){var s=(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(m){return window.setTimeout(m,20)},function(m){return t(m)}),u=(e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(m){return e(m)}),l=!1,c="",f="animationstart",d="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(p.style.animationName!==void 0&&(l=!0),l===!1){for(var g=0;g 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%; }',O=document.head||document.getElementsByTagName("head")[0],E=document.createElement("style");E.type="text/css",E.styleSheet?E.styleSheet.cssText=S:E.appendChild(document.createTextNode(S)),O.appendChild(E),i=!0}})(),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=document.createElement("div")).className="resize-triggers",m.__resizeTriggers__.innerHTML='
',m.appendChild(m.__resizeTriggers__),a(m),m.addEventListener("scroll",o,!0),f&&m.__resizeTriggers__.addEventListener(f,function(S){S.animationName==y&&a(m)})),m.__resizeListeners__.push(x)),function(){n?m.detachEvent("onresize",x):(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(x),1),m.__resizeListeners__.length||(m.removeEventListener("scroll",o),m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)))}}},1839:function(r,e,t){var n=this&&this.__awaiter||function(u,l,c,f){return new(c||(c=Promise))(function(d,h){function p(b){try{y(f.next(b))}catch(_){h(_)}}function g(b){try{y(f.throw(b))}catch(_){h(_)}}function y(b){var _;b.done?d(b.value):(_=b.value,_ instanceof c?_:new c(function(m){m(_)})).then(p,g)}y((f=f.apply(u,l||[])).next())})},i=this&&this.__generator||function(u,l){var c,f,d,h,p={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(y){return function(b){return(function(_){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,_[0]&&(p=0)),p;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,f=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(!((d=(d=p.trys).length>0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]0)&&!(z=q.next()).done;)W.push(z.value)}catch($){H={error:$}}finally{try{z&&!z.done&&(j=q.return)&&j.call(q)}finally{if(H)throw H.error}}return W},u=this&&this.__spreadArray||function(L,B,j){if(j||arguments.length===2)for(var z,H=0,q=B.length;H{function t(){return typeof Symbol=="function"&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(e,"__esModule",{value:!0}),e.iterator=e.getSymbolIterator=void 0,e.getSymbolIterator=t,e.iterator=t()},1967:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9691),i=t(4027),a={basic:function(s,u,l){return l!=null?{scheme:"basic",principal:s,credentials:u,realm:l}:{scheme:"basic",principal:s,credentials:u}},kerberos:function(s){return{scheme:"kerberos",principal:"",credentials:s}},bearer:function(s){return{scheme:"bearer",credentials:s}},none:function(){return{scheme:"none"}},custom:function(s,u,l,c,f){var d={scheme:c,principal:s};if(o(u)&&(d.credentials=u),o(l)&&(d.realm=l),o(f)){try{(0,i.stringify)(f)}catch(h){throw(0,n.newError)("Circular references in custom auth token parameters",void 0,h)}d.parameters=f}return d}};function o(s){return!(s==null||s===""||Object.getPrototypeOf(s)===Object.prototype&&Object.keys(s).length===0)}e.default=a},1983:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeInternals=void 0;var n=t(9445),i=t(7110),a=t(3111);e.mergeInternals=function(o,s,u,l,c,f,d,h){var p=[],g=0,y=0,b=!1,_=function(){!b||p.length||g||s.complete()},m=function(S){return g{Object.defineProperty(e,"__esModule",{value:!0}),e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationFilterMinimumSeverityLevel=void 0;var t={OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"};e.notificationFilterMinimumSeverityLevel=t,Object.freeze(t);var n={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};e.notificationFilterDisabledCategory=n,Object.freeze(n);var i=n;e.notificationFilterDisabledClassification=i,e.default=function(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}},2007:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Releasable=void 0;var t=(function(){function i(){}return i.prototype.release=function(){throw new Error("Not implemented")},i})();e.Releasable=t;var n=(function(){function i(){}return i.prototype.acquireConnection=function(a){throw Error("Not implemented")},i.prototype.supportsMultiDb=function(){throw Error("Not implemented")},i.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},i.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},i.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},i.prototype.SSREnabled=function(){return!1},i.prototype.verifyConnectivityAndGetServerInfo=function(a){throw Error("Not implemented")},i.prototype.verifyAuthentication=function(a){throw Error("Not implemented")},i.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},i.prototype.close=function(){throw Error("Not implemented")},i})();e.default=n},2063:r=>{r.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},2066:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u0&&b[b.length-1])||E[0]!==6&&E[0]!==2)){m=0;continue}if(E[0]===3&&(!b||E[1]>b[0]&&E[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.takeWhile=void 0;var n=t(7843),i=t(3111);e.takeWhile=function(a,o){return o===void 0&&(o=!1),n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){var f=a(c,l++);(f||o)&&u.next(c),!f&&u.complete()}))})}},2171:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.partition=void 0;var n=t(245),i=t(783);e.partition=function(a,o){return function(s){return[i.filter(a,o)(s),i.filter(n.not(a,o))(s)]}}},2199:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.resolve=function(s){return this._resolveToItself(s)},o})(t(9305).internal.resolver.BaseHostNameResolver);e.default=i},2204:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=void 0;var n=t(9139),i=t(7843),a=function(o,s){return o.push(s),o};e.toArray=function(){return i.operate(function(o,s){n.reduce(a,[])(o).subscribe(s)})}},2360:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.materialize=void 0;var n=t(7800),i=t(7843),a=t(3111);e.materialize=function(){return i.operate(function(o,s){o.subscribe(a.createOperatorSubscriber(s,function(u){s.next(n.Notification.createNext(u))},function(){s.next(n.Notification.createComplete()),s.complete()},function(u){s.next(n.Notification.createError(u)),s.complete()}))})}},2363:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305),i=n.error.SERVICE_UNAVAILABLE,a=n.error.SESSION_EXPIRED,o=(function(){function u(l,c,f,d){this._errorCode=l,this._handleUnavailability=c||s,this._handleWriteFailure=f||s,this._handleSecurityError=d||s}return u.create=function(l){return new u(l.errorCode,l.handleUnavailability,l.handleWriteFailure,l.handleSecurityError)},u.prototype.errorCode=function(){return this._errorCode},u.prototype.handleAndTransformError=function(l,c,f){return(function(d){return d!=null&&d.code!=null&&d.code.startsWith("Neo.ClientError.Security.")})(l)?this._handleSecurityError(l,c,f):(function(d){return!!d&&(d.code===a||d.code===i||d.code==="Neo.TransientError.General.DatabaseUnavailable")})(l)?this._handleUnavailability(l,c,f):(function(d){return!!d&&(d.code==="Neo.ClientError.Cluster.NotALeader"||d.code==="Neo.ClientError.General.ForbiddenOnReadOnlyDatabase")})(l)?this._handleWriteFailure(l,c,f):l},u})();function s(u){return u}e.default=o},2481:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305),i=n.internal.util,a=i.ENCRYPTION_OFF,o=i.ENCRYPTION_ON,s=n.error.SERVICE_UNAVAILABLE,u=[null,void 0,!0,!1,o,a],l=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];e.default=function(c,f,d,h){this.address=c,this.encrypted=(function(p){var g=p.encrypted;if(u.indexOf(g)===-1)throw(0,n.newError)("Illegal value of the encrypted setting ".concat(g,". Expected one of ").concat(u));return g})(f),this.trust=(function(p){var g=p.trust;if(l.indexOf(g)===-1)throw(0,n.newError)("Illegal value of the trust setting ".concat(g,". Expected one of ").concat(l));return g})(f),this.trustedCertificates=(function(p){return p.trustedCertificates||[]})(f),this.knownHostsPath=(function(p){return p.knownHosts||null})(f),this.connectionErrorCode=d||s,this.connectionTimeout=f.connectionTimeout,this.clientCertificate=h}},2483:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__values||function(d){var h=typeof Symbol=="function"&&Symbol.iterator,p=h&&d[h],g=0;if(p)return p.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&g>=d.length&&(d=void 0),{value:d&&d[g++],done:!d}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.AnonymousSubject=e.Subject=void 0;var a=t(4662),o=t(8014),s=t(9686),u=t(7479),l=t(9223),c=(function(d){function h(){var p=d.call(this)||this;return p.closed=!1,p.currentObservers=null,p.observers=[],p.isStopped=!1,p.hasError=!1,p.thrownError=null,p}return n(h,d),h.prototype.lift=function(p){var g=new f(this,this);return g.operator=p,g},h.prototype._throwIfClosed=function(){if(this.closed)throw new s.ObjectUnsubscribedError},h.prototype.next=function(p){var g=this;l.errorContext(function(){var y,b;if(g._throwIfClosed(),!g.isStopped){g.currentObservers||(g.currentObservers=Array.from(g.observers));try{for(var _=i(g.currentObservers),m=_.next();!m.done;m=_.next())m.value.next(p)}catch(x){y={error:x}}finally{try{m&&!m.done&&(b=_.return)&&b.call(_)}finally{if(y)throw y.error}}}})},h.prototype.error=function(p){var g=this;l.errorContext(function(){if(g._throwIfClosed(),!g.isStopped){g.hasError=g.isStopped=!0,g.thrownError=p;for(var y=g.observers;y.length;)y.shift().error(p)}})},h.prototype.complete=function(){var p=this;l.errorContext(function(){if(p._throwIfClosed(),!p.isStopped){p.isStopped=!0;for(var g=p.observers;g.length;)g.shift().complete()}})},h.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(h.prototype,"observed",{get:function(){var p;return((p=this.observers)===null||p===void 0?void 0:p.length)>0},enumerable:!1,configurable:!0}),h.prototype._trySubscribe=function(p){return this._throwIfClosed(),d.prototype._trySubscribe.call(this,p)},h.prototype._subscribe=function(p){return this._throwIfClosed(),this._checkFinalizedStatuses(p),this._innerSubscribe(p)},h.prototype._innerSubscribe=function(p){var g=this,y=this,b=y.hasError,_=y.isStopped,m=y.observers;return b||_?o.EMPTY_SUBSCRIPTION:(this.currentObservers=null,m.push(p),new o.Subscription(function(){g.currentObservers=null,u.arrRemove(m,p)}))},h.prototype._checkFinalizedStatuses=function(p){var g=this,y=g.hasError,b=g.thrownError,_=g.isStopped;y?p.error(b):_&&p.complete()},h.prototype.asObservable=function(){var p=new a.Observable;return p.source=this,p},h.create=function(p,g){return new f(p,g)},h})(a.Observable);e.Subject=c;var f=(function(d){function h(p,g){var y=d.call(this)||this;return y.destination=p,y.source=g,y}return n(h,d),h.prototype.next=function(p){var g,y;(y=(g=this.destination)===null||g===void 0?void 0:g.next)===null||y===void 0||y.call(g,p)},h.prototype.error=function(p){var g,y;(y=(g=this.destination)===null||g===void 0?void 0:g.error)===null||y===void 0||y.call(g,p)},h.prototype.complete=function(){var p,g;(g=(p=this.destination)===null||p===void 0?void 0:p.complete)===null||g===void 0||g.call(p)},h.prototype._subscribe=function(p){var g,y;return(y=(g=this.source)===null||g===void 0?void 0:g.subscribe(p))!==null&&y!==void 0?y:o.EMPTY_SUBSCRIPTION},h})(c);e.AnonymousSubject=f},2533:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})(),i=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(715)),o=(function(s){function u(l){var c=s.call(this)||this;return c._readersIndex=new a.default,c._writersIndex=new a.default,c._connectionPool=l,c}return n(u,s),u.prototype.selectReader=function(l){return this._select(l,this._readersIndex)},u.prototype.selectWriter=function(l){return this._select(l,this._writersIndex)},u.prototype._select=function(l,c){var f=l.length;if(f===0)return null;var d=c.next(f),h=d,p=null,g=Number.MAX_SAFE_INTEGER;do{var y=l[h],b=this._connectionPool.activeResourceCount(y);b0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305);function i(){}function a(u){return u}var o={onNext:i,onCompleted:i,onError:i},s=(function(){function u(l){var c=l===void 0?{}:l,f=c.transformMetadata,d=c.enrichErrorMetadata,h=c.log,p=c.observer;this._pendingObservers=[],this._log=h,this._transformMetadata=f||a,this._enrichErrorMetadata=d||a,this._observer=Object.assign({onObserversCountChange:i,onError:i,onFailure:i,onErrorApplyTransformation:a},p)}return Object.defineProperty(u.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),u.prototype.handleResponse=function(l){var c=l.fields[0];switch(l.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(n.json.stringify(l))),this._currentObserver.onNext(c);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(n.json.stringify(l)));try{var f=this._transformMetadata(c);this._currentObserver.onCompleted(f)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(n.json.stringify(l)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(c)),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(n.json.stringify(l)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,n.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,n.newError)("Unknown Bolt protocol message: "+l))}},u.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(u.prototype,"_observersCount",{get:function(){return this._currentObserver==null?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),u.prototype._queueObserver=function(l){return(l=l||o).onCompleted=l.onCompleted||i,l.onError=l.onError||i,l.onNext=l.onNext||i,this._currentObserver===void 0?this._currentObserver=l:this._pendingObservers.push(l),this._observer.onObserversCountChange(this._observersCount),!0},u.prototype._notifyErrorToObservers=function(l){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(l);this._pendingObservers.length>0;){var c=this._pendingObservers.shift();c&&c.onError&&c.onError(l)}},u.prototype.hasOngoingObservableRequests=function(){return this._currentObserver!=null||this._pendingObservers.length>0},u.prototype._resetFailure=function(){this._currentFailure=null},u.prototype._handleErrorPayload=function(l){var c,f=(c=l.code)==="Neo.TransientError.Transaction.Terminated"?"Neo.ClientError.Transaction.Terminated":c==="Neo.TransientError.Transaction.LockClientStopped"?"Neo.ClientError.Transaction.LockClientStopped":c,d=l.cause!=null?this._handleErrorCause(l.cause):void 0,h=(0,n.newError)(l.message,f,d,l.gql_status,l.description,l.diagnostic_record);return this._observer.onErrorApplyTransformation(h)},u.prototype._handleErrorCause=function(l){var c=l.cause!=null?this._handleErrorCause(l.cause):void 0,f=(0,n.newGQLError)(l.message,c,l.gql_status,l.description,l.diagnostic_record);return this._observer.onErrorApplyTransformation(f)},u})();e.default=s},2628:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameAction=void 0;var i=t(5267),a=t(9507),o=(function(s){function u(l,c){var f=s.call(this,l,c)||this;return f.scheduler=l,f.work=c,f}return n(u,s),u.prototype.requestAsyncId=function(l,c,f){return f===void 0&&(f=0),f!==null&&f>0?s.prototype.requestAsyncId.call(this,l,c,f):(l.actions.push(this),l._scheduled||(l._scheduled=a.animationFrameProvider.requestAnimationFrame(function(){return l.flush(void 0)})))},u.prototype.recycleAsyncId=function(l,c,f){var d;if(f===void 0&&(f=0),f!=null?f>0:this.delay>0)return s.prototype.recycleAsyncId.call(this,l,c,f);var h=l.actions;c!=null&&c===l._scheduled&&((d=h[h.length-1])===null||d===void 0?void 0:d.id)!==c&&(a.animationFrameProvider.cancelAnimationFrame(c),l._scheduled=void 0)},u})(i.AsyncAction);e.AnimationFrameAction=o},2669:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.min=void 0;var n=t(9139),i=t(1018);e.min=function(a){return n.reduce(i.isFunction(a)?function(o,s){return a(o,s)<0?o:s}:function(o,s){return o{Object.defineProperty(e,"__esModule",{value:!0}),e.FailedObserver=e.CompletedObserver=void 0;var t=(function(){function a(){}return a.prototype.subscribe=function(o){i(o,o.onKeys,[]),i(o,o.onCompleted,{})},a.prototype.cancel=function(){},a.prototype.pause=function(){},a.prototype.resume=function(){},a.prototype.prepareToHandleSingleResponse=function(){},a.prototype.markCompleted=function(){},a.prototype.onError=function(o){throw new Error("CompletedObserver not supposed to call onError",{cause:o})},a})();e.CompletedObserver=t;var n=(function(){function a(o){var s=o.error,u=o.onError;this._error=s,this._beforeError=u,this._observers=[],this.onError(s)}return a.prototype.subscribe=function(o){i(o,o.onError,this._error),this._observers.push(o)},a.prototype.onError=function(o){i(this,this._beforeError,o),this._observers.forEach(function(s){return i(s,s.onError,o)})},a.prototype.cancel=function(){},a.prototype.pause=function(){},a.prototype.resume=function(){},a.prototype.markCompleted=function(){},a.prototype.prepareToHandleSingleResponse=function(){},a})();function i(a,o,s){o!=null&&o.bind(a)(s)}e.FailedObserver=n},2706:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pipeFromArray=e.pipe=void 0;var n=t(6640);function i(a){return a.length===0?n.identity:a.length===1?a[0]:function(o){return a.reduce(function(s,u){return u(s)},o)}}e.pipe=function(){for(var a=[],o=0;o{Object.defineProperty(e,"__esModule",{value:!0}),e.bindCallback=void 0;var n=t(1439);e.bindCallback=function(i,a,o){return n.bindCallbackInternals(!1,i,a,o)}},2752:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustAll=void 0;var n=t(4753),i=t(6640);e.exhaustAll=function(){return n.exhaustMap(i.identity)}},2823:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyError=void 0;var n=t(5568);e.EmptyError=n.createErrorClass(function(i){return function(){i(this),this.name="EmptyError",this.message="no elements in sequence"}})},2833:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var n=t(7302),i=t(9445),a=t(8616),o=t(1107),s=t(4917);e.merge=function(){for(var u=[],l=0;l{Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var n=t(4212),i=t(1293);e.queueScheduler=new i.QueueScheduler(n.QueueAction),e.queue=e.queueScheduler},2906:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c},o=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_MAX_SIZE=e.DEFAULT_ACQUISITION_TIMEOUT=e.PoolConfig=e.Pool=void 0;var s=a(t(7589));e.PoolConfig=s.default,Object.defineProperty(e,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return s.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(e,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return s.DEFAULT_MAX_SIZE}});var u=o(t(6842));e.Pool=u.default,e.default=u.default},3001:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(i){this.maxSize=i,this.pruneCount=Math.max(Math.round(.01*i*Math.log(i)),1),this.map=new Map}return n.prototype.set=function(i,a){this.map.set(i,{database:a,lastUsed:Date.now()}),this._pruneCache()},n.prototype.get=function(i){var a=this.map.get(i);if(a!==void 0)return a.lastUsed=Date.now(),a.database},n.prototype.delete=function(i){this.map.delete(i)},n.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var i=Array.from(this.map.entries()).sort(function(o,s){return o[1].lastUsed-s[1].lastUsed}),a=0;a0&&p[p.length-1])||x[0]!==6&&x[0]!==2)){y=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrames=void 0;var n=t(4662),i=t(4746),a=t(9507);function o(u){return new n.Observable(function(l){var c=u||i.performanceTimestampProvider,f=c.now(),d=0,h=function(){l.closed||(d=a.animationFrameProvider.requestAnimationFrame(function(p){d=0;var g=c.now();l.next({timestamp:u?g:p,elapsed:g-f}),h()}))};return h(),function(){d&&a.animationFrameProvider.cancelAnimationFrame(d)}})}e.animationFrames=function(u){return u?o(u):s};var s=o()},3111:function(r,e,t){var n=this&&this.__extends||(function(){var o=function(s,u){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(l[f]=c[f])},o(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=s}o(s,u),s.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OperatorSubscriber=e.createOperatorSubscriber=void 0;var i=t(5);e.createOperatorSubscriber=function(o,s,u,l,c){return new a(o,s,u,l,c)};var a=(function(o){function s(u,l,c,f,d,h){var p=o.call(this,u)||this;return p.onFinalize=d,p.shouldUnsubscribe=h,p._next=l?function(g){try{l(g)}catch(y){u.error(y)}}:o.prototype._next,p._error=f?function(g){try{f(g)}catch(y){u.error(y)}finally{this.unsubscribe()}}:o.prototype._error,p._complete=c?function(){try{c()}catch(g){u.error(g)}finally{this.unsubscribe()}}:o.prototype._complete,p}return n(s,o),s.prototype.unsubscribe=function(){var u;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var l=this.closed;o.prototype.unsubscribe.call(this),!l&&((u=this.onFinalize)===null||u===void 0||u.call(this))}},s})(i.Subscriber);e.OperatorSubscriber=a},3133:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shareReplay=void 0;var n=t(1242),i=t(8977);e.shareReplay=function(a,o,s){var u,l,c,f,d=!1;return a&&typeof a=="object"?(u=a.bufferSize,f=u===void 0?1/0:u,l=a.windowTime,o=l===void 0?1/0:l,d=(c=a.refCount)!==void 0&&c,s=a.scheduler):f=a??1/0,i.share({connector:function(){return new n.ReplaySubject(f,o,s)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:d})}},3146:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.audit=void 0;var n=t(7843),i=t(9445),a=t(3111);e.audit=function(o){return n.operate(function(s,u){var l=!1,c=null,f=null,d=!1,h=function(){if(f==null||f.unsubscribe(),f=null,l){l=!1;var g=c;c=null,u.next(g)}d&&u.complete()},p=function(){f=null,d&&u.complete()};s.subscribe(a.createOperatorSubscriber(u,function(g){l=!0,c=g,f||i.innerFrom(o(g)).subscribe(f=a.createOperatorSubscriber(u,h,p))},function(){d=!0,(!l||!f||f.closed)&&u.complete()}))})}},3206:(r,e,t)=>{r.exports=function(E){var T,P,I,k=0,L=0,B=u,j=[],z=[],H=1,q=0,W=0,$=!1,J=!1,X="",Z=a,ue=n;(E=E||{}).version==="300 es"&&(Z=s,ue=o);var re={},ne={};for(k=0;k0)continue;ie=Y.slice(0,1).join("")}return le(ie),W+=ie.length,(j=j.slice(ie.length)).length}}function ke(){return/[^a-fA-F0-9]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function De(){return T==="."||/[eE]/.test(T)?(j.push(T),B=g,P=T,k+1):T==="x"&&j.length===1&&j[0]==="0"?(B=S,j.push(T),P=T,k+1):/[^\d]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function Ne(){return T==="f"&&(j.push(T),P=T,k+=1),/[eE]/.test(T)?(j.push(T),P=T,k+1):(T!=="-"&&T!=="+"||!/[eE]/.test(P))&&/[^\d]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function Ce(){if(/[^\d\w_]/.test(T)){var Y=j.join("");return B=ne[Y]?_:re[Y]?b:y,le(j.join("")),B=u,k}return j.push(T),P=T,k+1}};var n=t(4704),i=t(2063),a=t(7192),o=t(8784),s=t(5592),u=999,l=9999,c=0,f=1,d=2,h=3,p=4,g=5,y=6,b=7,_=8,m=9,x=10,S=11,O=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3218:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var n=t(5471);e.mapTo=function(i){return n.map(function(){return i})}},3229:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameScheduler=void 0;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.flush=function(s){var u;this._active=!0,s?u=s.id:(u=this._scheduled,this._scheduled=void 0);var l,c=this.actions;s=s||c.shift();do if(l=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===u&&c.shift());if(this._active=!1,l){for(;(s=c[0])&&s.id===u&&c.shift();)s.unsubscribe();throw l}},o})(t(5648).AsyncScheduler);e.AnimationFrameScheduler=i},3231:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var n=t(7961),i=t(3146),a=t(4092);e.auditTime=function(o,s){return s===void 0&&(s=n.asyncScheduler),i.audit(function(){return a.timer(o,s)})}},3247:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var n=t(4662),i=t(7360),a=t(4917),o=t(6640),s=t(1251),u=t(1107),l=t(6013),c=t(3111),f=t(7110);function d(p,g,y){return y===void 0&&(y=o.identity),function(b){h(g,function(){for(var _=p.length,m=new Array(_),x=_,S=_,O=function(T){h(g,function(){var P=a.from(p[T],g),I=!1;P.subscribe(c.createOperatorSubscriber(b,function(k){m[T]=k,I||(I=!0,S--),S||b.next(y(m.slice()))},function(){--x||b.complete()}))},b)},E=0;E<_;E++)O(E)},b)}}function h(p,g,y){p?f.executeSchedule(y,p,g):g()}e.combineLatest=function(){for(var p=[],g=0;g{var n=t(6931),i=t(9975),a=Object.hasOwnProperty,o=Object.create(null);for(var s in n)a.call(n,s)&&(o[n[s]]=s);var u=r.exports={to:{},get:{}};function l(f,d,h){return Math.min(Math.max(d,f),h)}function c(f){var d=Math.round(f).toString(16).toUpperCase();return d.length<2?"0"+d:d}u.get=function(f){var d,h;switch(f.substring(0,3).toLowerCase()){case"hsl":d=u.get.hsl(f),h="hsl";break;case"hwb":d=u.get.hwb(f),h="hwb";break;default:d=u.get.rgb(f),h="rgb"}return d?{model:h,value:d}:null},u.get.rgb=function(f){if(!f)return null;var d,h,p,g=[0,0,0,1];if(d=f.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(p=d[2],d=d[1],h=0;h<3;h++){var y=2*h;g[h]=parseInt(d.slice(y,y+2),16)}p&&(g[3]=parseInt(p,16)/255)}else if(d=f.match(/^#([a-f0-9]{3,4})$/i)){for(p=(d=d[1])[3],h=0;h<3;h++)g[h]=parseInt(d[h]+d[h],16);p&&(g[3]=parseInt(p+p,16)/255)}else if(d=f.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(h=0;h<3;h++)g[h]=parseInt(d[h+1],0);d[4]&&(d[5]?g[3]=.01*parseFloat(d[4]):g[3]=parseFloat(d[4]))}else{if(!(d=f.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(d=f.match(/^(\w+)$/))?d[1]==="transparent"?[0,0,0,0]:a.call(n,d[1])?((g=n[d[1]])[3]=1,g):null:null;for(h=0;h<3;h++)g[h]=Math.round(2.55*parseFloat(d[h+1]));d[4]&&(d[5]?g[3]=.01*parseFloat(d[4]):g[3]=parseFloat(d[4]))}for(h=0;h<3;h++)g[h]=l(g[h],0,255);return g[3]=l(g[3],0,1),g},u.get.hsl=function(f){if(!f)return null;var d=f.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(d){var h=parseFloat(d[4]);return[(parseFloat(d[1])%360+360)%360,l(parseFloat(d[2]),0,100),l(parseFloat(d[3]),0,100),l(isNaN(h)?1:h,0,1)]}return null},u.get.hwb=function(f){if(!f)return null;var d=f.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(d){var h=parseFloat(d[4]);return[(parseFloat(d[1])%360+360)%360,l(parseFloat(d[2]),0,100),l(parseFloat(d[3]),0,100),l(isNaN(h)?1:h,0,1)]}return null},u.to.hex=function(){var f=i(arguments);return"#"+c(f[0])+c(f[1])+c(f[2])+(f[3]<1?c(Math.round(255*f[3])):"")},u.to.rgb=function(){var f=i(arguments);return f.length<4||f[3]===1?"rgb("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+")":"rgba("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+", "+f[3]+")"},u.to.rgb.percent=function(){var f=i(arguments),d=Math.round(f[0]/255*100),h=Math.round(f[1]/255*100),p=Math.round(f[2]/255*100);return f.length<4||f[3]===1?"rgb("+d+"%, "+h+"%, "+p+"%)":"rgba("+d+"%, "+h+"%, "+p+"%, "+f[3]+")"},u.to.hsl=function(){var f=i(arguments);return f.length<4||f[3]===1?"hsl("+f[0]+", "+f[1]+"%, "+f[2]+"%)":"hsla("+f[0]+", "+f[1]+"%, "+f[2]+"%, "+f[3]+")"},u.to.hwb=function(){var f=i(arguments),d="";return f.length>=4&&f[3]!==1&&(d=", "+f[3]),"hwb("+f[0]+", "+f[1]+"%, "+f[2]+"%"+d+")"},u.to.keyword=function(f){return o[f.slice(0,3)]}},3274:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var n=t(3879),i=t(1018);e.switchMapTo=function(a,o){return i.isFunction(o)?n.switchMap(function(){return a},o):n.switchMap(function(){return a})}},3321:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeTransformer=void 0;var n=t(7168),i=t(9305).internal.objectUtil,a=(function(){function s(u){this._transformers=u,this._transformersPerSignature=new Map(u.map(function(l){return[l.signature,l]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return s.prototype.fromStructure=function(u){try{return u instanceof n.structure.Structure&&this._transformersPerSignature.has(u.signature)?(0,this._transformersPerSignature.get(u.signature).fromStructure)(u):u}catch(l){return i.createBrokenObject(l)}},s.prototype.toStructure=function(u){var l=this._transformers.find(function(c){return(0,c.isTypeInstance)(u)});return l!==void 0?l.toStructure(u):u},s})();e.default=a;var o=(function(){function s(u){var l=u.signature,c=u.fromStructure,f=u.toStructure,d=u.isTypeInstance;this.signature=l,this.isTypeInstance=d,this.fromStructure=c,this.toStructure=f,Object.freeze(this)}return s.prototype.extendsWith=function(u){var l=u.signature,c=u.fromStructure,f=u.toStructure,d=u.isTypeInstance;return new s({signature:l||this.signature,fromStructure:c||this.fromStructure,toStructure:f||this.toStructure,isTypeInstance:d||this.isTypeInstance})},s})();e.TypeTransformer=o},3327:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=typeof Symbol=="function"&&Symbol.observable||"@@observable"},3371:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var n=t(9691),i=new Map,a=(function(){function g(y,b){this.low=y??0,this.high=b??0}return g.prototype.inSafeRange=function(){return this.greaterThanOrEqual(g.MIN_SAFE_VALUE)&&this.lessThanOrEqual(g.MAX_SAFE_VALUE)},g.prototype.toInt=function(){return this.low},g.prototype.toNumber=function(){return this.high*s+(this.low>>>0)},g.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(s)+BigInt(this.low>>>0);var y=this.negate();return BigInt(-1)*(BigInt(y.high>>>0)*BigInt(s)+BigInt(y.low>>>0))},g.prototype.toNumberOrInfinity=function(){return this.lessThan(g.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(g.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},g.prototype.toString=function(y){if((y=y??10)<2||y>36)throw RangeError("radix out of range: "+y.toString());if(this.isZero())return"0";var b;if(this.isNegative()){if(this.equals(g.MIN_VALUE)){var _=g.fromNumber(y),m=this.div(_);return b=m.multiply(_).subtract(this),m.toString(y)+b.toInt().toString(y)}return"-"+this.negate().toString(y)}var x=g.fromNumber(Math.pow(y,6));b=this;for(var S="";;){var O=b.div(x),E=(b.subtract(O.multiply(x)).toInt()>>>0).toString(y);if((b=O).isZero())return E+S;for(;E.length<6;)E="0"+E;S=""+E+S}},g.prototype.valueOf=function(){return this.toBigInt()},g.prototype.getHighBits=function(){return this.high},g.prototype.getLowBits=function(){return this.low},g.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(g.MIN_VALUE)?64:this.negate().getNumBitsAbs();var y=this.high!==0?this.high:this.low,b=0;for(b=31;b>0&&!(y&1<=0},g.prototype.isOdd=function(){return!(1&~this.low)},g.prototype.isEven=function(){return!(1&this.low)},g.prototype.equals=function(y){var b=g.fromValue(y);return this.high===b.high&&this.low===b.low},g.prototype.notEquals=function(y){return!this.equals(y)},g.prototype.lessThan=function(y){return this.compare(y)<0},g.prototype.lessThanOrEqual=function(y){return this.compare(y)<=0},g.prototype.greaterThan=function(y){return this.compare(y)>0},g.prototype.greaterThanOrEqual=function(y){return this.compare(y)>=0},g.prototype.compare=function(y){var b=g.fromValue(y);if(this.equals(b))return 0;var _=this.isNegative(),m=b.isNegative();return _&&!m?-1:!_&&m?1:this.subtract(b).isNegative()?-1:1},g.prototype.negate=function(){return this.equals(g.MIN_VALUE)?g.MIN_VALUE:this.not().add(g.ONE)},g.prototype.add=function(y){var b=g.fromValue(y),_=this.high>>>16,m=65535&this.high,x=this.low>>>16,S=65535&this.low,O=b.high>>>16,E=65535&b.high,T=b.low>>>16,P=0,I=0,k=0,L=0;return k+=(L+=S+(65535&b.low))>>>16,L&=65535,I+=(k+=x+T)>>>16,k&=65535,P+=(I+=m+E)>>>16,I&=65535,P+=_+O,P&=65535,g.fromBits(k<<16|L,P<<16|I)},g.prototype.subtract=function(y){var b=g.fromValue(y);return this.add(b.negate())},g.prototype.multiply=function(y){if(this.isZero())return g.ZERO;var b=g.fromValue(y);if(b.isZero())return g.ZERO;if(this.equals(g.MIN_VALUE))return b.isOdd()?g.MIN_VALUE:g.ZERO;if(b.equals(g.MIN_VALUE))return this.isOdd()?g.MIN_VALUE:g.ZERO;if(this.isNegative())return b.isNegative()?this.negate().multiply(b.negate()):this.negate().multiply(b).negate();if(b.isNegative())return this.multiply(b.negate()).negate();if(this.lessThan(l)&&b.lessThan(l))return g.fromNumber(this.toNumber()*b.toNumber());var _=this.high>>>16,m=65535&this.high,x=this.low>>>16,S=65535&this.low,O=b.high>>>16,E=65535&b.high,T=b.low>>>16,P=65535&b.low,I=0,k=0,L=0,B=0;return L+=(B+=S*P)>>>16,B&=65535,k+=(L+=x*P)>>>16,L&=65535,k+=(L+=S*T)>>>16,L&=65535,I+=(k+=m*P)>>>16,k&=65535,I+=(k+=x*T)>>>16,k&=65535,I+=(k+=S*E)>>>16,k&=65535,I+=_*P+m*T+x*E+S*O,I&=65535,g.fromBits(L<<16|B,I<<16|k)},g.prototype.div=function(y){var b,_,m,x=g.fromValue(y);if(x.isZero())throw(0,n.newError)("division by zero");if(this.isZero())return g.ZERO;if(this.equals(g.MIN_VALUE))return x.equals(g.ONE)||x.equals(g.NEG_ONE)?g.MIN_VALUE:x.equals(g.MIN_VALUE)?g.ONE:(b=this.shiftRight(1).div(x).shiftLeft(1)).equals(g.ZERO)?x.isNegative()?g.ONE:g.NEG_ONE:(_=this.subtract(x.multiply(b)),m=b.add(_.div(x)));if(x.equals(g.MIN_VALUE))return g.ZERO;if(this.isNegative())return x.isNegative()?this.negate().div(x.negate()):this.negate().div(x).negate();if(x.isNegative())return this.div(x.negate()).negate();for(m=g.ZERO,_=this;_.greaterThanOrEqual(x);){b=Math.max(1,Math.floor(_.toNumber()/x.toNumber()));for(var S=Math.ceil(Math.log(b)/Math.LN2),O=S<=48?1:Math.pow(2,S-48),E=g.fromNumber(b),T=E.multiply(x);T.isNegative()||T.greaterThan(_);)b-=O,T=(E=g.fromNumber(b)).multiply(x);E.isZero()&&(E=g.ONE),m=m.add(E),_=_.subtract(T)}return m},g.prototype.modulo=function(y){var b=g.fromValue(y);return this.subtract(this.div(b).multiply(b))},g.prototype.not=function(){return g.fromBits(~this.low,~this.high)},g.prototype.and=function(y){var b=g.fromValue(y);return g.fromBits(this.low&b.low,this.high&b.high)},g.prototype.or=function(y){var b=g.fromValue(y);return g.fromBits(this.low|b.low,this.high|b.high)},g.prototype.xor=function(y){var b=g.fromValue(y);return g.fromBits(this.low^b.low,this.high^b.high)},g.prototype.shiftLeft=function(y){var b=g.toNumber(y);return(b&=63)==0?g.ZERO:b<32?g.fromBits(this.low<>>32-b):g.fromBits(0,this.low<>>b|this.high<<32-b,this.high>>b):g.fromBits(this.high>>b-32,this.high>=0?0:-1)},g.isInteger=function(y){return(y==null?void 0:y.__isInteger__)===!0},g.fromInt=function(y){var b;if((y|=0)>=-128&&y<128&&(b=i.get(y))!=null)return b;var _=new g(y,y<0?-1:0);return y>=-128&&y<128&&i.set(y,_),_},g.fromBits=function(y,b){return new g(y,b)},g.fromNumber=function(y){return isNaN(y)||!isFinite(y)?g.ZERO:y<=-u?g.MIN_VALUE:y+1>=u?g.MAX_VALUE:y<0?g.fromNumber(-y).negate():new g(y%s|0,y/s|0)},g.fromString=function(y,b,_){var m,x=(_===void 0?{}:_).strictStringValidation;if(y.length===0)throw(0,n.newError)("number format error: empty string");if(y==="NaN"||y==="Infinity"||y==="+Infinity"||y==="-Infinity")return g.ZERO;if((b=b??10)<2||b>36)throw(0,n.newError)("radix out of range: "+b.toString());if((m=y.indexOf("-"))>0)throw(0,n.newError)('number format error: interior "-" character: '+y);if(m===0)return g.fromString(y.substring(1),b).negate();for(var S=g.fromNumber(Math.pow(b,8)),O=g.ZERO,E=0;E{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.resolve=function(){throw new Error("Abstract function")},n.prototype._resolveToItself=function(i){return Promise.resolve([i])},n})();e.default=t},3399:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},3448:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(y){for(var b,_=1,m=arguments.length;_0)&&!(m=S.next()).done;)O.push(m.value)}catch(E){x={error:E}}finally{try{m&&!m.done&&(_=S.return)&&_.call(S)}finally{if(x)throw x.error}}return O},a=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0});var o=t(9305),s=t(7168),u=t(3321),l=t(5973),c=a(t(6661)),f=o.internal.temporalUtil,d=f.dateToEpochDay,h=f.localDateTimeToEpochSecond,p=f.localTimeToNanoOfDay;function g(y,b,_){if(!b&&!_)return y;var m=function(E){return _?E.toBigInt():E.toNumberOrInfinity()},x=Object.create(Object.getPrototypeOf(y));for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)===!0){var O=y[S];x[S]=(0,o.isInt)(O)?m(O):O}return Object.freeze(x),x}e.default=n(n({},c.default),{createPoint2DTransformer:function(){return new u.TypeTransformer({signature:88,isTypeInstance:function(y){return(0,o.isPoint)(y)&&(y.z===null||y.z===void 0)},toStructure:function(y){return new s.structure.Structure(88,[(0,o.int)(y.srid),y.x,y.y])},fromStructure:function(y){s.structure.verifyStructSize("Point2D",3,y.size);var b=i(y.fields,3),_=b[0],m=b[1],x=b[2];return new o.Point(_,m,x,void 0)}})},createPoint3DTransformer:function(){return new u.TypeTransformer({signature:89,isTypeInstance:function(y){return(0,o.isPoint)(y)&&y.z!==null&&y.z!==void 0},toStructure:function(y){return new s.structure.Structure(89,[(0,o.int)(y.srid),y.x,y.y,y.z])},fromStructure:function(y){s.structure.verifyStructSize("Point3D",4,y.size);var b=i(y.fields,4),_=b[0],m=b[1],x=b[2],S=b[3];return new o.Point(_,m,x,S)}})},createDurationTransformer:function(){return new u.TypeTransformer({signature:69,isTypeInstance:o.isDuration,toStructure:function(y){var b=(0,o.int)(y.months),_=(0,o.int)(y.days),m=(0,o.int)(y.seconds),x=(0,o.int)(y.nanoseconds);return new s.structure.Structure(69,[b,_,m,x])},fromStructure:function(y){s.structure.verifyStructSize("Duration",4,y.size);var b=i(y.fields,4),_=b[0],m=b[1],x=b[2],S=b[3];return new o.Duration(_,m,x,S)}})},createLocalTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:116,isTypeInstance:o.isLocalTime,toStructure:function(m){var x=p(m.hour,m.minute,m.second,m.nanosecond);return new s.structure.Structure(116,[x])},fromStructure:function(m){s.structure.verifyStructSize("LocalTime",1,m.size);var x=i(m.fields,1)[0];return g((0,l.nanoOfDayToLocalTime)(x),b,_)}})},createTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:84,isTypeInstance:o.isTime,toStructure:function(m){var x=p(m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.timeZoneOffsetSeconds);return new s.structure.Structure(84,[x,S])},fromStructure:function(m){s.structure.verifyStructSize("Time",2,m.size);var x=i(m.fields,2),S=x[0],O=x[1],E=(0,l.nanoOfDayToLocalTime)(S);return g(new o.Time(E.hour,E.minute,E.second,E.nanosecond,O),b,_)}})},createDateTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:68,isTypeInstance:o.isDate,toStructure:function(m){var x=d(m.year,m.month,m.day);return new s.structure.Structure(68,[x])},fromStructure:function(m){s.structure.verifyStructSize("Date",1,m.size);var x=i(m.fields,1)[0];return g((0,l.epochDayToDate)(x),b,_)}})},createLocalDateTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:100,isTypeInstance:o.isLocalDateTime,toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond);return new s.structure.Structure(100,[x,S])},fromStructure:function(m){s.structure.verifyStructSize("LocalDateTime",2,m.size);var x=i(m.fields,2),S=x[0],O=x[1];return g((0,l.epochSecondAndNanoToLocalDateTime)(S,O),b,_)}})},createDateTimeWithZoneIdTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:102,isTypeInstance:function(m){return(0,o.isDateTime)(m)&&m.timeZoneId!=null},toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond),O=m.timeZoneId;return new s.structure.Structure(102,[x,S,O])},fromStructure:function(m){s.structure.verifyStructSize("DateTimeWithZoneId",3,m.size);var x=i(m.fields,3),S=x[0],O=x[1],E=x[2],T=(0,l.epochSecondAndNanoToLocalDateTime)(S,O);return g(new o.DateTime(T.year,T.month,T.day,T.hour,T.minute,T.second,T.nanosecond,null,E),b,_)}})},createDateTimeWithOffsetTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:70,isTypeInstance:function(m){return(0,o.isDateTime)(m)&&m.timeZoneId==null},toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond),O=(0,o.int)(m.timeZoneOffsetSeconds);return new s.structure.Structure(70,[x,S,O])},fromStructure:function(m){s.structure.verifyStructSize("DateTimeWithZoneOffset",3,m.size);var x=i(m.fields,3),S=x[0],O=x[1],E=x[2],T=(0,l.epochSecondAndNanoToLocalDateTime)(S,O);return g(new o.DateTime(T.year,T.month,T.day,T.hour,T.minute,T.second,T.nanosecond,E,null),b,_)}})}})},3466:function(r,e,t){var n=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0});var i=t(8813),a=t(9419),o=n(t(3057)),s=t(9305),u=n(t(5742)),l=n(t(1530)),c=n(t(9823)),f=s.internal.constants,d=f.ACCESS_MODE_READ,h=f.ACCESS_MODE_WRITE,p=f.TELEMETRY_APIS,g=s.internal.txConfig.TxConfig,y=(function(){function b(_){var m=_===void 0?{}:_,x=m.session,S=m.config,O=m.log;this._session=x,this._retryLogic=(function(E){var T=E&&E.maxTransactionRetryTime?E.maxTransactionRetryTime:null;return new c.default({maxRetryTimeout:T})})(S),this._log=O}return b.prototype.run=function(_,m,x){var S=this;return new o.default(new i.Observable(function(O){try{O.next(S._session.run(_,m,x)),O.complete()}catch(E){O.error(E)}return function(){}}))},b.prototype.beginTransaction=function(_){return this._beginTransaction(this._session._mode,_,{api:p.UNMANAGED_TRANSACTION})},b.prototype.readTransaction=function(_,m){return this._runTransaction(d,_,m)},b.prototype.writeTransaction=function(_,m){return this._runTransaction(h,_,m)},b.prototype.executeRead=function(_,m){return this._executeInTransaction(d,_,m)},b.prototype.executeWrite=function(_,m){return this._executeInTransaction(h,_,m)},b.prototype._executeInTransaction=function(_,m,x){return this._runTransaction(_,m,x,function(S){return new l.default({run:S.run.bind(S)})})},b.prototype.close=function(){var _=this;return new i.Observable(function(m){_._session.close().then(function(){m.complete()}).catch(function(x){return m.error(x)})})},b.prototype[Symbol.asyncDispose]=function(){return this.close()},b.prototype.lastBookmark=function(){return this.lastBookmarks()},b.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},b.prototype._beginTransaction=function(_,m,x){var S=this,O=g.empty();return m&&(O=new g(m,this._log)),new i.Observable(function(E){try{S._session._beginTransaction(_,O,x).then(function(T){E.next(new u.default(T)),E.complete()}).catch(function(T){return E.error(T)})}catch(T){E.error(T)}return function(){}})},b.prototype._runTransaction=function(_,m,x,S){var O=this;S===void 0&&(S=function(P){return P});var E=g.empty();x&&(E=new g(x));var T={apiTelemetryConfig:{api:p.MANAGED_TRANSACTION,onTelemetrySuccess:function(){T.apiTelemetryConfig=void 0}}};return this._retryLogic.retry((0,i.of)(1).pipe((0,a.mergeMap)(function(){return O._beginTransaction(_,E,T.apiTelemetryConfig)}),(0,a.mergeMap)(function(P){return(0,i.defer)(function(){try{return m(S(P))}catch(I){return(0,i.throwError)(function(){return I})}}).pipe((0,a.catchError)(function(I){return P.rollback().pipe((0,a.concatWith)((0,i.throwError)(function(){return I})))}),(0,a.concatWith)(P.commit()))})))},b})();e.default=y},3473:function(r,e,t){var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(t(5319)),a=t(9305),o=n(t(1048)),s=new(t(8888)).StringDecoder("utf8");e.default={encode:function(u){return new i.default((function(l){return typeof o.default.Buffer.from=="function"?o.default.Buffer.from(l,"utf8"):new o.default.Buffer(l,"utf8")})(u))},decode:function(u,l){if(Object.prototype.hasOwnProperty.call(u,"_buffer"))return(function(c,f){var d=c.position,h=d+f;return c.position=Math.min(h,c.length),c._buffer.toString("utf8",d,h)})(u,l);if(Object.prototype.hasOwnProperty.call(u,"_buffers"))return(function(c,f){return(function(d,h){var p=h,g=d.position;return d._updatePos(Math.min(h,d.length-g)),d._buffers.reduce(function(y,b){if(p<=0)return y;if(g>=b.length)return g-=b.length,"";b._updatePos(g-b.position);var _=Math.min(b.length-g,p),m=b.readSlice(_);return b._updatePos(_),p=Math.max(p-m.length,0),g=0,y+(function(x){return s.write(x._buffer)})(m)},"")+s.end()})(c,f)})(u,l);throw(0,a.newError)("Don't know how to decode strings from '".concat(u,"'"))}}},3488:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(a,o,s,u){u===void 0&&(u=s);var l=Object.getOwnPropertyDescriptor(o,s);l&&!("get"in l?!o.__esModule:l.writable||l.configurable)||(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(a,u,l)}:function(a,o,s,u){u===void 0&&(u=s),a[u]=o[s]}),i=this&&this.__exportStar||function(a,o){for(var s in a)s==="default"||Object.prototype.hasOwnProperty.call(o,s)||n(o,a,s)};Object.defineProperty(e,"__esModule",{value:!0}),i(t(5837),e)},3545:function(r,e,t){var n=this&&this.__extends||(function(){var b=function(_,m){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(x[O]=S[O])},b(_,m)};return function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function x(){this.constructor=_}b(_,m),_.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})(),i=this&&this.__awaiter||function(b,_,m,x){return new(m||(m=Promise))(function(S,O){function E(I){try{P(x.next(I))}catch(k){O(k)}}function T(I){try{P(x.throw(I))}catch(k){O(k)}}function P(I){var k;I.done?S(I.value):(k=I.value,k instanceof m?k:new m(function(L){L(k)})).then(E,T)}P((x=x.apply(b,_||[])).next())})},a=this&&this.__generator||function(b,_){var m,x,S,O,E={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return O={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function T(P){return function(I){return(function(k){if(m)throw new TypeError("Generator is already executing.");for(;O&&(O=0,k[0]&&(E=0)),E;)try{if(m=1,x&&(S=2&k[0]?x.return:k[0]?x.throw||((S=x.return)&&S.call(x),0):x.next)&&!(S=S.call(x,k[1])).done)return S;switch(x=0,S&&(k=[2&k[0],S.value]),k[0]){case 0:case 1:S=k;break;case 4:return E.label++,{value:k[1],done:!1};case 5:E.label++,x=k[1],k=[0];continue;case 7:k=E.ops.pop(),E.trys.pop();continue;default:if(!((S=(S=E.trys).length>0&&S[S.length-1])||k[0]!==6&&k[0]!==2)){E=0;continue}if(k[0]===3&&(!S||k[1]>S[0]&&k[1]=d})];case 1:return[2,m.sent()]}})})},_.prototype.getNegotiatedProtocolVersion=function(){var m=this;return new Promise(function(x,S){m._hasProtocolVersion(x).catch(S)})},_.prototype.supportsTransactionConfig=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=f})];case 1:return[2,m.sent()]}})})},_.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=h})];case 1:return[2,m.sent()]}})})},_.prototype.supportsSessionAuth=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=p})];case 1:return[2,m.sent()]}})})},_.prototype.verifyAuthentication=function(m){var x=m.auth;return i(this,void 0,void 0,function(){var S=this;return a(this,function(O){return[2,this._verifyAuthentication({auth:x,getAddress:function(){return S._address}})]})})},_.prototype.verifyConnectivityAndGetServerInfo=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,m.sent()]}})})},_})(s.default);e.default=y},3555:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var n=t(7843);e.finalize=function(i){return n.operate(function(a,o){try{a.subscribe(o)}finally{o.add(i)}})}},3618:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__awaiter||function(g,y,b,_){return new(b||(b=Promise))(function(m,x){function S(T){try{E(_.next(T))}catch(P){x(P)}}function O(T){try{E(_.throw(T))}catch(P){x(P)}}function E(T){var P;T.done?m(T.value):(P=T.value,P instanceof b?P:new b(function(I){I(P)})).then(S,O)}E((_=_.apply(g,y||[])).next())})},a=this&&this.__generator||function(g,y){var b,_,m,x,S={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return x={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function O(E){return function(T){return(function(P){if(b)throw new TypeError("Generator is already executing.");for(;x&&(x=0,P[0]&&(S=0)),S;)try{if(b=1,_&&(m=2&P[0]?_.return:P[0]?_.throw||((m=_.return)&&m.call(_),0):_.next)&&!(m=m.call(_,P[1])).done)return m;switch(_=0,m&&(P=[2&P[0],m.value]),P[0]){case 0:case 1:m=P;break;case 4:return S.label++,{value:P[1],done:!1};case 5:S.label++,_=P[1],P=[0];continue;case 7:P=S.ops.pop(),S.trys.pop();continue;default:if(!((m=(m=S.trys).length>0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var n=t(6640),i=t(1251),a=t(2706),o=t(983),s=t(2343);e.joinAllInternals=function(u,l){return a.pipe(s.toArray(),o.mergeMap(function(c){return u(c)}),l?i.mapOneOrManyArgs(l):n.identity)}},3659:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default="5.28.2"},3692:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var n=t(5006),i=t(827);e.asapScheduler=new i.AsapScheduler(n.AsapAction),e.asap=e.asapScheduler},3862:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var n=t(2628),i=t(3229);e.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler},3865:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var n=t(8158),i=t(1107),a=t(4917);e.concat=function(){for(var o=[],s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var n=t(9445),i=t(7843),a=t(3111);e.switchMap=function(o,s){return i.operate(function(u,l){var c=null,f=0,d=!1,h=function(){return d&&!c&&l.complete()};u.subscribe(a.createOperatorSubscriber(l,function(p){c==null||c.unsubscribe();var g=0,y=f++;n.innerFrom(o(p,y)).subscribe(c=a.createOperatorSubscriber(l,function(b){return l.next(s?s(p,b,y,g++):b)},function(){c=null,h()}))},function(){d=!0,h()}))})}},3951:function(r,e,t){var n=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCertificatesLoader=e.HostNameResolver=e.Channel=void 0;var i=n(t(6245)),a=n(t(2199)),o=n(t(614));e.Channel=i.default,e.HostNameResolver=a.default,e.ClientCertificatesLoader=o.default},3964:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var n=t(1018),i=t(7843),a=t(3111),o=t(6640);e.tap=function(s,u,l){var c=n.isFunction(s)||u||l?{next:s,error:u,complete:l}:s;return c?i.operate(function(f,d){var h;(h=c.subscribe)===null||h===void 0||h.call(c);var p=!0;f.subscribe(a.createOperatorSubscriber(d,function(g){var y;(y=c.next)===null||y===void 0||y.call(c,g),d.next(g)},function(){var g;p=!1,(g=c.complete)===null||g===void 0||g.call(c),d.complete()},function(g){var y;p=!1,(y=c.error)===null||y===void 0||y.call(c,g),d.error(g)},function(){var g,y;p&&((g=c.unsubscribe)===null||g===void 0||g.call(c)),(y=c.finalize)===null||y===void 0||y.call(c)}))}):o.identity}},3982:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var n=t(783);e.skip=function(i){return n.filter(function(a,o){return i<=o})}},4027:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=void 0;var n=t(93);e.stringify=function(i,a){return JSON.stringify(i,function(o,s){return(0,n.isBrokenObject)(s)?{__isBrokenObject__:!0,__reason__:(0,n.getBrokenObjectReason)(s)}:typeof s=="bigint"?"".concat(s,"n"):(a==null?void 0:a.sortedElements)!==!0||typeof s!="object"||Array.isArray(s)?(a==null?void 0:a.useCustomToString)!==!0||typeof s!="object"||Array.isArray(s)||typeof s.toString!="function"||s.toString===Object.prototype.toString?s:s==null?void 0:s.toString():Object.keys(s).sort().reduce(function(u,l){return u[l]=s[l],u},{})})}},4092:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var n=t(4662),i=t(7961),a=t(8613),o=t(1074);e.timer=function(s,u,l){s===void 0&&(s=0),l===void 0&&(l=i.async);var c=-1;return u!=null&&(a.isScheduler(u)?l=u:c=u),new n.Observable(function(f){var d=o.isValidDate(s)?+s-l.now():s;d<0&&(d=0);var h=0;return l.schedule(function(){f.closed||(f.next(h++),0<=c?this.schedule(void 0,c):f.complete())},d)})}},4132:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(a){function o(s){var u=a.call(this)||this;return u._connection=s,u}return n(o,a),o.prototype.acquireConnection=function(s){var u=s===void 0?{}:s,l=(u.accessMode,u.database,u.bookmarks,this._connection);return this._connection=null,Promise.resolve(l)},o})(t(9305).ConnectionProvider);e.default=i},4151:function(r,e,t){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(t(9018)),a=(t(9305),(function(){function o(s){this._routingContext=s}return o.prototype.lookupRoutingTableOnRouter=function(s,u,l,c){var f=this;return s._acquireConnection(function(d){return f._requestRawRoutingTable(d,s,u,l,c).then(function(h){return h.isNull?null:i.default.fromRawRoutingTable(u,l,h)})})},o.prototype._requestRawRoutingTable=function(s,u,l,c,f){var d=this;return new Promise(function(h,p){s.protocol().requestRoutingInformation({routingContext:d._routingContext,databaseName:l,impersonatedUser:f,sessionContext:{bookmarks:u._lastBookmarks,mode:u._mode,database:u._database,afterComplete:u._onComplete},onCompleted:h,onError:p})})},o})());e.default=a},4209:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.iif=void 0;var n=t(9353);e.iif=function(i,a,o){return n.defer(function(){return i()?a:o})}},4212:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueAction=void 0;var i=(function(a){function o(s,u){var l=a.call(this,s,u)||this;return l.scheduler=s,l.work=u,l}return n(o,a),o.prototype.schedule=function(s,u){return u===void 0&&(u=0),u>0?a.prototype.schedule.call(this,s,u):(this.delay=u,this.state=s,this.scheduler.flush(this),this)},o.prototype.execute=function(s,u){return u>0||this.closed?a.prototype.execute.call(this,s,u):this._execute(s,u)},o.prototype.requestAsyncId=function(s,u,l){return l===void 0&&(l=0),l!=null&&l>0||l==null&&this.delay>0?a.prototype.requestAsyncId.call(this,s,u,l):(s.flush(this),0)},o})(t(5267).AsyncAction);e.QueueAction=i},4271:function(r,e,t){var n=this&&this.__awaiter||function(s,u,l,c){return new(l||(l=Promise))(function(f,d){function h(y){try{g(c.next(y))}catch(b){d(b)}}function p(y){try{g(c.throw(y))}catch(b){d(b)}}function g(y){var b;y.done?f(y.value):(b=y.value,b instanceof l?b:new l(function(_){_(b)})).then(h,p)}g((c=c.apply(s,u||[])).next())})},i=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;d&&(d=0,b[0]&&(h=0)),h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.selectReader=function(i){throw new Error("Abstract function")},n.prototype.selectWriter=function(i){throw new Error("Abstract function")},n})();e.default=t},4325:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{r.exports=function(e){for(var t=[],n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var n=t(7843),i=t(1983);e.mergeScan=function(a,o,s){return s===void 0&&(s=1/0),n.operate(function(u,l){var c=o;return i.mergeInternals(u,l,function(f,d){return a(c,f,d)},s,function(f){c=f},!1,void 0,function(){return c=null})})}},4440:function(r,e,t){var n=this&&this.__read||function(s,u){var l=typeof Symbol=="function"&&s[Symbol.iterator];if(!l)return s;var c,f,d=l.call(s),h=[];try{for(;(u===void 0||u-- >0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.debounce=function(s){return n.operate(function(u,l){var c=!1,f=null,d=null,h=function(){if(d==null||d.unsubscribe(),d=null,c){c=!1;var p=f;f=null,l.next(p)}};u.subscribe(a.createOperatorSubscriber(l,function(p){d==null||d.unsubscribe(),c=!0,f=p,d=a.createOperatorSubscriber(l,h,i.noop),o.innerFrom(s(p)).subscribe(d)},function(){h(),l.complete()},void 0,function(){f=d=null}))})}},4520:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var n=t(7057),i=t(783),a=t(4869),o=t(378),s=t(846);e.elementAt=function(u,l){if(u<0)throw new n.ArgumentOutOfRangeError;var c=arguments.length>=2;return function(f){return f.pipe(i.filter(function(d,h){return h===u}),s.take(1),c?o.defaultIfEmpty(l):a.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},4531:function(r,e){var t=this&&this.__awaiter||function(a,o,s,u){return new(s||(s=Promise))(function(l,c){function f(p){try{h(u.next(p))}catch(g){c(g)}}function d(p){try{h(u.throw(p))}catch(g){c(g)}}function h(p){var g;p.done?l(p.value):(g=p.value,g instanceof s?g:new s(function(y){y(g)})).then(f,d)}h((u=u.apply(a,o||[])).next())})},n=this&&this.__generator||function(a,o){var s,u,l,c,f={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(h){return function(p){return(function(g){if(s)throw new TypeError("Generator is already executing.");for(;c&&(c=0,g[0]&&(f=0)),f;)try{if(s=1,u&&(l=2&g[0]?u.return:g[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,g[1])).done)return l;switch(u=0,l&&(g=[2&g[0],l.value]),g[0]){case 0:case 1:l=g;break;case 4:return f.label++,{value:g[1],done:!1};case 5:f.label++,u=g[1],g=[0];continue;case 7:g=f.ops.pop(),f.trys.pop();continue;default:if(!((l=(l=f.trys).length>0&&l[l.length-1])||g[0]!==6&&g[0]!==2)){f=0;continue}if(g[0]===3&&(!l||g[1]>l[0]&&g[1]this._connectionLivenessCheckTimeout?[4,o.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,u.sent()];case 2:return[2,!0]}})})},Object.defineProperty(a.prototype,"_isCheckDisabled",{get:function(){return this._connectionLivenessCheckTimeout==null||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),a.prototype._isNewlyCreatedConnection=function(o){return o.authToken==null},a})();e.default=i},4569:function(r,e,t){var n,i=this&&this.__extends||(function(){var u=function(l,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(f[h]=d[h])},u(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}u(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(u){for(var l,c=1,f=arguments.length;c{Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var n=t(5),i=t(8014),a=t(3327),o=t(2706),s=t(3413),u=t(1018),l=t(9223),c=(function(){function d(h){h&&(this._subscribe=h)}return d.prototype.lift=function(h){var p=new d;return p.source=this,p.operator=h,p},d.prototype.subscribe=function(h,p,g){var y,b=this,_=(y=h)&&y instanceof n.Subscriber||(function(m){return m&&u.isFunction(m.next)&&u.isFunction(m.error)&&u.isFunction(m.complete)})(y)&&i.isSubscription(y)?h:new n.SafeSubscriber(h,p,g);return l.errorContext(function(){var m=b,x=m.operator,S=m.source;_.add(x?x.call(_,S):S?b._subscribe(_):b._trySubscribe(_))}),_},d.prototype._trySubscribe=function(h){try{return this._subscribe(h)}catch(p){h.error(p)}},d.prototype.forEach=function(h,p){var g=this;return new(p=f(p))(function(y,b){var _=new n.SafeSubscriber({next:function(m){try{h(m)}catch(x){b(x),_.unsubscribe()}},error:b,complete:y});g.subscribe(_)})},d.prototype._subscribe=function(h){var p;return(p=this.source)===null||p===void 0?void 0:p.subscribe(h)},d.prototype[a.observable]=function(){return this},d.prototype.pipe=function(){for(var h=[],p=0;p{r.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},4721:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var n=t(7843),i=t(3111);e.skipWhile=function(a){return n.operate(function(o,s){var u=!1,l=0;o.subscribe(i.createOperatorSubscriber(s,function(c){return(u||(u=!a(c,l++)))&&s.next(c)}))})}},4746:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},4753:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var n=t(5471),i=t(9445),a=t(7843),o=t(3111);e.exhaustMap=function s(u,l){return l?function(c){return c.pipe(s(function(f,d){return i.innerFrom(u(f,d)).pipe(n.map(function(h,p){return l(f,h,d,p)}))}))}:a.operate(function(c,f){var d=0,h=null,p=!1;c.subscribe(o.createOperatorSubscriber(f,function(g){h||(h=o.createOperatorSubscriber(f,void 0,function(){h=null,p&&f.complete()}),i.innerFrom(u(g,d++)).subscribe(h))},function(){p=!0,!h&&f.complete()}))})}},4780:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var n=t(7843),i=t(3111),a=t(9445),o=t(1342);e.takeUntil=function(s){return n.operate(function(u,l){a.innerFrom(s).subscribe(i.createOperatorSubscriber(l,function(){return l.complete()},o.noop)),!l.closed&&u.subscribe(l)})}},4820:function(r,e,t){var n=this&&this.__generator||function(u,l){var c,f,d,h,p={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(y){return function(b){return(function(_){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,_[0]&&(p=0)),p;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,f=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(!((d=(d=p.trys).length>0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p};Object.defineProperty(e,"__esModule",{value:!0});var o=t(9691),s=(function(){function u(l,c,f){this.keys=l,this.length=l.length,this._fields=c,this._fieldLookup=f??(function(d){var h={};return d.forEach(function(p,g){h[p]=g}),h})(l)}return u.prototype.forEach=function(l){var c,f;try{for(var d=i(this.entries()),h=d.next();!h.done;h=d.next()){var p=a(h.value,2),g=p[0];l(p[1],g,this)}}catch(y){c={error:y}}finally{try{h&&!h.done&&(f=d.return)&&f.call(d)}finally{if(c)throw c.error}}},u.prototype.map=function(l){var c,f,d=[];try{for(var h=i(this.entries()),p=h.next();!p.done;p=h.next()){var g=a(p.value,2),y=g[0],b=g[1];d.push(l(b,y,this))}}catch(_){c={error:_}}finally{try{p&&!p.done&&(f=h.return)&&f.call(h)}finally{if(c)throw c.error}}return d},u.prototype.entries=function(){var l;return n(this,function(c){switch(c.label){case 0:l=0,c.label=1;case 1:return lthis._fields.length-1||c<0)throw(0,o.newError)("This record has no field with index '"+c.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[c]},u.prototype.has=function(l){return typeof l=="number"?l>=0&&l{Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var n=t(7961),i=t(1074),a=t(1554);e.timeoutWith=function(o,s,u){var l,c,f;if(u=u??n.async,i.isValidDate(o)?l=o:typeof o=="number"&&(c=o),!s)throw new TypeError("No observable provided to switch to");if(f=function(){return s},l==null&&c==null)throw new TypeError("No timeout provided.");return a.timeout({first:l,each:c,scheduler:u,with:f})}},4869:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var n=t(2823),i=t(7843),a=t(3111);function o(){return new n.EmptyError}e.throwIfEmpty=function(s){return s===void 0&&(s=o),i.operate(function(u,l){var c=!1;u.subscribe(a.createOperatorSubscriber(l,function(f){c=!0,l.next(f)},function(){return c?l.complete():l.error(s())}))})}},4883:function(r,e,t){var n,i=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var a=t(9691),o="error",s="warn",u="info",l="debug",c=u,f=((n={})[o]=0,n[s]=1,n[u]=2,n[l]=3,n),d=(function(){function g(y,b){this._level=y,this._loggerFunction=b}return g.create=function(y){if((y==null?void 0:y.logging)!=null){var b=y.logging,_=(function(x){if((x==null?void 0:x.level)!=null){var S=x.level,O=f[S];if(O==null&&O!==0)throw(0,a.newError)("Illegal logging level: ".concat(S,". Supported levels are: ").concat(Object.keys(f).toString()));return S}return c})(b),m=(function(x){var S,O;if((x==null?void 0:x.logger)!=null){var E=x.logger;if(E!=null&&typeof E=="function")return E}throw(0,a.newError)("Illegal logger function: ".concat((O=(S=x==null?void 0:x.logger)===null||S===void 0?void 0:S.toString())!==null&&O!==void 0?O:"undefined"))})(b);return new g(_,m)}return this.noOp()},g.noOp=function(){return h},g.prototype.isErrorEnabled=function(){return p(this._level,o)},g.prototype.error=function(y){this.isErrorEnabled()&&this._loggerFunction(o,y)},g.prototype.isWarnEnabled=function(){return p(this._level,s)},g.prototype.warn=function(y){this.isWarnEnabled()&&this._loggerFunction(s,y)},g.prototype.isInfoEnabled=function(){return p(this._level,u)},g.prototype.info=function(y){this.isInfoEnabled()&&this._loggerFunction(u,y)},g.prototype.isDebugEnabled=function(){return p(this._level,l)},g.prototype.debug=function(y){this.isDebugEnabled()&&this._loggerFunction(l,y)},g})();e.Logger=d;var h=new((function(g){function y(){return g.call(this,u,function(b,_){})||this}return i(y,g),y.prototype.isErrorEnabled=function(){return!1},y.prototype.error=function(b){},y.prototype.isWarnEnabled=function(){return!1},y.prototype.warn=function(b){},y.prototype.isInfoEnabled=function(){return!1},y.prototype.info=function(b){},y.prototype.isDebugEnabled=function(){return!1},y.prototype.debug=function(b){},y})(d));function p(g,y){return f[g]>=f[y]}},4912:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var n=t(5471);e.pluck=function(){for(var i=[],a=0;a{Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var n=t(1656),i=t(9445);e.from=function(a,o){return o?n.scheduled(a,o):i.innerFrom(a)}},4953:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var n=t(854),i=t(9137);e.scheduleReadableStreamLike=function(a,o){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(a),o)}},5006:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapAction=void 0;var i=t(5267),a=t(6293),o=(function(s){function u(l,c){var f=s.call(this,l,c)||this;return f.scheduler=l,f.work=c,f}return n(u,s),u.prototype.requestAsyncId=function(l,c,f){return f===void 0&&(f=0),f!==null&&f>0?s.prototype.requestAsyncId.call(this,l,c,f):(l.actions.push(this),l._scheduled||(l._scheduled=a.immediateProvider.setImmediate(l.flush.bind(l,void 0))))},u.prototype.recycleAsyncId=function(l,c,f){var d;if(f===void 0&&(f=0),f!=null?f>0:this.delay>0)return s.prototype.recycleAsyncId.call(this,l,c,f);var h=l.actions;c!=null&&((d=h[h.length-1])===null||d===void 0?void 0:d.id)!==c&&(a.immediateProvider.clearImmediate(c),l._scheduled===c&&(l._scheduled=void 0))},u})(i.AsyncAction);e.AsapAction=o},5022:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(m,x,S,O){O===void 0&&(O=S);var E=Object.getOwnPropertyDescriptor(x,S);E&&!("get"in E?!x.__esModule:E.writable||E.configurable)||(E={enumerable:!0,get:function(){return x[S]}}),Object.defineProperty(m,O,E)}:function(m,x,S,O){O===void 0&&(O=S),m[O]=x[S]}),i=this&&this.__setModuleDefault||(Object.create?function(m,x){Object.defineProperty(m,"default",{enumerable:!0,value:x})}:function(m,x){m.default=x}),a=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var x={};if(m!=null)for(var S in m)S!=="default"&&Object.prototype.hasOwnProperty.call(m,S)&&n(x,m,S);return i(x,m),x};Object.defineProperty(e,"__esModule",{value:!0}),e.floorMod=e.floorDiv=e.assertValidZoneId=e.assertValidNanosecond=e.assertValidSecond=e.assertValidMinute=e.assertValidHour=e.assertValidDay=e.assertValidMonth=e.assertValidYear=e.timeZoneOffsetInSeconds=e.totalNanoseconds=e.newDate=e.toStandardDate=e.isoStringToStandardDate=e.dateToIsoString=e.timeZoneOffsetToIsoString=e.timeToIsoString=e.durationToIsoString=e.dateToEpochDay=e.localDateTimeToEpochSecond=e.localTimeToNanoOfDay=e.normalizeNanosecondsForDuration=e.normalizeSecondsForDuration=e.SECONDS_PER_DAY=e.DAYS_PER_400_YEAR_CYCLE=e.DAYS_0000_TO_1970=e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE=e.NANOS_PER_MILLISECOND=e.NANOS_PER_SECOND=e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE=e.MINUTES_PER_HOUR=e.NANOSECOND_OF_SECOND_RANGE=e.SECOND_OF_MINUTE_RANGE=e.MINUTE_OF_HOUR_RANGE=e.HOUR_OF_DAY_RANGE=e.DAY_OF_MONTH_RANGE=e.MONTH_OF_YEAR_RANGE=e.YEAR_RANGE=void 0;var o=a(t(3371)),s=t(9691),u=t(6587),l=(function(){function m(x,S){this._minNumber=x,this._maxNumber=S,this._minInteger=(0,o.int)(x),this._maxInteger=(0,o.int)(S)}return m.prototype.contains=function(x){if((0,o.isInt)(x)&&x instanceof o.default)return x.greaterThanOrEqual(this._minInteger)&&x.lessThanOrEqual(this._maxInteger);if(typeof x=="bigint"){var S=(0,o.int)(x);return S.greaterThanOrEqual(this._minInteger)&&S.lessThanOrEqual(this._maxInteger)}return x>=this._minNumber&&x<=this._maxNumber},m.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},m})();function c(m,x,S){m=(0,o.int)(m),x=(0,o.int)(x),S=(0,o.int)(S);var O=m.multiply(365);return O=(O=(O=m.greaterThanOrEqual(0)?O.add(m.add(3).div(4).subtract(m.add(99).div(100)).add(m.add(399).div(400))):O.subtract(m.div(-4).subtract(m.div(-100)).add(m.div(-400)))).add(x.multiply(367).subtract(362).div(12))).add(S.subtract(1)),x.greaterThan(2)&&(O=O.subtract(1),(function(E){return!(!(E=(0,o.int)(E)).modulo(4).equals(0)||E.modulo(100).equals(0)&&!E.modulo(400).equals(0))})(m)||(O=O.subtract(1))),O.subtract(e.DAYS_0000_TO_1970)}function f(m,x){return m===1?x%400==0||x%4==0&&x%100!=0?29:28:[0,2,4,6,7,9,11].includes(m)?31:30}e.YEAR_RANGE=new l(-999999999,999999999),e.MONTH_OF_YEAR_RANGE=new l(1,12),e.DAY_OF_MONTH_RANGE=new l(1,31),e.HOUR_OF_DAY_RANGE=new l(0,23),e.MINUTE_OF_HOUR_RANGE=new l(0,59),e.SECOND_OF_MINUTE_RANGE=new l(0,59),e.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),e.MINUTES_PER_HOUR=60,e.SECONDS_PER_MINUTE=60,e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE*e.MINUTES_PER_HOUR,e.NANOS_PER_SECOND=1e9,e.NANOS_PER_MILLISECOND=1e6,e.NANOS_PER_MINUTE=e.NANOS_PER_SECOND*e.SECONDS_PER_MINUTE,e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE*e.MINUTES_PER_HOUR,e.DAYS_0000_TO_1970=719528,e.DAYS_PER_400_YEAR_CYCLE=146097,e.SECONDS_PER_DAY=86400,e.normalizeSecondsForDuration=function(m,x){return(0,o.int)(m).add(g(x,e.NANOS_PER_SECOND))},e.normalizeNanosecondsForDuration=function(m){return y(m,e.NANOS_PER_SECOND)},e.localTimeToNanoOfDay=function(m,x,S,O){m=(0,o.int)(m),x=(0,o.int)(x),S=(0,o.int)(S),O=(0,o.int)(O);var E=m.multiply(e.NANOS_PER_HOUR);return(E=(E=E.add(x.multiply(e.NANOS_PER_MINUTE))).add(S.multiply(e.NANOS_PER_SECOND))).add(O)},e.localDateTimeToEpochSecond=function(m,x,S,O,E,T,P){var I=c(m,x,S),k=(function(L,B,j){L=(0,o.int)(L),B=(0,o.int)(B),j=(0,o.int)(j);var z=L.multiply(e.SECONDS_PER_HOUR);return(z=z.add(B.multiply(e.SECONDS_PER_MINUTE))).add(j)})(O,E,T);return I.multiply(e.SECONDS_PER_DAY).add(k)},e.dateToEpochDay=c,e.durationToIsoString=function(m,x,S,O){var E=_(m),T=_(x),P=(function(I,k){var L,B;I=(0,o.int)(I),k=(0,o.int)(k);var j=I.isNegative(),z=k.greaterThan(0);return L=j&&z?I.equals(-1)?"-0":I.add(1).toString():I.toString(),z&&(B=b(j?k.negate().add(2*e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND):k.add(e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND))),B!=null?L+B:L})(S,O);return"P".concat(E,"M").concat(T,"DT").concat(P,"S")},e.timeToIsoString=function(m,x,S,O){var E=_(m,2),T=_(x,2),P=_(S,2),I=b(O);return"".concat(E,":").concat(T,":").concat(P).concat(I)},e.timeZoneOffsetToIsoString=function(m){if((m=(0,o.int)(m)).equals(0))return"Z";var x=m.isNegative();x&&(m=m.multiply(-1));var S=x?"-":"+",O=_(m.div(e.SECONDS_PER_HOUR),2),E=_(m.div(e.SECONDS_PER_MINUTE).modulo(e.MINUTES_PER_HOUR),2),T=m.modulo(e.SECONDS_PER_MINUTE),P=T.equals(0)?null:_(T,2);return P!=null?"".concat(S).concat(O,":").concat(E,":").concat(P):"".concat(S).concat(O,":").concat(E)},e.dateToIsoString=function(m,x,S){var O=(function(P){var I=(0,o.int)(P);return I.isNegative()||I.greaterThan(9999)?_(I,6,{usePositiveSign:!0}):_(I,4)})(m),E=_(x,2),T=_(S,2);return"".concat(O,"-").concat(E,"-").concat(T)},e.isoStringToStandardDate=function(m){return new Date(m)},e.toStandardDate=function(m){return new Date(m)},e.newDate=function(m){return new Date(m)},e.totalNanoseconds=function(m,x){return(function(S,O){return S instanceof o.default?S.add(O):typeof S=="bigint"?S+BigInt(O):S+O})(x=x??0,m.getMilliseconds()*e.NANOS_PER_MILLISECOND)},e.timeZoneOffsetInSeconds=function(m){var x=m.getSeconds()-m.getUTCSeconds(),S=m.getMinutes()-m.getUTCMinutes(),O=m.getHours()-m.getUTCHours(),E=(function(T){return T.getMonth()===T.getUTCMonth()?T.getDate()-T.getUTCDate():T.getFullYear()>T.getUTCFullYear()||T.getMonth()>T.getUTCMonth()&&T.getFullYear()===T.getUTCFullYear()?T.getDate()+f(T.getUTCMonth(),T.getUTCFullYear())-T.getUTCDate():T.getDate()-(T.getUTCDate()+f(T.getMonth(),T.getFullYear()))})(m);return O*e.SECONDS_PER_HOUR+S*e.SECONDS_PER_MINUTE+x+E*e.SECONDS_PER_DAY},e.assertValidYear=function(m){return p(m,e.YEAR_RANGE,"Year")},e.assertValidMonth=function(m){return p(m,e.MONTH_OF_YEAR_RANGE,"Month")},e.assertValidDay=function(m){return p(m,e.DAY_OF_MONTH_RANGE,"Day")},e.assertValidHour=function(m){return p(m,e.HOUR_OF_DAY_RANGE,"Hour")},e.assertValidMinute=function(m){return p(m,e.MINUTE_OF_HOUR_RANGE,"Minute")},e.assertValidSecond=function(m){return p(m,e.SECOND_OF_MINUTE_RANGE,"Second")},e.assertValidNanosecond=function(m){return p(m,e.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};var d=new Map,h=function(m,x){return(0,s.newError)("".concat(x,' is expected to be a valid ZoneId but was: "').concat(m,'"'))};function p(m,x,S){if((0,u.assertNumberOrInteger)(m,S),!x.contains(m))throw(0,s.newError)("".concat(S," is expected to be in range ").concat(x.toString()," but was: ").concat(m.toString()));return m}function g(m,x){m=(0,o.int)(m),x=(0,o.int)(x);var S=m.div(x);return m.isPositive()!==x.isPositive()&&S.multiply(x).notEquals(m)&&(S=S.subtract(1)),S}function y(m,x){return m=(0,o.int)(m),x=(0,o.int)(x),m.subtract(g(m,x).multiply(x))}function b(m){return(m=(0,o.int)(m)).equals(0)?"":"."+_(m,9)}function _(m,x,S){var O=(m=(0,o.int)(m)).isNegative();O&&(m=m.negate());var E=m.toString();if(x!=null)for(;E.length0)&&!(b=m.next()).done;)x.push(b.value)}catch(S){_={error:S}}finally{try{b&&!b.done&&(y=m.return)&&y.call(m)}finally{if(_)throw _.error}}return x},i=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var a=t(7168),o=t(9305),s=i(t(7518)),u=t(5973),l=t(6492),c=o.internal.temporalUtil.localDateTimeToEpochSecond,f=new Map;function d(p,g,y){var b=(function(S){if(!f.has(S)){var O=new Intl.DateTimeFormat("en-US",{timeZone:S,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});f.set(S,O)}return f.get(S)})(p),_=(0,o.int)(g).multiply(1e3).add((0,o.int)(y).div(1e6)).toNumber(),m=b.formatToParts(_).reduce(function(S,O){return O.type==="era"?S.adjustEra=O.value.toUpperCase()==="B"?function(E){return E.subtract(1).negate()}:l.identity:O.type==="hour"?S.hour=(0,o.int)(O.value).modulo(24):O.type!=="literal"&&(S[O.type]=(0,o.int)(O.value)),S},{});m.year=m.adjustEra(m.year);var x=c(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond);return m.timeZoneOffsetSeconds=x.subtract(g),m.hour=m.hour.modulo(24),m}function h(p,g,y){if(!g&&!y)return p;var b=function(S){return y?S.toBigInt():S.toNumberOrInfinity()},_=Object.create(Object.getPrototypeOf(p));for(var m in p)if(Object.prototype.hasOwnProperty.call(p,m)===!0){var x=p[m];_[m]=(0,o.isInt)(x)?b(x):x}return Object.freeze(_),_}e.default={createDateTimeWithZoneIdTransformer:function(p,g){var y=p.disableLosslessIntegers,b=p.useBigInt;return s.default.createDateTimeWithZoneIdTransformer(p).extendsWith({signature:105,fromStructure:function(_){a.structure.verifyStructSize("DateTimeWithZoneId",3,_.size);var m=n(_.fields,3),x=m[0],S=m[1],O=m[2],E=d(O,x,S);return h(new o.DateTime(E.year,E.month,E.day,E.hour,E.minute,E.second,(0,o.int)(S),E.timeZoneOffsetSeconds,O),y,b)},toStructure:function(_){var m=c(_.year,_.month,_.day,_.hour,_.minute,_.second,_.nanosecond),x=_.timeZoneOffsetSeconds!=null?_.timeZoneOffsetSeconds:(function(T,P,I){var k=d(T,P,I),L=c(k.year,k.month,k.day,k.hour,k.minute,k.second,I).subtract(P),B=P.subtract(L),j=d(T,B,I);return c(j.year,j.month,j.day,j.hour,j.minute,j.second,I).subtract(B)})(_.timeZoneId,m,_.nanosecond);_.timeZoneOffsetSeconds==null&&g.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 S=m.subtract(x),O=(0,o.int)(_.nanosecond),E=_.timeZoneId;return new a.structure.Structure(105,[S,O,E])}})},createDateTimeWithOffsetTransformer:function(p){var g=p.disableLosslessIntegers,y=p.useBigInt;return s.default.createDateTimeWithOffsetTransformer(p).extendsWith({signature:73,toStructure:function(b){var _=c(b.year,b.month,b.day,b.hour,b.minute,b.second,b.nanosecond),m=(0,o.int)(b.nanosecond),x=(0,o.int)(b.timeZoneOffsetSeconds),S=_.subtract(x);return new a.structure.Structure(73,[S,m,x])},fromStructure:function(b){a.structure.verifyStructSize("DateTimeWithZoneOffset",3,b.size);var _=n(b.fields,3),m=_[0],x=_[1],S=_[2],O=(0,o.int)(m).add(S),E=(0,u.epochSecondAndNanoToLocalDateTime)(O,x);return h(new o.DateTime(E.year,E.month,E.day,E.hour,E.minute,E.second,E.nanosecond,S,null),g,y)}})}}},5184:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var n=t(7110),i=t(7843),a=t(3111);e.observeOn=function(o,s){return s===void 0&&(s=0),i.operate(function(u,l){u.subscribe(a.createOperatorSubscriber(l,function(c){return n.executeSchedule(l,o,function(){return l.next(c)},s)},function(){return n.executeSchedule(l,o,function(){return l.complete()},s)},function(c){return n.executeSchedule(l,o,function(){return l.error(c)},s)}))})}},5250:function(r,e,t){var n;r=t.nmd(r),(function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",_="[object Date]",m="[object Error]",x="[object Function]",S="[object GeneratorFunction]",O="[object Map]",E="[object Number]",T="[object Object]",P="[object Promise]",I="[object RegExp]",k="[object Set]",L="[object String]",B="[object Symbol]",j="[object WeakMap]",z="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",W="[object Float64Array]",$="[object Int8Array]",J="[object Int16Array]",X="[object Int32Array]",Z="[object Uint8Array]",ue="[object Uint8ClampedArray]",re="[object Uint16Array]",ne="[object Uint32Array]",le=/\b__p \+= '';/g,ce=/\b(__p \+=) '' \+/g,pe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fe=/&(?:amp|lt|gt|quot|#39);/g,se=/[&<>"']/g,de=RegExp(fe.source),ge=RegExp(se.source),Oe=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,De=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ce=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(Q.source),we=/^\s+/,Ee=/\s/,Me=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ie=/\{\n\/\* \[wrapped with (.+)\] \*/,Ye=/,? & /,ot=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,mt=/[()=,{}\[\]\/\s]/,wt=/\\(\\)?/g,Mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,Ue=/^0o[0-7]+$/i,Qe=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nt=/($^)/,It=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",Lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Rt="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",Yt="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",Ut="\\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",Rr="["+ct+"]",Xt="["+Ut+"]",Vr="["+Lt+"]",Br="\\d+",mr="["+Rt+"]",ur="["+jt+"]",sn="[^"+ct+Ut+Br+Rt+jt+Yt+"]",Fr="\\ud83c[\\udffb-\\udfff]",un="[^"+ct+"]",bn="(?:\\ud83c[\\udde6-\\uddff]){2}",wn="[\\ud800-\\udbff][\\udc00-\\udfff]",_n="["+Yt+"]",xn="\\u200d",on="(?:"+ur+"|"+sn+")",Nn="(?:"+_n+"|"+sn+")",fi="(?:['’](?:d|ll|m|re|s|t|ve))?",gn="(?:['’](?:D|LL|M|RE|S|T|VE))?",yn="(?:"+Vr+"|"+Fr+")?",Jn="["+sr+"]?",_i=Jn+yn+"(?:"+xn+"(?:"+[un,bn,wn].join("|")+")"+Jn+yn+")*",Ir="(?:"+[mr,bn,wn].join("|")+")"+_i,pa="(?:"+[un+Vr+"?",Vr,bn,wn,Rr].join("|")+")",di=RegExp("['’]","g"),Bt=RegExp(Vr,"g"),hr=RegExp(Fr+"(?="+Fr+")|"+pa+_i,"g"),ei=RegExp([_n+"?"+ur+"+"+fi+"(?="+[Xt,_n,"$"].join("|")+")",Nn+"+"+gn+"(?="+[Xt,_n+on,"$"].join("|")+")",_n+"?"+on+"+"+fi,_n+"+"+gn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Br,Ir].join("|"),"g"),Hn=RegExp("["+xn+ct+Lt+sr+"]"),fs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Na=["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"],ki=-1,Wr={};Wr[q]=Wr[W]=Wr[$]=Wr[J]=Wr[X]=Wr[Z]=Wr[ue]=Wr[re]=Wr[ne]=!0,Wr[g]=Wr[y]=Wr[z]=Wr[b]=Wr[H]=Wr[_]=Wr[m]=Wr[x]=Wr[O]=Wr[E]=Wr[T]=Wr[I]=Wr[k]=Wr[L]=Wr[j]=!1;var Nr={};Nr[g]=Nr[y]=Nr[z]=Nr[H]=Nr[b]=Nr[_]=Nr[q]=Nr[W]=Nr[$]=Nr[J]=Nr[X]=Nr[O]=Nr[E]=Nr[T]=Nr[I]=Nr[k]=Nr[L]=Nr[B]=Nr[Z]=Nr[ue]=Nr[re]=Nr[ne]=!0,Nr[m]=Nr[x]=Nr[j]=!1;var na={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fs=parseFloat,hu=parseInt,ga=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g,Us=typeof self=="object"&&self&&self.Object===Object&&self,Ln=ga||Us||Function("return this")(),Ii=e&&!e.nodeType&&e,Ni=Ii&&r&&!r.nodeType&&r,Pc=Ni&&Ni.exports===Ii,vu=Pc&&ga.process,ia=(function(){try{return Ni&&Ni.require&&Ni.require("util").types||vu&&vu.binding&&vu.binding("util")}catch{}})(),Hl=ia&&ia.isArrayBuffer,Md=ia&&ia.isDate,Xa=ia&&ia.isMap,Wl=ia&&ia.isRegExp,Yl=ia&&ia.isSet,nf=ia&&ia.isTypedArray;function Wi(st,xt,pt){switch(pt.length){case 0:return st.call(xt);case 1:return st.call(xt,pt[0]);case 2:return st.call(xt,pt[0],pt[1]);case 3:return st.call(xt,pt[0],pt[1],pt[2])}return st.apply(xt,pt)}function af(st,xt,pt,Wt){for(var ir=-1,En=st==null?0:st.length;++ir-1}function Xl(st,xt,pt){for(var Wt=-1,ir=st==null?0:st.length;++Wt-1;);return pt}function Oa(st,xt){for(var pt=st.length;pt--&&wo(xt,st[pt],0)>-1;);return pt}var el=Ju({À:"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"}),uf=Ju({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ql(st){return"\\"+na[st]}function tl(st){return Hn.test(st)}function wi(st){var xt=-1,pt=Array(st.size);return st.forEach(function(Wt,ir){pt[++xt]=[ir,Wt]}),pt}function Jl(st,xt){return function(pt){return st(xt(pt))}}function aa(st,xt){for(var pt=-1,Wt=st.length,ir=0,En=[];++pt",""":'"',"'":"'"}),Vo=(function st(xt){var pt,Wt=(xt=xt==null?Ln:Vo.defaults(Ln.Object(),xt,Vo.pick(Ln,Na))).Array,ir=xt.Date,En=xt.Error,oa=xt.Function,ja=xt.Math,Kn=xt.Object,ec=xt.RegExp,xi=xt.String,ba=xt.TypeError,cf=Wt.prototype,Ev=oa.prototype,rl=Kn.prototype,Dd=xt["__core-js_shared__"],kd=Ev.toString,Fn=rl.hasOwnProperty,Sv=0,Hf=(pt=/[^.]+$/.exec(Dd&&Dd.keys&&Dd.keys.IE_PROTO||""))?"Symbol(src)_1."+pt:"",nl=rl.toString,Ov=kd.call(Kn),Wf=Ln._,ff=ec("^"+kd.call(Fn).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gs=Pc?xt.Buffer:i,bu=xt.Symbol,kc=xt.Uint8Array,Ah=Gs?Gs.allocUnsafe:i,tc=Jl(Kn.getPrototypeOf,Kn),Yf=Kn.create,Ic=rl.propertyIsEnumerable,_u=cf.splice,xo=bu?bu.isConcatSpreadable:i,Nc=bu?bu.iterator:i,Vs=bu?bu.toStringTag:i,df=(function(){try{var R=Os(Kn,"defineProperty");return R({},"",{}),R}catch{}})(),Rh=xt.clearTimeout!==Ln.clearTimeout&&xt.clearTimeout,Xf=ir&&ir.now!==Ln.Date.now&&ir.now,$f=xt.setTimeout!==Ln.setTimeout&&xt.setTimeout,Id=ja.ceil,rc=ja.floor,Kf=Kn.getOwnPropertySymbols,Lc=Gs?Gs.isBuffer:i,Nd=xt.isFinite,Ph=cf.join,hf=Jl(Kn.keys,Kn),Li=ja.max,hi=ja.min,Zf=ir.now,Tv=xt.parseInt,Qf=ja.random,Yp=cf.reverse,il=Os(xt,"DataView"),ri=Os(xt,"Map"),nc=Os(xt,"Promise"),jc=Os(xt,"Set"),vf=Os(xt,"WeakMap"),pf=Os(Kn,"create"),Bc=vf&&new vf,Hs={},ic=Yn(il),We=Yn(ri),ft=Yn(nc),ut=Yn(jc),Kt=Yn(vf),Pr=bu?bu.prototype:i,Qr=Pr?Pr.valueOf:i,oi=Pr?Pr.toString:i;function be(R){if(zi(R)&&!Ur(R)&&!(R instanceof nn)){if(R instanceof Ei)return R;if(Fn.call(R,"__wrapped__"))return Gc(R)}return new Ei(R)}var al=(function(){function R(){}return function(N){if(!Mi(N))return{};if(Yf)return Yf(N);R.prototype=N;var G=new R;return R.prototype=i,G}})();function Ho(){}function Ei(R,N){this.__wrapped__=R,this.__actions__=[],this.__chain__=!!N,this.__index__=0,this.__values__=i}function nn(R){this.__wrapped__=R,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function ol(R){var N=-1,G=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function Ka(R,N,G,te,he,Re){var je,He=1&N,et=2&N,yt=4&N;if(G&&(je=he?G(R,te,he,Re):G(R)),je!==i)return je;if(!Mi(R))return R;var Et=Ur(R);if(Et){if(je=(function(St){var Nt=St.length,lr=new St.constructor(Nt);return Nt&&typeof St[0]=="string"&&Fn.call(St,"index")&&(lr.index=St.index,lr.input=St.input),lr})(R),!He)return Ca(R,je)}else{var At=Wn(R),$t=At==x||At==S;if(Fu(R))return Ta(R,He);if(At==T||At==g||$t&&!he){if(je=et||$t?{}:es(R),!He)return et?(function(St,Nt){return Qo(St,Mo(St),Nt)})(R,(function(St,Nt){return St&&Qo(Nt,to(Nt),St)})(je,R)):(function(St,Nt){return Qo(St,id(St),Nt)})(R,ac(je,R))}else{if(!Nr[At])return he?R:{};je=(function(St,Nt,lr){var Gt,Lr=St.constructor;switch(Nt){case z:return Pu(St);case b:case _:return new Lr(+St);case H:return(function(jr,qn){var vr=qn?Pu(jr.buffer):jr.buffer;return new jr.constructor(vr,jr.byteOffset,jr.byteLength)})(St,lr);case q:case W:case $:case J:case X:case Z:case ue:case re:case ne:return Jf(St,lr);case O:return new Lr;case E:case L:return new Lr(St);case I:return(function(jr){var qn=new jr.constructor(jr.source,Dt.exec(jr));return qn.lastIndex=jr.lastIndex,qn})(St);case k:return new Lr;case B:return Gt=St,Qr?Kn(Qr.call(Gt)):{}}})(R,At,He)}}Re||(Re=new Jr);var tr=Re.get(R);if(tr)return tr;Re.set(R,je),El(R)?R.forEach(function(St){je.add(Ka(St,N,G,St,R,Re))}):Zp(R)&&R.forEach(function(St,Nt){je.set(Nt,Ka(St,N,G,Nt,R,Re))});var cr=Et?i:(yt?et?Ss:Zs:et?to:xa)(R);return La(cr||R,function(St,Nt){cr&&(St=R[Nt=St]),xu(je,Nt,Ka(St,N,G,Nt,R,Re))}),je}function Eu(R,N,G){var te=G.length;if(R==null)return!te;for(R=Kn(R);te--;){var he=G[te],Re=N[he],je=R[he];if(je===i&&!(he in R)||!Re(je))return!1}return!0}function Mh(R,N,G){if(typeof R!="function")throw new ba(a);return gc(function(){R.apply(i,G)},N)}function Yi(R,N,G,te){var he=-1,Re=Mc,je=!0,He=R.length,et=[],yt=N.length;if(!He)return et;G&&(N=ti(N,Zr(G))),te?(Re=Xl,je=!1):N.length>=200&&(Re=vs,je=!1,N=new wu(N));e:for(;++he-1},$a.prototype.set=function(R,N){var G=this.__data__,te=sl(G,R);return te<0?(++this.size,G.push([R,N])):G[te][1]=N,this},ps.prototype.clear=function(){this.size=0,this.__data__={hash:new ol,map:new(ri||$a),string:new ol}},ps.prototype.delete=function(R){var N=ho(this,R).delete(R);return this.size-=N?1:0,N},ps.prototype.get=function(R){return ho(this,R).get(R)},ps.prototype.has=function(R){return ho(this,R).has(R)},ps.prototype.set=function(R,N){var G=ho(this,R),te=G.size;return G.set(R,N),this.size+=G.size==te?0:1,this},wu.prototype.add=wu.prototype.push=function(R){return this.__data__.set(R,o),this},wu.prototype.has=function(R){return this.__data__.has(R)},Jr.prototype.clear=function(){this.__data__=new $a,this.size=0},Jr.prototype.delete=function(R){var N=this.__data__,G=N.delete(R);return this.size=N.size,G},Jr.prototype.get=function(R){return this.__data__.get(R)},Jr.prototype.has=function(R){return this.__data__.has(R)},Jr.prototype.set=function(R,N){var G=this.__data__;if(G instanceof $a){var te=G.__data__;if(!ri||te.length<199)return te.push([R,N]),this.size=++G.size,this;G=this.__data__=new ps(te)}return G.set(R,N),this.size=G.size,this};var Ba=Ao(Ys),Oo=Ao(sa,!0);function Cv(R,N){var G=!0;return Ba(R,function(te,he,Re){return G=!!N(te,he,Re)}),G}function oc(R,N,G){for(var te=-1,he=R.length;++te0&&G(He)?N>1?ji(He,N-1,G,te,he):zs(he,He):te||(he[he.length]=He)}return he}var Wo=Ki(),yf=Ki(!0);function Ys(R,N){return R&&Wo(R,N,xa)}function sa(R,N){return R&&yf(R,N,xa)}function ll(R,N){return ds(N,function(G){return bc(R[G])})}function ms(R,N){for(var G=0,te=(N=lo(N,R)).length;R!=null&&GN}function Co(R,N){return R!=null&&Fn.call(R,N)}function Xi(R,N){return R!=null&&N in Kn(R)}function Yo(R,N,G){for(var te=G?Xl:Mc,he=R[0].length,Re=R.length,je=Re,He=Wt(Re),et=1/0,yt=[];je--;){var Et=R[je];je&&N&&(Et=ti(Et,Zr(N))),et=hi(Et.length,et),He[je]=!G&&(N||he>=120&&Et.length>=120)?new wu(je&&Et):i}Et=R[0];var At=-1,$t=He[0];e:for(;++At=Nt?lr:lr*(At[$t]=="desc"?-1:1)}return yt.index-Et.index})(He,et,G)});je--;)Re[je]=Re[je].value;return Re})(he)}function bs(R,N,G){for(var te=-1,he=N.length,Re={};++te-1;)He!==R&&_u.call(He,et,1),_u.call(R,et,1);return R}function xe(R,N){for(var G=R?N.length:0,te=G-1;G--;){var he=N[G];if(G==te||he!==Re){var Re=he;Sr(he)?_u.call(R,he,1):Ih(R,he)}}return R}function Ou(R,N){return R+rc(Qf()*(N-R+1))}function $s(R,N){var G="";if(!R||N<1||N>f)return G;do N%2&&(G+=R),(N=rc(N/2))&&(R+=R);while(N);return G}function ar(R,N){return Sf(bl(R,N,is),R+"")}function Yr(R){return gf(As(R))}function Tu(R,N){var G=As(R);return Lu(G,ul(N,0,G.length))}function _s(R,N,G,te){if(!Mi(R))return R;for(var he=-1,Re=(N=lo(N,R)).length,je=Re-1,He=R;He!=null&&++hehe?0:he+N),(G=G>he?he:G)<0&&(G+=he),he=N>G?0:G-N>>>0,N>>>=0;for(var Re=Wt(he);++te>>1,je=R[Re];je!==null&&!ns(je)&&(G?je<=N:je=200){var yt=N?null:Ks(R);if(yt)return yu(yt);je=!1,he=vs,et=new wu}else et=N?[]:He;e:for(;++te=te?R:za(R,N,G)}var Zo=Rh||function(R){return Ln.clearTimeout(R)};function Ta(R,N){if(N)return R.slice();var G=R.length,te=Ah?Ah(G):new R.constructor(G);return R.copy(te),te}function Pu(R){var N=new R.constructor(R.byteLength);return new kc(N).set(new kc(R)),N}function Jf(R,N){var G=N?Pu(R.buffer):R.buffer;return new R.constructor(G,R.byteOffset,R.length)}function ed(R,N){if(R!==N){var G=R!==i,te=R===null,he=R==R,Re=ns(R),je=N!==i,He=N===null,et=N==N,yt=ns(N);if(!He&&!yt&&!Re&&R>N||Re&&je&&et&&!He&&!yt||te&&je&&et||!G&&et||!he)return 1;if(!te&&!Re&&!yt&&R1?G[he-1]:i,je=he>2?G[2]:i;for(Re=R.length>3&&typeof Re=="function"?(he--,Re):i,je&&Xr(G[0],G[1],je)&&(Re=he<3?i:Re,he=1),N=Kn(N);++te-1?he[Re?N[je]:je]:i}}function Uc(R){return Es(function(N){var G=N.length,te=G,he=Ei.prototype.thru;for(R&&N.reverse();te--;){var Re=N[te];if(typeof Re!="function")throw new ba(a);if(he&&!je&&Qi(Re)=="wrapper")var je=new Ei([],!0)}for(te=je?te:G;++te1&&Gt.reverse(),Et&&etHe))return!1;var yt=Re.get(R),Et=Re.get(N);if(yt&&Et)return yt==N&&Et==R;var At=-1,$t=!0,tr=2&G?new wu:i;for(Re.set(R,N),Re.set(N,R);++At-1&&R%1==0&&R1?"& ":"")+Re[He],Re=Re.join(je>2?", ":" "),he.replace(Me,`{ +`||P==="\\"?(j.push(T),P=T,k+1):(le(j.join("")),B=u,k)}function se(){return fe()}function de(){return T==="/"&&P==="*"?(j.push(T),le(j.join("")),B=u,k+1):(j.push(T),P=T,k+1)}function ge(){if(P==="."&&/\d/.test(T))return B=g,k;if(P==="/"&&T==="*")return B=c,k;if(P==="/"&&T==="/")return B=f,k;if(T==="."&&j.length){for(;Oe(j););return B=g,k}if(T===";"||T===")"||T==="("){if(j.length)for(;Oe(j););return le(T),B=u,k+1}var Y=j.length===2&&T!=="=";if(/[\w_\d\s]/.test(T)||Y){for(;Oe(j););return B=u,k}return j.push(T),P=T,k+1}function Oe(Y){for(var Q,ie,we=0;;){if(Q=i.indexOf(Y.slice(0,Y.length+we).join("")),ie=i[Q],Q===-1){if(we--+Y.length>0)continue;ie=Y.slice(0,1).join("")}return le(ie),W+=ie.length,(j=j.slice(ie.length)).length}}function ke(){return/[^a-fA-F0-9]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function De(){return T==="."||/[eE]/.test(T)?(j.push(T),B=g,P=T,k+1):T==="x"&&j.length===1&&j[0]==="0"?(B=S,j.push(T),P=T,k+1):/[^\d]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function Ne(){return T==="f"&&(j.push(T),P=T,k+=1),/[eE]/.test(T)?(j.push(T),P=T,k+1):(T!=="-"&&T!=="+"||!/[eE]/.test(P))&&/[^\d]/.test(T)?(le(j.join("")),B=u,k):(j.push(T),P=T,k+1)}function Te(){if(/[^\d\w_]/.test(T)){var Y=j.join("");return B=ne[Y]?_:re[Y]?b:y,le(j.join("")),B=u,k}return j.push(T),P=T,k+1}};var n=t(4704),i=t(2063),a=t(7192),o=t(8784),s=t(5592),u=999,l=9999,c=0,f=1,d=2,h=3,p=4,g=5,y=6,b=7,_=8,m=9,x=10,S=11,O=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3218:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mapTo=void 0;var n=t(5471);e.mapTo=function(i){return n.map(function(){return i})}},3229:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrameScheduler=void 0;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return n(o,a),o.prototype.flush=function(s){var u;this._active=!0,s?u=s.id:(u=this._scheduled,this._scheduled=void 0);var l,c=this.actions;s=s||c.shift();do if(l=s.execute(s.state,s.delay))break;while((s=c[0])&&s.id===u&&c.shift());if(this._active=!1,l){for(;(s=c[0])&&s.id===u&&c.shift();)s.unsubscribe();throw l}},o})(t(5648).AsyncScheduler);e.AnimationFrameScheduler=i},3231:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.auditTime=void 0;var n=t(7961),i=t(3146),a=t(4092);e.auditTime=function(o,s){return s===void 0&&(s=n.asyncScheduler),i.audit(function(){return a.timer(o,s)})}},3247:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestInit=e.combineLatest=void 0;var n=t(4662),i=t(7360),a=t(4917),o=t(6640),s=t(1251),u=t(1107),l=t(6013),c=t(3111),f=t(7110);function d(p,g,y){return y===void 0&&(y=o.identity),function(b){h(g,function(){for(var _=p.length,m=new Array(_),x=_,S=_,O=function(T){h(g,function(){var P=a.from(p[T],g),I=!1;P.subscribe(c.createOperatorSubscriber(b,function(k){m[T]=k,I||(I=!0,S--),S||b.next(y(m.slice()))},function(){--x||b.complete()}))},b)},E=0;E<_;E++)O(E)},b)}}function h(p,g,y){p?f.executeSchedule(y,p,g):g()}e.combineLatest=function(){for(var p=[],g=0;g{var n=t(6931),i=t(9975),a=Object.hasOwnProperty,o=Object.create(null);for(var s in n)a.call(n,s)&&(o[n[s]]=s);var u=r.exports={to:{},get:{}};function l(f,d,h){return Math.min(Math.max(d,f),h)}function c(f){var d=Math.round(f).toString(16).toUpperCase();return d.length<2?"0"+d:d}u.get=function(f){var d,h;switch(f.substring(0,3).toLowerCase()){case"hsl":d=u.get.hsl(f),h="hsl";break;case"hwb":d=u.get.hwb(f),h="hwb";break;default:d=u.get.rgb(f),h="rgb"}return d?{model:h,value:d}:null},u.get.rgb=function(f){if(!f)return null;var d,h,p,g=[0,0,0,1];if(d=f.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(p=d[2],d=d[1],h=0;h<3;h++){var y=2*h;g[h]=parseInt(d.slice(y,y+2),16)}p&&(g[3]=parseInt(p,16)/255)}else if(d=f.match(/^#([a-f0-9]{3,4})$/i)){for(p=(d=d[1])[3],h=0;h<3;h++)g[h]=parseInt(d[h]+d[h],16);p&&(g[3]=parseInt(p+p,16)/255)}else if(d=f.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(h=0;h<3;h++)g[h]=parseInt(d[h+1],0);d[4]&&(d[5]?g[3]=.01*parseFloat(d[4]):g[3]=parseFloat(d[4]))}else{if(!(d=f.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(d=f.match(/^(\w+)$/))?d[1]==="transparent"?[0,0,0,0]:a.call(n,d[1])?((g=n[d[1]])[3]=1,g):null:null;for(h=0;h<3;h++)g[h]=Math.round(2.55*parseFloat(d[h+1]));d[4]&&(d[5]?g[3]=.01*parseFloat(d[4]):g[3]=parseFloat(d[4]))}for(h=0;h<3;h++)g[h]=l(g[h],0,255);return g[3]=l(g[3],0,1),g},u.get.hsl=function(f){if(!f)return null;var d=f.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(d){var h=parseFloat(d[4]);return[(parseFloat(d[1])%360+360)%360,l(parseFloat(d[2]),0,100),l(parseFloat(d[3]),0,100),l(isNaN(h)?1:h,0,1)]}return null},u.get.hwb=function(f){if(!f)return null;var d=f.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(d){var h=parseFloat(d[4]);return[(parseFloat(d[1])%360+360)%360,l(parseFloat(d[2]),0,100),l(parseFloat(d[3]),0,100),l(isNaN(h)?1:h,0,1)]}return null},u.to.hex=function(){var f=i(arguments);return"#"+c(f[0])+c(f[1])+c(f[2])+(f[3]<1?c(Math.round(255*f[3])):"")},u.to.rgb=function(){var f=i(arguments);return f.length<4||f[3]===1?"rgb("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+")":"rgba("+Math.round(f[0])+", "+Math.round(f[1])+", "+Math.round(f[2])+", "+f[3]+")"},u.to.rgb.percent=function(){var f=i(arguments),d=Math.round(f[0]/255*100),h=Math.round(f[1]/255*100),p=Math.round(f[2]/255*100);return f.length<4||f[3]===1?"rgb("+d+"%, "+h+"%, "+p+"%)":"rgba("+d+"%, "+h+"%, "+p+"%, "+f[3]+")"},u.to.hsl=function(){var f=i(arguments);return f.length<4||f[3]===1?"hsl("+f[0]+", "+f[1]+"%, "+f[2]+"%)":"hsla("+f[0]+", "+f[1]+"%, "+f[2]+"%, "+f[3]+")"},u.to.hwb=function(){var f=i(arguments),d="";return f.length>=4&&f[3]!==1&&(d=", "+f[3]),"hwb("+f[0]+", "+f[1]+"%, "+f[2]+"%"+d+")"},u.to.keyword=function(f){return o[f.slice(0,3)]}},3274:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchMapTo=void 0;var n=t(3879),i=t(1018);e.switchMapTo=function(a,o){return i.isFunction(o)?n.switchMap(function(){return a},o):n.switchMap(function(){return a})}},3321:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeTransformer=void 0;var n=t(7168),i=t(9305).internal.objectUtil,a=(function(){function s(u){this._transformers=u,this._transformersPerSignature=new Map(u.map(function(l){return[l.signature,l]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return s.prototype.fromStructure=function(u){try{return u instanceof n.structure.Structure&&this._transformersPerSignature.has(u.signature)?(0,this._transformersPerSignature.get(u.signature).fromStructure)(u):u}catch(l){return i.createBrokenObject(l)}},s.prototype.toStructure=function(u){var l=this._transformers.find(function(c){return(0,c.isTypeInstance)(u)});return l!==void 0?l.toStructure(u):u},s})();e.default=a;var o=(function(){function s(u){var l=u.signature,c=u.fromStructure,f=u.toStructure,d=u.isTypeInstance;this.signature=l,this.isTypeInstance=d,this.fromStructure=c,this.toStructure=f,Object.freeze(this)}return s.prototype.extendsWith=function(u){var l=u.signature,c=u.fromStructure,f=u.toStructure,d=u.isTypeInstance;return new s({signature:l||this.signature,fromStructure:c||this.fromStructure,toStructure:f||this.toStructure,isTypeInstance:d||this.isTypeInstance})},s})();e.TypeTransformer=o},3327:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observable=void 0,e.observable=typeof Symbol=="function"&&Symbol.observable||"@@observable"},3371:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=void 0;var n=t(9691),i=new Map,a=(function(){function g(y,b){this.low=y??0,this.high=b??0}return g.prototype.inSafeRange=function(){return this.greaterThanOrEqual(g.MIN_SAFE_VALUE)&&this.lessThanOrEqual(g.MAX_SAFE_VALUE)},g.prototype.toInt=function(){return this.low},g.prototype.toNumber=function(){return this.high*s+(this.low>>>0)},g.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(s)+BigInt(this.low>>>0);var y=this.negate();return BigInt(-1)*(BigInt(y.high>>>0)*BigInt(s)+BigInt(y.low>>>0))},g.prototype.toNumberOrInfinity=function(){return this.lessThan(g.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(g.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},g.prototype.toString=function(y){if((y=y??10)<2||y>36)throw RangeError("radix out of range: "+y.toString());if(this.isZero())return"0";var b;if(this.isNegative()){if(this.equals(g.MIN_VALUE)){var _=g.fromNumber(y),m=this.div(_);return b=m.multiply(_).subtract(this),m.toString(y)+b.toInt().toString(y)}return"-"+this.negate().toString(y)}var x=g.fromNumber(Math.pow(y,6));b=this;for(var S="";;){var O=b.div(x),E=(b.subtract(O.multiply(x)).toInt()>>>0).toString(y);if((b=O).isZero())return E+S;for(;E.length<6;)E="0"+E;S=""+E+S}},g.prototype.valueOf=function(){return this.toBigInt()},g.prototype.getHighBits=function(){return this.high},g.prototype.getLowBits=function(){return this.low},g.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(g.MIN_VALUE)?64:this.negate().getNumBitsAbs();var y=this.high!==0?this.high:this.low,b=0;for(b=31;b>0&&!(y&1<=0},g.prototype.isOdd=function(){return!(1&~this.low)},g.prototype.isEven=function(){return!(1&this.low)},g.prototype.equals=function(y){var b=g.fromValue(y);return this.high===b.high&&this.low===b.low},g.prototype.notEquals=function(y){return!this.equals(y)},g.prototype.lessThan=function(y){return this.compare(y)<0},g.prototype.lessThanOrEqual=function(y){return this.compare(y)<=0},g.prototype.greaterThan=function(y){return this.compare(y)>0},g.prototype.greaterThanOrEqual=function(y){return this.compare(y)>=0},g.prototype.compare=function(y){var b=g.fromValue(y);if(this.equals(b))return 0;var _=this.isNegative(),m=b.isNegative();return _&&!m?-1:!_&&m?1:this.subtract(b).isNegative()?-1:1},g.prototype.negate=function(){return this.equals(g.MIN_VALUE)?g.MIN_VALUE:this.not().add(g.ONE)},g.prototype.add=function(y){var b=g.fromValue(y),_=this.high>>>16,m=65535&this.high,x=this.low>>>16,S=65535&this.low,O=b.high>>>16,E=65535&b.high,T=b.low>>>16,P=0,I=0,k=0,L=0;return k+=(L+=S+(65535&b.low))>>>16,L&=65535,I+=(k+=x+T)>>>16,k&=65535,P+=(I+=m+E)>>>16,I&=65535,P+=_+O,P&=65535,g.fromBits(k<<16|L,P<<16|I)},g.prototype.subtract=function(y){var b=g.fromValue(y);return this.add(b.negate())},g.prototype.multiply=function(y){if(this.isZero())return g.ZERO;var b=g.fromValue(y);if(b.isZero())return g.ZERO;if(this.equals(g.MIN_VALUE))return b.isOdd()?g.MIN_VALUE:g.ZERO;if(b.equals(g.MIN_VALUE))return this.isOdd()?g.MIN_VALUE:g.ZERO;if(this.isNegative())return b.isNegative()?this.negate().multiply(b.negate()):this.negate().multiply(b).negate();if(b.isNegative())return this.multiply(b.negate()).negate();if(this.lessThan(l)&&b.lessThan(l))return g.fromNumber(this.toNumber()*b.toNumber());var _=this.high>>>16,m=65535&this.high,x=this.low>>>16,S=65535&this.low,O=b.high>>>16,E=65535&b.high,T=b.low>>>16,P=65535&b.low,I=0,k=0,L=0,B=0;return L+=(B+=S*P)>>>16,B&=65535,k+=(L+=x*P)>>>16,L&=65535,k+=(L+=S*T)>>>16,L&=65535,I+=(k+=m*P)>>>16,k&=65535,I+=(k+=x*T)>>>16,k&=65535,I+=(k+=S*E)>>>16,k&=65535,I+=_*P+m*T+x*E+S*O,I&=65535,g.fromBits(L<<16|B,I<<16|k)},g.prototype.div=function(y){var b,_,m,x=g.fromValue(y);if(x.isZero())throw(0,n.newError)("division by zero");if(this.isZero())return g.ZERO;if(this.equals(g.MIN_VALUE))return x.equals(g.ONE)||x.equals(g.NEG_ONE)?g.MIN_VALUE:x.equals(g.MIN_VALUE)?g.ONE:(b=this.shiftRight(1).div(x).shiftLeft(1)).equals(g.ZERO)?x.isNegative()?g.ONE:g.NEG_ONE:(_=this.subtract(x.multiply(b)),m=b.add(_.div(x)));if(x.equals(g.MIN_VALUE))return g.ZERO;if(this.isNegative())return x.isNegative()?this.negate().div(x.negate()):this.negate().div(x).negate();if(x.isNegative())return this.div(x.negate()).negate();for(m=g.ZERO,_=this;_.greaterThanOrEqual(x);){b=Math.max(1,Math.floor(_.toNumber()/x.toNumber()));for(var S=Math.ceil(Math.log(b)/Math.LN2),O=S<=48?1:Math.pow(2,S-48),E=g.fromNumber(b),T=E.multiply(x);T.isNegative()||T.greaterThan(_);)b-=O,T=(E=g.fromNumber(b)).multiply(x);E.isZero()&&(E=g.ONE),m=m.add(E),_=_.subtract(T)}return m},g.prototype.modulo=function(y){var b=g.fromValue(y);return this.subtract(this.div(b).multiply(b))},g.prototype.not=function(){return g.fromBits(~this.low,~this.high)},g.prototype.and=function(y){var b=g.fromValue(y);return g.fromBits(this.low&b.low,this.high&b.high)},g.prototype.or=function(y){var b=g.fromValue(y);return g.fromBits(this.low|b.low,this.high|b.high)},g.prototype.xor=function(y){var b=g.fromValue(y);return g.fromBits(this.low^b.low,this.high^b.high)},g.prototype.shiftLeft=function(y){var b=g.toNumber(y);return(b&=63)==0?g.ZERO:b<32?g.fromBits(this.low<>>32-b):g.fromBits(0,this.low<>>b|this.high<<32-b,this.high>>b):g.fromBits(this.high>>b-32,this.high>=0?0:-1)},g.isInteger=function(y){return(y==null?void 0:y.__isInteger__)===!0},g.fromInt=function(y){var b;if((y|=0)>=-128&&y<128&&(b=i.get(y))!=null)return b;var _=new g(y,y<0?-1:0);return y>=-128&&y<128&&i.set(y,_),_},g.fromBits=function(y,b){return new g(y,b)},g.fromNumber=function(y){return isNaN(y)||!isFinite(y)?g.ZERO:y<=-u?g.MIN_VALUE:y+1>=u?g.MAX_VALUE:y<0?g.fromNumber(-y).negate():new g(y%s|0,y/s|0)},g.fromString=function(y,b,_){var m,x=(_===void 0?{}:_).strictStringValidation;if(y.length===0)throw(0,n.newError)("number format error: empty string");if(y==="NaN"||y==="Infinity"||y==="+Infinity"||y==="-Infinity")return g.ZERO;if((b=b??10)<2||b>36)throw(0,n.newError)("radix out of range: "+b.toString());if((m=y.indexOf("-"))>0)throw(0,n.newError)('number format error: interior "-" character: '+y);if(m===0)return g.fromString(y.substring(1),b).negate();for(var S=g.fromNumber(Math.pow(b,8)),O=g.ZERO,E=0;E{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.resolve=function(){throw new Error("Abstract function")},n.prototype._resolveToItself=function(i){return Promise.resolve([i])},n})();e.default=t},3399:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0,e.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},3448:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(y){for(var b,_=1,m=arguments.length;_0)&&!(m=S.next()).done;)O.push(m.value)}catch(E){x={error:E}}finally{try{m&&!m.done&&(_=S.return)&&_.call(S)}finally{if(x)throw x.error}}return O},a=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0});var o=t(9305),s=t(7168),u=t(3321),l=t(5973),c=a(t(6661)),f=o.internal.temporalUtil,d=f.dateToEpochDay,h=f.localDateTimeToEpochSecond,p=f.localTimeToNanoOfDay;function g(y,b,_){if(!b&&!_)return y;var m=function(E){return _?E.toBigInt():E.toNumberOrInfinity()},x=Object.create(Object.getPrototypeOf(y));for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)===!0){var O=y[S];x[S]=(0,o.isInt)(O)?m(O):O}return Object.freeze(x),x}e.default=n(n({},c.default),{createPoint2DTransformer:function(){return new u.TypeTransformer({signature:88,isTypeInstance:function(y){return(0,o.isPoint)(y)&&(y.z===null||y.z===void 0)},toStructure:function(y){return new s.structure.Structure(88,[(0,o.int)(y.srid),y.x,y.y])},fromStructure:function(y){s.structure.verifyStructSize("Point2D",3,y.size);var b=i(y.fields,3),_=b[0],m=b[1],x=b[2];return new o.Point(_,m,x,void 0)}})},createPoint3DTransformer:function(){return new u.TypeTransformer({signature:89,isTypeInstance:function(y){return(0,o.isPoint)(y)&&y.z!==null&&y.z!==void 0},toStructure:function(y){return new s.structure.Structure(89,[(0,o.int)(y.srid),y.x,y.y,y.z])},fromStructure:function(y){s.structure.verifyStructSize("Point3D",4,y.size);var b=i(y.fields,4),_=b[0],m=b[1],x=b[2],S=b[3];return new o.Point(_,m,x,S)}})},createDurationTransformer:function(){return new u.TypeTransformer({signature:69,isTypeInstance:o.isDuration,toStructure:function(y){var b=(0,o.int)(y.months),_=(0,o.int)(y.days),m=(0,o.int)(y.seconds),x=(0,o.int)(y.nanoseconds);return new s.structure.Structure(69,[b,_,m,x])},fromStructure:function(y){s.structure.verifyStructSize("Duration",4,y.size);var b=i(y.fields,4),_=b[0],m=b[1],x=b[2],S=b[3];return new o.Duration(_,m,x,S)}})},createLocalTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:116,isTypeInstance:o.isLocalTime,toStructure:function(m){var x=p(m.hour,m.minute,m.second,m.nanosecond);return new s.structure.Structure(116,[x])},fromStructure:function(m){s.structure.verifyStructSize("LocalTime",1,m.size);var x=i(m.fields,1)[0];return g((0,l.nanoOfDayToLocalTime)(x),b,_)}})},createTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:84,isTypeInstance:o.isTime,toStructure:function(m){var x=p(m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.timeZoneOffsetSeconds);return new s.structure.Structure(84,[x,S])},fromStructure:function(m){s.structure.verifyStructSize("Time",2,m.size);var x=i(m.fields,2),S=x[0],O=x[1],E=(0,l.nanoOfDayToLocalTime)(S);return g(new o.Time(E.hour,E.minute,E.second,E.nanosecond,O),b,_)}})},createDateTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:68,isTypeInstance:o.isDate,toStructure:function(m){var x=d(m.year,m.month,m.day);return new s.structure.Structure(68,[x])},fromStructure:function(m){s.structure.verifyStructSize("Date",1,m.size);var x=i(m.fields,1)[0];return g((0,l.epochDayToDate)(x),b,_)}})},createLocalDateTimeTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:100,isTypeInstance:o.isLocalDateTime,toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond);return new s.structure.Structure(100,[x,S])},fromStructure:function(m){s.structure.verifyStructSize("LocalDateTime",2,m.size);var x=i(m.fields,2),S=x[0],O=x[1];return g((0,l.epochSecondAndNanoToLocalDateTime)(S,O),b,_)}})},createDateTimeWithZoneIdTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:102,isTypeInstance:function(m){return(0,o.isDateTime)(m)&&m.timeZoneId!=null},toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond),O=m.timeZoneId;return new s.structure.Structure(102,[x,S,O])},fromStructure:function(m){s.structure.verifyStructSize("DateTimeWithZoneId",3,m.size);var x=i(m.fields,3),S=x[0],O=x[1],E=x[2],T=(0,l.epochSecondAndNanoToLocalDateTime)(S,O);return g(new o.DateTime(T.year,T.month,T.day,T.hour,T.minute,T.second,T.nanosecond,null,E),b,_)}})},createDateTimeWithOffsetTransformer:function(y){var b=y.disableLosslessIntegers,_=y.useBigInt;return new u.TypeTransformer({signature:70,isTypeInstance:function(m){return(0,o.isDateTime)(m)&&m.timeZoneId==null},toStructure:function(m){var x=h(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond),S=(0,o.int)(m.nanosecond),O=(0,o.int)(m.timeZoneOffsetSeconds);return new s.structure.Structure(70,[x,S,O])},fromStructure:function(m){s.structure.verifyStructSize("DateTimeWithZoneOffset",3,m.size);var x=i(m.fields,3),S=x[0],O=x[1],E=x[2],T=(0,l.epochSecondAndNanoToLocalDateTime)(S,O);return g(new o.DateTime(T.year,T.month,T.day,T.hour,T.minute,T.second,T.nanosecond,E,null),b,_)}})}})},3466:function(r,e,t){var n=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0});var i=t(8813),a=t(9419),o=n(t(3057)),s=t(9305),u=n(t(5742)),l=n(t(1530)),c=n(t(9823)),f=s.internal.constants,d=f.ACCESS_MODE_READ,h=f.ACCESS_MODE_WRITE,p=f.TELEMETRY_APIS,g=s.internal.txConfig.TxConfig,y=(function(){function b(_){var m=_===void 0?{}:_,x=m.session,S=m.config,O=m.log;this._session=x,this._retryLogic=(function(E){var T=E&&E.maxTransactionRetryTime?E.maxTransactionRetryTime:null;return new c.default({maxRetryTimeout:T})})(S),this._log=O}return b.prototype.run=function(_,m,x){var S=this;return new o.default(new i.Observable(function(O){try{O.next(S._session.run(_,m,x)),O.complete()}catch(E){O.error(E)}return function(){}}))},b.prototype.beginTransaction=function(_){return this._beginTransaction(this._session._mode,_,{api:p.UNMANAGED_TRANSACTION})},b.prototype.readTransaction=function(_,m){return this._runTransaction(d,_,m)},b.prototype.writeTransaction=function(_,m){return this._runTransaction(h,_,m)},b.prototype.executeRead=function(_,m){return this._executeInTransaction(d,_,m)},b.prototype.executeWrite=function(_,m){return this._executeInTransaction(h,_,m)},b.prototype._executeInTransaction=function(_,m,x){return this._runTransaction(_,m,x,function(S){return new l.default({run:S.run.bind(S)})})},b.prototype.close=function(){var _=this;return new i.Observable(function(m){_._session.close().then(function(){m.complete()}).catch(function(x){return m.error(x)})})},b.prototype[Symbol.asyncDispose]=function(){return this.close()},b.prototype.lastBookmark=function(){return this.lastBookmarks()},b.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},b.prototype._beginTransaction=function(_,m,x){var S=this,O=g.empty();return m&&(O=new g(m,this._log)),new i.Observable(function(E){try{S._session._beginTransaction(_,O,x).then(function(T){E.next(new u.default(T)),E.complete()}).catch(function(T){return E.error(T)})}catch(T){E.error(T)}return function(){}})},b.prototype._runTransaction=function(_,m,x,S){var O=this;S===void 0&&(S=function(P){return P});var E=g.empty();x&&(E=new g(x));var T={apiTelemetryConfig:{api:p.MANAGED_TRANSACTION,onTelemetrySuccess:function(){T.apiTelemetryConfig=void 0}}};return this._retryLogic.retry((0,i.of)(1).pipe((0,a.mergeMap)(function(){return O._beginTransaction(_,E,T.apiTelemetryConfig)}),(0,a.mergeMap)(function(P){return(0,i.defer)(function(){try{return m(S(P))}catch(I){return(0,i.throwError)(function(){return I})}}).pipe((0,a.catchError)(function(I){return P.rollback().pipe((0,a.concatWith)((0,i.throwError)(function(){return I})))}),(0,a.concatWith)(P.commit()))})))},b})();e.default=y},3473:function(r,e,t){var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(t(5319)),a=t(9305),o=n(t(1048)),s=new(t(8888)).StringDecoder("utf8");e.default={encode:function(u){return new i.default((function(l){return typeof o.default.Buffer.from=="function"?o.default.Buffer.from(l,"utf8"):new o.default.Buffer(l,"utf8")})(u))},decode:function(u,l){if(Object.prototype.hasOwnProperty.call(u,"_buffer"))return(function(c,f){var d=c.position,h=d+f;return c.position=Math.min(h,c.length),c._buffer.toString("utf8",d,h)})(u,l);if(Object.prototype.hasOwnProperty.call(u,"_buffers"))return(function(c,f){return(function(d,h){var p=h,g=d.position;return d._updatePos(Math.min(h,d.length-g)),d._buffers.reduce(function(y,b){if(p<=0)return y;if(g>=b.length)return g-=b.length,"";b._updatePos(g-b.position);var _=Math.min(b.length-g,p),m=b.readSlice(_);return b._updatePos(_),p=Math.max(p-m.length,0),g=0,y+(function(x){return s.write(x._buffer)})(m)},"")+s.end()})(c,f)})(u,l);throw(0,a.newError)("Don't know how to decode strings from '".concat(u,"'"))}}},3488:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(a,o,s,u){u===void 0&&(u=s);var l=Object.getOwnPropertyDescriptor(o,s);l&&!("get"in l?!o.__esModule:l.writable||l.configurable)||(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(a,u,l)}:function(a,o,s,u){u===void 0&&(u=s),a[u]=o[s]}),i=this&&this.__exportStar||function(a,o){for(var s in a)s==="default"||Object.prototype.hasOwnProperty.call(o,s)||n(o,a,s)};Object.defineProperty(e,"__esModule",{value:!0}),i(t(5837),e)},3545:function(r,e,t){var n=this&&this.__extends||(function(){var b=function(_,m){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(x[O]=S[O])},b(_,m)};return function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function x(){this.constructor=_}b(_,m),_.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})(),i=this&&this.__awaiter||function(b,_,m,x){return new(m||(m=Promise))(function(S,O){function E(I){try{P(x.next(I))}catch(k){O(k)}}function T(I){try{P(x.throw(I))}catch(k){O(k)}}function P(I){var k;I.done?S(I.value):(k=I.value,k instanceof m?k:new m(function(L){L(k)})).then(E,T)}P((x=x.apply(b,_||[])).next())})},a=this&&this.__generator||function(b,_){var m,x,S,O,E={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return O={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function T(P){return function(I){return(function(k){if(m)throw new TypeError("Generator is already executing.");for(;O&&(O=0,k[0]&&(E=0)),E;)try{if(m=1,x&&(S=2&k[0]?x.return:k[0]?x.throw||((S=x.return)&&S.call(x),0):x.next)&&!(S=S.call(x,k[1])).done)return S;switch(x=0,S&&(k=[2&k[0],S.value]),k[0]){case 0:case 1:S=k;break;case 4:return E.label++,{value:k[1],done:!1};case 5:E.label++,x=k[1],k=[0];continue;case 7:k=E.ops.pop(),E.trys.pop();continue;default:if(!((S=(S=E.trys).length>0&&S[S.length-1])||k[0]!==6&&k[0]!==2)){E=0;continue}if(k[0]===3&&(!S||k[1]>S[0]&&k[1]=d})];case 1:return[2,m.sent()]}})})},_.prototype.getNegotiatedProtocolVersion=function(){var m=this;return new Promise(function(x,S){m._hasProtocolVersion(x).catch(S)})},_.prototype.supportsTransactionConfig=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=f})];case 1:return[2,m.sent()]}})})},_.prototype.supportsUserImpersonation=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=h})];case 1:return[2,m.sent()]}})})},_.prototype.supportsSessionAuth=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._hasProtocolVersion(function(x){return x>=p})];case 1:return[2,m.sent()]}})})},_.prototype.verifyAuthentication=function(m){var x=m.auth;return i(this,void 0,void 0,function(){var S=this;return a(this,function(O){return[2,this._verifyAuthentication({auth:x,getAddress:function(){return S._address}})]})})},_.prototype.verifyConnectivityAndGetServerInfo=function(){return i(this,void 0,void 0,function(){return a(this,function(m){switch(m.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,m.sent()]}})})},_})(s.default);e.default=y},3555:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.finalize=void 0;var n=t(7843);e.finalize=function(i){return n.operate(function(a,o){try{a.subscribe(o)}finally{o.add(i)}})}},3618:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__awaiter||function(g,y,b,_){return new(b||(b=Promise))(function(m,x){function S(T){try{E(_.next(T))}catch(P){x(P)}}function O(T){try{E(_.throw(T))}catch(P){x(P)}}function E(T){var P;T.done?m(T.value):(P=T.value,P instanceof b?P:new b(function(I){I(P)})).then(S,O)}E((_=_.apply(g,y||[])).next())})},a=this&&this.__generator||function(g,y){var b,_,m,x,S={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return x={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function O(E){return function(T){return(function(P){if(b)throw new TypeError("Generator is already executing.");for(;x&&(x=0,P[0]&&(S=0)),S;)try{if(b=1,_&&(m=2&P[0]?_.return:P[0]?_.throw||((m=_.return)&&m.call(_),0):_.next)&&!(m=m.call(_,P[1])).done)return m;switch(_=0,m&&(P=[2&P[0],m.value]),P[0]){case 0:case 1:m=P;break;case 4:return S.label++,{value:P[1],done:!1};case 5:S.label++,_=P[1],P=[0];continue;case 7:P=S.ops.pop(),S.trys.pop();continue;default:if(!((m=(m=S.trys).length>0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.joinAllInternals=void 0;var n=t(6640),i=t(1251),a=t(2706),o=t(983),s=t(2343);e.joinAllInternals=function(u,l){return a.pipe(s.toArray(),o.mergeMap(function(c){return u(c)}),l?i.mapOneOrManyArgs(l):n.identity)}},3659:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default="5.28.2"},3692:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var n=t(5006),i=t(827);e.asapScheduler=new i.AsapScheduler(n.AsapAction),e.asap=e.asapScheduler},3862:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var n=t(2628),i=t(3229);e.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler},3865:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.concat=void 0;var n=t(8158),i=t(1107),a=t(4917);e.concat=function(){for(var o=[],s=0;s{Object.defineProperty(e,"__esModule",{value:!0}),e.switchMap=void 0;var n=t(9445),i=t(7843),a=t(3111);e.switchMap=function(o,s){return i.operate(function(u,l){var c=null,f=0,d=!1,h=function(){return d&&!c&&l.complete()};u.subscribe(a.createOperatorSubscriber(l,function(p){c==null||c.unsubscribe();var g=0,y=f++;n.innerFrom(o(p,y)).subscribe(c=a.createOperatorSubscriber(l,function(b){return l.next(s?s(p,b,y,g++):b)},function(){c=null,h()}))},function(){d=!0,h()}))})}},3951:function(r,e,t){var n=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCertificatesLoader=e.HostNameResolver=e.Channel=void 0;var i=n(t(6245)),a=n(t(2199)),o=n(t(614));e.Channel=i.default,e.HostNameResolver=a.default,e.ClientCertificatesLoader=o.default},3964:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tap=void 0;var n=t(1018),i=t(7843),a=t(3111),o=t(6640);e.tap=function(s,u,l){var c=n.isFunction(s)||u||l?{next:s,error:u,complete:l}:s;return c?i.operate(function(f,d){var h;(h=c.subscribe)===null||h===void 0||h.call(c);var p=!0;f.subscribe(a.createOperatorSubscriber(d,function(g){var y;(y=c.next)===null||y===void 0||y.call(c,g),d.next(g)},function(){var g;p=!1,(g=c.complete)===null||g===void 0||g.call(c),d.complete()},function(g){var y;p=!1,(y=c.error)===null||y===void 0||y.call(c,g),d.error(g)},function(){var g,y;p&&((g=c.unsubscribe)===null||g===void 0||g.call(c)),(y=c.finalize)===null||y===void 0||y.call(c)}))}):o.identity}},3982:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skip=void 0;var n=t(783);e.skip=function(i){return n.filter(function(a,o){return i<=o})}},4027:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.stringify=void 0;var n=t(93);e.stringify=function(i,a){return JSON.stringify(i,function(o,s){return(0,n.isBrokenObject)(s)?{__isBrokenObject__:!0,__reason__:(0,n.getBrokenObjectReason)(s)}:typeof s=="bigint"?"".concat(s,"n"):(a==null?void 0:a.sortedElements)!==!0||typeof s!="object"||Array.isArray(s)?(a==null?void 0:a.useCustomToString)!==!0||typeof s!="object"||Array.isArray(s)||typeof s.toString!="function"||s.toString===Object.prototype.toString?s:s==null?void 0:s.toString():Object.keys(s).sort().reduce(function(u,l){return u[l]=s[l],u},{})})}},4092:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.timer=void 0;var n=t(4662),i=t(7961),a=t(8613),o=t(1074);e.timer=function(s,u,l){s===void 0&&(s=0),l===void 0&&(l=i.async);var c=-1;return u!=null&&(a.isScheduler(u)?l=u:c=u),new n.Observable(function(f){var d=o.isValidDate(s)?+s-l.now():s;d<0&&(d=0);var h=0;return l.schedule(function(){f.closed||(f.next(h++),0<=c?this.schedule(void 0,c):f.complete())},d)})}},4132:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(a){function o(s){var u=a.call(this)||this;return u._connection=s,u}return n(o,a),o.prototype.acquireConnection=function(s){var u=s===void 0?{}:s,l=(u.accessMode,u.database,u.bookmarks,this._connection);return this._connection=null,Promise.resolve(l)},o})(t(9305).ConnectionProvider);e.default=i},4151:function(r,e,t){var n=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(t(9018)),a=(t(9305),(function(){function o(s){this._routingContext=s}return o.prototype.lookupRoutingTableOnRouter=function(s,u,l,c){var f=this;return s._acquireConnection(function(d){return f._requestRawRoutingTable(d,s,u,l,c).then(function(h){return h.isNull?null:i.default.fromRawRoutingTable(u,l,h)})})},o.prototype._requestRawRoutingTable=function(s,u,l,c,f){var d=this;return new Promise(function(h,p){s.protocol().requestRoutingInformation({routingContext:d._routingContext,databaseName:l,impersonatedUser:f,sessionContext:{bookmarks:u._lastBookmarks,mode:u._mode,database:u._database,afterComplete:u._onComplete},onCompleted:h,onError:p})})},o})());e.default=a},4209:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.iif=void 0;var n=t(9353);e.iif=function(i,a,o){return n.defer(function(){return i()?a:o})}},4212:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.QueueAction=void 0;var i=(function(a){function o(s,u){var l=a.call(this,s,u)||this;return l.scheduler=s,l.work=u,l}return n(o,a),o.prototype.schedule=function(s,u){return u===void 0&&(u=0),u>0?a.prototype.schedule.call(this,s,u):(this.delay=u,this.state=s,this.scheduler.flush(this),this)},o.prototype.execute=function(s,u){return u>0||this.closed?a.prototype.execute.call(this,s,u):this._execute(s,u)},o.prototype.requestAsyncId=function(s,u,l){return l===void 0&&(l=0),l!=null&&l>0||l==null&&this.delay>0?a.prototype.requestAsyncId.call(this,s,u,l):(s.flush(this),0)},o})(t(5267).AsyncAction);e.QueueAction=i},4271:function(r,e,t){var n=this&&this.__awaiter||function(s,u,l,c){return new(l||(l=Promise))(function(f,d){function h(y){try{g(c.next(y))}catch(b){d(b)}}function p(y){try{g(c.throw(y))}catch(b){d(b)}}function g(y){var b;y.done?f(y.value):(b=y.value,b instanceof l?b:new l(function(_){_(b)})).then(h,p)}g((c=c.apply(s,u||[])).next())})},i=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;d&&(d=0,b[0]&&(h=0)),h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(){}return n.prototype.selectReader=function(i){throw new Error("Abstract function")},n.prototype.selectWriter=function(i){throw new Error("Abstract function")},n})();e.default=t},4325:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{r.exports=function(e){for(var t=[],n=0;n{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeScan=void 0;var n=t(7843),i=t(1983);e.mergeScan=function(a,o,s){return s===void 0&&(s=1/0),n.operate(function(u,l){var c=o;return i.mergeInternals(u,l,function(f,d){return a(c,f,d)},s,function(f){c=f},!1,void 0,function(){return c=null})})}},4440:function(r,e,t){var n=this&&this.__read||function(s,u){var l=typeof Symbol=="function"&&s[Symbol.iterator];if(!l)return s;var c,f,d=l.call(s),h=[];try{for(;(u===void 0||u-- >0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{Object.defineProperty(e,"__esModule",{value:!0}),e.debounce=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.debounce=function(s){return n.operate(function(u,l){var c=!1,f=null,d=null,h=function(){if(d==null||d.unsubscribe(),d=null,c){c=!1;var p=f;f=null,l.next(p)}};u.subscribe(a.createOperatorSubscriber(l,function(p){d==null||d.unsubscribe(),c=!0,f=p,d=a.createOperatorSubscriber(l,h,i.noop),o.innerFrom(s(p)).subscribe(d)},function(){h(),l.complete()},void 0,function(){f=d=null}))})}},4520:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.elementAt=void 0;var n=t(7057),i=t(783),a=t(4869),o=t(378),s=t(846);e.elementAt=function(u,l){if(u<0)throw new n.ArgumentOutOfRangeError;var c=arguments.length>=2;return function(f){return f.pipe(i.filter(function(d,h){return h===u}),s.take(1),c?o.defaultIfEmpty(l):a.throwIfEmpty(function(){return new n.ArgumentOutOfRangeError}))}}},4531:function(r,e){var t=this&&this.__awaiter||function(a,o,s,u){return new(s||(s=Promise))(function(l,c){function f(p){try{h(u.next(p))}catch(g){c(g)}}function d(p){try{h(u.throw(p))}catch(g){c(g)}}function h(p){var g;p.done?l(p.value):(g=p.value,g instanceof s?g:new s(function(y){y(g)})).then(f,d)}h((u=u.apply(a,o||[])).next())})},n=this&&this.__generator||function(a,o){var s,u,l,c,f={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(h){return function(p){return(function(g){if(s)throw new TypeError("Generator is already executing.");for(;c&&(c=0,g[0]&&(f=0)),f;)try{if(s=1,u&&(l=2&g[0]?u.return:g[0]?u.throw||((l=u.return)&&l.call(u),0):u.next)&&!(l=l.call(u,g[1])).done)return l;switch(u=0,l&&(g=[2&g[0],l.value]),g[0]){case 0:case 1:l=g;break;case 4:return f.label++,{value:g[1],done:!1};case 5:f.label++,u=g[1],g=[0];continue;case 7:g=f.ops.pop(),f.trys.pop();continue;default:if(!((l=(l=f.trys).length>0&&l[l.length-1])||g[0]!==6&&g[0]!==2)){f=0;continue}if(g[0]===3&&(!l||g[1]>l[0]&&g[1]this._connectionLivenessCheckTimeout?[4,o.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,u.sent()];case 2:return[2,!0]}})})},Object.defineProperty(a.prototype,"_isCheckDisabled",{get:function(){return this._connectionLivenessCheckTimeout==null||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),a.prototype._isNewlyCreatedConnection=function(o){return o.authToken==null},a})();e.default=i},4569:function(r,e,t){var n,i=this&&this.__extends||(function(){var u=function(l,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(f[h]=d[h])},u(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}u(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})(),a=this&&this.__assign||function(){return a=Object.assign||function(u){for(var l,c=1,f=arguments.length;c{Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var n=t(5),i=t(8014),a=t(3327),o=t(2706),s=t(3413),u=t(1018),l=t(9223),c=(function(){function d(h){h&&(this._subscribe=h)}return d.prototype.lift=function(h){var p=new d;return p.source=this,p.operator=h,p},d.prototype.subscribe=function(h,p,g){var y,b=this,_=(y=h)&&y instanceof n.Subscriber||(function(m){return m&&u.isFunction(m.next)&&u.isFunction(m.error)&&u.isFunction(m.complete)})(y)&&i.isSubscription(y)?h:new n.SafeSubscriber(h,p,g);return l.errorContext(function(){var m=b,x=m.operator,S=m.source;_.add(x?x.call(_,S):S?b._subscribe(_):b._trySubscribe(_))}),_},d.prototype._trySubscribe=function(h){try{return this._subscribe(h)}catch(p){h.error(p)}},d.prototype.forEach=function(h,p){var g=this;return new(p=f(p))(function(y,b){var _=new n.SafeSubscriber({next:function(m){try{h(m)}catch(x){b(x),_.unsubscribe()}},error:b,complete:y});g.subscribe(_)})},d.prototype._subscribe=function(h){var p;return(p=this.source)===null||p===void 0?void 0:p.subscribe(h)},d.prototype[a.observable]=function(){return this},d.prototype.pipe=function(){for(var h=[],p=0;p{r.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},4721:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipWhile=void 0;var n=t(7843),i=t(3111);e.skipWhile=function(a){return n.operate(function(o,s){var u=!1,l=0;o.subscribe(i.createOperatorSubscriber(s,function(c){return(u||(u=!a(c,l++)))&&s.next(c)}))})}},4746:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},4753:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.exhaustMap=void 0;var n=t(5471),i=t(9445),a=t(7843),o=t(3111);e.exhaustMap=function s(u,l){return l?function(c){return c.pipe(s(function(f,d){return i.innerFrom(u(f,d)).pipe(n.map(function(h,p){return l(f,h,d,p)}))}))}:a.operate(function(c,f){var d=0,h=null,p=!1;c.subscribe(o.createOperatorSubscriber(f,function(g){h||(h=o.createOperatorSubscriber(f,void 0,function(){h=null,p&&f.complete()}),i.innerFrom(u(g,d++)).subscribe(h))},function(){p=!0,!h&&f.complete()}))})}},4780:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.takeUntil=void 0;var n=t(7843),i=t(3111),a=t(9445),o=t(1342);e.takeUntil=function(s){return n.operate(function(u,l){a.innerFrom(s).subscribe(i.createOperatorSubscriber(l,function(){return l.complete()},o.noop)),!l.closed&&u.subscribe(l)})}},4820:function(r,e,t){var n=this&&this.__generator||function(u,l){var c,f,d,h,p={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return h={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function g(y){return function(b){return(function(_){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,_[0]&&(p=0)),p;)try{if(c=1,f&&(d=2&_[0]?f.return:_[0]?f.throw||((d=f.return)&&d.call(f),0):f.next)&&!(d=d.call(f,_[1])).done)return d;switch(f=0,d&&(_=[2&_[0],d.value]),_[0]){case 0:case 1:d=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,f=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(!((d=(d=p.trys).length>0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p};Object.defineProperty(e,"__esModule",{value:!0});var o=t(9691),s=(function(){function u(l,c,f){this.keys=l,this.length=l.length,this._fields=c,this._fieldLookup=f??(function(d){var h={};return d.forEach(function(p,g){h[p]=g}),h})(l)}return u.prototype.forEach=function(l){var c,f;try{for(var d=i(this.entries()),h=d.next();!h.done;h=d.next()){var p=a(h.value,2),g=p[0];l(p[1],g,this)}}catch(y){c={error:y}}finally{try{h&&!h.done&&(f=d.return)&&f.call(d)}finally{if(c)throw c.error}}},u.prototype.map=function(l){var c,f,d=[];try{for(var h=i(this.entries()),p=h.next();!p.done;p=h.next()){var g=a(p.value,2),y=g[0],b=g[1];d.push(l(b,y,this))}}catch(_){c={error:_}}finally{try{p&&!p.done&&(f=h.return)&&f.call(h)}finally{if(c)throw c.error}}return d},u.prototype.entries=function(){var l;return n(this,function(c){switch(c.label){case 0:l=0,c.label=1;case 1:return lthis._fields.length-1||c<0)throw(0,o.newError)("This record has no field with index '"+c.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[c]},u.prototype.has=function(l){return typeof l=="number"?l>=0&&l{Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutWith=void 0;var n=t(7961),i=t(1074),a=t(1554);e.timeoutWith=function(o,s,u){var l,c,f;if(u=u??n.async,i.isValidDate(o)?l=o:typeof o=="number"&&(c=o),!s)throw new TypeError("No observable provided to switch to");if(f=function(){return s},l==null&&c==null)throw new TypeError("No timeout provided.");return a.timeout({first:l,each:c,scheduler:u,with:f})}},4869:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfEmpty=void 0;var n=t(2823),i=t(7843),a=t(3111);function o(){return new n.EmptyError}e.throwIfEmpty=function(s){return s===void 0&&(s=o),i.operate(function(u,l){var c=!1;u.subscribe(a.createOperatorSubscriber(l,function(f){c=!0,l.next(f)},function(){return c?l.complete():l.error(s())}))})}},4883:function(r,e,t){var n,i=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var a=t(9691),o="error",s="warn",u="info",l="debug",c=u,f=((n={})[o]=0,n[s]=1,n[u]=2,n[l]=3,n),d=(function(){function g(y,b){this._level=y,this._loggerFunction=b}return g.create=function(y){if((y==null?void 0:y.logging)!=null){var b=y.logging,_=(function(x){if((x==null?void 0:x.level)!=null){var S=x.level,O=f[S];if(O==null&&O!==0)throw(0,a.newError)("Illegal logging level: ".concat(S,". Supported levels are: ").concat(Object.keys(f).toString()));return S}return c})(b),m=(function(x){var S,O;if((x==null?void 0:x.logger)!=null){var E=x.logger;if(E!=null&&typeof E=="function")return E}throw(0,a.newError)("Illegal logger function: ".concat((O=(S=x==null?void 0:x.logger)===null||S===void 0?void 0:S.toString())!==null&&O!==void 0?O:"undefined"))})(b);return new g(_,m)}return this.noOp()},g.noOp=function(){return h},g.prototype.isErrorEnabled=function(){return p(this._level,o)},g.prototype.error=function(y){this.isErrorEnabled()&&this._loggerFunction(o,y)},g.prototype.isWarnEnabled=function(){return p(this._level,s)},g.prototype.warn=function(y){this.isWarnEnabled()&&this._loggerFunction(s,y)},g.prototype.isInfoEnabled=function(){return p(this._level,u)},g.prototype.info=function(y){this.isInfoEnabled()&&this._loggerFunction(u,y)},g.prototype.isDebugEnabled=function(){return p(this._level,l)},g.prototype.debug=function(y){this.isDebugEnabled()&&this._loggerFunction(l,y)},g})();e.Logger=d;var h=new((function(g){function y(){return g.call(this,u,function(b,_){})||this}return i(y,g),y.prototype.isErrorEnabled=function(){return!1},y.prototype.error=function(b){},y.prototype.isWarnEnabled=function(){return!1},y.prototype.warn=function(b){},y.prototype.isInfoEnabled=function(){return!1},y.prototype.info=function(b){},y.prototype.isDebugEnabled=function(){return!1},y.prototype.debug=function(b){},y})(d));function p(g,y){return f[g]>=f[y]}},4912:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pluck=void 0;var n=t(5471);e.pluck=function(){for(var i=[],a=0;a{Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var n=t(1656),i=t(9445);e.from=function(a,o){return o?n.scheduled(a,o):i.innerFrom(a)}},4953:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleReadableStreamLike=void 0;var n=t(854),i=t(9137);e.scheduleReadableStreamLike=function(a,o){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(a),o)}},5006:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsapAction=void 0;var i=t(5267),a=t(6293),o=(function(s){function u(l,c){var f=s.call(this,l,c)||this;return f.scheduler=l,f.work=c,f}return n(u,s),u.prototype.requestAsyncId=function(l,c,f){return f===void 0&&(f=0),f!==null&&f>0?s.prototype.requestAsyncId.call(this,l,c,f):(l.actions.push(this),l._scheduled||(l._scheduled=a.immediateProvider.setImmediate(l.flush.bind(l,void 0))))},u.prototype.recycleAsyncId=function(l,c,f){var d;if(f===void 0&&(f=0),f!=null?f>0:this.delay>0)return s.prototype.recycleAsyncId.call(this,l,c,f);var h=l.actions;c!=null&&((d=h[h.length-1])===null||d===void 0?void 0:d.id)!==c&&(a.immediateProvider.clearImmediate(c),l._scheduled===c&&(l._scheduled=void 0))},u})(i.AsyncAction);e.AsapAction=o},5022:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(m,x,S,O){O===void 0&&(O=S);var E=Object.getOwnPropertyDescriptor(x,S);E&&!("get"in E?!x.__esModule:E.writable||E.configurable)||(E={enumerable:!0,get:function(){return x[S]}}),Object.defineProperty(m,O,E)}:function(m,x,S,O){O===void 0&&(O=S),m[O]=x[S]}),i=this&&this.__setModuleDefault||(Object.create?function(m,x){Object.defineProperty(m,"default",{enumerable:!0,value:x})}:function(m,x){m.default=x}),a=this&&this.__importStar||function(m){if(m&&m.__esModule)return m;var x={};if(m!=null)for(var S in m)S!=="default"&&Object.prototype.hasOwnProperty.call(m,S)&&n(x,m,S);return i(x,m),x};Object.defineProperty(e,"__esModule",{value:!0}),e.floorMod=e.floorDiv=e.assertValidZoneId=e.assertValidNanosecond=e.assertValidSecond=e.assertValidMinute=e.assertValidHour=e.assertValidDay=e.assertValidMonth=e.assertValidYear=e.timeZoneOffsetInSeconds=e.totalNanoseconds=e.newDate=e.toStandardDate=e.isoStringToStandardDate=e.dateToIsoString=e.timeZoneOffsetToIsoString=e.timeToIsoString=e.durationToIsoString=e.dateToEpochDay=e.localDateTimeToEpochSecond=e.localTimeToNanoOfDay=e.normalizeNanosecondsForDuration=e.normalizeSecondsForDuration=e.SECONDS_PER_DAY=e.DAYS_PER_400_YEAR_CYCLE=e.DAYS_0000_TO_1970=e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE=e.NANOS_PER_MILLISECOND=e.NANOS_PER_SECOND=e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE=e.MINUTES_PER_HOUR=e.NANOSECOND_OF_SECOND_RANGE=e.SECOND_OF_MINUTE_RANGE=e.MINUTE_OF_HOUR_RANGE=e.HOUR_OF_DAY_RANGE=e.DAY_OF_MONTH_RANGE=e.MONTH_OF_YEAR_RANGE=e.YEAR_RANGE=void 0;var o=a(t(3371)),s=t(9691),u=t(6587),l=(function(){function m(x,S){this._minNumber=x,this._maxNumber=S,this._minInteger=(0,o.int)(x),this._maxInteger=(0,o.int)(S)}return m.prototype.contains=function(x){if((0,o.isInt)(x)&&x instanceof o.default)return x.greaterThanOrEqual(this._minInteger)&&x.lessThanOrEqual(this._maxInteger);if(typeof x=="bigint"){var S=(0,o.int)(x);return S.greaterThanOrEqual(this._minInteger)&&S.lessThanOrEqual(this._maxInteger)}return x>=this._minNumber&&x<=this._maxNumber},m.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},m})();function c(m,x,S){m=(0,o.int)(m),x=(0,o.int)(x),S=(0,o.int)(S);var O=m.multiply(365);return O=(O=(O=m.greaterThanOrEqual(0)?O.add(m.add(3).div(4).subtract(m.add(99).div(100)).add(m.add(399).div(400))):O.subtract(m.div(-4).subtract(m.div(-100)).add(m.div(-400)))).add(x.multiply(367).subtract(362).div(12))).add(S.subtract(1)),x.greaterThan(2)&&(O=O.subtract(1),(function(E){return!(!(E=(0,o.int)(E)).modulo(4).equals(0)||E.modulo(100).equals(0)&&!E.modulo(400).equals(0))})(m)||(O=O.subtract(1))),O.subtract(e.DAYS_0000_TO_1970)}function f(m,x){return m===1?x%400==0||x%4==0&&x%100!=0?29:28:[0,2,4,6,7,9,11].includes(m)?31:30}e.YEAR_RANGE=new l(-999999999,999999999),e.MONTH_OF_YEAR_RANGE=new l(1,12),e.DAY_OF_MONTH_RANGE=new l(1,31),e.HOUR_OF_DAY_RANGE=new l(0,23),e.MINUTE_OF_HOUR_RANGE=new l(0,59),e.SECOND_OF_MINUTE_RANGE=new l(0,59),e.NANOSECOND_OF_SECOND_RANGE=new l(0,999999999),e.MINUTES_PER_HOUR=60,e.SECONDS_PER_MINUTE=60,e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE*e.MINUTES_PER_HOUR,e.NANOS_PER_SECOND=1e9,e.NANOS_PER_MILLISECOND=1e6,e.NANOS_PER_MINUTE=e.NANOS_PER_SECOND*e.SECONDS_PER_MINUTE,e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE*e.MINUTES_PER_HOUR,e.DAYS_0000_TO_1970=719528,e.DAYS_PER_400_YEAR_CYCLE=146097,e.SECONDS_PER_DAY=86400,e.normalizeSecondsForDuration=function(m,x){return(0,o.int)(m).add(g(x,e.NANOS_PER_SECOND))},e.normalizeNanosecondsForDuration=function(m){return y(m,e.NANOS_PER_SECOND)},e.localTimeToNanoOfDay=function(m,x,S,O){m=(0,o.int)(m),x=(0,o.int)(x),S=(0,o.int)(S),O=(0,o.int)(O);var E=m.multiply(e.NANOS_PER_HOUR);return(E=(E=E.add(x.multiply(e.NANOS_PER_MINUTE))).add(S.multiply(e.NANOS_PER_SECOND))).add(O)},e.localDateTimeToEpochSecond=function(m,x,S,O,E,T,P){var I=c(m,x,S),k=(function(L,B,j){L=(0,o.int)(L),B=(0,o.int)(B),j=(0,o.int)(j);var z=L.multiply(e.SECONDS_PER_HOUR);return(z=z.add(B.multiply(e.SECONDS_PER_MINUTE))).add(j)})(O,E,T);return I.multiply(e.SECONDS_PER_DAY).add(k)},e.dateToEpochDay=c,e.durationToIsoString=function(m,x,S,O){var E=_(m),T=_(x),P=(function(I,k){var L,B;I=(0,o.int)(I),k=(0,o.int)(k);var j=I.isNegative(),z=k.greaterThan(0);return L=j&&z?I.equals(-1)?"-0":I.add(1).toString():I.toString(),z&&(B=b(j?k.negate().add(2*e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND):k.add(e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND))),B!=null?L+B:L})(S,O);return"P".concat(E,"M").concat(T,"DT").concat(P,"S")},e.timeToIsoString=function(m,x,S,O){var E=_(m,2),T=_(x,2),P=_(S,2),I=b(O);return"".concat(E,":").concat(T,":").concat(P).concat(I)},e.timeZoneOffsetToIsoString=function(m){if((m=(0,o.int)(m)).equals(0))return"Z";var x=m.isNegative();x&&(m=m.multiply(-1));var S=x?"-":"+",O=_(m.div(e.SECONDS_PER_HOUR),2),E=_(m.div(e.SECONDS_PER_MINUTE).modulo(e.MINUTES_PER_HOUR),2),T=m.modulo(e.SECONDS_PER_MINUTE),P=T.equals(0)?null:_(T,2);return P!=null?"".concat(S).concat(O,":").concat(E,":").concat(P):"".concat(S).concat(O,":").concat(E)},e.dateToIsoString=function(m,x,S){var O=(function(P){var I=(0,o.int)(P);return I.isNegative()||I.greaterThan(9999)?_(I,6,{usePositiveSign:!0}):_(I,4)})(m),E=_(x,2),T=_(S,2);return"".concat(O,"-").concat(E,"-").concat(T)},e.isoStringToStandardDate=function(m){return new Date(m)},e.toStandardDate=function(m){return new Date(m)},e.newDate=function(m){return new Date(m)},e.totalNanoseconds=function(m,x){return(function(S,O){return S instanceof o.default?S.add(O):typeof S=="bigint"?S+BigInt(O):S+O})(x=x??0,m.getMilliseconds()*e.NANOS_PER_MILLISECOND)},e.timeZoneOffsetInSeconds=function(m){var x=m.getSeconds()-m.getUTCSeconds(),S=m.getMinutes()-m.getUTCMinutes(),O=m.getHours()-m.getUTCHours(),E=(function(T){return T.getMonth()===T.getUTCMonth()?T.getDate()-T.getUTCDate():T.getFullYear()>T.getUTCFullYear()||T.getMonth()>T.getUTCMonth()&&T.getFullYear()===T.getUTCFullYear()?T.getDate()+f(T.getUTCMonth(),T.getUTCFullYear())-T.getUTCDate():T.getDate()-(T.getUTCDate()+f(T.getMonth(),T.getFullYear()))})(m);return O*e.SECONDS_PER_HOUR+S*e.SECONDS_PER_MINUTE+x+E*e.SECONDS_PER_DAY},e.assertValidYear=function(m){return p(m,e.YEAR_RANGE,"Year")},e.assertValidMonth=function(m){return p(m,e.MONTH_OF_YEAR_RANGE,"Month")},e.assertValidDay=function(m){return p(m,e.DAY_OF_MONTH_RANGE,"Day")},e.assertValidHour=function(m){return p(m,e.HOUR_OF_DAY_RANGE,"Hour")},e.assertValidMinute=function(m){return p(m,e.MINUTE_OF_HOUR_RANGE,"Minute")},e.assertValidSecond=function(m){return p(m,e.SECOND_OF_MINUTE_RANGE,"Second")},e.assertValidNanosecond=function(m){return p(m,e.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")};var d=new Map,h=function(m,x){return(0,s.newError)("".concat(x,' is expected to be a valid ZoneId but was: "').concat(m,'"'))};function p(m,x,S){if((0,u.assertNumberOrInteger)(m,S),!x.contains(m))throw(0,s.newError)("".concat(S," is expected to be in range ").concat(x.toString()," but was: ").concat(m.toString()));return m}function g(m,x){m=(0,o.int)(m),x=(0,o.int)(x);var S=m.div(x);return m.isPositive()!==x.isPositive()&&S.multiply(x).notEquals(m)&&(S=S.subtract(1)),S}function y(m,x){return m=(0,o.int)(m),x=(0,o.int)(x),m.subtract(g(m,x).multiply(x))}function b(m){return(m=(0,o.int)(m)).equals(0)?"":"."+_(m,9)}function _(m,x,S){var O=(m=(0,o.int)(m)).isNegative();O&&(m=m.negate());var E=m.toString();if(x!=null)for(;E.length0)&&!(b=m.next()).done;)x.push(b.value)}catch(S){_={error:S}}finally{try{b&&!b.done&&(y=m.return)&&y.call(m)}finally{if(_)throw _.error}}return x},i=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var a=t(7168),o=t(9305),s=i(t(7518)),u=t(5973),l=t(6492),c=o.internal.temporalUtil.localDateTimeToEpochSecond,f=new Map;function d(p,g,y){var b=(function(S){if(!f.has(S)){var O=new Intl.DateTimeFormat("en-US",{timeZone:S,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});f.set(S,O)}return f.get(S)})(p),_=(0,o.int)(g).multiply(1e3).add((0,o.int)(y).div(1e6)).toNumber(),m=b.formatToParts(_).reduce(function(S,O){return O.type==="era"?S.adjustEra=O.value.toUpperCase()==="B"?function(E){return E.subtract(1).negate()}:l.identity:O.type==="hour"?S.hour=(0,o.int)(O.value).modulo(24):O.type!=="literal"&&(S[O.type]=(0,o.int)(O.value)),S},{});m.year=m.adjustEra(m.year);var x=c(m.year,m.month,m.day,m.hour,m.minute,m.second,m.nanosecond);return m.timeZoneOffsetSeconds=x.subtract(g),m.hour=m.hour.modulo(24),m}function h(p,g,y){if(!g&&!y)return p;var b=function(S){return y?S.toBigInt():S.toNumberOrInfinity()},_=Object.create(Object.getPrototypeOf(p));for(var m in p)if(Object.prototype.hasOwnProperty.call(p,m)===!0){var x=p[m];_[m]=(0,o.isInt)(x)?b(x):x}return Object.freeze(_),_}e.default={createDateTimeWithZoneIdTransformer:function(p,g){var y=p.disableLosslessIntegers,b=p.useBigInt;return s.default.createDateTimeWithZoneIdTransformer(p).extendsWith({signature:105,fromStructure:function(_){a.structure.verifyStructSize("DateTimeWithZoneId",3,_.size);var m=n(_.fields,3),x=m[0],S=m[1],O=m[2],E=d(O,x,S);return h(new o.DateTime(E.year,E.month,E.day,E.hour,E.minute,E.second,(0,o.int)(S),E.timeZoneOffsetSeconds,O),y,b)},toStructure:function(_){var m=c(_.year,_.month,_.day,_.hour,_.minute,_.second,_.nanosecond),x=_.timeZoneOffsetSeconds!=null?_.timeZoneOffsetSeconds:(function(T,P,I){var k=d(T,P,I),L=c(k.year,k.month,k.day,k.hour,k.minute,k.second,I).subtract(P),B=P.subtract(L),j=d(T,B,I);return c(j.year,j.month,j.day,j.hour,j.minute,j.second,I).subtract(B)})(_.timeZoneId,m,_.nanosecond);_.timeZoneOffsetSeconds==null&&g.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 S=m.subtract(x),O=(0,o.int)(_.nanosecond),E=_.timeZoneId;return new a.structure.Structure(105,[S,O,E])}})},createDateTimeWithOffsetTransformer:function(p){var g=p.disableLosslessIntegers,y=p.useBigInt;return s.default.createDateTimeWithOffsetTransformer(p).extendsWith({signature:73,toStructure:function(b){var _=c(b.year,b.month,b.day,b.hour,b.minute,b.second,b.nanosecond),m=(0,o.int)(b.nanosecond),x=(0,o.int)(b.timeZoneOffsetSeconds),S=_.subtract(x);return new a.structure.Structure(73,[S,m,x])},fromStructure:function(b){a.structure.verifyStructSize("DateTimeWithZoneOffset",3,b.size);var _=n(b.fields,3),m=_[0],x=_[1],S=_[2],O=(0,o.int)(m).add(S),E=(0,u.epochSecondAndNanoToLocalDateTime)(O,x);return h(new o.DateTime(E.year,E.month,E.day,E.hour,E.minute,E.second,E.nanosecond,S,null),g,y)}})}}},5184:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeOn=void 0;var n=t(7110),i=t(7843),a=t(3111);e.observeOn=function(o,s){return s===void 0&&(s=0),i.operate(function(u,l){u.subscribe(a.createOperatorSubscriber(l,function(c){return n.executeSchedule(l,o,function(){return l.next(c)},s)},function(){return n.executeSchedule(l,o,function(){return l.complete()},s)},function(c){return n.executeSchedule(l,o,function(){return l.error(c)},s)}))})}},5250:function(r,e,t){var n;r=t.nmd(r),(function(){var i,a="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",_="[object Date]",m="[object Error]",x="[object Function]",S="[object GeneratorFunction]",O="[object Map]",E="[object Number]",T="[object Object]",P="[object Promise]",I="[object RegExp]",k="[object Set]",L="[object String]",B="[object Symbol]",j="[object WeakMap]",z="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",W="[object Float64Array]",$="[object Int8Array]",J="[object Int16Array]",X="[object Int32Array]",Z="[object Uint8Array]",ue="[object Uint8ClampedArray]",re="[object Uint16Array]",ne="[object Uint32Array]",le=/\b__p \+= '';/g,ce=/\b(__p \+=) '' \+/g,pe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fe=/&(?:amp|lt|gt|quot|#39);/g,se=/[&<>"']/g,de=RegExp(fe.source),ge=RegExp(se.source),Oe=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,De=/<%=([\s\S]+?)%>/g,Ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Te=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(Q.source),we=/^\s+/,Ee=/\s/,Me=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ie=/\{\n\/\* \[wrapped with (.+)\] \*/,Ye=/,? & /,ot=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,mt=/[()=,{}\[\]\/\s]/,wt=/\\(\\)?/g,Mt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,Ue=/^0o[0-7]+$/i,Qe=/^(?:0|[1-9]\d*)$/,Ze=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nt=/($^)/,It=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",Lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Rt="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",Yt="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",Ut="\\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",Rr="["+ct+"]",Xt="["+Ut+"]",Vr="["+Lt+"]",Br="\\d+",mr="["+Rt+"]",ur="["+jt+"]",sn="[^"+ct+Ut+Br+Rt+jt+Yt+"]",Fr="\\ud83c[\\udffb-\\udfff]",un="[^"+ct+"]",bn="(?:\\ud83c[\\udde6-\\uddff]){2}",wn="[\\ud800-\\udbff][\\udc00-\\udfff]",_n="["+Yt+"]",xn="\\u200d",on="(?:"+ur+"|"+sn+")",Nn="(?:"+_n+"|"+sn+")",fi="(?:['’](?:d|ll|m|re|s|t|ve))?",gn="(?:['’](?:D|LL|M|RE|S|T|VE))?",yn="(?:"+Vr+"|"+Fr+")?",Jn="["+sr+"]?",_i=Jn+yn+"(?:"+xn+"(?:"+[un,bn,wn].join("|")+")"+Jn+yn+")*",Ir="(?:"+[mr,bn,wn].join("|")+")"+_i,pa="(?:"+[un+Vr+"?",Vr,bn,wn,Rr].join("|")+")",di=RegExp("['’]","g"),Bt=RegExp(Vr,"g"),hr=RegExp(Fr+"(?="+Fr+")|"+pa+_i,"g"),ei=RegExp([_n+"?"+ur+"+"+fi+"(?="+[Xt,_n,"$"].join("|")+")",Nn+"+"+gn+"(?="+[Xt,_n+on,"$"].join("|")+")",_n+"?"+on+"+"+fi,_n+"+"+gn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Br,Ir].join("|"),"g"),Hn=RegExp("["+xn+ct+Lt+sr+"]"),fs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Na=["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"],ki=-1,Wr={};Wr[q]=Wr[W]=Wr[$]=Wr[J]=Wr[X]=Wr[Z]=Wr[ue]=Wr[re]=Wr[ne]=!0,Wr[g]=Wr[y]=Wr[z]=Wr[b]=Wr[H]=Wr[_]=Wr[m]=Wr[x]=Wr[O]=Wr[E]=Wr[T]=Wr[I]=Wr[k]=Wr[L]=Wr[j]=!1;var Nr={};Nr[g]=Nr[y]=Nr[z]=Nr[H]=Nr[b]=Nr[_]=Nr[q]=Nr[W]=Nr[$]=Nr[J]=Nr[X]=Nr[O]=Nr[E]=Nr[T]=Nr[I]=Nr[k]=Nr[L]=Nr[B]=Nr[Z]=Nr[ue]=Nr[re]=Nr[ne]=!0,Nr[m]=Nr[x]=Nr[j]=!1;var na={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fs=parseFloat,hu=parseInt,ga=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g,Us=typeof self=="object"&&self&&self.Object===Object&&self,Ln=ga||Us||Function("return this")(),Ii=e&&!e.nodeType&&e,Ni=Ii&&r&&!r.nodeType&&r,Pc=Ni&&Ni.exports===Ii,vu=Pc&&ga.process,ia=(function(){try{return Ni&&Ni.require&&Ni.require("util").types||vu&&vu.binding&&vu.binding("util")}catch{}})(),Hl=ia&&ia.isArrayBuffer,Md=ia&&ia.isDate,Xa=ia&&ia.isMap,Wl=ia&&ia.isRegExp,Yl=ia&&ia.isSet,nf=ia&&ia.isTypedArray;function Wi(st,xt,pt){switch(pt.length){case 0:return st.call(xt);case 1:return st.call(xt,pt[0]);case 2:return st.call(xt,pt[0],pt[1]);case 3:return st.call(xt,pt[0],pt[1],pt[2])}return st.apply(xt,pt)}function af(st,xt,pt,Wt){for(var ir=-1,En=st==null?0:st.length;++ir-1}function Xl(st,xt,pt){for(var Wt=-1,ir=st==null?0:st.length;++Wt-1;);return pt}function Oa(st,xt){for(var pt=st.length;pt--&&wo(xt,st[pt],0)>-1;);return pt}var el=Ju({À:"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"}),uf=Ju({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ql(st){return"\\"+na[st]}function tl(st){return Hn.test(st)}function wi(st){var xt=-1,pt=Array(st.size);return st.forEach(function(Wt,ir){pt[++xt]=[ir,Wt]}),pt}function Jl(st,xt){return function(pt){return st(xt(pt))}}function aa(st,xt){for(var pt=-1,Wt=st.length,ir=0,En=[];++pt",""":'"',"'":"'"}),Vo=(function st(xt){var pt,Wt=(xt=xt==null?Ln:Vo.defaults(Ln.Object(),xt,Vo.pick(Ln,Na))).Array,ir=xt.Date,En=xt.Error,oa=xt.Function,ja=xt.Math,Kn=xt.Object,ec=xt.RegExp,xi=xt.String,ba=xt.TypeError,cf=Wt.prototype,Ev=oa.prototype,rl=Kn.prototype,Dd=xt["__core-js_shared__"],kd=Ev.toString,Fn=rl.hasOwnProperty,Sv=0,Hf=(pt=/[^.]+$/.exec(Dd&&Dd.keys&&Dd.keys.IE_PROTO||""))?"Symbol(src)_1."+pt:"",nl=rl.toString,Ov=kd.call(Kn),Wf=Ln._,ff=ec("^"+kd.call(Fn).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gs=Pc?xt.Buffer:i,bu=xt.Symbol,kc=xt.Uint8Array,Ah=Gs?Gs.allocUnsafe:i,tc=Jl(Kn.getPrototypeOf,Kn),Yf=Kn.create,Ic=rl.propertyIsEnumerable,_u=cf.splice,xo=bu?bu.isConcatSpreadable:i,Nc=bu?bu.iterator:i,Vs=bu?bu.toStringTag:i,df=(function(){try{var R=Os(Kn,"defineProperty");return R({},"",{}),R}catch{}})(),Rh=xt.clearTimeout!==Ln.clearTimeout&&xt.clearTimeout,Xf=ir&&ir.now!==Ln.Date.now&&ir.now,$f=xt.setTimeout!==Ln.setTimeout&&xt.setTimeout,Id=ja.ceil,rc=ja.floor,Kf=Kn.getOwnPropertySymbols,Lc=Gs?Gs.isBuffer:i,Nd=xt.isFinite,Ph=cf.join,hf=Jl(Kn.keys,Kn),Li=ja.max,hi=ja.min,Zf=ir.now,Tv=xt.parseInt,Qf=ja.random,Yp=cf.reverse,il=Os(xt,"DataView"),ri=Os(xt,"Map"),nc=Os(xt,"Promise"),jc=Os(xt,"Set"),vf=Os(xt,"WeakMap"),pf=Os(Kn,"create"),Bc=vf&&new vf,Hs={},ic=Yn(il),We=Yn(ri),ft=Yn(nc),ut=Yn(jc),Kt=Yn(vf),Pr=bu?bu.prototype:i,Qr=Pr?Pr.valueOf:i,oi=Pr?Pr.toString:i;function be(R){if(zi(R)&&!Ur(R)&&!(R instanceof nn)){if(R instanceof Ei)return R;if(Fn.call(R,"__wrapped__"))return Gc(R)}return new Ei(R)}var al=(function(){function R(){}return function(N){if(!Mi(N))return{};if(Yf)return Yf(N);R.prototype=N;var G=new R;return R.prototype=i,G}})();function Ho(){}function Ei(R,N){this.__wrapped__=R,this.__actions__=[],this.__chain__=!!N,this.__index__=0,this.__values__=i}function nn(R){this.__wrapped__=R,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function ol(R){var N=-1,G=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function Ka(R,N,G,te,he,Re){var je,He=1&N,et=2&N,yt=4&N;if(G&&(je=he?G(R,te,he,Re):G(R)),je!==i)return je;if(!Mi(R))return R;var Et=Ur(R);if(Et){if(je=(function(St){var Nt=St.length,lr=new St.constructor(Nt);return Nt&&typeof St[0]=="string"&&Fn.call(St,"index")&&(lr.index=St.index,lr.input=St.input),lr})(R),!He)return Ca(R,je)}else{var At=Wn(R),$t=At==x||At==S;if(Fu(R))return Ta(R,He);if(At==T||At==g||$t&&!he){if(je=et||$t?{}:es(R),!He)return et?(function(St,Nt){return Qo(St,Mo(St),Nt)})(R,(function(St,Nt){return St&&Qo(Nt,to(Nt),St)})(je,R)):(function(St,Nt){return Qo(St,id(St),Nt)})(R,ac(je,R))}else{if(!Nr[At])return he?R:{};je=(function(St,Nt,lr){var Gt,Lr=St.constructor;switch(Nt){case z:return Pu(St);case b:case _:return new Lr(+St);case H:return(function(jr,qn){var vr=qn?Pu(jr.buffer):jr.buffer;return new jr.constructor(vr,jr.byteOffset,jr.byteLength)})(St,lr);case q:case W:case $:case J:case X:case Z:case ue:case re:case ne:return Jf(St,lr);case O:return new Lr;case E:case L:return new Lr(St);case I:return(function(jr){var qn=new jr.constructor(jr.source,Dt.exec(jr));return qn.lastIndex=jr.lastIndex,qn})(St);case k:return new Lr;case B:return Gt=St,Qr?Kn(Qr.call(Gt)):{}}})(R,At,He)}}Re||(Re=new Jr);var tr=Re.get(R);if(tr)return tr;Re.set(R,je),El(R)?R.forEach(function(St){je.add(Ka(St,N,G,St,R,Re))}):Zp(R)&&R.forEach(function(St,Nt){je.set(Nt,Ka(St,N,G,Nt,R,Re))});var cr=Et?i:(yt?et?Ss:Zs:et?to:xa)(R);return La(cr||R,function(St,Nt){cr&&(St=R[Nt=St]),xu(je,Nt,Ka(St,N,G,Nt,R,Re))}),je}function Eu(R,N,G){var te=G.length;if(R==null)return!te;for(R=Kn(R);te--;){var he=G[te],Re=N[he],je=R[he];if(je===i&&!(he in R)||!Re(je))return!1}return!0}function Mh(R,N,G){if(typeof R!="function")throw new ba(a);return gc(function(){R.apply(i,G)},N)}function Yi(R,N,G,te){var he=-1,Re=Mc,je=!0,He=R.length,et=[],yt=N.length;if(!He)return et;G&&(N=ti(N,Zr(G))),te?(Re=Xl,je=!1):N.length>=200&&(Re=vs,je=!1,N=new wu(N));e:for(;++he-1},$a.prototype.set=function(R,N){var G=this.__data__,te=sl(G,R);return te<0?(++this.size,G.push([R,N])):G[te][1]=N,this},ps.prototype.clear=function(){this.size=0,this.__data__={hash:new ol,map:new(ri||$a),string:new ol}},ps.prototype.delete=function(R){var N=ho(this,R).delete(R);return this.size-=N?1:0,N},ps.prototype.get=function(R){return ho(this,R).get(R)},ps.prototype.has=function(R){return ho(this,R).has(R)},ps.prototype.set=function(R,N){var G=ho(this,R),te=G.size;return G.set(R,N),this.size+=G.size==te?0:1,this},wu.prototype.add=wu.prototype.push=function(R){return this.__data__.set(R,o),this},wu.prototype.has=function(R){return this.__data__.has(R)},Jr.prototype.clear=function(){this.__data__=new $a,this.size=0},Jr.prototype.delete=function(R){var N=this.__data__,G=N.delete(R);return this.size=N.size,G},Jr.prototype.get=function(R){return this.__data__.get(R)},Jr.prototype.has=function(R){return this.__data__.has(R)},Jr.prototype.set=function(R,N){var G=this.__data__;if(G instanceof $a){var te=G.__data__;if(!ri||te.length<199)return te.push([R,N]),this.size=++G.size,this;G=this.__data__=new ps(te)}return G.set(R,N),this.size=G.size,this};var Ba=Ao(Ys),Oo=Ao(sa,!0);function Cv(R,N){var G=!0;return Ba(R,function(te,he,Re){return G=!!N(te,he,Re)}),G}function oc(R,N,G){for(var te=-1,he=R.length;++te0&&G(He)?N>1?ji(He,N-1,G,te,he):zs(he,He):te||(he[he.length]=He)}return he}var Wo=Ki(),yf=Ki(!0);function Ys(R,N){return R&&Wo(R,N,xa)}function sa(R,N){return R&&yf(R,N,xa)}function ll(R,N){return ds(N,function(G){return bc(R[G])})}function ms(R,N){for(var G=0,te=(N=lo(N,R)).length;R!=null&&GN}function Co(R,N){return R!=null&&Fn.call(R,N)}function Xi(R,N){return R!=null&&N in Kn(R)}function Yo(R,N,G){for(var te=G?Xl:Mc,he=R[0].length,Re=R.length,je=Re,He=Wt(Re),et=1/0,yt=[];je--;){var Et=R[je];je&&N&&(Et=ti(Et,Zr(N))),et=hi(Et.length,et),He[je]=!G&&(N||he>=120&&Et.length>=120)?new wu(je&&Et):i}Et=R[0];var At=-1,$t=He[0];e:for(;++At=Nt?lr:lr*(At[$t]=="desc"?-1:1)}return yt.index-Et.index})(He,et,G)});je--;)Re[je]=Re[je].value;return Re})(he)}function bs(R,N,G){for(var te=-1,he=N.length,Re={};++te-1;)He!==R&&_u.call(He,et,1),_u.call(R,et,1);return R}function xe(R,N){for(var G=R?N.length:0,te=G-1;G--;){var he=N[G];if(G==te||he!==Re){var Re=he;Sr(he)?_u.call(R,he,1):Ih(R,he)}}return R}function Ou(R,N){return R+rc(Qf()*(N-R+1))}function $s(R,N){var G="";if(!R||N<1||N>f)return G;do N%2&&(G+=R),(N=rc(N/2))&&(R+=R);while(N);return G}function ar(R,N){return Sf(bl(R,N,is),R+"")}function Yr(R){return gf(As(R))}function Tu(R,N){var G=As(R);return Lu(G,ul(N,0,G.length))}function _s(R,N,G,te){if(!Mi(R))return R;for(var he=-1,Re=(N=lo(N,R)).length,je=Re-1,He=R;He!=null&&++hehe?0:he+N),(G=G>he?he:G)<0&&(G+=he),he=N>G?0:G-N>>>0,N>>>=0;for(var Re=Wt(he);++te>>1,je=R[Re];je!==null&&!ns(je)&&(G?je<=N:je=200){var yt=N?null:Ks(R);if(yt)return yu(yt);je=!1,he=vs,et=new wu}else et=N?[]:He;e:for(;++te=te?R:za(R,N,G)}var Zo=Rh||function(R){return Ln.clearTimeout(R)};function Ta(R,N){if(N)return R.slice();var G=R.length,te=Ah?Ah(G):new R.constructor(G);return R.copy(te),te}function Pu(R){var N=new R.constructor(R.byteLength);return new kc(N).set(new kc(R)),N}function Jf(R,N){var G=N?Pu(R.buffer):R.buffer;return new R.constructor(G,R.byteOffset,R.length)}function ed(R,N){if(R!==N){var G=R!==i,te=R===null,he=R==R,Re=ns(R),je=N!==i,He=N===null,et=N==N,yt=ns(N);if(!He&&!yt&&!Re&&R>N||Re&&je&&et&&!He&&!yt||te&&je&&et||!G&&et||!he)return 1;if(!te&&!Re&&!yt&&R1?G[he-1]:i,je=he>2?G[2]:i;for(Re=R.length>3&&typeof Re=="function"?(he--,Re):i,je&&Xr(G[0],G[1],je)&&(Re=he<3?i:Re,he=1),N=Kn(N);++te-1?he[Re?N[je]:je]:i}}function Uc(R){return Es(function(N){var G=N.length,te=G,he=Ei.prototype.thru;for(R&&N.reverse();te--;){var Re=N[te];if(typeof Re!="function")throw new ba(a);if(he&&!je&&Qi(Re)=="wrapper")var je=new Ei([],!0)}for(te=je?te:G;++te1&&Gt.reverse(),Et&&etHe))return!1;var yt=Re.get(R),Et=Re.get(N);if(yt&&Et)return yt==N&&Et==R;var At=-1,$t=!0,tr=2&G?new wu:i;for(Re.set(R,N),Re.set(N,R);++At-1&&R%1==0&&R1?"& ":"")+Re[He],Re=Re.join(je>2?", ":" "),he.replace(Me,`{ /* [wrapped with `+Re+`] */ `)})(te,(function(he,Re){return La(p,function(je){var He="_."+je[0];Re&je[1]&&!Mc(he,He)&&he.push(He)}),he.sort()})((function(he){var Re=he.match(Ie);return Re?Re[1].split(Ye):[]})(te),G)))}function Rv(R){var N=0,G=0;return function(){var te=Zf(),he=16-(te-G);if(G=te,he>0){if(++N>=800)return arguments[0]}else N=0;return R.apply(i,arguments)}}function Lu(R,N){var G=-1,te=R.length,he=te-1;for(N=N===i?te:N;++G1?R[N-1]:i;return G=typeof G=="function"?(R.pop(),G):i,ua(R,G)});function yr(R){var N=be(R);return N.__chain__=!0,N}function Ji(R,N){return N(R)}var mn=Es(function(R){var N=R.length,G=N?R[0]:0,te=this.__wrapped__,he=function(Re){return ys(Re,R)};return!(N>1||this.__actions__.length)&&te instanceof nn&&Sr(G)?((te=te.slice(G,+G+(N?1:0))).__actions__.push({func:Ji,args:[he],thisArg:i}),new Ei(te,this.__chain__).thru(function(Re){return N&&!Re.length&&Re.push(i),Re})):this.thru(he)}),cn=td(function(R,N,G){Fn.call(R,G)?++R[G]:gs(R,G,1)}),Mn=Ro(Pe),On=Ro(ze);function zn(R,N){return(Ur(R)?La:Ba)(R,er(N,3))}function ts(R,N){return(Ur(R)?qo:Oo)(R,er(N,3))}var _l=td(function(R,N,G){Fn.call(R,G)?R[G].push(N):gs(R,G,[N])}),ju=ar(function(R,N,G){var te=-1,he=typeof N=="function",Re=rs(R)?Wt(R.length):[];return Ba(R,function(je){Re[++te]=he?Wi(N,je,G):Fa(je,N,G)}),Re}),mc=td(function(R,N,G){gs(R,G,N)});function Bu(R,N){return(Ur(R)?ti:hn)(R,er(N,3))}var Cs=td(function(R,N,G){R[G?0:1].push(N)},function(){return[[],[]]}),wl=ar(function(R,N){if(R==null)return[];var G=N.length;return G>1&&Xr(R,N[0],N[1])?N=[]:G>2&&Xr(N[0],N[1],N[2])&&(N=[N[0]]),cc(R,ji(N,1),[])}),Fi=Xf||function(){return Ln.Date.now()};function wa(R,N,G){return N=G?i:N,N=R&&N==null?R.length:N,ws(R,l,i,i,i,i,N)}function sd(R,N){var G;if(typeof N!="function")throw new ba(a);return R=Kr(R),function(){return--R>0&&(G=N.apply(this,arguments)),R<=1&&(N=i),G}}var Tf=ar(function(R,N,G){var te=1;if(G.length){var he=aa(G,Nu(Tf));te|=u}return ws(R,te,N,G,he)}),Lh=ar(function(R,N,G){var te=3;if(G.length){var he=aa(G,Nu(Lh));te|=u}return ws(N,te,R,G,he)});function Vc(R,N,G){var te,he,Re,je,He,et,yt=0,Et=!1,At=!1,$t=!0;if(typeof R!="function")throw new ba(a);function tr(Gt){var Lr=te,jr=he;return te=he=i,yt=Gt,je=R.apply(jr,Lr)}function cr(Gt){var Lr=Gt-et;return et===i||Lr>=N||Lr<0||At&&Gt-yt>=Re}function St(){var Gt=Fi();if(cr(Gt))return Nt(Gt);He=gc(St,(function(Lr){var jr=N-(Lr-et);return At?hi(jr,Re-(Lr-yt)):jr})(Gt))}function Nt(Gt){return He=i,$t&&te?tr(Gt):(te=he=i,je)}function lr(){var Gt=Fi(),Lr=cr(Gt);if(te=arguments,he=this,et=Gt,Lr){if(He===i)return(function(jr){return yt=jr,He=gc(St,N),Et?tr(jr):je})(et);if(At)return Zo(He),He=gc(St,N),tr(et)}return He===i&&(He=gc(St,N)),je}return N=ko(N)||0,Mi(G)&&(Et=!!G.leading,Re=(At="maxWait"in G)?Li(ko(G.maxWait)||0,N):Re,$t="trailing"in G?!!G.trailing:$t),lr.cancel=function(){He!==i&&Zo(He),yt=0,te=et=he=He=i},lr.flush=function(){return He===i?je:Nt(Fi())},lr}var Xp=ar(function(R,N){return Mh(R,1,N)}),$p=ar(function(R,N,G){return Mh(R,ko(N)||0,G)});function Fd(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new ba(a);var G=function(){var te=arguments,he=N?N.apply(this,te):te[0],Re=G.cache;if(Re.has(he))return Re.get(he);var je=R.apply(this,te);return G.cache=Re.set(he,je)||Re,je};return G.cache=new(Fd.Cache||ps),G}function Ud(R){if(typeof R!="function")throw new ba(a);return function(){var N=arguments;switch(N.length){case 0:return!R.call(this);case 1:return!R.call(this,N[0]);case 2:return!R.call(this,N[0],N[1]);case 3:return!R.call(this,N[0],N[1],N[2])}return!R.apply(this,N)}}Fd.Cache=ps;var ud=Av(function(R,N){var G=(N=N.length==1&&Ur(N[0])?ti(N[0],Zr(er())):ti(ji(N,1),Zr(er()))).length;return ar(function(te){for(var he=-1,Re=hi(te.length,G);++he=N}),xl=Ua((function(){return arguments})())?Ua:function(R){return zi(R)&&Fn.call(R,"callee")&&!Ic.call(R,"callee")},Ur=Wt.isArray,Cf=Hl?Zr(Hl):function(R){return zi(R)&&Sn(R)==z};function rs(R){return R!=null&&eo(R.length)&&!bc(R)}function Ui(R){return zi(R)&&rs(R)}var Fu=Lc||gi,Pv=Md?Zr(Md):function(R){return zi(R)&&Sn(R)==_};function cd(R){if(!zi(R))return!1;var N=Sn(R);return N==m||N=="[object DOMException]"||typeof R.message=="string"&&typeof R.name=="string"&&!Gd(R)}function bc(R){if(!Mi(R))return!1;var N=Sn(R);return N==x||N==S||N=="[object AsyncFunction]"||N=="[object Proxy]"}function Mv(R){return typeof R=="number"&&R==Kr(R)}function eo(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=f}function Mi(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function zi(R){return R!=null&&typeof R=="object"}var Zp=Xa?Zr(Xa):function(R){return zi(R)&&Wn(R)==O};function qd(R){return typeof R=="number"||zi(R)&&Sn(R)==E}function Gd(R){if(!zi(R)||Sn(R)!=T)return!1;var N=tc(R);if(N===null)return!0;var G=Fn.call(N,"constructor")&&N.constructor;return typeof G=="function"&&G instanceof G&&kd.call(G)==Ov}var Bh=Wl?Zr(Wl):function(R){return zi(R)&&Sn(R)==I},El=Yl?Zr(Yl):function(R){return zi(R)&&Wn(R)==k};function fd(R){return typeof R=="string"||!Ur(R)&&zi(R)&&Sn(R)==L}function ns(R){return typeof R=="symbol"||zi(R)&&Sn(R)==B}var _c=nf?Zr(nf):function(R){return zi(R)&&eo(R.length)&&!!Wr[Sn(R)]},ea=fo(Rn),la=fo(function(R,N){return R<=N});function br(R){if(!R)return[];if(rs(R))return fd(R)?ma(R):Ca(R);if(Nc&&R[Nc])return(function(G){for(var te,he=[];!(te=G.next()).done;)he.push(te.value);return he})(R[Nc]());var N=Wn(R);return(N==O?wi:N==k?yu:As)(R)}function Js(R){return R?(R=ko(R))===c||R===-1/0?17976931348623157e292*(R<0?-1:1):R==R?R:0:R===0?R:0}function Kr(R){var N=Js(R),G=N%1;return N==N?G?N-G:N:0}function Hc(R){return R?ul(Kr(R),0,h):0}function ko(R){if(typeof R=="number")return R;if(ns(R))return d;if(Mi(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=Mi(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=jn(R);var G=tt.test(R);return G||Ue.test(R)?hu(R.slice(2),G?2:8):vt.test(R)?d:+R}function Fh(R){return Qo(R,to(R))}function Dn(R){return R==null?"":Ko(R)}var vo=yl(function(R,N){if(Ts(N)||rs(N))Qo(N,xa(N),R);else for(var G in N)Fn.call(N,G)&&xu(R,G,N[G])}),dy=yl(function(R,N){Qo(N,to(N),R)}),dd=yl(function(R,N,G,te){Qo(N,to(N),R,te)}),Dv=yl(function(R,N,G,te){Qo(N,xa(N),R,te)}),hy=Es(ys),Qp=ar(function(R,N){R=Kn(R);var G=-1,te=N.length,he=te>2?N[2]:i;for(he&&Xr(N[0],N[1],he)&&(te=1);++G1),Re}),Qo(R,Ss(R),G),te&&(G=Ka(G,7,Ef));for(var he=N.length;he--;)Ih(G,N[he]);return G}),wc=Es(function(R,N){return R==null?{}:(function(G,te){return bs(G,te,function(he,Re){return zh(G,Re)})})(R,N)});function Gh(R,N){if(R==null)return{};var G=ti(Ss(R),function(te){return[te]});return N=er(N),bs(R,G,function(te,he){return N(te,he[0])})}var gy=xf(xa),Jp=xf(to);function As(R){return R==null?[]:Zl(R,xa(R))}var eg=co(function(R,N,G){return N=N.toLowerCase(),R+(G?Iv(N):N)});function Iv(R){return Ol(Dn(R).toLowerCase())}function Hd(R){return(R=Dn(R))&&R.replace(Ze,el).replace(Bt,"")}var Vh=co(function(R,N,G){return R+(G?"-":"")+N.toLowerCase()}),pi=co(function(R,N,G){return R+(G?" ":"")+N.toLowerCase()}),yy=Mu("toLowerCase"),Hh=co(function(R,N,G){return R+(G?"_":"")+N.toLowerCase()}),Nv=co(function(R,N,G){return R+(G?" ":"")+Ol(N)}),Wd=co(function(R,N,G){return R+(G?" ":"")+N.toUpperCase()}),Ol=Mu("toUpperCase");function Yd(R,N,G){return R=Dn(R),(N=G?i:N)===i?(function(te){return fs.test(te)})(R)?(function(te){return te.match(ei)||[]})(R):(function(te){return te.match(ot)||[]})(R):R.match(N)||[]}var Lv=ar(function(R,N){try{return Wi(R,i,N)}catch(G){return cd(G)?G:new En(G)}}),Rs=Es(function(R,N){return La(N,function(G){G=Un(G),gs(R,G,Tf(R[G],R))}),R});function ro(R){return function(){return R}}var my=Uc(),jv=Uc(!0);function is(R){return R}function Wh(R){return lc(typeof R=="function"?R:Ka(R,1))}var tg=ar(function(R,N){return function(G){return Fa(G,R,N)}}),Bv=ar(function(R,N){return function(G){return Fa(R,G,N)}});function Fv(R,N,G){var te=xa(N),he=ll(N,te);G!=null||Mi(N)&&(he.length||!te.length)||(G=N,N=R,R=this,he=ll(N,xa(N)));var Re=!(Mi(G)&&"chain"in G&&!G.chain),je=bc(R);return La(he,function(He){var et=N[He];R[He]=et,je&&(R.prototype[He]=function(){var yt=this.__chain__;if(Re||yt){var Et=R(this.__wrapped__);return(Et.__actions__=Ca(this.__actions__)).push({func:et,args:arguments,thisArg:R}),Et.__chain__=yt,Et}return et.apply(R,zs([this.value()],arguments))})}),R}function Tl(){}var Ra=ku(ti),rg=ku(Gf),by=ku($l);function qa(R){return vi(R)?so(Un(R)):(function(N){return function(G){return ms(G,N)}})(R)}var o0=Jo(),ng=Jo(!0);function Yh(){return[]}function gi(){return!1}var No,Wc=rd(function(R,N){return R+N},0),_y=Iu("ceil"),ig=rd(function(R,N){return R/N},1),wy=Iu("floor"),s0=rd(function(R,N){return R*N},1),Uv=Iu("round"),Ps=rd(function(R,N){return R-N},0);return be.after=function(R,N){if(typeof N!="function")throw new ba(a);return R=Kr(R),function(){if(--R<1)return N.apply(this,arguments)}},be.ary=wa,be.assign=vo,be.assignIn=dy,be.assignInWith=dd,be.assignWith=Dv,be.at=hy,be.before=sd,be.bind=Tf,be.bindAll=Rs,be.bindKey=Lh,be.castArray=function(){if(!arguments.length)return[];var R=arguments[0];return Ur(R)?R:[R]},be.chain=yr,be.chunk=function(R,N,G){N=(G?Xr(R,N,G):N===i)?1:Li(Kr(N),0);var te=R==null?0:R.length;if(!te||N<1)return[];for(var he=0,Re=0,je=Wt(Id(te/N));heyt?0:yt+He),(et=et===i||et>yt?yt:Kr(et))<0&&(et+=yt),et=He>et?0:Hc(et);He>>0)?(R=Dn(R))&&(typeof N=="string"||N!=null&&!Bh(N))&&!(N=Ko(N))&&tl(R)?dc(ma(R),0,G):R.split(N,G):[]},be.spread=function(R,N){if(typeof R!="function")throw new ba(a);return N=N==null?0:Li(Kr(N),0),ar(function(G){var te=G[N],he=dc(G,0,N);return te&&zs(he,te),Wi(R,this,he)})},be.tail=function(R){var N=R==null?0:R.length;return N?za(R,1,N):[]},be.take=function(R,N,G){return R&&R.length?za(R,0,(N=G||N===i?1:Kr(N))<0?0:N):[]},be.takeRight=function(R,N,G){var te=R==null?0:R.length;return te?za(R,(N=te-(N=G||N===i?1:Kr(N)))<0?0:N,te):[]},be.takeRightWhile=function(R,N){return R&&R.length?Za(R,er(N,3),!1,!0):[]},be.takeWhile=function(R,N){return R&&R.length?Za(R,er(N,3)):[]},be.tap=function(R,N){return N(R),R},be.throttle=function(R,N,G){var te=!0,he=!0;if(typeof R!="function")throw new ba(a);return Mi(G)&&(te="leading"in G?!!G.leading:te,he="trailing"in G?!!G.trailing:he),Vc(R,N,{leading:te,maxWait:N,trailing:he})},be.thru=Ji,be.toArray=br,be.toPairs=gy,be.toPairsIn=Jp,be.toPath=function(R){return Ur(R)?ti(R,Un):ns(R)?[R]:Ca(Aa(Dn(R)))},be.toPlainObject=Fh,be.transform=function(R,N,G){var te=Ur(R),he=te||Fu(R)||_c(R);if(N=er(N,4),G==null){var Re=R&&R.constructor;G=he?te?new Re:[]:Mi(R)&&bc(Re)?al(tc(R)):{}}return(he?La:Ys)(R,function(je,He,et){return N(G,je,He,et)}),G},be.unary=function(R){return wa(R,1)},be.union=en,be.unionBy=Or,be.unionWith=$r,be.uniq=function(R){return R&&R.length?fc(R):[]},be.uniqBy=function(R,N){return R&&R.length?fc(R,er(N,2)):[]},be.uniqWith=function(R,N){return N=typeof N=="function"?N:i,R&&R.length?fc(R,i,N):[]},be.unset=function(R,N){return R==null||Ih(R,N)},be.unzip=vn,be.unzipWith=ua,be.update=function(R,N,G){return R==null?R:$i(R,N,pl(G))},be.updateWith=function(R,N,G,te){return te=typeof te=="function"?te:i,R==null?R:$i(R,N,pl(G),te)},be.values=As,be.valuesIn=function(R){return R==null?[]:Zl(R,to(R))},be.without=Bi,be.words=Yd,be.wrap=function(R,N){return ld(pl(N),R)},be.xor=Ja,be.xorBy=ln,be.xorWith=kt,be.zip=gr,be.zipObject=function(R,N){return _f(R||[],N||[],xu)},be.zipObjectDeep=function(R,N){return _f(R||[],N||[],_s)},be.zipWith=tn,be.entries=gy,be.entriesIn=Jp,be.extend=dy,be.extendWith=dd,Fv(be,be),be.add=Wc,be.attempt=Lv,be.camelCase=eg,be.capitalize=Iv,be.ceil=_y,be.clamp=function(R,N,G){return G===i&&(G=N,N=i),G!==i&&(G=(G=ko(G))==G?G:0),N!==i&&(N=(N=ko(N))==N?N:0),ul(ko(R),N,G)},be.clone=function(R){return Ka(R,4)},be.cloneDeep=function(R){return Ka(R,5)},be.cloneDeepWith=function(R,N){return Ka(R,5,N=typeof N=="function"?N:i)},be.cloneWith=function(R,N){return Ka(R,4,N=typeof N=="function"?N:i)},be.conformsTo=function(R,N){return N==null||Eu(R,N,xa(N))},be.deburr=Hd,be.defaultTo=function(R,N){return R==null||R!=R?N:R},be.divide=ig,be.endsWith=function(R,N,G){R=Dn(R),N=Ko(N);var te=R.length,he=G=G===i?te:ul(Kr(G),0,te);return(G-=N.length)>=0&&R.slice(G,he)==N},be.eq=Do,be.escape=function(R){return(R=Dn(R))&&ge.test(R)?R.replace(se,uf):R},be.escapeRegExp=function(R){return(R=Dn(R))&&ie.test(R)?R.replace(Q,"\\$&"):R},be.every=function(R,N,G){var te=Ur(R)?Gf:Cv;return G&&Xr(R,N,G)&&(N=i),te(R,er(N,3))},be.find=Mn,be.findIndex=Pe,be.findKey=function(R,N){return pu(R,er(N,3),Ys)},be.findLast=On,be.findLastIndex=ze,be.findLastKey=function(R,N){return pu(R,er(N,3),sa)},be.floor=wy,be.forEach=zn,be.forEachRight=ts,be.forIn=function(R,N){return R==null?R:Wo(R,er(N,3),to)},be.forInRight=function(R,N){return R==null?R:yf(R,er(N,3),to)},be.forOwn=function(R,N){return R&&Ys(R,er(N,3))},be.forOwnRight=function(R,N){return R&&sa(R,er(N,3))},be.get=Uh,be.gt=zd,be.gte=jh,be.has=function(R,N){return R!=null&&Pi(R,N,Co)},be.hasIn=zh,be.head=Be,be.identity=is,be.includes=function(R,N,G,te){R=rs(R)?R:As(R),G=G&&!te?Kr(G):0;var he=R.length;return G<0&&(G=Li(he+G,0)),fd(R)?G<=he&&R.indexOf(N,G)>-1:!!he&&wo(R,N,G)>-1},be.indexOf=function(R,N,G){var te=R==null?0:R.length;if(!te)return-1;var he=G==null?0:Kr(G);return he<0&&(he=Li(te+he,0)),wo(R,N,he)},be.inRange=function(R,N,G){return N=Js(N),G===i?(G=N,N=0):G=Js(G),(function(te,he,Re){return te>=hi(he,Re)&&te=-9007199254740991&&R<=f},be.isSet=El,be.isString=fd,be.isSymbol=ns,be.isTypedArray=_c,be.isUndefined=function(R){return R===i},be.isWeakMap=function(R){return zi(R)&&Wn(R)==j},be.isWeakSet=function(R){return zi(R)&&Sn(R)=="[object WeakSet]"},be.join=function(R,N){return R==null?"":Ph.call(R,N)},be.kebabCase=Vh,be.last=dt,be.lastIndexOf=function(R,N,G){var te=R==null?0:R.length;if(!te)return-1;var he=te;return G!==i&&(he=(he=Kr(G))<0?Li(te+he,0):hi(he,te-1)),N==N?(function(Re,je,He){for(var et=He+1;et--;)if(Re[et]===je)return et;return et})(R,N,he):_o(R,sf,he,!0)},be.lowerCase=pi,be.lowerFirst=yy,be.lt=ea,be.lte=la,be.max=function(R){return R&&R.length?oc(R,is,To):i},be.maxBy=function(R,N){return R&&R.length?oc(R,er(N,2),To):i},be.mean=function(R){return gu(R,is)},be.meanBy=function(R,N){return gu(R,er(N,2))},be.min=function(R){return R&&R.length?oc(R,is,Rn):i},be.minBy=function(R,N){return R&&R.length?oc(R,er(N,2),Rn):i},be.stubArray=Yh,be.stubFalse=gi,be.stubObject=function(){return{}},be.stubString=function(){return""},be.stubTrue=function(){return!0},be.multiply=s0,be.nth=function(R,N){return R&&R.length?fl(R,Kr(N)):i},be.noConflict=function(){return Ln._===this&&(Ln._=Wf),this},be.noop=Tl,be.now=Fi,be.pad=function(R,N,G){R=Dn(R);var te=(N=Kr(N))?ya(R):0;if(!N||te>=N)return R;var he=(N-te)/2;return wf(rc(he),G)+R+wf(Id(he),G)},be.padEnd=function(R,N,G){R=Dn(R);var te=(N=Kr(N))?ya(R):0;return N&&teN){var te=R;R=N,N=te}if(G||R%1||N%1){var he=Qf();return hi(R+he*(N-R+Fs("1e-"+((he+"").length-1))),N)}return Ou(R,N)},be.reduce=function(R,N,G){var te=Ur(R)?Qu:Kl,he=arguments.length<3;return te(R,er(N,4),G,he,Ba)},be.reduceRight=function(R,N,G){var te=Ur(R)?qs:Kl,he=arguments.length<3;return te(R,er(N,4),G,he,Oo)},be.repeat=function(R,N,G){return N=(G?Xr(R,N,G):N===i)?1:Kr(N),$s(Dn(R),N)},be.replace=function(){var R=arguments,N=Dn(R[0]);return R.length<3?N:N.replace(R[1],R[2])},be.result=function(R,N,G){var te=-1,he=(N=lo(N,R)).length;for(he||(he=1,R=i);++tef)return[];var G=h,te=hi(R,h);N=er(N),R-=h;for(var he=hs(te,N);++G=Re)return R;var He=G-ya(te);if(He<1)return te;var et=je?dc(je,0,He).join(""):R.slice(0,He);if(he===i)return et+te;if(je&&(He+=et.length-He),Bh(he)){if(R.slice(He).search(he)){var yt,Et=et;for(he.global||(he=ec(he.source,Dn(Dt.exec(he))+"g")),he.lastIndex=0;yt=he.exec(Et);)var At=yt.index;et=et.slice(0,At===i?He:At)}}else if(R.indexOf(Ko(he),He)!=He){var $t=et.lastIndexOf(he);$t>-1&&(et=et.slice(0,$t))}return et+te},be.unescape=function(R){return(R=Dn(R))&&de.test(R)?R.replace(fe,uo):R},be.uniqueId=function(R){var N=++Sv;return Dn(R)+N},be.upperCase=Wd,be.upperFirst=Ol,be.each=zn,be.eachRight=ts,be.first=Be,Fv(be,(No={},Ys(be,function(R,N){Fn.call(be.prototype,N)||(No[N]=R)}),No),{chain:!1}),be.VERSION="4.17.23",La(["bind","bindKey","curry","curryRight","partial","partialRight"],function(R){be[R].placeholder=be}),La(["drop","take"],function(R,N){nn.prototype[R]=function(G){G=G===i?1:Li(Kr(G),0);var te=this.__filtered__&&!N?new nn(this):this.clone();return te.__filtered__?te.__takeCount__=hi(G,te.__takeCount__):te.__views__.push({size:hi(G,h),type:R+(te.__dir__<0?"Right":"")}),te},nn.prototype[R+"Right"]=function(G){return this.reverse()[R](G).reverse()}}),La(["filter","map","takeWhile"],function(R,N){var G=N+1,te=G==1||G==3;nn.prototype[R]=function(he){var Re=this.clone();return Re.__iteratees__.push({iteratee:er(he,3),type:G}),Re.__filtered__=Re.__filtered__||te,Re}}),La(["head","last"],function(R,N){var G="take"+(N?"Right":"");nn.prototype[R]=function(){return this[G](1).value()[0]}}),La(["initial","tail"],function(R,N){var G="drop"+(N?"":"Right");nn.prototype[R]=function(){return this.__filtered__?new nn(this):this[G](1)}}),nn.prototype.compact=function(){return this.filter(is)},nn.prototype.find=function(R){return this.filter(R).head()},nn.prototype.findLast=function(R){return this.reverse().find(R)},nn.prototype.invokeMap=ar(function(R,N){return typeof R=="function"?new nn(this):this.map(function(G){return Fa(G,R,N)})}),nn.prototype.reject=function(R){return this.filter(Ud(er(R)))},nn.prototype.slice=function(R,N){R=Kr(R);var G=this;return G.__filtered__&&(R>0||N<0)?new nn(G):(R<0?G=G.takeRight(-R):R&&(G=G.drop(R)),N!==i&&(G=(N=Kr(N))<0?G.dropRight(-N):G.take(N-R)),G)},nn.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},nn.prototype.toArray=function(){return this.take(h)},Ys(nn.prototype,function(R,N){var G=/^(?:filter|find|map|reject)|While$/.test(N),te=/^(?:head|last)$/.test(N),he=be[te?"take"+(N=="last"?"Right":""):N],Re=te||/^find/.test(N);he&&(be.prototype[N]=function(){var je=this.__wrapped__,He=te?[1]:arguments,et=je instanceof nn,yt=He[0],Et=et||Ur(je),At=function(lr){var Gt=he.apply(be,zs([lr],He));return te&&$t?Gt[0]:Gt};Et&&G&&typeof yt=="function"&&yt.length!=1&&(et=Et=!1);var $t=this.__chain__,tr=!!this.__actions__.length,cr=Re&&!$t,St=et&&!tr;if(!Re&&Et){je=St?je:new nn(this);var Nt=R.apply(je,He);return Nt.__actions__.push({func:Ji,args:[At],thisArg:i}),new Ei(Nt,$t)}return cr&&St?R.apply(this,He):(Nt=this.thru(At),cr?te?Nt.value()[0]:Nt.value():Nt)})}),La(["pop","push","shift","sort","splice","unshift"],function(R){var N=cf[R],G=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",te=/^(?:pop|shift)$/.test(R);be.prototype[R]=function(){var he=arguments;if(te&&!this.__chain__){var Re=this.value();return N.apply(Ur(Re)?Re:[],he)}return this[G](function(je){return N.apply(Ur(je)?je:[],he)})}}),Ys(nn.prototype,function(R,N){var G=be[N];if(G){var te=G.name+"";Fn.call(Hs,te)||(Hs[te]=[]),Hs[te].push({name:N,func:G})}}),Hs[Po(i,2).name]=[{name:"wrapper",func:i}],nn.prototype.clone=function(){var R=new nn(this.__wrapped__);return R.__actions__=Ca(this.__actions__),R.__dir__=this.__dir__,R.__filtered__=this.__filtered__,R.__iteratees__=Ca(this.__iteratees__),R.__takeCount__=this.__takeCount__,R.__views__=Ca(this.__views__),R},nn.prototype.reverse=function(){if(this.__filtered__){var R=new nn(this);R.__dir__=-1,R.__filtered__=!0}else(R=this.clone()).__dir__*=-1;return R},nn.prototype.value=function(){var R=this.__wrapped__.value(),N=this.__dir__,G=Ur(R),te=N<0,he=G?R.length:0,Re=(function(qn,vr,zt){for(var Hr=-1,fr=zt.length;++Hr=this.__values__.length;return{done:R,value:R?i:this.__values__[this.__index__++]}},be.prototype.plant=function(R){for(var N,G=this;G instanceof Ho;){var te=Gc(G);te.__index__=0,te.__values__=i,N?he.__wrapped__=te:N=te;var he=te;G=G.__wrapped__}return he.__wrapped__=R,N},be.prototype.reverse=function(){var R=this.__wrapped__;if(R instanceof nn){var N=R;return this.__actions__.length&&(N=new nn(this)),(N=N.reverse()).__actions__.push({func:Ji,args:[Zt],thisArg:i}),new Ei(N,this.__chain__)}return this.thru(Zt)},be.prototype.toJSON=be.prototype.valueOf=be.prototype.value=function(){return bf(this.__wrapped__,this.__actions__)},be.prototype.first=be.prototype.head,Nc&&(be.prototype[Nc]=function(){return this}),be})();Ln._=Vo,(n=(function(){return Vo}).call(e,t,e,r))===i||(r.exports=n)}).call(this)},5267:function(r,e,t){var n=this&&this.__extends||(function(){var u=function(l,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(f[h]=d[h])},u(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}u(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncAction=void 0;var i=t(4671),a=t(5649),o=t(7479),s=(function(u){function l(c,f){var d=u.call(this,c,f)||this;return d.scheduler=c,d.work=f,d.pending=!1,d}return n(l,u),l.prototype.schedule=function(c,f){var d;if(f===void 0&&(f=0),this.closed)return this;this.state=c;var h=this.id,p=this.scheduler;return h!=null&&(this.id=this.recycleAsyncId(p,h,f)),this.pending=!0,this.delay=f,this.id=(d=this.id)!==null&&d!==void 0?d:this.requestAsyncId(p,this.id,f),this},l.prototype.requestAsyncId=function(c,f,d){return d===void 0&&(d=0),a.intervalProvider.setInterval(c.flush.bind(c,this),d)},l.prototype.recycleAsyncId=function(c,f,d){if(d===void 0&&(d=0),d!=null&&this.delay===d&&this.pending===!1)return f;f!=null&&a.intervalProvider.clearInterval(f)},l.prototype.execute=function(c,f){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var d=this._execute(c,f);if(d)return d;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},l.prototype._execute=function(c,f){var d,h=!1;try{this.work(c)}catch(p){h=!0,d=p||new Error("Scheduled action threw falsy error")}if(h)return this.unsubscribe(),d},l.prototype.unsubscribe=function(){if(!this.closed){var c=this.id,f=this.scheduler,d=f.actions;this.work=this.state=this.scheduler=null,this.pending=!1,o.arrRemove(d,this),c!=null&&(this.id=this.recycleAsyncId(f,c,null)),this.delay=null,u.prototype.unsubscribe.call(this)}},l})(i.Action);e.AsyncAction=s},5319:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})(),i=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.alloc=void 0;var a=i(t(1048)),o=(function(s){function u(l){var c=this,f=(function(d){return d instanceof a.default.Buffer?d:typeof d=="number"&&typeof a.default.Buffer.alloc=="function"?a.default.Buffer.alloc(d):new a.default.Buffer(d)})(l);return(c=s.call(this,f.length)||this)._buffer=f,c}return n(u,s),u.prototype.getUInt8=function(l){return this._buffer.readUInt8(l)},u.prototype.getInt8=function(l){return this._buffer.readInt8(l)},u.prototype.getFloat64=function(l){return this._buffer.readDoubleBE(l)},u.prototype.getVarInt=function(l){for(var c=0,f=this._buffer.readInt8(l+c),d=f%128;f/128>=1;)c+=1,d+=(f=this._buffer.readInt8(l+c))%128;return{length:c+1,value:d}},u.prototype.putUInt8=function(l,c){this._buffer.writeUInt8(c,l)},u.prototype.putInt8=function(l,c){this._buffer.writeInt8(c,l)},u.prototype.putFloat64=function(l,c){this._buffer.writeDoubleBE(c,l)},u.prototype.putBytes=function(l,c){if(c instanceof u){var f=Math.min(c.length-c.position,this.length-l);c._buffer.copy(this._buffer,l,c.position,c.position+f),c.position+=f}else s.prototype.putBytes.call(this,l,c)},u.prototype.getSlice=function(l,c){return new u(this._buffer.slice(l,l+c))},u})(i(t(7174)).default);e.default=o,e.alloc=function(s){return new o(s)}},5337:function(r,e,t){var n=this&&this.__read||function(p,g){var y=typeof Symbol=="function"&&p[Symbol.iterator];if(!y)return p;var b,_,m=y.call(p),x=[];try{for(;(g===void 0||g-- >0)&&!(b=m.next()).done;)x.push(b.value)}catch(S){_={error:S}}finally{try{b&&!b.done&&(y=m.return)&&y.call(m)}finally{if(_)throw _.error}}return x};Object.defineProperty(e,"__esModule",{value:!0}),e.fromEvent=void 0;var i=t(9445),a=t(4662),o=t(983),s=t(8046),u=t(1018),l=t(1251),c=["addListener","removeListener"],f=["addEventListener","removeEventListener"],d=["on","off"];function h(p,g){return function(y){return function(b){return p[y](g,b)}}}e.fromEvent=function p(g,y,b,_){if(u.isFunction(b)&&(_=b,b=void 0),_)return p(g,y,b).pipe(l.mapOneOrManyArgs(_));var m=n((function(O){return u.isFunction(O.addEventListener)&&u.isFunction(O.removeEventListener)})(g)?f.map(function(O){return function(E){return g[O](y,E,b)}}):(function(O){return u.isFunction(O.addListener)&&u.isFunction(O.removeListener)})(g)?c.map(h(g,y)):(function(O){return u.isFunction(O.on)&&u.isFunction(O.off)})(g)?d.map(h(g,y)):[],2),x=m[0],S=m[1];if(!x&&s.isArrayLike(g))return o.mergeMap(function(O){return p(O,y,b)})(i.innerFrom(g));if(!x)throw new TypeError("Invalid event target");return new a.Observable(function(O){var E=function(){for(var T=[],P=0;P{Object.defineProperty(e,"__esModule",{value:!0}),e.Unpacker=e.Packer=void 0;var n=t(7452),i=t(6781),a=t(7665),o=t(9305),s=o.error.PROTOCOL_ERROR,u=(function(){function c(f){this._ch=f,this._byteArraysSupported=!0}return c.prototype.packable=function(f,d){var h,p=this;d===void 0&&(d=i.functional.identity);try{f=d(f)}catch(b){return function(){throw b}}if(f===null)return function(){return p._ch.writeUInt8(192)};if(f===!0)return function(){return p._ch.writeUInt8(195)};if(f===!1)return function(){return p._ch.writeUInt8(194)};if(typeof f=="number")return function(){return p.packFloat(f)};if(typeof f=="string")return function(){return p.packString(f)};if(typeof f=="bigint")return function(){return p.packInteger((0,o.int)(f))};if((0,o.isInt)(f))return function(){return p.packInteger(f)};if(f instanceof Int8Array)return function(){return p.packBytes(f)};if(f instanceof Array)return function(){p.packListHeader(f.length);for(var b=0;b=0&&f<128)return(0,o.int)(f);if(f>=240&&f<256)return(0,o.int)(f-256);if(f===200)return(0,o.int)(d.readInt8());if(f===201)return(0,o.int)(d.readInt16());if(f===202){var h=d.readInt32();return(0,o.int)(h)}if(f===203){var p=d.readInt32(),g=d.readInt32();return new o.Integer(g,p)}return null},c.prototype._unpackString=function(f,d,h,p){return d===128?n.utf8.decode(p,h):f===208?n.utf8.decode(p,p.readUInt8()):f===209?n.utf8.decode(p,p.readUInt16()):f===210?n.utf8.decode(p,p.readUInt32()):null},c.prototype._unpackList=function(f,d,h,p,g){return d===144?this._unpackListWithSize(h,p,g):f===212?this._unpackListWithSize(p.readUInt8(),p,g):f===213?this._unpackListWithSize(p.readUInt16(),p,g):f===214?this._unpackListWithSize(p.readUInt32(),p,g):null},c.prototype._unpackListWithSize=function(f,d,h){for(var p=[],g=0;g{Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var n=t(7843),i=t(3111),a=t(1342),o=t(9445);e.distinct=function(s,u){return n.operate(function(l,c){var f=new Set;l.subscribe(i.createOperatorSubscriber(c,function(d){var h=s?s(d):d;f.has(h)||(f.add(h),c.next(d))})),u&&o.innerFrom(u).subscribe(i.createOperatorSubscriber(c,function(){return f.clear()},a.noop))})}},5382:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.single=void 0;var n=t(2823),i=t(1505),a=t(1759),o=t(7843),s=t(3111);e.single=function(u){return o.operate(function(l,c){var f,d=!1,h=!1,p=0;l.subscribe(s.createOperatorSubscriber(c,function(g){h=!0,u&&!u(g,p++,l)||(d&&c.error(new i.SequenceError("Too many matching values")),d=!0,f=g)},function(){d?(c.next(f),c.complete()):c.error(h?new a.NotFoundError("No matching values"):new n.EmptyError)}))})}},5442:function(r,e,t){var n=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h0)&&!(j=H.next()).done;)q.push(j.value)}catch(W){z={error:W}}finally{try{j&&!j.done&&(B=H.return)&&B.call(H)}finally{if(z)throw z.error}}return q};Object.defineProperty(e,"__esModule",{value:!0}),e.isDateTime=e.DateTime=e.isLocalDateTime=e.LocalDateTime=e.isDate=e.Date=e.isTime=e.Time=e.isLocalTime=e.LocalTime=e.isDuration=e.Duration=void 0;var s=a(t(5022)),u=t(6587),l=t(9691),c=a(t(3371)),f={value:!0,enumerable:!1,configurable:!1,writable:!1},d="__isDuration__",h="__isLocalTime__",p="__isTime__",g="__isDate__",y="__isLocalDateTime__",b="__isDateTime__",_=(function(){function k(L,B,j,z){this.months=(0,u.assertNumberOrInteger)(L,"Months"),this.days=(0,u.assertNumberOrInteger)(B,"Days"),(0,u.assertNumberOrInteger)(j,"Seconds"),(0,u.assertNumberOrInteger)(z,"Nanoseconds"),this.seconds=s.normalizeSecondsForDuration(j,z),this.nanoseconds=s.normalizeNanosecondsForDuration(z),Object.freeze(this)}return k.prototype.toString=function(){return s.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},k})();e.Duration=_,Object.defineProperty(_.prototype,d,f),e.isDuration=function(k){return T(k,d)};var m=(function(){function k(L,B,j,z){this.hour=s.assertValidHour(L),this.minute=s.assertValidMinute(B),this.second=s.assertValidSecond(j),this.nanosecond=s.assertValidNanosecond(z),Object.freeze(this)}return k.fromStandardDate=function(L,B){I(L,B);var j=s.totalNanoseconds(L,B);return new k(L.getHours(),L.getMinutes(),L.getSeconds(),j instanceof c.default?j.toInt():typeof j=="bigint"?(0,c.int)(j).toInt():j)},k.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},k})();e.LocalTime=m,Object.defineProperty(m.prototype,h,f),e.isLocalTime=function(k){return T(k,h)};var x=(function(){function k(L,B,j,z,H){this.hour=s.assertValidHour(L),this.minute=s.assertValidMinute(B),this.second=s.assertValidSecond(j),this.nanosecond=s.assertValidNanosecond(z),this.timeZoneOffsetSeconds=(0,u.assertNumberOrInteger)(H,"Time zone offset in seconds"),Object.freeze(this)}return k.fromStandardDate=function(L,B){return I(L,B),new k(L.getHours(),L.getMinutes(),L.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(L,B)),s.timeZoneOffsetInSeconds(L))},k.prototype.toString=function(){return s.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+s.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},k})();e.Time=x,Object.defineProperty(x.prototype,p,f),e.isTime=function(k){return T(k,p)};var S=(function(){function k(L,B,j){this.year=s.assertValidYear(L),this.month=s.assertValidMonth(B),this.day=s.assertValidDay(j),Object.freeze(this)}return k.fromStandardDate=function(L){return I(L),new k(L.getFullYear(),L.getMonth()+1,L.getDate())},k.prototype.toStandardDate=function(){return s.isoStringToStandardDate(this.toString())},k.prototype.toString=function(){return s.dateToIsoString(this.year,this.month,this.day)},k})();e.Date=S,Object.defineProperty(S.prototype,g,f),e.isDate=function(k){return T(k,g)};var O=(function(){function k(L,B,j,z,H,q,W){this.year=s.assertValidYear(L),this.month=s.assertValidMonth(B),this.day=s.assertValidDay(j),this.hour=s.assertValidHour(z),this.minute=s.assertValidMinute(H),this.second=s.assertValidSecond(q),this.nanosecond=s.assertValidNanosecond(W),Object.freeze(this)}return k.fromStandardDate=function(L,B){return I(L,B),new k(L.getFullYear(),L.getMonth()+1,L.getDate(),L.getHours(),L.getMinutes(),L.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(L,B)))},k.prototype.toStandardDate=function(){return s.isoStringToStandardDate(this.toString())},k.prototype.toString=function(){return P(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},k})();e.LocalDateTime=O,Object.defineProperty(O.prototype,y,f),e.isLocalDateTime=function(k){return T(k,y)};var E=(function(){function k(L,B,j,z,H,q,W,$,J){this.year=s.assertValidYear(L),this.month=s.assertValidMonth(B),this.day=s.assertValidDay(j),this.hour=s.assertValidHour(z),this.minute=s.assertValidMinute(H),this.second=s.assertValidSecond(q),this.nanosecond=s.assertValidNanosecond(W);var X=o((function(re,ne){var le=re!=null,ce=ne!=null&&ne!=="";if(!le&&!ce)throw(0,l.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(re," and id: ").concat(ne));var pe=[void 0,void 0];return le&&((0,u.assertNumberOrInteger)(re,"Time zone offset in seconds"),pe[0]=re),ce&&((0,u.assertString)(ne,"Time zone ID"),s.assertValidZoneId("Time zone ID",ne),pe[1]=ne),pe})($,J),2),Z=X[0],ue=X[1];this.timeZoneOffsetSeconds=Z,this.timeZoneId=ue??void 0,Object.freeze(this)}return k.fromStandardDate=function(L,B){return I(L,B),new k(L.getFullYear(),L.getMonth()+1,L.getDate(),L.getHours(),L.getMinutes(),L.getSeconds(),(0,c.toNumber)(s.totalNanoseconds(L,B)),s.timeZoneOffsetInSeconds(L),null)},k.prototype.toStandardDate=function(){return s.toStandardDate(this._toUTC())},k.prototype.toString=function(){var L;return P(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(this.timeZoneOffsetSeconds!=null?s.timeZoneOffsetToIsoString((L=this.timeZoneOffsetSeconds)!==null&&L!==void 0?L:0):"")+(this.timeZoneId!=null?"[".concat(this.timeZoneId,"]"):"")},k.prototype._toUTC=function(){var L;if(this.timeZoneOffsetSeconds===void 0)throw new Error("Requires DateTime created with time zone offset");var B=s.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract((L=this.timeZoneOffsetSeconds)!==null&&L!==void 0?L:0);return(0,c.int)(B).multiply(1e3).add((0,c.int)(this.nanosecond).div(1e6)).toNumber()},k})();function T(k,L){return k!=null&&k[L]===!0}function P(k,L,B,j,z,H,q){return s.dateToIsoString(k,L,B)+"T"+s.timeToIsoString(j,z,H,q)}function I(k,L){(0,u.assertValidDate)(k,"Standard date"),L!=null&&(0,u.assertNumberOrInteger)(L,"Nanosecond")}e.DateTime=E,Object.defineProperty(E.prototype,b,f),e.isDateTime=function(k){return T(k,b)}},5471:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.map=void 0;var n=t(7843),i=t(3111);e.map=function(a,o){return n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){u.next(a.call(o,c,l++))}))})}},5477:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.window=void 0;var n=t(2483),i=t(7843),a=t(3111),o=t(1342),s=t(9445);e.window=function(u){return i.operate(function(l,c){var f=new n.Subject;c.next(f.asObservable());var d=function(h){f.error(h),c.error(h)};return l.subscribe(a.createOperatorSubscriber(c,function(h){return f==null?void 0:f.next(h)},function(){f.complete(),c.complete()},d)),s.innerFrom(u).subscribe(a.createOperatorSubscriber(c,function(){f.complete(),c.next(f=new n.Subject)},o.noop,d)),function(){f==null||f.unsubscribe(),f=null}})}},5481:function(r,e,t){var n=this&&this.__awaiter||function(S,O,E,T){return new(E||(E=Promise))(function(P,I){function k(j){try{B(T.next(j))}catch(z){I(z)}}function L(j){try{B(T.throw(j))}catch(z){I(z)}}function B(j){var z;j.done?P(j.value):(z=j.value,z instanceof E?z:new E(function(H){H(z)})).then(k,L)}B((T=T.apply(S,O||[])).next())})},i=this&&this.__generator||function(S,O){var E,T,P,I,k={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return I={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(B){return function(j){return(function(z){if(E)throw new TypeError("Generator is already executing.");for(;I&&(I=0,z[0]&&(k=0)),k;)try{if(E=1,T&&(P=2&z[0]?T.return:z[0]?T.throw||((P=T.return)&&P.call(T),0):T.next)&&!(P=P.call(T,z[1])).done)return P;switch(T=0,P&&(z=[2&z[0],P.value]),z[0]){case 0:case 1:P=z;break;case 4:return k.label++,{value:z[1],done:!1};case 5:k.label++,T=z[1],z=[0];continue;case 7:z=k.ops.pop(),k.trys.pop();continue;default:if(!((P=(P=k.trys).length>0&&P[P.length-1])||z[0]!==6&&z[0]!==2)){k=0;continue}if(z[0]===3&&(!P||z[1]>P[0]&&z[1]0)&&!(T=I.next()).done;)k.push(T.value)}catch(L){P={error:L}}finally{try{T&&!T.done&&(E=I.return)&&E.call(I)}finally{if(P)throw P.error}}return k},o=this&&this.__spreadArray||function(S,O,E){if(E||arguments.length===2)for(var T,P=0,I=O.length;P{Object.defineProperty(e,"__esModule",{value:!0}),e.every=void 0;var n=t(7843),i=t(3111);e.every=function(a,o){return n.operate(function(s,u){var l=0;s.subscribe(i.createOperatorSubscriber(u,function(c){a.call(o,c,l++,s)||(u.next(!1),u.complete())},function(){u.next(!0),u.complete()}))})}},5553:function(r,e,t){var n=this&&this.__extends||(function(){var s=function(u,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(c[d]=f[d])},s(u,l)};return function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function c(){this.constructor=u}s(u,l),u.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=t(7174),a=t(5319),o=(function(s){function u(l){for(var c=this,f=0,d=0;d=f.length))return f.getUInt8(l);l-=f.length}},u.prototype.getInt8=function(l){for(var c=0;c=f.length))return f.getInt8(l);l-=f.length}},u.prototype.getFloat64=function(l){for(var c=(0,a.alloc)(8),f=0;f<8;f++)c.putUInt8(f,this.getUInt8(l+f));return c.getFloat64(0)},u})(i.BaseBuffer);e.default=o},5568:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorClass=void 0,e.createErrorClass=function(t){var n=t(function(i){Error.call(i),i.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}},5572:function(r,e,t){var n=this&&this.__values||function(s){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&s[u],c=0;if(l)return l.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferCount=void 0;var i=t(7843),a=t(3111),o=t(7479);e.bufferCount=function(s,u){return u===void 0&&(u=null),u=u??s,i.operate(function(l,c){var f=[],d=0;l.subscribe(a.createOperatorSubscriber(c,function(h){var p,g,y,b,_=null;d++%u===0&&f.push([]);try{for(var m=n(f),x=m.next();!x.done;x=m.next())(E=x.value).push(h),s<=E.length&&(_=_??[]).push(E)}catch(T){p={error:T}}finally{try{x&&!x.done&&(g=m.return)&&g.call(m)}finally{if(p)throw p.error}}if(_)try{for(var S=n(_),O=S.next();!O.done;O=S.next()){var E=O.value;o.arrRemove(f,E),c.next(E)}}catch(T){y={error:T}}finally{try{O&&!O.done&&(b=S.return)&&b.call(S)}finally{if(y)throw y.error}}},function(){var h,p;try{for(var g=n(f),y=g.next();!y.done;y=g.next()){var b=y.value;c.next(b)}}catch(_){h={error:_}}finally{try{y&&!y.done&&(p=g.return)&&p.call(g)}finally{if(h)throw h.error}}c.complete()},void 0,function(){f=null}))})}},5584:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.raceInit=e.race=void 0;var n=t(4662),i=t(9445),a=t(8535),o=t(3111);function s(u){return function(l){for(var c=[],f=function(h){c.push(i.innerFrom(u[h]).subscribe(o.createOperatorSubscriber(l,function(p){if(c){for(var g=0;g{var n=t(7192);n=n.slice().filter(function(i){return!/^(gl\_|texture)/.test(i)}),r.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},5600:function(r,e,t){var n=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p},i=this&&this.__spreadArray||function(u,l){for(var c=0,f=l.length,d=u.length;c{var n=t(1048),i=n.Buffer;function a(s,u){for(var l in s)u[l]=s[l]}function o(s,u,l){return i(s,u,l)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?r.exports=n:(a(n,e),e.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(s,u,l){if(typeof s=="number")throw new TypeError("Argument must not be a number");return i(s,u,l)},o.alloc=function(s,u,l){if(typeof s!="number")throw new TypeError("Argument must be a number");var c=i(s);return u!==void 0?typeof l=="string"?c.fill(u,l):c.fill(u):c.fill(0),c},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return i(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(s)}},5642:function(r,e,t){var n=this&&this.__extends||(function(){var m=function(x,S){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,E){O.__proto__=E}||function(O,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(O[T]=E[T])},m(x,S)};return function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function O(){this.constructor=x}m(x,S),x.prototype=S===null?Object.create(S):(O.prototype=S.prototype,new O)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var x,S=1,O=arguments.length;S0)&&!(s=l.next()).done;)c.push(s.value)}catch(f){u={error:f}}finally{try{s&&!s.done&&(o=l.return)&&o.call(l)}finally{if(u)throw u.error}}return c},n=this&&this.__spreadArray||function(i,a){for(var o=0,s=a.length,u=i.length;o{Object.defineProperty(e,"__esModule",{value:!0}),e.UnsubscriptionError=void 0;var n=t(5568);e.UnsubscriptionError=n.createErrorClass(function(i){return function(a){i(this),this.message=a?a.length+` errors occurred during unsubscription: `+a.map(function(o,s){return s+1+") "+o.toString()}).join(` `):"",this.name="UnsubscriptionError",this.errors=a}})},5815:function(r,e,t){var n=this&&this.__extends||(function(){var y=function(b,_){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,x){m.__proto__=x}||function(m,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(m[S]=x[S])},y(b,_)};return function(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function m(){this.constructor=b}y(b,_),b.prototype=_===null?Object.create(_):(m.prototype=_.prototype,new m)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(y){for(var b,_=1,m=arguments.length;_{Object.defineProperty(e,"__esModule",{value:!0}),e.fromVersion=void 0,e.fromVersion=function(t,n){n===void 0&&(n=function(){return{get userAgent(){}}});var i=n(),a=i.userAgent!=null?i.userAgent.split("(")[1].split(")")[0]:void 0,o=i.userAgent||void 0;return{product:"neo4j-javascript/".concat(t),platform:a,languageDetails:o}}},5880:function(r,e,t){var n,i;n=function(){var a=function(){},o="undefined",s=typeof window!==o&&typeof window.navigator!==o&&/Trident\/|MSIE /.test(window.navigator.userAgent),u=["trace","debug","info","warn","error"],l={},c=null;function f(_,m){var x=_[m];if(typeof x.bind=="function")return x.bind(_);try{return Function.prototype.bind.call(x,_)}catch{return function(){return Function.prototype.apply.apply(x,[_,arguments])}}}function d(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function h(){for(var _=this.getLevel(),m=0;m=0&&B<=E.levels.SILENT)return B;throw new TypeError("log.setLevel() called with invalid level: "+L)}typeof _=="string"?T+=":"+_:typeof _=="symbol"&&(T=void 0),E.name=_,E.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},E.methodFactory=m||g,E.getLevel=function(){return O??S??x},E.setLevel=function(L,B){return O=I(L),B!==!1&&(function(j){var z=(u[j]||"silent").toUpperCase();if(typeof window!==o&&T){try{return void(window.localStorage[T]=z)}catch{}try{window.document.cookie=encodeURIComponent(T)+"="+z+";"}catch{}}})(O),h.call(E)},E.setDefaultLevel=function(L){S=I(L),P()||E.setLevel(L,!1)},E.resetLevel=function(){O=null,(function(){if(typeof window!==o&&T){try{window.localStorage.removeItem(T)}catch{}try{window.document.cookie=encodeURIComponent(T)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}})(),h.call(E)},E.enableAll=function(L){E.setLevel(E.levels.TRACE,L)},E.disableAll=function(L){E.setLevel(E.levels.SILENT,L)},E.rebuild=function(){if(c!==E&&(x=I(c.getLevel())),h.call(E),c===E)for(var L in l)l[L].rebuild()},x=I(c?c.getLevel():"WARN");var k=P();k!=null&&(O=I(k)),h.call(E)}(c=new y).getLogger=function(_){if(typeof _!="symbol"&&typeof _!="string"||_==="")throw new TypeError("You must supply a name when creating a logger.");var m=l[_];return m||(m=l[_]=new y(_,c.methodFactory)),m};var b=typeof window!==o?window.log:void 0;return c.noConflict=function(){return typeof window!==o&&window.log===c&&(window.log=b),c},c.getLoggers=function(){return l},c.default=c,c},(i=n.call(e,t,e,r))===void 0||(r.exports=i)},5909:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(function(){function n(i){var a=i.run;this._run=a}return n.fromTransaction=function(i){return new n({run:i.run.bind(i)})},n.prototype.run=function(i,a){return this._run(i,a)},n})();e.default=t},5918:function(r,e,t){var n=this&&this.__read||function(s,u){var l=typeof Symbol=="function"&&s[Symbol.iterator];if(!l)return s;var c,f,d=l.call(s),h=[];try{for(;(u===void 0||u-- >0)&&!(c=d.next()).done;)h.push(c.value)}catch(p){f={error:p}}finally{try{c&&!c.done&&(l=d.return)&&l.call(d)}finally{if(f)throw f.error}}return h},i=this&&this.__spreadArray||function(s,u){for(var l=0,c=u.length,f=s.length;l{Object.defineProperty(e,"__esModule",{value:!0}),e.epochSecondAndNanoToLocalDateTime=e.nanoOfDayToLocalTime=e.epochDayToDate=void 0;var n=t(9305),i=n.internal.temporalUtil,a=i.DAYS_0000_TO_1970,o=i.DAYS_PER_400_YEAR_CYCLE,s=i.NANOS_PER_HOUR,u=i.NANOS_PER_MINUTE,l=i.NANOS_PER_SECOND,c=i.SECONDS_PER_DAY,f=i.floorDiv,d=i.floorMod;function h(g){var y=(g=(0,n.int)(g)).add(a).subtract(60),b=(0,n.int)(0);if(y.lessThan(0)){var _=y.add(1).div(o).subtract(1);b=_.multiply(400),y=y.add(_.multiply(-o))}var m=y.multiply(400).add(591).div(o),x=y.subtract(m.multiply(365).add(m.div(4)).subtract(m.div(100)).add(m.div(400)));x.lessThan(0)&&(m=m.subtract(1),x=y.subtract(m.multiply(365).add(m.div(4)).subtract(m.div(100)).add(m.div(400)))),m=m.add(b);var S=x,O=S.multiply(5).add(2).div(153),E=O.add(2).modulo(12).add(1),T=S.subtract(O.multiply(306).add(5).div(10)).add(1);return m=m.add(O.div(10)),new n.Date(m,E,T)}function p(g){var y=(g=(0,n.int)(g)).div(s),b=(g=g.subtract(y.multiply(s))).div(u),_=(g=g.subtract(b.multiply(u))).div(l),m=g.subtract(_.multiply(l));return new n.LocalTime(y,b,_,m)}e.epochDayToDate=h,e.nanoOfDayToLocalTime=p,e.epochSecondAndNanoToLocalDateTime=function(g,y){var b=f(g,c),_=d(g,c).multiply(l).add(y),m=h(b),x=p(_);return new n.LocalDateTime(m.year,m.month,m.day,x.hour,x.minute,x.second,x.nanosecond)}},6013:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createObject=void 0,e.createObject=function(t,n){return t.reduce(function(i,a,o){return i[a]=n[o],i},{})}},6030:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.cacheKey=void 0;var n=t(4027);e.cacheKey=function(i,a){var o;return a!=null?"basic:"+a:i===void 0?"DEFAULT":i.scheme==="basic"?"basic:"+((o=i.principal)!==null&&o!==void 0?o:""):i.scheme==="kerberos"?"kerberos:"+i.credentials:i.scheme==="bearer"?"bearer:"+i.credentials:i.scheme==="none"?"none":(0,n.stringify)(i,{sortedElements:!0})}},6033:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.ServerInfo=e.queryType=void 0;var n=t(6995),i=t(1866),a=(function(){function f(d,h,p,g){var y,b,_;this.query={text:d,parameters:h},this.queryType=p.type,this.counters=new u((y=p.stats)!==null&&y!==void 0?y:{}),this.updateStatistics=this.counters,this.plan=(p.plan!=null||p.profile!=null)&&new o((b=p.plan)!==null&&b!==void 0?b:p.profile),this.profile=p.profile!=null&&new s(p.profile),this.notifications=(0,i.buildNotificationsFromMetadata)(p),this.gqlStatusObjects=(0,i.buildGqlStatusObjectFromMetadata)(p),this.server=new l(p.server,g),this.resultConsumedAfter=p.result_consumed_after,this.resultAvailableAfter=p.result_available_after,this.database={name:(_=p.db)!==null&&_!==void 0?_:null}}return f.prototype.hasPlan=function(){return this.plan instanceof o},f.prototype.hasProfile=function(){return this.profile instanceof s},f})(),o=function f(d){this.operatorType=d.operatorType,this.identifiers=d.identifiers,this.arguments=d.args,this.children=d.children!=null?d.children.map(function(h){return new f(h)}):[]};e.Plan=o;var s=(function(){function f(d){this.operatorType=d.operatorType,this.identifiers=d.identifiers,this.arguments=d.args,this.dbHits=c("dbHits",d),this.rows=c("rows",d),this.pageCacheMisses=c("pageCacheMisses",d),this.pageCacheHits=c("pageCacheHits",d),this.pageCacheHitRatio=c("pageCacheHitRatio",d),this.time=c("time",d),this.children=d.children!=null?d.children.map(function(h){return new f(h)}):[]}return f.prototype.hasPageCacheStats=function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0},f})();e.ProfiledPlan=s,e.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 f(d){var h=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(d).forEach(function(p){var g=p.replace(/(-\w)/g,function(y){return y[1].toUpperCase()});g in h._stats?h._stats[g]=n.util.toNumber(d[p]):g==="systemUpdates"?h._systemUpdates=n.util.toNumber(d[p]):g==="containsSystemUpdates"?h._containsSystemUpdates=d[p]:g==="containsUpdates"&&(h._containsUpdates=d[p])}),this._stats=Object.freeze(this._stats)}return f.prototype.containsUpdates=function(){var d=this;return this._containsUpdates!==void 0?this._containsUpdates:Object.keys(this._stats).reduce(function(h,p){return h+d._stats[p]},0)>0},f.prototype.updates=function(){return this._stats},f.prototype.containsSystemUpdates=function(){return this._containsSystemUpdates!==void 0?this._containsSystemUpdates:this._systemUpdates>0},f.prototype.systemUpdates=function(){return this._systemUpdates},f})();e.QueryStatistics=u;var l=function(f,d){f!=null&&(this.address=f.address,this.agent=f.version),this.protocolVersion=d};function c(f,d,h){if(h===void 0&&(h=0),d!==!1&&f in d){var p=d[f];return n.util.toNumber(p)}return h}e.ServerInfo=l,e.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},e.default=a},6038:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},6086:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sampleTime=void 0;var n=t(7961),i=t(1731),a=t(6472);e.sampleTime=function(o,s){return s===void 0&&(s=n.asyncScheduler),i.sample(a.interval(o,s))}},6102:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.onErrorResumeNext=void 0;var n=t(4662),i=t(8535),a=t(3111),o=t(1342),s=t(9445);e.onErrorResumeNext=function(){for(var u=[],l=0;l{Object.defineProperty(e,"__esModule",{value:!0}),e.publishLast=void 0;var n=t(95),i=t(8918);e.publishLast=function(){return function(a){var o=new n.AsyncSubject;return new i.ConnectableObservable(a,function(){return o})}}},6161:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u0&&_[_.length-1])||T[0]!==6&&T[0]!==2)){x=0;continue}if(T[0]===3&&(!_||T[1]>_[0]&&T[1]<_[3])){x.label=T[1];break}if(T[0]===6&&x.label<_[1]){x.label=_[1],_=T;break}if(_&&x.label<_[2]){x.label=_[2],x.ops.push(T);break}_[2]&&x.ops.pop(),x.trys.pop();continue}T=g.call(p,x)}catch(P){T=[6,P],b=0}finally{y=_=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}})([O,E])}}},o=this&&this.__read||function(p,g){var y=typeof Symbol=="function"&&p[Symbol.iterator];if(!y)return p;var b,_,m=y.call(p),x=[];try{for(;(g===void 0||g-- >0)&&!(b=m.next()).done;)x.push(b.value)}catch(S){_={error:S}}finally{try{b&&!b.done&&(y=m.return)&&y.call(m)}finally{if(_)throw _.error}}return x},s=this&&this.__spreadArray||function(p,g,y){if(y||arguments.length===2)for(var b,_=0,m=g.length;_this._maxRetryTimeMs||!(0,u.isRetriableError)(b)?Promise.reject(b):new Promise(function(E,T){var P=O._computeDelayWithJitter(m),I=O._setTimeout(function(){O._inFlightTimeoutIds=O._inFlightTimeoutIds.filter(function(k){return k!==I}),O._executeTransactionInsidePromise(g,y,E,T,x,S).catch(T)},P);O._inFlightTimeoutIds.push(I)}).catch(function(E){var T=m*O._multiplier;return O._retryTransactionPromise(g,y,E,_,T,x,S)})},p.prototype._executeTransactionInsidePromise=function(g,y,b,_,m,x){return i(this,void 0,void 0,function(){var S,O,E,T,P,I,k=this;return a(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),O=g((x==null?void 0:x.apiTransactionConfig)!=null?n({},x==null?void 0:x.apiTransactionConfig):void 0),this.pipelineBegin?(E=O,[3,3]):[3,1];case 1:return[4,O];case 2:E=L.sent(),L.label=3;case 3:return S=E,[3,5];case 4:return T=L.sent(),_(T),[2];case 5:return P=m??function(B){return B},I=P(S),this._safeExecuteTransactionWork(I,y).then(function(B){return k._handleTransactionWorkSuccess(B,S,b,_)}).catch(function(B){return k._handleTransactionWorkFailure(B,S,_)}),[2]}})})},p.prototype._safeExecuteTransactionWork=function(g,y){try{var b=y(g);return Promise.resolve(b)}catch(_){return Promise.reject(_)}},p.prototype._handleTransactionWorkSuccess=function(g,y,b,_){y.isOpen()?y.commit().then(function(){b(g)}).catch(function(m){_(m)}):b(g)},p.prototype._handleTransactionWorkFailure=function(g,y,b){y.isOpen()?y.rollback().catch(function(_){}).then(function(){return b(g)}).catch(b):b(g)},p.prototype._computeDelayWithJitter=function(g){var y=g*this._jitterFactor,b=g-y,_=g+y;return Math.random()*(_-b)+b},p.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())},p})();function h(p,g){return p??g}e.TransactionExecutor=d},6245:function(r,e,t){var n=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(t(5319)),a=t(9305),o=a.internal.util,s=o.ENCRYPTION_OFF,u=o.ENCRYPTION_ON,l=(function(){function f(d,h,p){h===void 0&&(h=c),p===void 0&&(p=function(x){return new WebSocket(x)});var g=this;this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=d,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null;var y=(function(x,S){var O=(function(I){return I.encrypted===!0||I.encrypted===u})(x),E=(function(I){return I.encrypted===!1||I.encrypted===s})(x),T=x.trust,P=(function(I){var k=typeof I=="function"?I():"";return k&&k.toLowerCase().indexOf("https")>=0})(S);return(function(I,k,L){L===null||(I&&!L?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."):k&&L&&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."))})(O,E,P),E?{scheme:"ws",error:null}:P?{scheme:"wss",error:null}:O?T&&T!=="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"?{scheme:null,error:(0,a.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+T+' 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}})(d,h),b=y.scheme,_=y.error;if(_)this._error=_;else{this._ws=(function(x,S,O){var E=x+"://"+S.asHostPort();try{return O(E)}catch(P){if((function(I,k){return I.name==="SyntaxError"&&(L=k.asHostPort()).charAt(0)==="["&&L.indexOf("]")!==-1;var L})(P,S)){var T=(function(I,k){var L=k.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(I,"://").concat(L,":").concat(k.port())})(x,S);return O(T)}throw P}})(b,d.address,p),this._ws.binaryType="arraybuffer";var m=this;this._ws.onclose=function(x){x&&!x.wasClean&&m._handleConnectionError(),m._open=!1},this._ws.onopen=function(){m._clearConnectionTimeout();var x=m._pending;m._pending=null;for(var S=0;S0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p},i=this&&this.__spreadArray||function(u,l){for(var c=0,f=l.length,d=u.length;c{Object.defineProperty(e,"__esModule",{value:!0}),e.isIterable=void 0;var n=t(1964),i=t(1018);e.isIterable=function(a){return i.isFunction(a==null?void 0:a[n.iterator])}},6377:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(d){for(var h,p=1,g=arguments.length;p{Object.defineProperty(e,"__esModule",{value:!0}),e.scanInternals=void 0;var n=t(3111);e.scanInternals=function(i,a,o,s,u){return function(l,c){var f=o,d=a,h=0;l.subscribe(n.createOperatorSubscriber(c,function(p){var g=h++;d=f?i(d,p,g):(f=!0,p),s&&c.next(d)},u&&function(){f&&c.next(d),c.complete()}))}}},6385:function(r,e,t){var n=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),t(7666);var i=(function(a){function o(s){var u=a.call(this)||this;return u._errorHandler=s,u}return n(o,a),Object.defineProperty(o.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(s){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(s){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(s){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(o.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(s){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.connect=function(s,u,l,c){throw new Error("not implemented")},o.prototype.write=function(s,u,l){throw new Error("not implemented")},o.prototype.close=function(){throw new Error("not implemented")},o.prototype.handleAndTransformError=function(s,u){return this._errorHandler?this._errorHandler.handleAndTransformError(s,u,this):s},o})(t(9305).Connection);e.default=i},6445:function(r,e,t){var n=this&&this.__extends||(function(){var f=function(d,h){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(p[y]=g[y])},f(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function p(){this.constructor=d}f(d,h),d.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})(),i=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(t(4596)),o=t(9305),s=i(t(5348)),u=i(t(3321)),l=o.internal.constants.BOLT_PROTOCOL_V4_2,c=(function(f){function d(){return f!==null&&f.apply(this,arguments)||this}return n(d,f),Object.defineProperty(d.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"transformer",{get:function(){var h=this;return this._transformer===void 0&&(this._transformer=new u.default(Object.values(s.default).map(function(p){return p(h._config,h._log)}))),this._transformer},enumerable:!1,configurable:!0}),d})(a.default);e.default=c},6472:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.interval=void 0;var n=t(7961),i=t(4092);e.interval=function(a,o){return a===void 0&&(a=0),o===void 0&&(o=n.asyncScheduler),a<0&&(a=0),i.timer(a,a,o)}},6492:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reuseOngoingRequest=e.identity=void 0;var n=t(9305);e.identity=function(i){return i},e.reuseOngoingRequest=function(i,a){a===void 0&&(a=null);var o=new Map;return function(){for(var s=[],u=0;u{Object.defineProperty(e,"__esModule",{value:!0}),e.timestamp=void 0;var n=t(9568),i=t(5471);e.timestamp=function(a){return a===void 0&&(a=n.dateTimestampProvider),i.map(function(o){return{value:o,timestamp:a.now()}})}},6544:function(r,e,t){var n=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0});var i=t(9305),a=n(t(8320)),o=n(t(2857)),s=n(t(5642)),u=n(t(2539)),l=n(t(4596)),c=n(t(6445)),f=n(t(9054)),d=n(t(1711)),h=n(t(844)),p=n(t(6345)),g=n(t(934)),y=n(t(9125)),b=n(t(9744)),_=n(t(5815)),m=n(t(6890)),x=n(t(6377)),S=n(t(1092)),O=(t(7452),n(t(2578)));e.default=function(E){var T=E===void 0?{}:E,P=T.version,I=T.chunker,k=T.dechunker,L=T.channel,B=T.disableLosslessIntegers,j=T.useBigInt,z=T.serversideRouting,H=T.server,q=T.log,W=T.observer;return(function($,J,X,Z,ue,re,ne,le){switch($){case 1:return new a.default(J,X,Z,re,le,ne);case 2:return new o.default(J,X,Z,re,le,ne);case 3:return new s.default(J,X,Z,re,le,ne);case 4:return new u.default(J,X,Z,re,le,ne);case 4.1:return new l.default(J,X,Z,re,le,ne,ue);case 4.2:return new c.default(J,X,Z,re,le,ne,ue);case 4.3:return new f.default(J,X,Z,re,le,ne,ue);case 4.4:return new d.default(J,X,Z,re,le,ne,ue);case 5:return new h.default(J,X,Z,re,le,ne,ue);case 5.1:return new p.default(J,X,Z,re,le,ne,ue);case 5.2:return new g.default(J,X,Z,re,le,ne,ue);case 5.3:return new y.default(J,X,Z,re,le,ne,ue);case 5.4:return new b.default(J,X,Z,re,le,ne,ue);case 5.5:return new _.default(J,X,Z,re,le,ne,ue);case 5.6:return new m.default(J,X,Z,re,le,ne,ue);case 5.7:return new x.default(J,X,Z,re,le,ne,ue);case 5.8:return new S.default(J,X,Z,re,le,ne,ue);default:throw(0,i.newError)("Unknown Bolt protocol version: "+$)}})(P,H,I,{disableLosslessIntegers:B,useBigInt:j},z,function($){var J=new O.default({transformMetadata:$.transformMetadata.bind($),enrichErrorMetadata:$.enrichErrorMetadata.bind($),log:q,observer:W});return L.onerror=W.onError.bind(W),L.onmessage=function(X){return k.write(X)},k.onmessage=function(X){try{J.handleResponse($.unpack(X))}catch(Z){return W.onError(Z)}},J},W.onProtocolError.bind(W),q)}},6566:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.repeatWhen=void 0;var n=t(9445),i=t(2483),a=t(7843),o=t(3111);e.repeatWhen=function(s){return a.operate(function(u,l){var c,f,d=!1,h=!1,p=!1,g=function(){return p&&h&&(l.complete(),!0)},y=function(){p=!1,c=u.subscribe(o.createOperatorSubscriber(l,void 0,function(){p=!0,!g()&&(f||(f=new i.Subject,n.innerFrom(s(f)).subscribe(o.createOperatorSubscriber(l,function(){c?y():d=!0},function(){h=!0,g()}))),f).next()})),d&&(c.unsubscribe(),c=null,d=!1,y())};y()})}},6586:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMapTo=void 0;var n=t(983),i=t(1018);e.mergeMapTo=function(a,o,s){return s===void 0&&(s=1/0),i.isFunction(o)?n.mergeMap(function(){return a},o,s):(typeof o=="number"&&(s=o),n.mergeMap(function(){return a},s))}},6587:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(d,h,p,g){g===void 0&&(g=p);var y=Object.getOwnPropertyDescriptor(h,p);y&&!("get"in y?!h.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(d,g,y)}:function(d,h,p,g){g===void 0&&(g=p),d[g]=h[p]}),i=this&&this.__setModuleDefault||(Object.create?function(d,h){Object.defineProperty(d,"default",{enumerable:!0,value:h})}:function(d,h){d.default=h}),a=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var p in d)p!=="default"&&Object.prototype.hasOwnProperty.call(d,p)&&n(h,d,p);return i(h,d),h},o=this&&this.__values||function(d){var h=typeof Symbol=="function"&&Symbol.iterator,p=h&&d[h],g=0;if(p)return p.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&g>=d.length&&(d=void 0),{value:d&&d[g++],done:!d}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.ENCRYPTION_OFF=e.ENCRYPTION_ON=e.equals=e.validateQueryAndParameters=e.toNumber=e.assertValidDate=e.assertNumberOrInteger=e.assertNumber=e.assertString=e.assertObject=e.isString=e.isObject=e.isEmptyObjectOrNull=void 0;var s=a(t(3371)),u=t(4027);function l(d){return typeof d=="object"&&!Array.isArray(d)&&d!==null}function c(d,h){if(!f(d))throw new TypeError((0,u.stringify)(h)+" expected to be string but was: "+(0,u.stringify)(d));return d}function f(d){return Object.prototype.toString.call(d)==="[object String]"}e.ENCRYPTION_ON="ENCRYPTION_ON",e.ENCRYPTION_OFF="ENCRYPTION_OFF",e.isEmptyObjectOrNull=function(d){if(d===null)return!0;if(!l(d))return!1;for(var h in d)if(d[h]!==void 0)return!1;return!0},e.isObject=l,e.validateQueryAndParameters=function(d,h,p){var g,y,b="",_=h??{},m=(g=p==null?void 0:p.skipAsserts)!==null&&g!==void 0&&g;return typeof d=="string"?b=d:d instanceof String?b=d.toString():typeof d=="object"&&d.text!=null&&(b=d.text,_=(y=d.parameters)!==null&&y!==void 0?y:{}),m||((function(x){if(c(x,"Cypher query"),x.trim().length===0)throw new TypeError("Cypher query is expected to be a non-empty string.")})(b),(function(x){if(!l(x)){var S=x.constructor!=null?" "+x.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(S," ").concat(JSON.stringify(x)))}})(_)),{validatedQuery:b,params:_}},e.assertObject=function(d,h){if(!l(d))throw new TypeError(h+" expected to be an object but was: "+(0,u.stringify)(d));return d},e.assertString=c,e.assertNumber=function(d,h){if(typeof d!="number")throw new TypeError(h+" expected to be a number but was: "+(0,u.stringify)(d));return d},e.assertNumberOrInteger=function(d,h){if(typeof d!="number"&&typeof d!="bigint"&&!(0,s.isInt)(d))throw new TypeError(h+" expected to be either a number or an Integer object but was: "+(0,u.stringify)(d));return d},e.assertValidDate=function(d,h){if(Object.prototype.toString.call(d)!=="[object Date]")throw new TypeError(h+" expected to be a standard JavaScript Date but was: "+(0,u.stringify)(d));if(Number.isNaN(d.getTime()))throw new TypeError(h+" expected to be valid JavaScript Date but its time was NaN: "+(0,u.stringify)(d));return d},e.isString=f,e.equals=function d(h,p){var g,y;if(h===p)return!0;if(h===null||p===null)return!1;if(typeof h=="object"&&typeof p=="object"){var b=Object.keys(h),_=Object.keys(p);if(b.length!==_.length)return!1;try{for(var m=o(b),x=m.next();!x.done;x=m.next()){var S=x.value;if(!d(h[S],p[S]))return!1}}catch(O){g={error:O}}finally{try{x&&!x.done&&(y=m.return)&&y.call(m)}finally{if(g)throw g.error}}return!0}return!1},e.toNumber=function(d){return d instanceof s.default?d.toNumber():typeof d=="bigint"?(0,s.int)(d).toNumber():d}},6625:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.combineAll=void 0;var n=t(6728);e.combineAll=n.combineLatestAll},6637:function(r,e,t){var n=this&&this.__values||function(f){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&f[d],p=0;if(h)return h.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&p>=f.length&&(f=void 0),{value:f&&f[p++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowToggle=void 0;var i=t(2483),a=t(8014),o=t(7843),s=t(9445),u=t(3111),l=t(1342),c=t(7479);e.windowToggle=function(f,d){return o.operate(function(h,p){var g=[],y=function(b){for(;0{Object.defineProperty(e,"__esModule",{value:!0}),e.identity=void 0,e.identity=function(t){return t}},6661:function(r,e,t){var n=this&&this.__read||function(u,l){var c=typeof Symbol=="function"&&u[Symbol.iterator];if(!c)return u;var f,d,h=c.call(u),p=[];try{for(;(l===void 0||l-- >0)&&!(f=h.next()).done;)p.push(f.value)}catch(g){d={error:g}}finally{try{f&&!f.done&&(c=h.return)&&c.call(h)}finally{if(d)throw d.error}}return p};Object.defineProperty(e,"__esModule",{value:!0});var i=t(9305),a=t(7168),o=t(3321),s=i.error.PROTOCOL_ERROR;e.default={createNodeTransformer:function(){return new o.TypeTransformer({signature:78,isTypeInstance:function(u){return u instanceof i.Node},toStructure:function(u){throw(0,i.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(u),s)},fromStructure:function(u){a.structure.verifyStructSize("Node",3,u.size);var l=n(u.fields,3),c=l[0],f=l[1],d=l[2];return new i.Node(c,f,d)}})},createRelationshipTransformer:function(){return new o.TypeTransformer({signature:82,isTypeInstance:function(u){return u instanceof i.Relationship},toStructure:function(u){throw(0,i.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(u),s)},fromStructure:function(u){a.structure.verifyStructSize("Relationship",5,u.size);var l=n(u.fields,5),c=l[0],f=l[1],d=l[2],h=l[3],p=l[4];return new i.Relationship(c,f,d,h,p)}})},createUnboundRelationshipTransformer:function(){return new o.TypeTransformer({signature:114,isTypeInstance:function(u){return u instanceof i.UnboundRelationship},toStructure:function(u){throw(0,i.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(u),s)},fromStructure:function(u){a.structure.verifyStructSize("UnboundRelationship",3,u.size);var l=n(u.fields,3),c=l[0],f=l[1],d=l[2];return new i.UnboundRelationship(c,f,d)}})},createPathTransformer:function(){return new o.TypeTransformer({signature:80,isTypeInstance:function(u){return u instanceof i.Path},toStructure:function(u){throw(0,i.newError)("It is not allowed to pass paths in query parameters, given: ".concat(u),s)},fromStructure:function(u){a.structure.verifyStructSize("Path",3,u.size);for(var l=n(u.fields,3),c=l[0],f=l[1],d=l[2],h=[],p=c[0],g=0;g0?(_=f[b-1])instanceof i.UnboundRelationship&&(f[b-1]=_=_.bindTo(p,y)):(_=f[-b-1])instanceof i.UnboundRelationship&&(f[-b-1]=_=_.bindTo(y,p)),h.push(new i.PathSegment(p,_,y)),p=y}return new i.Path(c[0],c[c.length-1],h)}})}}},6672:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(s,u,l,c){c===void 0&&(c=l);var f=Object.getOwnPropertyDescriptor(u,l);f&&!("get"in f?!u.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(s,c,f)}:function(s,u,l,c){c===void 0&&(c=l),s[c]=u[l]}),i=this&&this.__setModuleDefault||(Object.create?function(s,u){Object.defineProperty(s,"default",{enumerable:!0,value:u})}:function(s,u){s.default=u}),a=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var u={};if(s!=null)for(var l in s)l!=="default"&&Object.prototype.hasOwnProperty.call(s,l)&&n(u,s,l);return i(u,s),u},o=this&&this.__exportStar||function(s,u){for(var l in s)l==="default"||Object.prototype.hasOwnProperty.call(u,l)||n(u,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.packstream=e.channel=e.buf=e.bolt=e.loadBalancing=void 0,e.loadBalancing=a(t(4455)),e.bolt=a(t(7666)),e.buf=a(t(7174)),e.channel=a(t(7452)),e.packstream=a(t(7168)),o(t(9689),e)},6702:function(r,e){var t=this&&this.__values||function(n){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&n[i],o=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.equals=void 0,e.equals=function(n,i){var a,o;if(n===i)return!0;if(n===null||i===null)return!1;if(typeof n=="object"&&typeof i=="object"){var s=Object.keys(n),u=Object.keys(i);if(s.length!==u.length)return!1;try{for(var l=t(s),c=l.next();!c.done;c=l.next()){var f=c.value;if(n[f]!==i[f])return!1}}catch(d){a={error:d}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(a)throw a.error}}return!0}return!1}},6728:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.combineLatestAll=void 0;var n=t(3247),i=t(3638);e.combineLatestAll=function(a){return i.joinAllInternals(n.combineLatest,a)}},6746:function(r,e,t){var n=this&&this.__values||function(s){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&s[u],c=0;if(l)return l.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.windowCount=void 0;var i=t(2483),a=t(7843),o=t(3111);e.windowCount=function(s,u){u===void 0&&(u=0);var l=u>0?u:s;return a.operate(function(c,f){var d=[new i.Subject],h=0;f.next(d[0].asObservable()),c.subscribe(o.createOperatorSubscriber(f,function(p){var g,y;try{for(var b=n(d),_=b.next();!_.done;_=b.next())_.value.next(p)}catch(S){g={error:S}}finally{try{_&&!_.done&&(y=b.return)&&y.call(b)}finally{if(g)throw g.error}}var m=h-s+1;if(m>=0&&m%l===0&&d.shift().complete(),++h%l===0){var x=new i.Subject;d.push(x),f.next(x.asObservable())}},function(){for(;d.length>0;)d.shift().complete();f.complete()},function(p){for(;d.length>0;)d.shift().error(p);f.error(p)},function(){d=null}))})}},6755:function(r,e){var t=this&&this.__awaiter||function(l,c,f,d){return new(f||(f=Promise))(function(h,p){function g(_){try{b(d.next(_))}catch(m){p(m)}}function y(_){try{b(d.throw(_))}catch(m){p(m)}}function b(_){var m;_.done?h(_.value):(m=_.value,m instanceof f?m:new f(function(x){x(m)})).then(g,y)}b((d=d.apply(l,c||[])).next())})},n=this&&this.__generator||function(l,c){var f,d,h,p,g={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return p={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function y(b){return function(_){return(function(m){if(f)throw new TypeError("Generator is already executing.");for(;p&&(p=0,m[0]&&(g=0)),g;)try{if(f=1,d&&(h=2&m[0]?d.return:m[0]?d.throw||((h=d.return)&&h.call(d),0):d.next)&&!(h=h.call(d,m[1])).done)return h;switch(d=0,h&&(m=[2&m[0],h.value]),m[0]){case 0:case 1:h=m;break;case 4:return g.label++,{value:m[1],done:!1};case 5:g.label++,d=m[1],m=[0];continue;case 7:m=g.ops.pop(),g.trys.pop();continue;default:if(!((h=(h=g.trys).length>0&&h[h.length-1])||m[0]!==6&&m[0]!==2)){g=0;continue}if(m[0]===3&&(!h||m[1]>h[0]&&m[1]=l.length&&(l=void 0),{value:l&&l[d++],done:!l}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(l,c){var f=typeof Symbol=="function"&&l[Symbol.iterator];if(!f)return l;var d,h,p=f.call(l),g=[];try{for(;(c===void 0||c-- >0)&&!(d=p.next()).done;)g.push(d.value)}catch(y){h={error:y}}finally{try{d&&!d.done&&(f=p.return)&&f.call(p)}finally{if(h)throw h.error}}return g},o=this&&this.__spreadArray||function(l,c,f){if(f||arguments.length===2)for(var d,h=0,p=c.length;h{r.exports=function(i,a){Array.isArray(a)||(a=[a]);var o=(function(l){for(var c=-1,f=0;f0?i[o-1]:null;s&&t.test(s.data)&&i.splice(o++,0,e),i.splice.apply(i,[o,0].concat(a));var u=o+a.length;return i[u]&&/[^\r\n]$/.test(i[u].data)&&i.splice(u,0,e),i};var e={data:` -`,type:"whitespace"},t=/[^\r\n]$/;function n(i,a){for(var o=a;o{Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var n=t(4662);e.fromSubscribable=function(i){return new n.Observable(function(a){return i.subscribe(a)})}},6842:function(r,e,t){var n=this&&this.__awaiter||function(p,g,y,b){return new(y||(y=Promise))(function(_,m){function x(E){try{O(b.next(E))}catch(T){m(T)}}function S(E){try{O(b.throw(E))}catch(T){m(T)}}function O(E){var T;E.done?_(E.value):(T=E.value,T instanceof y?T:new y(function(P){P(T)})).then(x,S)}O((b=b.apply(p,g||[])).next())})},i=this&&this.__generator||function(p,g){var y,b,_,m,x={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return m={next:S(0),throw:S(1),return:S(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function S(O){return function(E){return(function(T){if(y)throw new TypeError("Generator is already executing.");for(;m&&(m=0,T[0]&&(x=0)),x;)try{if(y=1,b&&(_=2&T[0]?b.return:T[0]?b.throw||((_=b.return)&&_.call(b),0):b.next)&&!(_=_.call(b,T[1])).done)return _;switch(b=0,_&&(T=[2&T[0],_.value]),T[0]){case 0:case 1:_=T;break;case 4:return x.label++,{value:T[1],done:!1};case 5:x.label++,b=T[1],T=[0];continue;case 7:T=x.ops.pop(),x.trys.pop();continue;default:if(!((_=(_=x.trys).length>0&&_[_.length-1])||T[0]!==6&&T[0]!==2)){x=0;continue}if(T[0]===3&&(!_||T[1]>_[0]&&T[1]<_[3])){x.label=T[1];break}if(T[0]===6&&x.label<_[1]){x.label=_[1],_=T;break}if(_&&x.label<_[2]){x.label=_[2],x.ops.push(T);break}_[2]&&x.ops.pop(),x.trys.pop();continue}T=g.call(p,x)}catch(P){T=[6,P],b=0}finally{y=_=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}})([O,E])}}},a=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var o=a(t(7589)),s=t(9691),u=t(4883),l=(function(){function p(g){var y=g.create,b=y===void 0?function(q,W,$){return n(H,void 0,void 0,function(){return i(this,function(J){switch(J.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,J.sent()]}})})}:y,_=g.destroy,m=_===void 0?function(q){return n(H,void 0,void 0,function(){return i(this,function(W){switch(W.label){case 0:return[4,Promise.resolve()];case 1:return[2,W.sent()]}})})}:_,x=g.validateOnAcquire,S=x===void 0?function(q,W){return!0}:x,O=g.validateOnRelease,E=O===void 0?function(q){return!0}:O,T=g.installIdleObserver,P=T===void 0?function(q,W){}:T,I=g.removeIdleObserver,k=I===void 0?function(q){}:I,L=g.config,B=L===void 0?o.default.defaultConfig():L,j=g.log,z=j===void 0?u.Logger.noOp():j,H=this;this._create=b,this._destroy=m,this._validateOnAcquire=S,this._validateOnRelease=E,this._installIdleObserver=P,this._removeIdleObserver=k,this._maxSize=B.maxSize,this._acquisitionTimeout=B.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=z,this._closed=!1}return p.prototype.acquire=function(g,y,b){return n(this,void 0,void 0,function(){var _,m,x=this;return i(this,function(S){switch(S.label){case 0:return _=y.asKey(),(m=this._acquireRequests)[_]==null&&(m[_]=[]),[4,new Promise(function(O,E){var T=setTimeout(function(){var I=m[_];if(I!=null&&(m[_]=I.filter(function(B){return B!==P})),!P.isCompleted()){var k=x.activeResourceCount(y),L=x.has(y)?x._pools[_].length:0;P.reject((0,s.newError)("Connection acquisition timed out in ".concat(x._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(k,", Idle conn count = ").concat(L,".")))}},x._acquisitionTimeout);typeof T=="object"&&T.unref();var P=new d(_,g,b,O,E,T,x._log);m[_].push(P),x._processPendingAcquireRequests(y)})];case 1:return[2,S.sent()]}})})},p.prototype.purge=function(g){return n(this,void 0,void 0,function(){return i(this,function(y){switch(y.label){case 0:return[4,this._purgeKey(g.asKey())];case 1:return[2,y.sent()]}})})},p.prototype.apply=function(g,y){var b=g.asKey();b in this._pools&&this._pools[b].apply(y)},p.prototype.close=function(){return n(this,void 0,void 0,function(){var g=this;return i(this,function(y){switch(y.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(b){return n(g,void 0,void 0,function(){return i(this,function(_){switch(_.label){case 0:return[4,this._purgeKey(b)];case 1:return[2,_.sent()]}})})})).then()];case 1:return[2,y.sent()]}})})},p.prototype.keepAll=function(g){return n(this,void 0,void 0,function(){var y,b,_,m=this;return i(this,function(x){switch(x.label){case 0:return y=g.map(function(S){return S.asKey()}),b=Object.keys(this._pools),_=b.filter(function(S){return!y.includes(S)}),[4,Promise.all(_.map(function(S){return n(m,void 0,void 0,function(){return i(this,function(O){switch(O.label){case 0:return[4,this._purgeKey(S)];case 1:return[2,O.sent()]}})})})).then()];case 1:return[2,x.sent()]}})})},p.prototype.has=function(g){return g.asKey()in this._pools},p.prototype.activeResourceCount=function(g){var y;return(y=this._activeResourceCounts[g.asKey()])!==null&&y!==void 0?y:0},p.prototype._getOrInitializePoolFor=function(g){var y=this._pools[g];return y==null&&(y=new h,this._pools[g]=y,this._pendingCreates[g]=0),y},p.prototype._acquire=function(g,y,b){return n(this,void 0,void 0,function(){var _,m,x,S,O,E,T,P=this;return i(this,function(I){switch(I.label){case 0:if(this._closed)throw(0,s.newError)("Pool is closed, it is no more able to serve requests.");if(_=y.asKey(),m=this._getOrInitializePoolFor(_),b)return[3,10];I.label=1;case 1:if(!(m.length>0))return[3,10];if((x=m.pop())==null)return[3,1];c(_,this._activeResourceCounts),this._removeIdleObserver!=null&&this._removeIdleObserver(x),S=!1,I.label=2;case 2:return I.trys.push([2,4,,6]),[4,this._validateOnAcquire(g,x)];case 3:return S=I.sent(),[3,6];case 4:return O=I.sent(),f(_,this._activeResourceCounts),m.removeInUse(x),[4,this._destroy(x)];case 5:throw I.sent(),O;case 6:return S?(this._log.isDebugEnabled()&&this._log.debug("".concat(x," acquired from the pool ").concat(_)),[2,{resource:x,pool:m}]):[3,7];case 7:return f(_,this._activeResourceCounts),m.removeInUse(x),[4,this._destroy(x)];case 8:I.sent(),I.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&this.activeResourceCount(y)+this._pendingCreates[_]>=this._maxSize)return[2,{resource:null,pool:m}];this._pendingCreates[_]=this._pendingCreates[_]+1,I.label=11;case 11:return I.trys.push([11,,15,16]),this.activeResourceCount(y)+m.length>=this._maxSize&&b?(T=m.pop())==null?[3,13]:(this._removeIdleObserver!=null&&this._removeIdleObserver(T),m.removeInUse(T),[4,this._destroy(T)]):[3,13];case 12:I.sent(),I.label=13;case 13:return[4,this._create(g,y,function(k,L){return n(P,void 0,void 0,function(){return i(this,function(B){switch(B.label){case 0:return[4,this._release(k,L,m)];case 1:return[2,B.sent()]}})})})];case 14:return E=I.sent(),m.pushInUse(E),c(_,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(E," created for the pool ").concat(_)),[3,16];case 15:return this._pendingCreates[_]=this._pendingCreates[_]-1,[7];case 16:return[2,{resource:E,pool:m}]}})})},p.prototype._release=function(g,y,b){return n(this,void 0,void 0,function(){var _,m=this;return i(this,function(x){switch(x.label){case 0:_=g.asKey(),x.label=1;case 1:return x.trys.push([1,,9,10]),b.isActive()?[4,this._validateOnRelease(y)]:[3,6];case 2:return x.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(y," destroyed and can't be released to the pool ").concat(_," because it is not functional")),b.removeInUse(y),[4,this._destroy(y)]);case 3:return x.sent(),[3,5];case 4:this._installIdleObserver!=null&&this._installIdleObserver(y,{onError:function(S){m._log.debug("Idle connection ".concat(y," destroyed because of error: ").concat(S));var O=m._pools[_];O!=null&&(m._pools[_]=O.filter(function(E){return E!==y}),O.removeInUse(y)),m._destroy(y).catch(function(){})}}),b.push(y),this._log.isDebugEnabled()&&this._log.debug("".concat(y," released to the pool ").concat(_)),x.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(y," destroyed and can't be released to the pool ").concat(_," because pool has been purged")),b.removeInUse(y),[4,this._destroy(y)];case 7:x.sent(),x.label=8;case 8:return[3,10];case 9:return f(_,this._activeResourceCounts),this._processPendingAcquireRequests(g),[7];case 10:return[2]}})})},p.prototype._purgeKey=function(g){return n(this,void 0,void 0,function(){var y,b,_;return i(this,function(m){switch(m.label){case 0:if(y=this._pools[g],b=[],y==null)return[3,2];for(;y.length>0;)(_=y.pop())!=null&&(this._removeIdleObserver!=null&&this._removeIdleObserver(_),b.push(this._destroy(_)));return y.close(),delete this._pools[g],[4,Promise.all(b)];case 1:m.sent(),m.label=2;case 2:return[2]}})})},p.prototype._processPendingAcquireRequests=function(g){var y=this,b=g.asKey(),_=this._acquireRequests[b];if(_!=null){var m=_.shift();m!=null?this._acquire(m.context,g,m.requireNew).catch(function(x){return m.reject(x),{resource:null,pool:null}}).then(function(x){var S=x.resource,O=x.pool;S!=null&&O!=null?m.isCompleted()?y._release(g,S,O).catch(function(E){y._log.isDebugEnabled()&&y._log.debug("".concat(S," could not be release back to the pool. Cause: ").concat(E))}):m.resolve(S):m.isCompleted()||(y._acquireRequests[b]==null&&(y._acquireRequests[b]=[]),y._acquireRequests[b].unshift(m))}).catch(function(x){return m.reject(x)}):delete this._acquireRequests[b]}},p})();function c(p,g){var y,b=(y=g[p])!==null&&y!==void 0?y:0;g[p]=b+1}function f(p,g){var y,b=((y=g[p])!==null&&y!==void 0?y:0)-1;b>0?g[p]=b:delete g[p]}var d=(function(){function p(g,y,b,_,m,x,S){this._key=g,this._context=y,this._resolve=_,this._reject=m,this._timeoutId=x,this._log=S,this._completed=!1,this._config=b??{}}return Object.defineProperty(p.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"requireNew",{get:function(){var g;return(g=this._config.requireNew)!==null&&g!==void 0&&g},enumerable:!1,configurable:!0}),p.prototype.isCompleted=function(){return this._completed},p.prototype.resolve=function(g){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(g," acquired from the pool ").concat(this._key)),this._resolve(g))},p.prototype.reject=function(g){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(g))},p})(),h=(function(){function p(){this._active=!0,this._elements=[],this._elementsInUse=new Set}return p.prototype.isActive=function(){return this._active},p.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},p.prototype.filter=function(g){return this._elements=this._elements.filter(g),this},p.prototype.apply=function(g){this._elements.forEach(g),this._elementsInUse.forEach(g)},Object.defineProperty(p.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),p.prototype.pop=function(){var g=this._elements.pop();return g!=null&&this._elementsInUse.add(g),g},p.prototype.push=function(g){return this._elementsInUse.delete(g),this._elements.push(g)},p.prototype.pushInUse=function(g){this._elementsInUse.add(g)},p.prototype.removeInUse=function(g){this._elementsInUse.delete(g)},p})();e.default=l},6872:function(r,e){var t=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.InternalConfig=e.Config=void 0;var n=function(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0};e.Config=n;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return t(o,a),o})(n);e.InternalConfig=i},6890:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(d){for(var h,p=1,g=arguments.length;p{Object.defineProperty(e,"__esModule",{value:!0}),e.lastValueFrom=void 0;var n=t(2823);e.lastValueFrom=function(i,a){var o=typeof a=="object";return new Promise(function(s,u){var l,c=!1;i.subscribe({next:function(f){l=f,c=!0},error:u,complete:function(){c?s(l):o?s(a.defaultValue):u(new n.EmptyError)}})})}},6902:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var n=t(983);e.flatMap=n.mergeMap},6931:r=>{r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6985:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var n=t(4662);e.scheduleArray=function(i,a){return new n.Observable(function(o){var s=0;return a.schedule(function(){s===i.length?o.complete():(o.next(i[s++]),o.closed||this.schedule())})})}},6995:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(S,O,E,T){T===void 0&&(T=E);var P=Object.getOwnPropertyDescriptor(O,E);P&&!("get"in P?!O.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return O[E]}}),Object.defineProperty(S,T,P)}:function(S,O,E,T){T===void 0&&(T=E),S[T]=O[E]}),i=this&&this.__setModuleDefault||(Object.create?function(S,O){Object.defineProperty(S,"default",{enumerable:!0,value:O})}:function(S,O){S.default=O}),a=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var O={};if(S!=null)for(var E in S)E!=="default"&&Object.prototype.hasOwnProperty.call(S,E)&&n(O,S,E);return i(O,S),O};Object.defineProperty(e,"__esModule",{value:!0}),e.pool=e.boltAgent=e.objectUtil=e.resolver=e.serverAddress=e.urlUtil=e.logger=e.transactionExecutor=e.txConfig=e.connectionHolder=e.constants=e.bookmarks=e.observer=e.temporalUtil=e.util=void 0;var o=a(t(6587));e.util=o;var s=a(t(5022));e.temporalUtil=s;var u=a(t(2696));e.observer=u;var l=a(t(9730));e.bookmarks=l;var c=a(t(326));e.constants=c;var f=a(t(3618));e.connectionHolder=f;var d=a(t(754));e.txConfig=d;var h=a(t(6189));e.transactionExecutor=h;var p=a(t(4883));e.logger=p;var g=a(t(407));e.urlUtil=g;var y=a(t(7509));e.serverAddress=y;var b=a(t(9470));e.resolver=b;var _=a(t(93));e.objectUtil=_;var m=a(t(3488));e.boltAgent=m;var x=a(t(2906));e.pool=x},7021:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNATURES=void 0;var n=t(9305),i=n.internal.constants,a=i.ACCESS_MODE_READ,o=i.FETCH_ALL,s=n.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});e.SIGNATURES=u;var l=(function(){function m(x,S,O){this.signature=x,this.fields=S,this.toString=O}return m.init=function(x,S){return new m(1,[x,S],function(){return"INIT ".concat(x," {...}")})},m.run=function(x,S){return new m(16,[x,S],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S))})},m.pullAll=function(){return p},m.reset=function(){return g},m.hello=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T=Object.assign({user_agent:x},S);return O&&(T.routing=O),E&&(T.patch_bolt=E),new m(1,[T],function(){return"HELLO {user_agent: '".concat(x,"', ...}")})},m.hello5x1=function(x,S){S===void 0&&(S=null);var O={user_agent:x};return S&&(O.routing=S),new m(1,[O],function(){return"HELLO {user_agent: '".concat(x,"', ...}")})},m.hello5x2=function(x,S,O){S===void 0&&(S=null),O===void 0&&(O=null);var E={user_agent:x};return d(E,S),O&&(E.routing=O),new m(1,[E],function(){return"HELLO ".concat(n.json.stringify(E))})},m.hello5x3=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T={};return x&&(T.user_agent=x),S&&(T.bolt_agent={product:S.product,platform:S.platform,language:S.language,language_details:S.languageDetails}),d(T,O),E&&(T.routing=E),new m(1,[T],function(){return"HELLO ".concat(n.json.stringify(T))})},m.hello5x5=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T={};return x&&(T.user_agent=x),S&&(T.bolt_agent={product:S.product,platform:S.platform,language:S.language,language_details:S.languageDetails}),h(T,O),E&&(T.routing=E),new m(1,[T],function(){return"HELLO ".concat(n.json.stringify(T))})},m.logon=function(x){return new m(106,[x],function(){return"LOGON { ... }"})},m.logoff=function(){return new m(107,[],function(){return"LOGOFF"})},m.begin=function(x){var S=x===void 0?{}:x,O=c(S.bookmarks,S.txConfig,S.database,S.mode,S.impersonatedUser,S.notificationFilter);return new m(17,[O],function(){return"BEGIN ".concat(n.json.stringify(O))})},m.begin5x5=function(x){var S=x===void 0?{}:x,O=c(S.bookmarks,S.txConfig,S.database,S.mode,S.impersonatedUser,S.notificationFilter,{appendNotificationFilter:h});return new m(17,[O],function(){return"BEGIN ".concat(n.json.stringify(O))})},m.commit=function(){return y},m.rollback=function(){return b},m.runWithMetadata=function(x,S,O){var E=O===void 0?{}:O,T=c(E.bookmarks,E.txConfig,E.database,E.mode,E.impersonatedUser,E.notificationFilter);return new m(16,[x,S,T],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(T))})},m.runWithMetadata5x5=function(x,S,O){var E=O===void 0?{}:O,T=c(E.bookmarks,E.txConfig,E.database,E.mode,E.impersonatedUser,E.notificationFilter,{appendNotificationFilter:h});return new m(16,[x,S,T],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(T))})},m.goodbye=function(){return _},m.pull=function(x){var S=x===void 0?{}:x,O=S.stmtId,E=O===void 0?-1:O,T=S.n,P=f(E??-1,(T===void 0?o:T)||o);return new m(63,[P],function(){return"PULL ".concat(n.json.stringify(P))})},m.discard=function(x){var S=x===void 0?{}:x,O=S.stmtId,E=O===void 0?-1:O,T=S.n,P=f(E??-1,(T===void 0?o:T)||o);return new m(47,[P],function(){return"DISCARD ".concat(n.json.stringify(P))})},m.telemetry=function(x){var S=x.api,O=(0,n.int)(S);return new m(84,[O],function(){return"TELEMETRY ".concat(O.toString())})},m.route=function(x,S,O){return x===void 0&&(x={}),S===void 0&&(S=[]),O===void 0&&(O=null),new m(102,[x,S,O],function(){return"ROUTE ".concat(n.json.stringify(x)," ").concat(n.json.stringify(S)," ").concat(O)})},m.routeV4x4=function(x,S,O){x===void 0&&(x={}),S===void 0&&(S=[]),O===void 0&&(O={});var E={};return O.databaseName&&(E.db=O.databaseName),O.impersonatedUser&&(E.imp_user=O.impersonatedUser),new m(102,[x,S,E],function(){return"ROUTE ".concat(n.json.stringify(x)," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(E))})},m})();function c(m,x,S,O,E,T,P){var I;P===void 0&&(P={});var k={};return m.isEmpty()||(k.bookmarks=m.values()),x.timeout!==null&&(k.tx_timeout=x.timeout),x.metadata&&(k.tx_metadata=x.metadata),S&&(k.db=s(S,"database")),E&&(k.imp_user=s(E,"impersonatedUser")),O===a&&(k.mode="r"),((I=P.appendNotificationFilter)!==null&&I!==void 0?I:d)(k,T),k}function f(m,x){var S={n:(0,n.int)(x)};return m!==-1&&(S.qid=(0,n.int)(m)),S}function d(m,x){x&&(x.minimumSeverityLevel&&(m.notifications_minimum_severity=x.minimumSeverityLevel),x.disabledCategories&&(m.notifications_disabled_categories=x.disabledCategories),x.disabledClassifications&&(m.notifications_disabled_categories=x.disabledClassifications))}function h(m,x){x&&(x.minimumSeverityLevel&&(m.notifications_minimum_severity=x.minimumSeverityLevel),x.disabledCategories&&(m.notifications_disabled_classifications=x.disabledCategories),x.disabledClassifications&&(m.notifications_disabled_classifications=x.disabledClassifications))}e.default=l;var p=new l(63,[],function(){return"PULL_ALL"}),g=new l(15,[],function(){return"RESET"}),y=new l(18,[],function(){return"COMMIT"}),b=new l(19,[],function(){return"ROLLBACK"}),_=new l(2,[],function(){return"GOODBYE"})},7041:function(r,e,t){var n=this&&this.__awaiter||function(s,u,l,c){return new(l||(l=Promise))(function(f,d){function h(y){try{g(c.next(y))}catch(b){d(b)}}function p(y){try{g(c.throw(y))}catch(b){d(b)}}function g(y){var b;y.done?f(y.value):(b=y.value,b instanceof l?b:new l(function(_){_(b)})).then(h,p)}g((c=c.apply(s,u||[])).next())})},i=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;d&&(d=0,b[0]&&(h=0)),h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]{var n=t(3206);r.exports=function(i,a){var o=n(a),s=[];return(s=s.concat(o(i))).concat(o(null))}},7057:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var n=t(5568);e.ArgumentOutOfRangeError=n.createErrorClass(function(i){return function(){i(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})},7093:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPoint=e.Point=void 0;var n=t(6587),i="__isPoint__",a=(function(){function s(u,l,c,f){this.srid=(0,n.assertNumberOrInteger)(u,"SRID"),this.x=(0,n.assertNumber)(l,"X coordinate"),this.y=(0,n.assertNumber)(c,"Y coordinate"),this.z=f==null?f:(0,n.assertNumber)(f,"Z coordinate"),Object.freeze(this)}return s.prototype.toString=function(){return this.z==null||isNaN(this.z)?"Point{srid=".concat(o(this.srid),", x=").concat(o(this.x),", y=").concat(o(this.y),"}"):"Point{srid=".concat(o(this.srid),", x=").concat(o(this.x),", y=").concat(o(this.y),", z=").concat(o(this.z),"}")},s})();function o(s){return Number.isInteger(s)?s.toString()+".0":s.toString()}e.Point=a,Object.defineProperty(a.prototype,i,{value:!0,enumerable:!1,configurable:!1,writable:!1}),e.isPoint=function(s){return s!=null&&s[i]===!0}},7101:r=>{r.exports=function(e){return!(!e||typeof e=="string")&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String"))}},7110:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0,e.executeSchedule=function(t,n,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!1);var s=n.schedule(function(){i(),o?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(s),!o)return s}},7168:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c};Object.defineProperty(e,"__esModule",{value:!0}),e.structure=e.v2=e.v1=void 0;var o=a(t(5361));e.v1=o;var s=a(t(2072));e.v2=s;var u=a(t(7665));e.structure=u,e.default=s},7174:function(r,e,t){var n=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBuffer=void 0;var i=n(t(45));e.BaseBuffer=i.default,e.default=i.default},7192:r=>{r.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7210:function(r,e,t){var n=this&&this.__values||function(f){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&f[d],p=0;if(h)return h.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&p>=f.length&&(f=void 0),{value:f&&f[p++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var i=t(8014),a=t(7843),o=t(3111),s=t(7479),u=t(7961),l=t(1107),c=t(7110);e.bufferTime=function(f){for(var d,h,p=[],g=1;g=0?c.executeSchedule(x,y,T,b,!0):O=!0,T();var P=o.createOperatorSubscriber(x,function(I){var k,L,B=S.slice();try{for(var j=n(B),z=j.next();!z.done;z=j.next()){var H=z.value,q=H.buffer;q.push(I),_<=q.length&&E(H)}}catch(W){k={error:W}}finally{try{z&&!z.done&&(L=j.return)&&L.call(j)}finally{if(k)throw k.error}}},function(){for(;S!=null&&S.length;)x.next(S.shift().buffer);P==null||P.unsubscribe(),x.complete(),x.unsubscribe()},void 0,function(){return S=null});m.subscribe(P)})}},7220:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var n=t(1637),i=t(8918);e.publishBehavior=function(a){return function(o){var s=new n.BehaviorSubject(a);return new i.ConnectableObservable(o,function(){return s})}}},7245:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TestTools=e.Immediate=void 0;var t,n=1,i={};function a(o){return o in i&&(delete i[o],!0)}e.Immediate={setImmediate:function(o){var s=n++;return i[s]=!0,t||(t=Promise.resolve()),t.then(function(){return a(s)&&o()}),s},clearImmediate:function(o){a(o)}},e.TestTools={pending:function(){return Object.keys(i).length}}},7264:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(I){for(var k,L=1,B=arguments.length;L0&&j[j.length-1])||J[0]!==6&&J[0]!==2)){H=0;continue}if(J[0]===3&&(!j||J[1]>j[0]&&J[1]0||L===0?L:L<0?Number.MAX_SAFE_INTEGER:k}function P(I,k){var L=parseInt(I,10);if(L>0||L===l.FETCH_ALL)return L;if(L===0||L<0)throw new Error("The fetch size can only be a positive value or ".concat(l.FETCH_ALL," for ALL. However fetchSize = ").concat(L));return k}e.Driver=E,e.default=E},7286:function(r,e,t){var n=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var n=t(983),i=t(6640);e.mergeAll=function(a){return a===void 0&&(a=1/0),n.mergeMap(i.identity,a)}},7315:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var n=t(3413),i=t(9155);e.reportUnhandledError=function(a){i.timeoutProvider.setTimeout(function(){var o=n.config.onUnhandledError;if(!o)throw a;o(a)})}},7331:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,a=Object.keys;e.argsArgArrayOrObject=function(o){if(o.length===1){var s=o[0];if(t(s))return{args:s,keys:null};if((l=s)&&typeof l=="object"&&n(l)===i){var u=a(s);return{args:u.map(function(c){return s[c]}),keys:u}}}var l;return{args:o,keys:null}}},7372:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var n=t(7843),i=t(3111),a=t(9445),o=t(1342);e.skipUntil=function(s){return n.operate(function(u,l){var c=!1,f=i.createOperatorSubscriber(l,function(){f==null||f.unsubscribe(),c=!0},o.noop);a.innerFrom(s).subscribe(f),u.subscribe(i.createOperatorSubscriber(l,function(d){return c&&l.next(d)}))})}},7428:function(r,e,t){var n=this&&this.__extends||(function(){var ce=function(pe,fe){return ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,de){se.__proto__=de}||function(se,de){for(var ge in de)Object.prototype.hasOwnProperty.call(de,ge)&&(se[ge]=de[ge])},ce(pe,fe)};return function(pe,fe){if(typeof fe!="function"&&fe!==null)throw new TypeError("Class extends value "+String(fe)+" is not a constructor or null");function se(){this.constructor=pe}ce(pe,fe),pe.prototype=fe===null?Object.create(fe):(se.prototype=fe.prototype,new se)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(ce){for(var pe,fe=1,se=arguments.length;fe0&&de[de.length-1])||Ce[0]!==6&&Ce[0]!==2)){Oe=0;continue}if(Ce[0]===3&&(!de||Ce[1]>de[0]&&Ce[1]=ce.length&&(ce=void 0),{value:ce&&ce[se++],done:!ce}}};throw new TypeError(pe?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(ce,pe){var fe=typeof Symbol=="function"&&ce[Symbol.iterator];if(!fe)return ce;var se,de,ge=fe.call(ce),Oe=[];try{for(;(pe===void 0||pe-- >0)&&!(se=ge.next()).done;)Oe.push(se.value)}catch(ke){de={error:ke}}finally{try{se&&!se.done&&(fe=ge.return)&&fe.call(ge)}finally{if(de)throw de.error}}return Oe},d=this&&this.__importDefault||function(ce){return ce&&ce.__esModule?ce:{default:ce}};Object.defineProperty(e,"__esModule",{value:!0});var h=t(9305),p=s(t(206)),g=t(7452),y=d(t(4132)),b=d(t(8987)),_=t(4455),m=t(7721),x=t(6781),S=h.error.SERVICE_UNAVAILABLE,O=h.error.SESSION_EXPIRED,E=h.internal.bookmarks.Bookmarks,T=h.internal.constants,P=T.ACCESS_MODE_READ,I=T.ACCESS_MODE_WRITE,k=T.BOLT_PROTOCOL_V3,L=T.BOLT_PROTOCOL_V4_0,B=T.BOLT_PROTOCOL_V4_4,j=T.BOLT_PROTOCOL_V5_1,z="Neo.ClientError.Database.DatabaseNotFound",H="Neo.ClientError.Transaction.InvalidBookmark",q="Neo.ClientError.Transaction.InvalidBookmarkMixture",W="Neo.ClientError.Security.AuthorizationExpired",$="Neo.ClientError.Statement.ArgumentError",J="Neo.ClientError.Request.Invalid",X="Neo.ClientError.Statement.TypeError",Z="N/A",ue=null,re=(0,h.int)(3e4),ne=(function(ce){function pe(fe){var se=fe.id,de=fe.address,ge=fe.routingContext,Oe=fe.hostNameResolver,ke=fe.config,De=fe.log,Ne=fe.userAgent,Ce=fe.boltAgent,Y=fe.authTokenManager,Q=fe.routingTablePurgeDelay,ie=fe.newPool,we=ce.call(this,{id:se,config:ke,log:De,userAgent:Ne,boltAgent:Ce,authTokenManager:Y,newPool:ie},function(Ee){return u(we,void 0,void 0,function(){var Me,Ie;return l(this,function(Ye){switch(Ye.label){case 0:return Me=m.createChannelConnection,Ie=[Ee,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,Me.apply(void 0,Ie.concat([Ye.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return we._routingContext=i(i({},ge),{address:de.toString()}),we._seedRouter=de,we._rediscovery=new p.default(we._routingContext),we._loadBalancingStrategy=new _.LeastConnectedLoadBalancingStrategy(we._connectionPool),we._hostNameResolver=Oe,we._dnsResolver=new g.HostNameResolver,we._log=De,we._useSeedRouter=!0,we._routingTableRegistry=new le(Q?(0,h.int)(Q):re),we._refreshRoutingTable=x.functional.reuseOngoingRequest(we._refreshRoutingTable,we),we._withSSR=0,we._withoutSSR=0,we}return n(pe,ce),pe.prototype._createConnectionErrorHandler=function(){return new m.ConnectionErrorHandler(O)},pe.prototype._handleUnavailability=function(fe,se,de){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(se," for database '").concat(de,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),this.forget(se,de||ue),fe},pe.prototype._handleSecurityError=function(fe,se,de,ge){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(se," for database '").concat(ge,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),ce.prototype._handleSecurityError.call(this,fe,se,de,ge)},pe.prototype._handleWriteFailure=function(fe,se,de){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(se," for database '").concat(de,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),this.forgetWriter(se,de||ue),(0,h.newError)("No longer possible to write to server at "+se,O,fe)},pe.prototype.acquireConnection=function(fe){var se=fe===void 0?{}:fe,de=se.accessMode,ge=se.database,Oe=se.bookmarks,ke=se.impersonatedUser,De=se.onDatabaseNameResolved,Ne=se.auth,Ce=se.homeDb;return u(this,void 0,void 0,function(){var Y,Q,ie,we,Ee,Me=this;return l(this,function(Ie){switch(Ie.label){case 0:return Y={database:ge||ue},Q=new m.ConnectionErrorHandler(O,function(Ye,ot){return Me._handleUnavailability(Ye,ot,Y.database)},function(Ye,ot){return Me._handleWriteFailure(Ye,ot,Ce??Y.database)},function(Ye,ot,mt){return Me._handleSecurityError(Ye,ot,mt,Y.database)}),this.SSREnabled()&&Ce!==void 0&&ge===""?!(we=this._routingTableRegistry.get(Ce,function(){return new p.RoutingTable({database:Ce})}))||we.isStaleFor(de)?[3,2]:[4,this.getConnectionFromRoutingTable(we,Ne,de,Q)]:[3,2];case 1:if(ie=Ie.sent(),this.SSREnabled())return[2,ie];ie.release(),Ie.label=2;case 2:return[4,this._freshRoutingTable({accessMode:de,database:Y.database,bookmarks:Oe,impersonatedUser:ke,auth:Ne,onDatabaseNameResolved:function(Ye){Y.database=Y.database||Ye,De&&De(Ye)}})];case 3:return Ee=Ie.sent(),[2,this.getConnectionFromRoutingTable(Ee,Ne,de,Q)]}})})},pe.prototype.getConnectionFromRoutingTable=function(fe,se,de,ge){return u(this,void 0,void 0,function(){var Oe,ke,De,Ne;return l(this,function(Ce){switch(Ce.label){case 0:if(de===P)ke=this._loadBalancingStrategy.selectReader(fe.readers),Oe="read";else{if(de!==I)throw(0,h.newError)("Illegal mode "+de);ke=this._loadBalancingStrategy.selectWriter(fe.writers),Oe="write"}if(!ke)throw(0,h.newError)("Failed to obtain connection towards ".concat(Oe," server. Known routing table is: ").concat(fe),O);Ce.label=1;case 1:return Ce.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:se},ke)];case 2:return De=Ce.sent(),se?[4,this._verifyStickyConnection({auth:se,connection:De,address:ke})]:[3,4];case 3:return Ce.sent(),[2,De];case 4:return[2,new m.DelegateConnection(De,ge)];case 5:throw Ne=Ce.sent(),ge.handleAndTransformError(Ne,ke);case 6:return[2]}})})},pe.prototype._hasProtocolVersion=function(fe){return u(this,void 0,void 0,function(){var se,de,ge,Oe,ke,De;return l(this,function(Ne){switch(Ne.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:se=Ne.sent(),ge=0,Ne.label=2;case 2:if(!(ge=L})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsTransactionConfig=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=k})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsUserImpersonation=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=B})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsSessionAuth=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=j})];case 1:return[2,fe.sent()]}})})},pe.prototype.getNegotiatedProtocolVersion=function(){var fe=this;return new Promise(function(se,de){fe._hasProtocolVersion(se).catch(de)})},pe.prototype.verifyAuthentication=function(fe){var se=fe.database,de=fe.accessMode,ge=fe.auth;return u(this,void 0,void 0,function(){var Oe=this;return l(this,function(ke){return[2,this._verifyAuthentication({auth:ge,getAddress:function(){return u(Oe,void 0,void 0,function(){var De,Ne,Ce;return l(this,function(Y){switch(Y.label){case 0:return De={database:se||ue},[4,this._freshRoutingTable({accessMode:de,database:De.database,auth:ge,onDatabaseNameResolved:function(Q){De.database=De.database||Q}})];case 1:if(Ne=Y.sent(),(Ce=de===I?Ne.writers:Ne.readers).length===0)throw(0,h.newError)("No servers available for database '".concat(De.database,"' with access mode '").concat(de,"'"),S);return[2,Ce[0]]}})})}})]})})},pe.prototype.verifyConnectivityAndGetServerInfo=function(fe){var se=fe.database,de=fe.accessMode;return u(this,void 0,void 0,function(){var ge,Oe,ke,De,Ne,Ce,Y,Q,ie,we,Ee;return l(this,function(Me){switch(Me.label){case 0:return ge={database:se||ue},[4,this._freshRoutingTable({accessMode:de,database:ge.database,onDatabaseNameResolved:function(Ie){ge.database=ge.database||Ie}})];case 1:Oe=Me.sent(),ke=de===I?Oe.writers:Oe.readers,De=(0,h.newError)("No servers available for database '".concat(ge.database,"' with access mode '").concat(de,"'"),S),Me.label=2;case 2:Me.trys.push([2,9,10,11]),Ne=c(ke),Ce=Ne.next(),Me.label=3;case 3:if(Ce.done)return[3,8];Y=Ce.value,Me.label=4;case 4:return Me.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:Y})];case 5:return[2,Me.sent()];case 6:return Q=Me.sent(),De=Q,[3,7];case 7:return Ce=Ne.next(),[3,3];case 8:return[3,11];case 9:return ie=Me.sent(),we={error:ie},[3,11];case 10:try{Ce&&!Ce.done&&(Ee=Ne.return)&&Ee.call(Ne)}finally{if(we)throw we.error}return[7];case 11:throw De}})})},pe.prototype.forget=function(fe,se){this._routingTableRegistry.apply(se,{applyWhenExists:function(de){return de.forget(fe)}}),this._connectionPool.purge(fe).catch(function(){})},pe.prototype.forgetWriter=function(fe,se){this._routingTableRegistry.apply(se,{applyWhenExists:function(de){return de.forgetWriter(fe)}})},pe.prototype._freshRoutingTable=function(fe){var se=fe===void 0?{}:fe,de=se.accessMode,ge=se.database,Oe=se.bookmarks,ke=se.impersonatedUser,De=se.onDatabaseNameResolved,Ne=se.auth,Ce=this._routingTableRegistry.get(ge,function(){return new p.RoutingTable({database:ge})});return Ce.isStaleFor(de)?(this._log.info('Routing table is stale for database: "'.concat(ge,'" and access mode: "').concat(de,'": ').concat(Ce)),this._refreshRoutingTable(Ce,Oe,ke,Ne).then(function(Y){return De(Y.database),Y})):Ce},pe.prototype._refreshRoutingTable=function(fe,se,de,ge){var Oe=fe.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(Oe,fe,se,de,ge):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(Oe,fe,se,de,ge)},pe.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Ce,Y,Q,ie;return l(this,function(we){switch(we.label){case 0:return ke=[],[4,this._fetchRoutingTableUsingSeedRouter(ke,this._seedRouter,se,de,ge,Oe)];case 1:return De=f.apply(void 0,[we.sent(),2]),Ne=De[0],Ce=De[1],Ne?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(fe,se,de,ge,Oe)];case 3:Y=f.apply(void 0,[we.sent(),2]),Q=Y[0],ie=Y[1],Ne=Q,Ce=ie||Ce,we.label=4;case 4:return[4,this._applyRoutingTableIfPossible(se,Ne,Ce)];case 5:return[2,we.sent()]}})})},pe.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Ce;return l(this,function(Y){switch(Y.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(fe,se,de,ge,Oe)];case 1:return ke=f.apply(void 0,[Y.sent(),2]),De=ke[0],Ne=ke[1],De?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(fe,this._seedRouter,se,de,ge,Oe)];case 2:Ce=f.apply(void 0,[Y.sent(),2]),De=Ce[0],Ne=Ce[1],Y.label=3;case 3:return[4,this._applyRoutingTableIfPossible(se,De,Ne)];case 4:return[2,Y.sent()]}})})},pe.prototype._fetchRoutingTableUsingKnownRouters=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Ce;return l(this,function(Y){switch(Y.label){case 0:return[4,this._fetchRoutingTable(fe,se,de,ge,Oe)];case 1:return ke=f.apply(void 0,[Y.sent(),2]),De=ke[0],Ne=ke[1],De?[2,[De,null]]:(Ce=fe.length-1,pe._forgetRouter(se,fe,Ce),[2,[null,Ne]])}})})},pe.prototype._fetchRoutingTableUsingSeedRouter=function(fe,se,de,ge,Oe,ke){return u(this,void 0,void 0,function(){var De,Ne;return l(this,function(Ce){switch(Ce.label){case 0:return[4,this._resolveSeedRouter(se)];case 1:return De=Ce.sent(),Ne=De.filter(function(Y){return fe.indexOf(Y)<0}),[4,this._fetchRoutingTable(Ne,de,ge,Oe,ke)];case 2:return[2,Ce.sent()]}})})},pe.prototype._resolveSeedRouter=function(fe){return u(this,void 0,void 0,function(){var se,de,ge=this;return l(this,function(Oe){switch(Oe.label){case 0:return[4,this._hostNameResolver.resolve(fe)];case 1:return se=Oe.sent(),[4,Promise.all(se.map(function(ke){return ge._dnsResolver.resolve(ke)}))];case 2:return de=Oe.sent(),[2,[].concat.apply([],de)]}})})},pe.prototype._fetchRoutingTable=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke=this;return l(this,function(De){return[2,fe.reduce(function(Ne,Ce,Y){return u(ke,void 0,void 0,function(){var Q,ie,we,Ee,Me,Ie,Ye;return l(this,function(ot){switch(ot.label){case 0:return[4,Ne];case 1:return Q=f.apply(void 0,[ot.sent(),1]),(ie=Q[0])?[2,[ie,null]]:(we=Y-1,pe._forgetRouter(se,fe,we),[4,this._createSessionForRediscovery(Ce,de,ge,Oe)]);case 2:if(Ee=f.apply(void 0,[ot.sent(),2]),Me=Ee[0],Ie=Ee[1],!Me)return[3,8];ot.label=3;case 3:return ot.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(Me,se.database,Ce,ge)];case 4:return[2,[ot.sent(),null]];case 5:return Ye=ot.sent(),[2,this._handleRediscoveryError(Ye,Ce)];case 6:return Me.close(),[7];case 7:return[3,9];case 8:return[2,[null,Ie]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},pe.prototype._createSessionForRediscovery=function(fe,se,de,ge){return u(this,void 0,void 0,function(){var Oe,ke,De,Ne,Ce,Y=this;return l(this,function(Q){switch(Q.label){case 0:return Q.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:ge},fe)];case 1:return Oe=Q.sent(),ge?[4,this._verifyStickyConnection({auth:ge,connection:Oe,address:fe})]:[3,3];case 2:Q.sent(),Q.label=3;case 3:return ke=m.ConnectionErrorHandler.create({errorCode:O,handleSecurityError:function(ie,we,Ee){return Y._handleSecurityError(ie,we,Ee)}}),De=Oe._sticky?new m.DelegateConnection(Oe):new m.DelegateConnection(Oe,ke),Ne=new y.default(De),Oe.protocol().version<4?[2,[new h.Session({mode:I,bookmarks:E.empty(),connectionProvider:Ne}),null]]:[2,[new h.Session({mode:P,database:"system",bookmarks:se,connectionProvider:Ne,impersonatedUser:de}),null]];case 4:return Ce=Q.sent(),[2,this._handleRediscoveryError(Ce,fe)];case 5:return[2]}})})},pe.prototype._handleRediscoveryError=function(fe,se){if((function(de){return[z,H,q,$,J,X,Z].includes(de.code)})(fe)||(function(de){var ge;return((ge=de.code)===null||ge===void 0?void 0:ge.startsWith("Neo.ClientError.Security."))&&![W].includes(de.code)})(fe))throw fe;if(fe.code==="Neo.ClientError.Procedure.ProcedureNotFound")throw(0,h.newError)("Server at ".concat(se.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),S,fe);return this._log.warn("unable to fetch routing table because of an error ".concat(fe)),[null,fe]},pe.prototype._applyRoutingTableIfPossible=function(fe,se,de){return u(this,void 0,void 0,function(){return l(this,function(ge){switch(ge.label){case 0:if(!se)throw(0,h.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(fe),S,de);return se.writers.length===0&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(se)];case 1:return ge.sent(),[2,se]}})})},pe.prototype._updateRoutingTable=function(fe){return u(this,void 0,void 0,function(){return l(this,function(se){switch(se.label){case 0:return[4,this._connectionPool.keepAll(fe.allServers())];case 1:return se.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(fe),this._log.info("Updated routing table ".concat(fe)),[2]}})})},pe._forgetRouter=function(fe,se,de){var ge=se[de];fe&&ge&&fe.forgetRouter(ge)},pe.prototype._channelSsrCallback=function(fe,se){if(se==="OPEN")fe===!0?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else{if(se!=="CLOSE")throw(0,h.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");fe===!0?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},pe.prototype.SSREnabled=function(){return this._withSSR>0&&this._withoutSSR===0},pe})(b.default);e.default=ne;var le=(function(){function ce(pe){this._tables=new Map,this._routingTablePurgeDelay=pe}return ce.prototype.register=function(pe){return this._tables.set(pe.database,pe),this},ce.prototype.apply=function(pe,fe){var se=fe===void 0?{}:fe,de=se.applyWhenExists,ge=se.applyWhenDontExists,Oe=ge===void 0?function(){}:ge;return this._tables.has(pe)?de(this._tables.get(pe)):typeof pe=="string"||pe===null?Oe():this._forEach(de),this},ce.prototype.get=function(pe,fe){return this._tables.has(pe)?this._tables.get(pe):typeof fe=="function"?fe():fe},ce.prototype.removeExpired=function(){var pe=this;return this._removeIf(function(fe){return fe.isExpiredFor(pe._routingTablePurgeDelay)})},ce.prototype._forEach=function(pe){var fe,se;try{for(var de=c(this._tables),ge=de.next();!ge.done;ge=de.next())pe(f(ge.value,2)[1])}catch(Oe){fe={error:Oe}}finally{try{ge&&!ge.done&&(se=de.return)&&se.call(de)}finally{if(fe)throw fe.error}}return this},ce.prototype._remove=function(pe){return this._tables.delete(pe),this},ce.prototype._removeIf=function(pe){var fe,se;try{for(var de=c(this._tables),ge=de.next();!ge.done;ge=de.next()){var Oe=f(ge.value,2),ke=Oe[0];pe(Oe[1])&&this._remove(ke)}}catch(De){fe={error:De}}finally{try{ge&&!ge.done&&(se=de.return)&&se.call(de)}finally{if(fe)throw fe.error}}return this},ce})()},7441:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var n=t(7800),i=t(7843),a=t(3111);e.dematerialize=function(){return i.operate(function(o,s){o.subscribe(a.createOperatorSubscriber(s,function(u){return n.observeNotification(u,s)}))})}},7449:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(c){for(var f,d=1,h=arguments.length;d0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y},a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0});var o=t(7168),s=t(9305),u=a(t(7518)),l=a(t(5045));e.default=n(n(n({},u.default),l.default),{createNodeTransformer:function(c){return u.default.createNodeTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("Node",4,f.size);var d=i(f.fields,4),h=d[0],p=d[1],g=d[2],y=d[3];return new s.Node(h,p,g,y)}})},createRelationshipTransformer:function(c){return u.default.createRelationshipTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("Relationship",8,f.size);var d=i(f.fields,8),h=d[0],p=d[1],g=d[2],y=d[3],b=d[4],_=d[5],m=d[6],x=d[7];return new s.Relationship(h,p,g,y,b,_,m,x)}})},createUnboundRelationshipTransformer:function(c){return u.default.createUnboundRelationshipTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("UnboundRelationship",4,f.size);var d=i(f.fields,4),h=d[0],p=d[1],g=d[2],y=d[3];return new s.UnboundRelationship(h,p,g,y)}})}})},7452:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__exportStar||function(l,c){for(var f in l)f==="default"||Object.prototype.hasOwnProperty.call(c,f)||n(c,l,f)},a=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.alloc=e.ChannelConfig=void 0,i(t(3951),e),i(t(373),e);var o=t(2481);Object.defineProperty(e,"ChannelConfig",{enumerable:!0,get:function(){return a(o).default}});var s=t(5319);Object.defineProperty(e,"alloc",{enumerable:!0,get:function(){return s.alloc}});var u=t(3473);Object.defineProperty(e,"utf8",{enumerable:!0,get:function(){return a(u).default}})},7479:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0,e.arrRemove=function(t,n){if(t){var i=t.indexOf(n);0<=i&&t.splice(i,1)}}},7509:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c};Object.defineProperty(e,"__esModule",{value:!0}),e.ServerAddress=void 0;var o=t(6587),s=a(t(407)),u=(function(){function l(c,f,d,h){this._host=(0,o.assertString)(c,"host"),this._resolved=f!=null?(0,o.assertString)(f,"resolved"):null,this._port=(0,o.assertNumber)(d,"port"),this._hostPort=h,this._stringValue=f!=null?"".concat(h,"(").concat(f,")"):"".concat(h)}return l.prototype.host=function(){return this._host},l.prototype.resolvedHost=function(){return this._resolved!=null?this._resolved:this._host},l.prototype.port=function(){return this._port},l.prototype.resolveWith=function(c){return new l(this._host,c,this._port,this._hostPort)},l.prototype.asHostPort=function(){return this._hostPort},l.prototype.asKey=function(){return this._hostPort},l.prototype.toString=function(){return this._stringValue},l.fromUrl=function(c){var f=s.parseDatabaseUrl(c);return new l(f.host,null,f.port,f.hostAndPort)},l})();e.ServerAddress=u},7518:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var n=t(7843),i=t(3111);e.refCount=function(){return n.operate(function(a,o){var s=null;a._refCount++;var u=i.createOperatorSubscriber(o,void 0,void 0,void 0,function(){if(!a||a._refCount<=0||0<--a._refCount)s=null;else{var l=a._connection,c=s;s=null,!l||c&&l!==c||l.unsubscribe(),o.unsubscribe()}});a.subscribe(u),u.closed||(s=a.connect())})}},7579:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.connectable=void 0;var n=t(2483),i=t(4662),a=t(9353),o={connector:function(){return new n.Subject},resetOnDisconnect:!0};e.connectable=function(s,u){u===void 0&&(u=o);var l=null,c=u.connector,f=u.resetOnDisconnect,d=f===void 0||f,h=c(),p=new i.Observable(function(g){return h.subscribe(g)});return p.connect=function(){return l&&!l.closed||(l=a.defer(function(){return s}).subscribe(h),d&&l.add(function(){return h=c()})),l},p}},7589:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=void 0;var t=100;e.DEFAULT_MAX_SIZE=t;var n=6e4;e.DEFAULT_ACQUISITION_TIMEOUT=n;var i=(function(){function s(u,l){this.maxSize=a(u,t),this.acquisitionTimeout=a(l,n)}return s.defaultConfig=function(){return new s(t,n)},s.fromDriverConfig=function(u){return new s(o(u.maxConnectionPoolSize)?u.maxConnectionPoolSize:t,o(u.connectionAcquisitionTimeout)?u.connectionAcquisitionTimeout:n)},s})();function a(s,u){return o(s)?s:u}function o(s){return s===0||s!=null}e.default=i},7601:function(r,e,t){var n=this&&this.__read||function(l,c){var f=typeof Symbol=="function"&&l[Symbol.iterator];if(!f)return l;var d,h,p=f.call(l),g=[];try{for(;(c===void 0||c-- >0)&&!(d=p.next()).done;)g.push(d.value)}catch(y){h={error:y}}finally{try{d&&!d.done&&(f=p.return)&&f.call(p)}finally{if(h)throw h.error}}return g},i=this&&this.__spreadArray||function(l,c){for(var f=0,d=c.length,h=l.length;f0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0,e.createInvalidObservableTypeError=function(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},7629:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var n=t(1018);e.isPromise=function(i){return n.isFunction(i==null?void 0:i.then)}},7640:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var n=t(7961),i=t(8941),a=t(4092);e.throttleTime=function(o,s,u){s===void 0&&(s=n.asyncScheduler);var l=a.timer(o,s);return i.throttle(function(){return l},u)}},7661:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var n=t(7843),i=t(1983);e.expand=function(a,o,s){return o===void 0&&(o=1/0),o=(o||0)<1?1/0:o,n.operate(function(u,l){return i.mergeInternals(u,l,a,o,void 0,!0,s)})}},7665:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.verifyStructSize=e.Structure=void 0;var n=t(9305),i=n.error.PROTOCOL_ERROR,a=(function(){function o(s,u){this.signature=s,this.fields=u}return Object.defineProperty(o.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),o.prototype.toString=function(){for(var s="",u=0;u0&&(s+=", "),s+=this.fields[u];return"Structure("+this.signature+", ["+s+"])"},o})();e.Structure=a,e.verifyStructSize=function(o,s,u){if(s!==u)throw(0,n.newError)("Wrong struct size for ".concat(o,", expected ").concat(s," but was ").concat(u),i)},e.default=a},7666:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(c,f,d,h){h===void 0&&(h=d);var p=Object.getOwnPropertyDescriptor(f,d);p&&!("get"in p?!f.__esModule:p.writable||p.configurable)||(p={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(c,h,p)}:function(c,f,d,h){h===void 0&&(h=d),c[h]=f[d]}),i=this&&this.__exportStar||function(c,f){for(var d in c)d==="default"||Object.prototype.hasOwnProperty.call(f,d)||n(f,c,d)},a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.RawRoutingTable=e.BoltProtocol=void 0;var o=a(t(8731)),s=a(t(6544)),u=a(t(9054)),l=a(t(7790));i(t(9014),e),e.BoltProtocol=u.default,e.RawRoutingTable=l.default,e.default={handshake:o.default,create:s.default}},7714:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var n=t(7843),i=t(3111);function a(o,s,u){var l=u==="index";return function(c,f){var d=0;c.subscribe(i.createOperatorSubscriber(f,function(h){var p=d++;o.call(s,h,p,c)&&(f.next(l?p:h),f.complete())},function(){f.next(l?-1:void 0),f.complete()}))}}e.find=function(o,s){return n.operate(a(o,s,"value"))},e.createFind=a},7721:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(f,d,h,p){p===void 0&&(p=h);var g=Object.getOwnPropertyDescriptor(d,h);g&&!("get"in g?!d.__esModule:g.writable||g.configurable)||(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(f,p,g)}:function(f,d,h,p){p===void 0&&(p=h),f[p]=d[h]}),i=this&&this.__setModuleDefault||(Object.create?function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}:function(f,d){f.default=d}),a=this&&this.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var h in f)h!=="default"&&Object.prototype.hasOwnProperty.call(f,h)&&n(d,f,h);return i(d,f),d},o=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.createChannelConnection=e.ConnectionErrorHandler=e.DelegateConnection=e.ChannelConnection=e.Connection=void 0;var s=o(t(6385));e.Connection=s.default;var u=a(t(8031));e.ChannelConnection=u.default,Object.defineProperty(e,"createChannelConnection",{enumerable:!0,get:function(){return u.createChannelConnection}});var l=o(t(9857));e.DelegateConnection=l.default;var c=o(t(2363));e.ConnectionErrorHandler=c.default,e.default=s.default},7740:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pairs=void 0;var n=t(4917);e.pairs=function(i,a){return n.from(Object.entries(i),a)}},7790:function(r,e,t){var n=this&&this.__extends||(function(){var l=function(c,f){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(d[p]=h[p])},l(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function d(){this.constructor=c}l(c,f),c.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}})(),i=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),i(t(9305));var a=(function(){function l(){}return l.ofRecord=function(c){return c===null?l.ofNull():new u(c)},l.ofMessageResponse=function(c){return c===null?l.ofNull():new o(c)},l.ofNull=function(){return new s},Object.defineProperty(l.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),l})();e.default=a;var o=(function(l){function c(f){var d=l.call(this)||this;return d._response=f,d}return n(c,l),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return this._response===null},enumerable:!1,configurable:!0}),c})(a),s=(function(l){function c(){return l!==null&&l.apply(this,arguments)||this}return n(c,l),Object.defineProperty(c.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),c})(a),u=(function(l){function c(f){var d=l.call(this)||this;return d._record=f,d}return n(c,l),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return this._record===null},enumerable:!1,configurable:!0}),c})(a)},7800:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var n,i=t(8616),a=t(1004),o=t(1103),s=t(1018);(n=e.NotificationKind||(e.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=(function(){function c(f,d,h){this.kind=f,this.value=d,this.error=h,this.hasValue=f==="N"}return c.prototype.observe=function(f){return l(this,f)},c.prototype.do=function(f,d,h){var p=this,g=p.kind,y=p.value,b=p.error;return g==="N"?f==null?void 0:f(y):g==="E"?d==null?void 0:d(b):h==null?void 0:h()},c.prototype.accept=function(f,d,h){var p;return s.isFunction((p=f)===null||p===void 0?void 0:p.next)?this.observe(f):this.do(f,d,h)},c.prototype.toObservable=function(){var f=this,d=f.kind,h=f.value,p=f.error,g=d==="N"?a.of(h):d==="E"?o.throwError(function(){return p}):d==="C"?i.EMPTY:0;if(!g)throw new TypeError("Unexpected notification kind "+d);return g},c.createNext=function(f){return new c("N",f)},c.createError=function(f){return new c("E",void 0,f)},c.createComplete=function(){return c.completeNotification},c.completeNotification=new c("C"),c})();function l(c,f){var d,h,p,g=c,y=g.kind,b=g.value,_=g.error;if(typeof y!="string")throw new TypeError('Invalid notification, missing "kind"');y==="N"?(d=f.next)===null||d===void 0||d.call(f,b):y==="E"?(h=f.error)===null||h===void 0||h.call(f,_):(p=f.complete)===null||p===void 0||p.call(f)}e.Notification=u,e.observeNotification=l},7815:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var n=t(4662),i=t(9445),a=t(2483),o=t(7843),s=t(3111);e.groupBy=function(u,l,c,f){return o.operate(function(d,h){var p;l&&typeof l!="function"?(c=l.duration,p=l.element,f=l.connector):p=l;var g=new Map,y=function(S){g.forEach(S),S(h)},b=function(S){return y(function(O){return O.error(S)})},_=0,m=!1,x=new s.OperatorSubscriber(h,function(S){try{var O=u(S),E=g.get(O);if(!E){g.set(O,E=f?f():new a.Subject);var T=(I=O,k=E,(L=new n.Observable(function(B){_++;var j=k.subscribe(B);return function(){j.unsubscribe(),--_===0&&m&&x.unsubscribe()}})).key=I,L);if(h.next(T),c){var P=s.createOperatorSubscriber(E,function(){E.complete(),P==null||P.unsubscribe()},void 0,void 0,function(){return g.delete(O)});x.add(i.innerFrom(c(T)).subscribe(P))}}E.next(p?p(S):S)}catch(B){b(B)}var I,k,L},function(){return y(function(S){return S.complete()})},b,function(){return g.clear()},function(){return m=!0,_===0});d.subscribe(x)})}},7835:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var n=t(7843),i=t(3111),a=t(6640),o=t(4092),s=t(9445);e.retry=function(u){var l;u===void 0&&(u=1/0);var c=(l=u&&typeof u=="object"?u:{count:u}).count,f=c===void 0?1/0:c,d=l.delay,h=l.resetOnSuccess,p=h!==void 0&&h;return f<=0?a.identity:n.operate(function(g,y){var b,_=0,m=function(){var x=!1;b=g.subscribe(i.createOperatorSubscriber(y,function(S){p&&(_=0),y.next(S)},void 0,function(S){if(_++{Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var n=t(1018);function i(a){return n.isFunction(a==null?void 0:a.lift)}e.hasLift=i,e.operate=function(a){return function(o){if(i(o))return o.lift(function(s){try{return a(s,this)}catch(u){this.error(u)}});throw new TypeError("Unable to lift unknown Observable type")}}},7853:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.using=void 0;var n=t(4662),i=t(9445),a=t(8616);e.using=function(o,s){return new n.Observable(function(u){var l=o(),c=s(l);return(c?i.innerFrom(c):a.EMPTY).subscribe(u),function(){l&&l.unsubscribe()}})}},7857:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.WRITE=e.READ=e.Driver=void 0;var a=t(9305),o=i(t(3466)),s=a.internal.constants.FETCH_ALL,u=a.driver.READ,l=a.driver.WRITE;e.READ=u,e.WRITE=l;var c=(function(d){function h(){return d!==null&&d.apply(this,arguments)||this}return n(h,d),h.prototype.rxSession=function(p){var g=p===void 0?{}:p,y=g.defaultAccessMode,b=y===void 0?l:y,_=g.bookmarks,m=g.database,x=m===void 0?"":m,S=g.fetchSize,O=g.impersonatedUser,E=g.bookmarkManager,T=g.notificationFilter,P=g.auth;return new o.default({session:this._newSession({defaultAccessMode:b,bookmarkOrBookmarks:_,database:x,impersonatedUser:O,auth:P,reactive:!1,fetchSize:f(S,this._config.fetchSize),bookmarkManager:E,notificationFilter:T,log:this._log}),config:this._config,log:this._log})},h})(a.Driver);function f(d,h){var p=parseInt(d,10);if(p>0||p===s)return p;if(p===0||p<0)throw new Error("The fetch size can only be a positive value or ".concat(s," for ALL. However fetchSize = ").concat(p));return h}e.Driver=c,e.default=c},7961:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var n=t(5267),i=t(5648);e.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),e.async=e.asyncScheduler},7991:(r,e)=>{e.byteLength=function(c){var f=s(c),d=f[0],h=f[1];return 3*(d+h)/4-h},e.toByteArray=function(c){var f,d,h=s(c),p=h[0],g=h[1],y=new i((function(m,x,S){return 3*(x+S)/4-S})(0,p,g)),b=0,_=g>0?p-4:p;for(d=0;d<_;d+=4)f=n[c.charCodeAt(d)]<<18|n[c.charCodeAt(d+1)]<<12|n[c.charCodeAt(d+2)]<<6|n[c.charCodeAt(d+3)],y[b++]=f>>16&255,y[b++]=f>>8&255,y[b++]=255&f;return g===2&&(f=n[c.charCodeAt(d)]<<2|n[c.charCodeAt(d+1)]>>4,y[b++]=255&f),g===1&&(f=n[c.charCodeAt(d)]<<10|n[c.charCodeAt(d+1)]<<4|n[c.charCodeAt(d+2)]>>2,y[b++]=f>>8&255,y[b++]=255&f),y},e.fromByteArray=function(c){for(var f,d=c.length,h=d%3,p=[],g=16383,y=0,b=d-h;yb?b:y+g));return h===1?(f=c[d-1],p.push(t[f>>2]+t[f<<4&63]+"==")):h===2&&(f=(c[d-2]<<8)+c[d-1],p.push(t[f>>10]+t[f>>4&63]+t[f<<2&63]+"=")),p.join("")};for(var t=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=a[o],n[a.charCodeAt(o)]=o;function s(c){var f=c.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=c.indexOf("=");return d===-1&&(d=f),[d,d===f?0:4-d%4]}function u(c){return t[c>>18&63]+t[c>>12&63]+t[c>>6&63]+t[63&c]}function l(c,f,d){for(var h,p=[],g=f;g=f.length&&(f=void 0),{value:f&&f[p++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},a=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.buffer=function(s){return n.operate(function(u,l){var c=[];return u.subscribe(a.createOperatorSubscriber(l,function(f){return c.push(f)},function(){l.next(c),l.complete()})),o.innerFrom(s).subscribe(a.createOperatorSubscriber(l,function(){var f=c;c=[],l.next(f)},i.noop)),function(){c=null}})}},8031:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__awaiter||function(g,y,b,_){return new(b||(b=Promise))(function(m,x){function S(T){try{E(_.next(T))}catch(P){x(P)}}function O(T){try{E(_.throw(T))}catch(P){x(P)}}function E(T){var P;T.done?m(T.value):(P=T.value,P instanceof b?P:new b(function(I){I(P)})).then(S,O)}E((_=_.apply(g,y||[])).next())})},a=this&&this.__generator||function(g,y){var b,_,m,x,S={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return x={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function O(E){return function(T){return(function(P){if(b)throw new TypeError("Generator is already executing.");for(;x&&(x=0,P[0]&&(S=0)),S;)try{if(b=1,_&&(m=2&P[0]?_.return:P[0]?_.throw||((m=_.return)&&m.call(_),0):_.next)&&!(m=m.call(_,P[1])).done)return m;switch(_=0,m&&(P=[2&P[0],m.value]),P[0]){case 0:case 1:m=P;break;case 4:return S.label++,{value:P[1],done:!1};case 5:S.label++,_=P[1],P=[0];continue;case 7:P=S.ops.pop(),S.trys.pop();continue;default:if(!((m=(m=S.trys).length>0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]0?x._ch.setupReceiveTimeout(1e3*B):x._log.info("Server located at ".concat(x._address," supplied an invalid connection receive timeout value (").concat(B,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}T.hints["telemetry.enabled"]===!0&&(x._telemetryDisabledConnection=!1),x.SSREnabledHint=T.hints["ssr.enabled"]}x._ssrCallback((P=x.SSREnabledHint)!==null&&P!==void 0&&P,"OPEN")}O(S)}})})},y.prototype.protocol=function(){return this._protocol},Object.defineProperty(y.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"version",{get:function(){return this._server.version},set:function(b){this._server.version=b},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),y.prototype._handleFatalError=function(b){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||b,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(u.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},y.prototype._setIdle=function(b){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(b)},y.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},y.prototype._queueObserver=function(b){return this._protocol.queueObserverIfProtocolIsNotBroken(b)},y.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},y.prototype.resetAndFlush=function(){var b=this;return new Promise(function(_,m){b._reset({onError:function(x){if(b._isBroken)m(x);else{var S=b._handleProtocolError("Received FAILURE as a response for RESET: ".concat(x));m(S)}},onComplete:function(){_()}})})},y.prototype._resetOnFailure=function(){var b=this;this.isOpen()&&this._reset({onError:function(){b._protocol.resetFailure()},onComplete:function(){b._protocol.resetFailure()}})},y.prototype._reset=function(b){var _=this;if(this._reseting)this._protocol.isLastMessageReset()?this._resetObservers.push(b):this._protocol.reset({onError:function(x){b.onError(x)},onComplete:function(){b.onComplete()}});else{this._resetObservers.push(b),this._reseting=!0;var m=function(x){_._reseting=!1;var S=_._resetObservers;_._resetObservers=[],S.forEach(x)};this._protocol.reset({onError:function(x){m(function(S){return S.onError(x)})},onComplete:function(){m(function(x){return x.onComplete()})}})}},y.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},y.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},y.prototype._handleOngoingRequestsNumberChange=function(b){this._idle||(b===0?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},y.prototype.close=function(){var b;return i(this,void 0,void 0,function(){return a(this,function(_){switch(_.label){case 0:return this._ssrCallback((b=this.SSREnabledHint)!==null&&b!==void 0&&b,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return _.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},y.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},y.prototype._handleProtocolError=function(b){this._protocol.resetFailure(),this._updateCurrentObserver();var _=(0,u.newError)(b,f);return this._handleFatalError(_),_},y})(l.default);e.default=p},8046:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=function(t){return t&&typeof t.length=="number"&&typeof t!="function"}},8079:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var n=t(7961),i=t(7843),a=t(3111);e.debounceTime=function(o,s){return s===void 0&&(s=n.asyncScheduler),i.operate(function(u,l){var c=null,f=null,d=null,h=function(){if(c){c.unsubscribe(),c=null;var g=f;f=null,l.next(g)}};function p(){var g=d+o,y=s.now();if(y{Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var n=t(9445),i=t(3111),a=t(7843);e.catchError=function o(s){return a.operate(function(u,l){var c,f=null,d=!1;f=u.subscribe(i.createOperatorSubscriber(l,void 0,void 0,function(h){c=n.innerFrom(s(h,o(s)(u))),f?(f.unsubscribe(),f=null,c.subscribe(l)):d=!0})),d&&(f.unsubscribe(),f=null,c.subscribe(l))})}},8157:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var n=t(1242),i=t(9247),a=t(1018);e.publishReplay=function(o,s,u,l){u&&!a.isFunction(u)&&(l=u);var c=a.isFunction(u)?u:void 0;return function(f){return i.multicast(new n.ReplaySubject(o,s,l),c)(f)}}},8158:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var n=t(7302);e.concatAll=function(){return n.mergeAll(1)}},8208:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var n=t(2483),i=t(7961),a=t(8014),o=t(7843),s=t(3111),u=t(7479),l=t(1107),c=t(7110);e.windowTime=function(f){for(var d,h,p=[],g=1;g=0?c.executeSchedule(x,y,T,b,!0):O=!0,T();var P=function(k){return S.slice().forEach(k)},I=function(k){P(function(L){var B=L.window;return k(B)}),k(x),x.unsubscribe()};return m.subscribe(s.createOperatorSubscriber(x,function(k){P(function(L){L.window.next(k),_<=++L.seen&&E(L)})},function(){return I(function(k){return k.complete()})},function(k){return I(function(L){return L.error(k)})})),function(){S=null}})}},8239:function(r,e,t){var n=this&&this.__read||function(o,s){var u=typeof Symbol=="function"&&o[Symbol.iterator];if(!u)return o;var l,c,f=u.call(o),d=[];try{for(;(s===void 0||s-- >0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0)&&b.filter(_).length===b.length}function g(b,_){return!(b in _)||_[b]==null||typeof _[b]=="string"}e.clientCertificateProviders=f,Object.freeze(f),e.resolveCertificateProvider=function(b){if(b!=null){if(typeof b=="object"&&"hasUpdate"in b&&"getClientCertificate"in b&&typeof b.getClientCertificate=="function"&&typeof b.hasUpdate=="function")return b;if(d(b)){var _=i({},b);return{getClientCertificate:function(){return _},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(u.stringify(b)))}};var y=(function(){function b(_,m){m===void 0&&(m=!1),this._certificate=_,this._updated=m}return b.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},b.prototype.getClientCertificate=function(){return this._certificate},b.prototype.updateCertificate=function(_){if(!d(_))throw new TypeError("certificate should be ClientCertificate, but got ".concat(u.stringify(_)));this._certificate=i({},_),this._updated=!0},b})()},8275:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var n=t(2823),i=t(783),a=t(846),o=t(378),s=t(4869),u=t(6640);e.first=function(l,c){var f=arguments.length>=2;return function(d){return d.pipe(l?i.filter(function(h,p){return l(h,p,d)}):u.identity,a.take(1),f?o.defaultIfEmpty(c):s.throwIfEmpty(function(){return new n.EmptyError}))}}},8320:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(O){for(var E,T=1,P=arguments.length;T=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var i=t(8616),a=t(7843),o=t(3111);e.takeLast=function(s){return s<=0?function(){return i.EMPTY}:a.operate(function(u,l){var c=[];u.subscribe(o.createOperatorSubscriber(l,function(f){c.push(f),s{Object.defineProperty(e,"__esModule",{value:!0});var n=t(7509);function i(o){return Promise.resolve([o])}var a=(function(){function o(s){this._resolverFunction=s??i}return o.prototype.resolve=function(s){var u=this;return new Promise(function(l){return l(u._resolverFunction(s.asHostPort()))}).then(function(l){if(!Array.isArray(l))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(l));return l.map(function(c){return n.ServerAddress.fromUrl(c)})})},o})();e.default=a},8522:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var n=t(8616),i=t(7843),a=t(3111),o=t(9445),s=t(4092);e.repeat=function(u){var l,c,f=1/0;return u!=null&&(typeof u=="object"?(l=u.count,f=l===void 0?1/0:l,c=u.delay):f=u),f<=0?function(){return n.EMPTY}:i.operate(function(d,h){var p,g=0,y=function(){if(p==null||p.unsubscribe(),p=null,c!=null){var _=typeof c=="number"?s.timer(c):o.innerFrom(c(g)),m=a.createOperatorSubscriber(h,function(){m.unsubscribe(),b()});_.subscribe(m)}else b()},b=function(){var _=!1;p=d.subscribe(a.createOperatorSubscriber(h,void 0,function(){++g{Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;e.argsOrArgArray=function(n){return n.length===1&&t(n[0])?n[0]:n}},8538:function(r,e,t){var n=this&&this.__read||function(o,s){var u=typeof Symbol=="function"&&o[Symbol.iterator];if(!u)return o;var l,c,f=u.call(o),d=[];try{for(;(s===void 0||s-- >0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.bindNodeCallback=void 0;var n=t(1439);e.bindNodeCallback=function(i,a,o){return n.bindCallbackInternals(!0,i,a,o)}},8613:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var n=t(1018);e.isScheduler=function(i){return i&&n.isFunction(i.schedule)}},8616:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var n=t(4662);e.EMPTY=new n.Observable(function(i){return i.complete()}),e.empty=function(i){return i?(function(a){return new n.Observable(function(o){return a.schedule(function(){return o.complete()})})})(i):e.EMPTY}},8624:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var n=t(7843),i=t(6384);e.scan=function(a,o){return n.operate(i.scanInternals(a,o,arguments.length>=2,!0))}},8655:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var n=t(4662),i=t(1342);e.NEVER=new n.Observable(i.noop),e.never=function(){return e.NEVER}},8669:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var n=t(2823),i=t(783),a=t(8330),o=t(4869),s=t(378),u=t(6640);e.last=function(l,c){var f=arguments.length>=2;return function(d){return d.pipe(l?i.filter(function(h,p){return l(h,p,d)}):u.identity,a.takeLast(1),f?s.defaultIfEmpty(c):o.throwIfEmpty(function(){return new n.EmptyError}))}}},8712:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var n=t(3879),i=t(7843);e.switchScan=function(a,o){return i.operate(function(s,u){var l=o;return n.switchMap(function(c,f){return a(l,c,f)},function(c,f){return l=f,f})(s).subscribe(u),function(){l=null}})}},8731:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(7452),i=t(9305),a=["5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"];function o(u,l){return{major:u,minor:l}}function s(u){for(var l=[],c=u[3],f=u[2],d=0;d<=u[1];d++)l.push({major:c,minor:f-d});return l}e.default=function(u,l){return(function(c,f){var d=this;return new Promise(function(h,p){var g=function(y){p(y)};c.onerror=g.bind(d),c._error&&g(c._error),c.onmessage=function(y){try{var b=(function(_,m){var x=[_.readUInt8(),_.readUInt8(),_.readUInt8(),_.readUInt8()];if(x[0]===72&&x[1]===84&&x[2]===84&&x[3]===80)throw m.error("Handshake failed since server responded with HTTP."),(0,i.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+(x[3]+"."+x[2])})(y,f);h({protocolVersion:b,capabilites:0,buffer:y,consumeRemainingBuffer:function(_){y.hasRemaining()&&_(y.readSlice(y.remaining()))}})}catch(_){p(_)}},c.write((function(y){if(y.length>4)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var b=(0,n.alloc)(20);return b.writeInt32(1616949271),y.forEach(function(_){if(_ instanceof Array){var m=_[0],x=m.major,S=(O=m.minor)-_[1].minor;b.writeInt32(S<<16|O<<8|x)}else{x=_.major;var O=_.minor;b.writeInt32(O<<8|x)}}),b.reset(),b})([o(255,1),[o(5,8),o(5,0)],[o(4,4),o(4,2)],o(3,0)]))})})(u,l).then(function(c){return c.protocolVersion===255.1?(function(f,d){for(var h=d.readVarInt(),p=[],g=0;g{Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var n=t(3865),i=t(846),a=t(490),o=t(3218),s=t(983),u=t(9445);e.delayWhen=function l(c,f){return f?function(d){return n.concat(f.pipe(i.take(1),a.ignoreElements()),d.pipe(l(c)))}:s.mergeMap(function(d,h){return u.innerFrom(c(d,h)).pipe(i.take(1),o.mapTo(d))})}},8774:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var n=t(3879),i=t(6640);e.switchAll=function(){return n.switchMap(i.identity)}},8784:(r,e,t)=>{var n=t(4704);r.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},8808:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var n=t(4662),i=t(1964),a=t(1018),o=t(7110);e.scheduleIterable=function(s,u){return new n.Observable(function(l){var c;return o.executeSchedule(l,u,function(){c=s[i.iterator](),o.executeSchedule(l,u,function(){var f,d,h;try{d=(f=c.next()).value,h=f.done}catch(p){return void l.error(p)}h?l.complete():l.next(d)},0,!0)}),function(){return a.isFunction(c==null?void 0:c.return)&&c.return()}})}},8813:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(ma,mu,uo,Vo){Vo===void 0&&(Vo=uo),Object.defineProperty(ma,Vo,{enumerable:!0,get:function(){return mu[uo]}})}:function(ma,mu,uo,Vo){Vo===void 0&&(Vo=uo),ma[Vo]=mu[uo]}),i=this&&this.__exportStar||function(ma,mu){for(var uo in ma)uo==="default"||Object.prototype.hasOwnProperty.call(mu,uo)||n(mu,ma,uo)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var a=t(4662);Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return a.Observable}});var o=t(8918);Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var s=t(3327);Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return s.observable}});var u=t(3110);Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var l=t(2483);Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return l.Subject}});var c=t(1637);Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var f=t(1242);Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var d=t(95);Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var h=t(3692);Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return h.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return h.asapScheduler}});var p=t(7961);Object.defineProperty(e,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var g=t(2886);Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return g.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return g.queueScheduler}});var y=t(3862);Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var b=t(182);Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var _=t(8986);Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return _.Scheduler}});var m=t(8014);Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return m.Subscription}});var x=t(5);Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return x.Subscriber}});var S=t(7800);Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return S.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return S.NotificationKind}});var O=t(2706);Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return O.pipe}});var E=t(1342);Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return E.noop}});var T=t(6640);Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return T.identity}});var P=t(1751);Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return P.isObservable}});var I=t(6894);Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return I.lastValueFrom}});var k=t(9060);Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return k.firstValueFrom}});var L=t(7057);Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return L.ArgumentOutOfRangeError}});var B=t(2823);Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return B.EmptyError}});var j=t(1759);Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return j.NotFoundError}});var z=t(9686);Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return z.ObjectUnsubscribedError}});var H=t(1505);Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return H.SequenceError}});var q=t(1554);Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return q.TimeoutError}});var W=t(5788);Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return W.UnsubscriptionError}});var $=t(2713);Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return $.bindCallback}});var J=t(8561);Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return J.bindNodeCallback}});var X=t(3247);Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return X.combineLatest}});var Z=t(3865);Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return Z.concat}});var ue=t(7579);Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return ue.connectable}});var re=t(9353);Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return re.defer}});var ne=t(8616);Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return ne.empty}});var le=t(9105);Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return le.forkJoin}});var ce=t(4917);Object.defineProperty(e,"from",{enumerable:!0,get:function(){return ce.from}});var pe=t(5337);Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return pe.fromEvent}});var fe=t(347);Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return fe.fromEventPattern}});var se=t(7610);Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return se.generate}});var de=t(4209);Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return de.iif}});var ge=t(6472);Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return ge.interval}});var Oe=t(2833);Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Oe.merge}});var ke=t(8655);Object.defineProperty(e,"never",{enumerable:!0,get:function(){return ke.never}});var De=t(1004);Object.defineProperty(e,"of",{enumerable:!0,get:function(){return De.of}});var Ne=t(6102);Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Ne.onErrorResumeNext}});var Ce=t(7740);Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return Ce.pairs}});var Y=t(1699);Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Y.partition}});var Q=t(5584);Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Q.race}});var ie=t(9376);Object.defineProperty(e,"range",{enumerable:!0,get:function(){return ie.range}});var we=t(1103);Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return we.throwError}});var Ee=t(4092);Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return Ee.timer}});var Me=t(7853);Object.defineProperty(e,"using",{enumerable:!0,get:function(){return Me.using}});var Ie=t(7286);Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Ie.zip}});var Ye=t(1656);Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return Ye.scheduled}});var ot=t(8616);Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return ot.EMPTY}});var mt=t(8655);Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return mt.NEVER}}),i(t(6038),e);var wt=t(3413);Object.defineProperty(e,"config",{enumerable:!0,get:function(){return wt.config}});var Mt=t(3146);Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return Mt.audit}});var Dt=t(3231);Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return Dt.auditTime}});var vt=t(8015);Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return vt.buffer}});var tt=t(5572);Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return tt.bufferCount}});var _e=t(7210);Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return _e.bufferTime}});var Ue=t(8995);Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return Ue.bufferToggle}});var Qe=t(8831);Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return Qe.bufferWhen}});var Ze=t(8118);Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return Ze.catchError}});var nt=t(6625);Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return nt.combineAll}});var It=t(6728);Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return It.combineLatestAll}});var ct=t(8239);Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return ct.combineLatestWith}});var Lt=t(8158);Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return Lt.concatAll}});var Rt=t(9135);Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return Rt.concatMap}});var jt=t(9938);Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return jt.concatMapTo}});var Yt=t(9669);Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Yt.concatWith}});var sr=t(1483);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return sr.connect}});var Ut=t(1038);Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ut.count}});var Rr=t(4461);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Rr.debounce}});var Xt=t(8079);Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Xt.debounceTime}});var Vr=t(378);Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return Vr.defaultIfEmpty}});var Br=t(914);Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Br.delay}});var mr=t(8766);Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return mr.delayWhen}});var ur=t(7441);Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return ur.dematerialize}});var sn=t(5365);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return sn.distinct}});var Fr=t(8937);Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Fr.distinctUntilChanged}});var un=t(9612);Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return un.distinctUntilKeyChanged}});var bn=t(4520);Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return bn.elementAt}});var wn=t(1776);Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return wn.endWith}});var _n=t(5510);Object.defineProperty(e,"every",{enumerable:!0,get:function(){return _n.every}});var xn=t(1551);Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return xn.exhaust}});var on=t(2752);Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return on.exhaustAll}});var Nn=t(4753);Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Nn.exhaustMap}});var fi=t(7661);Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return fi.expand}});var gn=t(783);Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return gn.filter}});var yn=t(3555);Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return yn.finalize}});var Jn=t(7714);Object.defineProperty(e,"find",{enumerable:!0,get:function(){return Jn.find}});var _i=t(9756);Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return _i.findIndex}});var Ir=t(8275);Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Ir.first}});var pa=t(7815);Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return pa.groupBy}});var di=t(490);Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return di.ignoreElements}});var Bt=t(9356);Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Bt.isEmpty}});var hr=t(8669);Object.defineProperty(e,"last",{enumerable:!0,get:function(){return hr.last}});var ei=t(5471);Object.defineProperty(e,"map",{enumerable:!0,get:function(){return ei.map}});var Hn=t(3218);Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Hn.mapTo}});var fs=t(2360);Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return fs.materialize}});var Na=t(1415);Object.defineProperty(e,"max",{enumerable:!0,get:function(){return Na.max}});var ki=t(7302);Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return ki.mergeAll}});var Wr=t(6902);Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return Wr.flatMap}});var Nr=t(983);Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Nr.mergeMap}});var na=t(6586);Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return na.mergeMapTo}});var Fs=t(4408);Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return Fs.mergeScan}});var hu=t(8253);Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return hu.mergeWith}});var ga=t(2669);Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ga.min}});var Us=t(9247);Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Us.multicast}});var Ln=t(5184);Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Ln.observeOn}});var Ii=t(1226);Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Ii.onErrorResumeNextWith}});var Ni=t(1518);Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return Ni.pairwise}});var Pc=t(4912);Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return Pc.pluck}});var vu=t(766);Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return vu.publish}});var ia=t(7220);Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ia.publishBehavior}});var Hl=t(6106);Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Hl.publishLast}});var Md=t(8157);Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return Md.publishReplay}});var Xa=t(5600);Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Xa.raceWith}});var Wl=t(9139);Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Wl.reduce}});var Yl=t(8522);Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Yl.repeat}});var nf=t(6566);Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return nf.repeatWhen}});var Wi=t(7835);Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Wi.retry}});var af=t(9843);Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return af.retryWhen}});var La=t(7561);Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return La.refCount}});var qo=t(1731);Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return qo.sample}});var Gf=t(6086);Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Gf.sampleTime}});var ds=t(8624);Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return ds.scan}});var Mc=t(582);Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Mc.sequenceEqual}});var Xl=t(8977);Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Xl.share}});var ti=t(3133);Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return ti.shareReplay}});var zs=t(5382);Object.defineProperty(e,"single",{enumerable:!0,get:function(){return zs.single}});var Qu=t(3982);Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Qu.skip}});var qs=t(9098);Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return qs.skipLast}});var $l=t(7372);Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return $l.skipUntil}});var of=t(4721);Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return of.skipWhile}});var pu=t(269);Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return pu.startWith}});var _o=t(8960);Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return _o.subscribeOn}});var wo=t(8774);Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return wo.switchAll}});var Vf=t(3879);Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Vf.switchMap}});var sf=t(3274);Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return sf.switchMapTo}});var gu=t(8712);Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return gu.switchScan}});var so=t(846);Object.defineProperty(e,"take",{enumerable:!0,get:function(){return so.take}});var Ju=t(8330);Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return Ju.takeLast}});var Kl=t(4780);Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Kl.takeUntil}});var Go=t(2129);Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Go.takeWhile}});var hs=t(3964);Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return hs.tap}});var jn=t(8941);Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return jn.throttle}});var Zr=t(7640);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Zr.throttleTime}});var Zl=t(4869);Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Zl.throwIfEmpty}});var vs=t(489);Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return vs.timeInterval}});var Dc=t(1554);Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Dc.timeout}});var Oa=t(4862);Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Oa.timeoutWith}});var el=t(6505);Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return el.timestamp}});var uf=t(2343);Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return uf.toArray}});var Ql=t(5477);Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Ql.window}});var tl=t(6746);Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return tl.windowCount}});var wi=t(8208);Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return wi.windowTime}});var Jl=t(6637);Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Jl.windowToggle}});var aa=t(1141);Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return aa.windowWhen}});var yu=t(5442);Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return yu.withLatestFrom}});var lf=t(187);Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return lf.zipAll}});var ya=t(8538);Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ya.zipWith}})},8831:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.bufferWhen=function(s){return n.operate(function(u,l){var c=null,f=null,d=function(){f==null||f.unsubscribe();var h=c;c=[],h&&l.next(h),o.innerFrom(s()).subscribe(f=a.createOperatorSubscriber(l,d,i.noop))};d(),u.subscribe(a.createOperatorSubscriber(l,function(h){return c==null?void 0:c.push(h)},function(){c&&l.next(c),l.complete()},void 0,function(){return c=f=null}))})}},8888:(r,e,t)=>{var n=t(5636).Buffer,i=n.isEncoding||function(p){switch((p=""+p)&&p.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 a(p){var g;switch(this.encoding=(function(y){var b=(function(_){if(!_)return"utf8";for(var m;;)switch(_){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 _;default:if(m)return;_=(""+_).toLowerCase(),m=!0}})(y);if(typeof b!="string"&&(n.isEncoding===i||!i(y)))throw new Error("Unknown encoding: "+y);return b||y})(p),this.encoding){case"utf16le":this.text=u,this.end=l,g=4;break;case"utf8":this.fillLast=s,g=4;break;case"base64":this.text=c,this.end=f,g=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(g)}function o(p){return p<=127?0:p>>5==6?2:p>>4==14?3:p>>3==30?4:p>>6==2?-1:-2}function s(p){var g=this.lastTotal-this.lastNeed,y=(function(b,_){if((192&_[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&_.length>1){if((192&_[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&_.length>2&&(192&_[2])!=128)return b.lastNeed=2,"�"}})(this,p);return y!==void 0?y:this.lastNeed<=p.length?(p.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(p.copy(this.lastChar,g,0,p.length),void(this.lastNeed-=p.length))}function u(p,g){if((p.length-g)%2==0){var y=p.toString("utf16le",g);if(y){var b=y.charCodeAt(y.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",g,p.length-1)}function l(p){var g=p&&p.length?this.write(p):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,y)}return g}function c(p,g){var y=(p.length-g)%3;return y===0?p.toString("base64",g):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",g,p.length-y))}function f(p){var g=p&&p.length?this.write(p):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function d(p){return p.toString(this.encoding)}function h(p){return p&&p.length?this.write(p):""}e.StringDecoder=a,a.prototype.write=function(p){if(p.length===0)return"";var g,y;if(this.lastNeed){if((g=this.fillLast(p))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y=0?(O>0&&(_.lastNeed=O-1),O):--S=0?(O>0&&(_.lastNeed=O-2),O):--S=0?(O>0&&(O===2?O=0:_.lastNeed=O-3),O):0})(this,p,g);if(!this.lastNeed)return p.toString("utf8",g);this.lastTotal=y;var b=p.length-(y-this.lastNeed);return p.copy(this.lastChar,0,b),p.toString("utf8",g,b)},a.prototype.fillLast=function(p){if(this.lastNeed<=p.length)return p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,p.length),this.lastNeed-=p.length}},8917:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,n,i){this.keys=t,this.records=n,this.summary=i}},8918:function(r,e,t){var n=this&&this.__extends||(function(){var c=function(f,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(f,d)};return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function h(){this.constructor=f}c(f,d),f.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var i=t(4662),a=t(8014),o=t(7561),s=t(3111),u=t(7843),l=(function(c){function f(d,h){var p=c.call(this)||this;return p.source=d,p.subjectFactory=h,p._subject=null,p._refCount=0,p._connection=null,u.hasLift(d)&&(p.lift=d.lift),p}return n(f,c),f.prototype._subscribe=function(d){return this.getSubject().subscribe(d)},f.prototype.getSubject=function(){var d=this._subject;return d&&!d.isStopped||(this._subject=this.subjectFactory()),this._subject},f.prototype._teardown=function(){this._refCount=0;var d=this._connection;this._subject=this._connection=null,d==null||d.unsubscribe()},f.prototype.connect=function(){var d=this,h=this._connection;if(!h){h=this._connection=new a.Subscription;var p=this.getSubject();h.add(this.source.subscribe(s.createOperatorSubscriber(p,void 0,function(){d._teardown(),p.complete()},function(g){d._teardown(),p.error(g)},function(){return d._teardown()}))),h.closed&&(this._connection=null,h=a.Subscription.EMPTY)}return h},f.prototype.refCount=function(){return o.refCount()(this)},f})(i.Observable);e.ConnectableObservable=l},8937:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var n=t(6640),i=t(7843),a=t(3111);function o(s,u){return s===u}e.distinctUntilChanged=function(s,u){return u===void 0&&(u=n.identity),s=s??o,i.operate(function(l,c){var f,d=!0;l.subscribe(a.createOperatorSubscriber(c,function(h){var p=u(h);!d&&s(f,p)||(d=!1,f=p,c.next(h))}))})}},8941:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var n=t(7843),i=t(3111),a=t(9445);e.throttle=function(o,s){return n.operate(function(u,l){var c=s??{},f=c.leading,d=f===void 0||f,h=c.trailing,p=h!==void 0&&h,g=!1,y=null,b=null,_=!1,m=function(){b==null||b.unsubscribe(),b=null,p&&(O(),_&&l.complete())},x=function(){b=null,_&&l.complete()},S=function(E){return b=a.innerFrom(o(E)).subscribe(i.createOperatorSubscriber(l,m,x))},O=function(){if(g){g=!1;var E=y;y=null,l.next(E),!_&&S(E)}};u.subscribe(i.createOperatorSubscriber(l,function(E){g=!0,y=E,(!b||b.closed)&&(d?O():S(E))},function(){_=!0,(!(p&&g&&b)||b.closed)&&l.complete()}))})}},8960:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var n=t(7843);e.subscribeOn=function(i,a){return a===void 0&&(a=0),n.operate(function(o,s){s.add(i.schedule(function(){return o.subscribe(s)},a))})}},8977:function(r,e,t){var n=this&&this.__read||function(c,f){var d=typeof Symbol=="function"&&c[Symbol.iterator];if(!d)return c;var h,p,g=d.call(c),y=[];try{for(;(f===void 0||f-- >0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y},i=this&&this.__spreadArray||function(c,f){for(var d=0,h=f.length,p=c.length;d0&&(x=new s.SafeSubscriber({next:function(H){return z.next(H)},error:function(H){P=!0,I(),S=l(k,p,H),z.error(H)},complete:function(){T=!0,I(),S=l(k,y),z.complete()}}),a.innerFrom(B).subscribe(x))})(m)}}},8986:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var n=t(9568),i=(function(){function a(o,s){s===void 0&&(s=a.now),this.schedulerActionCtor=o,this.now=s}return a.prototype.schedule=function(o,s,u){return s===void 0&&(s=0),new this.schedulerActionCtor(this,o).schedule(u,s)},a.now=n.dateTimestampProvider.now,a})();e.Scheduler=i},8987:function(r,e,t){var n=this&&this.__extends||(function(){var S=function(O,E){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var I in P)Object.prototype.hasOwnProperty.call(P,I)&&(T[I]=P[I])},S(O,E)};return function(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=O}S(O,E),O.prototype=E===null?Object.create(E):(T.prototype=E.prototype,new T)}})(),i=this&&this.__awaiter||function(S,O,E,T){return new(E||(E=Promise))(function(P,I){function k(j){try{B(T.next(j))}catch(z){I(z)}}function L(j){try{B(T.throw(j))}catch(z){I(z)}}function B(j){var z;j.done?P(j.value):(z=j.value,z instanceof E?z:new E(function(H){H(z)})).then(k,L)}B((T=T.apply(S,O||[])).next())})},a=this&&this.__generator||function(S,O){var E,T,P,I,k={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return I={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(B){return function(j){return(function(z){if(E)throw new TypeError("Generator is already executing.");for(;I&&(I=0,z[0]&&(k=0)),k;)try{if(E=1,T&&(P=2&z[0]?T.return:z[0]?T.throw||((P=T.return)&&P.call(T),0):T.next)&&!(P=P.call(T,z[1])).done)return P;switch(T=0,P&&(z=[2&z[0],P.value]),z[0]){case 0:case 1:P=z;break;case 4:return k.label++,{value:z[1],done:!1};case 5:k.label++,T=z[1],z=[0];continue;case 7:z=k.ops.pop(),k.trys.pop();continue;default:if(!((P=(P=k.trys).length>0&&P[P.length-1])||z[0]!==6&&z[0]!==2)){k=0;continue}if(z[0]===3&&(!P||z[1]>P[0]&&z[1]0)&&!(T=I.next()).done;)k.push(T.value)}catch(L){P={error:L}}finally{try{T&&!T.done&&(E=I.return)&&E.call(I)}finally{if(P)throw P.error}}return k},s=this&&this.__spreadArray||function(S,O,E){if(E||arguments.length===2)for(var T,P=0,I=O.length;PT)},O.prototype._destroyConnection=function(E){return delete this._openConnections[E.id],E.close()},O.prototype._verifyConnectivityAndGetServerVersion=function(E){var T=E.address;return i(this,void 0,void 0,function(){var P,I;return a(this,function(k){switch(k.label){case 0:return[4,this._connectionPool.acquire({},T)];case 1:P=k.sent(),I=new c.ServerInfo(P.server,P.protocol().version),k.label=2;case 2:return k.trys.push([2,,5,7]),P.protocol().isLastMessageLogon()?[3,4]:[4,P.resetAndFlush()];case 3:k.sent(),k.label=4;case 4:return[3,7];case 5:return[4,P.release()];case 6:return k.sent(),[7];case 7:return[2,I]}})})},O.prototype._verifyAuthentication=function(E){var T=E.getAddress,P=E.auth;return i(this,void 0,void 0,function(){var I,k,L,B,j,z;return a(this,function(H){switch(H.label){case 0:I=[],H.label=1;case 1:return H.trys.push([1,8,9,11]),[4,T()];case 2:return k=H.sent(),[4,this._connectionPool.acquire({auth:P,skipReAuth:!0},k)];case 3:if(L=H.sent(),I.push(L),B=!L.protocol().isLastMessageLogon(),!L.supportsReAuth)throw(0,c.newError)("Driver is connected to a database that does not support user switch.");return B&&L.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:L,auth:P,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return H.sent(),[3,7];case 5:return!B||L.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:P},k,{requireNew:!0})];case 6:(j=H.sent())._sticky=!0,I.push(j),H.label=7;case 7:return[2,!0];case 8:if(z=H.sent(),y.includes(z.code))return[2,!1];throw z;case 9:return[4,Promise.all(I.map(function(q){return q.release()}))];case 10:return H.sent(),[7];case 11:return[2]}})})},O.prototype._verifyStickyConnection=function(E){var T=E.auth,P=E.connection;return E.address,i(this,void 0,void 0,function(){var I,k;return a(this,function(L){switch(L.label){case 0:return I=d.object.equals(T,P.authToken),k=!I,P._sticky=I&&!P.supportsReAuth,k||P._sticky?[4,P.release()]:[3,2];case 1:throw L.sent(),(0,c.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},O.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(T){return T.close()}))];case 2:return E.sent(),[2]}})})},O._installIdleObserverOnConnection=function(E,T){E._setIdle(T)},O._removeIdleObserverOnConnection=function(E){E._unsetIdle()},O.prototype._handleSecurityError=function(E,T,P){return this._authenticationProvider.handleError({connection:P,code:E.code})&&(E.retriable=!0),E.code==="Neo.ClientError.Security.AuthorizationExpired"&&this._connectionPool.apply(T,function(I){I.authToken=null}),P&&P.close().catch(function(){}),E},O})(c.ConnectionProvider);e.default=x},8995:function(r,e,t){var n=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&c[f],h=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&h>=c.length&&(c=void 0),{value:c&&c[h++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var i=t(8014),a=t(7843),o=t(9445),s=t(3111),u=t(1342),l=t(7479);e.bufferToggle=function(c,f){return a.operate(function(d,h){var p=[];o.innerFrom(c).subscribe(s.createOperatorSubscriber(h,function(g){var y=[];p.push(y);var b=new i.Subscription;b.add(o.innerFrom(f(g)).subscribe(s.createOperatorSubscriber(h,function(){l.arrRemove(p,y),h.next(y),b.unsubscribe()},u.noop)))},u.noop)),d.subscribe(s.createOperatorSubscriber(h,function(g){var y,b;try{for(var _=n(p),m=_.next();!m.done;m=_.next())m.value.push(g)}catch(x){y={error:x}}finally{try{m&&!m.done&&(b=_.return)&&b.call(_)}finally{if(y)throw y.error}}},function(){for(;p.length>0;)h.next(p.shift());h.complete()}))})}},9014:function(r,e,t){var n=this&&this.__extends||(function(){var S=function(O,E){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var I in P)Object.prototype.hasOwnProperty.call(P,I)&&(T[I]=P[I])},S(O,E)};return function(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=O}S(O,E),O.prototype=E===null?Object.create(E):(T.prototype=E.prototype,new T)}})(),i=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryObserver=e.ProcedureRouteObserver=e.RouteObserver=e.CompletedObserver=e.FailedObserver=e.ResetObserver=e.LogoffObserver=e.LoginObserver=e.ResultStreamObserver=e.StreamObserver=void 0;var a=t(9305),o=i(t(7790)),s=t(6781),u=a.internal.constants.FETCH_ALL,l=a.error.PROTOCOL_ERROR,c=(function(){function S(){}return S.prototype.onNext=function(O){},S.prototype.onError=function(O){},S.prototype.onCompleted=function(O){},S})();e.StreamObserver=c;var f=(function(S){function O(E){var T=E===void 0?{}:E,P=T.reactive,I=P!==void 0&&P,k=T.moreFunction,L=T.discardFunction,B=T.fetchSize,j=B===void 0?u:B,z=T.beforeError,H=T.afterError,q=T.beforeKeys,W=T.afterKeys,$=T.beforeComplete,J=T.afterComplete,X=T.server,Z=T.highRecordWatermark,ue=Z===void 0?Number.MAX_VALUE:Z,re=T.lowRecordWatermark,ne=re===void 0?Number.MAX_VALUE:re,le=T.enrichMetadata,ce=T.onDb,pe=S.call(this)||this;return pe._fieldKeys=null,pe._fieldLookup=null,pe._head=null,pe._queuedRecords=[],pe._tail=null,pe._error=null,pe._observers=[],pe._meta={},pe._server=X,pe._beforeError=z,pe._afterError=H,pe._beforeKeys=q,pe._afterKeys=W,pe._beforeComplete=$,pe._afterComplete=J,pe._enrichMetadata=le||s.functional.identity,pe._queryId=null,pe._moreFunction=k,pe._discardFunction=L,pe._discard=!1,pe._fetchSize=j,pe._lowRecordWatermark=ne,pe._highRecordWatermark=ue,pe._setState(I?x.READY:x.READY_STREAMING),pe._setupAutoPull(),pe._paused=!1,pe._pulled=!I,pe._haveRecordStreamed=!1,pe._onDb=ce,pe}return n(O,S),O.prototype.pause=function(){this._paused=!0},O.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},O.prototype.onNext=function(E){this._haveRecordStreamed=!0;var T=new a.Record(this._fieldKeys,E,this._fieldLookup);this._observers.some(function(P){return P.onNext})?this._observers.forEach(function(P){P.onNext&&P.onNext(T)}):(this._queuedRecords.push(T),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},O.prototype.onCompleted=function(E){this._state.onSuccess(this,E)},O.prototype.onError=function(E){this._state.onError(this,E)},O.prototype.cancel=function(){this._discard=!0},O.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(x.STREAMING)},O.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(x.SUCCEEDED)},O.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(P.type)){this._setState(x.SUCCEEDED);var I=null;this._beforeComplete&&(I=this._beforeComplete(P));var k=function(){T._tail=P,T._observers.some(function(L){return L.onCompleted})&&T._observers.forEach(function(L){L.onCompleted&&L.onCompleted(P)}),T._afterComplete&&T._afterComplete(P)};I?Promise.resolve(I).then(function(){return k()}):k()}else this.onError((0,a.newError)(`Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got '`.concat(P.type,"'"),l))},O.prototype._handleRunSuccess=function(E,T){var P=this;if(this._fieldKeys===null){if(this._fieldKeys=[],this._fieldLookup={},E.fields&&E.fields.length>0){this._fieldKeys=E.fields;for(var I=0;I{Object.defineProperty(e,"__esModule",{value:!0}),e.fromSubscribable=void 0;var n=t(4662);e.fromSubscribable=function(i){return new n.Observable(function(a){return i.subscribe(a)})}},6842:function(r,e,t){var n=this&&this.__awaiter||function(p,g,y,b){return new(y||(y=Promise))(function(_,m){function x(E){try{O(b.next(E))}catch(T){m(T)}}function S(E){try{O(b.throw(E))}catch(T){m(T)}}function O(E){var T;E.done?_(E.value):(T=E.value,T instanceof y?T:new y(function(P){P(T)})).then(x,S)}O((b=b.apply(p,g||[])).next())})},i=this&&this.__generator||function(p,g){var y,b,_,m,x={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return m={next:S(0),throw:S(1),return:S(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function S(O){return function(E){return(function(T){if(y)throw new TypeError("Generator is already executing.");for(;m&&(m=0,T[0]&&(x=0)),x;)try{if(y=1,b&&(_=2&T[0]?b.return:T[0]?b.throw||((_=b.return)&&_.call(b),0):b.next)&&!(_=_.call(b,T[1])).done)return _;switch(b=0,_&&(T=[2&T[0],_.value]),T[0]){case 0:case 1:_=T;break;case 4:return x.label++,{value:T[1],done:!1};case 5:x.label++,b=T[1],T=[0];continue;case 7:T=x.ops.pop(),x.trys.pop();continue;default:if(!((_=(_=x.trys).length>0&&_[_.length-1])||T[0]!==6&&T[0]!==2)){x=0;continue}if(T[0]===3&&(!_||T[1]>_[0]&&T[1]<_[3])){x.label=T[1];break}if(T[0]===6&&x.label<_[1]){x.label=_[1],_=T;break}if(_&&x.label<_[2]){x.label=_[2],x.ops.push(T);break}_[2]&&x.ops.pop(),x.trys.pop();continue}T=g.call(p,x)}catch(P){T=[6,P],b=0}finally{y=_=0}if(5&T[0])throw T[1];return{value:T[0]?T[1]:void 0,done:!0}})([O,E])}}},a=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0});var o=a(t(7589)),s=t(9691),u=t(4883),l=(function(){function p(g){var y=g.create,b=y===void 0?function(q,W,$){return n(H,void 0,void 0,function(){return i(this,function(J){switch(J.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,J.sent()]}})})}:y,_=g.destroy,m=_===void 0?function(q){return n(H,void 0,void 0,function(){return i(this,function(W){switch(W.label){case 0:return[4,Promise.resolve()];case 1:return[2,W.sent()]}})})}:_,x=g.validateOnAcquire,S=x===void 0?function(q,W){return!0}:x,O=g.validateOnRelease,E=O===void 0?function(q){return!0}:O,T=g.installIdleObserver,P=T===void 0?function(q,W){}:T,I=g.removeIdleObserver,k=I===void 0?function(q){}:I,L=g.config,B=L===void 0?o.default.defaultConfig():L,j=g.log,z=j===void 0?u.Logger.noOp():j,H=this;this._create=b,this._destroy=m,this._validateOnAcquire=S,this._validateOnRelease=E,this._installIdleObserver=P,this._removeIdleObserver=k,this._maxSize=B.maxSize,this._acquisitionTimeout=B.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=z,this._closed=!1}return p.prototype.acquire=function(g,y,b){return n(this,void 0,void 0,function(){var _,m,x=this;return i(this,function(S){switch(S.label){case 0:return _=y.asKey(),(m=this._acquireRequests)[_]==null&&(m[_]=[]),[4,new Promise(function(O,E){var T=setTimeout(function(){var I=m[_];if(I!=null&&(m[_]=I.filter(function(B){return B!==P})),!P.isCompleted()){var k=x.activeResourceCount(y),L=x.has(y)?x._pools[_].length:0;P.reject((0,s.newError)("Connection acquisition timed out in ".concat(x._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(k,", Idle conn count = ").concat(L,".")))}},x._acquisitionTimeout);typeof T=="object"&&T.unref();var P=new d(_,g,b,O,E,T,x._log);m[_].push(P),x._processPendingAcquireRequests(y)})];case 1:return[2,S.sent()]}})})},p.prototype.purge=function(g){return n(this,void 0,void 0,function(){return i(this,function(y){switch(y.label){case 0:return[4,this._purgeKey(g.asKey())];case 1:return[2,y.sent()]}})})},p.prototype.apply=function(g,y){var b=g.asKey();b in this._pools&&this._pools[b].apply(y)},p.prototype.close=function(){return n(this,void 0,void 0,function(){var g=this;return i(this,function(y){switch(y.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(b){return n(g,void 0,void 0,function(){return i(this,function(_){switch(_.label){case 0:return[4,this._purgeKey(b)];case 1:return[2,_.sent()]}})})})).then()];case 1:return[2,y.sent()]}})})},p.prototype.keepAll=function(g){return n(this,void 0,void 0,function(){var y,b,_,m=this;return i(this,function(x){switch(x.label){case 0:return y=g.map(function(S){return S.asKey()}),b=Object.keys(this._pools),_=b.filter(function(S){return!y.includes(S)}),[4,Promise.all(_.map(function(S){return n(m,void 0,void 0,function(){return i(this,function(O){switch(O.label){case 0:return[4,this._purgeKey(S)];case 1:return[2,O.sent()]}})})})).then()];case 1:return[2,x.sent()]}})})},p.prototype.has=function(g){return g.asKey()in this._pools},p.prototype.activeResourceCount=function(g){var y;return(y=this._activeResourceCounts[g.asKey()])!==null&&y!==void 0?y:0},p.prototype._getOrInitializePoolFor=function(g){var y=this._pools[g];return y==null&&(y=new h,this._pools[g]=y,this._pendingCreates[g]=0),y},p.prototype._acquire=function(g,y,b){return n(this,void 0,void 0,function(){var _,m,x,S,O,E,T,P=this;return i(this,function(I){switch(I.label){case 0:if(this._closed)throw(0,s.newError)("Pool is closed, it is no more able to serve requests.");if(_=y.asKey(),m=this._getOrInitializePoolFor(_),b)return[3,10];I.label=1;case 1:if(!(m.length>0))return[3,10];if((x=m.pop())==null)return[3,1];c(_,this._activeResourceCounts),this._removeIdleObserver!=null&&this._removeIdleObserver(x),S=!1,I.label=2;case 2:return I.trys.push([2,4,,6]),[4,this._validateOnAcquire(g,x)];case 3:return S=I.sent(),[3,6];case 4:return O=I.sent(),f(_,this._activeResourceCounts),m.removeInUse(x),[4,this._destroy(x)];case 5:throw I.sent(),O;case 6:return S?(this._log.isDebugEnabled()&&this._log.debug("".concat(x," acquired from the pool ").concat(_)),[2,{resource:x,pool:m}]):[3,7];case 7:return f(_,this._activeResourceCounts),m.removeInUse(x),[4,this._destroy(x)];case 8:I.sent(),I.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&this.activeResourceCount(y)+this._pendingCreates[_]>=this._maxSize)return[2,{resource:null,pool:m}];this._pendingCreates[_]=this._pendingCreates[_]+1,I.label=11;case 11:return I.trys.push([11,,15,16]),this.activeResourceCount(y)+m.length>=this._maxSize&&b?(T=m.pop())==null?[3,13]:(this._removeIdleObserver!=null&&this._removeIdleObserver(T),m.removeInUse(T),[4,this._destroy(T)]):[3,13];case 12:I.sent(),I.label=13;case 13:return[4,this._create(g,y,function(k,L){return n(P,void 0,void 0,function(){return i(this,function(B){switch(B.label){case 0:return[4,this._release(k,L,m)];case 1:return[2,B.sent()]}})})})];case 14:return E=I.sent(),m.pushInUse(E),c(_,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(E," created for the pool ").concat(_)),[3,16];case 15:return this._pendingCreates[_]=this._pendingCreates[_]-1,[7];case 16:return[2,{resource:E,pool:m}]}})})},p.prototype._release=function(g,y,b){return n(this,void 0,void 0,function(){var _,m=this;return i(this,function(x){switch(x.label){case 0:_=g.asKey(),x.label=1;case 1:return x.trys.push([1,,9,10]),b.isActive()?[4,this._validateOnRelease(y)]:[3,6];case 2:return x.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(y," destroyed and can't be released to the pool ").concat(_," because it is not functional")),b.removeInUse(y),[4,this._destroy(y)]);case 3:return x.sent(),[3,5];case 4:this._installIdleObserver!=null&&this._installIdleObserver(y,{onError:function(S){m._log.debug("Idle connection ".concat(y," destroyed because of error: ").concat(S));var O=m._pools[_];O!=null&&(m._pools[_]=O.filter(function(E){return E!==y}),O.removeInUse(y)),m._destroy(y).catch(function(){})}}),b.push(y),this._log.isDebugEnabled()&&this._log.debug("".concat(y," released to the pool ").concat(_)),x.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(y," destroyed and can't be released to the pool ").concat(_," because pool has been purged")),b.removeInUse(y),[4,this._destroy(y)];case 7:x.sent(),x.label=8;case 8:return[3,10];case 9:return f(_,this._activeResourceCounts),this._processPendingAcquireRequests(g),[7];case 10:return[2]}})})},p.prototype._purgeKey=function(g){return n(this,void 0,void 0,function(){var y,b,_;return i(this,function(m){switch(m.label){case 0:if(y=this._pools[g],b=[],y==null)return[3,2];for(;y.length>0;)(_=y.pop())!=null&&(this._removeIdleObserver!=null&&this._removeIdleObserver(_),b.push(this._destroy(_)));return y.close(),delete this._pools[g],[4,Promise.all(b)];case 1:m.sent(),m.label=2;case 2:return[2]}})})},p.prototype._processPendingAcquireRequests=function(g){var y=this,b=g.asKey(),_=this._acquireRequests[b];if(_!=null){var m=_.shift();m!=null?this._acquire(m.context,g,m.requireNew).catch(function(x){return m.reject(x),{resource:null,pool:null}}).then(function(x){var S=x.resource,O=x.pool;S!=null&&O!=null?m.isCompleted()?y._release(g,S,O).catch(function(E){y._log.isDebugEnabled()&&y._log.debug("".concat(S," could not be release back to the pool. Cause: ").concat(E))}):m.resolve(S):m.isCompleted()||(y._acquireRequests[b]==null&&(y._acquireRequests[b]=[]),y._acquireRequests[b].unshift(m))}).catch(function(x){return m.reject(x)}):delete this._acquireRequests[b]}},p})();function c(p,g){var y,b=(y=g[p])!==null&&y!==void 0?y:0;g[p]=b+1}function f(p,g){var y,b=((y=g[p])!==null&&y!==void 0?y:0)-1;b>0?g[p]=b:delete g[p]}var d=(function(){function p(g,y,b,_,m,x,S){this._key=g,this._context=y,this._resolve=_,this._reject=m,this._timeoutId=x,this._log=S,this._completed=!1,this._config=b??{}}return Object.defineProperty(p.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"requireNew",{get:function(){var g;return(g=this._config.requireNew)!==null&&g!==void 0&&g},enumerable:!1,configurable:!0}),p.prototype.isCompleted=function(){return this._completed},p.prototype.resolve=function(g){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(g," acquired from the pool ").concat(this._key)),this._resolve(g))},p.prototype.reject=function(g){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(g))},p})(),h=(function(){function p(){this._active=!0,this._elements=[],this._elementsInUse=new Set}return p.prototype.isActive=function(){return this._active},p.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},p.prototype.filter=function(g){return this._elements=this._elements.filter(g),this},p.prototype.apply=function(g){this._elements.forEach(g),this._elementsInUse.forEach(g)},Object.defineProperty(p.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),p.prototype.pop=function(){var g=this._elements.pop();return g!=null&&this._elementsInUse.add(g),g},p.prototype.push=function(g){return this._elementsInUse.delete(g),this._elements.push(g)},p.prototype.pushInUse=function(g){this._elementsInUse.add(g)},p.prototype.removeInUse=function(g){this._elementsInUse.delete(g)},p})();e.default=l},6872:function(r,e){var t=this&&this.__extends||(function(){var a=function(o,s){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[c]=l[c])},a(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function u(){this.constructor=o}a(o,s),o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.InternalConfig=e.Config=void 0;var n=function(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0};e.Config=n;var i=(function(a){function o(){return a!==null&&a.apply(this,arguments)||this}return t(o,a),o})(n);e.InternalConfig=i},6890:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(d){for(var h,p=1,g=arguments.length;p{Object.defineProperty(e,"__esModule",{value:!0}),e.lastValueFrom=void 0;var n=t(2823);e.lastValueFrom=function(i,a){var o=typeof a=="object";return new Promise(function(s,u){var l,c=!1;i.subscribe({next:function(f){l=f,c=!0},error:u,complete:function(){c?s(l):o?s(a.defaultValue):u(new n.EmptyError)}})})}},6902:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.flatMap=void 0;var n=t(983);e.flatMap=n.mergeMap},6931:r=>{r.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6985:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleArray=void 0;var n=t(4662);e.scheduleArray=function(i,a){return new n.Observable(function(o){var s=0;return a.schedule(function(){s===i.length?o.complete():(o.next(i[s++]),o.closed||this.schedule())})})}},6995:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(S,O,E,T){T===void 0&&(T=E);var P=Object.getOwnPropertyDescriptor(O,E);P&&!("get"in P?!O.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return O[E]}}),Object.defineProperty(S,T,P)}:function(S,O,E,T){T===void 0&&(T=E),S[T]=O[E]}),i=this&&this.__setModuleDefault||(Object.create?function(S,O){Object.defineProperty(S,"default",{enumerable:!0,value:O})}:function(S,O){S.default=O}),a=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var O={};if(S!=null)for(var E in S)E!=="default"&&Object.prototype.hasOwnProperty.call(S,E)&&n(O,S,E);return i(O,S),O};Object.defineProperty(e,"__esModule",{value:!0}),e.pool=e.boltAgent=e.objectUtil=e.resolver=e.serverAddress=e.urlUtil=e.logger=e.transactionExecutor=e.txConfig=e.connectionHolder=e.constants=e.bookmarks=e.observer=e.temporalUtil=e.util=void 0;var o=a(t(6587));e.util=o;var s=a(t(5022));e.temporalUtil=s;var u=a(t(2696));e.observer=u;var l=a(t(9730));e.bookmarks=l;var c=a(t(326));e.constants=c;var f=a(t(3618));e.connectionHolder=f;var d=a(t(754));e.txConfig=d;var h=a(t(6189));e.transactionExecutor=h;var p=a(t(4883));e.logger=p;var g=a(t(407));e.urlUtil=g;var y=a(t(7509));e.serverAddress=y;var b=a(t(9470));e.resolver=b;var _=a(t(93));e.objectUtil=_;var m=a(t(3488));e.boltAgent=m;var x=a(t(2906));e.pool=x},7021:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNATURES=void 0;var n=t(9305),i=n.internal.constants,a=i.ACCESS_MODE_READ,o=i.FETCH_ALL,s=n.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});e.SIGNATURES=u;var l=(function(){function m(x,S,O){this.signature=x,this.fields=S,this.toString=O}return m.init=function(x,S){return new m(1,[x,S],function(){return"INIT ".concat(x," {...}")})},m.run=function(x,S){return new m(16,[x,S],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S))})},m.pullAll=function(){return p},m.reset=function(){return g},m.hello=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T=Object.assign({user_agent:x},S);return O&&(T.routing=O),E&&(T.patch_bolt=E),new m(1,[T],function(){return"HELLO {user_agent: '".concat(x,"', ...}")})},m.hello5x1=function(x,S){S===void 0&&(S=null);var O={user_agent:x};return S&&(O.routing=S),new m(1,[O],function(){return"HELLO {user_agent: '".concat(x,"', ...}")})},m.hello5x2=function(x,S,O){S===void 0&&(S=null),O===void 0&&(O=null);var E={user_agent:x};return d(E,S),O&&(E.routing=O),new m(1,[E],function(){return"HELLO ".concat(n.json.stringify(E))})},m.hello5x3=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T={};return x&&(T.user_agent=x),S&&(T.bolt_agent={product:S.product,platform:S.platform,language:S.language,language_details:S.languageDetails}),d(T,O),E&&(T.routing=E),new m(1,[T],function(){return"HELLO ".concat(n.json.stringify(T))})},m.hello5x5=function(x,S,O,E){O===void 0&&(O=null),E===void 0&&(E=null);var T={};return x&&(T.user_agent=x),S&&(T.bolt_agent={product:S.product,platform:S.platform,language:S.language,language_details:S.languageDetails}),h(T,O),E&&(T.routing=E),new m(1,[T],function(){return"HELLO ".concat(n.json.stringify(T))})},m.logon=function(x){return new m(106,[x],function(){return"LOGON { ... }"})},m.logoff=function(){return new m(107,[],function(){return"LOGOFF"})},m.begin=function(x){var S=x===void 0?{}:x,O=c(S.bookmarks,S.txConfig,S.database,S.mode,S.impersonatedUser,S.notificationFilter);return new m(17,[O],function(){return"BEGIN ".concat(n.json.stringify(O))})},m.begin5x5=function(x){var S=x===void 0?{}:x,O=c(S.bookmarks,S.txConfig,S.database,S.mode,S.impersonatedUser,S.notificationFilter,{appendNotificationFilter:h});return new m(17,[O],function(){return"BEGIN ".concat(n.json.stringify(O))})},m.commit=function(){return y},m.rollback=function(){return b},m.runWithMetadata=function(x,S,O){var E=O===void 0?{}:O,T=c(E.bookmarks,E.txConfig,E.database,E.mode,E.impersonatedUser,E.notificationFilter);return new m(16,[x,S,T],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(T))})},m.runWithMetadata5x5=function(x,S,O){var E=O===void 0?{}:O,T=c(E.bookmarks,E.txConfig,E.database,E.mode,E.impersonatedUser,E.notificationFilter,{appendNotificationFilter:h});return new m(16,[x,S,T],function(){return"RUN ".concat(x," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(T))})},m.goodbye=function(){return _},m.pull=function(x){var S=x===void 0?{}:x,O=S.stmtId,E=O===void 0?-1:O,T=S.n,P=f(E??-1,(T===void 0?o:T)||o);return new m(63,[P],function(){return"PULL ".concat(n.json.stringify(P))})},m.discard=function(x){var S=x===void 0?{}:x,O=S.stmtId,E=O===void 0?-1:O,T=S.n,P=f(E??-1,(T===void 0?o:T)||o);return new m(47,[P],function(){return"DISCARD ".concat(n.json.stringify(P))})},m.telemetry=function(x){var S=x.api,O=(0,n.int)(S);return new m(84,[O],function(){return"TELEMETRY ".concat(O.toString())})},m.route=function(x,S,O){return x===void 0&&(x={}),S===void 0&&(S=[]),O===void 0&&(O=null),new m(102,[x,S,O],function(){return"ROUTE ".concat(n.json.stringify(x)," ").concat(n.json.stringify(S)," ").concat(O)})},m.routeV4x4=function(x,S,O){x===void 0&&(x={}),S===void 0&&(S=[]),O===void 0&&(O={});var E={};return O.databaseName&&(E.db=O.databaseName),O.impersonatedUser&&(E.imp_user=O.impersonatedUser),new m(102,[x,S,E],function(){return"ROUTE ".concat(n.json.stringify(x)," ").concat(n.json.stringify(S)," ").concat(n.json.stringify(E))})},m})();function c(m,x,S,O,E,T,P){var I;P===void 0&&(P={});var k={};return m.isEmpty()||(k.bookmarks=m.values()),x.timeout!==null&&(k.tx_timeout=x.timeout),x.metadata&&(k.tx_metadata=x.metadata),S&&(k.db=s(S,"database")),E&&(k.imp_user=s(E,"impersonatedUser")),O===a&&(k.mode="r"),((I=P.appendNotificationFilter)!==null&&I!==void 0?I:d)(k,T),k}function f(m,x){var S={n:(0,n.int)(x)};return m!==-1&&(S.qid=(0,n.int)(m)),S}function d(m,x){x&&(x.minimumSeverityLevel&&(m.notifications_minimum_severity=x.minimumSeverityLevel),x.disabledCategories&&(m.notifications_disabled_categories=x.disabledCategories),x.disabledClassifications&&(m.notifications_disabled_categories=x.disabledClassifications))}function h(m,x){x&&(x.minimumSeverityLevel&&(m.notifications_minimum_severity=x.minimumSeverityLevel),x.disabledCategories&&(m.notifications_disabled_classifications=x.disabledCategories),x.disabledClassifications&&(m.notifications_disabled_classifications=x.disabledClassifications))}e.default=l;var p=new l(63,[],function(){return"PULL_ALL"}),g=new l(15,[],function(){return"RESET"}),y=new l(18,[],function(){return"COMMIT"}),b=new l(19,[],function(){return"ROLLBACK"}),_=new l(2,[],function(){return"GOODBYE"})},7041:function(r,e,t){var n=this&&this.__awaiter||function(s,u,l,c){return new(l||(l=Promise))(function(f,d){function h(y){try{g(c.next(y))}catch(b){d(b)}}function p(y){try{g(c.throw(y))}catch(b){d(b)}}function g(y){var b;y.done?f(y.value):(b=y.value,b instanceof l?b:new l(function(_){_(b)})).then(h,p)}g((c=c.apply(s,u||[])).next())})},i=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;d&&(d=0,b[0]&&(h=0)),h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]{var n=t(3206);r.exports=function(i,a){var o=n(a),s=[];return(s=s.concat(o(i))).concat(o(null))}},7057:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentOutOfRangeError=void 0;var n=t(5568);e.ArgumentOutOfRangeError=n.createErrorClass(function(i){return function(){i(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})},7093:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPoint=e.Point=void 0;var n=t(6587),i="__isPoint__",a=(function(){function s(u,l,c,f){this.srid=(0,n.assertNumberOrInteger)(u,"SRID"),this.x=(0,n.assertNumber)(l,"X coordinate"),this.y=(0,n.assertNumber)(c,"Y coordinate"),this.z=f==null?f:(0,n.assertNumber)(f,"Z coordinate"),Object.freeze(this)}return s.prototype.toString=function(){return this.z==null||isNaN(this.z)?"Point{srid=".concat(o(this.srid),", x=").concat(o(this.x),", y=").concat(o(this.y),"}"):"Point{srid=".concat(o(this.srid),", x=").concat(o(this.x),", y=").concat(o(this.y),", z=").concat(o(this.z),"}")},s})();function o(s){return Number.isInteger(s)?s.toString()+".0":s.toString()}e.Point=a,Object.defineProperty(a.prototype,i,{value:!0,enumerable:!1,configurable:!1,writable:!1}),e.isPoint=function(s){return s!=null&&s[i]===!0}},7101:r=>{r.exports=function(e){return!(!e||typeof e=="string")&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String"))}},7110:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.executeSchedule=void 0,e.executeSchedule=function(t,n,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!1);var s=n.schedule(function(){i(),o?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(s),!o)return s}},7168:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c};Object.defineProperty(e,"__esModule",{value:!0}),e.structure=e.v2=e.v1=void 0;var o=a(t(5361));e.v1=o;var s=a(t(2072));e.v2=s;var u=a(t(7665));e.structure=u,e.default=s},7174:function(r,e,t){var n=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBuffer=void 0;var i=n(t(45));e.BaseBuffer=i.default,e.default=i.default},7192:r=>{r.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7210:function(r,e,t){var n=this&&this.__values||function(f){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&f[d],p=0;if(h)return h.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&p>=f.length&&(f=void 0),{value:f&&f[p++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferTime=void 0;var i=t(8014),a=t(7843),o=t(3111),s=t(7479),u=t(7961),l=t(1107),c=t(7110);e.bufferTime=function(f){for(var d,h,p=[],g=1;g=0?c.executeSchedule(x,y,T,b,!0):O=!0,T();var P=o.createOperatorSubscriber(x,function(I){var k,L,B=S.slice();try{for(var j=n(B),z=j.next();!z.done;z=j.next()){var H=z.value,q=H.buffer;q.push(I),_<=q.length&&E(H)}}catch(W){k={error:W}}finally{try{z&&!z.done&&(L=j.return)&&L.call(j)}finally{if(k)throw k.error}}},function(){for(;S!=null&&S.length;)x.next(S.shift().buffer);P==null||P.unsubscribe(),x.complete(),x.unsubscribe()},void 0,function(){return S=null});m.subscribe(P)})}},7220:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publishBehavior=void 0;var n=t(1637),i=t(8918);e.publishBehavior=function(a){return function(o){var s=new n.BehaviorSubject(a);return new i.ConnectableObservable(o,function(){return s})}}},7245:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TestTools=e.Immediate=void 0;var t,n=1,i={};function a(o){return o in i&&(delete i[o],!0)}e.Immediate={setImmediate:function(o){var s=n++;return i[s]=!0,t||(t=Promise.resolve()),t.then(function(){return a(s)&&o()}),s},clearImmediate:function(o){a(o)}},e.TestTools={pending:function(){return Object.keys(i).length}}},7264:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(I){for(var k,L=1,B=arguments.length;L0&&j[j.length-1])||J[0]!==6&&J[0]!==2)){H=0;continue}if(J[0]===3&&(!j||J[1]>j[0]&&J[1]0||L===0?L:L<0?Number.MAX_SAFE_INTEGER:k}function P(I,k){var L=parseInt(I,10);if(L>0||L===l.FETCH_ALL)return L;if(L===0||L<0)throw new Error("The fetch size can only be a positive value or ".concat(l.FETCH_ALL," for ALL. However fetchSize = ").concat(L));return k}e.Driver=E,e.default=E},7286:function(r,e,t){var n=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},i=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=void 0;var n=t(983),i=t(6640);e.mergeAll=function(a){return a===void 0&&(a=1/0),n.mergeMap(i.identity,a)}},7315:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportUnhandledError=void 0;var n=t(3413),i=t(9155);e.reportUnhandledError=function(a){i.timeoutProvider.setTimeout(function(){var o=n.config.onUnhandledError;if(!o)throw a;o(a)})}},7331:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.argsArgArrayOrObject=void 0;var t=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,a=Object.keys;e.argsArgArrayOrObject=function(o){if(o.length===1){var s=o[0];if(t(s))return{args:s,keys:null};if((l=s)&&typeof l=="object"&&n(l)===i){var u=a(s);return{args:u.map(function(c){return s[c]}),keys:u}}}var l;return{args:o,keys:null}}},7372:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipUntil=void 0;var n=t(7843),i=t(3111),a=t(9445),o=t(1342);e.skipUntil=function(s){return n.operate(function(u,l){var c=!1,f=i.createOperatorSubscriber(l,function(){f==null||f.unsubscribe(),c=!0},o.noop);a.innerFrom(s).subscribe(f),u.subscribe(i.createOperatorSubscriber(l,function(d){return c&&l.next(d)}))})}},7428:function(r,e,t){var n=this&&this.__extends||(function(){var ce=function(pe,fe){return ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,de){se.__proto__=de}||function(se,de){for(var ge in de)Object.prototype.hasOwnProperty.call(de,ge)&&(se[ge]=de[ge])},ce(pe,fe)};return function(pe,fe){if(typeof fe!="function"&&fe!==null)throw new TypeError("Class extends value "+String(fe)+" is not a constructor or null");function se(){this.constructor=pe}ce(pe,fe),pe.prototype=fe===null?Object.create(fe):(se.prototype=fe.prototype,new se)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(ce){for(var pe,fe=1,se=arguments.length;fe0&&de[de.length-1])||Te[0]!==6&&Te[0]!==2)){Oe=0;continue}if(Te[0]===3&&(!de||Te[1]>de[0]&&Te[1]=ce.length&&(ce=void 0),{value:ce&&ce[se++],done:!ce}}};throw new TypeError(pe?"Object is not iterable.":"Symbol.iterator is not defined.")},f=this&&this.__read||function(ce,pe){var fe=typeof Symbol=="function"&&ce[Symbol.iterator];if(!fe)return ce;var se,de,ge=fe.call(ce),Oe=[];try{for(;(pe===void 0||pe-- >0)&&!(se=ge.next()).done;)Oe.push(se.value)}catch(ke){de={error:ke}}finally{try{se&&!se.done&&(fe=ge.return)&&fe.call(ge)}finally{if(de)throw de.error}}return Oe},d=this&&this.__importDefault||function(ce){return ce&&ce.__esModule?ce:{default:ce}};Object.defineProperty(e,"__esModule",{value:!0});var h=t(9305),p=s(t(206)),g=t(7452),y=d(t(4132)),b=d(t(8987)),_=t(4455),m=t(7721),x=t(6781),S=h.error.SERVICE_UNAVAILABLE,O=h.error.SESSION_EXPIRED,E=h.internal.bookmarks.Bookmarks,T=h.internal.constants,P=T.ACCESS_MODE_READ,I=T.ACCESS_MODE_WRITE,k=T.BOLT_PROTOCOL_V3,L=T.BOLT_PROTOCOL_V4_0,B=T.BOLT_PROTOCOL_V4_4,j=T.BOLT_PROTOCOL_V5_1,z="Neo.ClientError.Database.DatabaseNotFound",H="Neo.ClientError.Transaction.InvalidBookmark",q="Neo.ClientError.Transaction.InvalidBookmarkMixture",W="Neo.ClientError.Security.AuthorizationExpired",$="Neo.ClientError.Statement.ArgumentError",J="Neo.ClientError.Request.Invalid",X="Neo.ClientError.Statement.TypeError",Z="N/A",ue=null,re=(0,h.int)(3e4),ne=(function(ce){function pe(fe){var se=fe.id,de=fe.address,ge=fe.routingContext,Oe=fe.hostNameResolver,ke=fe.config,De=fe.log,Ne=fe.userAgent,Te=fe.boltAgent,Y=fe.authTokenManager,Q=fe.routingTablePurgeDelay,ie=fe.newPool,we=ce.call(this,{id:se,config:ke,log:De,userAgent:Ne,boltAgent:Te,authTokenManager:Y,newPool:ie},function(Ee){return u(we,void 0,void 0,function(){var Me,Ie;return l(this,function(Ye){switch(Ye.label){case 0:return Me=m.createChannelConnection,Ie=[Ee,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,Me.apply(void 0,Ie.concat([Ye.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return we._routingContext=i(i({},ge),{address:de.toString()}),we._seedRouter=de,we._rediscovery=new p.default(we._routingContext),we._loadBalancingStrategy=new _.LeastConnectedLoadBalancingStrategy(we._connectionPool),we._hostNameResolver=Oe,we._dnsResolver=new g.HostNameResolver,we._log=De,we._useSeedRouter=!0,we._routingTableRegistry=new le(Q?(0,h.int)(Q):re),we._refreshRoutingTable=x.functional.reuseOngoingRequest(we._refreshRoutingTable,we),we._withSSR=0,we._withoutSSR=0,we}return n(pe,ce),pe.prototype._createConnectionErrorHandler=function(){return new m.ConnectionErrorHandler(O)},pe.prototype._handleUnavailability=function(fe,se,de){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(se," for database '").concat(de,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),this.forget(se,de||ue),fe},pe.prototype._handleSecurityError=function(fe,se,de,ge){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(se," for database '").concat(ge,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),ce.prototype._handleSecurityError.call(this,fe,se,de,ge)},pe.prototype._handleWriteFailure=function(fe,se,de){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(se," for database '").concat(de,"' because of an error ").concat(fe.code," '").concat(fe.message,"'")),this.forgetWriter(se,de||ue),(0,h.newError)("No longer possible to write to server at "+se,O,fe)},pe.prototype.acquireConnection=function(fe){var se=fe===void 0?{}:fe,de=se.accessMode,ge=se.database,Oe=se.bookmarks,ke=se.impersonatedUser,De=se.onDatabaseNameResolved,Ne=se.auth,Te=se.homeDb;return u(this,void 0,void 0,function(){var Y,Q,ie,we,Ee,Me=this;return l(this,function(Ie){switch(Ie.label){case 0:return Y={database:ge||ue},Q=new m.ConnectionErrorHandler(O,function(Ye,ot){return Me._handleUnavailability(Ye,ot,Y.database)},function(Ye,ot){return Me._handleWriteFailure(Ye,ot,Te??Y.database)},function(Ye,ot,mt){return Me._handleSecurityError(Ye,ot,mt,Y.database)}),this.SSREnabled()&&Te!==void 0&&ge===""?!(we=this._routingTableRegistry.get(Te,function(){return new p.RoutingTable({database:Te})}))||we.isStaleFor(de)?[3,2]:[4,this.getConnectionFromRoutingTable(we,Ne,de,Q)]:[3,2];case 1:if(ie=Ie.sent(),this.SSREnabled())return[2,ie];ie.release(),Ie.label=2;case 2:return[4,this._freshRoutingTable({accessMode:de,database:Y.database,bookmarks:Oe,impersonatedUser:ke,auth:Ne,onDatabaseNameResolved:function(Ye){Y.database=Y.database||Ye,De&&De(Ye)}})];case 3:return Ee=Ie.sent(),[2,this.getConnectionFromRoutingTable(Ee,Ne,de,Q)]}})})},pe.prototype.getConnectionFromRoutingTable=function(fe,se,de,ge){return u(this,void 0,void 0,function(){var Oe,ke,De,Ne;return l(this,function(Te){switch(Te.label){case 0:if(de===P)ke=this._loadBalancingStrategy.selectReader(fe.readers),Oe="read";else{if(de!==I)throw(0,h.newError)("Illegal mode "+de);ke=this._loadBalancingStrategy.selectWriter(fe.writers),Oe="write"}if(!ke)throw(0,h.newError)("Failed to obtain connection towards ".concat(Oe," server. Known routing table is: ").concat(fe),O);Te.label=1;case 1:return Te.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:se},ke)];case 2:return De=Te.sent(),se?[4,this._verifyStickyConnection({auth:se,connection:De,address:ke})]:[3,4];case 3:return Te.sent(),[2,De];case 4:return[2,new m.DelegateConnection(De,ge)];case 5:throw Ne=Te.sent(),ge.handleAndTransformError(Ne,ke);case 6:return[2]}})})},pe.prototype._hasProtocolVersion=function(fe){return u(this,void 0,void 0,function(){var se,de,ge,Oe,ke,De;return l(this,function(Ne){switch(Ne.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:se=Ne.sent(),ge=0,Ne.label=2;case 2:if(!(ge=L})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsTransactionConfig=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=k})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsUserImpersonation=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=B})];case 1:return[2,fe.sent()]}})})},pe.prototype.supportsSessionAuth=function(){return u(this,void 0,void 0,function(){return l(this,function(fe){switch(fe.label){case 0:return[4,this._hasProtocolVersion(function(se){return se>=j})];case 1:return[2,fe.sent()]}})})},pe.prototype.getNegotiatedProtocolVersion=function(){var fe=this;return new Promise(function(se,de){fe._hasProtocolVersion(se).catch(de)})},pe.prototype.verifyAuthentication=function(fe){var se=fe.database,de=fe.accessMode,ge=fe.auth;return u(this,void 0,void 0,function(){var Oe=this;return l(this,function(ke){return[2,this._verifyAuthentication({auth:ge,getAddress:function(){return u(Oe,void 0,void 0,function(){var De,Ne,Te;return l(this,function(Y){switch(Y.label){case 0:return De={database:se||ue},[4,this._freshRoutingTable({accessMode:de,database:De.database,auth:ge,onDatabaseNameResolved:function(Q){De.database=De.database||Q}})];case 1:if(Ne=Y.sent(),(Te=de===I?Ne.writers:Ne.readers).length===0)throw(0,h.newError)("No servers available for database '".concat(De.database,"' with access mode '").concat(de,"'"),S);return[2,Te[0]]}})})}})]})})},pe.prototype.verifyConnectivityAndGetServerInfo=function(fe){var se=fe.database,de=fe.accessMode;return u(this,void 0,void 0,function(){var ge,Oe,ke,De,Ne,Te,Y,Q,ie,we,Ee;return l(this,function(Me){switch(Me.label){case 0:return ge={database:se||ue},[4,this._freshRoutingTable({accessMode:de,database:ge.database,onDatabaseNameResolved:function(Ie){ge.database=ge.database||Ie}})];case 1:Oe=Me.sent(),ke=de===I?Oe.writers:Oe.readers,De=(0,h.newError)("No servers available for database '".concat(ge.database,"' with access mode '").concat(de,"'"),S),Me.label=2;case 2:Me.trys.push([2,9,10,11]),Ne=c(ke),Te=Ne.next(),Me.label=3;case 3:if(Te.done)return[3,8];Y=Te.value,Me.label=4;case 4:return Me.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:Y})];case 5:return[2,Me.sent()];case 6:return Q=Me.sent(),De=Q,[3,7];case 7:return Te=Ne.next(),[3,3];case 8:return[3,11];case 9:return ie=Me.sent(),we={error:ie},[3,11];case 10:try{Te&&!Te.done&&(Ee=Ne.return)&&Ee.call(Ne)}finally{if(we)throw we.error}return[7];case 11:throw De}})})},pe.prototype.forget=function(fe,se){this._routingTableRegistry.apply(se,{applyWhenExists:function(de){return de.forget(fe)}}),this._connectionPool.purge(fe).catch(function(){})},pe.prototype.forgetWriter=function(fe,se){this._routingTableRegistry.apply(se,{applyWhenExists:function(de){return de.forgetWriter(fe)}})},pe.prototype._freshRoutingTable=function(fe){var se=fe===void 0?{}:fe,de=se.accessMode,ge=se.database,Oe=se.bookmarks,ke=se.impersonatedUser,De=se.onDatabaseNameResolved,Ne=se.auth,Te=this._routingTableRegistry.get(ge,function(){return new p.RoutingTable({database:ge})});return Te.isStaleFor(de)?(this._log.info('Routing table is stale for database: "'.concat(ge,'" and access mode: "').concat(de,'": ').concat(Te)),this._refreshRoutingTable(Te,Oe,ke,Ne).then(function(Y){return De(Y.database),Y})):Te},pe.prototype._refreshRoutingTable=function(fe,se,de,ge){var Oe=fe.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(Oe,fe,se,de,ge):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(Oe,fe,se,de,ge)},pe.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Te,Y,Q,ie;return l(this,function(we){switch(we.label){case 0:return ke=[],[4,this._fetchRoutingTableUsingSeedRouter(ke,this._seedRouter,se,de,ge,Oe)];case 1:return De=f.apply(void 0,[we.sent(),2]),Ne=De[0],Te=De[1],Ne?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(fe,se,de,ge,Oe)];case 3:Y=f.apply(void 0,[we.sent(),2]),Q=Y[0],ie=Y[1],Ne=Q,Te=ie||Te,we.label=4;case 4:return[4,this._applyRoutingTableIfPossible(se,Ne,Te)];case 5:return[2,we.sent()]}})})},pe.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Te;return l(this,function(Y){switch(Y.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(fe,se,de,ge,Oe)];case 1:return ke=f.apply(void 0,[Y.sent(),2]),De=ke[0],Ne=ke[1],De?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(fe,this._seedRouter,se,de,ge,Oe)];case 2:Te=f.apply(void 0,[Y.sent(),2]),De=Te[0],Ne=Te[1],Y.label=3;case 3:return[4,this._applyRoutingTableIfPossible(se,De,Ne)];case 4:return[2,Y.sent()]}})})},pe.prototype._fetchRoutingTableUsingKnownRouters=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke,De,Ne,Te;return l(this,function(Y){switch(Y.label){case 0:return[4,this._fetchRoutingTable(fe,se,de,ge,Oe)];case 1:return ke=f.apply(void 0,[Y.sent(),2]),De=ke[0],Ne=ke[1],De?[2,[De,null]]:(Te=fe.length-1,pe._forgetRouter(se,fe,Te),[2,[null,Ne]])}})})},pe.prototype._fetchRoutingTableUsingSeedRouter=function(fe,se,de,ge,Oe,ke){return u(this,void 0,void 0,function(){var De,Ne;return l(this,function(Te){switch(Te.label){case 0:return[4,this._resolveSeedRouter(se)];case 1:return De=Te.sent(),Ne=De.filter(function(Y){return fe.indexOf(Y)<0}),[4,this._fetchRoutingTable(Ne,de,ge,Oe,ke)];case 2:return[2,Te.sent()]}})})},pe.prototype._resolveSeedRouter=function(fe){return u(this,void 0,void 0,function(){var se,de,ge=this;return l(this,function(Oe){switch(Oe.label){case 0:return[4,this._hostNameResolver.resolve(fe)];case 1:return se=Oe.sent(),[4,Promise.all(se.map(function(ke){return ge._dnsResolver.resolve(ke)}))];case 2:return de=Oe.sent(),[2,[].concat.apply([],de)]}})})},pe.prototype._fetchRoutingTable=function(fe,se,de,ge,Oe){return u(this,void 0,void 0,function(){var ke=this;return l(this,function(De){return[2,fe.reduce(function(Ne,Te,Y){return u(ke,void 0,void 0,function(){var Q,ie,we,Ee,Me,Ie,Ye;return l(this,function(ot){switch(ot.label){case 0:return[4,Ne];case 1:return Q=f.apply(void 0,[ot.sent(),1]),(ie=Q[0])?[2,[ie,null]]:(we=Y-1,pe._forgetRouter(se,fe,we),[4,this._createSessionForRediscovery(Te,de,ge,Oe)]);case 2:if(Ee=f.apply(void 0,[ot.sent(),2]),Me=Ee[0],Ie=Ee[1],!Me)return[3,8];ot.label=3;case 3:return ot.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(Me,se.database,Te,ge)];case 4:return[2,[ot.sent(),null]];case 5:return Ye=ot.sent(),[2,this._handleRediscoveryError(Ye,Te)];case 6:return Me.close(),[7];case 7:return[3,9];case 8:return[2,[null,Ie]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},pe.prototype._createSessionForRediscovery=function(fe,se,de,ge){return u(this,void 0,void 0,function(){var Oe,ke,De,Ne,Te,Y=this;return l(this,function(Q){switch(Q.label){case 0:return Q.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:ge},fe)];case 1:return Oe=Q.sent(),ge?[4,this._verifyStickyConnection({auth:ge,connection:Oe,address:fe})]:[3,3];case 2:Q.sent(),Q.label=3;case 3:return ke=m.ConnectionErrorHandler.create({errorCode:O,handleSecurityError:function(ie,we,Ee){return Y._handleSecurityError(ie,we,Ee)}}),De=Oe._sticky?new m.DelegateConnection(Oe):new m.DelegateConnection(Oe,ke),Ne=new y.default(De),Oe.protocol().version<4?[2,[new h.Session({mode:I,bookmarks:E.empty(),connectionProvider:Ne}),null]]:[2,[new h.Session({mode:P,database:"system",bookmarks:se,connectionProvider:Ne,impersonatedUser:de}),null]];case 4:return Te=Q.sent(),[2,this._handleRediscoveryError(Te,fe)];case 5:return[2]}})})},pe.prototype._handleRediscoveryError=function(fe,se){if((function(de){return[z,H,q,$,J,X,Z].includes(de.code)})(fe)||(function(de){var ge;return((ge=de.code)===null||ge===void 0?void 0:ge.startsWith("Neo.ClientError.Security."))&&![W].includes(de.code)})(fe))throw fe;if(fe.code==="Neo.ClientError.Procedure.ProcedureNotFound")throw(0,h.newError)("Server at ".concat(se.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),S,fe);return this._log.warn("unable to fetch routing table because of an error ".concat(fe)),[null,fe]},pe.prototype._applyRoutingTableIfPossible=function(fe,se,de){return u(this,void 0,void 0,function(){return l(this,function(ge){switch(ge.label){case 0:if(!se)throw(0,h.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(fe),S,de);return se.writers.length===0&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(se)];case 1:return ge.sent(),[2,se]}})})},pe.prototype._updateRoutingTable=function(fe){return u(this,void 0,void 0,function(){return l(this,function(se){switch(se.label){case 0:return[4,this._connectionPool.keepAll(fe.allServers())];case 1:return se.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(fe),this._log.info("Updated routing table ".concat(fe)),[2]}})})},pe._forgetRouter=function(fe,se,de){var ge=se[de];fe&&ge&&fe.forgetRouter(ge)},pe.prototype._channelSsrCallback=function(fe,se){if(se==="OPEN")fe===!0?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else{if(se!=="CLOSE")throw(0,h.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'");fe===!0?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1}},pe.prototype.SSREnabled=function(){return this._withSSR>0&&this._withoutSSR===0},pe})(b.default);e.default=ne;var le=(function(){function ce(pe){this._tables=new Map,this._routingTablePurgeDelay=pe}return ce.prototype.register=function(pe){return this._tables.set(pe.database,pe),this},ce.prototype.apply=function(pe,fe){var se=fe===void 0?{}:fe,de=se.applyWhenExists,ge=se.applyWhenDontExists,Oe=ge===void 0?function(){}:ge;return this._tables.has(pe)?de(this._tables.get(pe)):typeof pe=="string"||pe===null?Oe():this._forEach(de),this},ce.prototype.get=function(pe,fe){return this._tables.has(pe)?this._tables.get(pe):typeof fe=="function"?fe():fe},ce.prototype.removeExpired=function(){var pe=this;return this._removeIf(function(fe){return fe.isExpiredFor(pe._routingTablePurgeDelay)})},ce.prototype._forEach=function(pe){var fe,se;try{for(var de=c(this._tables),ge=de.next();!ge.done;ge=de.next())pe(f(ge.value,2)[1])}catch(Oe){fe={error:Oe}}finally{try{ge&&!ge.done&&(se=de.return)&&se.call(de)}finally{if(fe)throw fe.error}}return this},ce.prototype._remove=function(pe){return this._tables.delete(pe),this},ce.prototype._removeIf=function(pe){var fe,se;try{for(var de=c(this._tables),ge=de.next();!ge.done;ge=de.next()){var Oe=f(ge.value,2),ke=Oe[0];pe(Oe[1])&&this._remove(ke)}}catch(De){fe={error:De}}finally{try{ge&&!ge.done&&(se=de.return)&&se.call(de)}finally{if(fe)throw fe.error}}return this},ce})()},7441:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dematerialize=void 0;var n=t(7800),i=t(7843),a=t(3111);e.dematerialize=function(){return i.operate(function(o,s){o.subscribe(a.createOperatorSubscriber(s,function(u){return n.observeNotification(u,s)}))})}},7449:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(c){for(var f,d=1,h=arguments.length;d0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y},a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0});var o=t(7168),s=t(9305),u=a(t(7518)),l=a(t(5045));e.default=n(n(n({},u.default),l.default),{createNodeTransformer:function(c){return u.default.createNodeTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("Node",4,f.size);var d=i(f.fields,4),h=d[0],p=d[1],g=d[2],y=d[3];return new s.Node(h,p,g,y)}})},createRelationshipTransformer:function(c){return u.default.createRelationshipTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("Relationship",8,f.size);var d=i(f.fields,8),h=d[0],p=d[1],g=d[2],y=d[3],b=d[4],_=d[5],m=d[6],x=d[7];return new s.Relationship(h,p,g,y,b,_,m,x)}})},createUnboundRelationshipTransformer:function(c){return u.default.createUnboundRelationshipTransformer(c).extendsWith({fromStructure:function(f){o.structure.verifyStructSize("UnboundRelationship",4,f.size);var d=i(f.fields,4),h=d[0],p=d[1],g=d[2],y=d[3];return new s.UnboundRelationship(h,p,g,y)}})}})},7452:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__exportStar||function(l,c){for(var f in l)f==="default"||Object.prototype.hasOwnProperty.call(c,f)||n(c,l,f)},a=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.alloc=e.ChannelConfig=void 0,i(t(3951),e),i(t(373),e);var o=t(2481);Object.defineProperty(e,"ChannelConfig",{enumerable:!0,get:function(){return a(o).default}});var s=t(5319);Object.defineProperty(e,"alloc",{enumerable:!0,get:function(){return s.alloc}});var u=t(3473);Object.defineProperty(e,"utf8",{enumerable:!0,get:function(){return a(u).default}})},7479:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrRemove=void 0,e.arrRemove=function(t,n){if(t){var i=t.indexOf(n);0<=i&&t.splice(i,1)}}},7509:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(l,c,f,d){d===void 0&&(d=f);var h=Object.getOwnPropertyDescriptor(c,f);h&&!("get"in h?!c.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,d,h)}:function(l,c,f,d){d===void 0&&(d=f),l[d]=c[f]}),i=this&&this.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),a=this&&this.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&n(c,l,f);return i(c,l),c};Object.defineProperty(e,"__esModule",{value:!0}),e.ServerAddress=void 0;var o=t(6587),s=a(t(407)),u=(function(){function l(c,f,d,h){this._host=(0,o.assertString)(c,"host"),this._resolved=f!=null?(0,o.assertString)(f,"resolved"):null,this._port=(0,o.assertNumber)(d,"port"),this._hostPort=h,this._stringValue=f!=null?"".concat(h,"(").concat(f,")"):"".concat(h)}return l.prototype.host=function(){return this._host},l.prototype.resolvedHost=function(){return this._resolved!=null?this._resolved:this._host},l.prototype.port=function(){return this._port},l.prototype.resolveWith=function(c){return new l(this._host,c,this._port,this._hostPort)},l.prototype.asHostPort=function(){return this._hostPort},l.prototype.asKey=function(){return this._hostPort},l.prototype.toString=function(){return this._stringValue},l.fromUrl=function(c){var f=s.parseDatabaseUrl(c);return new l(f.host,null,f.port,f.hostAndPort)},l})();e.ServerAddress=u},7518:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.refCount=void 0;var n=t(7843),i=t(3111);e.refCount=function(){return n.operate(function(a,o){var s=null;a._refCount++;var u=i.createOperatorSubscriber(o,void 0,void 0,void 0,function(){if(!a||a._refCount<=0||0<--a._refCount)s=null;else{var l=a._connection,c=s;s=null,!l||c&&l!==c||l.unsubscribe(),o.unsubscribe()}});a.subscribe(u),u.closed||(s=a.connect())})}},7579:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.connectable=void 0;var n=t(2483),i=t(4662),a=t(9353),o={connector:function(){return new n.Subject},resetOnDisconnect:!0};e.connectable=function(s,u){u===void 0&&(u=o);var l=null,c=u.connector,f=u.resetOnDisconnect,d=f===void 0||f,h=c(),p=new i.Observable(function(g){return h.subscribe(g)});return p.connect=function(){return l&&!l.closed||(l=a.defer(function(){return s}).subscribe(h),d&&l.add(function(){return h=c()})),l},p}},7589:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_ACQUISITION_TIMEOUT=e.DEFAULT_MAX_SIZE=void 0;var t=100;e.DEFAULT_MAX_SIZE=t;var n=6e4;e.DEFAULT_ACQUISITION_TIMEOUT=n;var i=(function(){function s(u,l){this.maxSize=a(u,t),this.acquisitionTimeout=a(l,n)}return s.defaultConfig=function(){return new s(t,n)},s.fromDriverConfig=function(u){return new s(o(u.maxConnectionPoolSize)?u.maxConnectionPoolSize:t,o(u.connectionAcquisitionTimeout)?u.connectionAcquisitionTimeout:n)},s})();function a(s,u){return o(s)?s:u}function o(s){return s===0||s!=null}e.default=i},7601:function(r,e,t){var n=this&&this.__read||function(l,c){var f=typeof Symbol=="function"&&l[Symbol.iterator];if(!f)return l;var d,h,p=f.call(l),g=[];try{for(;(c===void 0||c-- >0)&&!(d=p.next()).done;)g.push(d.value)}catch(y){h={error:y}}finally{try{d&&!d.done&&(f=p.return)&&f.call(p)}finally{if(h)throw h.error}}return g},i=this&&this.__spreadArray||function(l,c){for(var f=0,d=c.length,h=l.length;f0&&d[d.length-1])||_[0]!==6&&_[0]!==2)){p=0;continue}if(_[0]===3&&(!d||_[1]>d[0]&&_[1]{Object.defineProperty(e,"__esModule",{value:!0}),e.createInvalidObservableTypeError=void 0,e.createInvalidObservableTypeError=function(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},7629:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPromise=void 0;var n=t(1018);e.isPromise=function(i){return n.isFunction(i==null?void 0:i.then)}},7640:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var n=t(7961),i=t(8941),a=t(4092);e.throttleTime=function(o,s,u){s===void 0&&(s=n.asyncScheduler);var l=a.timer(o,s);return i.throttle(function(){return l},u)}},7661:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.expand=void 0;var n=t(7843),i=t(1983);e.expand=function(a,o,s){return o===void 0&&(o=1/0),o=(o||0)<1?1/0:o,n.operate(function(u,l){return i.mergeInternals(u,l,a,o,void 0,!0,s)})}},7665:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.verifyStructSize=e.Structure=void 0;var n=t(9305),i=n.error.PROTOCOL_ERROR,a=(function(){function o(s,u){this.signature=s,this.fields=u}return Object.defineProperty(o.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),o.prototype.toString=function(){for(var s="",u=0;u0&&(s+=", "),s+=this.fields[u];return"Structure("+this.signature+", ["+s+"])"},o})();e.Structure=a,e.verifyStructSize=function(o,s,u){if(s!==u)throw(0,n.newError)("Wrong struct size for ".concat(o,", expected ").concat(s," but was ").concat(u),i)},e.default=a},7666:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(c,f,d,h){h===void 0&&(h=d);var p=Object.getOwnPropertyDescriptor(f,d);p&&!("get"in p?!f.__esModule:p.writable||p.configurable)||(p={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(c,h,p)}:function(c,f,d,h){h===void 0&&(h=d),c[h]=f[d]}),i=this&&this.__exportStar||function(c,f){for(var d in c)d==="default"||Object.prototype.hasOwnProperty.call(f,d)||n(f,c,d)},a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.RawRoutingTable=e.BoltProtocol=void 0;var o=a(t(8731)),s=a(t(6544)),u=a(t(9054)),l=a(t(7790));i(t(9014),e),e.BoltProtocol=u.default,e.RawRoutingTable=l.default,e.default={handshake:o.default,create:s.default}},7714:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createFind=e.find=void 0;var n=t(7843),i=t(3111);function a(o,s,u){var l=u==="index";return function(c,f){var d=0;c.subscribe(i.createOperatorSubscriber(f,function(h){var p=d++;o.call(s,h,p,c)&&(f.next(l?p:h),f.complete())},function(){f.next(l?-1:void 0),f.complete()}))}}e.find=function(o,s){return n.operate(a(o,s,"value"))},e.createFind=a},7721:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(f,d,h,p){p===void 0&&(p=h);var g=Object.getOwnPropertyDescriptor(d,h);g&&!("get"in g?!d.__esModule:g.writable||g.configurable)||(g={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(f,p,g)}:function(f,d,h,p){p===void 0&&(p=h),f[p]=d[h]}),i=this&&this.__setModuleDefault||(Object.create?function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}:function(f,d){f.default=d}),a=this&&this.__importStar||function(f){if(f&&f.__esModule)return f;var d={};if(f!=null)for(var h in f)h!=="default"&&Object.prototype.hasOwnProperty.call(f,h)&&n(d,f,h);return i(d,f),d},o=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.createChannelConnection=e.ConnectionErrorHandler=e.DelegateConnection=e.ChannelConnection=e.Connection=void 0;var s=o(t(6385));e.Connection=s.default;var u=a(t(8031));e.ChannelConnection=u.default,Object.defineProperty(e,"createChannelConnection",{enumerable:!0,get:function(){return u.createChannelConnection}});var l=o(t(9857));e.DelegateConnection=l.default;var c=o(t(2363));e.ConnectionErrorHandler=c.default,e.default=s.default},7740:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pairs=void 0;var n=t(4917);e.pairs=function(i,a){return n.from(Object.entries(i),a)}},7790:function(r,e,t){var n=this&&this.__extends||(function(){var l=function(c,f){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(d[p]=h[p])},l(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function d(){this.constructor=c}l(c,f),c.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}})(),i=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),i(t(9305));var a=(function(){function l(){}return l.ofRecord=function(c){return c===null?l.ofNull():new u(c)},l.ofMessageResponse=function(c){return c===null?l.ofNull():new o(c)},l.ofNull=function(){return new s},Object.defineProperty(l.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),l})();e.default=a;var o=(function(l){function c(f){var d=l.call(this)||this;return d._response=f,d}return n(c,l),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return this._response===null},enumerable:!1,configurable:!0}),c})(a),s=(function(l){function c(){return l!==null&&l.apply(this,arguments)||this}return n(c,l),Object.defineProperty(c.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),c})(a),u=(function(l){function c(f){var d=l.call(this)||this;return d._record=f,d}return n(c,l),Object.defineProperty(c.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isNull",{get:function(){return this._record===null},enumerable:!1,configurable:!0}),c})(a)},7800:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var n,i=t(8616),a=t(1004),o=t(1103),s=t(1018);(n=e.NotificationKind||(e.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=(function(){function c(f,d,h){this.kind=f,this.value=d,this.error=h,this.hasValue=f==="N"}return c.prototype.observe=function(f){return l(this,f)},c.prototype.do=function(f,d,h){var p=this,g=p.kind,y=p.value,b=p.error;return g==="N"?f==null?void 0:f(y):g==="E"?d==null?void 0:d(b):h==null?void 0:h()},c.prototype.accept=function(f,d,h){var p;return s.isFunction((p=f)===null||p===void 0?void 0:p.next)?this.observe(f):this.do(f,d,h)},c.prototype.toObservable=function(){var f=this,d=f.kind,h=f.value,p=f.error,g=d==="N"?a.of(h):d==="E"?o.throwError(function(){return p}):d==="C"?i.EMPTY:0;if(!g)throw new TypeError("Unexpected notification kind "+d);return g},c.createNext=function(f){return new c("N",f)},c.createError=function(f){return new c("E",void 0,f)},c.createComplete=function(){return c.completeNotification},c.completeNotification=new c("C"),c})();function l(c,f){var d,h,p,g=c,y=g.kind,b=g.value,_=g.error;if(typeof y!="string")throw new TypeError('Invalid notification, missing "kind"');y==="N"?(d=f.next)===null||d===void 0||d.call(f,b):y==="E"?(h=f.error)===null||h===void 0||h.call(f,_):(p=f.complete)===null||p===void 0||p.call(f)}e.Notification=u,e.observeNotification=l},7815:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.groupBy=void 0;var n=t(4662),i=t(9445),a=t(2483),o=t(7843),s=t(3111);e.groupBy=function(u,l,c,f){return o.operate(function(d,h){var p;l&&typeof l!="function"?(c=l.duration,p=l.element,f=l.connector):p=l;var g=new Map,y=function(S){g.forEach(S),S(h)},b=function(S){return y(function(O){return O.error(S)})},_=0,m=!1,x=new s.OperatorSubscriber(h,function(S){try{var O=u(S),E=g.get(O);if(!E){g.set(O,E=f?f():new a.Subject);var T=(I=O,k=E,(L=new n.Observable(function(B){_++;var j=k.subscribe(B);return function(){j.unsubscribe(),--_===0&&m&&x.unsubscribe()}})).key=I,L);if(h.next(T),c){var P=s.createOperatorSubscriber(E,function(){E.complete(),P==null||P.unsubscribe()},void 0,void 0,function(){return g.delete(O)});x.add(i.innerFrom(c(T)).subscribe(P))}}E.next(p?p(S):S)}catch(B){b(B)}var I,k,L},function(){return y(function(S){return S.complete()})},b,function(){return g.clear()},function(){return m=!0,_===0});d.subscribe(x)})}},7835:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retry=void 0;var n=t(7843),i=t(3111),a=t(6640),o=t(4092),s=t(9445);e.retry=function(u){var l;u===void 0&&(u=1/0);var c=(l=u&&typeof u=="object"?u:{count:u}).count,f=c===void 0?1/0:c,d=l.delay,h=l.resetOnSuccess,p=h!==void 0&&h;return f<=0?a.identity:n.operate(function(g,y){var b,_=0,m=function(){var x=!1;b=g.subscribe(i.createOperatorSubscriber(y,function(S){p&&(_=0),y.next(S)},void 0,function(S){if(_++{Object.defineProperty(e,"__esModule",{value:!0}),e.operate=e.hasLift=void 0;var n=t(1018);function i(a){return n.isFunction(a==null?void 0:a.lift)}e.hasLift=i,e.operate=function(a){return function(o){if(i(o))return o.lift(function(s){try{return a(s,this)}catch(u){this.error(u)}});throw new TypeError("Unable to lift unknown Observable type")}}},7853:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.using=void 0;var n=t(4662),i=t(9445),a=t(8616);e.using=function(o,s){return new n.Observable(function(u){var l=o(),c=s(l);return(c?i.innerFrom(c):a.EMPTY).subscribe(u),function(){l&&l.unsubscribe()}})}},7857:function(r,e,t){var n=this&&this.__extends||(function(){var d=function(h,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function g(){this.constructor=h}d(h,p),h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}})(),i=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.WRITE=e.READ=e.Driver=void 0;var a=t(9305),o=i(t(3466)),s=a.internal.constants.FETCH_ALL,u=a.driver.READ,l=a.driver.WRITE;e.READ=u,e.WRITE=l;var c=(function(d){function h(){return d!==null&&d.apply(this,arguments)||this}return n(h,d),h.prototype.rxSession=function(p){var g=p===void 0?{}:p,y=g.defaultAccessMode,b=y===void 0?l:y,_=g.bookmarks,m=g.database,x=m===void 0?"":m,S=g.fetchSize,O=g.impersonatedUser,E=g.bookmarkManager,T=g.notificationFilter,P=g.auth;return new o.default({session:this._newSession({defaultAccessMode:b,bookmarkOrBookmarks:_,database:x,impersonatedUser:O,auth:P,reactive:!1,fetchSize:f(S,this._config.fetchSize),bookmarkManager:E,notificationFilter:T,log:this._log}),config:this._config,log:this._log})},h})(a.Driver);function f(d,h){var p=parseInt(d,10);if(p>0||p===s)return p;if(p===0||p<0)throw new Error("The fetch size can only be a positive value or ".concat(s," for ALL. However fetchSize = ").concat(p));return h}e.Driver=c,e.default=c},7961:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var n=t(5267),i=t(5648);e.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),e.async=e.asyncScheduler},7991:(r,e)=>{e.byteLength=function(c){var f=s(c),d=f[0],h=f[1];return 3*(d+h)/4-h},e.toByteArray=function(c){var f,d,h=s(c),p=h[0],g=h[1],y=new i((function(m,x,S){return 3*(x+S)/4-S})(0,p,g)),b=0,_=g>0?p-4:p;for(d=0;d<_;d+=4)f=n[c.charCodeAt(d)]<<18|n[c.charCodeAt(d+1)]<<12|n[c.charCodeAt(d+2)]<<6|n[c.charCodeAt(d+3)],y[b++]=f>>16&255,y[b++]=f>>8&255,y[b++]=255&f;return g===2&&(f=n[c.charCodeAt(d)]<<2|n[c.charCodeAt(d+1)]>>4,y[b++]=255&f),g===1&&(f=n[c.charCodeAt(d)]<<10|n[c.charCodeAt(d+1)]<<4|n[c.charCodeAt(d+2)]>>2,y[b++]=f>>8&255,y[b++]=255&f),y},e.fromByteArray=function(c){for(var f,d=c.length,h=d%3,p=[],g=16383,y=0,b=d-h;yb?b:y+g));return h===1?(f=c[d-1],p.push(t[f>>2]+t[f<<4&63]+"==")):h===2&&(f=(c[d-2]<<8)+c[d-1],p.push(t[f>>10]+t[f>>4&63]+t[f<<2&63]+"=")),p.join("")};for(var t=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)t[o]=a[o],n[a.charCodeAt(o)]=o;function s(c){var f=c.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=c.indexOf("=");return d===-1&&(d=f),[d,d===f?0:4-d%4]}function u(c){return t[c>>18&63]+t[c>>12&63]+t[c>>6&63]+t[63&c]}function l(c,f,d){for(var h,p=[],g=f;g=f.length&&(f=void 0),{value:f&&f[p++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(f,d){var h=typeof Symbol=="function"&&f[Symbol.iterator];if(!h)return f;var p,g,y=h.call(f),b=[];try{for(;(d===void 0||d-- >0)&&!(p=y.next()).done;)b.push(p.value)}catch(_){g={error:_}}finally{try{p&&!p.done&&(h=y.return)&&h.call(y)}finally{if(g)throw g.error}}return b},a=this&&this.__spreadArray||function(f,d){for(var h=0,p=d.length,g=f.length;h{Object.defineProperty(e,"__esModule",{value:!0}),e.buffer=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.buffer=function(s){return n.operate(function(u,l){var c=[];return u.subscribe(a.createOperatorSubscriber(l,function(f){return c.push(f)},function(){l.next(c),l.complete()})),o.innerFrom(s).subscribe(a.createOperatorSubscriber(l,function(){var f=c;c=[],l.next(f)},i.noop)),function(){c=null}})}},8031:function(r,e,t){var n=this&&this.__extends||(function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(_[x]=m[x])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function _(){this.constructor=y}g(y,b),y.prototype=b===null?Object.create(b):(_.prototype=b.prototype,new _)}})(),i=this&&this.__awaiter||function(g,y,b,_){return new(b||(b=Promise))(function(m,x){function S(T){try{E(_.next(T))}catch(P){x(P)}}function O(T){try{E(_.throw(T))}catch(P){x(P)}}function E(T){var P;T.done?m(T.value):(P=T.value,P instanceof b?P:new b(function(I){I(P)})).then(S,O)}E((_=_.apply(g,y||[])).next())})},a=this&&this.__generator||function(g,y){var b,_,m,x,S={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return x={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function O(E){return function(T){return(function(P){if(b)throw new TypeError("Generator is already executing.");for(;x&&(x=0,P[0]&&(S=0)),S;)try{if(b=1,_&&(m=2&P[0]?_.return:P[0]?_.throw||((m=_.return)&&m.call(_),0):_.next)&&!(m=m.call(_,P[1])).done)return m;switch(_=0,m&&(P=[2&P[0],m.value]),P[0]){case 0:case 1:m=P;break;case 4:return S.label++,{value:P[1],done:!1};case 5:S.label++,_=P[1],P=[0];continue;case 7:P=S.ops.pop(),S.trys.pop();continue;default:if(!((m=(m=S.trys).length>0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]0?x._ch.setupReceiveTimeout(1e3*B):x._log.info("Server located at ".concat(x._address," supplied an invalid connection receive timeout value (").concat(B,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}T.hints["telemetry.enabled"]===!0&&(x._telemetryDisabledConnection=!1),x.SSREnabledHint=T.hints["ssr.enabled"]}x._ssrCallback((P=x.SSREnabledHint)!==null&&P!==void 0&&P,"OPEN")}O(S)}})})},y.prototype.protocol=function(){return this._protocol},Object.defineProperty(y.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"version",{get:function(){return this._server.version},set:function(b){this._server.version=b},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),y.prototype._handleFatalError=function(b){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||b,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(u.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},y.prototype._setIdle=function(b){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(b)},y.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},y.prototype._queueObserver=function(b){return this._protocol.queueObserverIfProtocolIsNotBroken(b)},y.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},y.prototype.resetAndFlush=function(){var b=this;return new Promise(function(_,m){b._reset({onError:function(x){if(b._isBroken)m(x);else{var S=b._handleProtocolError("Received FAILURE as a response for RESET: ".concat(x));m(S)}},onComplete:function(){_()}})})},y.prototype._resetOnFailure=function(){var b=this;this.isOpen()&&this._reset({onError:function(){b._protocol.resetFailure()},onComplete:function(){b._protocol.resetFailure()}})},y.prototype._reset=function(b){var _=this;if(this._reseting)this._protocol.isLastMessageReset()?this._resetObservers.push(b):this._protocol.reset({onError:function(x){b.onError(x)},onComplete:function(){b.onComplete()}});else{this._resetObservers.push(b),this._reseting=!0;var m=function(x){_._reseting=!1;var S=_._resetObservers;_._resetObservers=[],S.forEach(x)};this._protocol.reset({onError:function(x){m(function(S){return S.onError(x)})},onComplete:function(){m(function(x){return x.onComplete()})}})}},y.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},y.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},y.prototype._handleOngoingRequestsNumberChange=function(b){this._idle||(b===0?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},y.prototype.close=function(){var b;return i(this,void 0,void 0,function(){return a(this,function(_){switch(_.label){case 0:return this._ssrCallback((b=this.SSREnabledHint)!==null&&b!==void 0&&b,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return _.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},y.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},y.prototype._handleProtocolError=function(b){this._protocol.resetFailure(),this._updateCurrentObserver();var _=(0,u.newError)(b,f);return this._handleFatalError(_),_},y})(l.default);e.default=p},8046:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isArrayLike=void 0,e.isArrayLike=function(t){return t&&typeof t.length=="number"&&typeof t!="function"}},8079:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.debounceTime=void 0;var n=t(7961),i=t(7843),a=t(3111);e.debounceTime=function(o,s){return s===void 0&&(s=n.asyncScheduler),i.operate(function(u,l){var c=null,f=null,d=null,h=function(){if(c){c.unsubscribe(),c=null;var g=f;f=null,l.next(g)}};function p(){var g=d+o,y=s.now();if(y{Object.defineProperty(e,"__esModule",{value:!0}),e.catchError=void 0;var n=t(9445),i=t(3111),a=t(7843);e.catchError=function o(s){return a.operate(function(u,l){var c,f=null,d=!1;f=u.subscribe(i.createOperatorSubscriber(l,void 0,void 0,function(h){c=n.innerFrom(s(h,o(s)(u))),f?(f.unsubscribe(),f=null,c.subscribe(l)):d=!0})),d&&(f.unsubscribe(),f=null,c.subscribe(l))})}},8157:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.publishReplay=void 0;var n=t(1242),i=t(9247),a=t(1018);e.publishReplay=function(o,s,u,l){u&&!a.isFunction(u)&&(l=u);var c=a.isFunction(u)?u:void 0;return function(f){return i.multicast(new n.ReplaySubject(o,s,l),c)(f)}}},8158:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.concatAll=void 0;var n=t(7302);e.concatAll=function(){return n.mergeAll(1)}},8208:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.windowTime=void 0;var n=t(2483),i=t(7961),a=t(8014),o=t(7843),s=t(3111),u=t(7479),l=t(1107),c=t(7110);e.windowTime=function(f){for(var d,h,p=[],g=1;g=0?c.executeSchedule(x,y,T,b,!0):O=!0,T();var P=function(k){return S.slice().forEach(k)},I=function(k){P(function(L){var B=L.window;return k(B)}),k(x),x.unsubscribe()};return m.subscribe(s.createOperatorSubscriber(x,function(k){P(function(L){L.window.next(k),_<=++L.seen&&E(L)})},function(){return I(function(k){return k.complete()})},function(k){return I(function(L){return L.error(k)})})),function(){S=null}})}},8239:function(r,e,t){var n=this&&this.__read||function(o,s){var u=typeof Symbol=="function"&&o[Symbol.iterator];if(!u)return o;var l,c,f=u.call(o),d=[];try{for(;(s===void 0||s-- >0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0)&&b.filter(_).length===b.length}function g(b,_){return!(b in _)||_[b]==null||typeof _[b]=="string"}e.clientCertificateProviders=f,Object.freeze(f),e.resolveCertificateProvider=function(b){if(b!=null){if(typeof b=="object"&&"hasUpdate"in b&&"getClientCertificate"in b&&typeof b.getClientCertificate=="function"&&typeof b.hasUpdate=="function")return b;if(d(b)){var _=i({},b);return{getClientCertificate:function(){return _},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(u.stringify(b)))}};var y=(function(){function b(_,m){m===void 0&&(m=!1),this._certificate=_,this._updated=m}return b.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},b.prototype.getClientCertificate=function(){return this._certificate},b.prototype.updateCertificate=function(_){if(!d(_))throw new TypeError("certificate should be ClientCertificate, but got ".concat(u.stringify(_)));this._certificate=i({},_),this._updated=!0},b})()},8275:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.first=void 0;var n=t(2823),i=t(783),a=t(846),o=t(378),s=t(4869),u=t(6640);e.first=function(l,c){var f=arguments.length>=2;return function(d){return d.pipe(l?i.filter(function(h,p){return l(h,p,d)}):u.identity,a.take(1),f?o.defaultIfEmpty(c):s.throwIfEmpty(function(){return new n.EmptyError}))}}},8320:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(O){for(var E,T=1,P=arguments.length;T=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.takeLast=void 0;var i=t(8616),a=t(7843),o=t(3111);e.takeLast=function(s){return s<=0?function(){return i.EMPTY}:a.operate(function(u,l){var c=[];u.subscribe(o.createOperatorSubscriber(l,function(f){c.push(f),s{Object.defineProperty(e,"__esModule",{value:!0});var n=t(7509);function i(o){return Promise.resolve([o])}var a=(function(){function o(s){this._resolverFunction=s??i}return o.prototype.resolve=function(s){var u=this;return new Promise(function(l){return l(u._resolverFunction(s.asHostPort()))}).then(function(l){if(!Array.isArray(l))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(l));return l.map(function(c){return n.ServerAddress.fromUrl(c)})})},o})();e.default=a},8522:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.repeat=void 0;var n=t(8616),i=t(7843),a=t(3111),o=t(9445),s=t(4092);e.repeat=function(u){var l,c,f=1/0;return u!=null&&(typeof u=="object"?(l=u.count,f=l===void 0?1/0:l,c=u.delay):f=u),f<=0?function(){return n.EMPTY}:i.operate(function(d,h){var p,g=0,y=function(){if(p==null||p.unsubscribe(),p=null,c!=null){var _=typeof c=="number"?s.timer(c):o.innerFrom(c(g)),m=a.createOperatorSubscriber(h,function(){m.unsubscribe(),b()});_.subscribe(m)}else b()},b=function(){var _=!1;p=d.subscribe(a.createOperatorSubscriber(h,void 0,function(){++g{Object.defineProperty(e,"__esModule",{value:!0}),e.argsOrArgArray=void 0;var t=Array.isArray;e.argsOrArgArray=function(n){return n.length===1&&t(n[0])?n[0]:n}},8538:function(r,e,t){var n=this&&this.__read||function(o,s){var u=typeof Symbol=="function"&&o[Symbol.iterator];if(!u)return o;var l,c,f=u.call(o),d=[];try{for(;(s===void 0||s-- >0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.bindNodeCallback=void 0;var n=t(1439);e.bindNodeCallback=function(i,a,o){return n.bindCallbackInternals(!0,i,a,o)}},8613:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isScheduler=void 0;var n=t(1018);e.isScheduler=function(i){return i&&n.isFunction(i.schedule)}},8616:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var n=t(4662);e.EMPTY=new n.Observable(function(i){return i.complete()}),e.empty=function(i){return i?(function(a){return new n.Observable(function(o){return a.schedule(function(){return o.complete()})})})(i):e.EMPTY}},8624:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scan=void 0;var n=t(7843),i=t(6384);e.scan=function(a,o){return n.operate(i.scanInternals(a,o,arguments.length>=2,!0))}},8655:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var n=t(4662),i=t(1342);e.NEVER=new n.Observable(i.noop),e.never=function(){return e.NEVER}},8669:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.last=void 0;var n=t(2823),i=t(783),a=t(8330),o=t(4869),s=t(378),u=t(6640);e.last=function(l,c){var f=arguments.length>=2;return function(d){return d.pipe(l?i.filter(function(h,p){return l(h,p,d)}):u.identity,a.takeLast(1),f?s.defaultIfEmpty(c):o.throwIfEmpty(function(){return new n.EmptyError}))}}},8712:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchScan=void 0;var n=t(3879),i=t(7843);e.switchScan=function(a,o){return i.operate(function(s,u){var l=o;return n.switchMap(function(c,f){return a(l,c,f)},function(c,f){return l=f,f})(s).subscribe(u),function(){l=null}})}},8731:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(7452),i=t(9305),a=["5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"];function o(u,l){return{major:u,minor:l}}function s(u){for(var l=[],c=u[3],f=u[2],d=0;d<=u[1];d++)l.push({major:c,minor:f-d});return l}e.default=function(u,l){return(function(c,f){var d=this;return new Promise(function(h,p){var g=function(y){p(y)};c.onerror=g.bind(d),c._error&&g(c._error),c.onmessage=function(y){try{var b=(function(_,m){var x=[_.readUInt8(),_.readUInt8(),_.readUInt8(),_.readUInt8()];if(x[0]===72&&x[1]===84&&x[2]===84&&x[3]===80)throw m.error("Handshake failed since server responded with HTTP."),(0,i.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+(x[3]+"."+x[2])})(y,f);h({protocolVersion:b,capabilites:0,buffer:y,consumeRemainingBuffer:function(_){y.hasRemaining()&&_(y.readSlice(y.remaining()))}})}catch(_){p(_)}},c.write((function(y){if(y.length>4)throw(0,i.newError)("It should not have more than 4 versions of the protocol");var b=(0,n.alloc)(20);return b.writeInt32(1616949271),y.forEach(function(_){if(_ instanceof Array){var m=_[0],x=m.major,S=(O=m.minor)-_[1].minor;b.writeInt32(S<<16|O<<8|x)}else{x=_.major;var O=_.minor;b.writeInt32(O<<8|x)}}),b.reset(),b})([o(255,1),[o(5,8),o(5,0)],[o(4,4),o(4,2)],o(3,0)]))})})(u,l).then(function(c){return c.protocolVersion===255.1?(function(f,d){for(var h=d.readVarInt(),p=[],g=0;g{Object.defineProperty(e,"__esModule",{value:!0}),e.delayWhen=void 0;var n=t(3865),i=t(846),a=t(490),o=t(3218),s=t(983),u=t(9445);e.delayWhen=function l(c,f){return f?function(d){return n.concat(f.pipe(i.take(1),a.ignoreElements()),d.pipe(l(c)))}:s.mergeMap(function(d,h){return u.innerFrom(c(d,h)).pipe(i.take(1),o.mapTo(d))})}},8774:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.switchAll=void 0;var n=t(3879),i=t(6640);e.switchAll=function(){return n.switchMap(i.identity)}},8784:(r,e,t)=>{var n=t(4704);r.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},8808:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleIterable=void 0;var n=t(4662),i=t(1964),a=t(1018),o=t(7110);e.scheduleIterable=function(s,u){return new n.Observable(function(l){var c;return o.executeSchedule(l,u,function(){c=s[i.iterator](),o.executeSchedule(l,u,function(){var f,d,h;try{d=(f=c.next()).value,h=f.done}catch(p){return void l.error(p)}h?l.complete():l.next(d)},0,!0)}),function(){return a.isFunction(c==null?void 0:c.return)&&c.return()}})}},8813:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(ma,mu,uo,Vo){Vo===void 0&&(Vo=uo),Object.defineProperty(ma,Vo,{enumerable:!0,get:function(){return mu[uo]}})}:function(ma,mu,uo,Vo){Vo===void 0&&(Vo=uo),ma[Vo]=mu[uo]}),i=this&&this.__exportStar||function(ma,mu){for(var uo in ma)uo==="default"||Object.prototype.hasOwnProperty.call(mu,uo)||n(mu,ma,uo)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var a=t(4662);Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return a.Observable}});var o=t(8918);Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var s=t(3327);Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return s.observable}});var u=t(3110);Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var l=t(2483);Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return l.Subject}});var c=t(1637);Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return c.BehaviorSubject}});var f=t(1242);Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var d=t(95);Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return d.AsyncSubject}});var h=t(3692);Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return h.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return h.asapScheduler}});var p=t(7961);Object.defineProperty(e,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var g=t(2886);Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return g.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return g.queueScheduler}});var y=t(3862);Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return y.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return y.animationFrameScheduler}});var b=t(182);Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return b.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return b.VirtualAction}});var _=t(8986);Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return _.Scheduler}});var m=t(8014);Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return m.Subscription}});var x=t(5);Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return x.Subscriber}});var S=t(7800);Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return S.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return S.NotificationKind}});var O=t(2706);Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return O.pipe}});var E=t(1342);Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return E.noop}});var T=t(6640);Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return T.identity}});var P=t(1751);Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return P.isObservable}});var I=t(6894);Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return I.lastValueFrom}});var k=t(9060);Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return k.firstValueFrom}});var L=t(7057);Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return L.ArgumentOutOfRangeError}});var B=t(2823);Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return B.EmptyError}});var j=t(1759);Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return j.NotFoundError}});var z=t(9686);Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return z.ObjectUnsubscribedError}});var H=t(1505);Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return H.SequenceError}});var q=t(1554);Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return q.TimeoutError}});var W=t(5788);Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return W.UnsubscriptionError}});var $=t(2713);Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return $.bindCallback}});var J=t(8561);Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return J.bindNodeCallback}});var X=t(3247);Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return X.combineLatest}});var Z=t(3865);Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return Z.concat}});var ue=t(7579);Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return ue.connectable}});var re=t(9353);Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return re.defer}});var ne=t(8616);Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return ne.empty}});var le=t(9105);Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return le.forkJoin}});var ce=t(4917);Object.defineProperty(e,"from",{enumerable:!0,get:function(){return ce.from}});var pe=t(5337);Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return pe.fromEvent}});var fe=t(347);Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return fe.fromEventPattern}});var se=t(7610);Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return se.generate}});var de=t(4209);Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return de.iif}});var ge=t(6472);Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return ge.interval}});var Oe=t(2833);Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Oe.merge}});var ke=t(8655);Object.defineProperty(e,"never",{enumerable:!0,get:function(){return ke.never}});var De=t(1004);Object.defineProperty(e,"of",{enumerable:!0,get:function(){return De.of}});var Ne=t(6102);Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Ne.onErrorResumeNext}});var Te=t(7740);Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return Te.pairs}});var Y=t(1699);Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return Y.partition}});var Q=t(5584);Object.defineProperty(e,"race",{enumerable:!0,get:function(){return Q.race}});var ie=t(9376);Object.defineProperty(e,"range",{enumerable:!0,get:function(){return ie.range}});var we=t(1103);Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return we.throwError}});var Ee=t(4092);Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return Ee.timer}});var Me=t(7853);Object.defineProperty(e,"using",{enumerable:!0,get:function(){return Me.using}});var Ie=t(7286);Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Ie.zip}});var Ye=t(1656);Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return Ye.scheduled}});var ot=t(8616);Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return ot.EMPTY}});var mt=t(8655);Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return mt.NEVER}}),i(t(6038),e);var wt=t(3413);Object.defineProperty(e,"config",{enumerable:!0,get:function(){return wt.config}});var Mt=t(3146);Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return Mt.audit}});var Dt=t(3231);Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return Dt.auditTime}});var vt=t(8015);Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return vt.buffer}});var tt=t(5572);Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return tt.bufferCount}});var _e=t(7210);Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return _e.bufferTime}});var Ue=t(8995);Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return Ue.bufferToggle}});var Qe=t(8831);Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return Qe.bufferWhen}});var Ze=t(8118);Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return Ze.catchError}});var nt=t(6625);Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return nt.combineAll}});var It=t(6728);Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return It.combineLatestAll}});var ct=t(8239);Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return ct.combineLatestWith}});var Lt=t(8158);Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return Lt.concatAll}});var Rt=t(9135);Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return Rt.concatMap}});var jt=t(9938);Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return jt.concatMapTo}});var Yt=t(9669);Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Yt.concatWith}});var sr=t(1483);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return sr.connect}});var Ut=t(1038);Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ut.count}});var Rr=t(4461);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Rr.debounce}});var Xt=t(8079);Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Xt.debounceTime}});var Vr=t(378);Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return Vr.defaultIfEmpty}});var Br=t(914);Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Br.delay}});var mr=t(8766);Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return mr.delayWhen}});var ur=t(7441);Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return ur.dematerialize}});var sn=t(5365);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return sn.distinct}});var Fr=t(8937);Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return Fr.distinctUntilChanged}});var un=t(9612);Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return un.distinctUntilKeyChanged}});var bn=t(4520);Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return bn.elementAt}});var wn=t(1776);Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return wn.endWith}});var _n=t(5510);Object.defineProperty(e,"every",{enumerable:!0,get:function(){return _n.every}});var xn=t(1551);Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return xn.exhaust}});var on=t(2752);Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return on.exhaustAll}});var Nn=t(4753);Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return Nn.exhaustMap}});var fi=t(7661);Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return fi.expand}});var gn=t(783);Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return gn.filter}});var yn=t(3555);Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return yn.finalize}});var Jn=t(7714);Object.defineProperty(e,"find",{enumerable:!0,get:function(){return Jn.find}});var _i=t(9756);Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return _i.findIndex}});var Ir=t(8275);Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Ir.first}});var pa=t(7815);Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return pa.groupBy}});var di=t(490);Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return di.ignoreElements}});var Bt=t(9356);Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Bt.isEmpty}});var hr=t(8669);Object.defineProperty(e,"last",{enumerable:!0,get:function(){return hr.last}});var ei=t(5471);Object.defineProperty(e,"map",{enumerable:!0,get:function(){return ei.map}});var Hn=t(3218);Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Hn.mapTo}});var fs=t(2360);Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return fs.materialize}});var Na=t(1415);Object.defineProperty(e,"max",{enumerable:!0,get:function(){return Na.max}});var ki=t(7302);Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return ki.mergeAll}});var Wr=t(6902);Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return Wr.flatMap}});var Nr=t(983);Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Nr.mergeMap}});var na=t(6586);Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return na.mergeMapTo}});var Fs=t(4408);Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return Fs.mergeScan}});var hu=t(8253);Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return hu.mergeWith}});var ga=t(2669);Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ga.min}});var Us=t(9247);Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Us.multicast}});var Ln=t(5184);Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Ln.observeOn}});var Ii=t(1226);Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Ii.onErrorResumeNextWith}});var Ni=t(1518);Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return Ni.pairwise}});var Pc=t(4912);Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return Pc.pluck}});var vu=t(766);Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return vu.publish}});var ia=t(7220);Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return ia.publishBehavior}});var Hl=t(6106);Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Hl.publishLast}});var Md=t(8157);Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return Md.publishReplay}});var Xa=t(5600);Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Xa.raceWith}});var Wl=t(9139);Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Wl.reduce}});var Yl=t(8522);Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Yl.repeat}});var nf=t(6566);Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return nf.repeatWhen}});var Wi=t(7835);Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Wi.retry}});var af=t(9843);Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return af.retryWhen}});var La=t(7561);Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return La.refCount}});var qo=t(1731);Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return qo.sample}});var Gf=t(6086);Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Gf.sampleTime}});var ds=t(8624);Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return ds.scan}});var Mc=t(582);Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Mc.sequenceEqual}});var Xl=t(8977);Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Xl.share}});var ti=t(3133);Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return ti.shareReplay}});var zs=t(5382);Object.defineProperty(e,"single",{enumerable:!0,get:function(){return zs.single}});var Qu=t(3982);Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Qu.skip}});var qs=t(9098);Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return qs.skipLast}});var $l=t(7372);Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return $l.skipUntil}});var of=t(4721);Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return of.skipWhile}});var pu=t(269);Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return pu.startWith}});var _o=t(8960);Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return _o.subscribeOn}});var wo=t(8774);Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return wo.switchAll}});var Vf=t(3879);Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Vf.switchMap}});var sf=t(3274);Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return sf.switchMapTo}});var gu=t(8712);Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return gu.switchScan}});var so=t(846);Object.defineProperty(e,"take",{enumerable:!0,get:function(){return so.take}});var Ju=t(8330);Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return Ju.takeLast}});var Kl=t(4780);Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Kl.takeUntil}});var Go=t(2129);Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Go.takeWhile}});var hs=t(3964);Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return hs.tap}});var jn=t(8941);Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return jn.throttle}});var Zr=t(7640);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Zr.throttleTime}});var Zl=t(4869);Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Zl.throwIfEmpty}});var vs=t(489);Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return vs.timeInterval}});var Dc=t(1554);Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return Dc.timeout}});var Oa=t(4862);Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return Oa.timeoutWith}});var el=t(6505);Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return el.timestamp}});var uf=t(2343);Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return uf.toArray}});var Ql=t(5477);Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Ql.window}});var tl=t(6746);Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return tl.windowCount}});var wi=t(8208);Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return wi.windowTime}});var Jl=t(6637);Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Jl.windowToggle}});var aa=t(1141);Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return aa.windowWhen}});var yu=t(5442);Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return yu.withLatestFrom}});var lf=t(187);Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return lf.zipAll}});var ya=t(8538);Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ya.zipWith}})},8831:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bufferWhen=void 0;var n=t(7843),i=t(1342),a=t(3111),o=t(9445);e.bufferWhen=function(s){return n.operate(function(u,l){var c=null,f=null,d=function(){f==null||f.unsubscribe();var h=c;c=[],h&&l.next(h),o.innerFrom(s()).subscribe(f=a.createOperatorSubscriber(l,d,i.noop))};d(),u.subscribe(a.createOperatorSubscriber(l,function(h){return c==null?void 0:c.push(h)},function(){c&&l.next(c),l.complete()},void 0,function(){return c=f=null}))})}},8888:(r,e,t)=>{var n=t(5636).Buffer,i=n.isEncoding||function(p){switch((p=""+p)&&p.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 a(p){var g;switch(this.encoding=(function(y){var b=(function(_){if(!_)return"utf8";for(var m;;)switch(_){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 _;default:if(m)return;_=(""+_).toLowerCase(),m=!0}})(y);if(typeof b!="string"&&(n.isEncoding===i||!i(y)))throw new Error("Unknown encoding: "+y);return b||y})(p),this.encoding){case"utf16le":this.text=u,this.end=l,g=4;break;case"utf8":this.fillLast=s,g=4;break;case"base64":this.text=c,this.end=f,g=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(g)}function o(p){return p<=127?0:p>>5==6?2:p>>4==14?3:p>>3==30?4:p>>6==2?-1:-2}function s(p){var g=this.lastTotal-this.lastNeed,y=(function(b,_){if((192&_[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&_.length>1){if((192&_[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&_.length>2&&(192&_[2])!=128)return b.lastNeed=2,"�"}})(this,p);return y!==void 0?y:this.lastNeed<=p.length?(p.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(p.copy(this.lastChar,g,0,p.length),void(this.lastNeed-=p.length))}function u(p,g){if((p.length-g)%2==0){var y=p.toString("utf16le",g);if(y){var b=y.charCodeAt(y.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",g,p.length-1)}function l(p){var g=p&&p.length?this.write(p):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,y)}return g}function c(p,g){var y=(p.length-g)%3;return y===0?p.toString("base64",g):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",g,p.length-y))}function f(p){var g=p&&p.length?this.write(p):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function d(p){return p.toString(this.encoding)}function h(p){return p&&p.length?this.write(p):""}e.StringDecoder=a,a.prototype.write=function(p){if(p.length===0)return"";var g,y;if(this.lastNeed){if((g=this.fillLast(p))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y=0?(O>0&&(_.lastNeed=O-1),O):--S=0?(O>0&&(_.lastNeed=O-2),O):--S=0?(O>0&&(O===2?O=0:_.lastNeed=O-3),O):0})(this,p,g);if(!this.lastNeed)return p.toString("utf8",g);this.lastTotal=y;var b=p.length-(y-this.lastNeed);return p.copy(this.lastChar,0,b),p.toString("utf8",g,b)},a.prototype.fillLast=function(p){if(this.lastNeed<=p.length)return p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,p.length),this.lastNeed-=p.length}},8917:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,n,i){this.keys=t,this.records=n,this.summary=i}},8918:function(r,e,t){var n=this&&this.__extends||(function(){var c=function(f,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},c(f,d)};return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function h(){this.constructor=f}c(f,d),f.prototype=d===null?Object.create(d):(h.prototype=d.prototype,new h)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectableObservable=void 0;var i=t(4662),a=t(8014),o=t(7561),s=t(3111),u=t(7843),l=(function(c){function f(d,h){var p=c.call(this)||this;return p.source=d,p.subjectFactory=h,p._subject=null,p._refCount=0,p._connection=null,u.hasLift(d)&&(p.lift=d.lift),p}return n(f,c),f.prototype._subscribe=function(d){return this.getSubject().subscribe(d)},f.prototype.getSubject=function(){var d=this._subject;return d&&!d.isStopped||(this._subject=this.subjectFactory()),this._subject},f.prototype._teardown=function(){this._refCount=0;var d=this._connection;this._subject=this._connection=null,d==null||d.unsubscribe()},f.prototype.connect=function(){var d=this,h=this._connection;if(!h){h=this._connection=new a.Subscription;var p=this.getSubject();h.add(this.source.subscribe(s.createOperatorSubscriber(p,void 0,function(){d._teardown(),p.complete()},function(g){d._teardown(),p.error(g)},function(){return d._teardown()}))),h.closed&&(this._connection=null,h=a.Subscription.EMPTY)}return h},f.prototype.refCount=function(){return o.refCount()(this)},f})(i.Observable);e.ConnectableObservable=l},8937:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilChanged=void 0;var n=t(6640),i=t(7843),a=t(3111);function o(s,u){return s===u}e.distinctUntilChanged=function(s,u){return u===void 0&&(u=n.identity),s=s??o,i.operate(function(l,c){var f,d=!0;l.subscribe(a.createOperatorSubscriber(c,function(h){var p=u(h);!d&&s(f,p)||(d=!1,f=p,c.next(h))}))})}},8941:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=void 0;var n=t(7843),i=t(3111),a=t(9445);e.throttle=function(o,s){return n.operate(function(u,l){var c=s??{},f=c.leading,d=f===void 0||f,h=c.trailing,p=h!==void 0&&h,g=!1,y=null,b=null,_=!1,m=function(){b==null||b.unsubscribe(),b=null,p&&(O(),_&&l.complete())},x=function(){b=null,_&&l.complete()},S=function(E){return b=a.innerFrom(o(E)).subscribe(i.createOperatorSubscriber(l,m,x))},O=function(){if(g){g=!1;var E=y;y=null,l.next(E),!_&&S(E)}};u.subscribe(i.createOperatorSubscriber(l,function(E){g=!0,y=E,(!b||b.closed)&&(d?O():S(E))},function(){_=!0,(!(p&&g&&b)||b.closed)&&l.complete()}))})}},8960:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.subscribeOn=void 0;var n=t(7843);e.subscribeOn=function(i,a){return a===void 0&&(a=0),n.operate(function(o,s){s.add(i.schedule(function(){return o.subscribe(s)},a))})}},8977:function(r,e,t){var n=this&&this.__read||function(c,f){var d=typeof Symbol=="function"&&c[Symbol.iterator];if(!d)return c;var h,p,g=d.call(c),y=[];try{for(;(f===void 0||f-- >0)&&!(h=g.next()).done;)y.push(h.value)}catch(b){p={error:b}}finally{try{h&&!h.done&&(d=g.return)&&d.call(g)}finally{if(p)throw p.error}}return y},i=this&&this.__spreadArray||function(c,f){for(var d=0,h=f.length,p=c.length;d0&&(x=new s.SafeSubscriber({next:function(H){return z.next(H)},error:function(H){P=!0,I(),S=l(k,p,H),z.error(H)},complete:function(){T=!0,I(),S=l(k,y),z.complete()}}),a.innerFrom(B).subscribe(x))})(m)}}},8986:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scheduler=void 0;var n=t(9568),i=(function(){function a(o,s){s===void 0&&(s=a.now),this.schedulerActionCtor=o,this.now=s}return a.prototype.schedule=function(o,s,u){return s===void 0&&(s=0),new this.schedulerActionCtor(this,o).schedule(u,s)},a.now=n.dateTimestampProvider.now,a})();e.Scheduler=i},8987:function(r,e,t){var n=this&&this.__extends||(function(){var S=function(O,E){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var I in P)Object.prototype.hasOwnProperty.call(P,I)&&(T[I]=P[I])},S(O,E)};return function(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=O}S(O,E),O.prototype=E===null?Object.create(E):(T.prototype=E.prototype,new T)}})(),i=this&&this.__awaiter||function(S,O,E,T){return new(E||(E=Promise))(function(P,I){function k(j){try{B(T.next(j))}catch(z){I(z)}}function L(j){try{B(T.throw(j))}catch(z){I(z)}}function B(j){var z;j.done?P(j.value):(z=j.value,z instanceof E?z:new E(function(H){H(z)})).then(k,L)}B((T=T.apply(S,O||[])).next())})},a=this&&this.__generator||function(S,O){var E,T,P,I,k={label:0,sent:function(){if(1&P[0])throw P[1];return P[1]},trys:[],ops:[]};return I={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(B){return function(j){return(function(z){if(E)throw new TypeError("Generator is already executing.");for(;I&&(I=0,z[0]&&(k=0)),k;)try{if(E=1,T&&(P=2&z[0]?T.return:z[0]?T.throw||((P=T.return)&&P.call(T),0):T.next)&&!(P=P.call(T,z[1])).done)return P;switch(T=0,P&&(z=[2&z[0],P.value]),z[0]){case 0:case 1:P=z;break;case 4:return k.label++,{value:z[1],done:!1};case 5:k.label++,T=z[1],z=[0];continue;case 7:z=k.ops.pop(),k.trys.pop();continue;default:if(!((P=(P=k.trys).length>0&&P[P.length-1])||z[0]!==6&&z[0]!==2)){k=0;continue}if(z[0]===3&&(!P||z[1]>P[0]&&z[1]0)&&!(T=I.next()).done;)k.push(T.value)}catch(L){P={error:L}}finally{try{T&&!T.done&&(E=I.return)&&E.call(I)}finally{if(P)throw P.error}}return k},s=this&&this.__spreadArray||function(S,O,E){if(E||arguments.length===2)for(var T,P=0,I=O.length;PT)},O.prototype._destroyConnection=function(E){return delete this._openConnections[E.id],E.close()},O.prototype._verifyConnectivityAndGetServerVersion=function(E){var T=E.address;return i(this,void 0,void 0,function(){var P,I;return a(this,function(k){switch(k.label){case 0:return[4,this._connectionPool.acquire({},T)];case 1:P=k.sent(),I=new c.ServerInfo(P.server,P.protocol().version),k.label=2;case 2:return k.trys.push([2,,5,7]),P.protocol().isLastMessageLogon()?[3,4]:[4,P.resetAndFlush()];case 3:k.sent(),k.label=4;case 4:return[3,7];case 5:return[4,P.release()];case 6:return k.sent(),[7];case 7:return[2,I]}})})},O.prototype._verifyAuthentication=function(E){var T=E.getAddress,P=E.auth;return i(this,void 0,void 0,function(){var I,k,L,B,j,z;return a(this,function(H){switch(H.label){case 0:I=[],H.label=1;case 1:return H.trys.push([1,8,9,11]),[4,T()];case 2:return k=H.sent(),[4,this._connectionPool.acquire({auth:P,skipReAuth:!0},k)];case 3:if(L=H.sent(),I.push(L),B=!L.protocol().isLastMessageLogon(),!L.supportsReAuth)throw(0,c.newError)("Driver is connected to a database that does not support user switch.");return B&&L.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:L,auth:P,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return H.sent(),[3,7];case 5:return!B||L.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:P},k,{requireNew:!0})];case 6:(j=H.sent())._sticky=!0,I.push(j),H.label=7;case 7:return[2,!0];case 8:if(z=H.sent(),y.includes(z.code))return[2,!1];throw z;case 9:return[4,Promise.all(I.map(function(q){return q.release()}))];case 10:return H.sent(),[7];case 11:return[2]}})})},O.prototype._verifyStickyConnection=function(E){var T=E.auth,P=E.connection;return E.address,i(this,void 0,void 0,function(){var I,k;return a(this,function(L){switch(L.label){case 0:return I=d.object.equals(T,P.authToken),k=!I,P._sticky=I&&!P.supportsReAuth,k||P._sticky?[4,P.release()]:[3,2];case 1:throw L.sent(),(0,c.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},O.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(T){return T.close()}))];case 2:return E.sent(),[2]}})})},O._installIdleObserverOnConnection=function(E,T){E._setIdle(T)},O._removeIdleObserverOnConnection=function(E){E._unsetIdle()},O.prototype._handleSecurityError=function(E,T,P){return this._authenticationProvider.handleError({connection:P,code:E.code})&&(E.retriable=!0),E.code==="Neo.ClientError.Security.AuthorizationExpired"&&this._connectionPool.apply(T,function(I){I.authToken=null}),P&&P.close().catch(function(){}),E},O})(c.ConnectionProvider);e.default=x},8995:function(r,e,t){var n=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&c[f],h=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&h>=c.length&&(c=void 0),{value:c&&c[h++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.bufferToggle=void 0;var i=t(8014),a=t(7843),o=t(9445),s=t(3111),u=t(1342),l=t(7479);e.bufferToggle=function(c,f){return a.operate(function(d,h){var p=[];o.innerFrom(c).subscribe(s.createOperatorSubscriber(h,function(g){var y=[];p.push(y);var b=new i.Subscription;b.add(o.innerFrom(f(g)).subscribe(s.createOperatorSubscriber(h,function(){l.arrRemove(p,y),h.next(y),b.unsubscribe()},u.noop)))},u.noop)),d.subscribe(s.createOperatorSubscriber(h,function(g){var y,b;try{for(var _=n(p),m=_.next();!m.done;m=_.next())m.value.push(g)}catch(x){y={error:x}}finally{try{m&&!m.done&&(b=_.return)&&b.call(_)}finally{if(y)throw y.error}}},function(){for(;p.length>0;)h.next(p.shift());h.complete()}))})}},9014:function(r,e,t){var n=this&&this.__extends||(function(){var S=function(O,E){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,P){T.__proto__=P}||function(T,P){for(var I in P)Object.prototype.hasOwnProperty.call(P,I)&&(T[I]=P[I])},S(O,E)};return function(O,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function T(){this.constructor=O}S(O,E),O.prototype=E===null?Object.create(E):(T.prototype=E.prototype,new T)}})(),i=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryObserver=e.ProcedureRouteObserver=e.RouteObserver=e.CompletedObserver=e.FailedObserver=e.ResetObserver=e.LogoffObserver=e.LoginObserver=e.ResultStreamObserver=e.StreamObserver=void 0;var a=t(9305),o=i(t(7790)),s=t(6781),u=a.internal.constants.FETCH_ALL,l=a.error.PROTOCOL_ERROR,c=(function(){function S(){}return S.prototype.onNext=function(O){},S.prototype.onError=function(O){},S.prototype.onCompleted=function(O){},S})();e.StreamObserver=c;var f=(function(S){function O(E){var T=E===void 0?{}:E,P=T.reactive,I=P!==void 0&&P,k=T.moreFunction,L=T.discardFunction,B=T.fetchSize,j=B===void 0?u:B,z=T.beforeError,H=T.afterError,q=T.beforeKeys,W=T.afterKeys,$=T.beforeComplete,J=T.afterComplete,X=T.server,Z=T.highRecordWatermark,ue=Z===void 0?Number.MAX_VALUE:Z,re=T.lowRecordWatermark,ne=re===void 0?Number.MAX_VALUE:re,le=T.enrichMetadata,ce=T.onDb,pe=S.call(this)||this;return pe._fieldKeys=null,pe._fieldLookup=null,pe._head=null,pe._queuedRecords=[],pe._tail=null,pe._error=null,pe._observers=[],pe._meta={},pe._server=X,pe._beforeError=z,pe._afterError=H,pe._beforeKeys=q,pe._afterKeys=W,pe._beforeComplete=$,pe._afterComplete=J,pe._enrichMetadata=le||s.functional.identity,pe._queryId=null,pe._moreFunction=k,pe._discardFunction=L,pe._discard=!1,pe._fetchSize=j,pe._lowRecordWatermark=ne,pe._highRecordWatermark=ue,pe._setState(I?x.READY:x.READY_STREAMING),pe._setupAutoPull(),pe._paused=!1,pe._pulled=!I,pe._haveRecordStreamed=!1,pe._onDb=ce,pe}return n(O,S),O.prototype.pause=function(){this._paused=!0},O.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},O.prototype.onNext=function(E){this._haveRecordStreamed=!0;var T=new a.Record(this._fieldKeys,E,this._fieldLookup);this._observers.some(function(P){return P.onNext})?this._observers.forEach(function(P){P.onNext&&P.onNext(T)}):(this._queuedRecords.push(T),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},O.prototype.onCompleted=function(E){this._state.onSuccess(this,E)},O.prototype.onError=function(E){this._state.onError(this,E)},O.prototype.cancel=function(){this._discard=!0},O.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(x.STREAMING)},O.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(x.SUCCEEDED)},O.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(P.type)){this._setState(x.SUCCEEDED);var I=null;this._beforeComplete&&(I=this._beforeComplete(P));var k=function(){T._tail=P,T._observers.some(function(L){return L.onCompleted})&&T._observers.forEach(function(L){L.onCompleted&&L.onCompleted(P)}),T._afterComplete&&T._afterComplete(P)};I?Promise.resolve(I).then(function(){return k()}):k()}else this.onError((0,a.newError)(`Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got '`.concat(P.type,"'"),l))},O.prototype._handleRunSuccess=function(E,T){var P=this;if(this._fieldKeys===null){if(this._fieldKeys=[],this._fieldLookup={},E.fields&&E.fields.length>0){this._fieldKeys=E.fields;for(var I=0;I0)&&!(m=S.next()).done;)O.push(m.value)}catch(E){x={error:E}}finally{try{m&&!m.done&&(_=S.return)&&_.call(S)}finally{if(x)throw x.error}}return O},i=this&&this.__spreadArray||function(y,b,_){if(_||arguments.length===2)for(var m,x=0,S=b.length;x{function t(n,i,a){return{kind:n,value:i,error:a}}Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=t("C",void 0,void 0),e.errorNotification=function(n){return t("E",void 0,n)},e.nextNotification=function(n){return t("N",n,void 0)},e.createNotification=t},9054:function(r,e,t){var n=this&&this.__extends||(function(){var b=function(_,m){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(x[O]=S[O])},b(_,m)};return function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function x(){this.constructor=_}b(_,m),_.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(b){for(var _,m=1,x=arguments.length;m{Object.defineProperty(e,"__esModule",{value:!0}),e.firstValueFrom=void 0;var n=t(2823),i=t(5);e.firstValueFrom=function(a,o){var s=typeof o=="object";return new Promise(function(u,l){var c=new i.SafeSubscriber({next:function(f){u(f),c.unsubscribe()},error:l,complete:function(){s?u(o.defaultValue):l(new n.EmptyError)}});a.subscribe(c)})}},9098:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var n=t(6640),i=t(7843),a=t(3111);e.skipLast=function(o){return o<=0?n.identity:i.operate(function(s,u){var l=new Array(o),c=0;return s.subscribe(a.createOperatorSubscriber(u,function(f){var d=c++;if(d{Object.defineProperty(e,"__esModule",{value:!0}),e.forkJoin=void 0;var n=t(4662),i=t(7360),a=t(9445),o=t(1107),s=t(3111),u=t(1251),l=t(6013);e.forkJoin=function(){for(var c=[],f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var n=t(983),i=t(1018);e.concatMap=function(a,o){return i.isFunction(o)?n.mergeMap(a,o,1):n.mergeMap(a,1)}},9137:function(r,e,t){var n=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]1||p(_,m)})})}function p(_,m){try{(x=f[_](m)).value instanceof i?Promise.resolve(x.value.v).then(g,y):b(d[0][2],x)}catch(S){b(d[0][3],S)}var x}function g(_){p("next",_)}function y(_){p("throw",_)}function b(_,m){_(m),d.shift(),d.length&&p(d[0][0],d[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var o=t(1018);e.readableStreamLikeToAsyncGenerator=function(s){return a(this,arguments,function(){var u,l,c;return n(this,function(f){switch(f.label){case 0:u=s.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,i(u.read())];case 3:return l=f.sent(),c=l.value,l.done?[4,i(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,i(c)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return u.releaseLock(),[7];case 10:return[2]}})})},e.isReadableStreamLike=function(s){return o.isFunction(s==null?void 0:s.getReader)}},9139:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var n=t(6384),i=t(7843);e.reduce=function(a,o){return i.operate(n.scanInternals(a,o,arguments.length>=2,!1,!0))}},9155:function(r,e){var t=this&&this.__read||function(i,a){var o=typeof Symbol=="function"&&i[Symbol.iterator];if(!o)return i;var s,u,l=o.call(i),c=[];try{for(;(a===void 0||a-- >0)&&!(s=l.next()).done;)c.push(s.value)}catch(f){u={error:f}}finally{try{s&&!s.done&&(o=l.return)&&o.call(l)}finally{if(u)throw u.error}}return c},n=this&&this.__spreadArray||function(i,a){for(var o=0,s=a.length,u=i.length;o{Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var n=t(3413),i=null;e.errorContext=function(a){if(n.config.useDeprecatedSynchronousErrorHandling){var o=!i;if(o&&(i={errorThrown:!1,error:null}),a(),o){var s=i,u=s.errorThrown,l=s.error;if(i=null,u)throw l}}else a()},e.captureError=function(a){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=a)}},9238:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var n=t(8918),i=t(1018),a=t(1483);e.multicast=function(o,s){var u=i.isFunction(o)?o:function(){return o};return i.isFunction(s)?a.connect(s,{connector:u}):function(l){return new n.ConnectableObservable(l,u)}}},9305:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(X,Z,ue,re){re===void 0&&(re=ue);var ne=Object.getOwnPropertyDescriptor(Z,ue);ne&&!("get"in ne?!Z.__esModule:ne.writable||ne.configurable)||(ne={enumerable:!0,get:function(){return Z[ue]}}),Object.defineProperty(X,re,ne)}:function(X,Z,ue,re){re===void 0&&(re=ue),X[re]=Z[ue]}),i=this&&this.__setModuleDefault||(Object.create?function(X,Z){Object.defineProperty(X,"default",{enumerable:!0,value:Z})}:function(X,Z){X.default=Z}),a=this&&this.__importStar||function(X){if(X&&X.__esModule)return X;var Z={};if(X!=null)for(var ue in X)ue!=="default"&&Object.prototype.hasOwnProperty.call(X,ue)&&n(Z,X,ue);return i(Z,X),Z},o=this&&this.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.EagerResult=e.Result=e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.GqlStatusObject=e.Notification=e.ServerInfo=e.queryType=e.ResultSummary=e.Record=e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=e.Time=e.LocalTime=e.LocalDateTime=e.isTime=e.isLocalTime=e.isLocalDateTime=e.isDuration=e.isDateTime=e.isDate=e.Duration=e.DateTime=e.Date=e.Point=e.isPoint=e.internal=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=e.Integer=e.error=e.isRetriableError=e.GQLError=e.newGQLError=e.Neo4jError=e.newError=e.authTokenManagers=void 0,e.resolveCertificateProvider=e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.routing=e.staticAuthTokenManager=e.bookmarkManager=e.auth=e.json=e.driver=e.types=e.Driver=e.Session=e.TransactionPromise=e.ManagedTransaction=e.Transaction=e.Connection=e.Releasable=e.ConnectionProvider=void 0;var s=t(9691);Object.defineProperty(e,"newError",{enumerable:!0,get:function(){return s.newError}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}}),Object.defineProperty(e,"newGQLError",{enumerable:!0,get:function(){return s.newGQLError}}),Object.defineProperty(e,"GQLError",{enumerable:!0,get:function(){return s.GQLError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return s.isRetriableError}});var u=a(t(3371));e.Integer=u.default,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return u.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return u.isInt}}),Object.defineProperty(e,"inSafeRange",{enumerable:!0,get:function(){return u.inSafeRange}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return u.toNumber}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return u.toString}});var l=t(5459);Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return l.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return l.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return l.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return l.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return l.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return l.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return l.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return l.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return l.isTime}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return l.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return l.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return l.Time}});var c=t(1517);Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return c.Node}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return c.isNode}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return c.Relationship}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return c.isRelationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return c.UnboundRelationship}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return c.isUnboundRelationship}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return c.Path}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return c.isPath}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return c.PathSegment}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return c.isPathSegment}});var f=o(t(4820));e.Record=f.default;var d=t(7093);Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return d.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return d.Point}});var h=a(t(6033));e.ResultSummary=h.default,Object.defineProperty(e,"queryType",{enumerable:!0,get:function(){return h.queryType}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return h.ServerInfo}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return h.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return h.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return h.QueryStatistics}}),Object.defineProperty(e,"Stats",{enumerable:!0,get:function(){return h.Stats}});var p=a(t(1866));e.Notification=p.default,Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return p.GqlStatusObject}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return p.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return p.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return p.notificationSeverityLevel}});var g=t(1985);Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return g.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return g.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return g.notificationFilterMinimumSeverityLevel}});var y=o(t(9512));e.Result=y.default;var b=o(t(8917));e.EagerResult=b.default;var _=a(t(2007));e.ConnectionProvider=_.default,Object.defineProperty(e,"Releasable",{enumerable:!0,get:function(){return _.Releasable}});var m=o(t(1409));e.Connection=m.default;var x=o(t(9473));e.Transaction=x.default;var S=o(t(5909));e.ManagedTransaction=S.default;var O=o(t(4569));e.TransactionPromise=O.default;var E=o(t(5481));e.Session=E.default;var T=a(t(7264)),P=T;e.Driver=T.default,e.driver=P;var I=o(t(1967));e.auth=I.default;var k=t(6755);Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return k.bookmarkManager}});var L=t(2069);Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return L.authTokenManagers}}),Object.defineProperty(e,"staticAuthTokenManager",{enumerable:!0,get:function(){return L.staticAuthTokenManager}});var B=t(7264);Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return B.routing}});var j=a(t(6872));e.types=j;var z=a(t(4027));e.json=z;var H=o(t(1573));e.resultTransformers=H.default;var q=t(8264);Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return q.clientCertificateProviders}}),Object.defineProperty(e,"resolveCertificateProvider",{enumerable:!0,get:function(){return q.resolveCertificateProvider}});var W=a(t(6995));e.internal=W;var $={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=$;var J={authTokenManagers:L.authTokenManagers,newError:s.newError,Neo4jError:s.Neo4jError,newGQLError:s.newGQLError,GQLError:s.GQLError,isRetriableError:s.isRetriableError,error:$,Integer:u.default,int:u.int,isInt:u.isInt,inSafeRange:u.inSafeRange,toNumber:u.toNumber,toString:u.toString,internal:W,isPoint:d.isPoint,Point:d.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:h.default,queryType:h.queryType,ServerInfo:h.ServerInfo,Notification:p.default,GqlStatusObject:p.GqlStatusObject,Plan:h.Plan,ProfiledPlan:h.ProfiledPlan,QueryStatistics:h.QueryStatistics,Stats:h.Stats,Result:y.default,EagerResult:b.default,Transaction:x.default,ManagedTransaction:S.default,TransactionPromise:O.default,Session:E.default,Driver:T.default,Connection:m.default,Releasable:_.Releasable,types:j,driver:P,json:z,auth:I.default,bookmarkManager:k.bookmarkManager,routing:B.routing,resultTransformers:H.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:g.notificationFilterDisabledCategory,notificationFilterDisabledClassification:g.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:g.notificationFilterMinimumSeverityLevel,clientCertificateProviders:q.clientCertificateProviders,resolveCertificateProvider:q.resolveCertificateProvider};e.default=J},9318:(r,e)=>{e.read=function(t,n,i,a,o){var s,u,l=8*o-a-1,c=(1<>1,d=-7,h=i?o-1:0,p=i?-1:1,g=t[n+h];for(h+=p,s=g&(1<<-d)-1,g>>=-d,d+=l;d>0;s=256*s+t[n+h],h+=p,d-=8);for(u=s&(1<<-d)-1,s>>=-d,d+=a;d>0;u=256*u+t[n+h],h+=p,d-=8);if(s===0)s=1-f;else{if(s===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,a),s-=f}return(g?-1:1)*u*Math.pow(2,s-a)},e.write=function(t,n,i,a,o,s){var u,l,c,f=8*s-o-1,d=(1<>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:s-1,y=a?1:-1,b=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(l=isNaN(n)?1:0,u=d):(u=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-u))<1&&(u--,c*=2),(n+=u+h>=1?p/c:p*Math.pow(2,1-h))*c>=2&&(u++,c/=2),u+h>=d?(l=0,u=d):u+h>=1?(l=(n*c-1)*Math.pow(2,o),u+=h):(l=n*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[i+g]=255&l,g+=y,l/=256,o-=8);for(u=u<0;t[i+g]=255&u,g+=y,u/=256,f-=8);t[i+g-y]|=128*b}},9353:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defer=void 0;var n=t(4662),i=t(9445);e.defer=function(a){return new n.Observable(function(o){i.innerFrom(a()).subscribe(o)})}},9356:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var n=t(7843),i=t(3111);e.isEmpty=function(){return n.operate(function(a,o){a.subscribe(i.createOperatorSubscriber(o,function(){o.next(!1),o.complete()},function(){o.next(!0),o.complete()}))})}},9376:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.range=void 0;var n=t(4662),i=t(8616);e.range=function(a,o,s){if(o==null&&(o=a,a=0),o<=0)return i.EMPTY;var u=o+a;return new n.Observable(s?function(l){var c=a;return s.schedule(function(){c{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var n=t(3146);Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return n.audit}});var i=t(3231);Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var a=t(8015);Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return a.buffer}});var o=t(5572);Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var s=t(7210);Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var u=t(8995);Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var l=t(8831);Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=t(8118);Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var f=t(6625);Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var d=t(6728);Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var h=t(2551);Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return h.combineLatest}});var p=t(8239);Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var g=t(7601);Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return g.concat}});var y=t(8158);Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var b=t(9135);Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return b.concatMap}});var _=t(9938);Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return _.concatMapTo}});var m=t(9669);Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return m.concatWith}});var x=t(1483);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return x.connect}});var S=t(1038);Object.defineProperty(e,"count",{enumerable:!0,get:function(){return S.count}});var O=t(4461);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return O.debounce}});var E=t(8079);Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return E.debounceTime}});var T=t(378);Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return T.defaultIfEmpty}});var P=t(914);Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return P.delay}});var I=t(8766);Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return I.delayWhen}});var k=t(7441);Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return k.dematerialize}});var L=t(5365);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return L.distinct}});var B=t(8937);Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return B.distinctUntilChanged}});var j=t(9612);Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return j.distinctUntilKeyChanged}});var z=t(4520);Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return z.elementAt}});var H=t(1776);Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return H.endWith}});var q=t(5510);Object.defineProperty(e,"every",{enumerable:!0,get:function(){return q.every}});var W=t(1551);Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return W.exhaust}});var $=t(2752);Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return $.exhaustAll}});var J=t(4753);Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return J.exhaustMap}});var X=t(7661);Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return X.expand}});var Z=t(783);Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Z.filter}});var ue=t(3555);Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return ue.finalize}});var re=t(7714);Object.defineProperty(e,"find",{enumerable:!0,get:function(){return re.find}});var ne=t(9756);Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return ne.findIndex}});var le=t(8275);Object.defineProperty(e,"first",{enumerable:!0,get:function(){return le.first}});var ce=t(7815);Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return ce.groupBy}});var pe=t(490);Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return pe.ignoreElements}});var fe=t(9356);Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return fe.isEmpty}});var se=t(8669);Object.defineProperty(e,"last",{enumerable:!0,get:function(){return se.last}});var de=t(5471);Object.defineProperty(e,"map",{enumerable:!0,get:function(){return de.map}});var ge=t(3218);Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return ge.mapTo}});var Oe=t(2360);Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Oe.materialize}});var ke=t(1415);Object.defineProperty(e,"max",{enumerable:!0,get:function(){return ke.max}});var De=t(361);Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return De.merge}});var Ne=t(7302);Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return Ne.mergeAll}});var Ce=t(6902);Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return Ce.flatMap}});var Y=t(983);Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Y.mergeMap}});var Q=t(6586);Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return Q.mergeMapTo}});var ie=t(4408);Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ie.mergeScan}});var we=t(8253);Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return we.mergeWith}});var Ee=t(2669);Object.defineProperty(e,"min",{enumerable:!0,get:function(){return Ee.min}});var Me=t(9247);Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Me.multicast}});var Ie=t(5184);Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Ie.observeOn}});var Ye=t(1226);Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Ye.onErrorResumeNext}});var ot=t(1518);Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return ot.pairwise}});var mt=t(2171);Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return mt.partition}});var wt=t(4912);Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return wt.pluck}});var Mt=t(766);Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return Mt.publish}});var Dt=t(7220);Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Dt.publishBehavior}});var vt=t(6106);Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var tt=t(8157);Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return tt.publishReplay}});var _e=t(4440);Object.defineProperty(e,"race",{enumerable:!0,get:function(){return _e.race}});var Ue=t(5600);Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Ue.raceWith}});var Qe=t(9139);Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Qe.reduce}});var Ze=t(8522);Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Ze.repeat}});var nt=t(6566);Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return nt.repeatWhen}});var It=t(7835);Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return It.retry}});var ct=t(9843);Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return ct.retryWhen}});var Lt=t(7561);Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return Lt.refCount}});var Rt=t(1731);Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Rt.sample}});var jt=t(6086);Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return jt.sampleTime}});var Yt=t(8624);Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Yt.scan}});var sr=t(582);Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return sr.sequenceEqual}});var Ut=t(8977);Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Ut.share}});var Rr=t(3133);Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Rr.shareReplay}});var Xt=t(5382);Object.defineProperty(e,"single",{enumerable:!0,get:function(){return Xt.single}});var Vr=t(3982);Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Vr.skip}});var Br=t(9098);Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Br.skipLast}});var mr=t(7372);Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return mr.skipUntil}});var ur=t(4721);Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return ur.skipWhile}});var sn=t(269);Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return sn.startWith}});var Fr=t(8960);Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Fr.subscribeOn}});var un=t(8774);Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return un.switchAll}});var bn=t(3879);Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return bn.switchMap}});var wn=t(3274);Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return wn.switchMapTo}});var _n=t(8712);Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return _n.switchScan}});var xn=t(846);Object.defineProperty(e,"take",{enumerable:!0,get:function(){return xn.take}});var on=t(8330);Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return on.takeLast}});var Nn=t(4780);Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Nn.takeUntil}});var fi=t(2129);Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return fi.takeWhile}});var gn=t(3964);Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return gn.tap}});var yn=t(8941);Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return yn.throttle}});var Jn=t(7640);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Jn.throttleTime}});var _i=t(4869);Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return _i.throwIfEmpty}});var Ir=t(489);Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Ir.timeInterval}});var pa=t(1554);Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return pa.timeout}});var di=t(4862);Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return di.timeoutWith}});var Bt=t(6505);Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Bt.timestamp}});var hr=t(2343);Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return hr.toArray}});var ei=t(5477);Object.defineProperty(e,"window",{enumerable:!0,get:function(){return ei.window}});var Hn=t(6746);Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Hn.windowCount}});var fs=t(8208);Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return fs.windowTime}});var Na=t(6637);Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Na.windowToggle}});var ki=t(1141);Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return ki.windowWhen}});var Wr=t(5442);Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return Wr.withLatestFrom}});var Nr=t(5918);Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Nr.zip}});var na=t(187);Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return na.zipAll}});var Fs=t(8538);Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Fs.zipWith}})},9445:function(r,e,t){var n=this&&this.__awaiter||function(T,P,I,k){return new(I||(I=Promise))(function(L,B){function j(q){try{H(k.next(q))}catch(W){B(W)}}function z(q){try{H(k.throw(q))}catch(W){B(W)}}function H(q){var W;q.done?L(q.value):(W=q.value,W instanceof I?W:new I(function($){$(W)})).then(j,z)}H((k=k.apply(T,P||[])).next())})},i=this&&this.__generator||function(T,P){var I,k,L,B,j={label:0,sent:function(){if(1&L[0])throw L[1];return L[1]},trys:[],ops:[]};return B={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function z(H){return function(q){return(function(W){if(I)throw new TypeError("Generator is already executing.");for(;j;)try{if(I=1,k&&(L=2&W[0]?k.return:W[0]?k.throw||((L=k.return)&&L.call(k),0):k.next)&&!(L=L.call(k,W[1])).done)return L;switch(k=0,L&&(W=[2&W[0],L.value]),W[0]){case 0:case 1:L=W;break;case 4:return j.label++,{value:W[1],done:!1};case 5:j.label++,k=W[1],W=[0];continue;case 7:W=j.ops.pop(),j.trys.pop();continue;default:if(!((L=(L=j.trys).length>0&&L[L.length-1])||W[0]!==6&&W[0]!==2)){j=0;continue}if(W[0]===3&&(!L||W[1]>L[0]&&W[1]=T.length&&(T=void 0),{value:T&&T[k++],done:!T}}};throw new TypeError(P?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var s=t(8046),u=t(7629),l=t(4662),c=t(1116),f=t(1358),d=t(7614),h=t(6368),p=t(9137),g=t(1018),y=t(7315),b=t(3327);function _(T){return new l.Observable(function(P){var I=T[b.observable]();if(g.isFunction(I.subscribe))return I.subscribe(P);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function m(T){return new l.Observable(function(P){for(var I=0;I0&&S[S.length-1])||k[0]!==6&&k[0]!==2)){E=0;continue}if(k[0]===3&&(!S||k[1]>S[0]&&k[1]0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]=y._watermarks.high,I=T<=y._watermarks.low;P&&!_.paused?(_.paused=!0,_.streaming.pause()):(I&&_.paused||_.firstRun&&!P)&&(_.firstRun=!1,_.paused=!1,_.streaming.resume())}},x=function(){return i(y,void 0,void 0,function(){var O;return a(this,function(E){switch(E.label){case 0:return _.queuedObserver!==void 0?[3,2]:(_.queuedObserver=this._createQueuedResultObserver(m),O=_,[4,this._subscribe(_.queuedObserver,!0).catch(function(){})]);case 1:O.streaming=E.sent(),m(),E.label=2;case 2:return[2,_.queuedObserver]}})})},S=function(O){if(O===void 0)throw(0,l.newError)("InvalidState: Result stream finished without Summary",l.PROTOCOL_ERROR);return!0};return{next:function(){return i(y,void 0,void 0,function(){var O;return a(this,function(E){switch(E.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:_.summary}]:[4,x()];case 1:return[4,E.sent().dequeue()];case 2:return(O=E.sent()).done===!0&&(_.finished=O.done,_.summary=O.value),[2,O]}})})},return:function(O){return i(y,void 0,void 0,function(){var E,T;return a(this,function(P){switch(P.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:O??_.summary}]:((T=_.streaming)===null||T===void 0||T.cancel(),[4,x()]);case 1:return[4,P.sent().dequeueUntilDone()];case 2:return E=P.sent(),_.finished=!0,E.value=O??E.value,_.summary=E.value,[2,E]}})})},peek:function(){return i(y,void 0,void 0,function(){return a(this,function(O){switch(O.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:_.summary}]:[4,x()];case 1:return[4,O.sent().head()];case 2:return[2,O.sent()]}})})}}},g.prototype.then=function(y,b){return this._getOrCreatePromise().then(y,b)},g.prototype.catch=function(y){return this._getOrCreatePromise().catch(y)},g.prototype.finally=function(y){return this._getOrCreatePromise().finally(y)},g.prototype.subscribe=function(y){this._subscribe(y).catch(function(){})},g.prototype.isOpen=function(){return this._summary===null&&this._error===null},g.prototype._subscribe=function(y,b){b===void 0&&(b=!1);var _=this._decorateObserver(y);return this._streamObserverPromise.then(function(m){return b&&m.pause(),m.subscribe(_),m}).catch(function(m){return _.onError!=null&&_.onError(m),Promise.reject(m)})},g.prototype._decorateObserver=function(y){var b,_,m,x=this,S=(b=y.onCompleted)!==null&&b!==void 0?b:d,O=(_=y.onError)!==null&&_!==void 0?_:f,E=(m=y.onKeys)!==null&&m!==void 0?m:h;return{onNext:y.onNext!=null?y.onNext.bind(y):void 0,onKeys:function(T){return x._keys=T,E.call(y,T)},onCompleted:function(T){x._releaseConnectionAndGetSummary(T).then(function(P){return x._summary!==null?S.call(y,x._summary):(x._summary=P,S.call(y,P))}).catch(O)},onError:function(T){x._connectionHolder.releaseConnection().then(function(){(function(P,I){I!=null&&(P.stack=P.toString()+` +Error message: `).concat(j.message),c)}})(_,b),O=S.routers,E=S.readers,T=S.writers;return p(O,"routers",b),p(E,"readers",b),new f({database:y||_.db,routers:O,readers:E,writers:T,expirationTime:x,ttl:m})}function p(y,b,_){if(y.length===0)throw(0,a.newError)("Received no "+b+" from router "+_,c)}function g(y){if(!Array.isArray(y))throw new TypeError("Array expected but got: "+y);return Array.from(y)}e.default=f,e.createValidRoutingTable=h},9052:(r,e)=>{function t(n,i,a){return{kind:n,value:i,error:a}}Object.defineProperty(e,"__esModule",{value:!0}),e.createNotification=e.nextNotification=e.errorNotification=e.COMPLETE_NOTIFICATION=void 0,e.COMPLETE_NOTIFICATION=t("C",void 0,void 0),e.errorNotification=function(n){return t("E",void 0,n)},e.nextNotification=function(n){return t("N",n,void 0)},e.createNotification=t},9054:function(r,e,t){var n=this&&this.__extends||(function(){var b=function(_,m){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(x[O]=S[O])},b(_,m)};return function(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function x(){this.constructor=_}b(_,m),_.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})(),i=this&&this.__assign||function(){return i=Object.assign||function(b){for(var _,m=1,x=arguments.length;m{Object.defineProperty(e,"__esModule",{value:!0}),e.firstValueFrom=void 0;var n=t(2823),i=t(5);e.firstValueFrom=function(a,o){var s=typeof o=="object";return new Promise(function(u,l){var c=new i.SafeSubscriber({next:function(f){u(f),c.unsubscribe()},error:l,complete:function(){s?u(o.defaultValue):l(new n.EmptyError)}});a.subscribe(c)})}},9098:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.skipLast=void 0;var n=t(6640),i=t(7843),a=t(3111);e.skipLast=function(o){return o<=0?n.identity:i.operate(function(s,u){var l=new Array(o),c=0;return s.subscribe(a.createOperatorSubscriber(u,function(f){var d=c++;if(d{Object.defineProperty(e,"__esModule",{value:!0}),e.forkJoin=void 0;var n=t(4662),i=t(7360),a=t(9445),o=t(1107),s=t(3111),u=t(1251),l=t(6013);e.forkJoin=function(){for(var c=[],f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.concatMap=void 0;var n=t(983),i=t(1018);e.concatMap=function(a,o){return i.isFunction(o)?n.mergeMap(a,o,1):n.mergeMap(a,1)}},9137:function(r,e,t){var n=this&&this.__generator||function(s,u){var l,c,f,d,h={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return d={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function p(g){return function(y){return(function(b){if(l)throw new TypeError("Generator is already executing.");for(;h;)try{if(l=1,c&&(f=2&b[0]?c.return:b[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,b[1])).done)return f;switch(c=0,f&&(b=[2&b[0],f.value]),b[0]){case 0:case 1:f=b;break;case 4:return h.label++,{value:b[1],done:!1};case 5:h.label++,c=b[1],b=[0];continue;case 7:b=h.ops.pop(),h.trys.pop();continue;default:if(!((f=(f=h.trys).length>0&&f[f.length-1])||b[0]!==6&&b[0]!==2)){h=0;continue}if(b[0]===3&&(!f||b[1]>f[0]&&b[1]1||p(_,m)})})}function p(_,m){try{(x=f[_](m)).value instanceof i?Promise.resolve(x.value.v).then(g,y):b(d[0][2],x)}catch(S){b(d[0][3],S)}var x}function g(_){p("next",_)}function y(_){p("throw",_)}function b(_,m){_(m),d.shift(),d.length&&p(d[0][0],d[0][1])}};Object.defineProperty(e,"__esModule",{value:!0}),e.isReadableStreamLike=e.readableStreamLikeToAsyncGenerator=void 0;var o=t(1018);e.readableStreamLikeToAsyncGenerator=function(s){return a(this,arguments,function(){var u,l,c;return n(this,function(f){switch(f.label){case 0:u=s.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,i(u.read())];case 3:return l=f.sent(),c=l.value,l.done?[4,i(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,i(c)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return u.releaseLock(),[7];case 10:return[2]}})})},e.isReadableStreamLike=function(s){return o.isFunction(s==null?void 0:s.getReader)}},9139:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reduce=void 0;var n=t(6384),i=t(7843);e.reduce=function(a,o){return i.operate(n.scanInternals(a,o,arguments.length>=2,!1,!0))}},9155:function(r,e){var t=this&&this.__read||function(i,a){var o=typeof Symbol=="function"&&i[Symbol.iterator];if(!o)return i;var s,u,l=o.call(i),c=[];try{for(;(a===void 0||a-- >0)&&!(s=l.next()).done;)c.push(s.value)}catch(f){u={error:f}}finally{try{s&&!s.done&&(o=l.return)&&o.call(l)}finally{if(u)throw u.error}}return c},n=this&&this.__spreadArray||function(i,a){for(var o=0,s=a.length,u=i.length;o{Object.defineProperty(e,"__esModule",{value:!0}),e.captureError=e.errorContext=void 0;var n=t(3413),i=null;e.errorContext=function(a){if(n.config.useDeprecatedSynchronousErrorHandling){var o=!i;if(o&&(i={errorThrown:!1,error:null}),a(),o){var s=i,u=s.errorThrown,l=s.error;if(i=null,u)throw l}}else a()},e.captureError=function(a){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=a)}},9238:function(r,e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(o){for(var s,u=1,l=arguments.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.multicast=void 0;var n=t(8918),i=t(1018),a=t(1483);e.multicast=function(o,s){var u=i.isFunction(o)?o:function(){return o};return i.isFunction(s)?a.connect(s,{connector:u}):function(l){return new n.ConnectableObservable(l,u)}}},9305:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(X,Z,ue,re){re===void 0&&(re=ue);var ne=Object.getOwnPropertyDescriptor(Z,ue);ne&&!("get"in ne?!Z.__esModule:ne.writable||ne.configurable)||(ne={enumerable:!0,get:function(){return Z[ue]}}),Object.defineProperty(X,re,ne)}:function(X,Z,ue,re){re===void 0&&(re=ue),X[re]=Z[ue]}),i=this&&this.__setModuleDefault||(Object.create?function(X,Z){Object.defineProperty(X,"default",{enumerable:!0,value:Z})}:function(X,Z){X.default=Z}),a=this&&this.__importStar||function(X){if(X&&X.__esModule)return X;var Z={};if(X!=null)for(var ue in X)ue!=="default"&&Object.prototype.hasOwnProperty.call(X,ue)&&n(Z,X,ue);return i(Z,X),Z},o=this&&this.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.EagerResult=e.Result=e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.GqlStatusObject=e.Notification=e.ServerInfo=e.queryType=e.ResultSummary=e.Record=e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=e.Time=e.LocalTime=e.LocalDateTime=e.isTime=e.isLocalTime=e.isLocalDateTime=e.isDuration=e.isDateTime=e.isDate=e.Duration=e.DateTime=e.Date=e.Point=e.isPoint=e.internal=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=e.Integer=e.error=e.isRetriableError=e.GQLError=e.newGQLError=e.Neo4jError=e.newError=e.authTokenManagers=void 0,e.resolveCertificateProvider=e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.routing=e.staticAuthTokenManager=e.bookmarkManager=e.auth=e.json=e.driver=e.types=e.Driver=e.Session=e.TransactionPromise=e.ManagedTransaction=e.Transaction=e.Connection=e.Releasable=e.ConnectionProvider=void 0;var s=t(9691);Object.defineProperty(e,"newError",{enumerable:!0,get:function(){return s.newError}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return s.Neo4jError}}),Object.defineProperty(e,"newGQLError",{enumerable:!0,get:function(){return s.newGQLError}}),Object.defineProperty(e,"GQLError",{enumerable:!0,get:function(){return s.GQLError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return s.isRetriableError}});var u=a(t(3371));e.Integer=u.default,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return u.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return u.isInt}}),Object.defineProperty(e,"inSafeRange",{enumerable:!0,get:function(){return u.inSafeRange}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return u.toNumber}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return u.toString}});var l=t(5459);Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return l.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return l.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return l.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return l.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return l.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return l.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return l.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return l.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return l.isTime}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return l.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return l.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return l.Time}});var c=t(1517);Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return c.Node}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return c.isNode}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return c.Relationship}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return c.isRelationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return c.UnboundRelationship}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return c.isUnboundRelationship}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return c.Path}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return c.isPath}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return c.PathSegment}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return c.isPathSegment}});var f=o(t(4820));e.Record=f.default;var d=t(7093);Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return d.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return d.Point}});var h=a(t(6033));e.ResultSummary=h.default,Object.defineProperty(e,"queryType",{enumerable:!0,get:function(){return h.queryType}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return h.ServerInfo}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return h.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return h.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return h.QueryStatistics}}),Object.defineProperty(e,"Stats",{enumerable:!0,get:function(){return h.Stats}});var p=a(t(1866));e.Notification=p.default,Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return p.GqlStatusObject}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return p.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return p.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return p.notificationSeverityLevel}});var g=t(1985);Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return g.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return g.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return g.notificationFilterMinimumSeverityLevel}});var y=o(t(9512));e.Result=y.default;var b=o(t(8917));e.EagerResult=b.default;var _=a(t(2007));e.ConnectionProvider=_.default,Object.defineProperty(e,"Releasable",{enumerable:!0,get:function(){return _.Releasable}});var m=o(t(1409));e.Connection=m.default;var x=o(t(9473));e.Transaction=x.default;var S=o(t(5909));e.ManagedTransaction=S.default;var O=o(t(4569));e.TransactionPromise=O.default;var E=o(t(5481));e.Session=E.default;var T=a(t(7264)),P=T;e.Driver=T.default,e.driver=P;var I=o(t(1967));e.auth=I.default;var k=t(6755);Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return k.bookmarkManager}});var L=t(2069);Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return L.authTokenManagers}}),Object.defineProperty(e,"staticAuthTokenManager",{enumerable:!0,get:function(){return L.staticAuthTokenManager}});var B=t(7264);Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return B.routing}});var j=a(t(6872));e.types=j;var z=a(t(4027));e.json=z;var H=o(t(1573));e.resultTransformers=H.default;var q=t(8264);Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return q.clientCertificateProviders}}),Object.defineProperty(e,"resolveCertificateProvider",{enumerable:!0,get:function(){return q.resolveCertificateProvider}});var W=a(t(6995));e.internal=W;var $={SERVICE_UNAVAILABLE:s.SERVICE_UNAVAILABLE,SESSION_EXPIRED:s.SESSION_EXPIRED,PROTOCOL_ERROR:s.PROTOCOL_ERROR};e.error=$;var J={authTokenManagers:L.authTokenManagers,newError:s.newError,Neo4jError:s.Neo4jError,newGQLError:s.newGQLError,GQLError:s.GQLError,isRetriableError:s.isRetriableError,error:$,Integer:u.default,int:u.int,isInt:u.isInt,inSafeRange:u.inSafeRange,toNumber:u.toNumber,toString:u.toString,internal:W,isPoint:d.isPoint,Point:d.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:h.default,queryType:h.queryType,ServerInfo:h.ServerInfo,Notification:p.default,GqlStatusObject:p.GqlStatusObject,Plan:h.Plan,ProfiledPlan:h.ProfiledPlan,QueryStatistics:h.QueryStatistics,Stats:h.Stats,Result:y.default,EagerResult:b.default,Transaction:x.default,ManagedTransaction:S.default,TransactionPromise:O.default,Session:E.default,Driver:T.default,Connection:m.default,Releasable:_.Releasable,types:j,driver:P,json:z,auth:I.default,bookmarkManager:k.bookmarkManager,routing:B.routing,resultTransformers:H.default,notificationCategory:p.notificationCategory,notificationClassification:p.notificationClassification,notificationSeverityLevel:p.notificationSeverityLevel,notificationFilterDisabledCategory:g.notificationFilterDisabledCategory,notificationFilterDisabledClassification:g.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:g.notificationFilterMinimumSeverityLevel,clientCertificateProviders:q.clientCertificateProviders,resolveCertificateProvider:q.resolveCertificateProvider};e.default=J},9318:(r,e)=>{e.read=function(t,n,i,a,o){var s,u,l=8*o-a-1,c=(1<>1,d=-7,h=i?o-1:0,p=i?-1:1,g=t[n+h];for(h+=p,s=g&(1<<-d)-1,g>>=-d,d+=l;d>0;s=256*s+t[n+h],h+=p,d-=8);for(u=s&(1<<-d)-1,s>>=-d,d+=a;d>0;u=256*u+t[n+h],h+=p,d-=8);if(s===0)s=1-f;else{if(s===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,a),s-=f}return(g?-1:1)*u*Math.pow(2,s-a)},e.write=function(t,n,i,a,o,s){var u,l,c,f=8*s-o-1,d=(1<>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:s-1,y=a?1:-1,b=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(l=isNaN(n)?1:0,u=d):(u=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-u))<1&&(u--,c*=2),(n+=u+h>=1?p/c:p*Math.pow(2,1-h))*c>=2&&(u++,c/=2),u+h>=d?(l=0,u=d):u+h>=1?(l=(n*c-1)*Math.pow(2,o),u+=h):(l=n*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[i+g]=255&l,g+=y,l/=256,o-=8);for(u=u<0;t[i+g]=255&u,g+=y,u/=256,f-=8);t[i+g-y]|=128*b}},9353:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defer=void 0;var n=t(4662),i=t(9445);e.defer=function(a){return new n.Observable(function(o){i.innerFrom(a()).subscribe(o)})}},9356:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=void 0;var n=t(7843),i=t(3111);e.isEmpty=function(){return n.operate(function(a,o){a.subscribe(i.createOperatorSubscriber(o,function(){o.next(!1),o.complete()},function(){o.next(!0),o.complete()}))})}},9376:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.range=void 0;var n=t(4662),i=t(8616);e.range=function(a,o,s){if(o==null&&(o=a,a=0),o<=0)return i.EMPTY;var u=o+a;return new n.Observable(s?function(l){var c=a;return s.schedule(function(){c{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var n=t(3146);Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return n.audit}});var i=t(3231);Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var a=t(8015);Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return a.buffer}});var o=t(5572);Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var s=t(7210);Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var u=t(8995);Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var l=t(8831);Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return l.bufferWhen}});var c=t(8118);Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return c.catchError}});var f=t(6625);Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var d=t(6728);Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return d.combineLatestAll}});var h=t(2551);Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return h.combineLatest}});var p=t(8239);Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var g=t(7601);Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return g.concat}});var y=t(8158);Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return y.concatAll}});var b=t(9135);Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return b.concatMap}});var _=t(9938);Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return _.concatMapTo}});var m=t(9669);Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return m.concatWith}});var x=t(1483);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return x.connect}});var S=t(1038);Object.defineProperty(e,"count",{enumerable:!0,get:function(){return S.count}});var O=t(4461);Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return O.debounce}});var E=t(8079);Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return E.debounceTime}});var T=t(378);Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return T.defaultIfEmpty}});var P=t(914);Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return P.delay}});var I=t(8766);Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return I.delayWhen}});var k=t(7441);Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return k.dematerialize}});var L=t(5365);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return L.distinct}});var B=t(8937);Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return B.distinctUntilChanged}});var j=t(9612);Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return j.distinctUntilKeyChanged}});var z=t(4520);Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return z.elementAt}});var H=t(1776);Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return H.endWith}});var q=t(5510);Object.defineProperty(e,"every",{enumerable:!0,get:function(){return q.every}});var W=t(1551);Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return W.exhaust}});var $=t(2752);Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return $.exhaustAll}});var J=t(4753);Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return J.exhaustMap}});var X=t(7661);Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return X.expand}});var Z=t(783);Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Z.filter}});var ue=t(3555);Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return ue.finalize}});var re=t(7714);Object.defineProperty(e,"find",{enumerable:!0,get:function(){return re.find}});var ne=t(9756);Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return ne.findIndex}});var le=t(8275);Object.defineProperty(e,"first",{enumerable:!0,get:function(){return le.first}});var ce=t(7815);Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return ce.groupBy}});var pe=t(490);Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return pe.ignoreElements}});var fe=t(9356);Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return fe.isEmpty}});var se=t(8669);Object.defineProperty(e,"last",{enumerable:!0,get:function(){return se.last}});var de=t(5471);Object.defineProperty(e,"map",{enumerable:!0,get:function(){return de.map}});var ge=t(3218);Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return ge.mapTo}});var Oe=t(2360);Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Oe.materialize}});var ke=t(1415);Object.defineProperty(e,"max",{enumerable:!0,get:function(){return ke.max}});var De=t(361);Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return De.merge}});var Ne=t(7302);Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return Ne.mergeAll}});var Te=t(6902);Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return Te.flatMap}});var Y=t(983);Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return Y.mergeMap}});var Q=t(6586);Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return Q.mergeMapTo}});var ie=t(4408);Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ie.mergeScan}});var we=t(8253);Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return we.mergeWith}});var Ee=t(2669);Object.defineProperty(e,"min",{enumerable:!0,get:function(){return Ee.min}});var Me=t(9247);Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Me.multicast}});var Ie=t(5184);Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Ie.observeOn}});var Ye=t(1226);Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return Ye.onErrorResumeNext}});var ot=t(1518);Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return ot.pairwise}});var mt=t(2171);Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return mt.partition}});var wt=t(4912);Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return wt.pluck}});var Mt=t(766);Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return Mt.publish}});var Dt=t(7220);Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Dt.publishBehavior}});var vt=t(6106);Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var tt=t(8157);Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return tt.publishReplay}});var _e=t(4440);Object.defineProperty(e,"race",{enumerable:!0,get:function(){return _e.race}});var Ue=t(5600);Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Ue.raceWith}});var Qe=t(9139);Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Qe.reduce}});var Ze=t(8522);Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return Ze.repeat}});var nt=t(6566);Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return nt.repeatWhen}});var It=t(7835);Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return It.retry}});var ct=t(9843);Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return ct.retryWhen}});var Lt=t(7561);Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return Lt.refCount}});var Rt=t(1731);Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Rt.sample}});var jt=t(6086);Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return jt.sampleTime}});var Yt=t(8624);Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Yt.scan}});var sr=t(582);Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return sr.sequenceEqual}});var Ut=t(8977);Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Ut.share}});var Rr=t(3133);Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Rr.shareReplay}});var Xt=t(5382);Object.defineProperty(e,"single",{enumerable:!0,get:function(){return Xt.single}});var Vr=t(3982);Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Vr.skip}});var Br=t(9098);Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Br.skipLast}});var mr=t(7372);Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return mr.skipUntil}});var ur=t(4721);Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return ur.skipWhile}});var sn=t(269);Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return sn.startWith}});var Fr=t(8960);Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Fr.subscribeOn}});var un=t(8774);Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return un.switchAll}});var bn=t(3879);Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return bn.switchMap}});var wn=t(3274);Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return wn.switchMapTo}});var _n=t(8712);Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return _n.switchScan}});var xn=t(846);Object.defineProperty(e,"take",{enumerable:!0,get:function(){return xn.take}});var on=t(8330);Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return on.takeLast}});var Nn=t(4780);Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return Nn.takeUntil}});var fi=t(2129);Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return fi.takeWhile}});var gn=t(3964);Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return gn.tap}});var yn=t(8941);Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return yn.throttle}});var Jn=t(7640);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Jn.throttleTime}});var _i=t(4869);Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return _i.throwIfEmpty}});var Ir=t(489);Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Ir.timeInterval}});var pa=t(1554);Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return pa.timeout}});var di=t(4862);Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return di.timeoutWith}});var Bt=t(6505);Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Bt.timestamp}});var hr=t(2343);Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return hr.toArray}});var ei=t(5477);Object.defineProperty(e,"window",{enumerable:!0,get:function(){return ei.window}});var Hn=t(6746);Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Hn.windowCount}});var fs=t(8208);Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return fs.windowTime}});var Na=t(6637);Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Na.windowToggle}});var ki=t(1141);Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return ki.windowWhen}});var Wr=t(5442);Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return Wr.withLatestFrom}});var Nr=t(5918);Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return Nr.zip}});var na=t(187);Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return na.zipAll}});var Fs=t(8538);Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return Fs.zipWith}})},9445:function(r,e,t){var n=this&&this.__awaiter||function(T,P,I,k){return new(I||(I=Promise))(function(L,B){function j(q){try{H(k.next(q))}catch(W){B(W)}}function z(q){try{H(k.throw(q))}catch(W){B(W)}}function H(q){var W;q.done?L(q.value):(W=q.value,W instanceof I?W:new I(function($){$(W)})).then(j,z)}H((k=k.apply(T,P||[])).next())})},i=this&&this.__generator||function(T,P){var I,k,L,B,j={label:0,sent:function(){if(1&L[0])throw L[1];return L[1]},trys:[],ops:[]};return B={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function z(H){return function(q){return(function(W){if(I)throw new TypeError("Generator is already executing.");for(;j;)try{if(I=1,k&&(L=2&W[0]?k.return:W[0]?k.throw||((L=k.return)&&L.call(k),0):k.next)&&!(L=L.call(k,W[1])).done)return L;switch(k=0,L&&(W=[2&W[0],L.value]),W[0]){case 0:case 1:L=W;break;case 4:return j.label++,{value:W[1],done:!1};case 5:j.label++,k=W[1],W=[0];continue;case 7:W=j.ops.pop(),j.trys.pop();continue;default:if(!((L=(L=j.trys).length>0&&L[L.length-1])||W[0]!==6&&W[0]!==2)){j=0;continue}if(W[0]===3&&(!L||W[1]>L[0]&&W[1]=T.length&&(T=void 0),{value:T&&T[k++],done:!T}}};throw new TypeError(P?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.fromReadableStreamLike=e.fromAsyncIterable=e.fromIterable=e.fromPromise=e.fromArrayLike=e.fromInteropObservable=e.innerFrom=void 0;var s=t(8046),u=t(7629),l=t(4662),c=t(1116),f=t(1358),d=t(7614),h=t(6368),p=t(9137),g=t(1018),y=t(7315),b=t(3327);function _(T){return new l.Observable(function(P){var I=T[b.observable]();if(g.isFunction(I.subscribe))return I.subscribe(P);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function m(T){return new l.Observable(function(P){for(var I=0;I0&&S[S.length-1])||k[0]!==6&&k[0]!==2)){E=0;continue}if(k[0]===3&&(!S||k[1]>S[0]&&k[1]0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u0&&m[m.length-1])||P[0]!==6&&P[0]!==2)){S=0;continue}if(P[0]===3&&(!m||P[1]>m[0]&&P[1]=y._watermarks.high,I=T<=y._watermarks.low;P&&!_.paused?(_.paused=!0,_.streaming.pause()):(I&&_.paused||_.firstRun&&!P)&&(_.firstRun=!1,_.paused=!1,_.streaming.resume())}},x=function(){return i(y,void 0,void 0,function(){var O;return a(this,function(E){switch(E.label){case 0:return _.queuedObserver!==void 0?[3,2]:(_.queuedObserver=this._createQueuedResultObserver(m),O=_,[4,this._subscribe(_.queuedObserver,!0).catch(function(){})]);case 1:O.streaming=E.sent(),m(),E.label=2;case 2:return[2,_.queuedObserver]}})})},S=function(O){if(O===void 0)throw(0,l.newError)("InvalidState: Result stream finished without Summary",l.PROTOCOL_ERROR);return!0};return{next:function(){return i(y,void 0,void 0,function(){var O;return a(this,function(E){switch(E.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:_.summary}]:[4,x()];case 1:return[4,E.sent().dequeue()];case 2:return(O=E.sent()).done===!0&&(_.finished=O.done,_.summary=O.value),[2,O]}})})},return:function(O){return i(y,void 0,void 0,function(){var E,T;return a(this,function(P){switch(P.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:O??_.summary}]:((T=_.streaming)===null||T===void 0||T.cancel(),[4,x()]);case 1:return[4,P.sent().dequeueUntilDone()];case 2:return E=P.sent(),_.finished=!0,E.value=O??E.value,_.summary=E.value,[2,E]}})})},peek:function(){return i(y,void 0,void 0,function(){return a(this,function(O){switch(O.label){case 0:return _.finished&&S(_.summary)?[2,{done:!0,value:_.summary}]:[4,x()];case 1:return[4,O.sent().head()];case 2:return[2,O.sent()]}})})}}},g.prototype.then=function(y,b){return this._getOrCreatePromise().then(y,b)},g.prototype.catch=function(y){return this._getOrCreatePromise().catch(y)},g.prototype.finally=function(y){return this._getOrCreatePromise().finally(y)},g.prototype.subscribe=function(y){this._subscribe(y).catch(function(){})},g.prototype.isOpen=function(){return this._summary===null&&this._error===null},g.prototype._subscribe=function(y,b){b===void 0&&(b=!1);var _=this._decorateObserver(y);return this._streamObserverPromise.then(function(m){return b&&m.pause(),m.subscribe(_),m}).catch(function(m){return _.onError!=null&&_.onError(m),Promise.reject(m)})},g.prototype._decorateObserver=function(y){var b,_,m,x=this,S=(b=y.onCompleted)!==null&&b!==void 0?b:d,O=(_=y.onError)!==null&&_!==void 0?_:f,E=(m=y.onKeys)!==null&&m!==void 0?m:h;return{onNext:y.onNext!=null?y.onNext.bind(y):void 0,onKeys:function(T){return x._keys=T,E.call(y,T)},onCompleted:function(T){x._releaseConnectionAndGetSummary(T).then(function(P){return x._summary!==null?S.call(y,x._summary):(x._summary=P,S.call(y,P))}).catch(O)},onError:function(T){x._connectionHolder.releaseConnection().then(function(){(function(P,I){I!=null&&(P.stack=P.toString()+` `+I)})(T,x._stack),x._error=T,O.call(y,T)}).catch(O)}}},g.prototype._cancel=function(){this._summary===null&&this._error===null&&this._streamObserverPromise.then(function(y){return y.cancel()}).catch(function(){})},g.prototype._releaseConnectionAndGetSummary=function(y){var b=u.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),_=b.validatedQuery,m=b.params,x=this._connectionHolder;return x.getConnection().then(function(S){return x.releaseConnection().then(function(){return S==null?void 0:S.getProtocolVersion()})},function(S){}).then(function(S){return new s.default(_,m,y,S)})},g.prototype._createQueuedResultObserver=function(y){var b=this;function _(){var T={};return T.promise=new Promise(function(P,I){T.resolve=P,T.reject=I}),T}function m(T){return T instanceof Error}function x(){var T;return i(this,void 0,void 0,function(){var P;return a(this,function(I){switch(I.label){case 0:if(S.length>0){if(P=(T=S.shift())!==null&&T!==void 0?T:(0,l.newError)("Unexpected empty buffer",l.PROTOCOL_ERROR),y(),m(P))throw P;return[2,P]}return O.resolvable=_(),[4,O.resolvable.promise];case 1:return[2,I.sent()]}})})}var S=[],O={resolvable:null},E={onNext:function(T){E._push({done:!1,value:T})},onCompleted:function(T){E._push({done:!0,value:T})},onError:function(T){E._push(T)},_push:function(T){if(O.resolvable!==null){var P=O.resolvable;O.resolvable=null,m(T)?P.reject(T):P.resolve(T)}else S.push(T),y()},dequeue:x,dequeueUntilDone:function(){return i(b,void 0,void 0,function(){var T;return a(this,function(P){switch(P.label){case 0:return[4,x()];case 1:return(T=P.sent()).done===!0?[2,T]:[3,0];case 2:return[2]}})})},head:function(){return i(b,void 0,void 0,function(){var T,P;return a(this,function(I){switch(I.label){case 0:if(S.length>0){if(m(T=S[0]))throw T;return[2,T]}O.resolvable=_(),I.label=1;case 1:return I.trys.push([1,3,4,5]),[4,O.resolvable.promise];case 2:return T=I.sent(),S.unshift(T),[2,T];case 3:throw P=I.sent(),S.unshift(P),P;case 4:return y(),[7];case 5:return[2]}})})},get size(){return S.length}};return E},g})();n=Symbol.toStringTag,e.default=p},9567:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleObservable=void 0;var n=t(9445),i=t(5184),a=t(8960);e.scheduleObservable=function(o,s){return n.innerFrom(o).pipe(a.subscribeOn(s),i.observeOn(s))}},9568:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},9589:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.schedulePromise=void 0;var n=t(9445),i=t(5184),a=t(8960);e.schedulePromise=function(o,s){return n.innerFrom(o).pipe(a.subscribeOn(s),i.observeOn(s))}},9612:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.distinctUntilKeyChanged=void 0;var n=t(8937);e.distinctUntilKeyChanged=function(i,a){return n.distinctUntilChanged(function(o,s){return a?a(o[i],s[i]):o[i]===s[i]})}},9669:function(r,e,t){var n=this&&this.__read||function(o,s){var u=typeof Symbol=="function"&&o[Symbol.iterator];if(!u)return o;var l,c,f=u.call(o),d=[];try{for(;(s===void 0||s-- >0)&&!(l=f.next()).done;)d.push(l.value)}catch(h){c={error:h}}finally{try{l&&!l.done&&(u=f.return)&&u.call(f)}finally{if(c)throw c.error}}return d},i=this&&this.__spreadArray||function(o,s){for(var u=0,l=s.length,c=o.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUnsubscribedError=void 0;var n=t(5568);e.ObjectUnsubscribedError=n.createErrorClass(function(i){return function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})},9689:function(r,e,t){var n=this&&this.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingConnectionProvider=e.DirectConnectionProvider=e.PooledConnectionProvider=e.SingleConnectionProvider=void 0;var i=t(4132);Object.defineProperty(e,"SingleConnectionProvider",{enumerable:!0,get:function(){return n(i).default}});var a=t(8987);Object.defineProperty(e,"PooledConnectionProvider",{enumerable:!0,get:function(){return n(a).default}});var o=t(3545);Object.defineProperty(e,"DirectConnectionProvider",{enumerable:!0,get:function(){return n(o).default}});var s=t(7428);Object.defineProperty(e,"RoutingConnectionProvider",{enumerable:!0,get:function(){return n(s).default}})},9691:function(r,e,t){var n=this&&this.__extends||(function(){var y=function(b,_){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,x){m.__proto__=x}||function(m,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(m[S]=x[S])},y(b,_)};return function(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function m(){this.constructor=b}y(b,_),b.prototype=_===null?Object.create(_):(m.prototype=_.prototype,new m)}})(),i=this&&this.__createBinding||(Object.create?function(y,b,_,m){m===void 0&&(m=_);var x=Object.getOwnPropertyDescriptor(b,_);x&&!("get"in x?!b.__esModule:x.writable||x.configurable)||(x={enumerable:!0,get:function(){return b[_]}}),Object.defineProperty(y,m,x)}:function(y,b,_,m){m===void 0&&(m=_),y[m]=b[_]}),a=this&&this.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),o=this&&this.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var _ in y)_!=="default"&&Object.prototype.hasOwnProperty.call(y,_)&&i(b,y,_);return a(b,y),b};Object.defineProperty(e,"__esModule",{value:!0}),e.PROTOCOL_ERROR=e.SESSION_EXPIRED=e.SERVICE_UNAVAILABLE=e.GQLError=e.Neo4jError=e.isRetriableError=e.newGQLError=e.newError=void 0;var s=o(t(4027)),u=t(1053),l={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"};Object.freeze(l);var c=Object.values(l),f="ServiceUnavailable";e.SERVICE_UNAVAILABLE=f;var d="SessionExpired";e.SESSION_EXPIRED=d,e.PROTOCOL_ERROR="ProtocolError";var h=(function(y){function b(_,m,x,S,O){var E,T=this;return(T=y.call(this,_,O!=null?{cause:O}:void 0)||this).constructor=b,T.__proto__=b.prototype,T.cause=O??void 0,T.gqlStatus=m,T.gqlStatusDescription=x,T.diagnosticRecord=S,T.classification=(function(P){return P===void 0||P._classification===void 0?"UNKNOWN":c.includes(P._classification)?P==null?void 0:P._classification:"UNKNOWN"})(T.diagnosticRecord),T.rawClassification=(E=S==null?void 0:S._classification)!==null&&E!==void 0?E:void 0,T.name="GQLError",T}return n(b,y),Object.defineProperty(b.prototype,"diagnosticRecordAsJsonString",{get:function(){return s.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),b})(Error);e.GQLError=h;var p=(function(y){function b(_,m,x,S,O,E){var T=y.call(this,_,x,S,O,E)||this;return T.constructor=b,T.__proto__=b.prototype,T.code=m,T.name="Neo4jError",T.retriable=(function(P){return P===f||P===d||(function(I){return I==="Neo.ClientError.Security.AuthorizationExpired"})(P)||(function(I){return(I==null?void 0:I.includes("TransientError"))===!0})(P)})(m),T}return n(b,y),b.isRetriable=function(_){return _!=null&&_ instanceof b&&_.retriable},b})(h);e.Neo4jError=p,e.newError=function(y,b,_,m,x,S){return new p(y,b??"N/A",m??"50N42",x??"error: general processing exception - unexpected error. "+y,S??u.rawPolyfilledDiagnosticRecord,_)},e.newGQLError=function(y,b,_,m,x){return new h(y,_??"50N42",m??"error: general processing exception - unexpected error. "+y,x??u.rawPolyfilledDiagnosticRecord,b)};var g=p.isRetriable;e.isRetriableError=g},9730:function(r,e,t){var n=this&&this.__createBinding||(Object.create?function(d,h,p,g){g===void 0&&(g=p);var y=Object.getOwnPropertyDescriptor(h,p);y&&!("get"in y?!h.__esModule:y.writable||y.configurable)||(y={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(d,g,y)}:function(d,h,p,g){g===void 0&&(g=p),d[g]=h[p]}),i=this&&this.__setModuleDefault||(Object.create?function(d,h){Object.defineProperty(d,"default",{enumerable:!0,value:h})}:function(d,h){d.default=h}),a=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var p in d)p!=="default"&&Object.prototype.hasOwnProperty.call(d,p)&&n(h,d,p);return i(h,d),h},o=this&&this.__read||function(d,h){var p=typeof Symbol=="function"&&d[Symbol.iterator];if(!p)return d;var g,y,b=p.call(d),_=[];try{for(;(h===void 0||h-- >0)&&!(g=b.next()).done;)_.push(g.value)}catch(m){y={error:m}}finally{try{g&&!g.done&&(p=b.return)&&p.call(b)}finally{if(y)throw y.error}}return _},s=this&&this.__spreadArray||function(d,h,p){if(p||arguments.length===2)for(var g,y=0,b=h.length;y{Object.defineProperty(e,"__esModule",{value:!0}),e.findIndex=void 0;var n=t(7843),i=t(7714);e.findIndex=function(a,o){return n.operate(i.createFind(a,o,"index"))}},9792:(r,e,t)=>{var n=t(7045),i=t(4360),a=t(6804);r.exports=function(o,s){if(!s)return o;var u=Object.keys(s);if(u.length===0)return o;for(var l=n(o),c=u.length-1;c>=0;c--){var f=u[c],d=String(s[f]);d&&(d=" "+d),a(l,{type:"preprocessor",data:"#define "+f+d})}return i(l)}},9823:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=t(9305),i=t(8813),a=t(9419),o=(n.internal.logger.Logger,n.error.SERVICE_UNAVAILABLE),s=(function(){function l(c){var f=c===void 0?{}:c,d=f.maxRetryTimeout,h=d===void 0?3e4:d,p=f.initialDelay,g=p===void 0?1e3:p,y=f.delayMultiplier,b=y===void 0?2:y,_=f.delayJitter,m=_===void 0?.2:_,x=f.logger,S=x===void 0?null:x;this._maxRetryTimeout=u(h,3e4),this._initialDelay=u(g,1e3),this._delayMultiplier=u(b,2),this._delayJitter=u(m,.2),this._logger=S}return l.prototype.retry=function(c){var f=this;return c.pipe((0,a.retryWhen)(function(d){var h=[],p=Date.now(),g=1,y=f._initialDelay;return d.pipe((0,a.mergeMap)(function(b){if(!(0,n.isRetriableError)(b))return(0,i.throwError)(function(){return b});if(h.push(b),g>=2&&Date.now()-p>=f._maxRetryTimeout){var _=(0,n.newError)("Failed after retried for ".concat(g," times in ").concat(f._maxRetryTimeout," ms. Make sure that your database is online and retry again."),o);return _.seenErrors=h,(0,i.throwError)(function(){return _})}var m=f._computeNextDelay(y);return y*=f._delayMultiplier,g++,f._logger&&f._logger.warn("Transaction failed and will be retried in ".concat(m)),(0,i.of)(1).pipe((0,a.delay)(m))}))}))},l.prototype._computeNextDelay=function(c){var f=c*this._delayJitter;return c-f+2*f*Math.random()},l})();function u(l,c){return l||l===0?l:c}e.default=s},9843:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retryWhen=void 0;var n=t(9445),i=t(2483),a=t(7843),o=t(3111);e.retryWhen=function(s){return a.operate(function(u,l){var c,f,d=!1,h=function(){c=u.subscribe(o.createOperatorSubscriber(l,void 0,void 0,function(p){f||(f=new i.Subject,n.innerFrom(s(f)).subscribe(o.createOperatorSubscriber(l,function(){return c?h():d=!0}))),f&&f.next(p)})),d&&(c.unsubscribe(),c=null,d=!1,h())};h()})}},9857:function(r,e,t){var n=this&&this.__extends||(function(){var o=function(s,u){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(l[f]=c[f])},o(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function l(){this.constructor=s}o(s,u),s.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}})(),i=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});var a=(function(o){function s(u,l){var c=o.call(this,l)||this;return l&&(c._originalErrorHandler=u._errorHandler,u._errorHandler=c._errorHandler),c._delegate=u,c}return n(s,o),s.prototype.beginTransaction=function(u){return this._delegate.beginTransaction(u)},s.prototype.run=function(u,l,c){return this._delegate.run(u,l,c)},s.prototype.commitTransaction=function(u){return this._delegate.commitTransaction(u)},s.prototype.rollbackTransaction=function(u){return this._delegate.rollbackTransaction(u)},s.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(s.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(u){this._delegate.databaseId=u},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(u){this._delegate.authToken=u},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"version",{get:function(){return this._delegate.version},set:function(u){this._delegate.version=u},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(u){this._delegate.idleTimestamp=u},enumerable:!1,configurable:!0}),s.prototype.isOpen=function(){return this._delegate.isOpen()},s.prototype.protocol=function(){return this._delegate.protocol()},s.prototype.connect=function(u,l,c,f){return this._delegate.connect(u,l,c,f)},s.prototype.write=function(u,l,c){return this._delegate.write(u,l,c)},s.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},s.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},s.prototype.close=function(){return this._delegate.close()},s.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},s})(i(t(6385)).default);e.default=a},9938:(r,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.concatMapTo=void 0;var n=t(9135),i=t(1018);e.concatMapTo=function(a,o){return i.isFunction(o)?n.concatMap(function(){return a},o):n.concatMap(function(){return a})}},9975:(r,e,t)=>{var n=t(7101),i=Array.prototype.concat,a=Array.prototype.slice,o=r.exports=function(s){for(var u=[],l=0,c=s.length;l{var e=r&&r.__esModule?()=>r.default:()=>r;return io.d(e,{a:e}),e},io.d=(r,e)=>{for(var t in e)io.o(e,t)&&!io.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},io.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),io.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),io.nmd=r=>(r.paths=[],r.children||(r.children=[]),r);var Hi=io(5250),pae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t])};function iE(r,e){function t(){this.constructor=r}pae(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var n_=(function(){function r(e){e===void 0&&(e="Atom@"+lu()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=ii.NOT_TRACKING}return r.prototype.onBecomeUnobserved=function(){},r.prototype.reportObserved=function(){Qz(this)},r.prototype.reportChanged=function(){Tp(),(function(e){if(e.lowestObserverState!==ii.STALE){e.lowestObserverState=ii.STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===ii.UP_TO_DATE&&(i.isTracing!==Od.NONE&&Jz(i,e),i.onBecomeStale()),i.dependenciesState=ii.STALE}}})(this),Cp()},r.prototype.toString=function(){return this.name},r})(),gae=(function(r){function e(t,n,i){t===void 0&&(t="Atom@"+lu()),n===void 0&&(n=C8),i===void 0&&(i=C8);var a=r.call(this,t)||this;return a.name=t,a.onBecomeObservedHandler=n,a.onBecomeUnobservedHandler=i,a.isPendingUnobservation=!1,a.isBeingTracked=!1,a}return iE(e,r),e.prototype.reportObserved=function(){return Tp(),r.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),Cp(),!!Er.trackingDerivation},e.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},e})(n_),kD=ly("Atom",n_);function Kg(r){return r.interceptors&&r.interceptors.length>0}function aE(r,e){var t=r.interceptors||(r.interceptors=[]);return t.push(e),BD(function(){var n=t.indexOf(e);n!==-1&&t.splice(n,1)})}function Zg(r,e){var t=cy();try{var n=r.interceptors;if(n)for(var i=0,a=n.length;i0}function oE(r,e){var t=r.changeListeners||(r.changeListeners=[]);return t.push(e),BD(function(){var n=t.indexOf(e);n!==-1&&t.splice(n,1)})}function Op(r,e){var t=cy(),n=r.changeListeners;if(n){for(var i=0,a=(n=n.slice()).length;i=this.length,value:et){for(var n=new Array(e-t),i=0;i0&&e+t+1>RM&&ID(e+t+1)},r.prototype.spliceWithArray=function(e,t,n){var i=this;zD(this.atom);var a=this.values.length;if(e===void 0?e=0:e>a?e=a:e<0&&(e=Math.max(0,a+e)),t=arguments.length===1?a-e:t==null?0:Math.max(0,Math.min(t,a-e)),n===void 0&&(n=[]),Kg(this)){var o=Zg(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return Bz;t=o.removedCount,n=o.added}var s=(n=n.map(function(l){return i.enhancer(l,void 0)})).length-t;this.updateArrayLength(a,s);var u=this.spliceItemsIntoValues(e,t,n);return t===0&&n.length===0||this.notifyArraySplice(e,n,u),this.dehanceValues(u)},r.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(i=this.values).splice.apply(i,[e,t].concat(n));var i,a=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),a},r.prototype.notifyArrayChildUpdate=function(e,t,n){var i=!this.owned&&Ul(),a=Sp(this),o=a||i?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;i&&Ad(o),this.atom.reportChanged(),a&&Op(this,o),i&&Rd()},r.prototype.notifyArraySplice=function(e,t,n){var i=!this.owned&&Ul(),a=Sp(this),o=a||i?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;i&&Ad(o),this.atom.reportChanged(),a&&Op(this,o),i&&Rd()},r})(),uv=(function(r){function e(t,n,i,a){i===void 0&&(i="ObservableArray@"+lu()),a===void 0&&(a=!1);var o=r.call(this)||this,s=new xz(i,n,o,a);return R1(o,"$mobx",s),t&&t.length&&o.spliceWithArray(0,0,t),yae&&Object.defineProperty(s.array,"0",mae),o}return iE(e,r),e.prototype.intercept=function(t){return this.$mobx.intercept(t)},e.prototype.observe=function(t,n){return n===void 0&&(n=!1),this.$mobx.observe(t,n)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var t=[],n=0;n-1&&(this.splice(n,1),!0)},e.prototype.move=function(t,n){function i(s){if(s<0)throw new Error("[mobx.array] Index out of bounds: "+s+" is negative");var u=this.$mobx.values.length;if(s>=u)throw new Error("[mobx.array] Index out of bounds: "+s+" is not smaller than "+u)}if(i.call(this,t),i.call(this,n),t!==n){var a,o=this.$mobx.values;a=tr.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0&&arguments[0],n=this.state,i=n.nodes,a=n.rels,o=i.channels[im],s=a.channels[im],u=Object.values(o.adds).length,l=Object.values(s.adds).length,c=Object.values(o.adds).map(function(P){return P.id}),f=Object.values(s.adds).map(function(P){return P.id}),d=new Set(Object.keys(o.adds)),h=new Set(Object.keys(s.adds));if(i.clearChannel(im),a.clearChannel(im),this.currentLayoutType===Cw&&this.enableCytoscape&&i.items.length<=100&&u<100&&u>0&&l>0){var p=i.items.map(function(P){return P.id}),g=new Set([].concat(Tw(p),Tw(c))),y=a.items.map(function(P){return P.id}),b=new Set([].concat(Tw(y),Tw(f)));if(g.size<=100&&b.size<=300){var _=(function(P,I,k,L){var B,j=new Set(P),z=Z0(new Set(I));try{for(z.s();!(B=z.n()).done;){var H=B.value,q=L.idToItem[H];if(q){var W=q.from,$=q.to;j.add(W),j.add($)}}}catch(pe){z.e(pe)}finally{z.f()}var J,X=(function(pe){var fe,se={},de={},ge=Z0(pe);try{for(ge.s();!(fe=ge.n()).done;){for(var Oe=fe.value,ke=Oe.from,De=Oe.to,Ne="".concat(ke,"-").concat(De),Ce="".concat(De,"-").concat(ke),Y=0,Q=[Ne,Ce];Y0;){var se=fe.shift();if(re[se]=k.idToItem[se],Z[se]!==void 0){var de,ge=Z0(Z[se]);try{for(ge.s();!(de=ge.n()).done;){var Oe=de.value;if(!re[Oe]){fe.push(Oe);var ke=ue["".concat(se,"-").concat(Oe)];if(ke){var De,Ne=Z0(ke);try{for(Ne.s();!(De=Ne.n()).done;){var Ce=De.value;ne[Ce.id]||(ne[Ce.id]=Ce)}}catch(Y){Ne.e(Y)}finally{Ne.f()}}}}}catch(Y){ge.e(Y)}finally{ge.f()}}}},ce=Z0(j);try{for(ce.s();!(J=ce.n()).done;)le(J.value)}catch(pe){ce.e(pe)}finally{ce.f()}return{connectedNodes:re,connectedRels:ne}})(d,h,i,a),m=_.connectedNodes,x=_.connectedRels,S=Object.values(m),O=Object.values(x),E=S.length,T=O.length;E===d.size&&T===h.size&&(h.size>0||d.size>0)?(this.setLayout(Aw),this.coseBilkentLayout.update(!0,i.items,a.items)):T>0&&h.size/T>.25&&(this.setLayout(Aw),this.coseBilkentLayout.update(!0,S,O))}}this.physLayout.update(t),this.coseBilkentLayout.update(t)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(t){this.setLayout(Cw),this.physLayout.updateNodes(t)}},{key:"getNodePositions",value:function(t){return this.currentLayout.getNodePositions(t)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],e&&Poe(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function qb(r){return qb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qb(r)}function aB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Doe(r){for(var e=1;e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function SP(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0&&arguments[0],n=this.state,i=n.nodes,a=n.rels,o=i.channels[im],s=a.channels[im],u=Object.values(o.adds).length,l=Object.values(s.adds).length,c=Object.values(o.adds).map(function(P){return P.id}),f=Object.values(s.adds).map(function(P){return P.id}),d=new Set(Object.keys(o.adds)),h=new Set(Object.keys(s.adds));if(i.clearChannel(im),a.clearChannel(im),this.currentLayoutType===Cw&&this.enableCytoscape&&i.items.length<=100&&u<100&&u>0&&l>0){var p=i.items.map(function(P){return P.id}),g=new Set([].concat(Tw(p),Tw(c))),y=a.items.map(function(P){return P.id}),b=new Set([].concat(Tw(y),Tw(f)));if(g.size<=100&&b.size<=300){var _=(function(P,I,k,L){var B,j=new Set(P),z=Z0(new Set(I));try{for(z.s();!(B=z.n()).done;){var H=B.value,q=L.idToItem[H];if(q){var W=q.from,$=q.to;j.add(W),j.add($)}}}catch(pe){z.e(pe)}finally{z.f()}var J,X=(function(pe){var fe,se={},de={},ge=Z0(pe);try{for(ge.s();!(fe=ge.n()).done;){for(var Oe=fe.value,ke=Oe.from,De=Oe.to,Ne="".concat(ke,"-").concat(De),Te="".concat(De,"-").concat(ke),Y=0,Q=[Ne,Te];Y0;){var se=fe.shift();if(re[se]=k.idToItem[se],Z[se]!==void 0){var de,ge=Z0(Z[se]);try{for(ge.s();!(de=ge.n()).done;){var Oe=de.value;if(!re[Oe]){fe.push(Oe);var ke=ue["".concat(se,"-").concat(Oe)];if(ke){var De,Ne=Z0(ke);try{for(Ne.s();!(De=Ne.n()).done;){var Te=De.value;ne[Te.id]||(ne[Te.id]=Te)}}catch(Y){Ne.e(Y)}finally{Ne.f()}}}}}catch(Y){ge.e(Y)}finally{ge.f()}}}},ce=Z0(j);try{for(ce.s();!(J=ce.n()).done;)le(J.value)}catch(pe){ce.e(pe)}finally{ce.f()}return{connectedNodes:re,connectedRels:ne}})(d,h,i,a),m=_.connectedNodes,x=_.connectedRels,S=Object.values(m),O=Object.values(x),E=S.length,T=O.length;E===d.size&&T===h.size&&(h.size>0||d.size>0)?(this.setLayout(Aw),this.coseBilkentLayout.update(!0,i.items,a.items)):T>0&&h.size/T>.25&&(this.setLayout(Aw),this.coseBilkentLayout.update(!0,S,O))}}this.physLayout.update(t),this.coseBilkentLayout.update(t)}},{key:"getShouldUpdate",value:function(){return this.currentLayout.getShouldUpdate()}},{key:"getComputing",value:function(){return this.currentLayout.getComputing()}},{key:"updateNodes",value:function(t){this.setLayout(Cw),this.physLayout.updateNodes(t)}},{key:"getNodePositions",value:function(t){return this.currentLayout.getNodePositions(t)}},{key:"terminateUpdate",value:function(){this.physLayout.terminateUpdate(),this.coseBilkentLayout.terminateUpdate()}},{key:"destroy",value:function(){this.physLayout.destroy(),this.coseBilkentLayout.destroy()}}],e&&Poe(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function qb(r){return qb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qb(r)}function aB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Doe(r){for(var e=1;e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function sB(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0&&arguments[0];if(this.shouldUpdate||t){var n=this.state,i=n.nodes,a=n.rels,o=Object.values(i.channels[ch].adds).length>0,s=Object.values(a.channels[ch].adds).length>0,u=Object.values(i.channels[ch].removes).length>0,l=Object.values(a.channels[ch].removes).length>0;(o||s||u||l)&&this.layout(i.items,i.idToItem,i.idToPosition),i.clearChannel(ch),a.clearChannel(ch)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,i){var a,o=(a=t)!==void 0?Xu(a):a;if(!(0,Hi.isEmpty)(o)){for(var s={},u=0;u=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function fB(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0&&arguments[0];if(this.shouldUpdate||t){var n=this.state,i=n.nodes,a=n.rels,o=Object.values(i.channels[fh].adds).length>0,s=Object.values(a.channels[fh].adds).length>0,u=Object.values(i.channels[fh].removes).length>0,l=Object.values(a.channels[fh].removes).length>0;(o||s||u||l)&&(this.layout(i.items,i.idToItem,i.idToPosition,a.items),i.idToPosition=this.positions),i.clearChannel(fh),a.clearChannel(fh)}this.shouldUpdate=!1}},{key:"layout",value:function(t,n,i,a){var o,s=(o=t)?Xu(o):o;if(!(0,Hi.isEmpty)(s)){for(var u=s.length,l=Math.ceil(Math.sqrt(u)),c=new Array(u),f=0,d=0;d0,c=Object.values(u.removes).length>0,f=Object.values(u.updates),d=ey(f);i.shouldUpdate=i.shouldUpdate||l||c||d}if(s.version!==void 0){var h=s.channels[Nl],p=Object.values(h.adds).length>0,g=Object.values(h.removes).length>0;i.shouldUpdate=i.shouldUpdate||p||g}})],i.shouldUpdate=!0,i.oldComputing=!1,i.computing=!1,i.workersDisabled=n.state.disableWebWorkers,i.setOptions(n),i.worker=Sq("HierarchicalLayout",i.workersDisabled),i.pendingLayoutData=null,i.layout(o.items,o.idToItem,o.idToPosition,s.items),i}return(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&t5(n,i)})(r,HD),e=r,t=[{key:"setOptions",value:function(n){if(n!==void 0&&(function(u){return Object.keys(u).every(function(l){return Boe.has(l)})})(n)){var i=n.direction,a=i===void 0?QM:i,o=n.packing,s=o===void 0?JM:o;Object.keys(Voe).includes(a)&&(this.directionChanged=this.direction&&this.direction!==a,this.direction=a),Hoe.includes(s)&&(this.packingChanged=this.packing&&this.packing!==s,this.packing=s),this.shouldUpdate=this.shouldUpdate||this.directionChanged||this.packingChanged}}},{key:"update",value:function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.shouldUpdate||n){var i=this.state,a=i.nodes,o=i.rels,s=this.directionChanged,u=this.packingChanged,l=Object.values(a.channels[Nl].adds).length>0,c=Object.values(o.channels[Nl].adds).length>0,f=Object.values(a.channels[Nl].removes).length>0,d=Object.values(o.channels[Nl].removes).length>0,h=Object.values(a.channels[Nl].updates),p=ey(h);(n||l||c||f||d||s||u||p)&&this.layout(a.items,a.idToItem,a.idToPosition,o.items),a.clearChannel(Nl),o.clearChannel(Nl),this.directionChanged=!1,this.packingChanged=!1}(function(g,y,b){var _=e5(Mm(g.prototype),"update",b);return typeof _=="function"?function(m){return _.apply(b,m)}:_})(r,0,this)([]),this.shouldUpdate=!1,this.oldComputing=this.computing}},{key:"getShouldUpdate",value:function(){return this.shouldUpdate||this.shouldUpdateAnimator}},{key:"getComputing",value:function(){return this.computing}},{key:"layout",value:function(n,i,a,o){var s=this;if(this.worker){var u=Pw(n).map(function(b){return b.html,OP(b,Woe)}),l=Pw(i),c={};Object.keys(l).forEach(function(b){var _=l[b],m=(_.html,OP(_,Yoe));c[b]=m});var f=Pw(o).map(function(b){return b.captionHtml,OP(b,Xoe)}),d=Pw(a),h=this.direction,p=this.packing,g=window.devicePixelRatio,y={nodes:u,nodeIds:c,idToPosition:d,rels:f,direction:h,packing:p,pixelRatio:g,forcedDelay:0};this.computing?this.pendingLayoutData=y:(this.worker.port.onmessage=function(b){var _=b.data,m=_.positions,x=_.parents,S=_.waypoints;s.computing&&(s.positions=m),s.parents=x,s.state.setWaypoints(S),s.pendingLayoutData!==null?(s.worker.port.postMessage(s.pendingLayoutData),s.pendingLayoutData=null):s.computing=!1,s.shouldUpdate=!0,s.startAnimation()},this.computing=!0,this.worker.port.postMessage(y))}else bi.info("Hierarchical layout code not yet initialised.")}},{key:"terminateUpdate",value:function(){var n,i;this.computing=!1,this.shouldUpdate=!1,(n=this.state.nodes)===null||n===void 0||n.clearChannel(Nl),(i=this.state.rels)===null||i===void 0||i.clearChannel(Nl)}},{key:"destroy",value:function(){var n;this.stateDisposers.forEach(function(i){i()}),this.state.nodes.removeChannel(Nl),this.state.rels.removeChannel(Nl),(n=this.worker)===null||n===void 0||n.port.close()}}],t&&$oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t})(),Zoe=io(3269),Bq=io.n(Zoe);function Qx(r){return Qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qx(r)}var Qoe=/^\s+/,Joe=/\s+$/;function xr(r,e){if(e=e||{},(r=r||"")instanceof xr)return r;if(!(this instanceof xr))return new xr(r,e);var t=(function(n){var i,a,o,s={r:0,g:0,b:0},u=1,l=null,c=null,f=null,d=!1,h=!1;return typeof n=="string"&&(n=(function(p){p=p.replace(Qoe,"").replace(Joe,"").toLowerCase();var g,y=!1;if(r5[p])p=r5[p],y=!0;else if(p=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(g=_d.rgb.exec(p))?{r:g[1],g:g[2],b:g[3]}:(g=_d.rgba.exec(p))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=_d.hsl.exec(p))?{h:g[1],s:g[2],l:g[3]}:(g=_d.hsla.exec(p))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=_d.hsv.exec(p))?{h:g[1],s:g[2],v:g[3]}:(g=_d.hsva.exec(p))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=_d.hex8.exec(p))?{r:ef(g[1]),g:ef(g[2]),b:ef(g[3]),a:yB(g[4]),format:y?"name":"hex8"}:(g=_d.hex6.exec(p))?{r:ef(g[1]),g:ef(g[2]),b:ef(g[3]),format:y?"name":"hex"}:(g=_d.hex4.exec(p))?{r:ef(g[1]+""+g[1]),g:ef(g[2]+""+g[2]),b:ef(g[3]+""+g[3]),a:yB(g[4]+""+g[4]),format:y?"name":"hex8"}:!!(g=_d.hex3.exec(p))&&{r:ef(g[1]+""+g[1]),g:ef(g[2]+""+g[2]),b:ef(g[3]+""+g[3]),format:y?"name":"hex"}})(n)),Qx(n)=="object"&&(nv(n.r)&&nv(n.g)&&nv(n.b)?(i=n.r,a=n.g,o=n.b,s={r:255*Da(i,255),g:255*Da(a,255),b:255*Da(o,255)},d=!0,h=String(n.r).substr(-1)==="%"?"prgb":"rgb"):nv(n.h)&&nv(n.s)&&nv(n.v)?(l=Ob(n.s),c=Ob(n.v),s=(function(p,g,y){p=6*Da(p,360),g=Da(g,100),y=Da(y,100);var b=Math.floor(p),_=p-b,m=y*(1-g),x=y*(1-_*g),S=y*(1-(1-_)*g),O=b%6;return{r:255*[y,x,m,m,S,y][O],g:255*[S,y,y,x,m,m][O],b:255*[m,m,S,y,y,x][O]}})(n.h,l,c),d=!0,h="hsv"):nv(n.h)&&nv(n.s)&&nv(n.l)&&(l=Ob(n.s),f=Ob(n.l),s=(function(p,g,y){var b,_,m;function x(E,T,P){return P<0&&(P+=1),P>1&&(P-=1),P<1/6?E+6*(T-E)*P:P<.5?T:P<2/3?E+(T-E)*(2/3-P)*6:E}if(p=Da(p,360),g=Da(g,100),y=Da(y,100),g===0)b=_=m=y;else{var S=y<.5?y*(1+g):y+g-y*g,O=2*y-S;b=x(O,S,p+1/3),_=x(O,S,p),m=x(O,S,p-1/3)}return{r:255*b,g:255*_,b:255*m}})(n.h,l,f),d=!0,h="hsl"),n.hasOwnProperty("a")&&(u=n.a)),u=Fq(u),{ok:d,format:n.format||h,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:u}})(r);this._originalInput=r,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.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=t.ok}function dB(r,e,t){r=Da(r,255),e=Da(e,255),t=Da(t,255);var n,i,a=Math.max(r,e,t),o=Math.min(r,e,t),s=(a+o)/2;if(a==o)n=i=0;else{var u=a-o;switch(i=s>.5?u/(2-a-o):u/(a+o),a){case r:n=(e-t)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(xr(n));return a}function cse(r,e){e=e||6;for(var t=xr(r).toHsv(),n=t.h,i=t.s,a=t.v,o=[],s=1/e;e--;)o.push(xr({h:n,s:i,v:a})),a=(a+s)%1;return o}xr.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 r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},getLuminance:function(){var r,e,t,n=this.toRgb();return r=n.r/255,e=n.g/255,t=n.b/255,.2126*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},setAlpha:function(r){return this._a=Fq(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=hB(this._r,this._g,this._b);return{h:360*r.h,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=hB(this._r,this._g,this._b),e=Math.round(360*r.h),t=Math.round(100*r.s),n=Math.round(100*r.v);return this._a==1?"hsv("+e+", "+t+"%, "+n+"%)":"hsva("+e+", "+t+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var r=dB(this._r,this._g,this._b);return{h:360*r.h,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=dB(this._r,this._g,this._b),e=Math.round(360*r.h),t=Math.round(100*r.s),n=Math.round(100*r.l);return this._a==1?"hsl("+e+", "+t+"%, "+n+"%)":"hsla("+e+", "+t+"%, "+n+"%, "+this._roundA+")"},toHex:function(r){return vB(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return(function(e,t,n,i,a){var o=[Td(Math.round(e).toString(16)),Td(Math.round(t).toString(16)),Td(Math.round(n).toString(16)),Td(Uq(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")})(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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*Da(this._r,255))+"%",g:Math.round(100*Da(this._g,255))+"%",b:Math.round(100*Da(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*Da(this._r,255))+"%, "+Math.round(100*Da(this._g,255))+"%, "+Math.round(100*Da(this._b,255))+"%)":"rgba("+Math.round(100*Da(this._r,255))+"%, "+Math.round(100*Da(this._g,255))+"%, "+Math.round(100*Da(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(fse[vB(this._r,this._g,this._b,!0)]||!1)},toFilter:function(r){var e="#"+pB(this._r,this._g,this._b,this._a),t=e,n=this._gradientType?"GradientType = 1, ":"";if(r){var i=xr(r);t="#"+pB(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+t+")"},toString:function(r){var e=!!r;r=r||this._format;var t=!1,n=this._a<1&&this._a>=0;return e||!n||r!=="hex"&&r!=="hex6"&&r!=="hex3"&&r!=="hex4"&&r!=="hex8"&&r!=="name"?(r==="rgb"&&(t=this.toRgbString()),r==="prgb"&&(t=this.toPercentageRgbString()),r!=="hex"&&r!=="hex6"||(t=this.toHexString()),r==="hex3"&&(t=this.toHexString(!0)),r==="hex4"&&(t=this.toHex8String(!0)),r==="hex8"&&(t=this.toHex8String()),r==="name"&&(t=this.toName()),r==="hsl"&&(t=this.toHslString()),r==="hsv"&&(t=this.toHsvString()),t||this.toHexString()):r==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return xr(this.toString())},_applyModification:function(r,e){var t=r.apply(null,[this].concat([].slice.call(e)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(nse,arguments)},brighten:function(){return this._applyModification(ise,arguments)},darken:function(){return this._applyModification(ase,arguments)},desaturate:function(){return this._applyModification(ese,arguments)},saturate:function(){return this._applyModification(tse,arguments)},greyscale:function(){return this._applyModification(rse,arguments)},spin:function(){return this._applyModification(ose,arguments)},_applyCombination:function(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(lse,arguments)},complement:function(){return this._applyCombination(sse,arguments)},monochromatic:function(){return this._applyCombination(cse,arguments)},splitcomplement:function(){return this._applyCombination(use,arguments)},triad:function(){return this._applyCombination(gB,[3])},tetrad:function(){return this._applyCombination(gB,[4])}},xr.fromRatio=function(r,e){if(Qx(r)=="object"){var t={};for(var n in r)r.hasOwnProperty(n)&&(t[n]=n==="a"?r[n]:Ob(r[n]));r=t}return xr(r,e)},xr.equals=function(r,e){return!(!r||!e)&&xr(r).toRgbString()==xr(e).toRgbString()},xr.random=function(){return xr.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},xr.mix=function(r,e,t){t=t===0?0:t||50;var n=xr(r).toRgb(),i=xr(e).toRgb(),a=t/100;return xr({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},xr.readability=function(r,e){var t=xr(r),n=xr(e);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)},xr.isReadable=function(r,e,t){var n,i,a,o,s,u=xr.readability(r,e);switch(i=!1,(o=((a=(a=t)||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&o!=="AAA"&&(o="AA"),(s=(a.size||"small").toLowerCase())!=="small"&&s!=="large"&&(s="small"),(n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=u>=4.5;break;case"AAlarge":i=u>=3;break;case"AAAsmall":i=u>=7}return i},xr.mostReadable=function(r,e,t){var n,i,a,o,s=null,u=0;i=(t=t||{}).includeFallbackColors,a=t.level,o=t.size;for(var l=0;lu&&(u=n,s=xr(e[l]));return xr.isReadable(r,s,{level:a,size:o})||!i?s:(t.includeFallbackColors=!1,xr.mostReadable(r,["#fff","#000"],t))};var r5=xr.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"},fse=xr.hexNames=(function(r){var e={};for(var t in r)r.hasOwnProperty(t)&&(e[r[t]]=t);return e})(r5);function Fq(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function Da(r,e){(function(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1})(r)&&(r="100%");var t=(function(n){return typeof n=="string"&&n.indexOf("%")!=-1})(r);return r=Math.min(e,Math.max(0,parseFloat(r))),t&&(r=parseInt(r*e,10)/100),Math.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function fE(r){return Math.min(1,Math.max(0,r))}function ef(r){return parseInt(r,16)}function Td(r){return r.length==1?"0"+r:""+r}function Ob(r){return r<=1&&(r=100*r+"%"),r}function Uq(r){return Math.round(255*parseFloat(r)).toString(16)}function yB(r){return ef(r)/255}var np,Mw,Dw,_d=(Mw="[\\s|\\(]+("+(np="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+np+")[,|\\s]+("+np+")\\s*\\)?",Dw="[\\s|\\(]+("+np+")[,|\\s]+("+np+")[,|\\s]+("+np+")[,|\\s]+("+np+")\\s*\\)?",{CSS_UNIT:new RegExp(np),rgb:new RegExp("rgb"+Mw),rgba:new RegExp("rgba"+Dw),hsl:new RegExp("hsl"+Mw),hsla:new RegExp("hsla"+Dw),hsv:new RegExp("hsv"+Mw),hsva:new RegExp("hsva"+Dw),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 nv(r){return!!_d.CSS_UNIT.exec(r)}var n5=function(r){return xr.mostReadable(r,[VD,"#FFFFFF"]).toString()},I1=function(r){return Bq().get.rgb(r)},kw=function(r){var e=new ArrayBuffer(4),t=new Uint32Array(e),n=new Uint8Array(e),i=I1(r);return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=255*i[3],t[0]},Iw=function(r){return[(e=I1(r))[0]/255,e[1]/255,e[2]/255];var e},mB={selected:{rings:[{widthFactor:.05,color:fq},{widthFactor:.1,color:dq}],shadow:{width:10,opacity:1,color:cq}},default:{rings:[]}},bB={selected:{rings:[{color:fq,width:2},{color:dq,width:4}],shadow:{width:18,opacity:1,color:cq}},default:{rings:[]}},TP=.75,CP={noPan:!1,outOnly:!1,animated:!0};function Hb(r){return Hb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hb(r)}function AP(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0?r.captions:r.caption&&r.caption.length>0?[{value:r.caption}]:[]},ip=function(r,e,t){(0,Hi.isNil)(r)||((function(n){return typeof n=="string"&&I1(n)!==null})(r)?e(r):xq().warn("Invalid color string for ".concat(t,":"),r))},zq=function(r,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$n();r.width=e*n,r.height=t*n,r.style.width="".concat(e,"px"),r.style.height="".concat(t,"px")},qq=function(r){bi.warn("Error: WebGL context lost - visualization will stop working!",r),i5!==void 0&&i5(r)},fx=function(r){var e=r.parentElement,t=e.getBoundingClientRect(),n=t.width,i=t.height;n!==0||i!==0||e.isConnected||(n=parseInt(e.style.width,10)||0,i=parseInt(e.style.height,10)||0),zq(r,n,i)},PP=function(r,e){var t=document.createElement("canvas");return Object.assign(t.style,FM),r!==void 0&&(r.appendChild(t),fx(t)),(function(n,i){i5=i,n.addEventListener("webglcontextlost",qq)})(t,e),t},om=function(r){r.width=0,r.height=0,r.remove()},wB=function(r){var e={antialias:!0},t=r.getContext("webgl",e);return t===null&&(t=r.getContext("experimental-webgl",e)),(function(n){return n instanceof WebGLRenderingContext})(t)?t:null},xB=function(r){r.canvas.removeEventListener("webglcontextlost",qq);var e=r.getExtension("WEBGL_lose_context");e==null||e.loseContext()},a5=new Map,Tb=function(r,e){var t=r.font,n=a5.get(t);n===void 0&&(n=new Map,a5.set(t,n));var i=n.get(e);return i===void 0&&(i=r.measureText(e).width,n.set(e,i)),i};function Wb(r){return Wb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wb(r)}function EB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function hse(r,e){for(var t=0;t0&&(s=(i=$D(u,l,n))1&&arguments[1]!==void 0&&arguments[1],i=this.getOrCreateEntry(t),a=n?"inverted":"image",o=i[a];return o===void 0&&(o=this.loadImage(t),i[a]=o),this.drawIfNeeded(o,n),o.canvas}},{key:"getOrCreateEntry",value:function(t){return this.cache[t]===void 0&&(this.cache[t]={}),this.cache[t]}},{key:"invertCanvas",value:function(t){for(var n=t.getImageData(0,0,Pf,Pf),i=n.data,a=0;a<4096;a++){var o=4*a;i[o]^=255,i[o+1]^=255,i[o+2]^=255}t.putImageData(n,0,0)}},{key:"loadImage",value:function(t){var n=document.createElement("canvas");n.width=Pf,n.height=Pf;var i=new Image;return i.src=t,i.crossOrigin="anonymous",{canvas:n,image:i,drawn:!1}}},{key:"drawIfNeeded",value:function(t,n){var i=t.image,a=t.canvas;if(!t.drawn&&i.complete){var o=a.getContext("2d");try{o.drawImage(i,0,0,Pf,Pf)}catch(s){bi.error("Failed to draw image",i.src,s),o.beginPath(),o.strokeStyle="black",o.rect(0,0,Pf,Pf),o.moveTo(0,0),o.lineTo(Pf,Pf),o.moveTo(0,Pf),o.lineTo(Pf,0),o.stroke(),o.closePath()}n&&this.invertCanvas(o),t.drawn=!0}}},{key:"waitForImages",value:function(){for(var t=[],n=0,i=Object.values(this.cache);n0?Promise.all(t).then(function(){}):Promise.resolve()}}],e&&pse(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();const yse=gse;function Xb(r){return Xb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xb(r)}function SB(r,e){if(r){if(typeof r=="string")return s5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s5(r,e):void 0}}function s5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0)){var i=(function(a,o){return(function(s){if(Array.isArray(s))return s})(a)||(function(s,u){var l=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l!=null){var c,f,d,h,p=[],g=!0,y=!1;try{if(d=(l=l.call(s)).next,u!==0)for(;!(g=(c=d.call(l)).done)&&(p.push(c.value),p.length!==u);g=!0);}catch(b){y=!0,f=b}finally{try{if(!g&&l.return!=null&&(h=l.return(),Object(h)!==h))return}finally{if(y)throw f}}return p}})(a,o)||SB(a,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(this.relArray(),1)[0];this.fromId=i.from,this.toId=i.to}}},{key:"size",value:function(){return this.rels.size}},{key:"relArray",value:function(){return Array.from(this.rels.values())}},{key:"maxFontSize",value:function(){if(this.size()===0)return 1;var t=this.relArray().map(function(n){return(0,Hi.isNumber)(n.captionSize)?n.captionSize:1});return Math.max.apply(Math,(function(n){return(function(i){if(Array.isArray(i))return s5(i)})(n)||(function(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)})(n)||SB(n)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(t))}},{key:"relIsOppositeDirection",value:function(t){var n=t.from,i=t.to,a=this.fromId,o=this.toId;return n!==a&&i!==o||n===o&&i===a}},{key:"indexOf",value:function(t){var n=t.id,i=Array.from(this.rels.keys());return this.rels.has(n)?i.indexOf(n):-1}},{key:"getRel",value:function(t){var n=this.relArray();return t<0||t>=n.length?null:n[t]}},{key:"setWaypoints",value:function(t){this.waypointPath=t}},{key:"setAngles",value:function(t){this.angles=t}}],e&&mse(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})(),OB=uq,TB=2*Math.PI/50,CB=.1*Math.PI,dE=1.5,u5=wb;function $b(r){return $b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$b(r)}function AB(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Wq(r))||e){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function RB(r){return(function(e){if(Array.isArray(e))return l5(e)})(r)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(r)||Wq(r)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Wq(r,e){if(r){if(typeof r=="string")return l5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l5(r,e):void 0}}function l5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t=0;t--){var n=void 0,i=void 0;t===0?(i=r[r.length-1],n=r[t]-r[r.length-1]+2*Math.PI):(i=r[t-1],n=r[t]-r[t-1]),e.push({size:n,start:i})}e.sort(function(a,o){return o.size-a.size})}return e},xse=function(r,e){for(;e>r.length||r[0].size>2*r[e-1].size;)r.push({size:r[0].size/2,start:r[0].start}),r.push({size:r[0].size/2,start:r[0].start+r[0].size/2}),r.shift(),r.sort(function(t,n){return n.size-t.size});return r},Ese=(function(){return r=function t(n,i){(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),PB(this,"bundles",void 0),PB(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var a=n.reduce(function(o,s){return o[s.id]=s,o},{});this.updateData(a,{},{},i)},e=[{key:"getBundle",value:function(t){var n=this.bundles,i=this.nodeToBundles,a=this.generatePairId(t.from,t.to),o=n[a];return o===void 0&&(o=new bse(a,t.from,t.to),n[a]=o,i[t.from]===void 0&&(i[t.from]=[]),i[t.to]===void 0&&(i[t.to]=[]),i[t.from].push(o),i[t.to].push(o)),o}},{key:"updateData",value:function(t,n,i,a){var o,s=this.bundles,u=this.nodeToBundles,l=function(S,O){var E=u[O].findIndex(function(T){return T===S});E!==-1&&u[O].splice(E,1),u[O].length===0&&delete u[O]},c=[].concat(RB(Object.values(t)),RB(Object.values(i))),f=Object.values(n),d=AB(c);try{for(d.s();!(o=d.n()).done;){var h=o.value;this.getBundle(h).insert(h)}}catch(S){d.e(S)}finally{d.f()}for(var p=0,g=f;pr.length)&&(e=r.length);for(var t=0,n=Array(e);t0?((s=a[0].width)!==null&&s!==void 0?s:0)*c:0,h=o&&o>1?o*c/2:1,p=9*h,g=7*h,y=i?d*Math.sqrt(1+2*p/g*(2*p/g)):0;return{x:r.x-Math.cos(f)*(y/4),y:r.y-Math.sin(f)*(y/4),angle:(e+u)%l,flip:(e+l)%l0&&arguments[0]!==void 0?arguments[0]:[])[0])===null||e===void 0?void 0:e.width)!==null&&r!==void 0?r:0)*$n()*dE},Kq=function(r,e,t,n,i,a){var o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:"top";if(r.length===0)return{x:0,y:0,angle:0};if(r.length===1)return{x:r[0].x,y:r[0].y,angle:0};var s,u,l,c,f,d=Math.PI/2,h=Math.floor(r.length/2),p=e.x>t.x,g=r[h];if(1&~r.length?(s=r[p?h:h-1],u=r[p?h-1:h],l=(s.x+u.x)/2,c=(s.y+u.y)/2,f=Math.atan2(u.y-s.y,u.x-s.x)):(s=r[p?h+1:h-1],u=r[p?h-1:h+1],n?(l=(g.x+(s.x+u.x)/2)/2,c=(g.y+(s.y+u.y)/2)/2,f=p?Math.atan2(e.y-t.y,e.x-t.x):Math.atan2(t.y-e.y,t.x-e.x)):(e2(g,s)>e2(g,u)?u=g:s=g,l=(s.x+u.x)/2,c=(s.y+u.y)/2,f=Math.atan2(u.y-s.y,u.x-s.x))),i){var y=r2(a),b=o==="bottom"?1:-1;l+=Math.cos(f+d)*y*b,c+=Math.sin(f+d)*y*b}return{x:l,y:c,angle:f}},DB=function(r,e,t,n,i,a){var o={x:(r.x+e.x)/2,y:(r.y+e.y)/2},s={x:r.x,y:r.y},u={x:e.x,y:e.y},l=new Hu(u,s),c=(function(d,h){var p=0;return d&&(p+=d),h&&(p-=h),p})(n,t);o.x+=c/2*l.unit.x,o.y+=c/2*l.unit.y;var f=a.size()/2-a.indexOf(i);return o.x+=f*l.unit.x,o.y+=f*l.unit.y,o},kB=function(r){var e=$n(),t=r.size,n=r.selected;return((t??ha)+4+(n===!0?4:0))*e},n2=function(r,e,t,n,i){var a=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(t.x===n.x&&t.y===n.y)return[{x:t.x,y:t.y}];var o=function(z){var H=arguments.length>1&&arguments[1]!==void 0&&arguments[1],q=z.norm.x,W=z.norm.y;return H?{x:-q,y:-W}:z.norm},s=$n(),u=e.indexOf(r),l=(e.size()-1)/2,c=u>l,f=Math.abs(u-l),d=i?17*e.maxFontSize():8,h=(e.size()-1)*d*s,p=(function(z,H,q,W,$,J,X){var Z,ue=arguments.length>7&&arguments[7]!==void 0&&arguments[7],re=$n(),ne=z.size(),le=ne>1,ce=z.relIsOppositeDirection(J),pe=ce?q:H,fe=ce?H:q,se=z.waypointPath,de=se==null?void 0:se.points,ge=se==null?void 0:se.from,Oe=se==null?void 0:se.to,ke=Nw(pe,ge)&&Nw(fe,Oe)||Nw(fe,ge)&&Nw(pe,Oe),De=ke?de[1]:null,Ne=ke?de[de.length-2]:null,Ce=kB(pe),Y=kB(fe),Q=function(mr,ur){return Math.atan2(mr.y-ur.y,mr.x-ur.x)},ie=Math.max(Math.PI,Ose/(ne/2)),we=le?W*ie*(X?1:-1)/((Z=pe.size)!==null&&Z!==void 0?Z:ha):0,Ee=Q(ke?De:fe,pe),Me=ke?Q(fe,Ne):Ee,Ie=function(mr,ur,sn,Fr){return{x:mr.x+Math.cos(ur)*sn*(Fr?-1:1),y:mr.y+Math.sin(ur)*sn*(Fr?-1:1)}},Ye=function(mr,ur){return Ie(pe,Ee+mr,ur,!1)},ot=function(mr,ur){return Ie(fe,Me-mr,ur,!0)},mt=function(mr,ur){return{x:mr.x+(ur.x-mr.x)/2,y:mr.y+(ur.y-mr.y)/2}},wt=function(mr,ur){return Math.sqrt((mr.x-ur.x)*(mr.x-ur.x)+(mr.y-ur.y)*(mr.y-ur.y))*re},Mt=Ye(we,Ce),Dt=ot(we,Y),vt=le?Ye(0,Ce):null,tt=le?ot(0,Y):null,_e=200*re,Ue=[];if(ke){var Qe=wt(Mt,De)<_e;if(le&&!Qe){var Ze=mt(vt,De);Ue.push(new Hu(Mt,Ze)),Ue.push(new Hu(Ze,De))}else Ue.push(new Hu(Mt,De));for(var nt=2;nt2*(30*re+Math.min(Ce,Y)))if(ue){var Rt=DB(pe,fe,Ce,Y,J,z);Ue.push(new Hu(Mt,Rt)),Ue.push(new Hu(Rt,Dt))}else{var jt=W*$,Yt=30+Ce,sr=Math.sqrt(Yt*Yt+jt*jt),Ut=30+Y,Rr=Math.sqrt(Ut*Ut+jt*jt),Xt=Ye(0,sr),Vr=ot(0,Rr);Ue.push(new Hu(Mt,Xt)),Ue.push(new Hu(Xt,Vr)),Ue.push(new Hu(Vr,Dt))}else if(Lt>(Ce+Y)/2){var Br=DB(pe,fe,Ce,Y,J,z);Ue.push(new Hu(Mt,Br)),Ue.push(new Hu(Br,Dt))}else Ue.push(new Hu(Mt,Dt))}return Ue})(e,t,n,f,d,r,c,a),g=[],y=p[0],b=o(y,c);g.push({x:y.p1.x+b.x,y:y.p1.y+b.y});for(var _=1;_4&&arguments[4]!==void 0&&arguments[4],a=arguments.length>5&&arguments[5]!==void 0&&arguments[5];return N1(t,n)?t.id===n.id?(function(o,s,u){for(var l=t2(o,s,u),c={left:1/0,top:1/0,right:-1/0,bottom:-1/0},f=["startPoint","endPoint","apexPoint","control1Point","control2Point"],d=0;dc.right&&(c.right=p),gc.bottom&&(c.bottom=g)}return c})(r,t,e):(function(o,s,u,l,c,f){var d,h={left:1/0,top:1/0,right:-1/0,bottom:-1/0},p=(function(_,m){var x=typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(!x){if(Array.isArray(_)||(x=(function(I,k){if(I){if(typeof I=="string")return MB(I,k);var L={}.toString.call(I).slice(8,-1);return L==="Object"&&I.constructor&&(L=I.constructor.name),L==="Map"||L==="Set"?Array.from(I):L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L)?MB(I,k):void 0}})(_))||m){x&&(_=x);var S=0,O=function(){};return{s:O,n:function(){return S>=_.length?{done:!0}:{done:!1,value:_[S++]}},e:function(I){throw I},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Wq(r,e){if(r){if(typeof r=="string")return l5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l5(r,e):void 0}}function l5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t=0;t--){var n=void 0,i=void 0;t===0?(i=r[r.length-1],n=r[t]-r[r.length-1]+2*Math.PI):(i=r[t-1],n=r[t]-r[t-1]),e.push({size:n,start:i})}e.sort(function(a,o){return o.size-a.size})}return e},xse=function(r,e){for(;e>r.length||r[0].size>2*r[e-1].size;)r.push({size:r[0].size/2,start:r[0].start}),r.push({size:r[0].size/2,start:r[0].start+r[0].size/2}),r.shift(),r.sort(function(t,n){return n.size-t.size});return r},Ese=(function(){return r=function t(n,i){(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),PB(this,"bundles",void 0),PB(this,"nodeToBundles",void 0),this.bundles={},this.nodeToBundles={};var a=n.reduce(function(o,s){return o[s.id]=s,o},{});this.updateData(a,{},{},i)},e=[{key:"getBundle",value:function(t){var n=this.bundles,i=this.nodeToBundles,a=this.generatePairId(t.from,t.to),o=n[a];return o===void 0&&(o=new bse(a,t.from,t.to),n[a]=o,i[t.from]===void 0&&(i[t.from]=[]),i[t.to]===void 0&&(i[t.to]=[]),i[t.from].push(o),i[t.to].push(o)),o}},{key:"updateData",value:function(t,n,i,a){var o,s=this.bundles,u=this.nodeToBundles,l=function(S,O){var E=u[O].findIndex(function(T){return T===S});E!==-1&&u[O].splice(E,1),u[O].length===0&&delete u[O]},c=[].concat(RB(Object.values(t)),RB(Object.values(i))),f=Object.values(n),d=AB(c);try{for(d.s();!(o=d.n()).done;){var h=o.value;this.getBundle(h).insert(h)}}catch(S){d.e(S)}finally{d.f()}for(var p=0,g=f;pr.length)&&(e=r.length);for(var t=0,n=Array(e);t0?((s=a[0].width)!==null&&s!==void 0?s:0)*c:0,h=o&&o>1?o*c/2:1,p=9*h,g=7*h,y=i?d*Math.sqrt(1+2*p/g*(2*p/g)):0;return{x:r.x-Math.cos(f)*(y/4),y:r.y-Math.sin(f)*(y/4),angle:(e+u)%l,flip:(e+l)%l0&&arguments[0]!==void 0?arguments[0]:[])[0])===null||e===void 0?void 0:e.width)!==null&&r!==void 0?r:0)*$n()*dE},Kq=function(r,e,t,n,i,a){var o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:"top";if(r.length===0)return{x:0,y:0,angle:0};if(r.length===1)return{x:r[0].x,y:r[0].y,angle:0};var s,u,l,c,f,d=Math.PI/2,h=Math.floor(r.length/2),p=e.x>t.x,g=r[h];if(1&~r.length?(s=r[p?h:h-1],u=r[p?h-1:h],l=(s.x+u.x)/2,c=(s.y+u.y)/2,f=Math.atan2(u.y-s.y,u.x-s.x)):(s=r[p?h+1:h-1],u=r[p?h-1:h+1],n?(l=(g.x+(s.x+u.x)/2)/2,c=(g.y+(s.y+u.y)/2)/2,f=p?Math.atan2(e.y-t.y,e.x-t.x):Math.atan2(t.y-e.y,t.x-e.x)):(e2(g,s)>e2(g,u)?u=g:s=g,l=(s.x+u.x)/2,c=(s.y+u.y)/2,f=Math.atan2(u.y-s.y,u.x-s.x))),i){var y=r2(a),b=o==="bottom"?1:-1;l+=Math.cos(f+d)*y*b,c+=Math.sin(f+d)*y*b}return{x:l,y:c,angle:f}},DB=function(r,e,t,n,i,a){var o={x:(r.x+e.x)/2,y:(r.y+e.y)/2},s={x:r.x,y:r.y},u={x:e.x,y:e.y},l=new Hu(u,s),c=(function(d,h){var p=0;return d&&(p+=d),h&&(p-=h),p})(n,t);o.x+=c/2*l.unit.x,o.y+=c/2*l.unit.y;var f=a.size()/2-a.indexOf(i);return o.x+=f*l.unit.x,o.y+=f*l.unit.y,o},kB=function(r){var e=$n(),t=r.size,n=r.selected;return((t??ha)+4+(n===!0?4:0))*e},n2=function(r,e,t,n,i){var a=arguments.length>5&&arguments[5]!==void 0&&arguments[5];if(t.x===n.x&&t.y===n.y)return[{x:t.x,y:t.y}];var o=function(z){var H=arguments.length>1&&arguments[1]!==void 0&&arguments[1],q=z.norm.x,W=z.norm.y;return H?{x:-q,y:-W}:z.norm},s=$n(),u=e.indexOf(r),l=(e.size()-1)/2,c=u>l,f=Math.abs(u-l),d=i?17*e.maxFontSize():8,h=(e.size()-1)*d*s,p=(function(z,H,q,W,$,J,X){var Z,ue=arguments.length>7&&arguments[7]!==void 0&&arguments[7],re=$n(),ne=z.size(),le=ne>1,ce=z.relIsOppositeDirection(J),pe=ce?q:H,fe=ce?H:q,se=z.waypointPath,de=se==null?void 0:se.points,ge=se==null?void 0:se.from,Oe=se==null?void 0:se.to,ke=Nw(pe,ge)&&Nw(fe,Oe)||Nw(fe,ge)&&Nw(pe,Oe),De=ke?de[1]:null,Ne=ke?de[de.length-2]:null,Te=kB(pe),Y=kB(fe),Q=function(mr,ur){return Math.atan2(mr.y-ur.y,mr.x-ur.x)},ie=Math.max(Math.PI,Ose/(ne/2)),we=le?W*ie*(X?1:-1)/((Z=pe.size)!==null&&Z!==void 0?Z:ha):0,Ee=Q(ke?De:fe,pe),Me=ke?Q(fe,Ne):Ee,Ie=function(mr,ur,sn,Fr){return{x:mr.x+Math.cos(ur)*sn*(Fr?-1:1),y:mr.y+Math.sin(ur)*sn*(Fr?-1:1)}},Ye=function(mr,ur){return Ie(pe,Ee+mr,ur,!1)},ot=function(mr,ur){return Ie(fe,Me-mr,ur,!0)},mt=function(mr,ur){return{x:mr.x+(ur.x-mr.x)/2,y:mr.y+(ur.y-mr.y)/2}},wt=function(mr,ur){return Math.sqrt((mr.x-ur.x)*(mr.x-ur.x)+(mr.y-ur.y)*(mr.y-ur.y))*re},Mt=Ye(we,Te),Dt=ot(we,Y),vt=le?Ye(0,Te):null,tt=le?ot(0,Y):null,_e=200*re,Ue=[];if(ke){var Qe=wt(Mt,De)<_e;if(le&&!Qe){var Ze=mt(vt,De);Ue.push(new Hu(Mt,Ze)),Ue.push(new Hu(Ze,De))}else Ue.push(new Hu(Mt,De));for(var nt=2;nt2*(30*re+Math.min(Te,Y)))if(ue){var Rt=DB(pe,fe,Te,Y,J,z);Ue.push(new Hu(Mt,Rt)),Ue.push(new Hu(Rt,Dt))}else{var jt=W*$,Yt=30+Te,sr=Math.sqrt(Yt*Yt+jt*jt),Ut=30+Y,Rr=Math.sqrt(Ut*Ut+jt*jt),Xt=Ye(0,sr),Vr=ot(0,Rr);Ue.push(new Hu(Mt,Xt)),Ue.push(new Hu(Xt,Vr)),Ue.push(new Hu(Vr,Dt))}else if(Lt>(Te+Y)/2){var Br=DB(pe,fe,Te,Y,J,z);Ue.push(new Hu(Mt,Br)),Ue.push(new Hu(Br,Dt))}else Ue.push(new Hu(Mt,Dt))}return Ue})(e,t,n,f,d,r,c,a),g=[],y=p[0],b=o(y,c);g.push({x:y.p1.x+b.x,y:y.p1.y+b.y});for(var _=1;_4&&arguments[4]!==void 0&&arguments[4],a=arguments.length>5&&arguments[5]!==void 0&&arguments[5];return N1(t,n)?t.id===n.id?(function(o,s,u){for(var l=t2(o,s,u),c={left:1/0,top:1/0,right:-1/0,bottom:-1/0},f=["startPoint","endPoint","apexPoint","control1Point","control2Point"],d=0;dc.right&&(c.right=p),gc.bottom&&(c.bottom=g)}return c})(r,t,e):(function(o,s,u,l,c,f){var d,h={left:1/0,top:1/0,right:-1/0,bottom:-1/0},p=(function(_,m){var x=typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(!x){if(Array.isArray(_)||(x=(function(I,k){if(I){if(typeof I=="string")return MB(I,k);var L={}.toString.call(I).slice(8,-1);return L==="Object"&&I.constructor&&(L=I.constructor.name),L==="Map"||L==="Set"?Array.from(I):L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L)?MB(I,k):void 0}})(_))||m){x&&(_=x);var S=0,O=function(){};return{s:O,n:function(){return S>=_.length?{done:!0}:{done:!1,value:_[S++]}},e:function(I){throw I},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E,T=!0,P=!1;return{s:function(){x=x.call(_)},n:function(){var I=x.next();return T=I.done,I},e:function(I){P=!0,E=I},f:function(){try{T||x.return==null||x.return()}finally{if(P)throw E}}}})(n2(o,s,u,l,c,f));try{for(p.s();!(d=p.n()).done;){var g=d.value,y=g.x,b=g.y;yh.right&&(h.right=y),bh.bottom&&(h.bottom=b)}}catch(_){p.e(_)}finally{p.f()}return h})(r,e,t,n,i,a):null},Zq=function(r,e){var t,n=r.selected?dE:1;return((t=r.width)!==null&&t!==void 0?t:e)*n*$n()},Qq=function(r,e,t,n,i){if(r.length<2)return{tailOffset:null};var a=r[r.length-2],o=r[r.length-1],s=Math.atan2(o.y-a.y,o.x-a.x),u=t/2+n;r[r.length-1]={x:o.x-Math.cos(s)*u,y:o.y-Math.sin(s)*u};var l=null;if(e){var c=r[0],f=r[1],d=Math.atan2(f.y-c.y,f.x-c.x),h=r2(i);l={x:Math.cos(d)*h,y:Math.sin(d)*h},r[0]={x:c.x+l.x,y:c.y+l.y}}return{tailOffset:l}},Jq=function(r,e,t){var n=$n(),i=n*(r>1?r/2:1),a=9*i,o=2*i,s=7*i,u=t.length>0?t[0].width*n:0,l=2*a,c=e?u*Math.sqrt(1+l/s*(l/s)):0;return{headFactor:i,headHeight:a,headChinHeight:o,headWidth:s,headSelectedAdjustment:c,headPositionOffset:2-c}},IB=function(r){return 6*r*$n()},NB=function(r,e,t){return{widthAlign:e/2*r[0],heightAlign:t/2*r[1]}},Cse=function(r){var e=r.x,t=e===void 0?0:e,n=r.y,i=n===void 0?0:n,a=r.size,o=a===void 0?ha:a;return{top:i-o,left:t-o,right:t+o,bottom:i+o}},eG=function(r,e,t,n){return(n<2||!e?1*r:.75*r)/t},tG=function(r,e,t,n,i){var a=i<2||!e;return{iconXPos:r/2,iconYPos:a?.5*r:r*(n===1?t==="center"?1.3:t==="bottom"||a?1.1:0:t==="center"?1.35:t==="bottom"||a?1.1:0)}},rG=function(r,e){return r*e},nG=function(r,e,t){var n=r/2-e*t[1];return{iconXPos:r/2-e*t[0],iconYPos:n}};function Kb(r){return Kb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kb(r)}function LB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ll(r){for(var e=1;e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function BB(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t2&&arguments[2]!==void 0?arguments[2]:{};(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),kf(this,"arrowBundler",void 0),kf(this,"state",void 0),kf(this,"relationshipThreshold",void 0),kf(this,"stateDisposers",void 0),kf(this,"needsRun",void 0),kf(this,"imageCache",void 0),kf(this,"nodeVersion",void 0),kf(this,"relVersion",void 0),kf(this,"waypointVersion",void 0),kf(this,"channelId",void 0),kf(this,"activeNodes",void 0),this.state=n,this.relationshipThreshold=(a=s.relationshipThreshold)!==null&&a!==void 0?a:0,this.channelId=i,this.arrowBundler=new Ese(n.rels.items,n.waypoints.data),this.stateDisposers=[],this.needsRun=!0,this.imageCache=new yse,this.nodeVersion=n.nodes.version,this.relVersion=n.rels.version,this.waypointVersion=n.waypoints.counter,this.activeNodes=new Set,this.stateDisposers.push(this.state.autorun(function(){o.state.zoom!==void 0&&(o.needsRun=!0),o.state.panX!==void 0&&(o.needsRun=!0),o.state.panY!==void 0&&(o.needsRun=!0),o.state.nodes.version!==void 0&&(o.needsRun=!0),o.state.rels.version!==void 0&&(o.needsRun=!0),o.state.waypoints.counter>0&&(o.needsRun=!0),o.state.layout!==void 0&&(o.needsRun=!0)}))},(e=[{key:"getRelationshipsToRender",value:function(t,n,i,a){var o,s=[],u=[],l=[],c=this.arrowBundler,f=this.state,d=this.relationshipThreshold,h=f.layout,p=f.rels,g=f.nodes,y=g.idToItem,b=g.idToPosition,_=h!=="hierarchical",m=jB(p.items);try{for(m.s();!(o=m.n()).done;){var x=o.value,S=c.getBundle(x),O=Ll(Ll({},y[x.from]),b[x.from]),E=Ll(Ll({},y[x.to]),b[x.to]),T=n!==void 0?t||n>d||x.captionHtml!==void 0:t,P=!0;if(i!==void 0&&a!==void 0){var I=Tse(x,S,O,E,T,_);if(I!==null){var k,L,B,j,z,H,q=this.isBoundingBoxOffScreen(I,i,a),W=e2({x:(k=O.x)!==null&&k!==void 0?k:0,y:(L=O.y)!==null&&L!==void 0?L:0},{x:(B=E.x)!==null&&B!==void 0?B:0,y:(j=E.y)!==null&&j!==void 0?j:0}),$=$n(),J=(((z=O.size)!==null&&z!==void 0?z:ha)+((H=E.size)!==null&&H!==void 0?H:ha))*$,X=O.id!==E.id&&J>W;P=!(q||X)}else P=!1}P&&(x.disabled?u.push(Ll(Ll({},x),{},{fromNode:O,toNode:E,showLabel:T})):x.selected?s.push(Ll(Ll({},x),{},{fromNode:O,toNode:E,showLabel:T})):l.push(Ll(Ll({},x),{},{fromNode:O,toNode:E,showLabel:T})))}}catch(Z){m.e(Z)}finally{m.f()}return[].concat(u,l,s)}},{key:"getNodesToRender",value:function(t,n,i){var a,o=[],s=[],u=[],l=this.state.nodes.idToItem,c=jB(t);try{for(c.s();!(a=c.n()).done;){var f=a.value,d=!0;if(n!==void 0&&i!==void 0){var h=Cse(f);d=!this.isBoundingBoxOffScreen(h,n,i)}d&&(l[f.id].disabled?o.push(Ll({},f)):l[f.id].selected?s.push(Ll({},f)):u.push(Ll({},f)))}}catch(p){c.e(p)}finally{c.f()}return[].concat(o,u,s)}},{key:"processUpdates",value:function(){var t=this.state,n=!1,i=t.nodes.channels[this.channelId],a=t.rels.channels[this.channelId],o=a.adds,s=a.removes,u=a.updates;if(this.nodeVersion0||Object.keys(s).length>0||Object.keys(u).length>0,t.rels.clearChannel(this.channelId),this.relVersion=t.rels.version),n||this.waypointVersionl+s,p=t.top>c+u;return f||h||d||p}},{key:"needsToRun",value:function(){return this.needsRun}},{key:"waitForImages",value:function(){return this.imageCache.waitForImages()}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(t){t()}),this.state.nodes.removeChannel(this.channelId),this.state.rels.removeChannel(this.channelId)}}])&&Ase(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})(),Rse=[[.04,1],[100,2]],i2=[[.8,1.1],[3,1.6],[8,2.5]],Pse=[[i2[0][0],1],[100,1.25]],Og=function(r,e){if(r.includes("rgba"))return r;if(r.includes("rgb")){var t=r.substr(r.indexOf("(")+1).replace(")","").split(",");return"rgba(".concat(t[0],",").concat(t[1],",").concat(t[2],",").concat(e,")")}var n=Bq().get.rgb(r);return n===null?r:"rgba(".concat(n[0],",").concat(n[1],",").concat(n[2],",").concat(e,")")};function DP(r,e){var t=e.find(function(i){return rr.length)&&(e=r.length);for(var t=0,n=Array(e);t4&&arguments[4]!==void 0&&arguments[4],o=[],s=[],u=0,l=0,c=!1,f=!1,d=0;d_||(y=r[g-1],` -\r\v`.includes(y))){if(!(l_;){for(m-=1;kse(x());)m-=1;if(!(m-u>1)){i="",f=!0,c=!1;break}i=r.slice(u,m),b=e(i),f=!0,c=!1}return s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var S=(function(E){var T=E.length,P=Math.min(T-1,3);if(T===1)return{hyphen:!1,cnt:0};for(var I=0;I_;){if(!(O-u>1)){i=r[u],O=u+1,b=e(i),c=!1;break}O-=1,i=r.slice(u,O),b=e(i),c=!0}else i=(i=r.slice(u,O)).trim();s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},u=O,l+=1}},g=1;g<=r.length;g++)if(h=p())return h.v;return i=r.slice(u,r.length),s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:!1},s},Qb=function(){var r=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t,n){var i=t.value;if(i){var a="".concat(n>0&&e.length?", ":"").concat(i);return[].concat(nb(e),[a2(a2({},t),{},{value:a,chars:a.split("").map(function(o,s){var u,l;return n!==0&&e.length?s<2?null:nb((u=t.styles)!==null&&u!==void 0?u:[]):nb((l=t.styles)!==null&&l!==void 0?l:[])})})])}return e},[]);return{stylesPerChar:r.reduce(function(e,t){return[].concat(nb(e),nb(t.chars))},[]),fullCaption:r.map(function(e){return e.value}).join("")}};function uG(r,e,t){var n,i,a,o=r.size,s=o===void 0?ha:o,u=r.caption,l=u===void 0?"":u,c=r.captions,f=c===void 0?[]:c,d=r.captionAlign,h=d===void 0?"center":d,p=r.captionSize,g=p===void 0?1:p,y=r.icon,b=s*$n(),_=2*b,m=KD(b,e).fontInfoLevel,x=(function(z){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ha)/({1:3.5,2:2.75,3:2}[arguments.length>2&&arguments[2]!==void 0?arguments[2]:1]+(arguments.length>3&&arguments[3]!==void 0&&arguments[3]?1:0))/z})(m,b,g,!!y),S=f.length>0,O=l.length>0,E=[],T="";if(!S&&!O)return{lines:[],stylesPerChar:[],fullCaption:"",fontSize:x,fontFace:wb,fontColor:"",yPos:0,maxNoLines:2,hasContent:!1};if(S){var P=Qb(f);E=P.stylesPerChar,T=P.fullCaption}else O&&(T=l,E=l.split("").map(function(){return[]}));var I=2;m===((n=i2[1])===null||n===void 0?void 0:n[1])?I=3:m===((i=i2[2])===null||i===void 0?void 0:i[1])&&(I=4);var k=h==="center"?.7*_:2*Math.sqrt(Math.pow(_/2,2)-Math.pow(_/3,2)),L=t;L||(L=document.createElement("canvas").getContext("2d")),L.font="bold ".concat(x,"px ").concat(wb),a=(function(z,H,q,W,$,J,X){var Z=(function(fe){return/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(fe)})(H)?H.split("").reverse().join(""):H;z.font="bold ".concat(W,"px ").concat(q).replace(/"/g,"");for(var ue=function(fe){return Tb(z,fe)},re=J?(X<4?["",""]:[""]).length:0,ne=function(fe,se){return(function(de,ge,Oe){var ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"top",De=.98*Oe,Ne=.89*Oe,Ce=.95*Oe;return ge===1?De:ge===2?Ce:ge===3&&ke==="top"?de===0||de===2?Ne:De:ge===4&&ke==="top"?de===0||de===3?.78*Oe:Ce:ge===5&&ke==="top"?de===0||de===4?.65*Oe:de===1||de===3?Ne:Ce:De})(fe+re,se+re,$)},le=1,ce=[],pe=function(){if((ce=(function(se,de,ge,Oe){var ke,De=se.split(/\s/g).filter(function(Ie){return Ie.length>0}),Ne=[],Ce=null,Y=function(Ie){return de(Ie)>ge(Ne.length,Oe)},Q=(function(Ie){var Ye=typeof Symbol<"u"&&Ie[Symbol.iterator]||Ie["@@iterator"];if(!Ye){if(Array.isArray(Ie)||(Ye=oG(Ie))){Ye&&(Ie=Ye);var ot=0,mt=function(){};return{s:mt,n:function(){return ot>=Ie.length?{done:!0}:{done:!1,value:Ie[ot++]}},e:function(vt){throw vt},f:mt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var wt,Mt=!0,Dt=!1;return{s:function(){Ye=Ye.call(Ie)},n:function(){var vt=Ye.next();return Mt=vt.done,vt},e:function(vt){Dt=!0,wt=vt},f:function(){try{Mt||Ye.return==null||Ye.return()}finally{if(Dt)throw wt}}}})(De);try{for(Q.s();!(ke=Q.n()).done;){var ie=ke.value,we=Ce?"".concat(Ce," ").concat(ie):ie;if(de(we)Oe)return[]}}}catch(Ie){Q.e(Ie)}finally{Q.f()}if(Ce){var Me=Y(Ce);Ne.push({text:Ce,overflowed:Me})}return Ne.length<=Oe?Ne:[]})(Z,ue,ne,le)).length===0)ce=L1(Z,ue,ne,le,X>le);else if(ce.some(function(se){return se.overflowed})){var fe=le;ce=ce.reduce(function(se,de){var ge=X-se.length;if(ge===0){var Oe=se[se.length-1];return Oe.text.endsWith(o2)||(ue(Oe.text)+ue(o2)>ne(se.length,fe)?(se[se.length-1].text=Oe.text.slice(0,-2),se[se.length-1].hasEllipsisChar=!0):(se[se.length-1].text=Oe.text,se[se.length-1].hasEllipsisChar=!0)),se}if(de.overflowed){var ke=L1(de.text,ue,ne,ge);se=se.concat(ke)}else se.push({text:de.text,hasEllipsisChar:!1,hasHyphenChar:!1});return se},[])}else ce=ce.map(function(se){return a2(a2({},se),{},{hasEllipsisChar:!1,hasHyphenChar:!1})});le+=1};ce.length===0;)pe();return Array.from(ce)})(L,T,wb,x,k,!!y,I);var B,j=-(a.length-2)*x/2;return B=h&&h!=="center"?h==="bottom"?j+b/Math.PI:j-b/Math.PI:j,{lines:a,stylesPerChar:E,fullCaption:T,fontSize:x,fontFace:wb,fontColor:"",yPos:B,maxNoLines:I,hasContent:!0}}function Jb(r){return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jb(r)}function Ise(r,e){for(var t=0;t0?(this.currentTime-this.startTime)/n:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+t*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(t){this.endValue!==t&&(t-this.currentValue!==0?(this.currentTime=new Date().getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=t,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=t)}},{key:"setEndTime",value:function(t){this.endTime=Math.max(t,this.startTime)}}])&&Ise(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function e1(r){return e1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e1(r)}function zB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function qB(r){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:1;if(this.ignoreAnimationsFlag)return i;var u=(a=this.getById(t))!==null&&a!==void 0?a:{};if(u[n]===void 0){var l=s===1?this.createSizeAnimation(0,t,n):this.createFadeAnimation(0,t,n);l.setEndValue(i),o=l.currentValue}else{var c=u[n];if(c.currentValue===i)return i;c.setEndValue(i),o=c.currentValue}return this.hasNextAnimation=!0,o}},{key:"createAnimation",value:function(t,n,i){var a,o=new Nse(n,t),s=(a=this.animations.get(n))!==null&&a!==void 0?a:{};return this.animations.set(n,qB(qB({},s),{},kg({},i,o))),o}},{key:"getById",value:function(t){return this.animations.get(t)}},{key:"createFadeAnimation",value:function(t,n,i){var a,o=this.createAnimation(t,n,i);return o.setDuration((a=this.durations[0])!==null&&a!==void 0?a:this.defaultDuration),o}},{key:"createSizeAnimation",value:function(t,n,i){var a,o=this.createAnimation(t,n,i);return o.setDuration((a=this.durations[1])!==null&&a!==void 0?a:this.defaultDuration),o}}],e&&Lse(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function kP(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t4&&arguments[4]!==void 0)||arguments[4],a=arguments.length>5&&arguments[5]!==void 0&&arguments[5],o=n.headPosition,s=n.headAngle,u=n.headHeight,l=n.headChinHeight,c=n.headWidth,f=Math.cos(s),d=Math.sin(s),h=function(y,b){return{x:o.x+y*f-b*d,y:o.y+y*d+b*f}},p=[h(l-u,0),h(-u,c/2),h(0,0),h(-u,-c/2)],g={lineWidth:r.lineWidth,strokeStyle:r.strokeStyle,fillStyle:r.fillStyle};r.lineWidth=e,r.strokeStyle=t,r.fillStyle=t,(function(y,b,_,m){if(y.beginPath(),b.length>0){var x=b[0];y.moveTo(x.x,x.y)}for(var S=1;S=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function f5(r,e){if(r){if(typeof r=="string")return d5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d5(r,e):void 0}}function d5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t3&&arguments[3]!==void 0?arguments[3]:{};return(function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")})(this,r),s=this,l=[a,IP,c],u=Hm(u=r),dm(o=WB(s,dG()?Reflect.construct(u,l||[],Hm(s).constructor):u.apply(s,l)),"canvas",void 0),dm(o,"context",void 0),dm(o,"animationHandler",void 0),dm(o,"ellipsisWidth",void 0),dm(o,"disableArrowShadow",!1),i===null?WB(o):(o.canvas=n,o.context=i,a.nodes.addChannel(IP),a.rels.addChannel(IP),o.animationHandler=new jse,o.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),o.ellipsisWidth=Tb(i,o2),o)}return(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&v5(n,i)})(r,aG),e=r,t=[{key:"needsToRun",value:function(){return Lw(r,"needsToRun",this,3)([])||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){Lw(r,"processUpdates",this,3)([]);var n=this.state.rels.items.filter(function(i){return i.selected||i.hovered});this.disableArrowShadow=n.length>500}},{key:"drawNode",value:function(n,i,a,o,s,u,l,c,f){var d=i.x,h=d===void 0?0:d,p=i.y,g=p===void 0?0:p,y=i.size,b=y===void 0?ha:y,_=i.captionAlign,m=_===void 0?"center":_,x=i.disabled,S=i.activated,O=i.selected,E=i.hovered,T=i.id,P=i.icon,I=i.overlayIcon,k=Jx(i),L=$n(),B=this.getRingStyles(i,o,s),j=B.reduce(function(Xt,Vr){return Xt+Vr.width},0),z=b*L,H=2*z,q=KD(z,f),W=q.nodeInfoLevel,$=q.iconInfoLevel,J=i.color||l,X=n5(J),Z=z;if(j>0&&(Z=z+j),x)J=u.color,X=u.fontColor;else{var ue;if(S){var re=Date.now()%1e3/1e3,ne=re<.7?re/.7:0,le=Og(J,.4-.4*ne);GB(n,h,g,le,z+.88*z*ne)}var ce=(ue=s.selected.shadow)!==null&&ue!==void 0?ue:{width:0,opacity:0,color:""},pe=ce.width*L,fe=ce.opacity,se=ce.color,de=O||E?pe:0,ge=o.getValueForAnimationName(T,"shadowWidth",de);ge>0&&(function(Xt,Vr,Br,mr,ur,sn){var Fr=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,un=ur+sn,bn=Xt.createRadialGradient(Vr,Br,ur,Vr,Br,un);bn.addColorStop(0,"transparent"),bn.addColorStop(.01,Og(mr,.5*Fr)),bn.addColorStop(.05,Og(mr,.5*Fr)),bn.addColorStop(.5,Og(mr,.12*Fr)),bn.addColorStop(.75,Og(mr,.03*Fr)),bn.addColorStop(1,Og(mr,0)),Xt.fillStyle=bn,fG(Xt,Vr,Br,un),Xt.fill()})(n,h,g,se,Z,ge,fe)}GB(n,h,g,J,z),j>0&&Bse(n,h,g,z,B);var Oe=!!k.length;if(P){var ke=eG(z,Oe,$,W),De=W>0?1:0,Ne=tG(ke,Oe,m,$,W),Ce=Ne.iconXPos,Y=Ne.iconYPos,Q=o.getValueForAnimationName(T,"iconSize",ke),ie=o.getValueForAnimationName(T,"iconXPos",Ce),we=o.getValueForAnimationName(T,"iconYPos",Y),Ee=n.globalAlpha,Me=x?.1:De;n.globalAlpha=o.getValueForAnimationName(T,"iconOpacity",Me);var Ie=X==="#ffffff",Ye=a.getImage(P,Ie);n.drawImage(Ye,h-ie,g-we,Math.floor(Q),Math.floor(Q)),n.globalAlpha=Ee}if(I!==void 0){var ot,mt,wt,Mt,Dt=rG(H,(ot=I.size)!==null&&ot!==void 0?ot:1),vt=(mt=I.position)!==null&&mt!==void 0?mt:[0,0],tt=[(wt=vt[0])!==null&&wt!==void 0?wt:0,(Mt=vt[1])!==null&&Mt!==void 0?Mt:0],_e=nG(Dt,z,tt),Ue=_e.iconXPos,Qe=_e.iconYPos,Ze=n.globalAlpha,nt=x?.1:1;n.globalAlpha=o.getValueForAnimationName(T,"iconOpacity",nt);var It=a.getImage(I.url);n.drawImage(It,h-Ue,g-Qe,Dt,Dt),n.globalAlpha=Ze}var ct=uG(i,f,n);if(ct.hasContent){var Lt=W<2?0:1,Rt=o.getValueForAnimationName(T,"textOpacity",Lt,0);if(Rt>0){var jt=ct.lines,Yt=ct.stylesPerChar,sr=ct.yPos,Ut=ct.fontSize,Rr=ct.fontFace;n.fillStyle=Og(X,Rt),(function(Xt,Vr,Br,mr,ur,sn,Fr,un,bn,wn){var _n=mr,xn=0,on=0,Nn="".concat(ur,"px ").concat(sn),fi="normal ".concat(Nn);Vr.forEach(function(gn){Xt.font=fi;var yn=-Tb(Xt,gn.text)/2,Jn=gn.text?(function(_i){return(function(Ir){if(Array.isArray(Ir))return kP(Ir)})(_i)||(function(Ir){if(typeof Symbol<"u"&&Ir[Symbol.iterator]!=null||Ir["@@iterator"]!=null)return Array.from(Ir)})(_i)||(function(Ir,pa){if(Ir){if(typeof Ir=="string")return kP(Ir,pa);var di={}.toString.call(Ir).slice(8,-1);return di==="Object"&&Ir.constructor&&(di=Ir.constructor.name),di==="Map"||di==="Set"?Array.from(Ir):di==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(di)?kP(Ir,pa):void 0}})(_i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(gn.text):[];gn.hasHyphenChar||gn.hasEllipsisChar||Jn.push(" "),Jn.forEach(function(_i){var Ir,pa=Tb(Xt,_i),di=(Ir=Br[on])!==null&&Ir!==void 0?Ir:[],Bt=di.includes("bold"),hr=di.includes("italic");Xt.font=Bt&&hr?"italic 600 ".concat(Nn):hr?"italic 400 ".concat(Nn):Bt?"bold ".concat(Nn):fi,di.includes("underline")&&Xt.fillRect(un+yn+xn,bn+_n+.2,pa,.2),gn.hasEllipsisChar?Xt.fillText(_i,un+yn+xn-wn/2,bn+_n):Xt.fillText(_i,un+yn+xn,bn+_n),xn+=pa,on+=1}),Xt.font=fi,gn.hasHyphenChar&&Xt.fillText("‐",un+yn+xn,bn+_n),gn.hasEllipsisChar&&Xt.fillText(o2,un+yn+xn-wn/2,bn+_n),xn=0,_n+=Fr})})(n,jt,Yt,sr,Ut,Rr,Ut,h,g,c)}}}},{key:"enableShadow",value:function(n,i){var a=$n();n.shadowColor=i.color,n.shadowBlur=i.width*a,n.shadowOffsetX=0,n.shadowOffsetY=0}},{key:"disableShadow",value:function(n){n.shadowColor="rgba(0,0,0,0)",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0}},{key:"drawSegments",value:function(n,i,a,o,s){if(n.beginPath(),n.moveTo(i[0].x,i[0].y),s&&i.length>2){for(var u=1;u8&&arguments[8]!==void 0&&arguments[8],h=Math.PI/2,p=$n(),g=s.selected,y=s.width,b=s.disabled,_=s.captionAlign,m=_===void 0?"top":_,x=s.captionSize,S=x===void 0?1:x,O=Jx(s),E=O.length>0?(f=Qb(O))===null||f===void 0?void 0:f.fullCaption:"";if(E!==void 0){var T=6*S*p,P=u5,I=g===!0?"bold":"normal",k=E;n.fillStyle=b===!0?l.fontColor:c,n.font="".concat(I," ").concat(T,"px ").concat(P);var L=function(ce){return Tb(n,ce)},B=(y??1)*(g===!0?dE:1),j=L(k);if(j>o){var z=L1(k,L,function(){return o},1,!1)[0];k=z.hasEllipsisChar===!0?"".concat(z.text,"..."):k,j=o}var H=Math.cos(a),q=Math.sin(a),W={x:i.x,y:i.y},$=W.x,J=W.y,X=a;d&&(X=a-h,$+=2*T*H,J+=2*T*q,X-=h);var Z=(1+S)*p,ue=m==="bottom"?T/2+B+Z:-(B+Z);n.translate($,J),n.rotate(X),n.fillText(k,-j/2,ue),n.rotate(-X),n.translate(-$,-J);var re=2*ue*Math.sin(a),ne=2*ue*Math.cos(a),le={position:{x:i.x-re,y:i.y+ne},rotation:d?a-Math.PI:a,width:o/p,height:(T+Z)/p};u.setLabelInfo(s.id,le)}}},{key:"renderWaypointArrow",value:function(n,i,a,o,s,u,l,c,f,d){var h=arguments.length>10&&arguments[10]!==void 0?arguments[10]:OB,p=Math.PI/2,g=i.overlayIcon,y=i.color,b=i.disabled,_=i.selected,m=i.width,x=i.hovered,S=i.captionAlign,O=_===!0,E=b===!0,T=g!==void 0,P=f.rings,I=f.shadow,k=n2(i,s,a,o,l,c),L=$n(),B=Zq(i,1),j=!this.disableArrowShadow&&l,z=E?d.color:y??h,H=P[0].width*L,q=P[1].width*L,W=Jq(m,O,P),$=W.headHeight,J=W.headChinHeight,X=W.headWidth,Z=W.headSelectedAdjustment,ue=W.headPositionOffset,re=e2(k[k.length-2],k[k.length-1]),ne=ue,le=Z;Math.floor(k.length/2),k.length>2&&O&&re<$+Z-J&&(ne+=re,le-=re/2+J,k.pop(),Math.floor(k.length/2));var ce,pe,fe=k[k.length-2],se=k[k.length-1],de=(ce=fe,pe=se,Math.atan2(pe.y-ce.y,pe.x-ce.x)),ge={headPosition:{x:se.x+Math.cos(de)*ne,y:se.y+Math.sin(de)*ne},headAngle:de,headHeight:$,headChinHeight:J,headWidth:X};Qq(k,O,$,le,P);var Oe,ke=ib(k);try{for(ke.s();!(Oe=ke.n()).done;){var De=Oe.value;De.x=Math.round(De.x),De.y=Math.round(De.y)}}catch(jt){ke.e(jt)}finally{ke.f()}var Ne,Ce,Y=l||T?(function(jt){return(function(Yt){if(Array.isArray(Yt))return d5(Yt)})(jt)||(function(Yt){if(typeof Symbol<"u"&&Yt[Symbol.iterator]!=null||Yt["@@iterator"]!=null)return Array.from(Yt)})(jt)||f5(jt)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(k):null;if(n.save(),O){var Q=P[0].color,ie=P[1].color;j&&this.enableShadow(n,I),this.drawSegments(n,k,B+q,ie,c),op(n,q,ie,ge,!1,!0),j&&this.disableShadow(n),this.drawSegments(n,k,B+H,Q,c),op(n,H,Q,ge,!1,!0)}if(x===!0&&!O&&!E){var we=I.color;j&&this.enableShadow(n,I),this.drawSegments(n,k,B,we,c),op(n,B,we,ge),j&&this.disableShadow(n)}if(this.drawSegments(n,k,B,z,c),op(n,B,z,ge),l||T){var Ee=Kq(Y,a,o,c,O,P,S==="bottom"?"bottom":"top"),Me=sG(Y);if(l&&this.drawLabel(n,{x:Ee.x,y:Ee.y},Ee.angle,Me,i,s,d,h),T){var Ie,Ye,ot=g.position,mt=ot===void 0?[0,0]:ot,wt=g.url,Mt=g.size,Dt=IB(Mt===void 0?1:Mt),vt=[(Ie=mt[0])!==null&&Ie!==void 0?Ie:0,(Ye=mt[1])!==null&&Ye!==void 0?Ye:0],tt=NB(vt,Me,Dt),_e=tt.widthAlign,Ue=tt.heightAlign,Qe=O?(Ne=Ee.angle+p,Ce=r2(f.rings),{x:Math.cos(Ne)*Ce,y:Math.sin(Ne)*Ce}):{x:0,y:0},Ze=mt[1]<0?-1:1,nt=Qe.x*Ze,It=Qe.y*Ze,ct=Dt/2;n.translate(Ee.x,Ee.y),n.rotate(Ee.angle);var Lt=-ct+nt+_e,Rt=-ct+It+Ue;n.drawImage(u.getImage(wt),Lt,Rt,Dt,Dt),n.rotate(-Ee.angle),n.translate(-Ee.x,-Ee.y)}}n.restore()}},{key:"renderSelfArrow",value:function(n,i,a,o,s,u,l,c){var f=arguments.length>8&&arguments[8]!==void 0?arguments[8]:OB,d=i.overlayIcon,h=i.selected,p=i.width,g=i.hovered,y=i.disabled,b=i.color,_=t2(i,a,o),m=_.startPoint,x=_.endPoint,S=_.apexPoint,O=_.control1Point,E=_.control2Point,T=l.rings,P=l.shadow,I=$n(),k=T[0].color,L=T[1].color,B=T[0].width*I,j=T[1].width*I,z=40*I,H=(p??1)*I,q=!this.disableArrowShadow&&u,W=H>1?H/2:1,$=9*W,J=2*W,X=7*W,Z=h===!0,ue=y===!0,re=d!==void 0,ne=Math.atan2(x.y-E.y,x.x-E.x),le=Z?B*Math.sqrt(1+2*$/X*(2*$/X)):0,ce={x:x.x-Math.cos(ne)*(.5*$-J+le),y:x.y-Math.sin(ne)*(.5*$-J+le)},pe={headPosition:{x:x.x+Math.cos(ne)*(.5*$-J-le),y:x.y+Math.sin(ne)*(.5*$-J-le)},headAngle:ne,headHeight:$,headChinHeight:J,headWidth:X};if(n.save(),n.lineCap="round",Z&&(q&&this.enableShadow(n,P),n.lineWidth=H+j,n.strokeStyle=L,this.drawLoop(n,m,ce,S,O,E),op(n,j,L,pe,!1,!0),q&&this.disableShadow(n),n.lineWidth=H+B,n.strokeStyle=k,this.drawLoop(n,m,ce,S,O,E),op(n,B,k,pe,!1,!0)),n.lineWidth=H,g===!0&&!Z&&!ue){var fe=P.color;q&&this.enableShadow(n,P),n.strokeStyle=fe,n.fillStyle=fe,this.drawLoop(n,m,ce,S,O,E),op(n,H,fe,pe),q&&this.disableShadow(n)}var se=ue?c.color:b??f;if(n.fillStyle=se,n.strokeStyle=se,this.drawLoop(n,m,ce,S,O,E),op(n,H,se,pe),u||re){var de,ge=o.indexOf(i),Oe=(de=o.angles[ge])!==null&&de!==void 0?de:0,ke=$q(S,Oe,x,E,Z,T,p),De=ke.x,Ne=ke.y,Ce=ke.angle,Y=ke.flip;if(u&&this.drawLabel(n,{x:De,y:Ne},Ce,z,i,o,c,f,Y),re){var Q,ie,we=d.position,Ee=we===void 0?[0,0]:we,Me=d.url,Ie=d.size,Ye=IB(Ie===void 0?1:Ie),ot=[(Q=Ee[0])!==null&&Q!==void 0?Q:0,(ie=Ee[1])!==null&&ie!==void 0?ie:0],mt=NB(ot,z,Ye),wt=mt.widthAlign,Mt=mt.heightAlign+(Z?r2(l.rings):0)*(Ee[1]<0?-1:1);n.save(),n.translate(De,Ne),Y?(n.rotate(Ce-Math.PI),n.translate(2*-wt,2*-Mt)):n.rotate(Ce);var Dt=Ye/2,vt=-Dt+wt,tt=-Dt+Mt;n.drawImage(s.getImage(Me),vt,tt,Ye,Ye),n.restore()}}n.restore()}},{key:"renderArrow",value:function(n,i,a,o,s,u,l,c,f,d){var h=!(arguments.length>10&&arguments[10]!==void 0)||arguments[10];N1(a,o)&&(a.id===o.id?this.renderSelfArrow(n,i,a,s,u,l,c,f,d):this.renderWaypointArrow(n,i,a,o,s,u,l,h,c,f,d))}},{key:"render",value:function(n){var i,a,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.state,u=this.animationHandler,l=this.arrowBundler,c=s.zoom,f=s.layout,d=s.nodes.idToPosition,h=(i=o.canvas)!==null&&i!==void 0?i:this.canvas,p=(a=o.context)!==null&&a!==void 0?a:this.context,g=$n(),y=h.clientWidth*g,b=h.clientHeight*g;p.save(),o.backgroundColor!==void 0?(p.fillStyle=o.backgroundColor,p.fillRect(0,0,y,b)):p.clearRect(0,0,y,b),this.zoomAndPan(p,h),u.ignoreAnimations(!!o.ignoreAnimations),o.ignoreAnimations||u.advance(),l.updatePositions(d);var _=Lw(r,"getRelationshipsToRender",this,3)([o.showCaptions,c,y,b]);this.renderRelationships(_,p,f!==Zx);var m=Lw(r,"getNodesToRender",this,3)([n,y,b]);this.renderNodes(m,p,c),p.restore(),this.needsRun=!1}},{key:"renderNodes",value:function(n,i,a){var o,s=this.imageCache,u=this.animationHandler,l=this.state,c=this.ellipsisWidth,f=l.nodes.idToItem,d=l.nodeBorderStyles,h=l.disabledItemStyles,p=l.defaultNodeColor,g=ib(n);try{for(g.s();!(o=g.n()).done;){var y=o.value;this.drawNode(i,HB(HB({},f[y.id]),y),s,u,d,h,p,c,a)}}catch(b){g.e(b)}finally{g.f()}}},{key:"renderRelationships",value:function(n,i,a){var o,s=this.state.relationshipBorderStyles.selected,u=this.arrowBundler,l=this.imageCache,c=this.state,f=c.disabledItemStyles,d=c.defaultRelationshipColor,h=ib(n);try{for(h.s();!(o=h.n()).done;){var p=o.value,g=u.getBundle(p),y=p.fromNode,b=p.toNode,_=p.showLabel;this.renderArrow(i,p,y,b,g,l,_,s,f,d,a)}}catch(m){h.e(m)}finally{h.f()}}},{key:"getNodesAt",value:function(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=[],s=this.state.nodes,u=s.items,l=s.idToPosition,c=$n(),f=ib(u);try{var d=function(){var h=i.value,p=h.id,g=h.size,y=g===void 0?ha:g,b=l[p],_=b.x,m=b.y,x=Math.sqrt(Math.pow(n.x-_,2)+Math.pow(n.y-m,2));if(x<=(y+a)*c){var S=o.findIndex(function(O){return O.distance>x});o.splice(S!==-1?S:o.length,0,{data:h,targetCoordinates:{x:_,y:m},pointerCoordinates:n,distanceVector:{x:n.x-_,y:n.y-m},insideNode:x<=y*c,distance:x})}};for(f.s();!(i=f.n()).done;)d()}catch(h){f.e(h)}finally{f.f()}return o}},{key:"getRelsAt",value:function(n){var i,a=[],o=this.state,s=this.arrowBundler,u=this.relationshipThreshold,l=o.zoom,c=o.rels.items,f=o.nodes.idToPosition,d=o.layout,h=l>u,p=ib(c);try{var g=function(){var y=i.value,b=s.getBundle(y),_=f[y.from],m=f[y.to];if(_!==void 0&&m!==void 0&&b.has(y)){var x=(function(O,E,T,P,I,k){var L=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(!N1(T,P))return 1/0;var B=T===P?(function(j,z,H,q){var W=t2(z,H,q),$=W.startPoint,J=W.endPoint,X=W.apexPoint,Z=W.control1Point,ue=W.control2Point,re=MP($,X,Z,j),ne=MP(X,J,ue,j);return Math.min(re,ne)})(O,E,T,I):(function(j,z,H,q,W,$,J){var X=n2(z,H,q,W,$,J),Z=1/0;if(J&&X.length===3)Z=MP(X[0],X[2],X[1],j);else for(var ue=1;uex});a.splice(S!==-1?S:a.length,0,{data:y,fromTargetCoordinates:_,toTargetCoordinates:m,pointerCoordinates:n,distance:x})}}};for(p.s();!(i=p.n()).done;)g()}catch(y){p.e(y)}finally{p.f()}return a}},{key:"getRingStyles",value:function(n,i,a){var o=n.selected?a.selected.rings:a.default.rings;if(!o.length){var s=i.getById(n.id);return s!==void 0&&Object.entries(s).forEach(function(u){var l=(function(d,h){return(function(p){if(Array.isArray(p))return p})(d)||(function(p,g){var y=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(y!=null){var b,_,m,x,S=[],O=!0,E=!1;try{if(m=(y=y.call(p)).next,g!==0)for(;!(O=(b=m.call(y)).done)&&(S.push(b.value),S.length!==g);O=!0);}catch(T){E=!0,_=T}finally{try{if(!O&&y.return!=null&&(x=y.return(),Object(x)!==x))return}finally{if(E)throw _}}return S}})(d,h)||f5(d,h)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +\r\v`.includes(y))){if(!(l_;){for(m-=1;kse(x());)m-=1;if(!(m-u>1)){i="",f=!0,c=!1;break}i=r.slice(u,m),b=e(i),f=!0,c=!1}return s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},{v:s}}c=!1,f=!1;var S=(function(E){var T=E.length,P=Math.min(T-1,3);if(T===1)return{hyphen:!1,cnt:0};for(var I=0;I_;){if(!(O-u>1)){i=r[u],O=u+1,b=e(i),c=!1;break}O-=1,i=r.slice(u,O),b=e(i),c=!0}else i=(i=r.slice(u,O)).trim();s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:c},u=O,l+=1}},g=1;g<=r.length;g++)if(h=p())return h.v;return i=r.slice(u,r.length),s[l]={text:i,hasEllipsisChar:f,hasHyphenChar:!1},s},Qb=function(){var r=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t,n){var i=t.value;if(i){var a="".concat(n>0&&e.length?", ":"").concat(i);return[].concat(nb(e),[a2(a2({},t),{},{value:a,chars:a.split("").map(function(o,s){var u,l;return n!==0&&e.length?s<2?null:nb((u=t.styles)!==null&&u!==void 0?u:[]):nb((l=t.styles)!==null&&l!==void 0?l:[])})})])}return e},[]);return{stylesPerChar:r.reduce(function(e,t){return[].concat(nb(e),nb(t.chars))},[]),fullCaption:r.map(function(e){return e.value}).join("")}};function uG(r,e,t){var n,i,a,o=r.size,s=o===void 0?ha:o,u=r.caption,l=u===void 0?"":u,c=r.captions,f=c===void 0?[]:c,d=r.captionAlign,h=d===void 0?"center":d,p=r.captionSize,g=p===void 0?1:p,y=r.icon,b=s*$n(),_=2*b,m=KD(b,e).fontInfoLevel,x=(function(z){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ha)/({1:3.5,2:2.75,3:2}[arguments.length>2&&arguments[2]!==void 0?arguments[2]:1]+(arguments.length>3&&arguments[3]!==void 0&&arguments[3]?1:0))/z})(m,b,g,!!y),S=f.length>0,O=l.length>0,E=[],T="";if(!S&&!O)return{lines:[],stylesPerChar:[],fullCaption:"",fontSize:x,fontFace:wb,fontColor:"",yPos:0,maxNoLines:2,hasContent:!1};if(S){var P=Qb(f);E=P.stylesPerChar,T=P.fullCaption}else O&&(T=l,E=l.split("").map(function(){return[]}));var I=2;m===((n=i2[1])===null||n===void 0?void 0:n[1])?I=3:m===((i=i2[2])===null||i===void 0?void 0:i[1])&&(I=4);var k=h==="center"?.7*_:2*Math.sqrt(Math.pow(_/2,2)-Math.pow(_/3,2)),L=t;L||(L=document.createElement("canvas").getContext("2d")),L.font="bold ".concat(x,"px ").concat(wb),a=(function(z,H,q,W,$,J,X){var Z=(function(fe){return/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(fe)})(H)?H.split("").reverse().join(""):H;z.font="bold ".concat(W,"px ").concat(q).replace(/"/g,"");for(var ue=function(fe){return Tb(z,fe)},re=J?(X<4?["",""]:[""]).length:0,ne=function(fe,se){return(function(de,ge,Oe){var ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"top",De=.98*Oe,Ne=.89*Oe,Te=.95*Oe;return ge===1?De:ge===2?Te:ge===3&&ke==="top"?de===0||de===2?Ne:De:ge===4&&ke==="top"?de===0||de===3?.78*Oe:Te:ge===5&&ke==="top"?de===0||de===4?.65*Oe:de===1||de===3?Ne:Te:De})(fe+re,se+re,$)},le=1,ce=[],pe=function(){if((ce=(function(se,de,ge,Oe){var ke,De=se.split(/\s/g).filter(function(Ie){return Ie.length>0}),Ne=[],Te=null,Y=function(Ie){return de(Ie)>ge(Ne.length,Oe)},Q=(function(Ie){var Ye=typeof Symbol<"u"&&Ie[Symbol.iterator]||Ie["@@iterator"];if(!Ye){if(Array.isArray(Ie)||(Ye=oG(Ie))){Ye&&(Ie=Ye);var ot=0,mt=function(){};return{s:mt,n:function(){return ot>=Ie.length?{done:!0}:{done:!1,value:Ie[ot++]}},e:function(vt){throw vt},f:mt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var wt,Mt=!0,Dt=!1;return{s:function(){Ye=Ye.call(Ie)},n:function(){var vt=Ye.next();return Mt=vt.done,vt},e:function(vt){Dt=!0,wt=vt},f:function(){try{Mt||Ye.return==null||Ye.return()}finally{if(Dt)throw wt}}}})(De);try{for(Q.s();!(ke=Q.n()).done;){var ie=ke.value,we=Te?"".concat(Te," ").concat(ie):ie;if(de(we)Oe)return[]}}}catch(Ie){Q.e(Ie)}finally{Q.f()}if(Te){var Me=Y(Te);Ne.push({text:Te,overflowed:Me})}return Ne.length<=Oe?Ne:[]})(Z,ue,ne,le)).length===0)ce=L1(Z,ue,ne,le,X>le);else if(ce.some(function(se){return se.overflowed})){var fe=le;ce=ce.reduce(function(se,de){var ge=X-se.length;if(ge===0){var Oe=se[se.length-1];return Oe.text.endsWith(o2)||(ue(Oe.text)+ue(o2)>ne(se.length,fe)?(se[se.length-1].text=Oe.text.slice(0,-2),se[se.length-1].hasEllipsisChar=!0):(se[se.length-1].text=Oe.text,se[se.length-1].hasEllipsisChar=!0)),se}if(de.overflowed){var ke=L1(de.text,ue,ne,ge);se=se.concat(ke)}else se.push({text:de.text,hasEllipsisChar:!1,hasHyphenChar:!1});return se},[])}else ce=ce.map(function(se){return a2(a2({},se),{},{hasEllipsisChar:!1,hasHyphenChar:!1})});le+=1};ce.length===0;)pe();return Array.from(ce)})(L,T,wb,x,k,!!y,I);var B,j=-(a.length-2)*x/2;return B=h&&h!=="center"?h==="bottom"?j+b/Math.PI:j-b/Math.PI:j,{lines:a,stylesPerChar:E,fullCaption:T,fontSize:x,fontFace:wb,fontColor:"",yPos:B,maxNoLines:I,hasContent:!0}}function Jb(r){return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jb(r)}function Ise(r,e){for(var t=0;t0?(this.currentTime-this.startTime)/n:1)>=1?(this.currentValue=this.endValue,this.status=2):(this.currentValue=this.startValue+t*(this.endValue-this.startValue),this.hasNextAnimation=!0),this.hasNextAnimation}},{key:"setEndValue",value:function(t){this.endValue!==t&&(t-this.currentValue!==0?(this.currentTime=new Date().getTime(),this.status=1,this.startValue=this.currentValue,this.endValue=t,this.startTime=this.currentTime,this.setEndTime(this.startTime+this.duration)):this.endValue=t)}},{key:"setEndTime",value:function(t){this.endTime=Math.max(t,this.startTime)}}])&&Ise(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function e1(r){return e1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e1(r)}function zB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function qB(r){for(var e=1;e3&&arguments[3]!==void 0?arguments[3]:1;if(this.ignoreAnimationsFlag)return i;var u=(a=this.getById(t))!==null&&a!==void 0?a:{};if(u[n]===void 0){var l=s===1?this.createSizeAnimation(0,t,n):this.createFadeAnimation(0,t,n);l.setEndValue(i),o=l.currentValue}else{var c=u[n];if(c.currentValue===i)return i;c.setEndValue(i),o=c.currentValue}return this.hasNextAnimation=!0,o}},{key:"createAnimation",value:function(t,n,i){var a,o=new Nse(n,t),s=(a=this.animations.get(n))!==null&&a!==void 0?a:{};return this.animations.set(n,qB(qB({},s),{},kg({},i,o))),o}},{key:"getById",value:function(t){return this.animations.get(t)}},{key:"createFadeAnimation",value:function(t,n,i){var a,o=this.createAnimation(t,n,i);return o.setDuration((a=this.durations[0])!==null&&a!==void 0?a:this.defaultDuration),o}},{key:"createSizeAnimation",value:function(t,n,i){var a,o=this.createAnimation(t,n,i);return o.setDuration((a=this.durations[1])!==null&&a!==void 0?a:this.defaultDuration),o}}],e&&Lse(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function kP(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t4&&arguments[4]!==void 0)||arguments[4],a=arguments.length>5&&arguments[5]!==void 0&&arguments[5],o=n.headPosition,s=n.headAngle,u=n.headHeight,l=n.headChinHeight,c=n.headWidth,f=Math.cos(s),d=Math.sin(s),h=function(y,b){return{x:o.x+y*f-b*d,y:o.y+y*d+b*f}},p=[h(l-u,0),h(-u,c/2),h(0,0),h(-u,-c/2)],g={lineWidth:r.lineWidth,strokeStyle:r.strokeStyle,fillStyle:r.fillStyle};r.lineWidth=e,r.strokeStyle=t,r.fillStyle=t,(function(y,b,_,m){if(y.beginPath(),b.length>0){var x=b[0];y.moveTo(x.x,x.y)}for(var S=1;S=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function f5(r,e){if(r){if(typeof r=="string")return d5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d5(r,e):void 0}}function d5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t3&&arguments[3]!==void 0?arguments[3]:{};return(function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")})(this,r),s=this,l=[a,IP,c],u=Hm(u=r),dm(o=WB(s,dG()?Reflect.construct(u,l||[],Hm(s).constructor):u.apply(s,l)),"canvas",void 0),dm(o,"context",void 0),dm(o,"animationHandler",void 0),dm(o,"ellipsisWidth",void 0),dm(o,"disableArrowShadow",!1),i===null?WB(o):(o.canvas=n,o.context=i,a.nodes.addChannel(IP),a.rels.addChannel(IP),o.animationHandler=new jse,o.animationHandler.setOptions({fadeDuration:150,sizeDuration:150}),o.ellipsisWidth=Tb(i,o2),o)}return(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&v5(n,i)})(r,aG),e=r,t=[{key:"needsToRun",value:function(){return Lw(r,"needsToRun",this,3)([])||this.animationHandler.needsToRun()||this.activeNodes.size>0}},{key:"processUpdates",value:function(){Lw(r,"processUpdates",this,3)([]);var n=this.state.rels.items.filter(function(i){return i.selected||i.hovered});this.disableArrowShadow=n.length>500}},{key:"drawNode",value:function(n,i,a,o,s,u,l,c,f){var d=i.x,h=d===void 0?0:d,p=i.y,g=p===void 0?0:p,y=i.size,b=y===void 0?ha:y,_=i.captionAlign,m=_===void 0?"center":_,x=i.disabled,S=i.activated,O=i.selected,E=i.hovered,T=i.id,P=i.icon,I=i.overlayIcon,k=Jx(i),L=$n(),B=this.getRingStyles(i,o,s),j=B.reduce(function(Xt,Vr){return Xt+Vr.width},0),z=b*L,H=2*z,q=KD(z,f),W=q.nodeInfoLevel,$=q.iconInfoLevel,J=i.color||l,X=n5(J),Z=z;if(j>0&&(Z=z+j),x)J=u.color,X=u.fontColor;else{var ue;if(S){var re=Date.now()%1e3/1e3,ne=re<.7?re/.7:0,le=Og(J,.4-.4*ne);GB(n,h,g,le,z+.88*z*ne)}var ce=(ue=s.selected.shadow)!==null&&ue!==void 0?ue:{width:0,opacity:0,color:""},pe=ce.width*L,fe=ce.opacity,se=ce.color,de=O||E?pe:0,ge=o.getValueForAnimationName(T,"shadowWidth",de);ge>0&&(function(Xt,Vr,Br,mr,ur,sn){var Fr=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,un=ur+sn,bn=Xt.createRadialGradient(Vr,Br,ur,Vr,Br,un);bn.addColorStop(0,"transparent"),bn.addColorStop(.01,Og(mr,.5*Fr)),bn.addColorStop(.05,Og(mr,.5*Fr)),bn.addColorStop(.5,Og(mr,.12*Fr)),bn.addColorStop(.75,Og(mr,.03*Fr)),bn.addColorStop(1,Og(mr,0)),Xt.fillStyle=bn,fG(Xt,Vr,Br,un),Xt.fill()})(n,h,g,se,Z,ge,fe)}GB(n,h,g,J,z),j>0&&Bse(n,h,g,z,B);var Oe=!!k.length;if(P){var ke=eG(z,Oe,$,W),De=W>0?1:0,Ne=tG(ke,Oe,m,$,W),Te=Ne.iconXPos,Y=Ne.iconYPos,Q=o.getValueForAnimationName(T,"iconSize",ke),ie=o.getValueForAnimationName(T,"iconXPos",Te),we=o.getValueForAnimationName(T,"iconYPos",Y),Ee=n.globalAlpha,Me=x?.1:De;n.globalAlpha=o.getValueForAnimationName(T,"iconOpacity",Me);var Ie=X==="#ffffff",Ye=a.getImage(P,Ie);n.drawImage(Ye,h-ie,g-we,Math.floor(Q),Math.floor(Q)),n.globalAlpha=Ee}if(I!==void 0){var ot,mt,wt,Mt,Dt=rG(H,(ot=I.size)!==null&&ot!==void 0?ot:1),vt=(mt=I.position)!==null&&mt!==void 0?mt:[0,0],tt=[(wt=vt[0])!==null&&wt!==void 0?wt:0,(Mt=vt[1])!==null&&Mt!==void 0?Mt:0],_e=nG(Dt,z,tt),Ue=_e.iconXPos,Qe=_e.iconYPos,Ze=n.globalAlpha,nt=x?.1:1;n.globalAlpha=o.getValueForAnimationName(T,"iconOpacity",nt);var It=a.getImage(I.url);n.drawImage(It,h-Ue,g-Qe,Dt,Dt),n.globalAlpha=Ze}var ct=uG(i,f,n);if(ct.hasContent){var Lt=W<2?0:1,Rt=o.getValueForAnimationName(T,"textOpacity",Lt,0);if(Rt>0){var jt=ct.lines,Yt=ct.stylesPerChar,sr=ct.yPos,Ut=ct.fontSize,Rr=ct.fontFace;n.fillStyle=Og(X,Rt),(function(Xt,Vr,Br,mr,ur,sn,Fr,un,bn,wn){var _n=mr,xn=0,on=0,Nn="".concat(ur,"px ").concat(sn),fi="normal ".concat(Nn);Vr.forEach(function(gn){Xt.font=fi;var yn=-Tb(Xt,gn.text)/2,Jn=gn.text?(function(_i){return(function(Ir){if(Array.isArray(Ir))return kP(Ir)})(_i)||(function(Ir){if(typeof Symbol<"u"&&Ir[Symbol.iterator]!=null||Ir["@@iterator"]!=null)return Array.from(Ir)})(_i)||(function(Ir,pa){if(Ir){if(typeof Ir=="string")return kP(Ir,pa);var di={}.toString.call(Ir).slice(8,-1);return di==="Object"&&Ir.constructor&&(di=Ir.constructor.name),di==="Map"||di==="Set"?Array.from(Ir):di==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(di)?kP(Ir,pa):void 0}})(_i)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(gn.text):[];gn.hasHyphenChar||gn.hasEllipsisChar||Jn.push(" "),Jn.forEach(function(_i){var Ir,pa=Tb(Xt,_i),di=(Ir=Br[on])!==null&&Ir!==void 0?Ir:[],Bt=di.includes("bold"),hr=di.includes("italic");Xt.font=Bt&&hr?"italic 600 ".concat(Nn):hr?"italic 400 ".concat(Nn):Bt?"bold ".concat(Nn):fi,di.includes("underline")&&Xt.fillRect(un+yn+xn,bn+_n+.2,pa,.2),gn.hasEllipsisChar?Xt.fillText(_i,un+yn+xn-wn/2,bn+_n):Xt.fillText(_i,un+yn+xn,bn+_n),xn+=pa,on+=1}),Xt.font=fi,gn.hasHyphenChar&&Xt.fillText("‐",un+yn+xn,bn+_n),gn.hasEllipsisChar&&Xt.fillText(o2,un+yn+xn-wn/2,bn+_n),xn=0,_n+=Fr})})(n,jt,Yt,sr,Ut,Rr,Ut,h,g,c)}}}},{key:"enableShadow",value:function(n,i){var a=$n();n.shadowColor=i.color,n.shadowBlur=i.width*a,n.shadowOffsetX=0,n.shadowOffsetY=0}},{key:"disableShadow",value:function(n){n.shadowColor="rgba(0,0,0,0)",n.shadowBlur=0,n.shadowOffsetX=0,n.shadowOffsetY=0}},{key:"drawSegments",value:function(n,i,a,o,s){if(n.beginPath(),n.moveTo(i[0].x,i[0].y),s&&i.length>2){for(var u=1;u8&&arguments[8]!==void 0&&arguments[8],h=Math.PI/2,p=$n(),g=s.selected,y=s.width,b=s.disabled,_=s.captionAlign,m=_===void 0?"top":_,x=s.captionSize,S=x===void 0?1:x,O=Jx(s),E=O.length>0?(f=Qb(O))===null||f===void 0?void 0:f.fullCaption:"";if(E!==void 0){var T=6*S*p,P=u5,I=g===!0?"bold":"normal",k=E;n.fillStyle=b===!0?l.fontColor:c,n.font="".concat(I," ").concat(T,"px ").concat(P);var L=function(ce){return Tb(n,ce)},B=(y??1)*(g===!0?dE:1),j=L(k);if(j>o){var z=L1(k,L,function(){return o},1,!1)[0];k=z.hasEllipsisChar===!0?"".concat(z.text,"..."):k,j=o}var H=Math.cos(a),q=Math.sin(a),W={x:i.x,y:i.y},$=W.x,J=W.y,X=a;d&&(X=a-h,$+=2*T*H,J+=2*T*q,X-=h);var Z=(1+S)*p,ue=m==="bottom"?T/2+B+Z:-(B+Z);n.translate($,J),n.rotate(X),n.fillText(k,-j/2,ue),n.rotate(-X),n.translate(-$,-J);var re=2*ue*Math.sin(a),ne=2*ue*Math.cos(a),le={position:{x:i.x-re,y:i.y+ne},rotation:d?a-Math.PI:a,width:o/p,height:(T+Z)/p};u.setLabelInfo(s.id,le)}}},{key:"renderWaypointArrow",value:function(n,i,a,o,s,u,l,c,f,d){var h=arguments.length>10&&arguments[10]!==void 0?arguments[10]:OB,p=Math.PI/2,g=i.overlayIcon,y=i.color,b=i.disabled,_=i.selected,m=i.width,x=i.hovered,S=i.captionAlign,O=_===!0,E=b===!0,T=g!==void 0,P=f.rings,I=f.shadow,k=n2(i,s,a,o,l,c),L=$n(),B=Zq(i,1),j=!this.disableArrowShadow&&l,z=E?d.color:y??h,H=P[0].width*L,q=P[1].width*L,W=Jq(m,O,P),$=W.headHeight,J=W.headChinHeight,X=W.headWidth,Z=W.headSelectedAdjustment,ue=W.headPositionOffset,re=e2(k[k.length-2],k[k.length-1]),ne=ue,le=Z;Math.floor(k.length/2),k.length>2&&O&&re<$+Z-J&&(ne+=re,le-=re/2+J,k.pop(),Math.floor(k.length/2));var ce,pe,fe=k[k.length-2],se=k[k.length-1],de=(ce=fe,pe=se,Math.atan2(pe.y-ce.y,pe.x-ce.x)),ge={headPosition:{x:se.x+Math.cos(de)*ne,y:se.y+Math.sin(de)*ne},headAngle:de,headHeight:$,headChinHeight:J,headWidth:X};Qq(k,O,$,le,P);var Oe,ke=ib(k);try{for(ke.s();!(Oe=ke.n()).done;){var De=Oe.value;De.x=Math.round(De.x),De.y=Math.round(De.y)}}catch(jt){ke.e(jt)}finally{ke.f()}var Ne,Te,Y=l||T?(function(jt){return(function(Yt){if(Array.isArray(Yt))return d5(Yt)})(jt)||(function(Yt){if(typeof Symbol<"u"&&Yt[Symbol.iterator]!=null||Yt["@@iterator"]!=null)return Array.from(Yt)})(jt)||f5(jt)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(k):null;if(n.save(),O){var Q=P[0].color,ie=P[1].color;j&&this.enableShadow(n,I),this.drawSegments(n,k,B+q,ie,c),op(n,q,ie,ge,!1,!0),j&&this.disableShadow(n),this.drawSegments(n,k,B+H,Q,c),op(n,H,Q,ge,!1,!0)}if(x===!0&&!O&&!E){var we=I.color;j&&this.enableShadow(n,I),this.drawSegments(n,k,B,we,c),op(n,B,we,ge),j&&this.disableShadow(n)}if(this.drawSegments(n,k,B,z,c),op(n,B,z,ge),l||T){var Ee=Kq(Y,a,o,c,O,P,S==="bottom"?"bottom":"top"),Me=sG(Y);if(l&&this.drawLabel(n,{x:Ee.x,y:Ee.y},Ee.angle,Me,i,s,d,h),T){var Ie,Ye,ot=g.position,mt=ot===void 0?[0,0]:ot,wt=g.url,Mt=g.size,Dt=IB(Mt===void 0?1:Mt),vt=[(Ie=mt[0])!==null&&Ie!==void 0?Ie:0,(Ye=mt[1])!==null&&Ye!==void 0?Ye:0],tt=NB(vt,Me,Dt),_e=tt.widthAlign,Ue=tt.heightAlign,Qe=O?(Ne=Ee.angle+p,Te=r2(f.rings),{x:Math.cos(Ne)*Te,y:Math.sin(Ne)*Te}):{x:0,y:0},Ze=mt[1]<0?-1:1,nt=Qe.x*Ze,It=Qe.y*Ze,ct=Dt/2;n.translate(Ee.x,Ee.y),n.rotate(Ee.angle);var Lt=-ct+nt+_e,Rt=-ct+It+Ue;n.drawImage(u.getImage(wt),Lt,Rt,Dt,Dt),n.rotate(-Ee.angle),n.translate(-Ee.x,-Ee.y)}}n.restore()}},{key:"renderSelfArrow",value:function(n,i,a,o,s,u,l,c){var f=arguments.length>8&&arguments[8]!==void 0?arguments[8]:OB,d=i.overlayIcon,h=i.selected,p=i.width,g=i.hovered,y=i.disabled,b=i.color,_=t2(i,a,o),m=_.startPoint,x=_.endPoint,S=_.apexPoint,O=_.control1Point,E=_.control2Point,T=l.rings,P=l.shadow,I=$n(),k=T[0].color,L=T[1].color,B=T[0].width*I,j=T[1].width*I,z=40*I,H=(p??1)*I,q=!this.disableArrowShadow&&u,W=H>1?H/2:1,$=9*W,J=2*W,X=7*W,Z=h===!0,ue=y===!0,re=d!==void 0,ne=Math.atan2(x.y-E.y,x.x-E.x),le=Z?B*Math.sqrt(1+2*$/X*(2*$/X)):0,ce={x:x.x-Math.cos(ne)*(.5*$-J+le),y:x.y-Math.sin(ne)*(.5*$-J+le)},pe={headPosition:{x:x.x+Math.cos(ne)*(.5*$-J-le),y:x.y+Math.sin(ne)*(.5*$-J-le)},headAngle:ne,headHeight:$,headChinHeight:J,headWidth:X};if(n.save(),n.lineCap="round",Z&&(q&&this.enableShadow(n,P),n.lineWidth=H+j,n.strokeStyle=L,this.drawLoop(n,m,ce,S,O,E),op(n,j,L,pe,!1,!0),q&&this.disableShadow(n),n.lineWidth=H+B,n.strokeStyle=k,this.drawLoop(n,m,ce,S,O,E),op(n,B,k,pe,!1,!0)),n.lineWidth=H,g===!0&&!Z&&!ue){var fe=P.color;q&&this.enableShadow(n,P),n.strokeStyle=fe,n.fillStyle=fe,this.drawLoop(n,m,ce,S,O,E),op(n,H,fe,pe),q&&this.disableShadow(n)}var se=ue?c.color:b??f;if(n.fillStyle=se,n.strokeStyle=se,this.drawLoop(n,m,ce,S,O,E),op(n,H,se,pe),u||re){var de,ge=o.indexOf(i),Oe=(de=o.angles[ge])!==null&&de!==void 0?de:0,ke=$q(S,Oe,x,E,Z,T,p),De=ke.x,Ne=ke.y,Te=ke.angle,Y=ke.flip;if(u&&this.drawLabel(n,{x:De,y:Ne},Te,z,i,o,c,f,Y),re){var Q,ie,we=d.position,Ee=we===void 0?[0,0]:we,Me=d.url,Ie=d.size,Ye=IB(Ie===void 0?1:Ie),ot=[(Q=Ee[0])!==null&&Q!==void 0?Q:0,(ie=Ee[1])!==null&&ie!==void 0?ie:0],mt=NB(ot,z,Ye),wt=mt.widthAlign,Mt=mt.heightAlign+(Z?r2(l.rings):0)*(Ee[1]<0?-1:1);n.save(),n.translate(De,Ne),Y?(n.rotate(Te-Math.PI),n.translate(2*-wt,2*-Mt)):n.rotate(Te);var Dt=Ye/2,vt=-Dt+wt,tt=-Dt+Mt;n.drawImage(s.getImage(Me),vt,tt,Ye,Ye),n.restore()}}n.restore()}},{key:"renderArrow",value:function(n,i,a,o,s,u,l,c,f,d){var h=!(arguments.length>10&&arguments[10]!==void 0)||arguments[10];N1(a,o)&&(a.id===o.id?this.renderSelfArrow(n,i,a,s,u,l,c,f,d):this.renderWaypointArrow(n,i,a,o,s,u,l,h,c,f,d))}},{key:"render",value:function(n){var i,a,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.state,u=this.animationHandler,l=this.arrowBundler,c=s.zoom,f=s.layout,d=s.nodes.idToPosition,h=(i=o.canvas)!==null&&i!==void 0?i:this.canvas,p=(a=o.context)!==null&&a!==void 0?a:this.context,g=$n(),y=h.clientWidth*g,b=h.clientHeight*g;p.save(),o.backgroundColor!==void 0?(p.fillStyle=o.backgroundColor,p.fillRect(0,0,y,b)):p.clearRect(0,0,y,b),this.zoomAndPan(p,h),u.ignoreAnimations(!!o.ignoreAnimations),o.ignoreAnimations||u.advance(),l.updatePositions(d);var _=Lw(r,"getRelationshipsToRender",this,3)([o.showCaptions,c,y,b]);this.renderRelationships(_,p,f!==Zx);var m=Lw(r,"getNodesToRender",this,3)([n,y,b]);this.renderNodes(m,p,c),p.restore(),this.needsRun=!1}},{key:"renderNodes",value:function(n,i,a){var o,s=this.imageCache,u=this.animationHandler,l=this.state,c=this.ellipsisWidth,f=l.nodes.idToItem,d=l.nodeBorderStyles,h=l.disabledItemStyles,p=l.defaultNodeColor,g=ib(n);try{for(g.s();!(o=g.n()).done;){var y=o.value;this.drawNode(i,HB(HB({},f[y.id]),y),s,u,d,h,p,c,a)}}catch(b){g.e(b)}finally{g.f()}}},{key:"renderRelationships",value:function(n,i,a){var o,s=this.state.relationshipBorderStyles.selected,u=this.arrowBundler,l=this.imageCache,c=this.state,f=c.disabledItemStyles,d=c.defaultRelationshipColor,h=ib(n);try{for(h.s();!(o=h.n()).done;){var p=o.value,g=u.getBundle(p),y=p.fromNode,b=p.toNode,_=p.showLabel;this.renderArrow(i,p,y,b,g,l,_,s,f,d,a)}}catch(m){h.e(m)}finally{h.f()}}},{key:"getNodesAt",value:function(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=[],s=this.state.nodes,u=s.items,l=s.idToPosition,c=$n(),f=ib(u);try{var d=function(){var h=i.value,p=h.id,g=h.size,y=g===void 0?ha:g,b=l[p],_=b.x,m=b.y,x=Math.sqrt(Math.pow(n.x-_,2)+Math.pow(n.y-m,2));if(x<=(y+a)*c){var S=o.findIndex(function(O){return O.distance>x});o.splice(S!==-1?S:o.length,0,{data:h,targetCoordinates:{x:_,y:m},pointerCoordinates:n,distanceVector:{x:n.x-_,y:n.y-m},insideNode:x<=y*c,distance:x})}};for(f.s();!(i=f.n()).done;)d()}catch(h){f.e(h)}finally{f.f()}return o}},{key:"getRelsAt",value:function(n){var i,a=[],o=this.state,s=this.arrowBundler,u=this.relationshipThreshold,l=o.zoom,c=o.rels.items,f=o.nodes.idToPosition,d=o.layout,h=l>u,p=ib(c);try{var g=function(){var y=i.value,b=s.getBundle(y),_=f[y.from],m=f[y.to];if(_!==void 0&&m!==void 0&&b.has(y)){var x=(function(O,E,T,P,I,k){var L=arguments.length>6&&arguments[6]!==void 0&&arguments[6];if(!N1(T,P))return 1/0;var B=T===P?(function(j,z,H,q){var W=t2(z,H,q),$=W.startPoint,J=W.endPoint,X=W.apexPoint,Z=W.control1Point,ue=W.control2Point,re=MP($,X,Z,j),ne=MP(X,J,ue,j);return Math.min(re,ne)})(O,E,T,I):(function(j,z,H,q,W,$,J){var X=n2(z,H,q,W,$,J),Z=1/0;if(J&&X.length===3)Z=MP(X[0],X[2],X[1],j);else for(var ue=1;uex});a.splice(S!==-1?S:a.length,0,{data:y,fromTargetCoordinates:_,toTargetCoordinates:m,pointerCoordinates:n,distance:x})}}};for(p.s();!(i=p.n()).done;)g()}catch(y){p.e(y)}finally{p.f()}return a}},{key:"getRingStyles",value:function(n,i,a){var o=n.selected?a.selected.rings:a.default.rings;if(!o.length){var s=i.getById(n.id);return s!==void 0&&Object.entries(s).forEach(function(u){var l=(function(d,h){return(function(p){if(Array.isArray(p))return p})(d)||(function(p,g){var y=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(y!=null){var b,_,m,x,S=[],O=!0,E=!1;try{if(m=(y=y.call(p)).next,g!==0)for(;!(O=(b=m.call(y)).done)&&(S.push(b.value),S.length!==g);O=!0);}catch(T){E=!0,_=T}finally{try{if(!O&&y.return!=null&&(x=y.return(),Object(x)!==x))return}finally{if(E)throw _}}return S}})(d,h)||f5(d,h)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(u,2),c=l[0],f=l[1];c.startsWith("ring-")&&f.setEndValue(0)}),[{width:0,color:""}]}return o.map(function(u,l){var c=u.widthFactor,f=u.color,d=(n.size||ha)*c*$n();return{width:i.getValueForAnimationName(n.id,"ring-".concat(l),d),color:f}})}},{key:"zoomAndPan",value:function(n,i){var a=i.width,o=i.height,s=this.state,u=s.zoom,l=s.panX,c=s.panY;n.translate(-a/2*u,-o/2*u),n.translate(-l*u,-c*u),n.scale(u,u),n.translate(a/2/u,o/2/u),n.translate(a/2,o/2)}}],t&&Fse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t})();function YB(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t=0;o--){var s=t[o],u=document.createElementNS("http://www.w3.org/2000/svg","polygon");u.setAttribute("points",a),u.setAttribute("fill","none"),u.setAttribute("stroke",s.color),u.setAttribute("stroke-width",String(s.width*n)),u.setAttribute("stroke-linecap","round"),u.setAttribute("stroke-linejoin","round"),i.push(u)}var l=document.createElementNS("http://www.w3.org/2000/svg","polygon");return l.setAttribute("points",a),l.setAttribute("fill",e),i.push(l),i},NP=function(r){var e=r.x,t=r.y,n=r.fontSize,i=r.fontFace,a=r.fontColor,o=r.textAnchor,s=r.dominantBaseline,u=r.lineSpans,l=r.transform,c=r.fontWeight,f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("x",String(e)),f.setAttribute("y",String(t)),f.setAttribute("text-anchor",o),f.setAttribute("dominant-baseline",s),f.setAttribute("font-size",String(n)),f.setAttribute("font-family",i),f.setAttribute("fill",a),l&&f.setAttribute("transform",l),c&&f.setAttribute("font-weight",c);var d,h=(function(y,b){var _=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(!_){if(Array.isArray(y)||(_=(function(T,P){if(T){if(typeof T=="string")return YB(T,P);var I={}.toString.call(T).slice(8,-1);return I==="Object"&&T.constructor&&(I=T.constructor.name),I==="Map"||I==="Set"?Array.from(T):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?YB(T,P):void 0}})(y))||b){_&&(y=_);var m=0,x=function(){};return{s:x,n:function(){return m>=y.length?{done:!0}:{done:!1,value:y[m++]}},e:function(T){throw T},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var S,O=!0,E=!1;return{s:function(){_=_.call(y)},n:function(){var T=_.next();return O=T.done,T},e:function(T){E=!0,S=T},f:function(){try{O||_.return==null||_.return()}finally{if(E)throw S}}}})(u);try{for(h.s();!(d=h.n()).done;){var p=d.value,g=document.createElementNS("http://www.w3.org/2000/svg","tspan");g.textContent=p.text,zse(g,p.style),f.appendChild(g)}}catch(y){h.e(y)}finally{h.f()}return f},$B=function(r,e,t,n,i){for(var a=[],o=n.length-1;o>=0;o--){var s=n[o],u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d",r),u.setAttribute("stroke",s.color),u.setAttribute("stroke-width",String(t+s.width*i)),u.setAttribute("stroke-linecap","round"),u.setAttribute("fill","none"),a.push(u)}var l=document.createElementNS("http://www.w3.org/2000/svg","path");return l.setAttribute("d",r),l.setAttribute("stroke",e),l.setAttribute("stroke-width",String(t)),l.setAttribute("fill","none"),a.push(l),a},KB=function(r,e,t,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.3333333333333333,a=Math.atan2(e.y-r.y,e.x-r.x),o={x:e.x+Math.cos(a)*(t*i),y:e.y+Math.sin(a)*(t*i)};return{tip:o,base1:{x:o.x-t*Math.cos(a)+n/2*Math.sin(a),y:o.y-t*Math.sin(a)-n/2*Math.cos(a)},base2:{x:o.x-t*Math.cos(a)-n/2*Math.sin(a),y:o.y-t*Math.sin(a)+n/2*Math.cos(a)},angle:a}},LP=function(r,e,t){for(var n=[],i="",a="",o="",s=t,u=0;u0&&n.push({text:a,style:o}),a=c,o=f,i=f):a+=c,s+=1}return a.length>0&&n.push({text:a,style:o}),n},ZB=function(r){var e=r.nodeX,t=e===void 0?0:e,n=r.nodeY,i=n===void 0?0:n,a=r.iconXPos,o=r.iconYPos,s=r.iconSize,u=r.image,l=r.isDisabled,c=document.createElementNS("http://www.w3.org/2000/svg","image");c.setAttribute("x",String(t-a)),c.setAttribute("y",String(i-o));var f=String(Math.floor(s));return c.setAttribute("width",f),c.setAttribute("height",f),c.setAttribute("href",u.toDataURL()),l&&c.setAttribute("opacity","0.1"),c};function km(r){return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},km(r)}function QB(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function jw(r){for(var e=1;e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function vG(r,e){if(r){if(typeof r=="string")return p5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p5(r,e):void 0}}function p5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t2&&arguments[2]!==void 0?arguments[2]:{};(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),m5(a=(function(u,l,c){return l=Wm(l),(function(f,d){if(d&&(km(d)=="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h})(f)})(u,pG()?Reflect.construct(l,c||[],Wm(u).constructor):l.apply(u,c))})(this,r,[i,BP,o]),"svg",void 0),m5(a,"measurementContext",void 0),a.svg=n;var s=document.createElement("canvas");return a.measurementContext=s.getContext("2d"),i.nodes.addChannel(BP),i.rels.addChannel(BP),a}return(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&y5(n,i)})(r,aG),e=r,t=[{key:"render",value:function(n,i){var a,o,s,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=this.state,c=this.arrowBundler,f=l.layout,d=l.zoom,h=l.panX,p=l.panY,g=l.nodes.idToPosition,y=(a=u.svg)!==null&&a!==void 0?a:this.svg,b=y.clientWidth||((o=y.width)===null||o===void 0||(o=o.baseVal)===null||o===void 0?void 0:o.value)||parseInt(y.getAttribute("width"),10)||500,_=y.clientHeight||((s=y.height)===null||s===void 0||(s=s.baseVal)===null||s===void 0?void 0:s.value)||parseInt(y.getAttribute("height"),10)||500,m=d,x=h,S=p;for(i&&(m=1,x=i.centerX,S=i.centerY);y.firstChild;)y.removeChild(y.firstChild);if(u.backgroundColor){var O=document.createElementNS("http://www.w3.org/2000/svg","rect");O.setAttribute("width","100%"),O.setAttribute("height","100%"),O.setAttribute("fill",u.backgroundColor),y.appendChild(O)}c.updatePositions(g);var E=document.createElementNS("http://www.w3.org/2000/svg","g");E.setAttribute("transform",this.getSvgTransform(b,_,m,x,S));var T=JB(r,"getRelationshipsToRender",this)([u.showCaptions,this.state.zoom]);this.renderRelationships(T,E,f!==Zx);var P=JB(r,"getNodesToRender",this)([n]);this.renderNodes(P,E,m),y.appendChild(E),this.needsRun=!1}},{key:"renderNodes",value:function(n,i,a){var o,s=this,u=this.state,l=u.nodes.idToItem,c=u.disabledItemStyles,f=u.defaultNodeColor,d=u.nodeBorderStyles,h=jP(n);try{var p=function(){var g,y,b,_,m=o.value,x=jw(jw({},l[m.id]),m);if(!o5(x))return 1;var S=document.createElementNS("http://www.w3.org/2000/svg","g");S.setAttribute("class","node"),S.setAttribute("data-id",x.id);var O=$n(),E=(x.selected?d.selected.rings:d.default.rings).map(function(Rt){var jt=Rt.widthFactor,Yt=Rt.color;return{width:(x.size||ha)*(jt??0)*O,color:Yt}}).filter(function(Rt){return Rt.width>0}),T=(function(Rt,jt){var Yt;return((Yt=Rt.size)!==null&&Yt!==void 0?Yt:25)*jt})(x,O),P=document.createElementNS("http://www.w3.org/2000/svg","circle");P.setAttribute("cx",String((g=x.x)!==null&&g!==void 0?g:0)),P.setAttribute("cy",String((y=x.y)!==null&&y!==void 0?y:0)),P.setAttribute("r",String(T));var I=x.disabled?c.color:x.color||f;if(P.setAttribute("fill",I),S.appendChild(P),E.length>0){var k,L=T,B=jP(E);try{for(B.s();!(k=B.n()).done;){var j=k.value;if(j.width>0){var z,H;L+=j.width/2;var q=document.createElementNS("http://www.w3.org/2000/svg","circle");q.setAttribute("cx",String((z=x.x)!==null&&z!==void 0?z:0)),q.setAttribute("cy",String((H=x.y)!==null&&H!==void 0?H:0)),q.setAttribute("r",String(L)),q.setAttribute("fill","none"),q.setAttribute("stroke",j.color),q.setAttribute("stroke-width",String(j.width)),S.appendChild(q),L+=j.width/2}}}catch(Rt){B.e(Rt)}finally{B.f()}}var W=x.icon,$=x.overlayIcon,J=T,X=2*J,Z=KD(J,a),ue=Z.nodeInfoLevel,re=Z.iconInfoLevel,ne=!!(!((b=x.captions)===null||b===void 0)&&b.length||!((_=x.caption)===null||_===void 0)&&_.length);if(W){var le,ce=eG(J,ne,re,ue),pe=tG(ce,ne,(le=x.captionAlign)!==null&&le!==void 0?le:"center",re,ue),fe=pe.iconXPos,se=pe.iconYPos,de=n5(I)==="#ffffff",ge=s.imageCache.getImage(W,de),Oe=ZB({nodeX:x.x,nodeY:x.y,iconXPos:fe,iconYPos:se,iconSize:ce,image:ge,isDisabled:x.disabled===!0});S.appendChild(Oe)}if($!==void 0){var ke,De,Ne,Ce,Y=rG(X,(ke=$.size)!==null&&ke!==void 0?ke:1),Q=(De=$.position)!==null&&De!==void 0?De:[0,0],ie=[(Ne=Q[0])!==null&&Ne!==void 0?Ne:0,(Ce=Q[1])!==null&&Ce!==void 0?Ce:0],we=nG(Y,J,ie),Ee=we.iconXPos,Me=we.iconYPos,Ie=s.imageCache.getImage($.url),Ye=ZB({nodeX:x.x,nodeY:x.y,iconXPos:Ee,iconYPos:Me,iconSize:Y,image:Ie,isDisabled:x.disabled===!0});S.appendChild(Ye)}var ot=uG(x,a);if(ot.hasContent){var mt=ot.lines,wt=ot.stylesPerChar,Mt=ot.fontSize,Dt=ot.fontFace,vt=ot.yPos,tt=n5(x.color||f);x.disabled&&(tt=c.fontColor);for(var _e=0,Ue=0;Ue0}):[];$B(j,z,k,H,h).forEach(function(Bt){return i.appendChild(Bt)});var q=KB(B.control2Point,B.endPoint,9,7,2/9),W=y.disabled?c.color:y.color||f;if(XB(q,W,H,h).forEach(function(Bt){return i.appendChild(Bt)}),P&&(y.captions&&y.captions.length>0||y.caption&&y.caption.length>0)){var $,J=$n(),X=y.selected===!0,Z=X?d.selected.rings:d.default.rings,ue=$q(B.apexPoint,B.angle,B.endPoint,B.control2Point,X,Z,y.width),re=ue.x,ne=ue.y,le=ue.angle,ce=(ue.flip,Jx(y)),pe=ce.length>0?($=Qb(ce))===null||$===void 0?void 0:$.fullCaption:"";if(pe){var fe,se,de,ge,Oe=40*J,ke=(fe=y.captionSize)!==null&&fe!==void 0?fe:1,De=6*ke*J,Ne=u5,Ce=y.selected?"bold":"normal";s.measurementContext.font="".concat(Ce," ").concat(De,"px ").concat(Ne);var Y=function(Bt){return s.measurementContext.measureText(Bt).width},Q=pe;if(Y(Q)>Oe){var ie=L1(Q,Y,function(){return Oe},1,!1)[0];Q=ie.hasEllipsisChar?"".concat(ie.text,"..."):Q}var we=y.selected?dE:1,Ee=((se=y.width)!==null&&se!==void 0?se:1)*we,Me=(1+ke)*J,Ie=((de=y.captionAlign)!==null&&de!==void 0?de:"top")==="bottom"?De/2+Ee+Me:-(Ee+Me),Ye=((ge=Qb(ce))!==null&&ge!==void 0?ge:{stylesPerChar:[]}).stylesPerChar,ot=LP(Q,Ye,0),mt=NP({x:re,y:ne+Ie,fontSize:De,fontFace:Ne,fontColor:L,textAnchor:"middle",dominantBaseline:"alphabetic",lineSpans:ot,transform:"rotate(".concat(180*le/Math.PI,",").concat(re,",").concat(ne,")"),fontWeight:Ce});i.appendChild(mt)}}}else{var wt,Mt,Dt,vt=n2(y,O,E,T,P,a),tt=Jq((wt=y.width)!==null&&wt!==void 0?wt:1,y.selected===!0,y.selected?d.selected.rings:d.default.rings),_e=tt.headHeight,Ue=tt.headWidth,Qe=tt.headSelectedAdjustment,Ze=tt.headPositionOffset,nt=vt.length>1?jw({},vt[vt.length-2]):null,It=vt.length>1?jw({},vt[vt.length-1]):null;if(vt.length>1){var ct=y.selected===!0,Lt=ct?d.selected.rings:d.default.rings;Qq(vt,ct,_e,Qe,Lt)}var Rt=(function(Bt){return(function(hr){if(Array.isArray(hr))return p5(hr)})(Bt)||(function(hr){if(typeof Symbol<"u"&&hr[Symbol.iterator]!=null||hr["@@iterator"]!=null)return Array.from(hr)})(Bt)||vG(Bt)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function vG(r,e){if(r){if(typeof r=="string")return p5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p5(r,e):void 0}}function p5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t2&&arguments[2]!==void 0?arguments[2]:{};(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),m5(a=(function(u,l,c){return l=Wm(l),(function(f,d){if(d&&(km(d)=="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h})(f)})(u,pG()?Reflect.construct(l,c||[],Wm(u).constructor):l.apply(u,c))})(this,r,[i,BP,o]),"svg",void 0),m5(a,"measurementContext",void 0),a.svg=n;var s=document.createElement("canvas");return a.measurementContext=s.getContext("2d"),i.nodes.addChannel(BP),i.rels.addChannel(BP),a}return(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&y5(n,i)})(r,aG),e=r,t=[{key:"render",value:function(n,i){var a,o,s,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=this.state,c=this.arrowBundler,f=l.layout,d=l.zoom,h=l.panX,p=l.panY,g=l.nodes.idToPosition,y=(a=u.svg)!==null&&a!==void 0?a:this.svg,b=y.clientWidth||((o=y.width)===null||o===void 0||(o=o.baseVal)===null||o===void 0?void 0:o.value)||parseInt(y.getAttribute("width"),10)||500,_=y.clientHeight||((s=y.height)===null||s===void 0||(s=s.baseVal)===null||s===void 0?void 0:s.value)||parseInt(y.getAttribute("height"),10)||500,m=d,x=h,S=p;for(i&&(m=1,x=i.centerX,S=i.centerY);y.firstChild;)y.removeChild(y.firstChild);if(u.backgroundColor){var O=document.createElementNS("http://www.w3.org/2000/svg","rect");O.setAttribute("width","100%"),O.setAttribute("height","100%"),O.setAttribute("fill",u.backgroundColor),y.appendChild(O)}c.updatePositions(g);var E=document.createElementNS("http://www.w3.org/2000/svg","g");E.setAttribute("transform",this.getSvgTransform(b,_,m,x,S));var T=JB(r,"getRelationshipsToRender",this)([u.showCaptions,this.state.zoom]);this.renderRelationships(T,E,f!==Zx);var P=JB(r,"getNodesToRender",this)([n]);this.renderNodes(P,E,m),y.appendChild(E),this.needsRun=!1}},{key:"renderNodes",value:function(n,i,a){var o,s=this,u=this.state,l=u.nodes.idToItem,c=u.disabledItemStyles,f=u.defaultNodeColor,d=u.nodeBorderStyles,h=jP(n);try{var p=function(){var g,y,b,_,m=o.value,x=jw(jw({},l[m.id]),m);if(!o5(x))return 1;var S=document.createElementNS("http://www.w3.org/2000/svg","g");S.setAttribute("class","node"),S.setAttribute("data-id",x.id);var O=$n(),E=(x.selected?d.selected.rings:d.default.rings).map(function(Rt){var jt=Rt.widthFactor,Yt=Rt.color;return{width:(x.size||ha)*(jt??0)*O,color:Yt}}).filter(function(Rt){return Rt.width>0}),T=(function(Rt,jt){var Yt;return((Yt=Rt.size)!==null&&Yt!==void 0?Yt:25)*jt})(x,O),P=document.createElementNS("http://www.w3.org/2000/svg","circle");P.setAttribute("cx",String((g=x.x)!==null&&g!==void 0?g:0)),P.setAttribute("cy",String((y=x.y)!==null&&y!==void 0?y:0)),P.setAttribute("r",String(T));var I=x.disabled?c.color:x.color||f;if(P.setAttribute("fill",I),S.appendChild(P),E.length>0){var k,L=T,B=jP(E);try{for(B.s();!(k=B.n()).done;){var j=k.value;if(j.width>0){var z,H;L+=j.width/2;var q=document.createElementNS("http://www.w3.org/2000/svg","circle");q.setAttribute("cx",String((z=x.x)!==null&&z!==void 0?z:0)),q.setAttribute("cy",String((H=x.y)!==null&&H!==void 0?H:0)),q.setAttribute("r",String(L)),q.setAttribute("fill","none"),q.setAttribute("stroke",j.color),q.setAttribute("stroke-width",String(j.width)),S.appendChild(q),L+=j.width/2}}}catch(Rt){B.e(Rt)}finally{B.f()}}var W=x.icon,$=x.overlayIcon,J=T,X=2*J,Z=KD(J,a),ue=Z.nodeInfoLevel,re=Z.iconInfoLevel,ne=!!(!((b=x.captions)===null||b===void 0)&&b.length||!((_=x.caption)===null||_===void 0)&&_.length);if(W){var le,ce=eG(J,ne,re,ue),pe=tG(ce,ne,(le=x.captionAlign)!==null&&le!==void 0?le:"center",re,ue),fe=pe.iconXPos,se=pe.iconYPos,de=n5(I)==="#ffffff",ge=s.imageCache.getImage(W,de),Oe=ZB({nodeX:x.x,nodeY:x.y,iconXPos:fe,iconYPos:se,iconSize:ce,image:ge,isDisabled:x.disabled===!0});S.appendChild(Oe)}if($!==void 0){var ke,De,Ne,Te,Y=rG(X,(ke=$.size)!==null&&ke!==void 0?ke:1),Q=(De=$.position)!==null&&De!==void 0?De:[0,0],ie=[(Ne=Q[0])!==null&&Ne!==void 0?Ne:0,(Te=Q[1])!==null&&Te!==void 0?Te:0],we=nG(Y,J,ie),Ee=we.iconXPos,Me=we.iconYPos,Ie=s.imageCache.getImage($.url),Ye=ZB({nodeX:x.x,nodeY:x.y,iconXPos:Ee,iconYPos:Me,iconSize:Y,image:Ie,isDisabled:x.disabled===!0});S.appendChild(Ye)}var ot=uG(x,a);if(ot.hasContent){var mt=ot.lines,wt=ot.stylesPerChar,Mt=ot.fontSize,Dt=ot.fontFace,vt=ot.yPos,tt=n5(x.color||f);x.disabled&&(tt=c.fontColor);for(var _e=0,Ue=0;Ue0}):[];$B(j,z,k,H,h).forEach(function(Bt){return i.appendChild(Bt)});var q=KB(B.control2Point,B.endPoint,9,7,2/9),W=y.disabled?c.color:y.color||f;if(XB(q,W,H,h).forEach(function(Bt){return i.appendChild(Bt)}),P&&(y.captions&&y.captions.length>0||y.caption&&y.caption.length>0)){var $,J=$n(),X=y.selected===!0,Z=X?d.selected.rings:d.default.rings,ue=$q(B.apexPoint,B.angle,B.endPoint,B.control2Point,X,Z,y.width),re=ue.x,ne=ue.y,le=ue.angle,ce=(ue.flip,Jx(y)),pe=ce.length>0?($=Qb(ce))===null||$===void 0?void 0:$.fullCaption:"";if(pe){var fe,se,de,ge,Oe=40*J,ke=(fe=y.captionSize)!==null&&fe!==void 0?fe:1,De=6*ke*J,Ne=u5,Te=y.selected?"bold":"normal";s.measurementContext.font="".concat(Te," ").concat(De,"px ").concat(Ne);var Y=function(Bt){return s.measurementContext.measureText(Bt).width},Q=pe;if(Y(Q)>Oe){var ie=L1(Q,Y,function(){return Oe},1,!1)[0];Q=ie.hasEllipsisChar?"".concat(ie.text,"..."):Q}var we=y.selected?dE:1,Ee=((se=y.width)!==null&&se!==void 0?se:1)*we,Me=(1+ke)*J,Ie=((de=y.captionAlign)!==null&&de!==void 0?de:"top")==="bottom"?De/2+Ee+Me:-(Ee+Me),Ye=((ge=Qb(ce))!==null&&ge!==void 0?ge:{stylesPerChar:[]}).stylesPerChar,ot=LP(Q,Ye,0),mt=NP({x:re,y:ne+Ie,fontSize:De,fontFace:Ne,fontColor:L,textAnchor:"middle",dominantBaseline:"alphabetic",lineSpans:ot,transform:"rotate(".concat(180*le/Math.PI,",").concat(re,",").concat(ne,")"),fontWeight:Te});i.appendChild(mt)}}}else{var wt,Mt,Dt,vt=n2(y,O,E,T,P,a),tt=Jq((wt=y.width)!==null&&wt!==void 0?wt:1,y.selected===!0,y.selected?d.selected.rings:d.default.rings),_e=tt.headHeight,Ue=tt.headWidth,Qe=tt.headSelectedAdjustment,Ze=tt.headPositionOffset,nt=vt.length>1?jw({},vt[vt.length-2]):null,It=vt.length>1?jw({},vt[vt.length-1]):null;if(vt.length>1){var ct=y.selected===!0,Lt=ct?d.selected.rings:d.default.rings;Qq(vt,ct,_e,Qe,Lt)}var Rt=(function(Bt){return(function(hr){if(Array.isArray(hr))return p5(hr)})(Bt)||(function(hr){if(typeof Symbol<"u"&&hr[Symbol.iterator]!=null||hr["@@iterator"]!=null)return Array.from(hr)})(Bt)||vG(Bt)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(vt);if(a&&vt.length>2){var jt=(function(Bt){if(Bt.length<2)return"";var hr="M".concat(Bt[0].x,",").concat(Bt[0].y);if(Bt.length===2)return hr+" L".concat(Bt[1].x,",").concat(Bt[1].y);for(var ei=1;ei0}):[];$B(jt,Yt,k,sr,h).forEach(function(Bt){return i.appendChild(Bt)})}else{var Ut=(function(Bt){return Bt.map(function(hr){return"".concat(hr.x,",").concat(hr.y)}).join(" ")})(vt),Rr=(function(Bt,hr,ei,Hn,fs){for(var Na=[],ki=Hn.length-1;ki>=0;ki--){var Wr=Hn[ki],Nr=document.createElementNS("http://www.w3.org/2000/svg","polyline");Nr.setAttribute("points",Bt),Nr.setAttribute("stroke",Wr.color),Nr.setAttribute("stroke-width",String(ei+Wr.width*fs)),Nr.setAttribute("stroke-linecap","round"),Nr.setAttribute("fill","none"),Na.push(Nr)}var na=document.createElementNS("http://www.w3.org/2000/svg","polyline");return na.setAttribute("points",Bt),na.setAttribute("stroke",hr),na.setAttribute("stroke-width",String(ei)),na.setAttribute("fill","none"),Na.push(na),Na})(Ut,y.disabled?c.color:y.color||f,k,y.selected?I.map(function(Bt){var hr;return{color:Bt.color,width:(hr=Bt.width)!==null&&hr!==void 0?hr:0}}).filter(function(Bt){return Bt.width>0}):[],h);Rr.forEach(function(Bt){return i.appendChild(Bt)})}if(vt.length>1){var Xt=KB(nt,It,_e,Ue,Ze/_e),Vr=y.disabled?c.color:y.color||f,Br=y.selected?I.map(function(Bt){var hr;return{color:Bt.color,width:(hr=Bt.width)!==null&&hr!==void 0?hr:0}}).filter(function(Bt){return Bt.width>0}):[];XB(Xt,Vr,Br,h).forEach(function(Bt){return i.appendChild(Bt)})}var mr=Jx(y),ur=(Mt=y.captionSize)!==null&&Mt!==void 0?Mt:1,sn=6*ur*h,Fr=u5,un=(Dt=Qb(mr))!==null&&Dt!==void 0?Dt:{fullCaption:"",stylesPerChar:[]},bn=un.fullCaption,wn=un.stylesPerChar;if(P&&bn.length>0){var _n;s.measurementContext.font="bold ".concat(sn,"px ").concat(Fr);var xn=(_n=y.captionAlign)!==null&&_n!==void 0?_n:"top",on=Kq(Rt,E,T,!0,y.selected===!0,I,xn),Nn=sG(Rt),fi=(function(Bt){var hr=180*Bt/Math.PI;return(hr>90||hr<-90)&&(hr+=180),hr})(on.angle),gn=function(Bt){return s.measurementContext.measureText(Bt).width},yn=bn;if(gn(yn)>Nn){var Jn=L1(yn,gn,function(){return Nn},1,!1)[0];yn=Jn.hasEllipsisChar?"".concat(Jn.text,"..."):yn}var _i=LP(yn,wn,0),Ir=(1+ur)*h,pa=xn==="bottom"?sn/2+k+Ir:-(k+Ir),di=NP({x:on.x,y:on.y+pa,fontSize:sn,fontFace:Fr,fontColor:L,textAnchor:"middle",dominantBaseline:"alphabetic",lineSpans:_i,transform:"rotate(".concat(fi,",").concat(on.x,",").concat(on.y,")"),fontWeight:y.selected?"bold":void 0});i.appendChild(di)}}};for(p.s();!(o=p.n()).done;)g()}catch(y){p.e(y)}finally{p.f()}}},{key:"getSvgTransform",value:function(n,i,a,o,s){var u=i/2;return"translate(".concat(n/2,",").concat(u,") scale(").concat(a,") translate(").concat(-o,",").concat(-s,")")}}],t&&qse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t})(),yG=function(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=(function(o,s){if((0,Hi.isNil)(o)||(0,Hi.isNil)(s))return{offsetX:0,offsetY:0};var u=s.getBoundingClientRect(),l=window.devicePixelRatio||1;return{offsetX:l*(o.clientX-u.left-.5*u.width),offsetY:l*(o.clientY-u.top-.5*u.height)}})(r,e);return{x:n+a.offsetX/t,y:i+a.offsetY/t}};function t1(r){return t1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t1(r)}function mG(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Vse(r,e){for(var t=0;t0}},{key:"renderMainScene",value:function(r){var e=this.state,t=e.nodes,n=e.rels;this.checkForUpdates(t,n),this.mainSceneRenderer.render(r),this.needsRun=!1}},{key:"renderMinimap",value:function(r){var e=this.state,t=e.nodes,n=e.rels;this.checkForUpdates(t,n),this.minimapRenderer.render(r),this.minimapRenderer.renderViewbox(),this.needsRun=!1}},{key:"checkForUpdates",value:function(r,e){var t=Object.values(r.channels[Mf].adds).length>0,n=Object.values(e.channels[Mf].adds).length>0,i=Object.values(r.channels[Mf].removes).length>0,a=Object.values(e.channels[Mf].removes).length>0,o=Object.values(r.channels[Mf].updates),s=Object.values(e.channels[Mf].updates);t||n||i||a?(this.mainSceneRenderer.setData({nodes:r.items,rels:e.items}),this.minimapRenderer.setData({nodes:r.items,rels:e.items})):(o.length>0&&(this.mainSceneRenderer.updateNodes(o),this.minimapRenderer.updateNodes(o)),s.length>0&&(this.mainSceneRenderer.updateRelationships(e.items),this.minimapRenderer.updateRelationships(e.items))),r.clearChannel(Mf),e.clearChannel(Mf)}},{key:"onResize",value:function(){var r=this.state,e=r.zoom,t=r.panX,n=r.panY,i=r.minimapZoom,a=r.minimapPanX,o=r.minimapPanY;this.updateMainViewport(e,t,n),this.updateMinimapViewport(i,a,o)}},{key:"updateMainViewport",value:function(r,e,t){this.mainSceneRenderer.updateViewport(r,e,t);var n=this.mainSceneRenderer.canvas.clientWidth,i=this.mainSceneRenderer.canvas.clientHeight;this.minimapRenderer.updateViewportBox(r,e,t,n,i),this.needsRun=!0}},{key:"updateMinimapViewport",value:function(r,e,t){this.minimapRenderer.updateViewport(r,e,t),this.needsRun=!0}},{key:"handleMinimapDrag",value:function(r){var e=this.state,t=this.minimapRenderer,n=yG(r,t.canvas,e.minimapZoom,e.minimapPanX,e.minimapPanY),i=n.x,a=n.y;e.setPan(i,a)}},{key:"handleMinimapWheel",value:function(r){var e=this.state,t=this.mainSceneRenderer;e.setZoom((function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return(0,Hi.isNil)(n)||isNaN(n.deltaY)?i:i-n.deltaY/500*Math.min(1,i)})(r,e.zoom),t.canvas),r.preventDefault()}},{key:"setupMinimapInteractions",value:function(){var r=this,e=this.minimapRenderer.canvas;e.addEventListener("mousedown",function(t){r.handleMinimapDrag(t),r.minimapMouseDown=!0}),e.addEventListener("mousemove",function(t){r.minimapMouseDown&&r.handleMinimapDrag(t)}),e.addEventListener("mouseup",function(){r.minimapMouseDown=!1}),e.addEventListener("mouseleave",function(){r.minimapMouseDown=!1}),e.addEventListener("wheel",function(t){r.handleMinimapWheel(t)})}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(r){r()}),this.state.nodes.removeChannel(Mf),this.state.rels.removeChannel(Mf),this.mainSceneRenderer.destroy(),this.minimapRenderer.destroy()}}])})(),Wse=(function(){return bG(function r(){mG(this,r),Nf(this,"mainSceneRenderer",void 0),Nf(this,"minimapRenderer",void 0),Nf(this,"needsRun",void 0),Nf(this,"minimapMouseDown",void 0),Nf(this,"stateDisposers",void 0),Nf(this,"state",void 0)},[{key:"renderMainScene",value:function(r){}},{key:"renderMinimap",value:function(r){}},{key:"checkForUpdates",value:function(r,e){}},{key:"onResize",value:function(){}},{key:"updateMainViewport",value:function(r,e,t){}},{key:"updateMinimapViewport",value:function(r,e,t){}},{key:"handleMinimapDrag",value:function(r){}},{key:"handleMinimapWheel",value:function(r){}},{key:"setupMinimapInteractions",value:function(){}},{key:"destroy",value:function(){}},{key:"needsToRun",value:function(){return!1}}])})();function r1(r){return r1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r1(r)}function FP(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=(function(u,l){if(u){if(typeof u=="string")return e9(u,l);var c={}.toString.call(u).slice(8,-1);return c==="Object"&&u.constructor&&(c=u.constructor.name),c==="Map"||c==="Set"?Array.from(u):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?e9(u,l):void 0}})(r))||e){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function e9(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&(l=(s=u.default.rings[0])===null||s===void 0?void 0:s.color);var c,f,d=null,h=null,p=(i=(a=u.selected)===null||a===void 0?void 0:a.rings)!==null&&i!==void 0?i:[],g=p.length;g>1&&(h=(c=p[g-2])===null||c===void 0?void 0:c.color,d=(f=p[g-1])===null||f===void 0?void 0:f.color);var y=null;(o=u.selected)!==null&&o!==void 0&&o.shadow&&(y=u.selected.shadow.color),this.nodeShader.use(),(0,Hi.isNil)(l)?this.nodeShader.setUniform("u_drawDefaultBorder",0):(this.nodeShader.setUniform("u_nodeBorderColor",Iw(l)),this.nodeShader.setUniform("u_drawDefaultBorder",1));var b=Iw(d),_=Iw(h),m=Iw(y);this.nodeShader.setUniform("u_selectedBorderColor",b),this.nodeShader.setUniform("u_selectedInnerBorderColor",_),this.nodeShader.setUniform("u_shadowColor",m)}},{key:"setData",value:function(t){var n=UM(t.rels,this.disableRelColor);this.setupNodeRendering(t.nodes),this.setupRelationshipRendering(n)}},{key:"render",value:function(t){var n=this.gl,i=this.idToIndex,a=this.posBuffer,o=this.posTexture;if(this.numNodes!==0||this.numRels!==0){var s,u=FP(t);try{for(u.s();!(s=u.n()).done;){var l=s.value,c=i[l.id];c!==void 0&&(a[4*c]=l.x,a[4*c+1]=l.y)}}catch(f){u.e(f)}finally{u.f()}n.bindTexture(n.TEXTURE_2D,o),n.texSubImage2D(n.TEXTURE_2D,0,0,0,Cr,Cr,n.RGBA,n.FLOAT,a),n.enable(n.BLEND),n.bindFramebuffer(n.FRAMEBUFFER,null),n.clear(n.COLOR_BUFFER_BIT),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),this.renderAnimations(o),this.numRels>0&&(this.relShader.use(),this.relShader.setUniform("u_positions",o),this.vaoExt.bindVertexArrayOES(this.relVao),n.drawArrays(n.TRIANGLES,0,6*this.numRels),this.vaoExt.bindVertexArrayOES(null)),this.numNodes>0&&(this.nodeShader.use(),this.nodeShader.setUniform("u_positions",o),this.vaoExt.bindVertexArrayOES(this.nodeVao),n.drawArrays(n.POINTS,0,this.numNodes),this.vaoExt.bindVertexArrayOES(null))}}},{key:"renderViewbox",value:function(){var t=this.gl,n=this.projection,i=this.viewportBoxBuffer;this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_projection",n),t.bindBuffer(t.ARRAY_BUFFER,i),this.viewportBoxShader.setAttributePointerFloat("coordinates",2,0,0),t.drawArrays(t.LINES,0,8)}},{key:"updateNodes",value:function(t){var n,i=this.gl,a=this.idToIndex,o=this.disableNodeColor,s=this.nodeBuffer,u=this.nodeDataByte,l=!1,c=FP(t);try{for(c.s();!(n=c.n()).done;){var f=n.value,d=a[f.id];if(!(0,Hi.isNil)(f.color)||f.disabled===!0){var h=I1(f.disabled===!0?o:f.color);this.nodeDataByte[3*d*4+0]=h[0],this.nodeDataByte[3*d*4+1]=h[1],this.nodeDataByte[3*d*4+2]=h[2],this.nodeDataByte[3*d*4+3]=255*h[3],l=!0}if(f.selected!==void 0){var p=f.selected;this.nodeDataByte[3*d*4+4]=p?255:0,l=!0}if(f.activated!==void 0&&(this.nodeDataByte[3*d*4+7]=f.activated?255:0,l=!0,f.activated?this.activeNodes[f.id]=!0:delete this.activeNodes[f.id]),f.hovered!==void 0){var g=f.disabled!==!0&&f.hovered;this.nodeDataByte[3*d*4+9]=g?255:0,l=!0}if(f.size!==void 0){var y=f.size;this.nodeDataByte[3*d*4+8]=y||ha,l=!0}}}catch(b){c.e(b)}finally{c.f()}l&&(i.bindBuffer(i.ARRAY_BUFFER,s),i.bufferData(i.ARRAY_BUFFER,u,i.DYNAMIC_DRAW))}},{key:"updateRelationships",value:function(t){var n,i=UM(t,this.disableRelColor),a=this.gl,o=!1,s=FP(i);try{for(s.s();!(n=s.n()).done;){var u=n.value,l=u.key,c=u.width,f=u.color,d=u.disabled,h=this.relIdToIndex[l],p=(0,Hi.isNil)(f)?this.defaultRelColor:f,g=kw(d?this.disableRelColor:p);this.relData.positionsAndColors[h*nu+0]=g,this.relData.positionsAndColors[h*nu+4]=g,this.relData.positionsAndColors[h*nu+8]=g,this.relData.positionsAndColors[h*nu+12]=g,this.relData.positionsAndColors[h*nu+16]=g,this.relData.positionsAndColors[h*nu+20]=g,o=!0,c!==void 0&&(this.relData.widths[h*nu+3]=c,this.relData.widths[h*nu+7]=c,this.relData.widths[h*nu+11]=c,this.relData.widths[h*nu+15]=c,this.relData.widths[h*nu+19]=c,this.relData.widths[h*nu+23]=c,o=!0)}}catch(y){s.e(y)}finally{s.f()}o&&(a.bindBuffer(a.ARRAY_BUFFER,this.relBuffer),a.bufferData(a.ARRAY_BUFFER,this.relDataBuffer,a.DYNAMIC_DRAW))}},{key:"createPositionTexture",value:function(){var t=this.gl,n=t.createTexture(),i=new Float32Array(262144);t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,Cr,Cr,0,t.RGBA,t.FLOAT,i),this.posTexture=n,this.posBuffer=i}},{key:"updateViewportBox",value:function(t,n,i,a,o){var s=this.gl,u=$n(),l=a*u,c=o*u,f=(.5*l+n*t)/t,d=(.5*c+i*t)/t,h=(.5*-l+n*t)/t,p=(.5*-c+i*t)/t,g=[f,d,h,d,h,d,h,p,h,p,f,p,f,p,f,d];s.bindBuffer(s.ARRAY_BUFFER,this.viewportBoxBuffer),s.bufferData(s.ARRAY_BUFFER,new Float32Array(g),s.DYNAMIC_DRAW)}},{key:"updateViewport",value:function(t,n,i){var a=this.gl,o=1/t,s=n-a.drawingBufferWidth*o*.5,u=i-a.drawingBufferHeight*o*.5,l=a.drawingBufferWidth*o,c=a.drawingBufferHeight*o,f=Kx(),d=Hae*$n();KM(f,s,s+l,u+c,u,0,1e6),this.nodeShader.use(),this.nodeShader.setUniform("u_zoom",t),this.nodeShader.setUniform("u_glAdjust",d),this.nodeShader.setUniform("u_projection",f),this.nodeAnimShader.use(),this.nodeAnimShader.setUniform("u_zoom",t),this.nodeAnimShader.setUniform("u_glAdjust",d),this.nodeAnimShader.setUniform("u_projection",f),this.relShader.use(),this.relShader.setUniform("u_glAdjust",d),this.relShader.setUniform("u_projection",f),this.projection=f}},{key:"setupViewportRendering",value:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VD;this.viewportBoxBuffer=this.gl.createBuffer(),this.viewportBoxShader.use(),this.viewportBoxShader.setUniform("u_minimapViewportBoxColor",[(t=I1(n))[0]/255,t[1]/255,t[2]/255,t[3]])}},{key:"setupNodeRendering",value:function(t){var n=this.gl,i=new ArrayBuffer(8),a=new Uint32Array(i),o=new Uint8Array(i);this.nodeBuffer===void 0&&(this.nodeBuffer=n.createBuffer()),this.numNodes=t.length;var s=new ArrayBuffer(3*t.length*8),u=new Uint32Array(s),l={};this.activeNodes={};for(var c=0;c=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function xG(r,e){if(r){if(typeof r=="string")return _5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_5(r,e):void 0}}function _5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:50,t={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},n=0;nr[n].x&&(t.minX=r[n].x),t.minY>r[n].y&&(t.minY=r[n].y),t.maxX1&&(i=t/r),e>1&&(a=n/e),{zoomX:i,zoomY:a}},EG=function(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/0,i=Math.min(r,e);return Math.min(n,Math.max(t,i))},a1=function(r,e,t,n){return Math.max(Math.min(e,t),Math.min(r,n))},UP=function(r,e,t,n,i,a){var o=e;return(function(s,u,l){return s1?(o=(function(s,u,l){var c=(function(g){var y=new Array(4).fill(g[0]);return g.forEach(function(b){y[0]=b.x0&&arguments[0]!==void 0?arguments[0]:[],y=0,b=0,_=0;_p?.9*p/f:.9*f/p})(r,n,25),a1(i,a,Math.min(e,o),t)):a1(i,a,e,t)};function o1(r){return o1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o1(r)}function Kse(r,e){for(var t=0;t0||i}},{key:"update",value:function(t,n){var i=this.state,a=i.fitNodeIds,o=i.resetZoom;a.length>0?this.fitNodes(a,t,n):o&&this.reset(t,n)}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(t){return t()})}},{key:"recalculateTarget",value:function(t,n,i,a){for(var o=this.xCtrl,s=this.yCtrl,u=this.zoomCtrl,l=this.state,c=[],f=0;f3?(H=$===z)&&(T=q[(E=q[4])?5:(E=3,3)],q[4]=q[5]=r):q[0]<=W&&((H=j<2&&Wz||z>$)&&(q[4]=j,q[5]=z,L.n=$,E=0))}if(H||j>1)return o;throw k=!0,z}return function(j,z,H){if(P>1)throw TypeError("Generator is already running");for(k&&z===1&&B(z,H),E=z,T=H;(e=E<2?r:T)||!k;){O||(E?E<3?(E>1&&(L.n=-1),B(E,T)):L.n=T:L.v=T);try{if(P=2,O){if(E||(j="next"),e=O[j]){if(!(e=e.call(O,T)))throw TypeError("iterator result is not an object");if(!e.done)return e;T=e.value,E<2&&(E=0)}else E===1&&(e=O.return)&&e.call(O),E<2&&(T=TypeError("The iterator does not provide a '"+j+"' method"),E=1);O=r}else if((e=(k=L.n<0)?T:m.call(x,L))!==o)break}catch(q){O=r,E=1,T=q}finally{P=1}}return{value:e,done:k}}})(h,g,y),!0),_}var o={};function s(){}function u(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(tf(e={},n,function(){return this}),e),f=l.prototype=s.prototype=Object.create(c);function d(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,l):(h.__proto__=l,tf(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return u.prototype=l,tf(f,"constructor",l),tf(l,"constructor",u),u.displayName="GeneratorFunction",tf(l,i,"GeneratorFunction"),tf(f),tf(f,i,"Generator"),tf(f,n,function(){return this}),tf(f,"toString",function(){return"[object Generator]"}),(Cb=function(){return{w:a,m:d}})()}function tf(r,e,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}tf=function(a,o,s,u){function l(c,f){tf(a,c,function(d){return this._invoke(c,f,d)})}o?i?i(a,o,{value:s,enumerable:!u,configurable:!u,writable:!u}):a[o]=s:(l("next",0),l("throw",1),l("return",2))},tf(r,e,t,n)}function i9(r,e,t,n,i,a,o){try{var s=r[a](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(n,i)}function a9(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(u){i9(a,n,i,o,s,"next",u)}function s(u){i9(a,n,i,o,s,"throw",u)}o(void 0)})}}function o9(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0?arguments[0]:"default"])!==null&&r!==void 0?r:Object.values(s2).pop()},rue=(function(){return r=function i(a,o,s){var u,l,c,f=this;(function(q,W){if(!(q instanceof W))throw new TypeError("Cannot call a class as a function")})(this,i),dn(this,"destroyed",void 0),dn(this,"state",void 0),dn(this,"callbacks",void 0),dn(this,"instanceId",void 0),dn(this,"glController",void 0),dn(this,"webGLContext",void 0),dn(this,"webGLMinimapContext",void 0),dn(this,"htmlOverlay",void 0),dn(this,"hasResized",void 0),dn(this,"hierarchicalLayout",void 0),dn(this,"gridLayout",void 0),dn(this,"freeLayout",void 0),dn(this,"d3ForceLayout",void 0),dn(this,"circularLayout",void 0),dn(this,"forceLayout",void 0),dn(this,"canvasRenderer",void 0),dn(this,"svgRenderer",void 0),dn(this,"glCanvas",void 0),dn(this,"canvasRect",void 0),dn(this,"glMinimapCanvas",void 0),dn(this,"c2dCanvas",void 0),dn(this,"svg",void 0),dn(this,"isInRenderSwitchAnimation",void 0),dn(this,"justSwitchedRenderer",void 0),dn(this,"justSwitchedLayout",void 0),dn(this,"layoutUpdating",void 0),dn(this,"layoutComputing",void 0),dn(this,"isRenderingDisabled",void 0),dn(this,"setRenderSwitchAnimation",void 0),dn(this,"stateDisposers",void 0),dn(this,"zoomTransitionHandler",void 0),dn(this,"currentLayout",void 0),dn(this,"layoutTimeLimit",void 0),dn(this,"pixelRatio",void 0),dn(this,"removeResizeListener",void 0),dn(this,"removeMinimapResizeListener",void 0),dn(this,"pendingZoomOperation",void 0),dn(this,"layoutRunner",void 0),dn(this,"animationRequestId",void 0),dn(this,"layoutDoneCallback",void 0),dn(this,"layoutComputingCallback",void 0),dn(this,"currentLayoutType",void 0),dn(this,"descriptionElement",void 0),this.destroyed=!1;var d=s.minimapContainer,h=d===void 0?document.createElement("span"):d,p=s.layoutOptions,g=s.layout,y=s.instanceId,b=y===void 0?"default":y,_=s.disableAria,m=_!==void 0&&_,x=a.nodes,S=a.rels,O=a.disableWebGL;this.state=a,this.callbacks=new Zse,this.instanceId=b;var E=o;E.setAttribute("instanceId",b),E.setAttribute("data-testid","nvl-parent"),(u=E.style.height)!==null&&u!==void 0&&u.length||Object.assign(E.style,{height:"100%"}),(l=E.style.outline)!==null&&l!==void 0&&l.length||Object.assign(E.style,{outline:"none"}),this.descriptionElement=m?document.createElement("div"):(function(q,W){var $;q.setAttribute("role","img"),q.setAttribute("aria-label","Graph visualization");var J="nvl-".concat(W,"-description"),X=($=document.getElementById(J))!==null&&$!==void 0?$:document.createElement("div");return X.textContent="",X.id="nvl-".concat(W,"-description"),X.setAttribute("role","status"),X.setAttribute("aria-live","polite"),X.setAttribute("aria-atomic","false"),X.style.display="none",q.appendChild(X),q.setAttribute("aria-describedby",X.id),X})(E,b);var T=PP(E,this.onWebGLContextLost.bind(this)),P=PP(h,this.onWebGLContextLost.bind(this));if(T.setAttribute("data-testid","nvl-gl-canvas"),O)this.glController=new Wse;else{var I=wB(T),k=wB(P);this.glController=new Hse({mainSceneRenderer:new t9(I,x,S,this.state),minimapRenderer:new t9(k,x,S,this.state),state:a}),this.webGLContext=I,this.webGLMinimapContext=k}var L=PP(E,this.onWebGLContextLost.bind(this));L.setAttribute("data-testid","nvl-c2d-canvas");var B=L.getContext("2d"),j=document.createElementNS("http://www.w3.org/2000/svg","svg");Object.assign(j.style,no(no({},FM),{},{overflow:"hidden",width:"100%",height:"100%"})),E.appendChild(j);var z=document.createElement("div");Object.assign(z.style,no(no({},FM),{},{overflow:"hidden"})),E.appendChild(z),this.htmlOverlay=z,this.hasResized=!0,this.hierarchicalLayout=new Koe(no(no({},p),{},{state:this.state})),this.gridLayout=new joe({state:this.state}),this.freeLayout=new Ioe({state:this.state}),this.d3ForceLayout=new yoe({state:this.state}),this.circularLayout=new Zae(no(no({},p),{},{state:this.state})),this.forceLayout=O?this.d3ForceLayout:new Moe(no(no({},p),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(g),this.state.setLayoutOptions(p),this.canvasRenderer=new Use(L,B,a,s),this.svgRenderer=new Gse(j,a,s),this.glCanvas=T,this.canvasRect=T.getBoundingClientRect(),this.glMinimapCanvas=P,this.c2dCanvas=L,this.svg=j;var H=a.renderer;this.glCanvas.style.opacity=H===Mg?"1":"0",this.c2dCanvas.style.opacity=H===fp?"1":"0",this.svg.style.opacity=H===am?"1":"0",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,x.addChannel(Uw),S.addChannel(Uw),this.setRenderSwitchAnimation=function(){f.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(a.autorun(function(){f.callIfRegistered("zoom",a.zoom)})),this.stateDisposers.push(a.autorun(function(){f.callIfRegistered("pan",{panX:a.panX,panY:a.panY})})),this.stateDisposers.push(a.autorun(function(){f.setLayout(a.layout)})),this.stateDisposers.push(a.autorun(function(){f.setLayoutOptions(a.layoutOptions)})),m||this.stateDisposers.push(a.autorun(function(){(function(q,W){var $=q.nodes,J=q.rels,X=q.layout,Z=$.items.length,ue=J.items.length;if(Z!==0||ue!==0){var re="".concat(Z," node").concat(Z!==1?"s":""),ne="".concat(ue," relationship").concat(ue!==1?"s":""),le="displayed using a ".concat(X??"forceDirected"," layout");W.textContent="A graph visualization with ".concat(re," and ").concat(ne,", ").concat(le,".")}else W.textContent="An empty graph visualization."})(a,f.descriptionElement)})),this.stateDisposers.push(a.autorun(function(){var q=a.renderer;q!==(f.glCanvas.style.opacity==="1"?Mg:f.c2dCanvas.style.opacity==="1"?fp:f.svg.style.opacity==="1"?am:fp)&&(f.justSwitchedRenderer=!0,f.glCanvas.style.opacity=q===Mg?"1":"0",f.c2dCanvas.style.opacity=q===fp?"1":"0",f.svg.style.opacity=q===am?"1":"0")})),this.startMainLoop(),this.zoomTransitionHandler=new eue({state:a,getNodePositions:function(q){return f.currentLayout.getNodePositions(q)},canvas:T}),this.layoutTimeLimit=(c=s.layoutTimeLimit)!==null&&c!==void 0?c:16,this.pixelRatio=$n(),this.removeResizeListener=D8()(E,function(){fx(T),fx(L),f.canvasRect=T.getBoundingClientRect(),f.hasResized=!0}),this.removeMinimapResizeListener=D8()(h,function(){fx(P)}),s2[b]=this,window.__Nvl_dumpNodes=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.dumpNodes()},window.__Nvl_dumpRelationships=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.dumpRelationships()},window.__Nvl_registerDoneCallback=function(q,W){var $;return($=ob(W))===null||$===void 0?void 0:$.on(u9,q)},window.__Nvl_getNodesOnScreen=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.getScale()},this.pendingZoomOperation=null},e=[{key:"onWebGLContextLost",value:function(i){this.callIfRegistered("onWebGLContextLost",i)}},{key:"updateMinimapZoom",value:function(){var i=this.state,a=i.nodes,o=i.maxNodeRadius,s=i.maxMinimapZoom,u=i.minMinimapZoom,l=i1(Object.values(a.idToPosition),o),c=l.centerX,f=l.centerY,d=l.nodesWidth,h=l.nodesHeight,p=w5(d,h,this.glMinimapCanvas.width,this.glMinimapCanvas.height),g=p.zoomX,y=p.zoomY,b=EG(g,y,u,s);this.state.updateMinimapZoomToFit(b,c,f)}},{key:"startMainLoop",value:function(){var i=this,a=this.state,o=a.nodes,s=a.rels;this.currentLayout.update();var u=this.currentLayout.getNodePositions(o.items);o.updatePositions(u),this.isRenderingDisabled||(this.glController.renderMainScene(u),this.glController.renderMinimap(u),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(u)),this.layoutRunner=setInterval(function(){try{(function(){var c=i.currentLayout.getShouldUpdate(),f=c||i.justSwitchedLayout,d=f&&!i.layoutUpdating&&!i.justSwitchedLayout;if(f)for(var h=window.performance.now(),p=d?0:50,g=0;gi.layoutTimeLimit)break}})()}catch(c){if(!i.callbacks.isCallbackRegistered(up))throw c;i.callIfRegistered(up,c)}},13);var l=function(){try{(function(c){if(i.destroyed)bi.info("STEP IN A DESTROYED STRIP");else{var f=$n();if(f!==i.pixelRatio)return i.pixelRatio=f,void i.callIfRegistered("restart");var d=i.currentLayout.getShouldUpdate(),h=d||i.justSwitchedLayout,p=i.currentLayout.getComputing(),g=i.zoomTransitionHandler.needsToRun(),y=h&&!i.layoutUpdating&&!i.justSwitchedLayout,b=i.layoutComputing&&!p,_=i.state.renderer,m=_===Mg&&i.glController.needsToRun(),x=_===fp&&i.canvasRenderer.needsToRun(),S=_===am&&i.svgRenderer.needsToRun(),O=i.isInRenderSwitchAnimation||i.justSwitchedRenderer,E=i.hasResized,T=i.pendingZoomOperation!==null,P=i.glController.minimapMouseDown;if(o.clearChannel(Uw),s.clearChannel(Uw),g||h||b||O||m||x||S||P||E||T){!T||y||i.currentLayout.getComputing()||(i.pendingZoomOperation(),i.pendingZoomOperation=null);var I=d||p||b;i.zoomTransitionHandler.update(I,function(){return i.callIfRegistered("onZoomTransitionDone")}),E&&i.glController.onResize();var k=i.currentLayout.getNodePositions(o.items);if(o.updatePositions(k),i.callbacks.isCallbackRegistered(l9)&&i.callIfRegistered(l9,i.dumpNodes()),i.updateMinimapZoom(),i.glController.renderMinimap(k),!i.isRenderingDisabled){var L=i.state.renderer;if((L===Mg||O)&&i.glController.renderMainScene(k),L===fp||L===am||O){i.canvasRenderer.processUpdates(),i.canvasRenderer.render(k);for(var B=0;B5&&L!==Mg;Object.assign(H.style,{top:"".concat(re,"px"),left:"".concat(ue,"px"),width:"".concat(J,"px"),height:"".concat(X,"px"),display:ne?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(i.state.zoom),") rotate(").concat(W,"rad")})}}}(L===am||O)&&(i.svgRenderer.processUpdates(),i.svgRenderer.render(k));for(var le=0;le=d.length?{done:!0}:{done:!1,value:d[g++]}},e:function(x){throw x},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function xG(r,e){if(r){if(typeof r=="string")return _5(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_5(r,e):void 0}}function _5(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:50,t={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},n=0;nr[n].x&&(t.minX=r[n].x),t.minY>r[n].y&&(t.minY=r[n].y),t.maxX1&&(i=t/r),e>1&&(a=n/e),{zoomX:i,zoomY:a}},EG=function(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/0,i=Math.min(r,e);return Math.min(n,Math.max(t,i))},a1=function(r,e,t,n){return Math.max(Math.min(e,t),Math.min(r,n))},UP=function(r,e,t,n,i,a){var o=e;return(function(s,u,l){return s1?(o=(function(s,u,l){var c=(function(g){var y=new Array(4).fill(g[0]);return g.forEach(function(b){y[0]=b.x0&&arguments[0]!==void 0?arguments[0]:[],y=0,b=0,_=0;_p?.9*p/f:.9*f/p})(r,n,25),a1(i,a,Math.min(e,o),t)):a1(i,a,e,t)};function o1(r){return o1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o1(r)}function Kse(r,e){for(var t=0;t0||i}},{key:"update",value:function(t,n){var i=this.state,a=i.fitNodeIds,o=i.resetZoom;a.length>0?this.fitNodes(a,t,n):o&&this.reset(t,n)}},{key:"destroy",value:function(){this.stateDisposers.forEach(function(t){return t()})}},{key:"recalculateTarget",value:function(t,n,i,a){for(var o=this.xCtrl,s=this.yCtrl,u=this.zoomCtrl,l=this.state,c=[],f=0;f3?(H=$===z)&&(T=q[(E=q[4])?5:(E=3,3)],q[4]=q[5]=r):q[0]<=W&&((H=j<2&&Wz||z>$)&&(q[4]=j,q[5]=z,L.n=$,E=0))}if(H||j>1)return o;throw k=!0,z}return function(j,z,H){if(P>1)throw TypeError("Generator is already running");for(k&&z===1&&B(z,H),E=z,T=H;(e=E<2?r:T)||!k;){O||(E?E<3?(E>1&&(L.n=-1),B(E,T)):L.n=T:L.v=T);try{if(P=2,O){if(E||(j="next"),e=O[j]){if(!(e=e.call(O,T)))throw TypeError("iterator result is not an object");if(!e.done)return e;T=e.value,E<2&&(E=0)}else E===1&&(e=O.return)&&e.call(O),E<2&&(T=TypeError("The iterator does not provide a '"+j+"' method"),E=1);O=r}else if((e=(k=L.n<0)?T:m.call(x,L))!==o)break}catch(q){O=r,E=1,T=q}finally{P=1}}return{value:e,done:k}}})(h,g,y),!0),_}var o={};function s(){}function u(){}function l(){}e=Object.getPrototypeOf;var c=[][n]?e(e([][n]())):(tf(e={},n,function(){return this}),e),f=l.prototype=s.prototype=Object.create(c);function d(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,l):(h.__proto__=l,tf(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return u.prototype=l,tf(f,"constructor",l),tf(l,"constructor",u),u.displayName="GeneratorFunction",tf(l,i,"GeneratorFunction"),tf(f),tf(f,i,"Generator"),tf(f,n,function(){return this}),tf(f,"toString",function(){return"[object Generator]"}),(Cb=function(){return{w:a,m:d}})()}function tf(r,e,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}tf=function(a,o,s,u){function l(c,f){tf(a,c,function(d){return this._invoke(c,f,d)})}o?i?i(a,o,{value:s,enumerable:!u,configurable:!u,writable:!u}):a[o]=s:(l("next",0),l("throw",1),l("return",2))},tf(r,e,t,n)}function i9(r,e,t,n,i,a,o){try{var s=r[a](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(n,i)}function a9(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(u){i9(a,n,i,o,s,"next",u)}function s(u){i9(a,n,i,o,s,"throw",u)}o(void 0)})}}function o9(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t0&&arguments[0]!==void 0?arguments[0]:"default"])!==null&&r!==void 0?r:Object.values(s2).pop()},rue=(function(){return r=function i(a,o,s){var u,l,c,f=this;(function(q,W){if(!(q instanceof W))throw new TypeError("Cannot call a class as a function")})(this,i),dn(this,"destroyed",void 0),dn(this,"state",void 0),dn(this,"callbacks",void 0),dn(this,"instanceId",void 0),dn(this,"glController",void 0),dn(this,"webGLContext",void 0),dn(this,"webGLMinimapContext",void 0),dn(this,"htmlOverlay",void 0),dn(this,"hasResized",void 0),dn(this,"hierarchicalLayout",void 0),dn(this,"gridLayout",void 0),dn(this,"freeLayout",void 0),dn(this,"d3ForceLayout",void 0),dn(this,"circularLayout",void 0),dn(this,"forceLayout",void 0),dn(this,"canvasRenderer",void 0),dn(this,"svgRenderer",void 0),dn(this,"glCanvas",void 0),dn(this,"canvasRect",void 0),dn(this,"glMinimapCanvas",void 0),dn(this,"c2dCanvas",void 0),dn(this,"svg",void 0),dn(this,"isInRenderSwitchAnimation",void 0),dn(this,"justSwitchedRenderer",void 0),dn(this,"justSwitchedLayout",void 0),dn(this,"layoutUpdating",void 0),dn(this,"layoutComputing",void 0),dn(this,"isRenderingDisabled",void 0),dn(this,"setRenderSwitchAnimation",void 0),dn(this,"stateDisposers",void 0),dn(this,"zoomTransitionHandler",void 0),dn(this,"currentLayout",void 0),dn(this,"layoutTimeLimit",void 0),dn(this,"pixelRatio",void 0),dn(this,"removeResizeListener",void 0),dn(this,"removeMinimapResizeListener",void 0),dn(this,"pendingZoomOperation",void 0),dn(this,"layoutRunner",void 0),dn(this,"animationRequestId",void 0),dn(this,"layoutDoneCallback",void 0),dn(this,"layoutComputingCallback",void 0),dn(this,"currentLayoutType",void 0),dn(this,"descriptionElement",void 0),this.destroyed=!1;var d=s.minimapContainer,h=d===void 0?document.createElement("span"):d,p=s.layoutOptions,g=s.layout,y=s.instanceId,b=y===void 0?"default":y,_=s.disableAria,m=_!==void 0&&_,x=a.nodes,S=a.rels,O=a.disableWebGL;this.state=a,this.callbacks=new Zse,this.instanceId=b;var E=o;E.setAttribute("instanceId",b),E.setAttribute("data-testid","nvl-parent"),(u=E.style.height)!==null&&u!==void 0&&u.length||Object.assign(E.style,{height:"100%"}),(l=E.style.outline)!==null&&l!==void 0&&l.length||Object.assign(E.style,{outline:"none"}),this.descriptionElement=m?document.createElement("div"):(function(q,W){var $;q.setAttribute("role","img"),q.setAttribute("aria-label","Graph visualization");var J="nvl-".concat(W,"-description"),X=($=document.getElementById(J))!==null&&$!==void 0?$:document.createElement("div");return X.textContent="",X.id="nvl-".concat(W,"-description"),X.setAttribute("role","status"),X.setAttribute("aria-live","polite"),X.setAttribute("aria-atomic","false"),X.style.display="none",q.appendChild(X),q.setAttribute("aria-describedby",X.id),X})(E,b);var T=PP(E,this.onWebGLContextLost.bind(this)),P=PP(h,this.onWebGLContextLost.bind(this));if(T.setAttribute("data-testid","nvl-gl-canvas"),O)this.glController=new Wse;else{var I=wB(T),k=wB(P);this.glController=new Hse({mainSceneRenderer:new t9(I,x,S,this.state),minimapRenderer:new t9(k,x,S,this.state),state:a}),this.webGLContext=I,this.webGLMinimapContext=k}var L=PP(E,this.onWebGLContextLost.bind(this));L.setAttribute("data-testid","nvl-c2d-canvas");var B=L.getContext("2d"),j=document.createElementNS("http://www.w3.org/2000/svg","svg");Object.assign(j.style,no(no({},FM),{},{overflow:"hidden",width:"100%",height:"100%"})),E.appendChild(j);var z=document.createElement("div");Object.assign(z.style,no(no({},FM),{},{overflow:"hidden"})),E.appendChild(z),this.htmlOverlay=z,this.hasResized=!0,this.hierarchicalLayout=new Koe(no(no({},p),{},{state:this.state})),this.gridLayout=new joe({state:this.state}),this.freeLayout=new Ioe({state:this.state}),this.d3ForceLayout=new yoe({state:this.state}),this.circularLayout=new Zae(no(no({},p),{},{state:this.state})),this.forceLayout=O?this.d3ForceLayout:new Moe(no(no({},p),{},{webGLContext:this.webGLContext,state:this.state})),this.state.setLayout(g),this.state.setLayoutOptions(p),this.canvasRenderer=new Use(L,B,a,s),this.svgRenderer=new Gse(j,a,s),this.glCanvas=T,this.canvasRect=T.getBoundingClientRect(),this.glMinimapCanvas=P,this.c2dCanvas=L,this.svg=j;var H=a.renderer;this.glCanvas.style.opacity=H===Mg?"1":"0",this.c2dCanvas.style.opacity=H===fp?"1":"0",this.svg.style.opacity=H===am?"1":"0",this.isInRenderSwitchAnimation=!1,this.justSwitchedRenderer=!1,this.justSwitchedLayout=!1,this.hasResized=!1,this.layoutUpdating=!1,this.layoutComputing=!1,this.isRenderingDisabled=!1,x.addChannel(Uw),S.addChannel(Uw),this.setRenderSwitchAnimation=function(){f.isInRenderSwitchAnimation=!1},this.stateDisposers=[],this.stateDisposers.push(a.autorun(function(){f.callIfRegistered("zoom",a.zoom)})),this.stateDisposers.push(a.autorun(function(){f.callIfRegistered("pan",{panX:a.panX,panY:a.panY})})),this.stateDisposers.push(a.autorun(function(){f.setLayout(a.layout)})),this.stateDisposers.push(a.autorun(function(){f.setLayoutOptions(a.layoutOptions)})),m||this.stateDisposers.push(a.autorun(function(){(function(q,W){var $=q.nodes,J=q.rels,X=q.layout,Z=$.items.length,ue=J.items.length;if(Z!==0||ue!==0){var re="".concat(Z," node").concat(Z!==1?"s":""),ne="".concat(ue," relationship").concat(ue!==1?"s":""),le="displayed using a ".concat(X??"forceDirected"," layout");W.textContent="A graph visualization with ".concat(re," and ").concat(ne,", ").concat(le,".")}else W.textContent="An empty graph visualization."})(a,f.descriptionElement)})),this.stateDisposers.push(a.autorun(function(){var q=a.renderer;q!==(f.glCanvas.style.opacity==="1"?Mg:f.c2dCanvas.style.opacity==="1"?fp:f.svg.style.opacity==="1"?am:fp)&&(f.justSwitchedRenderer=!0,f.glCanvas.style.opacity=q===Mg?"1":"0",f.c2dCanvas.style.opacity=q===fp?"1":"0",f.svg.style.opacity=q===am?"1":"0")})),this.startMainLoop(),this.zoomTransitionHandler=new eue({state:a,getNodePositions:function(q){return f.currentLayout.getNodePositions(q)},canvas:T}),this.layoutTimeLimit=(c=s.layoutTimeLimit)!==null&&c!==void 0?c:16,this.pixelRatio=$n(),this.removeResizeListener=D8()(E,function(){fx(T),fx(L),f.canvasRect=T.getBoundingClientRect(),f.hasResized=!0}),this.removeMinimapResizeListener=D8()(h,function(){fx(P)}),s2[b]=this,window.__Nvl_dumpNodes=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.dumpNodes()},window.__Nvl_dumpRelationships=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.dumpRelationships()},window.__Nvl_registerDoneCallback=function(q,W){var $;return($=ob(W))===null||$===void 0?void 0:$.on(u9,q)},window.__Nvl_getNodesOnScreen=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.getNodesOnScreen()},window.__Nvl_getZoomLevel=function(q){var W;return(W=ob(q))===null||W===void 0?void 0:W.getScale()},this.pendingZoomOperation=null},e=[{key:"onWebGLContextLost",value:function(i){this.callIfRegistered("onWebGLContextLost",i)}},{key:"updateMinimapZoom",value:function(){var i=this.state,a=i.nodes,o=i.maxNodeRadius,s=i.maxMinimapZoom,u=i.minMinimapZoom,l=i1(Object.values(a.idToPosition),o),c=l.centerX,f=l.centerY,d=l.nodesWidth,h=l.nodesHeight,p=w5(d,h,this.glMinimapCanvas.width,this.glMinimapCanvas.height),g=p.zoomX,y=p.zoomY,b=EG(g,y,u,s);this.state.updateMinimapZoomToFit(b,c,f)}},{key:"startMainLoop",value:function(){var i=this,a=this.state,o=a.nodes,s=a.rels;this.currentLayout.update();var u=this.currentLayout.getNodePositions(o.items);o.updatePositions(u),this.isRenderingDisabled||(this.glController.renderMainScene(u),this.glController.renderMinimap(u),this.canvasRenderer.processUpdates(),this.canvasRenderer.render(u)),this.layoutRunner=setInterval(function(){try{(function(){var c=i.currentLayout.getShouldUpdate(),f=c||i.justSwitchedLayout,d=f&&!i.layoutUpdating&&!i.justSwitchedLayout;if(f)for(var h=window.performance.now(),p=d?0:50,g=0;gi.layoutTimeLimit)break}})()}catch(c){if(!i.callbacks.isCallbackRegistered(up))throw c;i.callIfRegistered(up,c)}},13);var l=function(){try{(function(c){if(i.destroyed)bi.info("STEP IN A DESTROYED STRIP");else{var f=$n();if(f!==i.pixelRatio)return i.pixelRatio=f,void i.callIfRegistered("restart");var d=i.currentLayout.getShouldUpdate(),h=d||i.justSwitchedLayout,p=i.currentLayout.getComputing(),g=i.zoomTransitionHandler.needsToRun(),y=h&&!i.layoutUpdating&&!i.justSwitchedLayout,b=i.layoutComputing&&!p,_=i.state.renderer,m=_===Mg&&i.glController.needsToRun(),x=_===fp&&i.canvasRenderer.needsToRun(),S=_===am&&i.svgRenderer.needsToRun(),O=i.isInRenderSwitchAnimation||i.justSwitchedRenderer,E=i.hasResized,T=i.pendingZoomOperation!==null,P=i.glController.minimapMouseDown;if(o.clearChannel(Uw),s.clearChannel(Uw),g||h||b||O||m||x||S||P||E||T){!T||y||i.currentLayout.getComputing()||(i.pendingZoomOperation(),i.pendingZoomOperation=null);var I=d||p||b;i.zoomTransitionHandler.update(I,function(){return i.callIfRegistered("onZoomTransitionDone")}),E&&i.glController.onResize();var k=i.currentLayout.getNodePositions(o.items);if(o.updatePositions(k),i.callbacks.isCallbackRegistered(l9)&&i.callIfRegistered(l9,i.dumpNodes()),i.updateMinimapZoom(),i.glController.renderMinimap(k),!i.isRenderingDisabled){var L=i.state.renderer;if((L===Mg||O)&&i.glController.renderMainScene(k),L===fp||L===am||O){i.canvasRenderer.processUpdates(),i.canvasRenderer.render(k);for(var B=0;B5&&L!==Mg;Object.assign(H.style,{top:"".concat(re,"px"),left:"".concat(ue,"px"),width:"".concat(J,"px"),height:"".concat(X,"px"),display:ne?"block":"none",transform:"translate(-50%, -50%) scale(".concat(Number(i.state.zoom),") rotate(").concat(W,"rad")})}}}(L===am||O)&&(i.svgRenderer.processUpdates(),i.svgRenderer.render(k));for(var le=0;le=d.length?{done:!0}:{done:!1,value:d[g++]}},e:function(x){throw x},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b,_=!0,m=!1;return{s:function(){p=p.call(d)},n:function(){var x=p.next();return _=x.done,x},e:function(x){m=!0,b=x},f:function(){try{_||p.return==null||p.return()}finally{if(m)throw b}}}})(a);try{for(u.s();!(i=u.n()).done;){var l=i.value,c=o[l.id],f=this.mapCanvasSpaceToRelativePosition(c.x,c.y);s.push(no(no({},l),{},{x:f.x,y:f.y}))}}catch(d){u.e(d)}finally{u.f()}return s}},{key:"dumpRelationships",value:function(){return Xu(this.state.rels.items)}},{key:"mapCanvasSpaceToRelativePosition",value:function(i,a){var o=this.canvasRect,s=window.devicePixelRatio||1,u=(i-this.state.panX)*this.state.zoom/s,l=(a-this.state.panY)*this.state.zoom/s;return{x:u+.5*o.width,y:l+.5*o.height}}},{key:"mapRelativePositionToCanvasSpace",value:function(i,a){var o=this.glCanvas.getBoundingClientRect(),s=window.devicePixelRatio||1,u=s*(i-.5*o.width),l=s*(a-.5*o.height);return{x:this.state.panX+u/this.state.zoom,y:this.state.panY+l/this.state.zoom}}},{key:"getNodePositions",value:function(){return Object.values(Xu(this.state.nodes.idToPosition))}},{key:"setNodePositions",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=[],u=i.filter(function(l){var c=l.id,f=a.state.nodes.idToItem[c]!==void 0;return f||s.push(c),f});s.length>0&&bi.warn("Failed to set positions for following nodes: ".concat(s.join(", "),". They do not exist in the graph.")),this.state.nodes.updatePositions(u),this.currentLayout.updateNodes(u),o||this.currentLayout.terminateUpdate(),this.hasResized=!0,this.getNodesOnScreen().nodes.length===0&&this.state.setPan(0,0),this.state.clearFit()}},{key:"isLayoutMoving",value:function(){return this.layoutUpdating}},{key:"getNodesOnScreen",value:function(){var i=this.glCanvas.getBoundingClientRect(),a=this.mapRelativePositionToCanvasSpace(0,0),o=a.x,s=a.y,u=this.mapRelativePositionToCanvasSpace(i.width,i.height);return(function(l,c,f,d,h){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:["node"],g=h.nodes,y=h.rels,b=Math.min(l,f),_=Math.max(l,f),m=Math.min(c,d),x=Math.max(c,d),S=[],O=[];if(p.includes("node"))for(var E=0,T=Object.values(g.idToPosition);Eb&&I<_&&k>m&&kb&&q.x<_&&q.y>m&&q.yb&&W.x<_&&W.y>m&&W.y1&&arguments[1]!==void 0?arguments[1]:0;return this.canvasRenderer.getNodesAt(i,a)}},{key:"getLayout",value:function(i){return i===Zx?this.hierarchicalLayout:i===Foe?this.forceLayout:i===Uoe?this.gridLayout:i===zoe?this.freeLayout:i===qoe?this.d3ForceLayout:i===Goe?this.circularLayout:this.forceLayout}},{key:"setLayout",value:function(i){bi.info("Switching to layout: ".concat(i));var a=this.currentLayoutType,o=this.getLayout(i);i==="free"&&o.setNodePositions(this.state.nodes.idToPosition),this.currentLayout=o,this.currentLayoutType=i,a&&a!==this.currentLayoutType&&(this.justSwitchedLayout=!0)}},{key:"setLayoutOptions",value:function(i){this.getLayout(this.state.layout).setOptions(i)}},{key:"getDataUrlForCanvas",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=i.toDataURL("image/png");return a?o.replace(/^data:image\/png/,"data:application/octet-stream"):o}},{key:"initiateFileDownload",value:function(i,a){var o=document.createElement("a");o.style.display="none",o.setAttribute("download",i);var s=this.getDataUrlForCanvas(a,!0);o.setAttribute("href",s),o.click()}},{key:"updateLayoutAndPositions",value:function(){var i=this.state.nodes,a=i.items;this.currentLayout.update(this.justSwitchedLayout),this.justSwitchedLayout=!1;var o=this.currentLayout.getNodePositions(a);return i.updatePositions(o),o}},{key:"saveToFile",value:function(i){var a=no(no({},ab),i),o=this.createCanvasAndRenderImage(this.c2dCanvas.width,this.c2dCanvas.height,a.backgroundColor);this.initiateFileDownload(a.filename,o),om(o),o=null}},{key:"saveToSvg",value:(n=a9(Cb().m(function i(){var a,o,s,u,l,c,f,d,h,p,g,y,b,_=arguments;return Cb().w(function(m){for(;;)switch(m.p=m.n){case 0:return o=_.length>0&&_[0]!==void 0?_[0]:{},s=no(no({},ab),o),u=((a=s.filename)===null||a===void 0?void 0:a.replace(/\.[^.]+$/,".svg"))||"visualisation.svg",l=null,m.p=1,c=this.updateLayoutAndPositions(),f=i1(c,100),(l=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("width",String(f.nodesWidth)),l.setAttribute("height",String(f.nodesHeight)),l.style.background=s.backgroundColor||"rgba(0,0,0,0)",this.svgRenderer.processUpdates(),this.svgRenderer.render(c,f,{svg:l,backgroundColor:s.backgroundColor,showCaptions:!0}),m.n=2,this.svgRenderer.waitForImages();case 2:this.svgRenderer.render(c,f,{svg:l,backgroundColor:s.backgroundColor,showCaptions:!0}),d=new XMLSerializer,h=d.serializeToString(l),p=new Blob([h],{type:"image/svg+xml"}),g=URL.createObjectURL(p),(y=document.createElement("a")).style.display="none",y.setAttribute("download",u),y.setAttribute("href",g),document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(g),m.n=5;break;case 3:if(m.p=3,b=m.v,bi.error("An error occurred while exporting to SVG",b),!this.callbacks.isCallbackRegistered(up)){m.n=4;break}this.callIfRegistered(up,b),m.n=5;break;case 4:throw b;case 5:return m.p=5,l&&l.remove(),l=null,m.f(5);case 6:return m.a(2)}},i,this,[[1,3,5,6]])})),function(){return n.apply(this,arguments)})},{key:"getImageDataURL",value:function(i){var a=no(no({},ab),i),o=this.createCanvasAndRenderImage(this.c2dCanvas.width,this.c2dCanvas.height,a.backgroundColor),s=this.getDataUrlForCanvas(o);return om(o),o=null,s}},{key:"prepareLargeFileForDownload",value:function(i){var a=this,o=no(no({},ab),i),s=this.currentLayout.getNodePositions(this.state.nodes.items),u=i1(s,100),l=u.nodesWidth,c=u.nodesHeight,f=u.centerX,d=u.centerY,h=Math.max(Math.min(l+100,15e3),5e3),p=Math.max(Math.min(c+100,15e3),5e3);return this.isRenderingDisabled=!0,new Promise(function(g,y){try{a.setPanCoordinates(f,d);var b=Math.max(h/l-.02,a.state.minZoom),_=Math.max(p/c-.02,a.state.minZoom);a.setZoomLevel(Math.min(b,_))}catch(m){return bi.error("An error occurred while downloading the file"),void y(new Error("An error occurred while downloading the file",{cause:m}))}setTimeout(function(){try{var m=a.createCanvasAndRenderImage(h,p,o.backgroundColor);a.initiateFileDownload(o.filename,m),om(m),m=null,g(!0)}catch(x){y(new Error("An error occurred while downloading the file",{cause:x}))}},500)})}},{key:"createCanvasAndRenderImage",value:function(i,a,o){var s=(function(c,f){var d=document.createElement("canvas");return document.body.appendChild(d),zq(d,c,f,1),d})(i,a),u=(function(c){return c.getContext("2d")})(s),l=this.updateLayoutAndPositions();return this.canvasRenderer.processUpdates(),this.canvasRenderer.render(l,{canvas:s,context:u,backgroundColor:o,ignoreAnimations:!0,showCaptions:!0}),s}},{key:"saveFullGraphToLargeFile",value:(t=a9(Cb().m(function i(a){var o,s,u,l,c;return Cb().w(function(f){for(;;)switch(f.p=f.n){case 0:return o=no(no({},ab),a),s=this.state.zoom,u=this.state.panX,l=this.state.panY,f.p=1,f.n=2,this.prepareLargeFileForDownload(o);case 2:f.n=5;break;case 3:if(f.p=3,c=f.v,bi.error("An error occurred while downloading the image"),!this.callbacks.isCallbackRegistered(up)){f.n=4;break}this.callIfRegistered(up,c),f.n=5;break;case 4:throw c;case 5:return f.p=5,this.isRenderingDisabled=!1,this.setZoomLevel(s),this.setPanCoordinates(u,l),f.f(5);case 6:return f.a(2)}},i,this,[[1,3,5,6]])})),function(i){return t.apply(this,arguments)})}],e&&tue(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e,t,n})();function hE(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=(function(u,l){if(u){if(typeof u=="string")return c9(u,l);var c={}.toString.call(u).slice(8,-1);return c==="Object"&&u.constructor&&(c=u.constructor.name),c==="Map"||c==="Set"?Array.from(u):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?c9(u,l):void 0}})(r))||e){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function c9(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t1&&arguments[1]!==void 0?arguments[1]:{};this.fitNodeIds=(0,Hi.intersection)(j,(0,Hi.map)(this.nodes.items,"id")),this.zoomOptions=h9(h9({},CP),z)}),setZoomReset:ta(function(){this.resetZoom=!0}),clearFit:ta(function(){this.fitNodeIds=[],this.forceWebGL=!1,this.fitMovement=0,this.zoomOptions=CP}),clearReset:ta(function(){this.resetZoom=!1,this.fitMovement=0}),updateZoomToFit:ta(function(j,z,H,q){var W;if(this.fitMovement=Math.abs(j-this.zoom)+Math.abs(z-this.panX)+Math.abs(H-this.panY),i){var $=Object.values(this.nodes.idToPosition);(W=UP($,this.minZoom,this.maxZoom,q,j,this.zoom))0},zw=io(1187);function c1(r){return c1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c1(r)}function v9(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function p9(r){for(var e=1;er.length)&&(e=r.length);for(var t=0,n=Array(e);t=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw a}}}}function AG(r,e){if(r){if(typeof r=="string")return m9(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m9(r,e):void 0}}function m9(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};(function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),(function(u,l){PG(u,l),l.add(u)})(this,Qc),um(this,u2,void 0),um(this,In,void 0),um(this,mi,void 0),um(this,wd,void 0),um(this,mm,void 0),um(this,mue,void 0),o.disableTelemetry,Oc(Qc,this,_ue).call(this,o),d1(u2,this,new Gae(s)),d1(wd,this,o),d1(mm,this,n),this.checkWebGLCompatibility(),Oc(Qc,this,_9).call(this,i,a,o)},e=[{key:"restart",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.getNodePositions(),a=Vt(In,this),o=a.zoom,s=a.layout,u=a.layoutOptions,l=a.nodes,c=a.rels;Vt(mi,this).destroy(),Object.assign(Vt(wd,this),t),Oc(Qc,this,_9).call(this,l.items,c.items,Vt(wd,this)),this.setZoom(o),this.setLayout(s),this.setLayoutOptions(u),this.addAndUpdateElementsInGraph(l.items,c.items),n&&this.setNodePositions(i)}},{key:"addAndUpdateElementsInGraph",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];Oc(Qc,this,VP).call(this,t),Oc(Qc,this,HP).call(this,n,t);var i={added:!1,updated:!1};Vt(In,this).nodes.update(t,Ms({},i)),Vt(In,this).rels.update(n,Ms({},i)),Vt(In,this).nodes.add(t,Ms({},i)),Vt(In,this).rels.add(n,Ms({},i)),Vt(In,this).setGraphUpdated(),Vt(mi,this).updateHtmlOverlay()}},{key:"getSelectedNodes",value:function(){var t=this;return Xu(Vt(In,this).nodes.items).filter(function(n){return n.selected}).map(function(n){return Ms(Ms({},n),Vt(In,t).nodes.idToPosition[n.id])})}},{key:"getSelectedRelationships",value:function(){return Xu(Vt(In,this).rels.items).filter(function(t){return t.selected})}},{key:"updateElementsInGraph",value:function(t,n){var i=this,a={added:!1,updated:!1},o=t.filter(function(u){return Vt(In,i).nodes.idToItem[u.id]!==void 0}),s=n.filter(function(u){return Vt(In,i).rels.idToItem[u.id]!==void 0});Oc(Qc,this,VP).call(this,o),Oc(Qc,this,HP).call(this,s,t),Vt(In,this).nodes.update(o,Ms({},a)),Vt(In,this).rels.update(s,Ms({},a)),Vt(mi,this).updateHtmlOverlay()}},{key:"addElementsToGraph",value:function(t,n){Oc(Qc,this,VP).call(this,t),Oc(Qc,this,HP).call(this,n,t);var i={added:!1,updated:!1};Vt(In,this).nodes.add(t,Ms({},i)),Vt(In,this).rels.add(n,Ms({},i)),Vt(mi,this).updateHtmlOverlay()}},{key:"removeNodesWithIds",value:function(t){if(Array.isArray(t)&&!(0,Hi.isEmpty)(t)){var n,i={},a=x5(t);try{for(a.s();!(n=a.n()).done;)i[n.value]=!0}catch(c){a.e(c)}finally{a.f()}var o,s=[],u=x5(Vt(In,this).rels.items);try{for(u.s();!(o=u.n()).done;){var l=o.value;i[l.from]!==!0&&i[l.to]!==!0||s.push(l.id)}}catch(c){u.e(c)}finally{u.f()}s.length>0&&Oc(Qc,this,w9).call(this,s),Oc(Qc,this,wue).call(this,t),Vt(In,this).setGraphUpdated(),Vt(mi,this).updateHtmlOverlay()}}},{key:"removeRelationshipsWithIds",value:function(t){Array.isArray(t)&&!(0,Hi.isEmpty)(t)&&(Oc(Qc,this,w9).call(this,t),Vt(In,this).setGraphUpdated(),Vt(mi,this).updateHtmlOverlay())}},{key:"getNodes",value:function(){return Vt(mi,this).dumpNodes()}},{key:"getRelationships",value:function(){return Vt(mi,this).dumpRelationships()}},{key:"getNodeById",value:function(t){return Vt(In,this).nodes.idToItem[t]}},{key:"getRelationshipById",value:function(t){return Vt(In,this).rels.idToItem[t]}},{key:"getPositionById",value:function(t){return Vt(In,this).nodes.idToPosition[t]}},{key:"getCurrentOptions",value:function(){return Vt(wd,this)}},{key:"destroy",value:function(){Vt(mi,this).destroy()}},{key:"deselectAll",value:function(){this.updateElementsInGraph(Vt(In,this).nodes.items.map(function(t){return Ms(Ms({},t),{},{selected:!1})}),Vt(In,this).rels.items.map(function(t){return Ms(Ms({},t),{},{selected:!1})}))}},{key:"fit",value:function(t,n){Vt(mi,this).fit(t,n)}},{key:"resetZoom",value:function(){Vt(mi,this).resetZoom()}},{key:"setRenderer",value:function(t){Vt(mi,this).setRenderer(t)}},{key:"setDisableWebGL",value:function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];Vt(wd,this).disableWebGL!==t&&(Vt(wd,this).disableWebGL=t,this.restart())}},{key:"pinNode",value:function(t){Vt(In,this).nodes.update([{id:t,pinned:!0}],{})}},{key:"unPinNode",value:function(t){Vt(In,this).nodes.update(t.map(function(n){return{id:n,pinned:!1}}),{})}},{key:"setLayout",value:function(t){Vt(In,this).setLayout(t)}},{key:"setLayoutOptions",value:function(t){Vt(In,this).setLayoutOptions(t)}},{key:"getNodesOnScreen",value:function(){return Vt(mi,this).getNodesOnScreen()}},{key:"getNodePositions",value:function(){return Vt(mi,this).getNodePositions()}},{key:"setNodePositions",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];Vt(mi,this).setNodePositions(t,n)}},{key:"isLayoutMoving",value:function(){return Vt(mi,this).isLayoutMoving()}},{key:"saveToFile",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vt(mi,this).saveToFile(t)}},{key:"saveToSvg",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vt(mi,this).saveToSvg(t)}},{key:"getImageDataUrl",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Vt(mi,this).getImageDataURL(t)}},{key:"saveFullGraphToLargeFile",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vt(mi,this).saveFullGraphToLargeFile(t)}},{key:"getZoomLimits",value:function(){return{minZoom:Vt(In,this).minZoom,maxZoom:Vt(In,this).maxZoom}}},{key:"setZoom",value:function(t){Vt(mi,this).setZoomLevel(t)}},{key:"setPan",value:function(t,n){Vt(mi,this).setPanCoordinates(t,n)}},{key:"setZoomAndPan",value:function(t,n,i){Vt(mi,this).setZoomAndPan(t,n,i)}},{key:"getScale",value:function(){return Vt(mi,this).getScale()}},{key:"getPan",value:function(){return Vt(mi,this).getPan()}},{key:"getHits",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["node","relationship"],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{hitNodeMarginWidth:0},a=Vt(In,this),o=a.zoom,s=a.panX,u=a.panY,l=a.renderer,c=yG(t,Vt(mm,this),o,s,u),f=c.x,d=c.y,h=l===Mg?(function(p,g,y){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["node","relationship"],_=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},m=[],x=[],S=y.nodes,O=y.rels;return b.includes("node")&&m.push.apply(m,Bw((function(E,T){var P,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,L=[],B=b5(arguments.length>2&&arguments[2]!==void 0?arguments[2]:[]);try{var j=function(){var z,H=P.value,q=I[H.id];if((q==null?void 0:q.x)===void 0||q.y===void 0)return 1;var W=((z=H.size)!==null&&z!==void 0?z:ha)*$n(),$={x:q.x-E,y:q.y-T},J=Math.pow(W,2),X=Math.pow(W+k,2),Z=Math.pow($.x,2)+Math.pow($.y,2),ue=Math.sqrt(Z);if(Zue});L.splice(re!==-1?re:L.length,0,{data:H,targetCoordinates:{x:q.x,y:q.y},pointerCoordinates:{x:E,y:T},distanceVector:$,distance:ue,insideNode:Z3&&arguments[3]!==void 0?arguments[3]:{},k=[],L={},B=b5(arguments.length>2&&arguments[2]!==void 0?arguments[2]:[]);try{var j=function(){var z=P.value,H=z.from,q=z.to;if(L["".concat(H,".").concat(q)]===void 0){var W=I[H],$=I[q];if((W==null?void 0:W.x)===void 0||W.y===void 0||($==null?void 0:$.x)===void 0||$.y===void 0)return 0;var J=$D({x:W.x,y:W.y},{x:$.x,y:$.y},{x:E,y:T});if(J<=Xse){var X=k.findIndex(function(Z){return Z.distance>J});k.splice(X!==-1?X:k.length,0,{data:z,fromTargetCoordinates:{x:W.x,y:W.y},toTargetCoordinates:{x:$.x,y:$.y},pointerCoordinates:{x:E,y:T},distance:J})}L["".concat(H,".").concat(q)]=1,L["".concat(q,".").concat(H)]=1}};for(B.s();!(P=B.n()).done;)j()}catch(z){B.e(z)}finally{B.f()}return k})(p,g,O.items,S.idToPosition))),{nodes:m,relationships:x}})(f,d,Vt(In,this),n,i):(function(p,g,y){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["node","relationship"],_=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},m=[],x=[];return b.includes("node")&&m.push.apply(m,Bw(y.getCanvasNodesAt({x:p,y:g},_.hitNodeMarginWidth))),b.includes("relationship")&&x.push.apply(x,Bw(y.getCanvasRelsAt({x:p,y:g}))),{nodes:m,relationships:x}})(f,d,Vt(mi,this),n,i);return Ms(Ms({},t),{},{nvlTargets:h})}},{key:"getContainer",value:function(){return Vt(mm,this)}},{key:"checkWebGLCompatibility",value:function(){var t=Vt(wd,this).disableWebGL;if(t===void 0||!t){var n=(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document.createElement("canvas");try{return window.WebGLRenderingContext!==void 0&&(i.getContext("webgl")!==null||i.getContext("experimental-webgl")!==null)}catch{return!1}})();if(!n){if(t!==void 0)throw new Rq("Could not initialize WebGL");Vt(wd,this).renderer=fp,bi.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.")}t===void 0&&(Vt(wd,this).disableWebGL=!n)}}}],e&&yue(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,e})();function _9(){var r,e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d1(In,this,hue(i)),i.minimapContainer instanceof HTMLElement||delete i.minimapContainer,d1(mi,this,new rue(Vt(In,this),Vt(mm,this),i)),this.addAndUpdateElementsInGraph(t,n),Vt(mi,this).on("restart",this.restart.bind(this));var a,o,s=x5((a=Vt(u2,this).callbacks,Object.entries(a)));try{var u=function(){var l,c,f=(l=o.value,c=2,(function(p){if(Array.isArray(p))return p})(l)||(function(p,g){var y=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(y!=null){var b,_,m,x,S=[],O=!0,E=!1;try{if(m=(y=y.call(p)).next,g===0){if(Object(y)!==y)return;O=!1}else for(;!(O=(b=m.call(y)).done)&&(S.push(b.value),S.length!==g);O=!0);}catch(T){E=!0,_=T}finally{try{if(!O&&y.return!=null&&(x=y.return(),Object(x)!==x))return}finally{if(E)throw _}}return S}})(l,c)||AG(l,c)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),d=f[0],h=f[1];h!==void 0&&Vt(mi,e).on(d,function(){for(var p=arguments.length,g=new Array(p),y=0;y0})(n)});if(e){var t="";throw/^\d+$/.test(e.id)||(t=" 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(e),".").concat(t))}}function HP(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t="",n=null,i=Vt(In,this),a=i.nodes,o=i.rels,s={},u=0;u{const t=os.keyBy(r,"id"),n=os.keyBy(e,"id"),i=os.sortBy(os.keys(t)),a=os.sortBy(os.keys(n)),o=[],s=[],u=[];let l=0,c=0;for(;ln[f]).filter(f=>!os.isNil(f)),removed:s.map(f=>t[f]).filter(f=>!os.isNil(f)),updated:u.map(f=>n[f]).filter(f=>!os.isNil(f))}},Sue=(r,e)=>{const t=os.keyBy(r,"id");return e.map(n=>{const i=t[n.id];return i===void 0?null:os.transform(n,(a,o,s)=>{(s==="id"||o!==i[s])&&Object.assign(a,{[s]:o})})}).filter(n=>n!==null&&Object.keys(n).length>1)},Oue=(r,e)=>os.isEqual(r,e),Tue=r=>{const e=me.useRef();return Oue(r,e.current)||(e.current=r),e.current},Cue=(r,e)=>{me.useEffect(r,e.map(Tue))},Aue=me.memo(me.forwardRef(({nodes:r,rels:e,layout:t,layoutOptions:n,nvlCallbacks:i={},nvlOptions:a={},positions:o=[],zoom:s,pan:u,onInitializationError:l,...c},f)=>{const d=me.useRef(null),h=me.useRef(void 0),p=me.useRef(void 0);me.useImperativeHandle(f,()=>Object.getOwnPropertyNames(x9.prototype).reduce((S,O)=>({...S,[O]:(...E)=>d.current===null?null:d.current[O](...E)}),{}));const g=me.useRef(null),[y,b]=me.useState(r),[_,m]=me.useState(e);return me.useEffect(()=>()=>{var x;(x=d.current)==null||x.destroy(),d.current=null},[]),me.useEffect(()=>{let x=null;const O="minimapContainer"in a?a.minimapContainer!==null:!0;if(g.current!==null&&O&&d.current===null){const T={...a,layoutOptions:n};t!==void 0&&(T.layout=t);try{x=new x9(g.current,y,_,T,i),d.current=x,m(e),b(r)}catch(P){if(typeof l=="function")l(P);else throw P}}},[g.current,a.minimapContainer]),me.useEffect(()=>{if(d.current===null)return;const x=E9(y,r),S=Sue(y,r),O=E9(_,e);if(x.added.length===0&&x.removed.length===0&&S.length===0&&O.added.length===0&&O.removed.length===0&&O.updated.length===0)return;m(e),b(r);const T=[...x.added,...S],P=[...O.added,...O.updated];d.current.addAndUpdateElementsInGraph(T,P);const I=O.removed.map(L=>L.id),k=x.removed.map(L=>L.id);d.current.removeRelationshipsWithIds(I),d.current.removeNodesWithIds(k)},[y,_,r,e]),me.useEffect(()=>{const x=t??a.layout;d.current===null||x===void 0||d.current.setLayout(x)},[t,a.layout]),Cue(()=>{const x=n??(a==null?void 0:a.layoutOptions);d.current===null||x===void 0||d.current.setLayoutOptions(x)},[n,a.layoutOptions]),me.useEffect(()=>{d.current===null||a.renderer===void 0||d.current.setRenderer(a.renderer)},[a.renderer]),me.useEffect(()=>{d.current===null||a.disableWebGL===void 0||d.current.setDisableWebGL(a.disableWebGL)},[a.disableWebGL]),me.useEffect(()=>{d.current===null||o.length===0||d.current.setNodePositions(o)},[o]),me.useEffect(()=>{if(d.current===null)return;const x=h.current,S=p.current,O=s!==void 0&&s!==x,E=u!==void 0&&(u.x!==(S==null?void 0:S.x)||u.y!==S.y);O&&E?d.current.setZoomAndPan(s,u.x,u.y):O?d.current.setZoom(s):E&&d.current.setPan(u.x,u.y),h.current=s,p.current=u},[s,u]),Te.jsx("div",{id:xue,ref:g,style:{height:"100%",outline:"0"},...c})})),Ym=10,WP=10,vh={frameWidth:3,frameColor:"#a9a9a9",color:"#e0e0e0",lineDash:[10,15],opacity:.5};class MG{constructor(e){Ft(this,"ctx");Ft(this,"canvas");Ft(this,"removeResizeListener");const t=document.createElement("canvas");t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.left="0",t.style.right="0",t.style.touchAction="none",e==null||e.appendChild(t);const n=t.getContext("2d");this.ctx=n,this.canvas=t;const i=()=>{this.fixCanvasSize(t)};e==null||e.addEventListener("resize",i),this.removeResizeListener=()=>e==null?void 0:e.removeEventListener("resize",i),this.fixCanvasSize(t)}fixCanvasSize(e){const t=e.parentElement;if(!t)return;const n=t.getBoundingClientRect(),{width:i}=n,{height:a}=n,o=window.devicePixelRatio||1;e.width=i*o,e.height=a*o,e.style.width=`${i}px`,e.style.height=`${a}px`}drawBox(e,t,n,i){const{ctx:a}=this;if(a===null)return;this.clear(),a.save(),a.beginPath(),a.rect(e,t,n-e,i-t),a.closePath(),a.strokeStyle=vh.frameColor;const o=window.devicePixelRatio||1;a.lineWidth=vh.frameWidth*o,a.fillStyle=vh.color,a.globalAlpha=vh.opacity,a.setLineDash(vh.lineDash),a.stroke(),a.fill(),a.restore()}drawLasso(e,t,n){const{ctx:i}=this;if(i===null)return;i.save(),this.clear(),i.beginPath();let a=0;for(const s of e){const{x:u,y:l}=s;a===0?i.moveTo(u,l):i.lineTo(u,l),a+=1}const o=window.devicePixelRatio||1;i.strokeStyle=vh.frameColor,i.setLineDash(vh.lineDash),i.lineWidth=vh.frameWidth*o,i.fillStyle=vh.color,i.globalAlpha=vh.opacity,t&&i.stroke(),n&&i.fill(),i.restore()}clear(){const{ctx:e,canvas:t}=this;if(e===null)return;const n=t.getBoundingClientRect(),i=window.devicePixelRatio||1;e.clearRect(0,0,n.width*i,n.height*i)}destroy(){const{canvas:e}=this;this.removeResizeListener(),e.remove()}}class Wp{constructor(e,t){Ft(this,"nvl");Ft(this,"options");Ft(this,"container");Ft(this,"callbackMap");Ft(this,"addEventListener",(e,t,n)=>{var i;(i=this.container)==null||i.addEventListener(e,t,n)});Ft(this,"removeEventListener",(e,t,n)=>{var i;(i=this.container)==null||i.removeEventListener(e,t,n)});Ft(this,"callCallbackIfRegistered",(e,...t)=>{const n=this.callbackMap.get(e);typeof n=="function"&&n(...t)});Ft(this,"updateCallback",(e,t)=>{this.callbackMap.set(e,t)});Ft(this,"removeCallback",e=>{this.callbackMap.delete(e)});Ft(this,"toggleGlobalTextSelection",(e,t)=>{e?(document.body.style.removeProperty("user-select"),t&&document.body.removeEventListener("mouseup",t)):(document.body.style.setProperty("user-select","none","important"),t&&document.body.addEventListener("mouseup",t))});this.nvl=e,this.options=t,this.container=this.nvl.getContainer(),this.callbackMap=new Map}get nvlInstance(){return this.nvl}get currentOptions(){return this.options}get containerInstance(){return this.container}}const sb=r=>Math.floor(Math.random()*Math.pow(10,r)).toString(),DG=(r,e)=>{const t=Math.abs(r.clientX-e.x),n=Math.abs(r.clientY-e.y);return t>WP||n>WP?!0:Math.pow(t,2)+Math.pow(n,2)>WP},Ap=(r,e)=>{const t=r.getBoundingClientRect(),n=window.devicePixelRatio||1;return{x:(e.clientX-t.left)*n,y:(e.clientY-t.top)*n}},Rue=(r,e)=>{const t=r.getBoundingClientRect(),n=window.devicePixelRatio||1;return{x:(e.clientX-t.left-t.width*.5)*n,y:(e.clientY-t.top-t.height*.5)*n}},j1=(r,e)=>{const t=r.getScale(),n=r.getPan(),i=r.getContainer(),{width:a,height:o}=i.getBoundingClientRect(),s=window.devicePixelRatio||1,u=e.x-a*.5*s,l=e.y-o*.5*s;return{x:n.x+u/t,y:n.y+l/t}};class S9 extends Wp{constructor(t,n={selectOnRelease:!1}){super(t,n);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"startWorldPosition",{x:0,y:0});Ft(this,"overlayRenderer");Ft(this,"isBoxSelecting",!1);Ft(this,"handleMouseDown",t=>{if(t.button!==0){this.isBoxSelecting=!1;return}this.turnOnBoxSelect(t)});Ft(this,"handleDrag",t=>{if(this.isBoxSelecting){const n=Ap(this.containerInstance,t);this.overlayRenderer.drawBox(this.mousePosition.x,this.mousePosition.y,n.x,n.y)}else t.buttons===1&&this.turnOnBoxSelect(t)});Ft(this,"getHitsInBox",(t,n)=>{const i=(c,f,d)=>{const h=Math.min(f.x,d.x),p=Math.max(f.x,d.x),g=Math.min(f.y,d.y),y=Math.max(f.y,d.y);return c.x>=h&&c.x<=p&&c.y>=g&&c.y<=y},a=this.nvlInstance.getNodePositions(),o=new Set;for(const c of a)i(c,t,n)&&o.add(c.id);const s=this.nvlInstance.getRelationships(),u=[];for(const c of s)o.has(c.from)&&o.has(c.to)&&u.push(c);return{nodes:Array.from(o).map(c=>this.nvlInstance.getNodeById(c)),rels:u}});Ft(this,"endBoxSelect",t=>{if(!this.isBoxSelecting)return;this.isBoxSelecting=!1,this.overlayRenderer.clear();const n=Ap(this.containerInstance,t),i=j1(this.nvlInstance,n),{nodes:a,rels:o}=this.getHitsInBox(this.startWorldPosition,i);this.currentOptions.selectOnRelease===!0&&this.nvlInstance.updateElementsInGraph(a.map(s=>({id:s.id,selected:!0})),o.map(s=>({id:s.id,selected:!0}))),this.callCallbackIfRegistered("onBoxSelect",{nodes:a,rels:o},t),this.toggleGlobalTextSelection(!0,this.endBoxSelect)});this.overlayRenderer=new MG(this.containerInstance),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleDrag,!0),this.addEventListener("mouseup",this.endBoxSelect,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.endBoxSelect),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleDrag,!0),this.removeEventListener("mouseup",this.endBoxSelect,!0),this.overlayRenderer.destroy()}turnOnBoxSelect(t){this.mousePosition=Ap(this.containerInstance,t),this.startWorldPosition=j1(this.nvlInstance,this.mousePosition),this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.length>0?this.isBoxSelecting=!1:(this.isBoxSelecting=!0,this.toggleGlobalTextSelection(!1,this.endBoxSelect),this.callCallbackIfRegistered("onBoxStarted",t),this.currentOptions.selectOnRelease===!0&&this.nvlInstance.deselectAll())}}class iv extends Wp{constructor(t,n={selectOnClick:!1}){super(t,n);Ft(this,"moved",!1);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"handleMouseDown",t=>{this.mousePosition={x:t.clientX,y:t.clientY}});Ft(this,"handleRightClick",t=>{var o,s;t.preventDefault();const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.callCallbackIfRegistered("onCanvasRightClick",t);return}i.length>0?this.callCallbackIfRegistered("onNodeRightClick",(o=i[0])==null?void 0:o.data,n,t):a.length>0&&this.callCallbackIfRegistered("onRelationshipRightClick",(s=a[0])==null?void 0:s.data,n,t)});Ft(this,"handleDoubleClick",t=>{var o,s;const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.callCallbackIfRegistered("onCanvasDoubleClick",t);return}i.length>0?this.callCallbackIfRegistered("onNodeDoubleClick",(o=i[0])==null?void 0:o.data,n,t):a.length>0&&this.callCallbackIfRegistered("onRelationshipDoubleClick",(s=a[0])==null?void 0:s.data,n,t)});Ft(this,"handleClick",t=>{var o,s;if(DG(t,this.mousePosition)||t.button!==0)return;const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.currentOptions.selectOnClick===!0&&this.nvlInstance.deselectAll(),this.callCallbackIfRegistered("onCanvasClick",t);return}if(i.length>0){const u=i.map(l=>l.data);if(this.currentOptions.selectOnClick===!0){const l=this.nvlInstance.getSelectedNodes(),c=this.nvlInstance.getSelectedRelationships(),d=[...u[0]?[{id:u[0].id,selected:!0}]:[],...l.map(p=>({id:p.id,selected:!1}))],h=c.map(p=>({...p,selected:!1}));this.nvlInstance.updateElementsInGraph(d,h)}this.callCallbackIfRegistered("onNodeClick",(o=i[0])==null?void 0:o.data,n,t)}else if(a.length>0){const u=a.map(l=>l.data);if(this.currentOptions.selectOnClick===!0){const l=this.nvlInstance.getSelectedNodes(),c=this.nvlInstance.getSelectedRelationships(),f=l.map(p=>({id:p.id,selected:!1})),h=[...u[0]?[{id:u[0].id,selected:!0}]:[],...c.map(p=>({...p,selected:!1}))];this.nvlInstance.updateElementsInGraph(f,h)}this.callCallbackIfRegistered("onRelationshipClick",(s=a[0])==null?void 0:s.data,n,t)}});Ft(this,"destroy",()=>{this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("click",this.handleClick,!0),this.removeEventListener("dblclick",this.handleDoubleClick,!0),this.removeEventListener("contextmenu",this.handleRightClick,!0)});this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("click",this.handleClick,!0),this.addEventListener("dblclick",this.handleDoubleClick,!0),this.addEventListener("contextmenu",this.handleRightClick,!0)}}class YP extends Wp{constructor(t,n={}){super(t,n);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"mouseDownNode",null);Ft(this,"isDragging",!1);Ft(this,"isDrawing",!1);Ft(this,"selectedNodes",[]);Ft(this,"moveSelectedNodes",!1);Ft(this,"handleMouseDown",t=>{this.mousePosition={x:t.clientX,y:t.clientY},this.mouseDownNode=null;const n=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}),i=n.nvlTargets.nodes.filter(o=>o.insideNode);n.nvlTargets.nodes.filter(o=>!o.insideNode).length>0?(this.isDrawing=!0,this.addEventListener("mouseup",this.resetState,{once:!0})):i.length>0&&(this.mouseDownNode=n.nvlTargets.nodes[0]??null,this.toggleGlobalTextSelection(!1,this.handleBodyMouseUp)),this.selectedNodes=this.nvlInstance.getSelectedNodes(),this.mouseDownNode!==null&&this.selectedNodes.map(o=>o.id).includes(this.mouseDownNode.data.id)?this.moveSelectedNodes=!0:this.moveSelectedNodes=!1});Ft(this,"handleMouseMove",t=>{if(this.mouseDownNode===null||t.buttons!==1||this.isDrawing||!DG(t,this.mousePosition))return;this.isDragging||(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragStart",this.selectedNodes,t):this.callCallbackIfRegistered("onDragStart",[this.mouseDownNode.data],t),this.isDragging=!0);const n=this.nvlInstance.getScale(),i=(t.clientX-this.mousePosition.x)/n*window.devicePixelRatio,a=(t.clientY-this.mousePosition.y)/n*window.devicePixelRatio;this.moveSelectedNodes?(this.nvlInstance.setNodePositions(this.selectedNodes.map(o=>({id:o.id,x:o.x+i,y:o.y+a,pinned:!0})),!0),this.callCallbackIfRegistered("onDrag",this.selectedNodes,t)):(this.nvlInstance.setNodePositions([{id:this.mouseDownNode.data.id,x:this.mouseDownNode.targetCoordinates.x+i,y:this.mouseDownNode.targetCoordinates.y+a,pinned:!0}],!0),this.callCallbackIfRegistered("onDrag",[this.mouseDownNode.data],t))});Ft(this,"handleBodyMouseUp",t=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.isDragging&&this.mouseDownNode!==null&&(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragEnd",this.selectedNodes,t):this.callCallbackIfRegistered("onDragEnd",[this.mouseDownNode.data],t)),this.resetState()});Ft(this,"resetState",()=>{this.isDragging=!1,this.mouseDownNode=null,this.isDrawing=!1,this.selectedNodes=[],this.moveSelectedNodes=!1});Ft(this,"destroy",()=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.removeEventListener("mousedown",this.handleMouseDown),this.removeEventListener("mousemove",this.handleMouseMove)});this.addEventListener("mousedown",this.handleMouseDown),this.addEventListener("mousemove",this.handleMouseMove)}}const lp={node:{color:"black",size:25},relationship:{color:"red",width:1}};class XP extends Wp{constructor(t,n={}){var i,a;super(t,n);Ft(this,"isMoved",!1);Ft(this,"isDrawing",!1);Ft(this,"isDraggingNode",!1);Ft(this,"mouseDownNode");Ft(this,"newTempTargetNode",null);Ft(this,"newTempRegularRelationshipToNewTempTargetNode",null);Ft(this,"newTempRegularRelationshipToExistingNode",null);Ft(this,"newTempSelfReferredRelationship",null);Ft(this,"newTargetNodeToAdd",null);Ft(this,"newRelationshipToAdd",null);Ft(this,"mouseOutsideOfNvlArea",!1);Ft(this,"cancelDrawing",()=>{var t,n,i,a,o;this.nvlInstance.removeRelationshipsWithIds([(t=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:t.id,(n=this.newTempRegularRelationshipToExistingNode)==null?void 0:n.id,(i=this.newTempSelfReferredRelationship)==null?void 0:i.id].filter(s=>!!s)),this.nvlInstance.removeNodesWithIds((a=this.newTempTargetNode)!=null&&a.id?[(o=this.newTempTargetNode)==null?void 0:o.id]:[]),this.newTempTargetNode=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.newTempSelfReferredRelationship=null,this.isMoved=!1,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"handleMouseUpGlobal",t=>{this.isDrawing&&this.mouseOutsideOfNvlArea&&this.cancelDrawing()});Ft(this,"handleMouseLeaveNvl",()=>{this.mouseOutsideOfNvlArea=!0});Ft(this,"handleMouseEnterNvl",()=>{this.mouseOutsideOfNvlArea=!1});Ft(this,"handleMouseMove",t=>{var n,i,a,o,s,u,l,c,f,d,h,p,g;if(this.isMoved=!0,this.isDrawing){const y=Ap(this.containerInstance,t),b=j1(this.nvlInstance,y),_=this.nvlInstance.getHits(t,["node"]),[m]=_.nvlTargets.nodes.filter(L=>{var B;return L.data.id!==((B=this.newTempTargetNode)==null?void 0:B.id)}),x=m?{id:m.data.id,x:m.targetCoordinates.x,y:m.targetCoordinates.y,size:m.data.size}:void 0,S=sb(13),O=x?null:{id:S,size:((i=(n=this.currentOptions.ghostGraphStyling)==null?void 0:n.node)==null?void 0:i.size)??lp.node.size,selected:!1,x:b.x,y:b.y},E=sb(13),T=(a=this.mouseDownNode)!=null&&a.data?{id:E,from:this.mouseDownNode.data.id,to:x?x.id:S}:null;let{x:P,y:I}=b,k=((s=(o=this.currentOptions.ghostGraphStyling)==null?void 0:o.node)==null?void 0:s.size)??lp.node.size;m?(P=m.targetCoordinates.x,I=m.targetCoordinates.y,k=m.data.size??k,m.data.id===((u=this.mouseDownNode)==null?void 0:u.data.id)&&!this.newTempSelfReferredRelationship?(this.nvlInstance.removeRelationshipsWithIds([(l=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:l.id,(c=this.newTempRegularRelationshipToExistingNode)==null?void 0:c.id].filter(L=>!!L)),this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.setNewSelfReferredRelationship(),this.newTempSelfReferredRelationship&&this.nvlInstance.addElementsToGraph([],[this.newTempSelfReferredRelationship])):m.data.id!==((f=this.mouseDownNode)==null?void 0:f.data.id)&&!this.newTempRegularRelationshipToExistingNode&&(this.nvlInstance.removeRelationshipsWithIds([(d=this.newTempSelfReferredRelationship)==null?void 0:d.id,(h=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:h.id].filter(L=>!!L)),this.newTempSelfReferredRelationship=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.setNewRegularRelationshipToExistingNode(m.data.id),this.newTempRegularRelationshipToExistingNode&&this.nvlInstance.addElementsToGraph([],[this.newTempRegularRelationshipToExistingNode]))):this.newTempRegularRelationshipToNewTempTargetNode||(this.nvlInstance.removeRelationshipsWithIds([(p=this.newTempSelfReferredRelationship)==null?void 0:p.id,(g=this.newTempRegularRelationshipToExistingNode)==null?void 0:g.id].filter(L=>!!L)),this.newTempSelfReferredRelationship=null,this.newTempRegularRelationshipToExistingNode=null,this.setNewRegularRelationshipToNewTempTargetNode(),this.nvlInstance.addElementsToGraph([],this.newTempRegularRelationshipToNewTempTargetNode?[this.newTempRegularRelationshipToNewTempTargetNode]:[])),this.newTempTargetNode&&(this.nvlInstance.setNodePositions([{id:this.newTempTargetNode.id,x:P,y:I}]),this.nvlInstance.updateElementsInGraph([{id:this.newTempTargetNode.id,x:P,y:I,size:k}],[])),this.newRelationshipToAdd=T,this.newTargetNodeToAdd=O}else if(!this.isDraggingNode){this.newRelationshipToAdd=null,this.newTargetNodeToAdd=null;const b=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.filter(_=>!_.insideNode);if(b.length>0){const[_]=b;this.callCallbackIfRegistered("onHoverNodeMargin",_==null?void 0:_.data)}else this.callCallbackIfRegistered("onHoverNodeMargin",null)}});Ft(this,"handleMouseDown",t=>{var u,l,c,f,d;this.callCallbackIfRegistered("onHoverNodeMargin",null),this.isMoved=!1,this.newRelationshipToAdd=null,this.newTargetNodeToAdd=null;const n=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}),i=n.nvlTargets.nodes.filter(h=>h.insideNode),a=n.nvlTargets.nodes.filter(h=>!h.insideNode),o=i.length>0,s=a.length>0;if((o||s)&&(t.preventDefault(),(u=this.containerInstance)==null||u.focus()),o)this.isDraggingNode=!0,this.isDrawing=!1;else if(s){this.isDrawing=!0,this.isDraggingNode=!1,this.mouseDownNode=a[0];const h=Ap(this.containerInstance,t),p=j1(this.nvlInstance,h),g=((c=(l=this.currentOptions.ghostGraphStyling)==null?void 0:l.node)==null?void 0:c.color)??lp.node.color,y=document.createElement("div");y.style.width="110%",y.style.height="110%",y.style.position="absolute",y.style.left="-5%",y.style.top="-5%",y.style.borderRadius="50%",y.style.backgroundColor=g,this.newTempTargetNode={id:sb(13),size:((d=(f=this.currentOptions.ghostGraphStyling)==null?void 0:f.node)==null?void 0:d.size)??lp.node.size,selected:!1,x:p.x,y:p.y,html:y},this.setNewRegularRelationshipToNewTempTargetNode(),this.nvlInstance.addAndUpdateElementsInGraph([this.newTempTargetNode],this.newTempRegularRelationshipToNewTempTargetNode?[this.newTempRegularRelationshipToNewTempTargetNode]:[]),this.callCallbackIfRegistered("onDrawStarted",t)}else this.mouseDownNode=void 0,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"handleMouseUp",t=>{var n,i,a,o,s;this.nvlInstance.removeRelationshipsWithIds([(n=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:n.id,(i=this.newTempRegularRelationshipToExistingNode)==null?void 0:i.id,(a=this.newTempSelfReferredRelationship)==null?void 0:a.id].filter(u=>!!u)),this.nvlInstance.removeNodesWithIds((o=this.newTempTargetNode)!=null&&o.id?[(s=this.newTempTargetNode)==null?void 0:s.id]:[]),this.isDrawing&&this.isMoved&&(this.newTargetNodeToAdd&&this.nvlInstance.setNodePositions([this.newTargetNodeToAdd]),this.nvlInstance.addAndUpdateElementsInGraph(this.newTargetNodeToAdd?[{id:this.newTargetNodeToAdd.id}]:[],this.newRelationshipToAdd?[this.newRelationshipToAdd]:[]),this.callCallbackIfRegistered("onDrawEnded",this.newRelationshipToAdd,this.newTargetNodeToAdd,t)),this.newTempTargetNode=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.newTempSelfReferredRelationship=null,this.isMoved=!1,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"destroy",()=>{var t,n;this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0),(t=this.containerInstance)==null||t.removeEventListener("mouseleave",this.handleMouseLeaveNvl),(n=this.containerInstance)==null||n.removeEventListener("mouseenter",this.handleMouseEnterNvl),document.removeEventListener("mouseup",this.handleMouseUpGlobal,!0)});this.nvlInstance.setLayout("free"),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mouseup",this.handleMouseUp,!0),(i=this.containerInstance)==null||i.addEventListener("mouseleave",this.handleMouseLeaveNvl),(a=this.containerInstance)==null||a.addEventListener("mouseenter",this.handleMouseEnterNvl),document.addEventListener("mouseup",this.handleMouseUpGlobal,!0)}setNewRegularRelationship(t){var n,i,a,o;return this.mouseDownNode?{id:sb(13),from:this.mouseDownNode.data.id,to:t,color:((i=(n=this.currentOptions.ghostGraphStyling)==null?void 0:n.relationship)==null?void 0:i.color)??lp.relationship.color,width:((o=(a=this.currentOptions.ghostGraphStyling)==null?void 0:a.relationship)==null?void 0:o.width)??lp.relationship.width}:null}setNewRegularRelationshipToNewTempTargetNode(){!this.mouseDownNode||!this.newTempTargetNode||(this.newTempRegularRelationshipToNewTempTargetNode=this.setNewRegularRelationship(this.newTempTargetNode.id))}setNewRegularRelationshipToExistingNode(t){this.mouseDownNode&&(this.newTempRegularRelationshipToExistingNode=this.setNewRegularRelationship(t))}setNewSelfReferredRelationship(){var t,n,i,a;this.mouseDownNode&&(this.newTempSelfReferredRelationship={id:sb(13),from:this.mouseDownNode.data.id,to:this.mouseDownNode.data.id,color:((n=(t=this.currentOptions.ghostGraphStyling)==null?void 0:t.relationship)==null?void 0:n.color)??lp.relationship.color,width:((a=(i=this.currentOptions.ghostGraphStyling)==null?void 0:i.relationship)==null?void 0:a.width)??lp.relationship.width})}}class Pue extends Wp{constructor(t,n={drawShadowOnHover:!1}){super(t,n);Ft(this,"currentHoveredElementId");Ft(this,"currentHoveredElementIsNode");Ft(this,"updates",{nodes:[],relationships:[]});Ft(this,"handleHover",t=>{const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n,o=i[0]??a[0],s=o==null?void 0:o.data,u=s!==void 0&&i[0]!==void 0,l=this.currentHoveredElementId===void 0&&s===void 0,c=(s==null?void 0:s.id)!==void 0&&this.currentHoveredElementId===s.id&&u===this.currentHoveredElementIsNode;if(l||c){this.callCallbackIfRegistered("onHover",s,n,t);return}if(this.currentHoveredElementId!==void 0&&this.currentHoveredElementId!==(s==null?void 0:s.id)&&this.unHoverCurrentElement(),u)this.updates.nodes.push({id:s.id,hovered:!0}),this.currentHoveredElementId=s.id,this.currentHoveredElementIsNode=!0;else if(s!==void 0){const{id:d}=s;this.updates.relationships.push({id:d,hovered:!0}),this.currentHoveredElementId=s.id,this.currentHoveredElementIsNode=!1}else this.currentHoveredElementId=void 0,this.currentHoveredElementIsNode=void 0;this.callCallbackIfRegistered("onHover",s,n,t),this.updateElementsInNVL(),this.clearUpdates()});this.addEventListener("mousemove",this.handleHover,!0)}updateElementsInNVL(){this.currentOptions.drawShadowOnHover===!0&&this.nvlInstance.getNodes().length>0&&this.nvlInstance.updateElementsInGraph(this.updates.nodes,this.updates.relationships)}clearUpdates(){this.updates.nodes=[],this.updates.relationships=[]}unHoverCurrentElement(){if(this.currentHoveredElementId===void 0)return;const t={id:this.currentHoveredElementId,hovered:!1};this.currentHoveredElementIsNode===!0?this.updates.nodes.push(t):this.updates.relationships.push({...t})}destroy(){this.removeEventListener("mousemove",this.handleHover,!0)}}var qw={exports:{}},dx={exports:{}},Mue=dx.exports,O9;function Due(){return O9||(O9=1,(function(r,e){(function(t,n){r.exports=n()})(Mue,function(){function t(_,m,x,S,O){(function E(T,P,I,k,L){for(;k>I;){if(k-I>600){var B=k-I+1,j=P-I+1,z=Math.log(B),H=.5*Math.exp(2*z/3),q=.5*Math.sqrt(z*H*(B-H)/B)*(j-B/2<0?-1:1),W=Math.max(I,Math.floor(P-j*H/B+q)),$=Math.min(k,Math.floor(P+(B-j)*H/B+q));E(T,P,W,$,L)}var J=T[P],X=I,Z=k;for(n(T,I,P),L(T[k],J)>0&&n(T,I,k);X0;)Z--}L(T[I],J)===0?n(T,I,Z):n(T,++Z,k),Z<=P&&(I=Z+1),P<=Z&&(k=Z-1)}})(_,m,x||0,S||_.length-1,O||i)}function n(_,m,x){var S=_[m];_[m]=_[x],_[x]=S}function i(_,m){return _m?1:0}var a=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(_,m,x){if(!x)return m.indexOf(_);for(var S=0;S=_.minX&&m.maxY>=_.minY}function y(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(_,m,x,S,O){for(var E=[m,x];E.length;)if(!((x=E.pop())-(m=E.pop())<=S)){var T=m+Math.ceil((x-m)/S/2)*S;t(_,T,m,x,O),E.push(m,T,T,x)}}return a.prototype.all=function(){return this._all(this.data,[])},a.prototype.search=function(_){var m=this.data,x=[];if(!g(_,m))return x;for(var S=this.toBBox,O=[];m;){for(var E=0;E=0&&O[m].children.length>this._maxEntries;)this._split(O,m),m--;this._adjustParentBBoxes(S,O,m)},a.prototype._split=function(_,m){var x=_[m],S=x.children.length,O=this._minEntries;this._chooseSplitAxis(x,O,S);var E=this._chooseSplitIndex(x,O,S),T=y(x.children.splice(E,x.children.length-E));T.height=x.height,T.leaf=x.leaf,s(x,this.toBBox),s(T,this.toBBox),m?_[m-1].children.push(T):this._splitRoot(x,T)},a.prototype._splitRoot=function(_,m){this.data=y([_,m]),this.data.height=_.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},a.prototype._chooseSplitIndex=function(_,m,x){for(var S,O,E,T,P,I,k,L=1/0,B=1/0,j=m;j<=x-m;j++){var z=u(_,0,j,this.toBBox),H=u(_,j,x,this.toBBox),q=(O=z,E=H,T=void 0,P=void 0,I=void 0,k=void 0,T=Math.max(O.minX,E.minX),P=Math.max(O.minY,E.minY),I=Math.min(O.maxX,E.maxX),k=Math.min(O.maxY,E.maxY),Math.max(0,I-T)*Math.max(0,k-P)),W=d(z)+d(H);q=m;L--){var B=_.children[L];l(T,_.leaf?O(B):B),P+=h(T)}return P},a.prototype._adjustParentBBoxes=function(_,m,x){for(var S=x;S>=0;S--)l(m[S],_)},a.prototype._condense=function(_){for(var m=_.length-1,x=void 0;m>=0;m--)_[m].children.length===0?m>0?(x=_[m-1].children).splice(x.indexOf(_[m]),1):this.clear():s(_[m],this.toBBox)},a})})(dx)),dx.exports}class kue{constructor(e=[],t=Iue){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)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,i=t[e];for(;e>0;){const a=e-1>>1,o=t[a];if(n(i,o)>=0)break;t[e]=o,e=a}t[e]=i}_down(e){const{data:t,compare:n}=this,i=this.length>>1,a=t[e];for(;e=0)break;t[e]=s,e=o}t[e]=a}}function Iue(r,e){return re?1:0}const Nue=Object.freeze(Object.defineProperty({__proto__:null,default:kue},Symbol.toStringTag,{value:"Module"})),Lue=QG(Nue);var ub={exports:{}},$P,T9;function jue(){return T9||(T9=1,$P=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var u=(i-n)/2,l=0,c=u-1;lo!=p>o&&a<(h-f)*(o-d)/(p-d)+f;g&&(s=!s)}return s}),$P}var KP,C9;function Bue(){return C9||(C9=1,KP=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var u=i-n,l=0,c=u-1;lo!=p>o&&a<(h-f)*(o-d)/(p-d)+f;g&&(s=!s)}return s}),KP}var A9;function Fue(){if(A9)return ub.exports;A9=1;var r=jue(),e=Bue();return ub.exports=function(n,i,a,o){return i.length>0&&Array.isArray(i[0])?e(n,i,a,o):r(n,i,a,o)},ub.exports.nested=e,ub.exports.flat=r,ub.exports}var Ab={exports:{}},Uue=Ab.exports,R9;function zue(){return R9||(R9=1,(function(r,e){(function(t,n){n(e)})(Uue,function(t){const i=33306690738754706e-32;function a(g,y,b,_,m){let x,S,O,E,T=y[0],P=_[0],I=0,k=0;P>T==P>-T?(x=T,T=y[++I]):(x=P,P=_[++k]);let L=0;if(IT==P>-T?(O=x-((S=T+x)-T),T=y[++I]):(O=x-((S=P+x)-P),P=_[++k]),x=S,O!==0&&(m[L++]=O);IT==P>-T?(O=x-((S=x+T)-(E=S-x))+(T-E),T=y[++I]):(O=x-((S=x+P)-(E=S-x))+(P-E),P=_[++k]),x=S,O!==0&&(m[L++]=O);for(;I0!=O>0)return E;const T=Math.abs(S+O);return Math.abs(E)>=s*T?E:-(function(P,I,k,L,B,j,z){let H,q,W,$,J,X,Z,ue,re,ne,le,ce,pe,fe,se,de,ge,Oe;const ke=P-B,De=k-B,Ne=I-j,Ce=L-j;J=(se=(ue=ke-(Z=(X=134217729*ke)-(X-ke)))*(ne=Ce-(re=(X=134217729*Ce)-(X-Ce)))-((fe=ke*Ce)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=Ne-(Z=(X=134217729*Ne)-(X-Ne)))*(ne=De-(re=(X=134217729*De)-(X-De)))-((de=Ne*De)-Z*re-ue*re-Z*ne))),c[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),c[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,c[2]=ce-(Oe-J)+(le-J),c[3]=Oe;let Y=(function(Me,Ie){let Ye=Ie[0];for(let ot=1;ot=Q||-Y>=Q||(H=P-(ke+(J=P-ke))+(J-B),W=k-(De+(J=k-De))+(J-B),q=I-(Ne+(J=I-Ne))+(J-j),$=L-(Ce+(J=L-Ce))+(J-j),H===0&&q===0&&W===0&&$===0)||(Q=l*z+i*Math.abs(Y),(Y+=ke*$+Ce*H-(Ne*W+De*q))>=Q||-Y>=Q))return Y;J=(se=(ue=H-(Z=(X=134217729*H)-(X-H)))*(ne=Ce-(re=(X=134217729*Ce)-(X-Ce)))-((fe=H*Ce)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=q-(Z=(X=134217729*q)-(X-q)))*(ne=De-(re=(X=134217729*De)-(X-De)))-((de=q*De)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const ie=a(4,c,4,p,f);J=(se=(ue=ke-(Z=(X=134217729*ke)-(X-ke)))*(ne=$-(re=(X=134217729*$)-(X-$)))-((fe=ke*$)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=Ne-(Z=(X=134217729*Ne)-(X-Ne)))*(ne=W-(re=(X=134217729*W)-(X-W)))-((de=Ne*W)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const we=a(ie,f,4,p,d);J=(se=(ue=H-(Z=(X=134217729*H)-(X-H)))*(ne=$-(re=(X=134217729*$)-(X-$)))-((fe=H*$)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=q-(Z=(X=134217729*q)-(X-q)))*(ne=W-(re=(X=134217729*W)-(X-W)))-((de=q*W)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const Ee=a(we,d,4,p,h);return h[Ee-1]})(g,y,b,_,m,x,T)},t.orient2dfast=function(g,y,b,_,m,x){return(y-x)*(b-m)-(g-m)*(_-x)},Object.defineProperty(t,"__esModule",{value:!0})})})(Ab,Ab.exports)),Ab.exports}var P9;function que(){if(P9)return qw.exports;P9=1;var r=Due(),e=Lue,t=Fue(),n=zue().orient2d;e.default&&(e=e.default),qw.exports=i,qw.exports.default=i;function i(x,S,O){S=Math.max(0,S===void 0?2:S),O=O||0;var E=h(x),T=new r(16);T.toBBox=function(Z){return{minX:Z[0],minY:Z[1],maxX:Z[0],maxY:Z[1]}},T.compareMinX=function(Z,ue){return Z[0]-ue[0]},T.compareMinY=function(Z,ue){return Z[1]-ue[1]},T.load(x);for(var P=[],I=0,k;IP||k.push({node:j,dist:z})}for(;k.length&&!k.peek().node.children;){var H=k.pop(),q=H.node,W=y(q,S,O),$=y(q,E,T);if(H.dist=S.minX&&x[0]<=S.maxX&&x[1]>=S.minY&&x[1]<=S.maxY}function l(x,S,O){for(var E=Math.min(x[0],S[0]),T=Math.min(x[1],S[1]),P=Math.max(x[0],S[0]),I=Math.max(x[1],S[1]),k=O.search({minX:E,minY:T,maxX:P,maxY:I}),L=0;L0!=c(x,S,E)>0&&c(O,E,x)>0!=c(O,E,S)>0}function d(x){var S=x.p,O=x.next.p;return x.minX=Math.min(S[0],O[0]),x.minY=Math.min(S[1],O[1]),x.maxX=Math.max(S[0],O[0]),x.maxY=Math.max(S[1],O[1]),x}function h(x){for(var S=x[0],O=x[0],E=x[0],T=x[0],P=0;PE[0]&&(E=I),I[1]T[1]&&(T=I)}var k=[S,O,E,T],L=k.slice();for(P=0;P1?(E=O[0],T=O[1]):k>0&&(E+=P*k,T+=I*k)}return P=x[0]-E,I=x[1]-T,P*P+I*I}function b(x,S,O,E,T,P,I,k){var L=O-x,B=E-S,j=I-T,z=k-P,H=x-T,q=S-P,W=L*L+B*B,$=L*j+B*z,J=j*j+z*z,X=L*H+B*q,Z=j*H+z*q,ue=W*J-$*$,re,ne,le,ce,pe=ue,fe=ue;ue===0?(ne=0,pe=1,ce=Z,fe=J):(ne=$*Z-J*X,ce=W*Z-$*X,ne<0?(ne=0,ce=Z,fe=J):ne>pe&&(ne=pe,ce=Z+$,fe=J)),ce<0?(ce=0,-X<0?ne=0:-X>W?ne=pe:(ne=-X,pe=W)):ce>fe&&(ce=fe,-X+$<0?ne=0:-X+$>W?ne=pe:(ne=-X+$,pe=W)),re=ne===0?0:ne/pe,le=ce===0?0:ce/fe;var se=(1-re)*x+re*O,de=(1-re)*S+re*E,ge=(1-le)*T+le*I,Oe=(1-le)*P+le*k,ke=ge-se,De=Oe-de;return ke*ke+De*De}function _(x,S){return x[0]===S[0]?x[1]-S[1]:x[0]-S[0]}function m(x){x.sort(_);for(var S=[],O=0;O=2&&c(S[S.length-2],S[S.length-1],x[O])<=0;)S.pop();S.push(x[O])}for(var E=[],T=x.length-1;T>=0;T--){for(;E.length>=2&&c(E[E.length-2],E[E.length-1],x[T])<=0;)E.pop();E.push(x[T])}return E.pop(),S.pop(),S.concat(E)}return qw.exports}var Gue=que();const Vue=Bp(Gue),M9=10,Hue=500,Wue=(r,e,t,n)=>{const i=(n[1]-t[1])*(e[0]-r[0])-(n[0]-t[0])*(e[1]-r[1]);if(i===0)return!1;const a=((r[1]-t[1])*(n[0]-t[0])-(r[0]-t[0])*(n[1]-t[1]))/i,o=((t[0]-r[0])*(e[1]-r[1])-(t[1]-r[1])*(e[0]-r[0]))/i;return a>0&&a<1&&o>0&&o<1},Yue=r=>{for(let e=0;e{let n=!1;for(let i=0,a=t.length-1;ie!=f>e&&r<(c-u)*(e-l)/(f-l)+u&&(n=!n)}return n};class D9 extends Wp{constructor(t,n={selectOnRelease:!1}){super(t,n);Ft(this,"active",!1);Ft(this,"points",[]);Ft(this,"overlayRenderer");Ft(this,"startLasso",t=>{this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.length>0?this.active=!1:(this.active=!0,this.points=[Ap(this.containerInstance,t)],this.toggleGlobalTextSelection(!1,this.endLasso),this.callCallbackIfRegistered("onLassoStarted",t),this.currentOptions.selectOnRelease===!0&&this.nvlInstance.deselectAll())});Ft(this,"handleMouseDown",t=>{t.button===0&&!this.active&&this.startLasso(t)});Ft(this,"handleDrag",t=>{if(this.active){const n=this.points[this.points.length-1];if(n===void 0)return;const i=Ap(this.containerInstance,t),a=Math.abs(n.x-i.x),o=Math.abs(n.y-i.y);(a>M9||o>M9)&&(this.points.push(i),this.overlayRenderer.drawLasso(this.points,!0,!1))}});Ft(this,"handleMouseUp",t=>{this.points.push(Ap(this.containerInstance,t)),this.endLasso(t)});Ft(this,"getLassoItems",t=>{const n=t.map(l=>j1(this.nvlInstance,l)),i=this.nvlInstance.getNodePositions(),a=new Set;for(const l of i)l.x===void 0||l.y===void 0||l.id===void 0||Xue(l.x,l.y,n)&&a.add(l.id);const o=this.nvlInstance.getRelationships(),s=[];for(const l of o)a.has(l.from)&&a.has(l.to)&&s.push(l);return{nodes:Array.from(a).map(l=>this.nvlInstance.getNodeById(l)),rels:s}});Ft(this,"endLasso",t=>{if(!this.active)return;this.active=!1,this.toggleGlobalTextSelection(!0,this.endLasso);const n=this.points.map(s=>[s.x,s.y]),a=(Yue(n)?Vue(n,2):n).map(s=>({x:s[0],y:s[1]})).filter(s=>s.x!==void 0&&s.y!==void 0);this.overlayRenderer.drawLasso(a,!1,!0),setTimeout(()=>this.overlayRenderer.clear(),Hue);const o=this.getLassoItems(a);this.currentOptions.selectOnRelease===!0&&this.nvlInstance.updateElementsInGraph(o.nodes.map(s=>({id:s.id,selected:!0})),o.rels.map(s=>({id:s.id,selected:!0}))),this.callCallbackIfRegistered("onLassoSelect",o,t)});this.overlayRenderer=new MG(this.containerInstance),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleDrag,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.endLasso),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleDrag,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0),this.overlayRenderer.destroy()}}class $ue extends Wp{constructor(t,n={excludeNodeMargin:!1}){super(t,n);Ft(this,"initialMousePosition",{x:0,y:0});Ft(this,"initialPan",{x:0,y:0});Ft(this,"targets",[]);Ft(this,"shouldPan",!1);Ft(this,"isPanning",!1);Ft(this,"updateTargets",(t,n)=>{this.targets=t,this.currentOptions.excludeNodeMargin=n});Ft(this,"handleMouseDown",t=>{const n=this.nvlInstance.getHits(t,os.difference(["node","relationship"],this.targets),{hitNodeMarginWidth:this.currentOptions.excludeNodeMargin===!0?Ym:0});n.nvlTargets.nodes.length>0||n.nvlTargets.relationships.length>0?this.shouldPan=!1:(this.initialMousePosition={x:t.clientX,y:t.clientY},this.initialPan=this.nvlInstance.getPan(),this.shouldPan=!0)});Ft(this,"handleMouseMove",t=>{if(!this.shouldPan||t.buttons!==1)return;this.isPanning||(this.toggleGlobalTextSelection(!1,this.handleMouseUp),this.isPanning=!0);const n=this.nvlInstance.getScale(),{x:i,y:a}=this.initialPan,o=(t.clientX-this.initialMousePosition.x)/n*window.devicePixelRatio,s=(t.clientY-this.initialMousePosition.y)/n*window.devicePixelRatio,u=i-o,l=a-s;this.currentOptions.controlledPan!==!0&&this.nvlInstance.setPan(u,l),this.callCallbackIfRegistered("onPan",{x:u,y:l},t)});Ft(this,"handleMouseUp",()=>{this.isPanning&&this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.resetPanState()});Ft(this,"resetPanState",()=>{this.isPanning=!1,this.shouldPan=!1,this.initialMousePosition={x:0,y:0},this.initialPan={x:0,y:0},this.targets=[]});this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0)}}class k9 extends Wp{constructor(t,n={}){super(t,n);Ft(this,"zoomLimits");Ft(this,"handleWheel",t=>{t.preventDefault(),this.throttledZoom(t)});Ft(this,"throttledZoom",os.throttle(t=>{const n=this.nvlInstance.getScale(),{x:i,y:a}=this.nvlInstance.getPan();this.zoomLimits=this.nvlInstance.getZoomLimits();const s=t.ctrlKey||t.metaKey?75:500,u=t.deltaY/s,l=n>=1?u*n:u,c=n-l*Math.min(1,n),f=c>this.zoomLimits.maxZoom||c{this.removeEventListener("wheel",this.handleWheel)});this.zoomLimits=t.getZoomLimits(),this.addEventListener("wheel",this.handleWheel)}}const av=r=>{var e;(e=r.current)==null||e.destroy(),r.current=null},Ha=(r,e,t,n,i,a)=>{me.useEffect(()=>{const o=i.current;os.isNil(o)||os.isNil(o.getContainer())||(t===!0||typeof t=="function"?(os.isNil(e.current)&&(e.current=new r(o,a)),typeof t=="function"?e.current.updateCallback(n,t):os.isNil(e.current.callbackMap[n])||e.current.removeCallback(n)):t===!1&&av(e))},[r,t,n,a,e,i])},Kue=({nvlRef:r,mouseEventCallbacks:e,interactionOptions:t})=>{const n=me.useRef(null),i=me.useRef(null),a=me.useRef(null),o=me.useRef(null),s=me.useRef(null),u=me.useRef(null),l=me.useRef(null),c=me.useRef(null);return Ha(Pue,n,e.onHover,"onHover",r,t),Ha(iv,i,e.onNodeClick,"onNodeClick",r,t),Ha(iv,i,e.onNodeDoubleClick,"onNodeDoubleClick",r,t),Ha(iv,i,e.onNodeRightClick,"onNodeRightClick",r,t),Ha(iv,i,e.onRelationshipClick,"onRelationshipClick",r,t),Ha(iv,i,e.onRelationshipDoubleClick,"onRelationshipDoubleClick",r,t),Ha(iv,i,e.onRelationshipRightClick,"onRelationshipRightClick",r,t),Ha(iv,i,e.onCanvasClick,"onCanvasClick",r,t),Ha(iv,i,e.onCanvasDoubleClick,"onCanvasDoubleClick",r,t),Ha(iv,i,e.onCanvasRightClick,"onCanvasRightClick",r,t),Ha($ue,a,e.onPan,"onPan",r,t),Ha(k9,o,e.onZoom,"onZoom",r,t),Ha(k9,o,e.onZoomAndPan,"onZoomAndPan",r,t),Ha(YP,s,e.onDrag,"onDrag",r,t),Ha(YP,s,e.onDragStart,"onDragStart",r,t),Ha(YP,s,e.onDragEnd,"onDragEnd",r,t),Ha(XP,u,e.onHoverNodeMargin,"onHoverNodeMargin",r,t),Ha(XP,u,e.onDrawStarted,"onDrawStarted",r,t),Ha(XP,u,e.onDrawEnded,"onDrawEnded",r,t),Ha(S9,l,e.onBoxStarted,"onBoxStarted",r,t),Ha(S9,l,e.onBoxSelect,"onBoxSelect",r,t),Ha(D9,c,e.onLassoStarted,"onLassoStarted",r,t),Ha(D9,c,e.onLassoSelect,"onLassoSelect",r,t),me.useEffect(()=>()=>{av(n),av(i),av(a),av(o),av(s),av(u),av(l),av(c)},[]),null},Zue={selectOnClick:!1,drawShadowOnHover:!0,selectOnRelease:!1,excludeNodeMargin:!0},Que=me.memo(me.forwardRef(({nodes:r,rels:e,layout:t,layoutOptions:n,onInitializationError:i,mouseEventCallbacks:a={},nvlCallbacks:o={},nvlOptions:s={},interactionOptions:u=Zue,...l},c)=>{const f=me.useRef(null),d=c??f,[h,p]=me.useState(!1),g=me.useCallback(()=>{p(!0)},[]),y=me.useCallback(_=>{p(!1),i&&i(_)},[i]),b=h&&d.current!==null;return Te.jsxs(Te.Fragment,{children:[Te.jsx(Aue,{ref:d,nodes:r,id:Eue,rels:e,nvlOptions:s,nvlCallbacks:{...o,onInitialization:()=>{o.onInitialization!==void 0&&o.onInitialization(),g()}},layout:t,layoutOptions:n,onInitializationError:y,...l}),b&&Te.jsx(Kue,{nvlRef:d,mouseEventCallbacks:a,interactionOptions:u})]})})),kG=me.createContext(void 0),Vl=()=>{const r=me.useContext(kG);if(!r)throw new Error("useGraphVisualizationContext must be used within a GraphVisualizationContext");return r};function Lg({state:r,onChange:e,isControlled:t}){const[n,i]=me.useState(r),a=me.useMemo(()=>t===!0?r:n,[t,r,n]),o=me.useCallback(s=>{const u=typeof s=="function"?s(a):s;t!==!0&&i(u),e==null||e(u)},[t,a,e]);return[a,o]}const I9=navigator.userAgent.includes("Mac"),IG=(r,e)=>{var t;for(const[n,i]of Object.entries(r)){const a=n.toLowerCase().includes(e),s=((t=i==null?void 0:i.stringified)!==null&&t!==void 0?t:"").toLowerCase().includes(e);if(a||s)return!0}return!1},Jue=(r,e)=>{const t=e.toLowerCase();return r.filter(n=>{var i;return!((i=n.labelsSorted)===null||i===void 0)&&i.some(a=>a.toLowerCase().includes(t))?!0:IG(n.properties,t)}).map(n=>n.id)},ele=(r,e)=>{const t=e.toLowerCase();return r.filter(n=>n.type.toLowerCase().includes(t)?!0:IG(n.properties,t)).map(n=>n.id)},a0=r=>{const{isActive:e,ariaLabel:t,isDisabled:n,description:i,onClick:a,onMouseDown:o,tooltipPlacement:s,className:u,style:l,htmlAttributes:c,children:f}=r;return Te.jsx(S2,{description:i??t,tooltipProps:{content:{style:{whiteSpace:"nowrap"}},root:{isPortaled:!1,placement:s}},size:"small",className:u,style:l,isActive:e,isDisabled:n,onClick:a,htmlAttributes:Object.assign({onMouseDown:o},c),children:f})},tle=r=>r instanceof HTMLElement?r.isContentEditable||["INPUT","TEXTAREA"].includes(r.tagName):!1,rle=r=>tle(r.target),a_={box:"B",lasso:"L",single:"S"},vE=r=>{const{setGesture:e}=Vl(),t=me.useCallback(n=>{if(!rle(n)&&e!==void 0){const i=n.key.toUpperCase();for(const a of r)i===a_[a]&&e(a)}},[r,e]);me.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}),[t])},ZD=" ",nle=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["single"]),Te.jsx(a0,{isActive:i==="single",isDisabled:o!=="select",ariaLabel:"Individual Select Button",description:`Individual Select ${ZD} ${a_.single}`,onClick:()=>{a==null||a("single")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-individual-select"},t),className:r,style:e,children:Te.jsx(l2,{"aria-label":"Individual Select"})})},ile=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["box"]),Te.jsx(a0,{isDisabled:o!=="select"||a===void 0,isActive:i==="box",ariaLabel:"Box Select Button",description:`Box Select ${ZD} ${a_.box}`,onClick:()=>{a==null||a("box")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-box-select"},t),className:r,style:e,children:Te.jsx(V9,{"aria-label":"Box select"})})},ale=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["lasso"]),Te.jsx(a0,{isDisabled:o!=="select"||a===void 0,isActive:i==="lasso",ariaLabel:"Lasso Select Button",description:`Lasso Select ${ZD} ${a_.lasso}`,onClick:()=>{a==null||a("lasso")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-lasso-select"},t),className:r,style:e,children:Te.jsx(G9,{"aria-label":"Lasso select"})})},NG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{var o,s;(o=i.current)===null||o===void 0||o.setZoom(((s=i.current)===null||s===void 0?void 0:s.getScale())*1.3)},[i]);return Te.jsx(a0,{onClick:a,description:"Zoom in",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Te.jsx(tH,{})})},LG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{var o,s;(o=i.current)===null||o===void 0||o.setZoom(((s=i.current)===null||s===void 0?void 0:s.getScale())*.7)},[i]);return Te.jsx(a0,{onClick:a,description:"Zoom out",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Te.jsx(QV,{})})},jG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{const s=i.current;if(!s)return[];const u=s.getSelectedNodes(),l=s.getSelectedRelationships(),c=new Set;if(u.length||l.length)return u.forEach(h=>c.add(h.id)),l.forEach(h=>c.add(h.from).add(h.to)),[...c];const f=s.getNodes(),d=s.getRelationships();return f.forEach(h=>h.disabled!==!0&&c.add(h.id)),d.forEach(h=>h.disabled!==!0&&c.add(h.from).add(h.to)),c.size>0?[...c]:f.map(h=>h.id)},[i]),o=me.useCallback(()=>{var s;(s=i.current)===null||s===void 0||s.fit(a())},[a,i]);return Te.jsx(a0,{onClick:o,description:"Zoom to fit",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Te.jsx(EV,{})})},BG=({className:r,htmlAttributes:e,style:t,tooltipPlacement:n})=>{const{sidepanel:i}=Vl();if(!i)throw new Error("Using the ToggleSidePanelButton requires having a sidepanel");const{isSidePanelOpen:a,setIsSidePanelOpen:o}=i;return Te.jsx(T2,{size:"small",onClick:()=>o==null?void 0:o(!a),isFloating:!0,description:a?"Close":"Open",isActive:a,tooltipProps:{content:{style:{whiteSpace:"nowrap"}},root:{isPortaled:!1,placement:n??"bottom",shouldCloseOnReferenceClick:!0}},className:Vn("ndl-graph-visualization-toggle-sidepanel",r),style:t,htmlAttributes:Object.assign({"aria-label":"Toggle node properties panel"},e),children:Te.jsx(AV,{className:"ndl-graph-visualization-toggle-icon"})})},ole=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,open:i,setOpen:a,searchTerm:o,setSearchTerm:s,onSearch:u=()=>{}})=>{const l=me.useRef(null),[c,f]=Lg({isControlled:i!==void 0,onChange:a,state:i??!1}),[d,h]=Lg({isControlled:o!==void 0,onChange:s,state:o??""}),{nvlGraph:p}=Vl(),g=y=>{if(h(y),y===""){u(void 0,void 0);return}const b=Object.values(p.dataLookupTable.nodes),_=Object.values(p.dataLookupTable.relationships);u(Jue(b,y),ele(_,y))};return Te.jsx(Te.Fragment,{children:c?Te.jsx(QY,{ref:l,size:"small",leadingElement:Te.jsx(fk,{}),trailingElement:Te.jsx(S2,{onClick:()=>{var y;g(""),(y=l.current)===null||y===void 0||y.focus()},description:"Clear search",children:Te.jsx(Y9,{})}),placeholder:"Search...",value:d,onChange:y=>g(y.target.value),htmlAttributes:{autoFocus:!0,onBlur:()=>{d===""&&f(!1)}}}):Te.jsx(T2,{size:"small",isFloating:!0,onClick:()=>f(y=>!y),description:"Search",className:r,style:e,htmlAttributes:t,tooltipProps:{root:{placement:n??"bottom"}},children:Te.jsx(fk,{})})})},FG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),[a,o]=me.useState(!1),s=()=>o(!1),u=me.useRef(null);return Te.jsxs(Te.Fragment,{children:[Te.jsx(T2,{ref:u,size:"small",isFloating:!0,onClick:()=>o(l=>!l),description:"Download",tooltipProps:{root:{placement:n??"bottom"}},className:r,style:e,htmlAttributes:t,children:Te.jsx(kV,{})}),Te.jsx(Lm,{isOpen:a,onClose:s,anchorRef:u,children:Te.jsx(Lm.Item,{title:"Download as PNG",onClick:()=>{var l;(l=i.current)===null||l===void 0||l.saveToFile({}),s()}})})]})},sle={d3Force:{icon:Te.jsx(wV,{}),title:"Force-based layout"},hierarchical:{icon:Te.jsx(OV,{}),title:"Hierarchical layout"}},ule=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,menuPlacement:i,layoutOptions:a=sle})=>{var o,s;const u=me.useRef(null),[l,c]=me.useState(!1),{layout:f,setLayout:d}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(V7,{description:"Select layout",isOpen:l,onClick:()=>c(h=>!h),ref:u,className:r,style:e,htmlAttributes:t,size:"small",tooltipProps:{root:{placement:n??"bottom"}},children:(s=(o=a[f])===null||o===void 0?void 0:o.icon)!==null&&s!==void 0?s:Te.jsx(l2,{})}),Te.jsx(Lm,{isOpen:l,anchorRef:u,onClose:()=>c(!1),placement:i,children:Object.entries(a).map(([h,p])=>Te.jsx(Lm.RadioItem,{title:p.title,leadingVisual:p.icon,isChecked:h===f,onClick:()=>d==null?void 0:d(h)},h))})]})},lle={single:{icon:Te.jsx(l2,{}),title:"Individual"},box:{icon:Te.jsx(V9,{}),title:"Box"},lasso:{icon:Te.jsx(G9,{}),title:"Lasso"}},cle=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,menuPlacement:i,gestureOptions:a=lle})=>{var o,s;const u=me.useRef(null),[l,c]=me.useState(!1),{gesture:f,setGesture:d}=Vl();return vE(Object.keys(a)),Te.jsxs(Te.Fragment,{children:[Te.jsx(V7,{description:"Select gesture",isOpen:l,onClick:()=>c(h=>!h),ref:u,className:r,style:e,htmlAttributes:t,size:"small",tooltipProps:{root:{placement:n??"bottom"}},children:(s=(o=a[f])===null||o===void 0?void 0:o.icon)!==null&&s!==void 0?s:Te.jsx(l2,{})}),Te.jsx(Lm,{isOpen:l,anchorRef:u,onClose:()=>c(!1),placement:i,children:Object.entries(a).map(([h,p])=>Te.jsx(Lm.RadioItem,{title:p.title,leadingVisual:p.icon,trailingContent:Te.jsx(JX,{keys:[a_[h]]}),isChecked:h===f,onClick:()=>d==null?void 0:d(h)},h))})]})},ty=({sidepanel:r})=>{const{children:e,isSidePanelOpen:t,sidePanelWidth:n,onSidePanelResize:i,minWidth:a=230}=r;return t?Te.jsx(GX,{defaultSize:{height:"100%",width:n??400},className:"ndl-graph-resizable",minWidth:a,maxWidth:"66%",enable:{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!1,top:!1,topLeft:!1,topRight:!1},handleClasses:{left:"ndl-sidepanel-handle"},onResizeStop:(o,s,u)=>{i(u.getBoundingClientRect().width)},children:Te.jsx("div",{className:"ndl-graph-visualization-sidepanel-content",tabIndex:0,children:e})}):null},fle=({children:r})=>Te.jsx("div",{className:"ndl-graph-visualization-sidepanel-title ndl-grid-area-title",children:r});ty.Title=fle;const dle=({children:r})=>Te.jsx("section",{className:"ndl-grid-area-content",children:r});ty.Content=dle;var hx={exports:{}};/** +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),d=f[0],h=f[1];h!==void 0&&Vt(mi,e).on(d,function(){for(var p=arguments.length,g=new Array(p),y=0;y0})(n)});if(e){var t="";throw/^\d+$/.test(e.id)||(t=" 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(e),".").concat(t))}}function HP(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t="",n=null,i=Vt(In,this),a=i.nodes,o=i.rels,s={},u=0;u{const t=os.keyBy(r,"id"),n=os.keyBy(e,"id"),i=os.sortBy(os.keys(t)),a=os.sortBy(os.keys(n)),o=[],s=[],u=[];let l=0,c=0;for(;ln[f]).filter(f=>!os.isNil(f)),removed:s.map(f=>t[f]).filter(f=>!os.isNil(f)),updated:u.map(f=>n[f]).filter(f=>!os.isNil(f))}},Sue=(r,e)=>{const t=os.keyBy(r,"id");return e.map(n=>{const i=t[n.id];return i===void 0?null:os.transform(n,(a,o,s)=>{(s==="id"||o!==i[s])&&Object.assign(a,{[s]:o})})}).filter(n=>n!==null&&Object.keys(n).length>1)},Oue=(r,e)=>os.isEqual(r,e),Tue=r=>{const e=me.useRef();return Oue(r,e.current)||(e.current=r),e.current},Cue=(r,e)=>{me.useEffect(r,e.map(Tue))},Aue=me.memo(me.forwardRef(({nodes:r,rels:e,layout:t,layoutOptions:n,nvlCallbacks:i={},nvlOptions:a={},positions:o=[],zoom:s,pan:u,onInitializationError:l,...c},f)=>{const d=me.useRef(null),h=me.useRef(void 0),p=me.useRef(void 0);me.useImperativeHandle(f,()=>Object.getOwnPropertyNames(x9.prototype).reduce((S,O)=>({...S,[O]:(...E)=>d.current===null?null:d.current[O](...E)}),{}));const g=me.useRef(null),[y,b]=me.useState(r),[_,m]=me.useState(e);return me.useEffect(()=>()=>{var x;(x=d.current)==null||x.destroy(),d.current=null},[]),me.useEffect(()=>{let x=null;const O="minimapContainer"in a?a.minimapContainer!==null:!0;if(g.current!==null&&O&&d.current===null){const T={...a,layoutOptions:n};t!==void 0&&(T.layout=t);try{x=new x9(g.current,y,_,T,i),d.current=x,m(e),b(r)}catch(P){if(typeof l=="function")l(P);else throw P}}},[g.current,a.minimapContainer]),me.useEffect(()=>{if(d.current===null)return;const x=E9(y,r),S=Sue(y,r),O=E9(_,e);if(x.added.length===0&&x.removed.length===0&&S.length===0&&O.added.length===0&&O.removed.length===0&&O.updated.length===0)return;m(e),b(r);const T=[...x.added,...S],P=[...O.added,...O.updated];d.current.addAndUpdateElementsInGraph(T,P);const I=O.removed.map(L=>L.id),k=x.removed.map(L=>L.id);d.current.removeRelationshipsWithIds(I),d.current.removeNodesWithIds(k)},[y,_,r,e]),me.useEffect(()=>{const x=t??a.layout;d.current===null||x===void 0||d.current.setLayout(x)},[t,a.layout]),Cue(()=>{const x=n??(a==null?void 0:a.layoutOptions);d.current===null||x===void 0||d.current.setLayoutOptions(x)},[n,a.layoutOptions]),me.useEffect(()=>{d.current===null||a.renderer===void 0||d.current.setRenderer(a.renderer)},[a.renderer]),me.useEffect(()=>{d.current===null||a.disableWebGL===void 0||d.current.setDisableWebGL(a.disableWebGL)},[a.disableWebGL]),me.useEffect(()=>{d.current===null||o.length===0||d.current.setNodePositions(o)},[o]),me.useEffect(()=>{if(d.current===null)return;const x=h.current,S=p.current,O=s!==void 0&&s!==x,E=u!==void 0&&(u.x!==(S==null?void 0:S.x)||u.y!==S.y);O&&E?d.current.setZoomAndPan(s,u.x,u.y):O?d.current.setZoom(s):E&&d.current.setPan(u.x,u.y),h.current=s,p.current=u},[s,u]),Ce.jsx("div",{id:xue,ref:g,style:{height:"100%",outline:"0"},...c})})),Ym=10,WP=10,vh={frameWidth:3,frameColor:"#a9a9a9",color:"#e0e0e0",lineDash:[10,15],opacity:.5};class MG{constructor(e){Ft(this,"ctx");Ft(this,"canvas");Ft(this,"removeResizeListener");const t=document.createElement("canvas");t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.left="0",t.style.right="0",t.style.touchAction="none",e==null||e.appendChild(t);const n=t.getContext("2d");this.ctx=n,this.canvas=t;const i=()=>{this.fixCanvasSize(t)};e==null||e.addEventListener("resize",i),this.removeResizeListener=()=>e==null?void 0:e.removeEventListener("resize",i),this.fixCanvasSize(t)}fixCanvasSize(e){const t=e.parentElement;if(!t)return;const n=t.getBoundingClientRect(),{width:i}=n,{height:a}=n,o=window.devicePixelRatio||1;e.width=i*o,e.height=a*o,e.style.width=`${i}px`,e.style.height=`${a}px`}drawBox(e,t,n,i){const{ctx:a}=this;if(a===null)return;this.clear(),a.save(),a.beginPath(),a.rect(e,t,n-e,i-t),a.closePath(),a.strokeStyle=vh.frameColor;const o=window.devicePixelRatio||1;a.lineWidth=vh.frameWidth*o,a.fillStyle=vh.color,a.globalAlpha=vh.opacity,a.setLineDash(vh.lineDash),a.stroke(),a.fill(),a.restore()}drawLasso(e,t,n){const{ctx:i}=this;if(i===null)return;i.save(),this.clear(),i.beginPath();let a=0;for(const s of e){const{x:u,y:l}=s;a===0?i.moveTo(u,l):i.lineTo(u,l),a+=1}const o=window.devicePixelRatio||1;i.strokeStyle=vh.frameColor,i.setLineDash(vh.lineDash),i.lineWidth=vh.frameWidth*o,i.fillStyle=vh.color,i.globalAlpha=vh.opacity,t&&i.stroke(),n&&i.fill(),i.restore()}clear(){const{ctx:e,canvas:t}=this;if(e===null)return;const n=t.getBoundingClientRect(),i=window.devicePixelRatio||1;e.clearRect(0,0,n.width*i,n.height*i)}destroy(){const{canvas:e}=this;this.removeResizeListener(),e.remove()}}class Wp{constructor(e,t){Ft(this,"nvl");Ft(this,"options");Ft(this,"container");Ft(this,"callbackMap");Ft(this,"addEventListener",(e,t,n)=>{var i;(i=this.container)==null||i.addEventListener(e,t,n)});Ft(this,"removeEventListener",(e,t,n)=>{var i;(i=this.container)==null||i.removeEventListener(e,t,n)});Ft(this,"callCallbackIfRegistered",(e,...t)=>{const n=this.callbackMap.get(e);typeof n=="function"&&n(...t)});Ft(this,"updateCallback",(e,t)=>{this.callbackMap.set(e,t)});Ft(this,"removeCallback",e=>{this.callbackMap.delete(e)});Ft(this,"toggleGlobalTextSelection",(e,t)=>{e?(document.body.style.removeProperty("user-select"),t&&document.body.removeEventListener("mouseup",t)):(document.body.style.setProperty("user-select","none","important"),t&&document.body.addEventListener("mouseup",t))});this.nvl=e,this.options=t,this.container=this.nvl.getContainer(),this.callbackMap=new Map}get nvlInstance(){return this.nvl}get currentOptions(){return this.options}get containerInstance(){return this.container}}const sb=r=>Math.floor(Math.random()*Math.pow(10,r)).toString(),DG=(r,e)=>{const t=Math.abs(r.clientX-e.x),n=Math.abs(r.clientY-e.y);return t>WP||n>WP?!0:Math.pow(t,2)+Math.pow(n,2)>WP},Ap=(r,e)=>{const t=r.getBoundingClientRect(),n=window.devicePixelRatio||1;return{x:(e.clientX-t.left)*n,y:(e.clientY-t.top)*n}},Rue=(r,e)=>{const t=r.getBoundingClientRect(),n=window.devicePixelRatio||1;return{x:(e.clientX-t.left-t.width*.5)*n,y:(e.clientY-t.top-t.height*.5)*n}},j1=(r,e)=>{const t=r.getScale(),n=r.getPan(),i=r.getContainer(),{width:a,height:o}=i.getBoundingClientRect(),s=window.devicePixelRatio||1,u=e.x-a*.5*s,l=e.y-o*.5*s;return{x:n.x+u/t,y:n.y+l/t}};class S9 extends Wp{constructor(t,n={selectOnRelease:!1}){super(t,n);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"startWorldPosition",{x:0,y:0});Ft(this,"overlayRenderer");Ft(this,"isBoxSelecting",!1);Ft(this,"handleMouseDown",t=>{if(t.button!==0){this.isBoxSelecting=!1;return}this.turnOnBoxSelect(t)});Ft(this,"handleDrag",t=>{if(this.isBoxSelecting){const n=Ap(this.containerInstance,t);this.overlayRenderer.drawBox(this.mousePosition.x,this.mousePosition.y,n.x,n.y)}else t.buttons===1&&this.turnOnBoxSelect(t)});Ft(this,"getHitsInBox",(t,n)=>{const i=(c,f,d)=>{const h=Math.min(f.x,d.x),p=Math.max(f.x,d.x),g=Math.min(f.y,d.y),y=Math.max(f.y,d.y);return c.x>=h&&c.x<=p&&c.y>=g&&c.y<=y},a=this.nvlInstance.getNodePositions(),o=new Set;for(const c of a)i(c,t,n)&&o.add(c.id);const s=this.nvlInstance.getRelationships(),u=[];for(const c of s)o.has(c.from)&&o.has(c.to)&&u.push(c);return{nodes:Array.from(o).map(c=>this.nvlInstance.getNodeById(c)),rels:u}});Ft(this,"endBoxSelect",t=>{if(!this.isBoxSelecting)return;this.isBoxSelecting=!1,this.overlayRenderer.clear();const n=Ap(this.containerInstance,t),i=j1(this.nvlInstance,n),{nodes:a,rels:o}=this.getHitsInBox(this.startWorldPosition,i);this.currentOptions.selectOnRelease===!0&&this.nvlInstance.updateElementsInGraph(a.map(s=>({id:s.id,selected:!0})),o.map(s=>({id:s.id,selected:!0}))),this.callCallbackIfRegistered("onBoxSelect",{nodes:a,rels:o},t),this.toggleGlobalTextSelection(!0,this.endBoxSelect)});this.overlayRenderer=new MG(this.containerInstance),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleDrag,!0),this.addEventListener("mouseup",this.endBoxSelect,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.endBoxSelect),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleDrag,!0),this.removeEventListener("mouseup",this.endBoxSelect,!0),this.overlayRenderer.destroy()}turnOnBoxSelect(t){this.mousePosition=Ap(this.containerInstance,t),this.startWorldPosition=j1(this.nvlInstance,this.mousePosition),this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.length>0?this.isBoxSelecting=!1:(this.isBoxSelecting=!0,this.toggleGlobalTextSelection(!1,this.endBoxSelect),this.callCallbackIfRegistered("onBoxStarted",t),this.currentOptions.selectOnRelease===!0&&this.nvlInstance.deselectAll())}}class iv extends Wp{constructor(t,n={selectOnClick:!1}){super(t,n);Ft(this,"moved",!1);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"handleMouseDown",t=>{this.mousePosition={x:t.clientX,y:t.clientY}});Ft(this,"handleRightClick",t=>{var o,s;t.preventDefault();const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.callCallbackIfRegistered("onCanvasRightClick",t);return}i.length>0?this.callCallbackIfRegistered("onNodeRightClick",(o=i[0])==null?void 0:o.data,n,t):a.length>0&&this.callCallbackIfRegistered("onRelationshipRightClick",(s=a[0])==null?void 0:s.data,n,t)});Ft(this,"handleDoubleClick",t=>{var o,s;const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.callCallbackIfRegistered("onCanvasDoubleClick",t);return}i.length>0?this.callCallbackIfRegistered("onNodeDoubleClick",(o=i[0])==null?void 0:o.data,n,t):a.length>0&&this.callCallbackIfRegistered("onRelationshipDoubleClick",(s=a[0])==null?void 0:s.data,n,t)});Ft(this,"handleClick",t=>{var o,s;if(DG(t,this.mousePosition)||t.button!==0)return;const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n;if(i.length===0&&a.length===0){this.currentOptions.selectOnClick===!0&&this.nvlInstance.deselectAll(),this.callCallbackIfRegistered("onCanvasClick",t);return}if(i.length>0){const u=i.map(l=>l.data);if(this.currentOptions.selectOnClick===!0){const l=this.nvlInstance.getSelectedNodes(),c=this.nvlInstance.getSelectedRelationships(),d=[...u[0]?[{id:u[0].id,selected:!0}]:[],...l.map(p=>({id:p.id,selected:!1}))],h=c.map(p=>({...p,selected:!1}));this.nvlInstance.updateElementsInGraph(d,h)}this.callCallbackIfRegistered("onNodeClick",(o=i[0])==null?void 0:o.data,n,t)}else if(a.length>0){const u=a.map(l=>l.data);if(this.currentOptions.selectOnClick===!0){const l=this.nvlInstance.getSelectedNodes(),c=this.nvlInstance.getSelectedRelationships(),f=l.map(p=>({id:p.id,selected:!1})),h=[...u[0]?[{id:u[0].id,selected:!0}]:[],...c.map(p=>({...p,selected:!1}))];this.nvlInstance.updateElementsInGraph(f,h)}this.callCallbackIfRegistered("onRelationshipClick",(s=a[0])==null?void 0:s.data,n,t)}});Ft(this,"destroy",()=>{this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("click",this.handleClick,!0),this.removeEventListener("dblclick",this.handleDoubleClick,!0),this.removeEventListener("contextmenu",this.handleRightClick,!0)});this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("click",this.handleClick,!0),this.addEventListener("dblclick",this.handleDoubleClick,!0),this.addEventListener("contextmenu",this.handleRightClick,!0)}}class YP extends Wp{constructor(t,n={}){super(t,n);Ft(this,"mousePosition",{x:0,y:0});Ft(this,"mouseDownNode",null);Ft(this,"isDragging",!1);Ft(this,"isDrawing",!1);Ft(this,"selectedNodes",[]);Ft(this,"moveSelectedNodes",!1);Ft(this,"handleMouseDown",t=>{this.mousePosition={x:t.clientX,y:t.clientY},this.mouseDownNode=null;const n=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}),i=n.nvlTargets.nodes.filter(o=>o.insideNode);n.nvlTargets.nodes.filter(o=>!o.insideNode).length>0?(this.isDrawing=!0,this.addEventListener("mouseup",this.resetState,{once:!0})):i.length>0&&(this.mouseDownNode=n.nvlTargets.nodes[0]??null,this.toggleGlobalTextSelection(!1,this.handleBodyMouseUp)),this.selectedNodes=this.nvlInstance.getSelectedNodes(),this.mouseDownNode!==null&&this.selectedNodes.map(o=>o.id).includes(this.mouseDownNode.data.id)?this.moveSelectedNodes=!0:this.moveSelectedNodes=!1});Ft(this,"handleMouseMove",t=>{if(this.mouseDownNode===null||t.buttons!==1||this.isDrawing||!DG(t,this.mousePosition))return;this.isDragging||(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragStart",this.selectedNodes,t):this.callCallbackIfRegistered("onDragStart",[this.mouseDownNode.data],t),this.isDragging=!0);const n=this.nvlInstance.getScale(),i=(t.clientX-this.mousePosition.x)/n*window.devicePixelRatio,a=(t.clientY-this.mousePosition.y)/n*window.devicePixelRatio;this.moveSelectedNodes?(this.nvlInstance.setNodePositions(this.selectedNodes.map(o=>({id:o.id,x:o.x+i,y:o.y+a,pinned:!0})),!0),this.callCallbackIfRegistered("onDrag",this.selectedNodes,t)):(this.nvlInstance.setNodePositions([{id:this.mouseDownNode.data.id,x:this.mouseDownNode.targetCoordinates.x+i,y:this.mouseDownNode.targetCoordinates.y+a,pinned:!0}],!0),this.callCallbackIfRegistered("onDrag",[this.mouseDownNode.data],t))});Ft(this,"handleBodyMouseUp",t=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.isDragging&&this.mouseDownNode!==null&&(this.moveSelectedNodes?this.callCallbackIfRegistered("onDragEnd",this.selectedNodes,t):this.callCallbackIfRegistered("onDragEnd",[this.mouseDownNode.data],t)),this.resetState()});Ft(this,"resetState",()=>{this.isDragging=!1,this.mouseDownNode=null,this.isDrawing=!1,this.selectedNodes=[],this.moveSelectedNodes=!1});Ft(this,"destroy",()=>{this.toggleGlobalTextSelection(!0,this.handleBodyMouseUp),this.removeEventListener("mousedown",this.handleMouseDown),this.removeEventListener("mousemove",this.handleMouseMove)});this.addEventListener("mousedown",this.handleMouseDown),this.addEventListener("mousemove",this.handleMouseMove)}}const lp={node:{color:"black",size:25},relationship:{color:"red",width:1}};class XP extends Wp{constructor(t,n={}){var i,a;super(t,n);Ft(this,"isMoved",!1);Ft(this,"isDrawing",!1);Ft(this,"isDraggingNode",!1);Ft(this,"mouseDownNode");Ft(this,"newTempTargetNode",null);Ft(this,"newTempRegularRelationshipToNewTempTargetNode",null);Ft(this,"newTempRegularRelationshipToExistingNode",null);Ft(this,"newTempSelfReferredRelationship",null);Ft(this,"newTargetNodeToAdd",null);Ft(this,"newRelationshipToAdd",null);Ft(this,"mouseOutsideOfNvlArea",!1);Ft(this,"cancelDrawing",()=>{var t,n,i,a,o;this.nvlInstance.removeRelationshipsWithIds([(t=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:t.id,(n=this.newTempRegularRelationshipToExistingNode)==null?void 0:n.id,(i=this.newTempSelfReferredRelationship)==null?void 0:i.id].filter(s=>!!s)),this.nvlInstance.removeNodesWithIds((a=this.newTempTargetNode)!=null&&a.id?[(o=this.newTempTargetNode)==null?void 0:o.id]:[]),this.newTempTargetNode=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.newTempSelfReferredRelationship=null,this.isMoved=!1,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"handleMouseUpGlobal",t=>{this.isDrawing&&this.mouseOutsideOfNvlArea&&this.cancelDrawing()});Ft(this,"handleMouseLeaveNvl",()=>{this.mouseOutsideOfNvlArea=!0});Ft(this,"handleMouseEnterNvl",()=>{this.mouseOutsideOfNvlArea=!1});Ft(this,"handleMouseMove",t=>{var n,i,a,o,s,u,l,c,f,d,h,p,g;if(this.isMoved=!0,this.isDrawing){const y=Ap(this.containerInstance,t),b=j1(this.nvlInstance,y),_=this.nvlInstance.getHits(t,["node"]),[m]=_.nvlTargets.nodes.filter(L=>{var B;return L.data.id!==((B=this.newTempTargetNode)==null?void 0:B.id)}),x=m?{id:m.data.id,x:m.targetCoordinates.x,y:m.targetCoordinates.y,size:m.data.size}:void 0,S=sb(13),O=x?null:{id:S,size:((i=(n=this.currentOptions.ghostGraphStyling)==null?void 0:n.node)==null?void 0:i.size)??lp.node.size,selected:!1,x:b.x,y:b.y},E=sb(13),T=(a=this.mouseDownNode)!=null&&a.data?{id:E,from:this.mouseDownNode.data.id,to:x?x.id:S}:null;let{x:P,y:I}=b,k=((s=(o=this.currentOptions.ghostGraphStyling)==null?void 0:o.node)==null?void 0:s.size)??lp.node.size;m?(P=m.targetCoordinates.x,I=m.targetCoordinates.y,k=m.data.size??k,m.data.id===((u=this.mouseDownNode)==null?void 0:u.data.id)&&!this.newTempSelfReferredRelationship?(this.nvlInstance.removeRelationshipsWithIds([(l=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:l.id,(c=this.newTempRegularRelationshipToExistingNode)==null?void 0:c.id].filter(L=>!!L)),this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.setNewSelfReferredRelationship(),this.newTempSelfReferredRelationship&&this.nvlInstance.addElementsToGraph([],[this.newTempSelfReferredRelationship])):m.data.id!==((f=this.mouseDownNode)==null?void 0:f.data.id)&&!this.newTempRegularRelationshipToExistingNode&&(this.nvlInstance.removeRelationshipsWithIds([(d=this.newTempSelfReferredRelationship)==null?void 0:d.id,(h=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:h.id].filter(L=>!!L)),this.newTempSelfReferredRelationship=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.setNewRegularRelationshipToExistingNode(m.data.id),this.newTempRegularRelationshipToExistingNode&&this.nvlInstance.addElementsToGraph([],[this.newTempRegularRelationshipToExistingNode]))):this.newTempRegularRelationshipToNewTempTargetNode||(this.nvlInstance.removeRelationshipsWithIds([(p=this.newTempSelfReferredRelationship)==null?void 0:p.id,(g=this.newTempRegularRelationshipToExistingNode)==null?void 0:g.id].filter(L=>!!L)),this.newTempSelfReferredRelationship=null,this.newTempRegularRelationshipToExistingNode=null,this.setNewRegularRelationshipToNewTempTargetNode(),this.nvlInstance.addElementsToGraph([],this.newTempRegularRelationshipToNewTempTargetNode?[this.newTempRegularRelationshipToNewTempTargetNode]:[])),this.newTempTargetNode&&(this.nvlInstance.setNodePositions([{id:this.newTempTargetNode.id,x:P,y:I}]),this.nvlInstance.updateElementsInGraph([{id:this.newTempTargetNode.id,x:P,y:I,size:k}],[])),this.newRelationshipToAdd=T,this.newTargetNodeToAdd=O}else if(!this.isDraggingNode){this.newRelationshipToAdd=null,this.newTargetNodeToAdd=null;const b=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.filter(_=>!_.insideNode);if(b.length>0){const[_]=b;this.callCallbackIfRegistered("onHoverNodeMargin",_==null?void 0:_.data)}else this.callCallbackIfRegistered("onHoverNodeMargin",null)}});Ft(this,"handleMouseDown",t=>{var u,l,c,f,d;this.callCallbackIfRegistered("onHoverNodeMargin",null),this.isMoved=!1,this.newRelationshipToAdd=null,this.newTargetNodeToAdd=null;const n=this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}),i=n.nvlTargets.nodes.filter(h=>h.insideNode),a=n.nvlTargets.nodes.filter(h=>!h.insideNode),o=i.length>0,s=a.length>0;if((o||s)&&(t.preventDefault(),(u=this.containerInstance)==null||u.focus()),o)this.isDraggingNode=!0,this.isDrawing=!1;else if(s){this.isDrawing=!0,this.isDraggingNode=!1,this.mouseDownNode=a[0];const h=Ap(this.containerInstance,t),p=j1(this.nvlInstance,h),g=((c=(l=this.currentOptions.ghostGraphStyling)==null?void 0:l.node)==null?void 0:c.color)??lp.node.color,y=document.createElement("div");y.style.width="110%",y.style.height="110%",y.style.position="absolute",y.style.left="-5%",y.style.top="-5%",y.style.borderRadius="50%",y.style.backgroundColor=g,this.newTempTargetNode={id:sb(13),size:((d=(f=this.currentOptions.ghostGraphStyling)==null?void 0:f.node)==null?void 0:d.size)??lp.node.size,selected:!1,x:p.x,y:p.y,html:y},this.setNewRegularRelationshipToNewTempTargetNode(),this.nvlInstance.addAndUpdateElementsInGraph([this.newTempTargetNode],this.newTempRegularRelationshipToNewTempTargetNode?[this.newTempRegularRelationshipToNewTempTargetNode]:[]),this.callCallbackIfRegistered("onDrawStarted",t)}else this.mouseDownNode=void 0,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"handleMouseUp",t=>{var n,i,a,o,s;this.nvlInstance.removeRelationshipsWithIds([(n=this.newTempRegularRelationshipToNewTempTargetNode)==null?void 0:n.id,(i=this.newTempRegularRelationshipToExistingNode)==null?void 0:i.id,(a=this.newTempSelfReferredRelationship)==null?void 0:a.id].filter(u=>!!u)),this.nvlInstance.removeNodesWithIds((o=this.newTempTargetNode)!=null&&o.id?[(s=this.newTempTargetNode)==null?void 0:s.id]:[]),this.isDrawing&&this.isMoved&&(this.newTargetNodeToAdd&&this.nvlInstance.setNodePositions([this.newTargetNodeToAdd]),this.nvlInstance.addAndUpdateElementsInGraph(this.newTargetNodeToAdd?[{id:this.newTargetNodeToAdd.id}]:[],this.newRelationshipToAdd?[this.newRelationshipToAdd]:[]),this.callCallbackIfRegistered("onDrawEnded",this.newRelationshipToAdd,this.newTargetNodeToAdd,t)),this.newTempTargetNode=null,this.newTempRegularRelationshipToNewTempTargetNode=null,this.newTempRegularRelationshipToExistingNode=null,this.newTempSelfReferredRelationship=null,this.isMoved=!1,this.isDrawing=!1,this.isDraggingNode=!1});Ft(this,"destroy",()=>{var t,n;this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0),(t=this.containerInstance)==null||t.removeEventListener("mouseleave",this.handleMouseLeaveNvl),(n=this.containerInstance)==null||n.removeEventListener("mouseenter",this.handleMouseEnterNvl),document.removeEventListener("mouseup",this.handleMouseUpGlobal,!0)});this.nvlInstance.setLayout("free"),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mouseup",this.handleMouseUp,!0),(i=this.containerInstance)==null||i.addEventListener("mouseleave",this.handleMouseLeaveNvl),(a=this.containerInstance)==null||a.addEventListener("mouseenter",this.handleMouseEnterNvl),document.addEventListener("mouseup",this.handleMouseUpGlobal,!0)}setNewRegularRelationship(t){var n,i,a,o;return this.mouseDownNode?{id:sb(13),from:this.mouseDownNode.data.id,to:t,color:((i=(n=this.currentOptions.ghostGraphStyling)==null?void 0:n.relationship)==null?void 0:i.color)??lp.relationship.color,width:((o=(a=this.currentOptions.ghostGraphStyling)==null?void 0:a.relationship)==null?void 0:o.width)??lp.relationship.width}:null}setNewRegularRelationshipToNewTempTargetNode(){!this.mouseDownNode||!this.newTempTargetNode||(this.newTempRegularRelationshipToNewTempTargetNode=this.setNewRegularRelationship(this.newTempTargetNode.id))}setNewRegularRelationshipToExistingNode(t){this.mouseDownNode&&(this.newTempRegularRelationshipToExistingNode=this.setNewRegularRelationship(t))}setNewSelfReferredRelationship(){var t,n,i,a;this.mouseDownNode&&(this.newTempSelfReferredRelationship={id:sb(13),from:this.mouseDownNode.data.id,to:this.mouseDownNode.data.id,color:((n=(t=this.currentOptions.ghostGraphStyling)==null?void 0:t.relationship)==null?void 0:n.color)??lp.relationship.color,width:((a=(i=this.currentOptions.ghostGraphStyling)==null?void 0:i.relationship)==null?void 0:a.width)??lp.relationship.width})}}class Pue extends Wp{constructor(t,n={drawShadowOnHover:!1}){super(t,n);Ft(this,"currentHoveredElementId");Ft(this,"currentHoveredElementIsNode");Ft(this,"updates",{nodes:[],relationships:[]});Ft(this,"handleHover",t=>{const{nvlTargets:n}=this.nvlInstance.getHits(t),{nodes:i=[],relationships:a=[]}=n,o=i[0]??a[0],s=o==null?void 0:o.data,u=s!==void 0&&i[0]!==void 0,l=this.currentHoveredElementId===void 0&&s===void 0,c=(s==null?void 0:s.id)!==void 0&&this.currentHoveredElementId===s.id&&u===this.currentHoveredElementIsNode;if(l||c){this.callCallbackIfRegistered("onHover",s,n,t);return}if(this.currentHoveredElementId!==void 0&&this.currentHoveredElementId!==(s==null?void 0:s.id)&&this.unHoverCurrentElement(),u)this.updates.nodes.push({id:s.id,hovered:!0}),this.currentHoveredElementId=s.id,this.currentHoveredElementIsNode=!0;else if(s!==void 0){const{id:d}=s;this.updates.relationships.push({id:d,hovered:!0}),this.currentHoveredElementId=s.id,this.currentHoveredElementIsNode=!1}else this.currentHoveredElementId=void 0,this.currentHoveredElementIsNode=void 0;this.callCallbackIfRegistered("onHover",s,n,t),this.updateElementsInNVL(),this.clearUpdates()});this.addEventListener("mousemove",this.handleHover,!0)}updateElementsInNVL(){this.currentOptions.drawShadowOnHover===!0&&this.nvlInstance.getNodes().length>0&&this.nvlInstance.updateElementsInGraph(this.updates.nodes,this.updates.relationships)}clearUpdates(){this.updates.nodes=[],this.updates.relationships=[]}unHoverCurrentElement(){if(this.currentHoveredElementId===void 0)return;const t={id:this.currentHoveredElementId,hovered:!1};this.currentHoveredElementIsNode===!0?this.updates.nodes.push(t):this.updates.relationships.push({...t})}destroy(){this.removeEventListener("mousemove",this.handleHover,!0)}}var qw={exports:{}},dx={exports:{}},Mue=dx.exports,O9;function Due(){return O9||(O9=1,(function(r,e){(function(t,n){r.exports=n()})(Mue,function(){function t(_,m,x,S,O){(function E(T,P,I,k,L){for(;k>I;){if(k-I>600){var B=k-I+1,j=P-I+1,z=Math.log(B),H=.5*Math.exp(2*z/3),q=.5*Math.sqrt(z*H*(B-H)/B)*(j-B/2<0?-1:1),W=Math.max(I,Math.floor(P-j*H/B+q)),$=Math.min(k,Math.floor(P+(B-j)*H/B+q));E(T,P,W,$,L)}var J=T[P],X=I,Z=k;for(n(T,I,P),L(T[k],J)>0&&n(T,I,k);X0;)Z--}L(T[I],J)===0?n(T,I,Z):n(T,++Z,k),Z<=P&&(I=Z+1),P<=Z&&(k=Z-1)}})(_,m,x||0,S||_.length-1,O||i)}function n(_,m,x){var S=_[m];_[m]=_[x],_[x]=S}function i(_,m){return _m?1:0}var a=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(_,m,x){if(!x)return m.indexOf(_);for(var S=0;S=_.minX&&m.maxY>=_.minY}function y(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(_,m,x,S,O){for(var E=[m,x];E.length;)if(!((x=E.pop())-(m=E.pop())<=S)){var T=m+Math.ceil((x-m)/S/2)*S;t(_,T,m,x,O),E.push(m,T,T,x)}}return a.prototype.all=function(){return this._all(this.data,[])},a.prototype.search=function(_){var m=this.data,x=[];if(!g(_,m))return x;for(var S=this.toBBox,O=[];m;){for(var E=0;E=0&&O[m].children.length>this._maxEntries;)this._split(O,m),m--;this._adjustParentBBoxes(S,O,m)},a.prototype._split=function(_,m){var x=_[m],S=x.children.length,O=this._minEntries;this._chooseSplitAxis(x,O,S);var E=this._chooseSplitIndex(x,O,S),T=y(x.children.splice(E,x.children.length-E));T.height=x.height,T.leaf=x.leaf,s(x,this.toBBox),s(T,this.toBBox),m?_[m-1].children.push(T):this._splitRoot(x,T)},a.prototype._splitRoot=function(_,m){this.data=y([_,m]),this.data.height=_.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},a.prototype._chooseSplitIndex=function(_,m,x){for(var S,O,E,T,P,I,k,L=1/0,B=1/0,j=m;j<=x-m;j++){var z=u(_,0,j,this.toBBox),H=u(_,j,x,this.toBBox),q=(O=z,E=H,T=void 0,P=void 0,I=void 0,k=void 0,T=Math.max(O.minX,E.minX),P=Math.max(O.minY,E.minY),I=Math.min(O.maxX,E.maxX),k=Math.min(O.maxY,E.maxY),Math.max(0,I-T)*Math.max(0,k-P)),W=d(z)+d(H);q=m;L--){var B=_.children[L];l(T,_.leaf?O(B):B),P+=h(T)}return P},a.prototype._adjustParentBBoxes=function(_,m,x){for(var S=x;S>=0;S--)l(m[S],_)},a.prototype._condense=function(_){for(var m=_.length-1,x=void 0;m>=0;m--)_[m].children.length===0?m>0?(x=_[m-1].children).splice(x.indexOf(_[m]),1):this.clear():s(_[m],this.toBBox)},a})})(dx)),dx.exports}class kue{constructor(e=[],t=Iue){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)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,i=t[e];for(;e>0;){const a=e-1>>1,o=t[a];if(n(i,o)>=0)break;t[e]=o,e=a}t[e]=i}_down(e){const{data:t,compare:n}=this,i=this.length>>1,a=t[e];for(;e=0)break;t[e]=s,e=o}t[e]=a}}function Iue(r,e){return re?1:0}const Nue=Object.freeze(Object.defineProperty({__proto__:null,default:kue},Symbol.toStringTag,{value:"Module"})),Lue=QG(Nue);var ub={exports:{}},$P,T9;function jue(){return T9||(T9=1,$P=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var u=(i-n)/2,l=0,c=u-1;lo!=p>o&&a<(h-f)*(o-d)/(p-d)+f;g&&(s=!s)}return s}),$P}var KP,C9;function Bue(){return C9||(C9=1,KP=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var u=i-n,l=0,c=u-1;lo!=p>o&&a<(h-f)*(o-d)/(p-d)+f;g&&(s=!s)}return s}),KP}var A9;function Fue(){if(A9)return ub.exports;A9=1;var r=jue(),e=Bue();return ub.exports=function(n,i,a,o){return i.length>0&&Array.isArray(i[0])?e(n,i,a,o):r(n,i,a,o)},ub.exports.nested=e,ub.exports.flat=r,ub.exports}var Ab={exports:{}},Uue=Ab.exports,R9;function zue(){return R9||(R9=1,(function(r,e){(function(t,n){n(e)})(Uue,function(t){const i=33306690738754706e-32;function a(g,y,b,_,m){let x,S,O,E,T=y[0],P=_[0],I=0,k=0;P>T==P>-T?(x=T,T=y[++I]):(x=P,P=_[++k]);let L=0;if(IT==P>-T?(O=x-((S=T+x)-T),T=y[++I]):(O=x-((S=P+x)-P),P=_[++k]),x=S,O!==0&&(m[L++]=O);IT==P>-T?(O=x-((S=x+T)-(E=S-x))+(T-E),T=y[++I]):(O=x-((S=x+P)-(E=S-x))+(P-E),P=_[++k]),x=S,O!==0&&(m[L++]=O);for(;I0!=O>0)return E;const T=Math.abs(S+O);return Math.abs(E)>=s*T?E:-(function(P,I,k,L,B,j,z){let H,q,W,$,J,X,Z,ue,re,ne,le,ce,pe,fe,se,de,ge,Oe;const ke=P-B,De=k-B,Ne=I-j,Te=L-j;J=(se=(ue=ke-(Z=(X=134217729*ke)-(X-ke)))*(ne=Te-(re=(X=134217729*Te)-(X-Te)))-((fe=ke*Te)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=Ne-(Z=(X=134217729*Ne)-(X-Ne)))*(ne=De-(re=(X=134217729*De)-(X-De)))-((de=Ne*De)-Z*re-ue*re-Z*ne))),c[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),c[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,c[2]=ce-(Oe-J)+(le-J),c[3]=Oe;let Y=(function(Me,Ie){let Ye=Ie[0];for(let ot=1;ot=Q||-Y>=Q||(H=P-(ke+(J=P-ke))+(J-B),W=k-(De+(J=k-De))+(J-B),q=I-(Ne+(J=I-Ne))+(J-j),$=L-(Te+(J=L-Te))+(J-j),H===0&&q===0&&W===0&&$===0)||(Q=l*z+i*Math.abs(Y),(Y+=ke*$+Te*H-(Ne*W+De*q))>=Q||-Y>=Q))return Y;J=(se=(ue=H-(Z=(X=134217729*H)-(X-H)))*(ne=Te-(re=(X=134217729*Te)-(X-Te)))-((fe=H*Te)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=q-(Z=(X=134217729*q)-(X-q)))*(ne=De-(re=(X=134217729*De)-(X-De)))-((de=q*De)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const ie=a(4,c,4,p,f);J=(se=(ue=ke-(Z=(X=134217729*ke)-(X-ke)))*(ne=$-(re=(X=134217729*$)-(X-$)))-((fe=ke*$)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=Ne-(Z=(X=134217729*Ne)-(X-Ne)))*(ne=W-(re=(X=134217729*W)-(X-W)))-((de=Ne*W)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const we=a(ie,f,4,p,d);J=(se=(ue=H-(Z=(X=134217729*H)-(X-H)))*(ne=$-(re=(X=134217729*$)-(X-$)))-((fe=H*$)-Z*re-ue*re-Z*ne))-(le=se-(ge=(ue=q-(Z=(X=134217729*q)-(X-q)))*(ne=W-(re=(X=134217729*W)-(X-W)))-((de=q*W)-Z*re-ue*re-Z*ne))),p[0]=se-(le+J)+(J-ge),J=(pe=fe-((ce=fe+le)-(J=ce-fe))+(le-J))-(le=pe-de),p[1]=pe-(le+J)+(J-de),J=(Oe=ce+le)-ce,p[2]=ce-(Oe-J)+(le-J),p[3]=Oe;const Ee=a(we,d,4,p,h);return h[Ee-1]})(g,y,b,_,m,x,T)},t.orient2dfast=function(g,y,b,_,m,x){return(y-x)*(b-m)-(g-m)*(_-x)},Object.defineProperty(t,"__esModule",{value:!0})})})(Ab,Ab.exports)),Ab.exports}var P9;function que(){if(P9)return qw.exports;P9=1;var r=Due(),e=Lue,t=Fue(),n=zue().orient2d;e.default&&(e=e.default),qw.exports=i,qw.exports.default=i;function i(x,S,O){S=Math.max(0,S===void 0?2:S),O=O||0;var E=h(x),T=new r(16);T.toBBox=function(Z){return{minX:Z[0],minY:Z[1],maxX:Z[0],maxY:Z[1]}},T.compareMinX=function(Z,ue){return Z[0]-ue[0]},T.compareMinY=function(Z,ue){return Z[1]-ue[1]},T.load(x);for(var P=[],I=0,k;IP||k.push({node:j,dist:z})}for(;k.length&&!k.peek().node.children;){var H=k.pop(),q=H.node,W=y(q,S,O),$=y(q,E,T);if(H.dist=S.minX&&x[0]<=S.maxX&&x[1]>=S.minY&&x[1]<=S.maxY}function l(x,S,O){for(var E=Math.min(x[0],S[0]),T=Math.min(x[1],S[1]),P=Math.max(x[0],S[0]),I=Math.max(x[1],S[1]),k=O.search({minX:E,minY:T,maxX:P,maxY:I}),L=0;L0!=c(x,S,E)>0&&c(O,E,x)>0!=c(O,E,S)>0}function d(x){var S=x.p,O=x.next.p;return x.minX=Math.min(S[0],O[0]),x.minY=Math.min(S[1],O[1]),x.maxX=Math.max(S[0],O[0]),x.maxY=Math.max(S[1],O[1]),x}function h(x){for(var S=x[0],O=x[0],E=x[0],T=x[0],P=0;PE[0]&&(E=I),I[1]T[1]&&(T=I)}var k=[S,O,E,T],L=k.slice();for(P=0;P1?(E=O[0],T=O[1]):k>0&&(E+=P*k,T+=I*k)}return P=x[0]-E,I=x[1]-T,P*P+I*I}function b(x,S,O,E,T,P,I,k){var L=O-x,B=E-S,j=I-T,z=k-P,H=x-T,q=S-P,W=L*L+B*B,$=L*j+B*z,J=j*j+z*z,X=L*H+B*q,Z=j*H+z*q,ue=W*J-$*$,re,ne,le,ce,pe=ue,fe=ue;ue===0?(ne=0,pe=1,ce=Z,fe=J):(ne=$*Z-J*X,ce=W*Z-$*X,ne<0?(ne=0,ce=Z,fe=J):ne>pe&&(ne=pe,ce=Z+$,fe=J)),ce<0?(ce=0,-X<0?ne=0:-X>W?ne=pe:(ne=-X,pe=W)):ce>fe&&(ce=fe,-X+$<0?ne=0:-X+$>W?ne=pe:(ne=-X+$,pe=W)),re=ne===0?0:ne/pe,le=ce===0?0:ce/fe;var se=(1-re)*x+re*O,de=(1-re)*S+re*E,ge=(1-le)*T+le*I,Oe=(1-le)*P+le*k,ke=ge-se,De=Oe-de;return ke*ke+De*De}function _(x,S){return x[0]===S[0]?x[1]-S[1]:x[0]-S[0]}function m(x){x.sort(_);for(var S=[],O=0;O=2&&c(S[S.length-2],S[S.length-1],x[O])<=0;)S.pop();S.push(x[O])}for(var E=[],T=x.length-1;T>=0;T--){for(;E.length>=2&&c(E[E.length-2],E[E.length-1],x[T])<=0;)E.pop();E.push(x[T])}return E.pop(),S.pop(),S.concat(E)}return qw.exports}var Gue=que();const Vue=Bp(Gue),M9=10,Hue=500,Wue=(r,e,t,n)=>{const i=(n[1]-t[1])*(e[0]-r[0])-(n[0]-t[0])*(e[1]-r[1]);if(i===0)return!1;const a=((r[1]-t[1])*(n[0]-t[0])-(r[0]-t[0])*(n[1]-t[1]))/i,o=((t[0]-r[0])*(e[1]-r[1])-(t[1]-r[1])*(e[0]-r[0]))/i;return a>0&&a<1&&o>0&&o<1},Yue=r=>{for(let e=0;e{let n=!1;for(let i=0,a=t.length-1;ie!=f>e&&r<(c-u)*(e-l)/(f-l)+u&&(n=!n)}return n};class D9 extends Wp{constructor(t,n={selectOnRelease:!1}){super(t,n);Ft(this,"active",!1);Ft(this,"points",[]);Ft(this,"overlayRenderer");Ft(this,"startLasso",t=>{this.nvlInstance.getHits(t,["node"],{hitNodeMarginWidth:Ym}).nvlTargets.nodes.length>0?this.active=!1:(this.active=!0,this.points=[Ap(this.containerInstance,t)],this.toggleGlobalTextSelection(!1,this.endLasso),this.callCallbackIfRegistered("onLassoStarted",t),this.currentOptions.selectOnRelease===!0&&this.nvlInstance.deselectAll())});Ft(this,"handleMouseDown",t=>{t.button===0&&!this.active&&this.startLasso(t)});Ft(this,"handleDrag",t=>{if(this.active){const n=this.points[this.points.length-1];if(n===void 0)return;const i=Ap(this.containerInstance,t),a=Math.abs(n.x-i.x),o=Math.abs(n.y-i.y);(a>M9||o>M9)&&(this.points.push(i),this.overlayRenderer.drawLasso(this.points,!0,!1))}});Ft(this,"handleMouseUp",t=>{this.points.push(Ap(this.containerInstance,t)),this.endLasso(t)});Ft(this,"getLassoItems",t=>{const n=t.map(l=>j1(this.nvlInstance,l)),i=this.nvlInstance.getNodePositions(),a=new Set;for(const l of i)l.x===void 0||l.y===void 0||l.id===void 0||Xue(l.x,l.y,n)&&a.add(l.id);const o=this.nvlInstance.getRelationships(),s=[];for(const l of o)a.has(l.from)&&a.has(l.to)&&s.push(l);return{nodes:Array.from(a).map(l=>this.nvlInstance.getNodeById(l)),rels:s}});Ft(this,"endLasso",t=>{if(!this.active)return;this.active=!1,this.toggleGlobalTextSelection(!0,this.endLasso);const n=this.points.map(s=>[s.x,s.y]),a=(Yue(n)?Vue(n,2):n).map(s=>({x:s[0],y:s[1]})).filter(s=>s.x!==void 0&&s.y!==void 0);this.overlayRenderer.drawLasso(a,!1,!0),setTimeout(()=>this.overlayRenderer.clear(),Hue);const o=this.getLassoItems(a);this.currentOptions.selectOnRelease===!0&&this.nvlInstance.updateElementsInGraph(o.nodes.map(s=>({id:s.id,selected:!0})),o.rels.map(s=>({id:s.id,selected:!0}))),this.callCallbackIfRegistered("onLassoSelect",o,t)});this.overlayRenderer=new MG(this.containerInstance),this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleDrag,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.endLasso),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleDrag,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0),this.overlayRenderer.destroy()}}class $ue extends Wp{constructor(t,n={excludeNodeMargin:!1}){super(t,n);Ft(this,"initialMousePosition",{x:0,y:0});Ft(this,"initialPan",{x:0,y:0});Ft(this,"targets",[]);Ft(this,"shouldPan",!1);Ft(this,"isPanning",!1);Ft(this,"updateTargets",(t,n)=>{this.targets=t,this.currentOptions.excludeNodeMargin=n});Ft(this,"handleMouseDown",t=>{const n=this.nvlInstance.getHits(t,os.difference(["node","relationship"],this.targets),{hitNodeMarginWidth:this.currentOptions.excludeNodeMargin===!0?Ym:0});n.nvlTargets.nodes.length>0||n.nvlTargets.relationships.length>0?this.shouldPan=!1:(this.initialMousePosition={x:t.clientX,y:t.clientY},this.initialPan=this.nvlInstance.getPan(),this.shouldPan=!0)});Ft(this,"handleMouseMove",t=>{if(!this.shouldPan||t.buttons!==1)return;this.isPanning||(this.toggleGlobalTextSelection(!1,this.handleMouseUp),this.isPanning=!0);const n=this.nvlInstance.getScale(),{x:i,y:a}=this.initialPan,o=(t.clientX-this.initialMousePosition.x)/n*window.devicePixelRatio,s=(t.clientY-this.initialMousePosition.y)/n*window.devicePixelRatio,u=i-o,l=a-s;this.currentOptions.controlledPan!==!0&&this.nvlInstance.setPan(u,l),this.callCallbackIfRegistered("onPan",{x:u,y:l},t)});Ft(this,"handleMouseUp",()=>{this.isPanning&&this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.resetPanState()});Ft(this,"resetPanState",()=>{this.isPanning=!1,this.shouldPan=!1,this.initialMousePosition={x:0,y:0},this.initialPan={x:0,y:0},this.targets=[]});this.addEventListener("mousedown",this.handleMouseDown,!0),this.addEventListener("mousemove",this.handleMouseMove,!0),this.addEventListener("mouseup",this.handleMouseUp,!0)}destroy(){this.toggleGlobalTextSelection(!0,this.handleMouseUp),this.removeEventListener("mousedown",this.handleMouseDown,!0),this.removeEventListener("mousemove",this.handleMouseMove,!0),this.removeEventListener("mouseup",this.handleMouseUp,!0)}}class k9 extends Wp{constructor(t,n={}){super(t,n);Ft(this,"zoomLimits");Ft(this,"handleWheel",t=>{t.preventDefault(),this.throttledZoom(t)});Ft(this,"throttledZoom",os.throttle(t=>{const n=this.nvlInstance.getScale(),{x:i,y:a}=this.nvlInstance.getPan();this.zoomLimits=this.nvlInstance.getZoomLimits();const s=t.ctrlKey||t.metaKey?75:500,u=t.deltaY/s,l=n>=1?u*n:u,c=n-l*Math.min(1,n),f=c>this.zoomLimits.maxZoom||c{this.removeEventListener("wheel",this.handleWheel)});this.zoomLimits=t.getZoomLimits(),this.addEventListener("wheel",this.handleWheel)}}const av=r=>{var e;(e=r.current)==null||e.destroy(),r.current=null},Ha=(r,e,t,n,i,a)=>{me.useEffect(()=>{const o=i.current;os.isNil(o)||os.isNil(o.getContainer())||(t===!0||typeof t=="function"?(os.isNil(e.current)&&(e.current=new r(o,a)),typeof t=="function"?e.current.updateCallback(n,t):os.isNil(e.current.callbackMap[n])||e.current.removeCallback(n)):t===!1&&av(e))},[r,t,n,a,e,i])},Kue=({nvlRef:r,mouseEventCallbacks:e,interactionOptions:t})=>{const n=me.useRef(null),i=me.useRef(null),a=me.useRef(null),o=me.useRef(null),s=me.useRef(null),u=me.useRef(null),l=me.useRef(null),c=me.useRef(null);return Ha(Pue,n,e.onHover,"onHover",r,t),Ha(iv,i,e.onNodeClick,"onNodeClick",r,t),Ha(iv,i,e.onNodeDoubleClick,"onNodeDoubleClick",r,t),Ha(iv,i,e.onNodeRightClick,"onNodeRightClick",r,t),Ha(iv,i,e.onRelationshipClick,"onRelationshipClick",r,t),Ha(iv,i,e.onRelationshipDoubleClick,"onRelationshipDoubleClick",r,t),Ha(iv,i,e.onRelationshipRightClick,"onRelationshipRightClick",r,t),Ha(iv,i,e.onCanvasClick,"onCanvasClick",r,t),Ha(iv,i,e.onCanvasDoubleClick,"onCanvasDoubleClick",r,t),Ha(iv,i,e.onCanvasRightClick,"onCanvasRightClick",r,t),Ha($ue,a,e.onPan,"onPan",r,t),Ha(k9,o,e.onZoom,"onZoom",r,t),Ha(k9,o,e.onZoomAndPan,"onZoomAndPan",r,t),Ha(YP,s,e.onDrag,"onDrag",r,t),Ha(YP,s,e.onDragStart,"onDragStart",r,t),Ha(YP,s,e.onDragEnd,"onDragEnd",r,t),Ha(XP,u,e.onHoverNodeMargin,"onHoverNodeMargin",r,t),Ha(XP,u,e.onDrawStarted,"onDrawStarted",r,t),Ha(XP,u,e.onDrawEnded,"onDrawEnded",r,t),Ha(S9,l,e.onBoxStarted,"onBoxStarted",r,t),Ha(S9,l,e.onBoxSelect,"onBoxSelect",r,t),Ha(D9,c,e.onLassoStarted,"onLassoStarted",r,t),Ha(D9,c,e.onLassoSelect,"onLassoSelect",r,t),me.useEffect(()=>()=>{av(n),av(i),av(a),av(o),av(s),av(u),av(l),av(c)},[]),null},Zue={selectOnClick:!1,drawShadowOnHover:!0,selectOnRelease:!1,excludeNodeMargin:!0},Que=me.memo(me.forwardRef(({nodes:r,rels:e,layout:t,layoutOptions:n,onInitializationError:i,mouseEventCallbacks:a={},nvlCallbacks:o={},nvlOptions:s={},interactionOptions:u=Zue,...l},c)=>{const f=me.useRef(null),d=c??f,[h,p]=me.useState(!1),g=me.useCallback(()=>{p(!0)},[]),y=me.useCallback(_=>{p(!1),i&&i(_)},[i]),b=h&&d.current!==null;return Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(Aue,{ref:d,nodes:r,id:Eue,rels:e,nvlOptions:s,nvlCallbacks:{...o,onInitialization:()=>{o.onInitialization!==void 0&&o.onInitialization(),g()}},layout:t,layoutOptions:n,onInitializationError:y,...l}),b&&Ce.jsx(Kue,{nvlRef:d,mouseEventCallbacks:a,interactionOptions:u})]})})),kG=me.createContext(void 0),Vl=()=>{const r=me.useContext(kG);if(!r)throw new Error("useGraphVisualizationContext must be used within a GraphVisualizationContext");return r};function Lg({state:r,onChange:e,isControlled:t}){const[n,i]=me.useState(r),a=me.useMemo(()=>t===!0?r:n,[t,r,n]),o=me.useCallback(s=>{const u=typeof s=="function"?s(a):s;t!==!0&&i(u),e==null||e(u)},[t,a,e]);return[a,o]}const I9=navigator.userAgent.includes("Mac"),IG=(r,e)=>{var t;for(const[n,i]of Object.entries(r)){const a=n.toLowerCase().includes(e),s=((t=i==null?void 0:i.stringified)!==null&&t!==void 0?t:"").toLowerCase().includes(e);if(a||s)return!0}return!1},Jue=(r,e)=>{const t=e.toLowerCase();return r.filter(n=>{var i;return!((i=n.labelsSorted)===null||i===void 0)&&i.some(a=>a.toLowerCase().includes(t))?!0:IG(n.properties,t)}).map(n=>n.id)},ele=(r,e)=>{const t=e.toLowerCase();return r.filter(n=>n.type.toLowerCase().includes(t)?!0:IG(n.properties,t)).map(n=>n.id)},a0=r=>{const{isActive:e,ariaLabel:t,isDisabled:n,description:i,onClick:a,onMouseDown:o,tooltipPlacement:s,className:u,style:l,htmlAttributes:c,children:f}=r;return Ce.jsx(S2,{description:i??t,tooltipProps:{content:{style:{whiteSpace:"nowrap"}},root:{isPortaled:!1,placement:s}},size:"small",className:u,style:l,isActive:e,isDisabled:n,onClick:a,htmlAttributes:Object.assign({onMouseDown:o},c),children:f})},tle=r=>r instanceof HTMLElement?r.isContentEditable||["INPUT","TEXTAREA"].includes(r.tagName):!1,rle=r=>tle(r.target),a_={box:"B",lasso:"L",single:"S"},vE=r=>{const{setGesture:e}=Vl(),t=me.useCallback(n=>{if(!rle(n)&&e!==void 0){const i=n.key.toUpperCase();for(const a of r)i===a_[a]&&e(a)}},[r,e]);me.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}),[t])},ZD=" ",nle=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["single"]),Ce.jsx(a0,{isActive:i==="single",isDisabled:o!=="select",ariaLabel:"Individual Select Button",description:`Individual Select ${ZD} ${a_.single}`,onClick:()=>{a==null||a("single")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-individual-select"},t),className:r,style:e,children:Ce.jsx(l2,{"aria-label":"Individual Select"})})},ile=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["box"]),Ce.jsx(a0,{isDisabled:o!=="select"||a===void 0,isActive:i==="box",ariaLabel:"Box Select Button",description:`Box Select ${ZD} ${a_.box}`,onClick:()=>{a==null||a("box")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-box-select"},t),className:r,style:e,children:Ce.jsx(V9,{"aria-label":"Box select"})})},ale=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{gesture:i,setGesture:a,interactionMode:o}=Vl();return vE(["lasso"]),Ce.jsx(a0,{isDisabled:o!=="select"||a===void 0,isActive:i==="lasso",ariaLabel:"Lasso Select Button",description:`Lasso Select ${ZD} ${a_.lasso}`,onClick:()=>{a==null||a("lasso")},tooltipPlacement:n??"right",htmlAttributes:Object.assign({"data-testid":"gesture-lasso-select"},t),className:r,style:e,children:Ce.jsx(G9,{"aria-label":"Lasso select"})})},NG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{var o,s;(o=i.current)===null||o===void 0||o.setZoom(((s=i.current)===null||s===void 0?void 0:s.getScale())*1.3)},[i]);return Ce.jsx(a0,{onClick:a,description:"Zoom in",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Ce.jsx(tH,{})})},LG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{var o,s;(o=i.current)===null||o===void 0||o.setZoom(((s=i.current)===null||s===void 0?void 0:s.getScale())*.7)},[i]);return Ce.jsx(a0,{onClick:a,description:"Zoom out",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Ce.jsx(QV,{})})},jG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),a=me.useCallback(()=>{const s=i.current;if(!s)return[];const u=s.getSelectedNodes(),l=s.getSelectedRelationships(),c=new Set;if(u.length||l.length)return u.forEach(h=>c.add(h.id)),l.forEach(h=>c.add(h.from).add(h.to)),[...c];const f=s.getNodes(),d=s.getRelationships();return f.forEach(h=>h.disabled!==!0&&c.add(h.id)),d.forEach(h=>h.disabled!==!0&&c.add(h.from).add(h.to)),c.size>0?[...c]:f.map(h=>h.id)},[i]),o=me.useCallback(()=>{var s;(s=i.current)===null||s===void 0||s.fit(a())},[a,i]);return Ce.jsx(a0,{onClick:o,description:"Zoom to fit",className:r,style:e,htmlAttributes:t,tooltipPlacement:n??"left",children:Ce.jsx(EV,{})})},BG=({className:r,htmlAttributes:e,style:t,tooltipPlacement:n})=>{const{sidepanel:i}=Vl();if(!i)throw new Error("Using the ToggleSidePanelButton requires having a sidepanel");const{isSidePanelOpen:a,setIsSidePanelOpen:o}=i;return Ce.jsx(T2,{size:"small",onClick:()=>o==null?void 0:o(!a),isFloating:!0,description:a?"Close":"Open",isActive:a,tooltipProps:{content:{style:{whiteSpace:"nowrap"}},root:{isPortaled:!1,placement:n??"bottom",shouldCloseOnReferenceClick:!0}},className:Vn("ndl-graph-visualization-toggle-sidepanel",r),style:t,htmlAttributes:Object.assign({"aria-label":"Toggle node properties panel"},e),children:Ce.jsx(AV,{className:"ndl-graph-visualization-toggle-icon"})})},ole=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,open:i,setOpen:a,searchTerm:o,setSearchTerm:s,onSearch:u=()=>{}})=>{const l=me.useRef(null),[c,f]=Lg({isControlled:i!==void 0,onChange:a,state:i??!1}),[d,h]=Lg({isControlled:o!==void 0,onChange:s,state:o??""}),{nvlGraph:p}=Vl(),g=y=>{if(h(y),y===""){u(void 0,void 0);return}const b=Object.values(p.dataLookupTable.nodes),_=Object.values(p.dataLookupTable.relationships);u(Jue(b,y),ele(_,y))};return Ce.jsx(Ce.Fragment,{children:c?Ce.jsx(QY,{ref:l,size:"small",leadingElement:Ce.jsx(fk,{}),trailingElement:Ce.jsx(S2,{onClick:()=>{var y;g(""),(y=l.current)===null||y===void 0||y.focus()},description:"Clear search",children:Ce.jsx(Y9,{})}),placeholder:"Search...",value:d,onChange:y=>g(y.target.value),htmlAttributes:{autoFocus:!0,onBlur:()=>{d===""&&f(!1)}}}):Ce.jsx(T2,{size:"small",isFloating:!0,onClick:()=>f(y=>!y),description:"Search",className:r,style:e,htmlAttributes:t,tooltipProps:{root:{placement:n??"bottom"}},children:Ce.jsx(fk,{})})})},FG=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n})=>{const{nvlInstance:i}=Vl(),[a,o]=me.useState(!1),s=()=>o(!1),u=me.useRef(null);return Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(T2,{ref:u,size:"small",isFloating:!0,onClick:()=>o(l=>!l),description:"Download",tooltipProps:{root:{placement:n??"bottom"}},className:r,style:e,htmlAttributes:t,children:Ce.jsx(kV,{})}),Ce.jsx(Lm,{isOpen:a,onClose:s,anchorRef:u,children:Ce.jsx(Lm.Item,{title:"Download as PNG",onClick:()=>{var l;(l=i.current)===null||l===void 0||l.saveToFile({}),s()}})})]})},sle={d3Force:{icon:Ce.jsx(wV,{}),title:"Force-based layout"},hierarchical:{icon:Ce.jsx(OV,{}),title:"Hierarchical layout"}},ule=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,menuPlacement:i,layoutOptions:a=sle})=>{var o,s;const u=me.useRef(null),[l,c]=me.useState(!1),{layout:f,setLayout:d}=Vl();return Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(V7,{description:"Select layout",isOpen:l,onClick:()=>c(h=>!h),ref:u,className:r,style:e,htmlAttributes:t,size:"small",tooltipProps:{root:{placement:n??"bottom"}},children:(s=(o=a[f])===null||o===void 0?void 0:o.icon)!==null&&s!==void 0?s:Ce.jsx(l2,{})}),Ce.jsx(Lm,{isOpen:l,anchorRef:u,onClose:()=>c(!1),placement:i,children:Object.entries(a).map(([h,p])=>Ce.jsx(Lm.RadioItem,{title:p.title,leadingVisual:p.icon,isChecked:h===f,onClick:()=>d==null?void 0:d(h)},h))})]})},lle={single:{icon:Ce.jsx(l2,{}),title:"Individual"},box:{icon:Ce.jsx(V9,{}),title:"Box"},lasso:{icon:Ce.jsx(G9,{}),title:"Lasso"}},cle=({className:r,style:e,htmlAttributes:t,tooltipPlacement:n,menuPlacement:i,gestureOptions:a=lle})=>{var o,s;const u=me.useRef(null),[l,c]=me.useState(!1),{gesture:f,setGesture:d}=Vl();return vE(Object.keys(a)),Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(V7,{description:"Select gesture",isOpen:l,onClick:()=>c(h=>!h),ref:u,className:r,style:e,htmlAttributes:t,size:"small",tooltipProps:{root:{placement:n??"bottom"}},children:(s=(o=a[f])===null||o===void 0?void 0:o.icon)!==null&&s!==void 0?s:Ce.jsx(l2,{})}),Ce.jsx(Lm,{isOpen:l,anchorRef:u,onClose:()=>c(!1),placement:i,children:Object.entries(a).map(([h,p])=>Ce.jsx(Lm.RadioItem,{title:p.title,leadingVisual:p.icon,trailingContent:Ce.jsx(JX,{keys:[a_[h]]}),isChecked:h===f,onClick:()=>d==null?void 0:d(h)},h))})]})},ty=({sidepanel:r})=>{const{children:e,isSidePanelOpen:t,sidePanelWidth:n,onSidePanelResize:i,minWidth:a=230}=r;return t?Ce.jsx(GX,{defaultSize:{height:"100%",width:n??400},className:"ndl-graph-resizable",minWidth:a,maxWidth:"66%",enable:{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!1,top:!1,topLeft:!1,topRight:!1},handleClasses:{left:"ndl-sidepanel-handle"},onResizeStop:(o,s,u)=>{i(u.getBoundingClientRect().width)},children:Ce.jsx("div",{className:"ndl-graph-visualization-sidepanel-content",tabIndex:0,children:e})}):null},fle=({children:r})=>Ce.jsx("div",{className:"ndl-graph-visualization-sidepanel-title ndl-grid-area-title",children:r});ty.Title=fle;const dle=({children:r})=>Ce.jsx("section",{className:"ndl-grid-area-content",children:r});ty.Content=dle;var hx={exports:{}};/** * chroma.js - JavaScript library for color conversions * * Copyright (c) 2011-2019, Gregor Aisch @@ -1549,8 +1549,8 @@ * http://www.w3.org/TR/css3-color/#svg-color * * @preserve - */var hle=hx.exports,N9;function vle(){return N9||(N9=1,(function(r,e){(function(t,n){r.exports=n()})(hle,(function(){for(var t=function(K,oe,ye){return oe===void 0&&(oe=0),ye===void 0&&(ye=1),Kye?ye:K},n=t,i=function(K){K._clipped=!1,K._unclipped=K.slice(0);for(var oe=0;oe<=3;oe++)oe<3?((K[oe]<0||K[oe]>255)&&(K._clipped=!0),K[oe]=n(K[oe],0,255)):oe===3&&(K[oe]=n(K[oe],0,1));return K},a={},o=0,s=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(K):c(K[0])=="object"&&oe?oe.split("").filter(function(ye){return K[0][ye]!==void 0}).map(function(ye){return K[0][ye]}):K[0]},d=l,h=function(K){if(K.length<2)return null;var oe=K.length-1;return d(K[oe])=="string"?K[oe].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:t,type:l,unpack:f,last:h,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,_=g.clip_rgb,m=g.type,x=y,S=function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];var Pe=this;if(m(oe[0])==="object"&&oe[0].constructor&&oe[0].constructor===this.constructor)return oe[0];var ze=b(oe),Ge=!1;if(!ze){Ge=!0,x.sorted||(x.autodetect=x.autodetect.sort(function(dt,qt){return qt.p-dt.p}),x.sorted=!0);for(var Be=0,Ke=x.autodetect;Be4?K[4]:1;return Ge===1?[0,0,0,Be]:[ye>=1?0:255*(1-ye)*(1-Ge),Pe>=1?0:255*(1-Pe)*(1-Ge),ze>=1?0:255*(1-ze)*(1-Ge),Be]},z=j,H=T,q=O,W=y,$=g.unpack,J=g.type,X=L;q.prototype.cmyk=function(){return X(this._rgb)},H.cmyk=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(q,[null].concat(K,["cmyk"])))},W.format.cmyk=z,W.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=$(K,"cmyk"),J(K)==="array"&&K.length===4)return"cmyk"}});var Z=g.unpack,ue=g.last,re=function(K){return Math.round(K*100)/100},ne=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Z(K,"hsla"),Pe=ue(K)||"lsa";return ye[0]=re(ye[0]||0),ye[1]=re(ye[1]*100)+"%",ye[2]=re(ye[2]*100)+"%",Pe==="hsla"||ye.length>3&&ye[3]<1?(ye[3]=ye.length>3?ye[3]:1,Pe="hsla"):ye.length=3,Pe+"("+ye.join(",")+")"},le=ne,ce=g.unpack,pe=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ce(K,"rgba");var ye=K[0],Pe=K[1],ze=K[2];ye/=255,Pe/=255,ze/=255;var Ge=Math.min(ye,Pe,ze),Be=Math.max(ye,Pe,ze),Ke=(Be+Ge)/2,Je,gt;return Be===Ge?(Je=0,gt=Number.NaN):Je=Ke<.5?(Be-Ge)/(Be+Ge):(Be-Ge)/(2-Be-Ge),ye==Be?gt=(Pe-ze)/(Be-Ge):Pe==Be?gt=2+(ze-ye)/(Be-Ge):ze==Be&&(gt=4+(ye-Pe)/(Be-Ge)),gt*=60,gt<0&&(gt+=360),K.length>3&&K[3]!==void 0?[gt,Je,Ke,K[3]]:[gt,Je,Ke]},fe=pe,se=g.unpack,de=g.last,ge=le,Oe=fe,ke=Math.round,De=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=se(K,"rgba"),Pe=de(K)||"rgb";return Pe.substr(0,3)=="hsl"?ge(Oe(ye),Pe):(ye[0]=ke(ye[0]),ye[1]=ke(ye[1]),ye[2]=ke(ye[2]),(Pe==="rgba"||ye.length>3&&ye[3]<1)&&(ye[3]=ye.length>3?ye[3]:1,Pe="rgba"),Pe+"("+ye.slice(0,Pe==="rgb"?3:4).join(",")+")")},Ne=De,Ce=g.unpack,Y=Math.round,Q=function(){for(var K,oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];oe=Ce(oe,"hsl");var Pe=oe[0],ze=oe[1],Ge=oe[2],Be,Ke,Je;if(ze===0)Be=Ke=Je=Ge*255;else{var gt=[0,0,0],dt=[0,0,0],qt=Ge<.5?Ge*(1+ze):Ge+ze-Ge*ze,Ct=2*Ge-qt,Jt=Pe/360;gt[0]=Jt+1/3,gt[1]=Jt,gt[2]=Jt-1/3;for(var Zt=0;Zt<3;Zt++)gt[Zt]<0&&(gt[Zt]+=1),gt[Zt]>1&&(gt[Zt]-=1),6*gt[Zt]<1?dt[Zt]=Ct+(qt-Ct)*6*gt[Zt]:2*gt[Zt]<1?dt[Zt]=qt:3*gt[Zt]<2?dt[Zt]=Ct+(qt-Ct)*(2/3-gt[Zt])*6:dt[Zt]=Ct;K=[Y(dt[0]*255),Y(dt[1]*255),Y(dt[2]*255)],Be=K[0],Ke=K[1],Je=K[2]}return oe.length>3?[Be,Ke,Je,oe[3]]:[Be,Ke,Je,1]},ie=Q,we=ie,Ee=y,Me=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ie=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ot=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,mt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,wt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Mt=Math.round,Dt=function(K){K=K.toLowerCase().trim();var oe;if(Ee.format.named)try{return Ee.format.named(K)}catch{}if(oe=K.match(Me)){for(var ye=oe.slice(1,4),Pe=0;Pe<3;Pe++)ye[Pe]=+ye[Pe];return ye[3]=1,ye}if(oe=K.match(Ie)){for(var ze=oe.slice(1,5),Ge=0;Ge<4;Ge++)ze[Ge]=+ze[Ge];return ze}if(oe=K.match(Ye)){for(var Be=oe.slice(1,4),Ke=0;Ke<3;Ke++)Be[Ke]=Mt(Be[Ke]*2.55);return Be[3]=1,Be}if(oe=K.match(ot)){for(var Je=oe.slice(1,5),gt=0;gt<3;gt++)Je[gt]=Mt(Je[gt]*2.55);return Je[3]=+Je[3],Je}if(oe=K.match(mt)){var dt=oe.slice(1,4);dt[1]*=.01,dt[2]*=.01;var qt=we(dt);return qt[3]=1,qt}if(oe=K.match(wt)){var Ct=oe.slice(1,4);Ct[1]*=.01,Ct[2]*=.01;var Jt=we(Ct);return Jt[3]=+oe[4],Jt}};Dt.test=function(K){return Me.test(K)||Ie.test(K)||Ye.test(K)||ot.test(K)||mt.test(K)||wt.test(K)};var vt=Dt,tt=T,_e=O,Ue=y,Qe=g.type,Ze=Ne,nt=vt;_e.prototype.css=function(K){return Ze(this._rgb,K)},tt.css=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_e,[null].concat(K,["css"])))},Ue.format.css=nt,Ue.autodetect.push({p:5,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Qe(K)==="string"&&nt.test(K))return"css"}});var It=O,ct=T,Lt=y,Rt=g.unpack;Lt.format.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Rt(K,"rgba");return ye[0]*=255,ye[1]*=255,ye[2]*=255,ye},ct.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(It,[null].concat(K,["gl"])))},It.prototype.gl=function(){var K=this._rgb;return[K[0]/255,K[1]/255,K[2]/255,K[3]]};var jt=g.unpack,Yt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Math.min(Pe,ze,Ge),Ke=Math.max(Pe,ze,Ge),Je=Ke-Be,gt=Je*100/255,dt=Be/(255-Je)*100,qt;return Je===0?qt=Number.NaN:(Pe===Ke&&(qt=(ze-Ge)/Je),ze===Ke&&(qt=2+(Ge-Pe)/Je),Ge===Ke&&(qt=4+(Pe-ze)/Je),qt*=60,qt<0&&(qt+=360)),[qt,gt,dt]},sr=Yt,Ut=g.unpack,Rr=Math.floor,Xt=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=Ut(Be,"hcg");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;dt=dt*255;var Zt=gt*255;if(gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var en=Rr(Je),Or=Je-en,$r=dt*(1-gt),vn=$r+Zt*(1-Or),ua=$r+Zt*Or,Bi=$r+Zt;switch(en){case 0:K=[Bi,ua,$r],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[vn,Bi,$r],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[$r,Bi,ua],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[$r,vn,Bi],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[ua,$r,Bi],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[Bi,$r,vn],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},Vr=Xt,Br=g.unpack,mr=g.type,ur=T,sn=O,Fr=y,un=sr;sn.prototype.hcg=function(){return un(this._rgb)},ur.hcg=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(sn,[null].concat(K,["hcg"])))},Fr.format.hcg=Vr,Fr.autodetect.push({p:1,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Br(K,"hcg"),mr(K)==="array"&&K.length===3)return"hcg"}});var bn=g.unpack,wn=g.last,_n=Math.round,xn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=bn(K,"rgba"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=ye[3],Ke=wn(K)||"auto";Be===void 0&&(Be=1),Ke==="auto"&&(Ke=Be<1?"rgba":"rgb"),Pe=_n(Pe),ze=_n(ze),Ge=_n(Ge);var Je=Pe<<16|ze<<8|Ge,gt="000000"+Je.toString(16);gt=gt.substr(gt.length-6);var dt="0"+_n(Be*255).toString(16);switch(dt=dt.substr(dt.length-2),Ke.toLowerCase()){case"rgba":return"#"+gt+dt;case"argb":return"#"+dt+gt;default:return"#"+gt}},on=xn,Nn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,fi=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,gn=function(K){if(K.match(Nn)){(K.length===4||K.length===7)&&(K=K.substr(1)),K.length===3&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]);var oe=parseInt(K,16),ye=oe>>16,Pe=oe>>8&255,ze=oe&255;return[ye,Pe,ze,1]}if(K.match(fi)){(K.length===5||K.length===9)&&(K=K.substr(1)),K.length===4&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]+K[3]+K[3]);var Ge=parseInt(K,16),Be=Ge>>24&255,Ke=Ge>>16&255,Je=Ge>>8&255,gt=Math.round((Ge&255)/255*100)/100;return[Be,Ke,Je,gt]}throw new Error("unknown hex color: "+K)},yn=gn,Jn=T,_i=O,Ir=g.type,pa=y,di=on;_i.prototype.hex=function(K){return di(this._rgb,K)},Jn.hex=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_i,[null].concat(K,["hex"])))},pa.format.hex=yn,pa.autodetect.push({p:4,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Ir(K)==="string"&&[3,4,5,6,7,8,9].indexOf(K.length)>=0)return"hex"}});var Bt=g.unpack,hr=g.TWOPI,ei=Math.min,Hn=Math.sqrt,fs=Math.acos,Na=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Bt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];Pe/=255,ze/=255,Ge/=255;var Be,Ke=ei(Pe,ze,Ge),Je=(Pe+ze+Ge)/3,gt=Je>0?1-Ke/Je:0;return gt===0?Be=NaN:(Be=(Pe-ze+(Pe-Ge))/2,Be/=Hn((Pe-ze)*(Pe-ze)+(Pe-Ge)*(ze-Ge)),Be=fs(Be),Ge>ze&&(Be=hr-Be),Be/=hr),[Be*360,gt,Je]},ki=Na,Wr=g.unpack,Nr=g.limit,na=g.TWOPI,Fs=g.PITHIRD,hu=Math.cos,ga=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wr(K,"hsi");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke;return isNaN(ye)&&(ye=0),isNaN(Pe)&&(Pe=0),ye>360&&(ye-=360),ye<0&&(ye+=360),ye/=360,ye<1/3?(Ke=(1-Pe)/3,Ge=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Be=1-(Ke+Ge)):ye<2/3?(ye-=1/3,Ge=(1-Pe)/3,Be=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ke=1-(Ge+Be)):(ye-=2/3,Be=(1-Pe)/3,Ke=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ge=1-(Be+Ke)),Ge=Nr(ze*Ge*3),Be=Nr(ze*Be*3),Ke=Nr(ze*Ke*3),[Ge*255,Be*255,Ke*255,K.length>3?K[3]:1]},Us=ga,Ln=g.unpack,Ii=g.type,Ni=T,Pc=O,vu=y,ia=ki;Pc.prototype.hsi=function(){return ia(this._rgb)},Ni.hsi=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Pc,[null].concat(K,["hsi"])))},vu.format.hsi=Us,vu.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Ln(K,"hsi"),Ii(K)==="array"&&K.length===3)return"hsi"}});var Hl=g.unpack,Md=g.type,Xa=T,Wl=O,Yl=y,nf=fe;Wl.prototype.hsl=function(){return nf(this._rgb)},Xa.hsl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wl,[null].concat(K,["hsl"])))},Yl.format.hsl=ie,Yl.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Hl(K,"hsl"),Md(K)==="array"&&K.length===3)return"hsl"}});var Wi=g.unpack,af=Math.min,La=Math.max,qo=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wi(K,"rgb");var ye=K[0],Pe=K[1],ze=K[2],Ge=af(ye,Pe,ze),Be=La(ye,Pe,ze),Ke=Be-Ge,Je,gt,dt;return dt=Be/255,Be===0?(Je=Number.NaN,gt=0):(gt=Ke/Be,ye===Be&&(Je=(Pe-ze)/Ke),Pe===Be&&(Je=2+(ze-ye)/Ke),ze===Be&&(Je=4+(ye-Pe)/Ke),Je*=60,Je<0&&(Je+=360)),[Je,gt,dt]},Gf=qo,ds=g.unpack,Mc=Math.floor,Xl=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=ds(Be,"hsv");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;if(dt*=255,gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var Zt=Mc(Je),en=Je-Zt,Or=dt*(1-gt),$r=dt*(1-gt*en),vn=dt*(1-gt*(1-en));switch(Zt){case 0:K=[dt,vn,Or],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[$r,dt,Or],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[Or,dt,vn],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[Or,$r,dt],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[vn,Or,dt],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[dt,Or,$r],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},ti=Xl,zs=g.unpack,Qu=g.type,qs=T,$l=O,of=y,pu=Gf;$l.prototype.hsv=function(){return pu(this._rgb)},qs.hsv=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply($l,[null].concat(K,["hsv"])))},of.format.hsv=ti,of.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=zs(K,"hsv"),Qu(K)==="array"&&K.length===3)return"hsv"}});var _o={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},wo=_o,Vf=g.unpack,sf=Math.pow,gu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vf(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Kl(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2],dt=116*Je-16;return[dt<0?0:dt,500*(Ke-Je),200*(Je-gt)]},so=function(K){return(K/=255)<=.04045?K/12.92:sf((K+.055)/1.055,2.4)},Ju=function(K){return K>wo.t3?sf(K,1/3):K/wo.t2+wo.t0},Kl=function(K,oe,ye){K=so(K),oe=so(oe),ye=so(ye);var Pe=Ju((.4124564*K+.3575761*oe+.1804375*ye)/wo.Xn),ze=Ju((.2126729*K+.7151522*oe+.072175*ye)/wo.Yn),Ge=Ju((.0193339*K+.119192*oe+.9503041*ye)/wo.Zn);return[Pe,ze,Ge]},Go=gu,hs=_o,jn=g.unpack,Zr=Math.pow,Zl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=jn(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke,Je,gt,dt;return Be=(ye+16)/116,Ge=isNaN(Pe)?Be:Be+Pe/500,Ke=isNaN(ze)?Be:Be-ze/200,Be=hs.Yn*Dc(Be),Ge=hs.Xn*Dc(Ge),Ke=hs.Zn*Dc(Ke),Je=vs(3.2404542*Ge-1.5371385*Be-.4985314*Ke),gt=vs(-.969266*Ge+1.8760108*Be+.041556*Ke),dt=vs(.0556434*Ge-.2040259*Be+1.0572252*Ke),[Je,gt,dt,K.length>3?K[3]:1]},vs=function(K){return 255*(K<=.00304?12.92*K:1.055*Zr(K,1/2.4)-.055)},Dc=function(K){return K>hs.t1?K*K*K:hs.t2*(K-hs.t0)},Oa=Zl,el=g.unpack,uf=g.type,Ql=T,tl=O,wi=y,Jl=Go;tl.prototype.lab=function(){return Jl(this._rgb)},Ql.lab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(tl,[null].concat(K,["lab"])))},wi.format.lab=Oa,wi.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=el(K,"lab"),uf(K)==="array"&&K.length===3)return"lab"}});var aa=g.unpack,yu=g.RAD2DEG,lf=Math.sqrt,ya=Math.atan2,ma=Math.round,mu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=aa(K,"lab"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=lf(ze*ze+Ge*Ge),Ke=(ya(Ge,ze)*yu+360)%360;return ma(Be*1e4)===0&&(Ke=Number.NaN),[Pe,Be,Ke]},uo=mu,Vo=g.unpack,st=Go,xt=uo,pt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vo(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=st(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xt(Ke,Je,gt)},Wt=pt,ir=g.unpack,En=g.DEG2RAD,oa=Math.sin,ja=Math.cos,Kn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ir(K,"lch"),Pe=ye[0],ze=ye[1],Ge=ye[2];return isNaN(Ge)&&(Ge=0),Ge=Ge*En,[Pe,ja(Ge)*ze,oa(Ge)*ze]},ec=Kn,xi=g.unpack,ba=ec,cf=Oa,Ev=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=xi(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=ba(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=cf(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},rl=Ev,Dd=g.unpack,kd=rl,Fn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Dd(K,"hcl").reverse();return kd.apply(void 0,ye)},Sv=Fn,Hf=g.unpack,nl=g.type,Ov=T,Wf=O,ff=y,Gs=Wt;Wf.prototype.lch=function(){return Gs(this._rgb)},Wf.prototype.hcl=function(){return Gs(this._rgb).reverse()},Ov.lch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["lch"])))},Ov.hcl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["hcl"])))},ff.format.lch=rl,ff.format.hcl=Sv,["lch","hcl"].forEach(function(K){return ff.autodetect.push({p:2,test:function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];if(oe=Hf(oe,K),nl(oe)==="array"&&oe.length===3)return K}})});var bu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},kc=bu,Ah=O,tc=y,Yf=g.type,Ic=kc,_u=yn,xo=on;Ah.prototype.name=function(){for(var K=xo(this._rgb,"rgb"),oe=0,ye=Object.keys(Ic);oe0;)oe[ye]=arguments[ye+1];if(!oe.length&&Yf(K)==="string"&&Ic[K.toLowerCase()])return"named"}});var Nc=g.unpack,Vs=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Nc(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];return(Pe<<16)+(ze<<8)+Ge},df=Vs,Rh=g.type,Xf=function(K){if(Rh(K)=="number"&&K>=0&&K<=16777215){var oe=K>>16,ye=K>>8&255,Pe=K&255;return[oe,ye,Pe,1]}throw new Error("unknown num color: "+K)},$f=Xf,Id=T,rc=O,Kf=y,Lc=g.type,Nd=df;rc.prototype.num=function(){return Nd(this._rgb)},Id.num=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(rc,[null].concat(K,["num"])))},Kf.format.num=$f,Kf.autodetect.push({p:5,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K.length===1&&Lc(K[0])==="number"&&K[0]>=0&&K[0]<=16777215)return"num"}});var Ph=T,hf=O,Li=y,hi=g.unpack,Zf=g.type,Tv=Math.round;hf.prototype.rgb=function(K){return K===void 0&&(K=!0),K===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Tv)},hf.prototype.rgba=function(K){return K===void 0&&(K=!0),this._rgb.slice(0,4).map(function(oe,ye){return ye<3?K===!1?oe:Tv(oe):oe})},Ph.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(hf,[null].concat(K,["rgb"])))},Li.format.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=hi(K,"rgba");return ye[3]===void 0&&(ye[3]=1),ye},Li.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=hi(K,"rgba"),Zf(K)==="array"&&(K.length===3||K.length===4&&Zf(K[3])=="number"&&K[3]>=0&&K[3]<=1))return"rgb"}});var Qf=Math.log,Yp=function(K){var oe=K/100,ye,Pe,ze;return oe<66?(ye=255,Pe=oe<6?0:-155.25485562709179-.44596950469579133*(Pe=oe-2)+104.49216199393888*Qf(Pe),ze=oe<20?0:-254.76935184120902+.8274096064007395*(ze=oe-10)+115.67994401066147*Qf(ze)):(ye=351.97690566805693+.114206453784165*(ye=oe-55)-40.25366309332127*Qf(ye),Pe=325.4494125711974+.07943456536662342*(Pe=oe-50)-28.0852963507957*Qf(Pe),ze=255),[ye,Pe,ze,1]},il=Yp,ri=il,nc=g.unpack,jc=Math.round,vf=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];for(var ye=nc(K,"rgb"),Pe=ye[0],ze=ye[2],Ge=1e3,Be=4e4,Ke=.4,Je;Be-Ge>Ke;){Je=(Be+Ge)*.5;var gt=ri(Je);gt[2]/gt[0]>=ze/Pe?Be=Je:Ge=Je}return jc(Je)},pf=vf,Bc=T,Hs=O,ic=y,We=pf;Hs.prototype.temp=Hs.prototype.kelvin=Hs.prototype.temperature=function(){return We(this._rgb)},Bc.temp=Bc.kelvin=Bc.temperature=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Hs,[null].concat(K,["temp"])))},ic.format.temp=ic.format.kelvin=ic.format.temperature=il;var ft=g.unpack,ut=Math.cbrt,Kt=Math.pow,Pr=Math.sign,Qr=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ft(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=[be(Pe/255),be(ze/255),be(Ge/255)],Ke=Be[0],Je=Be[1],gt=Be[2],dt=ut(.4122214708*Ke+.5363325363*Je+.0514459929*gt),qt=ut(.2119034982*Ke+.6806995451*Je+.1073969566*gt),Ct=ut(.0883024619*Ke+.2817188376*Je+.6299787005*gt);return[.2104542553*dt+.793617785*qt-.0040720468*Ct,1.9779984951*dt-2.428592205*qt+.4505937099*Ct,.0259040371*dt+.7827717662*qt-.808675766*Ct]},oi=Qr;function be(K){var oe=Math.abs(K);return oe<.04045?K/12.92:(Pr(K)||1)*Kt((oe+.055)/1.055,2.4)}var al=g.unpack,Ho=Math.pow,Ei=Math.sign,nn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=al(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge=Ho(ye+.3963377774*Pe+.2158037573*ze,3),Be=Ho(ye-.1055613458*Pe-.0638541728*ze,3),Ke=Ho(ye-.0894841775*Pe-1.291485548*ze,3);return[255*$a(4.0767416621*Ge-3.3077115913*Be+.2309699292*Ke),255*$a(-1.2684380046*Ge+2.6097574011*Be-.3413193965*Ke),255*$a(-.0041960863*Ge-.7034186147*Be+1.707614701*Ke),K.length>3?K[3]:1]},ol=nn;function $a(K){var oe=Math.abs(K);return oe>.0031308?(Ei(K)||1)*(1.055*Ho(oe,1/2.4)-.055):K*12.92}var ps=g.unpack,wu=g.type,Jr=T,Ld=O,gf=y,Eo=oi;Ld.prototype.oklab=function(){return Eo(this._rgb)},Jr.oklab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ld,[null].concat(K,["oklab"])))},gf.format.oklab=ol,gf.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=ps(K,"oklab"),wu(K)==="array"&&K.length===3)return"oklab"}});var jd=g.unpack,So=oi,xu=uo,sl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jd(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=So(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xu(Ke,Je,gt)},Ws=sl,ac=g.unpack,gs=ec,ys=ol,ul=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ac(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=gs(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=ys(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},Ka=ul,Eu=g.unpack,Mh=g.type,Yi=T,Ba=O,Oo=y,Cv=Ws;Ba.prototype.oklch=function(){return Cv(this._rgb)},Yi.oklch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ba,[null].concat(K,["oklch"])))},Oo.format.oklch=Ka,Oo.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Eu(K,"oklch"),Mh(K)==="array"&&K.length===3)return"oklch"}});var oc=O,sc=g.type;oc.prototype.alpha=function(K,oe){return oe===void 0&&(oe=!1),K!==void 0&&sc(K)==="number"?oe?(this._rgb[3]=K,this):new oc([this._rgb[0],this._rgb[1],this._rgb[2],K],"rgb"):this._rgb[3]};var ji=O;ji.prototype.clipped=function(){return this._rgb._clipped||!1};var Wo=O,yf=_o;Wo.prototype.darken=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lab();return ye[0]-=yf.Kn*K,new Wo(ye,"lab").alpha(oe.alpha(),!0)},Wo.prototype.brighten=function(K){return K===void 0&&(K=1),this.darken(-K)},Wo.prototype.darker=Wo.prototype.darken,Wo.prototype.brighter=Wo.prototype.brighten;var Ys=O;Ys.prototype.get=function(K){var oe=K.split("."),ye=oe[0],Pe=oe[1],ze=this[ye]();if(Pe){var Ge=ye.indexOf(Pe)-(ye.substr(0,2)==="ok"?2:0);if(Ge>-1)return ze[Ge];throw new Error("unknown channel "+Pe+" in mode "+ye)}else return ze};var sa=O,ll=g.type,ms=Math.pow,Ri=1e-7,Sn=20;sa.prototype.luminance=function(K){if(K!==void 0&&ll(K)==="number"){if(K===0)return new sa([0,0,0,this._rgb[3]],"rgb");if(K===1)return new sa([255,255,255,this._rgb[3]],"rgb");var oe=this.luminance(),ye="rgb",Pe=Sn,ze=function(Be,Ke){var Je=Be.interpolate(Ke,.5,ye),gt=Je.luminance();return Math.abs(K-gt)K?ze(Be,Je):ze(Je,Ke)},Ge=(oe>K?ze(new sa([0,0,0]),this):ze(this,new sa([255,255,255]))).rgb();return new sa(Ge.concat([this._rgb[3]]))}return To.apply(void 0,this._rgb.slice(0,3))};var To=function(K,oe,ye){return K=Co(K),oe=Co(oe),ye=Co(ye),.2126*K+.7152*oe+.0722*ye},Co=function(K){return K/=255,K<=.03928?K/12.92:ms((K+.055)/1.055,2.4)},Xi={},Yo=O,Fa=g.type,Ua=Xi,cl=function(K,oe,ye){ye===void 0&&(ye=.5);for(var Pe=[],ze=arguments.length-3;ze-- >0;)Pe[ze]=arguments[ze+3];var Ge=Pe[0]||"lrgb";if(!Ua[Ge]&&!Pe.length&&(Ge=Object.keys(Ua)[0]),!Ua[Ge])throw new Error("interpolation mode "+Ge+" is not defined");return Fa(K)!=="object"&&(K=new Yo(K)),Fa(oe)!=="object"&&(oe=new Yo(oe)),Ua[Ge](K,oe,ye).alpha(K.alpha()+ye*(oe.alpha()-K.alpha()))},Xs=O,uc=cl;Xs.prototype.mix=Xs.prototype.interpolate=function(K,oe){oe===void 0&&(oe=.5);for(var ye=[],Pe=arguments.length-2;Pe-- >0;)ye[Pe]=arguments[Pe+2];return uc.apply(void 0,[this,K,oe].concat(ye))};var lc=O;lc.prototype.premultiply=function(K){K===void 0&&(K=!1);var oe=this._rgb,ye=oe[3];return K?(this._rgb=[oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],this):new lc([oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],"rgb")};var Si=O,Rn=_o;Si.prototype.saturate=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lch();return ye[1]+=Rn.Kn*K,ye[1]<0&&(ye[1]=0),new Si(ye,"lch").alpha(oe.alpha(),!0)},Si.prototype.desaturate=function(K){return K===void 0&&(K=1),this.saturate(-K)};var hn=O,Su=g.type;hn.prototype.set=function(K,oe,ye){ye===void 0&&(ye=!1);var Pe=K.split("."),ze=Pe[0],Ge=Pe[1],Be=this[ze]();if(Ge){var Ke=ze.indexOf(Ge)-(ze.substr(0,2)==="ok"?2:0);if(Ke>-1){if(Su(oe)=="string")switch(oe.charAt(0)){case"+":Be[Ke]+=+oe;break;case"-":Be[Ke]+=+oe;break;case"*":Be[Ke]*=+oe.substr(1);break;case"/":Be[Ke]/=+oe.substr(1);break;default:Be[Ke]=+oe}else if(Su(oe)==="number")Be[Ke]=oe;else throw new Error("unsupported value for Color.set");var Je=new hn(Be,ze);return ye?(this._rgb=Je._rgb,this):Je}throw new Error("unknown channel "+Ge+" in mode "+ze)}else return Be};var Xo=O,mf=function(K,oe,ye){var Pe=K._rgb,ze=oe._rgb;return new Xo(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"rgb")};Xi.rgb=mf;var fl=O,cc=Math.sqrt,bs=Math.pow,dl=function(K,oe,ye){var Pe=K._rgb,ze=Pe[0],Ge=Pe[1],Be=Pe[2],Ke=oe._rgb,Je=Ke[0],gt=Ke[1],dt=Ke[2];return new fl(cc(bs(ze,2)*(1-ye)+bs(Je,2)*ye),cc(bs(Ge,2)*(1-ye)+bs(gt,2)*ye),cc(bs(Be,2)*(1-ye)+bs(dt,2)*ye),"rgb")};Xi.lrgb=dl;var xe=O,Ou=function(K,oe,ye){var Pe=K.lab(),ze=oe.lab();return new xe(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"lab")};Xi.lab=Ou;var $s=O,ar=function(K,oe,ye,Pe){var ze,Ge,Be,Ke;Pe==="hsl"?(Be=K.hsl(),Ke=oe.hsl()):Pe==="hsv"?(Be=K.hsv(),Ke=oe.hsv()):Pe==="hcg"?(Be=K.hcg(),Ke=oe.hcg()):Pe==="hsi"?(Be=K.hsi(),Ke=oe.hsi()):Pe==="lch"||Pe==="hcl"?(Pe="hcl",Be=K.hcl(),Ke=oe.hcl()):Pe==="oklch"&&(Be=K.oklch().reverse(),Ke=oe.oklch().reverse());var Je,gt,dt,qt,Ct,Jt;(Pe.substr(0,1)==="h"||Pe==="oklch")&&(ze=Be,Je=ze[0],dt=ze[1],Ct=ze[2],Ge=Ke,gt=Ge[0],qt=Ge[1],Jt=Ge[2]);var Zt,en,Or,$r;return!isNaN(Je)&&!isNaN(gt)?(gt>Je&>-Je>180?$r=gt-(Je+360):gt180?$r=gt+360-Je:$r=gt-Je,en=Je+ye*$r):isNaN(Je)?isNaN(gt)?en=Number.NaN:(en=gt,(Ct==1||Ct==0)&&Pe!="hsv"&&(Zt=qt)):(en=Je,(Jt==1||Jt==0)&&Pe!="hsv"&&(Zt=dt)),Zt===void 0&&(Zt=dt+ye*(qt-dt)),Or=Ct+ye*(Jt-Ct),Pe==="oklch"?new $s([Or,Zt,en],Pe):new $s([en,Zt,Or],Pe)},Yr=ar,Tu=function(K,oe,ye){return Yr(K,oe,ye,"lch")};Xi.lch=Tu,Xi.hcl=Tu;var _s=O,Cu=function(K,oe,ye){var Pe=K.num(),ze=oe.num();return new _s(Pe+ye*(ze-Pe),"num")};Xi.num=Cu;var hl=ar,Dh=function(K,oe,ye){return hl(K,oe,ye,"hcg")};Xi.hcg=Dh;var za=ar,Bd=function(K,oe,ye){return za(K,oe,ye,"hsi")};Xi.hsi=Bd;var Au=ar,_a=function(K,oe,ye){return Au(K,oe,ye,"hsl")};Xi.hsl=_a;var $o=ar,kh=function(K,oe,ye){return $o(K,oe,ye,"hsv")};Xi.hsv=kh;var Ko=O,fc=function(K,oe,ye){var Pe=K.oklab(),ze=oe.oklab();return new Ko(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"oklab")};Xi.oklab=fc;var Ih=ar,$i=function(K,oe,ye){return Ih(K,oe,ye,"oklch")};Xi.oklch=$i;var Za=O,bf=g.clip_rgb,vl=Math.pow,_f=Math.sqrt,Ru=Math.PI,pl=Math.cos,lo=Math.sin,Av=Math.atan2,dc=function(K,oe,ye){oe===void 0&&(oe="lrgb"),ye===void 0&&(ye=null);var Pe=K.length;ye||(ye=Array.from(new Array(Pe)).map(function(){return 1}));var ze=Pe/ye.reduce(function(en,Or){return en+Or});if(ye.forEach(function(en,Or){ye[Or]*=ze}),K=K.map(function(en){return new Za(en)}),oe==="lrgb")return Zo(K,ye);for(var Ge=K.shift(),Be=Ge.get(oe),Ke=[],Je=0,gt=0,dt=0;dt=360;)Zt-=360;Be[Jt]=Zt}else Be[Jt]=Be[Jt]/Ke[Jt];return Ct/=Pe,new Za(Be,oe).alpha(Ct>.99999?1:Ct,!0)},Zo=function(K,oe){for(var ye=K.length,Pe=[0,0,0,0],ze=0;ze.9999999&&(Pe[3]=1),new Za(bf(Pe))},Ta=T,Pu=g.type,Jf=Math.pow,ed=function(K){var oe="rgb",ye=Ta("#ccc"),Pe=0,ze=[0,1],Ge=[],Be=[0,0],Ke=!1,Je=[],gt=!1,dt=0,qt=1,Ct=!1,Jt={},Zt=!0,en=1,Or=function(kt){if(kt=kt||["#fff","#000"],kt&&Pu(kt)==="string"&&Ta.brewer&&Ta.brewer[kt.toLowerCase()]&&(kt=Ta.brewer[kt.toLowerCase()]),Pu(kt)==="array"){kt.length===1&&(kt=[kt[0],kt[0]]),kt=kt.slice(0);for(var gr=0;gr=Ke[tn];)tn++;return tn-1}return 0},vn=function(kt){return kt},ua=function(kt){return kt},Bi=function(kt,gr){var tn,yr;if(gr==null&&(gr=!1),isNaN(kt)||kt===null)return ye;if(gr)yr=kt;else if(Ke&&Ke.length>2){var Ji=$r(kt);yr=Ji/(Ke.length-2)}else qt!==dt?yr=(kt-dt)/(qt-dt):yr=1;yr=ua(yr),gr||(yr=vn(yr)),en!==1&&(yr=Jf(yr,en)),yr=Be[0]+yr*(1-Be[0]-Be[1]),yr=Math.min(1,Math.max(0,yr));var mn=Math.floor(yr*1e4);if(Zt&&Jt[mn])tn=Jt[mn];else{if(Pu(Je)==="array")for(var cn=0;cn=Mn&&cn===Ge.length-1){tn=Je[cn];break}if(yr>Mn&&yr2){var cn=kt.map(function(On,zn){return zn/(kt.length-1)}),Mn=kt.map(function(On){return(On-dt)/(qt-dt)});Mn.every(function(On,zn){return cn[zn]===On})||(ua=function(On){if(On<=0||On>=1)return On;for(var zn=0;On>=Mn[zn+1];)zn++;var ts=(On-Mn[zn])/(Mn[zn+1]-Mn[zn]),_l=cn[zn]+ts*(cn[zn+1]-cn[zn]);return _l})}}return ze=[dt,qt],ln},ln.mode=function(kt){return arguments.length?(oe=kt,Ja(),ln):oe},ln.range=function(kt,gr){return Or(kt),ln},ln.out=function(kt){return gt=kt,ln},ln.spread=function(kt){return arguments.length?(Pe=kt,ln):Pe},ln.correctLightness=function(kt){return kt==null&&(kt=!0),Ct=kt,Ja(),Ct?vn=function(gr){for(var tn=Bi(0,!0).lab()[0],yr=Bi(1,!0).lab()[0],Ji=tn>yr,mn=Bi(gr,!0).lab()[0],cn=tn+(yr-tn)*gr,Mn=mn-cn,On=0,zn=1,ts=20;Math.abs(Mn)>.01&&ts-- >0;)(function(){return Ji&&(Mn*=-1),Mn<0?(On=gr,gr+=(zn-gr)*.5):(zn=gr,gr+=(On-gr)*.5),mn=Bi(gr,!0).lab()[0],Mn=mn-cn})();return gr}:vn=function(gr){return gr},ln},ln.padding=function(kt){return kt!=null?(Pu(kt)==="number"&&(kt=[kt,kt]),Be=kt,ln):Be},ln.colors=function(kt,gr){arguments.length<2&&(gr="hex");var tn=[];if(arguments.length===0)tn=Je.slice(0);else if(kt===1)tn=[ln(.5)];else if(kt>1){var yr=ze[0],Ji=ze[1]-yr;tn=Fc(0,kt).map(function(zn){return ln(yr+zn/(kt-1)*Ji)})}else{K=[];var mn=[];if(Ke&&Ke.length>2)for(var cn=1,Mn=Ke.length,On=1<=Mn;On?cnMn;On?cn++:cn--)mn.push((Ke[cn-1]+Ke[cn])*.5);else mn=ze;tn=mn.map(function(zn){return ln(zn)})}return Ta[gr]&&(tn=tn.map(function(zn){return zn[gr]()})),tn},ln.cache=function(kt){return kt!=null?(Zt=kt,ln):Zt},ln.gamma=function(kt){return kt!=null?(en=kt,ln):en},ln.nodata=function(kt){return kt!=null?(ye=Ta(kt),ln):ye},ln};function Fc(K,oe,ye){for(var Pe=[],ze=KGe;ze?Be++:Be--)Pe.push(Be);return Pe}var gl=O,Ca=ed,Qo=function(K){for(var oe=[1,1],ye=1;ye=5){var gt,dt,qt;gt=K.map(function(Ct){return Ct.lab()}),qt=K.length-1,dt=Qo(qt),ze=function(Ct){var Jt=1-Ct,Zt=[0,1,2].map(function(en){return gt.reduce(function(Or,$r,vn){return Or+dt[vn]*Math.pow(Jt,qt-vn)*Math.pow(Ct,vn)*$r[en]},0)});return new gl(Zt,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return ze},yl=function(K){var oe=td(K);return oe.scale=function(){return Ca(oe)},oe},Ao=T,Ki=function(K,oe,ye){if(!Ki[ye])throw new Error("unknown blend mode "+ye);return Ki[ye](K,oe)},Mu=function(K){return function(oe,ye){var Pe=Ao(ye).rgb(),ze=Ao(oe).rgb();return Ao.rgb(K(Pe,ze))}},co=function(K){return function(oe,ye){var Pe=[];return Pe[0]=K(oe[0],ye[0]),Pe[1]=K(oe[1],ye[1]),Pe[2]=K(oe[2],ye[2]),Pe}},Du=function(K){return K},Ro=function(K,oe){return K*oe/255},Uc=function(K,oe){return K>oe?oe:K},Po=function(K,oe){return K>oe?K:oe},Qa=function(K,oe){return 255*(1-(1-K/255)*(1-oe/255))},rd=function(K,oe){return oe<128?2*K*oe/255:255*(1-2*(1-K/255)*(1-oe/255))},ku=function(K,oe){return 255*(1-(1-oe/255)/(K/255))},wf=function(K,oe){return K===255?255:(K=255*(oe/255)/(1-K/255),K>255?255:K)};Ki.normal=Mu(co(Du)),Ki.multiply=Mu(co(Ro)),Ki.screen=Mu(co(Qa)),Ki.overlay=Mu(co(rd)),Ki.darken=Mu(co(Uc)),Ki.lighten=Mu(co(Po)),Ki.dodge=Mu(co(wf)),Ki.burn=Mu(co(ku));for(var Jo=Ki,fo=g.type,nd=g.clip_rgb,Iu=g.TWOPI,Ks=Math.pow,xf=Math.sin,ws=Math.cos,Zi=T,hc=function(K,oe,ye,Pe,ze){K===void 0&&(K=300),oe===void 0&&(oe=-1.5),ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=[0,1]);var Ge=0,Be;fo(ze)==="array"?Be=ze[1]-ze[0]:(Be=0,ze=[ze,ze]);var Ke=function(Je){var gt=Iu*((K+120)/360+oe*Je),dt=Ks(ze[0]+Be*Je,Pe),qt=Ge!==0?ye[0]+Je*Ge:ye,Ct=qt*dt*(1-dt)/2,Jt=ws(gt),Zt=xf(gt),en=dt+Ct*(-.14861*Jt+1.78277*Zt),Or=dt+Ct*(-.29227*Jt-.90649*Zt),$r=dt+Ct*(1.97294*Jt);return Zi(nd([en*255,Or*255,$r*255,1]))};return Ke.start=function(Je){return Je==null?K:(K=Je,Ke)},Ke.rotations=function(Je){return Je==null?oe:(oe=Je,Ke)},Ke.gamma=function(Je){return Je==null?Pe:(Pe=Je,Ke)},Ke.hue=function(Je){return Je==null?ye:(ye=Je,fo(ye)==="array"?(Ge=ye[1]-ye[0],Ge===0&&(ye=ye[1])):Ge=0,Ke)},Ke.lightness=function(Je){return Je==null?ze:(fo(Je)==="array"?(ze=Je,Be=Je[1]-Je[0]):(ze=[Je,Je],Be=0),Ke)},Ke.scale=function(){return Zi.scale(Ke)},Ke.hue(ye),Ke},Ef=O,xs="0123456789abcdef",Es=Math.floor,Zs=Math.random,Ss=function(){for(var K="#",oe=0;oe<6;oe++)K+=xs.charAt(Es(Zs()*16));return new Ef(K,"hex")},zc=l,Qi=Math.log,Nu=Math.pow,er=Math.floor,ho=Math.abs,Qs=function(K,oe){oe===void 0&&(oe=null);var ye={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return zc(K)==="object"&&(K=Object.values(K)),K.forEach(function(Pe){oe&&zc(Pe)==="object"&&(Pe=Pe[oe]),Pe!=null&&!isNaN(Pe)&&(ye.values.push(Pe),ye.sum+=Pe,Peye.max&&(ye.max=Pe),ye.count+=1)}),ye.domain=[ye.min,ye.max],ye.limits=function(Pe,ze){return Os(ye,Pe,ze)},ye},Os=function(K,oe,ye){oe===void 0&&(oe="equal"),ye===void 0&&(ye=7),zc(K)=="array"&&(K=Qs(K));var Pe=K.min,ze=K.max,Ge=K.values.sort(function(sd,Tf){return sd-Tf});if(ye===1)return[Pe,ze];var Be=[];if(oe.substr(0,1)==="c"&&(Be.push(Pe),Be.push(ze)),oe.substr(0,1)==="e"){Be.push(Pe);for(var Ke=1;Ke 0");var Je=Math.LOG10E*Qi(Pe),gt=Math.LOG10E*Qi(ze);Be.push(Pe);for(var dt=1;dt200&&(ua=!1)}for(var ju={},mc=0;mcPe?(ye+.05)/(Pe+.05):(Pe+.05)/(ye+.05)},Pi=O,es=Math.sqrt,Pn=Math.pow,Sr=Math.min,Xr=Math.max,vi=Math.atan2,vc=Math.abs,ml=Math.cos,Ts=Math.sin,ad=Math.exp,pc=Math.PI,bl=function(K,oe,ye,Pe,ze){ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=1);var Ge=function(wa){return 360*wa/(2*pc)},Be=function(wa){return 2*pc*wa/360};K=new Pi(K),oe=new Pi(oe);var Ke=Array.from(K.lab()),Je=Ke[0],gt=Ke[1],dt=Ke[2],qt=Array.from(oe.lab()),Ct=qt[0],Jt=qt[1],Zt=qt[2],en=(Je+Ct)/2,Or=es(Pn(gt,2)+Pn(dt,2)),$r=es(Pn(Jt,2)+Pn(Zt,2)),vn=(Or+$r)/2,ua=.5*(1-es(Pn(vn,7)/(Pn(vn,7)+Pn(25,7)))),Bi=gt*(1+ua),Ja=Jt*(1+ua),ln=es(Pn(Bi,2)+Pn(dt,2)),kt=es(Pn(Ja,2)+Pn(Zt,2)),gr=(ln+kt)/2,tn=Ge(vi(dt,Bi)),yr=Ge(vi(Zt,Ja)),Ji=tn>=0?tn:tn+360,mn=yr>=0?yr:yr+360,cn=vc(Ji-mn)>180?(Ji+mn+360)/2:(Ji+mn)/2,Mn=1-.17*ml(Be(cn-30))+.24*ml(Be(2*cn))+.32*ml(Be(3*cn+6))-.2*ml(Be(4*cn-63)),On=mn-Ji;On=vc(On)<=180?On:mn<=Ji?On+360:On-360,On=2*es(ln*kt)*Ts(Be(On)/2);var zn=Ct-Je,ts=kt-ln,_l=1+.015*Pn(en-50,2)/es(20+Pn(en-50,2)),ju=1+.045*gr,mc=1+.015*gr*Mn,Bu=30*ad(-Pn((cn-275)/25,2)),Cs=2*es(Pn(gr,7)/(Pn(gr,7)+Pn(25,7))),wl=-Cs*Ts(2*Be(Bu)),Fi=es(Pn(zn/(ye*_l),2)+Pn(ts/(Pe*ju),2)+Pn(On/(ze*mc),2)+wl*(ts/(Pe*ju))*(On/(ze*mc)));return Xr(0,Sr(100,Fi))},Nh=O,si=function(K,oe,ye){ye===void 0&&(ye="lab"),K=new Nh(K),oe=new Nh(oe);var Pe=K.get(ye),ze=oe.get(ye),Ge=0;for(var Be in Pe){var Ke=(Pe[Be]||0)-(ze[Be]||0);Ge+=Ke*Ke}return Math.sqrt(Ge)},od=O,gc=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];try{return new(Function.prototype.bind.apply(od,[null].concat(K))),!0}catch{return!1}},Sf=T,qc=ed,Rv={cool:function(){return qc([Sf.hsl(180,1,.9),Sf.hsl(250,.7,.4)])},hot:function(){return qc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Lu={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yc=0,Of=Object.keys(Lu);yc`#${[parseInt(r.substring(1,3),16),parseInt(r.substring(3,5),16),parseInt(r.substring(5,7),16)].map(t=>{let n=parseInt((t*(100+e)/100).toString(),10);const i=(n=n<255?n:255).toString(16);return i.length===1?`0${i}`:i}).join("")}`;function zG(r){let e=0,t=0;const n=r.length;for(;t{const s=UG.contrast(r,o);s>a&&(i=o,a=s)}),ac%(d-f)+f;return UG.oklch(l(o,n,t)/100,l(s,a,i)/100,l(u,0,360)).hex()}function mle(r,e){const t=yle(r,e),n=gle(t,-20),i=qG(t,["#2A2C34","#FFFFFF"]);return{backgroundColor:t,borderColor:n,textColor:i}}const QP=Yu.palette.neutral[40],GG=Yu.palette.neutral[40],JP=(r="",e="")=>r.toLowerCase().localeCompare(e.toLowerCase());function ble(r){var e;const[t]=r;if(t===void 0)return GG;const n={};for(const o of r)n[o]=((e=n[o])!==null&&e!==void 0?e:0)+1;let i=0,a=t;for(const[o,s]of Object.entries(n))s>i&&(i=s,a=o);return a}function L9(r){return Object.entries(r).reduce((e,[t,n])=>(e[t]={mostCommonColor:ble(n),totalCount:n.length},e),{})}const _le=[/^name$/i,/^title$/i,/^label$/i,/name$/i,/description$/i,/^.+/];function wle(r){const e=r.filter(n=>n.type==="property").map(n=>n.captionKey);for(const n of _le){const i=e.find(a=>n.test(a));if(i!==void 0)return{captionKey:i,type:"property"}}const t=r.find(n=>n.type==="type");return t||r.find(n=>n.type==="id")}const xle=r=>{const e=Object.keys(r.properties).map(i=>({captionKey:i,type:"property"}));e.push({type:"id"},{type:"type"});const t=wle(e);if((t==null?void 0:t.type)==="property"){const i=r.properties[t.captionKey];if(i!==void 0)return i.type==="string"?[{value:i.stringified.slice(1,-1)}]:[{value:i.stringified}]}const[n]=r.labels;return(t==null?void 0:t.type)==="type"&&n!==void 0?[{value:n}]:[{value:r.id}]};function Ele(r,e){const t={},n={},i={},a={},o=r.map(f=>{var d;const[h]=f.labels,p=Object.assign(Object.assign({captions:xle(f),color:(d=f.color)!==null&&d!==void 0?d:h===void 0?GG:mle(h).backgroundColor},f),{labels:void 0,properties:void 0});return i[f.id]={color:p.color,id:f.id,labelsSorted:[...f.labels].sort(JP),properties:f.properties},f.labels.forEach(g=>{var y;t[g]=[...(y=t[g])!==null&&y!==void 0?y:[],p.color]}),p}),s=e.map(f=>{var d,h,p;return a[f.id]={color:(d=f.color)!==null&&d!==void 0?d:QP,id:f.id,properties:f.properties,type:f.type},n[f.type]=[...(h=n[f.type])!==null&&h!==void 0?h:[],(p=f.color)!==null&&p!==void 0?p:QP],Object.assign(Object.assign({captions:[{value:f.type}],color:QP},f),{properties:void 0,type:void 0})}),u=L9(t),l=L9(n);return{dataLookupTable:{labelMetaData:u,labels:Object.keys(u).sort((f,d)=>JP(f,d)),nodes:i,relationships:a,typeMetaData:l,types:Object.keys(l).sort((f,d)=>JP(f,d))},nodes:o,rels:s}}const j9=/(?:https?|s?ftp|bolt):\/\/(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi,Sle=({text:r})=>{var e;const t=r??"",n=(e=t.match(j9))!==null&&e!==void 0?e:[];return Te.jsx(Te.Fragment,{children:t.split(j9).map((i,a)=>Te.jsxs(ao.Fragment,{children:[i,n[a]&&Te.jsx("a",{href:n[a],target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:n[a]})]},`clickable-url-${a}`))})},Ole=ao.memo(Sle),Tle="…",Cle=900,Ale=150,Rle=300,Ple=({value:r,width:e,type:t})=>{const[n,i]=me.useState(!1),a=e>Cle?Rle:Ale,o=()=>{i(!0)};let s=n?r:r.slice(0,a);const u=s.length!==r.length;return s+=u?Tle:"",Te.jsxs(Te.Fragment,{children:[t.startsWith("Array")&&"[",Te.jsx(Ole,{text:s}),u&&Te.jsx("button",{type:"button",onClick:o,className:"ndl-properties-show-all-button",children:" Show all"}),t.startsWith("Array")&&"]"]})},Mle=({properties:r,paneWidth:e})=>Te.jsxs("div",{className:"ndl-graph-visualization-properties-table",children:[Te.jsxs("div",{className:"ndl-properties-header",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-header-key",children:"Key"}),Te.jsx(Ed,{variant:"body-small",children:"Value"})]}),Object.entries(r).map(([t,{stringified:n,type:i}])=>Te.jsxs("div",{className:"ndl-properties-row",children:[Te.jsx(Ed,{variant:"body-small",className:"ndl-properties-key",children:t}),Te.jsx("div",{className:"ndl-properties-value",children:Te.jsx(Ple,{value:n,width:e,type:i})}),Te.jsx("div",{className:"ndl-properties-clipboard-button",children:Te.jsx(z7,{textToCopy:`${t}: ${n}`,size:"small",tooltipProps:{placement:"left",type:"simple"}})})]},t))]}),Dle=({paneWidth:r=400})=>{const{selected:e,nvlGraph:t}=Vl(),n=me.useMemo(()=>{const[s]=e.nodeIds;if(s!==void 0)return t.dataLookupTable.nodes[s]},[e,t]),i=me.useMemo(()=>{const[s]=e.relationshipIds;if(s!==void 0)return t.dataLookupTable.relationships[s]},[e,t]),a=me.useMemo(()=>{if(n)return{data:n,dataType:"node"};if(i)return{data:i,dataType:"relationship"}},[n,i]);if(a===void 0)return null;const o=[{key:"",type:"String",value:`${a.data.id}`},...Object.keys(a.data.properties).map(s=>({key:s,type:a.data.properties[s].type,value:a.data.properties[s].stringified}))];return Te.jsxs(Te.Fragment,{children:[Te.jsxs(ty.Title,{children:[Te.jsx("h6",{className:"ndl-details-title",children:a.dataType==="node"?"Node details":"Relationship details"}),Te.jsx(z7,{textToCopy:o.map(s=>`${s.key}: ${s.value}`).join(` -`),size:"small"})]}),Te.jsxs(ty.Content,{children:[Te.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Te.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Te.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Te.jsx("div",{className:"ndl-details-divider"}),Te.jsx(Mle,{properties:a.data.properties,paneWidth:r})]})]})},kle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Te.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Te.jsx("li",{children:c},l)})})},Ile=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>Ile(f)?f():f);return Te.jsxs(Te.Fragment,{children:[t===!0?Te.jsx(kle,{children:c}):Te.jsx("div",{style:{all:"inherit"},children:c}),s&&Te.jsx(nX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Nle=()=>{const{nvlGraph:r}=Vl();return Te.jsxs(Te.Fragment,{children:[Te.jsx(ty.Title,{children:Te.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Te.jsx(ty.Content,{children:Te.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Te.jsxs("div",{className:"ndl-overview-section",children:[Te.jsx("div",{className:"ndl-overview-header",children:Te.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Te.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Te.jsxs("div",{className:"ndl-overview-relationships-section",children:[Te.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Te.jsx("div",{className:"ndl-overview-items",children:Te.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Te.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Lle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Te.jsx(Dle,{}):Te.jsx(Nle,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function jle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(De=>{n==="select"&&De.key===" "&&i("pan")},[n,i]),c=me.useCallback(De=>{n==="pan"&&De.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(De=>{lb(De)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(De))},[T,e]),L=me.useCallback((De,Ne)=>{i("drag");const Ce=De.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Ce,relationshipIds:r.relationshipIds});return}e({nodeIds:Ce,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(De,Ne)},[e,x,r,i]),B=me.useCallback((De,Ne)=>{typeof S=="function"&&S(De,Ne),i("select")},[S,i]),j=me.useCallback(De=>{typeof E=="function"&&E(De)},[E]),z=me.useCallback((De,Ne,Ce)=>{typeof O=="function"&&O(De,Ne,Ce)},[O]),H=me.useCallback((De,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.nodeIds.includes(De.id)){const Q=r.nodeIds.filter(ie=>ie!==De.id);e({nodeIds:Q,relationshipIds:r.relationshipIds})}else{const Q=[...r.nodeIds,De.id];e({nodeIds:Q,relationshipIds:r.relationshipIds})}else e({nodeIds:[De.id],relationshipIds:[]});typeof _=="function"&&_(De,Ne,Ce)}},[e,r,_]),q=me.useCallback((De,Ne,Ce)=>{if(!lb(Ce)){if(Gw(Ce))if(r.relationshipIds.includes(De.id)){const Q=r.relationshipIds.filter(ie=>ie!==De.id);e({nodeIds:r.nodeIds,relationshipIds:Q})}else{const Q=[...r.relationshipIds,De.id];e({nodeIds:r.nodeIds,relationshipIds:Q})}else e({nodeIds:[],relationshipIds:[De.id]});typeof m=="function"&&m(De,Ne,Ce)}},[e,r,m]),W=me.useCallback((De,Ne,Ce)=>{lb(Ce)||typeof P=="function"&&P(De,Ne,Ce)},[P]),$=me.useCallback((De,Ne,Ce)=>{lb(Ce)||typeof I=="function"&&I(De,Ne,Ce)},[I]),J=me.useCallback((De,Ne,Ce)=>{const Y=De.map(ie=>ie.id),Q=Ne.map(ie=>ie.id);if(Gw(Ce)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],Me=Ee(ie,Y),Ie=Ee(we,Q);e({nodeIds:Me,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Q})},[e,r]),X=me.useCallback(({nodes:De,rels:Ne},Ce)=>{J(De,Ne,Ce),typeof d=="function"&&d({nodes:De,rels:Ne},Ce)},[J,d]),Z=me.useCallback(({nodes:De,rels:Ne},Ce)=>{J(De,Ne,Ce),typeof f=="function"&&f({nodes:De,rels:Ne},Ce)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var De;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Z:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(De=a.onZoom)!==null&&De!==void 0?De:!0})},[pe,ne,le,ce,ue,re,a,Z,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(De=>Object.assign(Object.assign({},De),{disabled:de?!de.has(De.id):!1,selected:se.nodeIds.has(De.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(De=>Object.assign(Object.assign({},De),{disabled:ge?!ge.has(De.id):!1,selected:se.relIds.has(De.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var Ble=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iTe.jsx("div",{className:Vn(Fle[t],e),children:r}),Ule={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Te.jsxs($X,{orientation:"vertical",isFloating:!0,size:"small",children:[Te.jsx(NG,{})," ",Te.jsx(LG,{})," ",Te.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Te.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Te.jsx(FG,{})," ",Te.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=Ble(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=E2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Z,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>Ele(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=jle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Z,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,De]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Te.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:De,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,De]),Ce=L??"div";return Te.jsx(Ce,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Te.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Z,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Te.jsxs("div",{className:"ndl-graph-visualization",children:[Te.jsx(Que,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Ule),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Q;Y||(Q=j.current)===null||Q===void 0||Q.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Te.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Te.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Te.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Te.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Te.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=ile;ql.LassoSelectButton=ale;ql.SingleSelectButton=nle;ql.SearchButton=ole;ql.SingleSelectionSidePanelContents=Lle;ql.LayoutSelectButton=ule;ql.GestureSelectButton=cle;function zle(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function qle(r){return r.map(e=>{const t=zle(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function Gle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Vle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Te.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Te.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Te.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Hle(){if(document.body.classList.contains("vscode-light"))return"light";if(document.body.classList.contains("vscode-dark"))return"dark";const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);if(!e||e.length<3)return"light";const t=Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722;return t===0&&e.length>3&&e[3]==="0"?"light":t<128?"dark":"light"}function Wle(r){me.useEffect(()=>{const e=r==="auto"?Hle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Yle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Wle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[qle(r??[]),Gle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Te.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Te.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Te.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Xle(){return Te.jsxs(Vle,{children:[Te.jsx("h1",{children:Array.from(document.body.classList).join(", ")}),Te.jsx(Yle,{})]})}const $le=cV(Xle),Kle={render:$le},pE=window.__NEO4J_VIZ_DATA__;if(!pE)throw document.body.innerHTML=` + */var hle=hx.exports,N9;function vle(){return N9||(N9=1,(function(r,e){(function(t,n){r.exports=n()})(hle,(function(){for(var t=function(K,oe,ye){return oe===void 0&&(oe=0),ye===void 0&&(ye=1),Kye?ye:K},n=t,i=function(K){K._clipped=!1,K._unclipped=K.slice(0);for(var oe=0;oe<=3;oe++)oe<3?((K[oe]<0||K[oe]>255)&&(K._clipped=!0),K[oe]=n(K[oe],0,255)):oe===3&&(K[oe]=n(K[oe],0,1));return K},a={},o=0,s=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(K):c(K[0])=="object"&&oe?oe.split("").filter(function(ye){return K[0][ye]!==void 0}).map(function(ye){return K[0][ye]}):K[0]},d=l,h=function(K){if(K.length<2)return null;var oe=K.length-1;return d(K[oe])=="string"?K[oe].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:t,type:l,unpack:f,last:h,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,_=g.clip_rgb,m=g.type,x=y,S=function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];var Pe=this;if(m(oe[0])==="object"&&oe[0].constructor&&oe[0].constructor===this.constructor)return oe[0];var ze=b(oe),Ge=!1;if(!ze){Ge=!0,x.sorted||(x.autodetect=x.autodetect.sort(function(dt,qt){return qt.p-dt.p}),x.sorted=!0);for(var Be=0,Ke=x.autodetect;Be4?K[4]:1;return Ge===1?[0,0,0,Be]:[ye>=1?0:255*(1-ye)*(1-Ge),Pe>=1?0:255*(1-Pe)*(1-Ge),ze>=1?0:255*(1-ze)*(1-Ge),Be]},z=j,H=T,q=O,W=y,$=g.unpack,J=g.type,X=L;q.prototype.cmyk=function(){return X(this._rgb)},H.cmyk=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(q,[null].concat(K,["cmyk"])))},W.format.cmyk=z,W.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=$(K,"cmyk"),J(K)==="array"&&K.length===4)return"cmyk"}});var Z=g.unpack,ue=g.last,re=function(K){return Math.round(K*100)/100},ne=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Z(K,"hsla"),Pe=ue(K)||"lsa";return ye[0]=re(ye[0]||0),ye[1]=re(ye[1]*100)+"%",ye[2]=re(ye[2]*100)+"%",Pe==="hsla"||ye.length>3&&ye[3]<1?(ye[3]=ye.length>3?ye[3]:1,Pe="hsla"):ye.length=3,Pe+"("+ye.join(",")+")"},le=ne,ce=g.unpack,pe=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ce(K,"rgba");var ye=K[0],Pe=K[1],ze=K[2];ye/=255,Pe/=255,ze/=255;var Ge=Math.min(ye,Pe,ze),Be=Math.max(ye,Pe,ze),Ke=(Be+Ge)/2,Je,gt;return Be===Ge?(Je=0,gt=Number.NaN):Je=Ke<.5?(Be-Ge)/(Be+Ge):(Be-Ge)/(2-Be-Ge),ye==Be?gt=(Pe-ze)/(Be-Ge):Pe==Be?gt=2+(ze-ye)/(Be-Ge):ze==Be&&(gt=4+(ye-Pe)/(Be-Ge)),gt*=60,gt<0&&(gt+=360),K.length>3&&K[3]!==void 0?[gt,Je,Ke,K[3]]:[gt,Je,Ke]},fe=pe,se=g.unpack,de=g.last,ge=le,Oe=fe,ke=Math.round,De=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=se(K,"rgba"),Pe=de(K)||"rgb";return Pe.substr(0,3)=="hsl"?ge(Oe(ye),Pe):(ye[0]=ke(ye[0]),ye[1]=ke(ye[1]),ye[2]=ke(ye[2]),(Pe==="rgba"||ye.length>3&&ye[3]<1)&&(ye[3]=ye.length>3?ye[3]:1,Pe="rgba"),Pe+"("+ye.slice(0,Pe==="rgb"?3:4).join(",")+")")},Ne=De,Te=g.unpack,Y=Math.round,Q=function(){for(var K,oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];oe=Te(oe,"hsl");var Pe=oe[0],ze=oe[1],Ge=oe[2],Be,Ke,Je;if(ze===0)Be=Ke=Je=Ge*255;else{var gt=[0,0,0],dt=[0,0,0],qt=Ge<.5?Ge*(1+ze):Ge+ze-Ge*ze,Ct=2*Ge-qt,Jt=Pe/360;gt[0]=Jt+1/3,gt[1]=Jt,gt[2]=Jt-1/3;for(var Zt=0;Zt<3;Zt++)gt[Zt]<0&&(gt[Zt]+=1),gt[Zt]>1&&(gt[Zt]-=1),6*gt[Zt]<1?dt[Zt]=Ct+(qt-Ct)*6*gt[Zt]:2*gt[Zt]<1?dt[Zt]=qt:3*gt[Zt]<2?dt[Zt]=Ct+(qt-Ct)*(2/3-gt[Zt])*6:dt[Zt]=Ct;K=[Y(dt[0]*255),Y(dt[1]*255),Y(dt[2]*255)],Be=K[0],Ke=K[1],Je=K[2]}return oe.length>3?[Be,Ke,Je,oe[3]]:[Be,Ke,Je,1]},ie=Q,we=ie,Ee=y,Me=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ie=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ot=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,mt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,wt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Mt=Math.round,Dt=function(K){K=K.toLowerCase().trim();var oe;if(Ee.format.named)try{return Ee.format.named(K)}catch{}if(oe=K.match(Me)){for(var ye=oe.slice(1,4),Pe=0;Pe<3;Pe++)ye[Pe]=+ye[Pe];return ye[3]=1,ye}if(oe=K.match(Ie)){for(var ze=oe.slice(1,5),Ge=0;Ge<4;Ge++)ze[Ge]=+ze[Ge];return ze}if(oe=K.match(Ye)){for(var Be=oe.slice(1,4),Ke=0;Ke<3;Ke++)Be[Ke]=Mt(Be[Ke]*2.55);return Be[3]=1,Be}if(oe=K.match(ot)){for(var Je=oe.slice(1,5),gt=0;gt<3;gt++)Je[gt]=Mt(Je[gt]*2.55);return Je[3]=+Je[3],Je}if(oe=K.match(mt)){var dt=oe.slice(1,4);dt[1]*=.01,dt[2]*=.01;var qt=we(dt);return qt[3]=1,qt}if(oe=K.match(wt)){var Ct=oe.slice(1,4);Ct[1]*=.01,Ct[2]*=.01;var Jt=we(Ct);return Jt[3]=+oe[4],Jt}};Dt.test=function(K){return Me.test(K)||Ie.test(K)||Ye.test(K)||ot.test(K)||mt.test(K)||wt.test(K)};var vt=Dt,tt=T,_e=O,Ue=y,Qe=g.type,Ze=Ne,nt=vt;_e.prototype.css=function(K){return Ze(this._rgb,K)},tt.css=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_e,[null].concat(K,["css"])))},Ue.format.css=nt,Ue.autodetect.push({p:5,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Qe(K)==="string"&&nt.test(K))return"css"}});var It=O,ct=T,Lt=y,Rt=g.unpack;Lt.format.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Rt(K,"rgba");return ye[0]*=255,ye[1]*=255,ye[2]*=255,ye},ct.gl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(It,[null].concat(K,["gl"])))},It.prototype.gl=function(){var K=this._rgb;return[K[0]/255,K[1]/255,K[2]/255,K[3]]};var jt=g.unpack,Yt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Math.min(Pe,ze,Ge),Ke=Math.max(Pe,ze,Ge),Je=Ke-Be,gt=Je*100/255,dt=Be/(255-Je)*100,qt;return Je===0?qt=Number.NaN:(Pe===Ke&&(qt=(ze-Ge)/Je),ze===Ke&&(qt=2+(Ge-Pe)/Je),Ge===Ke&&(qt=4+(Pe-ze)/Je),qt*=60,qt<0&&(qt+=360)),[qt,gt,dt]},sr=Yt,Ut=g.unpack,Rr=Math.floor,Xt=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=Ut(Be,"hcg");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;dt=dt*255;var Zt=gt*255;if(gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var en=Rr(Je),Or=Je-en,$r=dt*(1-gt),vn=$r+Zt*(1-Or),ua=$r+Zt*Or,Bi=$r+Zt;switch(en){case 0:K=[Bi,ua,$r],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[vn,Bi,$r],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[$r,Bi,ua],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[$r,vn,Bi],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[ua,$r,Bi],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[Bi,$r,vn],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},Vr=Xt,Br=g.unpack,mr=g.type,ur=T,sn=O,Fr=y,un=sr;sn.prototype.hcg=function(){return un(this._rgb)},ur.hcg=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(sn,[null].concat(K,["hcg"])))},Fr.format.hcg=Vr,Fr.autodetect.push({p:1,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Br(K,"hcg"),mr(K)==="array"&&K.length===3)return"hcg"}});var bn=g.unpack,wn=g.last,_n=Math.round,xn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=bn(K,"rgba"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=ye[3],Ke=wn(K)||"auto";Be===void 0&&(Be=1),Ke==="auto"&&(Ke=Be<1?"rgba":"rgb"),Pe=_n(Pe),ze=_n(ze),Ge=_n(Ge);var Je=Pe<<16|ze<<8|Ge,gt="000000"+Je.toString(16);gt=gt.substr(gt.length-6);var dt="0"+_n(Be*255).toString(16);switch(dt=dt.substr(dt.length-2),Ke.toLowerCase()){case"rgba":return"#"+gt+dt;case"argb":return"#"+dt+gt;default:return"#"+gt}},on=xn,Nn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,fi=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,gn=function(K){if(K.match(Nn)){(K.length===4||K.length===7)&&(K=K.substr(1)),K.length===3&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]);var oe=parseInt(K,16),ye=oe>>16,Pe=oe>>8&255,ze=oe&255;return[ye,Pe,ze,1]}if(K.match(fi)){(K.length===5||K.length===9)&&(K=K.substr(1)),K.length===4&&(K=K.split(""),K=K[0]+K[0]+K[1]+K[1]+K[2]+K[2]+K[3]+K[3]);var Ge=parseInt(K,16),Be=Ge>>24&255,Ke=Ge>>16&255,Je=Ge>>8&255,gt=Math.round((Ge&255)/255*100)/100;return[Be,Ke,Je,gt]}throw new Error("unknown hex color: "+K)},yn=gn,Jn=T,_i=O,Ir=g.type,pa=y,di=on;_i.prototype.hex=function(K){return di(this._rgb,K)},Jn.hex=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(_i,[null].concat(K,["hex"])))},pa.format.hex=yn,pa.autodetect.push({p:4,test:function(K){for(var oe=[],ye=arguments.length-1;ye-- >0;)oe[ye]=arguments[ye+1];if(!oe.length&&Ir(K)==="string"&&[3,4,5,6,7,8,9].indexOf(K.length)>=0)return"hex"}});var Bt=g.unpack,hr=g.TWOPI,ei=Math.min,Hn=Math.sqrt,fs=Math.acos,Na=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Bt(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];Pe/=255,ze/=255,Ge/=255;var Be,Ke=ei(Pe,ze,Ge),Je=(Pe+ze+Ge)/3,gt=Je>0?1-Ke/Je:0;return gt===0?Be=NaN:(Be=(Pe-ze+(Pe-Ge))/2,Be/=Hn((Pe-ze)*(Pe-ze)+(Pe-Ge)*(ze-Ge)),Be=fs(Be),Ge>ze&&(Be=hr-Be),Be/=hr),[Be*360,gt,Je]},ki=Na,Wr=g.unpack,Nr=g.limit,na=g.TWOPI,Fs=g.PITHIRD,hu=Math.cos,ga=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wr(K,"hsi");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke;return isNaN(ye)&&(ye=0),isNaN(Pe)&&(Pe=0),ye>360&&(ye-=360),ye<0&&(ye+=360),ye/=360,ye<1/3?(Ke=(1-Pe)/3,Ge=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Be=1-(Ke+Ge)):ye<2/3?(ye-=1/3,Ge=(1-Pe)/3,Be=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ke=1-(Ge+Be)):(ye-=2/3,Be=(1-Pe)/3,Ke=(1+Pe*hu(na*ye)/hu(Fs-na*ye))/3,Ge=1-(Be+Ke)),Ge=Nr(ze*Ge*3),Be=Nr(ze*Be*3),Ke=Nr(ze*Ke*3),[Ge*255,Be*255,Ke*255,K.length>3?K[3]:1]},Us=ga,Ln=g.unpack,Ii=g.type,Ni=T,Pc=O,vu=y,ia=ki;Pc.prototype.hsi=function(){return ia(this._rgb)},Ni.hsi=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Pc,[null].concat(K,["hsi"])))},vu.format.hsi=Us,vu.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Ln(K,"hsi"),Ii(K)==="array"&&K.length===3)return"hsi"}});var Hl=g.unpack,Md=g.type,Xa=T,Wl=O,Yl=y,nf=fe;Wl.prototype.hsl=function(){return nf(this._rgb)},Xa.hsl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wl,[null].concat(K,["hsl"])))},Yl.format.hsl=ie,Yl.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Hl(K,"hsl"),Md(K)==="array"&&K.length===3)return"hsl"}});var Wi=g.unpack,af=Math.min,La=Math.max,qo=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=Wi(K,"rgb");var ye=K[0],Pe=K[1],ze=K[2],Ge=af(ye,Pe,ze),Be=La(ye,Pe,ze),Ke=Be-Ge,Je,gt,dt;return dt=Be/255,Be===0?(Je=Number.NaN,gt=0):(gt=Ke/Be,ye===Be&&(Je=(Pe-ze)/Ke),Pe===Be&&(Je=2+(ze-ye)/Ke),ze===Be&&(Je=4+(ye-Pe)/Ke),Je*=60,Je<0&&(Je+=360)),[Je,gt,dt]},Gf=qo,ds=g.unpack,Mc=Math.floor,Xl=function(){for(var K,oe,ye,Pe,ze,Ge,Be=[],Ke=arguments.length;Ke--;)Be[Ke]=arguments[Ke];Be=ds(Be,"hsv");var Je=Be[0],gt=Be[1],dt=Be[2],qt,Ct,Jt;if(dt*=255,gt===0)qt=Ct=Jt=dt;else{Je===360&&(Je=0),Je>360&&(Je-=360),Je<0&&(Je+=360),Je/=60;var Zt=Mc(Je),en=Je-Zt,Or=dt*(1-gt),$r=dt*(1-gt*en),vn=dt*(1-gt*(1-en));switch(Zt){case 0:K=[dt,vn,Or],qt=K[0],Ct=K[1],Jt=K[2];break;case 1:oe=[$r,dt,Or],qt=oe[0],Ct=oe[1],Jt=oe[2];break;case 2:ye=[Or,dt,vn],qt=ye[0],Ct=ye[1],Jt=ye[2];break;case 3:Pe=[Or,$r,dt],qt=Pe[0],Ct=Pe[1],Jt=Pe[2];break;case 4:ze=[vn,Or,dt],qt=ze[0],Ct=ze[1],Jt=ze[2];break;case 5:Ge=[dt,Or,$r],qt=Ge[0],Ct=Ge[1],Jt=Ge[2];break}}return[qt,Ct,Jt,Be.length>3?Be[3]:1]},ti=Xl,zs=g.unpack,Qu=g.type,qs=T,$l=O,of=y,pu=Gf;$l.prototype.hsv=function(){return pu(this._rgb)},qs.hsv=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply($l,[null].concat(K,["hsv"])))},of.format.hsv=ti,of.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=zs(K,"hsv"),Qu(K)==="array"&&K.length===3)return"hsv"}});var _o={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},wo=_o,Vf=g.unpack,sf=Math.pow,gu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vf(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=Kl(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2],dt=116*Je-16;return[dt<0?0:dt,500*(Ke-Je),200*(Je-gt)]},so=function(K){return(K/=255)<=.04045?K/12.92:sf((K+.055)/1.055,2.4)},Ju=function(K){return K>wo.t3?sf(K,1/3):K/wo.t2+wo.t0},Kl=function(K,oe,ye){K=so(K),oe=so(oe),ye=so(ye);var Pe=Ju((.4124564*K+.3575761*oe+.1804375*ye)/wo.Xn),ze=Ju((.2126729*K+.7151522*oe+.072175*ye)/wo.Yn),Ge=Ju((.0193339*K+.119192*oe+.9503041*ye)/wo.Zn);return[Pe,ze,Ge]},Go=gu,hs=_o,jn=g.unpack,Zr=Math.pow,Zl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=jn(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge,Be,Ke,Je,gt,dt;return Be=(ye+16)/116,Ge=isNaN(Pe)?Be:Be+Pe/500,Ke=isNaN(ze)?Be:Be-ze/200,Be=hs.Yn*Dc(Be),Ge=hs.Xn*Dc(Ge),Ke=hs.Zn*Dc(Ke),Je=vs(3.2404542*Ge-1.5371385*Be-.4985314*Ke),gt=vs(-.969266*Ge+1.8760108*Be+.041556*Ke),dt=vs(.0556434*Ge-.2040259*Be+1.0572252*Ke),[Je,gt,dt,K.length>3?K[3]:1]},vs=function(K){return 255*(K<=.00304?12.92*K:1.055*Zr(K,1/2.4)-.055)},Dc=function(K){return K>hs.t1?K*K*K:hs.t2*(K-hs.t0)},Oa=Zl,el=g.unpack,uf=g.type,Ql=T,tl=O,wi=y,Jl=Go;tl.prototype.lab=function(){return Jl(this._rgb)},Ql.lab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(tl,[null].concat(K,["lab"])))},wi.format.lab=Oa,wi.autodetect.push({p:2,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=el(K,"lab"),uf(K)==="array"&&K.length===3)return"lab"}});var aa=g.unpack,yu=g.RAD2DEG,lf=Math.sqrt,ya=Math.atan2,ma=Math.round,mu=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=aa(K,"lab"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=lf(ze*ze+Ge*Ge),Ke=(ya(Ge,ze)*yu+360)%360;return ma(Be*1e4)===0&&(Ke=Number.NaN),[Pe,Be,Ke]},uo=mu,Vo=g.unpack,st=Go,xt=uo,pt=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Vo(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=st(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xt(Ke,Je,gt)},Wt=pt,ir=g.unpack,En=g.DEG2RAD,oa=Math.sin,ja=Math.cos,Kn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ir(K,"lch"),Pe=ye[0],ze=ye[1],Ge=ye[2];return isNaN(Ge)&&(Ge=0),Ge=Ge*En,[Pe,ja(Ge)*ze,oa(Ge)*ze]},ec=Kn,xi=g.unpack,ba=ec,cf=Oa,Ev=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=xi(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=ba(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=cf(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},rl=Ev,Dd=g.unpack,kd=rl,Fn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Dd(K,"hcl").reverse();return kd.apply(void 0,ye)},Sv=Fn,Hf=g.unpack,nl=g.type,Ov=T,Wf=O,ff=y,Gs=Wt;Wf.prototype.lch=function(){return Gs(this._rgb)},Wf.prototype.hcl=function(){return Gs(this._rgb).reverse()},Ov.lch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["lch"])))},Ov.hcl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Wf,[null].concat(K,["hcl"])))},ff.format.lch=rl,ff.format.hcl=Sv,["lch","hcl"].forEach(function(K){return ff.autodetect.push({p:2,test:function(){for(var oe=[],ye=arguments.length;ye--;)oe[ye]=arguments[ye];if(oe=Hf(oe,K),nl(oe)==="array"&&oe.length===3)return K}})});var bu={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},kc=bu,Ah=O,tc=y,Yf=g.type,Ic=kc,_u=yn,xo=on;Ah.prototype.name=function(){for(var K=xo(this._rgb,"rgb"),oe=0,ye=Object.keys(Ic);oe0;)oe[ye]=arguments[ye+1];if(!oe.length&&Yf(K)==="string"&&Ic[K.toLowerCase()])return"named"}});var Nc=g.unpack,Vs=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=Nc(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2];return(Pe<<16)+(ze<<8)+Ge},df=Vs,Rh=g.type,Xf=function(K){if(Rh(K)=="number"&&K>=0&&K<=16777215){var oe=K>>16,ye=K>>8&255,Pe=K&255;return[oe,ye,Pe,1]}throw new Error("unknown num color: "+K)},$f=Xf,Id=T,rc=O,Kf=y,Lc=g.type,Nd=df;rc.prototype.num=function(){return Nd(this._rgb)},Id.num=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(rc,[null].concat(K,["num"])))},Kf.format.num=$f,Kf.autodetect.push({p:5,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K.length===1&&Lc(K[0])==="number"&&K[0]>=0&&K[0]<=16777215)return"num"}});var Ph=T,hf=O,Li=y,hi=g.unpack,Zf=g.type,Tv=Math.round;hf.prototype.rgb=function(K){return K===void 0&&(K=!0),K===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Tv)},hf.prototype.rgba=function(K){return K===void 0&&(K=!0),this._rgb.slice(0,4).map(function(oe,ye){return ye<3?K===!1?oe:Tv(oe):oe})},Ph.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(hf,[null].concat(K,["rgb"])))},Li.format.rgb=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=hi(K,"rgba");return ye[3]===void 0&&(ye[3]=1),ye},Li.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=hi(K,"rgba"),Zf(K)==="array"&&(K.length===3||K.length===4&&Zf(K[3])=="number"&&K[3]>=0&&K[3]<=1))return"rgb"}});var Qf=Math.log,Yp=function(K){var oe=K/100,ye,Pe,ze;return oe<66?(ye=255,Pe=oe<6?0:-155.25485562709179-.44596950469579133*(Pe=oe-2)+104.49216199393888*Qf(Pe),ze=oe<20?0:-254.76935184120902+.8274096064007395*(ze=oe-10)+115.67994401066147*Qf(ze)):(ye=351.97690566805693+.114206453784165*(ye=oe-55)-40.25366309332127*Qf(ye),Pe=325.4494125711974+.07943456536662342*(Pe=oe-50)-28.0852963507957*Qf(Pe),ze=255),[ye,Pe,ze,1]},il=Yp,ri=il,nc=g.unpack,jc=Math.round,vf=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];for(var ye=nc(K,"rgb"),Pe=ye[0],ze=ye[2],Ge=1e3,Be=4e4,Ke=.4,Je;Be-Ge>Ke;){Je=(Be+Ge)*.5;var gt=ri(Je);gt[2]/gt[0]>=ze/Pe?Be=Je:Ge=Je}return jc(Je)},pf=vf,Bc=T,Hs=O,ic=y,We=pf;Hs.prototype.temp=Hs.prototype.kelvin=Hs.prototype.temperature=function(){return We(this._rgb)},Bc.temp=Bc.kelvin=Bc.temperature=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Hs,[null].concat(K,["temp"])))},ic.format.temp=ic.format.kelvin=ic.format.temperature=il;var ft=g.unpack,ut=Math.cbrt,Kt=Math.pow,Pr=Math.sign,Qr=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=ft(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=[be(Pe/255),be(ze/255),be(Ge/255)],Ke=Be[0],Je=Be[1],gt=Be[2],dt=ut(.4122214708*Ke+.5363325363*Je+.0514459929*gt),qt=ut(.2119034982*Ke+.6806995451*Je+.1073969566*gt),Ct=ut(.0883024619*Ke+.2817188376*Je+.6299787005*gt);return[.2104542553*dt+.793617785*qt-.0040720468*Ct,1.9779984951*dt-2.428592205*qt+.4505937099*Ct,.0259040371*dt+.7827717662*qt-.808675766*Ct]},oi=Qr;function be(K){var oe=Math.abs(K);return oe<.04045?K/12.92:(Pr(K)||1)*Kt((oe+.055)/1.055,2.4)}var al=g.unpack,Ho=Math.pow,Ei=Math.sign,nn=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=al(K,"lab");var ye=K[0],Pe=K[1],ze=K[2],Ge=Ho(ye+.3963377774*Pe+.2158037573*ze,3),Be=Ho(ye-.1055613458*Pe-.0638541728*ze,3),Ke=Ho(ye-.0894841775*Pe-1.291485548*ze,3);return[255*$a(4.0767416621*Ge-3.3077115913*Be+.2309699292*Ke),255*$a(-1.2684380046*Ge+2.6097574011*Be-.3413193965*Ke),255*$a(-.0041960863*Ge-.7034186147*Be+1.707614701*Ke),K.length>3?K[3]:1]},ol=nn;function $a(K){var oe=Math.abs(K);return oe>.0031308?(Ei(K)||1)*(1.055*Ho(oe,1/2.4)-.055):K*12.92}var ps=g.unpack,wu=g.type,Jr=T,Ld=O,gf=y,Eo=oi;Ld.prototype.oklab=function(){return Eo(this._rgb)},Jr.oklab=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ld,[null].concat(K,["oklab"])))},gf.format.oklab=ol,gf.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=ps(K,"oklab"),wu(K)==="array"&&K.length===3)return"oklab"}});var jd=g.unpack,So=oi,xu=uo,sl=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];var ye=jd(K,"rgb"),Pe=ye[0],ze=ye[1],Ge=ye[2],Be=So(Pe,ze,Ge),Ke=Be[0],Je=Be[1],gt=Be[2];return xu(Ke,Je,gt)},Ws=sl,ac=g.unpack,gs=ec,ys=ol,ul=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];K=ac(K,"lch");var ye=K[0],Pe=K[1],ze=K[2],Ge=gs(ye,Pe,ze),Be=Ge[0],Ke=Ge[1],Je=Ge[2],gt=ys(Be,Ke,Je),dt=gt[0],qt=gt[1],Ct=gt[2];return[dt,qt,Ct,K.length>3?K[3]:1]},Ka=ul,Eu=g.unpack,Mh=g.type,Yi=T,Ba=O,Oo=y,Cv=Ws;Ba.prototype.oklch=function(){return Cv(this._rgb)},Yi.oklch=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];return new(Function.prototype.bind.apply(Ba,[null].concat(K,["oklch"])))},Oo.format.oklch=Ka,Oo.autodetect.push({p:3,test:function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];if(K=Eu(K,"oklch"),Mh(K)==="array"&&K.length===3)return"oklch"}});var oc=O,sc=g.type;oc.prototype.alpha=function(K,oe){return oe===void 0&&(oe=!1),K!==void 0&&sc(K)==="number"?oe?(this._rgb[3]=K,this):new oc([this._rgb[0],this._rgb[1],this._rgb[2],K],"rgb"):this._rgb[3]};var ji=O;ji.prototype.clipped=function(){return this._rgb._clipped||!1};var Wo=O,yf=_o;Wo.prototype.darken=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lab();return ye[0]-=yf.Kn*K,new Wo(ye,"lab").alpha(oe.alpha(),!0)},Wo.prototype.brighten=function(K){return K===void 0&&(K=1),this.darken(-K)},Wo.prototype.darker=Wo.prototype.darken,Wo.prototype.brighter=Wo.prototype.brighten;var Ys=O;Ys.prototype.get=function(K){var oe=K.split("."),ye=oe[0],Pe=oe[1],ze=this[ye]();if(Pe){var Ge=ye.indexOf(Pe)-(ye.substr(0,2)==="ok"?2:0);if(Ge>-1)return ze[Ge];throw new Error("unknown channel "+Pe+" in mode "+ye)}else return ze};var sa=O,ll=g.type,ms=Math.pow,Ri=1e-7,Sn=20;sa.prototype.luminance=function(K){if(K!==void 0&&ll(K)==="number"){if(K===0)return new sa([0,0,0,this._rgb[3]],"rgb");if(K===1)return new sa([255,255,255,this._rgb[3]],"rgb");var oe=this.luminance(),ye="rgb",Pe=Sn,ze=function(Be,Ke){var Je=Be.interpolate(Ke,.5,ye),gt=Je.luminance();return Math.abs(K-gt)K?ze(Be,Je):ze(Je,Ke)},Ge=(oe>K?ze(new sa([0,0,0]),this):ze(this,new sa([255,255,255]))).rgb();return new sa(Ge.concat([this._rgb[3]]))}return To.apply(void 0,this._rgb.slice(0,3))};var To=function(K,oe,ye){return K=Co(K),oe=Co(oe),ye=Co(ye),.2126*K+.7152*oe+.0722*ye},Co=function(K){return K/=255,K<=.03928?K/12.92:ms((K+.055)/1.055,2.4)},Xi={},Yo=O,Fa=g.type,Ua=Xi,cl=function(K,oe,ye){ye===void 0&&(ye=.5);for(var Pe=[],ze=arguments.length-3;ze-- >0;)Pe[ze]=arguments[ze+3];var Ge=Pe[0]||"lrgb";if(!Ua[Ge]&&!Pe.length&&(Ge=Object.keys(Ua)[0]),!Ua[Ge])throw new Error("interpolation mode "+Ge+" is not defined");return Fa(K)!=="object"&&(K=new Yo(K)),Fa(oe)!=="object"&&(oe=new Yo(oe)),Ua[Ge](K,oe,ye).alpha(K.alpha()+ye*(oe.alpha()-K.alpha()))},Xs=O,uc=cl;Xs.prototype.mix=Xs.prototype.interpolate=function(K,oe){oe===void 0&&(oe=.5);for(var ye=[],Pe=arguments.length-2;Pe-- >0;)ye[Pe]=arguments[Pe+2];return uc.apply(void 0,[this,K,oe].concat(ye))};var lc=O;lc.prototype.premultiply=function(K){K===void 0&&(K=!1);var oe=this._rgb,ye=oe[3];return K?(this._rgb=[oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],this):new lc([oe[0]*ye,oe[1]*ye,oe[2]*ye,ye],"rgb")};var Si=O,Rn=_o;Si.prototype.saturate=function(K){K===void 0&&(K=1);var oe=this,ye=oe.lch();return ye[1]+=Rn.Kn*K,ye[1]<0&&(ye[1]=0),new Si(ye,"lch").alpha(oe.alpha(),!0)},Si.prototype.desaturate=function(K){return K===void 0&&(K=1),this.saturate(-K)};var hn=O,Su=g.type;hn.prototype.set=function(K,oe,ye){ye===void 0&&(ye=!1);var Pe=K.split("."),ze=Pe[0],Ge=Pe[1],Be=this[ze]();if(Ge){var Ke=ze.indexOf(Ge)-(ze.substr(0,2)==="ok"?2:0);if(Ke>-1){if(Su(oe)=="string")switch(oe.charAt(0)){case"+":Be[Ke]+=+oe;break;case"-":Be[Ke]+=+oe;break;case"*":Be[Ke]*=+oe.substr(1);break;case"/":Be[Ke]/=+oe.substr(1);break;default:Be[Ke]=+oe}else if(Su(oe)==="number")Be[Ke]=oe;else throw new Error("unsupported value for Color.set");var Je=new hn(Be,ze);return ye?(this._rgb=Je._rgb,this):Je}throw new Error("unknown channel "+Ge+" in mode "+ze)}else return Be};var Xo=O,mf=function(K,oe,ye){var Pe=K._rgb,ze=oe._rgb;return new Xo(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"rgb")};Xi.rgb=mf;var fl=O,cc=Math.sqrt,bs=Math.pow,dl=function(K,oe,ye){var Pe=K._rgb,ze=Pe[0],Ge=Pe[1],Be=Pe[2],Ke=oe._rgb,Je=Ke[0],gt=Ke[1],dt=Ke[2];return new fl(cc(bs(ze,2)*(1-ye)+bs(Je,2)*ye),cc(bs(Ge,2)*(1-ye)+bs(gt,2)*ye),cc(bs(Be,2)*(1-ye)+bs(dt,2)*ye),"rgb")};Xi.lrgb=dl;var xe=O,Ou=function(K,oe,ye){var Pe=K.lab(),ze=oe.lab();return new xe(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"lab")};Xi.lab=Ou;var $s=O,ar=function(K,oe,ye,Pe){var ze,Ge,Be,Ke;Pe==="hsl"?(Be=K.hsl(),Ke=oe.hsl()):Pe==="hsv"?(Be=K.hsv(),Ke=oe.hsv()):Pe==="hcg"?(Be=K.hcg(),Ke=oe.hcg()):Pe==="hsi"?(Be=K.hsi(),Ke=oe.hsi()):Pe==="lch"||Pe==="hcl"?(Pe="hcl",Be=K.hcl(),Ke=oe.hcl()):Pe==="oklch"&&(Be=K.oklch().reverse(),Ke=oe.oklch().reverse());var Je,gt,dt,qt,Ct,Jt;(Pe.substr(0,1)==="h"||Pe==="oklch")&&(ze=Be,Je=ze[0],dt=ze[1],Ct=ze[2],Ge=Ke,gt=Ge[0],qt=Ge[1],Jt=Ge[2]);var Zt,en,Or,$r;return!isNaN(Je)&&!isNaN(gt)?(gt>Je&>-Je>180?$r=gt-(Je+360):gt180?$r=gt+360-Je:$r=gt-Je,en=Je+ye*$r):isNaN(Je)?isNaN(gt)?en=Number.NaN:(en=gt,(Ct==1||Ct==0)&&Pe!="hsv"&&(Zt=qt)):(en=Je,(Jt==1||Jt==0)&&Pe!="hsv"&&(Zt=dt)),Zt===void 0&&(Zt=dt+ye*(qt-dt)),Or=Ct+ye*(Jt-Ct),Pe==="oklch"?new $s([Or,Zt,en],Pe):new $s([en,Zt,Or],Pe)},Yr=ar,Tu=function(K,oe,ye){return Yr(K,oe,ye,"lch")};Xi.lch=Tu,Xi.hcl=Tu;var _s=O,Cu=function(K,oe,ye){var Pe=K.num(),ze=oe.num();return new _s(Pe+ye*(ze-Pe),"num")};Xi.num=Cu;var hl=ar,Dh=function(K,oe,ye){return hl(K,oe,ye,"hcg")};Xi.hcg=Dh;var za=ar,Bd=function(K,oe,ye){return za(K,oe,ye,"hsi")};Xi.hsi=Bd;var Au=ar,_a=function(K,oe,ye){return Au(K,oe,ye,"hsl")};Xi.hsl=_a;var $o=ar,kh=function(K,oe,ye){return $o(K,oe,ye,"hsv")};Xi.hsv=kh;var Ko=O,fc=function(K,oe,ye){var Pe=K.oklab(),ze=oe.oklab();return new Ko(Pe[0]+ye*(ze[0]-Pe[0]),Pe[1]+ye*(ze[1]-Pe[1]),Pe[2]+ye*(ze[2]-Pe[2]),"oklab")};Xi.oklab=fc;var Ih=ar,$i=function(K,oe,ye){return Ih(K,oe,ye,"oklch")};Xi.oklch=$i;var Za=O,bf=g.clip_rgb,vl=Math.pow,_f=Math.sqrt,Ru=Math.PI,pl=Math.cos,lo=Math.sin,Av=Math.atan2,dc=function(K,oe,ye){oe===void 0&&(oe="lrgb"),ye===void 0&&(ye=null);var Pe=K.length;ye||(ye=Array.from(new Array(Pe)).map(function(){return 1}));var ze=Pe/ye.reduce(function(en,Or){return en+Or});if(ye.forEach(function(en,Or){ye[Or]*=ze}),K=K.map(function(en){return new Za(en)}),oe==="lrgb")return Zo(K,ye);for(var Ge=K.shift(),Be=Ge.get(oe),Ke=[],Je=0,gt=0,dt=0;dt=360;)Zt-=360;Be[Jt]=Zt}else Be[Jt]=Be[Jt]/Ke[Jt];return Ct/=Pe,new Za(Be,oe).alpha(Ct>.99999?1:Ct,!0)},Zo=function(K,oe){for(var ye=K.length,Pe=[0,0,0,0],ze=0;ze.9999999&&(Pe[3]=1),new Za(bf(Pe))},Ta=T,Pu=g.type,Jf=Math.pow,ed=function(K){var oe="rgb",ye=Ta("#ccc"),Pe=0,ze=[0,1],Ge=[],Be=[0,0],Ke=!1,Je=[],gt=!1,dt=0,qt=1,Ct=!1,Jt={},Zt=!0,en=1,Or=function(kt){if(kt=kt||["#fff","#000"],kt&&Pu(kt)==="string"&&Ta.brewer&&Ta.brewer[kt.toLowerCase()]&&(kt=Ta.brewer[kt.toLowerCase()]),Pu(kt)==="array"){kt.length===1&&(kt=[kt[0],kt[0]]),kt=kt.slice(0);for(var gr=0;gr=Ke[tn];)tn++;return tn-1}return 0},vn=function(kt){return kt},ua=function(kt){return kt},Bi=function(kt,gr){var tn,yr;if(gr==null&&(gr=!1),isNaN(kt)||kt===null)return ye;if(gr)yr=kt;else if(Ke&&Ke.length>2){var Ji=$r(kt);yr=Ji/(Ke.length-2)}else qt!==dt?yr=(kt-dt)/(qt-dt):yr=1;yr=ua(yr),gr||(yr=vn(yr)),en!==1&&(yr=Jf(yr,en)),yr=Be[0]+yr*(1-Be[0]-Be[1]),yr=Math.min(1,Math.max(0,yr));var mn=Math.floor(yr*1e4);if(Zt&&Jt[mn])tn=Jt[mn];else{if(Pu(Je)==="array")for(var cn=0;cn=Mn&&cn===Ge.length-1){tn=Je[cn];break}if(yr>Mn&&yr2){var cn=kt.map(function(On,zn){return zn/(kt.length-1)}),Mn=kt.map(function(On){return(On-dt)/(qt-dt)});Mn.every(function(On,zn){return cn[zn]===On})||(ua=function(On){if(On<=0||On>=1)return On;for(var zn=0;On>=Mn[zn+1];)zn++;var ts=(On-Mn[zn])/(Mn[zn+1]-Mn[zn]),_l=cn[zn]+ts*(cn[zn+1]-cn[zn]);return _l})}}return ze=[dt,qt],ln},ln.mode=function(kt){return arguments.length?(oe=kt,Ja(),ln):oe},ln.range=function(kt,gr){return Or(kt),ln},ln.out=function(kt){return gt=kt,ln},ln.spread=function(kt){return arguments.length?(Pe=kt,ln):Pe},ln.correctLightness=function(kt){return kt==null&&(kt=!0),Ct=kt,Ja(),Ct?vn=function(gr){for(var tn=Bi(0,!0).lab()[0],yr=Bi(1,!0).lab()[0],Ji=tn>yr,mn=Bi(gr,!0).lab()[0],cn=tn+(yr-tn)*gr,Mn=mn-cn,On=0,zn=1,ts=20;Math.abs(Mn)>.01&&ts-- >0;)(function(){return Ji&&(Mn*=-1),Mn<0?(On=gr,gr+=(zn-gr)*.5):(zn=gr,gr+=(On-gr)*.5),mn=Bi(gr,!0).lab()[0],Mn=mn-cn})();return gr}:vn=function(gr){return gr},ln},ln.padding=function(kt){return kt!=null?(Pu(kt)==="number"&&(kt=[kt,kt]),Be=kt,ln):Be},ln.colors=function(kt,gr){arguments.length<2&&(gr="hex");var tn=[];if(arguments.length===0)tn=Je.slice(0);else if(kt===1)tn=[ln(.5)];else if(kt>1){var yr=ze[0],Ji=ze[1]-yr;tn=Fc(0,kt).map(function(zn){return ln(yr+zn/(kt-1)*Ji)})}else{K=[];var mn=[];if(Ke&&Ke.length>2)for(var cn=1,Mn=Ke.length,On=1<=Mn;On?cnMn;On?cn++:cn--)mn.push((Ke[cn-1]+Ke[cn])*.5);else mn=ze;tn=mn.map(function(zn){return ln(zn)})}return Ta[gr]&&(tn=tn.map(function(zn){return zn[gr]()})),tn},ln.cache=function(kt){return kt!=null?(Zt=kt,ln):Zt},ln.gamma=function(kt){return kt!=null?(en=kt,ln):en},ln.nodata=function(kt){return kt!=null?(ye=Ta(kt),ln):ye},ln};function Fc(K,oe,ye){for(var Pe=[],ze=KGe;ze?Be++:Be--)Pe.push(Be);return Pe}var gl=O,Ca=ed,Qo=function(K){for(var oe=[1,1],ye=1;ye=5){var gt,dt,qt;gt=K.map(function(Ct){return Ct.lab()}),qt=K.length-1,dt=Qo(qt),ze=function(Ct){var Jt=1-Ct,Zt=[0,1,2].map(function(en){return gt.reduce(function(Or,$r,vn){return Or+dt[vn]*Math.pow(Jt,qt-vn)*Math.pow(Ct,vn)*$r[en]},0)});return new gl(Zt,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return ze},yl=function(K){var oe=td(K);return oe.scale=function(){return Ca(oe)},oe},Ao=T,Ki=function(K,oe,ye){if(!Ki[ye])throw new Error("unknown blend mode "+ye);return Ki[ye](K,oe)},Mu=function(K){return function(oe,ye){var Pe=Ao(ye).rgb(),ze=Ao(oe).rgb();return Ao.rgb(K(Pe,ze))}},co=function(K){return function(oe,ye){var Pe=[];return Pe[0]=K(oe[0],ye[0]),Pe[1]=K(oe[1],ye[1]),Pe[2]=K(oe[2],ye[2]),Pe}},Du=function(K){return K},Ro=function(K,oe){return K*oe/255},Uc=function(K,oe){return K>oe?oe:K},Po=function(K,oe){return K>oe?K:oe},Qa=function(K,oe){return 255*(1-(1-K/255)*(1-oe/255))},rd=function(K,oe){return oe<128?2*K*oe/255:255*(1-2*(1-K/255)*(1-oe/255))},ku=function(K,oe){return 255*(1-(1-oe/255)/(K/255))},wf=function(K,oe){return K===255?255:(K=255*(oe/255)/(1-K/255),K>255?255:K)};Ki.normal=Mu(co(Du)),Ki.multiply=Mu(co(Ro)),Ki.screen=Mu(co(Qa)),Ki.overlay=Mu(co(rd)),Ki.darken=Mu(co(Uc)),Ki.lighten=Mu(co(Po)),Ki.dodge=Mu(co(wf)),Ki.burn=Mu(co(ku));for(var Jo=Ki,fo=g.type,nd=g.clip_rgb,Iu=g.TWOPI,Ks=Math.pow,xf=Math.sin,ws=Math.cos,Zi=T,hc=function(K,oe,ye,Pe,ze){K===void 0&&(K=300),oe===void 0&&(oe=-1.5),ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=[0,1]);var Ge=0,Be;fo(ze)==="array"?Be=ze[1]-ze[0]:(Be=0,ze=[ze,ze]);var Ke=function(Je){var gt=Iu*((K+120)/360+oe*Je),dt=Ks(ze[0]+Be*Je,Pe),qt=Ge!==0?ye[0]+Je*Ge:ye,Ct=qt*dt*(1-dt)/2,Jt=ws(gt),Zt=xf(gt),en=dt+Ct*(-.14861*Jt+1.78277*Zt),Or=dt+Ct*(-.29227*Jt-.90649*Zt),$r=dt+Ct*(1.97294*Jt);return Zi(nd([en*255,Or*255,$r*255,1]))};return Ke.start=function(Je){return Je==null?K:(K=Je,Ke)},Ke.rotations=function(Je){return Je==null?oe:(oe=Je,Ke)},Ke.gamma=function(Je){return Je==null?Pe:(Pe=Je,Ke)},Ke.hue=function(Je){return Je==null?ye:(ye=Je,fo(ye)==="array"?(Ge=ye[1]-ye[0],Ge===0&&(ye=ye[1])):Ge=0,Ke)},Ke.lightness=function(Je){return Je==null?ze:(fo(Je)==="array"?(ze=Je,Be=Je[1]-Je[0]):(ze=[Je,Je],Be=0),Ke)},Ke.scale=function(){return Zi.scale(Ke)},Ke.hue(ye),Ke},Ef=O,xs="0123456789abcdef",Es=Math.floor,Zs=Math.random,Ss=function(){for(var K="#",oe=0;oe<6;oe++)K+=xs.charAt(Es(Zs()*16));return new Ef(K,"hex")},zc=l,Qi=Math.log,Nu=Math.pow,er=Math.floor,ho=Math.abs,Qs=function(K,oe){oe===void 0&&(oe=null);var ye={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return zc(K)==="object"&&(K=Object.values(K)),K.forEach(function(Pe){oe&&zc(Pe)==="object"&&(Pe=Pe[oe]),Pe!=null&&!isNaN(Pe)&&(ye.values.push(Pe),ye.sum+=Pe,Peye.max&&(ye.max=Pe),ye.count+=1)}),ye.domain=[ye.min,ye.max],ye.limits=function(Pe,ze){return Os(ye,Pe,ze)},ye},Os=function(K,oe,ye){oe===void 0&&(oe="equal"),ye===void 0&&(ye=7),zc(K)=="array"&&(K=Qs(K));var Pe=K.min,ze=K.max,Ge=K.values.sort(function(sd,Tf){return sd-Tf});if(ye===1)return[Pe,ze];var Be=[];if(oe.substr(0,1)==="c"&&(Be.push(Pe),Be.push(ze)),oe.substr(0,1)==="e"){Be.push(Pe);for(var Ke=1;Ke 0");var Je=Math.LOG10E*Qi(Pe),gt=Math.LOG10E*Qi(ze);Be.push(Pe);for(var dt=1;dt200&&(ua=!1)}for(var ju={},mc=0;mcPe?(ye+.05)/(Pe+.05):(Pe+.05)/(ye+.05)},Pi=O,es=Math.sqrt,Pn=Math.pow,Sr=Math.min,Xr=Math.max,vi=Math.atan2,vc=Math.abs,ml=Math.cos,Ts=Math.sin,ad=Math.exp,pc=Math.PI,bl=function(K,oe,ye,Pe,ze){ye===void 0&&(ye=1),Pe===void 0&&(Pe=1),ze===void 0&&(ze=1);var Ge=function(wa){return 360*wa/(2*pc)},Be=function(wa){return 2*pc*wa/360};K=new Pi(K),oe=new Pi(oe);var Ke=Array.from(K.lab()),Je=Ke[0],gt=Ke[1],dt=Ke[2],qt=Array.from(oe.lab()),Ct=qt[0],Jt=qt[1],Zt=qt[2],en=(Je+Ct)/2,Or=es(Pn(gt,2)+Pn(dt,2)),$r=es(Pn(Jt,2)+Pn(Zt,2)),vn=(Or+$r)/2,ua=.5*(1-es(Pn(vn,7)/(Pn(vn,7)+Pn(25,7)))),Bi=gt*(1+ua),Ja=Jt*(1+ua),ln=es(Pn(Bi,2)+Pn(dt,2)),kt=es(Pn(Ja,2)+Pn(Zt,2)),gr=(ln+kt)/2,tn=Ge(vi(dt,Bi)),yr=Ge(vi(Zt,Ja)),Ji=tn>=0?tn:tn+360,mn=yr>=0?yr:yr+360,cn=vc(Ji-mn)>180?(Ji+mn+360)/2:(Ji+mn)/2,Mn=1-.17*ml(Be(cn-30))+.24*ml(Be(2*cn))+.32*ml(Be(3*cn+6))-.2*ml(Be(4*cn-63)),On=mn-Ji;On=vc(On)<=180?On:mn<=Ji?On+360:On-360,On=2*es(ln*kt)*Ts(Be(On)/2);var zn=Ct-Je,ts=kt-ln,_l=1+.015*Pn(en-50,2)/es(20+Pn(en-50,2)),ju=1+.045*gr,mc=1+.015*gr*Mn,Bu=30*ad(-Pn((cn-275)/25,2)),Cs=2*es(Pn(gr,7)/(Pn(gr,7)+Pn(25,7))),wl=-Cs*Ts(2*Be(Bu)),Fi=es(Pn(zn/(ye*_l),2)+Pn(ts/(Pe*ju),2)+Pn(On/(ze*mc),2)+wl*(ts/(Pe*ju))*(On/(ze*mc)));return Xr(0,Sr(100,Fi))},Nh=O,si=function(K,oe,ye){ye===void 0&&(ye="lab"),K=new Nh(K),oe=new Nh(oe);var Pe=K.get(ye),ze=oe.get(ye),Ge=0;for(var Be in Pe){var Ke=(Pe[Be]||0)-(ze[Be]||0);Ge+=Ke*Ke}return Math.sqrt(Ge)},od=O,gc=function(){for(var K=[],oe=arguments.length;oe--;)K[oe]=arguments[oe];try{return new(Function.prototype.bind.apply(od,[null].concat(K))),!0}catch{return!1}},Sf=T,qc=ed,Rv={cool:function(){return qc([Sf.hsl(180,1,.9),Sf.hsl(250,.7,.4)])},hot:function(){return qc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Lu={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yc=0,Of=Object.keys(Lu);yc`#${[parseInt(r.substring(1,3),16),parseInt(r.substring(3,5),16),parseInt(r.substring(5,7),16)].map(t=>{let n=parseInt((t*(100+e)/100).toString(),10);const i=(n=n<255?n:255).toString(16);return i.length===1?`0${i}`:i}).join("")}`;function zG(r){let e=0,t=0;const n=r.length;for(;t{const s=UG.contrast(r,o);s>a&&(i=o,a=s)}),ac%(d-f)+f;return UG.oklch(l(o,n,t)/100,l(s,a,i)/100,l(u,0,360)).hex()}function mle(r,e){const t=yle(r,e),n=gle(t,-20),i=qG(t,["#2A2C34","#FFFFFF"]);return{backgroundColor:t,borderColor:n,textColor:i}}const QP=Yu.palette.neutral[40],GG=Yu.palette.neutral[40],JP=(r="",e="")=>r.toLowerCase().localeCompare(e.toLowerCase());function ble(r){var e;const[t]=r;if(t===void 0)return GG;const n={};for(const o of r)n[o]=((e=n[o])!==null&&e!==void 0?e:0)+1;let i=0,a=t;for(const[o,s]of Object.entries(n))s>i&&(i=s,a=o);return a}function L9(r){return Object.entries(r).reduce((e,[t,n])=>(e[t]={mostCommonColor:ble(n),totalCount:n.length},e),{})}const _le=[/^name$/i,/^title$/i,/^label$/i,/name$/i,/description$/i,/^.+/];function wle(r){const e=r.filter(n=>n.type==="property").map(n=>n.captionKey);for(const n of _le){const i=e.find(a=>n.test(a));if(i!==void 0)return{captionKey:i,type:"property"}}const t=r.find(n=>n.type==="type");return t||r.find(n=>n.type==="id")}const xle=r=>{const e=Object.keys(r.properties).map(i=>({captionKey:i,type:"property"}));e.push({type:"id"},{type:"type"});const t=wle(e);if((t==null?void 0:t.type)==="property"){const i=r.properties[t.captionKey];if(i!==void 0)return i.type==="string"?[{value:i.stringified.slice(1,-1)}]:[{value:i.stringified}]}const[n]=r.labels;return(t==null?void 0:t.type)==="type"&&n!==void 0?[{value:n}]:[{value:r.id}]};function Ele(r,e){const t={},n={},i={},a={},o=r.map(f=>{var d;const[h]=f.labels,p=Object.assign(Object.assign({captions:xle(f),color:(d=f.color)!==null&&d!==void 0?d:h===void 0?GG:mle(h).backgroundColor},f),{labels:void 0,properties:void 0});return i[f.id]={color:p.color,id:f.id,labelsSorted:[...f.labels].sort(JP),properties:f.properties},f.labels.forEach(g=>{var y;t[g]=[...(y=t[g])!==null&&y!==void 0?y:[],p.color]}),p}),s=e.map(f=>{var d,h,p;return a[f.id]={color:(d=f.color)!==null&&d!==void 0?d:QP,id:f.id,properties:f.properties,type:f.type},n[f.type]=[...(h=n[f.type])!==null&&h!==void 0?h:[],(p=f.color)!==null&&p!==void 0?p:QP],Object.assign(Object.assign({captions:[{value:f.type}],color:QP},f),{properties:void 0,type:void 0})}),u=L9(t),l=L9(n);return{dataLookupTable:{labelMetaData:u,labels:Object.keys(u).sort((f,d)=>JP(f,d)),nodes:i,relationships:a,typeMetaData:l,types:Object.keys(l).sort((f,d)=>JP(f,d))},nodes:o,rels:s}}const j9=/(?:https?|s?ftp|bolt):\/\/(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi,Sle=({text:r})=>{var e;const t=r??"",n=(e=t.match(j9))!==null&&e!==void 0?e:[];return Ce.jsx(Ce.Fragment,{children:t.split(j9).map((i,a)=>Ce.jsxs(ao.Fragment,{children:[i,n[a]&&Ce.jsx("a",{href:n[a],target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:n[a]})]},`clickable-url-${a}`))})},Ole=ao.memo(Sle),Tle="…",Cle=900,Ale=150,Rle=300,Ple=({value:r,width:e,type:t})=>{const[n,i]=me.useState(!1),a=e>Cle?Rle:Ale,o=()=>{i(!0)};let s=n?r:r.slice(0,a);const u=s.length!==r.length;return s+=u?Tle:"",Ce.jsxs(Ce.Fragment,{children:[t.startsWith("Array")&&"[",Ce.jsx(Ole,{text:s}),u&&Ce.jsx("button",{type:"button",onClick:o,className:"ndl-properties-show-all-button",children:" Show all"}),t.startsWith("Array")&&"]"]})},Mle=({properties:r,paneWidth:e})=>Ce.jsxs("div",{className:"ndl-graph-visualization-properties-table",children:[Ce.jsxs("div",{className:"ndl-properties-header",children:[Ce.jsx(Ed,{variant:"body-small",className:"ndl-properties-header-key",children:"Key"}),Ce.jsx(Ed,{variant:"body-small",children:"Value"})]}),Object.entries(r).map(([t,{stringified:n,type:i}])=>Ce.jsxs("div",{className:"ndl-properties-row",children:[Ce.jsx(Ed,{variant:"body-small",className:"ndl-properties-key",children:t}),Ce.jsx("div",{className:"ndl-properties-value",children:Ce.jsx(Ple,{value:n,width:e,type:i})}),Ce.jsx("div",{className:"ndl-properties-clipboard-button",children:Ce.jsx(z7,{textToCopy:`${t}: ${n}`,size:"small",tooltipProps:{placement:"left",type:"simple"}})})]},t))]}),Dle=({paneWidth:r=400})=>{const{selected:e,nvlGraph:t}=Vl(),n=me.useMemo(()=>{const[s]=e.nodeIds;if(s!==void 0)return t.dataLookupTable.nodes[s]},[e,t]),i=me.useMemo(()=>{const[s]=e.relationshipIds;if(s!==void 0)return t.dataLookupTable.relationships[s]},[e,t]),a=me.useMemo(()=>{if(n)return{data:n,dataType:"node"};if(i)return{data:i,dataType:"relationship"}},[n,i]);if(a===void 0)return null;const o=[{key:"",type:"String",value:`${a.data.id}`},...Object.keys(a.data.properties).map(s=>({key:s,type:a.data.properties[s].type,value:a.data.properties[s].stringified}))];return Ce.jsxs(Ce.Fragment,{children:[Ce.jsxs(ty.Title,{children:[Ce.jsx("h6",{className:"ndl-details-title",children:a.dataType==="node"?"Node details":"Relationship details"}),Ce.jsx(z7,{textToCopy:o.map(s=>`${s.key}: ${s.value}`).join(` +`),size:"small"})]}),Ce.jsxs(ty.Content,{children:[Ce.jsx("div",{className:"ndl-details-tags",children:a.dataType==="node"?a.data.labelsSorted.map(s=>{var u,l;return Ce.jsx(Ax,{type:"node",color:(l=(u=t.dataLookupTable.labelMetaData[s])===null||u===void 0?void 0:u.mostCommonColor)!==null&&l!==void 0?l:"",as:"span",htmlAttributes:{tabIndex:0},children:s},s)}):Ce.jsx(Ax,{type:"relationship",color:a.data.color,as:"span",htmlAttributes:{tabIndex:0},children:a.data.type},a.data.type)}),Ce.jsx("div",{className:"ndl-details-divider"}),Ce.jsx(Mle,{properties:a.data.properties,paneWidth:r})]})]})},kle=({children:r})=>{const[e,t]=me.useState(0),n=me.useRef(null),i=u=>{var l,c;const f=(c=(l=n.current)===null||l===void 0?void 0:l.children[u])===null||c===void 0?void 0:c.children[0];f instanceof HTMLElement&&f.focus()},a=me.useMemo(()=>ao.Children.count(r),[r]),o=me.useCallback(u=>{u>=a?t(a-1):t(Math.max(0,u))},[a,t]),s=u=>{let l=e;u.key==="ArrowRight"||u.key==="ArrowDown"?(l=(e+1)%ao.Children.count(r),o(l)):(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(l=(e-1+ao.Children.count(r))%ao.Children.count(r),o(l)),i(l)};return Ce.jsx("ul",{onKeyDown:u=>s(u),ref:n,style:{all:"inherit",listStyleType:"none"},children:ao.Children.map(r,(u,l)=>{if(!ao.isValidElement(u))return null;const c=me.cloneElement(u,{tabIndex:e===l?0:-1});return Ce.jsx("li",{children:c},l)})})},Ile=r=>typeof r=="function";function B9({initiallyShown:r,children:e,isButtonGroup:t}){const[n,i]=me.useState(!1),a=()=>i(f=>!f),o=e.length,s=o>r,u=n?o:r,l=o-u;if(o===0)return null;const c=e.slice(0,u).map(f=>Ile(f)?f():f);return Ce.jsxs(Ce.Fragment,{children:[t===!0?Ce.jsx(kle,{children:c}):Ce.jsx("div",{style:{all:"inherit"},children:c}),s&&Ce.jsx(nX,{size:"small",onClick:a,children:n?"Show less":`Show all (${l} more)`})]})}const F9=25,Nle=()=>{const{nvlGraph:r}=Vl();return Ce.jsxs(Ce.Fragment,{children:[Ce.jsx(ty.Title,{children:Ce.jsx(Ed,{variant:"title-4",children:"Results overview"})}),Ce.jsx(ty.Content,{children:Ce.jsxs("div",{className:"ndl-graph-visualization-overview-panel",children:[r.dataLookupTable.labels.length>0&&Ce.jsxs("div",{className:"ndl-overview-section",children:[Ce.jsx("div",{className:"ndl-overview-header",children:Ce.jsxs("span",{children:["Nodes",` (${r.nodes.length.toLocaleString()})`]})}),Ce.jsx("div",{className:"ndl-overview-items",children:Ce.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.labels.map(e=>function(){var n,i,a,o;return Ce.jsxs(Ax,{type:"node",htmlAttributes:{tabIndex:-1},color:(i=(n=r.dataLookupTable.labelMetaData[e])===null||n===void 0?void 0:n.mostCommonColor)!==null&&i!==void 0?i:"",as:"span",children:[e," (",(o=(a=r.dataLookupTable.labelMetaData[e])===null||a===void 0?void 0:a.totalCount)!==null&&o!==void 0?o:0,")"]},e)})})})]}),r.dataLookupTable.types.length>0&&Ce.jsxs("div",{className:"ndl-overview-relationships-section",children:[Ce.jsxs("span",{className:"ndl-overview-relationships-title",children:["Relationships",` (${r.rels.length.toLocaleString()})`]}),Ce.jsx("div",{className:"ndl-overview-items",children:Ce.jsx(B9,{initiallyShown:F9,isButtonGroup:!0,children:r.dataLookupTable.types.map(e=>{var t,n,i,a;return Ce.jsxs(Ax,{type:"relationship",htmlAttributes:{tabIndex:-1},color:(n=(t=r.dataLookupTable.typeMetaData[e])===null||t===void 0?void 0:t.mostCommonColor)!==null&&n!==void 0?n:"",as:"span",children:[e," (",(a=(i=r.dataLookupTable.typeMetaData[e])===null||i===void 0?void 0:i.totalCount)!==null&&a!==void 0?a:0,")"]},e)})})})]})]})})]})},Lle=()=>{const{selected:r}=Vl();return me.useMemo(()=>r.nodeIds.length>0||r.relationshipIds.length>0,[r])?Ce.jsx(Dle,{}):Ce.jsx(Nle,{})},Gw=r=>!I9&&r.ctrlKey||I9&&r.metaKey,lb=r=>r.target instanceof HTMLElement?r.target.isContentEditable||["INPUT","TEXTAREA"].includes(r.target.tagName):!1;function jle({selected:r,setSelected:e,gesture:t,interactionMode:n,setInteractionMode:i,mouseEventCallbacks:a,nvlGraph:o,highlightedNodeIds:s,highlightedRelationshipIds:u}){const l=me.useCallback(De=>{n==="select"&&De.key===" "&&i("pan")},[n,i]),c=me.useCallback(De=>{n==="pan"&&De.key===" "&&i("select")},[n,i]);me.useEffect(()=>(document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}),[l,c]);const{onBoxSelect:f,onLassoSelect:d,onLassoStarted:h,onBoxStarted:p,onPan:g=!0,onHover:y,onHoverNodeMargin:b,onNodeClick:_,onRelationshipClick:m,onDragStart:x,onDragEnd:S,onDrawEnded:O,onDrawStarted:E,onCanvasClick:T,onNodeDoubleClick:P,onRelationshipDoubleClick:I}=a,k=me.useCallback(De=>{lb(De)||(e({nodeIds:[],relationshipIds:[]}),typeof T=="function"&&T(De))},[T,e]),L=me.useCallback((De,Ne)=>{i("drag");const Te=De.map(Y=>Y.id);if(r.nodeIds.length===0||Gw(Ne)){e({nodeIds:Te,relationshipIds:r.relationshipIds});return}e({nodeIds:Te,relationshipIds:r.relationshipIds}),typeof x=="function"&&x(De,Ne)},[e,x,r,i]),B=me.useCallback((De,Ne)=>{typeof S=="function"&&S(De,Ne),i("select")},[S,i]),j=me.useCallback(De=>{typeof E=="function"&&E(De)},[E]),z=me.useCallback((De,Ne,Te)=>{typeof O=="function"&&O(De,Ne,Te)},[O]),H=me.useCallback((De,Ne,Te)=>{if(!lb(Te)){if(Gw(Te))if(r.nodeIds.includes(De.id)){const Q=r.nodeIds.filter(ie=>ie!==De.id);e({nodeIds:Q,relationshipIds:r.relationshipIds})}else{const Q=[...r.nodeIds,De.id];e({nodeIds:Q,relationshipIds:r.relationshipIds})}else e({nodeIds:[De.id],relationshipIds:[]});typeof _=="function"&&_(De,Ne,Te)}},[e,r,_]),q=me.useCallback((De,Ne,Te)=>{if(!lb(Te)){if(Gw(Te))if(r.relationshipIds.includes(De.id)){const Q=r.relationshipIds.filter(ie=>ie!==De.id);e({nodeIds:r.nodeIds,relationshipIds:Q})}else{const Q=[...r.relationshipIds,De.id];e({nodeIds:r.nodeIds,relationshipIds:Q})}else e({nodeIds:[],relationshipIds:[De.id]});typeof m=="function"&&m(De,Ne,Te)}},[e,r,m]),W=me.useCallback((De,Ne,Te)=>{lb(Te)||typeof P=="function"&&P(De,Ne,Te)},[P]),$=me.useCallback((De,Ne,Te)=>{lb(Te)||typeof I=="function"&&I(De,Ne,Te)},[I]),J=me.useCallback((De,Ne,Te)=>{const Y=De.map(ie=>ie.id),Q=Ne.map(ie=>ie.id);if(Gw(Te)){const ie=r.nodeIds,we=r.relationshipIds,Ee=(Ye,ot)=>[...new Set([...Ye,...ot].filter(mt=>!Ye.includes(mt)||!ot.includes(mt)))],Me=Ee(ie,Y),Ie=Ee(we,Q);e({nodeIds:Me,relationshipIds:Ie})}else e({nodeIds:Y,relationshipIds:Q})},[e,r]),X=me.useCallback(({nodes:De,rels:Ne},Te)=>{J(De,Ne,Te),typeof d=="function"&&d({nodes:De,rels:Ne},Te)},[J,d]),Z=me.useCallback(({nodes:De,rels:Ne},Te)=>{J(De,Ne,Te),typeof f=="function"&&f({nodes:De,rels:Ne},Te)},[J,f]),ue=n==="draw",re=n==="select",ne=re&&t==="box",le=re&&t==="lasso",ce=n==="pan"||re&&t==="single",pe=n==="drag"||n==="select",fe=me.useMemo(()=>{var De;return Object.assign(Object.assign({},a),{onBoxSelect:ne?Z:!1,onBoxStarted:ne?p:!1,onCanvasClick:re?k:!1,onDragEnd:pe?B:!1,onDragStart:pe?L:!1,onDrawEnded:ue?z:!1,onDrawStarted:ue?j:!1,onHover:re?y:!1,onHoverNodeMargin:ue?b:!1,onLassoSelect:le?X:!1,onLassoStarted:le?h:!1,onNodeClick:re?H:!1,onNodeDoubleClick:re?W:!1,onPan:ce?g:!1,onRelationshipClick:re?q:!1,onRelationshipDoubleClick:re?$:!1,onZoom:(De=a.onZoom)!==null&&De!==void 0?De:!0})},[pe,ne,le,ce,ue,re,a,Z,p,k,B,L,z,j,y,b,X,h,H,W,g,q,$]),se=me.useMemo(()=>({nodeIds:new Set(r.nodeIds),relIds:new Set(r.relationshipIds)}),[r]),de=me.useMemo(()=>s!==void 0?new Set(s):null,[s]),ge=me.useMemo(()=>u!==void 0?new Set(u):null,[u]),Oe=me.useMemo(()=>o.nodes.map(De=>Object.assign(Object.assign({},De),{disabled:de?!de.has(De.id):!1,selected:se.nodeIds.has(De.id)})),[o.nodes,se,de]),ke=me.useMemo(()=>o.rels.map(De=>Object.assign(Object.assign({},De),{disabled:ge?!ge.has(De.id):!1,selected:se.relIds.has(De.id)})),[o.rels,se,ge]);return{nodesWithState:Oe,relsWithState:ke,wrappedMouseEventCallbacks:fe}}var Ble=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);iCe.jsx("div",{className:Vn(Fle[t],e),children:r}),Ule={disableTelemetry:!0,disableWebGL:!0,maxZoom:3,minZoom:.05,relationshipThreshold:.55},Hw={bottomLeftIsland:null,bottomRightIsland:Ce.jsxs($X,{orientation:"vertical",isFloating:!0,size:"small",children:[Ce.jsx(NG,{})," ",Ce.jsx(LG,{})," ",Ce.jsx(jG,{})]}),topLeftIsland:null,topRightIsland:Ce.jsxs("div",{className:"ndl-graph-visualization-default-download-group",children:[Ce.jsx(FG,{})," ",Ce.jsx(BG,{})]})};function ql(r){var e,t,{nvlRef:n,nvlCallbacks:i,nvlOptions:a,sidepanel:o,nodes:s,rels:u,highlightedNodeIds:l,highlightedRelationshipIds:c,topLeftIsland:f=Hw.topLeftIsland,topRightIsland:d=Hw.topRightIsland,bottomLeftIsland:h=Hw.bottomLeftIsland,bottomRightIsland:p=Hw.bottomRightIsland,gesture:g="single",setGesture:y,layout:b,setLayout:_,selected:m,setSelected:x,interactionMode:S,setInteractionMode:O,mouseEventCallbacks:E={},className:T,style:P,htmlAttributes:I,ref:k,as:L}=r,B=Ble(r,["nvlRef","nvlCallbacks","nvlOptions","sidepanel","nodes","rels","highlightedNodeIds","highlightedRelationshipIds","topLeftIsland","topRightIsland","bottomLeftIsland","bottomRightIsland","gesture","setGesture","layout","setLayout","selected","setSelected","interactionMode","setInteractionMode","mouseEventCallbacks","className","style","htmlAttributes","ref","as"]);const j=me.useMemo(()=>n??ao.createRef(),[n]),z=me.useId(),{theme:H}=E2(),{bg:q,border:W,text:$}=Yu.theme[H].color.neutral,[J,X]=me.useState(0);me.useEffect(()=>{X(Y=>Y+1)},[H]);const[Z,ue]=Lg({isControlled:S!==void 0,onChange:O,state:S??"select"}),[re,ne]=Lg({isControlled:m!==void 0,onChange:x,state:m??{nodeIds:[],relationshipIds:[]}}),[le,ce]=Lg({isControlled:b!==void 0,onChange:_,state:b??"d3Force"}),pe=me.useMemo(()=>Ele(s,u),[s,u]),{nodesWithState:fe,relsWithState:se,wrappedMouseEventCallbacks:de}=jle({gesture:g,highlightedNodeIds:l,highlightedRelationshipIds:c,interactionMode:Z,mouseEventCallbacks:E,nvlGraph:pe,selected:re,setInteractionMode:ue,setSelected:ne}),[ge,Oe]=Lg({isControlled:(o==null?void 0:o.isSidePanelOpen)!==void 0,onChange:o==null?void 0:o.setIsSidePanelOpen,state:(e=o==null?void 0:o.isSidePanelOpen)!==null&&e!==void 0?e:!0}),[ke,De]=Lg({isControlled:(o==null?void 0:o.sidePanelWidth)!==void 0,onChange:o==null?void 0:o.onSidePanelResize,state:(t=o==null?void 0:o.sidePanelWidth)!==null&&t!==void 0?t:400}),Ne=me.useMemo(()=>o===void 0?{children:Ce.jsx(ql.SingleSelectionSidePanelContents,{}),isSidePanelOpen:ge,onSidePanelResize:De,setIsSidePanelOpen:Oe,sidePanelWidth:ke}:o,[o,ge,Oe,ke,De]),Te=L??"div";return Ce.jsx(Te,Object.assign({ref:k,className:Vn("ndl-graph-visualization-container",T),style:P},I,{children:Ce.jsxs(kG.Provider,{value:{gesture:g,interactionMode:Z,layout:le,nvlGraph:pe,nvlInstance:j,selected:re,setGesture:y,setLayout:ce,sidepanel:Ne},children:[Ce.jsxs("div",{className:"ndl-graph-visualization",children:[Ce.jsx(Que,Object.assign({layout:le,nodes:fe,rels:se,nvlOptions:Object.assign(Object.assign(Object.assign({},Ule),{instanceId:z,styling:{defaultRelationshipColor:W.strongest,disabledItemColor:q.strong,disabledItemFontColor:$.weakest,dropShadowColor:W.weak,selectedInnerBorderColor:q.default}}),a),nvlCallbacks:Object.assign({onLayoutComputing(Y){var Q;Y||(Q=j.current)===null||Q===void 0||Q.fit(j.current.getNodes().map(ie=>ie.id),{noPan:!0})}},i),mouseEventCallbacks:de,ref:j},B),J),f!==null&&Ce.jsx(Vw,{placement:"top-left",children:f}),d!==null&&Ce.jsx(Vw,{placement:"top-right",children:d}),h!==null&&Ce.jsx(Vw,{placement:"bottom-left",children:h}),p!==null&&Ce.jsx(Vw,{placement:"bottom-right",children:p})]}),Ne&&Ce.jsx(ty,{sidepanel:Ne})]})}))}ql.ZoomInButton=NG;ql.ZoomOutButton=LG;ql.ZoomToFitButton=jG;ql.ToggleSidePanelButton=BG;ql.DownloadButton=FG;ql.BoxSelectButton=ile;ql.LassoSelectButton=ale;ql.SingleSelectButton=nle;ql.SearchButton=ole;ql.SingleSelectionSidePanelContents=Lle;ql.LayoutSelectButton=ule;ql.GestureSelectButton=cle;function zle(r){return Array.isArray(r)&&r.every(e=>typeof e=="string")}function qle(r){return r.map(e=>{const t=zle(e.properties.labels)?e.properties.labels:[];return{...e,id:e.id,labels:e.caption?[e.caption]:t,properties:Object.entries(e.properties).reduce((n,[i,a])=>{if(i==="labels")return n;const o=typeof a;return n[i]={stringified:o==="string"?`"${a}"`:String(a),type:o},n},{})}})}function Gle(r){return r.map(e=>({...e,id:e.id,type:e.caption??e.properties.type??"",properties:Object.entries(e.properties).reduce((t,[n,i])=>(n==="type"||(t[n]={stringified:String(i),type:typeof i}),t),{}),from:e.from,to:e.to}))}class Vle extends me.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[neo4j-viz] Rendering error:",e,t.componentStack)}render(){return this.state.error?Ce.jsxs("div",{style:{padding:"24px",fontFamily:"system-ui, sans-serif",color:"#c0392b",background:"#fdf0ef",borderRadius:"8px",border:"1px solid #e6b0aa",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[Ce.jsx("h3",{style:{margin:"0 0 8px"},children:"Graph rendering failed"}),Ce.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontSize:"13px",color:"#6c3428"},children:this.state.error.message})]}):this.props.children}}function Hle(){if(document.body.classList.contains("vscode-light"))return"light";if(document.body.classList.contains("vscode-dark"))return"dark";const e=window.getComputedStyle(document.body,null).getPropertyValue("background-color").match(/\d+/g);if(!e||e.length<3)return"light";const t=Number(e[0])*.2126+Number(e[1])*.7152+Number(e[2])*.0722;return t===0&&e.length>3&&e[3]==="0"?"light":t<128?"dark":"light"}function Wle(r){me.useEffect(()=>{const e=r==="auto"?Hle():r;document.documentElement.className=`ndl-theme-${e}`},[r])}function Yle(){const[r]=Wy("nodes"),[e]=Wy("relationships"),[t]=Wy("options"),[n]=Wy("height"),[i]=Wy("width"),[a]=Wy("theme");Wle(a??"auto");const{layout:o,nvlOptions:s,zoom:u,pan:l,layoutOptions:c}=t??{},[f,d]=me.useMemo(()=>[qle(r??[]),Gle(e??[])],[r,e]),h=me.useMemo(()=>({...s,minZoom:0,maxZoom:1e3,disableWebWorkers:!0}),[s]),[p,g]=me.useState(!1),[y,b]=me.useState(300);return Ce.jsx("div",{style:{height:n??"600px",width:i??"100%"},children:Ce.jsx(ql,{nodes:f,rels:d,layout:o,nvlOptions:h,zoom:u,pan:l,layoutOptions:c,sidepanel:{isSidePanelOpen:p,setIsSidePanelOpen:g,onSidePanelResize:b,sidePanelWidth:y,children:Ce.jsx(ql.SingleSelectionSidePanelContents,{})}})})}function Xle(){return Ce.jsx(Vle,{children:Ce.jsx(Yle,{})})}const $le=cV(Xle),Kle={render:$le},pE=window.__NEO4J_VIZ_DATA__;if(!pE)throw document.body.innerHTML=`

Missing visualization data

Expected window.__NEO4J_VIZ_DATA__ to be set.

diff --git a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js index e49a9a2..c1be496 100644 --- a/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js +++ b/python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js @@ -76,7 +76,7 @@ var QD; function QG() { return QD || (QD = 1, VE.exports = ZG()), VE.exports; } -var Te = QG(), HE = { exports: {} }, fn = {}; +var Ce = QG(), HE = { exports: {} }, fn = {}; /** * @license React * react.production.js @@ -1167,7 +1167,7 @@ function nV() { } return (C = v ? v.displayName || v.name : "") ? ke(C) : ""; } - function Ce(v, w) { + function Te(v, w) { switch (v.tag) { case 26: case 27: @@ -1196,7 +1196,7 @@ function nV() { try { var w = "", C = null; do - w += Ce(v, C), C = v, v = v.return; + w += Te(v, C), C = v, v = v.return; while (v); return w; } catch (M) { @@ -11525,7 +11525,7 @@ const pV = (r) => { "ndl-divider-horizontal": e === "horizontal", "ndl-divider-vertical": e === "vertical" }), l = t || "div"; - return Te.jsx(l, Object.assign({ className: u, style: n, role: "separator", "aria-orientation": e, ref: o }, s, a)); + return Ce.jsx(l, Object.assign({ className: u, style: n, role: "separator", "aria-orientation": e, ref: o }, s, a)); }; var gV = function(r, e) { var t = {}; @@ -11541,12 +11541,12 @@ function zo(r) { var { className: n = "", style: i, ref: a, htmlAttributes: o } = t, s = gV(t, ["className", "style", "ref", "htmlAttributes"]); return ( // @ts-expect-error – Original is of any type and we don't know what props it accepts - Te.jsx(r, Object.assign({ strokeWidth: 1.5, style: i, className: `${yV} ${n}`.trim(), "aria-hidden": "true" }, s, o, { ref: a })) + Ce.jsx(r, Object.assign({ strokeWidth: 1.5, style: i, className: `${yV} ${n}`.trim(), "aria-hidden": "true" }, s, o, { ref: a })) ); }; return ao.memo(e); } -const mV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M13.0312 13.5625C12.6824 13.5625 12.337 13.4938 12.0147 13.3603C11.6925 13.2268 11.3997 13.0312 11.153 12.7845C10.9063 12.5378 10.7107 12.245 10.5772 11.9228C10.4437 11.6005 10.375 11.2551 10.375 10.9062C10.375 10.5574 10.4437 10.212 10.5772 9.88975C10.7107 9.56748 10.9063 9.27465 11.153 9.028C11.3997 8.78134 11.6925 8.58568 12.0147 8.45219C12.337 8.31871 12.6824 8.25 13.0312 8.25C13.3801 8.25 13.7255 8.31871 14.0478 8.45219C14.37 8.58568 14.6628 8.78134 14.9095 9.028C15.1562 9.27465 15.3518 9.56748 15.4853 9.88975C15.6188 10.212 15.6875 10.5574 15.6875 10.9062C15.6875 11.2551 15.6188 11.6005 15.4853 11.9228C15.3518 12.245 15.1562 12.5378 14.9095 12.7845C14.6628 13.0312 14.37 13.2268 14.0478 13.3603C13.7255 13.4938 13.3801 13.5625 13.0312 13.5625ZM13.0312 13.5625V16.75M13.0312 16.75C13.4539 16.75 13.8593 16.9179 14.1582 17.2168C14.4571 17.5157 14.625 17.9211 14.625 18.3438C14.625 18.7664 14.4571 19.1718 14.1582 19.4707C13.8593 19.7696 13.4539 19.9375 13.0312 19.9375C12.6086 19.9375 12.2032 19.7696 11.9043 19.4707C11.6054 19.1718 11.4375 18.7664 11.4375 18.3438C11.4375 17.9211 11.6054 17.5157 11.9043 17.2168C12.2032 16.9179 12.6086 16.75 13.0312 16.75ZM14.9091 9.02926L17.2182 6.72009M15.3645 12.177L16.983 13.7955M11.1548 12.7827L6.71997 17.2176M10.5528 9.95081L7.4425 8.08435M16.75 5.59375C16.75 6.01644 16.9179 6.42182 17.2168 6.7207C17.5157 7.01959 17.9211 7.1875 18.3438 7.1875C18.7664 7.1875 19.1718 7.01959 19.4707 6.7207C19.7696 6.42182 19.9375 6.01644 19.9375 5.59375C19.9375 5.17106 19.7696 4.76568 19.4707 4.4668C19.1718 4.16791 18.7664 4 18.3438 4C17.9211 4 17.5157 4.16791 17.2168 4.4668C16.9179 4.76568 16.75 5.17106 16.75 5.59375ZM16.75 14.625C16.75 15.0477 16.9179 15.4531 17.2168 15.752C17.5157 16.0508 17.9211 16.2187 18.3438 16.2187C18.7664 16.2187 19.1718 16.0508 19.4707 15.752C19.7696 15.4531 19.9375 15.0477 19.9375 14.625C19.9375 14.2023 19.7696 13.7969 19.4707 13.498C19.1718 13.1992 18.7664 13.0312 18.3438 13.0312C17.9211 13.0312 17.5157 13.1992 17.2168 13.498C16.9179 13.7969 16.75 14.2023 16.75 14.625ZM4 18.3438C4 18.553 4.04122 18.7603 4.12132 18.9537C4.20141 19.147 4.31881 19.3227 4.4668 19.4707C4.61479 19.6187 4.79049 19.7361 4.98385 19.8162C5.17721 19.8963 5.38446 19.9375 5.59375 19.9375C5.80304 19.9375 6.01029 19.8963 6.20365 19.8162C6.39701 19.7361 6.57271 19.6187 6.7207 19.4707C6.86869 19.3227 6.98609 19.147 7.06618 18.9537C7.14628 18.7603 7.1875 18.553 7.1875 18.3438C7.1875 18.1345 7.14628 17.9272 7.06618 17.7338C6.98609 17.5405 6.86869 17.3648 6.7207 17.2168C6.57271 17.0688 6.39701 16.9514 6.20365 16.8713C6.01029 16.7912 5.80304 16.75 5.59375 16.75C5.38446 16.75 5.17721 16.7912 4.98385 16.8713C4.79049 16.9514 4.61479 17.0688 4.4668 17.2168C4.31881 17.3648 4.20141 17.5405 4.12132 17.7338C4.04122 17.9272 4 18.1345 4 18.3438ZM4.53125 7.1875C4.53125 7.61019 4.69916 8.01557 4.99805 8.31445C5.29693 8.61334 5.70231 8.78125 6.125 8.78125C6.54769 8.78125 6.95307 8.61334 7.25195 8.31445C7.55084 8.01557 7.71875 7.61019 7.71875 7.1875C7.71875 6.76481 7.55084 6.35943 7.25195 6.06055C6.95307 5.76166 6.54769 5.59375 6.125 5.59375C5.70231 5.59375 5.29693 5.76166 4.99805 6.06055C4.69916 6.35943 4.53125 6.76481 4.53125 7.1875Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), bV = zo(mV), _V = (r) => Te.jsxs("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: [Te.jsx("rect", { x: 5.94, y: 5.94, width: 12.12, height: 12.12, rx: 1.5, stroke: "currentColor", strokeWidth: 1.5 }), Te.jsx("path", { d: "M3 9.75V5.25C3 4.01 4.01 3 5.25 3H9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Te.jsx("path", { d: "M14.25 3H18.75C19.99 3 21 4.01 21 5.25V9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Te.jsx("path", { d: "M3 14.25V18.75C3 19.99 4.01 21 5.25 21H9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Te.jsx("path", { d: "M21 14.25V18.75C21 19.99 19.99 21 18.75 21H14.25", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })] })), wV = zo(_V), xV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M11.9992 6.60001C11.5218 6.60001 11.064 6.41036 10.7264 6.0728C10.3889 5.73523 10.1992 5.27739 10.1992 4.8C10.1992 4.32261 10.3889 3.86477 10.7264 3.52721C11.064 3.18964 11.5218 3 11.9992 3C12.4766 3 12.9344 3.18964 13.272 3.52721C13.6096 3.86477 13.7992 4.32261 13.7992 4.8C13.7992 5.27739 13.6096 5.73523 13.272 6.0728C12.9344 6.41036 12.4766 6.60001 11.9992 6.60001ZM11.9992 6.60001V17.4M11.9992 17.4C12.4766 17.4 12.9344 17.5897 13.272 17.9272C13.6096 18.2648 13.7992 18.7226 13.7992 19.2C13.7992 19.6774 13.6096 20.1353 13.272 20.4728C12.9344 20.8104 12.4766 21 11.9992 21C11.5218 21 11.064 20.8104 10.7264 20.4728C10.3889 20.1353 10.1992 19.6774 10.1992 19.2C10.1992 18.7226 10.3889 18.2648 10.7264 17.9272C11.064 17.5897 11.5218 17.4 11.9992 17.4ZM5.39844 17.4C5.39844 16.1269 5.90415 14.906 6.80433 14.0059C7.7045 13.1057 8.9254 12.6 10.1984 12.6H13.7984C15.0715 12.6 16.2924 13.1057 17.1926 14.0059C18.0927 14.906 18.5985 16.1269 18.5985 17.4M3.59961 19.2C3.59961 19.6774 3.78925 20.1353 4.12682 20.4728C4.46438 20.8104 4.92222 21 5.39961 21C5.877 21 6.33484 20.8104 6.67241 20.4728C7.00997 20.1353 7.19961 19.6774 7.19961 19.2C7.19961 18.7226 7.00997 18.2648 6.67241 17.9272C6.33484 17.5897 5.877 17.4 5.39961 17.4C4.92222 17.4 4.46438 17.5897 4.12682 17.9272C3.78925 18.2648 3.59961 18.7226 3.59961 19.2ZM16.8008 19.2C16.8008 19.6774 16.9904 20.1353 17.328 20.4728C17.6656 20.8104 18.1234 21 18.6008 21C19.0782 21 19.536 20.8104 19.8736 20.4728C20.2111 20.1353 20.4008 19.6774 20.4008 19.2C20.4008 18.7226 20.2111 18.2648 19.8736 17.9272C19.536 17.5897 19.0782 17.4 18.6008 17.4C18.1234 17.4 17.6656 17.5897 17.328 17.9272C16.9904 18.2648 16.8008 18.7226 16.8008 19.2Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), EV = zo(xV), SV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M9.95398 16.3762C11.4106 18.0304 12.3812 19.1337 12.3768 21.2003M7.8431 20.2339C10.0323 20.2339 10.5789 18.6865 10.5789 17.912C10.5789 17.1405 10.0309 15.593 7.8431 15.593C5.65388 15.593 5.1073 17.1405 5.1073 17.9135C5.1073 18.6865 5.65532 20.2339 7.8431 20.2339ZM11.9941 16.0464C4.49482 16.0464 2.62 11.6305 2.62 9.4225C2.62 7.21598 4.49482 2.80005 11.9941 2.80005C19.4934 2.80005 21.3682 7.21598 21.3682 9.4225C21.3682 11.6305 19.4934 16.0464 11.9941 16.0464Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), z9 = zo(SV), OV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M14.0601 5.25V18.75M20.4351 18C20.4351 18.45 20.1351 18.75 19.6851 18.75H4.31006C3.86006 18.75 3.56006 18.45 3.56006 18V6C3.56006 5.55 3.86006 5.25 4.31006 5.25H19.6851C20.1351 5.25 20.4351 5.55 20.4351 6V18Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), TV = zo(OV), CV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M16.3229 22.0811L11.9385 14.4876M11.9385 14.4876L8.6037 19.5387L5.09035 2.62536L17.9807 14.1249L11.9385 14.4876Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), l2 = zo(CV), AV = (r) => Te.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Te.jsx("path", { d: "M20.9998 19.0001C20.9998 20.1046 20.1046 20.9998 19.0001 20.9998M3 4.99969C3 3.8953 3.8953 3 4.99969 3M19.0001 3C20.1046 3 20.9998 3.8953 20.9998 4.99969M3 19.0001C3 20.1046 3.8953 20.9998 4.99969 20.9998M20.9972 10.0067V14.0061M3 14.0061V10.0067M9.99854 3H13.9979M9.99854 20.9972H13.9979", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), q9 = zo(AV); +const mV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M13.0312 13.5625C12.6824 13.5625 12.337 13.4938 12.0147 13.3603C11.6925 13.2268 11.3997 13.0312 11.153 12.7845C10.9063 12.5378 10.7107 12.245 10.5772 11.9228C10.4437 11.6005 10.375 11.2551 10.375 10.9062C10.375 10.5574 10.4437 10.212 10.5772 9.88975C10.7107 9.56748 10.9063 9.27465 11.153 9.028C11.3997 8.78134 11.6925 8.58568 12.0147 8.45219C12.337 8.31871 12.6824 8.25 13.0312 8.25C13.3801 8.25 13.7255 8.31871 14.0478 8.45219C14.37 8.58568 14.6628 8.78134 14.9095 9.028C15.1562 9.27465 15.3518 9.56748 15.4853 9.88975C15.6188 10.212 15.6875 10.5574 15.6875 10.9062C15.6875 11.2551 15.6188 11.6005 15.4853 11.9228C15.3518 12.245 15.1562 12.5378 14.9095 12.7845C14.6628 13.0312 14.37 13.2268 14.0478 13.3603C13.7255 13.4938 13.3801 13.5625 13.0312 13.5625ZM13.0312 13.5625V16.75M13.0312 16.75C13.4539 16.75 13.8593 16.9179 14.1582 17.2168C14.4571 17.5157 14.625 17.9211 14.625 18.3438C14.625 18.7664 14.4571 19.1718 14.1582 19.4707C13.8593 19.7696 13.4539 19.9375 13.0312 19.9375C12.6086 19.9375 12.2032 19.7696 11.9043 19.4707C11.6054 19.1718 11.4375 18.7664 11.4375 18.3438C11.4375 17.9211 11.6054 17.5157 11.9043 17.2168C12.2032 16.9179 12.6086 16.75 13.0312 16.75ZM14.9091 9.02926L17.2182 6.72009M15.3645 12.177L16.983 13.7955M11.1548 12.7827L6.71997 17.2176M10.5528 9.95081L7.4425 8.08435M16.75 5.59375C16.75 6.01644 16.9179 6.42182 17.2168 6.7207C17.5157 7.01959 17.9211 7.1875 18.3438 7.1875C18.7664 7.1875 19.1718 7.01959 19.4707 6.7207C19.7696 6.42182 19.9375 6.01644 19.9375 5.59375C19.9375 5.17106 19.7696 4.76568 19.4707 4.4668C19.1718 4.16791 18.7664 4 18.3438 4C17.9211 4 17.5157 4.16791 17.2168 4.4668C16.9179 4.76568 16.75 5.17106 16.75 5.59375ZM16.75 14.625C16.75 15.0477 16.9179 15.4531 17.2168 15.752C17.5157 16.0508 17.9211 16.2187 18.3438 16.2187C18.7664 16.2187 19.1718 16.0508 19.4707 15.752C19.7696 15.4531 19.9375 15.0477 19.9375 14.625C19.9375 14.2023 19.7696 13.7969 19.4707 13.498C19.1718 13.1992 18.7664 13.0312 18.3438 13.0312C17.9211 13.0312 17.5157 13.1992 17.2168 13.498C16.9179 13.7969 16.75 14.2023 16.75 14.625ZM4 18.3438C4 18.553 4.04122 18.7603 4.12132 18.9537C4.20141 19.147 4.31881 19.3227 4.4668 19.4707C4.61479 19.6187 4.79049 19.7361 4.98385 19.8162C5.17721 19.8963 5.38446 19.9375 5.59375 19.9375C5.80304 19.9375 6.01029 19.8963 6.20365 19.8162C6.39701 19.7361 6.57271 19.6187 6.7207 19.4707C6.86869 19.3227 6.98609 19.147 7.06618 18.9537C7.14628 18.7603 7.1875 18.553 7.1875 18.3438C7.1875 18.1345 7.14628 17.9272 7.06618 17.7338C6.98609 17.5405 6.86869 17.3648 6.7207 17.2168C6.57271 17.0688 6.39701 16.9514 6.20365 16.8713C6.01029 16.7912 5.80304 16.75 5.59375 16.75C5.38446 16.75 5.17721 16.7912 4.98385 16.8713C4.79049 16.9514 4.61479 17.0688 4.4668 17.2168C4.31881 17.3648 4.20141 17.5405 4.12132 17.7338C4.04122 17.9272 4 18.1345 4 18.3438ZM4.53125 7.1875C4.53125 7.61019 4.69916 8.01557 4.99805 8.31445C5.29693 8.61334 5.70231 8.78125 6.125 8.78125C6.54769 8.78125 6.95307 8.61334 7.25195 8.31445C7.55084 8.01557 7.71875 7.61019 7.71875 7.1875C7.71875 6.76481 7.55084 6.35943 7.25195 6.06055C6.95307 5.76166 6.54769 5.59375 6.125 5.59375C5.70231 5.59375 5.29693 5.76166 4.99805 6.06055C4.69916 6.35943 4.53125 6.76481 4.53125 7.1875Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), bV = zo(mV), _V = (r) => Ce.jsxs("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: [Ce.jsx("rect", { x: 5.94, y: 5.94, width: 12.12, height: 12.12, rx: 1.5, stroke: "currentColor", strokeWidth: 1.5 }), Ce.jsx("path", { d: "M3 9.75V5.25C3 4.01 4.01 3 5.25 3H9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Ce.jsx("path", { d: "M14.25 3H18.75C19.99 3 21 4.01 21 5.25V9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Ce.jsx("path", { d: "M3 14.25V18.75C3 19.99 4.01 21 5.25 21H9.75", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), Ce.jsx("path", { d: "M21 14.25V18.75C21 19.99 19.99 21 18.75 21H14.25", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })] })), wV = zo(_V), xV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M11.9992 6.60001C11.5218 6.60001 11.064 6.41036 10.7264 6.0728C10.3889 5.73523 10.1992 5.27739 10.1992 4.8C10.1992 4.32261 10.3889 3.86477 10.7264 3.52721C11.064 3.18964 11.5218 3 11.9992 3C12.4766 3 12.9344 3.18964 13.272 3.52721C13.6096 3.86477 13.7992 4.32261 13.7992 4.8C13.7992 5.27739 13.6096 5.73523 13.272 6.0728C12.9344 6.41036 12.4766 6.60001 11.9992 6.60001ZM11.9992 6.60001V17.4M11.9992 17.4C12.4766 17.4 12.9344 17.5897 13.272 17.9272C13.6096 18.2648 13.7992 18.7226 13.7992 19.2C13.7992 19.6774 13.6096 20.1353 13.272 20.4728C12.9344 20.8104 12.4766 21 11.9992 21C11.5218 21 11.064 20.8104 10.7264 20.4728C10.3889 20.1353 10.1992 19.6774 10.1992 19.2C10.1992 18.7226 10.3889 18.2648 10.7264 17.9272C11.064 17.5897 11.5218 17.4 11.9992 17.4ZM5.39844 17.4C5.39844 16.1269 5.90415 14.906 6.80433 14.0059C7.7045 13.1057 8.9254 12.6 10.1984 12.6H13.7984C15.0715 12.6 16.2924 13.1057 17.1926 14.0059C18.0927 14.906 18.5985 16.1269 18.5985 17.4M3.59961 19.2C3.59961 19.6774 3.78925 20.1353 4.12682 20.4728C4.46438 20.8104 4.92222 21 5.39961 21C5.877 21 6.33484 20.8104 6.67241 20.4728C7.00997 20.1353 7.19961 19.6774 7.19961 19.2C7.19961 18.7226 7.00997 18.2648 6.67241 17.9272C6.33484 17.5897 5.877 17.4 5.39961 17.4C4.92222 17.4 4.46438 17.5897 4.12682 17.9272C3.78925 18.2648 3.59961 18.7226 3.59961 19.2ZM16.8008 19.2C16.8008 19.6774 16.9904 20.1353 17.328 20.4728C17.6656 20.8104 18.1234 21 18.6008 21C19.0782 21 19.536 20.8104 19.8736 20.4728C20.2111 20.1353 20.4008 19.6774 20.4008 19.2C20.4008 18.7226 20.2111 18.2648 19.8736 17.9272C19.536 17.5897 19.0782 17.4 18.6008 17.4C18.1234 17.4 17.6656 17.5897 17.328 17.9272C16.9904 18.2648 16.8008 18.7226 16.8008 19.2Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), EV = zo(xV), SV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M9.95398 16.3762C11.4106 18.0304 12.3812 19.1337 12.3768 21.2003M7.8431 20.2339C10.0323 20.2339 10.5789 18.6865 10.5789 17.912C10.5789 17.1405 10.0309 15.593 7.8431 15.593C5.65388 15.593 5.1073 17.1405 5.1073 17.9135C5.1073 18.6865 5.65532 20.2339 7.8431 20.2339ZM11.9941 16.0464C4.49482 16.0464 2.62 11.6305 2.62 9.4225C2.62 7.21598 4.49482 2.80005 11.9941 2.80005C19.4934 2.80005 21.3682 7.21598 21.3682 9.4225C21.3682 11.6305 19.4934 16.0464 11.9941 16.0464Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), z9 = zo(SV), OV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M14.0601 5.25V18.75M20.4351 18C20.4351 18.45 20.1351 18.75 19.6851 18.75H4.31006C3.86006 18.75 3.56006 18.45 3.56006 18V6C3.56006 5.55 3.86006 5.25 4.31006 5.25H19.6851C20.1351 5.25 20.4351 5.55 20.4351 6V18Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), TV = zo(OV), CV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M16.3229 22.0811L11.9385 14.4876M11.9385 14.4876L8.6037 19.5387L5.09035 2.62536L17.9807 14.1249L11.9385 14.4876Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), l2 = zo(CV), AV = (r) => Ce.jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, r, { children: Ce.jsx("path", { d: "M20.9998 19.0001C20.9998 20.1046 20.1046 20.9998 19.0001 20.9998M3 4.99969C3 3.8953 3.8953 3 4.99969 3M19.0001 3C20.1046 3 20.9998 3.8953 20.9998 4.99969M3 19.0001C3 20.1046 3.8953 20.9998 4.99969 20.9998M20.9972 10.0067V14.0061M3 14.0061V10.0067M9.99854 3H13.9979M9.99854 20.9972H13.9979", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })), q9 = zo(AV); function RV({ title: r, titleId: e, @@ -11867,7 +11867,7 @@ var cH = function(r, e) { }; const Ed = (r) => { const { as: e, className: t = "", children: n, variant: i, htmlAttributes: a, ref: o } = r, s = cH(r, ["as", "className", "children", "variant", "htmlAttributes", "ref"]), u = Vn(`n-${i}`, t), l = e ?? "span"; - return Te.jsx(l, Object.assign({ className: u, ref: o }, s, a, { children: n })); + return Ce.jsx(l, Object.assign({ className: u, ref: o }, s, a, { children: n })); }; var fH = function(r, e) { var t = {}; @@ -11884,7 +11884,7 @@ const h1 = (r) => { "ndl-medium": t === "medium", "ndl-small": t === "small" }); - return Te.jsx(s, Object.assign({ className: u, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: a }, o, i, { children: Te.jsx("div", { className: "ndl-spin" }) })); + return Ce.jsx(s, Object.assign({ className: u, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: a }, o, i, { children: Ce.jsx("div", { className: "ndl-spin" }) })); }; function c2() { return typeof window < "u"; @@ -13586,7 +13586,7 @@ function qW(r) { l.set(f, d); }), l; }, [i]); - return /* @__PURE__ */ Te.jsx(b7.Provider, { + return /* @__PURE__ */ Ce.jsx(b7.Provider, { value: me.useMemo(() => ({ register: o, unregister: s, @@ -13684,7 +13684,7 @@ function $W(r) { children: e, id: t } = r, n = Up(); - return /* @__PURE__ */ Te.jsx(x7.Provider, { + return /* @__PURE__ */ Ce.jsx(x7.Provider, { value: me.useMemo(() => ({ id: t, parentId: n @@ -13700,7 +13700,7 @@ function KW(r) { }, []), i = me.useCallback((o) => { t.current = t.current.filter((s) => s !== o); }, []), [a] = me.useState(() => w7()); - return /* @__PURE__ */ Te.jsx(E7.Provider, { + return /* @__PURE__ */ Ce.jsx(E7.Provider, { value: me.useMemo(() => ({ nodesRef: t, addNode: n, @@ -13995,7 +13995,7 @@ const P5 = { [Vg("focus-guard")]: "", style: P5 }; - return /* @__PURE__ */ Te.jsx("span", { + return /* @__PURE__ */ Ce.jsx("span", { ...e, ...a }); @@ -14058,7 +14058,7 @@ function Tx(r) { }; }, [a, i, d]), me.useEffect(() => { a && (h || yk(a)); - }, [h, a]), /* @__PURE__ */ Te.jsxs(T7.Provider, { + }, [h, a]), /* @__PURE__ */ Ce.jsxs(T7.Provider, { value: me.useMemo(() => ({ preserveTabOrder: i, beforeOutsideRef: u, @@ -14068,7 +14068,7 @@ function Tx(r) { portalNode: a, setFocusManagerState: s }), [i, a]), - children: [p && a && /* @__PURE__ */ Te.jsx(Ox, { + children: [p && a && /* @__PURE__ */ Ce.jsx(Ox, { "data-type": "outside", ref: u, onFocus: (g) => { @@ -14080,10 +14080,10 @@ function Tx(r) { _ == null || _.focus(); } } - }), p && a && /* @__PURE__ */ Te.jsx("span", { + }), p && a && /* @__PURE__ */ Ce.jsx("span", { "aria-owns": a.id, style: rY - }), a && /* @__PURE__ */ y2.createPortal(e, a), p && a && /* @__PURE__ */ Te.jsx(Ox, { + }), a && /* @__PURE__ */ y2.createPortal(e, a), p && a && /* @__PURE__ */ Ce.jsx(Ox, { "data-type": "outside", ref: l, onFocus: (g) => { @@ -14132,7 +14132,7 @@ function Ik(r, e) { e.current.includes("floating") || a.length === 0 ? o !== "0" && r.setAttribute("tabindex", "0") : (o !== "-1" || r.hasAttribute("data-tabindex") && r.getAttribute("data-tabindex") !== "-1") && (r.setAttribute("tabindex", "-1"), r.setAttribute("data-tabindex", "-1")); } const sY = /* @__PURE__ */ me.forwardRef(function(e, t) { - return /* @__PURE__ */ Te.jsx("button", { + return /* @__PURE__ */ Ce.jsx("button", { ...e, type: "button", ref: t, @@ -14203,14 +14203,14 @@ function D5(r) { }); } function Oe(Ne) { - const Ce = Ne.relatedTarget, Y = Ne.currentTarget, Q = mh(Ne); + const Te = Ne.relatedTarget, Y = Ne.currentTarget, Q = mh(Ne); queueMicrotask(() => { - const ie = x(), we = !(Is(_, Ce) || Is(m, Ce) || Is(Ce, m) || Is(z == null ? void 0 : z.portalNode, Ce) || Ce != null && Ce.hasAttribute(Vg("focus-guard")) || j && (Fg(j.nodesRef.current, ie).find((Ee) => { + const ie = x(), we = !(Is(_, Te) || Is(m, Te) || Is(Te, m) || Is(z == null ? void 0 : z.portalNode, Te) || Te != null && Te.hasAttribute(Vg("focus-guard")) || j && (Fg(j.nodesRef.current, ie).find((Ee) => { var Me, Ie; - return Is((Me = Ee.context) == null ? void 0 : Me.elements.floating, Ce) || Is((Ie = Ee.context) == null ? void 0 : Ie.elements.domReference, Ce); + return Is((Me = Ee.context) == null ? void 0 : Me.elements.floating, Te) || Is((Ie = Ee.context) == null ? void 0 : Ie.elements.domReference, Te); }) || pk(j.nodesRef.current, ie).find((Ee) => { var Me, Ie, Ye; - return [(Me = Ee.context) == null ? void 0 : Me.elements.floating, Ex((Ie = Ee.context) == null ? void 0 : Ie.elements.floating)].includes(Ce) || ((Ye = Ee.context) == null ? void 0 : Ye.elements.domReference) === Ce; + return [(Me = Ee.context) == null ? void 0 : Me.elements.floating, Ex((Ie = Ee.context) == null ? void 0 : Ie.elements.floating)].includes(Te) || ((Ye = Ee.context) == null ? void 0 : Ye.elements.domReference) === Te; }))); if (Y === _ && ue && Ik(ue, k), u && Y !== _ && !(Q != null && Q.isConnected) && yh(ou(ue)) === ou(ue).body) { bo(ue) && ue.focus(); @@ -14221,8 +14221,8 @@ function D5(r) { b.current.insideReactTree = !1; return; } - (E || !l) && Ce && we && !$.current && // Fix React 18 Strict Mode returnFocus due to double rendering. - Ce !== kk() && (W.current = !0, g(!1, Ne, "focus-out")); + (E || !l) && Te && we && !$.current && // Fix React 18 Strict Mode returnFocus due to double rendering. + Te !== kk() && (W.current = !0, g(!1, Ne, "focus-out")); }); } const ke = !!(!j && z); @@ -14243,7 +14243,7 @@ function D5(r) { const ke = Array.from((z == null || (ge = z.portalNode) == null ? void 0 : ge.querySelectorAll("[" + Vg("portal") + "]")) || []), Ne = (Oe = (j ? pk(j.nodesRef.current, x()) : []).find((Q) => { var ie; return iM(((ie = Q.context) == null ? void 0 : ie.elements.domReference) || null); - })) == null || (Oe = Oe.context) == null ? void 0 : Oe.elements.domReference, Ce = [m, Ne, ...ke, ...S(), H.current, q.current, le.current, ce.current, z == null ? void 0 : z.beforeOutsideRef.current, z == null ? void 0 : z.afterOutsideRef.current, k.current.includes("reference") || E ? _ : null].filter((Q) => Q != null), Y = l || E ? Pk(Ce, !I, I) : Pk(Ce); + })) == null || (Oe = Oe.context) == null ? void 0 : Oe.elements.domReference, Te = [m, Ne, ...ke, ...S(), H.current, q.current, le.current, ce.current, z == null ? void 0 : z.beforeOutsideRef.current, z == null ? void 0 : z.afterOutsideRef.current, k.current.includes("reference") || E ? _ : null].filter((Q) => Q != null), Y = l || E ? Pk(Te, !I, I) : Pk(Te); return () => { Y(); }; @@ -14251,8 +14251,8 @@ function D5(r) { if (n || !bo(ue)) return; const ge = ou(ue), Oe = yh(ge); queueMicrotask(() => { - const ke = ne(ue), De = L.current, Ne = (typeof De == "number" ? ke[De] : De.current) || ue, Ce = Is(ue, Oe); - !O && !Ce && p && Tg(Ne, { + const ke = ne(ue), De = L.current, Ne = (typeof De == "number" ? ke[De] : De.current) || ue, Te = Is(ue, Oe); + !O && !Te && p && Tg(Ne, { preventScroll: Ne === ue }); }); @@ -14260,12 +14260,12 @@ function D5(r) { if (n || !ue) return; const ge = ou(ue), Oe = yh(ge); aY(Oe); - function ke(Ce) { + function ke(Te) { let { reason: Y, event: Q, nested: ie - } = Ce; + } = Te; if (["hover", "safe-polygon"].includes(Y) && Q.type === "mouseleave" && (W.current = !0), Y === "outside-press") if (ie) W.current = !1; @@ -14285,16 +14285,16 @@ function D5(r) { De.setAttribute("tabindex", "-1"), De.setAttribute("aria-hidden", "true"), Object.assign(De.style, P5), Z && _ && _.insertAdjacentElement("afterend", De); function Ne() { if (typeof B.current == "boolean") { - const Ce = _ || kk(); - return Ce && Ce.isConnected ? Ce : De; + const Te = _ || kk(); + return Te && Te.isConnected ? Te : De; } return B.current.current || De; } return () => { y.off("openchange", ke); - const Ce = yh(ge), Y = Is(m, Ce) || j && Fg(j.nodesRef.current, x(), !1).some((ie) => { + const Te = yh(ge), Y = Is(m, Te) || j && Fg(j.nodesRef.current, x(), !1).some((ie) => { var we; - return Is((we = ie.context) == null ? void 0 : we.elements.floating, Ce); + return Is((we = ie.context) == null ? void 0 : we.elements.floating, Te); }), Q = Ne(); queueMicrotask(() => { const ie = oY(Q); @@ -14302,7 +14302,7 @@ function D5(r) { B.current && !W.current && bo(ie) && // If the focus moved somewhere else after mount, avoid returning focus // since it likely entered a different element which should be // respected: https://github.com/floating-ui/floating-ui/issues/2607 - (!(ie !== Ce && Ce !== ge.body) || Y) && ie.focus({ + (!(ie !== Te && Te !== ge.body) || Y) && ie.focus({ preventScroll: !0 }), De.remove(); }); @@ -14326,15 +14326,15 @@ function D5(r) { n || ue && Ik(ue, k); }, [n, ue, k]); function se(ge) { - return n || !c || !l ? null : /* @__PURE__ */ Te.jsx(sY, { + return n || !c || !l ? null : /* @__PURE__ */ Ce.jsx(sY, { ref: ge === "start" ? H : q, onClick: (Oe) => g(!1, Oe.nativeEvent), children: typeof c == "string" ? c : "Dismiss" }); } const de = !n && P && (l ? !E : !0) && (Z || l); - return /* @__PURE__ */ Te.jsxs(Te.Fragment, { - children: [de && /* @__PURE__ */ Te.jsx(Ox, { + return /* @__PURE__ */ Ce.jsxs(Ce.Fragment, { + children: [de && /* @__PURE__ */ Ce.jsx(Ox, { "data-type": "inside", ref: pe, onFocus: (ge) => { @@ -14350,7 +14350,7 @@ function D5(r) { (Oe = z.beforeOutsideRef.current) == null || Oe.focus(); } } - }), !E && se("start"), t, se("end"), de && /* @__PURE__ */ Te.jsx(Ox, { + }), !E && se("start"), t, se("end"), de && /* @__PURE__ */ Ce.jsx(Ox, { "data-type": "inside", ref: fe, onFocus: (ge) => { @@ -15077,14 +15077,14 @@ function gY(r, e) { } } }; - }, [ce, L, b, o, z, g]), Ce = me.useCallback(() => { + }, [ce, L, b, o, z, g]), Te = me.useCallback(() => { var Ee; return S ?? (j == null || (Ee = j.nodesRef.current.find((Me) => Me.id === B)) == null || (Ee = Ee.context) == null || (Ee = Ee.dataRef) == null ? void 0 : Ee.current.orientation); }, [B, j, S]), Y = Wa((Ee) => { if (J.current = !1, re.current = !0, Ee.which === 229 || !ce.current && Ee.currentTarget === L.current) return; if (h && Uk(Ee.key, x, p, O)) { - aw(Ee.key, Ce()) || au(Ee), n(!1, Ee.nativeEvent, "list-navigation"), bo(i.domReference) && (g ? j == null || j.events.emit("virtualfocus", i.domReference) : i.domReference.focus()); + aw(Ee.key, Te()) || au(Ee), n(!1, Ee.nativeEvent, "list-navigation"), bo(i.domReference) && (g ? j == null || j.events.emit("virtualfocus", i.domReference) : i.domReference.focus()); return; } const Me = W.current, Ie = eS(o, m), Ye = gk(o, m); @@ -15163,7 +15163,7 @@ function gY(r, e) { ...Q, onKeyDown(Ie) { J.current = !1; - const Ye = Ie.key.startsWith("Arrow"), ot = ["Home", "End"].includes(Ie.key), mt = Ye || ot, wt = Fk(Ie.key, x, p), Mt = Uk(Ie.key, x, p, O), Dt = Fk(Ie.key, Ce(), p), vt = aw(Ie.key, x), tt = (h ? Dt : vt) || Ie.key === "Enter" || Ie.key.trim() === ""; + const Ye = Ie.key.startsWith("Arrow"), ot = ["Home", "End"].includes(Ie.key), mt = Ye || ot, wt = Fk(Ie.key, x, p), Mt = Uk(Ie.key, x, p, O), Dt = Fk(Ie.key, Te(), p), vt = aw(Ie.key, x), tt = (h ? Dt : vt) || Ie.key === "Enter" || Ie.key.trim() === ""; if (g && t) { const Ze = j == null ? void 0 : j.nodesRef.current.find((It) => It.parentId == null), nt = j && Ze ? JH(j.nodesRef.current, Ze.id) : null; if (mt && nt && T) { @@ -15186,7 +15186,7 @@ function gY(r, e) { } if (!(!t && !_ && Ye)) { if (tt) { - const Ze = aw(Ie.key, Ce()); + const Ze = aw(Ie.key, Te()); $.current = h && Ze ? null : Ie.key; } if (h) { @@ -15204,7 +15204,7 @@ function gY(r, e) { onMouseDown: Ee, onClick: Ee }; - }, [se, Q, O, Y, le, y, o, h, z, n, t, _, x, Ce, p, c, j, g, T]); + }, [se, Q, O, Y, le, y, o, h, z, n, t, _, x, Te, p, c, j, g, T]); return me.useMemo(() => l ? { reference: we, floating: ie, @@ -15632,7 +15632,7 @@ const M7 = ({ children: r, isDisabled: e = !1, type: t, isInitialOpen: n, placem strategy: u ?? (d ? "fixed" : "absolute"), type: t }); - return Te.jsx(P7.Provider, { value: g, children: r }); + return Ce.jsx(P7.Provider, { value: g, children: r }); }; M7.displayName = "Tooltip"; const CY = (r) => { @@ -15649,7 +15649,7 @@ const CY = (r) => { const d = Object.assign(Object.assign(Object.assign({ className: f }, n), l), { ref: c }); return me.cloneElement(e, u.getReferenceProps(d)); } - return Te.jsx("button", Object.assign({ type: "button", className: f, style: a, ref: c }, u.getReferenceProps(n), s, { children: e })); + return Ce.jsx("button", Object.assign({ type: "button", className: f, style: a, ref: c }, u.getReferenceProps(n), s, { children: e })); }, AY = (r) => { var { children: e, style: t, htmlAttributes: n, className: i, ref: a } = r, o = G1(r, ["children", "style", "htmlAttributes", "className", "ref"]); const s = q1(), u = mv([s.refs.setFloating, a]), { themeClassName: l } = E2(); @@ -15659,22 +15659,22 @@ const CY = (r) => { "ndl-tooltip-content-rich": s.type === "rich", "ndl-tooltip-content-simple": s.type === "simple" }); - return s.type === "simple" ? Te.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Te.jsx(Tx, { children: f }), children: Te.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: Te.jsx(Ed, { variant: "body-medium", children: e }) })) }) : Te.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Te.jsx(Tx, { children: f }), children: Te.jsx(D5, { context: s.context, returnFocus: !0, modal: !1, initialFocus: -1, closeOnFocusOut: !0, children: Te.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: e })) }) }); + return s.type === "simple" ? Ce.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Ce.jsx(Tx, { children: f }), children: Ce.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: Ce.jsx(Ed, { variant: "body-medium", children: e }) })) }) : Ce.jsx(v1, { shouldWrap: s.isPortaled, wrap: (f) => Ce.jsx(Tx, { children: f }), children: Ce.jsx(D5, { context: s.context, returnFocus: !0, modal: !1, initialFocus: -1, closeOnFocusOut: !0, children: Ce.jsx("div", Object.assign({ ref: u, className: c, style: Object.assign(Object.assign({}, s.floatingStyles), t) }, o, s.getFloatingProps(n), { children: e })) }) }); }, RY = (r) => { var { children: e, passThroughProps: t, typographyVariant: n = "subheading-medium", className: i, style: a, htmlAttributes: o, ref: s } = r, u = G1(r, ["children", "passThroughProps", "typographyVariant", "className", "style", "htmlAttributes", "ref"]); const l = q1(), c = Vn("ndl-tooltip-header", i); - return l.isOpen ? Te.jsx(Ed, Object.assign({ ref: s, variant: n, className: c, style: a, htmlAttributes: o }, t, u, { children: e })) : null; + return l.isOpen ? Ce.jsx(Ed, Object.assign({ ref: s, variant: n, className: c, style: a, htmlAttributes: o }, t, u, { children: e })) : null; }, PY = (r) => { var { children: e, className: t, style: n, htmlAttributes: i, passThroughProps: a, ref: o } = r, s = G1(r, ["children", "className", "style", "htmlAttributes", "passThroughProps", "ref"]); const u = q1(), l = Vn("ndl-tooltip-body", t); - return u.isOpen ? Te.jsx(Ed, Object.assign({ ref: o, variant: "body-medium", className: l, style: n, htmlAttributes: i }, a, s, { children: e })) : null; + return u.isOpen ? Ce.jsx(Ed, Object.assign({ ref: o, variant: "body-medium", className: l, style: n, htmlAttributes: i }, a, s, { children: e })) : null; }, MY = (r) => { var { children: e, className: t, style: n, htmlAttributes: i, ref: a } = r, o = G1(r, ["children", "className", "style", "htmlAttributes", "ref"]); const s = q1(), u = mv([s.refs.setFloating, a]); if (!s.isOpen) return null; const l = Vn("ndl-tooltip-actions", t); - return Te.jsx("div", Object.assign({ className: l, ref: u, style: n }, o, i, { children: e })); + return Ce.jsx("div", Object.assign({ className: l, ref: u, style: n }, o, i, { children: e })); }, Bf = Object.assign(M7, { Actions: MY, Body: PY, @@ -15731,10 +15731,10 @@ const D7 = (r) => { } g && g(T); }; - return Te.jsxs(Bf, Object.assign({ hoverDelay: { + return Ce.jsxs(Bf, Object.assign({ hoverDelay: { close: 0, open: 500 - } }, c == null ? void 0 : c.root, { type: "simple", isDisabled: l === null || a, children: [Te.jsx(Bf.Trigger, Object.assign({}, c == null ? void 0 : c.trigger, { hasButtonWrapper: !0, children: Te.jsx(_, Object.assign({ type: "button", onClick: E, disabled: a, "aria-disabled": !m, "aria-label": l, "aria-pressed": u, className: O, style: d, ref: y }, b, p, { children: Te.jsx("div", { className: "ndl-icon-btn-inner", children: i ? Te.jsx(h1, { size: "small" }) : Te.jsx("div", { className: "ndl-icon", children: e }) }) })) })), Te.jsx(Bf.Content, Object.assign({}, c == null ? void 0 : c.content, { children: l }))] })); + } }, c == null ? void 0 : c.root, { type: "simple", isDisabled: l === null || a, children: [Ce.jsx(Bf.Trigger, Object.assign({}, c == null ? void 0 : c.trigger, { hasButtonWrapper: !0, children: Ce.jsx(_, Object.assign({ type: "button", onClick: E, disabled: a, "aria-disabled": !m, "aria-label": l, "aria-pressed": u, className: O, style: d, ref: y }, b, p, { children: Ce.jsx("div", { className: "ndl-icon-btn-inner", children: i ? Ce.jsx(h1, { size: "small" }) : Ce.jsx("div", { className: "ndl-icon", children: e }) }) })) })), Ce.jsx(Bf.Content, Object.assign({}, c == null ? void 0 : c.content, { children: l }))] })); }; var kY = function(r, e) { var t = {}; @@ -15762,7 +15762,7 @@ const S2 = (r) => { onClick: h, ref: p } = r, g = kY(r, ["children", "as", "isLoading", "isDisabled", "size", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); - return Te.jsx(D7, Object.assign({ as: t, iconButtonVariant: "clean", isDisabled: i, size: a, isLoading: n, isActive: o, variant: s, description: u, tooltipProps: l, className: c, style: f, htmlAttributes: d, onClick: h, ref: p }, g, { children: e })); + return Ce.jsx(D7, Object.assign({ as: t, iconButtonVariant: "clean", isDisabled: i, size: a, isLoading: n, isActive: o, variant: s, description: u, tooltipProps: l, className: c, style: f, htmlAttributes: d, onClick: h, ref: p }, g, { children: e })); }; function IY({ state: r, onChange: e, isControlled: t, inputType: n = "text" }) { const [i, a] = me.useState(r), o = me.useMemo(() => t === !0 ? r : i, [t, r, i]), s = me.useCallback((u) => { @@ -15894,7 +15894,7 @@ const k7 = { shouldCaptureFocus: s, strategy: h ?? g }); - return Te.jsx(I7.Provider, { value: _, children: r }); + return Ce.jsx(I7.Provider, { value: _, children: r }); }, BY = (r) => { var { children: e, hasButtonWrapper: t = !1, ref: n } = r, i = aM(r, ["children", "hasButtonWrapper", "ref"]); const a = N7(), o = e.props, s = mv([ @@ -15902,14 +15902,14 @@ const k7 = { n, o == null ? void 0 : o.ref ]); - return t && ao.isValidElement(e) ? ao.cloneElement(e, a.getReferenceProps(Object.assign(Object.assign(Object.assign({}, i), o), { "data-state": a.isOpen ? "open" : "closed", ref: s }))) : Te.jsx("button", Object.assign({ ref: a.refs.setReference, type: "button", "data-state": a.isOpen ? "open" : "closed" }, a.getReferenceProps(i), { children: e })); + return t && ao.isValidElement(e) ? ao.cloneElement(e, a.getReferenceProps(Object.assign(Object.assign(Object.assign({}, i), o), { "data-state": a.isOpen ? "open" : "closed", ref: s }))) : Ce.jsx("button", Object.assign({ ref: a.refs.setReference, type: "button", "data-state": a.isOpen ? "open" : "closed" }, a.getReferenceProps(i), { children: e })); }, FY = (r) => { var { as: e, className: t, style: n, children: i, htmlAttributes: a, ref: o } = r, s = aM(r, ["as", "className", "style", "children", "htmlAttributes", "ref"]); const u = N7(), { context: l } = u, c = aM(u, ["context"]), f = mv([c.refs.setFloating, o]), { themeClassName: d } = E2(), h = Vn("ndl-popover", d, t), p = e ?? "div"; - return LY(), l.open ? Te.jsx(v1, { shouldWrap: c.isPortaled, wrap: (g) => { + return LY(), l.open ? Ce.jsx(v1, { shouldWrap: c.isPortaled, wrap: (g) => { var y; - return Te.jsx(Tx, { root: (y = c.anchorElementAsPortalAnchor) !== null && y !== void 0 && y ? c.refs.reference.current : void 0, children: g }); - }, children: Te.jsx(D5, { context: l, modal: c.shouldCaptureFocus, initialFocus: c.initialFocus, children: Te.jsx(p, Object.assign({ className: h, "aria-labelledby": c.labelId, "aria-describedby": c.descriptionId, style: Object.assign(Object.assign(Object.assign({}, c.floatingStyles), c.transitionStyles), n), ref: f }, c.getFloatingProps(Object.assign({}, a)), s, { children: i })) }) }) : null; + return Ce.jsx(Tx, { root: (y = c.anchorElementAsPortalAnchor) !== null && y !== void 0 && y ? c.refs.reference.current : void 0, children: g }); + }, children: Ce.jsx(D5, { context: l, modal: c.shouldCaptureFocus, initialFocus: c.initialFocus, children: Ce.jsx(p, Object.assign({ className: h, "aria-labelledby": c.labelId, "aria-describedby": c.descriptionId, style: Object.assign(Object.assign(Object.assign({}, c.floatingStyles), c.transitionStyles), n), ref: f }, c.getFloatingProps(Object.assign({}, a)), s, { children: i })) }) }) : null; }; Object.assign(jY, { Content: FY, @@ -15933,7 +15933,7 @@ const p1 = me.createContext({ // oxlint-disable-next-line @typescript-eslint/no-empty-function setHasFocusInside: () => { } -}), UY = (r) => Up() === null ? Te.jsx(KW, { children: Te.jsx(Gk, Object.assign({}, r, { isRoot: !0 })) }) : Te.jsx(Gk, Object.assign({}, r)), Gk = ({ children: r, isOpen: e, onClose: t, isRoot: n, anchorRef: i, as: a, className: o, placement: s, minWidth: u, title: l, isDisabled: c, description: f, icon: d, isPortaled: h = !0, portalTarget: p, htmlAttributes: g, strategy: y, ref: b, style: _ }) => { +}), UY = (r) => Up() === null ? Ce.jsx(KW, { children: Ce.jsx(Gk, Object.assign({}, r, { isRoot: !0 })) }) : Ce.jsx(Gk, Object.assign({}, r)), Gk = ({ children: r, isOpen: e, onClose: t, isRoot: n, anchorRef: i, as: a, className: o, placement: s, minWidth: u, title: l, isDisabled: c, description: f, icon: d, isPortaled: h = !0, portalTarget: p, htmlAttributes: g, strategy: y, ref: b, style: _ }) => { const [m, x] = me.useState(!1), [S, O] = me.useState(!1), [E, T] = me.useState(null), P = me.useRef([]), I = me.useRef([]), k = me.useContext(p1), L = B5(), B = bv(), j = XW(), z = Up(), H = b2(), { themeClassName: q } = E2(); me.useEffect(() => { e !== void 0 && x(e); @@ -15955,8 +15955,8 @@ const p1 = me.createContext({ A5() ], nodeId: j, - onOpenChange: (Ne, Ce) => { - e === void 0 && x(Ne), Ne || (Ce instanceof PointerEvent ? t == null || t(Ce, { type: "backdropClick" }) : Ce instanceof KeyboardEvent ? t == null || t(Ce, { type: "escapeKeyDown" }) : Ce instanceof FocusEvent && (t == null || t(Ce, { type: "focusOut" }))); + onOpenChange: (Ne, Te) => { + e === void 0 && x(Ne), Ne || (Te instanceof PointerEvent ? t == null || t(Te, { type: "backdropClick" }) : Te instanceof KeyboardEvent ? t == null || t(Te, { type: "escapeKeyDown" }) : Te instanceof FocusEvent && (t == null || t(Te, { type: "focusOut" }))); }, open: m, placement: s ? k7[s] : J, @@ -15986,33 +15986,33 @@ const p1 = me.createContext({ function Ne(Y) { e === void 0 && x(!1), t == null || t(void 0, { id: Y == null ? void 0 : Y.id, type: "itemClick" }); } - function Ce(Y) { + function Te(Y) { Y.nodeId !== j && Y.parentId === z && (e === void 0 && x(!1), t == null || t(void 0, { type: "itemClick" })); } - return B.events.on("click", Ne), B.events.on("menuopen", Ce), () => { - B.events.off("click", Ne), B.events.off("menuopen", Ce); + return B.events.on("click", Ne), B.events.on("menuopen", Te), () => { + B.events.off("click", Ne), B.events.off("menuopen", Te); }; }, [B, j, z, t, e]), me.useEffect(() => { m && B && B.events.emit("menuopen", { nodeId: j, parentId: z }); }, [B, m, j, z]); const Oe = me.useCallback((Ne) => { Ne.key === "Tab" && Ne.shiftKey && requestAnimationFrame(() => { - const Ce = Z.floating.current; - Ce && !Ce.contains(document.activeElement) && (e === void 0 && x(!1), t == null || t(void 0, { type: "focusOut" })); + const Te = Z.floating.current; + Te && !Te.contains(document.activeElement) && (e === void 0 && x(!1), t == null || t(void 0, { type: "focusOut" })); }); }, [e, t, Z]), ke = Vn("ndl-menu", q, o), De = mv([Z.setReference, H.ref, b]); - return Te.jsxs($W, { id: j, children: [n !== !0 && Te.jsx(qY, { ref: De, className: $ ? "MenuItem" : "RootMenu", isDisabled: c, style: _, htmlAttributes: Object.assign(Object.assign({ "data-focus-inside": S ? "" : void 0, "data-nested": $ ? "" : void 0, "data-open": m ? "" : void 0, role: $ ? "menuitem" : void 0, tabIndex: $ ? k.activeIndex === H.index ? 0 : -1 : void 0 }, g), se(k.getItemProps({ + return Ce.jsxs($W, { id: j, children: [n !== !0 && Ce.jsx(qY, { ref: De, className: $ ? "MenuItem" : "RootMenu", isDisabled: c, style: _, htmlAttributes: Object.assign(Object.assign({ "data-focus-inside": S ? "" : void 0, "data-nested": $ ? "" : void 0, "data-open": m ? "" : void 0, role: $ ? "menuitem" : void 0, tabIndex: $ ? k.activeIndex === H.index ? 0 : -1 : void 0 }, g), se(k.getItemProps({ onFocus(Ne) { - var Ce; - (Ce = g == null ? void 0 : g.onFocus) === null || Ce === void 0 || Ce.call(g, Ne), O(!1), k.setHasFocusInside(!0); + var Te; + (Te = g == null ? void 0 : g.onFocus) === null || Te === void 0 || Te.call(g, Ne), O(!1), k.setHasFocusInside(!0); } - }))), title: l, description: f, leadingVisual: d }), Te.jsx(p1.Provider, { value: { + }))), title: l, description: f, leadingVisual: d }), Ce.jsx(p1.Provider, { value: { activeIndex: E, getItemProps: ge, isOpen: c === !0 ? !1 : m, setActiveIndex: T, setHasFocusInside: O - }, children: Te.jsx(qW, { elementsRef: P, labelsRef: I, children: m && Te.jsx(v1, { shouldWrap: h, wrap: (Ne) => Te.jsx(Tx, { root: p, children: Ne }), children: Te.jsx(D5, { context: ue, modal: !1, initialFocus: 0, returnFocus: !$, closeOnFocusOut: !0, guards: !0, children: Te.jsx(W, Object.assign({ ref: Z.setFloating, className: ke, style: Object.assign(Object.assign({ minWidth: u !== void 0 ? `${u}px` : void 0 }, X), _) }, de({ + }, children: Ce.jsx(qW, { elementsRef: P, labelsRef: I, children: m && Ce.jsx(v1, { shouldWrap: h, wrap: (Ne) => Ce.jsx(Tx, { root: p, children: Ne }), children: Ce.jsx(D5, { context: ue, modal: !1, initialFocus: 0, returnFocus: !$, closeOnFocusOut: !0, guards: !0, children: Ce.jsx(W, Object.assign({ ref: Z.setFloating, className: ke, style: Object.assign(Object.assign({ minWidth: u !== void 0 ? `${u}px` : void 0 }, X), _) }, de({ onKeyDown: Oe }), { children: r })) }) }) }) })] }); }, F5 = (r) => { @@ -16020,11 +16020,11 @@ const p1 = me.createContext({ const h = Vn("ndl-menu-item", u, { "ndl-disabled": o }), p = s ?? "button"; - return Te.jsx(p, Object.assign({ className: h, ref: f, type: "button", role: "menuitem", disabled: o, style: l }, d, c, { children: Te.jsxs("div", { className: "ndl-menu-item-inner", children: [!!i && Te.jsx("div", { className: "ndl-menu-item-pre-leading-content", children: i }), !!t && Te.jsx("div", { className: "ndl-menu-item-leading-content", children: t }), Te.jsxs("div", { className: "ndl-menu-item-title-wrapper", children: [Te.jsx("div", { className: "ndl-menu-item-title", children: e }), !!a && Te.jsx("div", { className: "ndl-menu-item-description", children: a })] }), !!n && Te.jsx("div", { className: "ndl-menu-item-trailing-content", children: n })] }) })); + return Ce.jsx(p, Object.assign({ className: h, ref: f, type: "button", role: "menuitem", disabled: o, style: l }, d, c, { children: Ce.jsxs("div", { className: "ndl-menu-item-inner", children: [!!i && Ce.jsx("div", { className: "ndl-menu-item-pre-leading-content", children: i }), !!t && Ce.jsx("div", { className: "ndl-menu-item-leading-content", children: t }), Ce.jsxs("div", { className: "ndl-menu-item-title-wrapper", children: [Ce.jsx("div", { className: "ndl-menu-item-title", children: e }), !!a && Ce.jsx("div", { className: "ndl-menu-item-description", children: a })] }), !!n && Ce.jsx("div", { className: "ndl-menu-item-trailing-content", children: n })] }) })); }, zY = (r) => { var { title: e, className: t, style: n, leadingVisual: i, trailingContent: a, description: o, isDisabled: s, as: u, onClick: l, onFocus: c, htmlAttributes: f, id: d, ref: h } = r, p = Xm(r, ["title", "className", "style", "leadingVisual", "trailingContent", "description", "isDisabled", "as", "onClick", "onFocus", "htmlAttributes", "id", "ref"]); const g = me.useContext(p1), b = b2({ label: s === !0 ? null : typeof e == "string" ? e : void 0 }), _ = bv(), m = b.index === g.activeIndex, x = mv([b.ref, h]); - return Te.jsx(F5, Object.assign({ as: u ?? "button", style: n, className: t, ref: x, title: e, description: o, leadingContent: i, trailingContent: a, isDisabled: s, htmlAttributes: Object.assign(Object.assign(Object.assign({}, f), { tabIndex: m ? 0 : -1 }), g.getItemProps({ + return Ce.jsx(F5, Object.assign({ as: u ?? "button", style: n, className: t, ref: x, title: e, description: o, leadingContent: i, trailingContent: a, isDisabled: s, htmlAttributes: Object.assign(Object.assign(Object.assign({}, f), { tabIndex: m ? 0 : -1 }), g.getItemProps({ id: d, onClick(S) { l == null || l(S), _ == null || _.events.emit("click", { id: d }); @@ -16035,7 +16035,7 @@ const p1 = me.createContext({ })) }, p)); }, qY = ({ title: r, isDisabled: e, description: t, leadingVisual: n, as: i, onFocus: a, onClick: o, className: s, style: u, htmlAttributes: l, id: c, ref: f }) => { const d = me.useContext(p1), p = b2({ label: e === !0 ? null : typeof r == "string" ? r : void 0 }), g = p.index === d.activeIndex, y = mv([p.ref, f]); - return Te.jsx(F5, { as: i ?? "button", style: u, className: s, ref: y, title: r, description: t, leadingContent: n, trailingContent: Te.jsx(V9, { className: "ndl-menu-item-chevron" }), isDisabled: e, htmlAttributes: Object.assign(Object.assign(Object.assign(Object.assign({}, l), { tabIndex: g ? 0 : -1 }), d.getItemProps({ + return Ce.jsx(F5, { as: i ?? "button", style: u, className: s, ref: y, title: r, description: t, leadingContent: n, trailingContent: Ce.jsx(V9, { className: "ndl-menu-item-chevron" }), isDisabled: e, htmlAttributes: Object.assign(Object.assign(Object.assign(Object.assign({}, l), { tabIndex: g ? 0 : -1 }), d.getItemProps({ onClick(b) { o == null || o(b); }, @@ -16049,13 +16049,13 @@ const p1 = me.createContext({ }, GY = (r) => { var { children: e, className: t, style: n, as: i, htmlAttributes: a, ref: o } = r, s = Xm(r, ["children", "className", "style", "as", "htmlAttributes", "ref"]); const u = Vn("ndl-menu-category-item", t), l = i ?? "div"; - return Te.jsx(l, Object.assign({ className: u, style: n, ref: o }, s, a, { children: e })); + return Ce.jsx(l, Object.assign({ className: u, style: n, ref: o }, s, a, { children: e })); }, VY = (r) => { var { title: e, leadingVisual: t, trailingContent: n, description: i, isDisabled: a, isChecked: o = !1, onClick: s, onFocus: u, className: l, style: c, as: f, id: d, htmlAttributes: h, ref: p } = r, g = Xm(r, ["title", "leadingVisual", "trailingContent", "description", "isDisabled", "isChecked", "onClick", "onFocus", "className", "style", "as", "id", "htmlAttributes", "ref"]); const y = me.useContext(p1), _ = b2({ label: a === !0 ? null : typeof e == "string" ? e : void 0 }), m = bv(), x = _.index === y.activeIndex, S = mv([_.ref, p]), O = Vn("ndl-menu-radio-item", l, { "ndl-checked": o }); - return Te.jsx(F5, Object.assign({ as: f ?? "button", style: c, className: O, ref: S, title: e, description: i, preLeadingContent: o ? Te.jsx(IV, { className: "n-size-5 n-shrink-0 n-self-center" }) : null, leadingContent: t, trailingContent: n, isDisabled: a, htmlAttributes: Object.assign(Object.assign(Object.assign({}, h), { "aria-checked": o, role: "menuitemradio", tabIndex: x ? 0 : -1 }), y.getItemProps({ + return Ce.jsx(F5, Object.assign({ as: f ?? "button", style: c, className: O, ref: S, title: e, description: i, preLeadingContent: o ? Ce.jsx(IV, { className: "n-size-5 n-shrink-0 n-self-center" }) : null, leadingContent: t, trailingContent: n, isDisabled: a, htmlAttributes: Object.assign(Object.assign(Object.assign({}, h), { "aria-checked": o, role: "menuitemradio", tabIndex: x ? 0 : -1 }), y.getItemProps({ id: d, onClick(E) { s == null || s(E), m == null || m.events.emit("click", { id: d }); @@ -16067,11 +16067,11 @@ const p1 = me.createContext({ }, HY = (r) => { var { as: e, children: t, className: n, htmlAttributes: i, style: a, ref: o } = r, s = Xm(r, ["as", "children", "className", "htmlAttributes", "style", "ref"]); const u = Vn("ndl-menu-items", n), l = e ?? "div"; - return Te.jsx(l, Object.assign({ className: u, style: a, ref: o }, s, i, { children: t })); + return Ce.jsx(l, Object.assign({ className: u, style: a, ref: o }, s, i, { children: t })); }, WY = (r) => { var { children: e, className: t, htmlAttributes: n, style: i, ref: a } = r, o = Xm(r, ["children", "className", "htmlAttributes", "style", "ref"]); const s = Vn("ndl-menu-group", t); - return Te.jsx("div", Object.assign({ className: s, style: i, ref: a, role: "group" }, o, n, { children: e })); + return Ce.jsx("div", Object.assign({ className: s, style: i, ref: a, role: "group" }, o, n, { children: e })); }, Lm = Object.assign(UY, { CategoryItem: GY, Divider: pV, @@ -16094,10 +16094,10 @@ var XY = function(r, e) { const cb = (r) => { var { as: e, shape: t = "rectangular", className: n, style: i, height: a, width: o, isLoading: s = !0, children: u, htmlAttributes: l, onBackground: c = "default", ref: f } = r, d = XY(r, ["as", "shape", "className", "style", "height", "width", "isLoading", "children", "htmlAttributes", "onBackground", "ref"]); const h = e ?? "div", p = Vn(`ndl-skeleton ndl-skeleton-${t}`, c && `ndl-skeleton-${c}`, n); - return Te.jsx(v1, { shouldWrap: s, wrap: (g) => Te.jsx(h, Object.assign({ ref: f, className: p, style: Object.assign(Object.assign({}, i), { + return Ce.jsx(v1, { shouldWrap: s, wrap: (g) => Ce.jsx(h, Object.assign({ ref: f, className: p, style: Object.assign(Object.assign({}, i), { height: a, width: o - }), "aria-busy": !0, tabIndex: -1 }, d, l, { children: Te.jsx("div", { "aria-hidden": s, className: "ndl-skeleton-content", tabIndex: -1, children: g }) })), children: u }); + }), "aria-busy": !0, tabIndex: -1 }, d, l, { children: Ce.jsx("div", { "aria-hidden": s, className: "ndl-skeleton-content", tabIndex: -1, children: g }) })), children: u }); }; cb.displayName = "Skeleton"; var $Y = function(r, e) { @@ -16144,18 +16144,18 @@ const KY = (r) => { const le = [L]; return i && !n ? le.push(B) : n && le.push(j), le.join(" "); }, [L, i, n, B, j]); - return Te.jsxs("div", { className: z, style: x, children: [Te.jsxs("label", { className: q, children: [!H && Te.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Te.jsxs("div", { className: "ndl-label-text-wrapper", children: [Te.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-label-text", children: e }), !!u && Te.jsxs(Bf, Object.assign({}, d == null ? void 0 : d.root, { type: "simple", children: [Te.jsx(Bf.Trigger, Object.assign({}, d == null ? void 0 : d.trigger, { className: re, hasButtonWrapper: !0, children: Te.jsx("div", { tabIndex: 0, role: "button", "aria-label": "Information icon", children: Te.jsx(YV, {}) }) })), Te.jsx(Bf.Content, Object.assign({}, d == null ? void 0 : d.content, { children: u }))] })), s && Te.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-form-item-optional", children: y === !0 ? "Required" : "Optional" })] }) })), Te.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Te.jsxs("div", { className: "ndl-input-wrapper", children: [(a || O && !o) && Te.jsx("div", { className: "ndl-element-leading ndl-element", children: O ? Te.jsx(h1, { size: l === "large" ? "medium" : "small", className: l === "large" ? "ndl-medium-spinner" : "ndl-small-spinner" }) : a }), Te.jsxs("div", { className: Vn("ndl-input-container", { + return Ce.jsxs("div", { className: z, style: x, children: [Ce.jsxs("label", { className: q, children: [!H && Ce.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Ce.jsxs("div", { className: "ndl-label-text-wrapper", children: [Ce.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-label-text", children: e }), !!u && Ce.jsxs(Bf, Object.assign({}, d == null ? void 0 : d.root, { type: "simple", children: [Ce.jsx(Bf.Trigger, Object.assign({}, d == null ? void 0 : d.trigger, { className: re, hasButtonWrapper: !0, children: Ce.jsx("div", { tabIndex: 0, role: "button", "aria-label": "Information icon", children: Ce.jsx(YV, {}) }) })), Ce.jsx(Bf.Content, Object.assign({}, d == null ? void 0 : d.content, { children: u }))] })), s && Ce.jsx(Ed, { variant: l === "large" ? "body-large" : "body-medium", className: "ndl-form-item-optional", children: y === !0 ? "Required" : "Optional" })] }) })), Ce.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular" }, E, { isLoading: S, children: Ce.jsxs("div", { className: "ndl-input-wrapper", children: [(a || O && !o) && Ce.jsx("div", { className: "ndl-element-leading ndl-element", children: O ? Ce.jsx(h1, { size: l === "large" ? "medium" : "small", className: l === "large" ? "ndl-medium-spinner" : "ndl-small-spinner" }) : a }), Ce.jsxs("div", { className: Vn("ndl-input-container", { "ndl-clearable": _ - }), children: [Te.jsx("input", Object.assign({ ref: T, readOnly: g, disabled: p, required: y, value: I, placeholder: c, type: "text", onChange: k, "aria-describedby": ne }, W, { onKeyDown: ue }, P)), Z && Te.jsxs("span", { id: L, className: "ndl-text-input-hint", "aria-hidden": !0, children: [O && "Loading ", _ && "Press Escape to clear input."] }), _ && !!I && Te.jsx("div", { className: "ndl-element-clear ndl-element", children: Te.jsx("button", { tabIndex: -1, "aria-hidden": !0, type: "button", title: "Clear input (Esc)", onClick: () => { + }), children: [Ce.jsx("input", Object.assign({ ref: T, readOnly: g, disabled: p, required: y, value: I, placeholder: c, type: "text", onChange: k, "aria-describedby": ne }, W, { onKeyDown: ue }, P)), Z && Ce.jsxs("span", { id: L, className: "ndl-text-input-hint", "aria-hidden": !0, children: [O && "Loading ", _ && "Press Escape to clear input."] }), _ && !!I && Ce.jsx("div", { className: "ndl-element-clear ndl-element", children: Ce.jsx("button", { tabIndex: -1, "aria-hidden": !0, type: "button", title: "Clear input (Esc)", onClick: () => { k == null || k({ target: { value: "" } }); - }, children: Te.jsx(H9, { className: "n-size-4" }) }) })] }), o && Te.jsx("div", { className: "ndl-element-trailing ndl-element", children: O && !a ? Te.jsx(h1, { size: l === "large" ? "medium" : "small", className: l === "large" ? "ndl-medium-spinner" : "ndl-small-spinner" }) : o })] }) }))] }), !!i && !n && Te.jsx(cb, { onBackground: "weak", shape: "rectangular", isLoading: S, children: Te.jsx(Ed, { variant: l === "large" ? "body-medium" : "body-small", className: "ndl-form-message", htmlAttributes: { + }, children: Ce.jsx(H9, { className: "n-size-4" }) }) })] }), o && Ce.jsx("div", { className: "ndl-element-trailing ndl-element", children: O && !a ? Ce.jsx(h1, { size: l === "large" ? "medium" : "small", className: l === "large" ? "ndl-medium-spinner" : "ndl-small-spinner" }) : o })] }) }))] }), !!i && !n && Ce.jsx(cb, { onBackground: "weak", shape: "rectangular", isLoading: S, children: Ce.jsx(Ed, { variant: l === "large" ? "body-medium" : "body-small", className: "ndl-form-message", htmlAttributes: { "aria-live": "polite", id: B }, children: i }) }), !!n && // TODO v4: We might want to have a min width for the container for the messages to help skeleton loading. // Currently the message fills 100% of the width while the rest of the text input has a set width. - Te.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular", width: "fit-content" }, E, { isLoading: S, children: Te.jsxs("div", { className: "ndl-form-message", children: [Te.jsx("div", { className: "ndl-error-icon", children: Te.jsx(lH, {}) }), Te.jsx(Ed, { className: "ndl-error-text", variant: l === "large" ? "body-medium" : "body-small", htmlAttributes: { + Ce.jsx(cb, Object.assign({ onBackground: "weak", shape: "rectangular", width: "fit-content" }, E, { isLoading: S, children: Ce.jsxs("div", { className: "ndl-form-message", children: [Ce.jsx("div", { className: "ndl-error-icon", children: Ce.jsx(lH, {}) }), Ce.jsx(Ed, { className: "ndl-error-text", variant: l === "large" ? "body-medium" : "body-small", htmlAttributes: { "aria-live": "polite", id: j }, children: n })] }) }))] }); @@ -16185,7 +16185,7 @@ const L7 = (r) => { } d && d(O); }; - return Te.jsx(_, Object.assign({ type: y, onClick: S, disabled: s, "aria-disabled": !m, className: x, style: g, ref: h }, b, o, { children: Te.jsxs("div", { className: "ndl-btn-inner", children: [c && Te.jsx("span", { className: "ndl-btn-spinner-wrapper", children: Te.jsx(h1, { size: p }) }), !!f && Te.jsx("div", { className: "ndl-btn-leading-element", children: f }), !!n && Te.jsx("span", { className: "ndl-btn-content", children: n })] }) })); + return Ce.jsx(_, Object.assign({ type: y, onClick: S, disabled: s, "aria-disabled": !m, className: x, style: g, ref: h }, b, o, { children: Ce.jsxs("div", { className: "ndl-btn-inner", children: [c && Ce.jsx("span", { className: "ndl-btn-spinner-wrapper", children: Ce.jsx(h1, { size: p }) }), !!f && Ce.jsx("div", { className: "ndl-btn-leading-element", children: f }), !!n && Ce.jsx("span", { className: "ndl-btn-content", children: n })] }) })); }; var QY = function(r, e) { var t = {}; @@ -16197,7 +16197,7 @@ var QY = function(r, e) { }; const JY = (r) => { var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, isFloating: l = !1, className: c, style: f, htmlAttributes: d, ref: h } = r, p = QY(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "isFloating", "className", "style", "htmlAttributes", "ref"]); - return Te.jsx(L7, Object.assign({ as: t, buttonFill: "outlined", variant: a, className: c, isDisabled: o, isFloating: l, isLoading: i, onClick: u, size: s, style: f, type: n, htmlAttributes: d, ref: h }, p, { children: e })); + return Ce.jsx(L7, Object.assign({ as: t, buttonFill: "outlined", variant: a, className: c, isDisabled: o, isFloating: l, isLoading: i, onClick: u, size: s, style: f, type: n, htmlAttributes: d, ref: h }, p, { children: e })); }; var eX = function(r, e) { var t = {}; @@ -16209,7 +16209,7 @@ var eX = function(r, e) { }; const tX = (r) => { var { children: e, as: t, type: n = "button", isLoading: i = !1, variant: a = "primary", isDisabled: o = !1, size: s = "medium", onClick: u, className: l, style: c, htmlAttributes: f, ref: d } = r, h = eX(r, ["children", "as", "type", "isLoading", "variant", "isDisabled", "size", "onClick", "className", "style", "htmlAttributes", "ref"]); - return Te.jsx(L7, Object.assign({ as: t, buttonFill: "text", variant: a, className: l, isDisabled: o, isLoading: i, onClick: u, size: s, style: c, type: n, htmlAttributes: f, ref: d }, h, { children: e })); + return Ce.jsx(L7, Object.assign({ as: t, buttonFill: "text", variant: a, className: l, isDisabled: o, isLoading: i, onClick: u, size: s, style: c, type: n, htmlAttributes: f, ref: d }, h, { children: e })); }; var cS, Vk; function rX() { @@ -17037,14 +17037,14 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 "ndl-left": r === "left", "ndl-right": r === "right" }); - return Te.jsxs("div", Object.assign({ className: i }, t, { children: [Te.jsx("svg", { "aria-hidden": !0, className: "ndl-hexagon-end-inner", fill: "none", height: n, preserveAspectRatio: "none", viewBox: "0 0 9 24", width: "9", xmlns: "http://www.w3.org/2000/svg", children: Te.jsx("path", { style: { fill: e }, fillRule: "evenodd", clipRule: "evenodd", d: "M5.73024 1.03676C6.08165 0.397331 6.75338 0 7.48301 0H9V24H7.483C6.75338 24 6.08165 23.6027 5.73024 22.9632L0.315027 13.1094C-0.105009 12.4376 -0.105009 11.5624 0.315026 10.8906L5.73024 1.03676Z" }) }), Te.jsx("svg", { "aria-hidden": !0, className: "ndl-hexagon-end-active", fill: "none", height: n + 6, preserveAspectRatio: "none", viewBox: "0 0 13 30", width: "13", xmlns: "http://www.w3.org/2000/svg", children: Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.075 2C9.12474 2 8.24318 2.54521 7.74867 3.43873L2.21419 13.4387C1.68353 14.3976 1.68353 15.6024 2.21419 16.5613L7.74867 26.5613C8.24318 27.4548 9.12474 28 10.075 28H13V30H10.075C8.49126 30 7.022 29.0913 6.1978 27.6021L0.663324 17.6021C-0.221109 16.0041 -0.221108 13.9959 0.663325 12.3979L6.1978 2.39789C7.022 0.90869 8.49126 0 10.075 0H13V2H10.075Z" }) })] })); + return Ce.jsxs("div", Object.assign({ className: i }, t, { children: [Ce.jsx("svg", { "aria-hidden": !0, className: "ndl-hexagon-end-inner", fill: "none", height: n, preserveAspectRatio: "none", viewBox: "0 0 9 24", width: "9", xmlns: "http://www.w3.org/2000/svg", children: Ce.jsx("path", { style: { fill: e }, fillRule: "evenodd", clipRule: "evenodd", d: "M5.73024 1.03676C6.08165 0.397331 6.75338 0 7.48301 0H9V24H7.483C6.75338 24 6.08165 23.6027 5.73024 22.9632L0.315027 13.1094C-0.105009 12.4376 -0.105009 11.5624 0.315026 10.8906L5.73024 1.03676Z" }) }), Ce.jsx("svg", { "aria-hidden": !0, className: "ndl-hexagon-end-active", fill: "none", height: n + 6, preserveAspectRatio: "none", viewBox: "0 0 13 30", width: "13", xmlns: "http://www.w3.org/2000/svg", children: Ce.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.075 2C9.12474 2 8.24318 2.54521 7.74867 3.43873L2.21419 13.4387C1.68353 14.3976 1.68353 15.6024 2.21419 16.5613L7.74867 26.5613C8.24318 27.4548 9.12474 28 10.075 28H13V30H10.075C8.49126 30 7.022 29.0913 6.1978 27.6021L0.663324 17.6021C-0.221109 16.0041 -0.221108 13.9959 0.663325 12.3979L6.1978 2.39789C7.022 0.90869 8.49126 0 10.075 0H13V2H10.075Z" }) })] })); }, Qk = ({ direction: r = "left", color: e, height: t = 24, htmlAttributes: n }) => { const i = Vn("ndl-square-end", { "ndl-left": r === "left", "ndl-right": r === "right" }); - return Te.jsxs("div", Object.assign({ className: i }, n, { children: [Te.jsx("div", { className: "ndl-square-end-inner", style: { backgroundColor: e } }), Te.jsx("svg", { className: "ndl-square-end-active", width: "7", height: t + 6, preserveAspectRatio: "none", viewBox: "0 0 7 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 3.8774 2 C 3.2697 2 2.7917 2.248 2.3967 2.6605 C 1.928 3.1498 1.7993 3.8555 1.7993 4.5331 V 13.8775 V 25.4669 C 1.7993 26.1445 1.928 26.8502 2.3967 27.3395 C 2.7917 27.752 3.2697 28 3.8774 28 H 7 V 30 H 3.8774 C 2.6211 30 1.4369 29.4282 0.5895 28.4485 C 0.1462 27.936 0.0002 27.2467 0.0002 26.5691 L -0.0002 13.8775 L 0.0002 3.4309 C 0.0002 2.7533 0.1462 2.064 0.5895 1.5515 C 1.4368 0.5718 2.6211 0 3.8774 0 H 7 V 2 H 3.8774 Z" }) })] })); -}, DX = ({ height: r = 24 }) => Te.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: r + 6, preserveAspectRatio: "none", viewBox: "0 0 37 30", fill: "none", className: "ndl-relationship-label-lines", children: [Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 2 H 0 V 0 H 37 V 2 Z" }), Te.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 30 H 0 V 28 H 37 V 30 Z" })] }), fS = 200, Ax = (r) => { + return Ce.jsxs("div", Object.assign({ className: i }, n, { children: [Ce.jsx("div", { className: "ndl-square-end-inner", style: { backgroundColor: e } }), Ce.jsx("svg", { className: "ndl-square-end-active", width: "7", height: t + 6, preserveAspectRatio: "none", viewBox: "0 0 7 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: Ce.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 3.8774 2 C 3.2697 2 2.7917 2.248 2.3967 2.6605 C 1.928 3.1498 1.7993 3.8555 1.7993 4.5331 V 13.8775 V 25.4669 C 1.7993 26.1445 1.928 26.8502 2.3967 27.3395 C 2.7917 27.752 3.2697 28 3.8774 28 H 7 V 30 H 3.8774 C 2.6211 30 1.4369 29.4282 0.5895 28.4485 C 0.1462 27.936 0.0002 27.2467 0.0002 26.5691 L -0.0002 13.8775 L 0.0002 3.4309 C 0.0002 2.7533 0.1462 2.064 0.5895 1.5515 C 1.4368 0.5718 2.6211 0 3.8774 0 H 7 V 2 H 3.8774 Z" }) })] })); +}, DX = ({ height: r = 24 }) => Ce.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: r + 6, preserveAspectRatio: "none", viewBox: "0 0 37 30", fill: "none", className: "ndl-relationship-label-lines", children: [Ce.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 2 H 0 V 0 H 37 V 2 Z" }), Ce.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M 37 30 H 0 V 28 H 37 V 30 Z" })] }), fS = 200, Ax = (r) => { var { type: e = "node", color: t, isDisabled: n = !1, isSelected: i = !1, as: a, onClick: o, className: s, style: u, children: l, htmlAttributes: c, isFluid: f = !1, size: d = "large", ref: h } = r, p = MX(r, ["type", "color", "isDisabled", "isSelected", "as", "onClick", "className", "style", "children", "htmlAttributes", "isFluid", "size", "ref"]); const [g, y] = me.useState(!1), b = (k) => { y(!0), c && c.onMouseEnter !== void 0 && c.onMouseEnter(k); @@ -17082,29 +17082,29 @@ const Zk = ({ direction: r = "left", color: e, htmlAttributes: t, height: n = 24 }); if (e === "node") { const k = Vn("ndl-node-label", I); - return Te.jsx(m, Object.assign({ className: k, ref: h, style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u) }, x && { + return Ce.jsx(m, Object.assign({ className: k, ref: h, style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u) }, x && { disabled: n, onClick: S, onMouseEnter: b, onMouseLeave: _, type: "button" - }, c, { children: Te.jsx("div", { className: "ndl-node-label-content", children: l }) })); + }, c, { children: Ce.jsx("div", { className: "ndl-node-label-content", children: l }) })); } else if (e === "relationship" || e === "relationshipLeft" || e === "relationshipRight") { const k = Vn("ndl-relationship-label", I), L = d === "small" ? 20 : 24; - return Te.jsxs(m, Object.assign({ style: Object.assign(Object.assign({ maxWidth: f ? "100%" : fS }, u), { color: n ? P : T }), className: k }, x && { + return Ce.jsxs(m, Object.assign({ style: Object.assign(Object.assign({ maxWidth: f ? "100%" : fS }, u), { color: n ? P : T }), className: k }, x && { disabled: n, onClick: S, onMouseEnter: b, onMouseLeave: _, type: "button" - }, { ref: h }, p, c, { children: [e === "relationshipLeft" || e === "relationship" ? Te.jsx(Zk, { direction: "left", color: O, height: L }) : Te.jsx(Qk, { direction: "left", color: O, height: L }), Te.jsxs("div", { className: "ndl-relationship-label-container", style: { + }, { ref: h }, p, c, { children: [e === "relationshipLeft" || e === "relationship" ? Ce.jsx(Zk, { direction: "left", color: O, height: L }) : Ce.jsx(Qk, { direction: "left", color: O, height: L }), Ce.jsxs("div", { className: "ndl-relationship-label-container", style: { backgroundColor: O - }, children: [Te.jsx("div", { className: "ndl-relationship-label-content", children: l }), Te.jsx(DX, { height: L })] }), e === "relationshipRight" || e === "relationship" ? Te.jsx(Zk, { direction: "right", color: O, height: L }) : Te.jsx(Qk, { direction: "right", color: O, height: L })] })); + }, children: [Ce.jsx("div", { className: "ndl-relationship-label-content", children: l }), Ce.jsx(DX, { height: L })] }), e === "relationshipRight" || e === "relationship" ? Ce.jsx(Zk, { direction: "right", color: O, height: L }) : Ce.jsx(Qk, { direction: "right", color: O, height: L })] })); } else { const k = Vn("ndl-property-key-label", I); - return Te.jsx(m, Object.assign({}, x && { + return Ce.jsx(m, Object.assign({}, x && { type: "button" - }, { style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u), className: k, onClick: S, onMouseEnter: b, onMouseLeave: _, ref: h }, c, { children: Te.jsx("div", { className: "ndl-property-key-label-content", children: l }) })); + }, { style: Object.assign({ backgroundColor: O, color: n ? P : T, maxWidth: f ? "100%" : fS }, u), className: k, onClick: S, onMouseEnter: b, onMouseLeave: _, ref: h }, c, { children: Ce.jsx("div", { className: "ndl-property-key-label-content", children: l }) })); } }; var Bo = function() { @@ -17149,7 +17149,7 @@ var Bo = function() { }, [e, t]), u = me.useMemo(function() { return Bo(Bo({ position: "absolute", userSelect: "none" }, kX[t]), i ?? {}); }, [i, t]); - return Te.jsx("div", { className: a || void 0, style: u, onMouseDown: o, onTouchStart: s, children: n }); + return Ce.jsx("div", { className: a || void 0, style: u, onMouseDown: o, onTouchStart: s, children: n }); }), NX = /* @__PURE__ */ (function() { var r = function(e, t) { return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) { @@ -17520,22 +17520,22 @@ var Bo = function() { if (!i) return null; var c = Object.keys(i).map(function(f) { - return i[f] !== !1 ? Te.jsx(IX, { direction: f, onResizeStart: t.onResizeStart, replaceStyles: a && a[f], className: o && o[f], children: l && l[f] ? l[f] : null }, f) : null; + return i[f] !== !1 ? Ce.jsx(IX, { direction: f, onResizeStart: t.onResizeStart, replaceStyles: a && a[f], className: o && o[f], children: l && l[f] ? l[f] : null }, f) : null; }); - return Te.jsx("div", { className: u, style: s, children: c }); + return Ce.jsx("div", { className: u, style: s, children: c }); }, e.prototype.render = function() { var t = this, n = Object.keys(this.props).reduce(function(o, s) { return UX.indexOf(s) !== -1 || (o[s] = t.props[s]), o; }, {}), i = gh(gh(gh({ position: "relative", userSelect: this.state.isResizing ? "none" : "auto" }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: "border-box", flexShrink: 0 }); this.state.flexBasis && (i.flexBasis = this.state.flexBasis); var a = this.props.as || "div"; - return Te.jsxs(a, gh({ style: i, className: this.props.className }, n, { + return Ce.jsxs(a, gh({ style: i, className: this.props.className }, n, { // `ref` is after `extendsProps` to ensure this one wins over a version // passed in ref: function(o) { o && (t.resizable = o); }, - children: [this.state.isResizing && Te.jsx("div", { style: this.state.backgroundStyle }), this.props.children, this.renderResizer()] + children: [this.state.isResizing && Ce.jsx("div", { style: this.state.backgroundStyle }), this.props.children, this.renderResizer()] })); }, e.defaultProps = { as: "div", @@ -17593,7 +17593,7 @@ const T2 = (r) => { onClick: p, ref: g } = r, y = qX(r, ["children", "as", "isLoading", "isDisabled", "size", "isFloating", "isActive", "variant", "description", "tooltipProps", "className", "style", "htmlAttributes", "onClick", "ref"]); - return Te.jsx(D7, Object.assign({ as: t, iconButtonVariant: "default", isDisabled: i, size: a, isLoading: n, isActive: s, isFloating: o, description: l, tooltipProps: c, className: f, style: d, variant: u, htmlAttributes: h, onClick: p, ref: g }, y, { children: e })); + return Ce.jsx(D7, Object.assign({ as: t, iconButtonVariant: "default", isDisabled: i, size: a, isLoading: n, isActive: s, isFloating: o, description: l, tooltipProps: c, className: f, style: d, variant: u, htmlAttributes: h, onClick: p, ref: g }, y, { children: e })); }; var GX = function(r, e) { var t = {}; @@ -17617,7 +17617,7 @@ const VX = (r) => { h(!0); }, b = c === null ? e : t; if (u === "clean-icon-button") - return Te.jsx(S2, Object.assign({}, l.cleanIconButtonProps, { description: b, tooltipProps: { + return Ce.jsx(S2, Object.assign({}, l.cleanIconButtonProps, { description: b, tooltipProps: { root: Object.assign(Object.assign({}, s), { isOpen: d || c !== null }), trigger: { htmlAttributes: { @@ -17631,7 +17631,7 @@ const VX = (r) => { a && a(_), p(); }, className: l.className, htmlAttributes: o, children: n })); if (u === "icon-button") - return Te.jsx(T2, Object.assign({}, l.iconButtonProps, { description: b, tooltipProps: { + return Ce.jsx(T2, Object.assign({}, l.iconButtonProps, { description: b, tooltipProps: { root: Object.assign(Object.assign({}, s), { isOpen: d || c !== null }), trigger: { htmlAttributes: { @@ -17645,18 +17645,18 @@ const VX = (r) => { a && a(_), p(); }, className: l.className, htmlAttributes: o, children: n })); if (u === "outlined-button") - return Te.jsxs(Bf, Object.assign({ type: "simple", isOpen: d || c !== null }, s, { onOpenChange: (_) => { + return Ce.jsxs(Bf, Object.assign({ type: "simple", isOpen: d || c !== null }, s, { onOpenChange: (_) => { var m; _ ? y() : g(), (m = s == null ? void 0 : s.onOpenChange) === null || m === void 0 || m.call(s, _); - }, children: [Te.jsx(Bf.Trigger, { hasButtonWrapper: !0, htmlAttributes: { + }, children: [Ce.jsx(Bf.Trigger, { hasButtonWrapper: !0, htmlAttributes: { "aria-label": b, onBlur: g, onFocus: y, onMouseEnter: y, onMouseLeave: g - }, children: Te.jsx(JY, Object.assign({ variant: "neutral" }, l.buttonProps, { onClick: (_) => { + }, children: Ce.jsx(JY, Object.assign({ variant: "neutral" }, l.buttonProps, { onClick: (_) => { a && a(_), p(); - }, leadingVisual: n, className: l.className, htmlAttributes: o, children: i })) }), Te.jsx(Bf.Content, { children: b })] })); + }, leadingVisual: n, className: l.className, htmlAttributes: o, children: i })) }), Ce.jsx(Bf.Content, { children: b })] })); }, F7 = ({ textToCopy: r, isDisabled: e, size: t, tooltipProps: n, htmlAttributes: i, type: a }) => { const [, o] = nX(), l = a === "outlined-button" ? { outlinedButtonProps: { @@ -17679,7 +17679,7 @@ const VX = (r) => { }, type: "clean-icon-button" }; - return Te.jsx(VX, Object.assign({ onClick: () => o(r), description: "Copy to clipboard", actionFeedbackText: "Copied" }, l, { tooltipProps: n, className: "n-gap-token-8", icon: Te.jsx(iH, { className: "ndl-icon-svg" }), htmlAttributes: Object.assign({ "aria-live": "polite" }, i), children: a === "outlined-button" && "Copy" })); + return Ce.jsx(VX, Object.assign({ onClick: () => o(r), description: "Copy to clipboard", actionFeedbackText: "Copied" }, l, { tooltipProps: n, className: "n-gap-token-8", icon: Ce.jsx(iH, { className: "ndl-icon-svg" }), htmlAttributes: Object.assign({ "aria-live": "polite" }, i), children: a === "outlined-button" && "Copy" })); }; var HX = function(r, e) { var t = {}; @@ -17689,7 +17689,7 @@ var HX = function(r, e) { e.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (t[n[i]] = r[n[i]]); return t; }; -const U7 = ({ children: r }) => Te.jsx(Te.Fragment, { children: r }); +const U7 = ({ children: r }) => Ce.jsx(Ce.Fragment, { children: r }); U7.displayName = "CollapsibleButtonWrapper"; const WX = (r) => { var { children: e, as: t, isFloating: n = !1, orientation: i = "horizontal", size: a = "medium", className: o, style: s, htmlAttributes: u, ref: l } = r, c = HX(r, ["children", "as", "isFloating", "orientation", "size", "className", "style", "htmlAttributes", "ref"]); @@ -17698,8 +17698,8 @@ const WX = (r) => { "ndl-col": i === "vertical", "ndl-row": i === "horizontal", [`ndl-${a}`]: a - }), p = t || "div", g = ao.Children.toArray(e), y = g.filter((x) => !ao.isValidElement(x) || x.type.displayName !== "CollapsibleButtonWrapper"), b = g.find((x) => ao.isValidElement(x) && x.type.displayName === "CollapsibleButtonWrapper"), _ = b ? b.props.children : null, m = () => i === "horizontal" ? f ? Te.jsx(V9, {}) : Te.jsx(FV, {}) : f ? Te.jsx(G9, {}) : Te.jsx(VV, {}); - return Te.jsxs(p, Object.assign({ role: "group", className: h, ref: l, style: s }, c, u, { children: [y, _ && Te.jsxs(Te.Fragment, { children: [!f && _, Te.jsx(S2, { onClick: () => { + }), p = t || "div", g = ao.Children.toArray(e), y = g.filter((x) => !ao.isValidElement(x) || x.type.displayName !== "CollapsibleButtonWrapper"), b = g.find((x) => ao.isValidElement(x) && x.type.displayName === "CollapsibleButtonWrapper"), _ = b ? b.props.children : null, m = () => i === "horizontal" ? f ? Ce.jsx(V9, {}) : Ce.jsx(FV, {}) : f ? Ce.jsx(G9, {}) : Ce.jsx(VV, {}); + return Ce.jsxs(p, Object.assign({ role: "group", className: h, ref: l, style: s }, c, u, { children: [y, _ && Ce.jsxs(Ce.Fragment, { children: [!f && _, Ce.jsx(S2, { onClick: () => { d((x) => !x); }, size: a, description: f ? "Show more" : "Show less", tooltipProps: { root: { @@ -17777,9 +17777,9 @@ const ZX = (r) => { if (e === void 0) return null; const p = XX(n), g = $X(n); - return e == null ? void 0 : e.map((y) => Te.jsx("abbr", { className: "ndl-kbd-key", title: g[y], children: p[y] }, y)); - }, [e, n]), d = me.useMemo(() => t === void 0 ? null : t == null ? void 0 : t.map((p, g) => g === 0 ? Te.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString()) : Te.jsxs(Te.Fragment, { children: [Te.jsx("span", { className: "ndl-kbd-then", children: "Then" }), Te.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString())] })), [t]), h = Vn("ndl-kbd", a); - return Te.jsxs(c, Object.assign({ className: h, style: o, ref: u }, l, s, { children: [f, d] })); + return e == null ? void 0 : e.map((y) => Ce.jsx("abbr", { className: "ndl-kbd-key", title: g[y], children: p[y] }, y)); + }, [e, n]), d = me.useMemo(() => t === void 0 ? null : t == null ? void 0 : t.map((p, g) => g === 0 ? Ce.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString()) : Ce.jsxs(Ce.Fragment, { children: [Ce.jsx("span", { className: "ndl-kbd-then", children: "Then" }), Ce.jsx("span", { className: "ndl-kbd-key", children: p }, p == null ? void 0 : p.toString())] })), [t]), h = Vn("ndl-kbd", a); + return Ce.jsxs(c, Object.assign({ className: h, style: o, ref: u }, l, s, { children: [f, d] })); }; var QX = function(r, e) { var t = {}; @@ -17799,16 +17799,16 @@ const q7 = (r) => { "ndl-medium": t === "medium", "ndl-small": t === "small" }), g = !n && !i; - return Te.jsxs(Bf, Object.assign({ hoverDelay: { + return Ce.jsxs(Bf, Object.assign({ hoverDelay: { close: 0, open: 500 } }, u == null ? void 0 : u.root, { type: "simple", // We disable the tooltip if the button is disabled or open, so it doesn't interfere with a menu open isDisabled: s === null || n || a === !0, - children: [Te.jsx(Bf.Trigger, Object.assign({}, u == null ? void 0 : u.trigger, { hasButtonWrapper: !0, children: Te.jsxs("button", Object.assign({ type: "button", ref: d, className: p, style: c, disabled: !g, "aria-disabled": !g, "aria-label": s ?? void 0, "aria-expanded": a, onClick: l }, h, f, { children: [Te.jsx("div", { className: "ndl-select-icon-btn-inner", children: i ? Te.jsx(h1, { size: "small" }) : Te.jsx("div", { className: "ndl-icon", children: e }) }), Te.jsx(G9, { className: Vn("ndl-select-icon-btn-icon", { + children: [Ce.jsx(Bf.Trigger, Object.assign({}, u == null ? void 0 : u.trigger, { hasButtonWrapper: !0, children: Ce.jsxs("button", Object.assign({ type: "button", ref: d, className: p, style: c, disabled: !g, "aria-disabled": !g, "aria-label": s ?? void 0, "aria-expanded": a, onClick: l }, h, f, { children: [Ce.jsx("div", { className: "ndl-select-icon-btn-inner", children: i ? Ce.jsx(h1, { size: "small" }) : Ce.jsx("div", { className: "ndl-icon", children: e }) }), Ce.jsx(G9, { className: Vn("ndl-select-icon-btn-icon", { "ndl-select-icon-btn-icon-open": a === !0 - }) })] })) })), Te.jsx(Bf.Content, Object.assign({}, u == null ? void 0 : u.content, { children: s }))] + }) })] })) })), Ce.jsx(Bf.Content, Object.assign({}, u == null ? void 0 : u.content, { children: s }))] })); }; function sM(r, e) { @@ -19205,8 +19205,8 @@ var nK = rK(), K1 = /* @__PURE__ */ W1(nK), iK = fu({ // Implemented from pseudocode from wikipedia bellmanFord: function(e) { var t = this, n = fK(e), i = n.weight, a = n.directed, o = n.root, s = i, u = this, l = this.cy(), c = this.byGroup(), f = c.edges, d = c.nodes, h = d.length, p = new sv(), g = !1, y = []; - o = l.collection(o)[0], f.unmergeBy(function(Ce) { - return Ce.isLoop(); + o = l.collection(o)[0], f.unmergeBy(function(Te) { + return Te.isLoop(); }); for (var b = f.length, _ = function(Y) { var Q = p.get(Y.id()); @@ -19257,8 +19257,8 @@ var nK = rK(), K1 = /* @__PURE__ */ W1(nK), iK = fu({ for (var Oe = de[0].id(), ke = 0, De = 2; De < de.length; De += 2) de[De].id() < Oe && (Oe = de[De].id(), ke = De); de = de.slice(ke).concat(de.slice(0, ke)), de.push(de[0]); - var Ne = de.map(function(Ce) { - return Ce.id(); + var Ne = de.map(function(Te) { + return Te.id(); }).join(","); $.indexOf(Ne) === -1 && (y.push(u.spawn(de)), $.push(Ne)); } @@ -23393,10 +23393,10 @@ var If = function(e) { break; } } - var fe = function(Ce, Y) { - return Ce = Ce - ce, Y = Y - pe, { - x: Ce * ne - Y * le + ce, - y: Ce * le + Y * ne + pe + var fe = function(Te, Y) { + return Te = Te - ce, Y = Y - pe, { + x: Te * ne - Y * le + ce, + y: Te * le + Y * ne + pe }; }, se = fe(k, B), de = fe(k, j), ge = fe(L, B), Oe = fe(L, j); k = Math.min(se.x, de.x, ge.x, Oe.x), L = Math.max(se.x, de.x, ge.x, Oe.x), B = Math.min(se.y, de.y, ge.y, Oe.y), j = Math.max(se.y, de.y, ge.y, Oe.y); @@ -28968,15 +28968,15 @@ XF.prototype.run = function() { }; return Mt; } - }, Ce = { + }, Te = { downward: 0, leftward: 90, upward: 180, rightward: -90 }; - Object.keys(Ce).indexOf(r.direction) === -1 && Ia("Invalid direction '".concat(r.direction, "' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ce).join(", "))); + Object.keys(Te).indexOf(r.direction) === -1 && Ia("Invalid direction '".concat(r.direction, "' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Te).join(", "))); var Y = function(ie) { - return V$(Ne(ie), u, Ce[r.direction]); + return V$(Ne(ie), u, Te[r.direction]); }; return t.nodes().layoutPositions(this, r, Y), this; }; @@ -30188,12 +30188,12 @@ ry.getAllInBox = function(r, e, t, n) { return Tc(Oe, ke, De); } function y(Oe, ke) { - var De = Oe._private, Ne = o, Ce = ""; + var De = Oe._private, Ne = o, Te = ""; Oe.boundingBox(); var Y = De.labelBounds.main; if (!Y) return null; - var Q = g(De.rscratch, "labelX", ke), ie = g(De.rscratch, "labelY", ke), we = g(De.rscratch, "labelAngle", ke), Ee = Oe.pstyle(Ce + "text-margin-x").pfValue, Me = Oe.pstyle(Ce + "text-margin-y").pfValue, Ie = Y.x1 - Ne - Ee, Ye = Y.x2 + Ne - Ee, ot = Y.y1 - Ne - Me, mt = Y.y2 + Ne - Me; + var Q = g(De.rscratch, "labelX", ke), ie = g(De.rscratch, "labelY", ke), we = g(De.rscratch, "labelAngle", ke), Ee = Oe.pstyle(Te + "text-margin-x").pfValue, Me = Oe.pstyle(Te + "text-margin-y").pfValue, Ie = Y.x1 - Ne - Ee, Ye = Y.x2 + Ne - Ee, ot = Y.y1 - Ne - Me, mt = Y.y2 + Ne - Me; if (we) { var wt = Math.cos(we), Mt = Math.sin(we), Dt = function(tt, _e) { return tt = tt - Q, _e = _e - ie, { @@ -30218,10 +30218,10 @@ ry.getAllInBox = function(r, e, t, n) { }]; } function b(Oe, ke, De, Ne) { - function Ce(Y, Q, ie) { + function Te(Y, Q, ie) { return (ie.y - Y.y) * (Q.x - Y.x) > (Q.y - Y.y) * (ie.x - Y.x); } - return Ce(Oe, De, Ne) !== Ce(ke, De, Ne) && Ce(Oe, ke, De) !== Ce(Oe, ke, Ne); + return Te(Oe, De, Ne) !== Te(ke, De, Ne) && Te(Oe, ke, De) !== Te(Oe, ke, Ne); } for (var _ = 0; _ < i.length; _++) { var m = i[_]; @@ -30552,11 +30552,11 @@ Zu.findTaxiPoints = function(r, e) { } else t.segpts = [c.x1, c.y2]; } else { - var Ne = Math.abs(W) <= f / 2, Ce = Math.abs(k) <= p / 2; + var Ne = Math.abs(W) <= f / 2, Te = Math.abs(k) <= p / 2; if (Ne) { var Y = (c.y1 + c.y2) / 2, Q = c.x1, ie = c.x2; t.segpts = [Q, Y, ie, Y]; - } else if (Ce) { + } else if (Te) { var we = (c.x1 + c.x2) / 2, Ee = c.y1, Me = c.y2; t.segpts = [we, Ee, we, Me]; } else @@ -30738,7 +30738,7 @@ Zu.findEdgeControlPoints = function(r) { southeast: 0 }; for (var ge = 0; ge < B.eles.length; ge++) { - var Oe = B.eles[ge], ke = Oe[0]._private.rscratch, De = Oe.pstyle("curve-style").value, Ne = De === "unbundled-bezier" || vp(De, "segments") || vp(De, "taxi"), Ce = !q.same(Oe.source()); + var Oe = B.eles[ge], ke = Oe[0]._private.rscratch, De = Oe.pstyle("curve-style").value, Ne = De === "unbundled-bezier" || vp(De, "segments") || vp(De, "taxi"), Te = !q.same(Oe.source()); if (!B.calculatedIntersection && q !== W && (B.hasBezier || B.hasUnbundled)) { B.calculatedIntersection = !0; var Y = le.intersectLine(J.x, J.y, Z, ue, X.x, X.y, 0, pe, de), Q = B.srcIntn = Y, ie = ce.intersectLine(X.x, X.y, re, ne, J.x, J.y, 0, fe, se), we = B.tgtIntn = ie, Ee = B.intersectionPts = { @@ -30808,8 +30808,8 @@ Zu.findEdgeControlPoints = function(r) { } }; } - var Dt = Ce ? j : B; - ke.nodesOverlap = Dt.nodesOverlap, ke.srcIntn = Dt.srcIntn, ke.tgtIntn = Dt.tgtIntn, ke.isRound = De.startsWith("round"), i && (q.isParent() || q.isChild() || W.isParent() || W.isChild()) && (q.parents().anySame(W) || W.parents().anySame(q) || q.same(W) && q.isParent()) ? e.findCompoundLoopPoints(Oe, Dt, ge, Ne) : q === W ? e.findLoopPoints(Oe, Dt, ge, Ne) : De.endsWith("segments") ? e.findSegmentsPoints(Oe, Dt) : De.endsWith("taxi") ? e.findTaxiPoints(Oe, Dt) : De === "straight" || !Ne && B.eles.length % 2 === 1 && ge === Math.floor(B.eles.length / 2) ? e.findStraightEdgePoints(Oe) : e.findBezierPoints(Oe, Dt, ge, Ne, Ce), e.findEndpoints(Oe), e.tryToCorrectInvalidPoints(Oe, Dt), e.checkForInvalidEdgeWarning(Oe), e.storeAllpts(Oe), e.storeEdgeProjections(Oe), e.calculateArrowAngles(Oe), e.recalculateEdgeLabelProjections(Oe), e.calculateLabelAngles(Oe); + var Dt = Te ? j : B; + ke.nodesOverlap = Dt.nodesOverlap, ke.srcIntn = Dt.srcIntn, ke.tgtIntn = Dt.tgtIntn, ke.isRound = De.startsWith("round"), i && (q.isParent() || q.isChild() || W.isParent() || W.isChild()) && (q.parents().anySame(W) || W.parents().anySame(q) || q.same(W) && q.isParent()) ? e.findCompoundLoopPoints(Oe, Dt, ge, Ne) : q === W ? e.findLoopPoints(Oe, Dt, ge, Ne) : De.endsWith("segments") ? e.findSegmentsPoints(Oe, Dt) : De.endsWith("taxi") ? e.findTaxiPoints(Oe, Dt) : De === "straight" || !Ne && B.eles.length % 2 === 1 && ge === Math.floor(B.eles.length / 2) ? e.findStraightEdgePoints(Oe) : e.findBezierPoints(Oe, Dt, ge, Ne, Te), e.findEndpoints(Oe), e.tryToCorrectInvalidPoints(Oe, Dt), e.checkForInvalidEdgeWarning(Oe), e.storeAllpts(Oe), e.storeEdgeProjections(Oe), e.calculateArrowAngles(Oe), e.recalculateEdgeLabelProjections(Oe), e.calculateLabelAngles(Oe); } }, E = 0; E < s.length; E++) O(); @@ -30885,15 +30885,15 @@ J1.findEndpoints = function(r) { De === "top" ? ge -= ke : De === "bottom" && (ge += ke); var Ne = u.pstyle("text-halign").value; Ne === "left" ? de -= Oe : Ne === "right" && (de += Oe); - var Ce = _1(J[0], J[1], [de - Oe, ge - ke, de + Oe, ge - ke, de + Oe, ge + ke, de - Oe, ge + ke], c.x, c.y); - if (Ce.length > 0) { - var Y = l, Q = Cg(Y, vm(o)), ie = Cg(Y, vm(Ce)), we = Q; - if (ie < Q && (o = Ce, we = ie), Ce.length > 2) { + var Te = _1(J[0], J[1], [de - Oe, ge - ke, de + Oe, ge - ke, de + Oe, ge + ke, de - Oe, ge + ke], c.x, c.y); + if (Te.length > 0) { + var Y = l, Q = Cg(Y, vm(o)), ie = Cg(Y, vm(Te)), we = Q; + if (ie < Q && (o = Te, we = ie), Te.length > 2) { var Ee = Cg(Y, { - x: Ce[2], - y: Ce[3] + x: Te[2], + y: Te[3] }); - Ee < we && (o = [Ce[2], Ce[3]]); + Ee < we && (o = [Te[2], Te[3]]); } } } @@ -31887,8 +31887,8 @@ Jm.load = function() { return Math.sqrt((Qe - _e) * (Qe - _e) + (Ze - Ue) * (Ze - Ue)); }, Ne = function(_e, Ue, Qe, Ze) { return (Qe - _e) * (Qe - _e) + (Ze - Ue) * (Ze - Ue); - }, Ce; - r.registerBinding(r.container, "touchstart", Ce = function(_e) { + }, Te; + r.registerBinding(r.container, "touchstart", Te = function(_e) { if (r.hasTouchStarted = !0, !!I(_e)) { m(), r.touchData.capture = !0, r.data.bgActivePosistion = void 0; var Ue = r.cy, Qe = r.touchData.now, Ze = r.touchData.earlier; @@ -32237,7 +32237,7 @@ Jm.load = function() { return _e.pointerType === "mouse" || _e.pointerType === 4; }; r.registerBinding(r.container, "pointerdown", function(tt) { - vt(tt) || (tt.preventDefault(), mt(tt), Dt(tt), Ce(tt)); + vt(tt) || (tt.preventDefault(), mt(tt), Dt(tt), Te(tt)); }), r.registerBinding(r.container, "pointerup", function(tt) { vt(tt) || (wt(tt), Dt(tt), ie(tt)); }), r.registerBinding(r.container, "pointercancel", function(tt) { @@ -33749,7 +33749,7 @@ Vp.drawNode = function(r, e, t) { x[Qe] && S[Qe].complete && !S[Qe].error && (Ue++, o.drawInscribedImage(r, S[Qe], e, Qe, vt)); } l.backgrounding = Ue !== O, _e !== l.backgrounding && e.updateStyle(!1); - }, Ce = function() { + }, Te = function() { var vt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : d; o.hasPie(e) && (o.drawPie(r, e, tt), vt && (h || o.nodeShapes[o.getNodeShape(e)].draw(r, f.x, f.y, s, u, ce, c))); }, Y = function() { @@ -33862,9 +33862,9 @@ Vp.drawNode = function(r, e, t) { }, Ye = e.pstyle("ghost").value === "yes"; if (Ye) { var ot = e.pstyle("ghost-offset-x").pfValue, mt = e.pstyle("ghost-offset-y").pfValue, wt = e.pstyle("ghost-opacity").value, Mt = wt * d; - r.translate(ot, mt), se(), we(), pe(wt * B), De(), Ne(Mt, !0), fe(wt * X), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(Mt, !1), Q(Mt), r.translate(-ot, -mt); + r.translate(ot, mt), se(), we(), pe(wt * B), De(), Ne(Mt, !0), fe(wt * X), ie(), Te(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(Mt, !1), Q(Mt), r.translate(-ot, -mt); } - h && r.translate(-f.x, -f.y), Me(), h && r.translate(f.x, f.y), se(), we(), pe(), De(), Ne(d, !0), fe(), ie(), Ce(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(d, !1), Q(), h && r.translate(-f.x, -f.y), Ie(), Ee(), t && r.translate(b.x1, b.y1); + h && r.translate(-f.x, -f.y), Me(), h && r.translate(f.x, f.y), se(), we(), pe(), De(), Ne(d, !0), fe(), ie(), Te(k !== 0 || L !== 0), Y(k !== 0 || L !== 0), Ne(d, !1), Q(), h && r.translate(-f.x, -f.y), Ie(), Ee(), t && r.translate(b.x1, b.y1); } }; var bU = function(e) { @@ -40167,41 +40167,41 @@ function Hre() { k4 = 1; var r = vD(), e = pD(), t = BU(), n = xre(), i = Ore(), a = Tre(), o = Cre(), s = Are(), u = Rre(), l = WU(), c = Pre(), f = n0(), d = Ire(), h = Fre(), p = Ure(), g = Bs(), y = r_(), b = qre(), _ = iy(), m = Vre(), x = sy(), S = _D(), O = 1, E = 2, T = 4, P = "[object Arguments]", I = "[object Array]", k = "[object Boolean]", L = "[object Date]", B = "[object Error]", j = "[object Function]", z = "[object GeneratorFunction]", H = "[object Map]", q = "[object Number]", W = "[object Object]", $ = "[object RegExp]", J = "[object Set]", X = "[object String]", Z = "[object Symbol]", ue = "[object WeakMap]", re = "[object ArrayBuffer]", ne = "[object DataView]", le = "[object Float32Array]", ce = "[object Float64Array]", pe = "[object Int8Array]", fe = "[object Int16Array]", se = "[object Int32Array]", de = "[object Uint8Array]", ge = "[object Uint8ClampedArray]", Oe = "[object Uint16Array]", ke = "[object Uint32Array]", De = {}; De[P] = De[I] = De[re] = De[ne] = De[k] = De[L] = De[le] = De[ce] = De[pe] = De[fe] = De[se] = De[H] = De[q] = De[W] = De[$] = De[J] = De[X] = De[Z] = De[de] = De[ge] = De[Oe] = De[ke] = !0, De[B] = De[j] = De[ue] = !1; - function Ne(Ce, Y, Q, ie, we, Ee) { + function Ne(Te, Y, Q, ie, we, Ee) { var Me, Ie = Y & O, Ye = Y & E, ot = Y & T; - if (Q && (Me = we ? Q(Ce, ie, we, Ee) : Q(Ce)), Me !== void 0) + if (Q && (Me = we ? Q(Te, ie, we, Ee) : Q(Te)), Me !== void 0) return Me; - if (!_(Ce)) - return Ce; - var mt = g(Ce); + if (!_(Te)) + return Te; + var mt = g(Te); if (mt) { - if (Me = d(Ce), !Ie) - return o(Ce, Me); + if (Me = d(Te), !Ie) + return o(Te, Me); } else { - var wt = f(Ce), Mt = wt == j || wt == z; - if (y(Ce)) - return a(Ce, Ie); + var wt = f(Te), Mt = wt == j || wt == z; + if (y(Te)) + return a(Te, Ie); if (wt == W || wt == P || Mt && !we) { - if (Me = Ye || Mt ? {} : p(Ce), !Ie) - return Ye ? u(Ce, i(Me, Ce)) : s(Ce, n(Me, Ce)); + if (Me = Ye || Mt ? {} : p(Te), !Ie) + return Ye ? u(Te, i(Me, Te)) : s(Te, n(Me, Te)); } else { if (!De[wt]) - return we ? Ce : {}; - Me = h(Ce, wt, Ie); + return we ? Te : {}; + Me = h(Te, wt, Ie); } } Ee || (Ee = new r()); - var Dt = Ee.get(Ce); + var Dt = Ee.get(Te); if (Dt) return Dt; - Ee.set(Ce, Me), m(Ce) ? Ce.forEach(function(_e) { - Me.add(Ne(_e, Y, Q, _e, Ce, Ee)); - }) : b(Ce) && Ce.forEach(function(_e, Ue) { - Me.set(Ue, Ne(_e, Y, Q, Ue, Ce, Ee)); + Ee.set(Te, Me), m(Te) ? Te.forEach(function(_e) { + Me.add(Ne(_e, Y, Q, _e, Te, Ee)); + }) : b(Te) && Te.forEach(function(_e, Ue) { + Me.set(Ue, Ne(_e, Y, Q, Ue, Te, Ee)); }); - var vt = ot ? Ye ? c : l : Ye ? S : x, tt = mt ? void 0 : vt(Ce); - return e(tt || Ce, function(_e, Ue) { - tt && (Ue = _e, _e = Ce[Ue]), t(Me, Ue, Ne(_e, Y, Q, Ue, Ce, Ee)); + var vt = ot ? Ye ? c : l : Ye ? S : x, tt = mt ? void 0 : vt(Te); + return e(tt || Te, function(_e, Ue) { + tt && (Ue = _e, _e = Te[Ue]), t(Me, Ue, Ne(_e, Y, Q, Ue, Te, Ee)); }), Me; } return BC = Ne, BC; @@ -42008,7 +42008,7 @@ function Sa() { ["partial", S], ["partialRight", O], ["rearg", T] - ], ne = "[object Arguments]", le = "[object Array]", ce = "[object AsyncFunction]", pe = "[object Boolean]", fe = "[object Date]", se = "[object DOMException]", de = "[object Error]", ge = "[object Function]", Oe = "[object GeneratorFunction]", ke = "[object Map]", De = "[object Number]", Ne = "[object Null]", Ce = "[object Object]", Y = "[object Promise]", Q = "[object Proxy]", ie = "[object RegExp]", we = "[object Set]", Ee = "[object String]", Me = "[object Symbol]", Ie = "[object Undefined]", Ye = "[object WeakMap]", ot = "[object WeakSet]", mt = "[object ArrayBuffer]", wt = "[object DataView]", Mt = "[object Float32Array]", Dt = "[object Float64Array]", vt = "[object Int8Array]", tt = "[object Int16Array]", _e = "[object Int32Array]", Ue = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", Ze = "[object Uint16Array]", nt = "[object Uint32Array]", It = /\b__p \+= '';/g, ct = /\b(__p \+=) '' \+/g, Lt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Rt = /&(?:amp|lt|gt|quot|#39);/g, jt = /[&<>"']/g, Yt = RegExp(Rt.source), sr = RegExp(jt.source), Ut = /<%-([\s\S]+?)%>/g, Rr = /<%([\s\S]+?)%>/g, Xt = /<%=([\s\S]+?)%>/g, Vr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Br = /^\w*$/, mr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /[\\^$.*+?()[\]{}|]/g, sn = RegExp(ur.source), Fr = /^\s+/, un = /\s/, bn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, wn = /\{\n\/\* \[wrapped with (.+)\] \*/, _n = /,? & /, xn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, on = /[()=,{}\[\]\/\s]/, Nn = /\\(\\)?/g, fi = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, gn = /\w*$/, yn = /^[-+]0x[0-9a-f]+$/i, Jn = /^0b[01]+$/i, _i = /^\[object .+?Constructor\]$/, Ir = /^0o[0-7]+$/i, pa = /^(?:0|[1-9]\d*)$/, di = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Bt = /($^)/, hr = /['\n\r\u2028\u2029\\]/g, ei = "\\ud800-\\udfff", Hn = "\\u0300-\\u036f", fs = "\\ufe20-\\ufe2f", Na = "\\u20d0-\\u20ff", ki = Hn + fs + Na, Wr = "\\u2700-\\u27bf", Nr = "a-z\\xdf-\\xf6\\xf8-\\xff", na = "\\xac\\xb1\\xd7\\xf7", Fs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hu = "\\u2000-\\u206f", ga = " \\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", Us = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ln = "\\ufe0e\\ufe0f", Ii = na + Fs + hu + ga, Ni = "['’]", Pc = "[" + ei + "]", vu = "[" + Ii + "]", ia = "[" + ki + "]", Hl = "\\d+", Md = "[" + Wr + "]", Xa = "[" + Nr + "]", Wl = "[^" + ei + Ii + Hl + Wr + Nr + Us + "]", Yl = "\\ud83c[\\udffb-\\udfff]", nf = "(?:" + ia + "|" + Yl + ")", Wi = "[^" + ei + "]", af = "(?:\\ud83c[\\udde6-\\uddff]){2}", La = "[\\ud800-\\udbff][\\udc00-\\udfff]", qo = "[" + Us + "]", Gf = "\\u200d", ds = "(?:" + Xa + "|" + Wl + ")", Mc = "(?:" + qo + "|" + Wl + ")", Xl = "(?:" + Ni + "(?:d|ll|m|re|s|t|ve))?", ti = "(?:" + Ni + "(?:D|LL|M|RE|S|T|VE))?", zs = nf + "?", Qu = "[" + Ln + "]?", qs = "(?:" + Gf + "(?:" + [Wi, af, La].join("|") + ")" + Qu + zs + ")*", $l = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", of = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", pu = Qu + zs + qs, _o = "(?:" + [Md, af, La].join("|") + ")" + pu, wo = "(?:" + [Wi + ia + "?", ia, af, La, Pc].join("|") + ")", Vf = RegExp(Ni, "g"), sf = RegExp(ia, "g"), gu = RegExp(Yl + "(?=" + Yl + ")|" + wo + pu, "g"), so = RegExp([ + ], ne = "[object Arguments]", le = "[object Array]", ce = "[object AsyncFunction]", pe = "[object Boolean]", fe = "[object Date]", se = "[object DOMException]", de = "[object Error]", ge = "[object Function]", Oe = "[object GeneratorFunction]", ke = "[object Map]", De = "[object Number]", Ne = "[object Null]", Te = "[object Object]", Y = "[object Promise]", Q = "[object Proxy]", ie = "[object RegExp]", we = "[object Set]", Ee = "[object String]", Me = "[object Symbol]", Ie = "[object Undefined]", Ye = "[object WeakMap]", ot = "[object WeakSet]", mt = "[object ArrayBuffer]", wt = "[object DataView]", Mt = "[object Float32Array]", Dt = "[object Float64Array]", vt = "[object Int8Array]", tt = "[object Int16Array]", _e = "[object Int32Array]", Ue = "[object Uint8Array]", Qe = "[object Uint8ClampedArray]", Ze = "[object Uint16Array]", nt = "[object Uint32Array]", It = /\b__p \+= '';/g, ct = /\b(__p \+=) '' \+/g, Lt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Rt = /&(?:amp|lt|gt|quot|#39);/g, jt = /[&<>"']/g, Yt = RegExp(Rt.source), sr = RegExp(jt.source), Ut = /<%-([\s\S]+?)%>/g, Rr = /<%([\s\S]+?)%>/g, Xt = /<%=([\s\S]+?)%>/g, Vr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Br = /^\w*$/, mr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ur = /[\\^$.*+?()[\]{}|]/g, sn = RegExp(ur.source), Fr = /^\s+/, un = /\s/, bn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, wn = /\{\n\/\* \[wrapped with (.+)\] \*/, _n = /,? & /, xn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, on = /[()=,{}\[\]\/\s]/, Nn = /\\(\\)?/g, fi = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, gn = /\w*$/, yn = /^[-+]0x[0-9a-f]+$/i, Jn = /^0b[01]+$/i, _i = /^\[object .+?Constructor\]$/, Ir = /^0o[0-7]+$/i, pa = /^(?:0|[1-9]\d*)$/, di = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Bt = /($^)/, hr = /['\n\r\u2028\u2029\\]/g, ei = "\\ud800-\\udfff", Hn = "\\u0300-\\u036f", fs = "\\ufe20-\\ufe2f", Na = "\\u20d0-\\u20ff", ki = Hn + fs + Na, Wr = "\\u2700-\\u27bf", Nr = "a-z\\xdf-\\xf6\\xf8-\\xff", na = "\\xac\\xb1\\xd7\\xf7", Fs = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", hu = "\\u2000-\\u206f", ga = " \\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", Us = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ln = "\\ufe0e\\ufe0f", Ii = na + Fs + hu + ga, Ni = "['’]", Pc = "[" + ei + "]", vu = "[" + Ii + "]", ia = "[" + ki + "]", Hl = "\\d+", Md = "[" + Wr + "]", Xa = "[" + Nr + "]", Wl = "[^" + ei + Ii + Hl + Wr + Nr + Us + "]", Yl = "\\ud83c[\\udffb-\\udfff]", nf = "(?:" + ia + "|" + Yl + ")", Wi = "[^" + ei + "]", af = "(?:\\ud83c[\\udde6-\\uddff]){2}", La = "[\\ud800-\\udbff][\\udc00-\\udfff]", qo = "[" + Us + "]", Gf = "\\u200d", ds = "(?:" + Xa + "|" + Wl + ")", Mc = "(?:" + qo + "|" + Wl + ")", Xl = "(?:" + Ni + "(?:d|ll|m|re|s|t|ve))?", ti = "(?:" + Ni + "(?:D|LL|M|RE|S|T|VE))?", zs = nf + "?", Qu = "[" + Ln + "]?", qs = "(?:" + Gf + "(?:" + [Wi, af, La].join("|") + ")" + Qu + zs + ")*", $l = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", of = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", pu = Qu + zs + qs, _o = "(?:" + [Md, af, La].join("|") + ")" + pu, wo = "(?:" + [Wi + ia + "?", ia, af, La, Pc].join("|") + ")", Vf = RegExp(Ni, "g"), sf = RegExp(ia, "g"), gu = RegExp(Yl + "(?=" + Yl + ")|" + wo + pu, "g"), so = RegExp([ qo + "?" + Xa + "+" + Xl + "(?=" + [vu, qo, "$"].join("|") + ")", Mc + "+" + ti + "(?=" + [vu, qo + ds, "$"].join("|") + ")", qo + "?" + ds + "+" + Xl, @@ -42049,9 +42049,9 @@ function Sa() { "parseInt", "setTimeout" ], hs = -1, jn = {}; - jn[Mt] = jn[Dt] = jn[vt] = jn[tt] = jn[_e] = jn[Ue] = jn[Qe] = jn[Ze] = jn[nt] = !0, jn[ne] = jn[le] = jn[mt] = jn[pe] = jn[wt] = jn[fe] = jn[de] = jn[ge] = jn[ke] = jn[De] = jn[Ce] = jn[ie] = jn[we] = jn[Ee] = jn[Ye] = !1; + jn[Mt] = jn[Dt] = jn[vt] = jn[tt] = jn[_e] = jn[Ue] = jn[Qe] = jn[Ze] = jn[nt] = !0, jn[ne] = jn[le] = jn[mt] = jn[pe] = jn[wt] = jn[fe] = jn[de] = jn[ge] = jn[ke] = jn[De] = jn[Te] = jn[ie] = jn[we] = jn[Ee] = jn[Ye] = !1; var Zr = {}; - Zr[ne] = Zr[le] = Zr[mt] = Zr[wt] = Zr[pe] = Zr[fe] = Zr[Mt] = Zr[Dt] = Zr[vt] = Zr[tt] = Zr[_e] = Zr[ke] = Zr[De] = Zr[Ce] = Zr[ie] = Zr[we] = Zr[Ee] = Zr[Me] = Zr[Ue] = Zr[Qe] = Zr[Ze] = Zr[nt] = !0, Zr[de] = Zr[ge] = Zr[Ye] = !1; + Zr[ne] = Zr[le] = Zr[mt] = Zr[wt] = Zr[pe] = Zr[fe] = Zr[Mt] = Zr[Dt] = Zr[vt] = Zr[tt] = Zr[_e] = Zr[ke] = Zr[De] = Zr[Te] = Zr[ie] = Zr[we] = Zr[Ee] = Zr[Me] = Zr[Ue] = Zr[Qe] = Zr[Ze] = Zr[nt] = !0, Zr[de] = Zr[ge] = Zr[Ye] = !1; var Zl = { // Latin-1 Supplement block. À: "A", @@ -42867,7 +42867,7 @@ function Sa() { var Pt = vo(A), Qt = Pt == ge || Pt == Oe; if (Jd(A)) return Mn(A, qe); - if (Pt == Ce || Pt == ne || Qt && !ve) { + if (Pt == Te || Pt == ne || Qt && !ve) { if (Le = $e || Qt ? {} : Qp(A), !qe) return $e ? Tf(A, Du(Le, A)) : sd(A, co(Le, A)); } else { @@ -43048,8 +43048,8 @@ function Sa() { } function Sr(A, D, U, ee, ve, Ae) { var Le = rn(A), qe = rn(D), $e = Le ? le : vo(A), Ot = qe ? le : vo(D); - $e = $e == ne ? Ce : $e, Ot = Ot == ne ? Ce : Ot; - var Tt = $e == Ce, Pt = Ot == Ce, Qt = $e == Ot; + $e = $e == ne ? Te : $e, Ot = Ot == ne ? Te : Ot; + var Tt = $e == Te, Pt = Ot == Te, Qt = $e == Ot; if (Qt && Jd(A)) { if (!Jd(D)) return !1; @@ -43984,7 +43984,7 @@ function Sa() { return D; } : _t, vo = Qi; (Fa && vo(new Fa(new ArrayBuffer(1))) != wt || Ua && vo(new Ua()) != ke || cl && vo(cl.resolve()) != Y || Xs && vo(new Xs()) != we || uc && vo(new uc()) != Ye) && (vo = function(A) { - var D = Qi(A), U = D == Ce ? A.constructor : t, ee = U ? ro(U) : ""; + var D = Qi(A), U = D == Te ? A.constructor : t, ee = U ? ro(U) : ""; if (ee) switch (ee) { case hn: @@ -44978,7 +44978,7 @@ function Sa() { return typeof A == "number" || Pa(A) && Qi(A) == De; } function vg(A) { - if (!Pa(A) || Qi(A) != Ce) + if (!Pa(A) || Qi(A) != Te) return !1; var D = ys(A); if (D === null) @@ -47043,8 +47043,8 @@ function Fie() { function j(re) { var ne = Number.POSITIVE_INFINITY, le = 0, ce = Number.POSITIVE_INFINITY, pe = 0, fe = re.graph(), se = fe.marginx || 0, de = fe.marginy || 0; function ge(Oe) { - var ke = Oe.x, De = Oe.y, Ne = Oe.width, Ce = Oe.height; - ne = Math.min(ne, ke - Ne / 2), le = Math.max(le, ke + Ne / 2), ce = Math.min(ce, De - Ce / 2), pe = Math.max(pe, De + Ce / 2); + var ke = Oe.x, De = Oe.y, Ne = Oe.width, Te = Oe.height; + ne = Math.min(ne, ke - Ne / 2), le = Math.max(le, ke + Ne / 2), ce = Math.min(ce, De - Te / 2), pe = Math.max(pe, De + Te / 2); } r.forEach(re.nodes(), function(Oe) { ge(re.node(Oe)); @@ -49362,9 +49362,9 @@ var dae = { 5: function(r, e, t) { return Q; })(); function Ne(Y) { - return typeof BigInt > "u" ? Ce : Y; + return typeof BigInt > "u" ? Te : Y; } - function Ce() { + function Te() { throw new Error("BigInt not supported"); } }, 1053: (r, e) => { @@ -52238,7 +52238,7 @@ var dae = { 5: function(r, e, t) { k = Ne(); break; case l: - k = Ce(); + k = Te(); break; case m: k = pe(); @@ -52308,7 +52308,7 @@ var dae = { 5: function(r, e, t) { function Ne() { return T === "f" && (j.push(T), P = T, k += 1), /[eE]/.test(T) ? (j.push(T), P = T, k + 1) : (T !== "-" && T !== "+" || !/[eE]/.test(P)) && /[^\d]/.test(T) ? (le(j.join("")), B = u, k) : (j.push(T), P = T, k + 1); } - function Ce() { + function Te() { if (/[^\d\w_]/.test(T)) { var Y = j.join(""); return B = ne[Y] ? _ : re[Y] ? b : y, le(j.join("")), B = u, k; @@ -54891,7 +54891,7 @@ var dae = { 5: function(r, e, t) { }, 5250: function(r, e, t) { var n; r = t.nmd(r), (function() { - var i, a = "Expected a function", o = "__lodash_hash_undefined__", s = "__lodash_placeholder__", u = 32, l = 128, c = 1 / 0, f = 9007199254740991, d = NaN, h = 4294967295, p = [["ary", l], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", u], ["partialRight", 64], ["rearg", 256]], g = "[object Arguments]", y = "[object Array]", b = "[object Boolean]", _ = "[object Date]", m = "[object Error]", x = "[object Function]", S = "[object GeneratorFunction]", O = "[object Map]", E = "[object Number]", T = "[object Object]", P = "[object Promise]", I = "[object RegExp]", k = "[object Set]", L = "[object String]", B = "[object Symbol]", j = "[object WeakMap]", z = "[object ArrayBuffer]", H = "[object DataView]", q = "[object Float32Array]", W = "[object Float64Array]", $ = "[object Int8Array]", J = "[object Int16Array]", X = "[object Int32Array]", Z = "[object Uint8Array]", ue = "[object Uint8ClampedArray]", re = "[object Uint16Array]", ne = "[object Uint32Array]", le = /\b__p \+= '';/g, ce = /\b(__p \+=) '' \+/g, pe = /(__e\(.*?\)|\b__t\)) \+\n'';/g, fe = /&(?:amp|lt|gt|quot|#39);/g, se = /[&<>"']/g, de = RegExp(fe.source), ge = RegExp(se.source), Oe = /<%-([\s\S]+?)%>/g, ke = /<%([\s\S]+?)%>/g, De = /<%=([\s\S]+?)%>/g, Ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ce = /^\w*$/, Y = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Q = /[\\^$.*+?()[\]{}|]/g, ie = RegExp(Q.source), we = /^\s+/, Ee = /\s/, Me = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ie = /\{\n\/\* \[wrapped with (.+)\] \*/, Ye = /,? & /, ot = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, mt = /[()=,{}\[\]\/\s]/, wt = /\\(\\)?/g, Mt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Dt = /\w*$/, vt = /^[-+]0x[0-9a-f]+$/i, tt = /^0b[01]+$/i, _e = /^\[object .+?Constructor\]$/, Ue = /^0o[0-7]+$/i, Qe = /^(?:0|[1-9]\d*)$/, Ze = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, nt = /($^)/, It = /['\n\r\u2028\u2029\\]/g, ct = "\\ud800-\\udfff", Lt = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Rt = "\\u2700-\\u27bf", jt = "a-z\\xdf-\\xf6\\xf8-\\xff", Yt = "A-Z\\xc0-\\xd6\\xd8-\\xde", sr = "\\ufe0e\\ufe0f", Ut = "\\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", Rr = "[" + ct + "]", Xt = "[" + Ut + "]", Vr = "[" + Lt + "]", Br = "\\d+", mr = "[" + Rt + "]", ur = "[" + jt + "]", sn = "[^" + ct + Ut + Br + Rt + jt + Yt + "]", Fr = "\\ud83c[\\udffb-\\udfff]", un = "[^" + ct + "]", bn = "(?:\\ud83c[\\udde6-\\uddff]){2}", wn = "[\\ud800-\\udbff][\\udc00-\\udfff]", _n = "[" + Yt + "]", xn = "\\u200d", on = "(?:" + ur + "|" + sn + ")", Nn = "(?:" + _n + "|" + sn + ")", fi = "(?:['’](?:d|ll|m|re|s|t|ve))?", gn = "(?:['’](?:D|LL|M|RE|S|T|VE))?", yn = "(?:" + Vr + "|" + Fr + ")?", Jn = "[" + sr + "]?", _i = Jn + yn + "(?:" + xn + "(?:" + [un, bn, wn].join("|") + ")" + Jn + yn + ")*", Ir = "(?:" + [mr, bn, wn].join("|") + ")" + _i, pa = "(?:" + [un + Vr + "?", Vr, bn, wn, Rr].join("|") + ")", di = RegExp("['’]", "g"), Bt = RegExp(Vr, "g"), hr = RegExp(Fr + "(?=" + Fr + ")|" + pa + _i, "g"), ei = RegExp([_n + "?" + ur + "+" + fi + "(?=" + [Xt, _n, "$"].join("|") + ")", Nn + "+" + gn + "(?=" + [Xt, _n + on, "$"].join("|") + ")", _n + "?" + on + "+" + fi, _n + "+" + gn, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Br, Ir].join("|"), "g"), Hn = RegExp("[" + xn + ct + Lt + sr + "]"), fs = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Na = ["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"], ki = -1, Wr = {}; + var i, a = "Expected a function", o = "__lodash_hash_undefined__", s = "__lodash_placeholder__", u = 32, l = 128, c = 1 / 0, f = 9007199254740991, d = NaN, h = 4294967295, p = [["ary", l], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", u], ["partialRight", 64], ["rearg", 256]], g = "[object Arguments]", y = "[object Array]", b = "[object Boolean]", _ = "[object Date]", m = "[object Error]", x = "[object Function]", S = "[object GeneratorFunction]", O = "[object Map]", E = "[object Number]", T = "[object Object]", P = "[object Promise]", I = "[object RegExp]", k = "[object Set]", L = "[object String]", B = "[object Symbol]", j = "[object WeakMap]", z = "[object ArrayBuffer]", H = "[object DataView]", q = "[object Float32Array]", W = "[object Float64Array]", $ = "[object Int8Array]", J = "[object Int16Array]", X = "[object Int32Array]", Z = "[object Uint8Array]", ue = "[object Uint8ClampedArray]", re = "[object Uint16Array]", ne = "[object Uint32Array]", le = /\b__p \+= '';/g, ce = /\b(__p \+=) '' \+/g, pe = /(__e\(.*?\)|\b__t\)) \+\n'';/g, fe = /&(?:amp|lt|gt|quot|#39);/g, se = /[&<>"']/g, de = RegExp(fe.source), ge = RegExp(se.source), Oe = /<%-([\s\S]+?)%>/g, ke = /<%([\s\S]+?)%>/g, De = /<%=([\s\S]+?)%>/g, Ne = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Te = /^\w*$/, Y = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Q = /[\\^$.*+?()[\]{}|]/g, ie = RegExp(Q.source), we = /^\s+/, Ee = /\s/, Me = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Ie = /\{\n\/\* \[wrapped with (.+)\] \*/, Ye = /,? & /, ot = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, mt = /[()=,{}\[\]\/\s]/, wt = /\\(\\)?/g, Mt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Dt = /\w*$/, vt = /^[-+]0x[0-9a-f]+$/i, tt = /^0b[01]+$/i, _e = /^\[object .+?Constructor\]$/, Ue = /^0o[0-7]+$/i, Qe = /^(?:0|[1-9]\d*)$/, Ze = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, nt = /($^)/, It = /['\n\r\u2028\u2029\\]/g, ct = "\\ud800-\\udfff", Lt = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Rt = "\\u2700-\\u27bf", jt = "a-z\\xdf-\\xf6\\xf8-\\xff", Yt = "A-Z\\xc0-\\xd6\\xd8-\\xde", sr = "\\ufe0e\\ufe0f", Ut = "\\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", Rr = "[" + ct + "]", Xt = "[" + Ut + "]", Vr = "[" + Lt + "]", Br = "\\d+", mr = "[" + Rt + "]", ur = "[" + jt + "]", sn = "[^" + ct + Ut + Br + Rt + jt + Yt + "]", Fr = "\\ud83c[\\udffb-\\udfff]", un = "[^" + ct + "]", bn = "(?:\\ud83c[\\udde6-\\uddff]){2}", wn = "[\\ud800-\\udbff][\\udc00-\\udfff]", _n = "[" + Yt + "]", xn = "\\u200d", on = "(?:" + ur + "|" + sn + ")", Nn = "(?:" + _n + "|" + sn + ")", fi = "(?:['’](?:d|ll|m|re|s|t|ve))?", gn = "(?:['’](?:D|LL|M|RE|S|T|VE))?", yn = "(?:" + Vr + "|" + Fr + ")?", Jn = "[" + sr + "]?", _i = Jn + yn + "(?:" + xn + "(?:" + [un, bn, wn].join("|") + ")" + Jn + yn + ")*", Ir = "(?:" + [mr, bn, wn].join("|") + ")" + _i, pa = "(?:" + [un + Vr + "?", Vr, bn, wn, Rr].join("|") + ")", di = RegExp("['’]", "g"), Bt = RegExp(Vr, "g"), hr = RegExp(Fr + "(?=" + Fr + ")|" + pa + _i, "g"), ei = RegExp([_n + "?" + ur + "+" + fi + "(?=" + [Xt, _n, "$"].join("|") + ")", Nn + "+" + gn + "(?=" + [Xt, _n + on, "$"].join("|") + ")", _n + "?" + on + "+" + fi, _n + "+" + gn, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Br, Ir].join("|"), "g"), Hn = RegExp("[" + xn + ct + Lt + sr + "]"), fs = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, Na = ["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"], ki = -1, Wr = {}; Wr[q] = Wr[W] = Wr[$] = Wr[J] = Wr[X] = Wr[Z] = Wr[ue] = Wr[re] = Wr[ne] = !0, Wr[g] = Wr[y] = Wr[z] = Wr[b] = Wr[H] = Wr[_] = Wr[m] = Wr[x] = Wr[O] = Wr[E] = Wr[T] = Wr[I] = Wr[k] = Wr[L] = Wr[j] = !1; var Nr = {}; Nr[g] = Nr[y] = Nr[z] = Nr[H] = Nr[b] = Nr[_] = Nr[q] = Nr[W] = Nr[$] = Nr[J] = Nr[X] = Nr[O] = Nr[E] = Nr[T] = Nr[I] = Nr[k] = Nr[L] = Nr[B] = Nr[Z] = Nr[ue] = Nr[re] = Nr[ne] = !0, Nr[m] = Nr[x] = Nr[j] = !1; @@ -56252,7 +56252,7 @@ var dae = { 5: function(r, e, t) { function vi(R, N) { if (Ur(R)) return !1; var G = typeof R; - return !(G != "number" && G != "symbol" && G != "boolean" && R != null && !ns(R)) || Ce.test(R) || !Ne.test(R) || N != null && R in Kn(N); + return !(G != "number" && G != "symbol" && G != "boolean" && R != null && !ns(R)) || Te.test(R) || !Ne.test(R) || N != null && R in Kn(N); } function vc(R) { var N = Qi(R), G = be[N]; @@ -61889,21 +61889,21 @@ function print() { __p += __j.call(arguments, '') } function Oe(Ne) { try { De(se.next(Ne)); - } catch (Ce) { - ge(Ce); + } catch (Te) { + ge(Te); } } function ke(Ne) { try { De(se.throw(Ne)); - } catch (Ce) { - ge(Ce); + } catch (Te) { + ge(Te); } } function De(Ne) { - var Ce; - Ne.done ? de(Ne.value) : (Ce = Ne.value, Ce instanceof fe ? Ce : new fe(function(Y) { - Y(Ce); + var Te; + Ne.done ? de(Ne.value) : (Te = Ne.value, Te instanceof fe ? Te : new fe(function(Y) { + Y(Te); })).then(Oe, ke); } De((se = se.apply(ce, pe || [])).next()); @@ -61918,51 +61918,51 @@ function print() { __p += __j.call(arguments, '') } }), ge; function ke(De) { return function(Ne) { - return (function(Ce) { + return (function(Te) { if (fe) throw new TypeError("Generator is already executing."); - for (; ge && (ge = 0, Ce[0] && (Oe = 0)), Oe; ) try { - if (fe = 1, se && (de = 2 & Ce[0] ? se.return : Ce[0] ? se.throw || ((de = se.return) && de.call(se), 0) : se.next) && !(de = de.call(se, Ce[1])).done) return de; - switch (se = 0, de && (Ce = [2 & Ce[0], de.value]), Ce[0]) { + for (; ge && (ge = 0, Te[0] && (Oe = 0)), Oe; ) try { + if (fe = 1, se && (de = 2 & Te[0] ? se.return : Te[0] ? se.throw || ((de = se.return) && de.call(se), 0) : se.next) && !(de = de.call(se, Te[1])).done) return de; + switch (se = 0, de && (Te = [2 & Te[0], de.value]), Te[0]) { case 0: case 1: - de = Ce; + de = Te; break; case 4: - return Oe.label++, { value: Ce[1], done: !1 }; + return Oe.label++, { value: Te[1], done: !1 }; case 5: - Oe.label++, se = Ce[1], Ce = [0]; + Oe.label++, se = Te[1], Te = [0]; continue; case 7: - Ce = Oe.ops.pop(), Oe.trys.pop(); + Te = Oe.ops.pop(), Oe.trys.pop(); continue; default: - if (!((de = (de = Oe.trys).length > 0 && de[de.length - 1]) || Ce[0] !== 6 && Ce[0] !== 2)) { + if (!((de = (de = Oe.trys).length > 0 && de[de.length - 1]) || Te[0] !== 6 && Te[0] !== 2)) { Oe = 0; continue; } - if (Ce[0] === 3 && (!de || Ce[1] > de[0] && Ce[1] < de[3])) { - Oe.label = Ce[1]; + if (Te[0] === 3 && (!de || Te[1] > de[0] && Te[1] < de[3])) { + Oe.label = Te[1]; break; } - if (Ce[0] === 6 && Oe.label < de[1]) { - Oe.label = de[1], de = Ce; + if (Te[0] === 6 && Oe.label < de[1]) { + Oe.label = de[1], de = Te; break; } if (de && Oe.label < de[2]) { - Oe.label = de[2], Oe.ops.push(Ce); + Oe.label = de[2], Oe.ops.push(Te); break; } de[2] && Oe.ops.pop(), Oe.trys.pop(); continue; } - Ce = pe.call(ce, Oe); + Te = pe.call(ce, Oe); } catch (Y) { - Ce = [6, Y], se = 0; + Te = [6, Y], se = 0; } finally { fe = de = 0; } - if (5 & Ce[0]) throw Ce[1]; - return { value: Ce[0] ? Ce[1] : void 0, done: !0 }; + if (5 & Te[0]) throw Te[1]; + return { value: Te[0] ? Te[1] : void 0, done: !0 }; })([De, Ne]); }; } @@ -61995,7 +61995,7 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "__esModule", { value: !0 }); var h = t(9305), p = s(t(206)), g = t(7452), y = d(t(4132)), b = d(t(8987)), _ = t(4455), m = t(7721), x = t(6781), S = h.error.SERVICE_UNAVAILABLE, O = h.error.SESSION_EXPIRED, E = h.internal.bookmarks.Bookmarks, T = h.internal.constants, P = T.ACCESS_MODE_READ, I = T.ACCESS_MODE_WRITE, k = T.BOLT_PROTOCOL_V3, L = T.BOLT_PROTOCOL_V4_0, B = T.BOLT_PROTOCOL_V4_4, j = T.BOLT_PROTOCOL_V5_1, z = "Neo.ClientError.Database.DatabaseNotFound", H = "Neo.ClientError.Transaction.InvalidBookmark", q = "Neo.ClientError.Transaction.InvalidBookmarkMixture", W = "Neo.ClientError.Security.AuthorizationExpired", $ = "Neo.ClientError.Statement.ArgumentError", J = "Neo.ClientError.Request.Invalid", X = "Neo.ClientError.Statement.TypeError", Z = "N/A", ue = null, re = (0, h.int)(3e4), ne = (function(ce) { function pe(fe) { - var se = fe.id, de = fe.address, ge = fe.routingContext, Oe = fe.hostNameResolver, ke = fe.config, De = fe.log, Ne = fe.userAgent, Ce = fe.boltAgent, Y = fe.authTokenManager, Q = fe.routingTablePurgeDelay, ie = fe.newPool, we = ce.call(this, { id: se, config: ke, log: De, userAgent: Ne, boltAgent: Ce, authTokenManager: Y, newPool: ie }, function(Ee) { + var se = fe.id, de = fe.address, ge = fe.routingContext, Oe = fe.hostNameResolver, ke = fe.config, De = fe.log, Ne = fe.userAgent, Te = fe.boltAgent, Y = fe.authTokenManager, Q = fe.routingTablePurgeDelay, ie = fe.newPool, we = ce.call(this, { id: se, config: ke, log: De, userAgent: Ne, boltAgent: Te, authTokenManager: Y, newPool: ie }, function(Ee) { return u(we, void 0, void 0, function() { var Me, Ie; return l(this, function(Ye) { @@ -62019,7 +62019,7 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype._handleWriteFailure = function(fe, se, de) { return this._log.warn("Routing driver ".concat(this._id, " will forget writer ").concat(se, " for database '").concat(de, "' because of an error ").concat(fe.code, " '").concat(fe.message, "'")), this.forgetWriter(se, de || ue), (0, h.newError)("No longer possible to write to server at " + se, O, fe); }, pe.prototype.acquireConnection = function(fe) { - var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Ce = se.homeDb; + var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Te = se.homeDb; return u(this, void 0, void 0, function() { var Y, Q, ie, we, Ee, Me = this; return l(this, function(Ie) { @@ -62028,11 +62028,11 @@ function print() { __p += __j.call(arguments, '') } return Y = { database: ge || ue }, Q = new m.ConnectionErrorHandler(O, function(Ye, ot) { return Me._handleUnavailability(Ye, ot, Y.database); }, function(Ye, ot) { - return Me._handleWriteFailure(Ye, ot, Ce ?? Y.database); + return Me._handleWriteFailure(Ye, ot, Te ?? Y.database); }, function(Ye, ot, mt) { return Me._handleSecurityError(Ye, ot, mt, Y.database); - }), this.SSREnabled() && Ce !== void 0 && ge === "" ? !(we = this._routingTableRegistry.get(Ce, function() { - return new p.RoutingTable({ database: Ce }); + }), this.SSREnabled() && Te !== void 0 && ge === "" ? !(we = this._routingTableRegistry.get(Te, function() { + return new p.RoutingTable({ database: Te }); })) || we.isStaleFor(de) ? [3, 2] : [4, this.getConnectionFromRoutingTable(we, Ne, de, Q)] : [3, 2]; case 1: if (ie = Ie.sent(), this.SSREnabled()) return [2, ie]; @@ -62049,8 +62049,8 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype.getConnectionFromRoutingTable = function(fe, se, de, ge) { return u(this, void 0, void 0, function() { var Oe, ke, De, Ne; - return l(this, function(Ce) { - switch (Ce.label) { + return l(this, function(Te) { + switch (Te.label) { case 0: if (de === P) ke = this._loadBalancingStrategy.selectReader(fe.readers), Oe = "read"; else { @@ -62058,17 +62058,17 @@ function print() { __p += __j.call(arguments, '') } ke = this._loadBalancingStrategy.selectWriter(fe.writers), Oe = "write"; } if (!ke) throw (0, h.newError)("Failed to obtain connection towards ".concat(Oe, " server. Known routing table is: ").concat(fe), O); - Ce.label = 1; + Te.label = 1; case 1: - return Ce.trys.push([1, 5, , 6]), [4, this._connectionPool.acquire({ auth: se }, ke)]; + return Te.trys.push([1, 5, , 6]), [4, this._connectionPool.acquire({ auth: se }, ke)]; case 2: - return De = Ce.sent(), se ? [4, this._verifyStickyConnection({ auth: se, connection: De, address: ke })] : [3, 4]; + return De = Te.sent(), se ? [4, this._verifyStickyConnection({ auth: se, connection: De, address: ke })] : [3, 4]; case 3: - return Ce.sent(), [2, De]; + return Te.sent(), [2, De]; case 4: return [2, new m.DelegateConnection(De, ge)]; case 5: - throw Ne = Ce.sent(), ge.handleAndTransformError(Ne, ke); + throw Ne = Te.sent(), ge.handleAndTransformError(Ne, ke); case 6: return [2]; } @@ -62166,7 +62166,7 @@ function print() { __p += __j.call(arguments, '') } return l(this, function(ke) { return [2, this._verifyAuthentication({ auth: ge, getAddress: function() { return u(Oe, void 0, void 0, function() { - var De, Ne, Ce; + var De, Ne, Te; return l(this, function(Y) { switch (Y.label) { case 0: @@ -62174,8 +62174,8 @@ function print() { __p += __j.call(arguments, '') } De.database = De.database || Q; } })]; case 1: - if (Ne = Y.sent(), (Ce = de === I ? Ne.writers : Ne.readers).length === 0) throw (0, h.newError)("No servers available for database '".concat(De.database, "' with access mode '").concat(de, "'"), S); - return [2, Ce[0]]; + if (Ne = Y.sent(), (Te = de === I ? Ne.writers : Ne.readers).length === 0) throw (0, h.newError)("No servers available for database '".concat(De.database, "' with access mode '").concat(de, "'"), S); + return [2, Te[0]]; } }); }); @@ -62185,7 +62185,7 @@ function print() { __p += __j.call(arguments, '') } }, pe.prototype.verifyConnectivityAndGetServerInfo = function(fe) { var se = fe.database, de = fe.accessMode; return u(this, void 0, void 0, function() { - var ge, Oe, ke, De, Ne, Ce, Y, Q, ie, we, Ee; + var ge, Oe, ke, De, Ne, Te, Y, Q, ie, we, Ee; return l(this, function(Me) { switch (Me.label) { case 0: @@ -62195,10 +62195,10 @@ function print() { __p += __j.call(arguments, '') } case 1: Oe = Me.sent(), ke = de === I ? Oe.writers : Oe.readers, De = (0, h.newError)("No servers available for database '".concat(ge.database, "' with access mode '").concat(de, "'"), S), Me.label = 2; case 2: - Me.trys.push([2, 9, 10, 11]), Ne = c(ke), Ce = Ne.next(), Me.label = 3; + Me.trys.push([2, 9, 10, 11]), Ne = c(ke), Te = Ne.next(), Me.label = 3; case 3: - if (Ce.done) return [3, 8]; - Y = Ce.value, Me.label = 4; + if (Te.done) return [3, 8]; + Y = Te.value, Me.label = 4; case 4: return Me.trys.push([4, 6, , 7]), [4, this._verifyConnectivityAndGetServerVersion({ address: Y })]; case 5: @@ -62206,14 +62206,14 @@ function print() { __p += __j.call(arguments, '') } case 6: return Q = Me.sent(), De = Q, [3, 7]; case 7: - return Ce = Ne.next(), [3, 3]; + return Te = Ne.next(), [3, 3]; case 8: return [3, 11]; case 9: return ie = Me.sent(), we = { error: ie }, [3, 11]; case 10: try { - Ce && !Ce.done && (Ee = Ne.return) && Ee.call(Ne); + Te && !Te.done && (Ee = Ne.return) && Ee.call(Ne); } finally { if (we) throw we.error; } @@ -62233,30 +62233,30 @@ function print() { __p += __j.call(arguments, '') } return de.forgetWriter(fe); } }); }, pe.prototype._freshRoutingTable = function(fe) { - var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Ce = this._routingTableRegistry.get(ge, function() { + var se = fe === void 0 ? {} : fe, de = se.accessMode, ge = se.database, Oe = se.bookmarks, ke = se.impersonatedUser, De = se.onDatabaseNameResolved, Ne = se.auth, Te = this._routingTableRegistry.get(ge, function() { return new p.RoutingTable({ database: ge }); }); - return Ce.isStaleFor(de) ? (this._log.info('Routing table is stale for database: "'.concat(ge, '" and access mode: "').concat(de, '": ').concat(Ce)), this._refreshRoutingTable(Ce, Oe, ke, Ne).then(function(Y) { + return Te.isStaleFor(de) ? (this._log.info('Routing table is stale for database: "'.concat(ge, '" and access mode: "').concat(de, '": ').concat(Te)), this._refreshRoutingTable(Te, Oe, ke, Ne).then(function(Y) { return De(Y.database), Y; - })) : Ce; + })) : Te; }, pe.prototype._refreshRoutingTable = function(fe, se, de, ge) { var Oe = fe.routers; return this._useSeedRouter ? this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(Oe, fe, se, de, ge) : this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(Oe, fe, se, de, ge); }, pe.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, De, Ne, Ce, Y, Q, ie; + var ke, De, Ne, Te, Y, Q, ie; return l(this, function(we) { switch (we.label) { case 0: return ke = [], [4, this._fetchRoutingTableUsingSeedRouter(ke, this._seedRouter, se, de, ge, Oe)]; case 1: - return De = f.apply(void 0, [we.sent(), 2]), Ne = De[0], Ce = De[1], Ne ? (this._useSeedRouter = !1, [3, 4]) : [3, 2]; + return De = f.apply(void 0, [we.sent(), 2]), Ne = De[0], Te = De[1], Ne ? (this._useSeedRouter = !1, [3, 4]) : [3, 2]; case 2: return [4, this._fetchRoutingTableUsingKnownRouters(fe, se, de, ge, Oe)]; case 3: - Y = f.apply(void 0, [we.sent(), 2]), Q = Y[0], ie = Y[1], Ne = Q, Ce = ie || Ce, we.label = 4; + Y = f.apply(void 0, [we.sent(), 2]), Q = Y[0], ie = Y[1], Ne = Q, Te = ie || Te, we.label = 4; case 4: - return [4, this._applyRoutingTableIfPossible(se, Ne, Ce)]; + return [4, this._applyRoutingTableIfPossible(se, Ne, Te)]; case 5: return [2, we.sent()]; } @@ -62264,7 +62264,7 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, De, Ne, Ce; + var ke, De, Ne, Te; return l(this, function(Y) { switch (Y.label) { case 0: @@ -62272,7 +62272,7 @@ function print() { __p += __j.call(arguments, '') } case 1: return ke = f.apply(void 0, [Y.sent(), 2]), De = ke[0], Ne = ke[1], De ? [3, 3] : [4, this._fetchRoutingTableUsingSeedRouter(fe, this._seedRouter, se, de, ge, Oe)]; case 2: - Ce = f.apply(void 0, [Y.sent(), 2]), De = Ce[0], Ne = Ce[1], Y.label = 3; + Te = f.apply(void 0, [Y.sent(), 2]), De = Te[0], Ne = Te[1], Y.label = 3; case 3: return [4, this._applyRoutingTableIfPossible(se, De, Ne)]; case 4: @@ -62282,29 +62282,29 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._fetchRoutingTableUsingKnownRouters = function(fe, se, de, ge, Oe) { return u(this, void 0, void 0, function() { - var ke, De, Ne, Ce; + var ke, De, Ne, Te; return l(this, function(Y) { switch (Y.label) { case 0: return [4, this._fetchRoutingTable(fe, se, de, ge, Oe)]; case 1: - return ke = f.apply(void 0, [Y.sent(), 2]), De = ke[0], Ne = ke[1], De ? [2, [De, null]] : (Ce = fe.length - 1, pe._forgetRouter(se, fe, Ce), [2, [null, Ne]]); + return ke = f.apply(void 0, [Y.sent(), 2]), De = ke[0], Ne = ke[1], De ? [2, [De, null]] : (Te = fe.length - 1, pe._forgetRouter(se, fe, Te), [2, [null, Ne]]); } }); }); }, pe.prototype._fetchRoutingTableUsingSeedRouter = function(fe, se, de, ge, Oe, ke) { return u(this, void 0, void 0, function() { var De, Ne; - return l(this, function(Ce) { - switch (Ce.label) { + return l(this, function(Te) { + switch (Te.label) { case 0: return [4, this._resolveSeedRouter(se)]; case 1: - return De = Ce.sent(), Ne = De.filter(function(Y) { + return De = Te.sent(), Ne = De.filter(function(Y) { return fe.indexOf(Y) < 0; }), [4, this._fetchRoutingTable(Ne, de, ge, Oe, ke)]; case 2: - return [2, Ce.sent()]; + return [2, Te.sent()]; } }); }); @@ -62328,7 +62328,7 @@ function print() { __p += __j.call(arguments, '') } return u(this, void 0, void 0, function() { var ke = this; return l(this, function(De) { - return [2, fe.reduce(function(Ne, Ce, Y) { + return [2, fe.reduce(function(Ne, Te, Y) { return u(ke, void 0, void 0, function() { var Q, ie, we, Ee, Me, Ie, Ye; return l(this, function(ot) { @@ -62336,16 +62336,16 @@ function print() { __p += __j.call(arguments, '') } case 0: return [4, Ne]; case 1: - return Q = f.apply(void 0, [ot.sent(), 1]), (ie = Q[0]) ? [2, [ie, null]] : (we = Y - 1, pe._forgetRouter(se, fe, we), [4, this._createSessionForRediscovery(Ce, de, ge, Oe)]); + return Q = f.apply(void 0, [ot.sent(), 1]), (ie = Q[0]) ? [2, [ie, null]] : (we = Y - 1, pe._forgetRouter(se, fe, we), [4, this._createSessionForRediscovery(Te, de, ge, Oe)]); case 2: if (Ee = f.apply(void 0, [ot.sent(), 2]), Me = Ee[0], Ie = Ee[1], !Me) return [3, 8]; ot.label = 3; case 3: - return ot.trys.push([3, 5, 6, 7]), [4, this._rediscovery.lookupRoutingTableOnRouter(Me, se.database, Ce, ge)]; + return ot.trys.push([3, 5, 6, 7]), [4, this._rediscovery.lookupRoutingTableOnRouter(Me, se.database, Te, ge)]; case 4: return [2, [ot.sent(), null]]; case 5: - return Ye = ot.sent(), [2, this._handleRediscoveryError(Ye, Ce)]; + return Ye = ot.sent(), [2, this._handleRediscoveryError(Ye, Te)]; case 6: return Me.close(), [7]; case 7: @@ -62362,7 +62362,7 @@ function print() { __p += __j.call(arguments, '') } }); }, pe.prototype._createSessionForRediscovery = function(fe, se, de, ge) { return u(this, void 0, void 0, function() { - var Oe, ke, De, Ne, Ce, Y = this; + var Oe, ke, De, Ne, Te, Y = this; return l(this, function(Q) { switch (Q.label) { case 0: @@ -62376,7 +62376,7 @@ function print() { __p += __j.call(arguments, '') } return Y._handleSecurityError(ie, we, Ee); } }), De = Oe._sticky ? new m.DelegateConnection(Oe) : new m.DelegateConnection(Oe, ke), Ne = new y.default(De), Oe.protocol().version < 4 ? [2, [new h.Session({ mode: I, bookmarks: E.empty(), connectionProvider: Ne }), null]] : [2, [new h.Session({ mode: P, database: "system", bookmarks: se, connectionProvider: Ne, impersonatedUser: de }), null]]; case 4: - return Ce = Q.sent(), [2, this._handleRediscoveryError(Ce, fe)]; + return Te = Q.sent(), [2, this._handleRediscoveryError(Te, fe)]; case 5: return [2]; } @@ -64597,9 +64597,9 @@ function print() { __p += __j.call(arguments, '') } Object.defineProperty(e, "onErrorResumeNext", { enumerable: !0, get: function() { return Ne.onErrorResumeNext; } }); - var Ce = t(7740); + var Te = t(7740); Object.defineProperty(e, "pairs", { enumerable: !0, get: function() { - return Ce.pairs; + return Te.pairs; } }); var Y = t(1699); Object.defineProperty(e, "partition", { enumerable: !0, get: function() { @@ -66910,9 +66910,9 @@ Error message: `).concat(j.message), c); Object.defineProperty(e, "mergeAll", { enumerable: !0, get: function() { return Ne.mergeAll; } }); - var Ce = t(6902); + var Te = t(6902); Object.defineProperty(e, "flatMap", { enumerable: !0, get: function() { - return Ce.flatMap; + return Te.flatMap; } }); var Y = t(983); Object.defineProperty(e, "mergeMap", { enumerable: !0, get: function() { @@ -73181,7 +73181,7 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Roe = (fun var fe, se = {}, de = {}, ge = Z0(pe); try { for (ge.s(); !(fe = ge.n()).done; ) { - for (var Oe = fe.value, ke = Oe.from, De = Oe.to, Ne = "".concat(ke, "-").concat(De), Ce = "".concat(De, "-").concat(ke), Y = 0, Q = [Ne, Ce]; Y < Q.length; Y++) { + for (var Oe = fe.value, ke = Oe.from, De = Oe.to, Ne = "".concat(ke, "-").concat(De), Te = "".concat(De, "-").concat(ke), Y = 0, Q = [Ne, Te]; Y < Q.length; Y++) { var ie = Q[Y]; de[ie] !== void 0 ? de[ie].push(Oe) : de[ie] = [Oe]; } @@ -73209,8 +73209,8 @@ var im = "ForceCytoLayout", Cw = "forceDirected", Aw = "coseBilkent", Roe = (fun var De, Ne = Z0(ke); try { for (Ne.s(); !(De = Ne.n()).done; ) { - var Ce = De.value; - ne[Ce.id] || (ne[Ce.id] = Ce); + var Te = De.value; + ne[Te.id] || (ne[Te.id] = Te); } } catch (Y) { Ne.e(Y); @@ -74699,7 +74699,7 @@ var Ese = 2 * Math.PI, t2 = function(r, e, t) { var H = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], q = z.norm.x, W = z.norm.y; return H ? { x: -q, y: -W } : z.norm; }, s = $n(), u = e.indexOf(r), l = (e.size() - 1) / 2, c = u > l, f = Math.abs(u - l), d = i ? 17 * e.maxFontSize() : 8, h = (e.size() - 1) * d * s, p = (function(z, H, q, W, $, J, X) { - var Z, ue = arguments.length > 7 && arguments[7] !== void 0 && arguments[7], re = $n(), ne = z.size(), le = ne > 1, ce = z.relIsOppositeDirection(J), pe = ce ? q : H, fe = ce ? H : q, se = z.waypointPath, de = se == null ? void 0 : se.points, ge = se == null ? void 0 : se.from, Oe = se == null ? void 0 : se.to, ke = Nw(pe, ge) && Nw(fe, Oe) || Nw(fe, ge) && Nw(pe, Oe), De = ke ? de[1] : null, Ne = ke ? de[de.length - 2] : null, Ce = MB(pe), Y = MB(fe), Q = function(mr, ur) { + var Z, ue = arguments.length > 7 && arguments[7] !== void 0 && arguments[7], re = $n(), ne = z.size(), le = ne > 1, ce = z.relIsOppositeDirection(J), pe = ce ? q : H, fe = ce ? H : q, se = z.waypointPath, de = se == null ? void 0 : se.points, ge = se == null ? void 0 : se.from, Oe = se == null ? void 0 : se.to, ke = Nw(pe, ge) && Nw(fe, Oe) || Nw(fe, ge) && Nw(pe, Oe), De = ke ? de[1] : null, Ne = ke ? de[de.length - 2] : null, Te = MB(pe), Y = MB(fe), Q = function(mr, ur) { return Math.atan2(mr.y - ur.y, mr.x - ur.x); }, ie = Math.max(Math.PI, Ese / (ne / 2)), we = le ? W * ie * (X ? 1 : -1) / ((Z = pe.size) !== null && Z !== void 0 ? Z : ha) : 0, Ee = Q(ke ? De : fe, pe), Me = ke ? Q(fe, Ne) : Ee, Ie = function(mr, ur, sn, Fr) { return { x: mr.x + Math.cos(ur) * sn * (Fr ? -1 : 1), y: mr.y + Math.sin(ur) * sn * (Fr ? -1 : 1) }; @@ -74711,7 +74711,7 @@ var Ese = 2 * Math.PI, t2 = function(r, e, t) { return { x: mr.x + (ur.x - mr.x) / 2, y: mr.y + (ur.y - mr.y) / 2 }; }, wt = function(mr, ur) { return Math.sqrt((mr.x - ur.x) * (mr.x - ur.x) + (mr.y - ur.y) * (mr.y - ur.y)) * re; - }, Mt = Ye(we, Ce), Dt = ot(we, Y), vt = le ? Ye(0, Ce) : null, tt = le ? ot(0, Y) : null, _e = 200 * re, Ue = []; + }, Mt = Ye(we, Te), Dt = ot(we, Y), vt = le ? Ye(0, Te) : null, tt = le ? ot(0, Y) : null, _e = 200 * re, Ue = []; if (ke) { var Qe = wt(Mt, De) < _e; if (le && !Qe) { @@ -74726,15 +74726,15 @@ var Ese = 2 * Math.PI, t2 = function(r, e, t) { } else Ue.push(new Hu(Ne, Dt)); } else { var Lt = le ? wt(vt, tt) : 0; - if (le && Lt > 2 * (30 * re + Math.min(Ce, Y))) if (ue) { - var Rt = PB(pe, fe, Ce, Y, J, z); + if (le && Lt > 2 * (30 * re + Math.min(Te, Y))) if (ue) { + var Rt = PB(pe, fe, Te, Y, J, z); Ue.push(new Hu(Mt, Rt)), Ue.push(new Hu(Rt, Dt)); } else { - var jt = W * $, Yt = 30 + Ce, sr = Math.sqrt(Yt * Yt + jt * jt), Ut = 30 + Y, Rr = Math.sqrt(Ut * Ut + jt * jt), Xt = Ye(0, sr), Vr = ot(0, Rr); + var jt = W * $, Yt = 30 + Te, sr = Math.sqrt(Yt * Yt + jt * jt), Ut = 30 + Y, Rr = Math.sqrt(Ut * Ut + jt * jt), Xt = Ye(0, sr), Vr = ot(0, Rr); Ue.push(new Hu(Mt, Xt)), Ue.push(new Hu(Xt, Vr)), Ue.push(new Hu(Vr, Dt)); } - else if (Lt > (Ce + Y) / 2) { - var Br = PB(pe, fe, Ce, Y, J, z); + else if (Lt > (Te + Y) / 2) { + var Br = PB(pe, fe, Te, Y, J, z); Ue.push(new Hu(Mt, Br)), Ue.push(new Hu(Br, Dt)); } else Ue.push(new Hu(Mt, Dt)); } @@ -75198,14 +75198,14 @@ function oG(r, e, t) { return Tb(z, fe); }, re = J ? (X < 4 ? ["", ""] : [""]).length : 0, ne = function(fe, se) { return (function(de, ge, Oe) { - var ke = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "top", De = 0.98 * Oe, Ne = 0.89 * Oe, Ce = 0.95 * Oe; - return ge === 1 ? De : ge === 2 ? Ce : ge === 3 && ke === "top" ? de === 0 || de === 2 ? Ne : De : ge === 4 && ke === "top" ? de === 0 || de === 3 ? 0.78 * Oe : Ce : ge === 5 && ke === "top" ? de === 0 || de === 4 ? 0.65 * Oe : de === 1 || de === 3 ? Ne : Ce : De; + var ke = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "top", De = 0.98 * Oe, Ne = 0.89 * Oe, Te = 0.95 * Oe; + return ge === 1 ? De : ge === 2 ? Te : ge === 3 && ke === "top" ? de === 0 || de === 2 ? Ne : De : ge === 4 && ke === "top" ? de === 0 || de === 3 ? 0.78 * Oe : Te : ge === 5 && ke === "top" ? de === 0 || de === 4 ? 0.65 * Oe : de === 1 || de === 3 ? Ne : Te : De; })(fe + re, se + re, $); }, le = 1, ce = [], pe = function() { if ((ce = (function(se, de, ge, Oe) { var ke, De = se.split(/\s/g).filter(function(Ie) { return Ie.length > 0; - }), Ne = [], Ce = null, Y = function(Ie) { + }), Ne = [], Te = null, Y = function(Ie) { return de(Ie) > ge(Ne.length, Oe); }, Q = (function(Ie) { var Ye = typeof Symbol < "u" && Ie[Symbol.iterator] || Ie["@@iterator"]; @@ -75241,14 +75241,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho })(De); try { for (Q.s(); !(ke = Q.n()).done; ) { - var ie = ke.value, we = Ce ? "".concat(Ce, " ").concat(ie) : ie; - if (de(we) < ge(Ne.length, Oe)) Ce = we; + var ie = ke.value, we = Te ? "".concat(Te, " ").concat(ie) : ie; + if (de(we) < ge(Ne.length, Oe)) Te = we; else { - if (Ce !== null) { - var Ee = Y(Ce); - Ne.push({ text: Ce, overflowed: Ee }); + if (Te !== null) { + var Ee = Y(Te); + Ne.push({ text: Te, overflowed: Ee }); } - if (Ce = ie, Ne.length > Oe) return []; + if (Te = ie, Ne.length > Oe) return []; } } } catch (Ie) { @@ -75256,9 +75256,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } finally { Q.f(); } - if (Ce) { - var Me = Y(Ce); - Ne.push({ text: Ce, overflowed: Me }); + if (Te) { + var Me = Y(Te); + Ne.push({ text: Te, overflowed: Me }); } return Ne.length <= Oe ? Ne : []; })(Z, ue, ne, le)).length === 0) ce = L1(Z, ue, ne, le, X > le); @@ -75642,7 +75642,7 @@ var DP = "canvasRenderer", Bse = (function() { zB(n, h, g, J, z), j > 0 && Lse(n, h, g, z, B); var Oe = !!k.length; if (P) { - var ke = Qq(z, Oe, $, W), De = W > 0 ? 1 : 0, Ne = Jq(ke, Oe, m, $, W), Ce = Ne.iconXPos, Y = Ne.iconYPos, Q = o.getValueForAnimationName(T, "iconSize", ke), ie = o.getValueForAnimationName(T, "iconXPos", Ce), we = o.getValueForAnimationName(T, "iconYPos", Y), Ee = n.globalAlpha, Me = x ? 0.1 : De; + var ke = Qq(z, Oe, $, W), De = W > 0 ? 1 : 0, Ne = Jq(ke, Oe, m, $, W), Te = Ne.iconXPos, Y = Ne.iconYPos, Q = o.getValueForAnimationName(T, "iconSize", ke), ie = o.getValueForAnimationName(T, "iconXPos", Te), we = o.getValueForAnimationName(T, "iconYPos", Y), Ee = n.globalAlpha, Me = x ? 0.1 : De; n.globalAlpha = o.getValueForAnimationName(T, "iconOpacity", Me); var Ie = X === "#ffffff", Ye = a.getImage(P, Ie); n.drawImage(Ye, h - ie, g - we, Math.floor(Q), Math.floor(Q)), n.globalAlpha = Ee; @@ -75739,7 +75739,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } finally { ke.f(); } - var Ne, Ce, Y = l || T ? (function(jt) { + var Ne, Te, Y = l || T ? (function(jt) { return (function(Yt) { if (Array.isArray(Yt)) return c5(Yt); })(jt) || (function(Yt) { @@ -75760,7 +75760,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho if (this.drawSegments(n, k, B, z, c), op(n, B, z, ge), l || T) { var Ee = Xq(Y, a, o, c, O, P, S === "bottom" ? "bottom" : "top"), Me = aG(Y); if (l && this.drawLabel(n, { x: Ee.x, y: Ee.y }, Ee.angle, Me, i, s, d, h), T) { - var Ie, Ye, ot = g.position, mt = ot === void 0 ? [0, 0] : ot, wt = g.url, Mt = g.size, Dt = DB(Mt === void 0 ? 1 : Mt), vt = [(Ie = mt[0]) !== null && Ie !== void 0 ? Ie : 0, (Ye = mt[1]) !== null && Ye !== void 0 ? Ye : 0], tt = kB(vt, Me, Dt), _e = tt.widthAlign, Ue = tt.heightAlign, Qe = O ? (Ne = Ee.angle + p, Ce = r2(f.rings), { x: Math.cos(Ne) * Ce, y: Math.sin(Ne) * Ce }) : { x: 0, y: 0 }, Ze = mt[1] < 0 ? -1 : 1, nt = Qe.x * Ze, It = Qe.y * Ze, ct = Dt / 2; + var Ie, Ye, ot = g.position, mt = ot === void 0 ? [0, 0] : ot, wt = g.url, Mt = g.size, Dt = DB(Mt === void 0 ? 1 : Mt), vt = [(Ie = mt[0]) !== null && Ie !== void 0 ? Ie : 0, (Ye = mt[1]) !== null && Ye !== void 0 ? Ye : 0], tt = kB(vt, Me, Dt), _e = tt.widthAlign, Ue = tt.heightAlign, Qe = O ? (Ne = Ee.angle + p, Te = r2(f.rings), { x: Math.cos(Ne) * Te, y: Math.sin(Ne) * Te }) : { x: 0, y: 0 }, Ze = mt[1] < 0 ? -1 : 1, nt = Qe.x * Ze, It = Qe.y * Ze, ct = Dt / 2; n.translate(Ee.x, Ee.y), n.rotate(Ee.angle); var Lt = -ct + nt + _e, Rt = -ct + It + Ue; n.drawImage(u.getImage(wt), Lt, Rt, Dt, Dt), n.rotate(-Ee.angle), n.translate(-Ee.x, -Ee.y); @@ -75775,10 +75775,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } var se = ue ? c.color : b ?? f; if (n.fillStyle = se, n.strokeStyle = se, this.drawLoop(n, m, ce, S, O, E), op(n, H, se, pe), u || re) { - var de, ge = o.indexOf(i), Oe = (de = o.angles[ge]) !== null && de !== void 0 ? de : 0, ke = Yq(S, Oe, x, E, Z, T, p), De = ke.x, Ne = ke.y, Ce = ke.angle, Y = ke.flip; - if (u && this.drawLabel(n, { x: De, y: Ne }, Ce, z, i, o, c, f, Y), re) { + var de, ge = o.indexOf(i), Oe = (de = o.angles[ge]) !== null && de !== void 0 ? de : 0, ke = Yq(S, Oe, x, E, Z, T, p), De = ke.x, Ne = ke.y, Te = ke.angle, Y = ke.flip; + if (u && this.drawLabel(n, { x: De, y: Ne }, Te, z, i, o, c, f, Y), re) { var Q, ie, we = d.position, Ee = we === void 0 ? [0, 0] : we, Me = d.url, Ie = d.size, Ye = DB(Ie === void 0 ? 1 : Ie), ot = [(Q = Ee[0]) !== null && Q !== void 0 ? Q : 0, (ie = Ee[1]) !== null && ie !== void 0 ? ie : 0], mt = kB(ot, z, Ye), wt = mt.widthAlign, Mt = mt.heightAlign + (Z ? r2(l.rings) : 0) * (Ee[1] < 0 ? -1 : 1); - n.save(), n.translate(De, Ne), Y ? (n.rotate(Ce - Math.PI), n.translate(2 * -wt, 2 * -Mt)) : n.rotate(Ce); + n.save(), n.translate(De, Ne), Y ? (n.rotate(Te - Math.PI), n.translate(2 * -wt, 2 * -Mt)) : n.rotate(Te); var Dt = Ye / 2, vt = -Dt + wt, tt = -Dt + Mt; n.drawImage(s.getImage(Me), vt, tt, Ye, Ye), n.restore(); } @@ -76216,7 +76216,7 @@ var LP = "svgRenderer", zse = (function() { S.appendChild(Oe); } if ($ !== void 0) { - var ke, De, Ne, Ce, Y = eG(X, (ke = $.size) !== null && ke !== void 0 ? ke : 1), Q = (De = $.position) !== null && De !== void 0 ? De : [0, 0], ie = [(Ne = Q[0]) !== null && Ne !== void 0 ? Ne : 0, (Ce = Q[1]) !== null && Ce !== void 0 ? Ce : 0], we = tG(Y, J, ie), Ee = we.iconXPos, Me = we.iconYPos, Ie = s.imageCache.getImage($.url), Ye = $B({ nodeX: x.x, nodeY: x.y, iconXPos: Ee, iconYPos: Me, iconSize: Y, image: Ie, isDisabled: x.disabled === !0 }); + var ke, De, Ne, Te, Y = eG(X, (ke = $.size) !== null && ke !== void 0 ? ke : 1), Q = (De = $.position) !== null && De !== void 0 ? De : [0, 0], ie = [(Ne = Q[0]) !== null && Ne !== void 0 ? Ne : 0, (Te = Q[1]) !== null && Te !== void 0 ? Te : 0], we = tG(Y, J, ie), Ee = we.iconXPos, Me = we.iconYPos, Ie = s.imageCache.getImage($.url), Ye = $B({ nodeX: x.x, nodeY: x.y, iconXPos: Ee, iconYPos: Me, iconSize: Y, image: Ie, isDisabled: x.disabled === !0 }); S.appendChild(Ye); } var ot = oG(x, a); @@ -76261,8 +76261,8 @@ var LP = "svgRenderer", zse = (function() { }), P && (y.captions && y.captions.length > 0 || y.caption && y.caption.length > 0)) { var $, J = $n(), X = y.selected === !0, Z = X ? d.selected.rings : d.default.rings, ue = Yq(B.apexPoint, B.angle, B.endPoint, B.control2Point, X, Z, y.width), re = ue.x, ne = ue.y, le = ue.angle, ce = (ue.flip, Jx(y)), pe = ce.length > 0 ? ($ = Qb(ce)) === null || $ === void 0 ? void 0 : $.fullCaption : ""; if (pe) { - var fe, se, de, ge, Oe = 40 * J, ke = (fe = y.captionSize) !== null && fe !== void 0 ? fe : 1, De = 6 * ke * J, Ne = o5, Ce = y.selected ? "bold" : "normal"; - s.measurementContext.font = "".concat(Ce, " ").concat(De, "px ").concat(Ne); + var fe, se, de, ge, Oe = 40 * J, ke = (fe = y.captionSize) !== null && fe !== void 0 ? fe : 1, De = 6 * ke * J, Ne = o5, Te = y.selected ? "bold" : "normal"; + s.measurementContext.font = "".concat(Te, " ").concat(De, "px ").concat(Ne); var Y = function(Bt) { return s.measurementContext.measureText(Bt).width; }, Q = pe; @@ -76272,7 +76272,7 @@ var LP = "svgRenderer", zse = (function() { }, 1, !1)[0]; Q = ie.hasEllipsisChar ? "".concat(ie.text, "...") : Q; } - var we = y.selected ? dE : 1, Ee = ((se = y.width) !== null && se !== void 0 ? se : 1) * we, Me = (1 + ke) * J, Ie = ((de = y.captionAlign) !== null && de !== void 0 ? de : "top") === "bottom" ? De / 2 + Ee + Me : -(Ee + Me), Ye = ((ge = Qb(ce)) !== null && ge !== void 0 ? ge : { stylesPerChar: [] }).stylesPerChar, ot = IP(Q, Ye, 0), mt = kP({ x: re, y: ne + Ie, fontSize: De, fontFace: Ne, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: ot, transform: "rotate(".concat(180 * le / Math.PI, ",").concat(re, ",").concat(ne, ")"), fontWeight: Ce }); + var we = y.selected ? dE : 1, Ee = ((se = y.width) !== null && se !== void 0 ? se : 1) * we, Me = (1 + ke) * J, Ie = ((de = y.captionAlign) !== null && de !== void 0 ? de : "top") === "bottom" ? De / 2 + Ee + Me : -(Ee + Me), Ye = ((ge = Qb(ce)) !== null && ge !== void 0 ? ge : { stylesPerChar: [] }).stylesPerChar, ot = IP(Q, Ye, 0), mt = kP({ x: re, y: ne + Ie, fontSize: De, fontFace: Ne, fontColor: L, textAnchor: "middle", dominantBaseline: "alphabetic", lineSpans: ot, transform: "rotate(".concat(180 * le / Math.PI, ",").concat(re, ",").concat(ne, ")"), fontWeight: Te }); i.appendChild(mt); } } @@ -77477,8 +77477,8 @@ var Uw = "NvlController", ab = { filename: "visualisation.png", backgroundColor: } } } - var Ne = !h && i.layoutUpdating, Ce = p !== i.layoutComputing; - i.layoutComputing = p, i.layoutUpdating = h, Ne && i.callIfRegistered(o9), Ce && i.callIfRegistered("onLayoutComputing", p), i.justSwitchedRenderer = !1, i.hasResized = !1, c !== void 0 && c(); + var Ne = !h && i.layoutUpdating, Te = p !== i.layoutComputing; + i.layoutComputing = p, i.layoutUpdating = h, Ne && i.callIfRegistered(o9), Te && i.callIfRegistered("onLayoutComputing", p), i.justSwitchedRenderer = !1, i.hasResized = !1, c !== void 0 && c(); } })(function() { i.animationRequestId = window.requestAnimationFrame(l); @@ -78648,7 +78648,7 @@ const w9 = (r, e) => { return; const x = h.current, S = p.current, O = s !== void 0 && s !== x, E = u !== void 0 && (u.x !== (S == null ? void 0 : S.x) || u.y !== S.y); O && E ? d.current.setZoomAndPan(s, u.x, u.y) : O ? d.current.setZoom(s) : E && d.current.setPan(u.x, u.y), h.current = s, p.current = u; - }, [s, u]), Te.jsx("div", { id: _ue, ref: g, style: { height: "100%", outline: "0" }, ...c }); + }, [s, u]), Ce.jsx("div", { id: _ue, ref: g, style: { height: "100%", outline: "0" }, ...c }); })), Ym = 10, VP = 10, vh = { frameWidth: 3, frameColor: "#a9a9a9", @@ -79502,15 +79502,15 @@ function Fue() { const T = Math.abs(S + O); return Math.abs(E) >= s * T ? E : -(function(P, I, k, L, B, j, z) { let H, q, W, $, J, X, Z, ue, re, ne, le, ce, pe, fe, se, de, ge, Oe; - const ke = P - B, De = k - B, Ne = I - j, Ce = L - j; - J = (se = (ue = ke - (Z = (X = 134217729 * ke) - (X - ke))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = ke * Ce) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = Ne - (Z = (X = 134217729 * Ne) - (X - Ne))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = Ne * De) - Z * re - ue * re - Z * ne))), c[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), c[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, c[2] = ce - (Oe - J) + (le - J), c[3] = Oe; + const ke = P - B, De = k - B, Ne = I - j, Te = L - j; + J = (se = (ue = ke - (Z = (X = 134217729 * ke) - (X - ke))) * (ne = Te - (re = (X = 134217729 * Te) - (X - Te))) - ((fe = ke * Te) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = Ne - (Z = (X = 134217729 * Ne) - (X - Ne))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = Ne * De) - Z * re - ue * re - Z * ne))), c[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), c[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, c[2] = ce - (Oe - J) + (le - J), c[3] = Oe; let Y = (function(Me, Ie) { let Ye = Ie[0]; for (let ot = 1; ot < Me; ot++) Ye += Ie[ot]; return Ye; })(4, c), Q = u * z; - if (Y >= Q || -Y >= Q || (H = P - (ke + (J = P - ke)) + (J - B), W = k - (De + (J = k - De)) + (J - B), q = I - (Ne + (J = I - Ne)) + (J - j), $ = L - (Ce + (J = L - Ce)) + (J - j), H === 0 && q === 0 && W === 0 && $ === 0) || (Q = l * z + i * Math.abs(Y), (Y += ke * $ + Ce * H - (Ne * W + De * q)) >= Q || -Y >= Q)) return Y; - J = (se = (ue = H - (Z = (X = 134217729 * H) - (X - H))) * (ne = Ce - (re = (X = 134217729 * Ce) - (X - Ce))) - ((fe = H * Ce) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = q - (Z = (X = 134217729 * q) - (X - q))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = q * De) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; + if (Y >= Q || -Y >= Q || (H = P - (ke + (J = P - ke)) + (J - B), W = k - (De + (J = k - De)) + (J - B), q = I - (Ne + (J = I - Ne)) + (J - j), $ = L - (Te + (J = L - Te)) + (J - j), H === 0 && q === 0 && W === 0 && $ === 0) || (Q = l * z + i * Math.abs(Y), (Y += ke * $ + Te * H - (Ne * W + De * q)) >= Q || -Y >= Q)) return Y; + J = (se = (ue = H - (Z = (X = 134217729 * H) - (X - H))) * (ne = Te - (re = (X = 134217729 * Te) - (X - Te))) - ((fe = H * Te) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = q - (Z = (X = 134217729 * q) - (X - q))) * (ne = De - (re = (X = 134217729 * De) - (X - De))) - ((de = q * De) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; const ie = a(4, c, 4, p, f); J = (se = (ue = ke - (Z = (X = 134217729 * ke) - (X - ke))) * (ne = $ - (re = (X = 134217729 * $) - (X - $))) - ((fe = ke * $) - Z * re - ue * re - Z * ne)) - (le = se - (ge = (ue = Ne - (Z = (X = 134217729 * Ne) - (X - Ne))) * (ne = W - (re = (X = 134217729 * W) - (X - W))) - ((de = Ne * W) - Z * re - ue * re - Z * ne))), p[0] = se - (le + J) + (J - ge), J = (pe = fe - ((ce = fe + le) - (J = ce - fe)) + (le - J)) - (le = pe - de), p[1] = pe - (le + J) + (J - de), J = (Oe = ce + le) - ce, p[2] = ce - (Oe - J) + (le - J), p[3] = Oe; const we = a(ie, f, 4, p, d); @@ -79888,12 +79888,12 @@ const av = (r) => { }, []), y = me.useCallback((_) => { p(!1), i && i(_); }, [i]), b = h && d.current !== null; - return Te.jsxs(Te.Fragment, { children: [Te.jsx(Tue, { ref: d, nodes: r, id: wue, rels: e, nvlOptions: s, nvlCallbacks: { + return Ce.jsxs(Ce.Fragment, { children: [Ce.jsx(Tue, { ref: d, nodes: r, id: wue, rels: e, nvlOptions: s, nvlCallbacks: { ...o, onInitialization: () => { o.onInitialization !== void 0 && o.onInitialization(), g(); } - }, layout: t, layoutOptions: n, onInitializationError: y, ...l }), b && Te.jsx(Xue, { nvlRef: d, mouseEventCallbacks: a, interactionOptions: u })] }); + }, layout: t, layoutOptions: n, onInitializationError: y, ...l }), b && Ce.jsx(Xue, { nvlRef: d, mouseEventCallbacks: a, interactionOptions: u })] }); })), MG = me.createContext(void 0), Vl = () => { const r = me.useContext(MG); if (!r) @@ -79926,7 +79926,7 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { return r.filter((n) => n.type.toLowerCase().includes(t) ? !0 : DG(n.properties, t)).map((n) => n.id); }, a0 = (r) => { const { isActive: e, ariaLabel: t, isDisabled: n, description: i, onClick: a, onMouseDown: o, tooltipPlacement: s, className: u, style: l, htmlAttributes: c, children: f } = r; - return Te.jsx(S2, { description: i ?? t, tooltipProps: { + return Ce.jsx(S2, { description: i ?? t, tooltipProps: { content: { style: { whiteSpace: "nowrap" } }, root: { isPortaled: !1, placement: s } }, size: "small", className: u, style: l, isActive: e, isDisabled: n, onClick: a, htmlAttributes: Object.assign({ onMouseDown: o }, c), children: f }); @@ -79947,31 +79947,31 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { }), [t]); }, $D = " ", tle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return vE(["single"]), Te.jsx(a0, { isActive: i === "single", isDisabled: o !== "select", ariaLabel: "Individual Select Button", description: `Individual Select ${$D} ${a_.single}`, onClick: () => { + return vE(["single"]), Ce.jsx(a0, { isActive: i === "single", isDisabled: o !== "select", ariaLabel: "Individual Select Button", description: `Individual Select ${$D} ${a_.single}`, onClick: () => { a == null || a("single"); - }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-individual-select" }, t), className: r, style: e, children: Te.jsx(l2, { "aria-label": "Individual Select" }) }); + }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-individual-select" }, t), className: r, style: e, children: Ce.jsx(l2, { "aria-label": "Individual Select" }) }); }, rle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return vE(["box"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "box", ariaLabel: "Box Select Button", description: `Box Select ${$D} ${a_.box}`, onClick: () => { + return vE(["box"]), Ce.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "box", ariaLabel: "Box Select Button", description: `Box Select ${$D} ${a_.box}`, onClick: () => { a == null || a("box"); - }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-box-select" }, t), className: r, style: e, children: Te.jsx(q9, { "aria-label": "Box select" }) }); + }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-box-select" }, t), className: r, style: e, children: Ce.jsx(q9, { "aria-label": "Box select" }) }); }, nle = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { gesture: i, setGesture: a, interactionMode: o } = Vl(); - return vE(["lasso"]), Te.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "lasso", ariaLabel: "Lasso Select Button", description: `Lasso Select ${$D} ${a_.lasso}`, onClick: () => { + return vE(["lasso"]), Ce.jsx(a0, { isDisabled: o !== "select" || a === void 0, isActive: i === "lasso", ariaLabel: "Lasso Select Button", description: `Lasso Select ${$D} ${a_.lasso}`, onClick: () => { a == null || a("lasso"); - }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-lasso-select" }, t), className: r, style: e, children: Te.jsx(z9, { "aria-label": "Lasso select" }) }); + }, tooltipPlacement: n ?? "right", htmlAttributes: Object.assign({ "data-testid": "gesture-lasso-select" }, t), className: r, style: e, children: Ce.jsx(z9, { "aria-label": "Lasso select" }) }); }, kG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { nvlInstance: i } = Vl(), a = me.useCallback(() => { var o, s; (o = i.current) === null || o === void 0 || o.setZoom(((s = i.current) === null || s === void 0 ? void 0 : s.getScale()) * 1.3); }, [i]); - return Te.jsx(a0, { onClick: a, description: "Zoom in", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Te.jsx(JV, {}) }); + return Ce.jsx(a0, { onClick: a, description: "Zoom in", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Ce.jsx(JV, {}) }); }, IG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { nvlInstance: i } = Vl(), a = me.useCallback(() => { var o, s; (o = i.current) === null || o === void 0 || o.setZoom(((s = i.current) === null || s === void 0 ? void 0 : s.getScale()) * 0.7); }, [i]); - return Te.jsx(a0, { onClick: a, description: "Zoom out", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Te.jsx(KV, {}) }); + return Ce.jsx(a0, { onClick: a, description: "Zoom out", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Ce.jsx(KV, {}) }); }, NG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { nvlInstance: i } = Vl(), a = me.useCallback(() => { const s = i.current; @@ -79986,20 +79986,20 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { var s; (s = i.current) === null || s === void 0 || s.fit(a()); }, [a, i]); - return Te.jsx(a0, { onClick: o, description: "Zoom to fit", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Te.jsx(wV, {}) }); + return Ce.jsx(a0, { onClick: o, description: "Zoom to fit", className: r, style: e, htmlAttributes: t, tooltipPlacement: n ?? "left", children: Ce.jsx(wV, {}) }); }, LG = ({ className: r, htmlAttributes: e, style: t, tooltipPlacement: n }) => { const { sidepanel: i } = Vl(); if (!i) throw new Error("Using the ToggleSidePanelButton requires having a sidepanel"); const { isSidePanelOpen: a, setIsSidePanelOpen: o } = i; - return Te.jsx(T2, { size: "small", onClick: () => o == null ? void 0 : o(!a), isFloating: !0, description: a ? "Close" : "Open", isActive: a, tooltipProps: { + return Ce.jsx(T2, { size: "small", onClick: () => o == null ? void 0 : o(!a), isFloating: !0, description: a ? "Close" : "Open", isActive: a, tooltipProps: { content: { style: { whiteSpace: "nowrap" } }, root: { isPortaled: !1, placement: n ?? "bottom", shouldCloseOnReferenceClick: !0 } - }, className: Vn("ndl-graph-visualization-toggle-sidepanel", r), style: t, htmlAttributes: Object.assign({ "aria-label": "Toggle node properties panel" }, e), children: Te.jsx(TV, { className: "ndl-graph-visualization-toggle-icon" }) }); + }, className: Vn("ndl-graph-visualization-toggle-sidepanel", r), style: t, htmlAttributes: Object.assign({ "aria-label": "Toggle node properties panel" }, e), children: Ce.jsx(TV, { className: "ndl-graph-visualization-toggle-icon" }) }); }, ile = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, open: i, setOpen: a, searchTerm: o, setSearchTerm: s, onSearch: u = () => { } }) => { const l = me.useRef(null), [c, f] = Lg({ @@ -80018,62 +80018,62 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { const b = Object.values(p.dataLookupTable.nodes), _ = Object.values(p.dataLookupTable.relationships); u(Zue(b, y), Que(_, y)); }; - return Te.jsx(Te.Fragment, { children: c ? Te.jsx(KY, { ref: l, size: "small", leadingElement: Te.jsx(lk, {}), trailingElement: Te.jsx(S2, { onClick: () => { + return Ce.jsx(Ce.Fragment, { children: c ? Ce.jsx(KY, { ref: l, size: "small", leadingElement: Ce.jsx(lk, {}), trailingElement: Ce.jsx(S2, { onClick: () => { var y; g(""), (y = l.current) === null || y === void 0 || y.focus(); - }, description: "Clear search", children: Te.jsx(H9, {}) }), placeholder: "Search...", value: d, onChange: (y) => g(y.target.value), htmlAttributes: { + }, description: "Clear search", children: Ce.jsx(H9, {}) }), placeholder: "Search...", value: d, onChange: (y) => g(y.target.value), htmlAttributes: { autoFocus: !0, onBlur: () => { d === "" && f(!1); } - } }) : Te.jsx(T2, { size: "small", isFloating: !0, onClick: () => f((y) => !y), description: "Search", className: r, style: e, htmlAttributes: t, tooltipProps: { + } }) : Ce.jsx(T2, { size: "small", isFloating: !0, onClick: () => f((y) => !y), description: "Search", className: r, style: e, htmlAttributes: t, tooltipProps: { root: { placement: n ?? "bottom" } - }, children: Te.jsx(lk, {}) }) }); + }, children: Ce.jsx(lk, {}) }) }); }, jG = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n }) => { const { nvlInstance: i } = Vl(), [a, o] = me.useState(!1), s = () => o(!1), u = me.useRef(null); - return Te.jsxs(Te.Fragment, { children: [Te.jsx(T2, { ref: u, size: "small", isFloating: !0, onClick: () => o((l) => !l), description: "Download", tooltipProps: { + return Ce.jsxs(Ce.Fragment, { children: [Ce.jsx(T2, { ref: u, size: "small", isFloating: !0, onClick: () => o((l) => !l), description: "Download", tooltipProps: { root: { placement: n ?? "bottom" } - }, className: r, style: e, htmlAttributes: t, children: Te.jsx(MV, {}) }), Te.jsx(Lm, { isOpen: a, onClose: s, anchorRef: u, children: Te.jsx(Lm.Item, { title: "Download as PNG", onClick: () => { + }, className: r, style: e, htmlAttributes: t, children: Ce.jsx(MV, {}) }), Ce.jsx(Lm, { isOpen: a, onClose: s, anchorRef: u, children: Ce.jsx(Lm.Item, { title: "Download as PNG", onClick: () => { var l; (l = i.current) === null || l === void 0 || l.saveToFile({}), s(); } }) })] }); }, ale = { d3Force: { - icon: Te.jsx(bV, {}), + icon: Ce.jsx(bV, {}), title: "Force-based layout" }, hierarchical: { - icon: Te.jsx(EV, {}), + icon: Ce.jsx(EV, {}), title: "Hierarchical layout" } }, ole = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, layoutOptions: a = ale }) => { var o, s; const u = me.useRef(null), [l, c] = me.useState(!1), { layout: f, setLayout: d } = Vl(); - return Te.jsxs(Te.Fragment, { children: [Te.jsx(q7, { description: "Select layout", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { + return Ce.jsxs(Ce.Fragment, { children: [Ce.jsx(q7, { description: "Select layout", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { root: { placement: n ?? "bottom" } - }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Te.jsx(l2, {}) }), Te.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Te.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); + }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Ce.jsx(l2, {}) }), Ce.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Ce.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); }, sle = { single: { - icon: Te.jsx(l2, {}), + icon: Ce.jsx(l2, {}), title: "Individual" }, box: { - icon: Te.jsx(q9, {}), + icon: Ce.jsx(q9, {}), title: "Box" }, lasso: { - icon: Te.jsx(z9, {}), + icon: Ce.jsx(z9, {}), title: "Lasso" } }, ule = ({ className: r, style: e, htmlAttributes: t, tooltipPlacement: n, menuPlacement: i, gestureOptions: a = sle }) => { var o, s; const u = me.useRef(null), [l, c] = me.useState(!1), { gesture: f, setGesture: d } = Vl(); - return vE(Object.keys(a)), Te.jsxs(Te.Fragment, { children: [Te.jsx(q7, { description: "Select gesture", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { + return vE(Object.keys(a)), Ce.jsxs(Ce.Fragment, { children: [Ce.jsx(q7, { description: "Select gesture", isOpen: l, onClick: () => c((h) => !h), ref: u, className: r, style: e, htmlAttributes: t, size: "small", tooltipProps: { root: { placement: n ?? "bottom" } - }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Te.jsx(l2, {}) }), Te.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Te.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, trailingContent: Te.jsx(ZX, { keys: [a_[h]] }), isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); + }, children: (s = (o = a[f]) === null || o === void 0 ? void 0 : o.icon) !== null && s !== void 0 ? s : Ce.jsx(l2, {}) }), Ce.jsx(Lm, { isOpen: l, anchorRef: u, onClose: () => c(!1), placement: i, children: Object.entries(a).map(([h, p]) => Ce.jsx(Lm.RadioItem, { title: p.title, leadingVisual: p.icon, trailingContent: Ce.jsx(ZX, { keys: [a_[h]] }), isChecked: h === f, onClick: () => d == null ? void 0 : d(h) }, h)) })] }); }, ty = ({ sidepanel: r }) => { const { children: e, isSidePanelOpen: t, sidePanelWidth: n, onSidePanelResize: i, minWidth: a = 230 } = r; - return t ? Te.jsx(zX, { defaultSize: { + return t ? Ce.jsx(zX, { defaultSize: { height: "100%", width: n ?? 400 }, className: "ndl-graph-resizable", minWidth: a, maxWidth: "66%", enable: { @@ -80087,10 +80087,10 @@ const D9 = navigator.userAgent.includes("Mac"), DG = (r, e) => { topRight: !1 }, handleClasses: { left: "ndl-sidepanel-handle" }, onResizeStop: (o, s, u) => { i(u.getBoundingClientRect().width); - }, children: Te.jsx("div", { className: "ndl-graph-visualization-sidepanel-content", tabIndex: 0, children: e }) }) : null; -}, lle = ({ children: r }) => Te.jsx("div", { className: "ndl-graph-visualization-sidepanel-title ndl-grid-area-title", children: r }); + }, children: Ce.jsx("div", { className: "ndl-graph-visualization-sidepanel-content", tabIndex: 0, children: e }) }) : null; +}, lle = ({ children: r }) => Ce.jsx("div", { className: "ndl-graph-visualization-sidepanel-title ndl-grid-area-title", children: r }); ty.Title = lle; -const cle = ({ children: r }) => Te.jsx("section", { className: "ndl-grid-area-content", children: r }); +const cle = ({ children: r }) => Ce.jsx("section", { className: "ndl-grid-area-content", children: r }); ty.Content = cle; var hx = { exports: {} }; /** @@ -80273,9 +80273,9 @@ function dle() { for (var K = [], oe = arguments.length; oe--; ) K[oe] = arguments[oe]; var ye = se(K, "rgba"), Pe = de(K) || "rgb"; return Pe.substr(0, 3) == "hsl" ? ge(Oe(ye), Pe) : (ye[0] = ke(ye[0]), ye[1] = ke(ye[1]), ye[2] = ke(ye[2]), (Pe === "rgba" || ye.length > 3 && ye[3] < 1) && (ye[3] = ye.length > 3 ? ye[3] : 1, Pe = "rgba"), Pe + "(" + ye.slice(0, Pe === "rgb" ? 3 : 4).join(",") + ")"); - }, Ne = De, Ce = g.unpack, Y = Math.round, Q = function() { + }, Ne = De, Te = g.unpack, Y = Math.round, Q = function() { for (var K, oe = [], ye = arguments.length; ye--; ) oe[ye] = arguments[ye]; - oe = Ce(oe, "hsl"); + oe = Te(oe, "hsl"); var Pe = oe[0], ze = oe[1], Ge = oe[2], Be, Ke, Je; if (ze === 0) Be = Ke = Je = Ge * 255; @@ -81763,17 +81763,17 @@ const N9 = ( ), xle = ({ text: r }) => { var e; const t = r ?? "", n = (e = t.match(N9)) !== null && e !== void 0 ? e : []; - return Te.jsx(Te.Fragment, { children: t.split(N9).map((i, a) => Te.jsxs(ao.Fragment, { children: [i, n[a] && // Should be safe from XSS. + return Ce.jsx(Ce.Fragment, { children: t.split(N9).map((i, a) => Ce.jsxs(ao.Fragment, { children: [i, n[a] && // Should be safe from XSS. // Ref: https://mathiasbynens.github.io/rel-noopener/ - Te.jsx("a", { href: n[a], target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: n[a] })] }, `clickable-url-${a}`)) }); + Ce.jsx("a", { href: n[a], target: "_blank", rel: "noopener noreferrer", className: "hover:underline", children: n[a] })] }, `clickable-url-${a}`)) }); }, Ele = ao.memo(xle), Sle = "…", Ole = 900, Tle = 150, Cle = 300, Ale = ({ value: r, width: e, type: t }) => { const [n, i] = me.useState(!1), a = e > Ole ? Cle : Tle, o = () => { i(!0); }; let s = n ? r : r.slice(0, a); const u = s.length !== r.length; - return s += u ? Sle : "", Te.jsxs(Te.Fragment, { children: [t.startsWith("Array") && "[", Te.jsx(Ele, { text: s }), u && Te.jsx("button", { type: "button", onClick: o, className: "ndl-properties-show-all-button", children: " Show all" }), t.startsWith("Array") && "]"] }); -}, Rle = ({ properties: r, paneWidth: e }) => Te.jsxs("div", { className: "ndl-graph-visualization-properties-table", children: [Te.jsxs("div", { className: "ndl-properties-header", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), Te.jsx(Ed, { variant: "body-small", children: "Value" })] }), Object.entries(r).map(([t, { stringified: n, type: i }]) => Te.jsxs("div", { className: "ndl-properties-row", children: [Te.jsx(Ed, { variant: "body-small", className: "ndl-properties-key", children: t }), Te.jsx("div", { className: "ndl-properties-value", children: Te.jsx(Ale, { value: n, width: e, type: i }) }), Te.jsx("div", { className: "ndl-properties-clipboard-button", children: Te.jsx(F7, { textToCopy: `${t}: ${n}`, size: "small", tooltipProps: { placement: "left", type: "simple" } }) })] }, t))] }), Ple = ({ paneWidth: r = 400 }) => { + return s += u ? Sle : "", Ce.jsxs(Ce.Fragment, { children: [t.startsWith("Array") && "[", Ce.jsx(Ele, { text: s }), u && Ce.jsx("button", { type: "button", onClick: o, className: "ndl-properties-show-all-button", children: " Show all" }), t.startsWith("Array") && "]"] }); +}, Rle = ({ properties: r, paneWidth: e }) => Ce.jsxs("div", { className: "ndl-graph-visualization-properties-table", children: [Ce.jsxs("div", { className: "ndl-properties-header", children: [Ce.jsx(Ed, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), Ce.jsx(Ed, { variant: "body-small", children: "Value" })] }), Object.entries(r).map(([t, { stringified: n, type: i }]) => Ce.jsxs("div", { className: "ndl-properties-row", children: [Ce.jsx(Ed, { variant: "body-small", className: "ndl-properties-key", children: t }), Ce.jsx("div", { className: "ndl-properties-value", children: Ce.jsx(Ale, { value: n, width: e, type: i }) }), Ce.jsx("div", { className: "ndl-properties-clipboard-button", children: Ce.jsx(F7, { textToCopy: `${t}: ${n}`, size: "small", tooltipProps: { placement: "left", type: "simple" } }) })] }, t))] }), Ple = ({ paneWidth: r = 400 }) => { const { selected: e, nvlGraph: t } = Vl(), n = me.useMemo(() => { const [s] = e.nodeIds; if (s !== void 0) @@ -81802,15 +81802,15 @@ const N9 = ( value: a.data.properties[s].stringified })) ]; - return Te.jsxs(Te.Fragment, { children: [Te.jsxs(ty.Title, { children: [Te.jsx("h6", { className: "ndl-details-title", children: a.dataType === "node" ? "Node details" : "Relationship details" }), Te.jsx(F7, { textToCopy: o.map((s) => `${s.key}: ${s.value}`).join(` -`), size: "small" })] }), Te.jsxs(ty.Content, { children: [Te.jsx("div", { className: "ndl-details-tags", children: a.dataType === "node" ? a.data.labelsSorted.map((s) => { + return Ce.jsxs(Ce.Fragment, { children: [Ce.jsxs(ty.Title, { children: [Ce.jsx("h6", { className: "ndl-details-title", children: a.dataType === "node" ? "Node details" : "Relationship details" }), Ce.jsx(F7, { textToCopy: o.map((s) => `${s.key}: ${s.value}`).join(` +`), size: "small" })] }), Ce.jsxs(ty.Content, { children: [Ce.jsx("div", { className: "ndl-details-tags", children: a.dataType === "node" ? a.data.labelsSorted.map((s) => { var u, l; - return Te.jsx(Ax, { type: "node", color: (l = (u = t.dataLookupTable.labelMetaData[s]) === null || u === void 0 ? void 0 : u.mostCommonColor) !== null && l !== void 0 ? l : "", as: "span", htmlAttributes: { + return Ce.jsx(Ax, { type: "node", color: (l = (u = t.dataLookupTable.labelMetaData[s]) === null || u === void 0 ? void 0 : u.mostCommonColor) !== null && l !== void 0 ? l : "", as: "span", htmlAttributes: { tabIndex: 0 }, children: s }, s); - }) : Te.jsx(Ax, { type: "relationship", color: a.data.color, as: "span", htmlAttributes: { + }) : Ce.jsx(Ax, { type: "relationship", color: a.data.color, as: "span", htmlAttributes: { tabIndex: 0 - }, children: a.data.type }, a.data.type) }), Te.jsx("div", { className: "ndl-details-divider" }), Te.jsx(Rle, { properties: a.data.properties, paneWidth: r })] })] }); + }, children: a.data.type }, a.data.type) }), Ce.jsx("div", { className: "ndl-details-divider" }), Ce.jsx(Rle, { properties: a.data.properties, paneWidth: r })] })] }); }, Mle = ({ children: r }) => { const [e, t] = me.useState(0), n = me.useRef(null), i = (u) => { var l, c; @@ -81824,13 +81824,13 @@ const N9 = ( }; return ( // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions - Te.jsx("ul", { onKeyDown: (u) => s(u), ref: n, style: { all: "inherit", listStyleType: "none" }, children: ao.Children.map(r, (u, l) => { + Ce.jsx("ul", { onKeyDown: (u) => s(u), ref: n, style: { all: "inherit", listStyleType: "none" }, children: ao.Children.map(r, (u, l) => { if (!ao.isValidElement(u)) return null; const c = me.cloneElement(u, { tabIndex: e === l ? 0 : -1 }); - return Te.jsx("li", { children: c }, l); + return Ce.jsx("li", { children: c }, l); }) }) ); }, Dle = (r) => typeof r == "function"; @@ -81839,24 +81839,24 @@ function L9({ initiallyShown: r, children: e, isButtonGroup: t }) { if (o === 0) return null; const c = e.slice(0, u).map((f) => Dle(f) ? f() : f); - return Te.jsxs(Te.Fragment, { children: [t === !0 ? Te.jsx(Mle, { children: c }) : Te.jsx("div", { style: { all: "inherit" }, children: c }), s && Te.jsx(tX, { size: "small", onClick: a, children: n ? "Show less" : `Show all (${l} more)` })] }); + return Ce.jsxs(Ce.Fragment, { children: [t === !0 ? Ce.jsx(Mle, { children: c }) : Ce.jsx("div", { style: { all: "inherit" }, children: c }), s && Ce.jsx(tX, { size: "small", onClick: a, children: n ? "Show less" : `Show all (${l} more)` })] }); } const j9 = 25, kle = () => { const { nvlGraph: r } = Vl(); - return Te.jsxs(Te.Fragment, { children: [Te.jsx(ty.Title, { children: Te.jsx(Ed, { variant: "title-4", children: "Results overview" }) }), Te.jsx(ty.Content, { children: Te.jsxs("div", { className: "ndl-graph-visualization-overview-panel", children: [r.dataLookupTable.labels.length > 0 && Te.jsxs("div", { className: "ndl-overview-section", children: [Te.jsx("div", { className: "ndl-overview-header", children: Te.jsxs("span", { children: ["Nodes", ` (${r.nodes.length.toLocaleString()})`] }) }), Te.jsx("div", { className: "ndl-overview-items", children: Te.jsx(L9, { initiallyShown: j9, isButtonGroup: !0, children: r.dataLookupTable.labels.map((e) => function() { + return Ce.jsxs(Ce.Fragment, { children: [Ce.jsx(ty.Title, { children: Ce.jsx(Ed, { variant: "title-4", children: "Results overview" }) }), Ce.jsx(ty.Content, { children: Ce.jsxs("div", { className: "ndl-graph-visualization-overview-panel", children: [r.dataLookupTable.labels.length > 0 && Ce.jsxs("div", { className: "ndl-overview-section", children: [Ce.jsx("div", { className: "ndl-overview-header", children: Ce.jsxs("span", { children: ["Nodes", ` (${r.nodes.length.toLocaleString()})`] }) }), Ce.jsx("div", { className: "ndl-overview-items", children: Ce.jsx(L9, { initiallyShown: j9, isButtonGroup: !0, children: r.dataLookupTable.labels.map((e) => function() { var n, i, a, o; - return Te.jsxs(Ax, { type: "node", htmlAttributes: { + return Ce.jsxs(Ax, { type: "node", htmlAttributes: { tabIndex: -1 }, color: (i = (n = r.dataLookupTable.labelMetaData[e]) === null || n === void 0 ? void 0 : n.mostCommonColor) !== null && i !== void 0 ? i : "", as: "span", children: [e, " (", (o = (a = r.dataLookupTable.labelMetaData[e]) === null || a === void 0 ? void 0 : a.totalCount) !== null && o !== void 0 ? o : 0, ")"] }, e); - }) }) })] }), r.dataLookupTable.types.length > 0 && Te.jsxs("div", { className: "ndl-overview-relationships-section", children: [Te.jsxs("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${r.rels.length.toLocaleString()})`] }), Te.jsx("div", { className: "ndl-overview-items", children: Te.jsx(L9, { initiallyShown: j9, isButtonGroup: !0, children: r.dataLookupTable.types.map((e) => { + }) }) })] }), r.dataLookupTable.types.length > 0 && Ce.jsxs("div", { className: "ndl-overview-relationships-section", children: [Ce.jsxs("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${r.rels.length.toLocaleString()})`] }), Ce.jsx("div", { className: "ndl-overview-items", children: Ce.jsx(L9, { initiallyShown: j9, isButtonGroup: !0, children: r.dataLookupTable.types.map((e) => { var t, n, i, a; - return Te.jsxs(Ax, { type: "relationship", htmlAttributes: { + return Ce.jsxs(Ax, { type: "relationship", htmlAttributes: { tabIndex: -1 }, color: (n = (t = r.dataLookupTable.typeMetaData[e]) === null || t === void 0 ? void 0 : t.mostCommonColor) !== null && n !== void 0 ? n : "", as: "span", children: [e, " (", (a = (i = r.dataLookupTable.typeMetaData[e]) === null || i === void 0 ? void 0 : i.totalCount) !== null && a !== void 0 ? a : 0, ")"] }, e); }) }) })] })] }) })] }); }, Ile = () => { const { selected: r } = Vl(); - return me.useMemo(() => r.nodeIds.length > 0 || r.relationshipIds.length > 0, [r]) ? Te.jsx(Ple, {}) : Te.jsx(kle, {}); + return me.useMemo(() => r.nodeIds.length > 0 || r.relationshipIds.length > 0, [r]) ? Ce.jsx(Ple, {}) : Ce.jsx(kle, {}); }, Gw = (r) => !D9 && r.ctrlKey || D9 && r.metaKey, lb = (r) => r.target instanceof HTMLElement ? r.target.isContentEditable || ["INPUT", "TEXTAREA"].includes(r.target.tagName) : !1; function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setInteractionMode: i, mouseEventCallbacks: a, nvlGraph: o, highlightedNodeIds: s, highlightedRelationshipIds: u }) { const l = me.useCallback((De) => { @@ -81871,27 +81871,27 @@ function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI lb(De) || (e({ nodeIds: [], relationshipIds: [] }), typeof T == "function" && T(De)); }, [T, e]), L = me.useCallback((De, Ne) => { i("drag"); - const Ce = De.map((Y) => Y.id); + const Te = De.map((Y) => Y.id); if (r.nodeIds.length === 0 || Gw(Ne)) { e({ - nodeIds: Ce, + nodeIds: Te, relationshipIds: r.relationshipIds }); return; } e({ - nodeIds: Ce, + nodeIds: Te, relationshipIds: r.relationshipIds }), typeof x == "function" && x(De, Ne); }, [e, x, r, i]), B = me.useCallback((De, Ne) => { typeof S == "function" && S(De, Ne), i("select"); }, [S, i]), j = me.useCallback((De) => { typeof E == "function" && E(De); - }, [E]), z = me.useCallback((De, Ne, Ce) => { - typeof O == "function" && O(De, Ne, Ce); - }, [O]), H = me.useCallback((De, Ne, Ce) => { - if (!lb(Ce)) { - if (Gw(Ce)) + }, [E]), z = me.useCallback((De, Ne, Te) => { + typeof O == "function" && O(De, Ne, Te); + }, [O]), H = me.useCallback((De, Ne, Te) => { + if (!lb(Te)) { + if (Gw(Te)) if (r.nodeIds.includes(De.id)) { const Q = r.nodeIds.filter((ie) => ie !== De.id); e({ @@ -81907,11 +81907,11 @@ function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI } else e({ nodeIds: [De.id], relationshipIds: [] }); - typeof _ == "function" && _(De, Ne, Ce); + typeof _ == "function" && _(De, Ne, Te); } - }, [e, r, _]), q = me.useCallback((De, Ne, Ce) => { - if (!lb(Ce)) { - if (Gw(Ce)) + }, [e, r, _]), q = me.useCallback((De, Ne, Te) => { + if (!lb(Te)) { + if (Gw(Te)) if (r.relationshipIds.includes(De.id)) { const Q = r.relationshipIds.filter((ie) => ie !== De.id); e({ @@ -81930,15 +81930,15 @@ function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI } else e({ nodeIds: [], relationshipIds: [De.id] }); - typeof m == "function" && m(De, Ne, Ce); + typeof m == "function" && m(De, Ne, Te); } - }, [e, r, m]), W = me.useCallback((De, Ne, Ce) => { - lb(Ce) || typeof P == "function" && P(De, Ne, Ce); - }, [P]), $ = me.useCallback((De, Ne, Ce) => { - lb(Ce) || typeof I == "function" && I(De, Ne, Ce); - }, [I]), J = me.useCallback((De, Ne, Ce) => { + }, [e, r, m]), W = me.useCallback((De, Ne, Te) => { + lb(Te) || typeof P == "function" && P(De, Ne, Te); + }, [P]), $ = me.useCallback((De, Ne, Te) => { + lb(Te) || typeof I == "function" && I(De, Ne, Te); + }, [I]), J = me.useCallback((De, Ne, Te) => { const Y = De.map((ie) => ie.id), Q = Ne.map((ie) => ie.id); - if (Gw(Ce)) { + if (Gw(Te)) { const ie = r.nodeIds, we = r.relationshipIds, Ee = (Ye, ot) => [ ...new Set([...Ye, ...ot].filter((mt) => !Ye.includes(mt) || !ot.includes(mt))) ], Me = Ee(ie, Y), Ie = Ee(we, Q); @@ -81948,10 +81948,10 @@ function Nle({ selected: r, setSelected: e, gesture: t, interactionMode: n, setI }); } else e({ nodeIds: Y, relationshipIds: Q }); - }, [e, r]), X = me.useCallback(({ nodes: De, rels: Ne }, Ce) => { - J(De, Ne, Ce), typeof d == "function" && d({ nodes: De, rels: Ne }, Ce); - }, [J, d]), Z = me.useCallback(({ nodes: De, rels: Ne }, Ce) => { - J(De, Ne, Ce), typeof f == "function" && f({ nodes: De, rels: Ne }, Ce); + }, [e, r]), X = me.useCallback(({ nodes: De, rels: Ne }, Te) => { + J(De, Ne, Te), typeof d == "function" && d({ nodes: De, rels: Ne }, Te); + }, [J, d]), Z = me.useCallback(({ nodes: De, rels: Ne }, Te) => { + J(De, Ne, Te), typeof f == "function" && f({ nodes: De, rels: Ne }, Te); }, [J, f]), ue = n === "draw", re = n === "select", ne = re && t === "box", le = re && t === "lasso", ce = n === "pan" || re && t === "single", pe = n === "drag" || n === "select", fe = me.useMemo(() => { var De; return Object.assign(Object.assign({}, a), { onBoxSelect: ne ? Z : !1, onBoxStarted: ne ? p : !1, onCanvasClick: re ? k : !1, onDragEnd: pe ? B : !1, onDragStart: pe ? L : !1, onDrawEnded: ue ? z : !1, onDrawStarted: ue ? j : !1, onHover: re ? y : !1, onHoverNodeMargin: ue ? b : !1, onLassoSelect: le ? X : !1, onLassoStarted: le ? h : !1, onNodeClick: re ? H : !1, onNodeDoubleClick: re ? W : !1, onPan: ce ? g : !1, onRelationshipClick: re ? q : !1, onRelationshipDoubleClick: re ? $ : !1, onZoom: (De = a.onZoom) !== null && De !== void 0 ? De : !0 }); @@ -81998,7 +81998,7 @@ const jle = { "bottom-right": "ndl-graph-visualization-interaction-island ndl-bottom-right", "top-left": "ndl-graph-visualization-interaction-island ndl-top-left", "top-right": "ndl-graph-visualization-interaction-island ndl-top-right" -}, Vw = ({ children: r, className: e, placement: t }) => Te.jsx("div", { className: Vn(jle[t], e), children: r }), Ble = { +}, Vw = ({ children: r, className: e, placement: t }) => Ce.jsx("div", { className: Vn(jle[t], e), children: r }), Ble = { disableTelemetry: !0, disableWebGL: !0, maxZoom: 3, @@ -82006,9 +82006,9 @@ const jle = { relationshipThreshold: 0.55 }, Hw = { bottomLeftIsland: null, - bottomRightIsland: Te.jsxs(YX, { orientation: "vertical", isFloating: !0, size: "small", children: [Te.jsx(kG, {}), " ", Te.jsx(IG, {}), " ", Te.jsx(NG, {})] }), + bottomRightIsland: Ce.jsxs(YX, { orientation: "vertical", isFloating: !0, size: "small", children: [Ce.jsx(kG, {}), " ", Ce.jsx(IG, {}), " ", Ce.jsx(NG, {})] }), topLeftIsland: null, - topRightIsland: Te.jsxs("div", { className: "ndl-graph-visualization-default-download-group", children: [Te.jsx(jG, {}), " ", Te.jsx(LG, {})] }) + topRightIsland: Ce.jsxs("div", { className: "ndl-graph-visualization-default-download-group", children: [Ce.jsx(jG, {}), " ", Ce.jsx(LG, {})] }) }; function ql(r) { var e, t, { nvlRef: n, nvlCallbacks: i, nvlOptions: a, sidepanel: o, nodes: s, rels: u, highlightedNodeIds: l, highlightedRelationshipIds: c, topLeftIsland: f = Hw.topLeftIsland, topRightIsland: d = Hw.topRightIsland, bottomLeftIsland: h = Hw.bottomLeftIsland, bottomRightIsland: p = Hw.bottomRightIsland, gesture: g = "single", setGesture: y, layout: b, setLayout: _, selected: m, setSelected: x, interactionMode: S, setInteractionMode: O, mouseEventCallbacks: E = {}, className: T, style: P, htmlAttributes: I, ref: k, as: L } = r, B = Lle(r, ["nvlRef", "nvlCallbacks", "nvlOptions", "sidepanel", "nodes", "rels", "highlightedNodeIds", "highlightedRelationshipIds", "topLeftIsland", "topRightIsland", "bottomLeftIsland", "bottomRightIsland", "gesture", "setGesture", "layout", "setLayout", "selected", "setSelected", "interactionMode", "setInteractionMode", "mouseEventCallbacks", "className", "style", "htmlAttributes", "ref", "as"]); @@ -82047,7 +82047,7 @@ function ql(r) { onChange: o == null ? void 0 : o.onSidePanelResize, state: (t = o == null ? void 0 : o.sidePanelWidth) !== null && t !== void 0 ? t : 400 }), Ne = me.useMemo(() => o === void 0 ? { - children: Te.jsx(ql.SingleSelectionSidePanelContents, {}), + children: Ce.jsx(ql.SingleSelectionSidePanelContents, {}), isSidePanelOpen: ge, onSidePanelResize: De, setIsSidePanelOpen: Oe, @@ -82058,8 +82058,8 @@ function ql(r) { Oe, ke, De - ]), Ce = L ?? "div"; - return Te.jsx(Ce, Object.assign({ ref: k, className: Vn("ndl-graph-visualization-container", T), style: P }, I, { children: Te.jsxs(MG.Provider, { value: { + ]), Te = L ?? "div"; + return Ce.jsx(Te, Object.assign({ ref: k, className: Vn("ndl-graph-visualization-container", T), style: P }, I, { children: Ce.jsxs(MG.Provider, { value: { gesture: g, interactionMode: Z, layout: le, @@ -82069,7 +82069,7 @@ function ql(r) { setGesture: y, setLayout: ce, sidepanel: Ne - }, children: [Te.jsxs("div", { className: "ndl-graph-visualization", children: [Te.jsx(Kue, Object.assign({ layout: le, nodes: fe, rels: se, nvlOptions: Object.assign(Object.assign(Object.assign({}, Ble), { instanceId: z, styling: { + }, children: [Ce.jsxs("div", { className: "ndl-graph-visualization", children: [Ce.jsx(Kue, Object.assign({ layout: le, nodes: fe, rels: se, nvlOptions: Object.assign(Object.assign(Object.assign({}, Ble), { instanceId: z, styling: { defaultRelationshipColor: W.strongest, disabledItemColor: q.strong, disabledItemFontColor: $.weakest, @@ -82078,7 +82078,7 @@ function ql(r) { } }), a), nvlCallbacks: Object.assign({ onLayoutComputing(Y) { var Q; Y || (Q = j.current) === null || Q === void 0 || Q.fit(j.current.getNodes().map((ie) => ie.id), { noPan: !0 }); - } }, i), mouseEventCallbacks: de, ref: j }, B), J), f !== null && Te.jsx(Vw, { placement: "top-left", children: f }), d !== null && Te.jsx(Vw, { placement: "top-right", children: d }), h !== null && Te.jsx(Vw, { placement: "bottom-left", children: h }), p !== null && Te.jsx(Vw, { placement: "bottom-right", children: p })] }), Ne && Te.jsx(ty, { sidepanel: Ne })] }) })); + } }, i), mouseEventCallbacks: de, ref: j }, B), J), f !== null && Ce.jsx(Vw, { placement: "top-left", children: f }), d !== null && Ce.jsx(Vw, { placement: "top-right", children: d }), h !== null && Ce.jsx(Vw, { placement: "bottom-left", children: h }), p !== null && Ce.jsx(Vw, { placement: "bottom-right", children: p })] }), Ne && Ce.jsx(ty, { sidepanel: Ne })] }) })); } ql.ZoomInButton = kG; ql.ZoomOutButton = IG; @@ -82138,7 +82138,7 @@ class qle extends me.Component { console.error("[neo4j-viz] Rendering error:", e, t.componentStack); } render() { - return this.state.error ? /* @__PURE__ */ Te.jsxs( + return this.state.error ? /* @__PURE__ */ Ce.jsxs( "div", { style: { @@ -82154,8 +82154,8 @@ class qle extends me.Component { justifyContent: "center" }, children: [ - /* @__PURE__ */ Te.jsx("h3", { style: { margin: "0 0 8px" }, children: "Graph rendering failed" }), - /* @__PURE__ */ Te.jsx( + /* @__PURE__ */ Ce.jsx("h3", { style: { margin: "0 0 8px" }, children: "Graph rendering failed" }), + /* @__PURE__ */ Ce.jsx( "pre", { style: { @@ -82207,7 +82207,7 @@ function Hle() { }), [s] ), [p, g] = me.useState(!1), [y, b] = me.useState(300); - return /* @__PURE__ */ Te.jsx("div", { style: { height: n ?? "600px", width: i ?? "100%" }, children: /* @__PURE__ */ Te.jsx( + return /* @__PURE__ */ Ce.jsx("div", { style: { height: n ?? "600px", width: i ?? "100%" }, children: /* @__PURE__ */ Ce.jsx( ql, { nodes: f, @@ -82222,16 +82222,13 @@ function Hle() { setIsSidePanelOpen: g, onSidePanelResize: b, sidePanelWidth: y, - children: /* @__PURE__ */ Te.jsx(ql.SingleSelectionSidePanelContents, {}) + children: /* @__PURE__ */ Ce.jsx(ql.SingleSelectionSidePanelContents, {}) } } ) }); } function Wle() { - return /* @__PURE__ */ Te.jsxs(qle, { children: [ - /* @__PURE__ */ Te.jsx("h1", { children: Array.from(document.body.classList).join(", ") }), - /* @__PURE__ */ Te.jsx(Hle, {}) - ] }); + return /* @__PURE__ */ Ce.jsx(qle, { children: /* @__PURE__ */ Ce.jsx(Hle, {}) }); } const Yle = uV(Wle), $le = { render: Yle }; export {