@oneclick.dev/cms-kit 0.0.71 → 0.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as t,ref as n,computed as r,watchEffect as o,nextTick as i,createElementBlock as a,openBlock as s,Fragment as u,createCommentVNode as c,createElementVNode as f,unref as l,renderList as d,mergeProps as h,createBlock as p,normalizeStyle as v,normalizeClass as g,withCtx as y,renderSlot as m,createVNode as b,isVNode as w,onMounted as _,onBeforeUnmount as E,watch as j,resolveDynamicComponent as k,normalizeProps as O,createTextVNode as x,toDisplayString as N,toRef as I,toValue as C,inject as T}from"vue";import{useVueFlow as M,Position as S}from"@vue-flow/core";import{useNuxtApp as A}from"nuxt/app";let L=1;const P=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=/* @__PURE__ */new Set}subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:t,...n}=e,r="number"==typeof e.id||e.id&&e.id?.length>0?e.id:L++,o=this.toasts.find(e=>e.id===r),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),o?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:i,title:t}):n):this.addToast({title:t,...n,dismissible:i,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:"default"});error=(e,t)=>this.create({...t,type:"error",message:e});success=(e,t)=>this.create({...t,type:"success",message:e});info=(e,t)=>this.create({...t,type:"info",message:e});warning=(e,t)=>this.create({...t,type:"warning",message:e});loading=(e,t)=>this.create({...t,type:"loading",message:e});promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,i=void 0!==n;const a=r.then(async e=>{o=["resolve",e];if(w(e))i=!1,this.create({id:n,type:"default",message:e});else if(D(e)&&!e.ok){i=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,a="object"==typeof r&&!w(r)?r:{message:r||"",id:n||""};this.create({id:n,type:"error",description:o,...a})}else if(e instanceof Error){i=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,a="object"==typeof r&&!w(r)?r:{message:r||"",id:n||""};this.create({id:n,type:"error",description:o,...a})}else if(void 0!==t.success){i=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,a="object"==typeof r&&!w(r)?r:{message:r||"",id:n||""};this.create({id:n,type:"success",description:o,...a})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){i=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,a="object"==typeof r&&!w(r)?r:{message:r||"",id:n||""};this.create({id:n,type:"error",description:o,...a})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>a.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(e,t)=>{const n=t?.id||L++,r=this.toasts.find(e=>e.id===n),o=void 0===t?.dismissible||t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:o,id:n,...t}),{...r,component:e,dismissible:o,id:n,...t}):r):this.addToast({component:e,dismissible:o,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const D=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,B=function(e,t){const n=t?.id||L++;return P.create({message:e,id:n,type:"default",...t}),n},F=Object.assign(B,{success:P.success,info:P.info,warning:P.warning,error:P.error,custom:P.custom,message:P.message,promise:P.promise,dismiss:P.dismiss,loading:P.loading},{getHistory:()=>P.toasts,getToasts:()=>P.getActiveToasts()});function R(e){return void 0!==e.label}const z="24px",$="16px";function G(...e){return e.filter(Boolean).join(" ")}function V(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",i=r?$:z;function a(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?a(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=i:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):a(i)}),n}const U=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],Y=["aria-label","data-disabled"];var W=/* @__PURE__ */e({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const d=e,y=t,b=n(null),w=n(null),I=n(!1),C=n(!1),T=n(!1),M=n(!1),S=n(!1),A=n(0),L=n(0),P=n(d.toast.duration||d.duration||4e3),D=n(null),B=n(null),F=r(()=>0===d.index),z=r(()=>d.index+1<=d.visibleToasts),$=r(()=>d.toast.type),V=r(()=>!1!==d.toast.dismissible),W=r(()=>d.toast.class||""),q=r(()=>d.descriptionClass||""),H=r(()=>{const e=d.toast.position||d.position,t=d.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===d.toast.id);return t>=0?t:0}),J=r(()=>{const e=d.toast.position||d.position;return d.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=H.value?e:e+t.height,0)}),K=r(()=>H.value*d.gap+J.value||0),X=r(()=>d.toast.closeButton??d.closeButton),Z=r(()=>d.toast.duration||d.duration||4e3),Q=n(0),ee=n(0),te=n(null),ne=r(()=>d.position.split("-")),re=r(()=>ne.value[0]),oe=r(()=>ne.value[1]),ie=r(()=>"string"!=typeof d.toast.title),ae=r(()=>"string"!=typeof d.toast.description),{isDocumentHidden:se}=function(){const e=n(!1);return o(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}(),ue=r(()=>$.value&&"loading"===$.value);function ce(){C.value=!0,A.value=K.value,setTimeout(()=>{y("removeToast",d.toast)},200)}function fe(){if(ue.value||!V.value)return{};ce(),d.toast.onDismiss?.(d.toast)}function le(e){2!==e.button&&!ue.value&&V.value&&(D.value=/* @__PURE__ */new Date,A.value=K.value,e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(T.value=!0,te.value={x:e.clientX,y:e.clientY}))}function de(){if(M.value||!V.value)return;te.value=null;const e=Number(B.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),t=Number(B.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),n=/* @__PURE__ */(new Date).getTime()-(D.value?.getTime()||0),r="x"===b.value?e:t,o=Math.abs(r)/n;if(Math.abs(r)>=45||o>.11)return A.value=K.value,d.toast.onDismiss?.(d.toast),"x"===b.value?w.value=e>0?"right":"left":w.value=t>0?"down":"up",ce(),void(M.value=!0);B.value?.style.setProperty("--swipe-amount-x","0px"),B.value?.style.setProperty("--swipe-amount-y","0px"),S.value=!1,T.value=!1,b.value=null}function he(e){if(!te.value||!V.value)return;if(window?.getSelection()?.toString()?.length??!1)return;const t=e.clientY-te.value.y,n=e.clientX-te.value.x,r=d.swipeDirections??function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(d.position);!b.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(b.value=Math.abs(n)>Math.abs(t)?"x":"y");let o={x:0,y:0};const i=e=>1/(1.5+Math.abs(e)/20);if("y"===b.value){if(r.includes("top")||r.includes("bottom"))if(r.includes("top")&&t<0||r.includes("bottom")&&t>0)o.y=t;else{const e=t*i(t);o.y=Math.abs(e)<Math.abs(t)?e:t}}else if("x"===b.value&&(r.includes("left")||r.includes("right")))if(r.includes("left")&&n<0||r.includes("right")&&n>0)o.x=n;else{const e=n*i(n);o.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(o.x)>0||Math.abs(o.y)>0)&&(S.value=!0),B.value?.style.setProperty("--swipe-amount-x",`${o.x}px`),B.value?.style.setProperty("--swipe-amount-y",`${o.y}px`)}function pe(){T.value=!1,b.value=null,te.value=null}return _(()=>{I.value=!0,P.value=Z.value}),o(async()=>{if(!I.value||!B.value)return;await i();const e=B.value,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,L.value=n,y("update:height",{toastId:d.toast.id,height:n,position:d.toast.position||d.position})}),_(()=>{if(I.value=!0,!B.value)return;const e=B.value.getBoundingClientRect().height;L.value=e;const t=[{toastId:d.toast.id,height:e,position:d.toast.position},...d.heights];y("update:heights",t)}),E(()=>{B.value&&y("removeToast",d.toast)}),o(e=>{if(d.toast.promise&&"loading"===$.value||d.toast.duration===1/0||"loading"===d.toast.type)return;let t;d.expanded||d.interacting||se.value?(()=>{if(ee.value<Q.value){const e=/* @__PURE__ */(new Date).getTime()-Q.value;P.value=P.value-e}ee.value=/* @__PURE__ */(new Date).getTime()})():P.value!==1/0&&(Q.value=/* @__PURE__ */(new Date).getTime(),t=setTimeout(()=>{d.toast.onAutoClose?.(d.toast),ce()},P.value)),e(()=>{clearTimeout(t)})}),j(()=>d.toast.delete,e=>{void 0!==e&&e&&(ce(),d.toast.onDismiss?.(d.toast))},{deep:!0}),(e,t)=>(s(),a("li",{tabindex:"0",ref_key:"toastRef",ref:B,class:g(l(G)(d.class,W.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[$.value],e.toast?.classes?.[$.value])),"data-sonner-toast":"","data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!Boolean(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":I.value,"data-promise":Boolean(e.toast.promise),"data-swiped":S.value,"data-removed":C.value,"data-visible":z.value,"data-y-position":re.value,"data-x-position":oe.value,"data-index":e.index,"data-front":F.value,"data-swiping":T.value,"data-dismissible":V.value,"data-type":$.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":M.value,"data-swipe-direction":w.value,"data-expanded":Boolean(e.expanded||e.expandByDefault&&I.value),"data-testid":e.toast.testId,style:v({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${C.value?A.value:K.value}px`,"--initial-height":e.expandByDefault?"auto":`${L.value}px`,...e.style,...d.toast.style}),onDragend:pe,onPointerdown:le,onPointerup:de,onPointermove:he},[X.value&&!e.toast.component&&"loading"!==$.value?(s(),a("button",{key:0,"aria-label":e.closeButtonAriaLabel||"Close toast","data-disabled":ue.value,"data-close-button":"true",class:g(l(G)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:fe},[e.icons?.close?(s(),p(k(e.icons?.close),{key:0})):m(e.$slots,"close-icon",{key:1})],10,Y)):c("v-if",!0),e.toast.component?(s(),p(k(e.toast.component),h({key:1},e.toast.componentProps,{onCloseToast:fe}),null,16)):(s(),a(u,{key:2},["default"!==$.value||e.toast.icon||e.toast.promise?(s(),a("div",{key:0,"data-icon":"",class:g(l(G)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?(s(),p(k(e.toast.icon),{key:0})):(s(),a(u,{key:1},["loading"===$.value?m(e.$slots,"loading-icon",{key:0}):"success"===$.value?m(e.$slots,"success-icon",{key:1}):"error"===$.value?m(e.$slots,"error-icon",{key:2}):"warning"===$.value?m(e.$slots,"warning-icon",{key:3}):"info"===$.value?m(e.$slots,"info-icon",{key:4}):c("v-if",!0)],64))],2)):c("v-if",!0),f("div",{"data-content":"",class:g(l(G)(e.classes?.content,e.toast?.classes?.content))},[f("div",{"data-title":"",class:g(l(G)(e.classes?.title,e.toast.classes?.title))},[ie.value?(s(),p(k(e.toast.title),O(h({key:0},e.toast.componentProps)),null,16)):(s(),a(u,{key:1},[x(N(e.toast.title),1)],64))],2),e.toast.description?(s(),a("div",{key:0,"data-description":"",class:g(l(G)(e.descriptionClass,q.value,e.classes?.description,e.toast.classes?.description))},[ae.value?(s(),p(k(e.toast.description),O(h({key:0},e.toast.componentProps)),null,16)):(s(),a(u,{key:1},[x(N(e.toast.description),1)],64))],2)):c("v-if",!0)],2),e.toast.cancel?(s(),a("button",{key:1,style:v(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:g(l(G)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:t[0]||(t[0]=t=>{l(R)(e.toast.cancel)&&V.value&&(e.toast.cancel.onClick?.(t),ce())})},N(l(R)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):c("v-if",!0),e.toast.action?(s(),a("button",{key:2,style:v(e.toast.actionButtonStyle||e.actionButtonStyle),class:g(l(G)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:t[1]||(t[1]=t=>{l(R)(e.toast.action)&&(e.toast.action.onClick?.(t),t.defaultPrevented||ce())})},N(l(R)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):c("v-if",!0)],64))],46,U))}}),q=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const H={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};var J=/* @__PURE__ */q({},[["render",function(e,t){return s(),a("svg",H,t[0]||(t[0]=[f("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),f("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}]]);const K=["data-visible"],X={class:"sonner-spinner"};var Z=/* @__PURE__ */e({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(e,n)=>(s(),a("div",{class:"sonner-loading-wrapper","data-visible":e.visible},[f("div",X,[(s(!0),a(u,null,d(l(t),e=>(s(),a("div",{key:`spinner-bar-${e}`,class:"sonner-loading-bar"}))),128))])],8,K))}});const Q={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var ee=/* @__PURE__ */q({},[["render",function(e,t){return s(),a("svg",Q,t[0]||(t[0]=[f("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}]]);const te={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var ne=/* @__PURE__ */q({},[["render",function(e,t){return s(),a("svg",te,t[0]||(t[0]=[f("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}]]);const re={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};var oe=/* @__PURE__ */q({},[["render",function(e,t){return s(),a("svg",re,t[0]||(t[0]=[f("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}]]);const ie={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};var ae=/* @__PURE__ */q({},[["render",function(e,t){return s(),a("svg",ie,t[0]||(t[0]=[f("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}]]);const se=["aria-label"],ue=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],ce="undefined"!=typeof window&&"undefined"!=typeof document;function fe(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var le=/* @__PURE__ */e({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:14},visibleToasts:{default:3},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:z},mobileOffset:{default:$},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const w=e,_=t(),E=n([]),j=r(()=>w.id?E.value.filter(e=>e.toasterId===w.id):E.value.filter(e=>!e.toasterId));function k(e,t){return j.value.filter(n=>!n.position&&0===t||n.position===e)}const O=r(()=>{const e=j.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([w.position].concat(e))):[w.position]}),x=r(()=>{const e={};return O.value.forEach(t=>{e[t]=E.value.filter(e=>e.position===t)}),e}),N=n([]),I=n({}),C=n(!1);o(()=>{O.value.forEach(e=>{e in I.value||(I.value[e]=!1)})});const T=n("system"!==w.theme?w.theme:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=n(null),S=n(null),A=n(!1),L=w.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function D(e){E.value.find(t=>t.id===e.id)?.delete||P.dismiss(e.id),E.value=E.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{E.value.find(t=>t.id===e.id)||(N.value=N.value.filter(t=>t.toastId!==e.id))},250)}function B(e){A.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(A.value=!1,S.value&&(S.value.focus({preventScroll:!0}),S.value=null))}function F(e){e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||A.value||(A.value=!0,S.value=e.relatedTarget)}function R(e){if(e.target){if(e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible)return}C.value=!0}function z(e){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");I.value[n]=!0}function $(e){if(!C.value){const t=e.currentTarget,n=t.getAttribute("data-y-position")+"-"+t.getAttribute("data-x-position");I.value[n]=!1}}function G(){Object.keys(I.value).forEach(e=>{I.value[e]=!1})}function U(){C.value=!1}function Y(e){N.value=e}function q(e){const t=N.value.findIndex(t=>t.toastId===e.toastId);if(-1!==t)N.value[t]=e;else{const t=N.value.findIndex(t=>t.position===e.position);-1!==t?N.value.splice(t,0,e):N.value.unshift(e)}}return o(e=>{e(P.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{E.value=E.value.map(t=>t.id===e.id?{...t,delete:!0}:t)}):i(()=>{const t=E.value.findIndex(t=>t.id===e.id);E.value=-1!==t?[...E.value.slice(0,t),{...E.value[t],...e},...E.value.slice(t+1)]:[e,...E.value]})}))}),o(e=>{if("undefined"==typeof window)return;if("system"!==w.theme)return void(T.value=w.theme);const t=window.matchMedia("(prefers-color-scheme: dark)"),n=e=>{T.value=e?"dark":"light"};n(t.matches);const r=e=>{n(e.matches)};try{t.addEventListener("change",r)}catch{t.addListener(r)}e(()=>{try{t.removeEventListener("change",r)}catch{t.removeListener(r)}})}),o(()=>{M.value&&S.value&&(S.value.focus({preventScroll:!0}),S.value=null,A.value=!1)}),o(()=>{E.value.length<=1&&Object.keys(I.value).forEach(e=>{I.value[e]=!1})}),o(e=>{function t(e){const t=w.hotkey.every(t=>e[t]||e.code===t),n=Array.isArray(M.value)?M.value[0]:M.value;t&&(O.value.forEach(e=>{I.value[e]=!0}),n?.focus());const r=document.activeElement===M.value||n?.contains(document.activeElement);"Escape"===e.code&&r&&O.value.forEach(e=>{I.value[e]=!1})}ce&&(document.addEventListener("keydown",t),e(()=>{document.removeEventListener("keydown",t)}))}),(e,t)=>(s(),a(u,null,[c(" Remove item from normal navigation flow, only available via hotkey "),f("section",{"aria-label":`${e.containerAriaLabel} ${l(L)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(s(!0),a(u,null,d(O.value,(t,n)=>(s(),a("ol",h({key:t,ref_for:!0,ref_key:"listRef",ref:M,"data-sonner-toaster":"","data-sonner-theme":T.value,class:w.class,dir:"auto"===e.dir?fe():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":t.split("-")[0],"data-x-position":t.split("-")[1],style:{"--front-toast-height":`${N.value[0]?.height||0}px`,"--width":`${l(356)}px`,"--gap":`${e.gap}px`,...e.style,...l(_).style,...l(V)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:B,onFocus:F,onMouseenter:z,onMousemove:z,onMouseleave:$,onDragend:G,onPointerdown:R,onPointerup:U}),[(s(!0),a(u,null,d(k(t,n),(n,r)=>(s(),p(W,{key:n.id,heights:N.value,icons:e.icons,index:r,toast:n,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:g(e.toastOptions?.class??""),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:C.value,position:t,style:v(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:x.value[t],expandByDefault:e.expand,gap:e.gap,expanded:I.value[t]||!1,swipeDirections:w.swipeDirections,"onUpdate:heights":Y,"onUpdate:height":q,onRemoveToast:D},{"close-icon":y(()=>[m(e.$slots,"close-icon",{},()=>[b(J)])]),"loading-icon":y(()=>[m(e.$slots,"loading-icon",{},()=>[b(Z,{visible:"loading"===n.type},null,8,["visible"])])]),"success-icon":y(()=>[m(e.$slots,"success-icon",{},()=>[b(ee)])]),"error-icon":y(()=>[m(e.$slots,"error-icon",{},()=>[b(ae)])]),"warning-icon":y(()=>[m(e.$slots,"warning-icon",{},()=>[b(oe)])]),"info-icon":y(()=>[m(e.$slots,"info-icon",{},()=>[b(ne)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,ue))),128))],8,se)],2112))}});function de(e,t){if(!e)return"";return function(e,t,n="text"){const r=e.match(/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/);return r?he(r[1].trim(),t):e.replace(/\{\{\s*([\s\S]+?)\s*\}\}/g,(e,r)=>{const o=he(String(r).trim(),t);if("js"===n){if(null==o)return"null";if("string"==typeof o)return JSON.stringify(o);if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return"null"}}if(null==o)return"";if("string"==typeof o)return o;if("number"==typeof o||"boolean"==typeof o)return String(o);try{return JSON.stringify(o)}catch{return String(o)}})}(e,function(e){const t=["__proto__","constructor","prototype"],n=e=>{if(Array.isArray(e))return e.map(n);if(e&&"object"==typeof e){const r={};for(const o in e)!t.includes(o)&&pe(o)&&(r[o]=n(e[o]));return r}return e};return n(e)}(t?.reduce((e,t)=>(e[t.name]=t.value,e),{})??{}))}function he(e,t){if(!e)return"";const n=function(e){const t=e.match(/\b[a-zA-Z_][a-zA-Z0-9_]*\b/g)||[],n=/* @__PURE__ */new Set(["true","false","null","undefined","return","if","else","try","catch","typeof"]);return[...new Set(t.filter(e=>!n.has(e)))]}(e),r={...t};for(const s of n)s in r||(r[s]=void 0);const o=Object.keys(r),i=Object.values(r);try{return new Function(...o,`'use strict'; return (${e})`)(...i)}catch(a){return void console.warn(`Interpolation failed for expression: "${e}"`,a)}}function pe(e){return/^[$A-Z_][0-9A-Z_$]*$/i.test(e)}const ve={"api-request":async(e,{node:t})=>{try{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=de(t.data.url,n),o=de(t.data.method,n).toUpperCase(),i=t.data.body?.map(e=>({key:de(e.key,n),value:de(e.value,n)}))||[],a=t.data.headers?.map(e=>({key:de(e.key,n),value:de(e.value,n)}))||[],s=t.data.cookies?.map(e=>({key:de(e.key,n),value:de(e.value,n)}))||[];const u=(t.data.urlParameters?.map(e=>({key:de(e.key,n),value:de(e.value,n)}))||[]).filter(e=>e.key).map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join("&"),c=u?`${r}?${u}`:r,f={};if(a.forEach(({key:e,value:t})=>{e&&(f[e]=t)}),s.length>0){const e=s.map(({key:e,value:t})=>`${e}=${t}`).join("; ");f.Cookie=e}let l=null;if(["POST","PUT","PATCH"].includes(o)){const e={};i.forEach(({key:t,value:n})=>{t&&(e[t]=n)}),l=JSON.stringify(e),f["Content-Type"]||="application/json"}const d=await fetch(c,{method:o,headers:f,body:l,credentials:"include"});if(d.status>=400)return{result:{success:!1,status:d.status}};let h;const p=d.headers.get("content-type");return h=p?.includes("application/json")?await d.json():await d.text(),{result:{success:!0,data:h,status:d.status}}}catch(n){return{result:{success:!1,status:n.status||500}}}},conditional:async(e,{node:t})=>({conditionMet:!!ge(t.data.condition,e)}),"integration-action":async(e,{node:t})=>{const{$useIntegrationActions:n}=A(),{fireAction:r}=n(t.data.action.integration);return{result:await r(t.data.action,e)}},"show-toast":async(e,{node:t})=>{console.log("Show toast",e,t);let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=de(t.data.title,n),o=de(t.data.message,n);return F(r,{description:o}),{shown:!0}},"finish-flow":async(e,{node:t,onFinish:n})=>{if(t.data.returnData){console.log("Finish flow with data",e,t);let r=ge(t.data.transform,e);console.log("Finish flow return value",r),n(r)}else n();return{finished:!0}},confetti:async(e,{node:t})=>{const{$confetti:n}=A();return n(),{confetti:!0}},confirm:async(e,{node:t})=>{const{$useConfirmation:n}=A(),{confirm:r}=n();if(r){let n=Object.keys(e).map(t=>({name:t,value:e[t]})),o=de(t.data.title,n),i=de(t.data.message,n),a=de(t.data.confirmText,n);return{confirmed:await r(i,o,a)}}return{confirmed:!1}},"set-variable":async(e,{node:t,localVariables:n})=>{console.log("Set variable",e,t,n);let r=Object.keys(e).map(t=>({name:t,value:e[t]})),o={};for(const i of t.data.updateActions??[]){const e=n.value.find(e=>e.id===i.variableId),t=de(i.value,r);console.log("skibi",i.value,r,t),e&&("element"===e.type?(e.value.value=t,o[e.name]={value:t}):(e.value=t,o[e.name]=t)),window.dispatchEvent(new CustomEvent("flow-update-form-variable",{detail:{id:i.variableId,value:t}}))}return{set:!0,...o}},"transform-data":async(e,{node:t})=>({transformed:!0,value:ge(t.data.transform,e)}),"visit-url":async(e,{node:t})=>{let n=Object.keys(e).map(t=>({name:t,value:e[t]})),r=de(t.data.url,n);return t.data.newTab?window.open(r,"_blank"):window.location.href=r,{visited:!0}},"show-dialog":async(e,{node:t,flowBuilderExtensions:n})=>{const{$useCustomDialog:r}=A(),{openCustomDialog:o}=r();let i=Object.keys(e).map(t=>({name:t,value:e[t]}));const a=await o(t.data.layout,i,[],n);return console.log("Dialog result",a),a},"show-module":async(e,{node:t})=>{console.log("Show module",e,t);const{$useModuleOverlay:n}=A(),{openInOverlay:r}=n();let o=Object.keys(e).map(t=>({name:t,value:e[t]}));const i={};return t.data.moduleData?.forEach(e=>{i[de(e.key,o)]=de(e.value,o)}),console.log("mowauka aaa",t.data.moduleData,i),r(t.data.moduleId,i),{shown:!0}}},ge=(e,t={})=>{var n=document.createElement("iframe");document.body.appendChild(n);var r=n.contentWindow.Function;return document.body.removeChild(n),r(...Object.keys(t),"'use strict';"+e)(...Object.values(t))},ye={ERROR:"error",SKIPPED:"skipped",CANCELLED:"cancelled",FINISHED:"finished",RUNNING:"running"};function me({graph:e,cancelOnError:t=!0,nodes:r=[],edges:o=[],variables:i=[],computedVariables:a=[],onFinish:s,flowBuilderExtensions:u=[]}){const{updateNodeData:c,getConnectedEdges:f,findNode:l}=M(),d=/* @__PURE__ */new Map,h=new Map(r.map(e=>[e.id,e])),p=I(()=>C(e)),v=n(!1),g=/* @__PURE__ */new Map,y=/* @__PURE__ */new Set,m=/* @__PURE__ */new Set,b=n(i?JSON.parse(JSON.stringify(i.map(e=>({...e,value:Object.keys(e).includes("defaultValue")?e.defaultValue:e.value??null})))):[]);async function w(e,n=!1){if(n&&"START"!==e||y.has(e))return;m.add(e);const r=f(e).filter(t=>t.target===e);if(await Promise.all(r.map(e=>async function(e){return new Promise(t=>{const n=setInterval(()=>{e()&&(clearInterval(n),t(!0))},100)})}(()=>!e.data?.isAnimating))),m.clear(),v.value){y.add(e),k(e,ye.RUNNING);try{const t=p.value.predecessors(e)||[],n=Object.assign({},...t.map(e=>d.get(e)??{})),r={...Object.fromEntries(b.value.map(e=>[e.name,e.value])),...n},i=h?.size>0?h.get(e):l(e),a=function(e){const t={};return e.forEach(e=>{e.type?.value&&"function"==typeof e.processFunction&&(t[e.type.value]=e.processFunction)}),t}(u);console.log("processFunctions from extensions",a,"from",u);const c={...ve,...a}[i.data.taskType??i.type];console.log("Running task:",i.data.taskType,c,u);const f=c?await c(r,{node:i,graph:p.value,onFinish:s,localVariables:b,flowBuilderExtensions:u}):{};d.set(e,f?JSON.parse(JSON.stringify(f)):{}),k(e,ye.FINISHED);const v=o.filter(t=>t.source===e),g=v.some(e=>e.sourceHandle);for(const e of v){const{source:t,sourceHandle:n}=e,r=h.get(t).type,o="start"===r||"confirm"===r&&"success"===n&&!0===f.confirmed||"confirm"===r&&"error"===n&&!1===f.confirmed||"integration-action"===r&&"success"===n&&!0===f.result?.success||"integration-action"===r&&"error"===n&&!1===f.result?.success||"api-request"===r&&"success"===n&&!0===f.result?.success||"api-request"===r&&"error"===n&&!1===f.result?.success||"conditional"===r&&"success"===n&&!0===f.conditionMet||"conditional"===r&&"error"===n&&!1===f.conditionMet||!["confirm","integration-action","api-request","conditional"].includes(r)&&"success"===n;console.log("should run",o,r,n,f,g),o&&await w(e.target)}}catch(i){console.error(`Error in node ${e}:`,i),k(e,ye.ERROR),C(t)&&await E(e)}}}function _(e){j();for(const t of e)k(t.id,null)}async function E(e){const t=p.value.successors(e)||[];for(const n of t)k(n,ye.SKIPPED),await E(n)}function j(){v.value=!1,y.clear(),g.clear()}function k(e,t){c(e,{status:t})}return{run:async function(e){if(v.value)return;_(e),v.value=!0;const t=e.filter(e=>0===p.value.predecessors(e.id)?.length);await Promise.all(t.map(e=>w(e.id,!0))),j()},stop:async function(){v.value=!1;for(const e of m)clearTimeout(g.get(e)),g.delete(e),k(e,ye.CANCELLED),await E(e);for(const[e,t]of g)clearTimeout(t),g.delete(e),k(e,ye.CANCELLED),await E(e);y.clear(),m.clear()},reset:_,isRunning:v}}var be,we,_e,Ee,je,ke,Oe,xe,Ne,Ie,Ce,Te,Me,Se,Ae,Le,Pe,De,Be,Fe,Re,ze,$e,Ge,Ve,Ue,Ye,We,qe,He,Je,Ke,Xe,Ze,Qe,et,tt,nt,rt,ot,it,at,st,ut,ct,ft,lt,dt,ht,pt,vt,gt,yt,mt,bt,wt,_t,Et,jt,kt,Ot,xt,Nt,It,Ct,Tt,Mt,St,At,Lt,Pt,Dt,Bt,Ft,Rt,zt,$t,Gt,Vt,Ut,Yt,Wt,qt,Ht,Jt,Kt,Xt,Zt,Qt,en,tn,nn,rn,on,an="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function un(){if(we)return be;we=1;var e="\0";function t(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function r(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}return o+""+i+""+(void 0===r?"\0":r)}function o(e,t){return r(e,t.v,t.w,t.name)}return be=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(t){t&&(this._isDirected=!Object.hasOwn(t,"directed")||t.directed,this._isMultigraph=!!Object.hasOwn(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.hasOwn(t,"compound")&&t.compound),this._isCompound&&(this._parent={},this._children={},this._children[e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=e,this._children[t]={},this._children[e][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===n)n=e;else{for(var r=n+="";void 0!==r;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==e)return n}}children(t=e){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===e)return this.nodes();if(this.hasNode(t))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){const r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function o(e){var i=n.parent(e);return void 0===i||t.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,o(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o}),this}setEdge(){var e,n,o,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,n=s.w,o=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(e=s,n=arguments[1],o=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,n=""+n,void 0!==o&&(o=""+o);var u=r(this._isDirected,e,n,o);if(Object.hasOwn(this._edgeLabels,u))return a&&(this._edgeLabels[u]=i),this;if(void 0!==o&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=a?i:this._defaultEdgeLabelFn(e,n,o);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,e,n,o);return e=c.v,n=c.w,Object.freeze(c),this._edgeObjs[u]=c,t(this._preds[n],e),t(this._sucs[e],n),this._in[n][u]=c,this._out[e][u]=c,this._edgeCount++,this}edge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return this._edgeLabels[i]}edgeAsObj(){const e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,n){var i=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,i)}removeEdge(e,t,i){var a=1===arguments.length?o(this._isDirected,arguments[0]):r(this._isDirected,e,t,i),s=this._edgeObjs[a];return s&&(e=s.v,t=s.w,delete this._edgeLabels[a],delete this._edgeObjs[a],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},be}function cn(){if(xe)return Oe;xe=1;var e=un();function t(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return void 0!==n&&(o.value=n),void 0!==r&&(o.parent=r),o})}function n(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return void 0!==t.name&&(r.name=t.name),void 0!==n&&(r.value=n),r})}return Oe={write:function(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:t(e),edges:n(e)};void 0!==e.graph()&&(r.value=structuredClone(e.graph()));return r},read:function(t){var n=new e(t.options).setGraph(t.value);return t.nodes.forEach(function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)}),t.edges.forEach(function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),n}}}function fn(){if(Ie)return Ne;return Ie=1,Ne=function(e){var t,n={},r=[];function o(r){Object.hasOwn(n,r)||(n[r]=!0,t.push(r),e.successors(r).forEach(o),e.predecessors(r).forEach(o))}return e.nodes().forEach(function(e){t=[],o(e),t.length&&r.push(t)}),r}}function ln(){if(Te)return Ce;Te=1;return Ce=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t}_swap(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t}}}function dn(){if(Se)return Me;Se=1;var e=ln();Me=function(n,r,o,i){return function(t,n,r,o){var i,a,s={},u=new e,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};t.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(n,String(r),o||t,i||function(e){return n.outEdges(e)})};var t=()=>1;return Me}function hn(){if(Le)return Ae;Le=1;var e=dn();return Ae=function(t,n,r){return t.nodes().reduce(function(o,i){return o[i]=e(t,i,n,r),o},{})}}function pn(){if(De)return Pe;return De=1,Pe=function(e){var t=0,n=[],r={},o=[];function i(a){var s=r[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(i(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var u,c=[];do{u=n.pop(),r[u].onStack=!1,c.push(u)}while(a!==u);o.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||i(e)}),o}}function vn(){if(Fe)return Be;Fe=1;var e=pn();return Be=function(t){return e(t).filter(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}}function gn(){if(ze)return Re;ze=1,Re=function(t,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(t,n||e,r||function(e){return t.outEdges(e)})};var e=()=>1;return Re}function yn(){if(Ge)return $e;function e(e){var n={},r={},o=[];if(e.sinks().forEach(function i(a){if(Object.hasOwn(r,a))throw new t;Object.hasOwn(n,a)||(r[a]=!0,n[a]=!0,e.predecessors(a).forEach(i),delete r[a],o.push(a))}),Object.keys(n).length!==e.nodeCount())throw new t;return o}Ge=1;class t extends Error{constructor(){super(...arguments)}}return $e=e,e.CycleException=t,$e}function mn(){if(Ue)return Ve;Ue=1;var e=yn();return Ve=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function bn(){if(We)return Ye;function e(e,t,r,o){for(var i=[[e,!1]];i.length>0;){var a=i.pop();a[1]?o.push(a[0]):Object.hasOwn(r,a[0])||(r[a[0]]=!0,i.push([a[0],!0]),n(t(a[0]),e=>i.push([e,!1])))}}function t(e,t,r,o){for(var i=[e];i.length>0;){var a=i.pop();Object.hasOwn(r,a)||(r[a]=!0,o.push(a),n(t(a),e=>i.push(e)))}}function n(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}return We=1,Ye=function(n,r,o){Array.isArray(r)||(r=[r]);var i=n.isDirected()?e=>n.successors(e):e=>n.neighbors(e),a="post"===o?e:t,s=[],u={};return r.forEach(e=>{if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);a(e,i,u,s)}),s}}function wn(){if(He)return qe;He=1;var e=bn();return qe=function(t,n){return e(t,n,"post")}}function _n(){if(Ke)return Je;Ke=1;var e=bn();return Je=function(t,n){return e(t,n,"pre")}}function En(){if(Ze)return Xe;Ze=1;var e=un(),t=ln();return Xe=function(n,r){var o,i=new e,a={},s=new t;function u(e){var t=e.v===o?e.w:e.v,n=s.priority(t);if(void 0!==n){var i=r(e);i<n&&(a[t]=o,s.decrease(t,i))}}if(0===n.nodeCount())return i;n.nodes().forEach(function(e){s.add(e,Number.POSITIVE_INFINITY),i.setNode(e)}),s.decrease(n.nodes()[0],0);var c=!1;for(;s.size()>0;){if(o=s.removeMin(),Object.hasOwn(a,o))i.setEdge(o,a[o]);else{if(c)throw new Error("Input graph is not connected: "+n);c=!0}n.nodeEdges(o).forEach(u)}return i}}function jn(){if(nt)return tt;nt=1;var e=ke?je:(ke=1,je={Graph:un(),version:Ee?_e:(Ee=1,_e="2.2.4")});return tt={Graph:e.Graph,json:cn(),alg:et?Qe:(et=1,Qe={components:fn(),dijkstra:dn(),dijkstraAll:hn(),findCycles:vn(),floydWarshall:gn(),isAcyclic:mn(),postorder:wn(),preorder:_n(),prim:En(),tarjan:pn(),topsort:yn()}),version:e.version}}function kn(){if(at)return it;at=1;let e=jn().Graph,t=function(){if(ot)return rt;function e(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function t(e,t){if("_next"!==e&&"_prev"!==e)return t}return ot=1,rt=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return e(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&e(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let e=[],n=this._sentinel,r=n._prev;for(;r!==n;)e.push(JSON.stringify(r,t)),r=r._prev;return"["+e.join(", ")+"]"}}}();it=function(i,a){if(i.nodeCount()<=1)return[];let s=function(n,r){let i=new e,a=0,s=0;n.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),n.edges().forEach(e=>{let t=i.edge(e.v,e.w)||0,n=r(e),o=t+n;i.setEdge(e.v,e.w,o),s=Math.max(s,i.node(e.v).out+=n),a=Math.max(a,i.node(e.w).in+=n)});let u=function(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}(s+a+3).map(()=>new t),c=a+1;return i.nodes().forEach(e=>{o(u,c,i.node(e))}),{graph:i,buckets:u,zeroIdx:c}}(i,a||n);return function(e,t,n){let o,i=[],a=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;o=s.dequeue();)r(e,t,n,o);for(;o=a.dequeue();)r(e,t,n,o);if(e.nodeCount())for(let a=t.length-2;a>0;--a)if(o=t[a].dequeue(),o){i=i.concat(r(e,t,n,o,!0));break}}return i}(s.graph,s.buckets,s.zeroIdx).flatMap(e=>i.outEdges(e.v,e.w))};let n=()=>1;function r(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let s=e.edge(r),u=e.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=s,o(t,n,u)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,s=e.node(a);s.in-=i,o(t,n,s)}),e.removeNode(r.v),a}function o(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}return it}function On(){if(ut)return st;ut=1;let e=jn().Graph;function t(e,t,n,r){for(var o=r;e.hasNode(o);)o=a(r);return n.dummy=t,e.setNode(o,n),o}st={addBorderNode:function(e,n,r,o){let i={width:0,height:0};arguments.length>=4&&(i.rank=r,i.order=o);return t(e,"border",i,n)},addDummyNode:t,applyWithChunking:r,asNonCompoundGraph:function(t){let n=new e({multigraph:t.isMultigraph()}).setGraph(t.graph());return t.nodes().forEach(e=>{t.children(e).length||n.setNode(e,t.node(e))}),t.edges().forEach(e=>{n.setEdge(e,t.edge(e))}),n},buildLayerMatrix:function(e){let t=s(o(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;void 0!==o&&(t[o][r.order]=n)}),t},intersectRect:function(e,t){let n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a);return{x:o+n,y:i+r}},mapValues:function(e,t){let n=t;"string"==typeof t&&(n=e=>e[t]);return Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MAX_VALUE:n}),n=r(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,"rank")&&(r.rank-=n)})},notime:function(e,t){return t()},partition:function(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n},pick:function(e,t){const n={};for(const r of t)void 0!==e[r]&&(n[r]=e[r]);return n},predecessorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},range:s,removeEmptyRanks:function(e){let t=e.nodes().map(t=>e.node(t).rank),n=r(Math.min,t),o=[];e.nodes().forEach(t=>{let r=e.node(t).rank-n;o[r]||(o[r]=[]),o[r].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(o).forEach((t,n)=>{void 0===t&&n%a!==0?--i:void 0!==t&&i&&t.forEach(t=>e.node(t).rank+=i)})},simplify:function(t){let n=(new e).setGraph(t.graph());return t.nodes().forEach(e=>n.setNode(e,t.node(e))),t.edges().forEach(e=>{let r=n.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),n},successorWeights:function(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return u(e.nodes(),t)},time:function(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}},uniqueId:a,zipObject:u};const n=65535;function r(e,t){if(t.length>n){const r=function(e,t=n){const r=[];for(let n=0;n<e.length;n+=t){const o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}return e.apply(null,t)}function o(e){const t=e.nodes().map(t=>{let n=e.node(t).rank;return void 0===n?Number.MIN_VALUE:n});return r(Math.max,t)}let i=0;function a(e){return e+""+ ++i}function s(e,t,n=1){null==t&&(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);const o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function u(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}return st}function xn(){if(ft)return ct;ft=1;let e=kn(),t=On().uniqueId;return ct={run:function(n){("greedy"===n.graph().acyclicer?e(n,(r=n,e=>r.edge(e).weight)):function(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):o(e.w)}),delete n[i])}return e.nodes().forEach(o),t}(n)).forEach(e=>{let r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,t("rev"))});var r},undo:function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}}function Nn(){if(dt)return lt;dt=1;let e=On();return lt={run:function(t){t.graph().dummyChains=[],t.edges().forEach(n=>function(t,n){let r,o,i,a=n.v,s=t.node(a).rank,u=n.w,c=t.node(u).rank,f=n.name,l=t.edge(n),d=l.labelRank;if(c===s+1)return;for(t.removeEdge(n),i=0,++s;s<c;++i,++s)l.points=[],o={width:0,height:0,edgeLabel:l,edgeObj:n,rank:s},r=e.addDummyNode(t,"edge",o,"_d"),s===d&&(o.width=l.width,o.height=l.height,o.dummy="edge-label",o.labelpos=l.labelpos),t.setEdge(a,r,{weight:l.weight},f),0===i&&t.graph().dummyChains.push(r),a=r;t.setEdge(a,u,{weight:l.weight},f)}(t,n))},undo:function(e){e.graph().dummyChains.forEach(t=>{let n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)})}}}function In(){if(pt)return ht;pt=1;const{applyWithChunking:e}=On();return ht={longestPath:function(t){var n={};t.sources().forEach(function r(o){var i=t.node(o);if(Object.hasOwn(n,o))return i.rank;n[o]=!0;let a=t.outEdges(o).map(e=>null==e?Number.POSITIVE_INFINITY:r(e.w)-t.edge(e).minlen);var s=e(Math.min,a);return s===Number.POSITIVE_INFINITY&&(s=0),i.rank=s})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}function Cn(){if(gt)return vt;gt=1;var e=jn().Graph,t=In().slack;function n(e,n){return e.nodes().forEach(function r(o){n.nodeEdges(o).forEach(i=>{var a=i.v,s=o===a?i.w:a;e.hasNode(s)||t(n,i)||(e.setNode(s,{}),e.setEdge(o,s,{}),r(s))})}),e.nodeCount()}function r(e,n){return n.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=t(n,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function o(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}return vt=function(i){var a,s,u=new e({directed:!1}),c=i.nodes()[0],f=i.nodeCount();u.setNode(c,{});for(;n(u,i)<f;)a=r(u,i),s=u.hasNode(a.v)?t(i,a):-t(i,a),o(u,i,s);return u}}function Tn(){if(mt)return yt;mt=1;var e=Cn(),t=In().slack,n=In().longestPath,r=jn().alg.preorder,o=jn().alg.postorder,i=On().simplify;function a(t){t=i(t),n(t);var r,o=e(t);for(c(o),s(o,t);r=l(o);)h(o,t,r,d(o,t,r))}function s(e,t){var n=o(e,e.nodes());(n=n.slice(0,n.length-1)).forEach(n=>function(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=u(e,t,n)}(e,t,n))}function u(e,t,n){var r=e.node(n).parent,o=!0,i=t.edge(n,r),a=0;return i||(o=!1,i=t.edge(r,n)),a=i.weight,t.nodeEdges(n).forEach(i=>{var s,u,c=i.v===n,f=c?i.w:i.v;if(f!==r){var l=c===o,d=t.edge(i).weight;if(a+=l?d:-d,s=n,u=f,e.hasEdge(s,u)){var h=e.edge(n,f).cutvalue;a+=l?-h:h}}}),a}function c(e,t){arguments.length<2&&(t=e.nodes()[0]),f(e,{},1,t)}function f(e,t,n,r,o){var i=n,a=e.node(r);return t[r]=!0,e.neighbors(r).forEach(o=>{Object.hasOwn(t,o)||(n=f(e,t,n,o,r))}),a.low=i,a.lim=n++,o?a.parent=o:delete a.parent,n}function l(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function d(e,n,r){var o=r.v,i=r.w;n.hasEdge(o,i)||(o=r.w,i=r.v);var a=e.node(o),s=e.node(i),u=a,c=!1;return a.lim>s.lim&&(u=s,c=!0),n.edges().filter(t=>c===p(e,e.node(t.v),u)&&c!==p(e,e.node(t.w),u)).reduce((e,r)=>t(n,r)<t(n,e)?r:e)}function h(e,t,n,o){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),c(e),s(e,t),function(e,t){var n=e.nodes().find(e=>!t.node(e).parent),o=r(e,n);(o=o.slice(1)).forEach(n=>{var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)})}(e,t)}function p(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}return yt=a,a.initLowLimValues=c,a.initCutValues=s,a.calcCutValue=u,a.leaveEdge=l,a.enterEdge=d,a.exchangeEdges=h,yt}function Mn(){if(wt)return bt;wt=1;var e=In().longestPath,t=Cn(),n=Tn();bt=function(n){var i=n.graph().ranker;if(i instanceof Function)return i(n);switch(n.graph().ranker){case"network-simplex":default:o(n);break;case"tight-tree":!function(n){e(n),t(n)}(n);break;case"longest-path":r(n);case"none":}};var r=e;function o(e){n(e)}return bt}function Sn(){if(Et)return _t;return Et=1,_t=function(e){let t=function(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){let o,i,a=[],s=[],u=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),a.push(o)}while(o&&(t[o].low>u||c>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}(e,t,o.v,o.w),a=i.path,s=i.lca,u=0,c=a[u],f=!0;for(;n!==o.w;){if(r=e.node(n),f){for(;(c=a[u])!==s&&e.node(c).maxRank<r.rank;)u++;c===s&&(f=!1)}if(!f){for(;u<a.length-1&&e.node(c=a[u+1]).minRank<=r.rank;)u++;c=a[u]}e.setParent(n,c),n=e.successors(n)[0]}})}}function An(){if(kt)return jt;kt=1;let e=On();function t(n,r,o,i,a,s,u){let c=n.children(u);if(!c.length)return void(u!==r&&n.setEdge(r,u,{weight:0,minlen:o}));let f=e.addBorderNode(n,"_bt"),l=e.addBorderNode(n,"_bb"),d=n.node(u);n.setParent(f,u),d.borderTop=f,n.setParent(l,u),d.borderBottom=l,c.forEach(e=>{t(n,r,o,i,a,s,e);let c=n.node(e),d=c.borderTop?c.borderTop:e,h=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,v=d!==h?1:a-s[u]+1;n.setEdge(f,d,{weight:p,minlen:v,nestingEdge:!0}),n.setEdge(h,l,{weight:p,minlen:v,nestingEdge:!0})}),n.parent(u)||n.setEdge(r,f,{weight:0,minlen:a+s[u]})}return jt={run:function(n){let r=e.addDummyNode(n,"root",{},"_root"),o=function(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(e=>n(e,o+1)),t[r]=o}return e.children().forEach(e=>n(e,1)),t}(n),i=Object.values(o),a=e.applyWithChunking(Math.max,i)-1,s=2*a+1;n.graph().nestingRoot=r,n.edges().forEach(e=>n.edge(e).minlen*=s);let u=function(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}(n)+1;n.children().forEach(e=>t(n,r,s,u,a,o,e)),n.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}function Ln(){if(It)return Nt;function e(e){e.nodes().forEach(n=>t(e.node(n))),e.edges().forEach(n=>t(e.edge(n)))}function t(e){let t=e.width;e.width=e.height,e.height=t}function n(e){e.y=-e.y}function r(e){let t=e.x;e.x=e.y,e.y=t}return It=1,Nt={adjust:function(t){let n=t.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||e(t)},undo:function(t){let o=t.graph().rankdir.toLowerCase();"bt"!==o&&"rl"!==o||function(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(n),Object.hasOwn(r,"y")&&n(r)})}(t);"lr"!==o&&"rl"!==o||(!function(e){e.nodes().forEach(t=>r(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(r),Object.hasOwn(n,"x")&&r(n)})}(t),e(t))}}}function Pn(){if(Dt)return Pt;Dt=1;let e=On();return Pt=function(t,n){let r={};return t.forEach((e,t)=>{let n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),n.edges().forEach(e=>{let t=r[e.v],n=r[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(r[e.w]))}),function(t){let n=[];function r(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(e){return n=>{n.in.push(e),0===--n.indegree&&t.push(n)}}for(;t.length;){let e=t.pop();n.push(e),e.in.reverse().forEach(r(e)),e.out.forEach(o(e))}return n.filter(e=>!e.merged).map(t=>e.pick(t,["vs","i","barycenter","weight"]))}(Object.values(r).filter(e=>!e.indegree))}}function Dn(){if(zt)return Rt;zt=1;let e=Lt?At:(Lt=1,At=function(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}),t=Pn(),n=function(){if(Ft)return Bt;Ft=1;let e=On();function t(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}return Bt=function(n,r){let o=e.partition(n,e=>Object.hasOwn(e,"barycenter")),i=o.lhs,a=o.rhs.sort((e,t)=>t.i-e.i),s=[],u=0,c=0,f=0;var l;i.sort((l=!!r,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:l?t.i-e.i:e.i-t.i)),f=t(s,a,f),i.forEach(e=>{f+=e.vs.length,s.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,f=t(s,a,f)});let d={vs:s.flat(!0)};return c&&(d.barycenter=u/c,d.weight=c),d}}();return Rt=function r(o,i,a,s){let u=o.children(i),c=o.node(i),f=c?c.borderLeft:void 0,l=c?c.borderRight:void 0,d={};f&&(u=u.filter(e=>e!==f&&e!==l));let h=e(o,u);h.forEach(e=>{if(o.children(e.v).length){let i=r(o,e.v,a,s);d[e.v]=i,Object.hasOwn(i,"barycenter")&&(n=i,void 0!==(t=e).barycenter?(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight):(t.barycenter=n.barycenter,t.weight=n.weight))}var t,n});let p=t(h,a);!function(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}(p,d);let v=n(p,s);if(f&&(v.vs=[f,v.vs,l].flat(!0),o.predecessors(f).length)){let e=o.node(o.predecessors(f)[0]),t=o.node(o.predecessors(l)[0]);Object.hasOwn(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.order+t.order)/(v.weight+2),v.weight+=2}return v},Rt}function Bn(){if(Gt)return $t;Gt=1;let e=jn().Graph,t=On();return $t=function(n,r,o,i){i||(i=n.nodes());let a=function(e){var n;for(;e.hasNode(n=t.uniqueId("_root")););return n}(n),s=new e({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(e=>n.node(e));return i.forEach(e=>{let t=n.node(e),i=n.parent(e);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(s.setNode(e),s.setParent(e,i||a),n[o](e).forEach(t=>{let r=t.v===e?t.w:t.v,o=s.edge(r,e),i=void 0!==o?o.weight:0;s.setEdge(r,e,{weight:n.edge(t).weight+i})}),Object.hasOwn(t,"minRank")&&s.setNode(e,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]}))}),s}}function Fn(){if(Wt)return Yt;Wt=1;let e=function(){if(Tt)return Ct;Tt=1;let e=On();return Ct=function(t){let n={},r=t.nodes().filter(e=>!t.children(e).length),o=r.map(e=>t.node(e).rank),i=e.applyWithChunking(Math.max,o),a=e.range(i+1).map(()=>[]);return r.sort((e,n)=>t.node(e).rank-t.node(n).rank).forEach(function e(r){if(n[r])return;n[r]=!0;let o=t.node(r);a[o.rank].push(r),t.successors(r).forEach(e)}),a}}(),t=function(){if(St)return Mt;St=1;let e=On().zipObject;function t(t,n,r){let o=e(r,r.map((e,t)=>t)),i=n.flatMap(e=>t.outEdges(e).map(e=>({pos:o[e.w],weight:t.edge(e).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<r.length;)a<<=1;let s=2*a-1;a-=1;let u=new Array(s).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;u[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=u[t+1]),t=t-1>>1,u[t]+=e.weight;c+=e.weight*n}),c}return Mt=function(e,n){let r=0;for(let o=1;o<n.length;++o)r+=t(e,n[o-1],n[o]);return r}}(),n=Dn(),r=Bn(),o=Ut?Vt:(Ut=1,Vt=function(e,t,n){let r,o={};n.forEach(n=>{let i,a,s=e.parent(n);for(;s;){if(i=e.parent(s),i?(a=o[i],o[i]=s):(a=r,r=s),a&&a!==s)return void t.setEdge(a,s);s=i}})}),i=jn().Graph,a=On();function s(e,t,n){const o=/* @__PURE__ */new Map,i=(e,t)=>{o.has(e)||o.set(e,[]),o.get(e).push(t)};for(const r of e.nodes()){const t=e.node(r);if("number"==typeof t.rank&&i(t.rank,r),"number"==typeof t.minRank&&"number"==typeof t.maxRank)for(let e=t.minRank;e<=t.maxRank;e++)e!==t.rank&&i(e,r)}return t.map(function(t){return r(e,t,n,o.get(t)||[])})}function u(e,t){let r=new i;e.forEach(function(e){let i=e.graph().root,a=n(e,i,r,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,r,a.vs)})}function c(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}return Yt=function n(r,o){if(o&&"function"==typeof o.customOrder)return void o.customOrder(r,n);let i=a.maxRank(r),f=s(r,a.range(1,i+1),"inEdges"),l=s(r,a.range(i-1,-1,-1),"outEdges"),d=e(r);if(c(r,d),o&&o.disableOptimalOrderHeuristic)return;let h,p=Number.POSITIVE_INFINITY;for(let e=0,s=0;s<4;++e,++s){u(e%2?f:l,e%4>=2),d=a.buildLayerMatrix(r);let n=t(r,d);n<p&&(s=0,h=Object.assign({},d),p=n)}c(r,h)},Yt}function Rn(){if(Ht)return qt;Ht=1;let e=jn().Graph,t=On();function n(e,t){let n={};return t.length&&t.reduce(function(t,r){let i=0,a=0,s=t.length,u=r[r.length-1];return r.forEach((t,c)=>{let f=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),l=f?e.node(f).order:s;(f||t===u)&&(r.slice(a,c+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),s=a.order;!(s<i||l<s)||a.dummy&&e.node(t).dummy||o(n,r,t)})}),a=c+1,i=l)}),r}),n}function r(e,n){let r={};function i(n,i,a,s,u){let c;t.range(i,a).forEach(t=>{c=n[t],e.node(c).dummy&&e.predecessors(c).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<s||n.order>u)&&o(r,t,c)})})}return n.length&&n.reduce(function(t,n){let r,o=-1,a=0;return n.forEach((s,u)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(r=e.node(t[0]).order,i(n,a,u,o,r),a=u,o=r)}i(n,a,n.length,r,t.length)}),n}),r}function o(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function i(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function a(e,t,n,r){let o={},a={},s={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,a[e]=e,s[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let u=r(e);if(u.length){u=u.sort((e,t)=>s[e]-s[t]);let r=(u.length-1)/2;for(let c=Math.floor(r),f=Math.ceil(r);c<=f;++c){let r=u[c];a[e]===e&&t<s[r]&&!i(n,e,r)&&(a[r]=e,a[e]=o[e]=o[r],t=s[r])}}})}),{root:o,align:a}}function s(t,n,r,o,i){let a={},s=function(t,n,r,o){let i=new e,a=t.graph(),s=function(e,t,n){return(r,o,i)=>{let a,s=r.node(o),u=r.node(i),c=0;if(c+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2}if(a&&(c+=n?a:-a),a=0,c+=(s.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,Object.hasOwn(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=u.width/2;break;case"r":a=-u.width/2}return a&&(c+=n?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return n.forEach(e=>{let n;e.forEach(e=>{let o=r[e];if(i.setNode(o),n){var a=r[n],u=i.edge(a,o);i.setEdge(a,o,Math.max(s(t,e,n),u||0))}n=e})}),i}(t,n,r,i),u=i?"borderLeft":"borderRight";function c(e,t){let n=s.nodes(),r=n.pop(),o={};for(;r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c(function(e){a[e]=s.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+s.edge(t)),0)},s.predecessors.bind(s)),c(function(e){let n=s.outEdges(e).reduce((e,t)=>Math.min(e,a[t.w]-s.edge(t)),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(a[e]=Math.max(a[e],n))},s.successors.bind(s)),Object.keys(o).forEach(e=>a[e]=a[r[e]]),a}function u(e,t){return Object.values(t).reduce((t,n)=>{let r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([t,n])=>{let i=function(e,t){return e.node(t).width}(e,t)/2;r=Math.max(n+i,r),o=Math.min(n-i,o)});const i=r-o;return i<t[0]&&(t=[i,n]),t},[Number.POSITIVE_INFINITY,null])[1]}function c(e,n){let r=Object.values(n),o=t.applyWithChunking(Math.min,r),i=t.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(a=>{let s=r+a,u=e[s];if(u===n)return;let c=Object.values(u),f=o-t.applyWithChunking(Math.min,c);"l"!==a&&(f=i-t.applyWithChunking(Math.max,c)),f&&(e[s]=t.mapValues(u,e=>e+f))})})}function f(e,n){return t.mapValues(e.ul,(t,r)=>{if(n)return e[n.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}return qt={positionX:function(e){let o,i=t.buildLayerMatrix(e),l=Object.assign(n(e,i),r(e,i)),d={};["u","d"].forEach(n=>{o="u"===n?i:Object.values(i).reverse(),["l","r"].forEach(r=>{"r"===r&&(o=o.map(e=>Object.values(e).reverse()));let i=("u"===n?e.predecessors:e.successors).bind(e),u=a(e,o,l,i),c=s(e,o,u.root,u.align,"r"===r);"r"===r&&(c=t.mapValues(c,e=>-e)),d[n+r]=c})});let h=u(e,d);return c(d,h),f(d,e.graph().align)},findType1Conflicts:n,findType2Conflicts:r,addConflict:o,hasConflict:i,verticalAlignment:a,horizontalCompaction:s,alignCoordinates:c,findSmallestWidthAlignment:u,balance:f}}function zn(){if(Kt)return Jt;Kt=1;let e=On(),t=Rn().positionX;return Jt=function(n){(function(t){let n=e.buildLayerMatrix(t),r=t.graph().ranksep,o=0;n.forEach(e=>{const n=e.reduce((e,n)=>{const r=t.node(n).height;return e>r?e:r},0);e.forEach(e=>t.node(e).y=o+n/2),o+=n+r})})(n=e.asNonCompoundGraph(n)),Object.entries(t(n)).forEach(([e,t])=>n.node(e).x=t)}}function $n(){if(Zt)return Xt;Zt=1;let e=xn(),t=Nn(),n=Mn(),r=On().normalizeRanks,o=Sn(),i=On().removeEmptyRanks,a=An(),s=function(){if(xt)return Ot;xt=1;let e=On();function t(t,n,r,o,i,a){let s={width:0,height:0,rank:a,borderType:n},u=i[n][a-1],c=e.addDummyNode(t,"border",s,r);i[n][a]=c,t.setParent(c,o),u&&t.setEdge(u,c,{weight:1})}return Ot=function(e){e.children().forEach(function n(r){let o=e.children(r),i=e.node(r);if(o.length&&o.forEach(n),Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let n=i.minRank,o=i.maxRank+1;n<o;++n)t(e,"borderLeft","_bl",r,i,n),t(e,"borderRight","_br",r,i,n)}})}}(),u=Ln(),c=Fn(),f=zn(),l=On(),d=jn().Graph;Xt=function(j,k){let O=k&&k.debugTiming?l.time:l.notime;O("layout",()=>{let x=O(" buildLayoutGraph",()=>function(e){let t=new d({multigraph:!0,compound:!0}),n=E(e.graph());return t.setGraph(Object.assign({},p,_(n,h),l.pick(n,v))),e.nodes().forEach(n=>{const r=_(E(e.node(n)),g);Object.keys(y).forEach(e=>{void 0===r[e]&&(r[e]=y[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=E(e.edge(n));t.setEdge(n,Object.assign({},b,_(r,m),l.pick(r,w)))}),t}(j));O(" runLayout",()=>function(d,h,p){h(" makeSpaceForEdgeLabels",()=>function(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(d)),h(" removeSelfEdges",()=>function(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(d)),h(" acyclic",()=>e.run(d)),h(" nestingGraph.run",()=>a.run(d)),h(" rank",()=>n(l.asNonCompoundGraph(d))),h(" injectEdgeLabelProxies",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};l.addDummyNode(e,"edge-proxy",r,"_ep")}})}(d)),h(" removeEmptyRanks",()=>i(d)),h(" nestingGraph.cleanup",()=>a.cleanup(d)),h(" normalizeRanks",()=>r(d)),h(" assignRankMinMax",()=>function(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}(d)),h(" removeEdgeLabelProxies",()=>function(e){e.nodes().forEach(t=>{let n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(d)),h(" normalize.run",()=>t.run(d)),h(" parentDummyChains",()=>o(d)),h(" addBorderSegments",()=>s(d)),h(" order",()=>c(d,p)),h(" insertSelfEdges",()=>function(e){var t=l.buildLayerMatrix(e);t.forEach(t=>{var n=0;t.forEach((t,r)=>{var o=e.node(t);o.order=r+n,(o.selfEdges||[]).forEach(t=>{l.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:r+ ++n,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}(d)),h(" adjustCoordinateSystem",()=>u.adjust(d)),h(" position",()=>f(d)),h(" positionSelfEdges",()=>function(e){e.nodes().forEach(t=>{var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}})}(d)),h(" removeBorderNodes",()=>function(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{"border"===e.node(t).dummy&&e.removeNode(t)})}(d)),h(" normalize.undo",()=>t.undo(d)),h(" fixupEdgeLabelCoords",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(d)),h(" undoCoordinateSystem",()=>u.undo(d)),h(" translateGraph",()=>function(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function u(e){let i=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,i-s/2),n=Math.max(n,i+s/2),r=Math.min(r,a-u/2),o=Math.max(o,a+u/2)}e.nodes().forEach(t=>u(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,"x")&&u(n)}),t-=a,r-=s,e.nodes().forEach(n=>{let o=e.node(n);o.x-=t,o.y-=r}),e.edges().forEach(n=>{let o=e.edge(n);o.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=r)}),i.width=n-t+a,i.height=o-r+s}(d)),h(" assignNodeIntersects",()=>function(e){e.edges().forEach(t=>{let n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(l.intersectRect(i,n)),o.points.push(l.intersectRect(a,r))})}(d)),h(" reversePoints",()=>function(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}(d)),h(" acyclic.undo",()=>e.undo(d))}(x,O,k)),O(" updateInputGraph",()=>function(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(j,x))})};let h=["nodesep","edgesep","ranksep","marginx","marginy"],p={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},v=["acyclicer","ranker","rankdir","align"],g=["width","height","rank"],y={width:0,height:0},m=["minlen","weight","width","height","labeloffset"],b={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},w=["labelpos"];function _(e,t){return l.mapValues(l.pick(e,t),Number)}function E(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=n}),t}return Xt}function Gn(){if(en)return Qt;en=1;let e=On(),t=jn().Graph;return Qt={debugOrdering:function(n){let r=e.buildLayerMatrix(n),o=new t({compound:!0,multigraph:!0}).setGraph({});return n.nodes().forEach(e=>{o.setNode(e,{label:e}),o.setParent(e,"layer"+n.node(e).rank)}),n.edges().forEach(e=>o.setEdge(e.v,e.w,{},e.name)),r.forEach((e,t)=>{let n="layer"+t;o.setNode(n,{rank:"same"}),e.reduce((e,t)=>(o.setEdge(e,t,{style:"invis"}),t))}),o}}}const Vn=/* @__PURE__ */sn(on?rn:(on=1,rn={graphlib:jn(),layout:$n(),debug:Gn(),util:{time:On().time,notime:On().notime},version:nn?tn:(nn=1,tn="1.1.8")}));var Un,Yn,Wn,qn,Hn,Jn,Kn,Xn,Zn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,cr,fr,lr,dr,hr,pr,vr,gr,yr,mr,br,wr,_r,Er,jr,kr,Or,xr,Nr,Ir,Cr,Tr,Mr,Sr,Ar,Lr,Pr,Dr,Br,Fr,Rr,zr,$r,Gr,Vr,Ur,Yr,Wr,qr,Hr,Jr,Kr,Xr,Zr,Qr,eo,to,no,ro,oo,io,ao,so,uo,co,fo,lo,ho,po,vo,go,yo,mo,bo,wo,_o,Eo,jo,ko,Oo,xo,No,Io,Co,To,Mo,So,Ao,Lo,Po,Do,Bo,Fo,Ro,zo,$o,Go,Vo,Uo;function Yo(){if(qn)return Wn;return qn=1,Wn=function(e,t){return e===t||e!=e&&t!=t}}function Wo(){if(Jn)return Hn;Jn=1;var e=Yo();return Hn=function(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}}function qo(){if(ir)return or;ir=1;var e=Yn?Un:(Yn=1,Un=function(){this.__data__=[],this.size=0}),t=function(){if(Xn)return Kn;Xn=1;var e=Wo(),t=Array.prototype.splice;return Kn=function(n){var r=this.__data__,o=e(r,n);return!(o<0||(o==r.length-1?r.pop():t.call(r,o,1),--this.size,0))}}(),n=function(){if(Qn)return Zn;Qn=1;var e=Wo();return Zn=function(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]}}(),r=function(){if(tr)return er;tr=1;var e=Wo();return er=function(t){return e(this.__data__,t)>-1}}(),o=function(){if(rr)return nr;rr=1;var e=Wo();return nr=function(t,n){var r=this.__data__,o=e(r,t);return o<0?(++this.size,r.push([t,n])):r[o][1]=n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,or=i}function Ho(){if(vr)return pr;vr=1;var e="object"==typeof an&&an&&an.Object===Object&&an;return pr=e}function Jo(){if(yr)return gr;yr=1;var e=Ho(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return gr=n}function Ko(){if(br)return mr;br=1;var e=Jo().Symbol;return mr=e}function Xo(){if(Or)return kr;Or=1;var e=Ko(),t=function(){if(_r)return wr;_r=1;var e=Ko(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return wr=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(u){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(jr)return Er;jr=1;var e=Object.prototype.toString;return Er=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return kr=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function Zo(){if(Nr)return xr;return Nr=1,xr=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function Qo(){if(Cr)return Ir;Cr=1;var e=Xo(),t=Zo();return Ir=function(n){if(!t(n))return!1;var r=e(n);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function ei(){if(Ar)return Sr;Ar=1;var e,t=function(){if(Mr)return Tr;Mr=1;var e=Jo()["__core-js_shared__"];return Tr=e}(),n=(e=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"";return Sr=function(e){return!!n&&n in e}}function ti(){if(Pr)return Lr;Pr=1;var e=Function.prototype.toString;return Lr=function(t){if(null!=t){try{return e.call(t)}catch(n){}try{return t+""}catch(n){}}return""}}function ni(){if($r)return zr;$r=1;var e=function(){if(Br)return Dr;Br=1;var e=Qo(),t=ei(),n=Zo(),r=ti(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=RegExp("^"+s.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Dr=function(i){return!(!n(i)||t(i))&&(e(i)?c:o).test(r(i))}}(),t=Rr?Fr:(Rr=1,Fr=function(e,t){return null==e?void 0:e[t]});return zr=function(n,r){var o=t(n,r);return e(o)?o:void 0}}function ri(){if(Vr)return Gr;Vr=1;var e=ni()(Jo(),"Map");return Gr=e}function oi(){if(Yr)return Ur;Yr=1;var e=ni()(Object,"create");return Ur=e}function ii(){if(ro)return no;ro=1;var e=function(){if(qr)return Wr;qr=1;var e=oi();return Wr=function(){this.__data__=e?e(null):{},this.size=0}}(),t=Jr?Hr:(Jr=1,Hr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}),n=function(){if(Xr)return Kr;Xr=1;var e=oi(),t=Object.prototype.hasOwnProperty;return Kr=function(n){var r=this.__data__;if(e){var o=r[n];return"__lodash_hash_undefined__"===o?void 0:o}return t.call(r,n)?r[n]:void 0}}(),r=function(){if(Qr)return Zr;Qr=1;var e=oi(),t=Object.prototype.hasOwnProperty;return Zr=function(n){var r=this.__data__;return e?void 0!==r[n]:t.call(r,n)}}(),o=function(){if(to)return eo;to=1;var e=oi();return eo=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=e&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,no=i}function ai(){if(co)return uo;co=1;var e=so?ao:(so=1,ao=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e});return uo=function(t,n){var r=t.__data__;return e(n)?r["string"==typeof n?"string":"hash"]:r.map}}function si(){if(wo)return bo;wo=1;var e=function(){if(io)return oo;io=1;var e=ii(),t=qo(),n=ri();return oo=function(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}}(),t=function(){if(lo)return fo;lo=1;var e=ai();return fo=function(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}}(),n=function(){if(po)return ho;po=1;var e=ai();return ho=function(t){return e(this,t).get(t)}}(),r=function(){if(go)return vo;go=1;var e=ai();return vo=function(t){return e(this,t).has(t)}}(),o=function(){if(mo)return yo;mo=1;var e=ai();return yo=function(t,n){var r=e(this,t),o=r.size;return r.set(t,n),this.size+=r.size==o?0:1,this}}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,bo=i}function ui(){if(ko)return jo;ko=1;var e=qo(),t=function(){if(sr)return ar;sr=1;var e=qo();return ar=function(){this.__data__=new e,this.size=0}}(),n=cr?ur:(cr=1,ur=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}),r=lr?fr:(lr=1,fr=function(e){return this.__data__.get(e)}),o=hr?dr:(hr=1,dr=function(e){return this.__data__.has(e)}),i=function(){if(Eo)return _o;Eo=1;var e=qo(),t=ri(),n=si();return _o=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,jo=a}function ci(){if(xo)return Oo;return xo=1,Oo=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function fi(){if(Io)return No;Io=1;var e=ni(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(n){}}();return No=t}function li(){if(To)return Co;To=1;var e=fi();return Co=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function di(){if(So)return Mo;So=1;var e=li(),t=Yo(),n=Object.prototype.hasOwnProperty;return Mo=function(r,o,i){var a=r[o];n.call(r,o)&&t(a,i)&&(void 0!==i||o in r)||e(r,o,i)}}function hi(){if(Lo)return Ao;Lo=1;var e=di(),t=li();return Ao=function(n,r,o,i){var a=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var c=r[s],f=i?i(o[c],n[c],c,o,n):void 0;void 0===f&&(f=n[c]),a?t(o,c,f):e(o,c,f)}return o}}function pi(){if(Fo)return Bo;return Fo=1,Bo=function(e){return null!=e&&"object"==typeof e}}function vi(){if(Go)return $o;Go=1;var e=function(){if(zo)return Ro;zo=1;var e=Xo(),t=pi();return Ro=function(n){return t(n)&&"[object Arguments]"==e(n)}}(),t=pi(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(/* @__PURE__ */function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return $o=i}function gi(){if(Uo)return Vo;Uo=1;var e=Array.isArray;return Vo=e}var yi,mi,bi,wi,_i,Ei,ji,ki,Oi,xi,Ni,Ii={exports:{}};function Ci(){return bi||(bi=1,e=Ii,t=Ii.exports,n=Jo(),r=mi?yi:(mi=1,yi=function(){return!1}),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r,e.exports=s),Ii.exports;var e,t,n,r,o,i,a,s}function Ti(){if(_i)return wi;_i=1;var e=/^(?:0|[1-9]\d*)$/;return wi=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function Mi(){if(ji)return Ei;ji=1;return Ei=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function Si(){if(Ni)return xi;return Ni=1,xi=function(e){return function(t){return e(t)}}}var Ai,Li,Pi,Di,Bi,Fi,Ri,zi,$i,Gi,Vi,Ui,Yi,Wi,qi,Hi,Ji,Ki,Xi,Zi,Qi,ea,ta,na,ra,oa,ia,aa={exports:{}};function sa(){return Ai||(Ai=1,e=aa,t=aa.exports,n=Ho(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}(),e.exports=a),aa.exports;var e,t,n,r,o,i,a}function ua(){if(Pi)return Li;Pi=1;var e=function(){if(Oi)return ki;Oi=1;var e=Xo(),t=Mi(),n=pi(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,ki=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}(),t=Si(),n=sa(),r=n&&n.isTypedArray,o=r?t(r):e;return Li=o}function ca(){if(Bi)return Di;Bi=1;var e=Do?Po:(Do=1,Po=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}),t=vi(),n=gi(),r=Ci(),o=Ti(),i=ua(),a=Object.prototype.hasOwnProperty;return Di=function(s,u){var c=n(s),f=!c&&t(s),l=!c&&!f&&r(s),d=!c&&!f&&!l&&i(s),h=c||f||l||d,p=h?e(s.length,String):[],v=p.length;for(var g in s)!u&&!a.call(s,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,v))||p.push(g);return p}}function fa(){if(Ri)return Fi;Ri=1;var e=Object.prototype;return Fi=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function la(){if($i)return zi;return $i=1,zi=function(e,t){return function(n){return e(t(n))}}}function da(){if(Yi)return Ui;Yi=1;var e=fa(),t=function(){if(Vi)return Gi;Vi=1;var e=la()(Object.keys,Object);return Gi=e}(),n=Object.prototype.hasOwnProperty;return Ui=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function ha(){if(qi)return Wi;qi=1;var e=Qo(),t=Mi();return Wi=function(n){return null!=n&&t(n.length)&&!e(n)}}function pa(){if(Ji)return Hi;Ji=1;var e=ca(),t=da(),n=ha();return Hi=function(r){return n(r)?e(r):t(r)}}function va(){if(ta)return ea;ta=1;var e=Zo(),t=fa(),n=Qi?Zi:(Qi=1,Zi=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}),r=Object.prototype.hasOwnProperty;return ea=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var s in o)("constructor"!=s||!i&&r.call(o,s))&&a.push(s);return a}}function ga(){if(ra)return na;ra=1;var e=ca(),t=va(),n=ha();return na=function(r){return n(r)?e(r,!0):t(r)}}var ya,ma,ba,wa,_a,Ea,ja,ka,Oa,xa,Na,Ia,Ca,Ta,Ma,Sa,Aa,La,Pa,Da,Ba,Fa,Ra,za,$a,Ga,Va,Ua,Ya,Wa,qa,Ha,Ja,Ka,Xa,Za,Qa,es,ts,ns,rs,os,is,as,ss,us,cs,fs,ls,ds,hs,ps,vs,gs,ys,ms,bs,ws,_s,Es,js,ks,Os,xs,Ns,Is,Cs,Ts,Ms,Ss,As,Ls,Ps,Ds,Bs,Fs,Rs,zs,$s,Gs,Vs,Us,Ys,Ws,qs,Hs,Js,Ks,Xs,Zs,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,cu,fu,lu,du,hu,pu,vu,gu,yu,mu,bu,wu,_u,Eu,ju,ku,Ou,xu,Nu,Iu,Cu,Tu,Mu,Su,Au,Lu,Pu,Du,Bu,Fu,Ru,zu,$u,Gu,Vu,Uu,Yu,Wu,qu,Hu,Ju,Ku,Xu,Zu,Qu,ec,tc,nc,rc,oc,ic,ac,sc,uc,cc,fc,lc,dc,hc,pc,vc,gc,yc,mc,bc,wc,_c,Ec,jc,kc,Oc,xc,Nc,Ic,Cc,Tc,Mc,Sc,Ac,Lc,Pc,Dc,Bc,Fc,Rc,zc,$c,Gc,Vc,Uc,Yc,Wc,qc,Hc,Jc,Kc,Xc,Zc,Qc,ef,tf,nf,rf,of,af,sf,uf,cf,ff,lf,df,hf,pf,vf,gf,yf,mf,bf,wf,_f,Ef,jf,kf,Of,xf,Nf,If,Cf,Tf,Mf,Sf,Af,Lf,Pf,Df,Bf,Ff,Rf,zf,$f,Gf,Vf,Uf,Yf,Wf,qf,Hf,Jf,Kf,Xf,Zf,Qf,el,tl,nl,rl,ol,il,al,sl,ul,cl,fl,ll,dl,hl,pl,vl,gl,yl,ml,bl,wl,_l,El,jl,kl,Ol,xl,Nl={exports:{}};function Il(){if(_a)return wa;return _a=1,wa=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function Cl(){if(ja)return Ea;return ja=1,Ea=function(){return[]}}function Tl(){if(Oa)return ka;Oa=1;var e=Il(),t=Cl(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return ka=r?function(t){return null==t?[]:(t=Object(t),e(r(t),function(e){return n.call(t,e)}))}:t}function Ml(){if(Ca)return Ia;return Ca=1,Ia=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function Sl(){if(Ma)return Ta;Ma=1;var e=la()(Object.getPrototypeOf,Object);return Ta=e}function Al(){if(Aa)return Sa;Aa=1;var e=Ml(),t=Sl(),n=Tl(),r=Cl(),o=Object.getOwnPropertySymbols;return Sa=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function Ll(){if(Ba)return Da;Ba=1;var e=Ml(),t=gi();return Da=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function Pl(){if(Ra)return Fa;Ra=1;var e=Ll(),t=Tl(),n=pa();return Fa=function(r){return e(r,n,t)}}function Dl(){if(qa)return Wa;qa=1;var e=ni()(Jo(),"Set");return Wa=e}function Bl(){if(Xa)return Ka;Xa=1;var e=function(){if(Va)return Ga;Va=1;var e=ni()(Jo(),"DataView");return Ga=e}(),t=ri(),n=function(){if(Ya)return Ua;Ya=1;var e=ni()(Jo(),"Promise");return Ua=e}(),r=Dl(),o=function(){if(Ja)return Ha;Ja=1;var e=ni()(Jo(),"WeakMap");return Ha=e}(),i=Xo(),a=ti(),s="[object Map]",u="[object Promise]",c="[object Set]",f="[object WeakMap]",l="[object DataView]",d=a(e),h=a(t),p=a(n),v=a(r),g=a(o),y=i;return(e&&y(new e(new ArrayBuffer(1)))!=l||t&&y(new t)!=s||n&&y(n.resolve())!=u||r&&y(new r)!=c||o&&y(new o)!=f)&&(y=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case d:return l;case h:return s;case p:return u;case v:return c;case g:return f}return t}),Ka=y}function Fl(){if(ts)return es;ts=1;var e=Jo().Uint8Array;return es=e}function Rl(){if(rs)return ns;rs=1;var e=Fl();return ns=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function zl(){if(hs)return ds;hs=1;var e=Rl(),t=function(){if(is)return os;is=1;var e=Rl();return os=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}(),n=function(){if(ss)return as;ss=1;var e=/\w*$/;return as=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}(),r=function(){if(cs)return us;cs=1;var e=Ko(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return us=function(e){return n?Object(n.call(e)):{}}}(),o=function(){if(ls)return fs;ls=1;var e=Rl();return fs=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}();return ds=function(i,a,s){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function $l(){if(vs)return ps;vs=1;var e=Zo(),t=Object.create;return ps=/* @__PURE__ */function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function Gl(){if(_s)return ws;_s=1;var e=function(){if(bs)return ms;bs=1;var e=Bl(),t=pi();return ms=function(n){return t(n)&&"[object Map]"==e(n)}}(),t=Si(),n=sa(),r=n&&n.isMap,o=r?t(r):e;return ws=o}function Vl(){if(Os)return ks;Os=1;var e=function(){if(js)return Es;js=1;var e=Bl(),t=pi();return Es=function(n){return t(n)&&"[object Set]"==e(n)}}(),t=Si(),n=sa(),r=n&&n.isSet,o=r?t(r):e;return ks=o}function Ul(){if(Ns)return xs;Ns=1;var e,t,n,r,o,i,a,s=ui(),u=ci(),c=di(),f=function(){if(Xi)return Ki;Xi=1;var e=hi(),t=pa();return Ki=function(n,r){return n&&e(r,t(r),n)}}(),l=function(){if(ia)return oa;ia=1;var e=hi(),t=ga();return oa=function(n,r){return n&&e(r,t(r),n)}}(),d=(ya||(ya=1,e=Nl,t=Nl.exports,n=Jo(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),Nl.exports),h=ba?ma:(ba=1,ma=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}),p=function(){if(Na)return xa;Na=1;var e=hi(),t=Tl();return xa=function(n,r){return e(n,t(n),r)}}(),v=function(){if(Pa)return La;Pa=1;var e=hi(),t=Al();return La=function(n,r){return e(n,t(n),r)}}(),g=Pl(),y=function(){if($a)return za;$a=1;var e=Ll(),t=Al(),n=ga();return za=function(r){return e(r,n,t)}}(),m=Bl(),b=function(){if(Qa)return Za;Qa=1;var e=Object.prototype.hasOwnProperty;return Za=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}(),w=zl(),_=function(){if(ys)return gs;ys=1;var e=$l(),t=Sl(),n=fa();return gs=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}(),E=gi(),j=Ci(),k=Gl(),O=Zo(),x=Vl(),N=pa(),I=ga(),C="[object Arguments]",T="[object Function]",M="[object Object]",S={};return S[C]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[M]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[T]=S["[object WeakMap]"]=!1,xs=function e(t,n,r,o,i,a){var A,L=1&n,P=2&n,D=4&n;if(r&&(A=i?r(t,o,i,a):r(t)),void 0!==A)return A;if(!O(t))return t;var B=E(t);if(B){if(A=b(t),!L)return h(t,A)}else{var F=m(t),R=F==T||"[object GeneratorFunction]"==F;if(j(t))return d(t,L);if(F==M||F==C||R&&!i){if(A=P||R?{}:_(t),!L)return P?v(t,l(A,t)):p(t,f(A,t))}else{if(!S[F])return i?t:{};A=w(t,F,L)}}a||(a=new s);var z=a.get(t);if(z)return z;a.set(t,A),x(t)?t.forEach(function(o){A.add(e(o,n,r,o,t,a))}):k(t)&&t.forEach(function(o,i){A.set(i,e(o,n,r,i,t,a))});var $=B?void 0:(D?P?y:g:P?I:N)(t);return u($||t,function(o,i){$&&(o=t[i=o]),c(A,i,e(o,n,r,i,t,a))}),A},xs}function Yl(){if(Cs)return Is;Cs=1;var e=Ul();return Is=function(t){return e(t,4)}}function Wl(){if(Ms)return Ts;return Ms=1,Ts=function(e){return function(){return e}}}function ql(){if(Ps)return Ls;Ps=1;var e=(As?Ss:(As=1,Ss=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}))();return Ls=e}function Hl(){if(Bs)return Ds;Bs=1;var e=ql(),t=pa();return Ds=function(n,r){return n&&e(n,r,t)}}function Jl(){if($s)return zs;$s=1;var e=Hl(),t=function(){if(Rs)return Fs;Rs=1;var e=ha();return Fs=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var i=r.length,a=n?i:-1,s=Object(r);(n?a--:++a<i)&&!1!==o(s[a],a,s););return r}}}()(e);return zs=t}function Kl(){if(Vs)return Gs;return Vs=1,Gs=function(e){return e}}function Xl(){if(qs)return Ws;qs=1;var e=ci(),t=Jl(),n=function(){if(Ys)return Us;Ys=1;var e=Kl();return Us=function(t){return"function"==typeof t?t:e}}(),r=gi();return Ws=function(o,i){return(r(o)?e:t)(o,n(i))}}function Zl(){if(ru)return nu;ru=1;var e=si(),t=Qs?Zs:(Qs=1,Zs=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}),n=tu?eu:(tu=1,eu=function(e){return this.__data__.has(e)});function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,nu=r}function Ql(){if(su)return au;return su=1,au=function(e,t){return e.has(t)}}function ed(){if(cu)return uu;cu=1;var e=Zl(),t=iu?ou:(iu=1,ou=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}),n=Ql();return uu=function(r,o,i,a,s,u){var c=1&i,f=r.length,l=o.length;if(f!=l&&!(c&&l>f))return!1;var d=u.get(r),h=u.get(o);if(d&&h)return d==o&&h==r;var p=-1,v=!0,g=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++p<f;){var y=r[p],m=o[p];if(a)var b=c?a(m,y,p,o,r,u):a(y,m,p,r,o,u);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!t(o,function(e,t){if(!n(g,t)&&(y===e||s(y,e,i,a,u)))return g.push(t)})){v=!1;break}}else if(y!==m&&!s(y,m,i,a,u)){v=!1;break}}return u.delete(r),u.delete(o),v}}function td(){if(hu)return du;return hu=1,du=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}}function nd(){if(vu)return pu;vu=1;var e=Ko(),t=Fl(),n=Yo(),r=ed(),o=lu?fu:(lu=1,fu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}),i=td(),a=e?e.prototype:void 0,s=a?a.valueOf:void 0;return pu=function(e,a,u,c,f,l,d){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!l(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var h=o;case"[object Set]":var p=1&c;if(h||(h=i),e.size!=a.size&&!p)return!1;var v=d.get(e);if(v)return v==a;c|=2,d.set(e,a);var g=r(h(e),h(a),c,f,l,d);return d.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(a)}return!1}}function rd(){if(bu)return mu;bu=1;var e=ui(),t=ed(),n=nd(),r=function(){if(yu)return gu;yu=1;var e=Pl(),t=Object.prototype.hasOwnProperty;return gu=function(n,r,o,i,a,s){var u=1&o,c=e(n),f=c.length;if(f!=e(r).length&&!u)return!1;for(var l=f;l--;){var d=c[l];if(!(u?d in r:t.call(r,d)))return!1}var h=s.get(n),p=s.get(r);if(h&&p)return h==r&&p==n;var v=!0;s.set(n,r),s.set(r,n);for(var g=u;++l<f;){var y=n[d=c[l]],m=r[d];if(i)var b=u?i(m,y,d,r,n,s):i(y,m,d,n,r,s);if(!(void 0===b?y===m||a(y,m,o,i,s):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=n.constructor,_=r.constructor;w==_||!("constructor"in n)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return s.delete(n),s.delete(r),v}}(),o=Bl(),i=gi(),a=Ci(),s=ua(),u="[object Arguments]",c="[object Array]",f="[object Object]",l=Object.prototype.hasOwnProperty;return mu=function(d,h,p,v,g,y){var m=i(d),b=i(h),w=m?c:o(d),_=b?c:o(h),E=(w=w==u?f:w)==f,j=(_=_==u?f:_)==f,k=w==_;if(k&&a(d)){if(!a(h))return!1;m=!0,E=!1}if(k&&!E)return y||(y=new e),m||s(d)?t(d,h,p,v,g,y):n(d,h,w,p,v,g,y);if(!(1&p)){var O=E&&l.call(d,"__wrapped__"),x=j&&l.call(h,"__wrapped__");if(O||x){var N=O?d.value():d,I=x?h.value():h;return y||(y=new e),g(N,I,p,v,y)}}return!!k&&(y||(y=new e),r(d,h,p,v,g,y))}}function od(){if(_u)return wu;_u=1;var e=rd(),t=pi();return wu=function n(r,o,i,a,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,s))},wu}function id(){if(Ou)return ku;Ou=1;var e=Zo();return ku=function(t){return t==t&&!e(t)}}function ad(){if(Cu)return Iu;return Cu=1,Iu=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function sd(){if(Mu)return Tu;Mu=1;var e=function(){if(ju)return Eu;ju=1;var e=ui(),t=od();return Eu=function(n,r,o,i){var a=o.length,s=a,u=!i;if(null==n)return!s;for(n=Object(n);a--;){var c=o[a];if(u&&c[2]?c[1]!==n[c[0]]:!(c[0]in n))return!1}for(;++a<s;){var f=(c=o[a])[0],l=n[f],d=c[1];if(u&&c[2]){if(void 0===l&&!(f in n))return!1}else{var h=new e;if(i)var p=i(l,d,f,n,r,h);if(!(void 0===p?t(d,l,3,i,h):p))return!1}}return!0}}(),t=function(){if(Nu)return xu;Nu=1;var e=id(),t=pa();return xu=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}(),n=ad();return Tu=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function ud(){if(Au)return Su;Au=1;var e=Xo(),t=pi();return Su=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function cd(){if(Pu)return Lu;Pu=1;var e=gi(),t=ud(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return Lu=function(o,i){if(e(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!t(o))||(r.test(o)||!n.test(o)||null!=i&&o in Object(i))}}function fd(){if(Ru)return Fu;Ru=1;var e=function(){if(Bu)return Du;Bu=1;var e=si();function t(n,r){if("function"!=typeof n||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var o=function(){var e=arguments,t=r?r.apply(this,e):e[0],i=o.cache;if(i.has(t))return i.get(t);var a=n.apply(this,e);return o.cache=i.set(t,a)||i,a};return o.cache=new(t.Cache||e),o}return t.Cache=e,Du=t}();return Fu=function(t){var n=e(t,function(e){return 500===r.size&&r.clear(),e}),r=n.cache;return n}}function ld(){if(Vu)return Gu;return Vu=1,Gu=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}}function dd(){if(qu)return Wu;qu=1;var e=function(){if(Yu)return Uu;Yu=1;var e=Ko(),t=ld(),n=gi(),r=ud(),o=e?e.prototype:void 0,i=o?o.toString:void 0;return Uu=function e(o){if("string"==typeof o)return o;if(n(o))return t(o,e)+"";if(r(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},Uu}();return Wu=function(t){return null==t?"":e(t)}}function hd(){if(Ju)return Hu;Ju=1;var e=gi(),t=cd(),n=function(){if($u)return zu;$u=1;var e=fd(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(t,function(e,t,o,i){r.push(o?i.replace(n,"$1"):t||e)}),r});return zu=r}(),r=dd();return Hu=function(o,i){return e(o)?o:t(o,i)?[o]:n(r(o))}}function pd(){if(Xu)return Ku;Xu=1;var e=ud();return Ku=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}}function vd(){if(Qu)return Zu;Qu=1;var e=hd(),t=pd();return Zu=function(n,r){for(var o=0,i=(r=e(r,n)).length;null!=n&&o<i;)n=n[t(r[o++])];return o&&o==i?n:void 0}}function gd(){if(ic)return oc;ic=1;var e=hd(),t=vi(),n=gi(),r=Ti(),o=Mi(),i=pd();return oc=function(a,s,u){for(var c=-1,f=(s=e(s,a)).length,l=!1;++c<f;){var d=i(s[c]);if(!(l=null!=a&&u(a,d)))break;a=a[d]}return l||++c!=f?l:!!(f=null==a?0:a.length)&&o(f)&&r(d,f)&&(n(a)||t(a))}}function yd(){if(sc)return ac;sc=1;var e=rc?nc:(rc=1,nc=function(e,t){return null!=e&&t in Object(e)}),t=gd();return ac=function(n,r){return null!=n&&t(n,r,e)}}function md(){if(cc)return uc;cc=1;var e=od(),t=function(){if(tc)return ec;tc=1;var e=vd();return ec=function(t,n,r){var o=null==t?void 0:e(t,n);return void 0===o?r:o}}(),n=yd(),r=cd(),o=id(),i=ad(),a=pd();return uc=function(s,u){return r(s)&&o(u)?i(a(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function bd(){if(lc)return fc;return lc=1,fc=function(e){return function(t){return null==t?void 0:t[e]}}}function wd(){if(vc)return pc;vc=1;var e=bd(),t=function(){if(hc)return dc;hc=1;var e=vd();return dc=function(t){return function(n){return e(n,t)}}}(),n=cd(),r=pd();return pc=function(o){return n(o)?e(r(o)):t(o)}}function _d(){if(yc)return gc;yc=1;var e=sd(),t=md(),n=Kl(),r=gi(),o=wd();return gc=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function Ed(){if(bc)return mc;bc=1;var e=Il(),t=function(){if(Xs)return Ks;Xs=1;var e=Jl();return Ks=function(t,n){var r=[];return e(t,function(e,t,o){n(e,t,o)&&r.push(e)}),r}}(),n=_d(),r=gi();return mc=function(o,i){return(r(o)?e:t)(o,n(i,3))}}function jd(){if(jc)return Ec;jc=1;var e=function(){if(_c)return wc;_c=1;var e=Object.prototype.hasOwnProperty;return wc=function(t,n){return null!=t&&e.call(t,n)}}(),t=gd();return Ec=function(n,r){return null!=n&&t(n,r,e)}}function kd(){if(Oc)return kc;Oc=1;var e=da(),t=Bl(),n=vi(),r=gi(),o=ha(),i=Ci(),a=fa(),s=ua(),u=Object.prototype.hasOwnProperty;return kc=function(c){if(null==c)return!0;if(o(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||i(c)||s(c)||n(c)))return!c.length;var f=t(c);if("[object Map]"==f||"[object Set]"==f)return!c.size;if(a(c))return!e(c).length;for(var l in c)if(u.call(c,l))return!1;return!0}}function Od(){if(Nc)return xc;return Nc=1,xc=function(e){return void 0===e}}function xd(){if(Mc)return Tc;Mc=1;var e=ld(),t=_d(),n=function(){if(Cc)return Ic;Cc=1;var e=Jl(),t=ha();return Ic=function(n,r){var o=-1,i=t(n)?Array(n.length):[];return e(n,function(e,t,n){i[++o]=r(e,t,n)}),i}}(),r=gi();return Tc=function(o,i){return(r(o)?e:n)(o,t(i,3))}}function Nd(){if(Bc)return Dc;Bc=1;var e=Ac?Sc:(Ac=1,Sc=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}),t=Jl(),n=_d(),r=Pc?Lc:(Pc=1,Lc=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}),o=gi();return Dc=function(i,a,s){var u=o(i)?e:r,c=arguments.length<3;return u(i,n(a,4),s,c,t)},Dc}function Id(){if(qc)return Wc;qc=1;var e=function(){if($c)return zc;$c=1;var e=bd()("length");return zc=e}(),t=function(){if(Vc)return Gc;Vc=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return Gc=function(t){return e.test(t)}}(),n=function(){if(Yc)return Uc;Yc=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")?",u="[\\ufe0e\\ufe0f]?",c=u+s+"(?:\\u200d(?:"+[o,i,a].join("|")+")"+u+s+")*",f="(?:"+[o+n+"?",n,i,a,t].join("|")+")",l=RegExp(r+"(?="+r+")|"+f+c,"g");return Uc=function(e){for(var t=l.lastIndex=0;l.test(e);)++t;return t}}();return Wc=function(r){return t(r)?n(r):e(r)}}function Cd(){if(Jc)return Hc;Jc=1;var e=da(),t=Bl(),n=ha(),r=function(){if(Rc)return Fc;Rc=1;var e=Xo(),t=gi(),n=pi();return Fc=function(r){return"string"==typeof r||!t(r)&&n(r)&&"[object String]"==e(r)}}(),o=Id();return Hc=function(i){if(null==i)return 0;if(n(i))return r(i)?o(i):i.length;var a=t(i);return"[object Map]"==a||"[object Set]"==a?i.size:e(i).length}}function Td(){if(Xc)return Kc;Xc=1;var e=ci(),t=$l(),n=Hl(),r=_d(),o=Sl(),i=gi(),a=Ci(),s=Qo(),u=Zo(),c=ua();return Kc=function(f,l,d){var h=i(f),p=h||a(f)||c(f);if(l=r(l,4),null==d){var v=f&&f.constructor;d=p?h?new v:[]:u(f)&&s(v)?t(o(f)):{}}return(p?e:n)(f,function(e,t,n){return l(d,e,t,n)}),d}}function Md(){if(tf)return ef;tf=1;var e=Ml(),t=function(){if(Qc)return Zc;Qc=1;var e=Ko(),t=vi(),n=gi(),r=e?e.isConcatSpreadable:void 0;return Zc=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}();return ef=function n(r,o,i,a,s){var u=-1,c=r.length;for(i||(i=t),s||(s=[]);++u<c;){var f=r[u];o>0&&i(f)?o>1?n(f,o-1,i,a,s):e(s,f):a||(s[s.length]=f)}return s},ef}function Sd(){if(af)return of;af=1;var e=rf?nf:(rf=1,nf=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}),t=Math.max;return of=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,s=t(i.length-r,0),u=Array(s);++a<s;)u[a]=i[r+a];a=-1;for(var c=Array(r+1);++a<r;)c[a]=i[a];return c[r]=o(u),e(n,this,c)}},of}function Ad(){if(df)return lf;df=1;var e=function(){if(uf)return sf;uf=1;var e=Wl(),t=fi(),n=Kl();return sf=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}(),t=function(){if(ff)return cf;ff=1;var e=Date.now;return cf=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},cf}(),n=t(e);return lf=n}function Ld(){if(Ef)return _f;Ef=1;var e=gf?vf:(gf=1,vf=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}),t=mf?yf:(mf=1,yf=function(e){return e!=e}),n=wf?bf:(wf=1,bf=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1});return _f=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function Pd(){if(Tf)return Cf;Tf=1;var e=Dl(),t=If?Nf:(If=1,Nf=function(){}),n=td(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Cf=r}function Dd(){if(Sf)return Mf;Sf=1;var e=Zl(),t=function(){if(kf)return jf;kf=1;var e=Ld();return jf=function(t,n){return!(null==t||!t.length)&&e(t,n,0)>-1}}(),n=xf?Of:(xf=1,Of=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}),r=Ql(),o=Pd(),i=td();return Mf=function(a,s,u){var c=-1,f=t,l=a.length,d=!0,h=[],p=h;if(u)d=!1,f=n;else if(l>=200){var v=s?null:o(a);if(v)return i(v);d=!1,f=r,p=new e}else p=s?[]:h;e:for(;++c<l;){var g=a[c],y=s?s(g):g;if(g=u||0!==g?g:0,d&&y==y){for(var m=p.length;m--;)if(p[m]===y)continue e;s&&p.push(y),h.push(g)}else f(p,y,u)||(p!==h&&p.push(y),h.push(g))}return h}}function Bd(){if(Df)return Pf;Df=1;var e=Md(),t=function(){if(pf)return hf;pf=1;var e=Kl(),t=Sd(),n=Ad();return hf=function(r,o){return n(t(r,o,e),r+"")}}(),n=Dd(),r=function(){if(Lf)return Af;Lf=1;var e=ha(),t=pi();return Af=function(n){return t(n)&&e(n)}}(),o=t(function(t){return n(e(t,1,r,!0))});return Pf=o}function Fd(){if(zf)return Rf;zf=1;var e=function(){if(Ff)return Bf;Ff=1;var e=ld();return Bf=function(t,n){return e(n,function(e){return t[e]})}}(),t=pa();return Rf=function(n){return null==n?[]:e(n,t(n))}}function Rd(){if(Gf)return $f;var e;Gf=1;try{e={clone:Yl(),constant:Wl(),each:Js?Hs:(Js=1,Hs=Xl()),filter:Ed(),has:jd(),isArray:gi(),isEmpty:kd(),isFunction:Qo(),isUndefined:Od(),keys:pa(),map:xd(),reduce:Nd(),size:Cd(),transform:Td(),union:Bd(),values:Fd()}}catch(t){}return e||(e=window._),$f=e}function zd(){if(Uf)return Vf;Uf=1;var e=Rd();Vf=n;var t="\0";function n(n){this._isDirected=!e.has(n,"directed")||n.directed,this._isMultigraph=!!e.has(n,"multigraph")&&n.multigraph,this._isCompound=!!e.has(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.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={}}function r(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function i(t,n,r,o){var i=""+n,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+""+a+""+(e.isUndefined(o)?"\0":o)}function a(e,t){return i(e,t.v,t.w,t.name)}return n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(e){return this._label=e,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return e.keys(this._nodes)},n.prototype.sources=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._in[n])})},n.prototype.sinks=function(){var t=this;return e.filter(this.nodes(),function(n){return e.isEmpty(t._out[n])})},n.prototype.setNodes=function(t,n){var r=arguments,o=this;return e.each(t,function(e){r.length>1?o.setNode(e,n):o.setNode(e)}),this},n.prototype.setNode=function(n,r){return e.has(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=t,this._children[n]={},this._children[t][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)},n.prototype.node=function(e){return this._nodes[e]},n.prototype.hasNode=function(t){return e.has(this._nodes,t)},n.prototype.removeNode=function(t){var n=this;if(e.has(this._nodes,t)){var r=function(e){n.removeEdge(n._edgeObjs[e])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],e.each(this.children(t),function(e){n.setParent(e)}),delete this._children[t]),e.each(e.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],e.each(e.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(r))r=t;else{for(var o=r+="";!e.isUndefined(o);o=this.parent(o))if(o===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this},n.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},n.prototype.parent=function(e){if(this._isCompound){var n=this._parent[e];if(n!==t)return n}},n.prototype.children=function(n){if(e.isUndefined(n)&&(n=t),this._isCompound){var r=this._children[n];if(r)return e.keys(r)}else{if(n===t)return this.nodes();if(this.hasNode(n))return[]}},n.prototype.predecessors=function(t){var n=this._preds[t];if(n)return e.keys(n)},n.prototype.successors=function(t){var n=this._sucs[t];if(n)return e.keys(n)},n.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return e.union(n,this.successors(t))},n.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},n.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;e.each(this._nodes,function(e,r){t(r)&&n.setNode(r,e)}),e.each(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,r.edge(e))});var o={};function i(e){var t=r.parent(e);return void 0===t||n.hasNode(t)?(o[e]=t,t):t in o?o[t]:i(t)}return this._isCompound&&e.each(n.nodes(),function(e){n.setParent(e,i(e))}),n},n.prototype.setDefaultEdgeLabel=function(t){return e.isFunction(t)||(t=e.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return e.values(this._edgeObjs)},n.prototype.setPath=function(t,n){var r=this,o=arguments;return e.reduce(t,function(e,t){return o.length>1?r.setEdge(e,t,n):r.setEdge(e,t),t}),this},n.prototype.setEdge=function(){var t,n,o,a,s=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,n=u.w,o=u.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=u,n=arguments[1],o=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,n=""+n,e.isUndefined(o)||(o=""+o);var c=i(this._isDirected,t,n,o);if(e.has(this._edgeLabels,c))return s&&(this._edgeLabels[c]=a),this;if(!e.isUndefined(o)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[c]=s?a:this._defaultEdgeLabelFn(t,n,o);var f=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};r&&(s.name=r);return s}(this._isDirected,t,n,o);return t=f.v,n=f.w,Object.freeze(f),this._edgeObjs[c]=f,r(this._preds[n],t),r(this._sucs[t],n),this._in[n][c]=f,this._out[t][c]=f,this._edgeCount++,this},n.prototype.edge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,n,r){var o=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,t,n,r);return e.has(this._edgeLabels,o)},n.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):i(this._isDirected,e,t,n),s=this._edgeObjs[r];return s&&(e=s.v,t=s.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},n.prototype.inEdges=function(t,n){var r=this._in[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.v===n}):o}},n.prototype.outEdges=function(t,n){var r=this._out[t];if(r){var o=e.values(r);return n?e.filter(o,function(e){return e.w===n}):o}},n.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))},Vf}function $d(){if(Kf)return Jf;Kf=1;var e=Rd(),t=zd();function n(t){return e.map(t.nodes(),function(n){var r=t.node(n),o=t.parent(n),i={v:n};return e.isUndefined(r)||(i.value=r),e.isUndefined(o)||(i.parent=o),i})}function r(t){return e.map(t.edges(),function(n){var r=t.edge(n),o={v:n.v,w:n.w};return e.isUndefined(n.name)||(o.name=n.name),e.isUndefined(r)||(o.value=r),o})}return Jf={write:function(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n(t),edges:r(t)};e.isUndefined(t.graph())||(o.value=e.clone(t.graph()));return o},read:function(n){var r=new t(n.options).setGraph(n.value);return e.each(n.nodes,function(e){r.setNode(e.v,e.value),e.parent&&r.setParent(e.v,e.parent)}),e.each(n.edges,function(e){r.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),r}}}function Gd(){if(Zf)return Xf;Zf=1;var e=Rd();return Xf=function(t){var n,r={},o=[];function i(o){e.has(r,o)||(r[o]=!0,n.push(o),e.each(t.successors(o),i),e.each(t.predecessors(o),i))}return e.each(t.nodes(),function(e){n=[],i(e),n.length&&o.push(n)}),o}}function Vd(){if(el)return Qf;el=1;var e=Rd();function t(){this._arr=[],this._keyIndices={}}return Qf=t,t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(e){return e.key})},t.prototype.has=function(t){return e.has(this._keyIndices,t)},t.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},t.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(t,n){var r=this._keyIndices;if(t=String(t),!e.has(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},t.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},t.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},t.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},t.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],i=n[t];n[e]=i,n[t]=o,r[i.key]=e,r[o.key]=t},Qf}function Ud(){if(nl)return tl;nl=1;var e=Rd(),t=Vd();tl=function(e,r,o,i){return function(e,n,r,o){var i,a,s={},u=new t,c=function(e){var t=e.v!==i?e.v:e.w,n=s[t],o=r(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(t,c))};e.nodes().forEach(function(e){var t=e===n?0:Number.POSITIVE_INFINITY;s[e]={distance:t},u.add(e,t)});for(;u.size()>0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)o(i).forEach(c);return s}(e,String(r),o||n,i||function(t){return e.outEdges(t)})};var n=e.constant(1);return tl}function Yd(){if(ol)return rl;ol=1;var e=Ud(),t=Rd();return rl=function(n,r,o){return t.transform(n.nodes(),function(t,i){t[i]=e(n,i,r,o)},{})}}function Wd(){if(al)return il;al=1;var e=Rd();return il=function(t){var n=0,r=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(t){e.has(o,t)?o[t].onStack&&(u.lowlink=Math.min(u.lowlink,o[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,o[t].lowlink))}),u.lowlink===u.index){var c,f=[];do{c=r.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return t.nodes().forEach(function(t){e.has(o,t)||a(t)}),i}}function qd(){if(ul)return sl;ul=1;var e=Rd(),t=Wd();return sl=function(n){return e.filter(t(n),function(e){return e.length>1||1===e.length&&n.hasEdge(e[0],e[0])})}}function Hd(){if(fl)return cl;fl=1;var e=Rd();cl=function(e,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var i=r[n];o.forEach(function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s<a.distance&&(a.distance=s,a.predecessor=o.predecessor)})})}),r}(e,n||t,r||function(t){return e.outEdges(t)})};var t=e.constant(1);return cl}function Jd(){if(dl)return ll;dl=1;var e=Rd();function t(t){var r={},o={},i=[];if(e.each(t.sinks(),function a(s){if(e.has(o,s))throw new n;e.has(r,s)||(o[s]=!0,r[s]=!0,e.each(t.predecessors(s),a),delete o[s],i.push(s))}),e.size(r)!==t.nodeCount())throw new n;return i}function n(){}return ll=t,t.CycleException=n,n.prototype=new Error,ll}function Kd(){if(pl)return hl;pl=1;var e=Jd();return hl=function(t){try{e(t)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}}function Xd(){if(gl)return vl;gl=1;var e=Rd();function t(n,r,o,i,a,s){e.has(i,r)||(i[r]=!0,o||s.push(r),e.each(a(r),function(e){t(n,e,o,i,a,s)}),o&&s.push(r))}return vl=function(n,r,o){e.isArray(r)||(r=[r]);var i=(n.isDirected()?n.successors:n.neighbors).bind(n),a=[],s={};return e.each(r,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);t(n,e,"post"===o,s,i,a)}),a}}function Zd(){if(ml)return yl;ml=1;var e=Xd();return yl=function(t,n){return e(t,n,"post")}}function Qd(){if(wl)return bl;wl=1;var e=Xd();return bl=function(t,n){return e(t,n,"pre")}}function eh(){if(El)return _l;El=1;var e=Rd(),t=zd(),n=Vd();return _l=function(r,o){var i,a=new t,s={},u=new n;function c(e){var t=e.v===i?e.w:e.v,n=u.priority(t);if(void 0!==n){var r=o(e);r<n&&(s[t]=i,u.decrease(t,r))}}if(0===r.nodeCount())return a;e.each(r.nodes(),function(e){u.add(e,Number.POSITIVE_INFINITY),a.setNode(e)}),u.decrease(r.nodes()[0],0);var f=!1;for(;u.size()>0;){if(i=u.removeMin(),e.has(s,i))a.setEdge(i,s[i]);else{if(f)throw new Error("Input graph is not connected: "+r);f=!0}r.nodeEdges(i).forEach(c)}return a}}var th=function(){if(xl)return Ol;xl=1;var e=Hf?qf:(Hf=1,qf={Graph:zd(),version:Wf?Yf:(Wf=1,Yf="2.1.8")});return Ol={Graph:e.Graph,json:$d(),alg:kl?jl:(kl=1,jl={components:Gd(),dijkstra:Ud(),dijkstraAll:Yd(),findCycles:qd(),floydWarshall:Hd(),isAcyclic:Kd(),postorder:Zd(),preorder:Qd(),prim:eh(),tarjan:Wd(),topsort:Jd()}),version:e.version}}();function nh(){const{findNode:e}=M(),t=n(new th.Graph({directed:!0}));return{graph:t,layout:function(n,r,o="TB"){const i=new Vn.graphlib.Graph;i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:o});const a="LR"===o;for(const t of n){const n=e(t.id);i.setNode(t.id,{width:n?.dimensions.width||150,height:n?.dimensions.height||50})}for(const e of r)i.setEdge(e.source,e.target);Vn.layout(i);const s=new th.Graph({directed:!0});for(const e of n)s.setNode(e.id);for(const e of r)s.setEdge(e.source,e.target);return t.value=s,n.map(e=>{const t=i.node(e.id);return{...e,targetPosition:a?S.Left:S.Top,sourcePosition:a?S.Right:S.Bottom,position:{x:t.x,y:t.y}}})}}}const rh={};function oh(e){if(rh[e])return rh[e];const t=T(e,null);if(!t){console.warn(`[whitelabel-modules] Missing injected composable: ${e}. Will retry on next call.`);const t=(...t)=>{const n=T(e,null);if(!n)throw new Error(`[whitelabel-modules] ${e} still not provided.`);return rh[e]=n,n(...t)};return rh[e]=t,t}return rh[e]=t,t}const ih=()=>oh("cms-useIntegrationActionBuilder")(),ah=()=>oh("cms-useIntegrations")(),sh=e=>oh("cms-useIntegrationActions")(e),uh=()=>oh("cms-useMediaLibrary")(),ch=()=>oh("cms-useProjectService")(),fh=e=>oh("cms-useModuleBreadcrumbs")(e),lh=()=>oh("cms-useQueryBuilder")(),dh=()=>oh("cms-useModule")(),hh=()=>oh("cms-useModulePermissions")(),ph=()=>oh("cms-useModuleRoute")(),vh=()=>oh("cms-useModuleStorage")(),gh=()=>oh("cms-useLogs")(),yh=()=>oh("cms-useUtilsService")(),mh=()=>oh("cms-useFormBuilder")(),bh=()=>oh("cms-useFlowBuilder")(),wh=()=>oh("cms-useConfirmation")(),_h=e=>oh("cms-useFirebaseIntegration")(e),Eh=()=>oh("cms-useProjectSettings")(),jh=()=>oh("cms-useCustomDialog")(),kh=()=>oh("cms-useModuleOverlay")(),Oh=()=>oh("cms-useRoute")(),xh=()=>oh("cms-useRouter")(),Nh=()=>oh("cms-useOverlayStack")();export{sn as A,ye as P,le as T,nh as a,ih as b,ah as c,sh as d,uh as e,ch as f,fh as g,lh as h,dh as i,hh as j,ph as k,vh as l,gh as m,yh as n,mh as o,bh as p,wh as q,_h as r,Eh as s,jh as t,me as u,kh as v,Oh as w,xh as x,Nh as y,de as z};