@opens/service-workflow-ui 1.0.0 → 1.1.0
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.
- package/README.md +10 -3
- package/dist/main.d.ts +33 -7
- package/dist/yunique_ui.cjs +5 -5
- package/dist/yunique_ui.css +1 -1
- package/dist/yunique_ui.es.js +10875 -8638
- package/dist/yunique_ui.umd.js +6 -6
- package/package.json +2 -1
package/dist/yunique_ui.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),Tg=require("pinia"),$g=["top","right","bottom","left"],oc=["start","end"],rc=$g.reduce((e,t)=>e.concat(t,t+"-"+oc[0],t+"-"+oc[1]),[]),Er=Math.min,Vn=Math.max,Pg={left:"right",right:"left",bottom:"top",top:"bottom"},Bg={start:"end",end:"start"};function Fs(e,t,n){return Vn(e,Er(t,n))}function oo(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function sh(e){return e==="x"?"y":"x"}function Cl(e){return e==="y"?"height":"width"}const Yg=new Set(["top","bottom"]);function Kt(e){return Yg.has(Rt(e))?"y":"x"}function Ol(e){return sh(Kt(e))}function lh(e,t,n){n===void 0&&(n=!1);const o=gt(e),r=Ol(e),i=Cl(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ji(a)),[a,ji(a)]}function Ag(e){const t=ji(e);return[Hi(e),t,Hi(t)]}function Hi(e){return e.replace(/start|end/g,t=>Bg[t])}const ic=["left","right"],ac=["right","left"],Ig=["top","bottom"],Vg=["bottom","top"];function Rg(e,t,n){switch(e){case"top":case"bottom":return n?t?ac:ic:t?ic:ac;case"left":case"right":return t?Ig:Vg;default:return[]}}function zg(e,t,n,o){const r=gt(e);let i=Rg(Rt(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Hi)))),i}function ji(e){return e.replace(/left|right|bottom|top/g,t=>Pg[t])}function Lg(e){return{top:0,right:0,bottom:0,left:0,...e}}function uh(e){return typeof e!="number"?Lg(e):{top:e,right:e,bottom:e,left:e}}function pr(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function sc(e,t,n){let{reference:o,floating:r}=e;const i=Kt(t),a=Ol(t),l=Cl(a),u=Rt(t),c=i==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[l]/2-r[l]/2;let p;switch(u){case"top":p={x:d,y:o.y-r.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(gt(t)){case"start":p[a]-=h*(n&&c?-1:1);break;case"end":p[a]+=h*(n&&c?-1:1);break}return p}const Fg=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=sc(c,o,u),h=o,p={},m=0;for(let v=0;v<l.length;v++){const{name:w,fn:g}=l[v],{x:b,y,data:_,reset:O}=await g({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});d=b??d,f=y??f,p={...p,[w]:{...p[w],..._}},O&&m<=50&&(m++,typeof O=="object"&&(O.placement&&(h=O.placement),O.rects&&(c=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):O.rects),{x:d,y:f}=sc(c,h,u)),v=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:p}};async function Ea(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=oo(t,e),m=uh(p),v=l[h?f==="floating"?"reference":"floating":f],w=pr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),g=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),y=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},_=pr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:b,strategy:u}):g);return{top:(w.top-_.top+m.top)/y.y,bottom:(_.bottom-w.bottom+m.bottom)/y.y,left:(w.left-_.left+m.left)/y.x,right:(_.right-w.right+m.right)/y.x}}const Hg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:c,padding:d=0}=oo(e,t)||{};if(c==null)return{};const f=uh(d),h={x:n,y:o},p=Ol(r),m=Cl(p),v=await a.getDimensions(c),w=p==="y",g=w?"top":"left",b=w?"bottom":"right",y=w?"clientHeight":"clientWidth",_=i.reference[m]+i.reference[p]-h[p]-i.floating[m],O=h[p]-i.reference[p],B=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let $=B?B[y]:0;(!$||!await(a.isElement==null?void 0:a.isElement(B)))&&($=l.floating[y]||i.floating[m]);const C=_/2-O/2,V=$/2-v[m]/2-1,L=Er(f[g],V),I=Er(f[b],V),x=L,R=$-v[m]-I,k=$/2-v[m]/2+C,N=Fs(x,k,R),D=!u.arrow&>(r)!=null&&k!==N&&i.reference[m]/2-(k<x?L:I)-v[m]/2<0,z=D?k<x?k-x:k-R:0;return{[p]:h[p]+z,data:{[p]:N,centerOffset:k-N-z,...D&&{alignmentOffset:z}},reset:D}}});function jg(e,t,n){return(e?[...n.filter(o=>gt(o)===e),...n.filter(o=>gt(o)!==e)]:n.filter(o=>Rt(o)===o)).filter(o=>e?gt(o)===e||(t?Hi(o)!==o:!1):!0)}const Wg=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:a,placement:l,platform:u,elements:c}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:h=rc,autoAlignment:p=!0,...m}=oo(e,t),v=f!==void 0||h===rc?jg(f||null,p,h):h,w=await Ea(t,m),g=((n=a.autoPlacement)==null?void 0:n.index)||0,b=v[g];if(b==null)return{};const y=lh(b,i,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==b)return{reset:{placement:v[0]}};const _=[w[Rt(b)],w[y[0]],w[y[1]]],O=[...((o=a.autoPlacement)==null?void 0:o.overflows)||[],{placement:b,overflows:_}],B=v[g+1];if(B)return{data:{index:g+1,overflows:O},reset:{placement:B}};const $=O.map(V=>{const L=gt(V.placement);return[V.placement,L&&d?V.overflows.slice(0,2).reduce((I,x)=>I+x,0):V.overflows[0],V.overflows]}).sort((V,L)=>V[1]-L[1]),C=((r=$.filter(V=>V[2].slice(0,gt(V[0])?2:3).every(L=>L<=0))[0])==null?void 0:r[0])||$[0][0];return C!==l?{data:{index:g+1,overflows:O},reset:{placement:C}}:{}}}},Ug=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...w}=oo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Rt(r),b=Kt(l),y=Rt(l)===l,_=await(u.isRTL==null?void 0:u.isRTL(c.floating)),O=h||(y||!v?[ji(l)]:Ag(l)),B=m!=="none";!h&&B&&O.push(...zg(l,v,m,_));const $=[l,...O],C=await Ea(t,w),V=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&V.push(C[g]),f){const k=lh(r,a,_);V.push(C[k[0]],C[k[1]])}if(L=[...L,{placement:r,overflows:V}],!V.every(k=>k<=0)){var I,x;const k=(((I=i.flip)==null?void 0:I.index)||0)+1,N=$[k];if(N&&(!(f==="alignment"&&b!==Kt(N))||L.every(z=>Kt(z.placement)===b?z.overflows[0]>0:!0)))return{data:{index:k,overflows:L},reset:{placement:N}};let D=(x=L.filter(z=>z.overflows[0]<=0).sort((z,F)=>z.overflows[1]-F.overflows[1])[0])==null?void 0:x.placement;if(!D)switch(p){case"bestFit":{var R;const z=(R=L.filter(F=>{if(B){const j=Kt(F.placement);return j===b||j==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(j=>j>0).reduce((j,Y)=>j+Y,0)]).sort((F,j)=>F[1]-j[1])[0])==null?void 0:R[0];z&&(D=z);break}case"initialPlacement":D=l;break}if(r!==D)return{reset:{placement:D}}}return{}}}},Gg=new Set(["left","top"]);async function Zg(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Rt(n),l=gt(n),u=Kt(n)==="y",c=Gg.has(a)?-1:1,d=i&&u?-1:1,f=oo(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),u?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const Xg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:l}=t,u=await Zg(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:i+u.y,data:{...u,placement:a}}}}},qg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:g,y:b}=w;return{x:g,y:b}}},...u}=oo(e,t),c={x:n,y:o},d=await Ea(t,u),f=Kt(Rt(r)),h=sh(f);let p=c[h],m=c[f];if(i){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",b=p+d[w],y=p-d[g];p=Fs(b,p,y)}if(a){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=m+d[w],y=m-d[g];m=Fs(b,m,y)}const v=l.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[h]:i,[f]:a}}}}}},Kg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...c}=oo(e,t),d=await Ea(t,c),f=Rt(r),h=gt(r),p=Kt(r)==="y",{width:m,height:v}=i.floating;let w,g;f==="top"||f==="bottom"?(w=f,g=h===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(g=f,w=h==="end"?"top":"bottom");const b=v-d.top-d.bottom,y=m-d.left-d.right,_=Er(v-d[w],b),O=Er(m-d[g],y),B=!t.middlewareData.shift;let $=_,C=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&($=b),B&&!h){const L=Vn(d.left,0),I=Vn(d.right,0),x=Vn(d.top,0),R=Vn(d.bottom,0);p?C=m-2*(L!==0||I!==0?L+I:Vn(d.left,d.right)):$=v-2*(x!==0||R!==0?x+R:Vn(d.top,d.bottom))}await u({...t,availableWidth:C,availableHeight:$});const V=await a.getDimensions(l.floating);return m!==V.width||v!==V.height?{reset:{rects:!0}}:{}}}};function it(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bt(e){return it(e).getComputedStyle(e)}const lc=Math.min,mr=Math.max,Wi=Math.round;function ch(e){const t=Bt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const r=e.offsetWidth,i=e.offsetHeight,a=Wi(n)!==r||Wi(o)!==i;return a&&(n=r,o=i),{width:n,height:o,fallback:a}}function On(e){return fh(e)?(e.nodeName||"").toLowerCase():""}let li;function dh(){if(li)return li;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(li=e.brands.map((t=>t.brand+"/"+t.version)).join(" "),li):navigator.userAgent}function Yt(e){return e instanceof it(e).HTMLElement}function Mn(e){return e instanceof it(e).Element}function fh(e){return e instanceof it(e).Node}function uc(e){return typeof ShadowRoot>"u"?!1:e instanceof it(e).ShadowRoot||e instanceof ShadowRoot}function Sa(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Jg(e){return["table","td","th"].includes(On(e))}function Hs(e){const t=/firefox/i.test(dh()),n=Bt(e),o=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!o&&o!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((r=>n.willChange.includes(r)))||["paint","layout","strict","content"].some((r=>{const i=n.contain;return i!=null&&i.includes(r)}))}function hh(){return!/^((?!chrome|android).)*safari/i.test(dh())}function Tl(e){return["html","body","#document"].includes(On(e))}function ph(e){return Mn(e)?e:e.contextElement}const mh={x:1,y:1};function _o(e){const t=ph(e);if(!Yt(t))return mh;const n=t.getBoundingClientRect(),{width:o,height:r,fallback:i}=ch(t);let a=(i?Wi(n.width):n.width)/o,l=(i?Wi(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function Sr(e,t,n,o){var r,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),l=ph(e);let u=mh;t&&(o?Mn(o)&&(u=_o(o)):u=_o(e));const c=l?it(l):window,d=!hh()&&n;let f=(a.left+(d&&((r=c.visualViewport)==null?void 0:r.offsetLeft)||0))/u.x,h=(a.top+(d&&((i=c.visualViewport)==null?void 0:i.offsetTop)||0))/u.y,p=a.width/u.x,m=a.height/u.y;if(l){const v=it(l),w=o&&Mn(o)?it(o):o;let g=v.frameElement;for(;g&&o&&w!==v;){const b=_o(g),y=g.getBoundingClientRect(),_=getComputedStyle(g);y.x+=(g.clientLeft+parseFloat(_.paddingLeft))*b.x,y.y+=(g.clientTop+parseFloat(_.paddingTop))*b.y,f*=b.x,h*=b.y,p*=b.x,m*=b.y,f+=y.x,h+=y.y,g=it(g).frameElement}}return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function Nn(e){return((fh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Da(e){return Mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function vh(e){return Sr(Nn(e)).left+Da(e).scrollLeft}function Dr(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||Nn(e);return uc(t)?t.host:t}function gh(e){const t=Dr(e);return Tl(t)?t.ownerDocument.body:Yt(t)&&Sa(t)?t:gh(t)}function Ui(e,t){var n;t===void 0&&(t=[]);const o=gh(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=it(o);return r?t.concat(i,i.visualViewport||[],Sa(o)?o:[]):t.concat(o,Ui(o))}function cc(e,t,n){return t==="viewport"?pr((function(o,r){const i=it(o),a=Nn(o),l=i.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,f=0;if(l){u=l.width,c=l.height;const h=hh();(h||!h&&r==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:u,height:c,x:d,y:f}})(e,n)):Mn(t)?pr((function(o,r){const i=Sr(o,!0,r==="fixed"),a=i.top+o.clientTop,l=i.left+o.clientLeft,u=Yt(o)?_o(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:a*u.y}})(t,n)):pr((function(o){const r=Nn(o),i=Da(o),a=o.ownerDocument.body,l=mr(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),u=mr(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let c=-i.scrollLeft+vh(o);const d=-i.scrollTop;return Bt(a).direction==="rtl"&&(c+=mr(r.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Nn(e)))}function dc(e){return Yt(e)&&Bt(e).position!=="fixed"?e.offsetParent:null}function fc(e){const t=it(e);let n=dc(e);for(;n&&Jg(n)&&Bt(n).position==="static";)n=dc(n);return n&&(On(n)==="html"||On(n)==="body"&&Bt(n).position==="static"&&!Hs(n))?t:n||(function(o){let r=Dr(o);for(;Yt(r)&&!Tl(r);){if(Hs(r))return r;r=Dr(r)}return null})(e)||t}function Qg(e,t,n){const o=Yt(t),r=Nn(t),i=Sr(e,!0,n==="fixed",t);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&n!=="fixed")if((On(t)!=="body"||Sa(r))&&(a=Da(t)),Yt(t)){const u=Sr(t,!0);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else r&&(l.x=vh(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const ey={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=n==="clippingAncestors"?(function(c,d){const f=d.get(c);if(f)return f;let h=Ui(c).filter((w=>Mn(w)&&On(w)!=="body")),p=null;const m=Bt(c).position==="fixed";let v=m?Dr(c):c;for(;Mn(v)&&!Tl(v);){const w=Bt(v),g=Hs(v);(m?g||p:g||w.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=w:h=h.filter((b=>b!==v)),v=Dr(v)}return d.set(c,h),h})(t,this._c):[].concat(n),a=[...i,o],l=a[0],u=a.reduce(((c,d)=>{const f=cc(t,d,r);return c.top=mr(f.top,c.top),c.right=lc(f.right,c.right),c.bottom=lc(f.bottom,c.bottom),c.left=mr(f.left,c.left),c}),cc(t,l,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Yt(n),i=Nn(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((r||!r&&o!=="fixed")&&((On(n)!=="body"||Sa(i))&&(a=Da(n)),Yt(n))){const c=Sr(n);l=_o(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-a.scrollLeft*l.x+u.x,y:t.y*l.y-a.scrollTop*l.y+u.y}},isElement:Mn,getDimensions:function(e){return Yt(e)?ch(e):e.getBoundingClientRect()},getOffsetParent:fc,getDocumentElement:Nn,getScale:_o,async getElementRects(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||fc,i=this.getDimensions;return{reference:Qg(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Bt(e).direction==="rtl"},ty=(e,t,n)=>{const o=new Map,r={platform:ey,...n},i={...r.platform,_c:o};return Fg(e,t,{...r,platform:i})},Wn={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function js(e,t){let n=Wn.themes[e]||{},o;do o=n[t],typeof o>"u"?n.$extend?n=Wn.themes[n.$extend]||{}:(n=null,o=Wn[t]):n=null;while(n);return o}function ny(e){const t=[e];let n=Wn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Wn.themes[n.$extend]||{}):n=null;while(n);return t.map(o=>`v-popper--theme-${o}`)}function hc(e){const t=[e];let n=Wn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Wn.themes[n.$extend]||{}):n=null;while(n);return t}let Mr=!1;if(typeof window<"u"){Mr=!1;try{const e=Object.defineProperty({},"passive",{get(){Mr=!0}});window.addEventListener("test",null,e)}catch{}}let yh=!1;typeof window<"u"&&typeof navigator<"u"&&(yh=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const oy=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),pc={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},mc={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function vc(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function ds(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const ht=[];let An=null;const gc={};function yc(e){let t=gc[e];return t||(t=gc[e]=[]),t}let Ws=function(){};typeof window<"u"&&(Ws=window.Element);function xe(e){return function(t){return js(t.theme,e)}}const fs="__floating-vue__popper",wh=()=>s.defineComponent({name:"VPopper",provide(){return{[fs]:{parentPopper:this}}},inject:{[fs]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:xe("disabled")},positioningDisabled:{type:Boolean,default:xe("positioningDisabled")},placement:{type:String,default:xe("placement"),validator:e=>oy.includes(e)},delay:{type:[String,Number,Object],default:xe("delay")},distance:{type:[Number,String],default:xe("distance")},skidding:{type:[Number,String],default:xe("skidding")},triggers:{type:Array,default:xe("triggers")},showTriggers:{type:[Array,Function],default:xe("showTriggers")},hideTriggers:{type:[Array,Function],default:xe("hideTriggers")},popperTriggers:{type:Array,default:xe("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:xe("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:xe("popperHideTriggers")},container:{type:[String,Object,Ws,Boolean],default:xe("container")},boundary:{type:[String,Ws],default:xe("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:xe("strategy")},autoHide:{type:[Boolean,Function],default:xe("autoHide")},handleResize:{type:Boolean,default:xe("handleResize")},instantMove:{type:Boolean,default:xe("instantMove")},eagerMount:{type:Boolean,default:xe("eagerMount")},popperClass:{type:[String,Array,Object],default:xe("popperClass")},computeTransformOrigin:{type:Boolean,default:xe("computeTransformOrigin")},autoMinSize:{type:Boolean,default:xe("autoMinSize")},autoSize:{type:[Boolean,String],default:xe("autoSize")},autoMaxSize:{type:Boolean,default:xe("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:xe("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:xe("preventOverflow")},overflowPadding:{type:[Number,String],default:xe("overflowPadding")},arrowPadding:{type:[Number,String],default:xe("arrowPadding")},arrowOverflow:{type:Boolean,default:xe("arrowOverflow")},flip:{type:Boolean,default:xe("flip")},shift:{type:Boolean,default:xe("shift")},shiftCrossAxis:{type:Boolean,default:xe("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:xe("noAutoFocus")},disposeTimeout:{type:Number,default:xe("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[fs])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var o,r;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((r=this.parentPopper)==null?void 0:r.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(Xg({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(Wg({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(qg({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Ug({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Hg({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:r,middlewareData:i})=>{let a;const{centerOffset:l}=i.arrow;return o.startsWith("top")||o.startsWith("bottom")?a=Math.abs(l)>r.reference.width/2:a=Math.abs(l)>r.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:r,placement:i,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,c;return i.startsWith("top")||i.startsWith("bottom")?u=r.reference.width:c=r.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Kg({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:r})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=r!=null?`${r}px`:null}})));const n=await ty(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),An&&this.instantMove&&An.instantMove&&An!==this.parentPopper){An.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(An=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await ds(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ui(this.$_referenceNode),...Ui(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),o=n.parentNode.getBoundingClientRect(),r=t.x+t.width/2-(o.left+n.offsetLeft),i=t.y+t.height/2-(o.top+n.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<ht.length;n++)t=ht[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}ht.push(this),document.body.classList.add("v-popper--some-open");for(const t of hc(this.theme))yc(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await ds(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,vc(ht,this),ht.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of hc(this.theme)){const o=yc(n);vc(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}An===this&&(An=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await ds(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,pc,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],pc,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,mc,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],mc,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(o=>o.addEventListener(t,n,Mr?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,o,r){let i=n;o!=null&&(i=typeof o=="function"?o(i):o),i.forEach(a=>{const l=t[a];l&&this.$_registerEventListeners(e,l,r)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:o,eventType:r,handler:i}=n;!e||e===r?o.forEach(a=>a.removeEventListener(r,i)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const o=n.getAttribute(e);o&&(n.removeAttribute(e),n.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const o=e[n];o==null?t.removeAttribute(n):t.setAttribute(n,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(vr>=e.left&&vr<=e.right&&gr>=e.top&&gr<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=vr-yn,o=gr-wn,r=t.left+t.width/2-yn+(t.top+t.height/2)-wn+t.width+t.height,i=yn+n*r,a=wn+o*r;return ui(yn,wn,i,a,t.left,t.top,t.left,t.bottom)||ui(yn,wn,i,a,t.left,t.top,t.right,t.top)||ui(yn,wn,i,a,t.right,t.top,t.right,t.bottom)||ui(yn,wn,i,a,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(yh){const e=Mr?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>wc(t),e),document.addEventListener("touchend",t=>bc(t,!0),e)}else window.addEventListener("mousedown",e=>wc(e),!0),window.addEventListener("click",e=>bc(e,!1),!0);window.addEventListener("resize",ay)}function wc(e,t){for(let n=0;n<ht.length;n++){const o=ht[n];try{o.mouseDownContains=o.popperNode().contains(e.target)}catch{}}}function bc(e,t){ry(e,t)}function ry(e,t){const n={};for(let o=ht.length-1;o>=0;o--){const r=ht[o];try{const i=r.containsGlobalTarget=r.mouseDownContains||r.popperNode().contains(e.target);r.pendingHide=!1,requestAnimationFrame(()=>{if(r.pendingHide=!1,!n[r.randomId]&&_c(r,i,e)){if(r.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&i){let l=r.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let a=r.parentPopper;for(;a&&_c(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function _c(e,t,n){return n.closeAllPopover||n.closePopover&&t||iy(e,n)&&!t}function iy(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function ay(){for(let e=0;e<ht.length;e++)ht[e].$_computePosition()}let yn=0,wn=0,vr=0,gr=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{yn=vr,wn=gr,vr=e.clientX,gr=e.clientY},Mr?{passive:!0}:void 0);function ui(e,t,n,o,r,i,a,l){const u=((a-r)*(t-i)-(l-i)*(e-r))/((l-i)*(n-e)-(a-r)*(o-t)),c=((n-e)*(t-i)-(o-t)*(e-r))/((l-i)*(n-e)-(a-r)*(o-t));return u>=0&&u<=1&&c>=0&&c<=1}const sy={extends:wh()},$l=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};function ly(e,t,n,o,r,i){return s.openBlock(),s.createElementBlock("div",{ref:"reference",class:s.normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[s.renderSlot(e.$slots,"default",s.normalizeProps(s.guardReactiveProps(e.slotData)))],2)}const uy=$l(sy,[["render",ly]]);function cy(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}let Di;function Us(){Us.init||(Us.init=!0,Di=cy()!==-1)}var Ma={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Us(),s.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Di&&this.$el.appendChild(e),e.data="about:blank",Di||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Di&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const dy=s.withScopeId("data-v-b329ee4c");s.pushScopeId("data-v-b329ee4c");const fy={class:"resize-observer",tabindex:"-1"};s.popScopeId();const hy=dy((e,t,n,o,r,i)=>(s.openBlock(),s.createBlock("div",fy)));Ma.render=hy;Ma.__scopeId="data-v-b329ee4c";Ma.__file="src/components/ResizeObserver.vue";const bh=(e="theme")=>({computed:{themeClass(){return ny(this[e])}}}),py=s.defineComponent({name:"VPopperContent",components:{ResizeObserver:Ma},mixins:[bh()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),my=["id","aria-hidden","tabindex","data-popper-placement"],vy={ref:"inner",class:"v-popper__inner"},gy=s.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),yy=s.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),wy=[gy,yy];function by(e,t,n,o,r,i){const a=s.resolveComponent("ResizeObserver");return s.openBlock(),s.createElementBlock("div",{id:e.popperId,ref:"popover",class:s.normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:s.normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=s.withKeys(l=>e.autoHide&&e.$emit("hide"),["esc"]))},[s.createElementVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=l=>e.autoHide&&e.$emit("hide"))}),s.createElementVNode("div",{class:"v-popper__wrapper",style:s.normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[s.createElementVNode("div",vy,[e.mounted?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("div",null,[s.renderSlot(e.$slots,"default")]),e.handleResize?(s.openBlock(),s.createBlock(a,{key:0,onNotify:t[1]||(t[1]=l=>e.$emit("resize",l))})):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)],512),s.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:s.normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},wy,4)],4)],46,my)}const _h=$l(py,[["render",by]]),kh={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let Gs=function(){};typeof window<"u"&&(Gs=window.Element);const _y=s.defineComponent({name:"VPopperWrapper",components:{Popper:uy,PopperContent:_h},mixins:[kh,bh("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Gs,Boolean],default:void 0},boundary:{type:[String,Gs],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function ky(e,t,n,o,r,i){const a=s.resolveComponent("PopperContent"),l=s.resolveComponent("Popper");return s.openBlock(),s.createBlock(l,s.mergeProps({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=u=>e.$emit("update:shown",u)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:s.withCtx(({popperId:u,isShown:c,shouldMountContent:d,skipTransition:f,autoHide:h,show:p,hide:m,handleResize:v,onResize:w,classes:g,result:b})=>[s.renderSlot(e.$slots,"default",{shown:c,show:p,hide:m}),s.createVNode(a,{ref:"popperContent","popper-id":u,theme:e.finalTheme,shown:c,mounted:d,"skip-transition":f,"auto-hide":h,"handle-resize":v,classes:g,result:b,onHide:m,onResize:w},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"popper",{shown:c,hide:m})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const Pl=$l(_y,[["render",ky]]);({...Pl});({...Pl});({...Pl});s.defineComponent({name:"VTooltipDirective",components:{Popper:wh(),PopperContent:_h},mixins:[kh],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>js(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>js(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(o=>this.onResult(t,o)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});function xy(e,t){const n=s.computed(()=>({"!yu-font-plus":t.plus,"!yu-font-inter":t.inter,"!yu-font-titillium":t.titillium})),o=s.computed(()=>({"!yu-text-white":t.white,"!yu-text-primary":t.primary,"!yu-text-secondary":t.secondary,"!yu-text-base":t.neutral,"!yu-text-neutral":t.gray})),r=s.computed(()=>({"!yu-font-thin":t.thin,"!yu-font-extralight":t.extralight,"!yu-font-light":t.light,"!yu-font-normal":t.normal,"!yu-font-medium":t.medium,"!yu-font-semibold":t.semibold,"!yu-font-bold":t.bold,"!yu-font-extrabold":t.extrabold,"!yu-font-black":t.black})),i=s.computed(()=>({...{title:{"!yu-text-xl":t.small,"!yu-text-2xl":t.base,"!yu-text-3xl":t.large,"!yu-text-4xl":t.extralarge},subtitle:{"!yu-text-sm":t.small,"!yu-text-md":t.base,"!yu-text-xl":t.large},text:{"!yu-text-xs":t.small,"!yu-text-sm":t.base,"!yu-text-lg":t.large,"!yu-text-xl":t.extralarge}}[e]}));return{fontClass:n,colorClass:o,weightClass:r,sizeClass:i}}const Ey=s.defineComponent({__name:"text",props:{inter:{type:Boolean},titillium:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extralarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},white:{type:Boolean},neutral:{type:Boolean}},setup(e){const t=e,{fontClass:n,colorClass:o,weightClass:r,sizeClass:i}=xy("text",t);return(a,l)=>(s.openBlock(),s.createElementBlock("p",{class:s.normalizeClass(["yu-font-primary yu-text-sm yu-font-normal yu-gray-700",[s.unref(n),s.unref(o),s.unref(r),s.unref(i)]])},[s.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),Sy=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Nt=Sy(Ey,[["__scopeId","data-v-9eb46db3"]]),Dy=s.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(e){const t=e,n=s.computed(()=>t.small?"!yu-text-xs yu-w-4 yu-h-4":t.large?"!yu-text-2xl yu-w-8 yu-h-8":t.extraLarge?"!yu-text-4xl yu-w-10 yu-h-10":"!yu-text-base yu-w-6 yu-h-6"),o=s.computed(()=>t.dark?"yu-text-neutral-800 dark:yu-text-white":t.light?"yu-text-white dark:yu-text-neutral-800":t.gray?"yu-text-gray-500":""),r=s.computed(()=>t.outlined?"material-symbols-outlined":"material-icons");return(i,a)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["notranslate yu-flex yu-items-center yu-justify-center yu-text-center",[n.value,o.value,r.value]]),"data-testid":"app-icon"},[s.renderSlot(i.$slots,"default")],2))}}),Gi=s.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(e){const t=e,n=s.computed(()=>t.fit?"yu-w-fit yu-h-fit":t.full?"yu-w-full yu-h-full":""),o=s.computed(()=>t.justifyEnd?"yu-items-end yu-justify-end":t.center?"yu-items-center yu-justify-center":t.centerBetween?"yu-items-center yu-justify-between":""),r=s.computed(()=>t.row?"yu-flex-row":t.col?"yu-flex-col":"yu-flex-row"),i=s.computed(()=>t.gapBase?"yu-gap-4":t.gapXs?"yu-gap-1":t.gapSm?"yu-gap-2":t.gapMd?"yu-gap-6":t.gapLg?"yu-gap-8":t.gapNone?"yu-gap-0":"yu-gap-4"),a=s.computed(()=>t.wrap?"yu-flex-wrap":""),l=s.computed(()=>t.paddingXs?"yu-p-1":t.paddingSm?"yu-p-2":t.paddingBase?"yu-p-4":t.paddingMd?"yu-p-6":t.paddingLg?"yu-p-8":""),u=s.computed(()=>t.border?"yu-border":t.borderPrimary?"yu-border yu-border-primary":""),c=s.computed(()=>t.rounded?"yu-rounded-md":t.roundedTop?"yu-rounded-t-md":t.roundedBottom?"yu-rounded-b-md":""),d=s.computed(()=>t.bgPrimary?"yu-bg-primary":t.bgWhite?"yu-bg-white":""),f=s.computed(()=>t.divisor&&t.col?"yu-divide-y":t.divisor&&t.row?"yu-divide-x":""),h=s.computed(()=>[r.value,i.value,a.value,l.value,o.value,u.value,c.value,d.value,n.value,f.value]);return(p,m)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["yu-flex",h.value])},[s.renderSlot(p.$slots,"default")],2))}});function My(e){const t=s.computed(()=>e.small?"!yu-h-8 !yu-min-h-[2rem]":e.large?"!yu-h-12 !yu-min-h-[3rem]":"!yu-h-10 !yu-min-h-[2.5rem]"),n=s.computed(()=>e.small?"!yu-text-xs":e.large?"!yu-text-base":"!yu-text-sm"),o=s.computed(()=>e.fluid?"!yu-w-full":"yu-w-fit");return{height:t,textSize:n,width:o}}const Ny=["disabled"],qn=s.defineComponent({__name:"app-button",props:{small:Boolean,large:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},setup(e){const t=e,n=s.computed(()=>s.useSlots());function o(f){return!!n.value[f]}const{height:r,textSize:i,width:a}=My(t),l=s.computed(()=>t.soft?"yu-bg-primary-50 !yu-text-primary-400":t.alert?"yu-bg-red-500 !yu-text-white":t.warning?"yu-bg-amber-500 !yu-text-white":t.success?"yu-bg-green-500 !yu-text-white":t.outline?"yu-bg-transparent yu-border yu-border-gray-300 hover:!yu-bg-gray-100":t.ghost?"yu-bg-transparent hover:!yu-bg-gray-100":t.link?"yu-bg-transparent !yu-text-blue-600 hover:yu-underline":"yu-bg-primary-500 yu-text-white"),u=s.computed(()=>t.block?"yu-rounded-none":t.round?"yu-rounded-full":"yu-rounded-lg"),c=s.computed(()=>t.icon&&t.small?"!yu-w-8 !yu-h-8":t.icon&&t.large?"!yu-w-12 !yu-h-12":t.icon?"!yu-w-10 !yu-h-10":"yu-px-3"),d=s.computed(()=>t.disabled||t.loading?"yu-opacity-50 yu-pointer-events-none":"");return(f,h)=>(s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["yu-transition-all yu-inline-flex yu-items-center yu-justify-center yu-gap-x-2 active:yu-scale-90 hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80 disabled:yu-opacity-50 disabled:yu-pointer-events-none",[s.unref(i),l.value,u.value,s.unref(a),s.unref(r),d.value,c.value]]),disabled:d.value||e.loading},[!e.loading&&o("icon")?s.renderSlot(f.$slots,"icon",{key:0}):s.createCommentVNode("",!0),e.loading?(s.openBlock(),s.createBlock(Dy,{key:1,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:e.small,outlined:""},{default:s.withCtx(()=>[...h[0]||(h[0]=[s.createTextVNode("progress_activity",-1)])]),_:1},8,["small"])):s.createCommentVNode("",!0),o("default")?(s.openBlock(),s.createBlock(Nt,{key:2,medium:"",small:e.small,base:!e.small},{default:s.withCtx(()=>[s.renderSlot(f.$slots,"default")]),_:3},8,["small","base"])):s.createCommentVNode("",!0)],10,Ny))}});var Je="top",ut="bottom",ct="right",Qe="left",Bl="auto",Ur=[Je,ut,ct,Qe],Co="start",Nr="end",Cy="clippingParents",xh="viewport",er="popper",Oy="reference",kc=Ur.reduce(function(e,t){return e.concat([t+"-"+Co,t+"-"+Nr])},[]),Eh=[].concat(Ur,[Bl]).reduce(function(e,t){return e.concat([t,t+"-"+Co,t+"-"+Nr])},[]),Ty="beforeRead",$y="read",Py="afterRead",By="beforeMain",Yy="main",Ay="afterMain",Iy="beforeWrite",Vy="write",Ry="afterWrite",zy=[Ty,$y,Py,By,Yy,Ay,Iy,Vy,Ry];function zt(e){return e?(e.nodeName||"").toLowerCase():null}function tt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Kn(e){var t=tt(e).Element;return e instanceof t||e instanceof Element}function st(e){var t=tt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Yl(e){if(typeof ShadowRoot>"u")return!1;var t=tt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ly(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!st(i)||!zt(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(a){var l=r[a];l===!1?i.removeAttribute(a):i.setAttribute(a,l===!0?"":l)}))})}function Fy(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=a.reduce(function(u,c){return u[c]="",u},{});!st(r)||!zt(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(u){r.removeAttribute(u)}))})}}const Hy={name:"applyStyles",enabled:!0,phase:"write",fn:Ly,effect:Fy,requires:["computeStyles"]};function At(e){return e.split("-")[0]}var Un=Math.max,Zi=Math.min,Oo=Math.round;function Zs(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Sh(){return!/^((?!chrome|android).)*safari/i.test(Zs())}function To(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&st(e)&&(r=e.offsetWidth>0&&Oo(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Oo(o.height)/e.offsetHeight||1);var a=Kn(e)?tt(e):window,l=a.visualViewport,u=!Sh()&&n,c=(o.left+(u&&l?l.offsetLeft:0))/r,d=(o.top+(u&&l?l.offsetTop:0))/i,f=o.width/r,h=o.height/i;return{width:f,height:h,top:d,right:c+f,bottom:d+h,left:c,x:c,y:d}}function Al(e){var t=To(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Dh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Yl(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function an(e){return tt(e).getComputedStyle(e)}function jy(e){return["table","td","th"].indexOf(zt(e))>=0}function Bn(e){return((Kn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Na(e){return zt(e)==="html"?e:e.assignedSlot||e.parentNode||(Yl(e)?e.host:null)||Bn(e)}function xc(e){return!st(e)||an(e).position==="fixed"?null:e.offsetParent}function Wy(e){var t=/firefox/i.test(Zs()),n=/Trident/i.test(Zs());if(n&&st(e)){var o=an(e);if(o.position==="fixed")return null}var r=Na(e);for(Yl(r)&&(r=r.host);st(r)&&["html","body"].indexOf(zt(r))<0;){var i=an(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Gr(e){for(var t=tt(e),n=xc(e);n&&jy(n)&&an(n).position==="static";)n=xc(n);return n&&(zt(n)==="html"||zt(n)==="body"&&an(n).position==="static")?t:n||Wy(e)||t}function Il(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function yr(e,t,n){return Un(e,Zi(t,n))}function Uy(e,t,n){var o=yr(e,t,n);return o>n?n:o}function Mh(){return{top:0,right:0,bottom:0,left:0}}function Nh(e){return Object.assign({},Mh(),e)}function Ch(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var Gy=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Nh(typeof e!="number"?e:Ch(e,Ur))};function Zy(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=At(n.placement),u=Il(l),c=[Qe,ct].indexOf(l)>=0,d=c?"height":"width";if(!(!i||!a)){var f=Gy(r.padding,n),h=Al(i),p=u==="y"?Je:Qe,m=u==="y"?ut:ct,v=n.rects.reference[d]+n.rects.reference[u]-a[u]-n.rects.popper[d],w=a[u]-n.rects.reference[u],g=Gr(i),b=g?u==="y"?g.clientHeight||0:g.clientWidth||0:0,y=v/2-w/2,_=f[p],O=b-h[d]-f[m],B=b/2-h[d]/2+y,$=yr(_,B,O),C=u;n.modifiersData[o]=(t={},t[C]=$,t.centerOffset=$-B,t)}}function Xy(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||Dh(t.elements.popper,r)&&(t.elements.arrow=r))}const qy={name:"arrow",enabled:!0,phase:"main",fn:Zy,effect:Xy,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $o(e){return e.split("-")[1]}var Ky={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jy(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:Oo(n*r)/r||0,y:Oo(o*r)/r||0}}function Ec(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=a.x,p=h===void 0?0:h,m=a.y,v=m===void 0?0:m,w=typeof d=="function"?d({x:p,y:v}):{x:p,y:v};p=w.x,v=w.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=Qe,_=Je,O=window;if(c){var B=Gr(n),$="clientHeight",C="clientWidth";if(B===tt(n)&&(B=Bn(n),an(B).position!=="static"&&l==="absolute"&&($="scrollHeight",C="scrollWidth")),B=B,r===Je||(r===Qe||r===ct)&&i===Nr){_=ut;var V=f&&B===O&&O.visualViewport?O.visualViewport.height:B[$];v-=V-o.height,v*=u?1:-1}if(r===Qe||(r===Je||r===ut)&&i===Nr){y=ct;var L=f&&B===O&&O.visualViewport?O.visualViewport.width:B[C];p-=L-o.width,p*=u?1:-1}}var I=Object.assign({position:l},c&&Ky),x=d===!0?Jy({x:p,y:v},tt(n)):{x:p,y:v};if(p=x.x,v=x.y,u){var R;return Object.assign({},I,(R={},R[_]=b?"0":"",R[y]=g?"0":"",R.transform=(O.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",R))}return Object.assign({},I,(t={},t[_]=b?v+"px":"",t[y]=g?p+"px":"",t.transform="",t))}function Qy(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,i=n.adaptive,a=i===void 0?!0:i,l=n.roundOffsets,u=l===void 0?!0:l,c={placement:At(t.placement),variation:$o(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ec(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ec(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const e0={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Qy,data:{}};var ci={passive:!0};function t0(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0?!0:r,a=o.resize,l=a===void 0?!0:a,u=tt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",n.update,ci)}),l&&u.addEventListener("resize",n.update,ci),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",n.update,ci)}),l&&u.removeEventListener("resize",n.update,ci)}}const n0={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:t0,data:{}};var o0={left:"right",right:"left",bottom:"top",top:"bottom"};function Mi(e){return e.replace(/left|right|bottom|top/g,function(t){return o0[t]})}var r0={start:"end",end:"start"};function Sc(e){return e.replace(/start|end/g,function(t){return r0[t]})}function Vl(e){var t=tt(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function Rl(e){return To(Bn(e)).left+Vl(e).scrollLeft}function i0(e,t){var n=tt(e),o=Bn(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,l=0,u=0;if(r){i=r.width,a=r.height;var c=Sh();(c||!c&&t==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}return{width:i,height:a,x:l+Rl(e),y:u}}function a0(e){var t,n=Bn(e),o=Vl(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=Un(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Un(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+Rl(e),u=-o.scrollTop;return an(r||n).direction==="rtl"&&(l+=Un(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}function zl(e){var t=an(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function Oh(e){return["html","body","#document"].indexOf(zt(e))>=0?e.ownerDocument.body:st(e)&&zl(e)?e:Oh(Na(e))}function wr(e,t){var n;t===void 0&&(t=[]);var o=Oh(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=tt(o),a=r?[i].concat(i.visualViewport||[],zl(o)?o:[]):o,l=t.concat(a);return r?l:l.concat(wr(Na(a)))}function Xs(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function s0(e,t){var n=To(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Dc(e,t,n){return t===xh?Xs(i0(e,n)):Kn(t)?s0(t,n):Xs(a0(Bn(e)))}function l0(e){var t=wr(Na(e)),n=["absolute","fixed"].indexOf(an(e).position)>=0,o=n&&st(e)?Gr(e):e;return Kn(o)?t.filter(function(r){return Kn(r)&&Dh(r,o)&&zt(r)!=="body"}):[]}function u0(e,t,n,o){var r=t==="clippingParents"?l0(e):[].concat(t),i=[].concat(r,[n]),a=i[0],l=i.reduce(function(u,c){var d=Dc(e,c,o);return u.top=Un(d.top,u.top),u.right=Zi(d.right,u.right),u.bottom=Zi(d.bottom,u.bottom),u.left=Un(d.left,u.left),u},Dc(e,a,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Th(e){var t=e.reference,n=e.element,o=e.placement,r=o?At(o):null,i=o?$o(o):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(r){case Je:u={x:a,y:t.y-n.height};break;case ut:u={x:a,y:t.y+t.height};break;case ct:u={x:t.x+t.width,y:l};break;case Qe:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var c=r?Il(r):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case Co:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Nr:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function Cr(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,a=i===void 0?e.strategy:i,l=n.boundary,u=l===void 0?Cy:l,c=n.rootBoundary,d=c===void 0?xh:c,f=n.elementContext,h=f===void 0?er:f,p=n.altBoundary,m=p===void 0?!1:p,v=n.padding,w=v===void 0?0:v,g=Nh(typeof w!="number"?w:Ch(w,Ur)),b=h===er?Oy:er,y=e.rects.popper,_=e.elements[m?b:h],O=u0(Kn(_)?_:_.contextElement||Bn(e.elements.popper),u,d,a),B=To(e.elements.reference),$=Th({reference:B,element:y,placement:r}),C=Xs(Object.assign({},y,$)),V=h===er?C:B,L={top:O.top-V.top+g.top,bottom:V.bottom-O.bottom+g.bottom,left:O.left-V.left+g.left,right:V.right-O.right+g.right},I=e.modifiersData.offset;if(h===er&&I){var x=I[r];Object.keys(L).forEach(function(R){var k=[ct,ut].indexOf(R)>=0?1:-1,N=[Je,ut].indexOf(R)>=0?"y":"x";L[R]+=x[N]*k})}return L}function c0(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Eh:u,d=$o(o),f=d?l?kc:kc.filter(function(m){return $o(m)===d}):Ur,h=f.filter(function(m){return c.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,v){return m[v]=Cr(e,{placement:v,boundary:r,rootBoundary:i,padding:a})[At(v)],m},{});return Object.keys(p).sort(function(m,v){return p[m]-p[v]})}function d0(e){if(At(e)===Bl)return[];var t=Mi(e);return[Sc(e),t,Sc(t)]}function f0(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,v=n.allowedAutoPlacements,w=t.options.placement,g=At(w),b=g===w,y=u||(b||!m?[Mi(w)]:d0(w)),_=[w].concat(y).reduce(function(re,X){return re.concat(At(X)===Bl?c0(t,{placement:X,boundary:d,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:v}):X)},[]),O=t.rects.reference,B=t.rects.popper,$=new Map,C=!0,V=_[0],L=0;L<_.length;L++){var I=_[L],x=At(I),R=$o(I)===Co,k=[Je,ut].indexOf(x)>=0,N=k?"width":"height",D=Cr(t,{placement:I,boundary:d,rootBoundary:f,altBoundary:h,padding:c}),z=k?R?ct:Qe:R?ut:Je;O[N]>B[N]&&(z=Mi(z));var F=Mi(z),j=[];if(i&&j.push(D[x]<=0),l&&j.push(D[z]<=0,D[F]<=0),j.every(function(re){return re})){V=I,C=!1;break}$.set(I,j)}if(C)for(var Y=m?3:1,G=function(re){var X=_.find(function(q){var J=$.get(q);if(J)return J.slice(0,re).every(function(pe){return pe})});if(X)return V=X,"break"},W=Y;W>0;W--){var le=G(W);if(le==="break")break}t.placement!==V&&(t.modifiersData[o]._skip=!0,t.placement=V,t.reset=!0)}}const h0={name:"flip",enabled:!0,phase:"main",fn:f0,requiresIfExists:["offset"],data:{_skip:!1}};function Mc(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Nc(e){return[Je,ct,ut,Qe].some(function(t){return e[t]>=0})}function p0(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=Cr(t,{elementContext:"reference"}),l=Cr(t,{altBoundary:!0}),u=Mc(a,o),c=Mc(l,r,i),d=Nc(u),f=Nc(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const m0={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:p0};function v0(e,t,n){var o=At(e),r=[Qe,Je].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*r,[Qe,ct].indexOf(o)>=0?{x:l,y:a}:{x:a,y:l}}function g0(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,a=Eh.reduce(function(d,f){return d[f]=v0(f,t.rects,i),d},{}),l=a[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=a}const y0={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:g0};function w0(e){var t=e.state,n=e.name;t.modifiersData[n]=Th({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const b0={name:"popperOffsets",enabled:!0,phase:"read",fn:w0,data:{}};function _0(e){return e==="x"?"y":"x"}function k0(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,v=m===void 0?0:m,w=Cr(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),g=At(t.placement),b=$o(t.placement),y=!b,_=Il(g),O=_0(_),B=t.modifiersData.popperOffsets,$=t.rects.reference,C=t.rects.popper,V=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,L=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(B){if(i){var R,k=_==="y"?Je:Qe,N=_==="y"?ut:ct,D=_==="y"?"height":"width",z=B[_],F=z+w[k],j=z-w[N],Y=p?-C[D]/2:0,G=b===Co?$[D]:C[D],W=b===Co?-C[D]:-$[D],le=t.elements.arrow,re=p&&le?Al(le):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Mh(),q=X[k],J=X[N],pe=yr(0,$[D],re[D]),we=y?$[D]/2-Y-pe-q-L.mainAxis:G-pe-q-L.mainAxis,me=y?-$[D]/2+Y+pe+J+L.mainAxis:W+pe+J+L.mainAxis,ge=t.elements.arrow&&Gr(t.elements.arrow),ue=ge?_==="y"?ge.clientTop||0:ge.clientLeft||0:0,ce=(R=I?.[_])!=null?R:0,M=z+we-ce-ue,E=z+me-ce,T=yr(p?Zi(F,M):F,z,p?Un(j,E):j);B[_]=T,x[_]=T-z}if(l){var A,P=_==="x"?Je:Qe,Q=_==="x"?ut:ct,K=B[O],ae=O==="y"?"height":"width",oe=K+w[P],de=K-w[Q],ve=[Je,Qe].indexOf(g)!==-1,be=(A=I?.[O])!=null?A:0,Fe=ve?oe:K-$[ae]-C[ae]-be+L.altAxis,Le=ve?K+$[ae]+C[ae]-be-L.altAxis:de,mn=p&&ve?Uy(Fe,K,Le):yr(p?Fe:oe,K,p?Le:de);B[O]=mn,x[O]=mn-K}t.modifiersData[o]=x}}const x0={name:"preventOverflow",enabled:!0,phase:"main",fn:k0,requiresIfExists:["offset"]};function E0(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function S0(e){return e===tt(e)||!st(e)?Vl(e):E0(e)}function D0(e){var t=e.getBoundingClientRect(),n=Oo(t.width)/e.offsetWidth||1,o=Oo(t.height)/e.offsetHeight||1;return n!==1||o!==1}function M0(e,t,n){n===void 0&&(n=!1);var o=st(t),r=st(t)&&D0(t),i=Bn(t),a=To(e,r,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&((zt(t)!=="body"||zl(i))&&(l=S0(t)),st(t)?(u=To(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=Rl(i))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function N0(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&r(u)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),o}function C0(e){var t=N0(e);return zy.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function O0(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function T0(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var Cc={placement:"bottom",modifiers:[],strategy:"absolute"};function Oc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function $0(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?Cc:r;return function(a,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Cc,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:c,setOptions:function(v){var w=typeof v=="function"?v(c.options):v;m(),c.options=Object.assign({},i,c.options,w),c.scrollParents={reference:Kn(a)?wr(a):a.contextElement?wr(a.contextElement):[],popper:wr(l)};var g=C0(T0([].concat(o,c.options.modifiers)));return c.orderedModifiers=g.filter(function(b){return b.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var v=c.elements,w=v.reference,g=v.popper;if(Oc(w,g)){c.rects={reference:M0(w,Gr(g),c.options.strategy==="fixed"),popper:Al(g)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(C){return c.modifiersData[C.name]=Object.assign({},C.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var y=c.orderedModifiers[b],_=y.fn,O=y.options,B=O===void 0?{}:O,$=y.name;typeof _=="function"&&(c=_({state:c,options:B,name:$,instance:h})||c)}}}},update:O0(function(){return new Promise(function(v){h.forceUpdate(),v(c)})}),destroy:function(){m(),f=!0}};if(!Oc(a,l))return h;h.setOptions(u).then(function(v){!f&&u.onFirstUpdate&&u.onFirstUpdate(v)});function p(){c.orderedModifiers.forEach(function(v){var w=v.name,g=v.options,b=g===void 0?{}:g,y=v.effect;if(typeof y=="function"){var _=y({state:c,name:w,instance:h,options:b}),O=function(){};d.push(_||O)}})}function m(){d.forEach(function(v){return v()}),d=[]}return h}}var P0=[n0,b0,e0,Hy,y0,h0,x0,qy,m0],B0=$0({defaultModifiers:P0}),Y0=Object.defineProperty,A0=(e,t,n)=>t in e?Y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fe=(e,t,n)=>(A0(e,typeof t!="symbol"?t+"":t,n),n),di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I0=Object.prototype,V0=I0.hasOwnProperty;function R0(e,t){return e!=null&&V0.call(e,t)}var z0=R0,L0=Array.isArray,_t=L0,F0=typeof di=="object"&&di&&di.Object===Object&&di,Ph=F0,H0=Ph,j0=typeof self=="object"&&self&&self.Object===Object&&self,W0=H0||j0||Function("return this")(),Ft=W0,U0=Ft,G0=U0.Symbol,Ca=G0,Tc=Ca,Bh=Object.prototype,Z0=Bh.hasOwnProperty,X0=Bh.toString,tr=Tc?Tc.toStringTag:void 0;function q0(e){var t=Z0.call(e,tr),n=e[tr];try{e[tr]=void 0;var o=!0}catch{}var r=X0.call(e);return o&&(t?e[tr]=n:delete e[tr]),r}var K0=q0,J0=Object.prototype,Q0=J0.toString;function ew(e){return Q0.call(e)}var tw=ew,$c=Ca,nw=K0,ow=tw,rw="[object Null]",iw="[object Undefined]",Pc=$c?$c.toStringTag:void 0;function aw(e){return e==null?e===void 0?iw:rw:Pc&&Pc in Object(e)?nw(e):ow(e)}var Ht=aw;function sw(e){return e!=null&&typeof e=="object"}var kt=sw,lw=Ht,uw=kt,cw="[object Symbol]";function dw(e){return typeof e=="symbol"||uw(e)&&lw(e)==cw}var Ll=dw,fw=_t,hw=Ll,pw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mw=/^\w*$/;function vw(e,t){if(fw(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||hw(e)?!0:mw.test(e)||!pw.test(e)||t!=null&&e in Object(t)}var Fl=vw;function gw(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dn=gw,yw=Ht,ww=dn,bw="[object AsyncFunction]",_w="[object Function]",kw="[object GeneratorFunction]",xw="[object Proxy]";function Ew(e){if(!ww(e))return!1;var t=yw(e);return t==_w||t==kw||t==bw||t==xw}var ro=Ew,Sw=Ft,Dw=Sw["__core-js_shared__"],Mw=Dw,hs=Mw,Bc=(function(){var e=/[^.]+$/.exec(hs&&hs.keys&&hs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Nw(e){return!!Bc&&Bc in e}var Cw=Nw,Ow=Function.prototype,Tw=Ow.toString;function $w(e){if(e!=null){try{return Tw.call(e)}catch{}try{return e+""}catch{}}return""}var Yh=$w,Pw=ro,Bw=Cw,Yw=dn,Aw=Yh,Iw=/[\\^$.*+?()[\]{}|]/g,Vw=/^\[object .+?Constructor\]$/,Rw=Function.prototype,zw=Object.prototype,Lw=Rw.toString,Fw=zw.hasOwnProperty,Hw=RegExp("^"+Lw.call(Fw).replace(Iw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jw(e){if(!Yw(e)||Bw(e))return!1;var t=Pw(e)?Hw:Vw;return t.test(Aw(e))}var Ww=jw;function Uw(e,t){return e?.[t]}var Gw=Uw,Zw=Ww,Xw=Gw;function qw(e,t){var n=Xw(e,t);return Zw(n)?n:void 0}var io=qw,Kw=io,Jw=Kw(Object,"create"),Oa=Jw,Yc=Oa;function Qw(){this.__data__=Yc?Yc(null):{},this.size=0}var eb=Qw;function tb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nb=tb,ob=Oa,rb="__lodash_hash_undefined__",ib=Object.prototype,ab=ib.hasOwnProperty;function sb(e){var t=this.__data__;if(ob){var n=t[e];return n===rb?void 0:n}return ab.call(t,e)?t[e]:void 0}var lb=sb,ub=Oa,cb=Object.prototype,db=cb.hasOwnProperty;function fb(e){var t=this.__data__;return ub?t[e]!==void 0:db.call(t,e)}var hb=fb,pb=Oa,mb="__lodash_hash_undefined__";function vb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pb&&t===void 0?mb:t,this}var gb=vb,yb=eb,wb=nb,bb=lb,_b=hb,kb=gb;function zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}zo.prototype.clear=yb;zo.prototype.delete=wb;zo.prototype.get=bb;zo.prototype.has=_b;zo.prototype.set=kb;var xb=zo;function Eb(){this.__data__=[],this.size=0}var Sb=Eb;function Db(e,t){return e===t||e!==e&&t!==t}var Lo=Db,Mb=Lo;function Nb(e,t){for(var n=e.length;n--;)if(Mb(e[n][0],t))return n;return-1}var Ta=Nb,Cb=Ta,Ob=Array.prototype,Tb=Ob.splice;function $b(e){var t=this.__data__,n=Cb(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Tb.call(t,n,1),--this.size,!0}var Pb=$b,Bb=Ta;function Yb(e){var t=this.__data__,n=Bb(t,e);return n<0?void 0:t[n][1]}var Ab=Yb,Ib=Ta;function Vb(e){return Ib(this.__data__,e)>-1}var Rb=Vb,zb=Ta;function Lb(e,t){var n=this.__data__,o=zb(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Fb=Lb,Hb=Sb,jb=Pb,Wb=Ab,Ub=Rb,Gb=Fb;function Fo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Fo.prototype.clear=Hb;Fo.prototype.delete=jb;Fo.prototype.get=Wb;Fo.prototype.has=Ub;Fo.prototype.set=Gb;var $a=Fo,Zb=io,Xb=Ft,qb=Zb(Xb,"Map"),Hl=qb,Ac=xb,Kb=$a,Jb=Hl;function Qb(){this.size=0,this.__data__={hash:new Ac,map:new(Jb||Kb),string:new Ac}}var e_=Qb;function t_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var n_=t_,o_=n_;function r_(e,t){var n=e.__data__;return o_(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Pa=r_,i_=Pa;function a_(e){var t=i_(this,e).delete(e);return this.size-=t?1:0,t}var s_=a_,l_=Pa;function u_(e){return l_(this,e).get(e)}var c_=u_,d_=Pa;function f_(e){return d_(this,e).has(e)}var h_=f_,p_=Pa;function m_(e,t){var n=p_(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var v_=m_,g_=e_,y_=s_,w_=c_,b_=h_,__=v_;function Ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ho.prototype.clear=g_;Ho.prototype.delete=y_;Ho.prototype.get=w_;Ho.prototype.has=b_;Ho.prototype.set=__;var jl=Ho,Ah=jl,k_="Expected a function";function Wl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(k_);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var a=e.apply(this,o);return n.cache=i.set(r,a)||i,a};return n.cache=new(Wl.Cache||Ah),n}Wl.Cache=Ah;var x_=Wl,E_=x_,S_=500;function D_(e){var t=E_(e,function(o){return n.size===S_&&n.clear(),o}),n=t.cache;return t}var M_=D_,N_=M_,C_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,O_=/\\(\\)?/g,T_=N_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(C_,function(n,o,r,i){t.push(r?i.replace(O_,"$1"):o||n)}),t}),$_=T_;function P_(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}var B_=P_,Ic=Ca,Y_=B_,A_=_t,I_=Ll,Vc=Ic?Ic.prototype:void 0,Rc=Vc?Vc.toString:void 0;function Ih(e){if(typeof e=="string")return e;if(A_(e))return Y_(e,Ih)+"";if(I_(e))return Rc?Rc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var V_=Ih,R_=V_;function z_(e){return e==null?"":R_(e)}var L_=z_,F_=_t,H_=Fl,j_=$_,W_=L_;function U_(e,t){return F_(e)?e:H_(e,t)?[e]:j_(W_(e))}var Vh=U_,G_=Ht,Z_=kt,X_="[object Arguments]";function q_(e){return Z_(e)&&G_(e)==X_}var K_=q_,zc=K_,J_=kt,Rh=Object.prototype,Q_=Rh.hasOwnProperty,e1=Rh.propertyIsEnumerable,t1=zc((function(){return arguments})())?zc:function(e){return J_(e)&&Q_.call(e,"callee")&&!e1.call(e,"callee")},Ul=t1,n1=9007199254740991,o1=/^(?:0|[1-9]\d*)$/;function r1(e,t){var n=typeof e;return t=t??n1,!!t&&(n=="number"||n!="symbol"&&o1.test(e))&&e>-1&&e%1==0&&e<t}var Gl=r1,i1=9007199254740991;function a1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=i1}var Zl=a1,s1=Ll;function l1(e){if(typeof e=="string"||s1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ba=l1,u1=Vh,c1=Ul,d1=_t,f1=Gl,h1=Zl,p1=Ba;function m1(e,t,n){t=u1(t,e);for(var o=-1,r=t.length,i=!1;++o<r;){var a=p1(t[o]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++o!=r?i:(r=e==null?0:e.length,!!r&&h1(r)&&f1(a,r)&&(d1(e)||c1(e)))}var zh=m1,v1=z0,g1=zh;function y1(e,t){return e!=null&&g1(e,t,v1)}var Lh=y1,w1=Ht,b1=kt,_1="[object Date]";function k1(e){return b1(e)&&w1(e)==_1}var x1=k1;function E1(e){return function(t){return e(t)}}var Fh=E1,Or={},S1={get exports(){return Or},set exports(e){Or=e}};(function(e,t){var n=Ph,o=t&&!t.nodeType&&t,r=o&&!0&&e&&!e.nodeType&&e,i=r&&r.exports===o,a=i&&n.process,l=(function(){try{var u=r&&r.require&&r.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}})();e.exports=l})(S1,Or);var D1=x1,M1=Fh,Lc=Or,Fc=Lc&&Lc.isDate,N1=Fc?M1(Fc):D1,C1=N1,O1=Ht,T1=_t,$1=kt,P1="[object String]";function B1(e){return typeof e=="string"||!T1(e)&&$1(e)&&O1(e)==P1}var Tt=B1;function Y1(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var Hh=Y1,A1=$a;function I1(){this.__data__=new A1,this.size=0}var V1=I1;function R1(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var z1=R1;function L1(e){return this.__data__.get(e)}var F1=L1;function H1(e){return this.__data__.has(e)}var j1=H1,W1=$a,U1=Hl,G1=jl,Z1=200;function X1(e,t){var n=this.__data__;if(n instanceof W1){var o=n.__data__;if(!U1||o.length<Z1-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new G1(o)}return n.set(e,t),this.size=n.size,this}var q1=X1,K1=$a,J1=V1,Q1=z1,ek=F1,tk=j1,nk=q1;function jo(e){var t=this.__data__=new K1(e);this.size=t.size}jo.prototype.clear=J1;jo.prototype.delete=Q1;jo.prototype.get=ek;jo.prototype.has=tk;jo.prototype.set=nk;var Xl=jo,ok="__lodash_hash_undefined__";function rk(e){return this.__data__.set(e,ok),this}var ik=rk;function ak(e){return this.__data__.has(e)}var sk=ak,lk=jl,uk=ik,ck=sk;function Xi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new lk;++t<n;)this.add(e[t])}Xi.prototype.add=Xi.prototype.push=uk;Xi.prototype.has=ck;var dk=Xi;function fk(e,t){return e.has(t)}var hk=fk,pk=dk,mk=Hh,vk=hk,gk=1,yk=2;function wk(e,t,n,o,r,i){var a=n&gk,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=n&yk?new pk:void 0;for(i.set(e,t),i.set(t,e);++f<l;){var m=e[f],v=t[f];if(o)var w=a?o(v,m,f,t,e,i):o(m,v,f,e,t,i);if(w!==void 0){if(w)continue;h=!1;break}if(p){if(!mk(t,function(g,b){if(!vk(p,b)&&(m===g||r(m,g,n,o,i)))return p.push(b)})){h=!1;break}}else if(!(m===v||r(m,v,n,o,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var jh=wk,bk=Ft,_k=bk.Uint8Array,Wh=_k;function kk(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}var xk=kk;function Ek(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var Sk=Ek,Hc=Ca,jc=Wh,Dk=Lo,Mk=jh,Nk=xk,Ck=Sk,Ok=1,Tk=2,$k="[object Boolean]",Pk="[object Date]",Bk="[object Error]",Yk="[object Map]",Ak="[object Number]",Ik="[object RegExp]",Vk="[object Set]",Rk="[object String]",zk="[object Symbol]",Lk="[object ArrayBuffer]",Fk="[object DataView]",Wc=Hc?Hc.prototype:void 0,ps=Wc?Wc.valueOf:void 0;function Hk(e,t,n,o,r,i,a){switch(n){case Fk:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lk:return!(e.byteLength!=t.byteLength||!i(new jc(e),new jc(t)));case $k:case Pk:case Ak:return Dk(+e,+t);case Bk:return e.name==t.name&&e.message==t.message;case Ik:case Rk:return e==t+"";case Yk:var l=Nk;case Vk:var u=o&Ok;if(l||(l=Ck),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;o|=Tk,a.set(e,t);var d=Mk(l(e),l(t),o,r,i,a);return a.delete(e),d;case zk:if(ps)return ps.call(e)==ps.call(t)}return!1}var jk=Hk;function Wk(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}var Uk=Wk,Gk=Uk,Zk=_t;function Xk(e,t,n){var o=t(e);return Zk(e)?o:Gk(o,n(e))}var qk=Xk;function Kk(e,t){for(var n=-1,o=e==null?0:e.length,r=0,i=[];++n<o;){var a=e[n];t(a,n,e)&&(i[r++]=a)}return i}var Jk=Kk;function Qk(){return[]}var ex=Qk,tx=Jk,nx=ex,ox=Object.prototype,rx=ox.propertyIsEnumerable,Uc=Object.getOwnPropertySymbols,ix=Uc?function(e){return e==null?[]:(e=Object(e),tx(Uc(e),function(t){return rx.call(e,t)}))}:nx,ax=ix;function sx(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var lx=sx,Po={},ux={get exports(){return Po},set exports(e){Po=e}};function cx(){return!1}var dx=cx;(function(e,t){var n=Ft,o=dx,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||o;e.exports=c})(ux,Po);var fx=Ht,hx=Zl,px=kt,mx="[object Arguments]",vx="[object Array]",gx="[object Boolean]",yx="[object Date]",wx="[object Error]",bx="[object Function]",_x="[object Map]",kx="[object Number]",xx="[object Object]",Ex="[object RegExp]",Sx="[object Set]",Dx="[object String]",Mx="[object WeakMap]",Nx="[object ArrayBuffer]",Cx="[object DataView]",Ox="[object Float32Array]",Tx="[object Float64Array]",$x="[object Int8Array]",Px="[object Int16Array]",Bx="[object Int32Array]",Yx="[object Uint8Array]",Ax="[object Uint8ClampedArray]",Ix="[object Uint16Array]",Vx="[object Uint32Array]",Oe={};Oe[Ox]=Oe[Tx]=Oe[$x]=Oe[Px]=Oe[Bx]=Oe[Yx]=Oe[Ax]=Oe[Ix]=Oe[Vx]=!0;Oe[mx]=Oe[vx]=Oe[Nx]=Oe[gx]=Oe[Cx]=Oe[yx]=Oe[wx]=Oe[bx]=Oe[_x]=Oe[kx]=Oe[xx]=Oe[Ex]=Oe[Sx]=Oe[Dx]=Oe[Mx]=!1;function Rx(e){return px(e)&&hx(e.length)&&!!Oe[fx(e)]}var zx=Rx,Lx=zx,Fx=Fh,Gc=Or,Zc=Gc&&Gc.isTypedArray,Hx=Zc?Fx(Zc):Lx,ql=Hx,jx=lx,Wx=Ul,Ux=_t,Gx=Po,Zx=Gl,Xx=ql,qx=Object.prototype,Kx=qx.hasOwnProperty;function Jx(e,t){var n=Ux(e),o=!n&&Wx(e),r=!n&&!o&&Gx(e),i=!n&&!o&&!r&&Xx(e),a=n||o||r||i,l=a?jx(e.length,String):[],u=l.length;for(var c in e)(t||Kx.call(e,c))&&!(a&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zx(c,u)))&&l.push(c);return l}var Uh=Jx,Qx=Object.prototype;function eE(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qx;return e===n}var Kl=eE;function tE(e,t){return function(n){return e(t(n))}}var Gh=tE,nE=Gh,oE=nE(Object.keys,Object),rE=oE,iE=Kl,aE=rE,sE=Object.prototype,lE=sE.hasOwnProperty;function uE(e){if(!iE(e))return aE(e);var t=[];for(var n in Object(e))lE.call(e,n)&&n!="constructor"&&t.push(n);return t}var cE=uE,dE=ro,fE=Zl;function hE(e){return e!=null&&fE(e.length)&&!dE(e)}var Zr=hE,pE=Uh,mE=cE,vE=Zr;function gE(e){return vE(e)?pE(e):mE(e)}var Jl=gE,yE=qk,wE=ax,bE=Jl;function _E(e){return yE(e,bE,wE)}var kE=_E,Xc=kE,xE=1,EE=Object.prototype,SE=EE.hasOwnProperty;function DE(e,t,n,o,r,i){var a=n&xE,l=Xc(e),u=l.length,c=Xc(t),d=c.length;if(u!=d&&!a)return!1;for(var f=u;f--;){var h=l[f];if(!(a?h in t:SE.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var v=!0;i.set(e,t),i.set(t,e);for(var w=a;++f<u;){h=l[f];var g=e[h],b=t[h];if(o)var y=a?o(b,g,h,t,e,i):o(g,b,h,e,t,i);if(!(y===void 0?g===b||r(g,b,n,o,i):y)){v=!1;break}w||(w=h=="constructor")}if(v&&!w){var _=e.constructor,O=t.constructor;_!=O&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof O=="function"&&O instanceof O)&&(v=!1)}return i.delete(e),i.delete(t),v}var ME=DE,NE=io,CE=Ft,OE=NE(CE,"DataView"),TE=OE,$E=io,PE=Ft,BE=$E(PE,"Promise"),YE=BE,AE=io,IE=Ft,VE=AE(IE,"Set"),RE=VE,zE=io,LE=Ft,FE=zE(LE,"WeakMap"),HE=FE,qs=TE,Ks=Hl,Js=YE,Qs=RE,el=HE,Zh=Ht,Wo=Yh,qc="[object Map]",jE="[object Object]",Kc="[object Promise]",Jc="[object Set]",Qc="[object WeakMap]",ed="[object DataView]",WE=Wo(qs),UE=Wo(Ks),GE=Wo(Js),ZE=Wo(Qs),XE=Wo(el),Rn=Zh;(qs&&Rn(new qs(new ArrayBuffer(1)))!=ed||Ks&&Rn(new Ks)!=qc||Js&&Rn(Js.resolve())!=Kc||Qs&&Rn(new Qs)!=Jc||el&&Rn(new el)!=Qc)&&(Rn=function(e){var t=Zh(e),n=t==jE?e.constructor:void 0,o=n?Wo(n):"";if(o)switch(o){case WE:return ed;case UE:return qc;case GE:return Kc;case ZE:return Jc;case XE:return Qc}return t});var qE=Rn,ms=Xl,KE=jh,JE=jk,QE=ME,td=qE,nd=_t,od=Po,eS=ql,tS=1,rd="[object Arguments]",id="[object Array]",fi="[object Object]",nS=Object.prototype,ad=nS.hasOwnProperty;function oS(e,t,n,o,r,i){var a=nd(e),l=nd(t),u=a?id:td(e),c=l?id:td(t);u=u==rd?fi:u,c=c==rd?fi:c;var d=u==fi,f=c==fi,h=u==c;if(h&&od(e)){if(!od(t))return!1;a=!0,d=!1}if(h&&!d)return i||(i=new ms),a||eS(e)?KE(e,t,n,o,r,i):JE(e,t,u,n,o,r,i);if(!(n&tS)){var p=d&&ad.call(e,"__wrapped__"),m=f&&ad.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,w=m?t.value():t;return i||(i=new ms),r(v,w,n,o,i)}}return h?(i||(i=new ms),QE(e,t,n,o,r,i)):!1}var rS=oS,iS=rS,sd=kt;function Xh(e,t,n,o,r){return e===t?!0:e==null||t==null||!sd(e)&&!sd(t)?e!==e&&t!==t:iS(e,t,n,o,Xh,r)}var qh=Xh,aS=Xl,sS=qh,lS=1,uS=2;function cS(e,t,n,o){var r=n.length,i=r,a=!o;if(e==null)return!i;for(e=Object(e);r--;){var l=n[r];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<i;){l=n[r];var u=l[0],c=e[u],d=l[1];if(a&&l[2]){if(c===void 0&&!(u in e))return!1}else{var f=new aS;if(o)var h=o(c,d,u,e,t,f);if(!(h===void 0?sS(d,c,lS|uS,o,f):h))return!1}}return!0}var dS=cS,fS=dn;function hS(e){return e===e&&!fS(e)}var Kh=hS,pS=Kh,mS=Jl;function vS(e){for(var t=mS(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,pS(r)]}return t}var gS=vS;function yS(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Jh=yS,wS=dS,bS=gS,_S=Jh;function kS(e){var t=bS(e);return t.length==1&&t[0][2]?_S(t[0][0],t[0][1]):function(n){return n===e||wS(n,e,t)}}var xS=kS,ES=Vh,SS=Ba;function DS(e,t){t=ES(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[SS(t[n++])];return n&&n==o?e:void 0}var Qh=DS,MS=Qh;function NS(e,t,n){var o=e==null?void 0:MS(e,t);return o===void 0?n:o}var Fn=NS;function CS(e,t){return e!=null&&t in Object(e)}var OS=CS,TS=OS,$S=zh;function PS(e,t){return e!=null&&$S(e,t,TS)}var BS=PS,YS=qh,AS=Fn,IS=BS,VS=Fl,RS=Kh,zS=Jh,LS=Ba,FS=1,HS=2;function jS(e,t){return VS(e)&&RS(t)?zS(LS(e),t):function(n){var o=AS(n,e);return o===void 0&&o===t?IS(n,e):YS(t,o,FS|HS)}}var WS=jS;function US(e){return e}var Ql=US;function GS(e){return function(t){return t?.[e]}}var ZS=GS,XS=Qh;function qS(e){return function(t){return XS(t,e)}}var KS=qS,JS=ZS,QS=KS,eD=Fl,tD=Ba;function nD(e){return eD(e)?JS(tD(e)):QS(e)}var oD=nD,rD=xS,iD=WS,aD=Ql,sD=_t,lD=oD;function uD(e){return typeof e=="function"?e:e==null?aD:typeof e=="object"?sD(e)?iD(e[0],e[1]):rD(e):lD(e)}var ep=uD;function cD(e){return function(t,n,o){for(var r=-1,i=Object(t),a=o(t),l=a.length;l--;){var u=a[e?l:++r];if(n(i[u],u,i)===!1)break}return t}}var dD=cD,fD=dD,hD=fD(),tp=hD,pD=tp,mD=Jl;function vD(e,t){return e&&pD(e,t,mD)}var np=vD,gD=Zr;function yD(e,t){return function(n,o){if(n==null)return n;if(!gD(n))return e(n,o);for(var r=n.length,i=t?r:-1,a=Object(n);(t?i--:++i<r)&&o(a[i],i,a)!==!1;);return n}}var wD=yD,bD=np,_D=wD,kD=_D(bD),xD=kD,ED=xD;function SD(e,t){var n;return ED(e,function(o,r,i){return n=t(o,r,i),!n}),!!n}var DD=SD,MD=Lo,ND=Zr,CD=Gl,OD=dn;function TD(e,t,n){if(!OD(n))return!1;var o=typeof t;return(o=="number"?ND(n)&&CD(t,n.length):o=="string"&&t in n)?MD(n[t],e):!1}var eu=TD,$D=Hh,PD=ep,BD=DD,YD=_t,AD=eu;function ID(e,t,n){var o=YD(e)?$D:BD;return n&&AD(e,t,n)&&(t=void 0),o(e,PD(t))}var VD=ID,RD=Ht,zD=kt,LD="[object Boolean]";function FD(e){return e===!0||e===!1||zD(e)&&RD(e)==LD}var HD=FD,jD=Ht,WD=kt,UD="[object Number]";function GD(e){return typeof e=="number"||WD(e)&&jD(e)==UD}var yt=GD,ZD=io,XD=(function(){try{var e=ZD(Object,"defineProperty");return e({},"",{}),e}catch{}})(),op=XD,ld=op;function qD(e,t,n){t=="__proto__"&&ld?ld(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ya=qD,KD=Ya,JD=Lo,QD=Object.prototype,eM=QD.hasOwnProperty;function tM(e,t,n){var o=e[t];(!(eM.call(e,t)&&JD(o,n))||n===void 0&&!(t in e))&&KD(e,t,n)}var nM=tM,oM=Ya,rM=np,iM=ep;function aM(e,t){var n={};return t=iM(t),rM(e,function(o,r,i){oM(n,r,t(o,r,i))}),n}var sM=aM;function lM(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)}var rp=lM,uM=rp,ud=Math.max;function cM(e,t,n){return t=ud(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=ud(o.length-t,0),a=Array(i);++r<i;)a[r]=o[t+r];r=-1;for(var l=Array(t+1);++r<t;)l[r]=o[r];return l[t]=n(a),uM(e,this,l)}}var dM=cM;function fM(e){return function(){return e}}var hM=fM,pM=hM,cd=op,mM=Ql,vM=cd?function(e,t){return cd(e,"toString",{configurable:!0,enumerable:!1,value:pM(t),writable:!0})}:mM,gM=vM,yM=800,wM=16,bM=Date.now;function _M(e){var t=0,n=0;return function(){var o=bM(),r=wM-(o-n);if(n=o,r>0){if(++t>=yM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var kM=_M,xM=gM,EM=kM,SM=EM(xM),DM=SM,MM=Ql,NM=dM,CM=DM;function OM(e,t){return CM(NM(e,t,MM),e+"")}var tu=OM;function TM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var $M=TM,PM=dn,BM=Kl,YM=$M,AM=Object.prototype,IM=AM.hasOwnProperty;function VM(e){if(!PM(e))return YM(e);var t=BM(e),n=[];for(var o in e)o=="constructor"&&(t||!IM.call(e,o))||n.push(o);return n}var RM=VM,zM=Uh,LM=RM,FM=Zr;function HM(e){return FM(e)?zM(e,!0):LM(e)}var nu=HM,jM=tu,WM=Lo,UM=eu,GM=nu,ip=Object.prototype,ZM=ip.hasOwnProperty,XM=jM(function(e,t){e=Object(e);var n=-1,o=t.length,r=o>2?t[2]:void 0;for(r&&UM(t[0],t[1],r)&&(o=1);++n<o;)for(var i=t[n],a=GM(i),l=-1,u=a.length;++l<u;){var c=a[l],d=e[c];(d===void 0||WM(d,ip[c])&&!ZM.call(e,c))&&(e[c]=i[c])}return e}),dd=XM,qM=Ya,KM=Lo;function JM(e,t,n){(n!==void 0&&!KM(e[t],n)||n===void 0&&!(t in e))&&qM(e,t,n)}var ap=JM,qi={},QM={get exports(){return qi},set exports(e){qi=e}};(function(e,t){var n=Ft,o=t&&!t.nodeType&&t,r=o&&!0&&e&&!e.nodeType&&e,i=r&&r.exports===o,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var f=c.length,h=l?l(f):new c.constructor(f);return c.copy(h),h}e.exports=u})(QM,qi);var fd=Wh;function eN(e){var t=new e.constructor(e.byteLength);return new fd(t).set(new fd(e)),t}var tN=eN,nN=tN;function oN(e,t){var n=t?nN(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var rN=oN;function iN(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var aN=iN,sN=dn,hd=Object.create,lN=(function(){function e(){}return function(t){if(!sN(t))return{};if(hd)return hd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})(),uN=lN,cN=Gh,dN=cN(Object.getPrototypeOf,Object),sp=dN,fN=uN,hN=sp,pN=Kl;function mN(e){return typeof e.constructor=="function"&&!pN(e)?fN(hN(e)):{}}var vN=mN,gN=Zr,yN=kt;function wN(e){return yN(e)&&gN(e)}var bN=wN,_N=Ht,kN=sp,xN=kt,EN="[object Object]",SN=Function.prototype,DN=Object.prototype,lp=SN.toString,MN=DN.hasOwnProperty,NN=lp.call(Object);function CN(e){if(!xN(e)||_N(e)!=EN)return!1;var t=kN(e);if(t===null)return!0;var n=MN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&lp.call(n)==NN}var ON=CN;function TN(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var up=TN,$N=nM,PN=Ya;function BN(e,t,n,o){var r=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=o?o(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),r?PN(n,l,u):$N(n,l,u)}return n}var YN=BN,AN=YN,IN=nu;function VN(e){return AN(e,IN(e))}var RN=VN,pd=ap,zN=qi,LN=rN,FN=aN,HN=vN,md=Ul,vd=_t,jN=bN,WN=Po,UN=ro,GN=dn,ZN=ON,XN=ql,gd=up,qN=RN;function KN(e,t,n,o,r,i,a){var l=gd(e,n),u=gd(t,n),c=a.get(u);if(c){pd(e,n,c);return}var d=i?i(l,u,n+"",e,t,a):void 0,f=d===void 0;if(f){var h=vd(u),p=!h&&WN(u),m=!h&&!p&&XN(u);d=u,h||p||m?vd(l)?d=l:jN(l)?d=FN(l):p?(f=!1,d=zN(u,!0)):m?(f=!1,d=LN(u,!0)):d=[]:ZN(u)||md(u)?(d=l,md(l)?d=qN(l):(!GN(l)||UN(l))&&(d=HN(u))):f=!1}f&&(a.set(u,d),r(d,u,o,i,a),a.delete(u)),pd(e,n,d)}var JN=KN,QN=Xl,eC=ap,tC=tp,nC=JN,oC=dn,rC=nu,iC=up;function cp(e,t,n,o,r){e!==t&&tC(t,function(i,a){if(r||(r=new QN),oC(i))nC(e,t,a,n,cp,o,r);else{var l=o?o(iC(e,a),i,a+"",e,t,r):void 0;l===void 0&&(l=i),eC(e,a,l)}},rC)}var dp=cp,aC=dp,yd=dn;function fp(e,t,n,o,r,i){return yd(e)&&yd(t)&&(i.set(t,e),aC(e,t,void 0,fp,i),i.delete(t)),e}var sC=fp,lC=tu,uC=eu;function cC(e){return lC(function(t,n){var o=-1,r=n.length,i=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(r--,i):void 0,a&&uC(n[0],n[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++o<r;){var l=n[o];l&&e(t,l,o,i)}return t})}var dC=cC,fC=dp,hC=dC,pC=hC(function(e,t,n,o){fC(e,t,n,o)}),mC=pC,vC=rp,gC=tu,yC=sC,wC=mC,bC=gC(function(e){return e.push(void 0,yC),vC(wC,void 0,e)}),Tr=bC;function _C(e){return e&&e.length?e[0]:void 0}var hp=_C;function kC(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var wo=kC;const xC=e=>Object.prototype.toString.call(e).slice(8,-1),ko=e=>C1(e)&&!isNaN(e.getTime()),sn=e=>xC(e)==="Object",pp=Lh,wd=(e,t)=>VD(t,n=>Lh(e,n)),Me=(e,t,n="0")=>{for(e=e!=null?String(e):"",t=t||2;e.length<t;)e=`${n}${e}`;return e},lt=e=>Array.isArray(e),Jt=e=>lt(e)&&e.length>0,Ki=e=>e==null?null:document&&Tt(e)?document.querySelector(e):e.$el??e,xn=(e,t,n,o=void 0)=>{e.removeEventListener(t,n,o)},En=(e,t,n,o=void 0)=>(e.addEventListener(t,n,o),()=>xn(e,t,n,o)),Ni=(e,t)=>!!e&&!!t&&(e===t||e.contains(t)),hi=(e,t)=>{(e.key===" "||e.key==="Enter")&&(t(e),e.preventDefault())},mp=(e,...t)=>{const n={};let o;for(o in e)t.includes(o)||(n[o]=e[o]);return n},vp=(e,t)=>{const n={};return t.forEach(o=>{o in e&&(n[o]=e[o])}),n};function EC(e,t,n){return Math.min(Math.max(e,t),n)}var Ji={},SC={get exports(){return Ji},set exports(e){Ji=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(o){if(o===null||o===!0||o===!1)return NaN;var r=Number(o);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}e.exports=t.default})(SC,Ji);const DC=$h(Ji);var Qi={},MC={get exports(){return Qi},set exports(e){Qi=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(o){var r=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return r.setUTCFullYear(o.getFullYear()),o.getTime()-r.getTime()}e.exports=t.default})(MC,Qi);const bd=$h(Qi);function NC(e,t){var n=$C(t);return n.formatToParts?OC(n,e):TC(n,e)}var CC={year:0,month:1,day:2,hour:3,minute:4,second:5};function OC(e,t){try{for(var n=e.formatToParts(t),o=[],r=0;r<n.length;r++){var i=CC[n[r].type];i>=0&&(o[i]=parseInt(n[r].value,10))}return o}catch(a){if(a instanceof RangeError)return[NaN];throw a}}function TC(e,t){var n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[o[3],o[1],o[2],o[4],o[5],o[6]]}var vs={};function $C(e){if(!vs[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";vs[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return vs[e]}function gp(e,t,n,o,r,i,a){var l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(o,r,i,a),l}var _d=36e5,PC=6e4,gs={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function BC(e,t,n){var o,r;if(!e||(o=gs.timezoneZ.exec(e),o))return 0;var i;if(o=gs.timezoneHH.exec(e),o)return i=parseInt(o[1],10),kd(i)?-(i*_d):NaN;if(o=gs.timezoneHHMM.exec(e),o){i=parseInt(o[1],10);var a=parseInt(o[2],10);return kd(i,a)?(r=Math.abs(i)*_d+a*PC,i>0?-r:r):NaN}if(IC(e)){t=new Date(t||Date.now());var l=YC(t),u=tl(l,e),c=AC(t,u,e);return-c}return NaN}function YC(e){return gp(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function tl(e,t){var n=NC(e,t),o=gp(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),i=r%1e3;return r-=i>=0?i:1e3+i,o-r}function AC(e,t,n){var o=e.getTime(),r=o-t,i=tl(new Date(r),n);if(t===i)return t;r-=i-t;var a=tl(new Date(r),n);return i===a?i:Math.max(i,a)}function kd(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var xd={};function IC(e){if(xd[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),xd[e]=!0,!0}catch{return!1}}var VC=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const RC=VC;var ys=36e5,Ed=6e4,zC=2,Ze={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:RC};function LC(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},o=n.additionalDigits==null?zC:DC(n.additionalDigits);if(o!==2&&o!==1&&o!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=FC(e),i=HC(r.date,o),a=i.year,l=i.restDateString,u=jC(l,a);if(isNaN(u))return new Date(NaN);if(u){var c=u.getTime(),d=0,f;if(r.time&&(d=WC(r.time),isNaN(d)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=BC(r.timeZone||n.timeZone,new Date(c+d)),isNaN(f))return new Date(NaN)}else f=bd(new Date(c+d)),f=bd(new Date(c+d+f));return new Date(c+d+f)}else return new Date(NaN)}function FC(e){var t={},n=Ze.dateTimePattern.exec(e),o;if(n?(t.date=n[1],o=n[3]):(n=Ze.datePattern.exec(e),n?(t.date=n[1],o=n[2]):(t.date=null,o=e)),o){var r=Ze.timeZone.exec(o);r?(t.time=o.replace(r[1],""),t.timeZone=r[1].trim()):t.time=o}return t}function HC(e,t){var n=Ze.YYY[t],o=Ze.YYYYY[t],r;if(r=Ze.YYYY.exec(e)||o.exec(e),r){var i=r[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(r=Ze.YY.exec(e)||n.exec(e),r){var a=r[1];return{year:parseInt(a,10)*100,restDateString:e.slice(a.length)}}return{year:null}}function jC(e,t){if(t===null)return null;var n,o,r,i;if(e.length===0)return o=new Date(0),o.setUTCFullYear(t),o;if(n=Ze.MM.exec(e),n)return o=new Date(0),r=parseInt(n[1],10)-1,Dd(t,r)?(o.setUTCFullYear(t,r),o):new Date(NaN);if(n=Ze.DDD.exec(e),n){o=new Date(0);var a=parseInt(n[1],10);return ZC(t,a)?(o.setUTCFullYear(t,0,a),o):new Date(NaN)}if(n=Ze.MMDD.exec(e),n){o=new Date(0),r=parseInt(n[1],10)-1;var l=parseInt(n[2],10);return Dd(t,r,l)?(o.setUTCFullYear(t,r,l),o):new Date(NaN)}if(n=Ze.Www.exec(e),n)return i=parseInt(n[1],10)-1,Md(t,i)?Sd(t,i):new Date(NaN);if(n=Ze.WwwD.exec(e),n){i=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Md(t,i,u)?Sd(t,i,u):new Date(NaN)}return null}function WC(e){var t,n,o;if(t=Ze.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),ws(n)?n%24*ys:NaN;if(t=Ze.HHMM.exec(e),t)return n=parseInt(t[1],10),o=parseFloat(t[2].replace(",",".")),ws(n,o)?n%24*ys+o*Ed:NaN;if(t=Ze.HHMMSS.exec(e),t){n=parseInt(t[1],10),o=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return ws(n,o,r)?n%24*ys+o*Ed+r*1e3:NaN}return null}function Sd(e,t,n){t=t||0,n=n||0;var o=new Date(0);o.setUTCFullYear(e,0,4);var r=o.getUTCDay()||7,i=t*7+n+1-r;return o.setUTCDate(o.getUTCDate()+i),o}var UC=[31,28,31,30,31,30,31,31,30,31,30,31],GC=[31,29,31,30,31,30,31,31,30,31,30,31];function yp(e){return e%400===0||e%4===0&&e%100!==0}function Dd(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var o=yp(e);if(o&&n>GC[t]||!o&&n>UC[t])return!1}return!0}function ZC(e,t){if(t<1)return!1;var n=yp(e);return!(n&&t>366||!n&&t>365)}function Md(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function ws(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function We(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Ci(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ci=function(t){return typeof t}:Ci=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(e)}function fn(e){We(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ci(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Uo(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}var XC={};function ou(){return XC}function Jn(e,t){var n,o,r,i,a,l,u,c;We(1,arguments);var d=ou(),f=Uo((n=(o=(r=(i=t?.weekStartsOn)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:d.weekStartsOn)!==null&&o!==void 0?o:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=fn(e),p=h.getDay(),m=(p<f?7:0)+p-f;return h.setDate(h.getDate()-m),h.setHours(0,0,0,0),h}function Nd(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var qC=6048e5;function KC(e,t,n){We(2,arguments);var o=Jn(e,n),r=Jn(t,n),i=o.getTime()-Nd(o),a=r.getTime()-Nd(r);return Math.round((i-a)/qC)}function JC(e){We(1,arguments);var t=fn(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function QC(e){We(1,arguments);var t=fn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function eO(e,t){return We(1,arguments),KC(JC(e),QC(e),t)+1}function tO(e,t){var n,o,r,i,a,l,u,c;We(1,arguments);var d=fn(e),f=d.getFullYear(),h=ou(),p=Uo((n=(o=(r=(i=t?.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&o!==void 0?o:(u=h.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setFullYear(f+1,0,p),m.setHours(0,0,0,0);var v=Jn(m,t),w=new Date(0);w.setFullYear(f,0,p),w.setHours(0,0,0,0);var g=Jn(w,t);return d.getTime()>=v.getTime()?f+1:d.getTime()>=g.getTime()?f:f-1}function nO(e,t){var n,o,r,i,a,l,u,c;We(1,arguments);var d=ou(),f=Uo((n=(o=(r=(i=t?.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:d.firstWeekContainsDate)!==null&&o!==void 0?o:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=tO(e,t),p=new Date(0);p.setFullYear(h,0,f),p.setHours(0,0,0,0);var m=Jn(p,t);return m}var oO=6048e5;function rO(e,t){We(1,arguments);var n=fn(e),o=Jn(n,t).getTime()-nO(n,t).getTime();return Math.round(o/oO)+1}function ea(e){return We(1,arguments),Jn(e,{weekStartsOn:1})}function iO(e){We(1,arguments);var t=fn(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var r=ea(o),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=ea(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function aO(e){We(1,arguments);var t=iO(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var o=ea(n);return o}var sO=6048e5;function lO(e){We(1,arguments);var t=fn(e),n=ea(t).getTime()-aO(t).getTime();return Math.round(n/sO)+1}function Ge(e,t){We(2,arguments);var n=fn(e),o=Uo(t);return isNaN(o)?new Date(NaN):(o&&n.setDate(n.getDate()+o),n)}function ta(e,t){We(2,arguments);var n=fn(e),o=Uo(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var r=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+o+1,0);var a=i.getDate();return r>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Cd(e,t){We(2,arguments);var n=Uo(t);return ta(e,n*12)}const uO={daily:["year","month","day"],weekly:["year","month","week"],monthly:["year","month"]};function cO({monthComps:e,prevMonthComps:t,nextMonthComps:n},o){const r=[],{firstDayOfWeek:i,firstWeekday:a,isoWeeknumbers:l,weeknumbers:u,numDays:c,numWeeks:d}=e,f=a+(a<i?He:0)-i;let h=!0,p=!1,m=!1,v=0;const w=new Intl.DateTimeFormat(o.id,{weekday:"long",year:"numeric",month:"short",day:"numeric"});let g=t.numDays-f+1,b=t.numDays-g+1,y=Math.floor((g-1)/He+1),_=1,O=t.numWeeks,B=1,$=t.month,C=t.year;const V=new Date,L=V.getDate(),I=V.getMonth()+1,x=V.getFullYear();for(let R=1;R<=nT;R++){for(let k=1,N=i;k<=He;k++,N+=N===He?1-He:1){h&&N===a&&(g=1,b=e.numDays,y=Math.floor((g-1)/He+1),_=Math.floor((c-g)/He+1),O=1,B=d,$=e.month,C=e.year,h=!1,p=!0);const D=o.getDateFromParams(C,$,g,0,0,0,0),z=o.getDateFromParams(C,$,g,12,0,0,0),F=o.getDateFromParams(C,$,g,23,59,59,999),j=D,Y=`${Me(C,4)}-${Me($,2)}-${Me(g,2)}`,G=k,W=He-k,le=u[R-1],re=l[R-1],X=g===L&&$===I&&C===x,q=p&&g===1,J=p&&g===c,pe=R===1,we=R===d,me=k===1,ge=k===He,ue=Op(C,$,g);r.push({locale:o,id:Y,position:++v,label:g.toString(),ariaLabel:w.format(new Date(C,$-1,g)),day:g,dayFromEnd:b,weekday:N,weekdayPosition:G,weekdayPositionFromEnd:W,weekdayOrdinal:y,weekdayOrdinalFromEnd:_,week:O,weekFromEnd:B,weekPosition:R,weeknumber:le,isoWeeknumber:re,month:$,year:C,date:j,startDate:D,endDate:F,noonDate:z,dayIndex:ue,isToday:X,isFirstDay:q,isLastDay:J,isDisabled:!p,isFocusable:!p,isFocused:!1,inMonth:p,inPrevMonth:h,inNextMonth:m,onTop:pe,onBottom:we,onLeft:me,onRight:ge,classes:[`id-${Y}`,`day-${g}`,`day-from-end-${b}`,`weekday-${N}`,`weekday-position-${G}`,`weekday-ordinal-${y}`,`weekday-ordinal-from-end-${_}`,`week-${O}`,`week-from-end-${B}`,{"is-today":X,"is-first-day":q,"is-last-day":J,"in-month":p,"in-prev-month":h,"in-next-month":m,"on-top":pe,"on-bottom":we,"on-left":me,"on-right":ge}]}),p&&J?(p=!1,m=!0,g=1,b=c,y=1,_=Math.floor((c-g)/He+1),O=1,B=n.numWeeks,$=n.month,C=n.year):(g++,b--,y=Math.floor((g-1)/He+1),_=Math.floor((c-g)/He+1))}O++,B--}return r}function dO(e,t,n,o){const r=e.reduce((i,a,l)=>{const u=Math.floor(l/7);let c=i[u];return c||(c={id:`week-${u+1}`,title:"",week:a.week,weekPosition:a.weekPosition,weeknumber:a.weeknumber,isoWeeknumber:a.isoWeeknumber,weeknumberDisplay:t?a.weeknumber:n?a.isoWeeknumber:void 0,days:[]},i[u]=c),c.days.push(a),i},Array(e.length/He));return r.forEach(i=>{const a=i.days[0],l=i.days[i.days.length-1];a.month===l.month?i.title=`${o.formatDate(a.date,"MMMM YYYY")}`:a.year===l.year?i.title=`${o.formatDate(a.date,"MMM")} - ${o.formatDate(l.date,"MMM YYYY")}`:i.title=`${o.formatDate(a.date,"MMM YYYY")} - ${o.formatDate(l.date,"MMM YYYY")}`}),r}function fO(e,t){return e.days.map(n=>({label:t.formatDate(n.date,t.masks.weekdays),weekday:n.weekday}))}function hO(e,t){return`${t}.${Me(e,2)}`}function wp(e,t,n){return vp(n.getDateParts(n.toDate(e)),uO[t])}function bp({day:e,week:t,month:n,year:o},r,i,a){if(i==="daily"&&e){const l=new Date(o,n-1,e),u=Ge(l,r);return{day:u.getDate(),month:u.getMonth()+1,year:u.getFullYear()}}else if(i==="weekly"&&t){const l=a.getMonthParts(n,o).firstDayOfMonth,u=Ge(l,(t-1+r)*7),c=a.getDateParts(u);return{week:c.week,month:c.month,year:c.year}}else{const l=new Date(o,n-1,1),u=ta(l,r);return{month:u.getMonth()+1,year:u.getFullYear()}}}function $t(e){return e!=null&&e.month!=null&&e.year!=null}function nl(e,t){return!$t(e)||!$t(t)?!1:(e=e,t=t,e.year!==t.year?e.year<t.year:e.month&&t.month&&e.month!==t.month?e.month<t.month:e.week&&t.week&&e.week!==t.week?e.week<t.week:e.day&&t.day&&e.day!==t.day?e.day<t.day:!1)}function na(e,t){return!$t(e)||!$t(t)?!1:(e=e,t=t,e.year!==t.year?e.year>t.year:e.month&&t.month&&e.month!==t.month?e.month>t.month:e.week&&t.week&&e.week!==t.week?e.week>t.week:e.day&&t.day&&e.day!==t.day?e.day>t.day:!1)}function pO(e,t,n){return(e||!1)&&!nl(e,t)&&!na(e,n)}function mO(e,t){return!e&&t||e&&!t?!1:!e&&!t?!0:(e=e,t=t,e.year===t.year&&e.month===t.month&&e.week===t.week&&e.day===t.day)}function vO(e,t,n,o){if(!$t(e)||!$t(t))return[];const r=[];for(;!na(e,t);)r.push(e),e=bp(e,1,n,o);return r}function _p(e){const{day:t,week:n,month:o,year:r}=e;let i=`${r}-${Me(o,2)}`;return n&&(i=`${i}-w${n}`),t&&(i=`${i}-${Me(t,2)}`),i}function gO(e,t){const{month:n,year:o,showWeeknumbers:r,showIsoWeeknumbers:i}=e,a=new Date(o,n-1,15),l=t.getMonthParts(n,o),u=t.getPrevMonthParts(n,o),c=t.getNextMonthParts(n,o),d=cO({monthComps:l,prevMonthComps:u,nextMonthComps:c},t),f=dO(d,r,i,t),h=fO(f[0],t);return{id:_p(e),month:n,year:o,monthTitle:t.formatDate(a,t.masks.title),shortMonthLabel:t.formatDate(a,"MMM"),monthLabel:t.formatDate(a,"MMMM"),shortYearLabel:o.toString().substring(2),yearLabel:o.toString(),monthComps:l,prevMonthComps:u,nextMonthComps:c,days:d,weeks:f,weekdays:h}}function yO(e,t){const{day:n,week:o,view:r,trimWeeks:i}=e,a={...t,...e,title:"",viewDays:[],viewWeeks:[]};switch(r){case"daily":{let l=a.days.find(c=>c.inMonth);n?l=a.days.find(c=>c.day===n&&c.inMonth)||l:o&&(l=a.days.find(c=>c.week===o&&c.inMonth));const u=a.weeks[l.week-1];a.viewWeeks=[u],a.viewDays=[l],a.week=l.week,a.weekTitle=u.title,a.day=l.day,a.dayTitle=l.ariaLabel,a.title=a.dayTitle;break}case"weekly":{a.week=o||1;const l=a.weeks[a.week-1];a.viewWeeks=[l],a.viewDays=l.days,a.weekTitle=l.title,a.title=a.weekTitle;break}default:{a.title=a.monthTitle,a.viewWeeks=a.weeks.slice(0,i?a.monthComps.numWeeks:void 0),a.viewDays=a.days;break}}return a}class Od{constructor(t,n,o){fe(this,"keys",[]),fe(this,"store",{}),this.size=t,this.createKey=n,this.createItem=o}get(...t){const n=this.createKey(...t);return this.store[n]}getOrSet(...t){const n=this.createKey(...t);if(this.store[n])return this.store[n];const o=this.createItem(...t);if(this.keys.length>=this.size){const r=this.keys.shift();r!=null&&delete this.store[r]}return this.keys.push(n),this.store[n]=o,o}}let Td=class Oi{constructor(t,n=new oa){fe(this,"order"),fe(this,"locale"),fe(this,"start",null),fe(this,"end",null),fe(this,"repeat",null);var o;this.locale=n;const{start:r,end:i,span:a,order:l,repeat:u}=t;ko(r)&&(this.start=n.getDateParts(r)),ko(i)?this.end=n.getDateParts(i):this.start!=null&&a&&(this.end=n.getDateParts(Ge(this.start.date,a-1))),this.order=l??0,u&&(this.repeat=new ra({from:(o=this.start)==null?void 0:o.date,...u},{locale:this.locale}))}static fromMany(t,n){return(lt(t)?t:[t]).filter(o=>o).map(o=>Oi.from(o,n))}static from(t,n){if(t instanceof Oi)return t;const o={start:null,end:null};return t!=null&&(lt(t)?(o.start=t[0]??null,o.end=t[1]??null):sn(t)?Object.assign(o,t):(o.start=t,o.end=t)),o.start!=null&&(o.start=new Date(o.start)),o.end!=null&&(o.end=new Date(o.end)),new Oi(o,n)}get opts(){const{order:t,locale:n}=this;return{order:t,locale:n}}get hasRepeat(){return!!this.repeat}get isSingleDay(){const{start:t,end:n}=this;return t&&n&&t.year===n.year&&t.month===n.month&&t.day===n.day}get isMultiDay(){return!this.isSingleDay}get daySpan(){return this.start==null||this.end==null?this.hasRepeat?1:1/0:this.end.dayIndex-this.start.dayIndex}startsOnDay(t){var n,o;return((n=this.start)==null?void 0:n.dayIndex)===t.dayIndex||!!((o=this.repeat)!=null&&o.passes(t))}intersectsDay(t){return this.intersectsDayRange(t,t)}intersectsRange(t){var n,o;return this.intersectsDayRange(((n=t.start)==null?void 0:n.dayIndex)??-1/0,((o=t.end)==null?void 0:o.dayIndex)??1/0)}intersectsDayRange(t,n){return!(this.start&&this.start.dayIndex>n||this.end&&this.end.dayIndex<t)}};class wO{constructor(){fe(this,"records",{})}render(t,n,o){var r,i,a,l;let u=null;const c=o[0].dayIndex,d=o[o.length-1].dayIndex;return n.hasRepeat?o.forEach(f=>{var h,p;if(n.startsOnDay(f)){const m=n.daySpan<1/0?n.daySpan:1;u={startDay:f.dayIndex,startTime:((h=n.start)==null?void 0:h.time)??0,endDay:f.dayIndex+m-1,endTime:((p=n.end)==null?void 0:p.time)??Ti},this.getRangeRecords(t).push(u)}}):n.intersectsDayRange(c,d)&&(u={startDay:((r=n.start)==null?void 0:r.dayIndex)??-1/0,startTime:((i=n.start)==null?void 0:i.time)??-1/0,endDay:((a=n.end)==null?void 0:a.dayIndex)??1/0,endTime:((l=n.end)==null?void 0:l.time)??1/0},this.getRangeRecords(t).push(u)),u}getRangeRecords(t){let n=this.records[t.key];return n||(n={ranges:[],data:t},this.records[t.key]=n),n.ranges}getCell(t,n){return this.getCells(n).find(o=>o.data.key===t)}cellExists(t,n){const o=this.records[t];return o==null?!1:o.ranges.some(r=>r.startDay<=n&&r.endDay>=n)}getCells(t){const n=Object.values(this.records),o=[],{dayIndex:r}=t;return n.forEach(({data:i,ranges:a})=>{a.filter(l=>l.startDay<=r&&l.endDay>=r).forEach(l=>{const u=r===l.startDay,c=r===l.endDay,d=u?l.startTime:0,f=new Date(t.startDate.getTime()+d),h=c?l.endTime:Ti,p=new Date(t.endDate.getTime()+h),m=d===0&&h===Ti,v=i.order||0;o.push({...l,data:i,onStart:u,onEnd:c,startTime:d,startDate:f,endTime:h,endDate:p,allDay:m,order:v})})}),o.sort((i,a)=>i.order-a.order),o}}const ln={ar:{dow:7,L:"D/M/YYYY"},bg:{dow:2,L:"D.MM.YYYY"},ca:{dow:2,L:"DD/MM/YYYY"},"zh-CN":{dow:2,L:"YYYY/MM/DD"},"zh-TW":{dow:1,L:"YYYY/MM/DD"},hr:{dow:2,L:"DD.MM.YYYY"},cs:{dow:2,L:"DD.MM.YYYY"},da:{dow:2,L:"DD.MM.YYYY"},nl:{dow:2,L:"DD-MM-YYYY"},"en-US":{dow:1,L:"MM/DD/YYYY"},"en-AU":{dow:2,L:"DD/MM/YYYY"},"en-CA":{dow:1,L:"YYYY-MM-DD"},"en-GB":{dow:2,L:"DD/MM/YYYY"},"en-IE":{dow:2,L:"DD-MM-YYYY"},"en-NZ":{dow:2,L:"DD/MM/YYYY"},"en-ZA":{dow:1,L:"YYYY/MM/DD"},eo:{dow:2,L:"YYYY-MM-DD"},et:{dow:2,L:"DD.MM.YYYY"},fi:{dow:2,L:"DD.MM.YYYY"},fr:{dow:2,L:"DD/MM/YYYY"},"fr-CA":{dow:1,L:"YYYY-MM-DD"},"fr-CH":{dow:2,L:"DD.MM.YYYY"},de:{dow:2,L:"DD.MM.YYYY"},he:{dow:1,L:"DD.MM.YYYY"},id:{dow:2,L:"DD/MM/YYYY"},it:{dow:2,L:"DD/MM/YYYY"},ja:{dow:1,L:"YYYY年M月D日"},ko:{dow:1,L:"YYYY.MM.DD"},lv:{dow:2,L:"DD.MM.YYYY"},lt:{dow:2,L:"DD.MM.YYYY"},mk:{dow:2,L:"D.MM.YYYY"},nb:{dow:2,L:"D. MMMM YYYY"},nn:{dow:2,L:"D. MMMM YYYY"},pl:{dow:2,L:"DD.MM.YYYY"},pt:{dow:2,L:"DD/MM/YYYY"},ro:{dow:2,L:"DD.MM.YYYY"},ru:{dow:2,L:"DD.MM.YYYY"},sk:{dow:2,L:"DD.MM.YYYY"},"es-ES":{dow:2,L:"DD/MM/YYYY"},"es-MX":{dow:2,L:"DD/MM/YYYY"},sv:{dow:2,L:"YYYY-MM-DD"},th:{dow:1,L:"DD/MM/YYYY"},tr:{dow:2,L:"DD.MM.YYYY"},uk:{dow:2,L:"DD.MM.YYYY"},vi:{dow:2,L:"DD/MM/YYYY"}};ln.en=ln["en-US"];ln.es=ln["es-ES"];ln.no=ln.nb;ln.zh=ln["zh-CN"];const bO=Object.entries(ln).reduce((e,[t,{dow:n,L:o}])=>(e[t]={id:t,firstDayOfWeek:n,masks:{L:o}},e),{}),_O="MMMM YYYY",kO="W",xO="MMM",EO="h A",SO=["L","YYYY-MM-DD","YYYY/MM/DD"],DO=["L h:mm A","YYYY-MM-DD h:mm A","YYYY/MM/DD h:mm A"],MO=["L HH:mm","YYYY-MM-DD HH:mm","YYYY/MM/DD HH:mm"],NO=["h:mm A"],CO=["HH:mm"],OO="WWW, MMM D, YYYY",TO=["L","YYYY-MM-DD","YYYY/MM/DD"],$O="iso",PO="YYYY-MM-DDTHH:mm:ss.SSSZ",BO={title:_O,weekdays:kO,navMonths:xO,hours:EO,input:SO,inputDateTime:DO,inputDateTime24hr:MO,inputTime:NO,inputTime24hr:CO,dayPopover:OO,data:TO,model:$O,iso:PO},YO=300,AO=60,IO=80,VO={maxSwipeTime:YO,minHorizontalSwipeDistance:AO,maxVerticalSwipeDistance:IO},RO={componentPrefix:"V",color:"blue",isDark:!1,navVisibility:"click",titlePosition:"center",transition:"slide-h",touch:VO,masks:BO,locales:bO,datePicker:{updateOnInput:!0,inputDebounce:1e3,popover:{visibility:"hover-focus",placement:"bottom-start",isInteractive:!0}}},ol=s.reactive(RO),zO=s.computed(()=>sM(ol.locales,e=>(e.masks=Tr(e.masks,ol.masks),e))),Tn=e=>typeof window<"u"&&pp(window.__vcalendar__,e)?Fn(window.__vcalendar__,e):Fn(ol,e),LO=12,FO=5;function HO(e,t){const n=new Intl.DateTimeFormat().resolvedOptions().locale;let o;Tt(e)?o=e:pp(e,"id")&&(o=e.id),o=(o||n).toLowerCase();const r=Object.keys(t),i=l=>r.find(u=>u.toLowerCase()===l);o=i(o)||i(o.substring(0,2))||n;const a={...t["en-IE"],...t[o],id:o,monthCacheSize:LO,pageCacheSize:FO};return sn(e)?Tr(e,a):a}let oa=class{constructor(e=void 0,t){fe(this,"id"),fe(this,"daysInWeek"),fe(this,"firstDayOfWeek"),fe(this,"masks"),fe(this,"timezone"),fe(this,"hourLabels"),fe(this,"dayNames"),fe(this,"dayNamesShort"),fe(this,"dayNamesShorter"),fe(this,"dayNamesNarrow"),fe(this,"monthNames"),fe(this,"monthNamesShort"),fe(this,"relativeTimeNames"),fe(this,"amPm",["am","pm"]),fe(this,"monthCache"),fe(this,"pageCache");const{id:n,firstDayOfWeek:o,masks:r,monthCacheSize:i,pageCacheSize:a}=HO(e,zO.value);this.monthCache=new Od(i,dT,fT),this.pageCache=new Od(a,_p,gO),this.id=n,this.daysInWeek=He,this.firstDayOfWeek=EC(o,1,He),this.masks=r,this.timezone=t||void 0,this.hourLabels=this.getHourLabels(),this.dayNames=bs("long",this.id),this.dayNamesShort=bs("short",this.id),this.dayNamesShorter=this.dayNamesShort.map(l=>l.substring(0,2)),this.dayNamesNarrow=bs("narrow",this.id),this.monthNames=Id("long",this.id),this.monthNamesShort=Id("short",this.id),this.relativeTimeNames=mT(this.id)}formatDate(e,t){return bT(e,t,this)}parseDate(e,t){return Vd(e,t,this)}toDate(e,t={}){const n=new Date(NaN);let o=n;const{fillDate:r,mask:i,patch:a,rules:l}=t;if(yt(e)?(t.type="number",o=new Date(+e)):Tt(e)?(t.type="string",o=e?Vd(e,i||"iso",this):n):ko(e)?(t.type="date",o=new Date(e.getTime())):ru(e)&&(t.type="object",o=this.getDateFromParts(e)),o&&(a||l)){let u=this.getDateParts(o);if(a&&r!=null){const c=this.getDateParts(this.toDate(r));u=this.getDateParts(this.toDate({...c,...vp(u,tT[a])}))}l&&(u=wT(u,l)),o=this.getDateFromParts(u)}return o||n}toDateOrNull(e,t={}){const n=this.toDate(e,t);return isNaN(n.getTime())?null:n}fromDate(e,{type:t,mask:n}={}){switch(t){case"number":return e?e.getTime():NaN;case"string":return e?this.formatDate(e,n||"iso"):"";case"object":return e?this.getDateParts(e):null;default:return e?new Date(e):null}}range(e){return Td.from(e,this)}ranges(e){return Td.fromMany(e,this)}getDateParts(e){return cT(e,this)}getDateFromParts(e){return $p(e,this.timezone)}getDateFromParams(e,t,n,o,r,i,a){return this.getDateFromParts({year:e,month:t,day:n,hours:o,minutes:r,seconds:i,milliseconds:a})}getPage(e){const t=this.pageCache.getOrSet(e,this);return yO(e,t)}getMonthParts(e,t){const{firstDayOfWeek:n}=this;return this.monthCache.getOrSet(e,t,n)}getThisMonthParts(){const e=new Date;return this.getMonthParts(e.getMonth()+1,e.getFullYear())}getPrevMonthParts(e,t){return e===1?this.getMonthParts(12,t-1):this.getMonthParts(e-1,t)}getNextMonthParts(e,t){return e===12?this.getMonthParts(1,t+1):this.getMonthParts(e+1,t)}getHourLabels(){return pT().map(e=>this.formatDate(e,this.masks.hours))}getDayId(e){return this.formatDate(e,"YYYY-MM-DD")}};var go=(e=>(e.Any="any",e.All="all",e))(go||{}),kp=(e=>(e.Days="days",e.Weeks="weeks",e.Months="months",e.Years="years",e))(kp||{}),xp=(e=>(e.Days="days",e.Weekdays="weekdays",e.Weeks="weeks",e.Months="months",e.Years="years",e))(xp||{}),Ep=(e=>(e.OrdinalWeekdays="ordinalWeekdays",e))(Ep||{});class jO{constructor(t,n,o){fe(this,"validated",!0),this.type=t,this.interval=n,this.from=o,this.from||(console.error('A valid "from" date is required for date interval rule. This rule will be skipped.'),this.validated=!1)}passes(t){if(!this.validated)return!0;const{date:n}=t;switch(this.type){case"days":return iu(this.from.date,n)%this.interval===0;case"weeks":return lT(this.from.date,n)%this.interval===0;case"months":return uT(this.from.date,n)%this.interval===0;case"years":return Tp(this.from.date,n)%this.interval===0;default:return!1}}}let Go=class{constructor(t,n,o,r){fe(this,"components",[]),this.type=t,this.validator=o,this.getter=r,this.components=this.normalizeComponents(n)}static create(t,n){switch(t){case"days":return new WO(n);case"weekdays":return new UO(n);case"weeks":return new GO(n);case"months":return new ZO(n);case"years":return new XO(n)}}normalizeComponents(t){if(this.validator(t))return[t];if(!lt(t))return[];const n=[];return t.forEach(o=>{if(!this.validator(o)){console.error(`Component value ${o} in invalid for "${this.type}" rule. This rule will be skipped.`);return}n.push(o)}),n}passes(t){return this.getter(t).some(n=>this.components.includes(n))}};class WO extends Go{constructor(t){super("days",t,JO,({day:n,dayFromEnd:o})=>[n,-o])}}class UO extends Go{constructor(t){super("weekdays",t,rl,({weekday:n})=>[n])}}class GO extends Go{constructor(t){super("weeks",t,QO,({week:n,weekFromEnd:o})=>[n,-o])}}class ZO extends Go{constructor(t){super("months",t,eT,({month:n})=>[n])}}class XO extends Go{constructor(t){super("years",t,yt,({year:n})=>[n])}}class qO{constructor(t,n){fe(this,"components"),this.type=t,this.components=this.normalizeComponents(n)}normalizeArrayConfig(t){const n=[];return t.forEach((o,r)=>{if(yt(o)){if(r===0)return;if(!$d(t[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!rl(o)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([t[0],o])}else lt(o)&&n.push(...this.normalizeArrayConfig(o))}),n}normalizeComponents(t){const n=[];return t.forEach((o,r)=>{if(yt(o)){if(r===0)return;if(!$d(t[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!rl(o)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([t[0],o])}else lt(o)&&n.push(...this.normalizeArrayConfig(o))}),n}passes(t){const{weekday:n,weekdayOrdinal:o,weekdayOrdinalFromEnd:r}=t;return this.components.some(([i,a])=>(i===o||i===-r)&&n===a)}}class KO{constructor(t){fe(this,"type","function"),fe(this,"validated",!0),this.fn=t,ro(t)||(console.error("The function rule requires a valid function. This rule will be skipped."),this.validated=!1)}passes(t){return this.validated?this.fn(t):!0}}class ra{constructor(t,n={},o){fe(this,"validated",!0),fe(this,"config"),fe(this,"type",go.Any),fe(this,"from"),fe(this,"until"),fe(this,"rules",[]),fe(this,"locale",new oa),this.parent=o,n.locale&&(this.locale=n.locale),this.config=t,ro(t)?(this.type=go.All,this.rules=[new KO(t)]):lt(t)?(this.type=go.Any,this.rules=t.map(r=>new ra(r,n,this))):sn(t)?(this.type=go.All,this.from=t.from?this.locale.getDateParts(t.from):o?.from,this.until=t.until?this.locale.getDateParts(t.until):o?.until,this.rules=this.getObjectRules(t)):(console.error("Rule group configuration must be an object or an array."),this.validated=!1)}getObjectRules(t){const n=[];if(t.every&&(Tt(t.every)&&(t.every=[1,`${t.every}s`]),lt(t.every))){const[o=1,r=kp.Days]=t.every;n.push(new jO(r,o,this.from))}return Object.values(xp).forEach(o=>{o in t&&n.push(Go.create(o,t[o]))}),Object.values(Ep).forEach(o=>{o in t&&n.push(new qO(o,t[o]))}),t.on!=null&&(lt(t.on)||(t.on=[t.on]),n.push(new ra(t.on,{locale:this.locale},this.parent))),n}passes(t){return this.validated?this.from&&t.dayIndex<=this.from.dayIndex||this.until&&t.dayIndex>=this.until.dayIndex?!1:this.type===go.Any?this.rules.some(n=>n.passes(t)):this.rules.every(n=>n.passes(t)):!0}}function JO(e){return yt(e)?e>=1&&e<=31:!1}function rl(e){return yt(e)?e>=1&&e<=7:!1}function QO(e){return yt(e)?e>=-6&&e<=-1||e>=1&&e<=6:!1}function eT(e){return yt(e)?e>=1&&e<=12:!1}function $d(e){return!(!yt(e)||e<-5||e>5||e===0)}const tT={dateTime:["year","month","day","hours","minutes","seconds","milliseconds"],date:["year","month","day"],time:["hours","minutes","seconds","milliseconds"]},He=7,nT=6,Sp=1e3,Dp=Sp*60,Mp=Dp*60,Ti=Mp*24,oT=[31,28,31,30,31,30,31,31,30,31,30,31],rT=["L","iso"],lr={milliseconds:[0,999,3],seconds:[0,59,2],minutes:[0,59,2],hours:[0,23,2]},Np=/d{1,2}|W{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|Z{1,4}|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,iT=/\[([^]*?)\]/gm,Pd={D(e){return e.day},DD(e){return Me(e.day,2)},d(e){return e.weekday-1},dd(e){return Me(e.weekday-1,2)},W(e,t){return t.dayNamesNarrow[e.weekday-1]},WW(e,t){return t.dayNamesShorter[e.weekday-1]},WWW(e,t){return t.dayNamesShort[e.weekday-1]},WWWW(e,t){return t.dayNames[e.weekday-1]},M(e){return e.month},MM(e){return Me(e.month,2)},MMM(e,t){return t.monthNamesShort[e.month-1]},MMMM(e,t){return t.monthNames[e.month-1]},YY(e){return String(e.year).substr(2)},YYYY(e){return Me(e.year,4)},h(e){return e.hours%12||12},hh(e){return Me(e.hours%12||12,2)},H(e){return e.hours},HH(e){return Me(e.hours,2)},m(e){return e.minutes},mm(e){return Me(e.minutes,2)},s(e){return e.seconds},ss(e){return Me(e.seconds,2)},S(e){return Math.round(e.milliseconds/100)},SS(e){return Me(Math.round(e.milliseconds/10),2)},SSS(e){return Me(e.milliseconds,3)},a(e,t){return e.hours<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.hours<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},Z(){return"Z"},ZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60),2)}`},ZZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}`},ZZZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60),2)}:${Me(Math.abs(t)%60,2)}`}},vn=/\d\d?/,aT=/\d{3}/,sT=/\d{4}/,nr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Bd=()=>{},Yd=e=>(t,n,o)=>{const r=o[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~r&&(t.month=r)},Ce={D:[vn,(e,t)=>{e.day=t}],Do:[new RegExp(vn.source+nr.source),(e,t)=>{e.day=parseInt(t,10)}],d:[vn,Bd],W:[nr,Bd],M:[vn,(e,t)=>{e.month=t-1}],MMM:[nr,Yd("monthNamesShort")],MMMM:[nr,Yd("monthNames")],YY:[vn,(e,t)=>{const n=+new Date().getFullYear().toString().substr(0,2);e.year=+`${t>68?n-1:n}${t}`}],YYYY:[sT,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.milliseconds=t*100}],SS:[/\d{2}/,(e,t)=>{e.milliseconds=t*10}],SSS:[aT,(e,t)=>{e.milliseconds=t}],h:[vn,(e,t)=>{e.hours=t}],m:[vn,(e,t)=>{e.minutes=t}],s:[vn,(e,t)=>{e.seconds=t}],a:[nr,(e,t,n)=>{const o=t.toLowerCase();o===n.amPm[0]?e.isPm=!1:o===n.amPm[1]&&(e.isPm=!0)}],Z:[/[^\s]*?[+-]\d\d:?\d\d|[^\s]*?Z?/,(e,t)=>{t==="Z"&&(t="+00:00");const n=`${t}`.match(/([+-]|\d\d)/gi);if(n){const o=+n[1]*60+parseInt(n[2],10);e.timezoneOffset=n[0]==="+"?o:-o}}]};Ce.DD=Ce.D;Ce.dd=Ce.d;Ce.WWWW=Ce.WWW=Ce.WW=Ce.W;Ce.MM=Ce.M;Ce.mm=Ce.m;Ce.hh=Ce.H=Ce.HH=Ce.h;Ce.ss=Ce.s;Ce.A=Ce.a;Ce.ZZZZ=Ce.ZZZ=Ce.ZZ=Ce.Z;function Cp(e,t){return(Jt(e)&&e||[Tt(e)&&e||"YYYY-MM-DD"]).map(n=>rT.reduce((o,r)=>o.replace(r,t.masks[r]||""),n))}function ru(e){return sn(e)&&"year"in e&&"month"in e&&"day"in e}function Ad(e,t=1){const n=e.getDay()+1,o=n>=t?t-n:-(7-(t-n));return Ge(e,o)}function Op(e,t,n){const o=Date.UTC(e,t-1,n);return iu(new Date(0),new Date(o))}function iu(e,t){return Math.round((t.getTime()-e.getTime())/Ti)}function lT(e,t){return Math.ceil(iu(Ad(e),Ad(t))/7)}function Tp(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}function uT(e,t){return Tp(e,t)*12+(t.getMonth()-e.getMonth())}function $p(e,t=""){const n=new Date,{year:o=n.getFullYear(),month:r=n.getMonth()+1,day:i=n.getDate(),hours:a=0,minutes:l=0,seconds:u=0,milliseconds:c=0}=e;if(t){const d=`${Me(o,4)}-${Me(r,2)}-${Me(i,2)}T${Me(a,2)}:${Me(l,2)}:${Me(u,2)}.${Me(c,3)}`;return LC(d,{timeZone:t})}return new Date(o,r-1,i,a,l,u,c)}function cT(e,t){let n=new Date(e.getTime());t.timezone&&(n=new Date(e.toLocaleString("en-US",{timeZone:t.timezone})),n.setMilliseconds(e.getMilliseconds()));const o=n.getMilliseconds(),r=n.getSeconds(),i=n.getMinutes(),a=n.getHours(),l=o+r*Sp+i*Dp+a*Mp,u=n.getMonth()+1,c=n.getFullYear(),d=t.getMonthParts(u,c),f=n.getDate(),h=d.numDays-f+1,p=n.getDay()+1,m=Math.floor((f-1)/7+1),v=Math.floor((d.numDays-f)/7+1),w=Math.ceil((f+Math.abs(d.firstWeekday-d.firstDayOfWeek))/7),g=d.numWeeks-w+1,b=d.weeknumbers[w],y=Op(c,u,f);return{milliseconds:o,seconds:r,minutes:i,hours:a,time:l,day:f,dayFromEnd:h,weekday:p,weekdayOrdinal:m,weekdayOrdinalFromEnd:v,week:w,weekFromEnd:g,weeknumber:b,month:u,year:c,date:n,dateTime:n.getTime(),dayIndex:y,timezoneOffset:0,isValid:!0}}function dT(e,t,n){return`${t}-${e}-${n}`}function fT(e,t,n){const o=t%4===0&&t%100!==0||t%400===0,r=new Date(t,e-1,1),i=r.getDay()+1,a=e===2&&o?29:oT[e-1],l=n-1,u=eO(r,{weekStartsOn:l}),c=[],d=[];for(let f=0;f<u;f++){const h=Ge(r,f*7);c.push(rO(h,{weekStartsOn:l})),d.push(lO(h))}return{firstDayOfWeek:n,firstDayOfMonth:r,inLeapYear:o,firstWeekday:i,numDays:a,numWeeks:u,month:e,year:t,weeknumbers:c,isoWeeknumbers:d}}function hT(){const e=[];for(let t=0;t<He;t++)e.push($p({year:2020,month:1,day:5+t,hours:12}));return e}function bs(e,t=void 0){const n=new Intl.DateTimeFormat(t,{weekday:e});return hT().map(o=>n.format(o))}function pT(){const e=[];for(let t=0;t<=24;t++)e.push(new Date(2e3,0,1,t));return e}function mT(e=void 0){const t=["second","minute","hour","day","week","month","quarter","year"],n=new Intl.RelativeTimeFormat(e);return t.reduce((o,r)=>{const i=n.formatToParts(100,r);return o[r]=i[1].unit,o},{})}function Pp(){const e=[];for(let t=0;t<12;t++)e.push(new Date(2e3,t,15));return e}function Id(e,t=void 0){const n=new Intl.DateTimeFormat(t,{month:e,timeZone:"UTC"});return Pp().map(o=>n.format(o))}function vT(e,t,n){return yt(t)?t===e:lt(t)?t.includes(e):ro(t)?t(e,n):!(t.min!=null&&t.min>e||t.max!=null&&t.max<e||t.interval!=null&&e%t.interval!==0)}function ur(e,t,n){const o=[],[r,i,a]=t;for(let l=r;l<=i;l++)(n==null||vT(l,n,e))&&o.push({value:l,label:Me(l,a)});return o}function gT(e,t){return{milliseconds:ur(e,lr.milliseconds,t.milliseconds),seconds:ur(e,lr.seconds,t.seconds),minutes:ur(e,lr.minutes,t.minutes),hours:ur(e,lr.hours,t.hours)}}function yT(e,t,n,o){const r=ur(e,t,o).reduce((i,a)=>{if(a.disabled)return i;if(isNaN(i))return a.value;const l=Math.abs(i-n);return Math.abs(a.value-n)<l?a.value:i},NaN);return isNaN(r)?n:r}function wT(e,t){const n={...e};return Object.entries(t).forEach(([o,r])=>{const i=lr[o],a=e[o];n[o]=yT(e,i,a,r)}),n}function Vd(e,t,n){return Cp(t,n).map(o=>{if(typeof o!="string")throw new Error("Invalid mask");let r=e;if(r.length>1e3)return!1;let i=!0;const a={};if(o.replace(Np,c=>{if(Ce[c]){const d=Ce[c],f=r.search(d[0]);~f?r.replace(d[0],h=>(d[1](a,h,n),r=r.substr(f+h.length),h)):i=!1}return Ce[c]?"":c.slice(1,c.length-1)}),!i)return!1;const l=new Date;a.hours!=null&&(a.isPm===!0&&+a.hours!=12?a.hours=+a.hours+12:a.isPm===!1&&+a.hours==12&&(a.hours=0));let u;return a.timezoneOffset!=null?(a.minutes=+(a.minutes||0)-+a.timezoneOffset,u=new Date(Date.UTC(a.year||l.getFullYear(),a.month||0,a.day||1,a.hours||0,a.minutes||0,a.seconds||0,a.milliseconds||0))):u=n.getDateFromParts({year:a.year||l.getFullYear(),month:(a.month||0)+1,day:a.day||1,hours:a.hours||0,minutes:a.minutes||0,seconds:a.seconds||0,milliseconds:a.milliseconds||0}),u}).find(o=>o)||new Date(e)}function bT(e,t,n){if(e==null)return"";let o=Cp(t,n)[0];/Z$/.test(o)&&(n.timezone="utc");const r=[];o=o.replace(iT,(a,l)=>(r.push(l),"??"));const i=n.getDateParts(e);return o=o.replace(Np,a=>a in Pd?Pd[a](i,n):a.slice(1,a.length-1)),o.replace(/\?\?/g,()=>r.shift())}let _T=0;class Bp{constructor(t,n,o){fe(this,"key",""),fe(this,"hashcode",""),fe(this,"highlight",null),fe(this,"content",null),fe(this,"dot",null),fe(this,"bar",null),fe(this,"event",null),fe(this,"popover",null),fe(this,"customData",null),fe(this,"ranges"),fe(this,"hasRanges",!1),fe(this,"order",0),fe(this,"pinPage",!1),fe(this,"maxRepeatSpan",0),fe(this,"locale");const{dates:r}=Object.assign(this,{hashcode:"",order:0,pinPage:!1},t);this.key||(this.key=++_T),this.locale=o,n.normalizeGlyphs(this),this.ranges=o.ranges(r??[]),this.hasRanges=!!Jt(this.ranges),this.maxRepeatSpan=this.ranges.filter(i=>i.hasRepeat).map(i=>i.daySpan).reduce((i,a)=>Math.max(i,a),0)}intersectsRange({start:t,end:n}){if(t==null||n==null)return!1;const o=this.ranges.filter(a=>!a.hasRepeat);for(const a of o)if(a.intersectsDayRange(t.dayIndex,n.dayIndex))return!0;const r=this.ranges.filter(a=>a.hasRepeat);if(!r.length)return!1;let i=t;for(this.maxRepeatSpan>1&&(i=this.locale.getDateParts(Ge(i.date,-this.maxRepeatSpan)));i.dayIndex<=n.dayIndex;){for(const a of r)if(a.startsOnDay(i))return!0;i=this.locale.getDateParts(Ge(i.date,1))}return!1}}function il(e){document&&document.dispatchEvent(new CustomEvent("show-popover",{detail:e}))}function $r(e){document&&document.dispatchEvent(new CustomEvent("hide-popover",{detail:e}))}function Yp(e){document&&document.dispatchEvent(new CustomEvent("toggle-popover",{detail:e}))}function Ap(e){const{visibility:t}=e,n=t==="click",o=t==="hover",r=t==="hover-focus",i=t==="focus";e.autoHide=!n;let a=!1,l=!1;const u=m=>{n&&(Yp({...e,target:e.target||m.currentTarget}),m.stopPropagation())},c=m=>{a||(a=!0,(o||r)&&il({...e,target:e.target||m.currentTarget}))},d=()=>{a&&(a=!1,(o||r&&!l)&&$r(e))},f=m=>{l||(l=!0,(i||r)&&il({...e,target:e.target||m.currentTarget}))},h=m=>{l&&!Ni(m.currentTarget,m.relatedTarget)&&(l=!1,(i||r&&!a)&&$r(e))},p={};switch(e.visibility){case"click":p.click=u;break;case"hover":p.mousemove=c,p.mouseleave=d;break;case"focus":p.focusin=f,p.focusout=h;break;case"hover-focus":p.mousemove=c,p.mouseleave=d,p.focusin=f,p.focusout=h;break}return p}const Rd=e=>{const t=Ki(e);if(t==null)return;const n=t.popoverHandlers;!n||!n.length||(n.forEach(o=>o()),delete t.popoverHandlers)},zd=(e,t)=>{const n=Ki(e);if(n==null)return;const o=[],r=Ap(t);Object.entries(r).forEach(([i,a])=>{o.push(En(n,i,a))}),n.popoverHandlers=o},Ip={mounted(e,t){const{value:n}=t;n&&zd(e,n)},updated(e,t){const{oldValue:n,value:o}=t,r=n?.visibility,i=o?.visibility;r!==i&&(r&&(Rd(e),i||$r(n)),i&&zd(e,o))},unmounted(e){Rd(e)}},kT=(e,t,{maxSwipeTime:n,minHorizontalSwipeDistance:o,maxVerticalSwipeDistance:r})=>{if(!e||!e.addEventListener||!ro(t))return null;let i=0,a=0,l=null,u=!1;function c(f){const h=f.changedTouches[0];i=h.screenX,a=h.screenY,l=new Date().getTime(),u=!0}function d(f){if(!u||!l)return;u=!1;const h=f.changedTouches[0],p=h.screenX-i,m=h.screenY-a;if(new Date().getTime()-l<n&&Math.abs(p)>=o&&Math.abs(m)<=r){const v={toLeft:!1,toRight:!1};p<0?v.toLeft=!0:v.toRight=!0,t(v)}}return En(e,"touchstart",c,{passive:!0}),En(e,"touchend",d,{passive:!0}),()=>{xn(e,"touchstart",c),xn(e,"touchend",d)}},$i={},xT=(e,t=10)=>{$i[e]=Date.now()+t},ET=(e,t)=>{if(e in $i){const n=$i[e];if(Date.now()<n)return;delete $i[e]}t()};function Vp(){return typeof window<"u"}function ST(e){return Vp()&&e in window}function DT(e){const t=s.ref(!1),n=s.computed(()=>t.value?"dark":"light");let o,r;function i(p){t.value=p.matches}function a(){ST("matchMedia")&&(o=window.matchMedia("(prefers-color-scheme: dark)"),o.addEventListener("change",i),t.value=o.matches)}function l(){const{selector:p=":root",darkClass:m="dark"}=e.value,v=document.querySelector(p);t.value=v.classList.contains(m)}function u(p){const{selector:m=":root",darkClass:v="dark"}=p;if(Vp()&&m&&v){const w=document.querySelector(m);w&&(r=new MutationObserver(l),r.observe(w,{attributes:!0,attributeFilter:["class"]}),t.value=w.classList.contains(v))}}function c(){f();const p=typeof e.value;p==="string"&&e.value.toLowerCase()==="system"?a():p==="object"?u(e.value):t.value=!!e.value}const d=s.watch(()=>e.value,()=>c(),{immediate:!0});function f(){o&&(o.removeEventListener("change",i),o=void 0),r&&(r.disconnect(),r=void 0)}function h(){f(),d()}return s.onUnmounted(()=>h()),{isDark:t,displayMode:n,cleanup:h}}const MT=["base","start","end","startEnd"],NT=["class","wrapperClass","contentClass","style","contentStyle","color","fillMode"],CT={base:{},start:{},end:{}};function au(e,t,n=CT){let o=e,r={};t===!0||Tt(t)?(o=Tt(t)?t:o,r={...n}):sn(t)&&(wd(t,MT)?r={...t}:r={base:{...t},start:{...t},end:{...t}});const i=Tr(r,{start:r.startEnd,end:r.startEnd},n);return Object.entries(i).forEach(([a,l])=>{let u=o;l===!0||Tt(l)?(u=Tt(l)?l:u,i[a]={color:u}):sn(l)&&(wd(l,NT)?i[a]={...l}:i[a]={}),Tr(i[a],{color:u})}),i}class OT{constructor(){fe(this,"type","highlight")}normalizeConfig(t,n){return au(t,n,{base:{fillMode:"light"},start:{fillMode:"solid"},end:{fillMode:"solid"}})}prepareRender(t){t.highlights=[],t.content||(t.content=[])}render({data:t,onStart:n,onEnd:o},r){const{key:i,highlight:a}=t;if(!a)return;const{highlights:l}=r,{base:u,start:c,end:d}=a;n&&o?l.push({...c,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}`,c.contentClass]}):n?(l.push({...u,key:`${i}-base`,wrapperClass:`vc-day-layer vc-day-box-right-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-start vc-highlight-bg-${u.fillMode}`,u.class]}),l.push({...c,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}`,c.contentClass]})):o?(l.push({...u,key:`${i}-base`,wrapperClass:`vc-day-layer vc-day-box-left-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-end vc-highlight-bg-${u.fillMode}`,u.class]}),l.push({...d,key:i,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${d.color}`,class:[`vc-highlight vc-highlight-bg-${d.fillMode}`,d.class],contentClass:[`vc-attr vc-highlight-content-${d.fillMode} vc-${d.color}`,d.contentClass]})):l.push({...u,key:`${i}-middle`,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-middle vc-highlight-bg-${u.fillMode}`,u.class],contentClass:[`vc-attr vc-highlight-content-${u.fillMode} vc-${u.color}`,u.contentClass]})}}class su{constructor(t,n){fe(this,"type",""),fe(this,"collectionType",""),this.type=t,this.collectionType=n}normalizeConfig(t,n){return au(t,n)}prepareRender(t){t[this.collectionType]=[]}render({data:t,onStart:n,onEnd:o},r){const{key:i}=t,a=t[this.type];if(!i||!a)return;const l=r[this.collectionType],{base:u,start:c,end:d}=a;n?l.push({...c,key:i,class:[`vc-${this.type} vc-${this.type}-start vc-${c.color} vc-attr`,c.class]}):o?l.push({...d,key:i,class:[`vc-${this.type} vc-${this.type}-end vc-${d.color} vc-attr`,d.class]}):l.push({...u,key:i,class:[`vc-${this.type} vc-${this.type}-base vc-${u.color} vc-attr`,u.class]})}}class TT extends su{constructor(){super("content","content")}normalizeConfig(t,n){return au("base",n)}}class $T extends su{constructor(){super("dot","dots")}}class PT extends su{constructor(){super("bar","bars")}}class BT{constructor(t){fe(this,"color"),fe(this,"renderers",[new TT,new OT,new $T,new PT]),this.color=t}normalizeGlyphs(t){this.renderers.forEach(n=>{const o=n.type;t[o]!=null&&(t[o]=n.normalizeConfig(this.color,t[o]))})}prepareRender(t={}){return this.renderers.forEach(n=>{n.prepareRender(t)}),t}render(t,n){this.renderers.forEach(o=>{o.render(t,n)})}}const Rp=Symbol("__vc_base_context__"),zp={color:{type:String,default:()=>Tn("color")},isDark:{type:[Boolean,String,Object],default:()=>Tn("isDark")},firstDayOfWeek:Number,masks:Object,locale:[String,Object],timezone:String,minDate:null,maxDate:null,disabledDates:null};function Lp(e){const t=s.computed(()=>e.color??""),n=s.computed(()=>e.isDark??!1),{displayMode:o}=DT(n),r=s.computed(()=>new BT(t.value)),i=s.computed(()=>{if(e.locale instanceof oa)return e.locale;const h=sn(e.locale)?e.locale:{id:e.locale,firstDayOfWeek:e.firstDayOfWeek,masks:e.masks};return new oa(h,e.timezone)}),a=s.computed(()=>i.value.masks),l=s.computed(()=>e.minDate),u=s.computed(()=>e.maxDate),c=s.computed(()=>{const h=e.disabledDates?[...e.disabledDates]:[];return l.value!=null&&h.push({start:null,end:Ge(i.value.toDate(l.value),-1)}),u.value!=null&&h.push({start:Ge(i.value.toDate(u.value),1),end:null}),i.value.ranges(h)}),d=s.computed(()=>new Bp({key:"disabled",dates:c.value,order:100},r.value,i.value)),f={color:t,isDark:n,displayMode:o,theme:r,locale:i,masks:a,minDate:l,maxDate:u,disabledDates:c,disabledAttribute:d};return s.provide(Rp,f),f}function YT(e){return s.inject(Rp,()=>Lp(e),!0)}function Fp(e){return`__vc_slot_${e}__`}function Hp(e,t={}){Object.keys(e).forEach(n=>{s.provide(Fp(t[n]??n),e[n])})}function jp(e){return s.inject(Fp(e),null)}const AT={...zp,view:{type:String,default:"monthly",validator(e){return["daily","weekly","monthly"].includes(e)}},rows:{type:Number,default:1},columns:{type:Number,default:1},step:Number,titlePosition:{type:String,default:()=>Tn("titlePosition")},navVisibility:{type:String,default:()=>Tn("navVisibility")},showWeeknumbers:[Boolean,String],showIsoWeeknumbers:[Boolean,String],expanded:Boolean,borderless:Boolean,transparent:Boolean,initialPage:Object,initialPagePosition:{type:Number,default:1},minPage:Object,maxPage:Object,transition:String,attributes:Array,trimWeeks:Boolean,disablePageSwipe:Boolean},IT=["dayclick","daymouseenter","daymouseleave","dayfocusin","dayfocusout","daykeydown","weeknumberclick","transition-start","transition-end","did-move","update:view","update:pages"],Wp=Symbol("__vc_calendar_context__");function VT(e,{slots:t,emit:n}){const o=s.ref(null),r=s.ref(null),i=s.ref(new Date().getDate()),a=s.ref(!1),l=s.ref(Symbol()),u=s.ref(Symbol()),c=s.ref(e.view),d=s.ref([]),f=s.ref("");let h=null,p=null;Hp(t);const{theme:m,color:v,displayMode:w,locale:g,masks:b,minDate:y,maxDate:_,disabledAttribute:O,disabledDates:B}=YT(e),$=s.computed(()=>e.rows*e.columns),C=s.computed(()=>e.step||$.value),V=s.computed(()=>hp(d.value)??null),L=s.computed(()=>wo(d.value)??null),I=s.computed(()=>e.minPage||(y.value?W(y.value):null)),x=s.computed(()=>e.maxPage||(_.value?W(_.value):null)),R=s.computed(()=>e.navVisibility),k=s.computed(()=>!!e.showWeeknumbers),N=s.computed(()=>!!e.showIsoWeeknumbers),D=s.computed(()=>c.value==="monthly"),z=s.computed(()=>c.value==="weekly"),F=s.computed(()=>c.value==="daily"),j=()=>{a.value=!0,n("transition-start")},Y=()=>{a.value=!1,n("transition-end"),h&&(h.resolve(!0),h=null)},G=(U,S,H=c.value)=>bp(U,S,H,g.value),W=U=>wp(U,c.value,g.value),le=U=>{!O.value||!we.value||(U.isDisabled=we.value.cellExists(O.value.key,U.dayIndex))},re=U=>{U.isFocusable=U.inMonth&&U.day===i.value},X=(U,S)=>{for(const H of U)for(const ee of H.days)if(S(ee)===!1)return},q=s.computed(()=>d.value.reduce((U,S)=>(U.push(...S.viewDays),U),[])),J=s.computed(()=>{const U=[];return(e.attributes||[]).forEach((S,H)=>{!S||!S.dates||U.push(new Bp({...S,order:S.order||0},m.value,g.value))}),O.value&&U.push(O.value),U}),pe=s.computed(()=>Jt(J.value)),we=s.computed(()=>{const U=new wO;return J.value.forEach(S=>{S.ranges.forEach(H=>{U.render(S,H,q.value)})}),U}),me=s.computed(()=>q.value.reduce((U,S)=>(U[S.dayIndex]={day:S,cells:[]},U[S.dayIndex].cells.push(...we.value.getCells(S)),U),{})),ge=(U,S)=>{const H=e.showWeeknumbers||e.showIsoWeeknumbers;return H==null?"":HD(H)?H?"left":"":H.startsWith("right")?S>1?"right":H:U>1?"left":H},ue=()=>{var U,S;if(!pe.value)return null;const H=J.value.find(Ye=>Ye.pinPage)||J.value[0];if(!H||!H.hasRanges)return null;const[ee]=H.ranges,_e=((U=ee.start)==null?void 0:U.date)||((S=ee.end)==null?void 0:S.date);return _e?W(_e):null},ce=()=>{if($t(V.value))return V.value;const U=ue();return $t(U)?U:W(new Date)},M=(U,S={})=>{const{view:H=c.value,position:ee=1,force:_e}=S,Ye=ee>0?1-ee:-($.value+ee);let Ue=G(U,Ye,H),et=G(Ue,$.value-1,H);return _e||(nl(Ue,I.value)?Ue=I.value:na(et,x.value)&&(Ue=G(x.value,1-$.value)),et=G(Ue,$.value-1)),{fromPage:Ue,toPage:et}},E=(U,S,H="")=>{if(H==="none"||H==="fade")return H;if(U?.view!==S?.view)return"fade";const ee=na(S,U),_e=nl(S,U);return!ee&&!_e?"fade":H==="slide-v"?_e?"slide-down":"slide-up":_e?"slide-right":"slide-left"},T=(U={})=>new Promise((S,H)=>{const{position:ee=1,force:_e=!1,transition:Ye}=U,Ue=$t(U.page)?U.page:ce(),{fromPage:et}=M(Ue,{position:ee,force:_e}),co=[];for(let fo=0;fo<$.value;fo++){const us=G(et,fo),Xe=fo+1,Qo=Math.ceil(Xe/e.columns),cs=e.rows-Qo+1,ho=Xe%e.columns||e.columns,nc=e.columns-ho+1,Og=ge(ho,nc);co.push(g.value.getPage({...us,view:c.value,titlePosition:e.titlePosition,trimWeeks:e.trimWeeks,position:Xe,row:Qo,rowFromEnd:cs,column:ho,columnFromEnd:nc,showWeeknumbers:k.value,showIsoWeeknumbers:N.value,weeknumberPosition:Og}))}f.value=E(d.value[0],co[0],Ye),d.value=co,f.value&&f.value!=="none"?h={resolve:S,reject:H}:S(!0)}),A=U=>{const S=V.value??W(new Date);return G(S,U)},P=(U,S={})=>{const H=$t(U)?U:W(U);return Object.assign(S,M(H,{...S,force:!0})),vO(S.fromPage,S.toPage,c.value,g.value).map(ee=>pO(ee,I.value,x.value)).some(ee=>ee)},Q=(U,S={})=>P(A(U),S),K=s.computed(()=>Q(-C.value)),ae=s.computed(()=>Q(C.value)),oe=async(U,S={})=>!S.force&&!P(U,S)?!1:(S.fromPage&&!mO(S.fromPage,V.value)&&($r({id:l.value,hideDelay:0}),S.view&&(xT("view",10),c.value=S.view),await T({...S,page:S.fromPage,position:1,force:!0}),n("did-move",d.value)),!0),de=(U,S={})=>oe(A(U),S),ve=()=>de(-C.value),be=()=>de(C.value),Fe=U=>{const S=D.value?".in-month":"",H=`.id-${g.value.getDayId(U)}${S}`,ee=`${H}.vc-focusable, ${H} .vc-focusable`,_e=o.value;if(_e){const Ye=_e.querySelector(ee);if(Ye)return Ye.focus(),!0}return!1},Le=async(U,S={})=>Fe(U)?!0:(await oe(U,S),Fe(U)),mn=(U,S)=>{i.value=U.day,n("dayclick",U,S)},Jo=(U,S)=>{n("daymouseenter",U,S)},Yn=(U,S)=>{n("daymouseleave",U,S)},ss=(U,S)=>{i.value=U.day,r.value=U,U.isFocused=!0,n("dayfocusin",U,S)},ri=(U,S)=>{r.value=null,U.isFocused=!1,n("dayfocusout",U,S)},ii=(U,S)=>{n("daykeydown",U,S);const H=U.noonDate;let ee=null;switch(S.key){case"ArrowLeft":{ee=Ge(H,-1);break}case"ArrowRight":{ee=Ge(H,1);break}case"ArrowUp":{ee=Ge(H,-7);break}case"ArrowDown":{ee=Ge(H,7);break}case"Home":{ee=Ge(H,-U.weekdayPosition+1);break}case"End":{ee=Ge(H,U.weekdayPositionFromEnd);break}case"PageUp":{S.altKey?ee=Cd(H,-1):ee=ta(H,-1);break}case"PageDown":{S.altKey?ee=Cd(H,1):ee=ta(H,1);break}}ee&&(S.preventDefault(),Le(ee).catch())},ls=U=>{const S=r.value;S!=null&&ii(S,U)},ai=(U,S)=>{n("weeknumberclick",U,S)};T({page:e.initialPage,position:e.initialPagePosition}),s.onMounted(()=>{!e.disablePageSwipe&&o.value&&(p=kT(o.value,({toLeft:U=!1,toRight:S=!1})=>{U?be():S&&ve()},Tn("touch")))}),s.onUnmounted(()=>{d.value=[],p&&p()}),s.watch(()=>g.value,()=>{T()}),s.watch(()=>$.value,()=>T()),s.watch(()=>e.view,()=>c.value=e.view),s.watch(()=>c.value,()=>{ET("view",()=>{T()}),n("update:view",c.value)}),s.watch(()=>i.value,()=>{X(d.value,U=>re(U))}),s.watchEffect(()=>{n("update:pages",d.value),X(d.value,U=>{le(U),re(U)})});const si={emit:n,containerRef:o,focusedDay:r,inTransition:a,navPopoverId:l,dayPopoverId:u,view:c,pages:d,transitionName:f,theme:m,color:v,displayMode:w,locale:g,masks:b,attributes:J,disabledAttribute:O,disabledDates:B,attributeContext:we,days:q,dayCells:me,count:$,step:C,firstPage:V,lastPage:L,canMovePrev:K,canMoveNext:ae,minPage:I,maxPage:x,isMonthly:D,isWeekly:z,isDaily:F,navVisibility:R,showWeeknumbers:k,showIsoWeeknumbers:N,getDateAddress:W,canMove:P,canMoveBy:Q,move:oe,moveBy:de,movePrev:ve,moveNext:be,onTransitionBeforeEnter:j,onTransitionAfterEnter:Y,tryFocusDate:Fe,focusDate:Le,onKeydown:ls,onDayKeydown:ii,onDayClick:mn,onDayMouseenter:Jo,onDayMouseleave:Yn,onDayFocusin:ss,onDayFocusout:ri,onWeeknumberClick:ai};return s.provide(Wp,si),si}function ao(){const e=s.inject(Wp);if(e)return e;throw new Error("Calendar context missing. Please verify this component is nested within a valid context provider.")}const RT=s.defineComponent({inheritAttrs:!1,emits:["before-show","after-show","before-hide","after-hide"],props:{id:{type:[Number,String,Symbol],required:!0},showDelay:{type:Number,default:0},hideDelay:{type:Number,default:110},boundarySelector:{type:String}},setup(e,{emit:t}){let n;const o=s.ref();let r=null,i=null;const a=s.reactive({isVisible:!1,target:null,data:null,transition:"slide-fade",placement:"bottom",direction:"",positionFixed:!1,modifiers:[],isInteractive:!0,visibility:"click",isHovered:!1,isFocused:!1,autoHide:!1,force:!1});function l(Y){Y&&(a.direction=Y.split("-")[0])}function u({placement:Y,options:G}){l(Y||G?.placement)}const c=s.computed(()=>({placement:a.placement,strategy:a.positionFixed?"fixed":"absolute",boundary:"",modifiers:[{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:u},...a.modifiers||[]],onFirstUpdate:u})),d=s.computed(()=>{const Y=a.direction==="left"||a.direction==="right";let G="";if(a.placement){const W=a.placement.split("-");W.length>1&&(G=W[1])}return["start","top","left"].includes(G)?Y?"top":"left":["end","bottom","right"].includes(G)?Y?"bottom":"right":Y?"middle":"center"});function f(){i&&(i.destroy(),i=null)}function h(){s.nextTick(()=>{const Y=Ki(a.target);!Y||!o.value||(i&&i.state.elements.reference!==Y&&f(),i?i.update():i=B0(Y,o.value,c.value))})}function p(Y){Object.assign(a,mp(Y,"force"))}function m(Y,G){clearTimeout(n),Y>0?n=setTimeout(G,Y):G()}function v(Y){return!Y||!i?!1:Ki(Y)===i.state.elements.reference}async function w(Y={}){a.force||(Y.force&&(a.force=!0),m(Y.showDelay??e.showDelay,()=>{a.isVisible&&(a.force=!1),p({...Y,isVisible:!0}),h()}))}function g(Y={}){i&&(Y.target&&!v(Y.target)||a.force||(Y.force&&(a.force=!0),m(Y.hideDelay??e.hideDelay,()=>{a.isVisible||(a.force=!1),a.isVisible=!1})))}function b(Y={}){Y.target!=null&&(a.isVisible&&v(Y.target)?g(Y):w(Y))}function y(Y){if(!i)return;const G=i.state.elements.reference;if(!o.value||!G)return;const W=Y.target;Ni(o.value,W)||Ni(G,W)||g({force:!0})}function _(Y){(Y.key==="Esc"||Y.key==="Escape")&&g()}function O({detail:Y}){!Y.id||Y.id!==e.id||w(Y)}function B({detail:Y}){!Y.id||Y.id!==e.id||g(Y)}function $({detail:Y}){!Y.id||Y.id!==e.id||b(Y)}function C(){En(document,"keydown",_),En(document,"click",y),En(document,"show-popover",O),En(document,"hide-popover",B),En(document,"toggle-popover",$)}function V(){xn(document,"keydown",_),xn(document,"click",y),xn(document,"show-popover",O),xn(document,"hide-popover",B),xn(document,"toggle-popover",$)}function L(Y){t("before-show",Y)}function I(Y){a.force=!1,t("after-show",Y)}function x(Y){t("before-hide",Y)}function R(Y){a.force=!1,f(),t("after-hide",Y)}function k(Y){Y.stopPropagation()}function N(){a.isHovered=!0,a.isInteractive&&["hover","hover-focus"].includes(a.visibility)&&w()}function D(){if(a.isHovered=!1,!i)return;const Y=i.state.elements.reference;a.autoHide&&!a.isFocused&&(!Y||Y!==document.activeElement)&&["hover","hover-focus"].includes(a.visibility)&&g()}function z(){a.isFocused=!0,a.isInteractive&&["focus","hover-focus"].includes(a.visibility)&&w()}function F(Y){["focus","hover-focus"].includes(a.visibility)&&(!Y.relatedTarget||!Ni(o.value,Y.relatedTarget))&&(a.isFocused=!1,!a.isHovered&&a.autoHide&&g())}function j(){r!=null&&(r.disconnect(),r=null)}return s.watch(()=>o.value,Y=>{j(),Y&&(r=new ResizeObserver(()=>{i&&i.update()}),r.observe(Y))}),s.watch(()=>a.placement,l,{immediate:!0}),s.onMounted(()=>{C()}),s.onUnmounted(()=>{f(),j(),V()}),{...s.toRefs(a),popoverRef:o,alignment:d,hide:g,setupPopper:h,beforeEnter:L,afterEnter:I,beforeLeave:x,afterLeave:R,onClick:k,onMouseOver:N,onMouseLeave:D,onFocusIn:z,onFocusOut:F}}}),so=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};function zT(e,t,n,o,r,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vc-popover-content-wrapper",{"is-interactive":e.isInteractive}]),ref:"popoverRef",onClick:t[0]||(t[0]=(...a)=>e.onClick&&e.onClick(...a)),onMouseover:t[1]||(t[1]=(...a)=>e.onMouseOver&&e.onMouseOver(...a)),onMouseleave:t[2]||(t[2]=(...a)=>e.onMouseLeave&&e.onMouseLeave(...a)),onFocusin:t[3]||(t[3]=(...a)=>e.onFocusIn&&e.onFocusIn(...a)),onFocusout:t[4]||(t[4]=(...a)=>e.onFocusOut&&e.onFocusOut(...a))},[s.createVNode(s.Transition,{name:`vc-${e.transition}`,appear:"",onBeforeEnter:e.beforeEnter,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:s.withCtx(()=>[e.isVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,tabindex:"-1",class:`vc-popover-content direction-${e.direction}`},e.$attrs),[s.renderSlot(e.$slots,"default",{direction:e.direction,alignment:e.alignment,data:e.data,hide:e.hide},()=>[s.createTextVNode(s.toDisplayString(e.data),1)]),s.createElementVNode("span",{class:s.normalizeClass(["vc-popover-caret",`direction-${e.direction}`,`align-${e.alignment}`])},null,2)],16)):s.createCommentVNode("",!0)]),_:3},8,["name","onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],34)}const lu=so(RT,[["render",zT]]),LT={class:"vc-day-popover-row"},FT={key:0,class:"vc-day-popover-row-indicator"},HT={class:"vc-day-popover-row-label"},jT=s.defineComponent({__name:"PopoverRow",props:{attribute:null},setup(e){const t=e,n=s.computed(()=>{const{content:o,highlight:r,dot:i,bar:a,popover:l}=t.attribute;return l&&l.hideIndicator?null:o?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${o.base.color}`}:r?{class:`vc-highlight-bg-solid vc-day-popover-row-highlight vc-attr vc-${r.base.color}`}:i?{class:`vc-dot vc-attr vc-${i.base.color}`}:a?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${a.base.color}`}:null});return(o,r)=>(s.openBlock(),s.createElementBlock("div",LT,[s.unref(n)?(s.openBlock(),s.createElementBlock("div",FT,[s.createElementVNode("span",{class:s.normalizeClass(s.unref(n).class)},null,2)])):s.createCommentVNode("",!0),s.createElementVNode("div",HT,[s.renderSlot(o.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(e.attribute.popover?e.attribute.popover.label:"No content provided"),1)])])]))}}),WT={inheritAttrs:!1},at=s.defineComponent({...WT,__name:"CalendarSlot",props:{name:null},setup(e){const t=jp(e.name);return(n,o)=>s.unref(t)?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(t)),s.normalizeProps(s.mergeProps({key:0},n.$attrs)),null,16)):s.renderSlot(n.$slots,"default",{key:1})}}),UT={class:"vc-day-popover-container"},GT={key:0,class:"vc-day-popover-header"},ZT=s.defineComponent({__name:"CalendarDayPopover",setup(e){const{dayPopoverId:t,displayMode:n,color:o,masks:r,locale:i}=ao();function a(u,c){return i.value.formatDate(u,c)}function l(u){return i.value.formatDate(u.date,r.value.dayPopover)}return(u,c)=>(s.openBlock(),s.createBlock(lu,{id:s.unref(t),class:s.normalizeClass([`vc-${s.unref(o)}`,`vc-${s.unref(n)}`])},{default:s.withCtx(({data:{day:d,attributes:f},hide:h})=>[s.createVNode(at,{name:"day-popover",day:d,"day-title":l(d),attributes:f,format:a,masks:s.unref(r),hide:h},{default:s.withCtx(()=>[s.createElementVNode("div",UT,[s.unref(r).dayPopover?(s.openBlock(),s.createElementBlock("div",GT,s.toDisplayString(l(d)),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f,p=>(s.openBlock(),s.createBlock(jT,{key:p.key,attribute:p},null,8,["attribute"]))),128))])]),_:2},1032,["day","day-title","attributes","masks","hide"])]),_:1},8,["id","class"]))}}),XT={},qT={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},KT=s.createElementVNode("polyline",{points:"9 18 15 12 9 6"},null,-1),JT=[KT];function QT(e,t){return s.openBlock(),s.createElementBlock("svg",qT,JT)}const e2=so(XT,[["render",QT]]),t2={},n2={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},o2=s.createElementVNode("polyline",{points:"15 18 9 12 15 6"},null,-1),r2=[o2];function i2(e,t){return s.openBlock(),s.createElementBlock("svg",n2,r2)}const a2=so(t2,[["render",i2]]),s2={},l2={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},u2=s.createElementVNode("polyline",{points:"6 9 12 15 18 9"},null,-1),c2=[u2];function d2(e,t){return s.openBlock(),s.createElementBlock("svg",l2,c2)}const f2=so(s2,[["render",d2]]),h2={},p2={fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},m2=s.createElementVNode("path",{d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),v2=[m2];function g2(e,t){return s.openBlock(),s.createElementBlock("svg",p2,v2)}const y2=so(h2,[["render",g2]]),w2=Object.freeze(Object.defineProperty({__proto__:null,IconChevronDown:f2,IconChevronLeft:a2,IconChevronRight:e2,IconClock:y2},Symbol.toStringTag,{value:"Module"})),Bo=s.defineComponent({__name:"BaseIcon",props:{name:{type:String,required:!0},width:{type:String},height:{type:String},size:{type:String,default:"26"},viewBox:{type:String}},setup(e){const t=e,n=s.computed(()=>t.width||t.size),o=s.computed(()=>t.height||t.size),r=s.computed(()=>w2[`Icon${t.name}`]);return(i,a)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(r)),{width:s.unref(n),height:s.unref(o),class:"vc-base-icon"},null,8,["width","height"]))}}),b2=["disabled"],_2={key:1,class:"vc-title-wrapper"},k2={type:"button",class:"vc-title"},x2=["disabled"],Up=s.defineComponent({__name:"CalendarHeader",props:{page:null,layout:null,isLg:{type:Boolean},isXl:{type:Boolean},is2xl:{type:Boolean},hideTitle:{type:Boolean},hideArrows:{type:Boolean}},setup(e){const t=e,{navPopoverId:n,navVisibility:o,canMovePrev:r,movePrev:i,canMoveNext:a,moveNext:l}=ao(),u=s.computed(()=>{switch(t.page.titlePosition){case"left":return"bottom-start";case"right":return"bottom-end";default:return"bottom"}}),c=s.computed(()=>{const{page:v}=t;return{id:n.value,visibility:o.value,placement:u.value,modifiers:[{name:"flip",options:{fallbackPlacements:["bottom"]}}],data:{page:v},isInteractive:!0}}),d=s.computed(()=>t.page.titlePosition.includes("left")),f=s.computed(()=>t.page.titlePosition.includes("right")),h=s.computed(()=>t.layout?t.layout:d.value?"tu-pn":f.value?"pn-tu":"p-tu-n;"),p=s.computed(()=>({prev:h.value.includes("p")&&!t.hideArrows,title:h.value.includes("t")&&!t.hideTitle,next:h.value.includes("n")&&!t.hideArrows})),m=s.computed(()=>({gridTemplateColumns:h.value.split("").map(v=>{switch(v){case"p":return"[prev] auto";case"n":return"[next] auto";case"t":return"[title] auto";case"-":return"1fr";default:return""}}).join(" ")}));return(v,w)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vc-header",{"is-lg":e.isLg,"is-xl":e.isXl,"is-2xl":e.is2xl}]),style:s.normalizeStyle(s.unref(m))},[s.unref(p).prev?(s.openBlock(),s.createElementBlock("button",{key:0,type:"button",class:"vc-arrow vc-prev vc-focus",disabled:!s.unref(r),onClick:w[0]||(w[0]=(...g)=>s.unref(i)&&s.unref(i)(...g)),onKeydown:w[1]||(w[1]=s.withKeys((...g)=>s.unref(i)&&s.unref(i)(...g),["space","enter"]))},[s.createVNode(at,{name:"header-prev-button",disabled:!s.unref(r)},{default:s.withCtx(()=>[s.createVNode(Bo,{name:"ChevronLeft",size:"24"})]),_:1},8,["disabled"])],40,b2)):s.createCommentVNode("",!0),s.unref(p).title?(s.openBlock(),s.createElementBlock("div",_2,[s.createVNode(at,{name:"header-title-wrapper"},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createElementBlock("button",k2,[s.createVNode(at,{name:"header-title",title:e.page.title},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(e.page.title),1)]),_:1},8,["title"])])),[[s.unref(Ip),s.unref(c)]])]),_:1})])):s.createCommentVNode("",!0),s.unref(p).next?(s.openBlock(),s.createElementBlock("button",{key:2,type:"button",class:"vc-arrow vc-next vc-focus",disabled:!s.unref(a),onClick:w[2]||(w[2]=(...g)=>s.unref(l)&&s.unref(l)(...g)),onKeydown:w[3]||(w[3]=s.withKeys((...g)=>s.unref(l)&&s.unref(l)(...g),["space","enter"]))},[s.createVNode(at,{name:"header-next-button",disabled:!s.unref(a)},{default:s.withCtx(()=>[s.createVNode(Bo,{name:"ChevronRight",size:"24"})]),_:1},8,["disabled"])],40,x2)):s.createCommentVNode("",!0)],6))}}),Gp=Symbol("__vc_page_context__");function E2(e){const{locale:t,getDateAddress:n,canMove:o}=ao();function r(l,u){const{month:c,year:d}=n(new Date);return Pp().map((f,h)=>{const p=h+1;return{month:p,year:l,id:hO(p,l),label:t.value.formatDate(f,u),ariaLabel:t.value.formatDate(f,"MMMM"),isActive:p===e.value.month&&l===e.value.year,isCurrent:p===c&&l===d,isDisabled:!o({month:p,year:l},{position:e.value.position})}})}function i(l,u){const{year:c}=n(new Date),{position:d}=e.value,f=[];for(let h=l;h<=u;h+=1){const p=[...Array(12).keys()].some(m=>o({month:m+1,year:h},{position:d}));f.push({year:h,id:h.toString(),label:h.toString(),ariaLabel:h.toString(),isActive:h===e.value.year,isCurrent:h===c,isDisabled:!p})}return f}const a={page:e,getMonthItems:r,getYearItems:i};return s.provide(Gp,a),a}function Zp(){const e=s.inject(Gp);if(e)return e;throw new Error("Page context missing. Please verify this component is nested within a valid context provider.")}const S2={class:"vc-nav-header"},D2=["disabled"],M2=["disabled"],N2={class:"vc-nav-items"},C2=["data-id","aria-label","disabled","onClick","onKeydown"],O2=s.defineComponent({__name:"CalendarNav",setup(e){const{masks:t,move:n}=ao(),{page:o,getMonthItems:r,getYearItems:i}=Zp(),a=s.ref(!0),l=12,u=s.ref(o.value.year),c=s.ref(h(o.value.year)),d=s.ref(null);function f(){setTimeout(()=>{if(d.value==null)return;const W=d.value.querySelector(".vc-nav-item:not(:disabled)");W&&W.focus()},10)}function h(W){return Math.floor(W/l)}function p(){a.value=!a.value}function m(W){return W*l}function v(W){return l*(W+1)-1}function w(){z.value&&(a.value&&b(),_())}function g(){F.value&&(a.value&&y(),O())}function b(){u.value--}function y(){u.value++}function _(){c.value--}function O(){c.value++}const B=s.computed(()=>r(u.value,t.value.navMonths).map(W=>({...W,click:()=>n({month:W.month,year:W.year},{position:o.value.position})}))),$=s.computed(()=>r(u.value-1,t.value.navMonths)),C=s.computed(()=>$.value.some(W=>!W.isDisabled)),V=s.computed(()=>r(u.value+1,t.value.navMonths)),L=s.computed(()=>V.value.some(W=>!W.isDisabled)),I=s.computed(()=>i(m(c.value),v(c.value)).map(W=>({...W,click:()=>{u.value=W.year,a.value=!0,f()}}))),x=s.computed(()=>i(m(c.value-1),v(c.value-1))),R=s.computed(()=>x.value.some(W=>!W.isDisabled)),k=s.computed(()=>i(m(c.value+1),v(c.value+1))),N=s.computed(()=>k.value.some(W=>!W.isDisabled)),D=s.computed(()=>a.value?B.value:I.value),z=s.computed(()=>a.value?C.value:R.value),F=s.computed(()=>a.value?L.value:N.value),j=s.computed(()=>hp(I.value.map(W=>W.year))),Y=s.computed(()=>wo(I.value.map(W=>W.year))),G=s.computed(()=>a.value?u.value:`${j.value} - ${Y.value}`);return s.watchEffect(()=>{u.value=o.value.year,f()}),s.watch(()=>u.value,W=>c.value=h(W)),s.onMounted(()=>f()),(W,le)=>(s.openBlock(),s.createElementBlock("div",{class:"vc-nav-container",ref_key:"navContainer",ref:d},[s.createElementVNode("div",S2,[s.createElementVNode("button",{type:"button",class:"vc-nav-arrow is-left vc-focus",disabled:!s.unref(z),onClick:w,onKeydown:le[0]||(le[0]=re=>s.unref(hi)(re,w))},[s.createVNode(at,{name:"nav-prev-button",move:w,disabled:!s.unref(z)},{default:s.withCtx(()=>[s.createVNode(Bo,{name:"ChevronLeft",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,D2),s.createElementVNode("button",{type:"button",class:"vc-nav-title vc-focus",onClick:p,onKeydown:le[1]||(le[1]=re=>s.unref(hi)(re,p))},s.toDisplayString(s.unref(G)),33),s.createElementVNode("button",{type:"button",class:"vc-nav-arrow is-right vc-focus",disabled:!s.unref(F),onClick:g,onKeydown:le[2]||(le[2]=re=>s.unref(hi)(re,g))},[s.createVNode(at,{name:"nav-next-button",move:g,disabled:!s.unref(F)},{default:s.withCtx(()=>[s.createVNode(Bo,{name:"ChevronRight",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,M2)]),s.createElementVNode("div",N2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(D),re=>(s.openBlock(),s.createElementBlock("button",{key:re.label,type:"button","data-id":re.id,"aria-label":re.ariaLabel,class:s.normalizeClass(["vc-nav-item vc-focus",[re.isActive?"is-active":re.isCurrent?"is-current":""]]),disabled:re.isDisabled,onClick:re.click,onKeydown:X=>s.unref(hi)(X,re.click)},s.toDisplayString(re.label),43,C2))),128))])],512))}}),Xp=s.defineComponent({__name:"CalendarPageProvider",props:{page:null},setup(e){return E2(s.toRef(e,"page")),(t,n)=>s.renderSlot(t.$slots,"default")}}),T2=s.defineComponent({__name:"CalendarNavPopover",setup(e){const{navPopoverId:t,color:n,displayMode:o}=ao();return(r,i)=>(s.openBlock(),s.createBlock(lu,{id:s.unref(t),class:s.normalizeClass(["vc-nav-popover-container",`vc-${s.unref(n)}`,`vc-${s.unref(o)}`])},{default:s.withCtx(({data:a})=>[s.createVNode(Xp,{page:a.page},{default:s.withCtx(()=>[s.createVNode(at,{name:"nav"},{default:s.withCtx(()=>[s.createVNode(O2)]),_:1})]),_:2},1032,["page"])]),_:1},8,["id","class"]))}}),$2=s.defineComponent({directives:{popover:Ip},components:{CalendarSlot:at},props:{day:{type:Object,required:!0}},setup(e){const{locale:t,theme:n,attributeContext:o,dayPopoverId:r,onDayClick:i,onDayMouseenter:a,onDayMouseleave:l,onDayFocusin:u,onDayFocusout:c,onDayKeydown:d}=ao(),f=s.computed(()=>e.day),h=s.computed(()=>o.value.getCells(f.value)),p=s.computed(()=>h.value.map(N=>N.data)),m=s.computed(()=>({...f.value,attributes:p.value,attributeCells:h.value}));function v({data:N},{popovers:D}){const{key:z,customData:F,popover:j}=N;if(!j)return;const Y=dd({key:z,customData:F,attribute:N},{...j},{visibility:j.label?"hover":"click",placement:"bottom",isInteractive:!j.label});D.splice(0,0,Y)}const w=s.computed(()=>{const N={...n.value.prepareRender({}),popovers:[]};return h.value.forEach(D=>{n.value.render(D,N),v(D,N)}),N}),g=s.computed(()=>w.value.highlights),b=s.computed(()=>!!Jt(g.value)),y=s.computed(()=>w.value.content),_=s.computed(()=>w.value.dots),O=s.computed(()=>!!Jt(_.value)),B=s.computed(()=>w.value.bars),$=s.computed(()=>!!Jt(B.value)),C=s.computed(()=>w.value.popovers),V=s.computed(()=>C.value.map(N=>N.attribute)),L=jp("day-content"),I=s.computed(()=>["vc-day",...f.value.classes,{"vc-day-box-center-center":!L},{"is-not-in-month":!e.day.inMonth}]),x=s.computed(()=>{let N;f.value.isFocusable?N="0":N="-1";const D=["vc-day-content vc-focusable vc-focus vc-attr",{"vc-disabled":f.value.isDisabled},Fn(wo(g.value),"contentClass"),Fn(wo(y.value),"class")||""],z={...Fn(wo(g.value),"contentStyle"),...Fn(wo(y.value),"style")};return{class:D,style:z,tabindex:N,"aria-label":f.value.ariaLabel,"aria-disabled":!!f.value.isDisabled,role:"button"}}),R=s.computed(()=>({click(N){i(m.value,N)},mouseenter(N){a(m.value,N)},mouseleave(N){l(m.value,N)},focusin(N){u(m.value,N)},focusout(N){c(m.value,N)},keydown(N){d(m.value,N)}})),k=s.computed(()=>Jt(C.value)?dd({id:r.value,data:{day:f,attributes:V.value}},...C.value):null);return{attributes:p,attributeCells:h,bars:B,dayClasses:I,dayContentProps:x,dayContentEvents:R,dayPopover:k,glyphs:w,dots:_,hasDots:O,hasBars:$,highlights:g,hasHighlights:b,locale:t,popovers:C}}}),P2={key:0,class:"vc-highlights vc-day-layer"},B2={key:1,class:"vc-day-layer vc-day-box-center-bottom"},Y2={class:"vc-dots"},A2={key:2,class:"vc-day-layer vc-day-box-center-bottom"},I2={class:"vc-bars"};function V2(e,t,n,o,r,i){const a=s.resolveComponent("CalendarSlot"),l=s.resolveDirective("popover");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(e.dayClasses)},[e.hasHighlights?(s.openBlock(),s.createElementBlock("div",P2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.highlights,({key:u,wrapperClass:c,class:d,style:f})=>(s.openBlock(),s.createElementBlock("div",{key:u,class:s.normalizeClass(c)},[s.createElementVNode("div",{class:s.normalizeClass(d),style:s.normalizeStyle(f)},null,6)],2))),128))])):s.createCommentVNode("",!0),s.createVNode(a,{name:"day-content",day:e.day,attributes:e.attributes,"attribute-cells":e.attributeCells,dayProps:e.dayContentProps,dayEvents:e.dayContentEvents,locale:e.locale},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createElementBlock("div",s.mergeProps(e.dayContentProps,s.toHandlers(e.dayContentEvents,!0)),[s.createTextVNode(s.toDisplayString(e.day.label),1)],16)),[[l,e.dayPopover]])]),_:1},8,["day","attributes","attribute-cells","dayProps","dayEvents","locale"]),e.hasDots?(s.openBlock(),s.createElementBlock("div",B2,[s.createElementVNode("div",Y2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.dots,({key:u,class:c,style:d})=>(s.openBlock(),s.createElementBlock("span",{key:u,class:s.normalizeClass(c),style:s.normalizeStyle(d)},null,6))),128))])])):s.createCommentVNode("",!0),e.hasBars?(s.openBlock(),s.createElementBlock("div",A2,[s.createElementVNode("div",I2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.bars,({key:u,class:c,style:d})=>(s.openBlock(),s.createElementBlock("span",{key:u,class:s.normalizeClass(c),style:s.normalizeStyle(d)},null,6))),128))])])):s.createCommentVNode("",!0)],2)}const R2=so($2,[["render",V2]]),z2={class:"vc-weekdays"},L2=["onClick"],F2={inheritAttrs:!1},H2=s.defineComponent({...F2,__name:"CalendarPage",setup(e){const{page:t}=Zp(),{onWeeknumberClick:n}=ao();return(o,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vc-pane",`row-${s.unref(t).row}`,`row-from-end-${s.unref(t).rowFromEnd}`,`column-${s.unref(t).column}`,`column-from-end-${s.unref(t).columnFromEnd}`]),ref:"pane"},[s.createVNode(Up,{page:s.unref(t),"is-lg":"","hide-arrows":""},null,8,["page"]),s.createElementVNode("div",{class:s.normalizeClass(["vc-weeks",{[`vc-show-weeknumbers-${s.unref(t).weeknumberPosition}`]:s.unref(t).weeknumberPosition}])},[s.createElementVNode("div",z2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(t).weekdays,({weekday:i,label:a},l)=>(s.openBlock(),s.createElementBlock("div",{key:l,class:s.normalizeClass(`vc-weekday vc-weekday-${i}`)},s.toDisplayString(a),3))),128))]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(t).viewWeeks,i=>(s.openBlock(),s.createElementBlock("div",{key:`weeknumber-${i.weeknumber}`,class:"vc-week"},[s.unref(t).weeknumberPosition?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["vc-weeknumber",`is-${s.unref(t).weeknumberPosition}`])},[s.createElementVNode("span",{class:s.normalizeClass(["vc-weeknumber-content"]),onClick:a=>s.unref(n)(i,a)},s.toDisplayString(i.weeknumberDisplay),9,L2)],2)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.days,a=>(s.openBlock(),s.createBlock(R2,{key:a.id,day:a},null,8,["day"]))),128))]))),128))],2)],2))}}),j2=s.defineComponent({components:{CalendarHeader:Up,CalendarPage:H2,CalendarNavPopover:T2,CalendarDayPopover:ZT,CalendarPageProvider:Xp,CalendarSlot:at},props:AT,emit:IT,setup(e,{emit:t,slots:n}){return VT(e,{emit:t,slots:n})}}),W2={class:"vc-pane-header-wrapper"};function U2(e,t,n,o,r,i){const a=s.resolveComponent("CalendarHeader"),l=s.resolveComponent("CalendarPage"),u=s.resolveComponent("CalendarSlot"),c=s.resolveComponent("CalendarPageProvider"),d=s.resolveComponent("CalendarDayPopover"),f=s.resolveComponent("CalendarNavPopover");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",s.mergeProps({"data-helptext":"Press the arrow keys to navigate by day, Home and End to navigate to week ends, PageUp and PageDown to navigate by month, Alt+PageUp and Alt+PageDown to navigate by year"},e.$attrs,{class:["vc-container",`vc-${e.view}`,`vc-${e.color}`,`vc-${e.displayMode}`,{"vc-expanded":e.expanded,"vc-bordered":!e.borderless,"vc-transparent":e.transparent}],onMouseup:t[0]||(t[0]=s.withModifiers(()=>{},["prevent"])),ref:"containerRef"}),[s.createElementVNode("div",{class:s.normalizeClass(["vc-pane-container",{"in-transition":e.inTransition}])},[s.createElementVNode("div",W2,[e.firstPage?(s.openBlock(),s.createBlock(a,{key:0,page:e.firstPage,"is-lg":"","hide-title":""},null,8,["page"])):s.createCommentVNode("",!0)]),s.createVNode(s.Transition,{name:`vc-${e.transitionName}`,onBeforeEnter:e.onTransitionBeforeEnter,onAfterEnter:e.onTransitionAfterEnter},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("div",{key:e.pages[0].id,class:"vc-pane-layout",style:s.normalizeStyle({gridTemplateColumns:`repeat(${e.columns}, 1fr)`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.pages,h=>(s.openBlock(),s.createBlock(c,{key:h.id,page:h},{default:s.withCtx(()=>[s.createVNode(u,{name:"page",page:h},{default:s.withCtx(()=>[s.createVNode(l)]),_:2},1032,["page"])]),_:2},1032,["page"]))),128))],4))]),_:1},8,["name","onBeforeEnter","onAfterEnter"]),s.createVNode(u,{name:"footer"})],2)],16),s.createVNode(d),s.createVNode(f)],64)}const G2=so(j2,[["render",U2]]),qp=Symbol("__vc_date_picker_context__"),Z2={...zp,mode:{type:String,default:"date"},modelValue:{type:[Number,String,Date,Object]},modelModifiers:{type:Object,default:()=>({})},rules:[String,Object],is24hr:Boolean,hideTimeHeader:Boolean,timeAccuracy:{type:Number,default:2},isRequired:Boolean,isRange:Boolean,updateOnInput:{type:Boolean,default:()=>Tn("datePicker.updateOnInput")},inputDebounce:{type:Number,default:()=>Tn("datePicker.inputDebounce")},popover:{type:[Boolean,Object],default:!0},dragAttribute:Object,selectAttribute:Object,attributes:[Object,Array]},X2=["update:modelValue","drag","dayclick","daykeydown","popover-will-show","popover-did-show","popover-will-hide","popover-did-hide"];function q2(e,{emit:t,slots:n}){Hp(n,{footer:"dp-footer"});const o=Lp(e),{locale:r,masks:i,disabledAttribute:a}=o,l=s.ref(!1),u=s.ref(Symbol()),c=s.ref(null),d=s.ref(null),f=s.ref(["",""]),h=s.ref(null),p=s.ref(null);let m,v,w=!0;const g=s.computed(()=>e.isRange||e.modelModifiers.range===!0),b=s.computed(()=>g.value&&c.value!=null?c.value.start:null),y=s.computed(()=>g.value&&c.value!=null?c.value.end:null),_=s.computed(()=>e.mode.toLowerCase()==="date"),O=s.computed(()=>e.mode.toLowerCase()==="datetime"),B=s.computed(()=>e.mode.toLowerCase()==="time"),$=s.computed(()=>!!d.value),C=s.computed(()=>{let S="date";e.modelModifiers.number&&(S="number"),e.modelModifiers.string&&(S="string");const H=i.value.modelValue||"iso";return le({type:S,mask:H})}),V=s.computed(()=>Q(d.value??c.value)),L=s.computed(()=>B.value?e.is24hr?i.value.inputTime24hr:i.value.inputTime:O.value?e.is24hr?i.value.inputDateTime24hr:i.value.inputDateTime:i.value.input),I=s.computed(()=>/[Hh]/g.test(L.value)),x=s.computed(()=>/[dD]{1,2}|Do|W{1,4}|M{1,4}|YY(?:YY)?/g.test(L.value)),R=s.computed(()=>{if(I.value&&x.value)return"dateTime";if(x.value)return"date";if(I.value)return"time"}),k=s.computed(()=>{var S;const H=((S=h.value)==null?void 0:S.$el.previousElementSibling)??void 0;return Tr({},e.popover,Tn("datePicker.popover"),{target:H})}),N=s.computed(()=>Ap({...k.value,id:u.value})),D=s.computed(()=>g.value?{start:f.value[0],end:f.value[1]}:f.value[0]),z=s.computed(()=>{const S=["start","end"].map(H=>({input:T(H),change:A(H),keyup:P,...e.popover&&N.value}));return g.value?{start:S[0],end:S[1]}:S[0]}),F=s.computed(()=>{if(!J(c.value))return null;const S={key:"select-drag",...e.selectAttribute,dates:c.value,pinPage:!0},{dot:H,bar:ee,highlight:_e,content:Ye}=S;return!H&&!ee&&!_e&&!Ye&&(S.highlight=!0),S}),j=s.computed(()=>{if(!g.value||!J(d.value))return null;const S={key:"select-drag",...e.dragAttribute,dates:d.value},{dot:H,bar:ee,highlight:_e,content:Ye}=S;return!H&&!ee&&!_e&&!Ye&&(S.highlight={startEnd:{fillMode:"outline"}}),S}),Y=s.computed(()=>{const S=lt(e.attributes)?[...e.attributes]:[];return j.value?S.unshift(j.value):F.value&&S.unshift(F.value),S}),G=s.computed(()=>le(e.rules==="auto"?W():e.rules??{}));function W(){const S={ms:[0,999],sec:[0,59],min:[0,59],hr:[0,23]},H=_.value?0:e.timeAccuracy;return[0,1].map(ee=>{switch(H){case 0:return{hours:S.hr[ee],minutes:S.min[ee],seconds:S.sec[ee],milliseconds:S.ms[ee]};case 1:return{minutes:S.min[ee],seconds:S.sec[ee],milliseconds:S.ms[ee]};case 3:return{milliseconds:S.ms[ee]};case 4:return{};default:return{seconds:S.sec[ee],milliseconds:S.ms[ee]}}})}function le(S){return lt(S)?S.length===1?[S[0],S[0]]:S:[S,S]}function re(S){return le(S).map((H,ee)=>({...H,rules:G.value[ee]}))}function X(S){return S==null?!1:yt(S)?!isNaN(S):ko(S)?!isNaN(S.getTime()):Tt(S)?S!=="":ru(S)}function q(S){return sn(S)&&"start"in S&&"end"in S&&X(S.start??null)&&X(S.end??null)}function J(S){return q(S)||X(S)}function pe(S,H){if(S==null&&H==null)return!0;if(S==null||H==null)return!1;const ee=ko(S),_e=ko(H);return ee&&_e?S.getTime()===H.getTime():ee||_e?!1:pe(S.start,H.start)&&pe(S.end,H.end)}function we(S){return!J(S)||!a.value?!1:a.value.intersectsRange(r.value.range(S))}function me(S,H,ee,_e){if(!J(S))return null;if(q(S)){const Ye=r.value.toDate(S.start,{...H[0],fillDate:b.value??void 0,patch:ee}),Ue=r.value.toDate(S.end,{...H[1],fillDate:y.value??void 0,patch:ee});return ri({start:Ye,end:Ue},_e)}return r.value.toDateOrNull(S,{...H[0],fillDate:c.value,patch:ee})}function ge(S,H){return q(S)?{start:r.value.fromDate(S.start,H[0]),end:r.value.fromDate(S.end,H[1])}:g.value?null:r.value.fromDate(S,H[0])}function ue(S,H={}){return clearTimeout(m),new Promise(ee=>{const{debounce:_e=0,...Ye}=H;_e>0?m=window.setTimeout(()=>{ee(ce(S,Ye))},_e):ee(ce(S,Ye))})}function ce(S,{config:H=C.value,patch:ee="dateTime",clearIfEqual:_e=!1,formatInput:Ye=!0,hidePopover:Ue=!1,dragging:et=$.value,targetPriority:co,moveToValue:fo=!1}={}){const us=re(H);let Xe=me(S,us,ee,co);if(we(Xe)){if(et)return null;Xe=c.value,Ue=!1}else Xe==null&&e.isRequired?Xe=c.value:Xe!=null&&pe(c.value,Xe)&&_e&&(Xe=null);const Qo=et?d:c,cs=!pe(Qo.value,Xe);Qo.value=Xe,et||(d.value=null);const ho=ge(Xe,C.value);return cs&&(w=!1,t(et?"drag":"update:modelValue",ho),s.nextTick(()=>w=!0)),Ue&&!et&&Yn(),Ye&&M(),fo&&s.nextTick(()=>ai(co??"start")),ho}function M(){s.nextTick(()=>{const S=re({type:"string",mask:L.value}),H=ge(d.value??c.value,S);g.value?f.value=[H&&H.start,H&&H.end]:f.value=[H,""]})}function E(S,H,ee){f.value.splice(H==="start"?0:1,1,S);const _e=g.value?{start:f.value[0],end:f.value[1]||f.value[0]}:S,Ye={type:"string",mask:L.value};ue(_e,{...ee,config:Ye,patch:R.value,targetPriority:H,moveToValue:!0})}function T(S){return H=>{e.updateOnInput&&E(H.currentTarget.value,S,{formatInput:!1,hidePopover:!1,debounce:e.inputDebounce})}}function A(S){return H=>{E(H.currentTarget.value,S,{formatInput:!0,hidePopover:!1})}}function P(S){S.key==="Escape"&&ue(c.value,{formatInput:!0,hidePopover:!0})}function Q(S){return g.value?[S&&S.start?r.value.getDateParts(S.start):null,S&&S.end?r.value.getDateParts(S.end):null]:[S?r.value.getDateParts(S):null]}function K(){d.value=null,M()}function ae(S){t("popover-will-show",S)}function oe(S){t("popover-did-show",S)}function de(S){K(),t("popover-will-hide",S)}function ve(S){t("popover-did-hide",S)}function be(S){const H={patch:"date",formatInput:!0,hidePopover:!0};if(g.value){const ee=!$.value;ee?v={start:S.startDate,end:S.endDate}:v!=null&&(v.end=S.date),ue(v,{...H,dragging:ee})}else ue(S.date,{...H,clearIfEqual:!e.isRequired})}function Fe(S,H){be(S),t("dayclick",S,H)}function Le(S,H){switch(H.key){case" ":case"Enter":{be(S),H.preventDefault();break}case"Escape":Yn()}t("daykeydown",S,H)}function mn(S,H){!$.value||v==null||(v.end=S.date,ue(ri(v),{patch:"date",formatInput:!0}))}function Jo(S={}){il({...k.value,...S,isInteractive:!0,id:u.value})}function Yn(S={}){$r({hideDelay:10,force:!0,...k.value,...S,id:u.value})}function ss(S){Yp({...k.value,...S,isInteractive:!0,id:u.value})}function ri(S,H){const{start:ee,end:_e}=S;if(ee>_e)switch(H){case"start":return{start:ee,end:ee};case"end":return{start:_e,end:_e};default:return{start:_e,end:ee}}return{start:ee,end:_e}}async function ii(S,H={}){return p.value==null?!1:p.value.move(S,H)}async function ls(S,H={}){return p.value==null?!1:p.value.moveBy(S,H)}async function ai(S,H={}){const ee=c.value;if(p.value==null||!J(ee))return!1;const _e=S!=="end",Ye=_e?1:-1,Ue=q(ee)?_e?ee.start:ee.end:ee,et=wp(Ue,"monthly",r.value);return p.value.move(et,{position:Ye,...H})}s.watch(()=>e.isRange,S=>{S&&console.warn("The `is-range` prop will be deprecated in future releases. Please use the `range` modifier.")},{immediate:!0}),s.watch(()=>g.value,()=>{ce(null,{formatInput:!0})}),s.watch(()=>L.value,()=>M()),s.watch(()=>e.modelValue,S=>{w&&ce(S,{formatInput:!0,hidePopover:!1})}),s.watch(()=>G.value,()=>{sn(e.rules)&&ce(e.modelValue,{formatInput:!0,hidePopover:!1})}),s.watch(()=>e.timezone,()=>{ce(c.value,{formatInput:!0})});const si=le(C.value);c.value=me(e.modelValue??null,si,"dateTime"),s.onMounted(()=>{ce(e.modelValue,{formatInput:!0,hidePopover:!1})}),s.nextTick(()=>l.value=!0);const U={...o,showCalendar:l,datePickerPopoverId:u,popoverRef:h,popoverEvents:N,calendarRef:p,isRange:g,isTimeMode:B,isDateTimeMode:O,is24hr:s.toRef(e,"is24hr"),hideTimeHeader:s.toRef(e,"hideTimeHeader"),timeAccuracy:s.toRef(e,"timeAccuracy"),isDragging:$,inputValue:D,inputEvents:z,dateParts:V,attributes:Y,rules:G,move:ii,moveBy:ls,moveToValue:ai,updateValue:ue,showPopover:Jo,hidePopover:Yn,togglePopover:ss,onDayClick:Fe,onDayKeydown:Le,onDayMouseEnter:mn,onPopoverBeforeShow:ae,onPopoverAfterShow:oe,onPopoverBeforeHide:de,onPopoverAfterHide:ve};return s.provide(qp,U),U}function uu(){const e=s.inject(qp);if(e)return e;throw new Error("DatePicker context missing. Please verify this component is nested within a valid context provider.")}const K2=[{value:0,label:"12"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"},{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"},{value:10,label:"10"},{value:11,label:"11"}],J2=[{value:12,label:"12"},{value:13,label:"1"},{value:14,label:"2"},{value:15,label:"3"},{value:16,label:"4"},{value:17,label:"5"},{value:18,label:"6"},{value:19,label:"7"},{value:20,label:"8"},{value:21,label:"9"},{value:22,label:"10"},{value:23,label:"11"}];function Q2(e){const t=uu(),{locale:n,isRange:o,isTimeMode:r,dateParts:i,rules:a,is24hr:l,hideTimeHeader:u,timeAccuracy:c,updateValue:d}=t;function f(x){x=Object.assign(p.value,x);let R=null;if(o.value){const k=h.value?x:i.value[0],N=h.value?i.value[1]:x;R={start:k,end:N}}else R=x;d(R,{patch:"time",targetPriority:h.value?"start":"end",moveToValue:!0})}const h=s.computed(()=>e.position===0),p=s.computed(()=>i.value[e.position]||{isValid:!1}),m=s.computed(()=>ru(p.value)),v=s.computed(()=>!!p.value.isValid),w=s.computed(()=>!u.value&&v.value),g=s.computed(()=>{if(!m.value)return null;let x=n.value.toDate(p.value);return p.value.hours===24&&(x=new Date(x.getTime()-1)),x}),b=s.computed({get(){return p.value.hours},set(x){f({hours:x})}}),y=s.computed({get(){return p.value.minutes},set(x){f({minutes:x})}}),_=s.computed({get(){return p.value.seconds},set(x){f({seconds:x})}}),O=s.computed({get(){return p.value.milliseconds},set(x){f({milliseconds:x})}}),B=s.computed({get(){return p.value.hours<12},set(x){x=String(x).toLowerCase()=="true";let R=b.value;x&&R>=12?R-=12:!x&&R<12&&(R+=12),f({hours:R})}}),$=s.computed(()=>gT(p.value,a.value[e.position])),C=s.computed(()=>K2.filter(x=>$.value.hours.some(R=>R.value===x.value))),V=s.computed(()=>J2.filter(x=>$.value.hours.some(R=>R.value===x.value))),L=s.computed(()=>l.value?$.value.hours:B.value?C.value:V.value),I=s.computed(()=>{const x=[];return Jt(C.value)&&x.push({value:!0,label:"AM"}),Jt(V.value)&&x.push({value:!1,label:"PM"}),x});return{...t,showHeader:w,timeAccuracy:c,parts:p,isValid:v,date:g,hours:b,minutes:y,seconds:_,milliseconds:O,options:$,hourOptions:L,isAM:B,isAMOptions:I,is24hr:l}}const e$=["value"],t$=["value","disabled"],n$={key:1,class:"vc-base-sizer","aria-hidden":"true"},o$={inheritAttrs:!1},or=s.defineComponent({...o$,__name:"BaseSelect",props:{options:null,modelValue:null,alignRight:{type:Boolean},alignLeft:{type:Boolean},showIcon:{type:Boolean},fitContent:{type:Boolean}},emits:["update:modelValue"],setup(e){const t=e,n=s.computed(()=>t.options.find(r=>r.value===t.modelValue)?.label);return(o,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vc-base-select",{"vc-fit-content":e.fitContent,"vc-has-icon":e.showIcon}])},[s.createElementVNode("select",s.mergeProps(o.$attrs,{value:e.modelValue,class:["vc-focus",{"vc-align-right":e.alignRight,"vc-align-left":e.alignLeft}],onChange:r[0]||(r[0]=i=>o.$emit("update:modelValue",i.target.value))}),[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.options,i=>(s.openBlock(),s.createElementBlock("option",{key:i.value,value:i.value,disabled:i.disabled},s.toDisplayString(i.label),9,t$))),128))],16,e$),e.showIcon?(s.openBlock(),s.createBlock(Bo,{key:0,name:"ChevronDown",size:"18"})):s.createCommentVNode("",!0),e.fitContent?(s.openBlock(),s.createElementBlock("div",n$,s.toDisplayString(s.unref(n)),1)):s.createCommentVNode("",!0)],2))}}),r$={key:0,class:"vc-time-header"},i$={class:"vc-time-weekday"},a$={class:"vc-time-month"},s$={class:"vc-time-day"},l$={class:"vc-time-year"},u$={class:"vc-time-select-group"},c$=s.createElementVNode("span",{class:"vc-time-colon"},":",-1),d$=s.createElementVNode("span",{class:"vc-time-colon"},":",-1),f$=s.createElementVNode("span",{class:"vc-time-decimal"},".",-1),Ld=s.defineComponent({__name:"TimePicker",props:{position:null},setup(e,{expose:t}){const n=Q2(e);t(n);const{locale:o,isValid:r,date:i,hours:a,minutes:l,seconds:u,milliseconds:c,options:d,hourOptions:f,isTimeMode:h,isAM:p,isAMOptions:m,is24hr:v,showHeader:w,timeAccuracy:g}=n;return(b,y)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vc-time-picker",[{"vc-invalid":!s.unref(r),"vc-attached":!s.unref(h)}]])},[s.createVNode(at,{name:"time-header"},{default:s.withCtx(()=>[s.unref(w)&&s.unref(i)?(s.openBlock(),s.createElementBlock("div",r$,[s.createElementVNode("span",i$,s.toDisplayString(s.unref(o).formatDate(s.unref(i),"WWW")),1),s.createElementVNode("span",a$,s.toDisplayString(s.unref(o).formatDate(s.unref(i),"MMM")),1),s.createElementVNode("span",s$,s.toDisplayString(s.unref(o).formatDate(s.unref(i),"D")),1),s.createElementVNode("span",l$,s.toDisplayString(s.unref(o).formatDate(s.unref(i),"YYYY")),1)])):s.createCommentVNode("",!0)]),_:1}),s.createElementVNode("div",u$,[s.createVNode(Bo,{name:"Clock",size:"17"}),s.createVNode(or,{modelValue:s.unref(a),"onUpdate:modelValue":y[0]||(y[0]=_=>s.isRef(a)?a.value=_:null),modelModifiers:{number:!0},options:s.unref(f),class:"vc-time-select-hours","align-right":""},null,8,["modelValue","options"]),s.unref(g)>1?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[c$,s.createVNode(or,{modelValue:s.unref(l),"onUpdate:modelValue":y[1]||(y[1]=_=>s.isRef(l)?l.value=_:null),modelModifiers:{number:!0},options:s.unref(d).minutes,class:"vc-time-select-minutes","align-left":s.unref(g)===2},null,8,["modelValue","options","align-left"])],64)):s.createCommentVNode("",!0),s.unref(g)>2?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[d$,s.createVNode(or,{modelValue:s.unref(u),"onUpdate:modelValue":y[2]||(y[2]=_=>s.isRef(u)?u.value=_:null),modelModifiers:{number:!0},options:s.unref(d).seconds,class:"vc-time-select-seconds","align-left":s.unref(g)===3},null,8,["modelValue","options","align-left"])],64)):s.createCommentVNode("",!0),s.unref(g)>3?(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[f$,s.createVNode(or,{modelValue:s.unref(c),"onUpdate:modelValue":y[3]||(y[3]=_=>s.isRef(c)?c.value=_:null),modelModifiers:{number:!0},options:s.unref(d).milliseconds,class:"vc-time-select-milliseconds","align-left":""},null,8,["modelValue","options"])],64)):s.createCommentVNode("",!0),s.unref(v)?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(or,{key:3,modelValue:s.unref(p),"onUpdate:modelValue":y[4]||(y[4]=_=>s.isRef(p)?p.value=_:null),options:s.unref(m)},null,8,["modelValue","options"]))])],2))}}),Kp=s.defineComponent({__name:"DatePickerBase",setup(e){const{attributes:t,calendarRef:n,color:o,displayMode:r,isDateTimeMode:i,isTimeMode:a,isRange:l,onDayClick:u,onDayMouseEnter:c,onDayKeydown:d}=uu(),f=l.value?[0,1]:[0];return(h,p)=>s.unref(a)?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`vc-container vc-bordered vc-${s.unref(o)} vc-${s.unref(r)}`)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(f),m=>(s.openBlock(),s.createBlock(Ld,{key:m,position:m},null,8,["position"]))),128))],2)):(s.openBlock(),s.createBlock(G2,{key:1,attributes:s.unref(t),ref_key:"calendarRef",ref:n,onDayclick:s.unref(u),onDaymouseenter:s.unref(c),onDaykeydown:s.unref(d)},{footer:s.withCtx(()=>[s.unref(i)?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(s.unref(f),m=>(s.openBlock(),s.createBlock(Ld,{key:m,position:m},null,8,["position"]))),128)):s.createCommentVNode("",!0),s.createVNode(at,{name:"dp-footer"})]),_:1},8,["attributes","onDayclick","onDaymouseenter","onDaykeydown"]))}}),h$={inheritAttrs:!1},p$=s.defineComponent({...h$,__name:"DatePickerPopover",setup(e){const{datePickerPopoverId:t,color:n,displayMode:o,popoverRef:r,onPopoverBeforeShow:i,onPopoverAfterShow:a,onPopoverBeforeHide:l,onPopoverAfterHide:u}=uu();return(c,d)=>(s.openBlock(),s.createBlock(lu,{id:s.unref(t),placement:"bottom-start",class:s.normalizeClass(`vc-date-picker-content vc-${s.unref(n)} vc-${s.unref(o)}`),ref_key:"popoverRef",ref:r,onBeforeShow:s.unref(i),onAfterShow:s.unref(a),onBeforeHide:s.unref(l),onAfterHide:s.unref(u)},{default:s.withCtx(()=>[s.createVNode(Kp,s.normalizeProps(s.guardReactiveProps(c.$attrs)),null,16)]),_:1},8,["id","class","onBeforeShow","onAfterShow","onBeforeHide","onAfterHide"]))}});s.defineComponent({inheritAttrs:!1,emits:X2,props:Z2,components:{DatePickerBase:Kp,DatePickerPopover:p$},setup(e,t){const n=q2(e,t),o=s.reactive(mp(n,"calendarRef","popoverRef"));return{...n,slotCtx:o}}});var Jp;function ne(){return Jp.apply(null,arguments)}function m$(e){Jp=e}function wt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Gn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Se(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cu(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Se(e,t))return!1;return!0}function qe(e){return e===void 0}function un(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Xr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Qp(e,t){var n=[],o,r=e.length;for(o=0;o<r;++o)n.push(t(e[o],o));return n}function Sn(e,t){for(var n in t)Se(t,n)&&(e[n]=t[n]);return Se(t,"toString")&&(e.toString=t.toString),Se(t,"valueOf")&&(e.valueOf=t.valueOf),e}function jt(e,t,n,o){return km(e,t,n,o,!0).utc()}function v$(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ye(e){return e._pf==null&&(e._pf=v$()),e._pf}var al;Array.prototype.some?al=Array.prototype.some:al=function(e){var t=Object(this),n=t.length>>>0,o;for(o=0;o<n;o++)if(o in t&&e.call(this,t[o],o,t))return!0;return!1};function du(e){var t=null,n=!1,o=e._d&&!isNaN(e._d.getTime());if(o&&(t=ye(e),n=al.call(t.parsedDateParts,function(r){return r!=null}),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(o=o&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=o;else return o;return e._isValid}function Aa(e){var t=jt(NaN);return e!=null?Sn(ye(t),e):ye(t).userInvalidated=!0,t}var Fd=ne.momentProperties=[],_s=!1;function fu(e,t){var n,o,r,i=Fd.length;if(qe(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),qe(t._i)||(e._i=t._i),qe(t._f)||(e._f=t._f),qe(t._l)||(e._l=t._l),qe(t._strict)||(e._strict=t._strict),qe(t._tzm)||(e._tzm=t._tzm),qe(t._isUTC)||(e._isUTC=t._isUTC),qe(t._offset)||(e._offset=t._offset),qe(t._pf)||(e._pf=ye(t)),qe(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)o=Fd[n],r=t[o],qe(r)||(e[o]=r);return e}function qr(e){fu(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),_s===!1&&(_s=!0,ne.updateOffset(this),_s=!1)}function bt(e){return e instanceof qr||e!=null&&e._isAMomentObject!=null}function em(e){ne.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function dt(e,t){var n=!0;return Sn(function(){if(ne.deprecationHandler!=null&&ne.deprecationHandler(null,e),n){var o=[],r,i,a,l=arguments.length;for(i=0;i<l;i++){if(r="",typeof arguments[i]=="object"){r+=`
|
|
2
|
-
[`+
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),Yg=require("pinia"),Pl=require("@opens/gateways/chat-config/builders"),Ig=["top","right","bottom","left"],lc=["start","end"],uc=Ig.reduce((e,t)=>e.concat(t,t+"-"+lc[0],t+"-"+lc[1]),[]),Vr=Math.min,jn=Math.max,zg={left:"right",right:"left",bottom:"top",top:"bottom"},Rg={start:"end",end:"start"};function Zs(e,t,n){return jn(e,Vr(t,n))}function lo(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function kt(e){return e.split("-")[1]}function fh(e){return e==="x"?"y":"x"}function Al(e){return e==="y"?"height":"width"}const Lg=new Set(["top","bottom"]);function tn(e){return Lg.has(Ht(e))?"y":"x"}function Yl(e){return fh(tn(e))}function hh(e,t,n){n===void 0&&(n=!1);const o=kt(e),i=Yl(e),a=Al(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=qi(s)),[s,qi(s)]}function Fg(e){const t=qi(e);return[Zi(e),t,Zi(t)]}function Zi(e){return e.replace(/start|end/g,t=>Rg[t])}const cc=["left","right"],dc=["right","left"],Hg=["top","bottom"],jg=["bottom","top"];function Wg(e,t,n){switch(e){case"top":case"bottom":return n?t?dc:cc:t?cc:dc;case"left":case"right":return t?Hg:jg;default:return[]}}function Ug(e,t,n,o){const i=kt(e);let a=Wg(Ht(e),n==="start",o);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Zi)))),a}function qi(e){return e.replace(/left|right|bottom|top/g,t=>zg[t])}function Gg(e){return{top:0,right:0,bottom:0,left:0,...e}}function ph(e){return typeof e!="number"?Gg(e):{top:e,right:e,bottom:e,left:e}}function _r(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function fc(e,t,n){let{reference:o,floating:i}=e;const a=tn(t),s=Yl(t),l=Al(s),u=Ht(t),c=a==="y",d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let p;switch(u){case"top":p={x:d,y:o.y-i.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(kt(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1);break}return p}const Zg=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=fc(c,o,u),h=o,p={},m=0;for(let g=0;g<l.length;g++){const{name:b,fn:y}=l[g],{x:_,y:w,data:v,reset:N}=await y({x:d,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,f=w??f,p={...p,[b]:{...p[b],...v}},N&&m<=50&&(m++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(c=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:d,y:f}=fc(c,h,u)),g=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function Da(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:a,rects:s,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=lo(t,e),m=ph(p),g=l[h?f==="floating"?"reference":"floating":f],b=_r(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),y=f==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),w=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},v=_r(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:_,strategy:u}):y);return{top:(b.top-v.top+m.top)/w.y,bottom:(v.bottom-b.bottom+m.bottom)/w.y,left:(b.left-v.left+m.left)/w.x,right:(v.right-b.right+m.right)/w.x}}const qg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:a,platform:s,elements:l,middlewareData:u}=t,{element:c,padding:d=0}=lo(e,t)||{};if(c==null)return{};const f=ph(d),h={x:n,y:o},p=Yl(i),m=Al(p),g=await s.getDimensions(c),b=p==="y",y=b?"top":"left",_=b?"bottom":"right",w=b?"clientHeight":"clientWidth",v=a.reference[m]+a.reference[p]-h[p]-a.floating[m],N=h[p]-a.reference[p],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let V=T?T[w]:0;(!V||!await(s.isElement==null?void 0:s.isElement(T)))&&(V=l.floating[w]||a.floating[m]);const $=v/2-N/2,P=V/2-g[m]/2-1,A=Vr(f[y],P),O=Vr(f[_],P),x=A,R=V-g[m]-O,k=V/2-g[m]/2+$,M=Zs(x,k,R),S=!u.arrow&&kt(i)!=null&&k!==M&&a.reference[m]/2-(k<x?A:O)-g[m]/2<0,L=S?k<x?k-x:k-R:0;return{[p]:h[p]+L,data:{[p]:M,centerOffset:k-M-L,...S&&{alignmentOffset:L}},reset:S}}});function Xg(e,t,n){return(e?[...n.filter(o=>kt(o)===e),...n.filter(o=>kt(o)!==e)]:n.filter(o=>Ht(o)===o)).filter(o=>e?kt(o)===e||(t?Zi(o)!==o:!1):!0)}const Kg=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:a,middlewareData:s,placement:l,platform:u,elements:c}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:h=uc,autoAlignment:p=!0,...m}=lo(e,t),g=f!==void 0||h===uc?Xg(f||null,p,h):h,b=await Da(t,m),y=((n=s.autoPlacement)==null?void 0:n.index)||0,_=g[y];if(_==null)return{};const w=hh(_,a,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(l!==_)return{reset:{placement:g[0]}};const v=[b[Ht(_)],b[w[0]],b[w[1]]],N=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:_,overflows:v}],T=g[y+1];if(T)return{data:{index:y+1,overflows:N},reset:{placement:T}};const V=N.map(P=>{const A=kt(P.placement);return[P.placement,A&&d?P.overflows.slice(0,2).reduce((O,x)=>O+x,0):P.overflows[0],P.overflows]}).sort((P,A)=>P[1]-A[1]),$=((i=V.filter(P=>P[2].slice(0,kt(P[0])?2:3).every(A=>A<=0))[0])==null?void 0:i[0])||V[0][0];return $!==l?{data:{index:y+1,overflows:N},reset:{placement:$}}:{}}}},Jg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=lo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Ht(i),_=tn(l),w=Ht(l)===l,v=await(u.isRTL==null?void 0:u.isRTL(c.floating)),N=h||(w||!g?[qi(l)]:Fg(l)),T=m!=="none";!h&&T&&N.push(...Ug(l,g,m,v));const V=[l,...N],$=await Da(t,b),P=[];let A=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&P.push($[y]),f){const k=hh(i,s,v);P.push($[k[0]],$[k[1]])}if(A=[...A,{placement:i,overflows:P}],!P.every(k=>k<=0)){var O,x;const k=(((O=a.flip)==null?void 0:O.index)||0)+1,M=V[k];if(M&&(!(f==="alignment"&&_!==tn(M))||A.every(L=>tn(L.placement)===_?L.overflows[0]>0:!0)))return{data:{index:k,overflows:A},reset:{placement:M}};let S=(x=A.filter(L=>L.overflows[0]<=0).sort((L,F)=>L.overflows[1]-F.overflows[1])[0])==null?void 0:x.placement;if(!S)switch(p){case"bestFit":{var R;const L=(R=A.filter(F=>{if(T){const j=tn(F.placement);return j===_||j==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(j=>j>0).reduce((j,I)=>j+I,0)]).sort((F,j)=>F[1]-j[1])[0])==null?void 0:R[0];L&&(S=L);break}case"initialPlacement":S=l;break}if(i!==S)return{reset:{placement:S}}}return{}}}},Qg=new Set(["left","top"]);async function ey(e,t){const{placement:n,platform:o,elements:i}=e,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=Ht(n),l=kt(n),u=tn(n)==="y",c=Qg.has(s)?-1:1,d=a&&u?-1:1,f=lo(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),u?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const ty=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:a,placement:s,middlewareData:l}=t,u=await ey(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},ny=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:_}=b;return{x:y,y:_}}},...u}=lo(e,t),c={x:n,y:o},d=await Da(t,u),f=tn(Ht(i)),h=fh(f);let p=c[h],m=c[f];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",_=p+d[b],w=p-d[y];p=Zs(_,p,w)}if(s){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=m+d[b],w=m-d[y];m=Zs(_,m,w)}const g=l.fn({...t,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[f]:s}}}}}},oy=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:a,platform:s,elements:l}=t,{apply:u=()=>{},...c}=lo(e,t),d=await Da(t,c),f=Ht(i),h=kt(i),p=tn(i)==="y",{width:m,height:g}=a.floating;let b,y;f==="top"||f==="bottom"?(b=f,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,b=h==="end"?"top":"bottom");const _=g-d.top-d.bottom,w=m-d.left-d.right,v=Vr(g-d[b],_),N=Vr(m-d[y],w),T=!t.middlewareData.shift;let V=v,$=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(V=_),T&&!h){const A=jn(d.left,0),O=jn(d.right,0),x=jn(d.top,0),R=jn(d.bottom,0);p?$=m-2*(A!==0||O!==0?A+O:jn(d.left,d.right)):V=g-2*(x!==0||R!==0?x+R:jn(d.top,d.bottom))}await u({...t,availableWidth:$,availableHeight:V});const P=await s.getDimensions(l.floating);return m!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function ct(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){return ct(e).getComputedStyle(e)}const hc=Math.min,xr=Math.max,Xi=Math.round;function mh(e){const t=zt(e);let n=parseFloat(t.width),o=parseFloat(t.height);const i=e.offsetWidth,a=e.offsetHeight,s=Xi(n)!==i||Xi(o)!==a;return s&&(n=i,o=a),{width:n,height:o,fallback:s}}function An(e){return gh(e)?(e.nodeName||"").toLowerCase():""}let hi;function vh(){if(hi)return hi;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(hi=e.brands.map((t=>t.brand+"/"+t.version)).join(" "),hi):navigator.userAgent}function Rt(e){return e instanceof ct(e).HTMLElement}function $n(e){return e instanceof ct(e).Element}function gh(e){return e instanceof ct(e).Node}function pc(e){return typeof ShadowRoot>"u"?!1:e instanceof ct(e).ShadowRoot||e instanceof ShadowRoot}function Ma(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function ry(e){return["table","td","th"].includes(An(e))}function qs(e){const t=/firefox/i.test(vh()),n=zt(e),o=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!o&&o!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((i=>n.willChange.includes(i)))||["paint","layout","strict","content"].some((i=>{const a=n.contain;return a!=null&&a.includes(i)}))}function yh(){return!/^((?!chrome|android).)*safari/i.test(vh())}function Il(e){return["html","body","#document"].includes(An(e))}function wh(e){return $n(e)?e:e.contextElement}const bh={x:1,y:1};function Co(e){const t=wh(e);if(!Rt(t))return bh;const n=t.getBoundingClientRect(),{width:o,height:i,fallback:a}=mh(t);let s=(a?Xi(n.width):n.width)/o,l=(a?Xi(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}function Or(e,t,n,o){var i,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=wh(e);let u=bh;t&&(o?$n(o)&&(u=Co(o)):u=Co(e));const c=l?ct(l):window,d=!yh()&&n;let f=(s.left+(d&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,h=(s.top+(d&&((a=c.visualViewport)==null?void 0:a.offsetTop)||0))/u.y,p=s.width/u.x,m=s.height/u.y;if(l){const g=ct(l),b=o&&$n(o)?ct(o):o;let y=g.frameElement;for(;y&&o&&b!==g;){const _=Co(y),w=y.getBoundingClientRect(),v=getComputedStyle(y);w.x+=(y.clientLeft+parseFloat(v.paddingLeft))*_.x,w.y+=(y.clientTop+parseFloat(v.paddingTop))*_.y,f*=_.x,h*=_.y,p*=_.x,m*=_.y,f+=w.x,h+=w.y,y=ct(y).frameElement}}return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f,x:f,y:h}}function Bn(e){return((gh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ta(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function _h(e){return Or(Bn(e)).left+Ta(e).scrollLeft}function $r(e){if(An(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pc(e)&&e.host||Bn(e);return pc(t)?t.host:t}function xh(e){const t=$r(e);return Il(t)?t.ownerDocument.body:Rt(t)&&Ma(t)?t:xh(t)}function Ki(e,t){var n;t===void 0&&(t=[]);const o=xh(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=ct(o);return i?t.concat(a,a.visualViewport||[],Ma(o)?o:[]):t.concat(o,Ki(o))}function mc(e,t,n){return t==="viewport"?_r((function(o,i){const a=ct(o),s=Bn(o),l=a.visualViewport;let u=s.clientWidth,c=s.clientHeight,d=0,f=0;if(l){u=l.width,c=l.height;const h=yh();(h||!h&&i==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:u,height:c,x:d,y:f}})(e,n)):$n(t)?_r((function(o,i){const a=Or(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=Rt(o)?Co(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}})(t,n)):_r((function(o){const i=Bn(o),a=Ta(o),s=o.ownerDocument.body,l=xr(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=xr(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let c=-a.scrollLeft+_h(o);const d=-a.scrollTop;return zt(s).direction==="rtl"&&(c+=xr(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Bn(e)))}function vc(e){return Rt(e)&&zt(e).position!=="fixed"?e.offsetParent:null}function gc(e){const t=ct(e);let n=vc(e);for(;n&&ry(n)&&zt(n).position==="static";)n=vc(n);return n&&(An(n)==="html"||An(n)==="body"&&zt(n).position==="static"&&!qs(n))?t:n||(function(o){let i=$r(o);for(;Rt(i)&&!Il(i);){if(qs(i))return i;i=$r(i)}return null})(e)||t}function iy(e,t,n){const o=Rt(t),i=Bn(t),a=Or(e,!0,n==="fixed",t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&n!=="fixed")if((An(t)!=="body"||Ma(i))&&(s=Ta(t)),Rt(t)){const u=Or(t,!0);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&(l.x=_h(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const ay={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const a=n==="clippingAncestors"?(function(c,d){const f=d.get(c);if(f)return f;let h=Ki(c).filter((b=>$n(b)&&An(b)!=="body")),p=null;const m=zt(c).position==="fixed";let g=m?$r(c):c;for(;$n(g)&&!Il(g);){const b=zt(g),y=qs(g);(m?y||p:y||b.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=b:h=h.filter((_=>_!==g)),g=$r(g)}return d.set(c,h),h})(t,this._c):[].concat(n),s=[...a,o],l=s[0],u=s.reduce(((c,d)=>{const f=mc(t,d,i);return c.top=xr(f.top,c.top),c.right=hc(f.right,c.right),c.bottom=hc(f.bottom,c.bottom),c.left=xr(f.left,c.left),c}),mc(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=Rt(n),a=Bn(n);if(n===a)return t;let s={scrollLeft:0,scrollTop:0},l={x:1,y:1};const u={x:0,y:0};if((i||!i&&o!=="fixed")&&((An(n)!=="body"||Ma(a))&&(s=Ta(n)),Rt(n))){const c=Or(n);l=Co(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-s.scrollLeft*l.x+u.x,y:t.y*l.y-s.scrollTop*l.y+u.y}},isElement:$n,getDimensions:function(e){return Rt(e)?mh(e):e.getBoundingClientRect()},getOffsetParent:gc,getDocumentElement:Bn,getScale:Co,async getElementRects(e){let{reference:t,floating:n,strategy:o}=e;const i=this.getOffsetParent||gc,a=this.getDimensions;return{reference:iy(t,await i(n),o),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>zt(e).direction==="rtl"},sy=(e,t,n)=>{const o=new Map,i={platform:ay,...n},a={...i.platform,_c:o};return Zg(e,t,{...i,platform:a})},Kn={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Xs(e,t){let n=Kn.themes[e]||{},o;do o=n[t],typeof o>"u"?n.$extend?n=Kn.themes[n.$extend]||{}:(n=null,o=Kn[t]):n=null;while(n);return o}function ly(e){const t=[e];let n=Kn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Kn.themes[n.$extend]||{}):n=null;while(n);return t.map(o=>`v-popper--theme-${o}`)}function yc(e){const t=[e];let n=Kn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Kn.themes[n.$extend]||{}):n=null;while(n);return t}let Br=!1;if(typeof window<"u"){Br=!1;try{const e=Object.defineProperty({},"passive",{get(){Br=!0}});window.addEventListener("test",null,e)}catch{}}let kh=!1;typeof window<"u"&&typeof navigator<"u"&&(kh=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const uy=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),wc={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},bc={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function _c(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function gs(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const wt=[];let Fn=null;const xc={};function kc(e){let t=xc[e];return t||(t=xc[e]=[]),t}let Ks=function(){};typeof window<"u"&&(Ks=window.Element);function Ee(e){return function(t){return Xs(t.theme,e)}}const ys="__floating-vue__popper",Nh=()=>r.defineComponent({name:"VPopper",provide(){return{[ys]:{parentPopper:this}}},inject:{[ys]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Ee("disabled")},positioningDisabled:{type:Boolean,default:Ee("positioningDisabled")},placement:{type:String,default:Ee("placement"),validator:e=>uy.includes(e)},delay:{type:[String,Number,Object],default:Ee("delay")},distance:{type:[Number,String],default:Ee("distance")},skidding:{type:[Number,String],default:Ee("skidding")},triggers:{type:Array,default:Ee("triggers")},showTriggers:{type:[Array,Function],default:Ee("showTriggers")},hideTriggers:{type:[Array,Function],default:Ee("hideTriggers")},popperTriggers:{type:Array,default:Ee("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Ee("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Ee("popperHideTriggers")},container:{type:[String,Object,Ks,Boolean],default:Ee("container")},boundary:{type:[String,Ks],default:Ee("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Ee("strategy")},autoHide:{type:[Boolean,Function],default:Ee("autoHide")},handleResize:{type:Boolean,default:Ee("handleResize")},instantMove:{type:Boolean,default:Ee("instantMove")},eagerMount:{type:Boolean,default:Ee("eagerMount")},popperClass:{type:[String,Array,Object],default:Ee("popperClass")},computeTransformOrigin:{type:Boolean,default:Ee("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Ee("autoMinSize")},autoSize:{type:[Boolean,String],default:Ee("autoSize")},autoMaxSize:{type:Boolean,default:Ee("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Ee("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Ee("preventOverflow")},overflowPadding:{type:[Number,String],default:Ee("overflowPadding")},arrowPadding:{type:[Number,String],default:Ee("arrowPadding")},arrowOverflow:{type:Boolean,default:Ee("arrowOverflow")},flip:{type:Boolean,default:Ee("flip")},shift:{type:Boolean,default:Ee("shift")},shiftCrossAxis:{type:Boolean,default:Ee("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Ee("noAutoFocus")},disposeTimeout:{type:Number,default:Ee("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ys])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var o,i;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(ty({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(Kg({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(ny({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Jg({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(qg({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:i,middlewareData:a})=>{let s;const{centerOffset:l}=a.arrow;return o.startsWith("top")||o.startsWith("bottom")?s=Math.abs(l)>i.reference.width/2:s=Math.abs(l)>i.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:i,placement:a,middlewareData:s})=>{var l;if((l=s.autoSize)!=null&&l.skip)return{};let u,c;return a.startsWith("top")||a.startsWith("bottom")?u=i.reference.width:c=i.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=c!=null?`${c}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(oy({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:i})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=i!=null?`${i}px`:null}})));const n=await sy(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Fn&&this.instantMove&&Fn.instantMove&&Fn!==this.parentPopper){Fn.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(Fn=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await gs(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ki(this.$_referenceNode),...Ki(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),o=n.parentNode.getBoundingClientRect(),i=t.x+t.width/2-(o.left+n.offsetLeft),a=t.y+t.height/2-(o.top+n.offsetTop);this.result.transformOrigin=`${i}px ${a}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<wt.length;n++)t=wt[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}wt.push(this),document.body.classList.add("v-popper--some-open");for(const t of yc(this.theme))kc(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await gs(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,_c(wt,this),wt.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of yc(this.theme)){const o=kc(n);_c(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}Fn===this&&(Fn=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await gs(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,wc,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],wc,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,bc,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],bc,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(o=>o.addEventListener(t,n,Br?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,o,i){let a=n;o!=null&&(a=typeof o=="function"?o(a):o),a.forEach(s=>{const l=t[s];l&&this.$_registerEventListeners(e,l,i)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:o,eventType:i,handler:a}=n;!e||e===i?o.forEach(s=>s.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const o=n.getAttribute(e);o&&(n.removeAttribute(e),n.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const o=e[n];o==null?t.removeAttribute(n):t.setAttribute(n,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(kr>=e.left&&kr<=e.right&&Nr>=e.top&&Nr<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=kr-kn,o=Nr-Nn,i=t.left+t.width/2-kn+(t.top+t.height/2)-Nn+t.width+t.height,a=kn+n*i,s=Nn+o*i;return pi(kn,Nn,a,s,t.left,t.top,t.left,t.bottom)||pi(kn,Nn,a,s,t.left,t.top,t.right,t.top)||pi(kn,Nn,a,s,t.right,t.top,t.right,t.bottom)||pi(kn,Nn,a,s,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(kh){const e=Br?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Nc(t),e),document.addEventListener("touchend",t=>Ec(t,!0),e)}else window.addEventListener("mousedown",e=>Nc(e),!0),window.addEventListener("click",e=>Ec(e,!1),!0);window.addEventListener("resize",fy)}function Nc(e,t){for(let n=0;n<wt.length;n++){const o=wt[n];try{o.mouseDownContains=o.popperNode().contains(e.target)}catch{}}}function Ec(e,t){cy(e,t)}function cy(e,t){const n={};for(let o=wt.length-1;o>=0;o--){const i=wt[o];try{const a=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Cc(i,a,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&a){let l=i.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let s=i.parentPopper;for(;s&&Cc(s,s.containsGlobalTarget,e);)s.$_handleGlobalClose(e,t),s=s.parentPopper}})}catch{}}}function Cc(e,t,n){return n.closeAllPopover||n.closePopover&&t||dy(e,n)&&!t}function dy(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function fy(){for(let e=0;e<wt.length;e++)wt[e].$_computePosition()}let kn=0,Nn=0,kr=0,Nr=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{kn=kr,Nn=Nr,kr=e.clientX,Nr=e.clientY},Br?{passive:!0}:void 0);function pi(e,t,n,o,i,a,s,l){const u=((s-i)*(t-a)-(l-a)*(e-i))/((l-a)*(n-e)-(s-i)*(o-t)),c=((n-e)*(t-a)-(o-t)*(e-i))/((l-a)*(n-e)-(s-i)*(o-t));return u>=0&&u<=1&&c>=0&&c<=1}const hy={extends:Nh()},zl=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};function py(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",{ref:"reference",class:r.normalizeClass(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[r.renderSlot(e.$slots,"default",r.normalizeProps(r.guardReactiveProps(e.slotData)))],2)}const my=zl(hy,[["render",py]]);function vy(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Vi;function Js(){Js.init||(Js.init=!0,Vi=vy()!==-1)}var Va={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Js(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Vi&&this.$el.appendChild(e),e.data="about:blank",Vi||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Vi&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const gy=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const yy={class:"resize-observer",tabindex:"-1"};r.popScopeId();const wy=gy((e,t,n,o,i,a)=>(r.openBlock(),r.createBlock("div",yy)));Va.render=wy;Va.__scopeId="data-v-b329ee4c";Va.__file="src/components/ResizeObserver.vue";const Eh=(e="theme")=>({computed:{themeClass(){return ly(this[e])}}}),by=r.defineComponent({name:"VPopperContent",components:{ResizeObserver:Va},mixins:[Eh()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),_y=["id","aria-hidden","tabindex","data-popper-placement"],xy={ref:"inner",class:"v-popper__inner"},ky=r.createElementVNode("div",{class:"v-popper__arrow-outer"},null,-1),Ny=r.createElementVNode("div",{class:"v-popper__arrow-inner"},null,-1),Ey=[ky,Ny];function Cy(e,t,n,o,i,a){const s=r.resolveComponent("ResizeObserver");return r.openBlock(),r.createElementBlock("div",{id:e.popperId,ref:"popover",class:r.normalizeClass(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:r.normalizeStyle(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=r.withKeys(l=>e.autoHide&&e.$emit("hide"),["esc"]))},[r.createElementVNode("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=l=>e.autoHide&&e.$emit("hide"))}),r.createElementVNode("div",{class:"v-popper__wrapper",style:r.normalizeStyle(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[r.createElementVNode("div",xy,[e.mounted?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",null,[r.renderSlot(e.$slots,"default")]),e.handleResize?(r.openBlock(),r.createBlock(s,{key:0,onNotify:t[1]||(t[1]=l=>e.$emit("resize",l))})):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)],512),r.createElementVNode("div",{ref:"arrow",class:"v-popper__arrow-container",style:r.normalizeStyle(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Ey,4)],4)],46,_y)}const Ch=zl(by,[["render",Cy]]),Sh={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let Qs=function(){};typeof window<"u"&&(Qs=window.Element);const Sy=r.defineComponent({name:"VPopperWrapper",components:{Popper:my,PopperContent:Ch},mixins:[Sh,Eh("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,Qs,Boolean],default:void 0},boundary:{type:[String,Qs],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Dy(e,t,n,o,i,a){const s=r.resolveComponent("PopperContent"),l=r.resolveComponent("Popper");return r.openBlock(),r.createBlock(l,r.mergeProps({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=u=>e.$emit("update:shown",u)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:r.withCtx(({popperId:u,isShown:c,shouldMountContent:d,skipTransition:f,autoHide:h,show:p,hide:m,handleResize:g,onResize:b,classes:y,result:_})=>[r.renderSlot(e.$slots,"default",{shown:c,show:p,hide:m}),r.createVNode(s,{ref:"popperContent","popper-id":u,theme:e.finalTheme,shown:c,mounted:d,"skip-transition":f,"auto-hide":h,"handle-resize":g,classes:y,result:_,onHide:m,onResize:b},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"popper",{shown:c,hide:m})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const Rl=zl(Sy,[["render",Dy]]),My={...Rl,name:"VDropdown",vPopperTheme:"dropdown"};({...Rl});({...Rl});r.defineComponent({name:"VTooltipDirective",components:{Popper:Nh(),PopperContent:Ch},mixins:[Sh],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Xs(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Xs(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(o=>this.onResult(t,o)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const Ty=My;function Vy(e){const t=r.computed(()=>e.small?"!yu-h-8 !yu-min-h-[2rem]":e.large?"!yu-h-12 !yu-min-h-[3rem]":"!yu-h-10 !yu-min-h-[2.5rem]"),n=r.computed(()=>e.small?"!yu-text-xs":e.large?"!yu-text-base":"!yu-text-sm"),o=r.computed(()=>e.fluid?"!yu-w-full":"yu-w-fit");return{height:t,textSize:n,width:o}}function Oy(e,t){const n=r.computed(()=>({"!yu-font-plus":t.plus,"!yu-font-inter":t.inter,"!yu-font-titillium":t.titillium})),o=r.computed(()=>({"!yu-text-white":t.white,"!yu-text-primary":t.primary,"!yu-text-secondary":t.secondary,"!yu-text-base":t.neutral,"!yu-text-neutral":t.gray})),i=r.computed(()=>({"!yu-font-thin":t.thin,"!yu-font-extralight":t.extralight,"!yu-font-light":t.light,"!yu-font-normal":t.normal,"!yu-font-medium":t.medium,"!yu-font-semibold":t.semibold,"!yu-font-bold":t.bold,"!yu-font-extrabold":t.extrabold,"!yu-font-black":t.black})),a=r.computed(()=>({...{title:{"!yu-text-xl":t.small,"!yu-text-2xl":t.base,"!yu-text-3xl":t.large,"!yu-text-4xl":t.extralarge},subtitle:{"!yu-text-sm":t.small,"!yu-text-md":t.base,"!yu-text-xl":t.large},text:{"!yu-text-xs":t.small,"!yu-text-sm":t.base,"!yu-text-lg":t.large,"!yu-text-xl":t.extralarge}}[e]}));return{fontClass:n,colorClass:o,weightClass:i,sizeClass:a}}const $y=r.defineComponent({__name:"text",props:{inter:{type:Boolean},titillium:{type:Boolean},small:{type:Boolean},base:{type:Boolean},large:{type:Boolean},extralarge:{type:Boolean},thin:{type:Boolean},extralight:{type:Boolean},light:{type:Boolean},normal:{type:Boolean},medium:{type:Boolean},semibold:{type:Boolean},bold:{type:Boolean},extrabold:{type:Boolean},black:{type:Boolean},primary:{type:Boolean},secondary:{type:Boolean},gray:{type:Boolean},white:{type:Boolean},neutral:{type:Boolean}},setup(e){const t=e,{fontClass:n,colorClass:o,weightClass:i,sizeClass:a}=Oy("text",t);return(s,l)=>(r.openBlock(),r.createElementBlock("p",{class:r.normalizeClass(["yu-font-primary yu-text-sm yu-font-normal yu-gray-700",[r.unref(n),r.unref(o),r.unref(i),r.unref(a)]])},[r.renderSlot(s.$slots,"default",{},void 0,!0)],2))}}),By=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},he=By($y,[["__scopeId","data-v-9eb46db3"]]),nn=r.defineComponent({__name:"app-icon",props:{small:Boolean,large:Boolean,extraLarge:Boolean,gray:Boolean,base:Boolean,light:Boolean,dark:Boolean,outlined:Boolean},setup(e){const t=e,n=r.computed(()=>t.small?"!yu-text-xs yu-w-4 yu-h-4":t.large?"!yu-text-2xl yu-w-8 yu-h-8":t.extraLarge?"!yu-text-4xl yu-w-10 yu-h-10":"!yu-text-base yu-w-6 yu-h-6"),o=r.computed(()=>t.dark?"yu-text-neutral-800 dark:yu-text-white":t.light?"yu-text-white dark:yu-text-neutral-800":t.gray?"yu-text-gray-500":""),i=r.computed(()=>t.outlined?"material-symbols-outlined":"material-icons");return(a,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["notranslate yu-flex yu-items-center yu-justify-center yu-text-center",[n.value,o.value,i.value]]),"data-testid":"app-icon"},[r.renderSlot(a.$slots,"default")],2))}}),q=r.defineComponent({__name:"app-group",props:{fit:{type:Boolean},full:{type:Boolean},row:{type:Boolean},col:{type:Boolean},gapNone:{type:Boolean},gapXs:{type:Boolean},gapBase:{type:Boolean},gapSm:{type:Boolean},gapMd:{type:Boolean},gapLg:{type:Boolean},wrap:{type:Boolean},paddingNone:{type:Boolean},paddingBase:{type:Boolean},paddingXs:{type:Boolean},paddingSm:{type:Boolean},paddingMd:{type:Boolean},paddingLg:{type:Boolean},center:{type:Boolean},justifyEnd:{type:Boolean},centerBetween:{type:Boolean},border:{type:Boolean},borderPrimary:{type:Boolean},rounded:{type:Boolean},roundedTop:{type:Boolean},roundedBottom:{type:Boolean},bgPrimary:{type:Boolean},bgWhite:{type:Boolean},divisor:{type:Boolean}},setup(e){const t=e,n=r.computed(()=>t.fit?"yu-w-fit yu-h-fit":t.full?"yu-w-full yu-h-full":""),o=r.computed(()=>t.justifyEnd?"yu-items-end yu-justify-end":t.center?"yu-items-center yu-justify-center":t.centerBetween?"yu-items-center yu-justify-between":""),i=r.computed(()=>t.row?"yu-flex-row":t.col?"yu-flex-col":"yu-flex-row"),a=r.computed(()=>t.gapBase?"yu-gap-4":t.gapXs?"yu-gap-1":t.gapSm?"yu-gap-2":t.gapMd?"yu-gap-6":t.gapLg?"yu-gap-8":t.gapNone?"yu-gap-0":"yu-gap-4"),s=r.computed(()=>t.wrap?"yu-flex-wrap":""),l=r.computed(()=>t.paddingXs?"yu-p-1":t.paddingSm?"yu-p-2":t.paddingBase?"yu-p-4":t.paddingMd?"yu-p-6":t.paddingLg?"yu-p-8":""),u=r.computed(()=>t.border?"yu-border":t.borderPrimary?"yu-border yu-border-primary":""),c=r.computed(()=>t.rounded?"yu-rounded-md":t.roundedTop?"yu-rounded-t-md":t.roundedBottom?"yu-rounded-b-md":""),d=r.computed(()=>t.bgPrimary?"yu-bg-primary":t.bgWhite?"yu-bg-white":""),f=r.computed(()=>t.divisor&&t.col?"yu-divide-y":t.divisor&&t.row?"yu-divide-x":""),h=r.computed(()=>[i.value,a.value,s.value,l.value,o.value,u.value,c.value,d.value,n.value,f.value]);return(p,m)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["yu-flex",h.value])},[r.renderSlot(p.$slots,"default")],2))}}),Py={class:"yu-flex yu-h-full yu-pl-2 yu-z-10 yu-pointer-events-none"},Ay={class:"yu-h-full yu-flex yu-items-center yu-justify-center"},Yy=["type","disabled","maxlength"],We=r.defineComponent({__name:"app-text-input",props:{modelValue:{},type:{},maxLength:{},disabled:{type:Boolean},loading:{type:Boolean},invalid:{type:Boolean},small:{type:Boolean},large:{type:Boolean},fluid:{type:Boolean},round:{type:Boolean},valid:{type:Boolean},block:{type:Boolean},maskFunction:{type:Function},passwordToggle:{type:Boolean}},emits:["update:modelValue","keyup-enter"],setup(e,{expose:t,emit:n}){const o=e,i=r.computed(()=>r.useSlots());function a(T){return!!i.value[T]}const s=r.ref(""),l=r.ref(!1);function u(T){if(!o.maskFunction)return T;try{const V=o.maskFunction(T);return typeof V=="string"?V:T}catch{return T}}r.watch(()=>o.modelValue,T=>{if(T)return o.maskFunction?s.value=u(T):s.value=T},{immediate:!0});const c=n;function d(){return!(l.value||s.value)}const f=r.ref(!1),{height:h,textSize:p,width:m}=Vy(o),g=r.computed(()=>o.invalid?"yu-border-red-500 focus-within:yu-border-red-500":o.valid?"yu-border-green-500 focus-within:yu-border-green-500":"focus-within:yu-border-primary focus-within:yu-border-2"),b=r.computed(()=>o.invalid?"yu-text-red-500":o.valid?"yu-text-green-500":""),y=r.computed(()=>{if(o.small&&d())return"yu-translate-y-1.5 yu-text-xs";if(o.small&&!d())return"-yu-translate-y-1 yu-text-xs";if(o.large&&d())return"yu-translate-y-2 yu-text-base";if(o.large&&!d())return"-yu-translate-y-0 yu-text-sm";if(d())return"yu-translate-y-2 yu-text-sm";if(!d())return"-yu-translate-y-0 yu-text-xs"}),_=r.computed(()=>a("icon")?"yu-pl-8":"yu-pl-2"),w=r.computed(()=>o.block?"yu-rounded-none":o.round?"yu-rounded-full":"yu-rounded-md"),v=r.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":"");function N(T){const V=T.target.value;o.maskFunction?s.value=u(V):s.value=V,c("update:modelValue",s.value)}return t({focus:l,content:s}),(T,V)=>(r.openBlock(),r.createBlock(q,{class:r.normalizeClass(["yu-font-primary",[r.unref(m)]]),col:"","gap-none":""},{default:r.withCtx(()=>[r.createVNode(q,{col:"","gap-sm":""},{default:r.withCtx(()=>[a("label")?(r.openBlock(),r.createBlock(he,{key:0,base:"",medium:""},{default:r.withCtx(()=>[r.renderSlot(T.$slots,"label")]),_:3})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["yu-relative yu-flex yu-flex-col yu-justify-center yu-items-start yu-border yu-border-gray-300 yu-transition yu-w-full",[w.value,v.value,r.unref(h),g.value]])},[r.createElementVNode("div",Py,[r.createElementVNode("div",Ay,[!e.loading&&a("icon")?r.renderSlot(T.$slots,"icon",{key:0}):r.createCommentVNode("",!0),e.loading?(r.openBlock(),r.createBlock(nn,{key:1,class:"yu-animate-spin",outlined:""},{default:r.withCtx(()=>[...V[5]||(V[5]=[r.createTextVNode("progress_activity",-1)])]),_:1})):r.createCommentVNode("",!0)]),r.createVNode(he,{class:r.normalizeClass(["yu-px-2 yu-transition",[y.value]]),medium:"",gray:""},{default:r.withCtx(()=>[r.renderSlot(T.$slots,"default")]),_:3},8,["class"])]),r.withDirectives(r.createElementVNode("input",{class:r.normalizeClass(["yu-absolute yu-w-full yu-h-full yu-outline-none yu-appearance-none yu-indent-2 yu-pt-3 yu-font-medium yu-bg-gray-50 yu-z-0",[r.unref(p),_.value,w.value]]),"onUpdate:modelValue":V[0]||(V[0]=$=>s.value=$),type:e.passwordToggle&&f.value?"text":e.type,onInput:N,onFocus:V[1]||(V[1]=$=>l.value=!0),onBlur:V[2]||(V[2]=$=>l.value=!1),onKeyup:V[3]||(V[3]=r.withKeys($=>c("keyup-enter"),["enter"])),disabled:e.disabled||e.loading,maxlength:e.maxLength},null,42,Yy),[[r.vModelDynamic,s.value]]),r.createVNode(q,{class:"yu-absolute yu-right-2 yu-cursor-pointer yu-text-gray-500 yu-select-none yu-flex yu-items-center"},{default:r.withCtx(()=>[e.maxLength?(r.openBlock(),r.createBlock(q,{key:0},{default:r.withCtx(()=>[r.createVNode(he,{small:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(`${s.value.length} / ${e.maxLength}`),1)]),_:1})]),_:1})):r.createCommentVNode("",!0),e.type==="password"&&e.passwordToggle?(r.openBlock(),r.createBlock(nn,{key:1,onClick:V[4]||(V[4]=$=>f.value=!f.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(f.value?"visibility_off":"visibility"),1)]),_:1})):r.createCommentVNode("",!0),r.renderSlot(T.$slots,"suffix")]),_:3})],2)]),_:3}),a("feedback")?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([b.value])},[r.renderSlot(T.$slots,"feedback")],2)):r.createCommentVNode("",!0)]),_:3},8,["class"]))}});function Iy(e){const t=r.computed(()=>e.small?"!yu-h-8 !yu-min-h-[2rem]":e.large?"!yu-h-12 !yu-min-h-[3rem]":"!yu-h-10 !yu-min-h-[2.5rem]"),n=r.computed(()=>e.small?"!yu-text-xs":e.large?"!yu-text-base":"!yu-text-sm"),o=r.computed(()=>e.fluid?"!yu-w-full":"yu-w-fit");return{height:t,textSize:n,width:o}}const zy=["disabled"],it=r.defineComponent({__name:"app-button",props:{small:Boolean,large:Boolean,soft:Boolean,outline:Boolean,ghost:Boolean,link:Boolean,round:Boolean,icon:Boolean,fluid:Boolean,disabled:Boolean,loading:Boolean,alert:Boolean,warning:Boolean,success:Boolean,block:Boolean},setup(e){const t=e,n=r.computed(()=>r.useSlots());function o(f){return!!n.value[f]}const{height:i,textSize:a,width:s}=Iy(t),l=r.computed(()=>t.soft?"yu-bg-primary-50 !yu-text-primary-400":t.alert?"yu-bg-red-500 !yu-text-white":t.warning?"yu-bg-amber-500 !yu-text-white":t.success?"yu-bg-green-500 !yu-text-white":t.outline?"yu-bg-transparent yu-border yu-border-gray-300 hover:!yu-bg-gray-100":t.ghost?"yu-bg-transparent hover:!yu-bg-gray-100":t.link?"yu-bg-transparent !yu-text-blue-600 hover:yu-underline":"yu-bg-primary-500 yu-text-white"),u=r.computed(()=>t.block?"yu-rounded-none":t.round?"yu-rounded-full":"yu-rounded-lg"),c=r.computed(()=>t.icon&&t.small?"!yu-w-8 !yu-h-8":t.icon&&t.large?"!yu-w-12 !yu-h-12":t.icon?"!yu-w-10 !yu-h-10":"yu-px-3"),d=r.computed(()=>t.disabled||t.loading?"yu-opacity-50 yu-pointer-events-none":"");return(f,h)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["yu-transition-all yu-inline-flex yu-items-center yu-justify-center yu-gap-x-2 active:yu-scale-90 hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80 disabled:yu-opacity-50 disabled:yu-pointer-events-none",[r.unref(a),l.value,u.value,r.unref(s),r.unref(i),d.value,c.value]]),disabled:d.value||e.loading},[!e.loading&&o("icon")?r.renderSlot(f.$slots,"icon",{key:0}):r.createCommentVNode("",!0),e.loading?(r.openBlock(),r.createBlock(nn,{key:1,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:e.small,outlined:""},{default:r.withCtx(()=>[...h[0]||(h[0]=[r.createTextVNode("progress_activity",-1)])]),_:1},8,["small"])):r.createCommentVNode("",!0),o("default")?(r.openBlock(),r.createBlock(he,{key:2,medium:"",small:e.small,base:!e.small},{default:r.withCtx(()=>[r.renderSlot(f.$slots,"default")]),_:3},8,["small","base"])):r.createCommentVNode("",!0)],10,zy))}});function Ry(e){const t=r.computed(()=>e.small?"!yu-h-8 !yu-min-h-[2rem]":e.large?"!yu-h-12 !yu-min-h-[3rem]":"!yu-h-10 !yu-min-h-[2.5rem]"),n=r.computed(()=>e.small?"!yu-text-xs":e.large?"!yu-text-base":"!yu-text-sm"),o=r.computed(()=>e.fluid?"!yu-w-full":"yu-w-fit");return{height:t,textSize:n,width:o}}const Ly=r.defineComponent({__name:"app-select-item",props:{selected:Boolean,small:Boolean,large:Boolean,disabled:Boolean,loading:Boolean,fluid:Boolean,round:Boolean},setup(e){const t=e,n=r.computed(()=>r.useSlots());function o(d){return!!n.value[d]}const{height:i,textSize:a,width:s}=Ry(t),l=r.computed(()=>t.round?"yu-rounded-full":"yu-rounded-lg"),u=r.computed(()=>t.disabled||t.loading?"yu-opacity-50 yu-pointer-events-none":""),c=r.computed(()=>t.fluid?"yu-flex-1 yu-min-w-0":"");return(d,f)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["yu-transition yu-px-2 yu-rounded-md yu-cursor-pointer yu-flex yu-items-center yu-gap-2 yu-justify-between active:yu-scale-95 hover:yu-bg-primary-500 hover:!yu-bg-opacity-10 hover:yu-text-primary-400",[r.unref(a),l.value,r.unref(s),r.unref(i),u.value]])},[r.createElementVNode("div",{class:r.normalizeClass(["yu-flex yu-items-center yu-gap-2",[c.value]])},[!e.loading&&o("icon")?r.renderSlot(d.$slots,"icon",{key:0}):r.createCommentVNode("",!0),e.loading?(r.openBlock(),r.createBlock(nn,{key:1,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:e.small,outlined:""},{default:r.withCtx(()=>[...f[0]||(f[0]=[r.createTextVNode("progress_activity",-1)])]),_:1},8,["small"])):r.createCommentVNode("",!0),o("default")?(r.openBlock(),r.createBlock(he,{key:2,small:e.small,base:!e.small,medium:"",gray:"",class:r.normalizeClass({"yu-w-full yu-flex-1 yu-min-w-0 yu-text-left":c.value})},{default:r.withCtx(()=>[r.renderSlot(d.$slots,"default")]),_:3},8,["small","base","class"])):r.createCommentVNode("",!0)],2),t.selected?(r.openBlock(),r.createBlock(nn,{key:0},{default:r.withCtx(()=>[...f[1]||(f[1]=[r.createTextVNode("check",-1)])]),_:1})):r.createCommentVNode("",!0)],2))}}),Fy=r.defineComponent({__name:"app-observer",props:{options:{type:Object,default:{}}},emits:["intersect"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(),a=r.ref();return r.onMounted(()=>{const s=n.options||{};i.value=new IntersectionObserver(([l])=>{l&&l.isIntersecting&&o("intersect")},s),a.value&&i.value.observe(a.value)}),r.onBeforeUnmount(()=>{i.value.disconnect()}),(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:"observer h-2",ref_key:"observerEl",ref:a},null,512))}});function Hy(e){const t=r.computed(()=>e.small?"!yu-h-8 !yu-min-h-[2rem]":e.large?"!yu-h-12 !yu-min-h-[3rem]":"!yu-h-10 !yu-min-h-[2.5rem]"),n=r.computed(()=>e.small?"!yu-text-xs":e.large?"!yu-text-base":"!yu-text-sm"),o=r.computed(()=>{if(e.fluid)return"yu-w-full";if(e.fit)return"yu-w-fit"});return{height:t,textSize:n,width:o}}const jy=["disabled"],Wy={key:2,class:"yu-overflow-hidden yu-truncate yu-whitespace-nowrap"},Uy=["onClick"],Gy=r.defineComponent({__name:"app-select",props:{small:Boolean,large:Boolean,round:Boolean,fluid:Boolean,fit:{type:Boolean,default:!0},disabled:Boolean,loading:Boolean,multiple:Boolean,filterable:Boolean,confirmFilterable:Boolean,options:Array,autoSize:{type:Boolean,default:!0},autoMinSize:{type:Boolean,default:!1},autoMaxSize:{type:Boolean,default:!1},remote:Boolean,modelValue:{type:[Object,Array],default:null},block:Boolean,ghost:Boolean,icon:Boolean,invalid:Boolean,valid:Boolean,placement:{type:String,default:"bottom-start"}},emits:["update:modelValue","search","intersect"],setup(e,{expose:t,emit:n}){const o=e,i=n,a=r.computed(()=>r.useSlots());function s(O){return!!a.value[O]}const{height:l,textSize:u,width:c}=Hy(o),d=r.computed(()=>o.block?"yu-rounded-none":o.round?"yu-rounded-full":"yu-rounded-lg"),f=r.computed(()=>o.ghost?o.invalid?"yu-bg-transparent hover:!yu-bg-gray-100 yu-border yu-border-red-500 focus-within:yu-border-red-500":o.valid?"yu-bg-transparent hover:!yu-bg-gray-100 yu-border yu-border-green-500 focus-within:yu-border-green-500":"yu-bg-transparent hover:!yu-bg-gray-100":o.invalid?"yu-border yu-border-red-500 focus-within:yu-border-red-500":o.valid?"yu-border yu-border-green-500 focus-within:yu-border-green-500":"yu-border yu-border-gray-300"),h=r.computed(()=>o.disabled||o.loading?"yu-opacity-50 yu-pointer-events-none":""),p=r.computed(()=>o.invalid?"yu-text-red-500":o.valid?"yu-text-green-500":""),m=r.computed(()=>o.icon&&o.small?"!yu-w-8 !yu-h-8 !yu-justify-center":o.icon&&o.large?"!yu-w-12 !yu-h-12 !yu-justify-center":o.icon?"!yu-w-10 !yu-h-10 !yu-justify-center":"!yu-px-3 !yu-justify-between"),g=r.ref(!1),b=r.ref(""),y=r.ref(""),_=()=>{b.value=y.value};r.watch(y,O=>{o.confirmFilterable||(b.value=O)}),r.watch(b,O=>{o.remote&&i("search",O)});const w=r.computed(()=>{if(o.remote)return o.options||[];if(!o.options)return[];if(!b?.value)return o.options;const O=b?.value?.toLowerCase();return o.options.filter(x=>x.label.toLowerCase().includes(O)||x.value.toLowerCase().includes(O))}),v=r.ref([]),N=r.ref(null);r.computed(()=>v.value.map(O=>O.value));const T=O=>o.multiple?v.value.find(x=>x.value===O.value):N.value?.value===O.value,V=O=>{if(!o.multiple)return N.value?.value===O.value?(N.value=null,g.value=!1):(N.value=O,g.value=!1);if(v.value.find(x=>x.value===O.value))return v.value=v.value.filter(x=>x.value!==O.value);v.value=[...v.value,O]},$=()=>{v.value=[]},P=()=>{o.options&&(v.value=w.value)};r.watch(v,O=>{i("update:modelValue",O)}),r.watch(N,O=>{i("update:modelValue",O)}),r.onMounted(()=>{o.modelValue&&(o.multiple?v.value=o.modelValue:N.value=o.modelValue)});const A=r.computed(()=>o.multiple?v.value.length?v.value.length===1?v.value[0].label:v.value.map(O=>O.label).join(", "):null:N.value?.label||null);return t({pendingSearchTerm:y,selectedItems:v,selectedItem:N,displayText:A,optionsList:w,searchTerm:b,opened:g,confirmSearch:_,handleSelect:V,unselectAll:$,selectAll:P}),(O,x)=>(r.openBlock(),r.createBlock(q,{"data-testid":"app-select-wrapper",class:r.normalizeClass([r.unref(c)]),"gap-none":"",col:""},{default:r.withCtx(()=>[r.createVNode(q,{col:"","gap-sm":""},{default:r.withCtx(()=>[s("label")?(r.openBlock(),r.createBlock(he,{key:0,medium:"",small:e.small,base:!e.small},{default:r.withCtx(()=>[r.renderSlot(O.$slots,"label")]),_:3},8,["small","base"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Ty),{"onUpdate:shown":x[2]||(x[2]=R=>g.value=R),placement:e.placement,"auto-min-size":e.autoMinSize,"auto-max-size":e.autoMaxSize,"auto-size":e.autoSize,shown:g.value,class:r.normalizeClass([r.unref(c)])},{popper:r.withCtx(()=>[r.createVNode(q,{col:"","gap-sm":"","padding-sm":""},{default:r.withCtx(()=>[s("filter")?r.renderSlot(O.$slots,"filter",{key:0}):r.createCommentVNode("",!0),!s("filter")&&(e.filterable||e.confirmFilterable)?(r.openBlock(),r.createBlock(We,{key:1,onKeyupEnter:_,modelValue:y.value,"onUpdate:modelValue":x[0]||(x[0]=R=>y.value=R),small:e.small,fluid:""},{icon:r.withCtx(()=>[r.createVNode(nn,null,{default:r.withCtx(()=>[...x[5]||(x[5]=[r.createTextVNode("search",-1)])]),_:1})]),suffix:r.withCtx(()=>[e.confirmFilterable?(r.openBlock(),r.createBlock(it,{key:0,onClick:_,disabled:y.value===b.value,small:"",icon:""},{icon:r.withCtx(()=>[r.createVNode(nn,null,{default:r.withCtx(()=>[...x[6]||(x[6]=[r.createTextVNode("search",-1)])]),_:1})]),_:1},8,["disabled"])):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.confirmFilterable?"Pesquisar (Aperte Enter para buscar ou clique no botão de lupa)":"Pesquisar"),1)]),_:1},8,["modelValue","small"])):r.createCommentVNode("",!0),r.createVNode(q,{class:"yu-max-h-72 yu-overflow-y-auto",col:"","gap-sm":""},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(R,k)=>(r.openBlock(),r.createElementBlock("div",{key:k,onClick:M=>V(R)},[s("item")?r.renderSlot(O.$slots,"item",{key:0,item:R,selected:T(R)}):r.createCommentVNode("",!0),e.remote&&k===w.value.length-1?(r.openBlock(),r.createBlock(Fy,{key:1,onIntersect:x[1]||(x[1]=M=>i("intersect"))})):r.createCommentVNode("",!0),s("item")?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(Ly,{key:2,selected:T(R),small:e.small,fluid:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(R.label),1)]),_:2},1032,["selected","small"]))],8,Uy))),128)),w.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(q,{key:0,"padding-sm":"",center:""},{default:r.withCtx(()=>[r.createVNode(he,{gray:""},{default:r.withCtx(()=>[...x[7]||(x[7]=[r.createTextVNode("Nenhuma opção encontrada",-1)])]),_:1})]),_:1}))]),_:3}),s("options")?(r.openBlock(),r.createBlock(q,{key:2,center:""},{default:r.withCtx(()=>[r.renderSlot(O.$slots,"options",{unselectAll:$,selectAll:P})]),_:3})):r.createCommentVNode("",!0)]),_:3})]),default:r.withCtx(()=>[r.createVNode(q,{class:r.normalizeClass(["yu-w-full",{"yu-pointer-events-none":h.value||e.loading}]),col:"","gap-sm":"","data-testid":"app-select-content"},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["yu-w-full yu-cursor-pointer yu-transition-all yu-flex yu-items-center hover:!yu-bg-gray-100 yu-gap-x-2 hover:yu-opacity-80 focus:yu-outline-hidden focus:yu-opacity-80 disabled:yu-opacity-50 disabled:yu-pointer-events-none",[r.unref(u),d.value,r.unref(c),r.unref(l),h.value,f.value,m.value]]),disabled:h.value||e.loading},[r.createVNode(q,{class:"yu-items-center yu-overflow-hidden yu-truncate yu-whitespace-nowrap","gap-sm":""},{default:r.withCtx(()=>[s("icon")&&!e.loading?r.renderSlot(O.$slots,"icon",{key:0}):r.createCommentVNode("",!0),e.loading?(r.openBlock(),r.createBlock(nn,{key:1,class:"yu-animate-spin yu-flex yu-items-center yu-justify-center",small:e.small,outlined:""},{default:r.withCtx(()=>[...x[3]||(x[3]=[r.createTextVNode("progress_activity",-1)])]),_:1},8,["small"])):r.createCommentVNode("",!0),e.icon?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Wy,[s("value")?r.renderSlot(O.$slots,"value",{key:0}):A.value?(r.openBlock(),r.createBlock(he,{key:1,class:"yu-truncate yu-overflow-hidden yu-whitespace-nowrap yu-block yu-max-w-full",medium:"",small:e.small,base:!e.small},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(A.value),1)]),_:1},8,["small","base"])):(r.openBlock(),r.createBlock(he,{key:2,class:"yu-truncate yu-overflow-hidden yu-whitespace-nowrap yu-block yu-max-w-full",medium:"",small:e.small,base:!e.small},{default:r.withCtx(()=>[r.renderSlot(O.$slots,"default")]),_:3},8,["small","base"]))]))]),_:3}),e.icon?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(nn,{key:0,class:r.normalizeClass(["yu-transition-all",{"yu-rotate-180":g.value}])},{default:r.withCtx(()=>[...x[4]||(x[4]=[r.createTextVNode("keyboard_arrow_down",-1)])]),_:1},8,["class"]))],10,jy)]),_:3},8,["class"])]),_:3},8,["placement","auto-min-size","auto-max-size","auto-size","shown","class"])]),_:3}),s("feedback")?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([p.value])},[r.renderSlot(O.$slots,"feedback")],2)):r.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Zy=["disabled"],qy=["disabled"],Tn=r.defineComponent({__name:"app-switch",props:{modelValue:{type:Boolean,default:!1},small:Boolean,round:{type:Boolean,default:!0},disabled:Boolean},emits:["update:modelValue"],setup(e,{emit:t}){const n=r.useSlots(),o=r.computed(()=>!!n.default),i=e,a=t,s=r.computed(()=>i.small?"yu-h-5 yu-w-9":"yu-h-6 yu-w-11"),l=r.computed(()=>i.small?"yu-h-4 yu-w-4":"yu-h-5 yu-w-5"),u=r.computed(()=>i.modelValue?i.small?"yu-translate-x-4":"yu-translate-x-5":"yu-translate-x-0"),c=r.computed(()=>i.round?"yu-rounded-full":"yu-rounded-md"),d=r.computed(()=>i.disabled?"yu-opacity-50 yu-pointer-events-none":""),f=r.computed(()=>i.modelValue?"yu-bg-primary-500":"yu-bg-gray-200");return(h,p)=>o.value?(r.openBlock(),r.createBlock(q,{key:0,wrap:"","data-testid":"app-switch-group"},{default:r.withCtx(()=>[r.createElementVNode("button",{type:"button",class:r.normalizeClass([s.value,c.value,f.value,d.value,"yu-relative yu-inline-flex yu-flex-shrink-0 yu-cursor-pointer yu-border-2 yu-border-transparent yu-transition-colors yu-duration-200 yu-ease-in-out"]),disabled:e.disabled,onClick:p[0]||(p[0]=m=>a("update:modelValue",!e.modelValue))},[r.createElementVNode("span",{"aria-hidden":"true",class:r.normalizeClass([l.value,u.value,c.value,"yu-pointer-events-none yu-inline-block yu-transform yu-ring-0 yu-transition yu-duration-200 yu-ease-in-out yu-bg-white"])},null,2)],10,Zy),r.createVNode(he,{"data-testid":"app-switch-label"},{default:r.withCtx(()=>[r.renderSlot(h.$slots,"default")]),_:3})]),_:3})):(r.openBlock(),r.createElementBlock("button",{key:1,type:"button",class:r.normalizeClass([s.value,c.value,f.value,d.value,"yu-relative yu-inline-flex yu-flex-shrink-0 yu-cursor-pointer yu-border-2 yu-border-transparent yu-transition-colors yu-duration-200 yu-ease-in-out"]),disabled:e.disabled,onClick:p[1]||(p[1]=m=>a("update:modelValue",!e.modelValue))},[r.createElementVNode("span",{"aria-hidden":"true",class:r.normalizeClass([l.value,u.value,c.value,"yu-pointer-events-none yu-inline-block yu-transform yu-ring-0 yu-transition yu-duration-200 yu-ease-in-out yu-bg-white"])},null,2)],10,qy))}});var nt="top",mt="bottom",vt="right",ot="left",Ll="auto",Qr=[nt,mt,vt,ot],Bo="start",Pr="end",Xy="clippingParents",Dh="viewport",sr="popper",Ky="reference",Sc=Qr.reduce(function(e,t){return e.concat([t+"-"+Bo,t+"-"+Pr])},[]),Mh=[].concat(Qr,[Ll]).reduce(function(e,t){return e.concat([t,t+"-"+Bo,t+"-"+Pr])},[]),Jy="beforeRead",Qy="read",ew="afterRead",tw="beforeMain",nw="main",ow="afterMain",rw="beforeWrite",iw="write",aw="afterWrite",sw=[Jy,Qy,ew,tw,nw,ow,rw,iw,aw];function jt(e){return e?(e.nodeName||"").toLowerCase():null}function at(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function no(e){var t=at(e).Element;return e instanceof t||e instanceof Element}function ft(e){var t=at(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Fl(e){if(typeof ShadowRoot>"u")return!1;var t=at(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lw(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!ft(a)||!jt(a)||(Object.assign(a.style,o),Object.keys(i).forEach(function(s){var l=i[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function uw(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var i=t.elements[o],a=t.attributes[o]||{},s=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=s.reduce(function(u,c){return u[c]="",u},{});!ft(i)||!jt(i)||(Object.assign(i.style,l),Object.keys(a).forEach(function(u){i.removeAttribute(u)}))})}}const cw={name:"applyStyles",enabled:!0,phase:"write",fn:lw,effect:uw,requires:["computeStyles"]};function Lt(e){return e.split("-")[0]}var Jn=Math.max,Ji=Math.min,Po=Math.round;function el(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Th(){return!/^((?!chrome|android).)*safari/i.test(el())}function Ao(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),i=1,a=1;t&&ft(e)&&(i=e.offsetWidth>0&&Po(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Po(o.height)/e.offsetHeight||1);var s=no(e)?at(e):window,l=s.visualViewport,u=!Th()&&n,c=(o.left+(u&&l?l.offsetLeft:0))/i,d=(o.top+(u&&l?l.offsetTop:0))/a,f=o.width/i,h=o.height/a;return{width:f,height:h,top:d,right:c+f,bottom:d+h,left:c,x:c,y:d}}function Hl(e){var t=Ao(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Vh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Fl(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function dn(e){return at(e).getComputedStyle(e)}function dw(e){return["table","td","th"].indexOf(jt(e))>=0}function Rn(e){return((no(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oa(e){return jt(e)==="html"?e:e.assignedSlot||e.parentNode||(Fl(e)?e.host:null)||Rn(e)}function Dc(e){return!ft(e)||dn(e).position==="fixed"?null:e.offsetParent}function fw(e){var t=/firefox/i.test(el()),n=/Trident/i.test(el());if(n&&ft(e)){var o=dn(e);if(o.position==="fixed")return null}var i=Oa(e);for(Fl(i)&&(i=i.host);ft(i)&&["html","body"].indexOf(jt(i))<0;){var a=dn(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function ei(e){for(var t=at(e),n=Dc(e);n&&dw(n)&&dn(n).position==="static";)n=Dc(n);return n&&(jt(n)==="html"||jt(n)==="body"&&dn(n).position==="static")?t:n||fw(e)||t}function jl(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Er(e,t,n){return Jn(e,Ji(t,n))}function hw(e,t,n){var o=Er(e,t,n);return o>n?n:o}function Oh(){return{top:0,right:0,bottom:0,left:0}}function $h(e){return Object.assign({},Oh(),e)}function Bh(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var pw=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,$h(typeof e!="number"?e:Bh(e,Qr))};function mw(e){var t,n=e.state,o=e.name,i=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Lt(n.placement),u=jl(l),c=[ot,vt].indexOf(l)>=0,d=c?"height":"width";if(!(!a||!s)){var f=pw(i.padding,n),h=Hl(a),p=u==="y"?nt:ot,m=u==="y"?mt:vt,g=n.rects.reference[d]+n.rects.reference[u]-s[u]-n.rects.popper[d],b=s[u]-n.rects.reference[u],y=ei(a),_=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,w=g/2-b/2,v=f[p],N=_-h[d]-f[m],T=_/2-h[d]/2+w,V=Er(v,T,N),$=u;n.modifiersData[o]=(t={},t[$]=V,t.centerOffset=V-T,t)}}function vw(e){var t=e.state,n=e.options,o=n.element,i=o===void 0?"[data-popper-arrow]":o;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Vh(t.elements.popper,i)&&(t.elements.arrow=i))}const gw={name:"arrow",enabled:!0,phase:"main",fn:mw,effect:vw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yo(e){return e.split("-")[1]}var yw={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ww(e,t){var n=e.x,o=e.y,i=t.devicePixelRatio||1;return{x:Po(n*i)/i||0,y:Po(o*i)/i||0}}function Mc(e){var t,n=e.popper,o=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,l=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,g=m===void 0?0:m,b=typeof d=="function"?d({x:p,y:g}):{x:p,y:g};p=b.x,g=b.y;var y=s.hasOwnProperty("x"),_=s.hasOwnProperty("y"),w=ot,v=nt,N=window;if(c){var T=ei(n),V="clientHeight",$="clientWidth";if(T===at(n)&&(T=Rn(n),dn(T).position!=="static"&&l==="absolute"&&(V="scrollHeight",$="scrollWidth")),T=T,i===nt||(i===ot||i===vt)&&a===Pr){v=mt;var P=f&&T===N&&N.visualViewport?N.visualViewport.height:T[V];g-=P-o.height,g*=u?1:-1}if(i===ot||(i===nt||i===mt)&&a===Pr){w=vt;var A=f&&T===N&&N.visualViewport?N.visualViewport.width:T[$];p-=A-o.width,p*=u?1:-1}}var O=Object.assign({position:l},c&&yw),x=d===!0?ww({x:p,y:g},at(n)):{x:p,y:g};if(p=x.x,g=x.y,u){var R;return Object.assign({},O,(R={},R[v]=_?"0":"",R[w]=y?"0":"",R.transform=(N.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",R))}return Object.assign({},O,(t={},t[v]=_?g+"px":"",t[w]=y?p+"px":"",t.transform="",t))}function bw(e){var t=e.state,n=e.options,o=n.gpuAcceleration,i=o===void 0?!0:o,a=n.adaptive,s=a===void 0?!0:a,l=n.roundOffsets,u=l===void 0?!0:l,c={placement:Lt(t.placement),variation:Yo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Mc(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Mc(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _w={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bw,data:{}};var mi={passive:!0};function xw(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,a=i===void 0?!0:i,s=o.resize,l=s===void 0?!0:s,u=at(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",n.update,mi)}),l&&u.addEventListener("resize",n.update,mi),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",n.update,mi)}),l&&u.removeEventListener("resize",n.update,mi)}}const kw={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:xw,data:{}};var Nw={left:"right",right:"left",bottom:"top",top:"bottom"};function Oi(e){return e.replace(/left|right|bottom|top/g,function(t){return Nw[t]})}var Ew={start:"end",end:"start"};function Tc(e){return e.replace(/start|end/g,function(t){return Ew[t]})}function Wl(e){var t=at(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function Ul(e){return Ao(Rn(e)).left+Wl(e).scrollLeft}function Cw(e,t){var n=at(e),o=Rn(e),i=n.visualViewport,a=o.clientWidth,s=o.clientHeight,l=0,u=0;if(i){a=i.width,s=i.height;var c=Th();(c||!c&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:l+Ul(e),y:u}}function Sw(e){var t,n=Rn(e),o=Wl(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Jn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Jn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+Ul(e),u=-o.scrollTop;return dn(i||n).direction==="rtl"&&(l+=Jn(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:l,y:u}}function Gl(e){var t=dn(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function Ph(e){return["html","body","#document"].indexOf(jt(e))>=0?e.ownerDocument.body:ft(e)&&Gl(e)?e:Ph(Oa(e))}function Cr(e,t){var n;t===void 0&&(t=[]);var o=Ph(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=at(o),s=i?[a].concat(a.visualViewport||[],Gl(o)?o:[]):o,l=t.concat(s);return i?l:l.concat(Cr(Oa(s)))}function tl(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Dw(e,t){var n=Ao(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Vc(e,t,n){return t===Dh?tl(Cw(e,n)):no(t)?Dw(t,n):tl(Sw(Rn(e)))}function Mw(e){var t=Cr(Oa(e)),n=["absolute","fixed"].indexOf(dn(e).position)>=0,o=n&&ft(e)?ei(e):e;return no(o)?t.filter(function(i){return no(i)&&Vh(i,o)&&jt(i)!=="body"}):[]}function Tw(e,t,n,o){var i=t==="clippingParents"?Mw(e):[].concat(t),a=[].concat(i,[n]),s=a[0],l=a.reduce(function(u,c){var d=Vc(e,c,o);return u.top=Jn(d.top,u.top),u.right=Ji(d.right,u.right),u.bottom=Ji(d.bottom,u.bottom),u.left=Jn(d.left,u.left),u},Vc(e,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Ah(e){var t=e.reference,n=e.element,o=e.placement,i=o?Lt(o):null,a=o?Yo(o):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(i){case nt:u={x:s,y:t.y-n.height};break;case mt:u={x:s,y:t.y+t.height};break;case vt:u={x:t.x+t.width,y:l};break;case ot:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var c=i?jl(i):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case Bo:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Pr:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function Ar(e,t){t===void 0&&(t={});var n=t,o=n.placement,i=o===void 0?e.placement:o,a=n.strategy,s=a===void 0?e.strategy:a,l=n.boundary,u=l===void 0?Xy:l,c=n.rootBoundary,d=c===void 0?Dh:c,f=n.elementContext,h=f===void 0?sr:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,b=g===void 0?0:g,y=$h(typeof b!="number"?b:Bh(b,Qr)),_=h===sr?Ky:sr,w=e.rects.popper,v=e.elements[m?_:h],N=Tw(no(v)?v:v.contextElement||Rn(e.elements.popper),u,d,s),T=Ao(e.elements.reference),V=Ah({reference:T,element:w,placement:i}),$=tl(Object.assign({},w,V)),P=h===sr?$:T,A={top:N.top-P.top+y.top,bottom:P.bottom-N.bottom+y.bottom,left:N.left-P.left+y.left,right:P.right-N.right+y.right},O=e.modifiersData.offset;if(h===sr&&O){var x=O[i];Object.keys(A).forEach(function(R){var k=[vt,mt].indexOf(R)>=0?1:-1,M=[nt,mt].indexOf(R)>=0?"y":"x";A[R]+=x[M]*k})}return A}function Vw(e,t){t===void 0&&(t={});var n=t,o=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Mh:u,d=Yo(o),f=d?l?Sc:Sc.filter(function(m){return Yo(m)===d}):Qr,h=f.filter(function(m){return c.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,g){return m[g]=Ar(e,{placement:g,boundary:i,rootBoundary:a,padding:s})[Lt(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function Ow(e){if(Lt(e)===Ll)return[];var t=Oi(e);return[Tc(e),t,Tc(t)]}function $w(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,b=t.options.placement,y=Lt(b),_=y===b,w=u||(_||!m?[Oi(b)]:Ow(b)),v=[b].concat(w).reduce(function(ie,X){return ie.concat(Lt(X)===Ll?Vw(t,{placement:X,boundary:d,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:g}):X)},[]),N=t.rects.reference,T=t.rects.popper,V=new Map,$=!0,P=v[0],A=0;A<v.length;A++){var O=v[A],x=Lt(O),R=Yo(O)===Bo,k=[nt,mt].indexOf(x)>=0,M=k?"width":"height",S=Ar(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:h,padding:c}),L=k?R?vt:ot:R?mt:nt;N[M]>T[M]&&(L=Oi(L));var F=Oi(L),j=[];if(a&&j.push(S[x]<=0),l&&j.push(S[L]<=0,S[F]<=0),j.every(function(ie){return ie})){P=O,$=!1;break}V.set(O,j)}if($)for(var I=m?3:1,G=function(ie){var X=v.find(function(K){var Q=V.get(K);if(Q)return Q.slice(0,ie).every(function(ve){return ve})});if(X)return P=X,"break"},W=I;W>0;W--){var ue=G(W);if(ue==="break")break}t.placement!==P&&(t.modifiersData[o]._skip=!0,t.placement=P,t.reset=!0)}}const Bw={name:"flip",enabled:!0,phase:"main",fn:$w,requiresIfExists:["offset"],data:{_skip:!1}};function Oc(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $c(e){return[nt,vt,mt,ot].some(function(t){return e[t]>=0})}function Pw(e){var t=e.state,n=e.name,o=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ar(t,{elementContext:"reference"}),l=Ar(t,{altBoundary:!0}),u=Oc(s,o),c=Oc(l,i,a),d=$c(u),f=$c(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const Aw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pw};function Yw(e,t,n){var o=Lt(e),i=[ot,nt].indexOf(o)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],l=a[1];return s=s||0,l=(l||0)*i,[ot,vt].indexOf(o)>=0?{x:l,y:s}:{x:s,y:l}}function Iw(e){var t=e.state,n=e.options,o=e.name,i=n.offset,a=i===void 0?[0,0]:i,s=Mh.reduce(function(d,f){return d[f]=Yw(f,t.rects,a),d},{}),l=s[t.placement],u=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=s}const zw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Iw};function Rw(e){var t=e.state,n=e.name;t.modifiersData[n]=Ah({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Lw={name:"popperOffsets",enabled:!0,phase:"read",fn:Rw,data:{}};function Fw(e){return e==="x"?"y":"x"}function Hw(e){var t=e.state,n=e.options,o=e.name,i=n.mainAxis,a=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,b=Ar(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),y=Lt(t.placement),_=Yo(t.placement),w=!_,v=jl(y),N=Fw(v),T=t.modifiersData.popperOffsets,V=t.rects.reference,$=t.rects.popper,P=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(T){if(a){var R,k=v==="y"?nt:ot,M=v==="y"?mt:vt,S=v==="y"?"height":"width",L=T[v],F=L+b[k],j=L-b[M],I=p?-$[S]/2:0,G=_===Bo?V[S]:$[S],W=_===Bo?-$[S]:-V[S],ue=t.elements.arrow,ie=p&&ue?Hl(ue):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Oh(),K=X[k],Q=X[M],ve=Er(0,V[S],ie[S]),_e=w?V[S]/2-I-ve-K-A.mainAxis:G-ve-K-A.mainAxis,ge=w?-V[S]/2+I+ve+Q+A.mainAxis:W+ve+Q+A.mainAxis,we=t.elements.arrow&&ei(t.elements.arrow),ce=we?v==="y"?we.clientTop||0:we.clientLeft||0:0,de=(R=O?.[v])!=null?R:0,D=L+_e-de-ce,E=L+ge-de,B=Er(p?Ji(F,D):F,L,p?Jn(j,E):j);T[v]=B,x[v]=B-L}if(l){var z,Y=v==="x"?nt:ot,ee=v==="x"?mt:vt,J=T[N],se=N==="y"?"height":"width",re=J+b[Y],fe=J-b[ee],ye=[nt,ot].indexOf(y)!==-1,xe=(z=O?.[N])!=null?z:0,Ue=ye?re:J-V[se]-$[se]-xe+A.altAxis,je=ye?J+V[se]+$[se]-xe-A.altAxis:fe,bn=p&&ye?hw(Ue,J,je):Er(p?Ue:re,J,p?je:fe);T[N]=bn,x[N]=bn-J}t.modifiersData[o]=x}}const jw={name:"preventOverflow",enabled:!0,phase:"main",fn:Hw,requiresIfExists:["offset"]};function Ww(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Uw(e){return e===at(e)||!ft(e)?Wl(e):Ww(e)}function Gw(e){var t=e.getBoundingClientRect(),n=Po(t.width)/e.offsetWidth||1,o=Po(t.height)/e.offsetHeight||1;return n!==1||o!==1}function Zw(e,t,n){n===void 0&&(n=!1);var o=ft(t),i=ft(t)&&Gw(t),a=Rn(t),s=Ao(e,i,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&((jt(t)!=="body"||Gl(a))&&(l=Uw(t)),ft(t)?(u=Ao(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=Ul(a))),{x:s.left+l.scrollLeft-u.x,y:s.top+l.scrollTop-u.y,width:s.width,height:s.height}}function qw(e){var t=new Map,n=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&i(u)}}),o.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),o}function Xw(e){var t=qw(e);return sw.reduce(function(n,o){return n.concat(t.filter(function(i){return i.phase===o}))},[])}function Kw(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Jw(e){var t=e.reduce(function(n,o){var i=n[o.name];return n[o.name]=i?Object.assign({},i,o,{options:Object.assign({},i.options,o.options),data:Object.assign({},i.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var Bc={placement:"bottom",modifiers:[],strategy:"absolute"};function Pc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Qw(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Bc:i;return function(s,l,u){u===void 0&&(u=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bc,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:c,setOptions:function(g){var b=typeof g=="function"?g(c.options):g;m(),c.options=Object.assign({},a,c.options,b),c.scrollParents={reference:no(s)?Cr(s):s.contextElement?Cr(s.contextElement):[],popper:Cr(l)};var y=Xw(Jw([].concat(o,c.options.modifiers)));return c.orderedModifiers=y.filter(function(_){return _.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var g=c.elements,b=g.reference,y=g.popper;if(Pc(b,y)){c.rects={reference:Zw(b,ei(y),c.options.strategy==="fixed"),popper:Hl(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function($){return c.modifiersData[$.name]=Object.assign({},$.data)});for(var _=0;_<c.orderedModifiers.length;_++){if(c.reset===!0){c.reset=!1,_=-1;continue}var w=c.orderedModifiers[_],v=w.fn,N=w.options,T=N===void 0?{}:N,V=w.name;typeof v=="function"&&(c=v({state:c,options:T,name:V,instance:h})||c)}}}},update:Kw(function(){return new Promise(function(g){h.forceUpdate(),g(c)})}),destroy:function(){m(),f=!0}};if(!Pc(s,l))return h;h.setOptions(u).then(function(g){!f&&u.onFirstUpdate&&u.onFirstUpdate(g)});function p(){c.orderedModifiers.forEach(function(g){var b=g.name,y=g.options,_=y===void 0?{}:y,w=g.effect;if(typeof w=="function"){var v=w({state:c,name:b,instance:h,options:_}),N=function(){};d.push(v||N)}})}function m(){d.forEach(function(g){return g()}),d=[]}return h}}var e0=[kw,Lw,_w,cw,zw,Bw,jw,gw,Aw],t0=Qw({defaultModifiers:e0}),n0=Object.defineProperty,o0=(e,t,n)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pe=(e,t,n)=>(o0(e,typeof t!="symbol"?t+"":t,n),n),vi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r0=Object.prototype,i0=r0.hasOwnProperty;function a0(e,t){return e!=null&&i0.call(e,t)}var s0=a0,l0=Array.isArray,St=l0,u0=typeof vi=="object"&&vi&&vi.Object===Object&&vi,Ih=u0,c0=Ih,d0=typeof self=="object"&&self&&self.Object===Object&&self,f0=c0||d0||Function("return this")(),Ut=f0,h0=Ut,p0=h0.Symbol,$a=p0,Ac=$a,zh=Object.prototype,m0=zh.hasOwnProperty,v0=zh.toString,lr=Ac?Ac.toStringTag:void 0;function g0(e){var t=m0.call(e,lr),n=e[lr];try{e[lr]=void 0;var o=!0}catch{}var i=v0.call(e);return o&&(t?e[lr]=n:delete e[lr]),i}var y0=g0,w0=Object.prototype,b0=w0.toString;function _0(e){return b0.call(e)}var x0=_0,Yc=$a,k0=y0,N0=x0,E0="[object Null]",C0="[object Undefined]",Ic=Yc?Yc.toStringTag:void 0;function S0(e){return e==null?e===void 0?C0:E0:Ic&&Ic in Object(e)?k0(e):N0(e)}var Gt=S0;function D0(e){return e!=null&&typeof e=="object"}var Dt=D0,M0=Gt,T0=Dt,V0="[object Symbol]";function O0(e){return typeof e=="symbol"||T0(e)&&M0(e)==V0}var Zl=O0,$0=St,B0=Zl,P0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,A0=/^\w*$/;function Y0(e,t){if($0(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||B0(e)?!0:A0.test(e)||!P0.test(e)||t!=null&&e in Object(t)}var ql=Y0;function I0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vn=I0,z0=Gt,R0=vn,L0="[object AsyncFunction]",F0="[object Function]",H0="[object GeneratorFunction]",j0="[object Proxy]";function W0(e){if(!R0(e))return!1;var t=z0(e);return t==F0||t==H0||t==L0||t==j0}var uo=W0,U0=Ut,G0=U0["__core-js_shared__"],Z0=G0,ws=Z0,zc=(function(){var e=/[^.]+$/.exec(ws&&ws.keys&&ws.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function q0(e){return!!zc&&zc in e}var X0=q0,K0=Function.prototype,J0=K0.toString;function Q0(e){if(e!=null){try{return J0.call(e)}catch{}try{return e+""}catch{}}return""}var Rh=Q0,eb=uo,tb=X0,nb=vn,ob=Rh,rb=/[\\^$.*+?()[\]{}|]/g,ib=/^\[object .+?Constructor\]$/,ab=Function.prototype,sb=Object.prototype,lb=ab.toString,ub=sb.hasOwnProperty,cb=RegExp("^"+lb.call(ub).replace(rb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function db(e){if(!nb(e)||tb(e))return!1;var t=eb(e)?cb:ib;return t.test(ob(e))}var fb=db;function hb(e,t){return e?.[t]}var pb=hb,mb=fb,vb=pb;function gb(e,t){var n=vb(e,t);return mb(n)?n:void 0}var co=gb,yb=co,wb=yb(Object,"create"),Ba=wb,Rc=Ba;function bb(){this.__data__=Rc?Rc(null):{},this.size=0}var _b=bb;function xb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kb=xb,Nb=Ba,Eb="__lodash_hash_undefined__",Cb=Object.prototype,Sb=Cb.hasOwnProperty;function Db(e){var t=this.__data__;if(Nb){var n=t[e];return n===Eb?void 0:n}return Sb.call(t,e)?t[e]:void 0}var Mb=Db,Tb=Ba,Vb=Object.prototype,Ob=Vb.hasOwnProperty;function $b(e){var t=this.__data__;return Tb?t[e]!==void 0:Ob.call(t,e)}var Bb=$b,Pb=Ba,Ab="__lodash_hash_undefined__";function Yb(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pb&&t===void 0?Ab:t,this}var Ib=Yb,zb=_b,Rb=kb,Lb=Mb,Fb=Bb,Hb=Ib;function Wo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Wo.prototype.clear=zb;Wo.prototype.delete=Rb;Wo.prototype.get=Lb;Wo.prototype.has=Fb;Wo.prototype.set=Hb;var jb=Wo;function Wb(){this.__data__=[],this.size=0}var Ub=Wb;function Gb(e,t){return e===t||e!==e&&t!==t}var Uo=Gb,Zb=Uo;function qb(e,t){for(var n=e.length;n--;)if(Zb(e[n][0],t))return n;return-1}var Pa=qb,Xb=Pa,Kb=Array.prototype,Jb=Kb.splice;function Qb(e){var t=this.__data__,n=Xb(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Jb.call(t,n,1),--this.size,!0}var e1=Qb,t1=Pa;function n1(e){var t=this.__data__,n=t1(t,e);return n<0?void 0:t[n][1]}var o1=n1,r1=Pa;function i1(e){return r1(this.__data__,e)>-1}var a1=i1,s1=Pa;function l1(e,t){var n=this.__data__,o=s1(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var u1=l1,c1=Ub,d1=e1,f1=o1,h1=a1,p1=u1;function Go(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Go.prototype.clear=c1;Go.prototype.delete=d1;Go.prototype.get=f1;Go.prototype.has=h1;Go.prototype.set=p1;var Aa=Go,m1=co,v1=Ut,g1=m1(v1,"Map"),Xl=g1,Lc=jb,y1=Aa,w1=Xl;function b1(){this.size=0,this.__data__={hash:new Lc,map:new(w1||y1),string:new Lc}}var _1=b1;function x1(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var k1=x1,N1=k1;function E1(e,t){var n=e.__data__;return N1(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ya=E1,C1=Ya;function S1(e){var t=C1(this,e).delete(e);return this.size-=t?1:0,t}var D1=S1,M1=Ya;function T1(e){return M1(this,e).get(e)}var V1=T1,O1=Ya;function $1(e){return O1(this,e).has(e)}var B1=$1,P1=Ya;function A1(e,t){var n=P1(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var Y1=A1,I1=_1,z1=D1,R1=V1,L1=B1,F1=Y1;function Zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Zo.prototype.clear=I1;Zo.prototype.delete=z1;Zo.prototype.get=R1;Zo.prototype.has=L1;Zo.prototype.set=F1;var Kl=Zo,Lh=Kl,H1="Expected a function";function Jl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(H1);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Jl.Cache||Lh),n}Jl.Cache=Lh;var j1=Jl,W1=j1,U1=500;function G1(e){var t=W1(e,function(o){return n.size===U1&&n.clear(),o}),n=t.cache;return t}var Z1=G1,q1=Z1,X1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K1=/\\(\\)?/g,J1=q1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(X1,function(n,o,i,a){t.push(i?a.replace(K1,"$1"):o||n)}),t}),Q1=J1;function e_(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var t_=e_,Fc=$a,n_=t_,o_=St,r_=Zl,Hc=Fc?Fc.prototype:void 0,jc=Hc?Hc.toString:void 0;function Fh(e){if(typeof e=="string")return e;if(o_(e))return n_(e,Fh)+"";if(r_(e))return jc?jc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var i_=Fh,a_=i_;function s_(e){return e==null?"":a_(e)}var l_=s_,u_=St,c_=ql,d_=Q1,f_=l_;function h_(e,t){return u_(e)?e:c_(e,t)?[e]:d_(f_(e))}var Hh=h_,p_=Gt,m_=Dt,v_="[object Arguments]";function g_(e){return m_(e)&&p_(e)==v_}var y_=g_,Wc=y_,w_=Dt,jh=Object.prototype,b_=jh.hasOwnProperty,__=jh.propertyIsEnumerable,x_=Wc((function(){return arguments})())?Wc:function(e){return w_(e)&&b_.call(e,"callee")&&!__.call(e,"callee")},Ql=x_,k_=9007199254740991,N_=/^(?:0|[1-9]\d*)$/;function E_(e,t){var n=typeof e;return t=t??k_,!!t&&(n=="number"||n!="symbol"&&N_.test(e))&&e>-1&&e%1==0&&e<t}var eu=E_,C_=9007199254740991;function S_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C_}var tu=S_,D_=Zl;function M_(e){if(typeof e=="string"||D_(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ia=M_,T_=Hh,V_=Ql,O_=St,$_=eu,B_=tu,P_=Ia;function A_(e,t,n){t=T_(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=P_(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&B_(i)&&$_(s,i)&&(O_(e)||V_(e)))}var Wh=A_,Y_=s0,I_=Wh;function z_(e,t){return e!=null&&I_(e,t,Y_)}var Uh=z_,R_=Gt,L_=Dt,F_="[object Date]";function H_(e){return L_(e)&&R_(e)==F_}var j_=H_;function W_(e){return function(t){return e(t)}}var Gh=W_,Yr={},U_={get exports(){return Yr},set exports(e){Yr=e}};(function(e,t){var n=Ih,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a&&n.process,l=(function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(U_,Yr);var G_=j_,Z_=Gh,Uc=Yr,Gc=Uc&&Uc.isDate,q_=Gc?Z_(Gc):G_,X_=q_,K_=Gt,J_=St,Q_=Dt,ex="[object String]";function tx(e){return typeof e=="string"||!J_(e)&&Q_(e)&&K_(e)==ex}var At=tx;function nx(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var Zh=nx,ox=Aa;function rx(){this.__data__=new ox,this.size=0}var ix=rx;function ax(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var sx=ax;function lx(e){return this.__data__.get(e)}var ux=lx;function cx(e){return this.__data__.has(e)}var dx=cx,fx=Aa,hx=Xl,px=Kl,mx=200;function vx(e,t){var n=this.__data__;if(n instanceof fx){var o=n.__data__;if(!hx||o.length<mx-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new px(o)}return n.set(e,t),this.size=n.size,this}var gx=vx,yx=Aa,wx=ix,bx=sx,_x=ux,xx=dx,kx=gx;function qo(e){var t=this.__data__=new yx(e);this.size=t.size}qo.prototype.clear=wx;qo.prototype.delete=bx;qo.prototype.get=_x;qo.prototype.has=xx;qo.prototype.set=kx;var nu=qo,Nx="__lodash_hash_undefined__";function Ex(e){return this.__data__.set(e,Nx),this}var Cx=Ex;function Sx(e){return this.__data__.has(e)}var Dx=Sx,Mx=Kl,Tx=Cx,Vx=Dx;function Qi(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Mx;++t<n;)this.add(e[t])}Qi.prototype.add=Qi.prototype.push=Tx;Qi.prototype.has=Vx;var Ox=Qi;function $x(e,t){return e.has(t)}var Bx=$x,Px=Ox,Ax=Zh,Yx=Bx,Ix=1,zx=2;function Rx(e,t,n,o,i,a){var s=n&Ix,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=n&zx?new Px:void 0;for(a.set(e,t),a.set(t,e);++f<l;){var m=e[f],g=t[f];if(o)var b=s?o(g,m,f,t,e,a):o(m,g,f,e,t,a);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!Ax(t,function(y,_){if(!Yx(p,_)&&(m===y||i(m,y,n,o,a)))return p.push(_)})){h=!1;break}}else if(!(m===g||i(m,g,n,o,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var qh=Rx,Lx=Ut,Fx=Lx.Uint8Array,Xh=Fx;function Hx(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}var jx=Hx;function Wx(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var Ux=Wx,Zc=$a,qc=Xh,Gx=Uo,Zx=qh,qx=jx,Xx=Ux,Kx=1,Jx=2,Qx="[object Boolean]",ek="[object Date]",tk="[object Error]",nk="[object Map]",ok="[object Number]",rk="[object RegExp]",ik="[object Set]",ak="[object String]",sk="[object Symbol]",lk="[object ArrayBuffer]",uk="[object DataView]",Xc=Zc?Zc.prototype:void 0,bs=Xc?Xc.valueOf:void 0;function ck(e,t,n,o,i,a,s){switch(n){case uk:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lk:return!(e.byteLength!=t.byteLength||!a(new qc(e),new qc(t)));case Qx:case ek:case ok:return Gx(+e,+t);case tk:return e.name==t.name&&e.message==t.message;case rk:case ak:return e==t+"";case nk:var l=qx;case ik:var u=o&Kx;if(l||(l=Xx),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;o|=Jx,s.set(e,t);var d=Zx(l(e),l(t),o,i,a,s);return s.delete(e),d;case sk:if(bs)return bs.call(e)==bs.call(t)}return!1}var dk=ck;function fk(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var hk=fk,pk=hk,mk=St;function vk(e,t,n){var o=t(e);return mk(e)?o:pk(o,n(e))}var gk=vk;function yk(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var wk=yk;function bk(){return[]}var _k=bk,xk=wk,kk=_k,Nk=Object.prototype,Ek=Nk.propertyIsEnumerable,Kc=Object.getOwnPropertySymbols,Ck=Kc?function(e){return e==null?[]:(e=Object(e),xk(Kc(e),function(t){return Ek.call(e,t)}))}:kk,Sk=Ck;function Dk(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Mk=Dk,Io={},Tk={get exports(){return Io},set exports(e){Io=e}};function Vk(){return!1}var Ok=Vk;(function(e,t){var n=Ut,o=Ok,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,l=s?n.Buffer:void 0,u=l?l.isBuffer:void 0,c=u||o;e.exports=c})(Tk,Io);var $k=Gt,Bk=tu,Pk=Dt,Ak="[object Arguments]",Yk="[object Array]",Ik="[object Boolean]",zk="[object Date]",Rk="[object Error]",Lk="[object Function]",Fk="[object Map]",Hk="[object Number]",jk="[object Object]",Wk="[object RegExp]",Uk="[object Set]",Gk="[object String]",Zk="[object WeakMap]",qk="[object ArrayBuffer]",Xk="[object DataView]",Kk="[object Float32Array]",Jk="[object Float64Array]",Qk="[object Int8Array]",eN="[object Int16Array]",tN="[object Int32Array]",nN="[object Uint8Array]",oN="[object Uint8ClampedArray]",rN="[object Uint16Array]",iN="[object Uint32Array]",$e={};$e[Kk]=$e[Jk]=$e[Qk]=$e[eN]=$e[tN]=$e[nN]=$e[oN]=$e[rN]=$e[iN]=!0;$e[Ak]=$e[Yk]=$e[qk]=$e[Ik]=$e[Xk]=$e[zk]=$e[Rk]=$e[Lk]=$e[Fk]=$e[Hk]=$e[jk]=$e[Wk]=$e[Uk]=$e[Gk]=$e[Zk]=!1;function aN(e){return Pk(e)&&Bk(e.length)&&!!$e[$k(e)]}var sN=aN,lN=sN,uN=Gh,Jc=Yr,Qc=Jc&&Jc.isTypedArray,cN=Qc?uN(Qc):lN,ou=cN,dN=Mk,fN=Ql,hN=St,pN=Io,mN=eu,vN=ou,gN=Object.prototype,yN=gN.hasOwnProperty;function wN(e,t){var n=hN(e),o=!n&&fN(e),i=!n&&!o&&pN(e),a=!n&&!o&&!i&&vN(e),s=n||o||i||a,l=s?dN(e.length,String):[],u=l.length;for(var c in e)(t||yN.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||mN(c,u)))&&l.push(c);return l}var Kh=wN,bN=Object.prototype;function _N(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||bN;return e===n}var ru=_N;function xN(e,t){return function(n){return e(t(n))}}var Jh=xN,kN=Jh,NN=kN(Object.keys,Object),EN=NN,CN=ru,SN=EN,DN=Object.prototype,MN=DN.hasOwnProperty;function TN(e){if(!CN(e))return SN(e);var t=[];for(var n in Object(e))MN.call(e,n)&&n!="constructor"&&t.push(n);return t}var VN=TN,ON=uo,$N=tu;function BN(e){return e!=null&&$N(e.length)&&!ON(e)}var ti=BN,PN=Kh,AN=VN,YN=ti;function IN(e){return YN(e)?PN(e):AN(e)}var iu=IN,zN=gk,RN=Sk,LN=iu;function FN(e){return zN(e,LN,RN)}var HN=FN,ed=HN,jN=1,WN=Object.prototype,UN=WN.hasOwnProperty;function GN(e,t,n,o,i,a){var s=n&jN,l=ed(e),u=l.length,c=ed(t),d=c.length;if(u!=d&&!s)return!1;for(var f=u;f--;){var h=l[f];if(!(s?h in t:UN.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var g=!0;a.set(e,t),a.set(t,e);for(var b=s;++f<u;){h=l[f];var y=e[h],_=t[h];if(o)var w=s?o(_,y,h,t,e,a):o(y,_,h,e,t,a);if(!(w===void 0?y===_||i(y,_,n,o,a):w)){g=!1;break}b||(b=h=="constructor")}if(g&&!b){var v=e.constructor,N=t.constructor;v!=N&&"constructor"in e&&"constructor"in t&&!(typeof v=="function"&&v instanceof v&&typeof N=="function"&&N instanceof N)&&(g=!1)}return a.delete(e),a.delete(t),g}var ZN=GN,qN=co,XN=Ut,KN=qN(XN,"DataView"),JN=KN,QN=co,eE=Ut,tE=QN(eE,"Promise"),nE=tE,oE=co,rE=Ut,iE=oE(rE,"Set"),aE=iE,sE=co,lE=Ut,uE=sE(lE,"WeakMap"),cE=uE,nl=JN,ol=Xl,rl=nE,il=aE,al=cE,Qh=Gt,Xo=Rh,td="[object Map]",dE="[object Object]",nd="[object Promise]",od="[object Set]",rd="[object WeakMap]",id="[object DataView]",fE=Xo(nl),hE=Xo(ol),pE=Xo(rl),mE=Xo(il),vE=Xo(al),Wn=Qh;(nl&&Wn(new nl(new ArrayBuffer(1)))!=id||ol&&Wn(new ol)!=td||rl&&Wn(rl.resolve())!=nd||il&&Wn(new il)!=od||al&&Wn(new al)!=rd)&&(Wn=function(e){var t=Qh(e),n=t==dE?e.constructor:void 0,o=n?Xo(n):"";if(o)switch(o){case fE:return id;case hE:return td;case pE:return nd;case mE:return od;case vE:return rd}return t});var gE=Wn,_s=nu,yE=qh,wE=dk,bE=ZN,ad=gE,sd=St,ld=Io,_E=ou,xE=1,ud="[object Arguments]",cd="[object Array]",gi="[object Object]",kE=Object.prototype,dd=kE.hasOwnProperty;function NE(e,t,n,o,i,a){var s=sd(e),l=sd(t),u=s?cd:ad(e),c=l?cd:ad(t);u=u==ud?gi:u,c=c==ud?gi:c;var d=u==gi,f=c==gi,h=u==c;if(h&&ld(e)){if(!ld(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new _s),s||_E(e)?yE(e,t,n,o,i,a):wE(e,t,u,n,o,i,a);if(!(n&xE)){var p=d&&dd.call(e,"__wrapped__"),m=f&&dd.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,b=m?t.value():t;return a||(a=new _s),i(g,b,n,o,a)}}return h?(a||(a=new _s),bE(e,t,n,o,i,a)):!1}var EE=NE,CE=EE,fd=Dt;function ep(e,t,n,o,i){return e===t?!0:e==null||t==null||!fd(e)&&!fd(t)?e!==e&&t!==t:CE(e,t,n,o,ep,i)}var tp=ep,SE=nu,DE=tp,ME=1,TE=2;function VE(e,t,n,o){var i=n.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var u=l[0],c=e[u],d=l[1];if(s&&l[2]){if(c===void 0&&!(u in e))return!1}else{var f=new SE;if(o)var h=o(c,d,u,e,t,f);if(!(h===void 0?DE(d,c,ME|TE,o,f):h))return!1}}return!0}var OE=VE,$E=vn;function BE(e){return e===e&&!$E(e)}var np=BE,PE=np,AE=iu;function YE(e){for(var t=AE(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,PE(i)]}return t}var IE=YE;function zE(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var op=zE,RE=OE,LE=IE,FE=op;function HE(e){var t=LE(e);return t.length==1&&t[0][2]?FE(t[0][0],t[0][1]):function(n){return n===e||RE(n,e,t)}}var jE=HE,WE=Hh,UE=Ia;function GE(e,t){t=WE(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[UE(t[n++])];return n&&n==o?e:void 0}var rp=GE,ZE=rp;function qE(e,t,n){var o=e==null?void 0:ZE(e,t);return o===void 0?n:o}var Zn=qE;function XE(e,t){return e!=null&&t in Object(e)}var KE=XE,JE=KE,QE=Wh;function eC(e,t){return e!=null&&QE(e,t,JE)}var tC=eC,nC=tp,oC=Zn,rC=tC,iC=ql,aC=np,sC=op,lC=Ia,uC=1,cC=2;function dC(e,t){return iC(e)&&aC(t)?sC(lC(e),t):function(n){var o=oC(n,e);return o===void 0&&o===t?rC(n,e):nC(t,o,uC|cC)}}var fC=dC;function hC(e){return e}var au=hC;function pC(e){return function(t){return t?.[e]}}var mC=pC,vC=rp;function gC(e){return function(t){return vC(t,e)}}var yC=gC,wC=mC,bC=yC,_C=ql,xC=Ia;function kC(e){return _C(e)?wC(xC(e)):bC(e)}var NC=kC,EC=jE,CC=fC,SC=au,DC=St,MC=NC;function TC(e){return typeof e=="function"?e:e==null?SC:typeof e=="object"?DC(e)?CC(e[0],e[1]):EC(e):MC(e)}var ip=TC;function VC(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var u=s[e?l:++i];if(n(a[u],u,a)===!1)break}return t}}var OC=VC,$C=OC,BC=$C(),ap=BC,PC=ap,AC=iu;function YC(e,t){return e&&PC(e,t,AC)}var sp=YC,IC=ti;function zC(e,t){return function(n,o){if(n==null)return n;if(!IC(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&o(s[a],a,s)!==!1;);return n}}var RC=zC,LC=sp,FC=RC,HC=FC(LC),jC=HC,WC=jC;function UC(e,t){var n;return WC(e,function(o,i,a){return n=t(o,i,a),!n}),!!n}var GC=UC,ZC=Uo,qC=ti,XC=eu,KC=vn;function JC(e,t,n){if(!KC(n))return!1;var o=typeof t;return(o=="number"?qC(n)&&XC(t,n.length):o=="string"&&t in n)?ZC(n[t],e):!1}var su=JC,QC=Zh,eS=ip,tS=GC,nS=St,oS=su;function rS(e,t,n){var o=nS(e)?QC:tS;return n&&oS(e,t,n)&&(t=void 0),o(e,eS(t))}var iS=rS,aS=Gt,sS=Dt,lS="[object Boolean]";function uS(e){return e===!0||e===!1||sS(e)&&aS(e)==lS}var cS=uS,dS=Gt,fS=Dt,hS="[object Number]";function pS(e){return typeof e=="number"||fS(e)&&dS(e)==hS}var Nt=pS,mS=co,vS=(function(){try{var e=mS(Object,"defineProperty");return e({},"",{}),e}catch{}})(),lp=vS,hd=lp;function gS(e,t,n){t=="__proto__"&&hd?hd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var za=gS,yS=za,wS=Uo,bS=Object.prototype,_S=bS.hasOwnProperty;function xS(e,t,n){var o=e[t];(!(_S.call(e,t)&&wS(o,n))||n===void 0&&!(t in e))&&yS(e,t,n)}var kS=xS,NS=za,ES=sp,CS=ip;function SS(e,t){var n={};return t=CS(t),ES(e,function(o,i,a){NS(n,i,t(o,i,a))}),n}var DS=SS;function MS(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)}var up=MS,TS=up,pd=Math.max;function VS(e,t,n){return t=pd(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=pd(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=n(s),TS(e,this,l)}}var OS=VS;function $S(e){return function(){return e}}var BS=$S,PS=BS,md=lp,AS=au,YS=md?function(e,t){return md(e,"toString",{configurable:!0,enumerable:!1,value:PS(t),writable:!0})}:AS,IS=YS,zS=800,RS=16,LS=Date.now;function FS(e){var t=0,n=0;return function(){var o=LS(),i=RS-(o-n);if(n=o,i>0){if(++t>=zS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var HS=FS,jS=IS,WS=HS,US=WS(jS),GS=US,ZS=au,qS=OS,XS=GS;function KS(e,t){return XS(qS(e,t,ZS),e+"")}var lu=KS;function JS(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var QS=JS,eD=vn,tD=ru,nD=QS,oD=Object.prototype,rD=oD.hasOwnProperty;function iD(e){if(!eD(e))return nD(e);var t=tD(e),n=[];for(var o in e)o=="constructor"&&(t||!rD.call(e,o))||n.push(o);return n}var aD=iD,sD=Kh,lD=aD,uD=ti;function cD(e){return uD(e)?sD(e,!0):lD(e)}var uu=cD,dD=lu,fD=Uo,hD=su,pD=uu,cp=Object.prototype,mD=cp.hasOwnProperty,vD=dD(function(e,t){e=Object(e);var n=-1,o=t.length,i=o>2?t[2]:void 0;for(i&&hD(t[0],t[1],i)&&(o=1);++n<o;)for(var a=t[n],s=pD(a),l=-1,u=s.length;++l<u;){var c=s[l],d=e[c];(d===void 0||fD(d,cp[c])&&!mD.call(e,c))&&(e[c]=a[c])}return e}),vd=vD,gD=za,yD=Uo;function wD(e,t,n){(n!==void 0&&!yD(e[t],n)||n===void 0&&!(t in e))&&gD(e,t,n)}var dp=wD,ea={},bD={get exports(){return ea},set exports(e){ea=e}};(function(e,t){var n=Ut,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var f=c.length,h=l?l(f):new c.constructor(f);return c.copy(h),h}e.exports=u})(bD,ea);var gd=Xh;function _D(e){var t=new e.constructor(e.byteLength);return new gd(t).set(new gd(e)),t}var xD=_D,kD=xD;function ND(e,t){var n=t?kD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ED=ND;function CD(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var SD=CD,DD=vn,yd=Object.create,MD=(function(){function e(){}return function(t){if(!DD(t))return{};if(yd)return yd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})(),TD=MD,VD=Jh,OD=VD(Object.getPrototypeOf,Object),fp=OD,$D=TD,BD=fp,PD=ru;function AD(e){return typeof e.constructor=="function"&&!PD(e)?$D(BD(e)):{}}var YD=AD,ID=ti,zD=Dt;function RD(e){return zD(e)&&ID(e)}var LD=RD,FD=Gt,HD=fp,jD=Dt,WD="[object Object]",UD=Function.prototype,GD=Object.prototype,hp=UD.toString,ZD=GD.hasOwnProperty,qD=hp.call(Object);function XD(e){if(!jD(e)||FD(e)!=WD)return!1;var t=HD(e);if(t===null)return!0;var n=ZD.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hp.call(n)==qD}var KD=XD;function JD(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var pp=JD,QD=kS,eM=za;function tM(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=o?o(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),i?eM(n,l,u):QD(n,l,u)}return n}var nM=tM,oM=nM,rM=uu;function iM(e){return oM(e,rM(e))}var aM=iM,wd=dp,sM=ea,lM=ED,uM=SD,cM=YD,bd=Ql,_d=St,dM=LD,fM=Io,hM=uo,pM=vn,mM=KD,vM=ou,xd=pp,gM=aM;function yM(e,t,n,o,i,a,s){var l=xd(e,n),u=xd(t,n),c=s.get(u);if(c){wd(e,n,c);return}var d=a?a(l,u,n+"",e,t,s):void 0,f=d===void 0;if(f){var h=_d(u),p=!h&&fM(u),m=!h&&!p&&vM(u);d=u,h||p||m?_d(l)?d=l:dM(l)?d=uM(l):p?(f=!1,d=sM(u,!0)):m?(f=!1,d=lM(u,!0)):d=[]:mM(u)||bd(u)?(d=l,bd(l)?d=gM(l):(!pM(l)||hM(l))&&(d=cM(u))):f=!1}f&&(s.set(u,d),i(d,u,o,a,s),s.delete(u)),wd(e,n,d)}var wM=yM,bM=nu,_M=dp,xM=ap,kM=wM,NM=vn,EM=uu,CM=pp;function mp(e,t,n,o,i){e!==t&&xM(t,function(a,s){if(i||(i=new bM),NM(a))kM(e,t,s,n,mp,o,i);else{var l=o?o(CM(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),_M(e,s,l)}},EM)}var vp=mp,SM=vp,kd=vn;function gp(e,t,n,o,i,a){return kd(e)&&kd(t)&&(a.set(t,e),SM(e,t,void 0,gp,a),a.delete(t)),e}var DM=gp,MM=lu,TM=su;function VM(e){return MM(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&TM(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=n[o];l&&e(t,l,o,a)}return t})}var OM=VM,$M=vp,BM=OM,PM=BM(function(e,t,n,o){$M(e,t,n,o)}),AM=PM,YM=up,IM=lu,zM=DM,RM=AM,LM=IM(function(e){return e.push(void 0,zM),YM(RM,void 0,e)}),Ir=LM;function FM(e){return e&&e.length?e[0]:void 0}var yp=FM;function HM(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var No=HM;const jM=e=>Object.prototype.toString.call(e).slice(8,-1),So=e=>X_(e)&&!isNaN(e.getTime()),fn=e=>jM(e)==="Object",wp=Uh,Nd=(e,t)=>iS(t,n=>Uh(e,n)),Me=(e,t,n="0")=>{for(e=e!=null?String(e):"",t=t||2;e.length<t;)e=`${n}${e}`;return e},ht=e=>Array.isArray(e),on=e=>ht(e)&&e.length>0,ta=e=>e==null?null:document&&At(e)?document.querySelector(e):e.$el??e,Dn=(e,t,n,o=void 0)=>{e.removeEventListener(t,n,o)},Mn=(e,t,n,o=void 0)=>(e.addEventListener(t,n,o),()=>Dn(e,t,n,o)),$i=(e,t)=>!!e&&!!t&&(e===t||e.contains(t)),yi=(e,t)=>{(e.key===" "||e.key==="Enter")&&(t(e),e.preventDefault())},bp=(e,...t)=>{const n={};let o;for(o in e)t.includes(o)||(n[o]=e[o]);return n},_p=(e,t)=>{const n={};return t.forEach(o=>{o in e&&(n[o]=e[o])}),n};function WM(e,t,n){return Math.min(Math.max(e,t),n)}var na={},UM={get exports(){return na},set exports(e){na=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(o){if(o===null||o===!0||o===!1)return NaN;var i=Number(o);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}e.exports=t.default})(UM,na);const GM=Yh(na);var oa={},ZM={get exports(){return oa},set exports(e){oa=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(o){var i=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return i.setUTCFullYear(o.getFullYear()),o.getTime()-i.getTime()}e.exports=t.default})(ZM,oa);const Ed=Yh(oa);function qM(e,t){var n=QM(t);return n.formatToParts?KM(n,e):JM(n,e)}var XM={year:0,month:1,day:2,hour:3,minute:4,second:5};function KM(e,t){try{for(var n=e.formatToParts(t),o=[],i=0;i<n.length;i++){var a=XM[n[i].type];a>=0&&(o[a]=parseInt(n[i].value,10))}return o}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function JM(e,t){var n=e.format(t).replace(/\u200E/g,""),o=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[o[3],o[1],o[2],o[4],o[5],o[6]]}var xs={};function QM(e){if(!xs[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";xs[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return xs[e]}function xp(e,t,n,o,i,a,s){var l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(o,i,a,s),l}var Cd=36e5,e2=6e4,ks={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function t2(e,t,n){var o,i;if(!e||(o=ks.timezoneZ.exec(e),o))return 0;var a;if(o=ks.timezoneHH.exec(e),o)return a=parseInt(o[1],10),Sd(a)?-(a*Cd):NaN;if(o=ks.timezoneHHMM.exec(e),o){a=parseInt(o[1],10);var s=parseInt(o[2],10);return Sd(a,s)?(i=Math.abs(a)*Cd+s*e2,a>0?-i:i):NaN}if(r2(e)){t=new Date(t||Date.now());var l=n2(t),u=sl(l,e),c=o2(t,u,e);return-c}return NaN}function n2(e){return xp(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function sl(e,t){var n=qM(e,t),o=xp(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,o-i}function o2(e,t,n){var o=e.getTime(),i=o-t,a=sl(new Date(i),n);if(t===a)return t;i-=a-t;var s=sl(new Date(i),n);return a===s?a:Math.max(a,s)}function Sd(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var Dd={};function r2(e){if(Dd[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Dd[e]=!0,!0}catch{return!1}}var i2=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const a2=i2;var Ns=36e5,Md=6e4,s2=2,Je={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:a2};function l2(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},o=n.additionalDigits==null?s2:GM(n.additionalDigits);if(o!==2&&o!==1&&o!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=u2(e),a=c2(i.date,o),s=a.year,l=a.restDateString,u=d2(l,s);if(isNaN(u))return new Date(NaN);if(u){var c=u.getTime(),d=0,f;if(i.time&&(d=f2(i.time),isNaN(d)))return new Date(NaN);if(i.timeZone||n.timeZone){if(f=t2(i.timeZone||n.timeZone,new Date(c+d)),isNaN(f))return new Date(NaN)}else f=Ed(new Date(c+d)),f=Ed(new Date(c+d+f));return new Date(c+d+f)}else return new Date(NaN)}function u2(e){var t={},n=Je.dateTimePattern.exec(e),o;if(n?(t.date=n[1],o=n[3]):(n=Je.datePattern.exec(e),n?(t.date=n[1],o=n[2]):(t.date=null,o=e)),o){var i=Je.timeZone.exec(o);i?(t.time=o.replace(i[1],""),t.timeZone=i[1].trim()):t.time=o}return t}function c2(e,t){var n=Je.YYY[t],o=Je.YYYYY[t],i;if(i=Je.YYYY.exec(e)||o.exec(e),i){var a=i[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(i=Je.YY.exec(e)||n.exec(e),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:e.slice(s.length)}}return{year:null}}function d2(e,t){if(t===null)return null;var n,o,i,a;if(e.length===0)return o=new Date(0),o.setUTCFullYear(t),o;if(n=Je.MM.exec(e),n)return o=new Date(0),i=parseInt(n[1],10)-1,Vd(t,i)?(o.setUTCFullYear(t,i),o):new Date(NaN);if(n=Je.DDD.exec(e),n){o=new Date(0);var s=parseInt(n[1],10);return m2(t,s)?(o.setUTCFullYear(t,0,s),o):new Date(NaN)}if(n=Je.MMDD.exec(e),n){o=new Date(0),i=parseInt(n[1],10)-1;var l=parseInt(n[2],10);return Vd(t,i,l)?(o.setUTCFullYear(t,i,l),o):new Date(NaN)}if(n=Je.Www.exec(e),n)return a=parseInt(n[1],10)-1,Od(t,a)?Td(t,a):new Date(NaN);if(n=Je.WwwD.exec(e),n){a=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Od(t,a,u)?Td(t,a,u):new Date(NaN)}return null}function f2(e){var t,n,o;if(t=Je.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),Es(n)?n%24*Ns:NaN;if(t=Je.HHMM.exec(e),t)return n=parseInt(t[1],10),o=parseFloat(t[2].replace(",",".")),Es(n,o)?n%24*Ns+o*Md:NaN;if(t=Je.HHMMSS.exec(e),t){n=parseInt(t[1],10),o=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Es(n,o,i)?n%24*Ns+o*Md+i*1e3:NaN}return null}function Td(e,t,n){t=t||0,n=n||0;var o=new Date(0);o.setUTCFullYear(e,0,4);var i=o.getUTCDay()||7,a=t*7+n+1-i;return o.setUTCDate(o.getUTCDate()+a),o}var h2=[31,28,31,30,31,30,31,31,30,31,30,31],p2=[31,29,31,30,31,30,31,31,30,31,30,31];function kp(e){return e%400===0||e%4===0&&e%100!==0}function Vd(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var o=kp(e);if(o&&n>p2[t]||!o&&n>h2[t])return!1}return!0}function m2(e,t){if(t<1)return!1;var n=kp(e);return!(n&&t>366||!n&&t>365)}function Od(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Es(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function qe(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Bi(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bi=function(t){return typeof t}:Bi=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}function gn(e){qe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Bi(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ko(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}var v2={};function cu(){return v2}function oo(e,t){var n,o,i,a,s,l,u,c;qe(1,arguments);var d=cu(),f=Ko((n=(o=(i=(a=t?.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&o!==void 0?o:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=gn(e),p=h.getDay(),m=(p<f?7:0)+p-f;return h.setDate(h.getDate()-m),h.setHours(0,0,0,0),h}function $d(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var g2=6048e5;function y2(e,t,n){qe(2,arguments);var o=oo(e,n),i=oo(t,n),a=o.getTime()-$d(o),s=i.getTime()-$d(i);return Math.round((a-s)/g2)}function w2(e){qe(1,arguments);var t=gn(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function b2(e){qe(1,arguments);var t=gn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _2(e,t){return qe(1,arguments),y2(w2(e),b2(e),t)+1}function x2(e,t){var n,o,i,a,s,l,u,c;qe(1,arguments);var d=gn(e),f=d.getFullYear(),h=cu(),p=Ko((n=(o=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:h.firstWeekContainsDate)!==null&&o!==void 0?o:(u=h.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setFullYear(f+1,0,p),m.setHours(0,0,0,0);var g=oo(m,t),b=new Date(0);b.setFullYear(f,0,p),b.setHours(0,0,0,0);var y=oo(b,t);return d.getTime()>=g.getTime()?f+1:d.getTime()>=y.getTime()?f:f-1}function k2(e,t){var n,o,i,a,s,l,u,c;qe(1,arguments);var d=cu(),f=Ko((n=(o=(i=(a=t?.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&o!==void 0?o:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=x2(e,t),p=new Date(0);p.setFullYear(h,0,f),p.setHours(0,0,0,0);var m=oo(p,t);return m}var N2=6048e5;function E2(e,t){qe(1,arguments);var n=gn(e),o=oo(n,t).getTime()-k2(n,t).getTime();return Math.round(o/N2)+1}function ra(e){return qe(1,arguments),oo(e,{weekStartsOn:1})}function C2(e){qe(1,arguments);var t=gn(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var i=ra(o),a=new Date(0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);var s=ra(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function S2(e){qe(1,arguments);var t=C2(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var o=ra(n);return o}var D2=6048e5;function M2(e){qe(1,arguments);var t=gn(e),n=ra(t).getTime()-S2(t).getTime();return Math.round(n/D2)+1}function Ke(e,t){qe(2,arguments);var n=gn(e),o=Ko(t);return isNaN(o)?new Date(NaN):(o&&n.setDate(n.getDate()+o),n)}function ia(e,t){qe(2,arguments);var n=gn(e),o=Ko(t);if(isNaN(o))return new Date(NaN);if(!o)return n;var i=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+o+1,0);var s=a.getDate();return i>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),i),n)}function Bd(e,t){qe(2,arguments);var n=Ko(t);return ia(e,n*12)}const T2={daily:["year","month","day"],weekly:["year","month","week"],monthly:["year","month"]};function V2({monthComps:e,prevMonthComps:t,nextMonthComps:n},o){const i=[],{firstDayOfWeek:a,firstWeekday:s,isoWeeknumbers:l,weeknumbers:u,numDays:c,numWeeks:d}=e,f=s+(s<a?Ge:0)-a;let h=!0,p=!1,m=!1,g=0;const b=new Intl.DateTimeFormat(o.id,{weekday:"long",year:"numeric",month:"short",day:"numeric"});let y=t.numDays-f+1,_=t.numDays-y+1,w=Math.floor((y-1)/Ge+1),v=1,N=t.numWeeks,T=1,V=t.month,$=t.year;const P=new Date,A=P.getDate(),O=P.getMonth()+1,x=P.getFullYear();for(let R=1;R<=kT;R++){for(let k=1,M=a;k<=Ge;k++,M+=M===Ge?1-Ge:1){h&&M===s&&(y=1,_=e.numDays,w=Math.floor((y-1)/Ge+1),v=Math.floor((c-y)/Ge+1),N=1,T=d,V=e.month,$=e.year,h=!1,p=!0);const S=o.getDateFromParams($,V,y,0,0,0,0),L=o.getDateFromParams($,V,y,12,0,0,0),F=o.getDateFromParams($,V,y,23,59,59,999),j=S,I=`${Me($,4)}-${Me(V,2)}-${Me(y,2)}`,G=k,W=Ge-k,ue=u[R-1],ie=l[R-1],X=y===A&&V===O&&$===x,K=p&&y===1,Q=p&&y===c,ve=R===1,_e=R===d,ge=k===1,we=k===Ge,ce=Pp($,V,y);i.push({locale:o,id:I,position:++g,label:y.toString(),ariaLabel:b.format(new Date($,V-1,y)),day:y,dayFromEnd:_,weekday:M,weekdayPosition:G,weekdayPositionFromEnd:W,weekdayOrdinal:w,weekdayOrdinalFromEnd:v,week:N,weekFromEnd:T,weekPosition:R,weeknumber:ue,isoWeeknumber:ie,month:V,year:$,date:j,startDate:S,endDate:F,noonDate:L,dayIndex:ce,isToday:X,isFirstDay:K,isLastDay:Q,isDisabled:!p,isFocusable:!p,isFocused:!1,inMonth:p,inPrevMonth:h,inNextMonth:m,onTop:ve,onBottom:_e,onLeft:ge,onRight:we,classes:[`id-${I}`,`day-${y}`,`day-from-end-${_}`,`weekday-${M}`,`weekday-position-${G}`,`weekday-ordinal-${w}`,`weekday-ordinal-from-end-${v}`,`week-${N}`,`week-from-end-${T}`,{"is-today":X,"is-first-day":K,"is-last-day":Q,"in-month":p,"in-prev-month":h,"in-next-month":m,"on-top":ve,"on-bottom":_e,"on-left":ge,"on-right":we}]}),p&&Q?(p=!1,m=!0,y=1,_=c,w=1,v=Math.floor((c-y)/Ge+1),N=1,T=n.numWeeks,V=n.month,$=n.year):(y++,_--,w=Math.floor((y-1)/Ge+1),v=Math.floor((c-y)/Ge+1))}N++,T--}return i}function O2(e,t,n,o){const i=e.reduce((a,s,l)=>{const u=Math.floor(l/7);let c=a[u];return c||(c={id:`week-${u+1}`,title:"",week:s.week,weekPosition:s.weekPosition,weeknumber:s.weeknumber,isoWeeknumber:s.isoWeeknumber,weeknumberDisplay:t?s.weeknumber:n?s.isoWeeknumber:void 0,days:[]},a[u]=c),c.days.push(s),a},Array(e.length/Ge));return i.forEach(a=>{const s=a.days[0],l=a.days[a.days.length-1];s.month===l.month?a.title=`${o.formatDate(s.date,"MMMM YYYY")}`:s.year===l.year?a.title=`${o.formatDate(s.date,"MMM")} - ${o.formatDate(l.date,"MMM YYYY")}`:a.title=`${o.formatDate(s.date,"MMM YYYY")} - ${o.formatDate(l.date,"MMM YYYY")}`}),i}function $2(e,t){return e.days.map(n=>({label:t.formatDate(n.date,t.masks.weekdays),weekday:n.weekday}))}function B2(e,t){return`${t}.${Me(e,2)}`}function Np(e,t,n){return _p(n.getDateParts(n.toDate(e)),T2[t])}function Ep({day:e,week:t,month:n,year:o},i,a,s){if(a==="daily"&&e){const l=new Date(o,n-1,e),u=Ke(l,i);return{day:u.getDate(),month:u.getMonth()+1,year:u.getFullYear()}}else if(a==="weekly"&&t){const l=s.getMonthParts(n,o).firstDayOfMonth,u=Ke(l,(t-1+i)*7),c=s.getDateParts(u);return{week:c.week,month:c.month,year:c.year}}else{const l=new Date(o,n-1,1),u=ia(l,i);return{month:u.getMonth()+1,year:u.getFullYear()}}}function Yt(e){return e!=null&&e.month!=null&&e.year!=null}function ll(e,t){return!Yt(e)||!Yt(t)?!1:(e=e,t=t,e.year!==t.year?e.year<t.year:e.month&&t.month&&e.month!==t.month?e.month<t.month:e.week&&t.week&&e.week!==t.week?e.week<t.week:e.day&&t.day&&e.day!==t.day?e.day<t.day:!1)}function aa(e,t){return!Yt(e)||!Yt(t)?!1:(e=e,t=t,e.year!==t.year?e.year>t.year:e.month&&t.month&&e.month!==t.month?e.month>t.month:e.week&&t.week&&e.week!==t.week?e.week>t.week:e.day&&t.day&&e.day!==t.day?e.day>t.day:!1)}function P2(e,t,n){return(e||!1)&&!ll(e,t)&&!aa(e,n)}function A2(e,t){return!e&&t||e&&!t?!1:!e&&!t?!0:(e=e,t=t,e.year===t.year&&e.month===t.month&&e.week===t.week&&e.day===t.day)}function Y2(e,t,n,o){if(!Yt(e)||!Yt(t))return[];const i=[];for(;!aa(e,t);)i.push(e),e=Ep(e,1,n,o);return i}function Cp(e){const{day:t,week:n,month:o,year:i}=e;let a=`${i}-${Me(o,2)}`;return n&&(a=`${a}-w${n}`),t&&(a=`${a}-${Me(t,2)}`),a}function I2(e,t){const{month:n,year:o,showWeeknumbers:i,showIsoWeeknumbers:a}=e,s=new Date(o,n-1,15),l=t.getMonthParts(n,o),u=t.getPrevMonthParts(n,o),c=t.getNextMonthParts(n,o),d=V2({monthComps:l,prevMonthComps:u,nextMonthComps:c},t),f=O2(d,i,a,t),h=$2(f[0],t);return{id:Cp(e),month:n,year:o,monthTitle:t.formatDate(s,t.masks.title),shortMonthLabel:t.formatDate(s,"MMM"),monthLabel:t.formatDate(s,"MMMM"),shortYearLabel:o.toString().substring(2),yearLabel:o.toString(),monthComps:l,prevMonthComps:u,nextMonthComps:c,days:d,weeks:f,weekdays:h}}function z2(e,t){const{day:n,week:o,view:i,trimWeeks:a}=e,s={...t,...e,title:"",viewDays:[],viewWeeks:[]};switch(i){case"daily":{let l=s.days.find(c=>c.inMonth);n?l=s.days.find(c=>c.day===n&&c.inMonth)||l:o&&(l=s.days.find(c=>c.week===o&&c.inMonth));const u=s.weeks[l.week-1];s.viewWeeks=[u],s.viewDays=[l],s.week=l.week,s.weekTitle=u.title,s.day=l.day,s.dayTitle=l.ariaLabel,s.title=s.dayTitle;break}case"weekly":{s.week=o||1;const l=s.weeks[s.week-1];s.viewWeeks=[l],s.viewDays=l.days,s.weekTitle=l.title,s.title=s.weekTitle;break}default:{s.title=s.monthTitle,s.viewWeeks=s.weeks.slice(0,a?s.monthComps.numWeeks:void 0),s.viewDays=s.days;break}}return s}class Pd{constructor(t,n,o){pe(this,"keys",[]),pe(this,"store",{}),this.size=t,this.createKey=n,this.createItem=o}get(...t){const n=this.createKey(...t);return this.store[n]}getOrSet(...t){const n=this.createKey(...t);if(this.store[n])return this.store[n];const o=this.createItem(...t);if(this.keys.length>=this.size){const i=this.keys.shift();i!=null&&delete this.store[i]}return this.keys.push(n),this.store[n]=o,o}}let Ad=class Pi{constructor(t,n=new sa){pe(this,"order"),pe(this,"locale"),pe(this,"start",null),pe(this,"end",null),pe(this,"repeat",null);var o;this.locale=n;const{start:i,end:a,span:s,order:l,repeat:u}=t;So(i)&&(this.start=n.getDateParts(i)),So(a)?this.end=n.getDateParts(a):this.start!=null&&s&&(this.end=n.getDateParts(Ke(this.start.date,s-1))),this.order=l??0,u&&(this.repeat=new la({from:(o=this.start)==null?void 0:o.date,...u},{locale:this.locale}))}static fromMany(t,n){return(ht(t)?t:[t]).filter(o=>o).map(o=>Pi.from(o,n))}static from(t,n){if(t instanceof Pi)return t;const o={start:null,end:null};return t!=null&&(ht(t)?(o.start=t[0]??null,o.end=t[1]??null):fn(t)?Object.assign(o,t):(o.start=t,o.end=t)),o.start!=null&&(o.start=new Date(o.start)),o.end!=null&&(o.end=new Date(o.end)),new Pi(o,n)}get opts(){const{order:t,locale:n}=this;return{order:t,locale:n}}get hasRepeat(){return!!this.repeat}get isSingleDay(){const{start:t,end:n}=this;return t&&n&&t.year===n.year&&t.month===n.month&&t.day===n.day}get isMultiDay(){return!this.isSingleDay}get daySpan(){return this.start==null||this.end==null?this.hasRepeat?1:1/0:this.end.dayIndex-this.start.dayIndex}startsOnDay(t){var n,o;return((n=this.start)==null?void 0:n.dayIndex)===t.dayIndex||!!((o=this.repeat)!=null&&o.passes(t))}intersectsDay(t){return this.intersectsDayRange(t,t)}intersectsRange(t){var n,o;return this.intersectsDayRange(((n=t.start)==null?void 0:n.dayIndex)??-1/0,((o=t.end)==null?void 0:o.dayIndex)??1/0)}intersectsDayRange(t,n){return!(this.start&&this.start.dayIndex>n||this.end&&this.end.dayIndex<t)}};class R2{constructor(){pe(this,"records",{})}render(t,n,o){var i,a,s,l;let u=null;const c=o[0].dayIndex,d=o[o.length-1].dayIndex;return n.hasRepeat?o.forEach(f=>{var h,p;if(n.startsOnDay(f)){const m=n.daySpan<1/0?n.daySpan:1;u={startDay:f.dayIndex,startTime:((h=n.start)==null?void 0:h.time)??0,endDay:f.dayIndex+m-1,endTime:((p=n.end)==null?void 0:p.time)??Ai},this.getRangeRecords(t).push(u)}}):n.intersectsDayRange(c,d)&&(u={startDay:((i=n.start)==null?void 0:i.dayIndex)??-1/0,startTime:((a=n.start)==null?void 0:a.time)??-1/0,endDay:((s=n.end)==null?void 0:s.dayIndex)??1/0,endTime:((l=n.end)==null?void 0:l.time)??1/0},this.getRangeRecords(t).push(u)),u}getRangeRecords(t){let n=this.records[t.key];return n||(n={ranges:[],data:t},this.records[t.key]=n),n.ranges}getCell(t,n){return this.getCells(n).find(o=>o.data.key===t)}cellExists(t,n){const o=this.records[t];return o==null?!1:o.ranges.some(i=>i.startDay<=n&&i.endDay>=n)}getCells(t){const n=Object.values(this.records),o=[],{dayIndex:i}=t;return n.forEach(({data:a,ranges:s})=>{s.filter(l=>l.startDay<=i&&l.endDay>=i).forEach(l=>{const u=i===l.startDay,c=i===l.endDay,d=u?l.startTime:0,f=new Date(t.startDate.getTime()+d),h=c?l.endTime:Ai,p=new Date(t.endDate.getTime()+h),m=d===0&&h===Ai,g=a.order||0;o.push({...l,data:a,onStart:u,onEnd:c,startTime:d,startDate:f,endTime:h,endDate:p,allDay:m,order:g})})}),o.sort((a,s)=>a.order-s.order),o}}const hn={ar:{dow:7,L:"D/M/YYYY"},bg:{dow:2,L:"D.MM.YYYY"},ca:{dow:2,L:"DD/MM/YYYY"},"zh-CN":{dow:2,L:"YYYY/MM/DD"},"zh-TW":{dow:1,L:"YYYY/MM/DD"},hr:{dow:2,L:"DD.MM.YYYY"},cs:{dow:2,L:"DD.MM.YYYY"},da:{dow:2,L:"DD.MM.YYYY"},nl:{dow:2,L:"DD-MM-YYYY"},"en-US":{dow:1,L:"MM/DD/YYYY"},"en-AU":{dow:2,L:"DD/MM/YYYY"},"en-CA":{dow:1,L:"YYYY-MM-DD"},"en-GB":{dow:2,L:"DD/MM/YYYY"},"en-IE":{dow:2,L:"DD-MM-YYYY"},"en-NZ":{dow:2,L:"DD/MM/YYYY"},"en-ZA":{dow:1,L:"YYYY/MM/DD"},eo:{dow:2,L:"YYYY-MM-DD"},et:{dow:2,L:"DD.MM.YYYY"},fi:{dow:2,L:"DD.MM.YYYY"},fr:{dow:2,L:"DD/MM/YYYY"},"fr-CA":{dow:1,L:"YYYY-MM-DD"},"fr-CH":{dow:2,L:"DD.MM.YYYY"},de:{dow:2,L:"DD.MM.YYYY"},he:{dow:1,L:"DD.MM.YYYY"},id:{dow:2,L:"DD/MM/YYYY"},it:{dow:2,L:"DD/MM/YYYY"},ja:{dow:1,L:"YYYY年M月D日"},ko:{dow:1,L:"YYYY.MM.DD"},lv:{dow:2,L:"DD.MM.YYYY"},lt:{dow:2,L:"DD.MM.YYYY"},mk:{dow:2,L:"D.MM.YYYY"},nb:{dow:2,L:"D. MMMM YYYY"},nn:{dow:2,L:"D. MMMM YYYY"},pl:{dow:2,L:"DD.MM.YYYY"},pt:{dow:2,L:"DD/MM/YYYY"},ro:{dow:2,L:"DD.MM.YYYY"},ru:{dow:2,L:"DD.MM.YYYY"},sk:{dow:2,L:"DD.MM.YYYY"},"es-ES":{dow:2,L:"DD/MM/YYYY"},"es-MX":{dow:2,L:"DD/MM/YYYY"},sv:{dow:2,L:"YYYY-MM-DD"},th:{dow:1,L:"DD/MM/YYYY"},tr:{dow:2,L:"DD.MM.YYYY"},uk:{dow:2,L:"DD.MM.YYYY"},vi:{dow:2,L:"DD/MM/YYYY"}};hn.en=hn["en-US"];hn.es=hn["es-ES"];hn.no=hn.nb;hn.zh=hn["zh-CN"];const L2=Object.entries(hn).reduce((e,[t,{dow:n,L:o}])=>(e[t]={id:t,firstDayOfWeek:n,masks:{L:o}},e),{}),F2="MMMM YYYY",H2="W",j2="MMM",W2="h A",U2=["L","YYYY-MM-DD","YYYY/MM/DD"],G2=["L h:mm A","YYYY-MM-DD h:mm A","YYYY/MM/DD h:mm A"],Z2=["L HH:mm","YYYY-MM-DD HH:mm","YYYY/MM/DD HH:mm"],q2=["h:mm A"],X2=["HH:mm"],K2="WWW, MMM D, YYYY",J2=["L","YYYY-MM-DD","YYYY/MM/DD"],Q2="iso",eT="YYYY-MM-DDTHH:mm:ss.SSSZ",tT={title:F2,weekdays:H2,navMonths:j2,hours:W2,input:U2,inputDateTime:G2,inputDateTime24hr:Z2,inputTime:q2,inputTime24hr:X2,dayPopover:K2,data:J2,model:Q2,iso:eT},nT=300,oT=60,rT=80,iT={maxSwipeTime:nT,minHorizontalSwipeDistance:oT,maxVerticalSwipeDistance:rT},aT={componentPrefix:"V",color:"blue",isDark:!1,navVisibility:"click",titlePosition:"center",transition:"slide-h",touch:iT,masks:tT,locales:L2,datePicker:{updateOnInput:!0,inputDebounce:1e3,popover:{visibility:"hover-focus",placement:"bottom-start",isInteractive:!0}}},ul=r.reactive(aT),sT=r.computed(()=>DS(ul.locales,e=>(e.masks=Ir(e.masks,ul.masks),e))),Yn=e=>typeof window<"u"&&wp(window.__vcalendar__,e)?Zn(window.__vcalendar__,e):Zn(ul,e),lT=12,uT=5;function cT(e,t){const n=new Intl.DateTimeFormat().resolvedOptions().locale;let o;At(e)?o=e:wp(e,"id")&&(o=e.id),o=(o||n).toLowerCase();const i=Object.keys(t),a=l=>i.find(u=>u.toLowerCase()===l);o=a(o)||a(o.substring(0,2))||n;const s={...t["en-IE"],...t[o],id:o,monthCacheSize:lT,pageCacheSize:uT};return fn(e)?Ir(e,s):s}let sa=class{constructor(e=void 0,t){pe(this,"id"),pe(this,"daysInWeek"),pe(this,"firstDayOfWeek"),pe(this,"masks"),pe(this,"timezone"),pe(this,"hourLabels"),pe(this,"dayNames"),pe(this,"dayNamesShort"),pe(this,"dayNamesShorter"),pe(this,"dayNamesNarrow"),pe(this,"monthNames"),pe(this,"monthNamesShort"),pe(this,"relativeTimeNames"),pe(this,"amPm",["am","pm"]),pe(this,"monthCache"),pe(this,"pageCache");const{id:n,firstDayOfWeek:o,masks:i,monthCacheSize:a,pageCacheSize:s}=cT(e,sT.value);this.monthCache=new Pd(a,OT,$T),this.pageCache=new Pd(s,Cp,I2),this.id=n,this.daysInWeek=Ge,this.firstDayOfWeek=WM(o,1,Ge),this.masks=i,this.timezone=t||void 0,this.hourLabels=this.getHourLabels(),this.dayNames=Cs("long",this.id),this.dayNamesShort=Cs("short",this.id),this.dayNamesShorter=this.dayNamesShort.map(l=>l.substring(0,2)),this.dayNamesNarrow=Cs("narrow",this.id),this.monthNames=Fd("long",this.id),this.monthNamesShort=Fd("short",this.id),this.relativeTimeNames=AT(this.id)}formatDate(e,t){return LT(e,t,this)}parseDate(e,t){return Hd(e,t,this)}toDate(e,t={}){const n=new Date(NaN);let o=n;const{fillDate:i,mask:a,patch:s,rules:l}=t;if(Nt(e)?(t.type="number",o=new Date(+e)):At(e)?(t.type="string",o=e?Hd(e,a||"iso",this):n):So(e)?(t.type="date",o=new Date(e.getTime())):du(e)&&(t.type="object",o=this.getDateFromParts(e)),o&&(s||l)){let u=this.getDateParts(o);if(s&&i!=null){const c=this.getDateParts(this.toDate(i));u=this.getDateParts(this.toDate({...c,..._p(u,xT[s])}))}l&&(u=RT(u,l)),o=this.getDateFromParts(u)}return o||n}toDateOrNull(e,t={}){const n=this.toDate(e,t);return isNaN(n.getTime())?null:n}fromDate(e,{type:t,mask:n}={}){switch(t){case"number":return e?e.getTime():NaN;case"string":return e?this.formatDate(e,n||"iso"):"";case"object":return e?this.getDateParts(e):null;default:return e?new Date(e):null}}range(e){return Ad.from(e,this)}ranges(e){return Ad.fromMany(e,this)}getDateParts(e){return VT(e,this)}getDateFromParts(e){return Yp(e,this.timezone)}getDateFromParams(e,t,n,o,i,a,s){return this.getDateFromParts({year:e,month:t,day:n,hours:o,minutes:i,seconds:a,milliseconds:s})}getPage(e){const t=this.pageCache.getOrSet(e,this);return z2(e,t)}getMonthParts(e,t){const{firstDayOfWeek:n}=this;return this.monthCache.getOrSet(e,t,n)}getThisMonthParts(){const e=new Date;return this.getMonthParts(e.getMonth()+1,e.getFullYear())}getPrevMonthParts(e,t){return e===1?this.getMonthParts(12,t-1):this.getMonthParts(e-1,t)}getNextMonthParts(e,t){return e===12?this.getMonthParts(1,t+1):this.getMonthParts(e+1,t)}getHourLabels(){return PT().map(e=>this.formatDate(e,this.masks.hours))}getDayId(e){return this.formatDate(e,"YYYY-MM-DD")}};var xo=(e=>(e.Any="any",e.All="all",e))(xo||{}),Sp=(e=>(e.Days="days",e.Weeks="weeks",e.Months="months",e.Years="years",e))(Sp||{}),Dp=(e=>(e.Days="days",e.Weekdays="weekdays",e.Weeks="weeks",e.Months="months",e.Years="years",e))(Dp||{}),Mp=(e=>(e.OrdinalWeekdays="ordinalWeekdays",e))(Mp||{});class dT{constructor(t,n,o){pe(this,"validated",!0),this.type=t,this.interval=n,this.from=o,this.from||(console.error('A valid "from" date is required for date interval rule. This rule will be skipped.'),this.validated=!1)}passes(t){if(!this.validated)return!0;const{date:n}=t;switch(this.type){case"days":return fu(this.from.date,n)%this.interval===0;case"weeks":return MT(this.from.date,n)%this.interval===0;case"months":return TT(this.from.date,n)%this.interval===0;case"years":return Ap(this.from.date,n)%this.interval===0;default:return!1}}}let Jo=class{constructor(t,n,o,i){pe(this,"components",[]),this.type=t,this.validator=o,this.getter=i,this.components=this.normalizeComponents(n)}static create(t,n){switch(t){case"days":return new fT(n);case"weekdays":return new hT(n);case"weeks":return new pT(n);case"months":return new mT(n);case"years":return new vT(n)}}normalizeComponents(t){if(this.validator(t))return[t];if(!ht(t))return[];const n=[];return t.forEach(o=>{if(!this.validator(o)){console.error(`Component value ${o} in invalid for "${this.type}" rule. This rule will be skipped.`);return}n.push(o)}),n}passes(t){return this.getter(t).some(n=>this.components.includes(n))}};class fT extends Jo{constructor(t){super("days",t,wT,({day:n,dayFromEnd:o})=>[n,-o])}}class hT extends Jo{constructor(t){super("weekdays",t,cl,({weekday:n})=>[n])}}class pT extends Jo{constructor(t){super("weeks",t,bT,({week:n,weekFromEnd:o})=>[n,-o])}}class mT extends Jo{constructor(t){super("months",t,_T,({month:n})=>[n])}}class vT extends Jo{constructor(t){super("years",t,Nt,({year:n})=>[n])}}class gT{constructor(t,n){pe(this,"components"),this.type=t,this.components=this.normalizeComponents(n)}normalizeArrayConfig(t){const n=[];return t.forEach((o,i)=>{if(Nt(o)){if(i===0)return;if(!Yd(t[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!cl(o)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([t[0],o])}else ht(o)&&n.push(...this.normalizeArrayConfig(o))}),n}normalizeComponents(t){const n=[];return t.forEach((o,i)=>{if(Nt(o)){if(i===0)return;if(!Yd(t[0])){console.error(`Ordinal range for "${this.type}" rule is from -5 to -1 or 1 to 5. This rule will be skipped.`);return}if(!cl(o)){console.error(`Acceptable range for "${this.type}" rule is from 1 to 5. This rule will be skipped`);return}n.push([t[0],o])}else ht(o)&&n.push(...this.normalizeArrayConfig(o))}),n}passes(t){const{weekday:n,weekdayOrdinal:o,weekdayOrdinalFromEnd:i}=t;return this.components.some(([a,s])=>(a===o||a===-i)&&n===s)}}class yT{constructor(t){pe(this,"type","function"),pe(this,"validated",!0),this.fn=t,uo(t)||(console.error("The function rule requires a valid function. This rule will be skipped."),this.validated=!1)}passes(t){return this.validated?this.fn(t):!0}}class la{constructor(t,n={},o){pe(this,"validated",!0),pe(this,"config"),pe(this,"type",xo.Any),pe(this,"from"),pe(this,"until"),pe(this,"rules",[]),pe(this,"locale",new sa),this.parent=o,n.locale&&(this.locale=n.locale),this.config=t,uo(t)?(this.type=xo.All,this.rules=[new yT(t)]):ht(t)?(this.type=xo.Any,this.rules=t.map(i=>new la(i,n,this))):fn(t)?(this.type=xo.All,this.from=t.from?this.locale.getDateParts(t.from):o?.from,this.until=t.until?this.locale.getDateParts(t.until):o?.until,this.rules=this.getObjectRules(t)):(console.error("Rule group configuration must be an object or an array."),this.validated=!1)}getObjectRules(t){const n=[];if(t.every&&(At(t.every)&&(t.every=[1,`${t.every}s`]),ht(t.every))){const[o=1,i=Sp.Days]=t.every;n.push(new dT(i,o,this.from))}return Object.values(Dp).forEach(o=>{o in t&&n.push(Jo.create(o,t[o]))}),Object.values(Mp).forEach(o=>{o in t&&n.push(new gT(o,t[o]))}),t.on!=null&&(ht(t.on)||(t.on=[t.on]),n.push(new la(t.on,{locale:this.locale},this.parent))),n}passes(t){return this.validated?this.from&&t.dayIndex<=this.from.dayIndex||this.until&&t.dayIndex>=this.until.dayIndex?!1:this.type===xo.Any?this.rules.some(n=>n.passes(t)):this.rules.every(n=>n.passes(t)):!0}}function wT(e){return Nt(e)?e>=1&&e<=31:!1}function cl(e){return Nt(e)?e>=1&&e<=7:!1}function bT(e){return Nt(e)?e>=-6&&e<=-1||e>=1&&e<=6:!1}function _T(e){return Nt(e)?e>=1&&e<=12:!1}function Yd(e){return!(!Nt(e)||e<-5||e>5||e===0)}const xT={dateTime:["year","month","day","hours","minutes","seconds","milliseconds"],date:["year","month","day"],time:["hours","minutes","seconds","milliseconds"]},Ge=7,kT=6,Tp=1e3,Vp=Tp*60,Op=Vp*60,Ai=Op*24,NT=[31,28,31,30,31,30,31,31,30,31,30,31],ET=["L","iso"],mr={milliseconds:[0,999,3],seconds:[0,59,2],minutes:[0,59,2],hours:[0,23,2]},$p=/d{1,2}|W{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|Z{1,4}|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,CT=/\[([^]*?)\]/gm,Id={D(e){return e.day},DD(e){return Me(e.day,2)},d(e){return e.weekday-1},dd(e){return Me(e.weekday-1,2)},W(e,t){return t.dayNamesNarrow[e.weekday-1]},WW(e,t){return t.dayNamesShorter[e.weekday-1]},WWW(e,t){return t.dayNamesShort[e.weekday-1]},WWWW(e,t){return t.dayNames[e.weekday-1]},M(e){return e.month},MM(e){return Me(e.month,2)},MMM(e,t){return t.monthNamesShort[e.month-1]},MMMM(e,t){return t.monthNames[e.month-1]},YY(e){return String(e.year).substr(2)},YYYY(e){return Me(e.year,4)},h(e){return e.hours%12||12},hh(e){return Me(e.hours%12||12,2)},H(e){return e.hours},HH(e){return Me(e.hours,2)},m(e){return e.minutes},mm(e){return Me(e.minutes,2)},s(e){return e.seconds},ss(e){return Me(e.seconds,2)},S(e){return Math.round(e.milliseconds/100)},SS(e){return Me(Math.round(e.milliseconds/10),2)},SSS(e){return Me(e.milliseconds,3)},a(e,t){return e.hours<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.hours<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},Z(){return"Z"},ZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60),2)}`},ZZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}`},ZZZZ(e){const t=e.timezoneOffset;return`${t>0?"-":"+"}${Me(Math.floor(Math.abs(t)/60),2)}:${Me(Math.abs(t)%60,2)}`}},_n=/\d\d?/,ST=/\d{3}/,DT=/\d{4}/,ur=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF/]+(\s*?[\u0600-\u06FF]+){1,2}/i,zd=()=>{},Rd=e=>(t,n,o)=>{const i=o[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~i&&(t.month=i)},Ve={D:[_n,(e,t)=>{e.day=t}],Do:[new RegExp(_n.source+ur.source),(e,t)=>{e.day=parseInt(t,10)}],d:[_n,zd],W:[ur,zd],M:[_n,(e,t)=>{e.month=t-1}],MMM:[ur,Rd("monthNamesShort")],MMMM:[ur,Rd("monthNames")],YY:[_n,(e,t)=>{const n=+new Date().getFullYear().toString().substr(0,2);e.year=+`${t>68?n-1:n}${t}`}],YYYY:[DT,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.milliseconds=t*100}],SS:[/\d{2}/,(e,t)=>{e.milliseconds=t*10}],SSS:[ST,(e,t)=>{e.milliseconds=t}],h:[_n,(e,t)=>{e.hours=t}],m:[_n,(e,t)=>{e.minutes=t}],s:[_n,(e,t)=>{e.seconds=t}],a:[ur,(e,t,n)=>{const o=t.toLowerCase();o===n.amPm[0]?e.isPm=!1:o===n.amPm[1]&&(e.isPm=!0)}],Z:[/[^\s]*?[+-]\d\d:?\d\d|[^\s]*?Z?/,(e,t)=>{t==="Z"&&(t="+00:00");const n=`${t}`.match(/([+-]|\d\d)/gi);if(n){const o=+n[1]*60+parseInt(n[2],10);e.timezoneOffset=n[0]==="+"?o:-o}}]};Ve.DD=Ve.D;Ve.dd=Ve.d;Ve.WWWW=Ve.WWW=Ve.WW=Ve.W;Ve.MM=Ve.M;Ve.mm=Ve.m;Ve.hh=Ve.H=Ve.HH=Ve.h;Ve.ss=Ve.s;Ve.A=Ve.a;Ve.ZZZZ=Ve.ZZZ=Ve.ZZ=Ve.Z;function Bp(e,t){return(on(e)&&e||[At(e)&&e||"YYYY-MM-DD"]).map(n=>ET.reduce((o,i)=>o.replace(i,t.masks[i]||""),n))}function du(e){return fn(e)&&"year"in e&&"month"in e&&"day"in e}function Ld(e,t=1){const n=e.getDay()+1,o=n>=t?t-n:-(7-(t-n));return Ke(e,o)}function Pp(e,t,n){const o=Date.UTC(e,t-1,n);return fu(new Date(0),new Date(o))}function fu(e,t){return Math.round((t.getTime()-e.getTime())/Ai)}function MT(e,t){return Math.ceil(fu(Ld(e),Ld(t))/7)}function Ap(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}function TT(e,t){return Ap(e,t)*12+(t.getMonth()-e.getMonth())}function Yp(e,t=""){const n=new Date,{year:o=n.getFullYear(),month:i=n.getMonth()+1,day:a=n.getDate(),hours:s=0,minutes:l=0,seconds:u=0,milliseconds:c=0}=e;if(t){const d=`${Me(o,4)}-${Me(i,2)}-${Me(a,2)}T${Me(s,2)}:${Me(l,2)}:${Me(u,2)}.${Me(c,3)}`;return l2(d,{timeZone:t})}return new Date(o,i-1,a,s,l,u,c)}function VT(e,t){let n=new Date(e.getTime());t.timezone&&(n=new Date(e.toLocaleString("en-US",{timeZone:t.timezone})),n.setMilliseconds(e.getMilliseconds()));const o=n.getMilliseconds(),i=n.getSeconds(),a=n.getMinutes(),s=n.getHours(),l=o+i*Tp+a*Vp+s*Op,u=n.getMonth()+1,c=n.getFullYear(),d=t.getMonthParts(u,c),f=n.getDate(),h=d.numDays-f+1,p=n.getDay()+1,m=Math.floor((f-1)/7+1),g=Math.floor((d.numDays-f)/7+1),b=Math.ceil((f+Math.abs(d.firstWeekday-d.firstDayOfWeek))/7),y=d.numWeeks-b+1,_=d.weeknumbers[b],w=Pp(c,u,f);return{milliseconds:o,seconds:i,minutes:a,hours:s,time:l,day:f,dayFromEnd:h,weekday:p,weekdayOrdinal:m,weekdayOrdinalFromEnd:g,week:b,weekFromEnd:y,weeknumber:_,month:u,year:c,date:n,dateTime:n.getTime(),dayIndex:w,timezoneOffset:0,isValid:!0}}function OT(e,t,n){return`${t}-${e}-${n}`}function $T(e,t,n){const o=t%4===0&&t%100!==0||t%400===0,i=new Date(t,e-1,1),a=i.getDay()+1,s=e===2&&o?29:NT[e-1],l=n-1,u=_2(i,{weekStartsOn:l}),c=[],d=[];for(let f=0;f<u;f++){const h=Ke(i,f*7);c.push(E2(h,{weekStartsOn:l})),d.push(M2(h))}return{firstDayOfWeek:n,firstDayOfMonth:i,inLeapYear:o,firstWeekday:a,numDays:s,numWeeks:u,month:e,year:t,weeknumbers:c,isoWeeknumbers:d}}function BT(){const e=[];for(let t=0;t<Ge;t++)e.push(Yp({year:2020,month:1,day:5+t,hours:12}));return e}function Cs(e,t=void 0){const n=new Intl.DateTimeFormat(t,{weekday:e});return BT().map(o=>n.format(o))}function PT(){const e=[];for(let t=0;t<=24;t++)e.push(new Date(2e3,0,1,t));return e}function AT(e=void 0){const t=["second","minute","hour","day","week","month","quarter","year"],n=new Intl.RelativeTimeFormat(e);return t.reduce((o,i)=>{const a=n.formatToParts(100,i);return o[i]=a[1].unit,o},{})}function Ip(){const e=[];for(let t=0;t<12;t++)e.push(new Date(2e3,t,15));return e}function Fd(e,t=void 0){const n=new Intl.DateTimeFormat(t,{month:e,timeZone:"UTC"});return Ip().map(o=>n.format(o))}function YT(e,t,n){return Nt(t)?t===e:ht(t)?t.includes(e):uo(t)?t(e,n):!(t.min!=null&&t.min>e||t.max!=null&&t.max<e||t.interval!=null&&e%t.interval!==0)}function vr(e,t,n){const o=[],[i,a,s]=t;for(let l=i;l<=a;l++)(n==null||YT(l,n,e))&&o.push({value:l,label:Me(l,s)});return o}function IT(e,t){return{milliseconds:vr(e,mr.milliseconds,t.milliseconds),seconds:vr(e,mr.seconds,t.seconds),minutes:vr(e,mr.minutes,t.minutes),hours:vr(e,mr.hours,t.hours)}}function zT(e,t,n,o){const i=vr(e,t,o).reduce((a,s)=>{if(s.disabled)return a;if(isNaN(a))return s.value;const l=Math.abs(a-n);return Math.abs(s.value-n)<l?s.value:a},NaN);return isNaN(i)?n:i}function RT(e,t){const n={...e};return Object.entries(t).forEach(([o,i])=>{const a=mr[o],s=e[o];n[o]=zT(e,a,s,i)}),n}function Hd(e,t,n){return Bp(t,n).map(o=>{if(typeof o!="string")throw new Error("Invalid mask");let i=e;if(i.length>1e3)return!1;let a=!0;const s={};if(o.replace($p,c=>{if(Ve[c]){const d=Ve[c],f=i.search(d[0]);~f?i.replace(d[0],h=>(d[1](s,h,n),i=i.substr(f+h.length),h)):a=!1}return Ve[c]?"":c.slice(1,c.length-1)}),!a)return!1;const l=new Date;s.hours!=null&&(s.isPm===!0&&+s.hours!=12?s.hours=+s.hours+12:s.isPm===!1&&+s.hours==12&&(s.hours=0));let u;return s.timezoneOffset!=null?(s.minutes=+(s.minutes||0)-+s.timezoneOffset,u=new Date(Date.UTC(s.year||l.getFullYear(),s.month||0,s.day||1,s.hours||0,s.minutes||0,s.seconds||0,s.milliseconds||0))):u=n.getDateFromParts({year:s.year||l.getFullYear(),month:(s.month||0)+1,day:s.day||1,hours:s.hours||0,minutes:s.minutes||0,seconds:s.seconds||0,milliseconds:s.milliseconds||0}),u}).find(o=>o)||new Date(e)}function LT(e,t,n){if(e==null)return"";let o=Bp(t,n)[0];/Z$/.test(o)&&(n.timezone="utc");const i=[];o=o.replace(CT,(s,l)=>(i.push(l),"??"));const a=n.getDateParts(e);return o=o.replace($p,s=>s in Id?Id[s](a,n):s.slice(1,s.length-1)),o.replace(/\?\?/g,()=>i.shift())}let FT=0;class zp{constructor(t,n,o){pe(this,"key",""),pe(this,"hashcode",""),pe(this,"highlight",null),pe(this,"content",null),pe(this,"dot",null),pe(this,"bar",null),pe(this,"event",null),pe(this,"popover",null),pe(this,"customData",null),pe(this,"ranges"),pe(this,"hasRanges",!1),pe(this,"order",0),pe(this,"pinPage",!1),pe(this,"maxRepeatSpan",0),pe(this,"locale");const{dates:i}=Object.assign(this,{hashcode:"",order:0,pinPage:!1},t);this.key||(this.key=++FT),this.locale=o,n.normalizeGlyphs(this),this.ranges=o.ranges(i??[]),this.hasRanges=!!on(this.ranges),this.maxRepeatSpan=this.ranges.filter(a=>a.hasRepeat).map(a=>a.daySpan).reduce((a,s)=>Math.max(a,s),0)}intersectsRange({start:t,end:n}){if(t==null||n==null)return!1;const o=this.ranges.filter(s=>!s.hasRepeat);for(const s of o)if(s.intersectsDayRange(t.dayIndex,n.dayIndex))return!0;const i=this.ranges.filter(s=>s.hasRepeat);if(!i.length)return!1;let a=t;for(this.maxRepeatSpan>1&&(a=this.locale.getDateParts(Ke(a.date,-this.maxRepeatSpan)));a.dayIndex<=n.dayIndex;){for(const s of i)if(s.startsOnDay(a))return!0;a=this.locale.getDateParts(Ke(a.date,1))}return!1}}function dl(e){document&&document.dispatchEvent(new CustomEvent("show-popover",{detail:e}))}function zr(e){document&&document.dispatchEvent(new CustomEvent("hide-popover",{detail:e}))}function Rp(e){document&&document.dispatchEvent(new CustomEvent("toggle-popover",{detail:e}))}function Lp(e){const{visibility:t}=e,n=t==="click",o=t==="hover",i=t==="hover-focus",a=t==="focus";e.autoHide=!n;let s=!1,l=!1;const u=m=>{n&&(Rp({...e,target:e.target||m.currentTarget}),m.stopPropagation())},c=m=>{s||(s=!0,(o||i)&&dl({...e,target:e.target||m.currentTarget}))},d=()=>{s&&(s=!1,(o||i&&!l)&&zr(e))},f=m=>{l||(l=!0,(a||i)&&dl({...e,target:e.target||m.currentTarget}))},h=m=>{l&&!$i(m.currentTarget,m.relatedTarget)&&(l=!1,(a||i&&!s)&&zr(e))},p={};switch(e.visibility){case"click":p.click=u;break;case"hover":p.mousemove=c,p.mouseleave=d;break;case"focus":p.focusin=f,p.focusout=h;break;case"hover-focus":p.mousemove=c,p.mouseleave=d,p.focusin=f,p.focusout=h;break}return p}const jd=e=>{const t=ta(e);if(t==null)return;const n=t.popoverHandlers;!n||!n.length||(n.forEach(o=>o()),delete t.popoverHandlers)},Wd=(e,t)=>{const n=ta(e);if(n==null)return;const o=[],i=Lp(t);Object.entries(i).forEach(([a,s])=>{o.push(Mn(n,a,s))}),n.popoverHandlers=o},Fp={mounted(e,t){const{value:n}=t;n&&Wd(e,n)},updated(e,t){const{oldValue:n,value:o}=t,i=n?.visibility,a=o?.visibility;i!==a&&(i&&(jd(e),a||zr(n)),a&&Wd(e,o))},unmounted(e){jd(e)}},HT=(e,t,{maxSwipeTime:n,minHorizontalSwipeDistance:o,maxVerticalSwipeDistance:i})=>{if(!e||!e.addEventListener||!uo(t))return null;let a=0,s=0,l=null,u=!1;function c(f){const h=f.changedTouches[0];a=h.screenX,s=h.screenY,l=new Date().getTime(),u=!0}function d(f){if(!u||!l)return;u=!1;const h=f.changedTouches[0],p=h.screenX-a,m=h.screenY-s;if(new Date().getTime()-l<n&&Math.abs(p)>=o&&Math.abs(m)<=i){const g={toLeft:!1,toRight:!1};p<0?g.toLeft=!0:g.toRight=!0,t(g)}}return Mn(e,"touchstart",c,{passive:!0}),Mn(e,"touchend",d,{passive:!0}),()=>{Dn(e,"touchstart",c),Dn(e,"touchend",d)}},Yi={},jT=(e,t=10)=>{Yi[e]=Date.now()+t},WT=(e,t)=>{if(e in Yi){const n=Yi[e];if(Date.now()<n)return;delete Yi[e]}t()};function Hp(){return typeof window<"u"}function UT(e){return Hp()&&e in window}function GT(e){const t=r.ref(!1),n=r.computed(()=>t.value?"dark":"light");let o,i;function a(p){t.value=p.matches}function s(){UT("matchMedia")&&(o=window.matchMedia("(prefers-color-scheme: dark)"),o.addEventListener("change",a),t.value=o.matches)}function l(){const{selector:p=":root",darkClass:m="dark"}=e.value,g=document.querySelector(p);t.value=g.classList.contains(m)}function u(p){const{selector:m=":root",darkClass:g="dark"}=p;if(Hp()&&m&&g){const b=document.querySelector(m);b&&(i=new MutationObserver(l),i.observe(b,{attributes:!0,attributeFilter:["class"]}),t.value=b.classList.contains(g))}}function c(){f();const p=typeof e.value;p==="string"&&e.value.toLowerCase()==="system"?s():p==="object"?u(e.value):t.value=!!e.value}const d=r.watch(()=>e.value,()=>c(),{immediate:!0});function f(){o&&(o.removeEventListener("change",a),o=void 0),i&&(i.disconnect(),i=void 0)}function h(){f(),d()}return r.onUnmounted(()=>h()),{isDark:t,displayMode:n,cleanup:h}}const ZT=["base","start","end","startEnd"],qT=["class","wrapperClass","contentClass","style","contentStyle","color","fillMode"],XT={base:{},start:{},end:{}};function hu(e,t,n=XT){let o=e,i={};t===!0||At(t)?(o=At(t)?t:o,i={...n}):fn(t)&&(Nd(t,ZT)?i={...t}:i={base:{...t},start:{...t},end:{...t}});const a=Ir(i,{start:i.startEnd,end:i.startEnd},n);return Object.entries(a).forEach(([s,l])=>{let u=o;l===!0||At(l)?(u=At(l)?l:u,a[s]={color:u}):fn(l)&&(Nd(l,qT)?a[s]={...l}:a[s]={}),Ir(a[s],{color:u})}),a}class KT{constructor(){pe(this,"type","highlight")}normalizeConfig(t,n){return hu(t,n,{base:{fillMode:"light"},start:{fillMode:"solid"},end:{fillMode:"solid"}})}prepareRender(t){t.highlights=[],t.content||(t.content=[])}render({data:t,onStart:n,onEnd:o},i){const{key:a,highlight:s}=t;if(!s)return;const{highlights:l}=i,{base:u,start:c,end:d}=s;n&&o?l.push({...c,key:a,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}`,c.contentClass]}):n?(l.push({...u,key:`${a}-base`,wrapperClass:`vc-day-layer vc-day-box-right-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-start vc-highlight-bg-${u.fillMode}`,u.class]}),l.push({...c,key:a,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${c.color}`,class:[`vc-highlight vc-highlight-bg-${c.fillMode}`,c.class],contentClass:[`vc-attr vc-highlight-content-${c.fillMode} vc-${c.color}`,c.contentClass]})):o?(l.push({...u,key:`${a}-base`,wrapperClass:`vc-day-layer vc-day-box-left-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-end vc-highlight-bg-${u.fillMode}`,u.class]}),l.push({...d,key:a,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${d.color}`,class:[`vc-highlight vc-highlight-bg-${d.fillMode}`,d.class],contentClass:[`vc-attr vc-highlight-content-${d.fillMode} vc-${d.color}`,d.contentClass]})):l.push({...u,key:`${a}-middle`,wrapperClass:`vc-day-layer vc-day-box-center-center vc-attr vc-${u.color}`,class:[`vc-highlight vc-highlight-base-middle vc-highlight-bg-${u.fillMode}`,u.class],contentClass:[`vc-attr vc-highlight-content-${u.fillMode} vc-${u.color}`,u.contentClass]})}}class pu{constructor(t,n){pe(this,"type",""),pe(this,"collectionType",""),this.type=t,this.collectionType=n}normalizeConfig(t,n){return hu(t,n)}prepareRender(t){t[this.collectionType]=[]}render({data:t,onStart:n,onEnd:o},i){const{key:a}=t,s=t[this.type];if(!a||!s)return;const l=i[this.collectionType],{base:u,start:c,end:d}=s;n?l.push({...c,key:a,class:[`vc-${this.type} vc-${this.type}-start vc-${c.color} vc-attr`,c.class]}):o?l.push({...d,key:a,class:[`vc-${this.type} vc-${this.type}-end vc-${d.color} vc-attr`,d.class]}):l.push({...u,key:a,class:[`vc-${this.type} vc-${this.type}-base vc-${u.color} vc-attr`,u.class]})}}class JT extends pu{constructor(){super("content","content")}normalizeConfig(t,n){return hu("base",n)}}class QT extends pu{constructor(){super("dot","dots")}}class eV extends pu{constructor(){super("bar","bars")}}class tV{constructor(t){pe(this,"color"),pe(this,"renderers",[new JT,new KT,new QT,new eV]),this.color=t}normalizeGlyphs(t){this.renderers.forEach(n=>{const o=n.type;t[o]!=null&&(t[o]=n.normalizeConfig(this.color,t[o]))})}prepareRender(t={}){return this.renderers.forEach(n=>{n.prepareRender(t)}),t}render(t,n){this.renderers.forEach(o=>{o.render(t,n)})}}const jp=Symbol("__vc_base_context__"),Wp={color:{type:String,default:()=>Yn("color")},isDark:{type:[Boolean,String,Object],default:()=>Yn("isDark")},firstDayOfWeek:Number,masks:Object,locale:[String,Object],timezone:String,minDate:null,maxDate:null,disabledDates:null};function Up(e){const t=r.computed(()=>e.color??""),n=r.computed(()=>e.isDark??!1),{displayMode:o}=GT(n),i=r.computed(()=>new tV(t.value)),a=r.computed(()=>{if(e.locale instanceof sa)return e.locale;const h=fn(e.locale)?e.locale:{id:e.locale,firstDayOfWeek:e.firstDayOfWeek,masks:e.masks};return new sa(h,e.timezone)}),s=r.computed(()=>a.value.masks),l=r.computed(()=>e.minDate),u=r.computed(()=>e.maxDate),c=r.computed(()=>{const h=e.disabledDates?[...e.disabledDates]:[];return l.value!=null&&h.push({start:null,end:Ke(a.value.toDate(l.value),-1)}),u.value!=null&&h.push({start:Ke(a.value.toDate(u.value),1),end:null}),a.value.ranges(h)}),d=r.computed(()=>new zp({key:"disabled",dates:c.value,order:100},i.value,a.value)),f={color:t,isDark:n,displayMode:o,theme:i,locale:a,masks:s,minDate:l,maxDate:u,disabledDates:c,disabledAttribute:d};return r.provide(jp,f),f}function nV(e){return r.inject(jp,()=>Up(e),!0)}function Gp(e){return`__vc_slot_${e}__`}function Zp(e,t={}){Object.keys(e).forEach(n=>{r.provide(Gp(t[n]??n),e[n])})}function qp(e){return r.inject(Gp(e),null)}const oV={...Wp,view:{type:String,default:"monthly",validator(e){return["daily","weekly","monthly"].includes(e)}},rows:{type:Number,default:1},columns:{type:Number,default:1},step:Number,titlePosition:{type:String,default:()=>Yn("titlePosition")},navVisibility:{type:String,default:()=>Yn("navVisibility")},showWeeknumbers:[Boolean,String],showIsoWeeknumbers:[Boolean,String],expanded:Boolean,borderless:Boolean,transparent:Boolean,initialPage:Object,initialPagePosition:{type:Number,default:1},minPage:Object,maxPage:Object,transition:String,attributes:Array,trimWeeks:Boolean,disablePageSwipe:Boolean},rV=["dayclick","daymouseenter","daymouseleave","dayfocusin","dayfocusout","daykeydown","weeknumberclick","transition-start","transition-end","did-move","update:view","update:pages"],Xp=Symbol("__vc_calendar_context__");function iV(e,{slots:t,emit:n}){const o=r.ref(null),i=r.ref(null),a=r.ref(new Date().getDate()),s=r.ref(!1),l=r.ref(Symbol()),u=r.ref(Symbol()),c=r.ref(e.view),d=r.ref([]),f=r.ref("");let h=null,p=null;Zp(t);const{theme:m,color:g,displayMode:b,locale:y,masks:_,minDate:w,maxDate:v,disabledAttribute:N,disabledDates:T}=nV(e),V=r.computed(()=>e.rows*e.columns),$=r.computed(()=>e.step||V.value),P=r.computed(()=>yp(d.value)??null),A=r.computed(()=>No(d.value)??null),O=r.computed(()=>e.minPage||(w.value?W(w.value):null)),x=r.computed(()=>e.maxPage||(v.value?W(v.value):null)),R=r.computed(()=>e.navVisibility),k=r.computed(()=>!!e.showWeeknumbers),M=r.computed(()=>!!e.showIsoWeeknumbers),S=r.computed(()=>c.value==="monthly"),L=r.computed(()=>c.value==="weekly"),F=r.computed(()=>c.value==="daily"),j=()=>{s.value=!0,n("transition-start")},I=()=>{s.value=!1,n("transition-end"),h&&(h.resolve(!0),h=null)},G=(U,C,H=c.value)=>Ep(U,C,H,y.value),W=U=>Np(U,c.value,y.value),ue=U=>{!N.value||!_e.value||(U.isDisabled=_e.value.cellExists(N.value.key,U.dayIndex))},ie=U=>{U.isFocusable=U.inMonth&&U.day===a.value},X=(U,C)=>{for(const H of U)for(const te of H.days)if(C(te)===!1)return},K=r.computed(()=>d.value.reduce((U,C)=>(U.push(...C.viewDays),U),[])),Q=r.computed(()=>{const U=[];return(e.attributes||[]).forEach((C,H)=>{!C||!C.dates||U.push(new zp({...C,order:C.order||0},m.value,y.value))}),N.value&&U.push(N.value),U}),ve=r.computed(()=>on(Q.value)),_e=r.computed(()=>{const U=new R2;return Q.value.forEach(C=>{C.ranges.forEach(H=>{U.render(C,H,K.value)})}),U}),ge=r.computed(()=>K.value.reduce((U,C)=>(U[C.dayIndex]={day:C,cells:[]},U[C.dayIndex].cells.push(..._e.value.getCells(C)),U),{})),we=(U,C)=>{const H=e.showWeeknumbers||e.showIsoWeeknumbers;return H==null?"":cS(H)?H?"left":"":H.startsWith("right")?C>1?"right":H:U>1?"left":H},ce=()=>{var U,C;if(!ve.value)return null;const H=Q.value.find(Ie=>Ie.pinPage)||Q.value[0];if(!H||!H.hasRanges)return null;const[te]=H.ranges,ke=((U=te.start)==null?void 0:U.date)||((C=te.end)==null?void 0:C.date);return ke?W(ke):null},de=()=>{if(Yt(P.value))return P.value;const U=ce();return Yt(U)?U:W(new Date)},D=(U,C={})=>{const{view:H=c.value,position:te=1,force:ke}=C,Ie=te>0?1-te:-(V.value+te);let Xe=G(U,Ie,H),rt=G(Xe,V.value-1,H);return ke||(ll(Xe,O.value)?Xe=O.value:aa(rt,x.value)&&(Xe=G(x.value,1-V.value)),rt=G(Xe,V.value-1)),{fromPage:Xe,toPage:rt}},E=(U,C,H="")=>{if(H==="none"||H==="fade")return H;if(U?.view!==C?.view)return"fade";const te=aa(C,U),ke=ll(C,U);return!te&&!ke?"fade":H==="slide-v"?ke?"slide-down":"slide-up":ke?"slide-right":"slide-left"},B=(U={})=>new Promise((C,H)=>{const{position:te=1,force:ke=!1,transition:Ie}=U,Xe=Yt(U.page)?U.page:de(),{fromPage:rt}=D(Xe,{position:te,force:ke}),vo=[];for(let go=0;go<V.value;go++){const ms=G(rt,go),Qe=go+1,ar=Math.ceil(Qe/e.columns),vs=e.rows-ar+1,yo=Qe%e.columns||e.columns,sc=e.columns-yo+1,Ag=we(yo,sc);vo.push(y.value.getPage({...ms,view:c.value,titlePosition:e.titlePosition,trimWeeks:e.trimWeeks,position:Qe,row:ar,rowFromEnd:vs,column:yo,columnFromEnd:sc,showWeeknumbers:k.value,showIsoWeeknumbers:M.value,weeknumberPosition:Ag}))}f.value=E(d.value[0],vo[0],Ie),d.value=vo,f.value&&f.value!=="none"?h={resolve:C,reject:H}:C(!0)}),z=U=>{const C=P.value??W(new Date);return G(C,U)},Y=(U,C={})=>{const H=Yt(U)?U:W(U);return Object.assign(C,D(H,{...C,force:!0})),Y2(C.fromPage,C.toPage,c.value,y.value).map(te=>P2(te,O.value,x.value)).some(te=>te)},ee=(U,C={})=>Y(z(U),C),J=r.computed(()=>ee(-$.value)),se=r.computed(()=>ee($.value)),re=async(U,C={})=>!C.force&&!Y(U,C)?!1:(C.fromPage&&!A2(C.fromPage,P.value)&&(zr({id:l.value,hideDelay:0}),C.view&&(jT("view",10),c.value=C.view),await B({...C,page:C.fromPage,position:1,force:!0}),n("did-move",d.value)),!0),fe=(U,C={})=>re(z(U),C),ye=()=>fe(-$.value),xe=()=>fe($.value),Ue=U=>{const C=S.value?".in-month":"",H=`.id-${y.value.getDayId(U)}${C}`,te=`${H}.vc-focusable, ${H} .vc-focusable`,ke=o.value;if(ke){const Ie=ke.querySelector(te);if(Ie)return Ie.focus(),!0}return!1},je=async(U,C={})=>Ue(U)?!0:(await re(U,C),Ue(U)),bn=(U,C)=>{a.value=U.day,n("dayclick",U,C)},ir=(U,C)=>{n("daymouseenter",U,C)},Ln=(U,C)=>{n("daymouseleave",U,C)},hs=(U,C)=>{a.value=U.day,i.value=U,U.isFocused=!0,n("dayfocusin",U,C)},ui=(U,C)=>{i.value=null,U.isFocused=!1,n("dayfocusout",U,C)},ci=(U,C)=>{n("daykeydown",U,C);const H=U.noonDate;let te=null;switch(C.key){case"ArrowLeft":{te=Ke(H,-1);break}case"ArrowRight":{te=Ke(H,1);break}case"ArrowUp":{te=Ke(H,-7);break}case"ArrowDown":{te=Ke(H,7);break}case"Home":{te=Ke(H,-U.weekdayPosition+1);break}case"End":{te=Ke(H,U.weekdayPositionFromEnd);break}case"PageUp":{C.altKey?te=Bd(H,-1):te=ia(H,-1);break}case"PageDown":{C.altKey?te=Bd(H,1):te=ia(H,1);break}}te&&(C.preventDefault(),je(te).catch())},ps=U=>{const C=i.value;C!=null&&ci(C,U)},di=(U,C)=>{n("weeknumberclick",U,C)};B({page:e.initialPage,position:e.initialPagePosition}),r.onMounted(()=>{!e.disablePageSwipe&&o.value&&(p=HT(o.value,({toLeft:U=!1,toRight:C=!1})=>{U?xe():C&&ye()},Yn("touch")))}),r.onUnmounted(()=>{d.value=[],p&&p()}),r.watch(()=>y.value,()=>{B()}),r.watch(()=>V.value,()=>B()),r.watch(()=>e.view,()=>c.value=e.view),r.watch(()=>c.value,()=>{WT("view",()=>{B()}),n("update:view",c.value)}),r.watch(()=>a.value,()=>{X(d.value,U=>ie(U))}),r.watchEffect(()=>{n("update:pages",d.value),X(d.value,U=>{ue(U),ie(U)})});const fi={emit:n,containerRef:o,focusedDay:i,inTransition:s,navPopoverId:l,dayPopoverId:u,view:c,pages:d,transitionName:f,theme:m,color:g,displayMode:b,locale:y,masks:_,attributes:Q,disabledAttribute:N,disabledDates:T,attributeContext:_e,days:K,dayCells:ge,count:V,step:$,firstPage:P,lastPage:A,canMovePrev:J,canMoveNext:se,minPage:O,maxPage:x,isMonthly:S,isWeekly:L,isDaily:F,navVisibility:R,showWeeknumbers:k,showIsoWeeknumbers:M,getDateAddress:W,canMove:Y,canMoveBy:ee,move:re,moveBy:fe,movePrev:ye,moveNext:xe,onTransitionBeforeEnter:j,onTransitionAfterEnter:I,tryFocusDate:Ue,focusDate:je,onKeydown:ps,onDayKeydown:ci,onDayClick:bn,onDayMouseenter:ir,onDayMouseleave:Ln,onDayFocusin:hs,onDayFocusout:ui,onWeeknumberClick:di};return r.provide(Xp,fi),fi}function fo(){const e=r.inject(Xp);if(e)return e;throw new Error("Calendar context missing. Please verify this component is nested within a valid context provider.")}const aV=r.defineComponent({inheritAttrs:!1,emits:["before-show","after-show","before-hide","after-hide"],props:{id:{type:[Number,String,Symbol],required:!0},showDelay:{type:Number,default:0},hideDelay:{type:Number,default:110},boundarySelector:{type:String}},setup(e,{emit:t}){let n;const o=r.ref();let i=null,a=null;const s=r.reactive({isVisible:!1,target:null,data:null,transition:"slide-fade",placement:"bottom",direction:"",positionFixed:!1,modifiers:[],isInteractive:!0,visibility:"click",isHovered:!1,isFocused:!1,autoHide:!1,force:!1});function l(I){I&&(s.direction=I.split("-")[0])}function u({placement:I,options:G}){l(I||G?.placement)}const c=r.computed(()=>({placement:s.placement,strategy:s.positionFixed?"fixed":"absolute",boundary:"",modifiers:[{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:u},...s.modifiers||[]],onFirstUpdate:u})),d=r.computed(()=>{const I=s.direction==="left"||s.direction==="right";let G="";if(s.placement){const W=s.placement.split("-");W.length>1&&(G=W[1])}return["start","top","left"].includes(G)?I?"top":"left":["end","bottom","right"].includes(G)?I?"bottom":"right":I?"middle":"center"});function f(){a&&(a.destroy(),a=null)}function h(){r.nextTick(()=>{const I=ta(s.target);!I||!o.value||(a&&a.state.elements.reference!==I&&f(),a?a.update():a=t0(I,o.value,c.value))})}function p(I){Object.assign(s,bp(I,"force"))}function m(I,G){clearTimeout(n),I>0?n=setTimeout(G,I):G()}function g(I){return!I||!a?!1:ta(I)===a.state.elements.reference}async function b(I={}){s.force||(I.force&&(s.force=!0),m(I.showDelay??e.showDelay,()=>{s.isVisible&&(s.force=!1),p({...I,isVisible:!0}),h()}))}function y(I={}){a&&(I.target&&!g(I.target)||s.force||(I.force&&(s.force=!0),m(I.hideDelay??e.hideDelay,()=>{s.isVisible||(s.force=!1),s.isVisible=!1})))}function _(I={}){I.target!=null&&(s.isVisible&&g(I.target)?y(I):b(I))}function w(I){if(!a)return;const G=a.state.elements.reference;if(!o.value||!G)return;const W=I.target;$i(o.value,W)||$i(G,W)||y({force:!0})}function v(I){(I.key==="Esc"||I.key==="Escape")&&y()}function N({detail:I}){!I.id||I.id!==e.id||b(I)}function T({detail:I}){!I.id||I.id!==e.id||y(I)}function V({detail:I}){!I.id||I.id!==e.id||_(I)}function $(){Mn(document,"keydown",v),Mn(document,"click",w),Mn(document,"show-popover",N),Mn(document,"hide-popover",T),Mn(document,"toggle-popover",V)}function P(){Dn(document,"keydown",v),Dn(document,"click",w),Dn(document,"show-popover",N),Dn(document,"hide-popover",T),Dn(document,"toggle-popover",V)}function A(I){t("before-show",I)}function O(I){s.force=!1,t("after-show",I)}function x(I){t("before-hide",I)}function R(I){s.force=!1,f(),t("after-hide",I)}function k(I){I.stopPropagation()}function M(){s.isHovered=!0,s.isInteractive&&["hover","hover-focus"].includes(s.visibility)&&b()}function S(){if(s.isHovered=!1,!a)return;const I=a.state.elements.reference;s.autoHide&&!s.isFocused&&(!I||I!==document.activeElement)&&["hover","hover-focus"].includes(s.visibility)&&y()}function L(){s.isFocused=!0,s.isInteractive&&["focus","hover-focus"].includes(s.visibility)&&b()}function F(I){["focus","hover-focus"].includes(s.visibility)&&(!I.relatedTarget||!$i(o.value,I.relatedTarget))&&(s.isFocused=!1,!s.isHovered&&s.autoHide&&y())}function j(){i!=null&&(i.disconnect(),i=null)}return r.watch(()=>o.value,I=>{j(),I&&(i=new ResizeObserver(()=>{a&&a.update()}),i.observe(I))}),r.watch(()=>s.placement,l,{immediate:!0}),r.onMounted(()=>{$()}),r.onUnmounted(()=>{f(),j(),P()}),{...r.toRefs(s),popoverRef:o,alignment:d,hide:y,setupPopper:h,beforeEnter:A,afterEnter:O,beforeLeave:x,afterLeave:R,onClick:k,onMouseOver:M,onMouseLeave:S,onFocusIn:L,onFocusOut:F}}}),ho=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};function sV(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vc-popover-content-wrapper",{"is-interactive":e.isInteractive}]),ref:"popoverRef",onClick:t[0]||(t[0]=(...s)=>e.onClick&&e.onClick(...s)),onMouseover:t[1]||(t[1]=(...s)=>e.onMouseOver&&e.onMouseOver(...s)),onMouseleave:t[2]||(t[2]=(...s)=>e.onMouseLeave&&e.onMouseLeave(...s)),onFocusin:t[3]||(t[3]=(...s)=>e.onFocusIn&&e.onFocusIn(...s)),onFocusout:t[4]||(t[4]=(...s)=>e.onFocusOut&&e.onFocusOut(...s))},[r.createVNode(r.Transition,{name:`vc-${e.transition}`,appear:"",onBeforeEnter:e.beforeEnter,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:r.withCtx(()=>[e.isVisible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,tabindex:"-1",class:`vc-popover-content direction-${e.direction}`},e.$attrs),[r.renderSlot(e.$slots,"default",{direction:e.direction,alignment:e.alignment,data:e.data,hide:e.hide},()=>[r.createTextVNode(r.toDisplayString(e.data),1)]),r.createElementVNode("span",{class:r.normalizeClass(["vc-popover-caret",`direction-${e.direction}`,`align-${e.alignment}`])},null,2)],16)):r.createCommentVNode("",!0)]),_:3},8,["name","onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],34)}const mu=ho(aV,[["render",sV]]),lV={class:"vc-day-popover-row"},uV={key:0,class:"vc-day-popover-row-indicator"},cV={class:"vc-day-popover-row-label"},dV=r.defineComponent({__name:"PopoverRow",props:{attribute:null},setup(e){const t=e,n=r.computed(()=>{const{content:o,highlight:i,dot:a,bar:s,popover:l}=t.attribute;return l&&l.hideIndicator?null:o?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${o.base.color}`}:i?{class:`vc-highlight-bg-solid vc-day-popover-row-highlight vc-attr vc-${i.base.color}`}:a?{class:`vc-dot vc-attr vc-${a.base.color}`}:s?{class:`vc-bar vc-day-popover-row-bar vc-attr vc-${s.base.color}`}:null});return(o,i)=>(r.openBlock(),r.createElementBlock("div",lV,[r.unref(n)?(r.openBlock(),r.createElementBlock("div",uV,[r.createElementVNode("span",{class:r.normalizeClass(r.unref(n).class)},null,2)])):r.createCommentVNode("",!0),r.createElementVNode("div",cV,[r.renderSlot(o.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(e.attribute.popover?e.attribute.popover.label:"No content provided"),1)])])]))}}),fV={inheritAttrs:!1},dt=r.defineComponent({...fV,__name:"CalendarSlot",props:{name:null},setup(e){const t=qp(e.name);return(n,o)=>r.unref(t)?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(t)),r.normalizeProps(r.mergeProps({key:0},n.$attrs)),null,16)):r.renderSlot(n.$slots,"default",{key:1})}}),hV={class:"vc-day-popover-container"},pV={key:0,class:"vc-day-popover-header"},mV=r.defineComponent({__name:"CalendarDayPopover",setup(e){const{dayPopoverId:t,displayMode:n,color:o,masks:i,locale:a}=fo();function s(u,c){return a.value.formatDate(u,c)}function l(u){return a.value.formatDate(u.date,i.value.dayPopover)}return(u,c)=>(r.openBlock(),r.createBlock(mu,{id:r.unref(t),class:r.normalizeClass([`vc-${r.unref(o)}`,`vc-${r.unref(n)}`])},{default:r.withCtx(({data:{day:d,attributes:f},hide:h})=>[r.createVNode(dt,{name:"day-popover",day:d,"day-title":l(d),attributes:f,format:s,masks:r.unref(i),hide:h},{default:r.withCtx(()=>[r.createElementVNode("div",hV,[r.unref(i).dayPopover?(r.openBlock(),r.createElementBlock("div",pV,r.toDisplayString(l(d)),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f,p=>(r.openBlock(),r.createBlock(dV,{key:p.key,attribute:p},null,8,["attribute"]))),128))])]),_:2},1032,["day","day-title","attributes","masks","hide"])]),_:1},8,["id","class"]))}}),vV={},gV={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},yV=r.createElementVNode("polyline",{points:"9 18 15 12 9 6"},null,-1),wV=[yV];function bV(e,t){return r.openBlock(),r.createElementBlock("svg",gV,wV)}const _V=ho(vV,[["render",bV]]),xV={},kV={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},NV=r.createElementVNode("polyline",{points:"15 18 9 12 15 6"},null,-1),EV=[NV];function CV(e,t){return r.openBlock(),r.createElementBlock("svg",kV,EV)}const SV=ho(xV,[["render",CV]]),DV={},MV={"stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 24 24"},TV=r.createElementVNode("polyline",{points:"6 9 12 15 18 9"},null,-1),VV=[TV];function OV(e,t){return r.openBlock(),r.createElementBlock("svg",MV,VV)}const $V=ho(DV,[["render",OV]]),BV={},PV={fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"},AV=r.createElementVNode("path",{d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),YV=[AV];function IV(e,t){return r.openBlock(),r.createElementBlock("svg",PV,YV)}const zV=ho(BV,[["render",IV]]),RV=Object.freeze(Object.defineProperty({__proto__:null,IconChevronDown:$V,IconChevronLeft:SV,IconChevronRight:_V,IconClock:zV},Symbol.toStringTag,{value:"Module"})),zo=r.defineComponent({__name:"BaseIcon",props:{name:{type:String,required:!0},width:{type:String},height:{type:String},size:{type:String,default:"26"},viewBox:{type:String}},setup(e){const t=e,n=r.computed(()=>t.width||t.size),o=r.computed(()=>t.height||t.size),i=r.computed(()=>RV[`Icon${t.name}`]);return(a,s)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(i)),{width:r.unref(n),height:r.unref(o),class:"vc-base-icon"},null,8,["width","height"]))}}),LV=["disabled"],FV={key:1,class:"vc-title-wrapper"},HV={type:"button",class:"vc-title"},jV=["disabled"],Kp=r.defineComponent({__name:"CalendarHeader",props:{page:null,layout:null,isLg:{type:Boolean},isXl:{type:Boolean},is2xl:{type:Boolean},hideTitle:{type:Boolean},hideArrows:{type:Boolean}},setup(e){const t=e,{navPopoverId:n,navVisibility:o,canMovePrev:i,movePrev:a,canMoveNext:s,moveNext:l}=fo(),u=r.computed(()=>{switch(t.page.titlePosition){case"left":return"bottom-start";case"right":return"bottom-end";default:return"bottom"}}),c=r.computed(()=>{const{page:g}=t;return{id:n.value,visibility:o.value,placement:u.value,modifiers:[{name:"flip",options:{fallbackPlacements:["bottom"]}}],data:{page:g},isInteractive:!0}}),d=r.computed(()=>t.page.titlePosition.includes("left")),f=r.computed(()=>t.page.titlePosition.includes("right")),h=r.computed(()=>t.layout?t.layout:d.value?"tu-pn":f.value?"pn-tu":"p-tu-n;"),p=r.computed(()=>({prev:h.value.includes("p")&&!t.hideArrows,title:h.value.includes("t")&&!t.hideTitle,next:h.value.includes("n")&&!t.hideArrows})),m=r.computed(()=>({gridTemplateColumns:h.value.split("").map(g=>{switch(g){case"p":return"[prev] auto";case"n":return"[next] auto";case"t":return"[title] auto";case"-":return"1fr";default:return""}}).join(" ")}));return(g,b)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vc-header",{"is-lg":e.isLg,"is-xl":e.isXl,"is-2xl":e.is2xl}]),style:r.normalizeStyle(r.unref(m))},[r.unref(p).prev?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",class:"vc-arrow vc-prev vc-focus",disabled:!r.unref(i),onClick:b[0]||(b[0]=(...y)=>r.unref(a)&&r.unref(a)(...y)),onKeydown:b[1]||(b[1]=r.withKeys((...y)=>r.unref(a)&&r.unref(a)(...y),["space","enter"]))},[r.createVNode(dt,{name:"header-prev-button",disabled:!r.unref(i)},{default:r.withCtx(()=>[r.createVNode(zo,{name:"ChevronLeft",size:"24"})]),_:1},8,["disabled"])],40,LV)):r.createCommentVNode("",!0),r.unref(p).title?(r.openBlock(),r.createElementBlock("div",FV,[r.createVNode(dt,{name:"header-title-wrapper"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createElementBlock("button",HV,[r.createVNode(dt,{name:"header-title",title:e.page.title},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(e.page.title),1)]),_:1},8,["title"])])),[[r.unref(Fp),r.unref(c)]])]),_:1})])):r.createCommentVNode("",!0),r.unref(p).next?(r.openBlock(),r.createElementBlock("button",{key:2,type:"button",class:"vc-arrow vc-next vc-focus",disabled:!r.unref(s),onClick:b[2]||(b[2]=(...y)=>r.unref(l)&&r.unref(l)(...y)),onKeydown:b[3]||(b[3]=r.withKeys((...y)=>r.unref(l)&&r.unref(l)(...y),["space","enter"]))},[r.createVNode(dt,{name:"header-next-button",disabled:!r.unref(s)},{default:r.withCtx(()=>[r.createVNode(zo,{name:"ChevronRight",size:"24"})]),_:1},8,["disabled"])],40,jV)):r.createCommentVNode("",!0)],6))}}),Jp=Symbol("__vc_page_context__");function WV(e){const{locale:t,getDateAddress:n,canMove:o}=fo();function i(l,u){const{month:c,year:d}=n(new Date);return Ip().map((f,h)=>{const p=h+1;return{month:p,year:l,id:B2(p,l),label:t.value.formatDate(f,u),ariaLabel:t.value.formatDate(f,"MMMM"),isActive:p===e.value.month&&l===e.value.year,isCurrent:p===c&&l===d,isDisabled:!o({month:p,year:l},{position:e.value.position})}})}function a(l,u){const{year:c}=n(new Date),{position:d}=e.value,f=[];for(let h=l;h<=u;h+=1){const p=[...Array(12).keys()].some(m=>o({month:m+1,year:h},{position:d}));f.push({year:h,id:h.toString(),label:h.toString(),ariaLabel:h.toString(),isActive:h===e.value.year,isCurrent:h===c,isDisabled:!p})}return f}const s={page:e,getMonthItems:i,getYearItems:a};return r.provide(Jp,s),s}function Qp(){const e=r.inject(Jp);if(e)return e;throw new Error("Page context missing. Please verify this component is nested within a valid context provider.")}const UV={class:"vc-nav-header"},GV=["disabled"],ZV=["disabled"],qV={class:"vc-nav-items"},XV=["data-id","aria-label","disabled","onClick","onKeydown"],KV=r.defineComponent({__name:"CalendarNav",setup(e){const{masks:t,move:n}=fo(),{page:o,getMonthItems:i,getYearItems:a}=Qp(),s=r.ref(!0),l=12,u=r.ref(o.value.year),c=r.ref(h(o.value.year)),d=r.ref(null);function f(){setTimeout(()=>{if(d.value==null)return;const W=d.value.querySelector(".vc-nav-item:not(:disabled)");W&&W.focus()},10)}function h(W){return Math.floor(W/l)}function p(){s.value=!s.value}function m(W){return W*l}function g(W){return l*(W+1)-1}function b(){L.value&&(s.value&&_(),v())}function y(){F.value&&(s.value&&w(),N())}function _(){u.value--}function w(){u.value++}function v(){c.value--}function N(){c.value++}const T=r.computed(()=>i(u.value,t.value.navMonths).map(W=>({...W,click:()=>n({month:W.month,year:W.year},{position:o.value.position})}))),V=r.computed(()=>i(u.value-1,t.value.navMonths)),$=r.computed(()=>V.value.some(W=>!W.isDisabled)),P=r.computed(()=>i(u.value+1,t.value.navMonths)),A=r.computed(()=>P.value.some(W=>!W.isDisabled)),O=r.computed(()=>a(m(c.value),g(c.value)).map(W=>({...W,click:()=>{u.value=W.year,s.value=!0,f()}}))),x=r.computed(()=>a(m(c.value-1),g(c.value-1))),R=r.computed(()=>x.value.some(W=>!W.isDisabled)),k=r.computed(()=>a(m(c.value+1),g(c.value+1))),M=r.computed(()=>k.value.some(W=>!W.isDisabled)),S=r.computed(()=>s.value?T.value:O.value),L=r.computed(()=>s.value?$.value:R.value),F=r.computed(()=>s.value?A.value:M.value),j=r.computed(()=>yp(O.value.map(W=>W.year))),I=r.computed(()=>No(O.value.map(W=>W.year))),G=r.computed(()=>s.value?u.value:`${j.value} - ${I.value}`);return r.watchEffect(()=>{u.value=o.value.year,f()}),r.watch(()=>u.value,W=>c.value=h(W)),r.onMounted(()=>f()),(W,ue)=>(r.openBlock(),r.createElementBlock("div",{class:"vc-nav-container",ref_key:"navContainer",ref:d},[r.createElementVNode("div",UV,[r.createElementVNode("button",{type:"button",class:"vc-nav-arrow is-left vc-focus",disabled:!r.unref(L),onClick:b,onKeydown:ue[0]||(ue[0]=ie=>r.unref(yi)(ie,b))},[r.createVNode(dt,{name:"nav-prev-button",move:b,disabled:!r.unref(L)},{default:r.withCtx(()=>[r.createVNode(zo,{name:"ChevronLeft",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,GV),r.createElementVNode("button",{type:"button",class:"vc-nav-title vc-focus",onClick:p,onKeydown:ue[1]||(ue[1]=ie=>r.unref(yi)(ie,p))},r.toDisplayString(r.unref(G)),33),r.createElementVNode("button",{type:"button",class:"vc-nav-arrow is-right vc-focus",disabled:!r.unref(F),onClick:y,onKeydown:ue[2]||(ue[2]=ie=>r.unref(yi)(ie,y))},[r.createVNode(dt,{name:"nav-next-button",move:y,disabled:!r.unref(F)},{default:r.withCtx(()=>[r.createVNode(zo,{name:"ChevronRight",width:"22px",height:"24px"})]),_:1},8,["disabled"])],40,ZV)]),r.createElementVNode("div",qV,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(S),ie=>(r.openBlock(),r.createElementBlock("button",{key:ie.label,type:"button","data-id":ie.id,"aria-label":ie.ariaLabel,class:r.normalizeClass(["vc-nav-item vc-focus",[ie.isActive?"is-active":ie.isCurrent?"is-current":""]]),disabled:ie.isDisabled,onClick:ie.click,onKeydown:X=>r.unref(yi)(X,ie.click)},r.toDisplayString(ie.label),43,XV))),128))])],512))}}),em=r.defineComponent({__name:"CalendarPageProvider",props:{page:null},setup(e){return WV(r.toRef(e,"page")),(t,n)=>r.renderSlot(t.$slots,"default")}}),JV=r.defineComponent({__name:"CalendarNavPopover",setup(e){const{navPopoverId:t,color:n,displayMode:o}=fo();return(i,a)=>(r.openBlock(),r.createBlock(mu,{id:r.unref(t),class:r.normalizeClass(["vc-nav-popover-container",`vc-${r.unref(n)}`,`vc-${r.unref(o)}`])},{default:r.withCtx(({data:s})=>[r.createVNode(em,{page:s.page},{default:r.withCtx(()=>[r.createVNode(dt,{name:"nav"},{default:r.withCtx(()=>[r.createVNode(KV)]),_:1})]),_:2},1032,["page"])]),_:1},8,["id","class"]))}}),QV=r.defineComponent({directives:{popover:Fp},components:{CalendarSlot:dt},props:{day:{type:Object,required:!0}},setup(e){const{locale:t,theme:n,attributeContext:o,dayPopoverId:i,onDayClick:a,onDayMouseenter:s,onDayMouseleave:l,onDayFocusin:u,onDayFocusout:c,onDayKeydown:d}=fo(),f=r.computed(()=>e.day),h=r.computed(()=>o.value.getCells(f.value)),p=r.computed(()=>h.value.map(M=>M.data)),m=r.computed(()=>({...f.value,attributes:p.value,attributeCells:h.value}));function g({data:M},{popovers:S}){const{key:L,customData:F,popover:j}=M;if(!j)return;const I=vd({key:L,customData:F,attribute:M},{...j},{visibility:j.label?"hover":"click",placement:"bottom",isInteractive:!j.label});S.splice(0,0,I)}const b=r.computed(()=>{const M={...n.value.prepareRender({}),popovers:[]};return h.value.forEach(S=>{n.value.render(S,M),g(S,M)}),M}),y=r.computed(()=>b.value.highlights),_=r.computed(()=>!!on(y.value)),w=r.computed(()=>b.value.content),v=r.computed(()=>b.value.dots),N=r.computed(()=>!!on(v.value)),T=r.computed(()=>b.value.bars),V=r.computed(()=>!!on(T.value)),$=r.computed(()=>b.value.popovers),P=r.computed(()=>$.value.map(M=>M.attribute)),A=qp("day-content"),O=r.computed(()=>["vc-day",...f.value.classes,{"vc-day-box-center-center":!A},{"is-not-in-month":!e.day.inMonth}]),x=r.computed(()=>{let M;f.value.isFocusable?M="0":M="-1";const S=["vc-day-content vc-focusable vc-focus vc-attr",{"vc-disabled":f.value.isDisabled},Zn(No(y.value),"contentClass"),Zn(No(w.value),"class")||""],L={...Zn(No(y.value),"contentStyle"),...Zn(No(w.value),"style")};return{class:S,style:L,tabindex:M,"aria-label":f.value.ariaLabel,"aria-disabled":!!f.value.isDisabled,role:"button"}}),R=r.computed(()=>({click(M){a(m.value,M)},mouseenter(M){s(m.value,M)},mouseleave(M){l(m.value,M)},focusin(M){u(m.value,M)},focusout(M){c(m.value,M)},keydown(M){d(m.value,M)}})),k=r.computed(()=>on($.value)?vd({id:i.value,data:{day:f,attributes:P.value}},...$.value):null);return{attributes:p,attributeCells:h,bars:T,dayClasses:O,dayContentProps:x,dayContentEvents:R,dayPopover:k,glyphs:b,dots:v,hasDots:N,hasBars:V,highlights:y,hasHighlights:_,locale:t,popovers:$}}}),eO={key:0,class:"vc-highlights vc-day-layer"},tO={key:1,class:"vc-day-layer vc-day-box-center-bottom"},nO={class:"vc-dots"},oO={key:2,class:"vc-day-layer vc-day-box-center-bottom"},rO={class:"vc-bars"};function iO(e,t,n,o,i,a){const s=r.resolveComponent("CalendarSlot"),l=r.resolveDirective("popover");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(e.dayClasses)},[e.hasHighlights?(r.openBlock(),r.createElementBlock("div",eO,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.highlights,({key:u,wrapperClass:c,class:d,style:f})=>(r.openBlock(),r.createElementBlock("div",{key:u,class:r.normalizeClass(c)},[r.createElementVNode("div",{class:r.normalizeClass(d),style:r.normalizeStyle(f)},null,6)],2))),128))])):r.createCommentVNode("",!0),r.createVNode(s,{name:"day-content",day:e.day,attributes:e.attributes,"attribute-cells":e.attributeCells,dayProps:e.dayContentProps,dayEvents:e.dayContentEvents,locale:e.locale},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps(e.dayContentProps,r.toHandlers(e.dayContentEvents,!0)),[r.createTextVNode(r.toDisplayString(e.day.label),1)],16)),[[l,e.dayPopover]])]),_:1},8,["day","attributes","attribute-cells","dayProps","dayEvents","locale"]),e.hasDots?(r.openBlock(),r.createElementBlock("div",tO,[r.createElementVNode("div",nO,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.dots,({key:u,class:c,style:d})=>(r.openBlock(),r.createElementBlock("span",{key:u,class:r.normalizeClass(c),style:r.normalizeStyle(d)},null,6))),128))])])):r.createCommentVNode("",!0),e.hasBars?(r.openBlock(),r.createElementBlock("div",oO,[r.createElementVNode("div",rO,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.bars,({key:u,class:c,style:d})=>(r.openBlock(),r.createElementBlock("span",{key:u,class:r.normalizeClass(c),style:r.normalizeStyle(d)},null,6))),128))])])):r.createCommentVNode("",!0)],2)}const aO=ho(QV,[["render",iO]]),sO={class:"vc-weekdays"},lO=["onClick"],uO={inheritAttrs:!1},cO=r.defineComponent({...uO,__name:"CalendarPage",setup(e){const{page:t}=Qp(),{onWeeknumberClick:n}=fo();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vc-pane",`row-${r.unref(t).row}`,`row-from-end-${r.unref(t).rowFromEnd}`,`column-${r.unref(t).column}`,`column-from-end-${r.unref(t).columnFromEnd}`]),ref:"pane"},[r.createVNode(Kp,{page:r.unref(t),"is-lg":"","hide-arrows":""},null,8,["page"]),r.createElementVNode("div",{class:r.normalizeClass(["vc-weeks",{[`vc-show-weeknumbers-${r.unref(t).weeknumberPosition}`]:r.unref(t).weeknumberPosition}])},[r.createElementVNode("div",sO,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(t).weekdays,({weekday:a,label:s},l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass(`vc-weekday vc-weekday-${a}`)},r.toDisplayString(s),3))),128))]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(t).viewWeeks,a=>(r.openBlock(),r.createElementBlock("div",{key:`weeknumber-${a.weeknumber}`,class:"vc-week"},[r.unref(t).weeknumberPosition?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["vc-weeknumber",`is-${r.unref(t).weeknumberPosition}`])},[r.createElementVNode("span",{class:r.normalizeClass(["vc-weeknumber-content"]),onClick:s=>r.unref(n)(a,s)},r.toDisplayString(a.weeknumberDisplay),9,lO)],2)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.days,s=>(r.openBlock(),r.createBlock(aO,{key:s.id,day:s},null,8,["day"]))),128))]))),128))],2)],2))}}),dO=r.defineComponent({components:{CalendarHeader:Kp,CalendarPage:cO,CalendarNavPopover:JV,CalendarDayPopover:mV,CalendarPageProvider:em,CalendarSlot:dt},props:oV,emit:rV,setup(e,{emit:t,slots:n}){return iV(e,{emit:t,slots:n})}}),fO={class:"vc-pane-header-wrapper"};function hO(e,t,n,o,i,a){const s=r.resolveComponent("CalendarHeader"),l=r.resolveComponent("CalendarPage"),u=r.resolveComponent("CalendarSlot"),c=r.resolveComponent("CalendarPageProvider"),d=r.resolveComponent("CalendarDayPopover"),f=r.resolveComponent("CalendarNavPopover");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",r.mergeProps({"data-helptext":"Press the arrow keys to navigate by day, Home and End to navigate to week ends, PageUp and PageDown to navigate by month, Alt+PageUp and Alt+PageDown to navigate by year"},e.$attrs,{class:["vc-container",`vc-${e.view}`,`vc-${e.color}`,`vc-${e.displayMode}`,{"vc-expanded":e.expanded,"vc-bordered":!e.borderless,"vc-transparent":e.transparent}],onMouseup:t[0]||(t[0]=r.withModifiers(()=>{},["prevent"])),ref:"containerRef"}),[r.createElementVNode("div",{class:r.normalizeClass(["vc-pane-container",{"in-transition":e.inTransition}])},[r.createElementVNode("div",fO,[e.firstPage?(r.openBlock(),r.createBlock(s,{key:0,page:e.firstPage,"is-lg":"","hide-title":""},null,8,["page"])):r.createCommentVNode("",!0)]),r.createVNode(r.Transition,{name:`vc-${e.transitionName}`,onBeforeEnter:e.onTransitionBeforeEnter,onAfterEnter:e.onTransitionAfterEnter},{default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{key:e.pages[0].id,class:"vc-pane-layout",style:r.normalizeStyle({gridTemplateColumns:`repeat(${e.columns}, 1fr)`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.pages,h=>(r.openBlock(),r.createBlock(c,{key:h.id,page:h},{default:r.withCtx(()=>[r.createVNode(u,{name:"page",page:h},{default:r.withCtx(()=>[r.createVNode(l)]),_:2},1032,["page"])]),_:2},1032,["page"]))),128))],4))]),_:1},8,["name","onBeforeEnter","onAfterEnter"]),r.createVNode(u,{name:"footer"})],2)],16),r.createVNode(d),r.createVNode(f)],64)}const pO=ho(dO,[["render",hO]]),tm=Symbol("__vc_date_picker_context__"),mO={...Wp,mode:{type:String,default:"date"},modelValue:{type:[Number,String,Date,Object]},modelModifiers:{type:Object,default:()=>({})},rules:[String,Object],is24hr:Boolean,hideTimeHeader:Boolean,timeAccuracy:{type:Number,default:2},isRequired:Boolean,isRange:Boolean,updateOnInput:{type:Boolean,default:()=>Yn("datePicker.updateOnInput")},inputDebounce:{type:Number,default:()=>Yn("datePicker.inputDebounce")},popover:{type:[Boolean,Object],default:!0},dragAttribute:Object,selectAttribute:Object,attributes:[Object,Array]},vO=["update:modelValue","drag","dayclick","daykeydown","popover-will-show","popover-did-show","popover-will-hide","popover-did-hide"];function gO(e,{emit:t,slots:n}){Zp(n,{footer:"dp-footer"});const o=Up(e),{locale:i,masks:a,disabledAttribute:s}=o,l=r.ref(!1),u=r.ref(Symbol()),c=r.ref(null),d=r.ref(null),f=r.ref(["",""]),h=r.ref(null),p=r.ref(null);let m,g,b=!0;const y=r.computed(()=>e.isRange||e.modelModifiers.range===!0),_=r.computed(()=>y.value&&c.value!=null?c.value.start:null),w=r.computed(()=>y.value&&c.value!=null?c.value.end:null),v=r.computed(()=>e.mode.toLowerCase()==="date"),N=r.computed(()=>e.mode.toLowerCase()==="datetime"),T=r.computed(()=>e.mode.toLowerCase()==="time"),V=r.computed(()=>!!d.value),$=r.computed(()=>{let C="date";e.modelModifiers.number&&(C="number"),e.modelModifiers.string&&(C="string");const H=a.value.modelValue||"iso";return ue({type:C,mask:H})}),P=r.computed(()=>ee(d.value??c.value)),A=r.computed(()=>T.value?e.is24hr?a.value.inputTime24hr:a.value.inputTime:N.value?e.is24hr?a.value.inputDateTime24hr:a.value.inputDateTime:a.value.input),O=r.computed(()=>/[Hh]/g.test(A.value)),x=r.computed(()=>/[dD]{1,2}|Do|W{1,4}|M{1,4}|YY(?:YY)?/g.test(A.value)),R=r.computed(()=>{if(O.value&&x.value)return"dateTime";if(x.value)return"date";if(O.value)return"time"}),k=r.computed(()=>{var C;const H=((C=h.value)==null?void 0:C.$el.previousElementSibling)??void 0;return Ir({},e.popover,Yn("datePicker.popover"),{target:H})}),M=r.computed(()=>Lp({...k.value,id:u.value})),S=r.computed(()=>y.value?{start:f.value[0],end:f.value[1]}:f.value[0]),L=r.computed(()=>{const C=["start","end"].map(H=>({input:B(H),change:z(H),keyup:Y,...e.popover&&M.value}));return y.value?{start:C[0],end:C[1]}:C[0]}),F=r.computed(()=>{if(!Q(c.value))return null;const C={key:"select-drag",...e.selectAttribute,dates:c.value,pinPage:!0},{dot:H,bar:te,highlight:ke,content:Ie}=C;return!H&&!te&&!ke&&!Ie&&(C.highlight=!0),C}),j=r.computed(()=>{if(!y.value||!Q(d.value))return null;const C={key:"select-drag",...e.dragAttribute,dates:d.value},{dot:H,bar:te,highlight:ke,content:Ie}=C;return!H&&!te&&!ke&&!Ie&&(C.highlight={startEnd:{fillMode:"outline"}}),C}),I=r.computed(()=>{const C=ht(e.attributes)?[...e.attributes]:[];return j.value?C.unshift(j.value):F.value&&C.unshift(F.value),C}),G=r.computed(()=>ue(e.rules==="auto"?W():e.rules??{}));function W(){const C={ms:[0,999],sec:[0,59],min:[0,59],hr:[0,23]},H=v.value?0:e.timeAccuracy;return[0,1].map(te=>{switch(H){case 0:return{hours:C.hr[te],minutes:C.min[te],seconds:C.sec[te],milliseconds:C.ms[te]};case 1:return{minutes:C.min[te],seconds:C.sec[te],milliseconds:C.ms[te]};case 3:return{milliseconds:C.ms[te]};case 4:return{};default:return{seconds:C.sec[te],milliseconds:C.ms[te]}}})}function ue(C){return ht(C)?C.length===1?[C[0],C[0]]:C:[C,C]}function ie(C){return ue(C).map((H,te)=>({...H,rules:G.value[te]}))}function X(C){return C==null?!1:Nt(C)?!isNaN(C):So(C)?!isNaN(C.getTime()):At(C)?C!=="":du(C)}function K(C){return fn(C)&&"start"in C&&"end"in C&&X(C.start??null)&&X(C.end??null)}function Q(C){return K(C)||X(C)}function ve(C,H){if(C==null&&H==null)return!0;if(C==null||H==null)return!1;const te=So(C),ke=So(H);return te&&ke?C.getTime()===H.getTime():te||ke?!1:ve(C.start,H.start)&&ve(C.end,H.end)}function _e(C){return!Q(C)||!s.value?!1:s.value.intersectsRange(i.value.range(C))}function ge(C,H,te,ke){if(!Q(C))return null;if(K(C)){const Ie=i.value.toDate(C.start,{...H[0],fillDate:_.value??void 0,patch:te}),Xe=i.value.toDate(C.end,{...H[1],fillDate:w.value??void 0,patch:te});return ui({start:Ie,end:Xe},ke)}return i.value.toDateOrNull(C,{...H[0],fillDate:c.value,patch:te})}function we(C,H){return K(C)?{start:i.value.fromDate(C.start,H[0]),end:i.value.fromDate(C.end,H[1])}:y.value?null:i.value.fromDate(C,H[0])}function ce(C,H={}){return clearTimeout(m),new Promise(te=>{const{debounce:ke=0,...Ie}=H;ke>0?m=window.setTimeout(()=>{te(de(C,Ie))},ke):te(de(C,Ie))})}function de(C,{config:H=$.value,patch:te="dateTime",clearIfEqual:ke=!1,formatInput:Ie=!0,hidePopover:Xe=!1,dragging:rt=V.value,targetPriority:vo,moveToValue:go=!1}={}){const ms=ie(H);let Qe=ge(C,ms,te,vo);if(_e(Qe)){if(rt)return null;Qe=c.value,Xe=!1}else Qe==null&&e.isRequired?Qe=c.value:Qe!=null&&ve(c.value,Qe)&&ke&&(Qe=null);const ar=rt?d:c,vs=!ve(ar.value,Qe);ar.value=Qe,rt||(d.value=null);const yo=we(Qe,$.value);return vs&&(b=!1,t(rt?"drag":"update:modelValue",yo),r.nextTick(()=>b=!0)),Xe&&!rt&&Ln(),Ie&&D(),go&&r.nextTick(()=>di(vo??"start")),yo}function D(){r.nextTick(()=>{const C=ie({type:"string",mask:A.value}),H=we(d.value??c.value,C);y.value?f.value=[H&&H.start,H&&H.end]:f.value=[H,""]})}function E(C,H,te){f.value.splice(H==="start"?0:1,1,C);const ke=y.value?{start:f.value[0],end:f.value[1]||f.value[0]}:C,Ie={type:"string",mask:A.value};ce(ke,{...te,config:Ie,patch:R.value,targetPriority:H,moveToValue:!0})}function B(C){return H=>{e.updateOnInput&&E(H.currentTarget.value,C,{formatInput:!1,hidePopover:!1,debounce:e.inputDebounce})}}function z(C){return H=>{E(H.currentTarget.value,C,{formatInput:!0,hidePopover:!1})}}function Y(C){C.key==="Escape"&&ce(c.value,{formatInput:!0,hidePopover:!0})}function ee(C){return y.value?[C&&C.start?i.value.getDateParts(C.start):null,C&&C.end?i.value.getDateParts(C.end):null]:[C?i.value.getDateParts(C):null]}function J(){d.value=null,D()}function se(C){t("popover-will-show",C)}function re(C){t("popover-did-show",C)}function fe(C){J(),t("popover-will-hide",C)}function ye(C){t("popover-did-hide",C)}function xe(C){const H={patch:"date",formatInput:!0,hidePopover:!0};if(y.value){const te=!V.value;te?g={start:C.startDate,end:C.endDate}:g!=null&&(g.end=C.date),ce(g,{...H,dragging:te})}else ce(C.date,{...H,clearIfEqual:!e.isRequired})}function Ue(C,H){xe(C),t("dayclick",C,H)}function je(C,H){switch(H.key){case" ":case"Enter":{xe(C),H.preventDefault();break}case"Escape":Ln()}t("daykeydown",C,H)}function bn(C,H){!V.value||g==null||(g.end=C.date,ce(ui(g),{patch:"date",formatInput:!0}))}function ir(C={}){dl({...k.value,...C,isInteractive:!0,id:u.value})}function Ln(C={}){zr({hideDelay:10,force:!0,...k.value,...C,id:u.value})}function hs(C){Rp({...k.value,...C,isInteractive:!0,id:u.value})}function ui(C,H){const{start:te,end:ke}=C;if(te>ke)switch(H){case"start":return{start:te,end:te};case"end":return{start:ke,end:ke};default:return{start:ke,end:te}}return{start:te,end:ke}}async function ci(C,H={}){return p.value==null?!1:p.value.move(C,H)}async function ps(C,H={}){return p.value==null?!1:p.value.moveBy(C,H)}async function di(C,H={}){const te=c.value;if(p.value==null||!Q(te))return!1;const ke=C!=="end",Ie=ke?1:-1,Xe=K(te)?ke?te.start:te.end:te,rt=Np(Xe,"monthly",i.value);return p.value.move(rt,{position:Ie,...H})}r.watch(()=>e.isRange,C=>{C&&console.warn("The `is-range` prop will be deprecated in future releases. Please use the `range` modifier.")},{immediate:!0}),r.watch(()=>y.value,()=>{de(null,{formatInput:!0})}),r.watch(()=>A.value,()=>D()),r.watch(()=>e.modelValue,C=>{b&&de(C,{formatInput:!0,hidePopover:!1})}),r.watch(()=>G.value,()=>{fn(e.rules)&&de(e.modelValue,{formatInput:!0,hidePopover:!1})}),r.watch(()=>e.timezone,()=>{de(c.value,{formatInput:!0})});const fi=ue($.value);c.value=ge(e.modelValue??null,fi,"dateTime"),r.onMounted(()=>{de(e.modelValue,{formatInput:!0,hidePopover:!1})}),r.nextTick(()=>l.value=!0);const U={...o,showCalendar:l,datePickerPopoverId:u,popoverRef:h,popoverEvents:M,calendarRef:p,isRange:y,isTimeMode:T,isDateTimeMode:N,is24hr:r.toRef(e,"is24hr"),hideTimeHeader:r.toRef(e,"hideTimeHeader"),timeAccuracy:r.toRef(e,"timeAccuracy"),isDragging:V,inputValue:S,inputEvents:L,dateParts:P,attributes:I,rules:G,move:ci,moveBy:ps,moveToValue:di,updateValue:ce,showPopover:ir,hidePopover:Ln,togglePopover:hs,onDayClick:Ue,onDayKeydown:je,onDayMouseEnter:bn,onPopoverBeforeShow:se,onPopoverAfterShow:re,onPopoverBeforeHide:fe,onPopoverAfterHide:ye};return r.provide(tm,U),U}function vu(){const e=r.inject(tm);if(e)return e;throw new Error("DatePicker context missing. Please verify this component is nested within a valid context provider.")}const yO=[{value:0,label:"12"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"},{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"},{value:10,label:"10"},{value:11,label:"11"}],wO=[{value:12,label:"12"},{value:13,label:"1"},{value:14,label:"2"},{value:15,label:"3"},{value:16,label:"4"},{value:17,label:"5"},{value:18,label:"6"},{value:19,label:"7"},{value:20,label:"8"},{value:21,label:"9"},{value:22,label:"10"},{value:23,label:"11"}];function bO(e){const t=vu(),{locale:n,isRange:o,isTimeMode:i,dateParts:a,rules:s,is24hr:l,hideTimeHeader:u,timeAccuracy:c,updateValue:d}=t;function f(x){x=Object.assign(p.value,x);let R=null;if(o.value){const k=h.value?x:a.value[0],M=h.value?a.value[1]:x;R={start:k,end:M}}else R=x;d(R,{patch:"time",targetPriority:h.value?"start":"end",moveToValue:!0})}const h=r.computed(()=>e.position===0),p=r.computed(()=>a.value[e.position]||{isValid:!1}),m=r.computed(()=>du(p.value)),g=r.computed(()=>!!p.value.isValid),b=r.computed(()=>!u.value&&g.value),y=r.computed(()=>{if(!m.value)return null;let x=n.value.toDate(p.value);return p.value.hours===24&&(x=new Date(x.getTime()-1)),x}),_=r.computed({get(){return p.value.hours},set(x){f({hours:x})}}),w=r.computed({get(){return p.value.minutes},set(x){f({minutes:x})}}),v=r.computed({get(){return p.value.seconds},set(x){f({seconds:x})}}),N=r.computed({get(){return p.value.milliseconds},set(x){f({milliseconds:x})}}),T=r.computed({get(){return p.value.hours<12},set(x){x=String(x).toLowerCase()=="true";let R=_.value;x&&R>=12?R-=12:!x&&R<12&&(R+=12),f({hours:R})}}),V=r.computed(()=>IT(p.value,s.value[e.position])),$=r.computed(()=>yO.filter(x=>V.value.hours.some(R=>R.value===x.value))),P=r.computed(()=>wO.filter(x=>V.value.hours.some(R=>R.value===x.value))),A=r.computed(()=>l.value?V.value.hours:T.value?$.value:P.value),O=r.computed(()=>{const x=[];return on($.value)&&x.push({value:!0,label:"AM"}),on(P.value)&&x.push({value:!1,label:"PM"}),x});return{...t,showHeader:b,timeAccuracy:c,parts:p,isValid:g,date:y,hours:_,minutes:w,seconds:v,milliseconds:N,options:V,hourOptions:A,isAM:T,isAMOptions:O,is24hr:l}}const _O=["value"],xO=["value","disabled"],kO={key:1,class:"vc-base-sizer","aria-hidden":"true"},NO={inheritAttrs:!1},cr=r.defineComponent({...NO,__name:"BaseSelect",props:{options:null,modelValue:null,alignRight:{type:Boolean},alignLeft:{type:Boolean},showIcon:{type:Boolean},fitContent:{type:Boolean}},emits:["update:modelValue"],setup(e){const t=e,n=r.computed(()=>t.options.find(i=>i.value===t.modelValue)?.label);return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vc-base-select",{"vc-fit-content":e.fitContent,"vc-has-icon":e.showIcon}])},[r.createElementVNode("select",r.mergeProps(o.$attrs,{value:e.modelValue,class:["vc-focus",{"vc-align-right":e.alignRight,"vc-align-left":e.alignLeft}],onChange:i[0]||(i[0]=a=>o.$emit("update:modelValue",a.target.value))}),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.options,a=>(r.openBlock(),r.createElementBlock("option",{key:a.value,value:a.value,disabled:a.disabled},r.toDisplayString(a.label),9,xO))),128))],16,_O),e.showIcon?(r.openBlock(),r.createBlock(zo,{key:0,name:"ChevronDown",size:"18"})):r.createCommentVNode("",!0),e.fitContent?(r.openBlock(),r.createElementBlock("div",kO,r.toDisplayString(r.unref(n)),1)):r.createCommentVNode("",!0)],2))}}),EO={key:0,class:"vc-time-header"},CO={class:"vc-time-weekday"},SO={class:"vc-time-month"},DO={class:"vc-time-day"},MO={class:"vc-time-year"},TO={class:"vc-time-select-group"},VO=r.createElementVNode("span",{class:"vc-time-colon"},":",-1),OO=r.createElementVNode("span",{class:"vc-time-colon"},":",-1),$O=r.createElementVNode("span",{class:"vc-time-decimal"},".",-1),Ud=r.defineComponent({__name:"TimePicker",props:{position:null},setup(e,{expose:t}){const n=bO(e);t(n);const{locale:o,isValid:i,date:a,hours:s,minutes:l,seconds:u,milliseconds:c,options:d,hourOptions:f,isTimeMode:h,isAM:p,isAMOptions:m,is24hr:g,showHeader:b,timeAccuracy:y}=n;return(_,w)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vc-time-picker",[{"vc-invalid":!r.unref(i),"vc-attached":!r.unref(h)}]])},[r.createVNode(dt,{name:"time-header"},{default:r.withCtx(()=>[r.unref(b)&&r.unref(a)?(r.openBlock(),r.createElementBlock("div",EO,[r.createElementVNode("span",CO,r.toDisplayString(r.unref(o).formatDate(r.unref(a),"WWW")),1),r.createElementVNode("span",SO,r.toDisplayString(r.unref(o).formatDate(r.unref(a),"MMM")),1),r.createElementVNode("span",DO,r.toDisplayString(r.unref(o).formatDate(r.unref(a),"D")),1),r.createElementVNode("span",MO,r.toDisplayString(r.unref(o).formatDate(r.unref(a),"YYYY")),1)])):r.createCommentVNode("",!0)]),_:1}),r.createElementVNode("div",TO,[r.createVNode(zo,{name:"Clock",size:"17"}),r.createVNode(cr,{modelValue:r.unref(s),"onUpdate:modelValue":w[0]||(w[0]=v=>r.isRef(s)?s.value=v:null),modelModifiers:{number:!0},options:r.unref(f),class:"vc-time-select-hours","align-right":""},null,8,["modelValue","options"]),r.unref(y)>1?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[VO,r.createVNode(cr,{modelValue:r.unref(l),"onUpdate:modelValue":w[1]||(w[1]=v=>r.isRef(l)?l.value=v:null),modelModifiers:{number:!0},options:r.unref(d).minutes,class:"vc-time-select-minutes","align-left":r.unref(y)===2},null,8,["modelValue","options","align-left"])],64)):r.createCommentVNode("",!0),r.unref(y)>2?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[OO,r.createVNode(cr,{modelValue:r.unref(u),"onUpdate:modelValue":w[2]||(w[2]=v=>r.isRef(u)?u.value=v:null),modelModifiers:{number:!0},options:r.unref(d).seconds,class:"vc-time-select-seconds","align-left":r.unref(y)===3},null,8,["modelValue","options","align-left"])],64)):r.createCommentVNode("",!0),r.unref(y)>3?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[$O,r.createVNode(cr,{modelValue:r.unref(c),"onUpdate:modelValue":w[3]||(w[3]=v=>r.isRef(c)?c.value=v:null),modelModifiers:{number:!0},options:r.unref(d).milliseconds,class:"vc-time-select-milliseconds","align-left":""},null,8,["modelValue","options"])],64)):r.createCommentVNode("",!0),r.unref(g)?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(cr,{key:3,modelValue:r.unref(p),"onUpdate:modelValue":w[4]||(w[4]=v=>r.isRef(p)?p.value=v:null),options:r.unref(m)},null,8,["modelValue","options"]))])],2))}}),nm=r.defineComponent({__name:"DatePickerBase",setup(e){const{attributes:t,calendarRef:n,color:o,displayMode:i,isDateTimeMode:a,isTimeMode:s,isRange:l,onDayClick:u,onDayMouseEnter:c,onDayKeydown:d}=vu(),f=l.value?[0,1]:[0];return(h,p)=>r.unref(s)?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`vc-container vc-bordered vc-${r.unref(o)} vc-${r.unref(i)}`)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),m=>(r.openBlock(),r.createBlock(Ud,{key:m,position:m},null,8,["position"]))),128))],2)):(r.openBlock(),r.createBlock(pO,{key:1,attributes:r.unref(t),ref_key:"calendarRef",ref:n,onDayclick:r.unref(u),onDaymouseenter:r.unref(c),onDaykeydown:r.unref(d)},{footer:r.withCtx(()=>[r.unref(a)?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(f),m=>(r.openBlock(),r.createBlock(Ud,{key:m,position:m},null,8,["position"]))),128)):r.createCommentVNode("",!0),r.createVNode(dt,{name:"dp-footer"})]),_:1},8,["attributes","onDayclick","onDaymouseenter","onDaykeydown"]))}}),BO={inheritAttrs:!1},PO=r.defineComponent({...BO,__name:"DatePickerPopover",setup(e){const{datePickerPopoverId:t,color:n,displayMode:o,popoverRef:i,onPopoverBeforeShow:a,onPopoverAfterShow:s,onPopoverBeforeHide:l,onPopoverAfterHide:u}=vu();return(c,d)=>(r.openBlock(),r.createBlock(mu,{id:r.unref(t),placement:"bottom-start",class:r.normalizeClass(`vc-date-picker-content vc-${r.unref(n)} vc-${r.unref(o)}`),ref_key:"popoverRef",ref:i,onBeforeShow:r.unref(a),onAfterShow:r.unref(s),onBeforeHide:r.unref(l),onAfterHide:r.unref(u)},{default:r.withCtx(()=>[r.createVNode(nm,r.normalizeProps(r.guardReactiveProps(c.$attrs)),null,16)]),_:1},8,["id","class","onBeforeShow","onAfterShow","onBeforeHide","onAfterHide"]))}});r.defineComponent({inheritAttrs:!1,emits:vO,props:mO,components:{DatePickerBase:nm,DatePickerPopover:PO},setup(e,t){const n=gO(e,t),o=r.reactive(bp(n,"calendarRef","popoverRef"));return{...n,slotCtx:o}}});var om;function oe(){return om.apply(null,arguments)}function AO(e){om=e}function Et(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Qn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Se(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gu(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Se(e,t))return!1;return!0}function et(e){return e===void 0}function pn(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function ni(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function rm(e,t){var n=[],o,i=e.length;for(o=0;o<i;++o)n.push(t(e[o],o));return n}function Vn(e,t){for(var n in t)Se(t,n)&&(e[n]=t[n]);return Se(t,"toString")&&(e.toString=t.toString),Se(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Zt(e,t,n,o){return Sm(e,t,n,o,!0).utc()}function YO(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function be(e){return e._pf==null&&(e._pf=YO()),e._pf}var fl;Array.prototype.some?fl=Array.prototype.some:fl=function(e){var t=Object(this),n=t.length>>>0,o;for(o=0;o<n;o++)if(o in t&&e.call(this,t[o],o,t))return!0;return!1};function yu(e){var t=null,n=!1,o=e._d&&!isNaN(e._d.getTime());if(o&&(t=be(e),n=fl.call(t.parsedDateParts,function(i){return i!=null}),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(o=o&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=o;else return o;return e._isValid}function Ra(e){var t=Zt(NaN);return e!=null?Vn(be(t),e):be(t).userInvalidated=!0,t}var Gd=oe.momentProperties=[],Ss=!1;function wu(e,t){var n,o,i,a=Gd.length;if(et(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),et(t._i)||(e._i=t._i),et(t._f)||(e._f=t._f),et(t._l)||(e._l=t._l),et(t._strict)||(e._strict=t._strict),et(t._tzm)||(e._tzm=t._tzm),et(t._isUTC)||(e._isUTC=t._isUTC),et(t._offset)||(e._offset=t._offset),et(t._pf)||(e._pf=be(t)),et(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)o=Gd[n],i=t[o],et(i)||(e[o]=i);return e}function oi(e){wu(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ss===!1&&(Ss=!0,oe.updateOffset(this),Ss=!1)}function Ct(e){return e instanceof oi||e!=null&&e._isAMomentObject!=null}function im(e){oe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function gt(e,t){var n=!0;return Vn(function(){if(oe.deprecationHandler!=null&&oe.deprecationHandler(null,e),n){var o=[],i,a,s,l=arguments.length;for(a=0;a<l;a++){if(i="",typeof arguments[a]=="object"){i+=`
|
|
2
|
+
[`+a+"] ";for(s in arguments[0])Se(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[a];o.push(i)}im(e+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(o).join("")+`
|
|
4
|
-
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Hd={};function tm(e,t){ne.deprecationHandler!=null&&ne.deprecationHandler(e,t),Hd[e]||(em(t),Hd[e]=!0)}ne.suppressDeprecationWarnings=!1;ne.deprecationHandler=null;function Wt(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function g$(e){var t,n;for(n in e)Se(e,n)&&(t=e[n],Wt(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function sl(e,t){var n=Sn({},e),o;for(o in t)Se(t,o)&&(Gn(e[o])&&Gn(t[o])?(n[o]={},Sn(n[o],e[o]),Sn(n[o],t[o])):t[o]!=null?n[o]=t[o]:delete n[o]);for(o in e)Se(e,o)&&!Se(t,o)&&Gn(e[o])&&(n[o]=Sn({},n[o]));return n}function hu(e){e!=null&&this.set(e)}var ll;Object.keys?ll=Object.keys:ll=function(e){var t,n=[];for(t in e)Se(e,t)&&n.push(t);return n};var y$={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function w$(e,t,n){var o=this._calendar[e]||this._calendar.sameElse;return Wt(o)?o.call(t,n):o}function Lt(e,t,n){var o=""+Math.abs(e),r=t-o.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+o}var pu=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,pi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ks={},xo={};function he(e,t,n,o){var r=o;typeof o=="string"&&(r=function(){return this[o]()}),e&&(xo[e]=r),t&&(xo[t[0]]=function(){return Lt(r.apply(this,arguments),t[1],t[2])}),n&&(xo[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function b$(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _$(e){var t=e.match(pu),n,o;for(n=0,o=t.length;n<o;n++)xo[t[n]]?t[n]=xo[t[n]]:t[n]=b$(t[n]);return function(r){var i="",a;for(a=0;a<o;a++)i+=Wt(t[a])?t[a].call(r,e):t[a];return i}}function Pi(e,t){return e.isValid()?(t=nm(t,e.localeData()),ks[t]=ks[t]||_$(t),ks[t](e)):e.localeData().invalidDate()}function nm(e,t){var n=5;function o(r){return t.longDateFormat(r)||r}for(pi.lastIndex=0;n>=0&&pi.test(e);)e=e.replace(pi,o),pi.lastIndex=0,n-=1;return e}var k$={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function x$(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(pu).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var E$="Invalid date";function S$(){return this._invalidDate}var D$="%d",M$=/\d{1,2}/;function N$(e){return this._ordinal.replace("%d",e)}var C$={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function O$(e,t,n,o){var r=this._relativeTime[n];return Wt(r)?r(e,t,n,o):r.replace(/%d/i,e)}function T$(e,t){var n=this._relativeTime[e>0?"future":"past"];return Wt(n)?n(t):n.replace(/%s/i,t)}var jd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ft(e){return typeof e=="string"?jd[e]||jd[e.toLowerCase()]:void 0}function mu(e){var t={},n,o;for(o in e)Se(e,o)&&(n=ft(o),n&&(t[n]=e[o]));return t}var $$={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function P$(e){var t=[],n;for(n in e)Se(e,n)&&t.push({unit:n,priority:$$[n]});return t.sort(function(o,r){return o.priority-r.priority}),t}var om=/\d/,ot=/\d\d/,rm=/\d{3}/,vu=/\d{4}/,Ia=/[+-]?\d{6}/,$e=/\d\d?/,im=/\d\d\d\d?/,am=/\d\d\d\d\d\d?/,Va=/\d{1,3}/,gu=/\d{1,4}/,Ra=/[+-]?\d{1,6}/,Zo=/\d+/,za=/[+-]?\d+/,B$=/Z|[+-]\d\d:?\d\d/gi,La=/Z|[+-]\d\d(?::?\d\d)?/gi,Y$=/[+-]?\d+(\.\d{1,3})?/,Kr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Xo=/^[1-9]\d?/,yu=/^([1-9]\d|\d)/,ia;ia={};function ie(e,t,n){ia[e]=Wt(t)?t:function(o,r){return o&&n?n:t}}function A$(e,t){return Se(ia,e)?ia[e](t._strict,t._locale):new RegExp(I$(e))}function I$(e){return on(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,o,r,i){return n||o||r||i}))}function on(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ke(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rt(t)),n}var ul={};function Ne(e,t){var n,o=t,r;for(typeof e=="string"&&(e=[e]),un(t)&&(o=function(i,a){a[t]=ke(i)}),r=e.length,n=0;n<r;n++)ul[e[n]]=o}function Jr(e,t){Ne(e,function(n,o,r,i){r._w=r._w||{},t(n,r._w,r,i)})}function V$(e,t,n){t!=null&&Se(ul,e)&&ul[e](t,n._a,n,e)}function Fa(e){return e%4===0&&e%100!==0||e%400===0}var je=0,Qt=1,Ct=2,Re=3,vt=4,en=5,Hn=6,R$=7,z$=8;he("Y",0,0,function(){var e=this.year();return e<=9999?Lt(e,4):"+"+e});he(0,["YY",2],0,function(){return this.year()%100});he(0,["YYYY",4],0,"year");he(0,["YYYYY",5],0,"year");he(0,["YYYYYY",6,!0],0,"year");ie("Y",za);ie("YY",$e,ot);ie("YYYY",gu,vu);ie("YYYYY",Ra,Ia);ie("YYYYYY",Ra,Ia);Ne(["YYYYY","YYYYYY"],je);Ne("YYYY",function(e,t){t[je]=e.length===2?ne.parseTwoDigitYear(e):ke(e)});Ne("YY",function(e,t){t[je]=ne.parseTwoDigitYear(e)});Ne("Y",function(e,t){t[je]=parseInt(e,10)});function br(e){return Fa(e)?366:365}ne.parseTwoDigitYear=function(e){return ke(e)+(ke(e)>68?1900:2e3)};var sm=qo("FullYear",!0);function L$(){return Fa(this.year())}function qo(e,t){return function(n){return n!=null?(lm(this,e,n),ne.updateOffset(this,t),this):Pr(this,e)}}function Pr(e,t){if(!e.isValid())return NaN;var n=e._d,o=e._isUTC;switch(t){case"Milliseconds":return o?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return o?n.getUTCSeconds():n.getSeconds();case"Minutes":return o?n.getUTCMinutes():n.getMinutes();case"Hours":return o?n.getUTCHours():n.getHours();case"Date":return o?n.getUTCDate():n.getDate();case"Day":return o?n.getUTCDay():n.getDay();case"Month":return o?n.getUTCMonth():n.getMonth();case"FullYear":return o?n.getUTCFullYear():n.getFullYear();default:return NaN}}function lm(e,t,n){var o,r,i,a,l;if(!(!e.isValid()||isNaN(n))){switch(o=e._d,r=e._isUTC,t){case"Milliseconds":return void(r?o.setUTCMilliseconds(n):o.setMilliseconds(n));case"Seconds":return void(r?o.setUTCSeconds(n):o.setSeconds(n));case"Minutes":return void(r?o.setUTCMinutes(n):o.setMinutes(n));case"Hours":return void(r?o.setUTCHours(n):o.setHours(n));case"Date":return void(r?o.setUTCDate(n):o.setDate(n));case"FullYear":break;default:return}i=n,a=e.month(),l=e.date(),l=l===29&&a===1&&!Fa(i)?28:l,r?o.setUTCFullYear(i,a,l):o.setFullYear(i,a,l)}}function F$(e){return e=ft(e),Wt(this[e])?this[e]():this}function H$(e,t){if(typeof e=="object"){e=mu(e);var n=P$(e),o,r=n.length;for(o=0;o<r;o++)this[n[o].unit](e[n[o].unit])}else if(e=ft(e),Wt(this[e]))return this[e](t);return this}function j$(e,t){return(e%t+t)%t}var Ae;Array.prototype.indexOf?Ae=Array.prototype.indexOf:Ae=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function wu(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=j$(t,12);return e+=(t-n)/12,n===1?Fa(e)?29:28:31-n%7%2}he("M",["MM",2],"Mo",function(){return this.month()+1});he("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});he("MMMM",0,0,function(e){return this.localeData().months(this,e)});ie("M",$e,Xo);ie("MM",$e,ot);ie("MMM",function(e,t){return t.monthsShortRegex(e)});ie("MMMM",function(e,t){return t.monthsRegex(e)});Ne(["M","MM"],function(e,t){t[Qt]=ke(e)-1});Ne(["MMM","MMMM"],function(e,t,n,o){var r=n._locale.monthsParse(e,o,n._strict);r!=null?t[Qt]=r:ye(n).invalidMonth=e});var W$="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),um="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),cm=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,U$=Kr,G$=Kr;function Z$(e,t){return e?wt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||cm).test(t)?"format":"standalone"][e.month()]:wt(this._months)?this._months:this._months.standalone}function X$(e,t){return e?wt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[cm.test(t)?"format":"standalone"][e.month()]:wt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function q$(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)i=jt([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(i,"").toLocaleLowerCase();return n?t==="MMM"?(r=Ae.call(this._shortMonthsParse,a),r!==-1?r:null):(r=Ae.call(this._longMonthsParse,a),r!==-1?r:null):t==="MMM"?(r=Ae.call(this._shortMonthsParse,a),r!==-1?r:(r=Ae.call(this._longMonthsParse,a),r!==-1?r:null)):(r=Ae.call(this._longMonthsParse,a),r!==-1?r:(r=Ae.call(this._shortMonthsParse,a),r!==-1?r:null))}function K$(e,t,n){var o,r,i;if(this._monthsParseExact)return q$.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++)if(r=jt([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[o]&&(i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[o]=new RegExp(i.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[o].test(e)||n&&t==="MMM"&&this._shortMonthsParse[o].test(e)||!n&&this._monthsParse[o].test(e))return o}function dm(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=ke(t);else if(t=e.localeData().monthsParse(t),!un(t))return e}var n=t,o=e.date();return o=o<29?o:Math.min(o,wu(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,o):e._d.setMonth(n,o),e}function fm(e){return e!=null?(dm(this,e),ne.updateOffset(this,!0),this):Pr(this,"Month")}function J$(){return wu(this.year(),this.month())}function Q$(e){return this._monthsParseExact?(Se(this,"_monthsRegex")||hm.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Se(this,"_monthsShortRegex")||(this._monthsShortRegex=U$),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function eP(e){return this._monthsParseExact?(Se(this,"_monthsRegex")||hm.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Se(this,"_monthsRegex")||(this._monthsRegex=G$),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function hm(){function e(u,c){return c.length-u.length}var t=[],n=[],o=[],r,i,a,l;for(r=0;r<12;r++)i=jt([2e3,r]),a=on(this.monthsShort(i,"")),l=on(this.months(i,"")),t.push(a),n.push(l),o.push(l),o.push(a);t.sort(e),n.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function tP(e,t,n,o,r,i,a){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,o,r,i,a),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,o,r,i,a),l}function Br(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function aa(e,t,n){var o=7+t-n,r=(7+Br(e,0,o).getUTCDay()-t)%7;return-r+o-1}function pm(e,t,n,o,r){var i=(7+n-o)%7,a=aa(e,o,r),l=1+7*(t-1)+i+a,u,c;return l<=0?(u=e-1,c=br(u)+l):l>br(e)?(u=e+1,c=l-br(e)):(u=e,c=l),{year:u,dayOfYear:c}}function Yr(e,t,n){var o=aa(e.year(),t,n),r=Math.floor((e.dayOfYear()-o-1)/7)+1,i,a;return r<1?(a=e.year()-1,i=r+rn(a,t,n)):r>rn(e.year(),t,n)?(i=r-rn(e.year(),t,n),a=e.year()+1):(a=e.year(),i=r),{week:i,year:a}}function rn(e,t,n){var o=aa(e,t,n),r=aa(e+1,t,n);return(br(e)-o+r)/7}he("w",["ww",2],"wo","week");he("W",["WW",2],"Wo","isoWeek");ie("w",$e,Xo);ie("ww",$e,ot);ie("W",$e,Xo);ie("WW",$e,ot);Jr(["w","ww","W","WW"],function(e,t,n,o){t[o.substr(0,1)]=ke(e)});function nP(e){return Yr(e,this._week.dow,this._week.doy).week}var oP={dow:0,doy:6};function rP(){return this._week.dow}function iP(){return this._week.doy}function aP(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function sP(e){var t=Yr(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}he("d",0,"do","day");he("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});he("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});he("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});he("e",0,0,"weekday");he("E",0,0,"isoWeekday");ie("d",$e);ie("e",$e);ie("E",$e);ie("dd",function(e,t){return t.weekdaysMinRegex(e)});ie("ddd",function(e,t){return t.weekdaysShortRegex(e)});ie("dddd",function(e,t){return t.weekdaysRegex(e)});Jr(["dd","ddd","dddd"],function(e,t,n,o){var r=n._locale.weekdaysParse(e,o,n._strict);r!=null?t.d=r:ye(n).invalidWeekday=e});Jr(["d","e","E"],function(e,t,n,o){t[o]=ke(e)});function lP(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function uP(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function bu(e,t){return e.slice(t,7).concat(e.slice(0,t))}var cP="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mm="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),dP="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fP=Kr,hP=Kr,pP=Kr;function mP(e,t){var n=wt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?bu(n,this._week.dow):e?n[e.day()]:n}function vP(e){return e===!0?bu(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function gP(e){return e===!0?bu(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function yP(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)i=jt([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(r=Ae.call(this._weekdaysParse,a),r!==-1?r:null):t==="ddd"?(r=Ae.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=Ae.call(this._minWeekdaysParse,a),r!==-1?r:null):t==="dddd"?(r=Ae.call(this._weekdaysParse,a),r!==-1||(r=Ae.call(this._shortWeekdaysParse,a),r!==-1)?r:(r=Ae.call(this._minWeekdaysParse,a),r!==-1?r:null)):t==="ddd"?(r=Ae.call(this._shortWeekdaysParse,a),r!==-1||(r=Ae.call(this._weekdaysParse,a),r!==-1)?r:(r=Ae.call(this._minWeekdaysParse,a),r!==-1?r:null)):(r=Ae.call(this._minWeekdaysParse,a),r!==-1||(r=Ae.call(this._weekdaysParse,a),r!==-1)?r:(r=Ae.call(this._shortWeekdaysParse,a),r!==-1?r:null))}function wP(e,t,n){var o,r,i;if(this._weekdaysParseExact)return yP.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++)if(r=jt([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[o]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[o].test(e)||n&&t==="ddd"&&this._shortWeekdaysParse[o].test(e)||n&&t==="dd"&&this._minWeekdaysParse[o].test(e)||!n&&this._weekdaysParse[o].test(e))return o}function bP(e){if(!this.isValid())return e!=null?this:NaN;var t=Pr(this,"Day");return e!=null?(e=lP(e,this.localeData()),this.add(e-t,"d")):t}function _P(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function kP(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=uP(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function xP(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||_u.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Se(this,"_weekdaysRegex")||(this._weekdaysRegex=fP),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function EP(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||_u.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Se(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hP),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function SP(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||_u.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Se(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=pP),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _u(){function e(d,f){return f.length-d.length}var t=[],n=[],o=[],r=[],i,a,l,u,c;for(i=0;i<7;i++)a=jt([2e3,1]).day(i),l=on(this.weekdaysMin(a,"")),u=on(this.weekdaysShort(a,"")),c=on(this.weekdays(a,"")),t.push(l),n.push(u),o.push(c),r.push(l),r.push(u),r.push(c);t.sort(e),n.sort(e),o.sort(e),r.sort(e),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ku(){return this.hours()%12||12}function DP(){return this.hours()||24}he("H",["HH",2],0,"hour");he("h",["hh",2],0,ku);he("k",["kk",2],0,DP);he("hmm",0,0,function(){return""+ku.apply(this)+Lt(this.minutes(),2)});he("hmmss",0,0,function(){return""+ku.apply(this)+Lt(this.minutes(),2)+Lt(this.seconds(),2)});he("Hmm",0,0,function(){return""+this.hours()+Lt(this.minutes(),2)});he("Hmmss",0,0,function(){return""+this.hours()+Lt(this.minutes(),2)+Lt(this.seconds(),2)});function vm(e,t){he(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}vm("a",!0);vm("A",!1);function gm(e,t){return t._meridiemParse}ie("a",gm);ie("A",gm);ie("H",$e,yu);ie("h",$e,Xo);ie("k",$e,Xo);ie("HH",$e,ot);ie("hh",$e,ot);ie("kk",$e,ot);ie("hmm",im);ie("hmmss",am);ie("Hmm",im);ie("Hmmss",am);Ne(["H","HH"],Re);Ne(["k","kk"],function(e,t,n){var o=ke(e);t[Re]=o===24?0:o});Ne(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Ne(["h","hh"],function(e,t,n){t[Re]=ke(e),ye(n).bigHour=!0});Ne("hmm",function(e,t,n){var o=e.length-2;t[Re]=ke(e.substr(0,o)),t[vt]=ke(e.substr(o)),ye(n).bigHour=!0});Ne("hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[Re]=ke(e.substr(0,o)),t[vt]=ke(e.substr(o,2)),t[en]=ke(e.substr(r)),ye(n).bigHour=!0});Ne("Hmm",function(e,t,n){var o=e.length-2;t[Re]=ke(e.substr(0,o)),t[vt]=ke(e.substr(o))});Ne("Hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[Re]=ke(e.substr(0,o)),t[vt]=ke(e.substr(o,2)),t[en]=ke(e.substr(r))});function MP(e){return(e+"").toLowerCase().charAt(0)==="p"}var NP=/[ap]\.?m?\.?/i,CP=qo("Hours",!0);function OP(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ym={calendar:y$,longDateFormat:k$,invalidDate:E$,ordinal:D$,dayOfMonthOrdinalParse:M$,relativeTime:C$,months:W$,monthsShort:um,week:oP,weekdays:cP,weekdaysMin:dP,weekdaysShort:mm,meridiemParse:NP},Be={},rr={},Ar;function TP(e,t){var n,o=Math.min(e.length,t.length);for(n=0;n<o;n+=1)if(e[n]!==t[n])return n;return o}function Wd(e){return e&&e.toLowerCase().replace("_","-")}function $P(e){for(var t=0,n,o,r,i;t<e.length;){for(i=Wd(e[t]).split("-"),n=i.length,o=Wd(e[t+1]),o=o?o.split("-"):null;n>0;){if(r=Ha(i.slice(0,n).join("-")),r)return r;if(o&&o.length>=n&&TP(i,o)>=n-1)break;n--}t++}return Ar}function PP(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ha(e){var t=null,n;if(Be[e]===void 0&&typeof module<"u"&&module&&module.exports&&PP(e))try{t=Ar._abbr,n=require,n("./locale/"+e),Cn(t)}catch{Be[e]=null}return Be[e]}function Cn(e,t){var n;return e&&(qe(t)?n=hn(e):n=xu(e,t),n?Ar=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ar._abbr}function xu(e,t){if(t!==null){var n,o=ym;if(t.abbr=e,Be[e]!=null)tm("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Be[e]._config;else if(t.parentLocale!=null)if(Be[t.parentLocale]!=null)o=Be[t.parentLocale]._config;else if(n=Ha(t.parentLocale),n!=null)o=n._config;else return rr[t.parentLocale]||(rr[t.parentLocale]=[]),rr[t.parentLocale].push({name:e,config:t}),null;return Be[e]=new hu(sl(o,t)),rr[e]&&rr[e].forEach(function(r){xu(r.name,r.config)}),Cn(e),Be[e]}else return delete Be[e],null}function BP(e,t){if(t!=null){var n,o,r=ym;Be[e]!=null&&Be[e].parentLocale!=null?Be[e].set(sl(Be[e]._config,t)):(o=Ha(e),o!=null&&(r=o._config),t=sl(r,t),o==null&&(t.abbr=e),n=new hu(t),n.parentLocale=Be[e],Be[e]=n),Cn(e)}else Be[e]!=null&&(Be[e].parentLocale!=null?(Be[e]=Be[e].parentLocale,e===Cn()&&Cn(e)):Be[e]!=null&&delete Be[e]);return Be[e]}function hn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ar;if(!wt(e)){if(t=Ha(e),t)return t;e=[e]}return $P(e)}function YP(){return ll(Be)}function Eu(e){var t,n=e._a;return n&&ye(e).overflow===-2&&(t=n[Qt]<0||n[Qt]>11?Qt:n[Ct]<1||n[Ct]>wu(n[je],n[Qt])?Ct:n[Re]<0||n[Re]>24||n[Re]===24&&(n[vt]!==0||n[en]!==0||n[Hn]!==0)?Re:n[vt]<0||n[vt]>59?vt:n[en]<0||n[en]>59?en:n[Hn]<0||n[Hn]>999?Hn:-1,ye(e)._overflowDayOfYear&&(t<je||t>Ct)&&(t=Ct),ye(e)._overflowWeeks&&t===-1&&(t=R$),ye(e)._overflowWeekday&&t===-1&&(t=z$),ye(e).overflow=t),e}var AP=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,IP=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,VP=/Z|[+-]\d\d(?::?\d\d)?/,mi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],xs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],RP=/^\/?Date\((-?\d+)/i,zP=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,LP={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wm(e){var t,n,o=e._i,r=AP.exec(o)||IP.exec(o),i,a,l,u,c=mi.length,d=xs.length;if(r){for(ye(e).iso=!0,t=0,n=c;t<n;t++)if(mi[t][1].exec(r[1])){a=mi[t][0],i=mi[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(r[3]){for(t=0,n=d;t<n;t++)if(xs[t][1].exec(r[3])){l=(r[2]||" ")+xs[t][0];break}if(l==null){e._isValid=!1;return}}if(!i&&l!=null){e._isValid=!1;return}if(r[4])if(VP.exec(r[4]))u="Z";else{e._isValid=!1;return}e._f=a+(l||"")+(u||""),Du(e)}else e._isValid=!1}function FP(e,t,n,o,r,i){var a=[HP(e),um.indexOf(t),parseInt(n,10),parseInt(o,10),parseInt(r,10)];return i&&a.push(parseInt(i,10)),a}function HP(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function jP(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function WP(e,t,n){if(e){var o=mm.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(o!==r)return ye(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function UP(e,t,n){if(e)return LP[e];if(t)return 0;var o=parseInt(n,10),r=o%100,i=(o-r)/100;return i*60+r}function bm(e){var t=zP.exec(jP(e._i)),n;if(t){if(n=FP(t[4],t[3],t[2],t[5],t[6],t[7]),!WP(t[1],n,e))return;e._a=n,e._tzm=UP(t[8],t[9],t[10]),e._d=Br.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ye(e).rfc2822=!0}else e._isValid=!1}function GP(e){var t=RP.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(wm(e),e._isValid===!1)delete e._isValid;else return;if(bm(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ne.createFromInputFallback(e)}ne.createFromInputFallback=dt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function yo(e,t,n){return e??t??n}function ZP(e){var t=new Date(ne.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Su(e){var t,n,o=[],r,i,a;if(!e._d){for(r=ZP(e),e._w&&e._a[Ct]==null&&e._a[Qt]==null&&XP(e),e._dayOfYear!=null&&(a=yo(e._a[je],r[je]),(e._dayOfYear>br(a)||e._dayOfYear===0)&&(ye(e)._overflowDayOfYear=!0),n=Br(a,0,e._dayOfYear),e._a[Qt]=n.getUTCMonth(),e._a[Ct]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Re]===24&&e._a[vt]===0&&e._a[en]===0&&e._a[Hn]===0&&(e._nextDay=!0,e._a[Re]=0),e._d=(e._useUTC?Br:tP).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Re]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(ye(e).weekdayMismatch=!0)}}function XP(e){var t,n,o,r,i,a,l,u,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,n=yo(t.GG,e._a[je],Yr(Te(),1,4).year),o=yo(t.W,1),r=yo(t.E,1),(r<1||r>7)&&(u=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,c=Yr(Te(),i,a),n=yo(t.gg,e._a[je],c.year),o=yo(t.w,c.week),t.d!=null?(r=t.d,(r<0||r>6)&&(u=!0)):t.e!=null?(r=t.e+i,(t.e<0||t.e>6)&&(u=!0)):r=i),o<1||o>rn(n,i,a)?ye(e)._overflowWeeks=!0:u!=null?ye(e)._overflowWeekday=!0:(l=pm(n,o,r,i,a),e._a[je]=l.year,e._dayOfYear=l.dayOfYear)}ne.ISO_8601=function(){};ne.RFC_2822=function(){};function Du(e){if(e._f===ne.ISO_8601){wm(e);return}if(e._f===ne.RFC_2822){bm(e);return}e._a=[],ye(e).empty=!0;var t=""+e._i,n,o,r,i,a,l=t.length,u=0,c,d;for(r=nm(e._f,e._locale).match(pu)||[],d=r.length,n=0;n<d;n++)i=r[n],o=(t.match(A$(i,e))||[])[0],o&&(a=t.substr(0,t.indexOf(o)),a.length>0&&ye(e).unusedInput.push(a),t=t.slice(t.indexOf(o)+o.length),u+=o.length),xo[i]?(o?ye(e).empty=!1:ye(e).unusedTokens.push(i),V$(i,o,e)):e._strict&&!o&&ye(e).unusedTokens.push(i);ye(e).charsLeftOver=l-u,t.length>0&&ye(e).unusedInput.push(t),e._a[Re]<=12&&ye(e).bigHour===!0&&e._a[Re]>0&&(ye(e).bigHour=void 0),ye(e).parsedDateParts=e._a.slice(0),ye(e).meridiem=e._meridiem,e._a[Re]=qP(e._locale,e._a[Re],e._meridiem),c=ye(e).era,c!==null&&(e._a[je]=e._locale.erasConvertYear(c,e._a[je])),Su(e),Eu(e)}function qP(e,t,n){var o;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(o=e.isPM(n),o&&t<12&&(t+=12),!o&&t===12&&(t=0)),t)}function KP(e){var t,n,o,r,i,a,l=!1,u=e._f.length;if(u===0){ye(e).invalidFormat=!0,e._d=new Date(NaN);return}for(r=0;r<u;r++)i=0,a=!1,t=fu({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[r],Du(t),du(t)&&(a=!0),i+=ye(t).charsLeftOver,i+=ye(t).unusedTokens.length*10,ye(t).score=i,l?i<o&&(o=i,n=t):(o==null||i<o||a)&&(o=i,n=t,a&&(l=!0));Sn(e,n||t)}function JP(e){if(!e._d){var t=mu(e._i),n=t.day===void 0?t.date:t.day;e._a=Qp([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(o){return o&&parseInt(o,10)}),Su(e)}}function QP(e){var t=new qr(Eu(_m(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function _m(e){var t=e._i,n=e._f;return e._locale=e._locale||hn(e._l),t===null||n===void 0&&t===""?Aa({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),bt(t)?new qr(Eu(t)):(Xr(t)?e._d=t:wt(n)?KP(e):n?Du(e):eB(e),du(e)||(e._d=null),e))}function eB(e){var t=e._i;qe(t)?e._d=new Date(ne.now()):Xr(t)?e._d=new Date(t.valueOf()):typeof t=="string"?GP(e):wt(t)?(e._a=Qp(t.slice(0),function(n){return parseInt(n,10)}),Su(e)):Gn(t)?JP(e):un(t)?e._d=new Date(t):ne.createFromInputFallback(e)}function km(e,t,n,o,r){var i={};return(t===!0||t===!1)&&(o=t,t=void 0),(n===!0||n===!1)&&(o=n,n=void 0),(Gn(e)&&cu(e)||wt(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=r,i._l=n,i._i=e,i._f=t,i._strict=o,QP(i)}function Te(e,t,n,o){return km(e,t,n,o,!1)}var tB=dt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Te.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Aa()}),nB=dt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Te.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Aa()});function xm(e,t){var n,o;if(t.length===1&&wt(t[0])&&(t=t[0]),!t.length)return Te();for(n=t[0],o=1;o<t.length;++o)(!t[o].isValid()||t[o][e](n))&&(n=t[o]);return n}function oB(){var e=[].slice.call(arguments,0);return xm("isBefore",e)}function rB(){var e=[].slice.call(arguments,0);return xm("isAfter",e)}var iB=function(){return Date.now?Date.now():+new Date},ir=["year","quarter","month","week","day","hour","minute","second","millisecond"];function aB(e){var t,n=!1,o,r=ir.length;for(t in e)if(Se(e,t)&&!(Ae.call(ir,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(o=0;o<r;++o)if(e[ir[o]]){if(n)return!1;parseFloat(e[ir[o]])!==ke(e[ir[o]])&&(n=!0)}return!0}function sB(){return this._isValid}function lB(){return xt(NaN)}function ja(e){var t=mu(e),n=t.year||0,o=t.quarter||0,r=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=aB(t),this._milliseconds=+d+c*1e3+u*6e4+l*1e3*60*60,this._days=+a+i*7,this._months=+r+o*3+n*12,this._data={},this._locale=hn(),this._bubble()}function Bi(e){return e instanceof ja}function cl(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function uB(e,t,n){var o=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,a;for(a=0;a<o;a++)ke(e[a])!==ke(t[a])&&i++;return i+r}function Em(e,t){he(e,0,0,function(){var n=this.utcOffset(),o="+";return n<0&&(n=-n,o="-"),o+Lt(~~(n/60),2)+t+Lt(~~n%60,2)})}Em("Z",":");Em("ZZ","");ie("Z",La);ie("ZZ",La);Ne(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Mu(La,e)});var cB=/([\+\-]|\d\d)/gi;function Mu(e,t){var n=(t||"").match(e),o,r,i;return n===null?null:(o=n[n.length-1]||[],r=(o+"").match(cB)||["-",0,0],i=+(r[1]*60)+ke(r[2]),i===0?0:r[0]==="+"?i:-i)}function Nu(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(bt(e)||Xr(e)?e.valueOf():Te(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),ne.updateOffset(n,!1),n):Te(e).local()}function dl(e){return-Math.round(e._d.getTimezoneOffset())}ne.updateOffset=function(){};function dB(e,t,n){var o=this._offset||0,r;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Mu(La,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(r=dl(this)),this._offset=e,this._isUTC=!0,r!=null&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Mm(this,xt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ne.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?o:dl(this)}function fB(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function hB(e){return this.utcOffset(0,e)}function pB(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(dl(this),"m")),this}function mB(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Mu(B$,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function vB(e){return this.isValid()?(e=e?Te(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function gB(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function yB(){if(!qe(this._isDSTShifted))return this._isDSTShifted;var e={},t;return fu(e,this),e=_m(e),e._a?(t=e._isUTC?jt(e._a):Te(e._a),this._isDSTShifted=this.isValid()&&uB(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function wB(){return this.isValid()?!this._isUTC:!1}function bB(){return this.isValid()?this._isUTC:!1}function Sm(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _B=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kB=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xt(e,t){var n=e,o=null,r,i,a;return Bi(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:un(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(o=_B.exec(e))?(r=o[1]==="-"?-1:1,n={y:0,d:ke(o[Ct])*r,h:ke(o[Re])*r,m:ke(o[vt])*r,s:ke(o[en])*r,ms:ke(cl(o[Hn]*1e3))*r}):(o=kB.exec(e))?(r=o[1]==="-"?-1:1,n={y:In(o[2],r),M:In(o[3],r),w:In(o[4],r),d:In(o[5],r),h:In(o[6],r),m:In(o[7],r),s:In(o[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(a=xB(Te(n.from),Te(n.to)),n={},n.ms=a.milliseconds,n.M=a.months),i=new ja(n),Bi(e)&&Se(e,"_locale")&&(i._locale=e._locale),Bi(e)&&Se(e,"_isValid")&&(i._isValid=e._isValid),i}xt.fn=ja.prototype;xt.invalid=lB;function In(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ud(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function xB(e,t){var n;return e.isValid()&&t.isValid()?(t=Nu(t,e),e.isBefore(t)?n=Ud(e,t):(n=Ud(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Dm(e,t){return function(n,o){var r,i;return o!==null&&!isNaN(+o)&&(tm(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=o,o=i),r=xt(n,o),Mm(this,r,e),this}}function Mm(e,t,n,o){var r=t._milliseconds,i=cl(t._days),a=cl(t._months);e.isValid()&&(o=o??!0,a&&dm(e,Pr(e,"Month")+a*n),i&&lm(e,"Date",Pr(e,"Date")+i*n),r&&e._d.setTime(e._d.valueOf()+r*n),o&&ne.updateOffset(e,i||a))}var EB=Dm(1,"add"),SB=Dm(-1,"subtract");function Nm(e){return typeof e=="string"||e instanceof String}function DB(e){return bt(e)||Xr(e)||Nm(e)||un(e)||NB(e)||MB(e)||e===null||e===void 0}function MB(e){var t=Gn(e)&&!cu(e),n=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,i,a=o.length;for(r=0;r<a;r+=1)i=o[r],n=n||Se(e,i);return t&&n}function NB(e){var t=wt(e),n=!1;return t&&(n=e.filter(function(o){return!un(o)&&Nm(e)}).length===0),t&&n}function CB(e){var t=Gn(e)&&!cu(e),n=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,i;for(r=0;r<o.length;r+=1)i=o[r],n=n||Se(e,i);return t&&n}function OB(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function TB(e,t){arguments.length===1&&(arguments[0]?DB(arguments[0])?(e=arguments[0],t=void 0):CB(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Te(),o=Nu(n,this).startOf("day"),r=ne.calendarFormat(this,o)||"sameElse",i=t&&(Wt(t[r])?t[r].call(this,n):t[r]);return this.format(i||this.localeData().calendar(r,this,Te(n)))}function $B(){return new qr(this)}function PB(e,t){var n=bt(e)?e:Te(e);return this.isValid()&&n.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function BB(e,t){var n=bt(e)?e:Te(e);return this.isValid()&&n.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function YB(e,t,n,o){var r=bt(e)?e:Te(e),i=bt(t)?t:Te(t);return this.isValid()&&r.isValid()&&i.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(o[1]===")"?this.isBefore(i,n):!this.isAfter(i,n))):!1}function AB(e,t){var n=bt(e)?e:Te(e),o;return this.isValid()&&n.isValid()?(t=ft(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(o=n.valueOf(),this.clone().startOf(t).valueOf()<=o&&o<=this.clone().endOf(t).valueOf())):!1}function IB(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function VB(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function RB(e,t,n){var o,r,i;if(!this.isValid())return NaN;if(o=Nu(e,this),!o.isValid())return NaN;switch(r=(o.utcOffset()-this.utcOffset())*6e4,t=ft(t),t){case"year":i=Yi(this,o)/12;break;case"month":i=Yi(this,o);break;case"quarter":i=Yi(this,o)/3;break;case"second":i=(this-o)/1e3;break;case"minute":i=(this-o)/6e4;break;case"hour":i=(this-o)/36e5;break;case"day":i=(this-o-r)/864e5;break;case"week":i=(this-o-r)/6048e5;break;default:i=this-o}return n?i:rt(i)}function Yi(e,t){if(e.date()<t.date())return-Yi(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),o=e.clone().add(n,"months"),r,i;return t-o<0?(r=e.clone().add(n-1,"months"),i=(t-o)/(o-r)):(r=e.clone().add(n+1,"months"),i=(t-o)/(r-o)),-(n+i)||0}ne.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ne.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function zB(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function LB(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Pi(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Wt(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Pi(n,"Z")):Pi(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function FB(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,o,r,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+o+r+i)}function HB(e){e||(e=this.isUtc()?ne.defaultFormatUtc:ne.defaultFormat);var t=Pi(this,e);return this.localeData().postformat(t)}function jB(e,t){return this.isValid()&&(bt(e)&&e.isValid()||Te(e).isValid())?xt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function WB(e){return this.from(Te(),e)}function UB(e,t){return this.isValid()&&(bt(e)&&e.isValid()||Te(e).isValid())?xt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function GB(e){return this.to(Te(),e)}function Cm(e){var t;return e===void 0?this._locale._abbr:(t=hn(e),t!=null&&(this._locale=t),this)}var Om=dt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Tm(){return this._locale}var sa=1e3,Eo=60*sa,la=60*Eo,$m=(365*400+97)*24*la;function So(e,t){return(e%t+t)%t}function Pm(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-$m:new Date(e,t,n).valueOf()}function Bm(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-$m:Date.UTC(e,t,n)}function ZB(e){var t,n;if(e=ft(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Bm:Pm,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=So(t+(this._isUTC?0:this.utcOffset()*Eo),la);break;case"minute":t=this._d.valueOf(),t-=So(t,Eo);break;case"second":t=this._d.valueOf(),t-=So(t,sa);break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function XB(e){var t,n;if(e=ft(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Bm:Pm,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=la-So(t+(this._isUTC?0:this.utcOffset()*Eo),la)-1;break;case"minute":t=this._d.valueOf(),t+=Eo-So(t,Eo)-1;break;case"second":t=this._d.valueOf(),t+=sa-So(t,sa)-1;break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function qB(){return this._d.valueOf()-(this._offset||0)*6e4}function KB(){return Math.floor(this.valueOf()/1e3)}function JB(){return new Date(this.valueOf())}function QB(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function eY(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function tY(){return this.isValid()?this.toISOString():null}function nY(){return du(this)}function oY(){return Sn({},ye(this))}function rY(){return ye(this).overflow}function iY(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}he("N",0,0,"eraAbbr");he("NN",0,0,"eraAbbr");he("NNN",0,0,"eraAbbr");he("NNNN",0,0,"eraName");he("NNNNN",0,0,"eraNarrow");he("y",["y",1],"yo","eraYear");he("y",["yy",2],0,"eraYear");he("y",["yyy",3],0,"eraYear");he("y",["yyyy",4],0,"eraYear");ie("N",Cu);ie("NN",Cu);ie("NNN",Cu);ie("NNNN",vY);ie("NNNNN",gY);Ne(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,o){var r=n._locale.erasParse(e,o,n._strict);r?ye(n).era=r:ye(n).invalidEra=e});ie("y",Zo);ie("yy",Zo);ie("yyy",Zo);ie("yyyy",Zo);ie("yo",yY);Ne(["y","yy","yyy","yyyy"],je);Ne(["yo"],function(e,t,n,o){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[je]=n._locale.eraYearOrdinalParse(e,r):t[je]=parseInt(e,10)});function aY(e,t){var n,o,r,i=this._eras||hn("en")._eras;for(n=0,o=i.length;n<o;++n){switch(typeof i[n].since){case"string":r=ne(i[n].since).startOf("day"),i[n].since=r.valueOf();break}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":r=ne(i[n].until).startOf("day").valueOf(),i[n].until=r.valueOf();break}}return i}function sY(e,t,n){var o,r,i=this.eras(),a,l,u;for(e=e.toUpperCase(),o=0,r=i.length;o<r;++o)if(a=i[o].name.toUpperCase(),l=i[o].abbr.toUpperCase(),u=i[o].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return i[o];break;case"NNNN":if(a===e)return i[o];break;case"NNNNN":if(u===e)return i[o];break}else if([a,l,u].indexOf(e)>=0)return i[o]}function lY(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ne(e.since).year():ne(e.since).year()+(t-e.offset)*n}function uY(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].name;return""}function cY(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].narrow;return""}function dY(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].abbr;return""}function fY(){var e,t,n,o,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,o=this.clone().startOf("day").valueOf(),r[e].since<=o&&o<=r[e].until||r[e].until<=o&&o<=r[e].since)return(this.year()-ne(r[e].since).year())*n+r[e].offset;return this.year()}function hY(e){return Se(this,"_erasNameRegex")||Ou.call(this),e?this._erasNameRegex:this._erasRegex}function pY(e){return Se(this,"_erasAbbrRegex")||Ou.call(this),e?this._erasAbbrRegex:this._erasRegex}function mY(e){return Se(this,"_erasNarrowRegex")||Ou.call(this),e?this._erasNarrowRegex:this._erasRegex}function Cu(e,t){return t.erasAbbrRegex(e)}function vY(e,t){return t.erasNameRegex(e)}function gY(e,t){return t.erasNarrowRegex(e)}function yY(e,t){return t._eraYearOrdinalRegex||Zo}function Ou(){var e=[],t=[],n=[],o=[],r,i,a,l,u,c=this.eras();for(r=0,i=c.length;r<i;++r)a=on(c[r].name),l=on(c[r].abbr),u=on(c[r].narrow),t.push(a),e.push(l),n.push(u),o.push(a),o.push(l),o.push(u);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}he(0,["gg",2],0,function(){return this.weekYear()%100});he(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Wa(e,t){he(0,[e,e.length],0,t)}Wa("gggg","weekYear");Wa("ggggg","weekYear");Wa("GGGG","isoWeekYear");Wa("GGGGG","isoWeekYear");ie("G",za);ie("g",za);ie("GG",$e,ot);ie("gg",$e,ot);ie("GGGG",gu,vu);ie("gggg",gu,vu);ie("GGGGG",Ra,Ia);ie("ggggg",Ra,Ia);Jr(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,o){t[o.substr(0,2)]=ke(e)});Jr(["gg","GG"],function(e,t,n,o){t[o]=ne.parseTwoDigitYear(e)});function wY(e){return Ym.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function bY(e){return Ym.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function _Y(){return rn(this.year(),1,4)}function kY(){return rn(this.isoWeekYear(),1,4)}function xY(){var e=this.localeData()._week;return rn(this.year(),e.dow,e.doy)}function EY(){var e=this.localeData()._week;return rn(this.weekYear(),e.dow,e.doy)}function Ym(e,t,n,o,r){var i;return e==null?Yr(this,o,r).year:(i=rn(e,o,r),t>i&&(t=i),SY.call(this,e,t,n,o,r))}function SY(e,t,n,o,r){var i=pm(e,t,n,o,r),a=Br(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}he("Q",0,"Qo","quarter");ie("Q",om);Ne("Q",function(e,t){t[Qt]=(ke(e)-1)*3});function DY(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}he("D",["DD",2],"Do","date");ie("D",$e,Xo);ie("DD",$e,ot);ie("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Ne(["D","DD"],Ct);Ne("Do",function(e,t){t[Ct]=ke(e.match($e)[0])});var Am=qo("Date",!0);he("DDD",["DDDD",3],"DDDo","dayOfYear");ie("DDD",Va);ie("DDDD",rm);Ne(["DDD","DDDD"],function(e,t,n){n._dayOfYear=ke(e)});function MY(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}he("m",["mm",2],0,"minute");ie("m",$e,yu);ie("mm",$e,ot);Ne(["m","mm"],vt);var NY=qo("Minutes",!1);he("s",["ss",2],0,"second");ie("s",$e,yu);ie("ss",$e,ot);Ne(["s","ss"],en);var CY=qo("Seconds",!1);he("S",0,0,function(){return~~(this.millisecond()/100)});he(0,["SS",2],0,function(){return~~(this.millisecond()/10)});he(0,["SSS",3],0,"millisecond");he(0,["SSSS",4],0,function(){return this.millisecond()*10});he(0,["SSSSS",5],0,function(){return this.millisecond()*100});he(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});he(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});he(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});he(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});ie("S",Va,om);ie("SS",Va,ot);ie("SSS",Va,rm);var Dn,Im;for(Dn="SSSS";Dn.length<=9;Dn+="S")ie(Dn,Zo);function OY(e,t){t[Hn]=ke(("0."+e)*1e3)}for(Dn="S";Dn.length<=9;Dn+="S")Ne(Dn,OY);Im=qo("Milliseconds",!1);he("z",0,0,"zoneAbbr");he("zz",0,0,"zoneName");function TY(){return this._isUTC?"UTC":""}function $Y(){return this._isUTC?"Coordinated Universal Time":""}var Z=qr.prototype;Z.add=EB;Z.calendar=TB;Z.clone=$B;Z.diff=RB;Z.endOf=XB;Z.format=HB;Z.from=jB;Z.fromNow=WB;Z.to=UB;Z.toNow=GB;Z.get=F$;Z.invalidAt=rY;Z.isAfter=PB;Z.isBefore=BB;Z.isBetween=YB;Z.isSame=AB;Z.isSameOrAfter=IB;Z.isSameOrBefore=VB;Z.isValid=nY;Z.lang=Om;Z.locale=Cm;Z.localeData=Tm;Z.max=nB;Z.min=tB;Z.parsingFlags=oY;Z.set=H$;Z.startOf=ZB;Z.subtract=SB;Z.toArray=QB;Z.toObject=eY;Z.toDate=JB;Z.toISOString=LB;Z.inspect=FB;typeof Symbol<"u"&&Symbol.for!=null&&(Z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Z.toJSON=tY;Z.toString=zB;Z.unix=KB;Z.valueOf=qB;Z.creationData=iY;Z.eraName=uY;Z.eraNarrow=cY;Z.eraAbbr=dY;Z.eraYear=fY;Z.year=sm;Z.isLeapYear=L$;Z.weekYear=wY;Z.isoWeekYear=bY;Z.quarter=Z.quarters=DY;Z.month=fm;Z.daysInMonth=J$;Z.week=Z.weeks=aP;Z.isoWeek=Z.isoWeeks=sP;Z.weeksInYear=xY;Z.weeksInWeekYear=EY;Z.isoWeeksInYear=_Y;Z.isoWeeksInISOWeekYear=kY;Z.date=Am;Z.day=Z.days=bP;Z.weekday=_P;Z.isoWeekday=kP;Z.dayOfYear=MY;Z.hour=Z.hours=CP;Z.minute=Z.minutes=NY;Z.second=Z.seconds=CY;Z.millisecond=Z.milliseconds=Im;Z.utcOffset=dB;Z.utc=hB;Z.local=pB;Z.parseZone=mB;Z.hasAlignedHourOffset=vB;Z.isDST=gB;Z.isLocal=wB;Z.isUtcOffset=bB;Z.isUtc=Sm;Z.isUTC=Sm;Z.zoneAbbr=TY;Z.zoneName=$Y;Z.dates=dt("dates accessor is deprecated. Use date instead.",Am);Z.months=dt("months accessor is deprecated. Use month instead",fm);Z.years=dt("years accessor is deprecated. Use year instead",sm);Z.zone=dt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fB);Z.isDSTShifted=dt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",yB);function PY(e){return Te(e*1e3)}function BY(){return Te.apply(null,arguments).parseZone()}function Vm(e){return e}var De=hu.prototype;De.calendar=w$;De.longDateFormat=x$;De.invalidDate=S$;De.ordinal=N$;De.preparse=Vm;De.postformat=Vm;De.relativeTime=O$;De.pastFuture=T$;De.set=g$;De.eras=aY;De.erasParse=sY;De.erasConvertYear=lY;De.erasAbbrRegex=pY;De.erasNameRegex=hY;De.erasNarrowRegex=mY;De.months=Z$;De.monthsShort=X$;De.monthsParse=K$;De.monthsRegex=eP;De.monthsShortRegex=Q$;De.week=nP;De.firstDayOfYear=iP;De.firstDayOfWeek=rP;De.weekdays=mP;De.weekdaysMin=gP;De.weekdaysShort=vP;De.weekdaysParse=wP;De.weekdaysRegex=xP;De.weekdaysShortRegex=EP;De.weekdaysMinRegex=SP;De.isPM=MP;De.meridiem=OP;function ua(e,t,n,o){var r=hn(),i=jt().set(o,t);return r[n](i,e)}function Rm(e,t,n){if(un(e)&&(t=e,e=void 0),e=e||"",t!=null)return ua(e,t,n,"month");var o,r=[];for(o=0;o<12;o++)r[o]=ua(e,o,n,"month");return r}function Tu(e,t,n,o){typeof e=="boolean"?(un(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,un(t)&&(n=t,t=void 0),t=t||"");var r=hn(),i=e?r._week.dow:0,a,l=[];if(n!=null)return ua(t,(n+i)%7,o,"day");for(a=0;a<7;a++)l[a]=ua(t,(a+i)%7,o,"day");return l}function YY(e,t){return Rm(e,t,"months")}function AY(e,t){return Rm(e,t,"monthsShort")}function IY(e,t,n){return Tu(e,t,n,"weekdays")}function VY(e,t,n){return Tu(e,t,n,"weekdaysShort")}function RY(e,t,n){return Tu(e,t,n,"weekdaysMin")}Cn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=ke(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ne.lang=dt("moment.lang is deprecated. Use moment.locale instead.",Cn);ne.langData=dt("moment.langData is deprecated. Use moment.localeData instead.",hn);var Gt=Math.abs;function zY(){var e=this._data;return this._milliseconds=Gt(this._milliseconds),this._days=Gt(this._days),this._months=Gt(this._months),e.milliseconds=Gt(e.milliseconds),e.seconds=Gt(e.seconds),e.minutes=Gt(e.minutes),e.hours=Gt(e.hours),e.months=Gt(e.months),e.years=Gt(e.years),this}function zm(e,t,n,o){var r=xt(t,n);return e._milliseconds+=o*r._milliseconds,e._days+=o*r._days,e._months+=o*r._months,e._bubble()}function LY(e,t){return zm(this,e,t,1)}function FY(e,t){return zm(this,e,t,-1)}function Gd(e){return e<0?Math.floor(e):Math.ceil(e)}function HY(){var e=this._milliseconds,t=this._days,n=this._months,o=this._data,r,i,a,l,u;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Gd(fl(n)+t)*864e5,t=0,n=0),o.milliseconds=e%1e3,r=rt(e/1e3),o.seconds=r%60,i=rt(r/60),o.minutes=i%60,a=rt(i/60),o.hours=a%24,t+=rt(a/24),u=rt(Lm(t)),n+=u,t-=Gd(fl(u)),l=rt(n/12),n%=12,o.days=t,o.months=n,o.years=l,this}function Lm(e){return e*4800/146097}function fl(e){return e*146097/4800}function jY(e){if(!this.isValid())return NaN;var t,n,o=this._milliseconds;if(e=ft(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+o/864e5,n=this._months+Lm(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(fl(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return t*24+o/36e5;case"minute":return t*1440+o/6e4;case"second":return t*86400+o/1e3;case"millisecond":return Math.floor(t*864e5)+o;default:throw new Error("Unknown unit "+e)}}function pn(e){return function(){return this.as(e)}}var Fm=pn("ms"),WY=pn("s"),UY=pn("m"),GY=pn("h"),ZY=pn("d"),XY=pn("w"),qY=pn("M"),KY=pn("Q"),JY=pn("y"),QY=Fm;function eA(){return xt(this)}function tA(e){return e=ft(e),this.isValid()?this[e+"s"]():NaN}function lo(e){return function(){return this.isValid()?this._data[e]:NaN}}var nA=lo("milliseconds"),oA=lo("seconds"),rA=lo("minutes"),iA=lo("hours"),aA=lo("days"),sA=lo("months"),lA=lo("years");function uA(){return rt(this.days()/7)}var Xt=Math.round,bo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cA(e,t,n,o,r){return r.relativeTime(t||1,!!n,e,o)}function dA(e,t,n,o){var r=xt(e).abs(),i=Xt(r.as("s")),a=Xt(r.as("m")),l=Xt(r.as("h")),u=Xt(r.as("d")),c=Xt(r.as("M")),d=Xt(r.as("w")),f=Xt(r.as("y")),h=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||a<=1&&["m"]||a<n.m&&["mm",a]||l<=1&&["h"]||l<n.h&&["hh",l]||u<=1&&["d"]||u<n.d&&["dd",u];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=o,cA.apply(null,h)}function fA(e){return e===void 0?Xt:typeof e=="function"?(Xt=e,!0):!1}function hA(e,t){return bo[e]===void 0?!1:t===void 0?bo[e]:(bo[e]=t,e==="s"&&(bo.ss=t-1),!0)}function pA(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,o=bo,r,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(o=Object.assign({},bo,t),t.s!=null&&t.ss==null&&(o.ss=t.s-1)),r=this.localeData(),i=dA(this,!n,o,r),n&&(i=r.pastFuture(+this,i)),r.postformat(i)}var Es=Math.abs;function po(e){return(e>0)-(e<0)||+e}function Ua(){if(!this.isValid())return this.localeData().invalidDate();var e=Es(this._milliseconds)/1e3,t=Es(this._days),n=Es(this._months),o,r,i,a,l=this.asSeconds(),u,c,d,f;return l?(o=rt(e/60),r=rt(o/60),e%=60,o%=60,i=rt(n/12),n%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=l<0?"-":"",c=po(this._months)!==po(l)?"-":"",d=po(this._days)!==po(l)?"-":"",f=po(this._milliseconds)!==po(l)?"-":"",u+"P"+(i?c+i+"Y":"")+(n?c+n+"M":"")+(t?d+t+"D":"")+(r||o||e?"T":"")+(r?f+r+"H":"")+(o?f+o+"M":"")+(e?f+a+"S":"")):"P0D"}var Ee=ja.prototype;Ee.isValid=sB;Ee.abs=zY;Ee.add=LY;Ee.subtract=FY;Ee.as=jY;Ee.asMilliseconds=Fm;Ee.asSeconds=WY;Ee.asMinutes=UY;Ee.asHours=GY;Ee.asDays=ZY;Ee.asWeeks=XY;Ee.asMonths=qY;Ee.asQuarters=KY;Ee.asYears=JY;Ee.valueOf=QY;Ee._bubble=HY;Ee.clone=eA;Ee.get=tA;Ee.milliseconds=nA;Ee.seconds=oA;Ee.minutes=rA;Ee.hours=iA;Ee.days=aA;Ee.weeks=uA;Ee.months=sA;Ee.years=lA;Ee.humanize=pA;Ee.toISOString=Ua;Ee.toString=Ua;Ee.toJSON=Ua;Ee.locale=Cm;Ee.localeData=Tm;Ee.toIsoString=dt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ua);Ee.lang=Om;he("X",0,0,"unix");he("x",0,0,"valueOf");ie("x",za);ie("X",Y$);Ne("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Ne("x",function(e,t,n){n._d=new Date(ke(e))});ne.version="2.30.1";m$(Te);ne.fn=Z;ne.min=oB;ne.max=rB;ne.now=iB;ne.utc=jt;ne.unix=PY;ne.months=YY;ne.isDate=Xr;ne.locale=Cn;ne.invalid=Aa;ne.duration=xt;ne.isMoment=bt;ne.weekdays=IY;ne.parseZone=BY;ne.localeData=hn;ne.isDuration=Bi;ne.monthsShort=AY;ne.weekdaysMin=RY;ne.defineLocale=xu;ne.updateLocale=BP;ne.locales=YP;ne.weekdaysShort=VY;ne.normalizeUnits=ft;ne.relativeTimeRounding=fA;ne.relativeTimeThreshold=hA;ne.calendarFormat=OB;ne.prototype=Z;ne.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};s.ref(null);s.ref(null);const mA=["src"],Hm=s.defineComponent({__name:"workflow-action-icon",props:{icon:{},color:{},size:{}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("span",{class:s.normalizeClass(["yu-flex yu-shrink-0 yu-items-center yu-justify-center yu-overflow-hidden yu-rounded-xl",e.size==="small"?"yu-h-9 yu-w-9":"yu-h-16 yu-w-16"]),style:s.normalizeStyle({background:`color-mix(in srgb, ${e.color} 18%, white)`}),"aria-hidden":"true"},[s.createElementVNode("img",{class:s.normalizeClass(e.size==="small"?"yu-h-5 yu-w-5":"yu-h-8 yu-w-8"),src:e.icon,alt:""},null,10,mA)],6))}}),vA={class:"yu-w-full","aria-label":"Tipos de etapa"},gA=s.defineComponent({__name:"workflow-add-menu",props:{nodeTypes:{},parentName:{}},emits:["select","close"],setup(e,{emit:t}){const n=t;return(o,r)=>(s.openBlock(),s.createElementBlock("section",vA,[s.createVNode(s.unref(Gi),{class:"yu-mb-2","center-between":"","gap-sm":""},{default:s.withCtx(()=>[s.createElementVNode("div",null,[s.createVNode(s.unref(Nt),{base:"",semibold:""},{default:s.withCtx(()=>[...r[1]||(r[1]=[s.createTextVNode("Adicionar etapa",-1)])]),_:1}),e.parentName?(s.openBlock(),s.createBlock(s.unref(Nt),{key:0,class:"yu-mt-0.5 yu-truncate",small:""},{default:s.withCtx(()=>[s.createTextVNode("Depois de "+s.toDisplayString(e.parentName),1)]),_:1})):s.createCommentVNode("",!0)]),s.createVNode(s.unref(qn),{ghost:"",icon:"",small:"","aria-label":"Fechar",onClick:r[0]||(r[0]=i=>n("close"))},{default:s.withCtx(()=>[...r[2]||(r[2]=[s.createTextVNode("×",-1)])]),_:1})]),_:1}),e.nodeTypes.length===0?(s.openBlock(),s.createBlock(s.unref(Nt),{key:0,class:"yu-p-3",base:""},{default:s.withCtx(()=>[...r[3]||(r[3]=[s.createTextVNode("Nenhum tipo de etapa foi permitido.",-1)])]),_:1})):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.nodeTypes,i=>(s.openBlock(),s.createBlock(s.unref(qn),{class:"!yu-h-auto !yu-justify-start !yu-p-3 yu-text-left",key:i.type,ghost:"",fluid:"",onClick:a=>n("select",i)},{icon:s.withCtx(()=>[s.createVNode(Hm,{icon:i.icon,color:i.color,size:"small"},null,8,["icon","color"]),s.createElementVNode("span",null,[s.createVNode(s.unref(Nt),{base:"",semibold:""},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.label),1)]),_:2},1024),s.createVNode(s.unref(Nt),{small:""},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(i.defaultName),1)]),_:2},1024)])]),_:2},1032,["onClick"]))),128))]))}}),yA=()=>({nodeTypes:[],readOnly:!1,hasEditor:!1,hasForm:!1}),$u=Tg.defineStore("service-workflow-editor",()=>{const e=s.reactive({}),t=new Map,n=new Map,o=m=>e[m]??=yA(),r=(m,v)=>console.warn(`[AppServiceWorkflow] Já existe um ${m} registrado para "${v}".`),i=(m,v,w)=>t.has(m)?(r("editor",m),!1):(t.set(m,{owner:v,adapter:w}),o(m).hasEditor=!0,!0),a=(m,v)=>n.has(m)?(r("formulário",m),!1):(n.set(m,v),o(m).hasForm=!0,!0),l=m=>{const v=e[m];v&&!v.hasEditor&&!v.hasForm&&delete e[m]},u=(m,v)=>{t.get(m)?.owner===v&&(t.delete(m),o(m).hasEditor=!1,o(m).request=void 0,l(m))},c=(m,v)=>{n.get(m)===v&&(n.delete(m),o(m).hasForm=!1,o(m).request=void 0,l(m))},d=m=>{e[m]&&(e[m].request=void 0)};return{channels:e,registerEditor:i,registerForm:a,unregisterEditor:u,unregisterForm:c,syncEditor:(m,v,w)=>{const g=o(m);g.nodeTypes=v,g.readOnly=w;const b=g.request?.parentId;g.request&&(w||!t.get(m)?.adapter.canAdd(b))&&d(m)},requestAdd:(m,v)=>{const w=e[m],g=t.get(m)?.adapter;return!w||w.readOnly||!w.nodeTypes.length||!g?.canAdd(v?.id)?!1:(w.request={workflowId:m,...v?.id?{parentId:v.id}:{},...v?.name?{parentName:v.name}:{}},!0)},cancelAdd:d,confirmAdd:(m,v)=>{const w=e[m],g=t.get(m)?.adapter,b=w?.nodeTypes.find(_=>_.type===v.type);if(!w?.request||!g||!b)return!1;if(!g.canAdd(w.request.parentId))return d(m),!1;const y=g.add(b,w.request.parentId);return y&&d(m),y}}}),Pu=e=>{if(!e)throw new Error("workflow-id é obrigatório para o editor de fluxo.");let t;try{t=$u()}catch{throw new Error("AppServiceWorkflowEditor requer Pinia. Instale com app.use(createPinia()) antes de montar os componentes.")}return{request:s.computed(()=>t.channels[e]?.request),nodeTypes:s.computed(()=>t.channels[e]?.nodeTypes??[]),requestAdd:n=>t.requestAdd(e,n),cancelAdd:()=>t.cancelAdd(e),confirmAdd:n=>t.confirmAdd(e,n)}},jm=s.defineComponent({__name:"app-service-workflow-add-form",props:{workflowId:{}},setup(e){const t=e,n=Pu(t.workflowId),o=$u(),r=Symbol(`workflow-form:${t.workflowId}`),i=o.registerForm(t.workflowId,r);return s.onBeforeUnmount(()=>{i&&o.unregisterForm(t.workflowId,r)}),(a,l)=>s.unref(i)&&s.unref(n).request.value?(s.openBlock(),s.createBlock(gA,{key:0,"node-types":s.unref(n).nodeTypes.value,"parent-name":s.unref(n).request.value.parentName,onSelect:s.unref(n).confirmAdd,onClose:s.unref(n).cancelAdd},null,8,["node-types","parent-name","onSelect","onClose"])):s.createCommentVNode("",!0)}});function Ir(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function qt(e){return typeof e=="function"?e():s.unref(e)}const wA=typeof window<"u"&&typeof document<"u",bA=e=>typeof e<"u",_A=Object.prototype.toString,kA=e=>_A.call(e)==="[object Object]",xA=()=>{};function EA(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const Wm=e=>e();function SA(e=Wm){const t=s.ref(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:s.readonly(t),pause:n,resume:o,eventFilter:r}}function Zd(e,t=!1,n="Timeout"){return new Promise((o,r)=>{setTimeout(t?()=>r(n):o,e)})}function DA(e,t,n={}){const{eventFilter:o=Wm,...r}=n;return s.watch(e,EA(o,t),r)}function mo(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:l,isActive:u}=SA(o);return{stop:DA(e,t,{...r,eventFilter:i}),pause:a,resume:l,isActive:u}}function MA(e,t={}){if(!s.isRef(e))return s.toRefs(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=s.customRef(()=>({get(){return e.value[o]},set(r){var i;if((i=qt(t.replaceRef))!=null?i:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=r,e.value=l}else{const l={...e.value,[o]:r};Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=r}}));return n}function hl(e,t=!1){function n(f,{flush:h="sync",deep:p=!1,timeout:m,throwOnTimeout:v}={}){let w=null;const b=[new Promise(y=>{w=s.watch(e,_=>{f(_)!==t&&(w?.(),y(_))},{flush:h,deep:p,immediate:!0})})];return m!=null&&b.push(Zd(m,v).then(()=>qt(e)).finally(()=>w?.())),Promise.race(b)}function o(f,h){if(!s.isRef(f))return n(_=>_===f,h);const{flush:p="sync",deep:m=!1,timeout:v,throwOnTimeout:w}=h??{};let g=null;const y=[new Promise(_=>{g=s.watch([e,f],([O,B])=>{t!==(O===B)&&(g?.(),_(O))},{flush:p,deep:m,immediate:!0})})];return v!=null&&y.push(Zd(v,w).then(()=>qt(e)).finally(()=>(g?.(),qt(e)))),Promise.race(y)}function r(f){return n(h=>!!h,f)}function i(f){return o(null,f)}function a(f){return o(void 0,f)}function l(f){return n(Number.isNaN,f)}function u(f,h){return n(p=>{const m=Array.from(p);return m.includes(f)||m.includes(qt(f))},h)}function c(f){return d(1,f)}function d(f=1,h){let p=-1;return n(()=>(p+=1,p>=f),h)}return Array.isArray(qt(e))?{toMatch:n,toContains:u,changed:c,changedTimes:d,get not(){return hl(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:r,toBeNull:i,toBeNaN:l,toBeUndefined:a,changed:c,changedTimes:d,get not(){return hl(e,!t)}}}function pl(e){return hl(e)}function NA(e){var t;const n=qt(e);return(t=n?.$el)!=null?t:n}const Um=wA?window:void 0;function Gm(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Um):[t,n,o,r]=e,!t)return xA;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(d=>d()),i.length=0},l=(d,f,h,p)=>(d.addEventListener(f,h,p),()=>d.removeEventListener(f,h,p)),u=s.watch(()=>[NA(t),qt(r)],([d,f])=>{if(a(),!d)return;const h=kA(f)?{...f}:f;i.push(...n.flatMap(p=>o.map(m=>l(d,p,m,h))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return Ir(c),c}function CA(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Xd(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Um,eventName:i="keydown",passive:a=!1,dedupe:l=!1}=o,u=CA(t);return Gm(r,i,d=>{d.repeat&&qt(l)||u(d)&&n(d)},a)}function OA(e){return JSON.parse(JSON.stringify(e))}function Ss(e,t,n,o={}){var r,i,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:d=!1,defaultValue:f,shouldEmit:h}=o,p=s.getCurrentInstance(),m=n||p?.emit||((r=p?.$emit)==null?void 0:r.bind(p))||((a=(i=p?.proxy)==null?void 0:i.$emit)==null?void 0:a.bind(p?.proxy));let v=c;t||(t="modelValue"),v=v||`update:${t.toString()}`;const w=y=>l?typeof l=="function"?l(y):OA(y):y,g=()=>bA(e[t])?w(e[t]):f,b=y=>{h?h(y)&&m(v,y):m(v,y)};if(u){const y=g(),_=s.ref(y);let O=!1;return s.watch(()=>e[t],B=>{O||(O=!0,_.value=w(B),s.nextTick(()=>O=!1))}),s.watch(_,B=>{!O&&(B!==e[t]||d)&&b(B)},{deep:d}),_}else return s.computed({get(){return g()},set(y){b(y)}})}var TA={value:()=>{}};function Ga(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Ai(n)}function Ai(e){this._=e}function $A(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Ai.prototype=Ga.prototype={constructor:Ai,on:function(e,t){var n=this._,o=$A(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=PA(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=qd(n[r],e.name,t);else if(t==null)for(r in n)n[r]=qd(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ai(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function PA(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function qd(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=TA,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ml="http://www.w3.org/1999/xhtml";const Kd={svg:"http://www.w3.org/2000/svg",xhtml:ml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Za(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Kd.hasOwnProperty(t)?{space:Kd[t],local:e}:e}function BA(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ml&&t.documentElement.namespaceURI===ml?t.createElement(e):t.createElementNS(n,e)}}function YA(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Zm(e){var t=Za(e);return(t.local?YA:BA)(t)}function AA(){}function Bu(e){return e==null?AA:function(){return this.querySelector(e)}}function IA(e){typeof e!="function"&&(e=Bu(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=new Array(a),u,c,d=0;d<a;++d)(u=i[d])&&(c=e.call(u,u.__data__,d,i))&&("__data__"in u&&(c.__data__=u.__data__),l[d]=c);return new nt(o,this._parents)}function VA(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function RA(){return[]}function Xm(e){return e==null?RA:function(){return this.querySelectorAll(e)}}function zA(e){return function(){return VA(e.apply(this,arguments))}}function LA(e){typeof e=="function"?e=zA(e):e=Xm(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],l=a.length,u,c=0;c<l;++c)(u=a[c])&&(o.push(e.call(u,u.__data__,c,a)),r.push(u));return new nt(o,r)}function qm(e){return function(){return this.matches(e)}}function Km(e){return function(t){return t.matches(e)}}var FA=Array.prototype.find;function HA(e){return function(){return FA.call(this.children,e)}}function jA(){return this.firstElementChild}function WA(e){return this.select(e==null?jA:HA(typeof e=="function"?e:Km(e)))}var UA=Array.prototype.filter;function GA(){return Array.from(this.children)}function ZA(e){return function(){return UA.call(this.children,e)}}function XA(e){return this.selectAll(e==null?GA:ZA(typeof e=="function"?e:Km(e)))}function qA(e){typeof e!="function"&&(e=qm(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],u,c=0;c<a;++c)(u=i[c])&&e.call(u,u.__data__,c,i)&&l.push(u);return new nt(o,this._parents)}function Jm(e){return new Array(e.length)}function KA(){return new nt(this._enter||this._groups.map(Jm),this._parents)}function ca(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ca.prototype={constructor:ca,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function JA(e){return function(){return e}}function QA(e,t,n,o,r,i){for(var a=0,l,u=t.length,c=i.length;a<c;++a)(l=t[a])?(l.__data__=i[a],o[a]=l):n[a]=new ca(e,i[a]);for(;a<u;++a)(l=t[a])&&(r[a]=l)}function eI(e,t,n,o,r,i,a){var l,u,c=new Map,d=t.length,f=i.length,h=new Array(d),p;for(l=0;l<d;++l)(u=t[l])&&(h[l]=p=a.call(u,u.__data__,l,t)+"",c.has(p)?r[l]=u:c.set(p,u));for(l=0;l<f;++l)p=a.call(e,i[l],l,i)+"",(u=c.get(p))?(o[l]=u,u.__data__=i[l],c.delete(p)):n[l]=new ca(e,i[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(h[l])===u&&(r[l]=u)}function tI(e){return e.__data__}function nI(e,t){if(!arguments.length)return Array.from(this,tI);var n=t?eI:QA,o=this._parents,r=this._groups;typeof e!="function"&&(e=JA(e));for(var i=r.length,a=new Array(i),l=new Array(i),u=new Array(i),c=0;c<i;++c){var d=o[c],f=r[c],h=f.length,p=oI(e.call(d,d&&d.__data__,c,o)),m=p.length,v=l[c]=new Array(m),w=a[c]=new Array(m),g=u[c]=new Array(h);n(d,f,v,w,g,p,t);for(var b=0,y=0,_,O;b<m;++b)if(_=v[b]){for(b>=y&&(y=b+1);!(O=w[y])&&++y<m;);_._next=O||null}}return a=new nt(a,o),a._enter=l,a._exit=u,a}function oI(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rI(){return new nt(this._exit||this._groups.map(Jm),this._parents)}function iI(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function aI(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),l=new Array(r),u=0;u<a;++u)for(var c=n[u],d=o[u],f=c.length,h=l[u]=new Array(f),p,m=0;m<f;++m)(p=c[m]||d[m])&&(h[m]=p);for(;u<r;++u)l[u]=n[u];return new nt(l,this._parents)}function sI(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function lI(e){e||(e=uI);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],l=a.length,u=r[i]=new Array(l),c,d=0;d<l;++d)(c=a[d])&&(u[d]=c);u.sort(t)}return new nt(r,this._parents).order()}function uI(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cI(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dI(){return Array.from(this)}function fI(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function hI(){let e=0;for(const t of this)++e;return e}function pI(){return!this.node()}function mI(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,l;i<a;++i)(l=r[i])&&e.call(l,l.__data__,i,r);return this}function vI(e){return function(){this.removeAttribute(e)}}function gI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yI(e,t){return function(){this.setAttribute(e,t)}}function wI(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function bI(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function _I(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function kI(e,t){var n=Za(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?gI:vI:typeof t=="function"?n.local?_I:bI:n.local?wI:yI)(n,t))}function Qm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xI(e){return function(){this.style.removeProperty(e)}}function EI(e,t,n){return function(){this.style.setProperty(e,t,n)}}function SI(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function DI(e,t,n){return arguments.length>1?this.each((t==null?xI:typeof t=="function"?SI:EI)(e,t,n??"")):Yo(this.node(),e)}function Yo(e,t){return e.style.getPropertyValue(t)||Qm(e).getComputedStyle(e,null).getPropertyValue(t)}function MI(e){return function(){delete this[e]}}function NI(e,t){return function(){this[e]=t}}function CI(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function OI(e,t){return arguments.length>1?this.each((t==null?MI:typeof t=="function"?CI:NI)(e,t)):this.node()[e]}function ev(e){return e.trim().split(/^|\s+/)}function Yu(e){return e.classList||new tv(e)}function tv(e){this._node=e,this._names=ev(e.getAttribute("class")||"")}tv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nv(e,t){for(var n=Yu(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function ov(e,t){for(var n=Yu(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function TI(e){return function(){nv(this,e)}}function $I(e){return function(){ov(this,e)}}function PI(e,t){return function(){(t.apply(this,arguments)?nv:ov)(this,e)}}function BI(e,t){var n=ev(e+"");if(arguments.length<2){for(var o=Yu(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?PI:t?TI:$I)(n,t))}function YI(){this.textContent=""}function AI(e){return function(){this.textContent=e}}function II(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function VI(e){return arguments.length?this.each(e==null?YI:(typeof e=="function"?II:AI)(e)):this.node().textContent}function RI(){this.innerHTML=""}function zI(e){return function(){this.innerHTML=e}}function LI(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function FI(e){return arguments.length?this.each(e==null?RI:(typeof e=="function"?LI:zI)(e)):this.node().innerHTML}function HI(){this.nextSibling&&this.parentNode.appendChild(this)}function jI(){return this.each(HI)}function WI(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function UI(){return this.each(WI)}function GI(e){var t=typeof e=="function"?e:Zm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ZI(){return null}function XI(e,t){var n=typeof e=="function"?e:Zm(e),o=t==null?ZI:typeof t=="function"?t:Bu(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function qI(){var e=this.parentNode;e&&e.removeChild(this)}function KI(){return this.each(qI)}function JI(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function QI(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eV(e){return this.select(e?QI:JI)}function tV(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nV(e){return function(t){e.call(this,t,this.__data__)}}function oV(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function rV(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function iV(e,t,n){return function(){var o=this.__on,r,i=nV(t);if(o){for(var a=0,l=o.length;a<l;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function aV(e,t,n){var o=oV(e+""),r,i=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,c=l.length,d;u<c;++u)for(r=0,d=l[u];r<i;++r)if((a=o[r]).type===d.type&&a.name===d.name)return d.value}return}for(l=t?iV:rV,r=0;r<i;++r)this.each(l(o[r],t,n));return this}function rv(e,t,n){var o=Qm(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function sV(e,t){return function(){return rv(this,e,t)}}function lV(e,t){return function(){return rv(this,e,t.apply(this,arguments))}}function uV(e,t){return this.each((typeof t=="function"?lV:sV)(e,t))}function*cV(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var iv=[null];function nt(e,t){this._groups=e,this._parents=t}function Qr(){return new nt([[document.documentElement]],iv)}function dV(){return this}nt.prototype=Qr.prototype={constructor:nt,select:IA,selectAll:LA,selectChild:WA,selectChildren:XA,filter:qA,data:nI,enter:KA,exit:rI,join:iI,merge:aI,selection:dV,order:sI,sort:lI,call:cI,nodes:dI,node:fI,size:hI,empty:pI,each:mI,attr:kI,style:DI,property:OI,classed:BI,text:VI,html:FI,raise:jI,lower:UI,append:GI,insert:XI,remove:KI,clone:eV,datum:tV,on:aV,dispatch:uV,[Symbol.iterator]:cV};function pt(e){return typeof e=="string"?new nt([[document.querySelector(e)]],[document.documentElement]):new nt([[e]],iv)}function fV(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Dt(e,t){if(e=fV(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const hV={passive:!1},Vr={capture:!0,passive:!1};function Ds(e){e.stopImmediatePropagation()}function Do(e){e.preventDefault(),e.stopImmediatePropagation()}function av(e){var t=e.document.documentElement,n=pt(e).on("dragstart.drag",Do,Vr);"onselectstart"in t?n.on("selectstart.drag",Do,Vr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sv(e,t){var n=e.document.documentElement,o=pt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Do,Vr),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const vi=e=>()=>e;function vl(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:l,dx:u,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}vl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function pV(e){return!e.ctrlKey&&!e.button}function mV(){return this.parentNode}function vV(e,t){return t??{x:e.x,y:e.y}}function gV(){return navigator.maxTouchPoints||"ontouchstart"in this}function yV(){var e=pV,t=mV,n=vV,o=gV,r={},i=Ga("start","drag","end"),a=0,l,u,c,d,f=0;function h(_){_.on("mousedown.drag",p).filter(o).on("touchstart.drag",w).on("touchmove.drag",g,hV).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(_,O){if(!(d||!e.call(this,_,O))){var B=y(this,t.call(this,_,O),_,O,"mouse");B&&(pt(_.view).on("mousemove.drag",m,Vr).on("mouseup.drag",v,Vr),av(_.view),Ds(_),c=!1,l=_.clientX,u=_.clientY,B("start",_))}}function m(_){if(Do(_),!c){var O=_.clientX-l,B=_.clientY-u;c=O*O+B*B>f}r.mouse("drag",_)}function v(_){pt(_.view).on("mousemove.drag mouseup.drag",null),sv(_.view,c),Do(_),r.mouse("end",_)}function w(_,O){if(e.call(this,_,O)){var B=_.changedTouches,$=t.call(this,_,O),C=B.length,V,L;for(V=0;V<C;++V)(L=y(this,$,_,O,B[V].identifier,B[V]))&&(Ds(_),L("start",_,B[V]))}}function g(_){var O=_.changedTouches,B=O.length,$,C;for($=0;$<B;++$)(C=r[O[$].identifier])&&(Do(_),C("drag",_,O[$]))}function b(_){var O=_.changedTouches,B=O.length,$,C;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),$=0;$<B;++$)(C=r[O[$].identifier])&&(Ds(_),C("end",_,O[$]))}function y(_,O,B,$,C,V){var L=i.copy(),I=Dt(V||B,O),x,R,k;if((k=n.call(_,new vl("beforestart",{sourceEvent:B,target:h,identifier:C,active:a,x:I[0],y:I[1],dx:0,dy:0,dispatch:L}),$))!=null)return x=k.x-I[0]||0,R=k.y-I[1]||0,function N(D,z,F){var j=I,Y;switch(D){case"start":r[C]=N,Y=a++;break;case"end":delete r[C],--a;case"drag":I=Dt(F||z,O),Y=a;break}L.call(D,_,new vl(D,{sourceEvent:z,subject:k,target:h,identifier:C,active:Y,x:I[0]+x,y:I[1]+R,dx:I[0]-j[0],dy:I[1]-j[1],dispatch:L}),$)}}return h.filter=function(_){return arguments.length?(e=typeof _=="function"?_:vi(!!_),h):e},h.container=function(_){return arguments.length?(t=typeof _=="function"?_:vi(_),h):t},h.subject=function(_){return arguments.length?(n=typeof _=="function"?_:vi(_),h):n},h.touchable=function(_){return arguments.length?(o=typeof _=="function"?_:vi(!!_),h):o},h.on=function(){var _=i.on.apply(i,arguments);return _===i?h:_},h.clickDistance=function(_){return arguments.length?(f=(_=+_)*_,h):Math.sqrt(f)},h}function Au(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lv(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ei(){}var Rr=.7,da=1/Rr,Mo="\\s*([+-]?\\d+)\\s*",zr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wV=/^#([0-9a-f]{3,8})$/,bV=new RegExp(`^rgb\\(${Mo},${Mo},${Mo}\\)$`),_V=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),kV=new RegExp(`^rgba\\(${Mo},${Mo},${Mo},${zr}\\)$`),xV=new RegExp(`^rgba\\(${It},${It},${It},${zr}\\)$`),EV=new RegExp(`^hsl\\(${zr},${It},${It}\\)$`),SV=new RegExp(`^hsla\\(${zr},${It},${It},${zr}\\)$`),Jd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Au(ei,Qn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qd,formatHex:Qd,formatHex8:DV,formatHsl:MV,formatRgb:ef,toString:ef});function Qd(){return this.rgb().formatHex()}function DV(){return this.rgb().formatHex8()}function MV(){return uv(this).formatHsl()}function ef(){return this.rgb().formatRgb()}function Qn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wV.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tf(t):n===3?new Ke(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?gi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?gi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=bV.exec(e))?new Ke(t[1],t[2],t[3],1):(t=_V.exec(e))?new Ke(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kV.exec(e))?gi(t[1],t[2],t[3],t[4]):(t=xV.exec(e))?gi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EV.exec(e))?rf(t[1],t[2]/100,t[3]/100,1):(t=SV.exec(e))?rf(t[1],t[2]/100,t[3]/100,t[4]):Jd.hasOwnProperty(e)?tf(Jd[e]):e==="transparent"?new Ke(NaN,NaN,NaN,0):null}function tf(e){return new Ke(e>>16&255,e>>8&255,e&255,1)}function gi(e,t,n,o){return o<=0&&(e=t=n=NaN),new Ke(e,t,n,o)}function NV(e){return e instanceof ei||(e=Qn(e)),e?(e=e.rgb(),new Ke(e.r,e.g,e.b,e.opacity)):new Ke}function gl(e,t,n,o){return arguments.length===1?NV(e):new Ke(e,t,n,o??1)}function Ke(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Au(Ke,gl,lv(ei,{brighter(e){return e=e==null?da:Math.pow(da,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rr:Math.pow(Rr,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ke(Zn(this.r),Zn(this.g),Zn(this.b),fa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nf,formatHex:nf,formatHex8:CV,formatRgb:of,toString:of}));function nf(){return`#${jn(this.r)}${jn(this.g)}${jn(this.b)}`}function CV(){return`#${jn(this.r)}${jn(this.g)}${jn(this.b)}${jn((isNaN(this.opacity)?1:this.opacity)*255)}`}function of(){const e=fa(this.opacity);return`${e===1?"rgb(":"rgba("}${Zn(this.r)}, ${Zn(this.g)}, ${Zn(this.b)}${e===1?")":`, ${e})`}`}function fa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Zn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function jn(e){return e=Zn(e),(e<16?"0":"")+e.toString(16)}function rf(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new mt(e,t,n,o)}function uv(e){if(e instanceof mt)return new mt(e.h,e.s,e.l,e.opacity);if(e instanceof ei||(e=Qn(e)),!e)return new mt;if(e instanceof mt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,l=i-r,u=(i+r)/2;return l?(t===i?a=(n-o)/l+(n<o)*6:n===i?a=(o-t)/l+2:a=(t-n)/l+4,l/=u<.5?i+r:2-i-r,a*=60):l=u>0&&u<1?0:a,new mt(a,l,u,e.opacity)}function OV(e,t,n,o){return arguments.length===1?uv(e):new mt(e,t,n,o??1)}function mt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Au(mt,OV,lv(ei,{brighter(e){return e=e==null?da:Math.pow(da,e),new mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rr:Math.pow(Rr,e),new mt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Ke(Ms(e>=240?e-240:e+120,r,o),Ms(e,r,o),Ms(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new mt(af(this.h),yi(this.s),yi(this.l),fa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fa(this.opacity);return`${e===1?"hsl(":"hsla("}${af(this.h)}, ${yi(this.s)*100}%, ${yi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function af(e){return e=(e||0)%360,e<0?e+360:e}function yi(e){return Math.max(0,Math.min(1,e||0))}function Ms(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Iu=e=>()=>e;function TV(e,t){return function(n){return e+n*t}}function $V(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function PV(e){return(e=+e)==1?cv:function(t,n){return n-t?$V(t,n,e):Iu(isNaN(t)?n:t)}}function cv(e,t){var n=t-e;return n?TV(e,n):Iu(isNaN(e)?t:e)}const ha=(function e(t){var n=PV(t);function o(r,i){var a=n((r=gl(r)).r,(i=gl(i)).r),l=n(r.g,i.g),u=n(r.b,i.b),c=cv(r.opacity,i.opacity);return function(d){return r.r=a(d),r.g=l(d),r.b=u(d),r.opacity=c(d),r+""}}return o.gamma=e,o})(1);function BV(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function YV(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function AV(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=_r(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(l){for(a=0;a<o;++a)i[a]=r[a](l);return i}}function IV(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Mt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function VV(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=_r(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var yl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ns=new RegExp(yl.source,"g");function RV(e){return function(){return e}}function zV(e){return function(t){return e(t)+""}}function dv(e,t){var n=yl.lastIndex=Ns.lastIndex=0,o,r,i,a=-1,l=[],u=[];for(e=e+"",t=t+"";(o=yl.exec(e))&&(r=Ns.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),l[a]?l[a]+=i:l[++a]=i),(o=o[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,u.push({i:a,x:Mt(o,r)})),n=Ns.lastIndex;return n<t.length&&(i=t.slice(n),l[a]?l[a]+=i:l[++a]=i),l.length<2?u[0]?zV(u[0].x):RV(t):(t=u.length,function(c){for(var d=0,f;d<t;++d)l[(f=u[d]).i]=f.x(c);return l.join("")})}function _r(e,t){var n=typeof t,o;return t==null||n==="boolean"?Iu(t):(n==="number"?Mt:n==="string"?(o=Qn(t))?(t=o,ha):dv:t instanceof Qn?ha:t instanceof Date?IV:YV(t)?BV:Array.isArray(t)?AV:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?VV:Mt)(e,t)}var sf=180/Math.PI,wl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fv(e,t,n,o,r,i){var a,l,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,u/=l),e*o<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*sf,skewX:Math.atan(u)*sf,scaleX:a,scaleY:l}}var wi;function LV(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?wl:fv(t.a,t.b,t.c,t.d,t.e,t.f)}function FV(e){return e==null||(wi||(wi=document.createElementNS("http://www.w3.org/2000/svg","g")),wi.setAttribute("transform",e),!(e=wi.transform.baseVal.consolidate()))?wl:(e=e.matrix,fv(e.a,e.b,e.c,e.d,e.e,e.f))}function hv(e,t,n,o){function r(c){return c.length?c.pop()+" ":""}function i(c,d,f,h,p,m){if(c!==f||d!==h){var v=p.push("translate(",null,t,null,n);m.push({i:v-4,x:Mt(c,f)},{i:v-2,x:Mt(d,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function a(c,d,f,h){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),h.push({i:f.push(r(f)+"rotate(",null,o)-2,x:Mt(c,d)})):d&&f.push(r(f)+"rotate("+d+o)}function l(c,d,f,h){c!==d?h.push({i:f.push(r(f)+"skewX(",null,o)-2,x:Mt(c,d)}):d&&f.push(r(f)+"skewX("+d+o)}function u(c,d,f,h,p,m){if(c!==f||d!==h){var v=p.push(r(p)+"scale(",null,",",null,")");m.push({i:v-4,x:Mt(c,f)},{i:v-2,x:Mt(d,h)})}else(f!==1||h!==1)&&p.push(r(p)+"scale("+f+","+h+")")}return function(c,d){var f=[],h=[];return c=e(c),d=e(d),i(c.translateX,c.translateY,d.translateX,d.translateY,f,h),a(c.rotate,d.rotate,f,h),l(c.skewX,d.skewX,f,h),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,h),c=d=null,function(p){for(var m=-1,v=h.length,w;++m<v;)f[(w=h[m]).i]=w.x(p);return f.join("")}}}var HV=hv(LV,"px, ","px)","deg)"),jV=hv(FV,", ",")",")"),WV=1e-12;function lf(e){return((e=Math.exp(e))+1/e)/2}function UV(e){return((e=Math.exp(e))-1/e)/2}function GV(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ii=(function e(t,n,o){function r(i,a){var l=i[0],u=i[1],c=i[2],d=a[0],f=a[1],h=a[2],p=d-l,m=f-u,v=p*p+m*m,w,g;if(v<WV)g=Math.log(h/c)/t,w=function($){return[l+$*p,u+$*m,c*Math.exp(t*$*g)]};else{var b=Math.sqrt(v),y=(h*h-c*c+o*v)/(2*c*n*b),_=(h*h-c*c-o*v)/(2*h*n*b),O=Math.log(Math.sqrt(y*y+1)-y),B=Math.log(Math.sqrt(_*_+1)-_);g=(B-O)/t,w=function($){var C=$*g,V=lf(O),L=c/(n*b)*(V*GV(t*C+O)-UV(O));return[l+L*p,u+L*m,c*V/lf(t*C+O)]}}return w.duration=g*1e3*t/Math.SQRT2,w}return r.rho=function(i){var a=Math.max(.001,+i),l=a*a,u=l*l;return e(a,l,u)},r})(Math.SQRT2,2,4);var Ao=0,cr=0,ar=0,pv=1e3,pa,dr,ma=0,eo=0,Xa=0,Lr=typeof performance=="object"&&performance.now?performance:Date,mv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Vu(){return eo||(mv(ZV),eo=Lr.now()+Xa)}function ZV(){eo=0}function va(){this._call=this._time=this._next=null}va.prototype=vv.prototype={constructor:va,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Vu():+n)+(t==null?0:+t),!this._next&&dr!==this&&(dr?dr._next=this:pa=this,dr=this),this._call=e,this._time=n,bl()},stop:function(){this._call&&(this._call=null,this._time=1/0,bl())}};function vv(e,t,n){var o=new va;return o.restart(e,t,n),o}function XV(){Vu(),++Ao;for(var e=pa,t;e;)(t=eo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ao}function uf(){eo=(ma=Lr.now())+Xa,Ao=cr=0;try{XV()}finally{Ao=0,KV(),eo=0}}function qV(){var e=Lr.now(),t=e-ma;t>pv&&(Xa-=t,ma=e)}function KV(){for(var e,t=pa,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:pa=n);dr=e,bl(o)}function bl(e){if(!Ao){cr&&(cr=clearTimeout(cr));var t=e-eo;t>24?(e<1/0&&(cr=setTimeout(uf,e-Lr.now()-Xa)),ar&&(ar=clearInterval(ar))):(ar||(ma=Lr.now(),ar=setInterval(qV,pv)),Ao=1,mv(uf))}}function cf(e,t,n){var o=new va;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var JV=Ga("start","end","cancel","interrupt"),QV=[],gv=0,df=1,_l=2,Vi=3,ff=4,kl=5,Ri=6;function qa(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;e3(e,n,{name:t,index:o,group:r,on:JV,tween:QV,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:gv})}function Ru(e,t){var n=Et(e,t);if(n.state>gv)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=Et(e,t);if(n.state>Vi)throw new Error("too late; already running");return n}function Et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function e3(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=vv(i,0,n.time);function i(c){n.state=df,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var d,f,h,p;if(n.state!==df)return u();for(d in o)if(p=o[d],p.name===n.name){if(p.state===Vi)return cf(a);p.state===ff?(p.state=Ri,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[d]):+d<t&&(p.state=Ri,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[d])}if(cf(function(){n.state===Vi&&(n.state=ff,n.timer.restart(l,n.delay,n.time),l(c))}),n.state=_l,n.on.call("start",e,e.__data__,n.index,n.group),n.state===_l){for(n.state=Vi,r=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(p=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(r[++f]=p);r.length=f+1}}function l(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=kl,1),f=-1,h=r.length;++f<h;)r[f].call(e,d);n.state===kl&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Ri,n.timer.stop(),delete o[t];for(var c in o)return;delete e.__transition}}function zi(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>_l&&o.state<kl,o.state=Ri,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function t3(e){return this.each(function(){zi(this,e)})}function n3(e,t){var n,o;return function(){var r=Ut(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,l=o.length;a<l;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function o3(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Ut(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var l={name:t,value:n},u=0,c=r.length;u<c;++u)if(r[u].name===t){r[u]=l;break}u===c&&r.push(l)}i.tween=r}}function r3(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Et(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?n3:o3)(n,e,t))}function zu(e,t,n){var o=e._id;return e.each(function(){var r=Ut(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Et(r,o).value[t]}}function yv(e,t){var n;return(typeof t=="number"?Mt:t instanceof Qn?ha:(n=Qn(t))?(t=n,ha):dv)(e,t)}function i3(e){return function(){this.removeAttribute(e)}}function a3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function s3(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function l3(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function u3(e,t,n){var o,r,i;return function(){var a,l=n(this),u;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=l+"",a===u?null:a===o&&u===r?i:(r=u,i=t(o=a,l)))}}function c3(e,t,n){var o,r,i;return function(){var a,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=l+"",a===u?null:a===o&&u===r?i:(r=u,i=t(o=a,l)))}}function d3(e,t){var n=Za(e),o=n==="transform"?jV:yv;return this.attrTween(e,typeof t=="function"?(n.local?c3:u3)(n,o,zu(this,"attr."+e,t)):t==null?(n.local?a3:i3)(n):(n.local?l3:s3)(n,o,t))}function f3(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function h3(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function p3(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&h3(e,i)),n}return r._value=t,r}function m3(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&f3(e,i)),n}return r._value=t,r}function v3(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Za(e);return this.tween(n,(o.local?p3:m3)(o,t))}function g3(e,t){return function(){Ru(this,e).delay=+t.apply(this,arguments)}}function y3(e,t){return t=+t,function(){Ru(this,e).delay=t}}function w3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?g3:y3)(t,e)):Et(this.node(),t).delay}function b3(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function _3(e,t){return t=+t,function(){Ut(this,e).duration=t}}function k3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?b3:_3)(t,e)):Et(this.node(),t).duration}function x3(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function E3(e){var t=this._id;return arguments.length?this.each(x3(t,e)):Et(this.node(),t).ease}function S3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function D3(e){if(typeof e!="function")throw new Error;return this.each(S3(this._id,e))}function M3(e){typeof e!="function"&&(e=qm(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,l=o[r]=[],u,c=0;c<a;++c)(u=i[c])&&e.call(u,u.__data__,c,i)&&l.push(u);return new cn(o,this._parents,this._name,this._id)}function N3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),l=0;l<i;++l)for(var u=t[l],c=n[l],d=u.length,f=a[l]=new Array(d),h,p=0;p<d;++p)(h=u[p]||c[p])&&(f[p]=h);for(;l<o;++l)a[l]=t[l];return new cn(a,this._parents,this._name,this._id)}function C3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function O3(e,t,n){var o,r,i=C3(t)?Ru:Ut;return function(){var a=i(this,e),l=a.on;l!==o&&(r=(o=l).copy()).on(t,n),a.on=r}}function T3(e,t){var n=this._id;return arguments.length<2?Et(this.node(),n).on.on(e):this.each(O3(n,e,t))}function $3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function P3(){return this.on("end.remove",$3(this._id))}function B3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Bu(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var l=o[a],u=l.length,c=i[a]=new Array(u),d,f,h=0;h<u;++h)(d=l[h])&&(f=e.call(d,d.__data__,h,l))&&("__data__"in d&&(f.__data__=d.__data__),c[h]=f,qa(c[h],t,n,h,c,Et(d,n)));return new cn(i,this._parents,t,n)}function Y3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xm(e));for(var o=this._groups,r=o.length,i=[],a=[],l=0;l<r;++l)for(var u=o[l],c=u.length,d,f=0;f<c;++f)if(d=u[f]){for(var h=e.call(d,d.__data__,f,u),p,m=Et(d,n),v=0,w=h.length;v<w;++v)(p=h[v])&&qa(p,t,n,v,h,m);i.push(h),a.push(d)}return new cn(i,a,t,n)}var A3=Qr.prototype.constructor;function I3(){return new A3(this._groups,this._parents)}function V3(e,t){var n,o,r;return function(){var i=Yo(this,e),a=(this.style.removeProperty(e),Yo(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function wv(e){return function(){this.style.removeProperty(e)}}function R3(e,t,n){var o,r=n+"",i;return function(){var a=Yo(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function z3(e,t,n){var o,r,i;return function(){var a=Yo(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Yo(this,e))),a===u?null:a===o&&u===r?i:(r=u,i=t(o=a,l))}}function L3(e,t){var n,o,r,i="style."+t,a="end."+i,l;return function(){var u=Ut(this,e),c=u.on,d=u.value[i]==null?l||(l=wv(t)):void 0;(c!==n||r!==d)&&(o=(n=c).copy()).on(a,r=d),u.on=o}}function F3(e,t,n){var o=(e+="")=="transform"?HV:yv;return t==null?this.styleTween(e,V3(e,o)).on("end.style."+e,wv(e)):typeof t=="function"?this.styleTween(e,z3(e,o,zu(this,"style."+e,t))).each(L3(this._id,e)):this.styleTween(e,R3(e,o,t),n).on("end.style."+e,null)}function H3(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function j3(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&H3(e,a,n)),o}return i._value=t,i}function W3(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,j3(e,t,n??""))}function U3(e){return function(){this.textContent=e}}function G3(e){return function(){var t=e(this);this.textContent=t??""}}function Z3(e){return this.tween("text",typeof e=="function"?G3(zu(this,"text",e)):U3(e==null?"":e+""))}function X3(e){return function(t){this.textContent=e.call(this,t)}}function q3(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&X3(r)),t}return o._value=e,o}function K3(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,q3(e))}function J3(){for(var e=this._name,t=this._id,n=bv(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,u,c=0;c<l;++c)if(u=a[c]){var d=Et(u,t);qa(u,e,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new cn(o,this._parents,e,n)}function Q3(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var l={value:a},u={value:function(){--r===0&&i()}};n.each(function(){var c=Ut(this,o),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),c.on=t}),r===0&&i()})}var eR=0;function cn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function bv(){return++eR}var Zt=Qr.prototype;cn.prototype={constructor:cn,select:B3,selectAll:Y3,selectChild:Zt.selectChild,selectChildren:Zt.selectChildren,filter:M3,merge:N3,selection:I3,transition:J3,call:Zt.call,nodes:Zt.nodes,node:Zt.node,size:Zt.size,empty:Zt.empty,each:Zt.each,on:T3,attr:d3,attrTween:v3,style:F3,styleTween:W3,text:Z3,textTween:K3,remove:P3,tween:r3,delay:w3,duration:k3,ease:E3,easeVarying:D3,end:Q3,[Symbol.iterator]:Zt[Symbol.iterator]};function tR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nR={time:null,delay:0,duration:250,ease:tR};function oR(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function rR(e){var t,n;e instanceof cn?(t=e._id,e=e._name):(t=bv(),(n=nR).time=Vu(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],l=a.length,u,c=0;c<l;++c)(u=a[c])&&qa(u,e,t,c,a,n||oR(u,t));return new cn(o,this._parents,e,t)}Qr.prototype.interrupt=t3;Qr.prototype.transition=rR;const bi=e=>()=>e;function iR(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function tn(e,t,n){this.k=e,this.x=t,this.y=n}tn.prototype={constructor:tn,scale:function(e){return e===1?this:new tn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Io=new tn(1,0,0);tn.prototype;function Cs(e){e.stopImmediatePropagation()}function sr(e){e.preventDefault(),e.stopImmediatePropagation()}function aR(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function sR(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function hf(){return this.__zoom||Io}function lR(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function uR(){return navigator.maxTouchPoints||"ontouchstart"in this}function cR(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function dR(){var e=aR,t=sR,n=cR,o=lR,r=uR,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Ii,c=Ga("start","zoom","end"),d,f,h,p=500,m=150,v=0,w=10;function g(k){k.property("__zoom",hf).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",L).filter(r).on("touchstart.zoom",I).on("touchmove.zoom",x).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(k,N,D,z){var F=k.selection?k.selection():k;F.property("__zoom",hf),k!==F?O(k,N,D,z):F.interrupt().each(function(){B(this,arguments).event(z).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},g.scaleBy=function(k,N,D,z){g.scaleTo(k,function(){var F=this.__zoom.k,j=typeof N=="function"?N.apply(this,arguments):N;return F*j},D,z)},g.scaleTo=function(k,N,D,z){g.transform(k,function(){var F=t.apply(this,arguments),j=this.__zoom,Y=D==null?_(F):typeof D=="function"?D.apply(this,arguments):D,G=j.invert(Y),W=typeof N=="function"?N.apply(this,arguments):N;return n(y(b(j,W),Y,G),F,a)},D,z)},g.translateBy=function(k,N,D,z){g.transform(k,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),a)},null,z)},g.translateTo=function(k,N,D,z,F){g.transform(k,function(){var j=t.apply(this,arguments),Y=this.__zoom,G=z==null?_(j):typeof z=="function"?z.apply(this,arguments):z;return n(Io.translate(G[0],G[1]).scale(Y.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof D=="function"?-D.apply(this,arguments):-D),j,a)},z,F)};function b(k,N){return N=Math.max(i[0],Math.min(i[1],N)),N===k.k?k:new tn(N,k.x,k.y)}function y(k,N,D){var z=N[0]-D[0]*k.k,F=N[1]-D[1]*k.k;return z===k.x&&F===k.y?k:new tn(k.k,z,F)}function _(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function O(k,N,D,z){k.on("start.zoom",function(){B(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(z).end()}).tween("zoom",function(){var F=this,j=arguments,Y=B(F,j).event(z),G=t.apply(F,j),W=D==null?_(G):typeof D=="function"?D.apply(F,j):D,le=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),re=F.__zoom,X=typeof N=="function"?N.apply(F,j):N,q=u(re.invert(W).concat(le/re.k),X.invert(W).concat(le/X.k));return function(J){if(J===1)J=X;else{var pe=q(J),we=le/pe[2];J=new tn(we,W[0]-pe[0]*we,W[1]-pe[1]*we)}Y.zoom(null,J)}})}function B(k,N,D){return!D&&k.__zooming||new $(k,N)}function $(k,N){this.that=k,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,N),this.taps=0}$.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,N){return this.mouse&&k!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var N=pt(this.that).datum();c.call(k,this.that,new iR(k,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:c}),N)}};function C(k,...N){if(!e.apply(this,arguments))return;var D=B(this,N).event(k),z=this.__zoom,F=Math.max(i[0],Math.min(i[1],z.k*Math.pow(2,o.apply(this,arguments)))),j=Dt(k);if(D.wheel)(D.mouse[0][0]!==j[0]||D.mouse[0][1]!==j[1])&&(D.mouse[1]=z.invert(D.mouse[0]=j)),clearTimeout(D.wheel);else{if(z.k===F)return;D.mouse=[j,z.invert(j)],zi(this),D.start()}sr(k),D.wheel=setTimeout(Y,m),D.zoom("mouse",n(y(b(z,F),D.mouse[0],D.mouse[1]),D.extent,a));function Y(){D.wheel=null,D.end()}}function V(k,...N){if(h||!e.apply(this,arguments))return;var D=k.currentTarget,z=B(this,N,!0).event(k),F=pt(k.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",le,!0),j=Dt(k,D),Y=k.clientX,G=k.clientY;av(k.view),Cs(k),z.mouse=[j,this.__zoom.invert(j)],zi(this),z.start();function W(re){if(sr(re),!z.moved){var X=re.clientX-Y,q=re.clientY-G;z.moved=X*X+q*q>v}z.event(re).zoom("mouse",n(y(z.that.__zoom,z.mouse[0]=Dt(re,D),z.mouse[1]),z.extent,a))}function le(re){F.on("mousemove.zoom mouseup.zoom",null),sv(re.view,z.moved),sr(re),z.event(re).end()}}function L(k,...N){if(e.apply(this,arguments)){var D=this.__zoom,z=Dt(k.changedTouches?k.changedTouches[0]:k,this),F=D.invert(z),j=D.k*(k.shiftKey?.5:2),Y=n(y(b(D,j),z,F),t.apply(this,N),a);sr(k),l>0?pt(this).transition().duration(l).call(O,Y,z,k):pt(this).call(g.transform,Y,z,k)}}function I(k,...N){if(e.apply(this,arguments)){var D=k.touches,z=D.length,F=B(this,N,k.changedTouches.length===z).event(k),j,Y,G,W;for(Cs(k),Y=0;Y<z;++Y)G=D[Y],W=Dt(G,this),W=[W,this.__zoom.invert(W),G.identifier],F.touch0?!F.touch1&&F.touch0[2]!==W[2]&&(F.touch1=W,F.taps=0):(F.touch0=W,j=!0,F.taps=1+!!d);d&&(d=clearTimeout(d)),j&&(F.taps<2&&(f=W[0],d=setTimeout(function(){d=null},p)),zi(this),F.start())}}function x(k,...N){if(this.__zooming){var D=B(this,N).event(k),z=k.changedTouches,F=z.length,j,Y,G,W;for(sr(k),j=0;j<F;++j)Y=z[j],G=Dt(Y,this),D.touch0&&D.touch0[2]===Y.identifier?D.touch0[0]=G:D.touch1&&D.touch1[2]===Y.identifier&&(D.touch1[0]=G);if(Y=D.that.__zoom,D.touch1){var le=D.touch0[0],re=D.touch0[1],X=D.touch1[0],q=D.touch1[1],J=(J=X[0]-le[0])*J+(J=X[1]-le[1])*J,pe=(pe=q[0]-re[0])*pe+(pe=q[1]-re[1])*pe;Y=b(Y,Math.sqrt(J/pe)),G=[(le[0]+X[0])/2,(le[1]+X[1])/2],W=[(re[0]+q[0])/2,(re[1]+q[1])/2]}else if(D.touch0)G=D.touch0[0],W=D.touch0[1];else return;D.zoom("touch",n(y(Y,G,W),D.extent,a))}}function R(k,...N){if(this.__zooming){var D=B(this,N).event(k),z=k.changedTouches,F=z.length,j,Y;for(Cs(k),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),j=0;j<F;++j)Y=z[j],D.touch0&&D.touch0[2]===Y.identifier?delete D.touch0:D.touch1&&D.touch1[2]===Y.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(Y=Dt(Y,this),Math.hypot(f[0]-Y[0],f[1]-Y[1])<w)){var G=pt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return g.wheelDelta=function(k){return arguments.length?(o=typeof k=="function"?k:bi(+k),g):o},g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:bi(!!k),g):e},g.touchable=function(k){return arguments.length?(r=typeof k=="function"?k:bi(!!k),g):r},g.extent=function(k){return arguments.length?(t=typeof k=="function"?k:bi([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),g):t},g.scaleExtent=function(k){return arguments.length?(i[0]=+k[0],i[1]=+k[1],g):[i[0],i[1]]},g.translateExtent=function(k){return arguments.length?(a[0][0]=+k[0][0],a[1][0]=+k[1][0],a[0][1]=+k[0][1],a[1][1]=+k[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(k){return arguments.length?(n=k,g):n},g.duration=function(k){return arguments.length?(l=+k,g):l},g.interpolate=function(k){return arguments.length?(u=k,g):u},g.on=function(){var k=c.on.apply(c,arguments);return k===c?g:k},g.clickDistance=function(k){return arguments.length?(v=(k=+k)*k,g):Math.sqrt(v)},g.tapDistance=function(k){return arguments.length?(w=+k,g):w},g}var se=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(se||{}),Lu=(e=>(e.Partial="partial",e.Full="full",e))(Lu||{}),zn=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(zn||{}),$n=(e=>(e.Strict="strict",e.Loose="loose",e))($n||{}),ga=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(ga||{}),kr=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(kr||{}),_v=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(_v||{});const fR=["INPUT","SELECT","TEXTAREA"],hR=typeof document<"u"?document:null;function xl(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,r=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,i=typeof o?.closest=="function"?o.closest(".nokey"):null;return fR.includes(o?.nodeName)||r||!!i}function pR(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function pf(e,t,n,o){const r=t.replace("+",`
|
|
4
|
+
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Zd={};function am(e,t){oe.deprecationHandler!=null&&oe.deprecationHandler(e,t),Zd[e]||(im(t),Zd[e]=!0)}oe.suppressDeprecationWarnings=!1;oe.deprecationHandler=null;function qt(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function IO(e){var t,n;for(n in e)Se(e,n)&&(t=e[n],qt(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function hl(e,t){var n=Vn({},e),o;for(o in t)Se(t,o)&&(Qn(e[o])&&Qn(t[o])?(n[o]={},Vn(n[o],e[o]),Vn(n[o],t[o])):t[o]!=null?n[o]=t[o]:delete n[o]);for(o in e)Se(e,o)&&!Se(t,o)&&Qn(e[o])&&(n[o]=Vn({},n[o]));return n}function bu(e){e!=null&&this.set(e)}var pl;Object.keys?pl=Object.keys:pl=function(e){var t,n=[];for(t in e)Se(e,t)&&n.push(t);return n};var zO={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function RO(e,t,n){var o=this._calendar[e]||this._calendar.sameElse;return qt(o)?o.call(t,n):o}function Wt(e,t,n){var o=""+Math.abs(e),i=t-o.length,a=e>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var _u=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,wi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ds={},Do={};function me(e,t,n,o){var i=o;typeof o=="string"&&(i=function(){return this[o]()}),e&&(Do[e]=i),t&&(Do[t[0]]=function(){return Wt(i.apply(this,arguments),t[1],t[2])}),n&&(Do[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function LO(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function FO(e){var t=e.match(_u),n,o;for(n=0,o=t.length;n<o;n++)Do[t[n]]?t[n]=Do[t[n]]:t[n]=LO(t[n]);return function(i){var a="",s;for(s=0;s<o;s++)a+=qt(t[s])?t[s].call(i,e):t[s];return a}}function Ii(e,t){return e.isValid()?(t=sm(t,e.localeData()),Ds[t]=Ds[t]||FO(t),Ds[t](e)):e.localeData().invalidDate()}function sm(e,t){var n=5;function o(i){return t.longDateFormat(i)||i}for(wi.lastIndex=0;n>=0&&wi.test(e);)e=e.replace(wi,o),wi.lastIndex=0,n-=1;return e}var HO={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function jO(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(_u).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[e])}var WO="Invalid date";function UO(){return this._invalidDate}var GO="%d",ZO=/\d{1,2}/;function qO(e){return this._ordinal.replace("%d",e)}var XO={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function KO(e,t,n,o){var i=this._relativeTime[n];return qt(i)?i(e,t,n,o):i.replace(/%d/i,e)}function JO(e,t){var n=this._relativeTime[e>0?"future":"past"];return qt(n)?n(t):n.replace(/%s/i,t)}var qd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function yt(e){return typeof e=="string"?qd[e]||qd[e.toLowerCase()]:void 0}function xu(e){var t={},n,o;for(o in e)Se(e,o)&&(n=yt(o),n&&(t[n]=e[o]));return t}var QO={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function e$(e){var t=[],n;for(n in e)Se(e,n)&&t.push({unit:n,priority:QO[n]});return t.sort(function(o,i){return o.priority-i.priority}),t}var lm=/\d/,lt=/\d\d/,um=/\d{3}/,ku=/\d{4}/,La=/[+-]?\d{6}/,Pe=/\d\d?/,cm=/\d\d\d\d?/,dm=/\d\d\d\d\d\d?/,Fa=/\d{1,3}/,Nu=/\d{1,4}/,Ha=/[+-]?\d{1,6}/,Qo=/\d+/,ja=/[+-]?\d+/,t$=/Z|[+-]\d\d:?\d\d/gi,Wa=/Z|[+-]\d\d(?::?\d\d)?/gi,n$=/[+-]?\d+(\.\d{1,3})?/,ri=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,er=/^[1-9]\d?/,Eu=/^([1-9]\d|\d)/,ua;ua={};function ae(e,t,n){ua[e]=qt(t)?t:function(o,i){return o&&n?n:t}}function o$(e,t){return Se(ua,e)?ua[e](t._strict,t._locale):new RegExp(r$(e))}function r$(e){return un(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,o,i,a){return n||o||i||a}))}function un(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ut(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ne(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ut(t)),n}var ml={};function Te(e,t){var n,o=t,i;for(typeof e=="string"&&(e=[e]),pn(t)&&(o=function(a,s){s[t]=Ne(a)}),i=e.length,n=0;n<i;n++)ml[e[n]]=o}function ii(e,t){Te(e,function(n,o,i,a){i._w=i._w||{},t(n,i._w,i,a)})}function i$(e,t,n){t!=null&&Se(ml,e)&&ml[e](t,n._a,n,e)}function Ua(e){return e%4===0&&e%100!==0||e%400===0}var Ze=0,rn=1,Bt=2,Fe=3,xt=4,an=5,qn=6,a$=7,s$=8;me("Y",0,0,function(){var e=this.year();return e<=9999?Wt(e,4):"+"+e});me(0,["YY",2],0,function(){return this.year()%100});me(0,["YYYY",4],0,"year");me(0,["YYYYY",5],0,"year");me(0,["YYYYYY",6,!0],0,"year");ae("Y",ja);ae("YY",Pe,lt);ae("YYYY",Nu,ku);ae("YYYYY",Ha,La);ae("YYYYYY",Ha,La);Te(["YYYYY","YYYYYY"],Ze);Te("YYYY",function(e,t){t[Ze]=e.length===2?oe.parseTwoDigitYear(e):Ne(e)});Te("YY",function(e,t){t[Ze]=oe.parseTwoDigitYear(e)});Te("Y",function(e,t){t[Ze]=parseInt(e,10)});function Sr(e){return Ua(e)?366:365}oe.parseTwoDigitYear=function(e){return Ne(e)+(Ne(e)>68?1900:2e3)};var fm=tr("FullYear",!0);function l$(){return Ua(this.year())}function tr(e,t){return function(n){return n!=null?(hm(this,e,n),oe.updateOffset(this,t),this):Rr(this,e)}}function Rr(e,t){if(!e.isValid())return NaN;var n=e._d,o=e._isUTC;switch(t){case"Milliseconds":return o?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return o?n.getUTCSeconds():n.getSeconds();case"Minutes":return o?n.getUTCMinutes():n.getMinutes();case"Hours":return o?n.getUTCHours():n.getHours();case"Date":return o?n.getUTCDate():n.getDate();case"Day":return o?n.getUTCDay():n.getDay();case"Month":return o?n.getUTCMonth():n.getMonth();case"FullYear":return o?n.getUTCFullYear():n.getFullYear();default:return NaN}}function hm(e,t,n){var o,i,a,s,l;if(!(!e.isValid()||isNaN(n))){switch(o=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?o.setUTCMilliseconds(n):o.setMilliseconds(n));case"Seconds":return void(i?o.setUTCSeconds(n):o.setSeconds(n));case"Minutes":return void(i?o.setUTCMinutes(n):o.setMinutes(n));case"Hours":return void(i?o.setUTCHours(n):o.setHours(n));case"Date":return void(i?o.setUTCDate(n):o.setDate(n));case"FullYear":break;default:return}a=n,s=e.month(),l=e.date(),l=l===29&&s===1&&!Ua(a)?28:l,i?o.setUTCFullYear(a,s,l):o.setFullYear(a,s,l)}}function u$(e){return e=yt(e),qt(this[e])?this[e]():this}function c$(e,t){if(typeof e=="object"){e=xu(e);var n=e$(e),o,i=n.length;for(o=0;o<i;o++)this[n[o].unit](e[n[o].unit])}else if(e=yt(e),qt(this[e]))return this[e](t);return this}function d$(e,t){return(e%t+t)%t}var ze;Array.prototype.indexOf?ze=Array.prototype.indexOf:ze=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Cu(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=d$(t,12);return e+=(t-n)/12,n===1?Ua(e)?29:28:31-n%7%2}me("M",["MM",2],"Mo",function(){return this.month()+1});me("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});me("MMMM",0,0,function(e){return this.localeData().months(this,e)});ae("M",Pe,er);ae("MM",Pe,lt);ae("MMM",function(e,t){return t.monthsShortRegex(e)});ae("MMMM",function(e,t){return t.monthsRegex(e)});Te(["M","MM"],function(e,t){t[rn]=Ne(e)-1});Te(["MMM","MMMM"],function(e,t,n,o){var i=n._locale.monthsParse(e,o,n._strict);i!=null?t[rn]=i:be(n).invalidMonth=e});var f$="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pm="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mm=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,h$=ri,p$=ri;function m$(e,t){return e?Et(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||mm).test(t)?"format":"standalone"][e.month()]:Et(this._months)?this._months:this._months.standalone}function v$(e,t){return e?Et(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[mm.test(t)?"format":"standalone"][e.month()]:Et(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function g$(e,t,n){var o,i,a,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)a=Zt([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(a,"").toLocaleLowerCase();return n?t==="MMM"?(i=ze.call(this._shortMonthsParse,s),i!==-1?i:null):(i=ze.call(this._longMonthsParse,s),i!==-1?i:null):t==="MMM"?(i=ze.call(this._shortMonthsParse,s),i!==-1?i:(i=ze.call(this._longMonthsParse,s),i!==-1?i:null)):(i=ze.call(this._longMonthsParse,s),i!==-1?i:(i=ze.call(this._shortMonthsParse,s),i!==-1?i:null))}function y$(e,t,n){var o,i,a;if(this._monthsParseExact)return g$.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++)if(i=Zt([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[o]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(a.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[o].test(e)||n&&t==="MMM"&&this._shortMonthsParse[o].test(e)||!n&&this._monthsParse[o].test(e))return o}function vm(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ne(t);else if(t=e.localeData().monthsParse(t),!pn(t))return e}var n=t,o=e.date();return o=o<29?o:Math.min(o,Cu(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,o):e._d.setMonth(n,o),e}function gm(e){return e!=null?(vm(this,e),oe.updateOffset(this,!0),this):Rr(this,"Month")}function w$(){return Cu(this.year(),this.month())}function b$(e){return this._monthsParseExact?(Se(this,"_monthsRegex")||ym.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Se(this,"_monthsShortRegex")||(this._monthsShortRegex=h$),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function _$(e){return this._monthsParseExact?(Se(this,"_monthsRegex")||ym.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Se(this,"_monthsRegex")||(this._monthsRegex=p$),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ym(){function e(u,c){return c.length-u.length}var t=[],n=[],o=[],i,a,s,l;for(i=0;i<12;i++)a=Zt([2e3,i]),s=un(this.monthsShort(a,"")),l=un(this.months(a,"")),t.push(s),n.push(l),o.push(l),o.push(s);t.sort(e),n.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function x$(e,t,n,o,i,a,s){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,o,i,a,s),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,o,i,a,s),l}function Lr(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ca(e,t,n){var o=7+t-n,i=(7+Lr(e,0,o).getUTCDay()-t)%7;return-i+o-1}function wm(e,t,n,o,i){var a=(7+n-o)%7,s=ca(e,o,i),l=1+7*(t-1)+a+s,u,c;return l<=0?(u=e-1,c=Sr(u)+l):l>Sr(e)?(u=e+1,c=l-Sr(e)):(u=e,c=l),{year:u,dayOfYear:c}}function Fr(e,t,n){var o=ca(e.year(),t,n),i=Math.floor((e.dayOfYear()-o-1)/7)+1,a,s;return i<1?(s=e.year()-1,a=i+cn(s,t,n)):i>cn(e.year(),t,n)?(a=i-cn(e.year(),t,n),s=e.year()+1):(s=e.year(),a=i),{week:a,year:s}}function cn(e,t,n){var o=ca(e,t,n),i=ca(e+1,t,n);return(Sr(e)-o+i)/7}me("w",["ww",2],"wo","week");me("W",["WW",2],"Wo","isoWeek");ae("w",Pe,er);ae("ww",Pe,lt);ae("W",Pe,er);ae("WW",Pe,lt);ii(["w","ww","W","WW"],function(e,t,n,o){t[o.substr(0,1)]=Ne(e)});function k$(e){return Fr(e,this._week.dow,this._week.doy).week}var N$={dow:0,doy:6};function E$(){return this._week.dow}function C$(){return this._week.doy}function S$(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function D$(e){var t=Fr(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}me("d",0,"do","day");me("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});me("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});me("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});me("e",0,0,"weekday");me("E",0,0,"isoWeekday");ae("d",Pe);ae("e",Pe);ae("E",Pe);ae("dd",function(e,t){return t.weekdaysMinRegex(e)});ae("ddd",function(e,t){return t.weekdaysShortRegex(e)});ae("dddd",function(e,t){return t.weekdaysRegex(e)});ii(["dd","ddd","dddd"],function(e,t,n,o){var i=n._locale.weekdaysParse(e,o,n._strict);i!=null?t.d=i:be(n).invalidWeekday=e});ii(["d","e","E"],function(e,t,n,o){t[o]=Ne(e)});function M$(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function T$(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Su(e,t){return e.slice(t,7).concat(e.slice(0,t))}var V$="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bm="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),O$="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$$=ri,B$=ri,P$=ri;function A$(e,t){var n=Et(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Su(n,this._week.dow):e?n[e.day()]:n}function Y$(e){return e===!0?Su(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function I$(e){return e===!0?Su(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function z$(e,t,n){var o,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)a=Zt([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(a,"").toLocaleLowerCase();return n?t==="dddd"?(i=ze.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=ze.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=ze.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=ze.call(this._weekdaysParse,s),i!==-1||(i=ze.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=ze.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=ze.call(this._shortWeekdaysParse,s),i!==-1||(i=ze.call(this._weekdaysParse,s),i!==-1)?i:(i=ze.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=ze.call(this._minWeekdaysParse,s),i!==-1||(i=ze.call(this._weekdaysParse,s),i!==-1)?i:(i=ze.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function R$(e,t,n){var o,i,a;if(this._weekdaysParseExact)return z$.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++)if(i=Zt([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(a.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[o].test(e)||n&&t==="ddd"&&this._shortWeekdaysParse[o].test(e)||n&&t==="dd"&&this._minWeekdaysParse[o].test(e)||!n&&this._weekdaysParse[o].test(e))return o}function L$(e){if(!this.isValid())return e!=null?this:NaN;var t=Rr(this,"Day");return e!=null?(e=M$(e,this.localeData()),this.add(e-t,"d")):t}function F$(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function H$(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=T$(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function j$(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||Du.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Se(this,"_weekdaysRegex")||(this._weekdaysRegex=$$),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function W$(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||Du.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Se(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=B$),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function U$(e){return this._weekdaysParseExact?(Se(this,"_weekdaysRegex")||Du.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Se(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=P$),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Du(){function e(d,f){return f.length-d.length}var t=[],n=[],o=[],i=[],a,s,l,u,c;for(a=0;a<7;a++)s=Zt([2e3,1]).day(a),l=un(this.weekdaysMin(s,"")),u=un(this.weekdaysShort(s,"")),c=un(this.weekdays(s,"")),t.push(l),n.push(u),o.push(c),i.push(l),i.push(u),i.push(c);t.sort(e),n.sort(e),o.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Mu(){return this.hours()%12||12}function G$(){return this.hours()||24}me("H",["HH",2],0,"hour");me("h",["hh",2],0,Mu);me("k",["kk",2],0,G$);me("hmm",0,0,function(){return""+Mu.apply(this)+Wt(this.minutes(),2)});me("hmmss",0,0,function(){return""+Mu.apply(this)+Wt(this.minutes(),2)+Wt(this.seconds(),2)});me("Hmm",0,0,function(){return""+this.hours()+Wt(this.minutes(),2)});me("Hmmss",0,0,function(){return""+this.hours()+Wt(this.minutes(),2)+Wt(this.seconds(),2)});function _m(e,t){me(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}_m("a",!0);_m("A",!1);function xm(e,t){return t._meridiemParse}ae("a",xm);ae("A",xm);ae("H",Pe,Eu);ae("h",Pe,er);ae("k",Pe,er);ae("HH",Pe,lt);ae("hh",Pe,lt);ae("kk",Pe,lt);ae("hmm",cm);ae("hmmss",dm);ae("Hmm",cm);ae("Hmmss",dm);Te(["H","HH"],Fe);Te(["k","kk"],function(e,t,n){var o=Ne(e);t[Fe]=o===24?0:o});Te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Te(["h","hh"],function(e,t,n){t[Fe]=Ne(e),be(n).bigHour=!0});Te("hmm",function(e,t,n){var o=e.length-2;t[Fe]=Ne(e.substr(0,o)),t[xt]=Ne(e.substr(o)),be(n).bigHour=!0});Te("hmmss",function(e,t,n){var o=e.length-4,i=e.length-2;t[Fe]=Ne(e.substr(0,o)),t[xt]=Ne(e.substr(o,2)),t[an]=Ne(e.substr(i)),be(n).bigHour=!0});Te("Hmm",function(e,t,n){var o=e.length-2;t[Fe]=Ne(e.substr(0,o)),t[xt]=Ne(e.substr(o))});Te("Hmmss",function(e,t,n){var o=e.length-4,i=e.length-2;t[Fe]=Ne(e.substr(0,o)),t[xt]=Ne(e.substr(o,2)),t[an]=Ne(e.substr(i))});function Z$(e){return(e+"").toLowerCase().charAt(0)==="p"}var q$=/[ap]\.?m?\.?/i,X$=tr("Hours",!0);function K$(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var km={calendar:zO,longDateFormat:HO,invalidDate:WO,ordinal:GO,dayOfMonthOrdinalParse:ZO,relativeTime:XO,months:f$,monthsShort:pm,week:N$,weekdays:V$,weekdaysMin:O$,weekdaysShort:bm,meridiemParse:q$},Ye={},dr={},Hr;function J$(e,t){var n,o=Math.min(e.length,t.length);for(n=0;n<o;n+=1)if(e[n]!==t[n])return n;return o}function Xd(e){return e&&e.toLowerCase().replace("_","-")}function Q$(e){for(var t=0,n,o,i,a;t<e.length;){for(a=Xd(e[t]).split("-"),n=a.length,o=Xd(e[t+1]),o=o?o.split("-"):null;n>0;){if(i=Ga(a.slice(0,n).join("-")),i)return i;if(o&&o.length>=n&&J$(a,o)>=n-1)break;n--}t++}return Hr}function eB(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ga(e){var t=null,n;if(Ye[e]===void 0&&typeof module<"u"&&module&&module.exports&&eB(e))try{t=Hr._abbr,n=require,n("./locale/"+e),Pn(t)}catch{Ye[e]=null}return Ye[e]}function Pn(e,t){var n;return e&&(et(t)?n=yn(e):n=Tu(e,t),n?Hr=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Hr._abbr}function Tu(e,t){if(t!==null){var n,o=km;if(t.abbr=e,Ye[e]!=null)am("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=Ye[e]._config;else if(t.parentLocale!=null)if(Ye[t.parentLocale]!=null)o=Ye[t.parentLocale]._config;else if(n=Ga(t.parentLocale),n!=null)o=n._config;else return dr[t.parentLocale]||(dr[t.parentLocale]=[]),dr[t.parentLocale].push({name:e,config:t}),null;return Ye[e]=new bu(hl(o,t)),dr[e]&&dr[e].forEach(function(i){Tu(i.name,i.config)}),Pn(e),Ye[e]}else return delete Ye[e],null}function tB(e,t){if(t!=null){var n,o,i=km;Ye[e]!=null&&Ye[e].parentLocale!=null?Ye[e].set(hl(Ye[e]._config,t)):(o=Ga(e),o!=null&&(i=o._config),t=hl(i,t),o==null&&(t.abbr=e),n=new bu(t),n.parentLocale=Ye[e],Ye[e]=n),Pn(e)}else Ye[e]!=null&&(Ye[e].parentLocale!=null?(Ye[e]=Ye[e].parentLocale,e===Pn()&&Pn(e)):Ye[e]!=null&&delete Ye[e]);return Ye[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Hr;if(!Et(e)){if(t=Ga(e),t)return t;e=[e]}return Q$(e)}function nB(){return pl(Ye)}function Vu(e){var t,n=e._a;return n&&be(e).overflow===-2&&(t=n[rn]<0||n[rn]>11?rn:n[Bt]<1||n[Bt]>Cu(n[Ze],n[rn])?Bt:n[Fe]<0||n[Fe]>24||n[Fe]===24&&(n[xt]!==0||n[an]!==0||n[qn]!==0)?Fe:n[xt]<0||n[xt]>59?xt:n[an]<0||n[an]>59?an:n[qn]<0||n[qn]>999?qn:-1,be(e)._overflowDayOfYear&&(t<Ze||t>Bt)&&(t=Bt),be(e)._overflowWeeks&&t===-1&&(t=a$),be(e)._overflowWeekday&&t===-1&&(t=s$),be(e).overflow=t),e}var oB=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rB=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,iB=/Z|[+-]\d\d(?::?\d\d)?/,bi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ms=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aB=/^\/?Date\((-?\d+)/i,sB=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,lB={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nm(e){var t,n,o=e._i,i=oB.exec(o)||rB.exec(o),a,s,l,u,c=bi.length,d=Ms.length;if(i){for(be(e).iso=!0,t=0,n=c;t<n;t++)if(bi[t][1].exec(i[1])){s=bi[t][0],a=bi[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(i[3]){for(t=0,n=d;t<n;t++)if(Ms[t][1].exec(i[3])){l=(i[2]||" ")+Ms[t][0];break}if(l==null){e._isValid=!1;return}}if(!a&&l!=null){e._isValid=!1;return}if(i[4])if(iB.exec(i[4]))u="Z";else{e._isValid=!1;return}e._f=s+(l||"")+(u||""),$u(e)}else e._isValid=!1}function uB(e,t,n,o,i,a){var s=[cB(e),pm.indexOf(t),parseInt(n,10),parseInt(o,10),parseInt(i,10)];return a&&s.push(parseInt(a,10)),s}function cB(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function dB(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function fB(e,t,n){if(e){var o=bm.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(o!==i)return be(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function hB(e,t,n){if(e)return lB[e];if(t)return 0;var o=parseInt(n,10),i=o%100,a=(o-i)/100;return a*60+i}function Em(e){var t=sB.exec(dB(e._i)),n;if(t){if(n=uB(t[4],t[3],t[2],t[5],t[6],t[7]),!fB(t[1],n,e))return;e._a=n,e._tzm=hB(t[8],t[9],t[10]),e._d=Lr.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),be(e).rfc2822=!0}else e._isValid=!1}function pB(e){var t=aB.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Nm(e),e._isValid===!1)delete e._isValid;else return;if(Em(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:oe.createFromInputFallback(e)}oe.createFromInputFallback=gt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ko(e,t,n){return e??t??n}function mB(e){var t=new Date(oe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ou(e){var t,n,o=[],i,a,s;if(!e._d){for(i=mB(e),e._w&&e._a[Bt]==null&&e._a[rn]==null&&vB(e),e._dayOfYear!=null&&(s=ko(e._a[Ze],i[Ze]),(e._dayOfYear>Sr(s)||e._dayOfYear===0)&&(be(e)._overflowDayOfYear=!0),n=Lr(s,0,e._dayOfYear),e._a[rn]=n.getUTCMonth(),e._a[Bt]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Fe]===24&&e._a[xt]===0&&e._a[an]===0&&e._a[qn]===0&&(e._nextDay=!0,e._a[Fe]=0),e._d=(e._useUTC?Lr:x$).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Fe]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(be(e).weekdayMismatch=!0)}}function vB(e){var t,n,o,i,a,s,l,u,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,s=4,n=ko(t.GG,e._a[Ze],Fr(Be(),1,4).year),o=ko(t.W,1),i=ko(t.E,1),(i<1||i>7)&&(u=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,c=Fr(Be(),a,s),n=ko(t.gg,e._a[Ze],c.year),o=ko(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(u=!0)):t.e!=null?(i=t.e+a,(t.e<0||t.e>6)&&(u=!0)):i=a),o<1||o>cn(n,a,s)?be(e)._overflowWeeks=!0:u!=null?be(e)._overflowWeekday=!0:(l=wm(n,o,i,a,s),e._a[Ze]=l.year,e._dayOfYear=l.dayOfYear)}oe.ISO_8601=function(){};oe.RFC_2822=function(){};function $u(e){if(e._f===oe.ISO_8601){Nm(e);return}if(e._f===oe.RFC_2822){Em(e);return}e._a=[],be(e).empty=!0;var t=""+e._i,n,o,i,a,s,l=t.length,u=0,c,d;for(i=sm(e._f,e._locale).match(_u)||[],d=i.length,n=0;n<d;n++)a=i[n],o=(t.match(o$(a,e))||[])[0],o&&(s=t.substr(0,t.indexOf(o)),s.length>0&&be(e).unusedInput.push(s),t=t.slice(t.indexOf(o)+o.length),u+=o.length),Do[a]?(o?be(e).empty=!1:be(e).unusedTokens.push(a),i$(a,o,e)):e._strict&&!o&&be(e).unusedTokens.push(a);be(e).charsLeftOver=l-u,t.length>0&&be(e).unusedInput.push(t),e._a[Fe]<=12&&be(e).bigHour===!0&&e._a[Fe]>0&&(be(e).bigHour=void 0),be(e).parsedDateParts=e._a.slice(0),be(e).meridiem=e._meridiem,e._a[Fe]=gB(e._locale,e._a[Fe],e._meridiem),c=be(e).era,c!==null&&(e._a[Ze]=e._locale.erasConvertYear(c,e._a[Ze])),Ou(e),Vu(e)}function gB(e,t,n){var o;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(o=e.isPM(n),o&&t<12&&(t+=12),!o&&t===12&&(t=0)),t)}function yB(e){var t,n,o,i,a,s,l=!1,u=e._f.length;if(u===0){be(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<u;i++)a=0,s=!1,t=wu({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],$u(t),yu(t)&&(s=!0),a+=be(t).charsLeftOver,a+=be(t).unusedTokens.length*10,be(t).score=a,l?a<o&&(o=a,n=t):(o==null||a<o||s)&&(o=a,n=t,s&&(l=!0));Vn(e,n||t)}function wB(e){if(!e._d){var t=xu(e._i),n=t.day===void 0?t.date:t.day;e._a=rm([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(o){return o&&parseInt(o,10)}),Ou(e)}}function bB(e){var t=new oi(Vu(Cm(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Cm(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),t===null||n===void 0&&t===""?Ra({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Ct(t)?new oi(Vu(t)):(ni(t)?e._d=t:Et(n)?yB(e):n?$u(e):_B(e),yu(e)||(e._d=null),e))}function _B(e){var t=e._i;et(t)?e._d=new Date(oe.now()):ni(t)?e._d=new Date(t.valueOf()):typeof t=="string"?pB(e):Et(t)?(e._a=rm(t.slice(0),function(n){return parseInt(n,10)}),Ou(e)):Qn(t)?wB(e):pn(t)?e._d=new Date(t):oe.createFromInputFallback(e)}function Sm(e,t,n,o,i){var a={};return(t===!0||t===!1)&&(o=t,t=void 0),(n===!0||n===!1)&&(o=n,n=void 0),(Qn(e)&&gu(e)||Et(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=o,bB(a)}function Be(e,t,n,o){return Sm(e,t,n,o,!1)}var xB=gt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Be.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ra()}),kB=gt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Be.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ra()});function Dm(e,t){var n,o;if(t.length===1&&Et(t[0])&&(t=t[0]),!t.length)return Be();for(n=t[0],o=1;o<t.length;++o)(!t[o].isValid()||t[o][e](n))&&(n=t[o]);return n}function NB(){var e=[].slice.call(arguments,0);return Dm("isBefore",e)}function EB(){var e=[].slice.call(arguments,0);return Dm("isAfter",e)}var CB=function(){return Date.now?Date.now():+new Date},fr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function SB(e){var t,n=!1,o,i=fr.length;for(t in e)if(Se(e,t)&&!(ze.call(fr,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(o=0;o<i;++o)if(e[fr[o]]){if(n)return!1;parseFloat(e[fr[o]])!==Ne(e[fr[o]])&&(n=!0)}return!0}function DB(){return this._isValid}function MB(){return Mt(NaN)}function Za(e){var t=xu(e),n=t.year||0,o=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=SB(t),this._milliseconds=+d+c*1e3+u*6e4+l*1e3*60*60,this._days=+s+a*7,this._months=+i+o*3+n*12,this._data={},this._locale=yn(),this._bubble()}function zi(e){return e instanceof Za}function vl(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function TB(e,t,n){var o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,s;for(s=0;s<o;s++)Ne(e[s])!==Ne(t[s])&&a++;return a+i}function Mm(e,t){me(e,0,0,function(){var n=this.utcOffset(),o="+";return n<0&&(n=-n,o="-"),o+Wt(~~(n/60),2)+t+Wt(~~n%60,2)})}Mm("Z",":");Mm("ZZ","");ae("Z",Wa);ae("ZZ",Wa);Te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Bu(Wa,e)});var VB=/([\+\-]|\d\d)/gi;function Bu(e,t){var n=(t||"").match(e),o,i,a;return n===null?null:(o=n[n.length-1]||[],i=(o+"").match(VB)||["-",0,0],a=+(i[1]*60)+Ne(i[2]),a===0?0:i[0]==="+"?a:-a)}function Pu(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(Ct(e)||ni(e)?e.valueOf():Be(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),oe.updateOffset(n,!1),n):Be(e).local()}function gl(e){return-Math.round(e._d.getTimezoneOffset())}oe.updateOffset=function(){};function OB(e,t,n){var o=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Bu(Wa,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=gl(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Om(this,Mt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,oe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?o:gl(this)}function $B(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function BB(e){return this.utcOffset(0,e)}function PB(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gl(this),"m")),this}function AB(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Bu(t$,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function YB(e){return this.isValid()?(e=e?Be(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function IB(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zB(){if(!et(this._isDSTShifted))return this._isDSTShifted;var e={},t;return wu(e,this),e=Cm(e),e._a?(t=e._isUTC?Zt(e._a):Be(e._a),this._isDSTShifted=this.isValid()&&TB(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function RB(){return this.isValid()?!this._isUTC:!1}function LB(){return this.isValid()?this._isUTC:!1}function Tm(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FB=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,HB=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mt(e,t){var n=e,o=null,i,a,s;return zi(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:pn(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(o=FB.exec(e))?(i=o[1]==="-"?-1:1,n={y:0,d:Ne(o[Bt])*i,h:Ne(o[Fe])*i,m:Ne(o[xt])*i,s:Ne(o[an])*i,ms:Ne(vl(o[qn]*1e3))*i}):(o=HB.exec(e))?(i=o[1]==="-"?-1:1,n={y:Hn(o[2],i),M:Hn(o[3],i),w:Hn(o[4],i),d:Hn(o[5],i),h:Hn(o[6],i),m:Hn(o[7],i),s:Hn(o[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=jB(Be(n.from),Be(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new Za(n),zi(e)&&Se(e,"_locale")&&(a._locale=e._locale),zi(e)&&Se(e,"_isValid")&&(a._isValid=e._isValid),a}Mt.fn=Za.prototype;Mt.invalid=MB;function Hn(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kd(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function jB(e,t){var n;return e.isValid()&&t.isValid()?(t=Pu(t,e),e.isBefore(t)?n=Kd(e,t):(n=Kd(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Vm(e,t){return function(n,o){var i,a;return o!==null&&!isNaN(+o)&&(am(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=o,o=a),i=Mt(n,o),Om(this,i,e),this}}function Om(e,t,n,o){var i=t._milliseconds,a=vl(t._days),s=vl(t._months);e.isValid()&&(o=o??!0,s&&vm(e,Rr(e,"Month")+s*n),a&&hm(e,"Date",Rr(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&oe.updateOffset(e,a||s))}var WB=Vm(1,"add"),UB=Vm(-1,"subtract");function $m(e){return typeof e=="string"||e instanceof String}function GB(e){return Ct(e)||ni(e)||$m(e)||pn(e)||qB(e)||ZB(e)||e===null||e===void 0}function ZB(e){var t=Qn(e)&&!gu(e),n=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,s=o.length;for(i=0;i<s;i+=1)a=o[i],n=n||Se(e,a);return t&&n}function qB(e){var t=Et(e),n=!1;return t&&(n=e.filter(function(o){return!pn(o)&&$m(e)}).length===0),t&&n}function XB(e){var t=Qn(e)&&!gu(e),n=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<o.length;i+=1)a=o[i],n=n||Se(e,a);return t&&n}function KB(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function JB(e,t){arguments.length===1&&(arguments[0]?GB(arguments[0])?(e=arguments[0],t=void 0):XB(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Be(),o=Pu(n,this).startOf("day"),i=oe.calendarFormat(this,o)||"sameElse",a=t&&(qt(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Be(n)))}function QB(){return new oi(this)}function eP(e,t){var n=Ct(e)?e:Be(e);return this.isValid()&&n.isValid()?(t=yt(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function tP(e,t){var n=Ct(e)?e:Be(e);return this.isValid()&&n.isValid()?(t=yt(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function nP(e,t,n,o){var i=Ct(e)?e:Be(e),a=Ct(t)?t:Be(t);return this.isValid()&&i.isValid()&&a.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(o[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function oP(e,t){var n=Ct(e)?e:Be(e),o;return this.isValid()&&n.isValid()?(t=yt(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(o=n.valueOf(),this.clone().startOf(t).valueOf()<=o&&o<=this.clone().endOf(t).valueOf())):!1}function rP(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function iP(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function aP(e,t,n){var o,i,a;if(!this.isValid())return NaN;if(o=Pu(e,this),!o.isValid())return NaN;switch(i=(o.utcOffset()-this.utcOffset())*6e4,t=yt(t),t){case"year":a=Ri(this,o)/12;break;case"month":a=Ri(this,o);break;case"quarter":a=Ri(this,o)/3;break;case"second":a=(this-o)/1e3;break;case"minute":a=(this-o)/6e4;break;case"hour":a=(this-o)/36e5;break;case"day":a=(this-o-i)/864e5;break;case"week":a=(this-o-i)/6048e5;break;default:a=this-o}return n?a:ut(a)}function Ri(e,t){if(e.date()<t.date())return-Ri(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),o=e.clone().add(n,"months"),i,a;return t-o<0?(i=e.clone().add(n-1,"months"),a=(t-o)/(o-i)):(i=e.clone().add(n+1,"months"),a=(t-o)/(i-o)),-(n+a)||0}oe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";oe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function sP(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lP(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Ii(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):qt(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ii(n,"Z")):Ii(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function uP(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,o,i,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(n+o+i+a)}function cP(e){e||(e=this.isUtc()?oe.defaultFormatUtc:oe.defaultFormat);var t=Ii(this,e);return this.localeData().postformat(t)}function dP(e,t){return this.isValid()&&(Ct(e)&&e.isValid()||Be(e).isValid())?Mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fP(e){return this.from(Be(),e)}function hP(e,t){return this.isValid()&&(Ct(e)&&e.isValid()||Be(e).isValid())?Mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pP(e){return this.to(Be(),e)}function Bm(e){var t;return e===void 0?this._locale._abbr:(t=yn(e),t!=null&&(this._locale=t),this)}var Pm=gt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Am(){return this._locale}var da=1e3,Mo=60*da,fa=60*Mo,Ym=(365*400+97)*24*fa;function To(e,t){return(e%t+t)%t}function Im(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ym:new Date(e,t,n).valueOf()}function zm(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ym:Date.UTC(e,t,n)}function mP(e){var t,n;if(e=yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?zm:Im,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=To(t+(this._isUTC?0:this.utcOffset()*Mo),fa);break;case"minute":t=this._d.valueOf(),t-=To(t,Mo);break;case"second":t=this._d.valueOf(),t-=To(t,da);break}return this._d.setTime(t),oe.updateOffset(this,!0),this}function vP(e){var t,n;if(e=yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?zm:Im,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fa-To(t+(this._isUTC?0:this.utcOffset()*Mo),fa)-1;break;case"minute":t=this._d.valueOf(),t+=Mo-To(t,Mo)-1;break;case"second":t=this._d.valueOf(),t+=da-To(t,da)-1;break}return this._d.setTime(t),oe.updateOffset(this,!0),this}function gP(){return this._d.valueOf()-(this._offset||0)*6e4}function yP(){return Math.floor(this.valueOf()/1e3)}function wP(){return new Date(this.valueOf())}function bP(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _P(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xP(){return this.isValid()?this.toISOString():null}function kP(){return yu(this)}function NP(){return Vn({},be(this))}function EP(){return be(this).overflow}function CP(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}me("N",0,0,"eraAbbr");me("NN",0,0,"eraAbbr");me("NNN",0,0,"eraAbbr");me("NNNN",0,0,"eraName");me("NNNNN",0,0,"eraNarrow");me("y",["y",1],"yo","eraYear");me("y",["yy",2],0,"eraYear");me("y",["yyy",3],0,"eraYear");me("y",["yyyy",4],0,"eraYear");ae("N",Au);ae("NN",Au);ae("NNN",Au);ae("NNNN",YP);ae("NNNNN",IP);Te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,o){var i=n._locale.erasParse(e,o,n._strict);i?be(n).era=i:be(n).invalidEra=e});ae("y",Qo);ae("yy",Qo);ae("yyy",Qo);ae("yyyy",Qo);ae("yo",zP);Te(["y","yy","yyy","yyyy"],Ze);Te(["yo"],function(e,t,n,o){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ze]=n._locale.eraYearOrdinalParse(e,i):t[Ze]=parseInt(e,10)});function SP(e,t){var n,o,i,a=this._eras||yn("en")._eras;for(n=0,o=a.length;n<o;++n){switch(typeof a[n].since){case"string":i=oe(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=oe(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function DP(e,t,n){var o,i,a=this.eras(),s,l,u;for(e=e.toUpperCase(),o=0,i=a.length;o<i;++o)if(s=a[o].name.toUpperCase(),l=a[o].abbr.toUpperCase(),u=a[o].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return a[o];break;case"NNNN":if(s===e)return a[o];break;case"NNNNN":if(u===e)return a[o];break}else if([s,l,u].indexOf(e)>=0)return a[o]}function MP(e,t){var n=e.since<=e.until?1:-1;return t===void 0?oe(e.since).year():oe(e.since).year()+(t-e.offset)*n}function TP(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].name;return""}function VP(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].narrow;return""}function OP(){var e,t,n,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),o[e].since<=n&&n<=o[e].until||o[e].until<=n&&n<=o[e].since)return o[e].abbr;return""}function $P(){var e,t,n,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-oe(i[e].since).year())*n+i[e].offset;return this.year()}function BP(e){return Se(this,"_erasNameRegex")||Yu.call(this),e?this._erasNameRegex:this._erasRegex}function PP(e){return Se(this,"_erasAbbrRegex")||Yu.call(this),e?this._erasAbbrRegex:this._erasRegex}function AP(e){return Se(this,"_erasNarrowRegex")||Yu.call(this),e?this._erasNarrowRegex:this._erasRegex}function Au(e,t){return t.erasAbbrRegex(e)}function YP(e,t){return t.erasNameRegex(e)}function IP(e,t){return t.erasNarrowRegex(e)}function zP(e,t){return t._eraYearOrdinalRegex||Qo}function Yu(){var e=[],t=[],n=[],o=[],i,a,s,l,u,c=this.eras();for(i=0,a=c.length;i<a;++i)s=un(c[i].name),l=un(c[i].abbr),u=un(c[i].narrow),t.push(s),e.push(l),n.push(u),o.push(s),o.push(l),o.push(u);this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}me(0,["gg",2],0,function(){return this.weekYear()%100});me(0,["GG",2],0,function(){return this.isoWeekYear()%100});function qa(e,t){me(0,[e,e.length],0,t)}qa("gggg","weekYear");qa("ggggg","weekYear");qa("GGGG","isoWeekYear");qa("GGGGG","isoWeekYear");ae("G",ja);ae("g",ja);ae("GG",Pe,lt);ae("gg",Pe,lt);ae("GGGG",Nu,ku);ae("gggg",Nu,ku);ae("GGGGG",Ha,La);ae("ggggg",Ha,La);ii(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,o){t[o.substr(0,2)]=Ne(e)});ii(["gg","GG"],function(e,t,n,o){t[o]=oe.parseTwoDigitYear(e)});function RP(e){return Rm.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function LP(e){return Rm.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function FP(){return cn(this.year(),1,4)}function HP(){return cn(this.isoWeekYear(),1,4)}function jP(){var e=this.localeData()._week;return cn(this.year(),e.dow,e.doy)}function WP(){var e=this.localeData()._week;return cn(this.weekYear(),e.dow,e.doy)}function Rm(e,t,n,o,i){var a;return e==null?Fr(this,o,i).year:(a=cn(e,o,i),t>a&&(t=a),UP.call(this,e,t,n,o,i))}function UP(e,t,n,o,i){var a=wm(e,t,n,o,i),s=Lr(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}me("Q",0,"Qo","quarter");ae("Q",lm);Te("Q",function(e,t){t[rn]=(Ne(e)-1)*3});function GP(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}me("D",["DD",2],"Do","date");ae("D",Pe,er);ae("DD",Pe,lt);ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Te(["D","DD"],Bt);Te("Do",function(e,t){t[Bt]=Ne(e.match(Pe)[0])});var Lm=tr("Date",!0);me("DDD",["DDDD",3],"DDDo","dayOfYear");ae("DDD",Fa);ae("DDDD",um);Te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Ne(e)});function ZP(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}me("m",["mm",2],0,"minute");ae("m",Pe,Eu);ae("mm",Pe,lt);Te(["m","mm"],xt);var qP=tr("Minutes",!1);me("s",["ss",2],0,"second");ae("s",Pe,Eu);ae("ss",Pe,lt);Te(["s","ss"],an);var XP=tr("Seconds",!1);me("S",0,0,function(){return~~(this.millisecond()/100)});me(0,["SS",2],0,function(){return~~(this.millisecond()/10)});me(0,["SSS",3],0,"millisecond");me(0,["SSSS",4],0,function(){return this.millisecond()*10});me(0,["SSSSS",5],0,function(){return this.millisecond()*100});me(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});me(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});me(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});me(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});ae("S",Fa,lm);ae("SS",Fa,lt);ae("SSS",Fa,um);var On,Fm;for(On="SSSS";On.length<=9;On+="S")ae(On,Qo);function KP(e,t){t[qn]=Ne(("0."+e)*1e3)}for(On="S";On.length<=9;On+="S")Te(On,KP);Fm=tr("Milliseconds",!1);me("z",0,0,"zoneAbbr");me("zz",0,0,"zoneName");function JP(){return this._isUTC?"UTC":""}function QP(){return this._isUTC?"Coordinated Universal Time":""}var Z=oi.prototype;Z.add=WB;Z.calendar=JB;Z.clone=QB;Z.diff=aP;Z.endOf=vP;Z.format=cP;Z.from=dP;Z.fromNow=fP;Z.to=hP;Z.toNow=pP;Z.get=u$;Z.invalidAt=EP;Z.isAfter=eP;Z.isBefore=tP;Z.isBetween=nP;Z.isSame=oP;Z.isSameOrAfter=rP;Z.isSameOrBefore=iP;Z.isValid=kP;Z.lang=Pm;Z.locale=Bm;Z.localeData=Am;Z.max=kB;Z.min=xB;Z.parsingFlags=NP;Z.set=c$;Z.startOf=mP;Z.subtract=UB;Z.toArray=bP;Z.toObject=_P;Z.toDate=wP;Z.toISOString=lP;Z.inspect=uP;typeof Symbol<"u"&&Symbol.for!=null&&(Z[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Z.toJSON=xP;Z.toString=sP;Z.unix=yP;Z.valueOf=gP;Z.creationData=CP;Z.eraName=TP;Z.eraNarrow=VP;Z.eraAbbr=OP;Z.eraYear=$P;Z.year=fm;Z.isLeapYear=l$;Z.weekYear=RP;Z.isoWeekYear=LP;Z.quarter=Z.quarters=GP;Z.month=gm;Z.daysInMonth=w$;Z.week=Z.weeks=S$;Z.isoWeek=Z.isoWeeks=D$;Z.weeksInYear=jP;Z.weeksInWeekYear=WP;Z.isoWeeksInYear=FP;Z.isoWeeksInISOWeekYear=HP;Z.date=Lm;Z.day=Z.days=L$;Z.weekday=F$;Z.isoWeekday=H$;Z.dayOfYear=ZP;Z.hour=Z.hours=X$;Z.minute=Z.minutes=qP;Z.second=Z.seconds=XP;Z.millisecond=Z.milliseconds=Fm;Z.utcOffset=OB;Z.utc=BB;Z.local=PB;Z.parseZone=AB;Z.hasAlignedHourOffset=YB;Z.isDST=IB;Z.isLocal=RB;Z.isUtcOffset=LB;Z.isUtc=Tm;Z.isUTC=Tm;Z.zoneAbbr=JP;Z.zoneName=QP;Z.dates=gt("dates accessor is deprecated. Use date instead.",Lm);Z.months=gt("months accessor is deprecated. Use month instead",gm);Z.years=gt("years accessor is deprecated. Use year instead",fm);Z.zone=gt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",$B);Z.isDSTShifted=gt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zB);function eA(e){return Be(e*1e3)}function tA(){return Be.apply(null,arguments).parseZone()}function Hm(e){return e}var De=bu.prototype;De.calendar=RO;De.longDateFormat=jO;De.invalidDate=UO;De.ordinal=qO;De.preparse=Hm;De.postformat=Hm;De.relativeTime=KO;De.pastFuture=JO;De.set=IO;De.eras=SP;De.erasParse=DP;De.erasConvertYear=MP;De.erasAbbrRegex=PP;De.erasNameRegex=BP;De.erasNarrowRegex=AP;De.months=m$;De.monthsShort=v$;De.monthsParse=y$;De.monthsRegex=_$;De.monthsShortRegex=b$;De.week=k$;De.firstDayOfYear=C$;De.firstDayOfWeek=E$;De.weekdays=A$;De.weekdaysMin=I$;De.weekdaysShort=Y$;De.weekdaysParse=R$;De.weekdaysRegex=j$;De.weekdaysShortRegex=W$;De.weekdaysMinRegex=U$;De.isPM=Z$;De.meridiem=K$;function ha(e,t,n,o){var i=yn(),a=Zt().set(o,t);return i[n](a,e)}function jm(e,t,n){if(pn(e)&&(t=e,e=void 0),e=e||"",t!=null)return ha(e,t,n,"month");var o,i=[];for(o=0;o<12;o++)i[o]=ha(e,o,n,"month");return i}function Iu(e,t,n,o){typeof e=="boolean"?(pn(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,pn(t)&&(n=t,t=void 0),t=t||"");var i=yn(),a=e?i._week.dow:0,s,l=[];if(n!=null)return ha(t,(n+a)%7,o,"day");for(s=0;s<7;s++)l[s]=ha(t,(s+a)%7,o,"day");return l}function nA(e,t){return jm(e,t,"months")}function oA(e,t){return jm(e,t,"monthsShort")}function rA(e,t,n){return Iu(e,t,n,"weekdays")}function iA(e,t,n){return Iu(e,t,n,"weekdaysShort")}function aA(e,t,n){return Iu(e,t,n,"weekdaysMin")}Pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Ne(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});oe.lang=gt("moment.lang is deprecated. Use moment.locale instead.",Pn);oe.langData=gt("moment.langData is deprecated. Use moment.localeData instead.",yn);var Kt=Math.abs;function sA(){var e=this._data;return this._milliseconds=Kt(this._milliseconds),this._days=Kt(this._days),this._months=Kt(this._months),e.milliseconds=Kt(e.milliseconds),e.seconds=Kt(e.seconds),e.minutes=Kt(e.minutes),e.hours=Kt(e.hours),e.months=Kt(e.months),e.years=Kt(e.years),this}function Wm(e,t,n,o){var i=Mt(t,n);return e._milliseconds+=o*i._milliseconds,e._days+=o*i._days,e._months+=o*i._months,e._bubble()}function lA(e,t){return Wm(this,e,t,1)}function uA(e,t){return Wm(this,e,t,-1)}function Jd(e){return e<0?Math.floor(e):Math.ceil(e)}function cA(){var e=this._milliseconds,t=this._days,n=this._months,o=this._data,i,a,s,l,u;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Jd(yl(n)+t)*864e5,t=0,n=0),o.milliseconds=e%1e3,i=ut(e/1e3),o.seconds=i%60,a=ut(i/60),o.minutes=a%60,s=ut(a/60),o.hours=s%24,t+=ut(s/24),u=ut(Um(t)),n+=u,t-=Jd(yl(u)),l=ut(n/12),n%=12,o.days=t,o.months=n,o.years=l,this}function Um(e){return e*4800/146097}function yl(e){return e*146097/4800}function dA(e){if(!this.isValid())return NaN;var t,n,o=this._milliseconds;if(e=yt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+o/864e5,n=this._months+Um(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(yl(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return t*24+o/36e5;case"minute":return t*1440+o/6e4;case"second":return t*86400+o/1e3;case"millisecond":return Math.floor(t*864e5)+o;default:throw new Error("Unknown unit "+e)}}function wn(e){return function(){return this.as(e)}}var Gm=wn("ms"),fA=wn("s"),hA=wn("m"),pA=wn("h"),mA=wn("d"),vA=wn("w"),gA=wn("M"),yA=wn("Q"),wA=wn("y"),bA=Gm;function _A(){return Mt(this)}function xA(e){return e=yt(e),this.isValid()?this[e+"s"]():NaN}function po(e){return function(){return this.isValid()?this._data[e]:NaN}}var kA=po("milliseconds"),NA=po("seconds"),EA=po("minutes"),CA=po("hours"),SA=po("days"),DA=po("months"),MA=po("years");function TA(){return ut(this.days()/7)}var Qt=Math.round,Eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function VA(e,t,n,o,i){return i.relativeTime(t||1,!!n,e,o)}function OA(e,t,n,o){var i=Mt(e).abs(),a=Qt(i.as("s")),s=Qt(i.as("m")),l=Qt(i.as("h")),u=Qt(i.as("d")),c=Qt(i.as("M")),d=Qt(i.as("w")),f=Qt(i.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||s<=1&&["m"]||s<n.m&&["mm",s]||l<=1&&["h"]||l<n.h&&["hh",l]||u<=1&&["d"]||u<n.d&&["dd",u];return n.w!=null&&(h=h||d<=1&&["w"]||d<n.w&&["ww",d]),h=h||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f],h[2]=t,h[3]=+e>0,h[4]=o,VA.apply(null,h)}function $A(e){return e===void 0?Qt:typeof e=="function"?(Qt=e,!0):!1}function BA(e,t){return Eo[e]===void 0?!1:t===void 0?Eo[e]:(Eo[e]=t,e==="s"&&(Eo.ss=t-1),!0)}function PA(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,o=Eo,i,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(o=Object.assign({},Eo,t),t.s!=null&&t.ss==null&&(o.ss=t.s-1)),i=this.localeData(),a=OA(this,!n,o,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var Ts=Math.abs;function wo(e){return(e>0)-(e<0)||+e}function Xa(){if(!this.isValid())return this.localeData().invalidDate();var e=Ts(this._milliseconds)/1e3,t=Ts(this._days),n=Ts(this._months),o,i,a,s,l=this.asSeconds(),u,c,d,f;return l?(o=ut(e/60),i=ut(o/60),e%=60,o%=60,a=ut(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=l<0?"-":"",c=wo(this._months)!==wo(l)?"-":"",d=wo(this._days)!==wo(l)?"-":"",f=wo(this._milliseconds)!==wo(l)?"-":"",u+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(t?d+t+"D":"")+(i||o||e?"T":"")+(i?f+i+"H":"")+(o?f+o+"M":"")+(e?f+s+"S":"")):"P0D"}var Ce=Za.prototype;Ce.isValid=DB;Ce.abs=sA;Ce.add=lA;Ce.subtract=uA;Ce.as=dA;Ce.asMilliseconds=Gm;Ce.asSeconds=fA;Ce.asMinutes=hA;Ce.asHours=pA;Ce.asDays=mA;Ce.asWeeks=vA;Ce.asMonths=gA;Ce.asQuarters=yA;Ce.asYears=wA;Ce.valueOf=bA;Ce._bubble=cA;Ce.clone=_A;Ce.get=xA;Ce.milliseconds=kA;Ce.seconds=NA;Ce.minutes=EA;Ce.hours=CA;Ce.days=SA;Ce.weeks=TA;Ce.months=DA;Ce.years=MA;Ce.humanize=PA;Ce.toISOString=Xa;Ce.toString=Xa;Ce.toJSON=Xa;Ce.locale=Bm;Ce.localeData=Am;Ce.toIsoString=gt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xa);Ce.lang=Pm;me("X",0,0,"unix");me("x",0,0,"valueOf");ae("x",ja);ae("X",n$);Te("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Te("x",function(e,t,n){n._d=new Date(Ne(e))});oe.version="2.30.1";AO(Be);oe.fn=Z;oe.min=NB;oe.max=EB;oe.now=CB;oe.utc=Zt;oe.unix=eA;oe.months=nA;oe.isDate=ni;oe.locale=Pn;oe.invalid=Ra;oe.duration=Mt;oe.isMoment=Ct;oe.weekdays=rA;oe.parseZone=tA;oe.localeData=yn;oe.isDuration=zi;oe.monthsShort=oA;oe.weekdaysMin=aA;oe.defineLocale=Tu;oe.updateLocale=tB;oe.locales=nB;oe.weekdaysShort=iA;oe.normalizeUnits=yt;oe.relativeTimeRounding=$A;oe.relativeTimeThreshold=BA;oe.calendarFormat=KB;oe.prototype=Z;oe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};r.ref(null);r.ref(null);const AA={class:"yu-table-fixed yu-w-full"},YA={key:0,class:"yu-align-top"},IA={key:1,class:"yu-align-top"},Oe=r.defineComponent({__name:"app-double-column",setup(e){const t=r.useSlots();function n(o){return!!t[o]}return(o,i)=>(r.openBlock(),r.createElementBlock("table",AA,[r.createElementVNode("tr",null,[n("col-1")?(r.openBlock(),r.createElementBlock("td",YA,[r.renderSlot(o.$slots,"col-1")])):r.createCommentVNode("",!0),n("col-2")?(r.openBlock(),r.createElementBlock("td",IA,[r.renderSlot(o.$slots,"col-2")])):r.createCommentVNode("",!0)])]))}}),zA=["src"],Zm=r.defineComponent({__name:"workflow-action-icon",props:{icon:{},color:{},size:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(["yu-flex yu-shrink-0 yu-items-center yu-justify-center yu-overflow-hidden yu-rounded-xl",e.size==="small"?"yu-h-9 yu-w-9":"yu-h-16 yu-w-16"]),style:r.normalizeStyle({background:`color-mix(in srgb, ${e.color} 18%, white)`}),"aria-hidden":"true"},[r.createElementVNode("img",{class:r.normalizeClass(e.size==="small"?"yu-h-5 yu-w-5":"yu-h-8 yu-w-8"),src:e.icon,alt:""},null,10,zA)],6))}}),RA={class:"yu-w-full","aria-label":"Tipos de etapa"},LA=r.defineComponent({__name:"workflow-add-menu",props:{nodeTypes:{},parentName:{}},emits:["select","close"],setup(e,{emit:t}){const n=t;return(o,i)=>(r.openBlock(),r.createElementBlock("section",RA,[r.createVNode(r.unref(q),{class:"yu-mb-2","center-between":"","gap-sm":""},{default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...i[1]||(i[1]=[r.createTextVNode("Adicionar etapa",-1)])]),_:1}),e.parentName?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"yu-mt-0.5 yu-truncate",small:""},{default:r.withCtx(()=>[r.createTextVNode("Depois de "+r.toDisplayString(e.parentName),1)]),_:1})):r.createCommentVNode("",!0)]),r.createVNode(r.unref(it),{ghost:"",icon:"",small:"","aria-label":"Fechar",onClick:i[0]||(i[0]=a=>n("close"))},{default:r.withCtx(()=>[...i[2]||(i[2]=[r.createTextVNode("×",-1)])]),_:1})]),_:1}),e.nodeTypes.length===0?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"yu-p-3",base:""},{default:r.withCtx(()=>[...i[3]||(i[3]=[r.createTextVNode("Nenhum tipo de etapa foi permitido.",-1)])]),_:1})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.nodeTypes,a=>(r.openBlock(),r.createBlock(r.unref(it),{class:"!yu-h-auto !yu-justify-start !yu-p-3 yu-text-left",key:a.type,ghost:"",fluid:"",onClick:s=>n("select",a)},{icon:r.withCtx(()=>[r.createVNode(Zm,{icon:a.icon,color:a.color,size:"small"},null,8,["icon","color"]),r.createElementVNode("span",null,[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(a.label),1)]),_:2},1024),r.createVNode(r.unref(he),{small:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(a.defaultName),1)]),_:2},1024)])]),_:2},1032,["onClick"]))),128))]))}}),FA=new Set(["screen","service","identification"]),HA=()=>({nodeTypes:[],readOnly:!1,hasEditor:!1,hasForm:!1,hasEditForm:!1}),Ka=Yg.defineStore("service-workflow-editor",()=>{const e=r.reactive({}),t=new Map,n=new Map,o=new Map,i=v=>e[v]??=HA(),a=(v,N)=>console.warn(`[AppServiceWorkflow] Já existe um ${v} registrado para "${N}".`),s=(v,N,T)=>t.has(v)?(a("editor",v),!1):(t.set(v,{owner:N,adapter:T}),i(v).hasEditor=!0,!0),l=(v,N)=>n.has(v)?(a("formulário",v),!1):(n.set(v,N),i(v).hasForm=!0,!0),u=(v,N)=>o.has(v)?(a("formulário de edição",v),!1):(o.set(v,N),i(v).hasEditForm=!0,!0),c=v=>{const N=e[v];N&&!N.hasEditor&&!N.hasForm&&!N.hasEditForm&&delete e[v]},d=(v,N)=>{t.get(v)?.owner===N&&(t.delete(v),i(v).hasEditor=!1,i(v).request=void 0,i(v).editRequest=void 0,c(v))},f=(v,N)=>{n.get(v)===N&&(n.delete(v),i(v).hasForm=!1,i(v).request=void 0,c(v))},h=(v,N)=>{o.get(v)===N&&(o.delete(v),i(v).hasEditForm=!1,i(v).editRequest=void 0,c(v))},p=v=>{e[v]&&(e[v].request=void 0)},m=v=>{e[v]&&(e[v].editRequest=void 0)};return{channels:e,registerEditor:s,registerForm:l,registerEditForm:u,unregisterEditor:d,unregisterForm:f,unregisterEditForm:h,syncEditor:(v,N,T)=>{const V=i(v);V.nodeTypes=N,V.readOnly=T;const $=V.request?.parentId;V.request&&(T||!t.get(v)?.adapter.canAdd($))&&p(v);const P=V.editRequest;P&&(T||!t.get(v)?.adapter.canEdit(P.rule.id,P.rule.action))&&m(v)},requestAdd:(v,N)=>{const T=e[v],V=t.get(v)?.adapter;return!T||T.readOnly||!T.nodeTypes.length||!V?.canAdd(N?.id)?!1:(m(v),T.request={workflowId:v,...N?.id?{parentId:N.id}:{},...N?.name?{parentName:N.name}:{}},!0)},requestEdit:(v,N)=>{const T=e[v],V=t.get(v)?.adapter,$=N.action;if(!T||T.readOnly||!FA.has($))return!1;const P=$;return V?.canEdit(N.id,P)?(p(v),T.editRequest={workflowId:v,rule:{...N,action:P,settings:N.settings?{...N.settings}:N.settings}},!0):!1},cancelAdd:p,cancelEdit:m,confirmAdd:(v,N)=>{const T=e[v],V=t.get(v)?.adapter,$=T?.nodeTypes.find(A=>A.type===N.type);if(!T?.request||!V||!$)return!1;if(!V.canAdd(T.request.parentId))return p(v),!1;const P=V.add($,T.request.parentId);return P&&p(v),P},confirmEdit:(v,N)=>{const T=e[v],V=t.get(v)?.adapter,$=T?.editRequest;if(!$||!V||$.rule.action!==N.action)return!1;if(!V.canEdit($.rule.id,N.action))return m(v),!1;const P=V.edit($.rule.id,N);return P&&m(v),P}}}),Ja=e=>{if(!e)throw new Error("workflow-id é obrigatório para o editor de fluxo.");let t;try{t=Ka()}catch{throw new Error("AppServiceWorkflowEditor requer Pinia. Instale com app.use(createPinia()) antes de montar os componentes.")}return{request:r.computed(()=>t.channels[e]?.request),editRequest:r.computed(()=>t.channels[e]?.editRequest),nodeTypes:r.computed(()=>t.channels[e]?.nodeTypes??[]),requestAdd:n=>t.requestAdd(e,n),requestEdit:n=>t.requestEdit(e,n),cancelAdd:()=>t.cancelAdd(e),cancelEdit:()=>t.cancelEdit(e),confirmAdd:n=>t.confirmAdd(e,n),confirmEdit:n=>t.confirmEdit(e,n)}},qm=r.defineComponent({__name:"app-service-workflow-add-form",props:{workflowId:{}},setup(e){const t=e,n=Ja(t.workflowId),o=Ka(),i=Symbol(`workflow-form:${t.workflowId}`),a=o.registerForm(t.workflowId,i);return r.onBeforeUnmount(()=>{a&&o.unregisterForm(t.workflowId,i)}),(s,l)=>r.unref(a)&&r.unref(n).request.value?(r.openBlock(),r.createBlock(LA,{key:0,"node-types":r.unref(n).nodeTypes.value,"parent-name":r.unref(n).request.value.parentName,onSelect:r.unref(n).confirmAdd,onClose:r.unref(n).cancelAdd},null,8,["node-types","parent-name","onSelect","onClose"])):r.createCommentVNode("",!0)}}),jA=r.defineComponent({__name:"workflow-identification-rule-edit-form",props:{rule:{}},emits:["submit","cancel"],setup(e,{emit:t}){const n=e,o=t,i=n.rule.settings?.header,a=n.rule.settings?.body,s=n.rule.settings?.form?.fields??[],l=new Map(s.map(f=>[f.alias,f])),u=r.reactive({name:n.rule.name,headerEnabled:!!i,bodyEnabled:!!a||!i,header:{logo:i?.logo??"",title:i?.title??"",subtitle:i?.subtitle??""},body:{logo:a?.logo??"",eyebrow:a?.eyebrow??"",title:a?.title??"",subtitle:a?.subtitle??""},fields:[{name:"Nome",alias:"nome",enabled:l.has("nome"),required:l.get("nome")?.required??!1},{name:"E-mail",alias:"email",enabled:l.has("email"),required:l.get("email")?.required??!1},{name:"CPF",alias:"cpf",enabled:l.has("cpf"),required:l.get("cpf")?.required??!1},{name:"Telefone",alias:"telefone",enabled:l.has("telefone"),required:l.get("telefone")?.required??!1}]}),c=r.ref(""),d=()=>{c.value="";try{const f=Pl.IdentificationRuleBuilder.create().withName(u.name).withForm({fields:u.fields.filter(h=>h.enabled).map(({enabled:h,...p})=>p)});u.headerEnabled&&f.withHeader({...u.header}),u.bodyEnabled&&f.withBody({...u.body}),o("submit",f.build().payload)}catch(f){c.value=f instanceof Error?f.message:"Não foi possível validar a regra."}};return(f,h)=>(r.openBlock(),r.createElementBlock("form",{"aria-label":"Editar regra de identificação",onSubmit:r.withModifiers(d,["prevent"])},[r.createVNode(r.unref(q),{col:"","gap-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-none":"",divisor:""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...h[11]||(h[11]=[r.createTextVNode("Geral",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[12]||(h[12]=[r.createTextVNode("Nome da regra",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.name,"onUpdate:modelValue":h[0]||(h[0]=p=>u.name=p),fluid:"",invalid:!u.name.trim()},{default:r.withCtx(()=>[...h[13]||(h[13]=[r.createTextVNode("Nome da regra",-1)])]),_:1},8,["modelValue","invalid"])]),_:1})]),_:1})]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...h[14]||(h[14]=[r.createTextVNode("Cabeçalho",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[15]||(h[15]=[r.createTextVNode("Exibir cabeçalho",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:u.headerEnabled,"onUpdate:modelValue":h[1]||(h[1]=p=>u.headerEnabled=p),disabled:u.headerEnabled&&!u.bodyEnabled,"aria-label":"Exibir cabeçalho"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),u.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:0},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[16]||(h[16]=[r.createTextVNode("Logo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.header.logo,"onUpdate:modelValue":h[2]||(h[2]=p=>u.header.logo=p),fluid:""},{default:r.withCtx(()=>[...h[17]||(h[17]=[r.createTextVNode("Logo do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),u.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:1},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[18]||(h[18]=[r.createTextVNode("Título",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.header.title,"onUpdate:modelValue":h[3]||(h[3]=p=>u.header.title=p),fluid:""},{default:r.withCtx(()=>[...h[19]||(h[19]=[r.createTextVNode("Título do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),u.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:2},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[20]||(h[20]=[r.createTextVNode("Subtítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.header.subtitle,"onUpdate:modelValue":h[4]||(h[4]=p=>u.header.subtitle=p),fluid:""},{default:r.withCtx(()=>[...h[21]||(h[21]=[r.createTextVNode("Subtítulo do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...h[22]||(h[22]=[r.createTextVNode("Conteúdo",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[23]||(h[23]=[r.createTextVNode("Exibir conteúdo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:u.bodyEnabled,"onUpdate:modelValue":h[5]||(h[5]=p=>u.bodyEnabled=p),disabled:u.bodyEnabled&&!u.headerEnabled,"aria-label":"Exibir conteúdo"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),u.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:0},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[24]||(h[24]=[r.createTextVNode("Logo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.body.logo,"onUpdate:modelValue":h[6]||(h[6]=p=>u.body.logo=p),fluid:""},{default:r.withCtx(()=>[...h[25]||(h[25]=[r.createTextVNode("Logo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),u.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:1},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[26]||(h[26]=[r.createTextVNode("Sobretítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.body.eyebrow,"onUpdate:modelValue":h[7]||(h[7]=p=>u.body.eyebrow=p),fluid:""},{default:r.withCtx(()=>[...h[27]||(h[27]=[r.createTextVNode("Sobretítulo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),u.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:2},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[28]||(h[28]=[r.createTextVNode("Título",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.body.title,"onUpdate:modelValue":h[8]||(h[8]=p=>u.body.title=p),fluid:""},{default:r.withCtx(()=>[...h[29]||(h[29]=[r.createTextVNode("Título do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),u.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:3},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...h[30]||(h[30]=[r.createTextVNode("Subtítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:u.body.subtitle,"onUpdate:modelValue":h[9]||(h[9]=p=>u.body.subtitle=p),fluid:""},{default:r.withCtx(()=>[...h[31]||(h[31]=[r.createTextVNode("Subtítulo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...h[32]||(h[32]=[r.createTextVNode("Campos de identificação",-1)])]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.fields,p=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:p.alias},[r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[r.createTextVNode("Usar "+r.toDisplayString(p.name),1)]),_:2},1024)]),_:2},1024)]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:p.enabled,"onUpdate:modelValue":m=>p.enabled=m,"aria-label":`Usar ${p.name}`},null,8,["modelValue","onUpdate:modelValue","aria-label"])]),_:2},1024)]),_:2},1024),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.name)+" obrigatório",1)]),_:2},1024)]),_:2},1024)]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:p.required,"onUpdate:modelValue":m=>p.required=m,disabled:!p.enabled,"aria-label":`${p.name} obrigatório`},null,8,["modelValue","onUpdate:modelValue","disabled","aria-label"])]),_:2},1024)]),_:2},1024)],64))),128))]),_:1})]),_:1}),c.value?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"!yu-text-red-600",small:"",role:"alert"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.unref(q),{row:"","gap-sm":"","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(it),{type:"button",ghost:"",onClick:h[10]||(h[10]=p=>o("cancel"))},{default:r.withCtx(()=>[...h[33]||(h[33]=[r.createTextVNode("Cancelar",-1)])]),_:1}),r.createVNode(r.unref(it),{type:"submit"},{default:r.withCtx(()=>[...h[34]||(h[34]=[r.createTextVNode("Salvar",-1)])]),_:1})]),_:1})]),_:1})],32))}}),WA=r.defineComponent({__name:"workflow-screen-rule-edit-form",props:{rule:{}},emits:["submit","cancel"],setup(e,{emit:t}){const n=e,o=t,i=n.rule.settings?.header,a=n.rule.settings?.body,s=r.reactive({name:n.rule.name,headerEnabled:!!i,bodyEnabled:!!a||!i,header:{logo:i?.logo??"",title:i?.title??"",subtitle:i?.subtitle??""},body:{logo:a?.logo??"",eyebrow:a?.eyebrow??"",title:a?.title??"",subtitle:a?.subtitle??""}}),l=r.ref(""),u=()=>{l.value="";try{const c=Pl.ScreenRuleBuilder.create().withName(s.name);s.headerEnabled&&c.withHeader({...s.header}),s.bodyEnabled&&c.withBody({...s.body}),o("submit",c.build().payload)}catch(c){l.value=c instanceof Error?c.message:"Não foi possível validar a regra."}};return(c,d)=>(r.openBlock(),r.createElementBlock("form",{"aria-label":"Editar regra de tela",onSubmit:r.withModifiers(u,["prevent"])},[r.createVNode(r.unref(q),{col:"","gap-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-none":"",divisor:""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...d[11]||(d[11]=[r.createTextVNode("Geral",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[12]||(d[12]=[r.createTextVNode("Nome da regra",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.name,"onUpdate:modelValue":d[0]||(d[0]=f=>s.name=f),fluid:"",invalid:!s.name.trim()},{default:r.withCtx(()=>[...d[13]||(d[13]=[r.createTextVNode("Nome da regra",-1)])]),_:1},8,["modelValue","invalid"])]),_:1})]),_:1})]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...d[14]||(d[14]=[r.createTextVNode("Cabeçalho",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[15]||(d[15]=[r.createTextVNode("Exibir cabeçalho",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:s.headerEnabled,"onUpdate:modelValue":d[1]||(d[1]=f=>s.headerEnabled=f),disabled:s.headerEnabled&&!s.bodyEnabled,"aria-label":"Exibir cabeçalho"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),s.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:0},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[16]||(d[16]=[r.createTextVNode("Logo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.header.logo,"onUpdate:modelValue":d[2]||(d[2]=f=>s.header.logo=f),fluid:""},{default:r.withCtx(()=>[...d[17]||(d[17]=[r.createTextVNode("Logo do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),s.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:1},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[18]||(d[18]=[r.createTextVNode("Título",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.header.title,"onUpdate:modelValue":d[3]||(d[3]=f=>s.header.title=f),fluid:""},{default:r.withCtx(()=>[...d[19]||(d[19]=[r.createTextVNode("Título do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),s.headerEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:2},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[20]||(d[20]=[r.createTextVNode("Subtítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.header.subtitle,"onUpdate:modelValue":d[4]||(d[4]=f=>s.header.subtitle=f),fluid:""},{default:r.withCtx(()=>[...d[21]||(d[21]=[r.createTextVNode("Subtítulo do cabeçalho",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...d[22]||(d[22]=[r.createTextVNode("Conteúdo",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[23]||(d[23]=[r.createTextVNode("Exibir conteúdo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:s.bodyEnabled,"onUpdate:modelValue":d[5]||(d[5]=f=>s.bodyEnabled=f),disabled:s.bodyEnabled&&!s.headerEnabled,"aria-label":"Exibir conteúdo"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),s.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:0},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[24]||(d[24]=[r.createTextVNode("Logo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.body.logo,"onUpdate:modelValue":d[6]||(d[6]=f=>s.body.logo=f),fluid:""},{default:r.withCtx(()=>[...d[25]||(d[25]=[r.createTextVNode("Logo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),s.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:1},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[26]||(d[26]=[r.createTextVNode("Sobretítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.body.eyebrow,"onUpdate:modelValue":d[7]||(d[7]=f=>s.body.eyebrow=f),fluid:""},{default:r.withCtx(()=>[...d[27]||(d[27]=[r.createTextVNode("Sobretítulo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),s.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:2},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[28]||(d[28]=[r.createTextVNode("Título",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.body.title,"onUpdate:modelValue":d[8]||(d[8]=f=>s.body.title=f),fluid:""},{default:r.withCtx(()=>[...d[29]||(d[29]=[r.createTextVNode("Título do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0),s.bodyEnabled?(r.openBlock(),r.createBlock(r.unref(Oe),{key:3},{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...d[30]||(d[30]=[r.createTextVNode("Subtítulo",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:s.body.subtitle,"onUpdate:modelValue":d[9]||(d[9]=f=>s.body.subtitle=f),fluid:""},{default:r.withCtx(()=>[...d[31]||(d[31]=[r.createTextVNode("Subtítulo do conteúdo",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})):r.createCommentVNode("",!0)]),_:1})]),_:1}),l.value?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"!yu-text-red-600",small:"",role:"alert"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(l.value),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.unref(q),{row:"","gap-sm":"","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(it),{type:"button",ghost:"",onClick:d[10]||(d[10]=f=>o("cancel"))},{default:r.withCtx(()=>[...d[32]||(d[32]=[r.createTextVNode("Cancelar",-1)])]),_:1}),r.createVNode(r.unref(it),{type:"submit"},{default:r.withCtx(()=>[...d[33]||(d[33]=[r.createTextVNode("Salvar",-1)])]),_:1})]),_:1})]),_:1})],32))}}),UA=r.defineComponent({__name:"workflow-service-rule-edit-form",props:{rule:{}},emits:["submit","cancel"],setup(e,{emit:t}){const n=e,o=t,i=[{label:"Não definido",value:""},{label:"Chat",value:"chat"},{label:"Voz",value:"voice"}],a=r.reactive({name:n.rule.name,behavior:i.find(u=>u.value===n.rule.settings?.behavior)??i[0],sendMessage:n.rule.settings?.features?.sendMessage??!1,sendAttachment:n.rule.settings?.features?.sendAttachment??!1}),s=r.ref(""),l=()=>{s.value="";try{const u=Pl.ServiceRuleBuilder.create().withName(a.name).withFeatures({sendMessage:a.sendMessage,sendAttachment:a.sendAttachment});a.behavior.value&&u.withBehavior(a.behavior.value);const c=u.withBody({}).build().payload;o("submit",{...c,settings:{features:c.settings.features,...c.settings.behavior?{behavior:c.settings.behavior}:{}}})}catch(u){s.value=u instanceof Error?u.message:"Não foi possível validar a regra."}};return(u,c)=>(r.openBlock(),r.createElementBlock("form",{"aria-label":"Editar regra de atendimento",onSubmit:r.withModifiers(l,["prevent"])},[r.createVNode(r.unref(q),{col:"","gap-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-none":"",divisor:""},{default:r.withCtx(()=>[r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...c[5]||(c[5]=[r.createTextVNode("Geral",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...c[6]||(c[6]=[r.createTextVNode("Nome da regra",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(We),{modelValue:a.name,"onUpdate:modelValue":c[0]||(c[0]=d=>a.name=d),fluid:"",invalid:!a.name.trim()},{default:r.withCtx(()=>[...c[7]||(c[7]=[r.createTextVNode("Nome da regra",-1)])]),_:1},8,["modelValue","invalid"])]),_:1})]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...c[8]||(c[8]=[r.createTextVNode("Comportamento",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2",col:""},{default:r.withCtx(()=>[r.createVNode(r.unref(Gy),{modelValue:a.behavior,"onUpdate:modelValue":c[1]||(c[1]=d=>a.behavior=d),options:i,fluid:""},{default:r.withCtx(()=>[...c[9]||(c[9]=[r.createTextVNode("Selecione o comportamento",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),r.createVNode(r.unref(q),{col:"","gap-sm":"","padding-md":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:"",semibold:""},{default:r.withCtx(()=>[...c[10]||(c[10]=[r.createTextVNode("Permissões",-1)])]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...c[11]||(c[11]=[r.createTextVNode("Permitir envio de mensagens",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:a.sendMessage,"onUpdate:modelValue":c[2]||(c[2]=d=>a.sendMessage=d),"aria-label":"Permitir envio de mensagens"},null,8,["modelValue"])]),_:1})]),_:1}),r.createVNode(r.unref(Oe),null,{"col-1":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pr-2","center-between":""},{default:r.withCtx(()=>[r.createVNode(r.unref(he),{base:""},{default:r.withCtx(()=>[...c[12]||(c[12]=[r.createTextVNode("Permitir envio de anexos",-1)])]),_:1})]),_:1})]),"col-2":r.withCtx(()=>[r.createVNode(r.unref(q),{class:"yu-pl-2","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(Tn),{modelValue:a.sendAttachment,"onUpdate:modelValue":c[3]||(c[3]=d=>a.sendAttachment=d),"aria-label":"Permitir envio de anexos"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),s.value?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"!yu-text-red-600",small:"",role:"alert"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(s.value),1)]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.unref(q),{row:"","gap-sm":"","justify-end":""},{default:r.withCtx(()=>[r.createVNode(r.unref(it),{type:"button",ghost:"",onClick:c[4]||(c[4]=d=>o("cancel"))},{default:r.withCtx(()=>[...c[13]||(c[13]=[r.createTextVNode("Cancelar",-1)])]),_:1}),r.createVNode(r.unref(it),{type:"submit"},{default:r.withCtx(()=>[...c[14]||(c[14]=[r.createTextVNode("Salvar",-1)])]),_:1})]),_:1})]),_:1})],32))}}),Xm=r.defineComponent({__name:"app-service-workflow-edit-node-form",props:{workflowId:{}},emits:["close"],setup(e,{emit:t}){const n=e,o=t,i=Ja(n.workflowId),a=Ka(),s=Symbol(`workflow-edit-node-form:${n.workflowId}`),l=a.registerEditForm(n.workflowId,s),u={screen:WA,service:UA,identification:jA},c=r.computed(()=>{const d=i.editRequest.value?.rule.action;return u[d]});return r.watch(i.editRequest,(d,f)=>{l&&f&&!d&&o("close")},{flush:"sync"}),r.onBeforeUnmount(()=>{l&&a.unregisterEditForm(n.workflowId,s)}),(d,f)=>r.unref(l)&&c.value&&r.unref(i).editRequest.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.value),{key:r.unref(i).editRequest.value.rule.id,rule:r.unref(i).editRequest.value.rule,onSubmit:r.unref(i).confirmEdit,onCancel:r.unref(i).cancelEdit},null,40,["rule","onSubmit","onCancel"])):r.createCommentVNode("",!0)}});function jr(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function en(e){return typeof e=="function"?e():r.unref(e)}const GA=typeof window<"u"&&typeof document<"u",ZA=e=>typeof e<"u",qA=Object.prototype.toString,XA=e=>qA.call(e)==="[object Object]",KA=()=>{};function JA(e,t){function n(...o){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(a)})}return n}const Km=e=>e();function QA(e=Km){const t=r.ref(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:r.readonly(t),pause:n,resume:o,eventFilter:i}}function Qd(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function eY(e,t,n={}){const{eventFilter:o=Km,...i}=n;return r.watch(e,JA(o,t),i)}function bo(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:a,pause:s,resume:l,isActive:u}=QA(o);return{stop:eY(e,t,{...i,eventFilter:a}),pause:s,resume:l,isActive:u}}function tY(e,t={}){if(!r.isRef(e))return r.toRefs(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=r.customRef(()=>({get(){return e.value[o]},set(i){var a;if((a=en(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l={...e.value,[o]:i};Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function wl(e,t=!1){function n(f,{flush:h="sync",deep:p=!1,timeout:m,throwOnTimeout:g}={}){let b=null;const _=[new Promise(w=>{b=r.watch(e,v=>{f(v)!==t&&(b?.(),w(v))},{flush:h,deep:p,immediate:!0})})];return m!=null&&_.push(Qd(m,g).then(()=>en(e)).finally(()=>b?.())),Promise.race(_)}function o(f,h){if(!r.isRef(f))return n(v=>v===f,h);const{flush:p="sync",deep:m=!1,timeout:g,throwOnTimeout:b}=h??{};let y=null;const w=[new Promise(v=>{y=r.watch([e,f],([N,T])=>{t!==(N===T)&&(y?.(),v(N))},{flush:p,deep:m,immediate:!0})})];return g!=null&&w.push(Qd(g,b).then(()=>en(e)).finally(()=>(y?.(),en(e)))),Promise.race(w)}function i(f){return n(h=>!!h,f)}function a(f){return o(null,f)}function s(f){return o(void 0,f)}function l(f){return n(Number.isNaN,f)}function u(f,h){return n(p=>{const m=Array.from(p);return m.includes(f)||m.includes(en(f))},h)}function c(f){return d(1,f)}function d(f=1,h){let p=-1;return n(()=>(p+=1,p>=f),h)}return Array.isArray(en(e))?{toMatch:n,toContains:u,changed:c,changedTimes:d,get not(){return wl(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:a,toBeNaN:l,toBeUndefined:s,changed:c,changedTimes:d,get not(){return wl(e,!t)}}}function bl(e){return wl(e)}function nY(e){var t;const n=en(e);return(t=n?.$el)!=null?t:n}const Jm=GA?window:void 0;function Qm(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=Jm):[t,n,o,i]=e,!t)return KA;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],s=()=>{a.forEach(d=>d()),a.length=0},l=(d,f,h,p)=>(d.addEventListener(f,h,p),()=>d.removeEventListener(f,h,p)),u=r.watch(()=>[nY(t),en(i)],([d,f])=>{if(s(),!d)return;const h=XA(f)?{...f}:f;a.push(...n.flatMap(p=>o.map(m=>l(d,p,m,h))))},{immediate:!0,flush:"post"}),c=()=>{u(),s()};return jr(c),c}function oY(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ef(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=Jm,eventName:a="keydown",passive:s=!1,dedupe:l=!1}=o,u=oY(t);return Qm(i,a,d=>{d.repeat&&en(l)||u(d)&&n(d)},s)}function rY(e){return JSON.parse(JSON.stringify(e))}function Vs(e,t,n,o={}){var i,a,s;const{clone:l=!1,passive:u=!1,eventName:c,deep:d=!1,defaultValue:f,shouldEmit:h}=o,p=r.getCurrentInstance(),m=n||p?.emit||((i=p?.$emit)==null?void 0:i.bind(p))||((s=(a=p?.proxy)==null?void 0:a.$emit)==null?void 0:s.bind(p?.proxy));let g=c;t||(t="modelValue"),g=g||`update:${t.toString()}`;const b=w=>l?typeof l=="function"?l(w):rY(w):w,y=()=>ZA(e[t])?b(e[t]):f,_=w=>{h?h(w)&&m(g,w):m(g,w)};if(u){const w=y(),v=r.ref(w);let N=!1;return r.watch(()=>e[t],T=>{N||(N=!0,v.value=b(T),r.nextTick(()=>N=!1))}),r.watch(v,T=>{!N&&(T!==e[t]||d)&&_(T)},{deep:d}),v}else return r.computed({get(){return y()},set(w){_(w)}})}var iY={value:()=>{}};function Qa(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Li(n)}function Li(e){this._=e}function aY(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Li.prototype=Qa.prototype={constructor:Li,on:function(e,t){var n=this._,o=aY(e+"",n),i,a=-1,s=o.length;if(arguments.length<2){for(;++a<s;)if((i=(e=o[a]).type)&&(i=sY(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=o[a]).type)n[i]=tf(n[i],e.name,t);else if(t==null)for(i in n)n[i]=tf(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Li(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function sY(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function tf(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=iY,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var _l="http://www.w3.org/1999/xhtml";const nf={svg:"http://www.w3.org/2000/svg",xhtml:_l,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function es(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nf.hasOwnProperty(t)?{space:nf[t],local:e}:e}function lY(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===_l&&t.documentElement.namespaceURI===_l?t.createElement(e):t.createElementNS(n,e)}}function uY(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ev(e){var t=es(e);return(t.local?uY:lY)(t)}function cY(){}function zu(e){return e==null?cY:function(){return this.querySelector(e)}}function dY(e){typeof e!="function"&&(e=zu(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,l=o[i]=new Array(s),u,c,d=0;d<s;++d)(u=a[d])&&(c=e.call(u,u.__data__,d,a))&&("__data__"in u&&(c.__data__=u.__data__),l[d]=c);return new st(o,this._parents)}function fY(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function hY(){return[]}function tv(e){return e==null?hY:function(){return this.querySelectorAll(e)}}function pY(e){return function(){return fY(e.apply(this,arguments))}}function mY(e){typeof e=="function"?e=pY(e):e=tv(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var s=t[a],l=s.length,u,c=0;c<l;++c)(u=s[c])&&(o.push(e.call(u,u.__data__,c,s)),i.push(u));return new st(o,i)}function nv(e){return function(){return this.matches(e)}}function ov(e){return function(t){return t.matches(e)}}var vY=Array.prototype.find;function gY(e){return function(){return vY.call(this.children,e)}}function yY(){return this.firstElementChild}function wY(e){return this.select(e==null?yY:gY(typeof e=="function"?e:ov(e)))}var bY=Array.prototype.filter;function _Y(){return Array.from(this.children)}function xY(e){return function(){return bY.call(this.children,e)}}function kY(e){return this.selectAll(e==null?_Y:xY(typeof e=="function"?e:ov(e)))}function NY(e){typeof e!="function"&&(e=nv(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,l=o[i]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&l.push(u);return new st(o,this._parents)}function rv(e){return new Array(e.length)}function EY(){return new st(this._enter||this._groups.map(rv),this._parents)}function pa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}pa.prototype={constructor:pa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function CY(e){return function(){return e}}function SY(e,t,n,o,i,a){for(var s=0,l,u=t.length,c=a.length;s<c;++s)(l=t[s])?(l.__data__=a[s],o[s]=l):n[s]=new pa(e,a[s]);for(;s<u;++s)(l=t[s])&&(i[s]=l)}function DY(e,t,n,o,i,a,s){var l,u,c=new Map,d=t.length,f=a.length,h=new Array(d),p;for(l=0;l<d;++l)(u=t[l])&&(h[l]=p=s.call(u,u.__data__,l,t)+"",c.has(p)?i[l]=u:c.set(p,u));for(l=0;l<f;++l)p=s.call(e,a[l],l,a)+"",(u=c.get(p))?(o[l]=u,u.__data__=a[l],c.delete(p)):n[l]=new pa(e,a[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(h[l])===u&&(i[l]=u)}function MY(e){return e.__data__}function TY(e,t){if(!arguments.length)return Array.from(this,MY);var n=t?DY:SY,o=this._parents,i=this._groups;typeof e!="function"&&(e=CY(e));for(var a=i.length,s=new Array(a),l=new Array(a),u=new Array(a),c=0;c<a;++c){var d=o[c],f=i[c],h=f.length,p=VY(e.call(d,d&&d.__data__,c,o)),m=p.length,g=l[c]=new Array(m),b=s[c]=new Array(m),y=u[c]=new Array(h);n(d,f,g,b,y,p,t);for(var _=0,w=0,v,N;_<m;++_)if(v=g[_]){for(_>=w&&(w=_+1);!(N=b[w])&&++w<m;);v._next=N||null}}return s=new st(s,o),s._enter=l,s._exit=u,s}function VY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OY(){return new st(this._exit||this._groups.map(rv),this._parents)}function $Y(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function BY(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,s=Math.min(i,a),l=new Array(i),u=0;u<s;++u)for(var c=n[u],d=o[u],f=c.length,h=l[u]=new Array(f),p,m=0;m<f;++m)(p=c[m]||d[m])&&(h[m]=p);for(;u<i;++u)l[u]=n[u];return new st(l,this._parents)}function PY(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],s;--i>=0;)(s=o[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function AY(e){e||(e=YY);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var s=n[a],l=s.length,u=i[a]=new Array(l),c,d=0;d<l;++d)(c=s[d])&&(u[d]=c);u.sort(t)}return new st(i,this._parents).order()}function YY(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function IY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zY(){return Array.from(this)}function RY(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var s=o[i];if(s)return s}return null}function LY(){let e=0;for(const t of this)++e;return e}function FY(){return!this.node()}function HY(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,s=i.length,l;a<s;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function jY(e){return function(){this.removeAttribute(e)}}function WY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function UY(e,t){return function(){this.setAttribute(e,t)}}function GY(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZY(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qY(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function XY(e,t){var n=es(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?WY:jY:typeof t=="function"?n.local?qY:ZY:n.local?GY:UY)(n,t))}function iv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function KY(e){return function(){this.style.removeProperty(e)}}function JY(e,t,n){return function(){this.style.setProperty(e,t,n)}}function QY(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function eI(e,t,n){return arguments.length>1?this.each((t==null?KY:typeof t=="function"?QY:JY)(e,t,n??"")):Ro(this.node(),e)}function Ro(e,t){return e.style.getPropertyValue(t)||iv(e).getComputedStyle(e,null).getPropertyValue(t)}function tI(e){return function(){delete this[e]}}function nI(e,t){return function(){this[e]=t}}function oI(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function rI(e,t){return arguments.length>1?this.each((t==null?tI:typeof t=="function"?oI:nI)(e,t)):this.node()[e]}function av(e){return e.trim().split(/^|\s+/)}function Ru(e){return e.classList||new sv(e)}function sv(e){this._node=e,this._names=av(e.getAttribute("class")||"")}sv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lv(e,t){for(var n=Ru(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function uv(e,t){for(var n=Ru(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function iI(e){return function(){lv(this,e)}}function aI(e){return function(){uv(this,e)}}function sI(e,t){return function(){(t.apply(this,arguments)?lv:uv)(this,e)}}function lI(e,t){var n=av(e+"");if(arguments.length<2){for(var o=Ru(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?sI:t?iI:aI)(n,t))}function uI(){this.textContent=""}function cI(e){return function(){this.textContent=e}}function dI(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function fI(e){return arguments.length?this.each(e==null?uI:(typeof e=="function"?dI:cI)(e)):this.node().textContent}function hI(){this.innerHTML=""}function pI(e){return function(){this.innerHTML=e}}function mI(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vI(e){return arguments.length?this.each(e==null?hI:(typeof e=="function"?mI:pI)(e)):this.node().innerHTML}function gI(){this.nextSibling&&this.parentNode.appendChild(this)}function yI(){return this.each(gI)}function wI(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bI(){return this.each(wI)}function _I(e){var t=typeof e=="function"?e:ev(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xI(){return null}function kI(e,t){var n=typeof e=="function"?e:ev(e),o=t==null?xI:typeof t=="function"?t:zu(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function NI(){var e=this.parentNode;e&&e.removeChild(this)}function EI(){return this.each(NI)}function CI(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function SI(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function DI(e){return this.select(e?SI:CI)}function MI(e){return arguments.length?this.property("__data__",e):this.node().__data__}function TI(e){return function(t){e.call(this,t,this.__data__)}}function VI(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function OI(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function $I(e,t,n){return function(){var o=this.__on,i,a=TI(t);if(o){for(var s=0,l=o.length;s<l;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function BI(e,t,n){var o=VI(e+""),i,a=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,c=l.length,d;u<c;++u)for(i=0,d=l[u];i<a;++i)if((s=o[i]).type===d.type&&s.name===d.name)return d.value}return}for(l=t?$I:OI,i=0;i<a;++i)this.each(l(o[i],t,n));return this}function cv(e,t,n){var o=iv(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function PI(e,t){return function(){return cv(this,e,t)}}function AI(e,t){return function(){return cv(this,e,t.apply(this,arguments))}}function YI(e,t){return this.each((typeof t=="function"?AI:PI)(e,t))}function*II(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,s;i<a;++i)(s=o[i])&&(yield s)}var dv=[null];function st(e,t){this._groups=e,this._parents=t}function ai(){return new st([[document.documentElement]],dv)}function zI(){return this}st.prototype=ai.prototype={constructor:st,select:dY,selectAll:mY,selectChild:wY,selectChildren:kY,filter:NY,data:TY,enter:EY,exit:OY,join:$Y,merge:BY,selection:zI,order:PY,sort:AY,call:IY,nodes:zY,node:RY,size:LY,empty:FY,each:HY,attr:XY,style:eI,property:rI,classed:lI,text:fI,html:vI,raise:yI,lower:bI,append:_I,insert:kI,remove:EI,clone:DI,datum:MI,on:BI,dispatch:YI,[Symbol.iterator]:II};function bt(e){return typeof e=="string"?new st([[document.querySelector(e)]],[document.documentElement]):new st([[e]],dv)}function RI(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ot(e,t){if(e=RI(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const LI={passive:!1},Wr={capture:!0,passive:!1};function Os(e){e.stopImmediatePropagation()}function Vo(e){e.preventDefault(),e.stopImmediatePropagation()}function fv(e){var t=e.document.documentElement,n=bt(e).on("dragstart.drag",Vo,Wr);"onselectstart"in t?n.on("selectstart.drag",Vo,Wr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hv(e,t){var n=e.document.documentElement,o=bt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Vo,Wr),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const _i=e=>()=>e;function xl(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:s,y:l,dx:u,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}xl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function FI(e){return!e.ctrlKey&&!e.button}function HI(){return this.parentNode}function jI(e,t){return t??{x:e.x,y:e.y}}function WI(){return navigator.maxTouchPoints||"ontouchstart"in this}function UI(){var e=FI,t=HI,n=jI,o=WI,i={},a=Qa("start","drag","end"),s=0,l,u,c,d,f=0;function h(v){v.on("mousedown.drag",p).filter(o).on("touchstart.drag",b).on("touchmove.drag",y,LI).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(v,N){if(!(d||!e.call(this,v,N))){var T=w(this,t.call(this,v,N),v,N,"mouse");T&&(bt(v.view).on("mousemove.drag",m,Wr).on("mouseup.drag",g,Wr),fv(v.view),Os(v),c=!1,l=v.clientX,u=v.clientY,T("start",v))}}function m(v){if(Vo(v),!c){var N=v.clientX-l,T=v.clientY-u;c=N*N+T*T>f}i.mouse("drag",v)}function g(v){bt(v.view).on("mousemove.drag mouseup.drag",null),hv(v.view,c),Vo(v),i.mouse("end",v)}function b(v,N){if(e.call(this,v,N)){var T=v.changedTouches,V=t.call(this,v,N),$=T.length,P,A;for(P=0;P<$;++P)(A=w(this,V,v,N,T[P].identifier,T[P]))&&(Os(v),A("start",v,T[P]))}}function y(v){var N=v.changedTouches,T=N.length,V,$;for(V=0;V<T;++V)($=i[N[V].identifier])&&(Vo(v),$("drag",v,N[V]))}function _(v){var N=v.changedTouches,T=N.length,V,$;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),V=0;V<T;++V)($=i[N[V].identifier])&&(Os(v),$("end",v,N[V]))}function w(v,N,T,V,$,P){var A=a.copy(),O=Ot(P||T,N),x,R,k;if((k=n.call(v,new xl("beforestart",{sourceEvent:T,target:h,identifier:$,active:s,x:O[0],y:O[1],dx:0,dy:0,dispatch:A}),V))!=null)return x=k.x-O[0]||0,R=k.y-O[1]||0,function M(S,L,F){var j=O,I;switch(S){case"start":i[$]=M,I=s++;break;case"end":delete i[$],--s;case"drag":O=Ot(F||L,N),I=s;break}A.call(S,v,new xl(S,{sourceEvent:L,subject:k,target:h,identifier:$,active:I,x:O[0]+x,y:O[1]+R,dx:O[0]-j[0],dy:O[1]-j[1],dispatch:A}),V)}}return h.filter=function(v){return arguments.length?(e=typeof v=="function"?v:_i(!!v),h):e},h.container=function(v){return arguments.length?(t=typeof v=="function"?v:_i(v),h):t},h.subject=function(v){return arguments.length?(n=typeof v=="function"?v:_i(v),h):n},h.touchable=function(v){return arguments.length?(o=typeof v=="function"?v:_i(!!v),h):o},h.on=function(){var v=a.on.apply(a,arguments);return v===a?h:v},h.clickDistance=function(v){return arguments.length?(f=(v=+v)*v,h):Math.sqrt(f)},h}function Lu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pv(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function si(){}var Ur=.7,ma=1/Ur,Oo="\\s*([+-]?\\d+)\\s*",Gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GI=/^#([0-9a-f]{3,8})$/,ZI=new RegExp(`^rgb\\(${Oo},${Oo},${Oo}\\)$`),qI=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),XI=new RegExp(`^rgba\\(${Oo},${Oo},${Oo},${Gr}\\)$`),KI=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${Gr}\\)$`),JI=new RegExp(`^hsl\\(${Gr},${Ft},${Ft}\\)$`),QI=new RegExp(`^hsla\\(${Gr},${Ft},${Ft},${Gr}\\)$`),of={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Lu(si,ro,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rf,formatHex:rf,formatHex8:e3,formatHsl:t3,formatRgb:af,toString:af});function rf(){return this.rgb().formatHex()}function e3(){return this.rgb().formatHex8()}function t3(){return mv(this).formatHsl()}function af(){return this.rgb().formatRgb()}function ro(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sf(t):n===3?new tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZI.exec(e))?new tt(t[1],t[2],t[3],1):(t=qI.exec(e))?new tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XI.exec(e))?xi(t[1],t[2],t[3],t[4]):(t=KI.exec(e))?xi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JI.exec(e))?cf(t[1],t[2]/100,t[3]/100,1):(t=QI.exec(e))?cf(t[1],t[2]/100,t[3]/100,t[4]):of.hasOwnProperty(e)?sf(of[e]):e==="transparent"?new tt(NaN,NaN,NaN,0):null}function sf(e){return new tt(e>>16&255,e>>8&255,e&255,1)}function xi(e,t,n,o){return o<=0&&(e=t=n=NaN),new tt(e,t,n,o)}function n3(e){return e instanceof si||(e=ro(e)),e?(e=e.rgb(),new tt(e.r,e.g,e.b,e.opacity)):new tt}function kl(e,t,n,o){return arguments.length===1?n3(e):new tt(e,t,n,o??1)}function tt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Lu(tt,kl,pv(si,{brighter(e){return e=e==null?ma:Math.pow(ma,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tt(eo(this.r),eo(this.g),eo(this.b),va(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lf,formatHex:lf,formatHex8:o3,formatRgb:uf,toString:uf}));function lf(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}`}function o3(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}${Xn((isNaN(this.opacity)?1:this.opacity)*255)}`}function uf(){const e=va(this.opacity);return`${e===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${e===1?")":`, ${e})`}`}function va(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xn(e){return e=eo(e),(e<16?"0":"")+e.toString(16)}function cf(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _t(e,t,n,o)}function mv(e){if(e instanceof _t)return new _t(e.h,e.s,e.l,e.opacity);if(e instanceof si||(e=ro(e)),!e)return new _t;if(e instanceof _t)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),s=NaN,l=a-i,u=(a+i)/2;return l?(t===a?s=(n-o)/l+(n<o)*6:n===a?s=(o-t)/l+2:s=(t-n)/l+4,l/=u<.5?a+i:2-a-i,s*=60):l=u>0&&u<1?0:s,new _t(s,l,u,e.opacity)}function r3(e,t,n,o){return arguments.length===1?mv(e):new _t(e,t,n,o??1)}function _t(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Lu(_t,r3,pv(si,{brighter(e){return e=e==null?ma:Math.pow(ma,e),new _t(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new _t(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new tt($s(e>=240?e-240:e+120,i,o),$s(e,i,o),$s(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new _t(df(this.h),ki(this.s),ki(this.l),va(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=va(this.opacity);return`${e===1?"hsl(":"hsla("}${df(this.h)}, ${ki(this.s)*100}%, ${ki(this.l)*100}%${e===1?")":`, ${e})`}`}}));function df(e){return e=(e||0)%360,e<0?e+360:e}function ki(e){return Math.max(0,Math.min(1,e||0))}function $s(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Fu=e=>()=>e;function i3(e,t){return function(n){return e+n*t}}function a3(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function s3(e){return(e=+e)==1?vv:function(t,n){return n-t?a3(t,n,e):Fu(isNaN(t)?n:t)}}function vv(e,t){var n=t-e;return n?i3(e,n):Fu(isNaN(e)?t:e)}const ga=(function e(t){var n=s3(t);function o(i,a){var s=n((i=kl(i)).r,(a=kl(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),c=vv(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=l(d),i.b=u(d),i.opacity=c(d),i+""}}return o.gamma=e,o})(1);function l3(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function u3(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function c3(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),s;for(s=0;s<o;++s)i[s]=Dr(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(l){for(s=0;s<o;++s)a[s]=i[s](l);return a}}function d3(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function $t(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function f3(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Dr(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Nl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bs=new RegExp(Nl.source,"g");function h3(e){return function(){return e}}function p3(e){return function(t){return e(t)+""}}function gv(e,t){var n=Nl.lastIndex=Bs.lastIndex=0,o,i,a,s=-1,l=[],u=[];for(e=e+"",t=t+"";(o=Nl.exec(e))&&(i=Bs.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[s]?l[s]+=a:l[++s]=a),(o=o[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,u.push({i:s,x:$t(o,i)})),n=Bs.lastIndex;return n<t.length&&(a=t.slice(n),l[s]?l[s]+=a:l[++s]=a),l.length<2?u[0]?p3(u[0].x):h3(t):(t=u.length,function(c){for(var d=0,f;d<t;++d)l[(f=u[d]).i]=f.x(c);return l.join("")})}function Dr(e,t){var n=typeof t,o;return t==null||n==="boolean"?Fu(t):(n==="number"?$t:n==="string"?(o=ro(t))?(t=o,ga):gv:t instanceof ro?ga:t instanceof Date?d3:u3(t)?l3:Array.isArray(t)?c3:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?f3:$t)(e,t)}var ff=180/Math.PI,El={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yv(e,t,n,o,i,a){var s,l,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,u/=l),e*o<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*ff,skewX:Math.atan(u)*ff,scaleX:s,scaleY:l}}var Ni;function m3(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?El:yv(t.a,t.b,t.c,t.d,t.e,t.f)}function v3(e){return e==null||(Ni||(Ni=document.createElementNS("http://www.w3.org/2000/svg","g")),Ni.setAttribute("transform",e),!(e=Ni.transform.baseVal.consolidate()))?El:(e=e.matrix,yv(e.a,e.b,e.c,e.d,e.e,e.f))}function wv(e,t,n,o){function i(c){return c.length?c.pop()+" ":""}function a(c,d,f,h,p,m){if(c!==f||d!==h){var g=p.push("translate(",null,t,null,n);m.push({i:g-4,x:$t(c,f)},{i:g-2,x:$t(d,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(c,d,f,h){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),h.push({i:f.push(i(f)+"rotate(",null,o)-2,x:$t(c,d)})):d&&f.push(i(f)+"rotate("+d+o)}function l(c,d,f,h){c!==d?h.push({i:f.push(i(f)+"skewX(",null,o)-2,x:$t(c,d)}):d&&f.push(i(f)+"skewX("+d+o)}function u(c,d,f,h,p,m){if(c!==f||d!==h){var g=p.push(i(p)+"scale(",null,",",null,")");m.push({i:g-4,x:$t(c,f)},{i:g-2,x:$t(d,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(c,d){var f=[],h=[];return c=e(c),d=e(d),a(c.translateX,c.translateY,d.translateX,d.translateY,f,h),s(c.rotate,d.rotate,f,h),l(c.skewX,d.skewX,f,h),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,h),c=d=null,function(p){for(var m=-1,g=h.length,b;++m<g;)f[(b=h[m]).i]=b.x(p);return f.join("")}}}var g3=wv(m3,"px, ","px)","deg)"),y3=wv(v3,", ",")",")"),w3=1e-12;function hf(e){return((e=Math.exp(e))+1/e)/2}function b3(e){return((e=Math.exp(e))-1/e)/2}function _3(e){return((e=Math.exp(2*e))-1)/(e+1)}const Fi=(function e(t,n,o){function i(a,s){var l=a[0],u=a[1],c=a[2],d=s[0],f=s[1],h=s[2],p=d-l,m=f-u,g=p*p+m*m,b,y;if(g<w3)y=Math.log(h/c)/t,b=function(V){return[l+V*p,u+V*m,c*Math.exp(t*V*y)]};else{var _=Math.sqrt(g),w=(h*h-c*c+o*g)/(2*c*n*_),v=(h*h-c*c-o*g)/(2*h*n*_),N=Math.log(Math.sqrt(w*w+1)-w),T=Math.log(Math.sqrt(v*v+1)-v);y=(T-N)/t,b=function(V){var $=V*y,P=hf(N),A=c/(n*_)*(P*_3(t*$+N)-b3(N));return[l+A*p,u+A*m,c*P/hf(t*$+N)]}}return b.duration=y*1e3*t/Math.SQRT2,b}return i.rho=function(a){var s=Math.max(.001,+a),l=s*s,u=l*l;return e(s,l,u)},i})(Math.SQRT2,2,4);var Lo=0,gr=0,hr=0,bv=1e3,ya,yr,wa=0,io=0,ts=0,Zr=typeof performance=="object"&&performance.now?performance:Date,_v=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Hu(){return io||(_v(x3),io=Zr.now()+ts)}function x3(){io=0}function ba(){this._call=this._time=this._next=null}ba.prototype=xv.prototype={constructor:ba,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Hu():+n)+(t==null?0:+t),!this._next&&yr!==this&&(yr?yr._next=this:ya=this,yr=this),this._call=e,this._time=n,Cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cl())}};function xv(e,t,n){var o=new ba;return o.restart(e,t,n),o}function k3(){Hu(),++Lo;for(var e=ya,t;e;)(t=io-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Lo}function pf(){io=(wa=Zr.now())+ts,Lo=gr=0;try{k3()}finally{Lo=0,E3(),io=0}}function N3(){var e=Zr.now(),t=e-wa;t>bv&&(ts-=t,wa=e)}function E3(){for(var e,t=ya,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ya=n);yr=e,Cl(o)}function Cl(e){if(!Lo){gr&&(gr=clearTimeout(gr));var t=e-io;t>24?(e<1/0&&(gr=setTimeout(pf,e-Zr.now()-ts)),hr&&(hr=clearInterval(hr))):(hr||(wa=Zr.now(),hr=setInterval(N3,bv)),Lo=1,_v(pf))}}function mf(e,t,n){var o=new ba;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var C3=Qa("start","end","cancel","interrupt"),S3=[],kv=0,vf=1,Sl=2,Hi=3,gf=4,Dl=5,ji=6;function ns(e,t,n,o,i,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;D3(e,n,{name:t,index:o,group:i,on:C3,tween:S3,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:kv})}function ju(e,t){var n=Tt(e,t);if(n.state>kv)throw new Error("too late; already scheduled");return n}function Xt(e,t){var n=Tt(e,t);if(n.state>Hi)throw new Error("too late; already running");return n}function Tt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function D3(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=xv(a,0,n.time);function a(c){n.state=vf,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var d,f,h,p;if(n.state!==vf)return u();for(d in o)if(p=o[d],p.name===n.name){if(p.state===Hi)return mf(s);p.state===gf?(p.state=ji,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[d]):+d<t&&(p.state=ji,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[d])}if(mf(function(){n.state===Hi&&(n.state=gf,n.timer.restart(l,n.delay,n.time),l(c))}),n.state=Sl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Sl){for(n.state=Hi,i=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(p=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function l(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Dl,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);n.state===Dl&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ji,n.timer.stop(),delete o[t];for(var c in o)return;delete e.__transition}}function Wi(e,t){var n=e.__transition,o,i,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){a=!1;continue}i=o.state>Sl&&o.state<Dl,o.state=ji,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}a&&delete e.__transition}}function M3(e){return this.each(function(){Wi(this,e)})}function T3(e,t){var n,o;return function(){var i=Xt(this,e),a=i.tween;if(a!==n){o=n=a;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function V3(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Xt(this,e),s=a.tween;if(s!==o){i=(o=s).slice();for(var l={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=l;break}u===c&&i.push(l)}a.tween=i}}function O3(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Tt(this.node(),n).tween,i=0,a=o.length,s;i<a;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?T3:V3)(n,e,t))}function Wu(e,t,n){var o=e._id;return e.each(function(){var i=Xt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Tt(i,o).value[t]}}function Nv(e,t){var n;return(typeof t=="number"?$t:t instanceof ro?ga:(n=ro(t))?(t=n,ga):gv)(e,t)}function $3(e){return function(){this.removeAttribute(e)}}function B3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P3(e,t,n){var o,i=n+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===o?a:a=t(o=s,n)}}function A3(e,t,n){var o,i=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?a:a=t(o=s,n)}}function Y3(e,t,n){var o,i,a;return function(){var s,l=n(this),u;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=l+"",s===u?null:s===o&&u===i?a:(i=u,a=t(o=s,l)))}}function I3(e,t,n){var o,i,a;return function(){var s,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=l+"",s===u?null:s===o&&u===i?a:(i=u,a=t(o=s,l)))}}function z3(e,t){var n=es(e),o=n==="transform"?y3:Nv;return this.attrTween(e,typeof t=="function"?(n.local?I3:Y3)(n,o,Wu(this,"attr."+e,t)):t==null?(n.local?B3:$3)(n):(n.local?A3:P3)(n,o,t))}function R3(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function L3(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function F3(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&L3(e,a)),n}return i._value=t,i}function H3(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&R3(e,a)),n}return i._value=t,i}function j3(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=es(e);return this.tween(n,(o.local?F3:H3)(o,t))}function W3(e,t){return function(){ju(this,e).delay=+t.apply(this,arguments)}}function U3(e,t){return t=+t,function(){ju(this,e).delay=t}}function G3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?W3:U3)(t,e)):Tt(this.node(),t).delay}function Z3(e,t){return function(){Xt(this,e).duration=+t.apply(this,arguments)}}function q3(e,t){return t=+t,function(){Xt(this,e).duration=t}}function X3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Z3:q3)(t,e)):Tt(this.node(),t).duration}function K3(e,t){if(typeof t!="function")throw new Error;return function(){Xt(this,e).ease=t}}function J3(e){var t=this._id;return arguments.length?this.each(K3(t,e)):Tt(this.node(),t).ease}function Q3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xt(this,e).ease=n}}function ez(e){if(typeof e!="function")throw new Error;return this.each(Q3(this._id,e))}function tz(e){typeof e!="function"&&(e=nv(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,l=o[i]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&l.push(u);return new mn(o,this._parents,this._name,this._id)}function nz(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var u=t[l],c=n[l],d=u.length,f=s[l]=new Array(d),h,p=0;p<d;++p)(h=u[p]||c[p])&&(f[p]=h);for(;l<o;++l)s[l]=t[l];return new mn(s,this._parents,this._name,this._id)}function oz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function rz(e,t,n){var o,i,a=oz(t)?ju:Xt;return function(){var s=a(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function iz(e,t){var n=this._id;return arguments.length<2?Tt(this.node(),n).on.on(e):this.each(rz(n,e,t))}function az(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function sz(){return this.on("end.remove",az(this._id))}function lz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=zu(e));for(var o=this._groups,i=o.length,a=new Array(i),s=0;s<i;++s)for(var l=o[s],u=l.length,c=a[s]=new Array(u),d,f,h=0;h<u;++h)(d=l[h])&&(f=e.call(d,d.__data__,h,l))&&("__data__"in d&&(f.__data__=d.__data__),c[h]=f,ns(c[h],t,n,h,c,Tt(d,n)));return new mn(a,this._parents,t,n)}function uz(e){var t=this._name,n=this._id;typeof e!="function"&&(e=tv(e));for(var o=this._groups,i=o.length,a=[],s=[],l=0;l<i;++l)for(var u=o[l],c=u.length,d,f=0;f<c;++f)if(d=u[f]){for(var h=e.call(d,d.__data__,f,u),p,m=Tt(d,n),g=0,b=h.length;g<b;++g)(p=h[g])&&ns(p,t,n,g,h,m);a.push(h),s.push(d)}return new mn(a,s,t,n)}var cz=ai.prototype.constructor;function dz(){return new cz(this._groups,this._parents)}function fz(e,t){var n,o,i;return function(){var a=Ro(this,e),s=(this.style.removeProperty(e),Ro(this,e));return a===s?null:a===n&&s===o?i:i=t(n=a,o=s)}}function Ev(e){return function(){this.style.removeProperty(e)}}function hz(e,t,n){var o,i=n+"",a;return function(){var s=Ro(this,e);return s===i?null:s===o?a:a=t(o=s,n)}}function pz(e,t,n){var o,i,a;return function(){var s=Ro(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Ro(this,e))),s===u?null:s===o&&u===i?a:(i=u,a=t(o=s,l))}}function mz(e,t){var n,o,i,a="style."+t,s="end."+a,l;return function(){var u=Xt(this,e),c=u.on,d=u.value[a]==null?l||(l=Ev(t)):void 0;(c!==n||i!==d)&&(o=(n=c).copy()).on(s,i=d),u.on=o}}function vz(e,t,n){var o=(e+="")=="transform"?g3:Nv;return t==null?this.styleTween(e,fz(e,o)).on("end.style."+e,Ev(e)):typeof t=="function"?this.styleTween(e,pz(e,o,Wu(this,"style."+e,t))).each(mz(this._id,e)):this.styleTween(e,hz(e,o,t),n).on("end.style."+e,null)}function gz(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function yz(e,t,n){var o,i;function a(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&gz(e,s,n)),o}return a._value=t,a}function wz(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,yz(e,t,n??""))}function bz(e){return function(){this.textContent=e}}function _z(e){return function(){var t=e(this);this.textContent=t??""}}function xz(e){return this.tween("text",typeof e=="function"?_z(Wu(this,"text",e)):bz(e==null?"":e+""))}function kz(e){return function(t){this.textContent=e.call(this,t)}}function Nz(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&kz(i)),t}return o._value=e,o}function Ez(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Nz(e))}function Cz(){for(var e=this._name,t=this._id,n=Cv(),o=this._groups,i=o.length,a=0;a<i;++a)for(var s=o[a],l=s.length,u,c=0;c<l;++c)if(u=s[c]){var d=Tt(u,t);ns(u,e,n,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new mn(o,this._parents,e,n)}function Sz(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,s){var l={value:s},u={value:function(){--i===0&&a()}};n.each(function(){var c=Xt(this,o),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),c.on=t}),i===0&&a()})}var Dz=0;function mn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Cv(){return++Dz}var Jt=ai.prototype;mn.prototype={constructor:mn,select:lz,selectAll:uz,selectChild:Jt.selectChild,selectChildren:Jt.selectChildren,filter:tz,merge:nz,selection:dz,transition:Cz,call:Jt.call,nodes:Jt.nodes,node:Jt.node,size:Jt.size,empty:Jt.empty,each:Jt.each,on:iz,attr:z3,attrTween:j3,style:vz,styleTween:wz,text:xz,textTween:Ez,remove:sz,tween:O3,delay:G3,duration:X3,ease:J3,easeVarying:ez,end:Sz,[Symbol.iterator]:Jt[Symbol.iterator]};function Mz(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Tz={time:null,delay:0,duration:250,ease:Mz};function Vz(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Oz(e){var t,n;e instanceof mn?(t=e._id,e=e._name):(t=Cv(),(n=Tz).time=Hu(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var s=o[a],l=s.length,u,c=0;c<l;++c)(u=s[c])&&ns(u,e,t,c,s,n||Vz(u,t));return new mn(o,this._parents,e,t)}ai.prototype.interrupt=M3;ai.prototype.transition=Oz;const Ei=e=>()=>e;function $z(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function sn(e,t,n){this.k=e,this.x=t,this.y=n}sn.prototype={constructor:sn,scale:function(e){return e===1?this:new sn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new sn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Fo=new sn(1,0,0);sn.prototype;function Ps(e){e.stopImmediatePropagation()}function pr(e){e.preventDefault(),e.stopImmediatePropagation()}function Bz(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Pz(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function yf(){return this.__zoom||Fo}function Az(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Yz(){return navigator.maxTouchPoints||"ontouchstart"in this}function Iz(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function zz(){var e=Bz,t=Pz,n=Iz,o=Az,i=Yz,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Fi,c=Qa("start","zoom","end"),d,f,h,p=500,m=150,g=0,b=10;function y(k){k.property("__zoom",yf).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",O).on("touchmove.zoom",x).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(k,M,S,L){var F=k.selection?k.selection():k;F.property("__zoom",yf),k!==F?N(k,M,S,L):F.interrupt().each(function(){T(this,arguments).event(L).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},y.scaleBy=function(k,M,S,L){y.scaleTo(k,function(){var F=this.__zoom.k,j=typeof M=="function"?M.apply(this,arguments):M;return F*j},S,L)},y.scaleTo=function(k,M,S,L){y.transform(k,function(){var F=t.apply(this,arguments),j=this.__zoom,I=S==null?v(F):typeof S=="function"?S.apply(this,arguments):S,G=j.invert(I),W=typeof M=="function"?M.apply(this,arguments):M;return n(w(_(j,W),I,G),F,s)},S,L)},y.translateBy=function(k,M,S,L){y.transform(k,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof S=="function"?S.apply(this,arguments):S),t.apply(this,arguments),s)},null,L)},y.translateTo=function(k,M,S,L,F){y.transform(k,function(){var j=t.apply(this,arguments),I=this.__zoom,G=L==null?v(j):typeof L=="function"?L.apply(this,arguments):L;return n(Fo.translate(G[0],G[1]).scale(I.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof S=="function"?-S.apply(this,arguments):-S),j,s)},L,F)};function _(k,M){return M=Math.max(a[0],Math.min(a[1],M)),M===k.k?k:new sn(M,k.x,k.y)}function w(k,M,S){var L=M[0]-S[0]*k.k,F=M[1]-S[1]*k.k;return L===k.x&&F===k.y?k:new sn(k.k,L,F)}function v(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function N(k,M,S,L){k.on("start.zoom",function(){T(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(L).end()}).tween("zoom",function(){var F=this,j=arguments,I=T(F,j).event(L),G=t.apply(F,j),W=S==null?v(G):typeof S=="function"?S.apply(F,j):S,ue=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),ie=F.__zoom,X=typeof M=="function"?M.apply(F,j):M,K=u(ie.invert(W).concat(ue/ie.k),X.invert(W).concat(ue/X.k));return function(Q){if(Q===1)Q=X;else{var ve=K(Q),_e=ue/ve[2];Q=new sn(_e,W[0]-ve[0]*_e,W[1]-ve[1]*_e)}I.zoom(null,Q)}})}function T(k,M,S){return!S&&k.__zooming||new V(k,M)}function V(k,M){this.that=k,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(k,M),this.taps=0}V.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,M){return this.mouse&&k!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var M=bt(this.that).datum();c.call(k,this.that,new $z(k,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),M)}};function $(k,...M){if(!e.apply(this,arguments))return;var S=T(this,M).event(k),L=this.__zoom,F=Math.max(a[0],Math.min(a[1],L.k*Math.pow(2,o.apply(this,arguments)))),j=Ot(k);if(S.wheel)(S.mouse[0][0]!==j[0]||S.mouse[0][1]!==j[1])&&(S.mouse[1]=L.invert(S.mouse[0]=j)),clearTimeout(S.wheel);else{if(L.k===F)return;S.mouse=[j,L.invert(j)],Wi(this),S.start()}pr(k),S.wheel=setTimeout(I,m),S.zoom("mouse",n(w(_(L,F),S.mouse[0],S.mouse[1]),S.extent,s));function I(){S.wheel=null,S.end()}}function P(k,...M){if(h||!e.apply(this,arguments))return;var S=k.currentTarget,L=T(this,M,!0).event(k),F=bt(k.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",ue,!0),j=Ot(k,S),I=k.clientX,G=k.clientY;fv(k.view),Ps(k),L.mouse=[j,this.__zoom.invert(j)],Wi(this),L.start();function W(ie){if(pr(ie),!L.moved){var X=ie.clientX-I,K=ie.clientY-G;L.moved=X*X+K*K>g}L.event(ie).zoom("mouse",n(w(L.that.__zoom,L.mouse[0]=Ot(ie,S),L.mouse[1]),L.extent,s))}function ue(ie){F.on("mousemove.zoom mouseup.zoom",null),hv(ie.view,L.moved),pr(ie),L.event(ie).end()}}function A(k,...M){if(e.apply(this,arguments)){var S=this.__zoom,L=Ot(k.changedTouches?k.changedTouches[0]:k,this),F=S.invert(L),j=S.k*(k.shiftKey?.5:2),I=n(w(_(S,j),L,F),t.apply(this,M),s);pr(k),l>0?bt(this).transition().duration(l).call(N,I,L,k):bt(this).call(y.transform,I,L,k)}}function O(k,...M){if(e.apply(this,arguments)){var S=k.touches,L=S.length,F=T(this,M,k.changedTouches.length===L).event(k),j,I,G,W;for(Ps(k),I=0;I<L;++I)G=S[I],W=Ot(G,this),W=[W,this.__zoom.invert(W),G.identifier],F.touch0?!F.touch1&&F.touch0[2]!==W[2]&&(F.touch1=W,F.taps=0):(F.touch0=W,j=!0,F.taps=1+!!d);d&&(d=clearTimeout(d)),j&&(F.taps<2&&(f=W[0],d=setTimeout(function(){d=null},p)),Wi(this),F.start())}}function x(k,...M){if(this.__zooming){var S=T(this,M).event(k),L=k.changedTouches,F=L.length,j,I,G,W;for(pr(k),j=0;j<F;++j)I=L[j],G=Ot(I,this),S.touch0&&S.touch0[2]===I.identifier?S.touch0[0]=G:S.touch1&&S.touch1[2]===I.identifier&&(S.touch1[0]=G);if(I=S.that.__zoom,S.touch1){var ue=S.touch0[0],ie=S.touch0[1],X=S.touch1[0],K=S.touch1[1],Q=(Q=X[0]-ue[0])*Q+(Q=X[1]-ue[1])*Q,ve=(ve=K[0]-ie[0])*ve+(ve=K[1]-ie[1])*ve;I=_(I,Math.sqrt(Q/ve)),G=[(ue[0]+X[0])/2,(ue[1]+X[1])/2],W=[(ie[0]+K[0])/2,(ie[1]+K[1])/2]}else if(S.touch0)G=S.touch0[0],W=S.touch0[1];else return;S.zoom("touch",n(w(I,G,W),S.extent,s))}}function R(k,...M){if(this.__zooming){var S=T(this,M).event(k),L=k.changedTouches,F=L.length,j,I;for(Ps(k),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),j=0;j<F;++j)I=L[j],S.touch0&&S.touch0[2]===I.identifier?delete S.touch0:S.touch1&&S.touch1[2]===I.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(I=Ot(I,this),Math.hypot(f[0]-I[0],f[1]-I[1])<b)){var G=bt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return y.wheelDelta=function(k){return arguments.length?(o=typeof k=="function"?k:Ei(+k),y):o},y.filter=function(k){return arguments.length?(e=typeof k=="function"?k:Ei(!!k),y):e},y.touchable=function(k){return arguments.length?(i=typeof k=="function"?k:Ei(!!k),y):i},y.extent=function(k){return arguments.length?(t=typeof k=="function"?k:Ei([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),y):t},y.scaleExtent=function(k){return arguments.length?(a[0]=+k[0],a[1]=+k[1],y):[a[0],a[1]]},y.translateExtent=function(k){return arguments.length?(s[0][0]=+k[0][0],s[1][0]=+k[1][0],s[0][1]=+k[0][1],s[1][1]=+k[1][1],y):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},y.constrain=function(k){return arguments.length?(n=k,y):n},y.duration=function(k){return arguments.length?(l=+k,y):l},y.interpolate=function(k){return arguments.length?(u=k,y):u},y.on=function(){var k=c.on.apply(c,arguments);return k===c?y:k},y.clickDistance=function(k){return arguments.length?(g=(k=+k)*k,y):Math.sqrt(g)},y.tapDistance=function(k){return arguments.length?(b=+k,y):b},y}var le=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(le||{}),Uu=(e=>(e.Partial="partial",e.Full="full",e))(Uu||{}),Un=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Un||{}),In=(e=>(e.Strict="strict",e.Loose="loose",e))(In||{}),_a=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(_a||{}),Mr=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Mr||{}),Sv=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Sv||{});const Rz=["INPUT","SELECT","TEXTAREA"],Lz=typeof document<"u"?document:null;function Ml(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,a=typeof o?.closest=="function"?o.closest(".nokey"):null;return Rz.includes(o?.nodeName)||i||!!a}function Fz(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function wf(e,t,n,o){const i=t.replace("+",`
|
|
5
5
|
`).replace(`
|
|
6
6
|
|
|
7
7
|
`,`
|
|
8
8
|
+`).split(`
|
|
9
|
-
`).map(a=>a.trim().toLowerCase());if(r.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const i=r.every((a,l)=>n.has(a)&&Array.from(n.values())[l]===r[l]);return o&&n.delete(e.toLowerCase()),i}function mR(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=vR(n.code,e);return Array.isArray(e)?e.some(r=>pf(n[o],r,t,n.type==="keyup")):pf(n[o],e,t,n.type==="keyup")}}function vR(e,t){return t.includes(e)?"code":"key"}function xr(e,t){const n=s.computed(()=>s.toValue(t?.target)??hR),o=s.shallowRef(s.toValue(e)===!0);let r=!1;const i=new Set;let a=u(s.toValue(e));s.watch(()=>s.toValue(e),(c,d)=>{typeof d=="boolean"&&typeof c!="boolean"&&l(),a=u(c)},{immediate:!0}),Gm(["blur","contextmenu"],l),Xd((...c)=>a(...c),c=>{var d,f;const h=s.toValue(t?.actInsideInputWithModifier)??!0,p=s.toValue(t?.preventDefault)??!1;if(r=pR(c),(!r||r&&!h)&&xl(c))return;const v=((f=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:f[0])||c.target,w=v?.nodeName==="BUTTON"||v?.nodeName==="A";!p&&(r||!w)&&c.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Xd((...c)=>a(...c),c=>{const d=s.toValue(t?.actInsideInputWithModifier)??!0;if(o.value){if((!r||r&&!d)&&xl(c))return;r=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){r=!1,i.clear(),o.value=s.toValue(e)===!0}function u(c){return c===null?(l(),()=>!1):typeof c=="boolean"?(l(),o.value=c,()=>!1):Array.isArray(c)||typeof c=="string"?mR(c,i):c}return o}const kv="vue-flow__node-desc",xv="vue-flow__edge-desc",gR="vue-flow__aria-live",Ev=["Enter"," ","Escape"],No={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function ya(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function wa(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Ka(e){return{width:e.offsetWidth,height:e.offsetHeight}}function to(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Sv(e,t){return{x:to(e.x,t[0][0],t[1][0]),y:to(e.y,t[0][1],t[1][1])}}function mf(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Pn(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Xn(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!Pn(e)}function fr(e){return Xn(e)&&"computedPosition"in e}function _i(e){return!Number.isNaN(e)&&Number.isFinite(e)}function yR(e){return _i(e.width)&&_i(e.height)&&_i(e.x)&&_i(e.y)}function wR(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:s.markRaw({width:0,height:0}),computedPosition:s.markRaw({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ie(e.data)?e.data:{},events:s.markRaw(Ie(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function Dv(e,t,n){var o,r;const i={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(r=e.targetHandle)==null?void 0:r.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Ie(e.data)?e.data:{},events:s.markRaw(Ie(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??i,e,{id:e.id.toString()})}function Mv(e,t,n,o){const r=typeof e=="string"?e:e.id,i=new Set,a=o==="source"?"target":"source";for(const l of n)l[a]===r&&i.add(l[o]);return t.filter(l=>i.has(l.id))}function bR(...e){if(e.length===3){const[i,a,l]=e;return Mv(i,a,l,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>Pn(i)&&i.source===o).map(i=>n.find(a=>Xn(a)&&a.id===i.target))}function _R(...e){if(e.length===3){const[i,a,l]=e;return Mv(i,a,l,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>Pn(i)&&i.target===o).map(i=>n.find(a=>Xn(a)&&a.id===i.source))}function Nv({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function kR(e,t){return t.some(n=>Pn(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Fr({x:e,y:t},{x:n,y:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function Hr({x:e,y:t},{x:n,y:o,zoom:r},i=!1,a=[1,1]){const l={x:(e-n)/r,y:(t-o)/r};return i?Ja(l,a):l}function xR(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function Cv({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function ER({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function Ov(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=xR(t,Cv({...o.computedPosition,...o.dimensions}))}return ER(t)}function Tv(e,t,n={x:0,y:0,zoom:1},o=!1,r=!1){const i={...Hr(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const l of e){const{dimensions:u,selectable:c=!0,hidden:d=!1}=l,f=u.width??l.width??null,h=u.height??l.height??null;if(r&&!c||d)continue;const p=wa(i,ya(l)),m=f===null||h===null,v=o&&p>0,w=(f??0)*(h??0);(m||v||p>=w||l.dragging)&&a.push(l)}return a}function $v(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function vo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return ti(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function SR(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=vo(e,n),r=vo(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=vo(e.top??e.y??0,n),r=vo(e.bottom??e.y??0,n),i=vo(e.left??e.x??0,t),a=vo(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function DR(e,t,n,o,r,i){const{x:a,y:l}=Fr(e,{x:t,y:n,zoom:o}),{x:u,y:c}=Fr({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),d=r-u,f=i-c;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}function vf(e,t,n,o,r,i=.1){const a=SR(i,t,n),l=(t-a.x)/e.width,u=(n-a.y)/e.height,c=Math.min(l,u),d=to(c,o,r),f=e.x+e.width/2,h=e.y+e.height/2,p=t/2-f*d,m=n/2-h*d,v=DR(e,p,m,d,t,n),w={left:Math.min(v.left-a.left,0),top:Math.min(v.top-a.top,0),right:Math.min(v.right-a.right,0),bottom:Math.min(v.bottom-a.bottom,0)};return{x:p-w.left+w.right,y:m-w.top+w.bottom,zoom:d}}function MR(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Pv(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Pv(n,t):!1}function jr(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function gf(e){const t=e.ctrlKey&&ba()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function yf(e,t,n){return e<t?to(Math.abs(e-t),1,t)/t:e>n?-to(Math.abs(e-n),1,t)/t:0}function Bv(e,t,n=15,o=40){const r=yf(e.x,o,t.width-o)*n,i=yf(e.y,o,t.height-o)*n;return[r,i]}function Os(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let r={};if(typeof t.style=="function"?r={...t.style(t)}:t.style&&(r={...t.style}),r.width=r.width??`${t.dimensions.width}px`,r.height=r.height??`${t.dimensions.height}px`,n>0)if(typeof r.width=="string"){const i=Number(r.width.replace("px",""));r.width=`${i+n}px`}else r.width+=n;if(o>0)if(typeof r.height=="string"){const i=Number(r.height.replace("px",""));r.height=`${i+o}px`}else r.height+=o;if(e.position.x<0){const i=Math.abs(e.position.x);if(t.position.x=t.position.x-i,typeof r.width=="string"){const a=Number(r.width.replace("px",""));r.width=`${a+i}px`}else r.width+=i;e.position.x=0}if(e.position.y<0){const i=Math.abs(e.position.y);if(t.position.y=t.position.y-i,typeof r.height=="string"){const a=Number(r.height.replace("px",""));r.height=`${a+i}px`}else r.height+=i;e.position.y=0}t.dimensions.width=Number(r.width.toString().replace("px","")),t.dimensions.height=Number(r.height.toString().replace("px","")),typeof t.style=="function"?t.style=i=>{const a=t.style;return{...a(i),...r}}:t.style={...t.style,...r}}}}function wf(e,t){var n,o;const r=e.filter(a=>a.type==="add"||a.type==="remove");for(const a of r)if(a.type==="add")t.findIndex(u=>u.id===a.item.id)===-1&&t.push(a.item);else if(a.type==="remove"){const l=t.findIndex(u=>u.id===a.id);l!==-1&&t.splice(l,1)}const i=t.map(a=>a.id);for(const a of t)for(const l of e)if(l.id===a.id)switch(l.type){case"select":a.selected=l.selected;break;case"position":if(fr(a)&&(typeof l.position<"u"&&(a.position=l.position),typeof l.dragging<"u"&&(a.dragging=l.dragging),a.expandParent&&a.parentNode)){const u=t[i.indexOf(a.parentNode)];u&&fr(u)&&Os(a,u)}break;case"dimensions":if(fr(a)&&(typeof l.dimensions<"u"&&(a.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(a.style={...a.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(a.resizing=l.resizing),a.expandParent&&a.parentNode)){const u=t[i.indexOf(a.parentNode)];u&&fr(u)&&(!!u.dimensions.width&&!!u.dimensions.height?Os(a,u):s.nextTick(()=>{Os(a,u)}))}break}return t}function bn(e,t){return{id:e,type:"select",selected:t}}function bf(e){return{item:e,type:"add"}}function _f(e){return{id:e,type:"remove"}}function kf(e,t,n,o,r){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:r||null,type:"remove"}}function _n(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const a=t.has(r);!(i.selected===void 0&&!a)&&i.selected!==a&&(n&&(i.selected=a),o.push(bn(i.id,a)))}return o}const xf=()=>{};function te(e){const t=new Set;let n=xf,o=()=>!1;const r=()=>t.size>0||o(),i=h=>{n=h},a=()=>{n=xf},l=h=>{o=h},u=()=>{o=()=>!1},c=h=>{t.delete(h)};return{on:h=>{t.add(h);const p=()=>c(h);return Ir(p),{off:p}},off:c,trigger:h=>{const p=[n];return r()?p.push(...t):e&&p.push(e),Promise.allSettled(p.map(m=>m(h)))},hasListeners:r,listeners:t,setEmitter:i,removeEmitter:a,setHasEmitListeners:l,removeHasEmitListeners:u}}function Ef(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function NR(e,t,n,o){var r,i;const a=new Map;for(const[l,u]of e)(u.selected||u.id===o)&&(!u.parentNode||!Pv(u,e))&&(u.draggable||t&&typeof u.draggable>"u")&&e.get(l)&&a.set(l,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-((r=u.computedPosition)==null?void 0:r.x)||0,y:n.y-((i=u.computedPosition)==null?void 0:i.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:{...u.dimensions},expandParent:u.expandParent});return Array.from(a.values())}function Ts({id:e,dragItems:t,findNode:n}){const o=[];for(const r of t){const i=n(r.id);i&&o.push(i)}return[e?o.find(r=>r.id===e):o[0],o]}function Yv(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function CR(e,t,n){const[o,r,i,a]=typeof e!="string"?Yv(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-r,n.computedPosition.y+n.dimensions.height-i]]:!1}function OR(e,t,n,o){let r=e.extent||n;if((r==="parent"||!Array.isArray(r)&&r?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const i=CR(r,e,o);i&&(r=i)}else t(new ze(Ve.NODE_EXTENT_INVALID,e.id)),r=n;else if(Array.isArray(r)){const i=o?.computedPosition.x||0,a=o?.computedPosition.y||0;r=[[r[0][0]+i,r[0][1]+a],[r[1][0]+i,r[1][1]+a]]}else if(r!=="parent"&&r?.range&&Array.isArray(r.range)){const[i,a,l,u]=Yv(r.padding),c=o?.computedPosition.x||0,d=o?.computedPosition.y||0;r=[[r.range[0][0]+c+u,r.range[0][1]+d+i],[r.range[1][0]+c-a,r.range[1][1]+d-l]]}return r==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:r}function TR({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Fu(e,t,n,o,r){const i=TR(e.dimensions,OR(e,n,o,r)),a=Sv(t,i);return{position:{x:a.x-(r?.computedPosition.x||0),y:a.y-(r?.computedPosition.y||0)},computedPosition:a}}function Vo(e,t,n=se.Left,o=!1){const r=(t?.x??0)+e.computedPosition.x,i=(t?.y??0)+e.computedPosition.y,{width:a,height:l}=t??YR(e);if(o)return{x:r+a/2,y:i+l/2};switch(t?.position??n){case se.Top:return{x:r+a/2,y:i};case se.Right:return{x:r+a,y:i+l/2};case se.Bottom:return{x:r+a/2,y:i+l};case se.Left:return{x:r,y:i+l/2}}}function Sf(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function $R({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:i,width:a,height:l,viewport:u}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+r),y2:Math.max(e.y+o,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=Cv({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:a/u.zoom,height:l/u.zoom}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),h=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*h)>0}function PR(e,t,n=!1){const o=typeof e.zIndex=="number";let r=o?e.zIndex:0;const i=t(e.source),a=t(e.target);return!i||!a?0:(n&&(r=o?e.zIndex:Math.max(i.computedPosition.z||0,a.computedPosition.z||0)),r)}var Ve=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ve||{});const Df={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
|
9
|
+
`).map(s=>s.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const a=i.every((s,l)=>n.has(s)&&Array.from(n.values())[l]===i[l]);return o&&n.delete(e.toLowerCase()),a}function Hz(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=jz(n.code,e);return Array.isArray(e)?e.some(i=>wf(n[o],i,t,n.type==="keyup")):wf(n[o],e,t,n.type==="keyup")}}function jz(e,t){return t.includes(e)?"code":"key"}function Tr(e,t){const n=r.computed(()=>r.toValue(t?.target)??Lz),o=r.shallowRef(r.toValue(e)===!0);let i=!1;const a=new Set;let s=u(r.toValue(e));r.watch(()=>r.toValue(e),(c,d)=>{typeof d=="boolean"&&typeof c!="boolean"&&l(),s=u(c)},{immediate:!0}),Qm(["blur","contextmenu"],l),ef((...c)=>s(...c),c=>{var d,f;const h=r.toValue(t?.actInsideInputWithModifier)??!0,p=r.toValue(t?.preventDefault)??!1;if(i=Fz(c),(!i||i&&!h)&&Ml(c))return;const g=((f=(d=c.composedPath)==null?void 0:d.call(c))==null?void 0:f[0])||c.target,b=g?.nodeName==="BUTTON"||g?.nodeName==="A";!p&&(i||!b)&&c.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),ef((...c)=>s(...c),c=>{const d=r.toValue(t?.actInsideInputWithModifier)??!0;if(o.value){if((!i||i&&!d)&&Ml(c))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,a.clear(),o.value=r.toValue(e)===!0}function u(c){return c===null?(l(),()=>!1):typeof c=="boolean"?(l(),o.value=c,()=>!1):Array.isArray(c)||typeof c=="string"?Hz(c,a):c}return o}const Dv="vue-flow__node-desc",Mv="vue-flow__edge-desc",Wz="vue-flow__aria-live",Tv=["Enter"," ","Escape"],$o={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function xa(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function ka(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function os(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ao(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Vv(e,t){return{x:ao(e.x,t[0][0],t[1][0]),y:ao(e.y,t[0][1],t[1][1])}}function bf(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function zn(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function to(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!zn(e)}function wr(e){return to(e)&&"computedPosition"in e}function Ci(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Uz(e){return Ci(e.width)&&Ci(e.height)&&Ci(e.x)&&Ci(e.y)}function Gz(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:r.markRaw({width:0,height:0}),computedPosition:r.markRaw({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Re(e.data)?e.data:{},events:r.markRaw(Re(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function Ov(e,t,n){var o,i;const a={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Re(e.data)?e.data:{},events:r.markRaw(Re(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??a,e,{id:e.id.toString()})}function $v(e,t,n,o){const i=typeof e=="string"?e:e.id,a=new Set,s=o==="source"?"target":"source";for(const l of n)l[s]===i&&a.add(l[o]);return t.filter(l=>a.has(l.id))}function Zz(...e){if(e.length===3){const[a,s,l]=e;return $v(a,s,l,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(a=>zn(a)&&a.source===o).map(a=>n.find(s=>to(s)&&s.id===a.target))}function qz(...e){if(e.length===3){const[a,s,l]=e;return $v(a,s,l,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(a=>zn(a)&&a.target===o).map(a=>n.find(s=>to(s)&&s.id===a.source))}function Bv({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Xz(e,t){return t.some(n=>zn(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function qr({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function Xr({x:e,y:t},{x:n,y:o,zoom:i},a=!1,s=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return a?rs(l,s):l}function Kz(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function Pv({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Jz({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function Av(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=Kz(t,Pv({...o.computedPosition,...o.dimensions}))}return Jz(t)}function Yv(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){const a={...Xr(t,n),width:t.width/n.zoom,height:t.height/n.zoom},s=[];for(const l of e){const{dimensions:u,selectable:c=!0,hidden:d=!1}=l,f=u.width??l.width??null,h=u.height??l.height??null;if(i&&!c||d)continue;const p=ka(a,xa(l)),m=f===null||h===null,g=o&&p>0,b=(f??0)*(h??0);(m||g||p>=b||l.dragging)&&s.push(l)}return s}function Iv(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function _o(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return li(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Qz(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=_o(e,n),i=_o(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=_o(e.top??e.y??0,n),i=_o(e.bottom??e.y??0,n),a=_o(e.left??e.x??0,t),s=_o(e.right??e.x??0,t);return{top:o,right:s,bottom:i,left:a,x:a+s,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eR(e,t,n,o,i,a){const{x:s,y:l}=qr(e,{x:t,y:n,zoom:o}),{x:u,y:c}=qr({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),d=i-u,f=a-c;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}function _f(e,t,n,o,i,a=.1){const s=Qz(a,t,n),l=(t-s.x)/e.width,u=(n-s.y)/e.height,c=Math.min(l,u),d=ao(c,o,i),f=e.x+e.width/2,h=e.y+e.height/2,p=t/2-f*d,m=n/2-h*d,g=eR(e,p,m,d,t,n),b={left:Math.min(g.left-s.left,0),top:Math.min(g.top-s.top,0),right:Math.min(g.right-s.right,0),bottom:Math.min(g.bottom-s.bottom,0)};return{x:p-b.left+b.right,y:m-b.top+b.bottom,zoom:d}}function tR(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function zv(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:zv(n,t):!1}function Kr(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function xf(e){const t=e.ctrlKey&&Na()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function kf(e,t,n){return e<t?ao(Math.abs(e-t),1,t)/t:e>n?-ao(Math.abs(e-n),1,t)/t:0}function Rv(e,t,n=15,o=40){const i=kf(e.x,o,t.width-o)*n,a=kf(e.y,o,t.height-o)*n;return[i,a]}function As(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const a=Number(i.width.replace("px",""));i.width=`${a+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const a=Number(i.height.replace("px",""));i.height=`${a+o}px`}else i.height+=o;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof i.width=="string"){const s=Number(i.width.replace("px",""));i.width=`${s+a}px`}else i.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof i.height=="string"){const s=Number(i.height.replace("px",""));i.height=`${s+a}px`}else i.height+=a;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const s=t.style;return{...s(a),...i}}:t.style={...t.style,...i}}}}function Nf(e,t){var n,o;const i=e.filter(s=>s.type==="add"||s.type==="remove");for(const s of i)if(s.type==="add")t.findIndex(u=>u.id===s.item.id)===-1&&t.push(s.item);else if(s.type==="remove"){const l=t.findIndex(u=>u.id===s.id);l!==-1&&t.splice(l,1)}const a=t.map(s=>s.id);for(const s of t)for(const l of e)if(l.id===s.id)switch(l.type){case"select":s.selected=l.selected;break;case"position":if(wr(s)&&(typeof l.position<"u"&&(s.position=l.position),typeof l.dragging<"u"&&(s.dragging=l.dragging),s.expandParent&&s.parentNode)){const u=t[a.indexOf(s.parentNode)];u&&wr(u)&&As(s,u)}break;case"dimensions":if(wr(s)&&(typeof l.dimensions<"u"&&(s.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(s.style={...s.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(s.resizing=l.resizing),s.expandParent&&s.parentNode)){const u=t[a.indexOf(s.parentNode)];u&&wr(u)&&(!!u.dimensions.width&&!!u.dimensions.height?As(s,u):r.nextTick(()=>{As(s,u)}))}break}return t}function En(e,t){return{id:e,type:"select",selected:t}}function Ef(e){return{item:e,type:"add"}}function Cf(e){return{id:e,type:"remove"}}function Sf(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function Cn(e,t=new Set,n=!1){const o=[];for(const[i,a]of e){const s=t.has(i);!(a.selected===void 0&&!s)&&a.selected!==s&&(n&&(a.selected=s),o.push(En(a.id,s)))}return o}const Df=()=>{};function ne(e){const t=new Set;let n=Df,o=()=>!1;const i=()=>t.size>0||o(),a=h=>{n=h},s=()=>{n=Df},l=h=>{o=h},u=()=>{o=()=>!1},c=h=>{t.delete(h)};return{on:h=>{t.add(h);const p=()=>c(h);return jr(p),{off:p}},off:c,trigger:h=>{const p=[n];return i()?p.push(...t):e&&p.push(e),Promise.allSettled(p.map(m=>m(h)))},hasListeners:i,listeners:t,setEmitter:a,removeEmitter:s,setHasEmitListeners:l,removeHasEmitListeners:u}}function Mf(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function nR(e,t,n,o){var i,a;const s=new Map;for(const[l,u]of e)(u.selected||u.id===o)&&(!u.parentNode||!zv(u,e))&&(u.draggable||t&&typeof u.draggable>"u")&&e.get(l)&&s.set(l,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-((i=u.computedPosition)==null?void 0:i.x)||0,y:n.y-((a=u.computedPosition)==null?void 0:a.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:{...u.dimensions},expandParent:u.expandParent});return Array.from(s.values())}function Ys({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const a=n(i.id);a&&o.push(a)}return[e?o.find(i=>i.id===e):o[0],o]}function Lv(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function oR(e,t,n){const[o,i,a,s]=typeof e!="string"?Lv(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+s,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-a]]:!1}function rR(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const a=oR(i,e,o);a&&(i=a)}else t(new He(Le.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const a=o?.computedPosition.x||0,s=o?.computedPosition.y||0;i=[[i[0][0]+a,i[0][1]+s],[i[1][0]+a,i[1][1]+s]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const[a,s,l,u]=Lv(i.padding),c=o?.computedPosition.x||0,d=o?.computedPosition.y||0;i=[[i.range[0][0]+c+u,i.range[0][1]+d+a],[i.range[1][0]+c-s,i.range[1][1]+d-l]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function iR({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Gu(e,t,n,o,i){const a=iR(e.dimensions,rR(e,n,o,i)),s=Vv(t,a);return{position:{x:s.x-(i?.computedPosition.x||0),y:s.y-(i?.computedPosition.y||0)},computedPosition:s}}function Ho(e,t,n=le.Left,o=!1){const i=(t?.x??0)+e.computedPosition.x,a=(t?.y??0)+e.computedPosition.y,{width:s,height:l}=t??uR(e);if(o)return{x:i+s/2,y:a+l/2};switch(t?.position??n){case le.Top:return{x:i+s/2,y:a};case le.Right:return{x:i+s,y:a+l/2};case le.Bottom:return{x:i+s/2,y:a+l};case le.Left:return{x:i,y:a+l/2}}}function Tf(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function aR({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:a,width:s,height:l,viewport:u}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=Pv({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:s/u.zoom,height:l/u.zoom}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),h=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*h)>0}function sR(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const a=t(e.source),s=t(e.target);return!a||!s?0:(n&&(i=o?e.zIndex:Math.max(a.computedPosition.z||0,s.computedPosition.z||0)),i)}var Le=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Le||{});const Vf={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
|
10
10
|
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
|
11
11
|
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
|
12
12
|
Node: ${e}
|
|
@@ -26,4 +26,4 @@ Edge: ${e}
|
|
|
26
26
|
Source: ${t}
|
|
27
27
|
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
|
28
28
|
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
|
29
|
-
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class ze extends Error{constructor(t,...n){var o;super((o=Df[t])==null?void 0:o.call(Df,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Hu(e){return"clientX"in e}function BR(e){return"sourceEvent"in e}function Ot(e,t){const n=Hu(e);let o,r;return n?(o=e.clientX,r=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,r=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):(o=0,r=0),{x:o-(t?.left??0),y:r-(t?.top??0)}}const ba=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function YR(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Ja(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const AR=()=>!0;function $s(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function IR(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())wa(r,ya(i))>0&&o.push(i);return o}const VR=250;function RR(e,t,n,o){var r,i;let a=[],l=Number.POSITIVE_INFINITY;const u=IR(e,n,t+VR);for(const c of u){const d=[...((r=c.handleBounds)==null?void 0:r.source)??[],...((i=c.handleBounds)==null?void 0:i.target)??[]];for(const f of d){if(o.nodeId===f.nodeId&&o.type===f.type&&o.id===f.id)continue;const{x:h,y:p}=Vo(c,f,f.position,!0),m=Math.sqrt((h-e.x)**2+(p-e.y)**2);m>t||(m<l?(a=[{...f,x:h,y:p}],l=m):m===l&&a.push({...f,x:h,y:p}))}}if(!a.length)return null;if(a.length>1){const c=o.type==="source"?"target":"source";return a.find(d=>d.type===c)??a[0]}return a[0]}function Mf(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:l,flowId:u,isValidConnection:c=AR},d,f,h,p){const m=i==="target",v=t?a.querySelector(`.${l}-flow__handle[data-id="${u}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:w,y:g}=Ot(e),b=a.elementFromPoint(w,g),y=b?.classList.contains(`${l}-flow__handle`)?b:v,_={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const O=Av(void 0,y),B=y.getAttribute("data-nodeid"),$=y.getAttribute("data-handleid"),C=y.classList.contains("connectable"),V=y.classList.contains("connectableend");if(!B||!O)return _;const L={source:m?B:o,sourceHandle:m?$:r,target:m?o:B,targetHandle:m?r:$};_.connection=L;const x=C&&V&&(n===$n.Strict?m&&O==="source"||!m&&O==="target":B!==o||$!==r);_.isValid=x&&c(L,{nodes:f,edges:d,sourceNode:h(L.source),targetNode:h(L.target)}),_.toHandle=Iv(B,O,$,p,n,!0)}return _}function Av(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function zR(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function LR(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Iv(e,t,n,o,r,i=!1){var a,l,u;const c=o.get(e);if(!c)return null;const d=r===$n.Strict?(a=c.handleBounds)==null?void 0:a[t]:[...((l=c.handleBounds)==null?void 0:l.source)??[],...((u=c.handleBounds)==null?void 0:u.target)??[]],f=(n?d?.find(h=>h.id===n):d?.[0])??null;return f&&i?{...f,...Vo(c,f,f.position,!0)}:f}const El={[se.Left]:se.Right,[se.Right]:se.Left,[se.Top]:se.Bottom,[se.Bottom]:se.Top},FR=["production","prod"];function ti(e,...t){Vv()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Vv(){return!FR.includes(process.env.NODE_ENV||"")}function Nf(e,t,n,o,r){const i=t.querySelectorAll(`.vue-flow__handle.${e}`);return i?.length?Array.from(i).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Ka(a)}}):null}function Sl(e,t,n,o,r,i=!1,a){r.value=!1,e.selected?(i||e.selected&&t)&&(o([e]),s.nextTick(()=>{a.blur()})):n([e])}function Ie(e){return typeof s.unref(e)<"u"}function HR(e,t,n,o){if(!e||!e.source||!e.target)return n(new ze(Ve.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let r;return Pn(e)?r=e:r={...e,id:Nv(e)},r=Dv(r,void 0,o),kR(r,t)?!1:r}function jR(e,t,n,o,r){if(!t.source||!t.target)return r(new ze(Ve.EDGE_INVALID,e.id)),!1;if(!n)return r(new ze(Ve.EDGE_NOT_FOUND,e.id)),!1;const{id:i,...a}=e;return{...a,id:o?Nv(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function Cf(e,t,n){const o={},r=[];for(let i=0;i<e.length;++i){const a=e[i];if(!Xn(a)){n(new ze(Ve.NODE_INVALID,a?.id)||`[ID UNKNOWN|INDEX ${i}]`);continue}const l=wR(a,t(a.id),a.parentNode);a.parentNode&&(o[a.parentNode]=!0),r[i]=l}for(const i of r){const a=t(i.parentNode)||r.find(l=>l.id===i.parentNode);i.parentNode&&!a&&n(new ze(Ve.NODE_MISSING_PARENT,i.id,i.parentNode)),(i.parentNode||o[i.id])&&(o[i.id]&&(i.isParent=!0),a&&(a.isParent=!0))}return r}function Of(e,t,n,o,r,i){let a=r;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a=`${r}-${e}`;const u=o.get(a)||new Map;if(o.set(a,u.set(n,t)),i){a=`${r}-${e}-${i}`;const c=o.get(a)||new Map;o.set(a,c.set(n,t))}}function Ps(e,t,n){e.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:l=null}=o,u={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:l},c=`${r}-${a}--${i}-${l}`,d=`${i}-${l}--${r}-${a}`;Of("source",u,d,e,r,a),Of("target",u,c,e,i,l)}}function Tf(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Bs(e,t,n,o,r,i,a,l){const u=[];for(const c of e){const d=Pn(c)?c:HR(c,l,r,i);if(!d)continue;const f=n(d.source),h=n(d.target);if(!f||!h){r(new ze(Ve.EDGE_SOURCE_TARGET_MISSING,d.id,d.source,d.target));continue}if(!f){r(new ze(Ve.EDGE_SOURCE_MISSING,d.id,d.source));continue}if(!h){r(new ze(Ve.EDGE_TARGET_MISSING,d.id,d.target));continue}if(t&&!t(d,{edges:l,nodes:a,sourceNode:f,targetNode:h})){r(new ze(Ve.EDGE_INVALID,d.id));continue}const p=o(d.id);u.push({...Dv(d,p,i),sourceNode:f,targetNode:h})}return u}const $f=Symbol("vueFlow"),Rv=Symbol("nodeId"),zv=Symbol("nodeRef"),WR=Symbol("edgeId"),UR=Symbol("edgeRef"),Qa=Symbol("slots");function Lv(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:r,nodeLookup:i,nodeExtent:a,nodeDragThreshold:l,viewport:u,autoPanOnNodeDrag:c,autoPanSpeed:d,nodesDraggable:f,panBy:h,findNode:p,multiSelectionActive:m,nodesSelectionActive:v,selectNodesOnDrag:w,removeSelectedElements:g,addSelectedNodes:b,updateNodePositions:y,emits:_}=Pe(),{onStart:O,onDrag:B,onStop:$,onClick:C,el:V,disabled:L,id:I,selectable:x,dragHandle:R}=e,k=s.shallowRef(!1);let N=[],D,z=null,F={x:void 0,y:void 0},j={x:0,y:0},Y=null,G=!1,W=!1,le=0,re=!1;const X=XR(),q=({x:ue,y:ce})=>{F={x:ue,y:ce};let M=!1;if(N=N.map(E=>{const T={x:ue-E.distance.x,y:ce-E.distance.y},{computedPosition:A}=Fu(E,n.value?Ja(T,o.value):T,_.error,a.value,E.parentNode?p(E.parentNode):void 0);return M=M||E.position.x!==A.x||E.position.y!==A.y,E.position=A,E}),W=W||M,!!M&&(y(N,!0,!0),k.value=!0,Y)){const[E,T]=Ts({id:I,dragItems:N,findNode:p});B({event:Y,node:E,nodes:T})}},J=()=>{if(!z)return;const[ue,ce]=Bv(j,z,d.value);if(ue!==0||ce!==0){const M={x:(F.x??0)-ue/u.value.zoom,y:(F.y??0)-ce/u.value.zoom};h({x:ue,y:ce})&&q(M)}le=requestAnimationFrame(J)},pe=(ue,ce)=>{G=!0;const M=p(I);!w.value&&!m.value&&M&&(M.selected||g()),M&&s.toValue(x)&&w.value&&Sl(M,m.value,b,g,v,!1,ce);const E=X(ue.sourceEvent);if(F=E,N=NR(i.value,f.value,E,I),N.length){const[T,A]=Ts({id:I,dragItems:N,findNode:p});O({event:ue.sourceEvent,node:T,nodes:A})}},we=(ue,ce)=>{var M;ue.sourceEvent.type==="touchmove"&&ue.sourceEvent.touches.length>1||(W=!1,l.value===0&&pe(ue,ce),F=X(ue.sourceEvent),z=((M=t.value)==null?void 0:M.getBoundingClientRect())||null,j=Ot(ue.sourceEvent,z))},me=(ue,ce)=>{const M=X(ue.sourceEvent);if(!re&&G&&c.value&&(re=!0,J()),!G){const E=M.xSnapped-(F.x??0),T=M.ySnapped-(F.y??0);Math.sqrt(E*E+T*T)>l.value&&pe(ue,ce)}(F.x!==M.xSnapped||F.y!==M.ySnapped)&&N.length&&G&&(Y=ue.sourceEvent,j=Ot(ue.sourceEvent,z),q(M))},ge=ue=>{let ce=!1;if(!G&&!k.value&&!m.value){const M=ue.sourceEvent,E=X(M),T=E.xSnapped-(F.x??0),A=E.ySnapped-(F.y??0),P=Math.sqrt(T*T+A*A);P!==0&&P<=l.value&&(C?.(M),ce=!0)}if(N.length&&!ce){W&&(y(N,!1,!1),W=!1);const[M,E]=Ts({id:I,dragItems:N,findNode:p});$({event:ue.sourceEvent,node:M,nodes:E})}N=[],k.value=!1,re=!1,G=!1,F={x:void 0,y:void 0},cancelAnimationFrame(le)};return s.watch([()=>s.toValue(L),V],([ue,ce],M,E)=>{if(ce){const T=pt(ce);ue||(D=yV().on("start",A=>we(A,ce)).on("drag",A=>me(A,ce)).on("end",A=>ge(A)).filter(A=>{const P=A.target,Q=s.toValue(R);return!A.button&&(!r.value||!Ef(P,`.${r.value}`,ce)&&(!Q||Ef(P,Q,ce)))}),T.call(D)),E(()=>{T.on(".drag",null),D&&(D.on("start",null),D.on("drag",null),D.on("end",null))})}}),k}function GR(){return{doubleClick:te(),click:te(),mouseEnter:te(),mouseMove:te(),mouseLeave:te(),contextMenu:te(),updateStart:te(),update:te(),updateEnd:te()}}function ZR(e,t){const n=GR();return n.doubleClick.on(o=>{var r,i;t.edgeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.edgeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.edgeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.edgeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.edgeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.edgeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.updateStart.on(o=>{var r,i;t.edgeUpdateStart(o),(i=(r=e.events)==null?void 0:r.updateStart)==null||i.call(r,o)}),n.update.on(o=>{var r,i;t.edgeUpdate(o),(i=(r=e.events)==null?void 0:r.update)==null||i.call(r,o)}),n.updateEnd.on(o=>{var r,i;t.edgeUpdateEnd(o),(i=(r=e.events)==null?void 0:r.updateEnd)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function XR(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Pe();return r=>{var i;const a=((i=o.value)==null?void 0:i.getBoundingClientRect())??{left:0,top:0},l=BR(r)?r.sourceEvent:r,{x:u,y:c}=Ot(l,a),d=Hr({x:u,y:c},e.value),{x:f,y:h}=n.value?Ja(d,t.value):d;return{xSnapped:f,ySnapped:h,...d}}}function ki(){return!0}function Fv({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:r,onEdgeUpdate:i,onEdgeUpdateEnd:a}){const{id:l,vueFlowRef:u,connectionMode:c,connectionRadius:d,connectOnClick:f,connectionClickStartHandle:h,nodesConnectable:p,autoPanOnConnect:m,autoPanSpeed:v,findNode:w,panBy:g,startConnection:b,updateConnection:y,endConnection:_,emits:O,viewport:B,edges:$,nodes:C,isValidConnection:V,nodeLookup:L}=Pe();let I=null,x=!1,R=null;function k(D){var z;const F=s.toValue(n)==="target",j=Hu(D),Y=mf(D.target),G=D.currentTarget;if(G&&(j&&D.button===0||!j)){let W=function(oe){M=Ot(oe,ge),q=RR(Hr(M,B.value,!1,[1,1]),d.value,L.value,A),E||(T(),E=!0);const de=Mf(oe,{handle:q,connectionMode:c.value,fromNodeId:s.toValue(t),fromHandleId:s.toValue(e),fromType:F?"target":"source",isValidConnection:X,doc:Y,lib:"vue",flowId:l,nodeLookup:L.value},$.value,C.value,w,L.value);R=de.handleDomNode,I=de.connection,x=LR(!!q,de.isValid);const ve={...ae,isValid:x,to:de.toHandle&&x?Fr({x:de.toHandle.x,y:de.toHandle.y},B.value):M,toHandle:de.toHandle,toPosition:x&&de.toHandle?de.toHandle.position:El[A.position],toNode:de.toHandle?L.value.get(de.toHandle.nodeId):null};if(x&&q&&ae?.toHandle&&ve.toHandle&&ae.toHandle.type===ve.toHandle.type&&ae.toHandle.nodeId===ve.toHandle.nodeId&&ae.toHandle.id===ve.toHandle.id&&ae.to.x===ve.to.x&&ae.to.y===ve.to.y)return;const be=q??de.toHandle;if(y(be&&x?Fr({x:be.x,y:be.y},B.value):M,be,zR(!!be,x)),ae=ve,!q&&!x&&!R)return $s(ce);I&&I.source!==I.target&&R&&($s(ce),ce=R,R.classList.add("connecting","vue-flow__handle-connecting"),R.classList.toggle("valid",!!x),R.classList.toggle("vue-flow__handle-valid",!!x))},le=function(oe){"touches"in oe&&oe.touches.length>0||((q||R)&&I&&x&&(i?i(oe,I):O.connect(I)),O.connectEnd(oe),r&&a?.(oe),$s(ce),cancelAnimationFrame(J),_(oe),E=!1,x=!1,I=null,R=null,Y.removeEventListener("mousemove",W),Y.removeEventListener("mouseup",le),Y.removeEventListener("touchmove",W),Y.removeEventListener("touchend",le))};const re=w(s.toValue(t));let X=s.toValue(o)||V.value||ki;!X&&re&&(X=(F?re.isValidSourcePos:re.isValidTargetPos)||ki);let q,J=0;const{x:pe,y:we}=Ot(D),me=Av(s.toValue(r),G),ge=(z=u.value)==null?void 0:z.getBoundingClientRect();if(!ge||!me)return;const ue=Iv(s.toValue(t),me,s.toValue(e),L.value,c.value);if(!ue)return;let ce,M=Ot(D,ge),E=!1;const T=()=>{if(!m.value)return;const[oe,de]=Bv(M,ge,v.value);g({x:oe,y:de}),J=requestAnimationFrame(T)},A={...ue,nodeId:s.toValue(t),type:me,position:ue.position},P=L.value.get(s.toValue(t)),K={inProgress:!0,isValid:null,from:Vo(P,A,se.Left,!0),fromHandle:A,fromPosition:A.position,fromNode:P,to:M,toHandle:null,toPosition:El[A.position],toNode:null};b({nodeId:s.toValue(t),id:s.toValue(e),type:me,position:G?.getAttribute("data-handlepos")||se.Top,...M},{x:pe-ge.left,y:we-ge.top}),O.connectStart({event:D,nodeId:s.toValue(t),handleId:s.toValue(e),handleType:me});let ae=K;Y.addEventListener("mousemove",W),Y.addEventListener("mouseup",le),Y.addEventListener("touchmove",W),Y.addEventListener("touchend",le)}}function N(D){var z,F;if(!f.value)return;const j=s.toValue(n)==="target";if(!h.value){O.clickConnectStart({event:D,nodeId:s.toValue(t),handleId:s.toValue(e)}),b({nodeId:s.toValue(t),type:s.toValue(n),id:s.toValue(e),position:se.Top,...Ot(D)},void 0,!0);return}let Y=s.toValue(o)||V.value||ki;const G=w(s.toValue(t));if(!Y&&G&&(Y=(j?G.isValidSourcePos:G.isValidTargetPos)||ki),G&&(typeof G.connectable>"u"?p.value:G.connectable)===!1)return;const W=mf(D.target),le=Mf(D,{handle:{nodeId:s.toValue(t),id:s.toValue(e),type:s.toValue(n),position:se.Top,...Ot(D)},connectionMode:c.value,fromNodeId:h.value.nodeId,fromHandleId:h.value.id??null,fromType:h.value.type,isValidConnection:Y,doc:W,lib:"vue",flowId:l,nodeLookup:L.value},$.value,C.value,w,L.value),re=((z=le.connection)==null?void 0:z.source)===((F=le.connection)==null?void 0:F.target);le.isValid&&le.connection&&!re&&O.connect(le.connection),O.clickConnectEnd(D),_(D,!0)}return{handlePointerDown:k,handleClick:N}}function qR(){return s.inject(Rv,"")}function Hv(e){const t=e??qR()??"",n=s.inject(zv,s.ref(null)),{findNode:o,edges:r,emits:i}=Pe(),a=o(t);return a||i.error(new ze(Ve.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:s.computed(()=>o(a.parentNode)),connectedEdges:s.computed(()=>$v([a],r.value))}}function KR(){return{doubleClick:te(),click:te(),mouseEnter:te(),mouseMove:te(),mouseLeave:te(),contextMenu:te(),dragStart:te(),drag:te(),dragStop:te()}}function JR(e,t){const n=KR();return n.doubleClick.on(o=>{var r,i;t.nodeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.nodeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.nodeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.nodeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.nodeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.nodeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.dragStart.on(o=>{var r,i;t.nodeDragStart(o),(i=(r=e.events)==null?void 0:r.dragStart)==null||i.call(r,o)}),n.drag.on(o=>{var r,i;t.nodeDrag(o),(i=(r=e.events)==null?void 0:r.drag)==null||i.call(r,o)}),n.dragStop.on(o=>{var r,i;t.nodeDragStop(o),(i=(r=e.events)==null?void 0:r.dragStop)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function jv(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGrid:i,nodesDraggable:a,emits:l}=Pe();return(u,c=!1)=>{const d=i.value?r.value[0]:5,f=i.value?r.value[1]:5,h=c?4:1,p=u.x*d*h,m=u.y*f*h,v=[];for(const w of e.value)if(w.draggable||a&&typeof w.draggable>"u"){const g={x:w.computedPosition.x+p,y:w.computedPosition.y+m},{position:b}=Fu(w,g,l.error,t.value,w.parentNode?o(w.parentNode):void 0);v.push({id:w.id,position:b,from:w.position,distance:{x:u.x,y:u.y},dimensions:w.dimensions})}n(v,!0,!1)}}const xi=.1,QR=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function gn(){return ti("Viewport not initialized yet."),Promise.resolve(!1)}const ez={zoomIn:gn,zoomOut:gn,zoomTo:gn,fitView:gn,setCenter:gn,fitBounds:gn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:gn,setTransform:gn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function tz(e){function t(o,r){return new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?_r:Ii).scaleBy(Ys(e.d3Selection,r?.duration,r?.ease,()=>{i(!0)}),o):i(!1)})}function n(o,r,i,a){return new Promise(l=>{var u;const{x:c,y:d}=Sv({x:-o,y:-r},e.translateExtent),f=Io.translate(-c,-d).scale(i);e.d3Selection&&e.d3Zoom?(u=e.d3Zoom)==null||u.interpolate(a?.interpolate==="linear"?_r:Ii).transform(Ys(e.d3Selection,a?.duration,a?.ease,()=>{l(!0)}),f):l(!1)})}return s.computed(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:r=>t(1.2,r),zoomOut:r=>t(1/1.2,r),zoomTo:(r,i)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?_r:Ii).scaleTo(Ys(e.d3Selection,i?.duration,i?.ease,()=>{a(!0)}),r):a(!1)}),setViewport:(r,i)=>n(r.x,r.y,r.zoom,i),setTransform:(r,i)=>n(r.x,r.y,r.zoom,i),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(r={padding:xi,includeHiddenNodes:!1,duration:0})=>{var i,a;const l=[];for(const h of e.nodes)h.dimensions.width&&h.dimensions.height&&(r?.includeHiddenNodes||!h.hidden)&&(!((i=r.nodes)!=null&&i.length)||(a=r.nodes)!=null&&a.length&&r.nodes.includes(h.id))&&l.push(h);if(!l.length)return Promise.resolve(!1);const u=Ov(l),{x:c,y:d,zoom:f}=vf(u,e.dimensions.width,e.dimensions.height,r.minZoom??e.minZoom,r.maxZoom??e.maxZoom,r.padding??xi);return n(c,d,f,r)},setCenter:(r,i,a)=>{const l=typeof a?.zoom<"u"?a.zoom:e.maxZoom,u=e.dimensions.width/2-r*l,c=e.dimensions.height/2-i*l;return n(u,c,l,a)},fitBounds:(r,i={padding:xi})=>{const{x:a,y:l,zoom:u}=vf(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,i.padding??xi);return n(a,l,u,i)},project:r=>Hr(r,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:a}=e.vueFlowRef.getBoundingClientRect(),l={x:r.x-i,y:r.y-a};return Hr(l,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:a}=e.vueFlowRef.getBoundingClientRect(),l={x:r.x+i,y:r.y+a};return Fr(l,e.viewport)}return{x:0,y:0}}}:ez)}function Ys(e,t=0,n=QR,o=()=>{}){const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e}function nz(e,t,n){const o=s.effectScope(!0);return o.run(()=>{const r=()=>{o.run(()=>{let v,w,g=!!(n.nodes.value.length||n.edges.value.length);v=mo([e.modelValue,()=>{var b,y;return(y=(b=e.modelValue)==null?void 0:b.value)==null?void 0:y.length}],([b])=>{b&&Array.isArray(b)&&(w?.pause(),n.setElements(b),!w&&!g&&b.length?g=!0:w?.resume())}),w=mo([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([b,y])=>{var _;(_=e.modelValue)!=null&&_.value&&Array.isArray(e.modelValue.value)&&(v?.pause(),e.modelValue.value=[...b,...y],s.nextTick(()=>{v?.resume()}))},{immediate:g}),s.onScopeDispose(()=>{v?.stop(),w?.stop()})})},i=()=>{o.run(()=>{let v,w,g=!!n.nodes.value.length;v=mo([e.nodes,()=>{var b,y;return(y=(b=e.nodes)==null?void 0:b.value)==null?void 0:y.length}],([b])=>{b&&Array.isArray(b)&&(w?.pause(),n.setNodes(b),!w&&!g&&b.length?g=!0:w?.resume())}),w=mo([n.nodes,()=>n.nodes.value.length],([b])=>{var y;(y=e.nodes)!=null&&y.value&&Array.isArray(e.nodes.value)&&(v?.pause(),e.nodes.value=[...b],s.nextTick(()=>{v?.resume()}))},{immediate:g}),s.onScopeDispose(()=>{v?.stop(),w?.stop()})})},a=()=>{o.run(()=>{let v,w,g=!!n.edges.value.length;v=mo([e.edges,()=>{var b,y;return(y=(b=e.edges)==null?void 0:b.value)==null?void 0:y.length}],([b])=>{b&&Array.isArray(b)&&(w?.pause(),n.setEdges(b),!w&&!g&&b.length?g=!0:w?.resume())}),w=mo([n.edges,()=>n.edges.value.length],([b])=>{var y;(y=e.edges)!=null&&y.value&&Array.isArray(e.edges.value)&&(v?.pause(),e.edges.value=[...b],s.nextTick(()=>{v?.resume()}))},{immediate:g}),s.onScopeDispose(()=>{v?.stop(),w?.stop()})})},l=()=>{o.run(()=>{s.watch(()=>t.maxZoom,()=>{t.maxZoom&&Ie(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},u=()=>{o.run(()=>{s.watch(()=>t.minZoom,()=>{t.minZoom&&Ie(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{o.run(()=>{s.watch(()=>t.translateExtent,()=>{t.translateExtent&&Ie(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},d=()=>{o.run(()=>{s.watch(()=>t.nodeExtent,()=>{t.nodeExtent&&Ie(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},f=()=>{o.run(()=>{s.watch(()=>t.applyDefault,()=>{Ie(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},h=()=>{o.run(()=>{const v=async w=>{let g=w;typeof t.autoConnect=="function"&&(g=await t.autoConnect(w)),g!==!1&&n.addEdges([g])};s.watch(()=>t.autoConnect,()=>{Ie(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),s.watch(n.autoConnect,(w,g,b)=>{w?n.onConnect(v):n.hooks.value.connect.off(v),b(()=>{n.hooks.value.connect.off(v)})},{immediate:!0})})},p=()=>{const v=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const w of Object.keys(t)){const g=w;if(!v.includes(g)){const b=s.toRef(()=>t[g]),y=n[g];s.isRef(y)&&o.run(()=>{s.watch(b,_=>{Ie(_)&&(y.value=_)},{immediate:!0})})}}};(()=>{r(),i(),a(),u(),l(),c(),d(),f(),h(),p()})()}),()=>o.stop()}function oz(){return{edgesChange:te(),nodesChange:te(),nodeDoubleClick:te(),nodeClick:te(),nodeMouseEnter:te(),nodeMouseMove:te(),nodeMouseLeave:te(),nodeContextMenu:te(),nodeDragStart:te(),nodeDrag:te(),nodeDragStop:te(),nodesInitialized:te(),miniMapNodeClick:te(),miniMapNodeDoubleClick:te(),miniMapNodeMouseEnter:te(),miniMapNodeMouseMove:te(),miniMapNodeMouseLeave:te(),connect:te(),connectStart:te(),connectEnd:te(),clickConnectStart:te(),clickConnectEnd:te(),paneReady:te(),init:te(),move:te(),moveStart:te(),moveEnd:te(),selectionDragStart:te(),selectionDrag:te(),selectionDragStop:te(),selectionContextMenu:te(),selectionStart:te(),selectionEnd:te(),viewportChangeStart:te(),viewportChange:te(),viewportChangeEnd:te(),paneScroll:te(),paneClick:te(),paneContextMenu:te(),paneMouseEnter:te(),paneMouseMove:te(),paneMouseLeave:te(),edgeContextMenu:te(),edgeMouseEnter:te(),edgeMouseMove:te(),edgeMouseLeave:te(),edgeDoubleClick:te(),edgeClick:te(),edgeUpdateStart:te(),edgeUpdate:te(),edgeUpdateEnd:te(),updateNodeInternals:te(),error:te(e=>ti(e.message))}}function rz(e,t){const n=s.getCurrentInstance();s.onBeforeMount(()=>{for(const[r,i]of Object.entries(t.value)){const a=l=>{e(r,l)};i.setEmitter(a),Ir(i.removeEmitter),i.setHasEmitListeners(()=>o(r)),Ir(i.removeHasEmitListeners)}});function o(r){var i;const a=iz(r);return!!((i=n?.vnode.props)==null?void 0:i[a])}}function iz(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(r,i)=>i.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Wv(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Lu.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:kr.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:zn.Bezier,style:{}},connectionMode:$n.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:ba()?"Meta":"Control",zoomActivationKeyCode:ba()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:oz(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const az=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function sz(e,t,n){const o=tz(e),r=M=>{const E=M??[];e.hooks.updateNodeInternals.trigger(E)},i=M=>_R(M,e.nodes,e.edges),a=M=>bR(M,e.nodes,e.edges),l=M=>$v(M,e.edges),u=({id:M,type:E,nodeId:T})=>{var A;const P=M?`-${E}-${M}`:`-${E}`;return Array.from(((A=e.connectionLookup.get(`${T}${P}`))==null?void 0:A.values())??[])},c=M=>{if(M)return t.value.get(M)},d=M=>{if(M)return n.value.get(M)},f=(M,E,T)=>{var A,P;const Q=[];for(const K of M){const ae={id:K.id,type:"position",dragging:T,from:K.from};if(E&&(ae.position=K.position,K.parentNode)){const oe=c(K.parentNode);ae.position={x:ae.position.x-(((A=oe?.computedPosition)==null?void 0:A.x)??0),y:ae.position.y-(((P=oe?.computedPosition)==null?void 0:P.y)??0)}}Q.push(ae)}Q?.length&&e.hooks.nodesChange.trigger(Q)},h=M=>{if(!e.vueFlowRef)return;const E=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!E)return;const T=window.getComputedStyle(E),{m22:A}=new window.DOMMatrixReadOnly(T.transform),P=[];for(const Q of M){const K=Q,ae=c(K.id);if(ae){const oe=Ka(K.nodeElement);if(!!(oe.width&&oe.height&&(ae.dimensions.width!==oe.width||ae.dimensions.height!==oe.height||K.forceUpdate))){const ve=K.nodeElement.getBoundingClientRect();ae.dimensions=oe,ae.handleBounds.source=Nf("source",K.nodeElement,ve,A,ae.id),ae.handleBounds.target=Nf("target",K.nodeElement,ve,A,ae.id),P.push({id:ae.id,type:"dimensions",dimensions:oe})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),P.length&&e.hooks.nodesChange.trigger(P)},p=(M,E)=>{const T=new Set,A=new Set;for(const K of M)Xn(K)?T.add(K.id):Pn(K)&&A.add(K.id);const P=_n(t.value,T,!0),Q=_n(n.value,A);if(e.multiSelectionActive){for(const K of T)P.push(bn(K,E));for(const K of A)Q.push(bn(K,E))}P.length&&e.hooks.nodesChange.trigger(P),Q.length&&e.hooks.edgesChange.trigger(Q)},m=M=>{if(e.multiSelectionActive){const E=M.map(T=>bn(T.id,!0));e.hooks.nodesChange.trigger(E);return}e.hooks.nodesChange.trigger(_n(t.value,new Set(M.map(E=>E.id)),!0)),e.hooks.edgesChange.trigger(_n(n.value))},v=M=>{if(e.multiSelectionActive){const E=M.map(T=>bn(T.id,!0));e.hooks.edgesChange.trigger(E);return}e.hooks.edgesChange.trigger(_n(n.value,new Set(M.map(E=>E.id)))),e.hooks.nodesChange.trigger(_n(t.value,new Set,!0))},w=M=>{p(M,!0)},g=M=>{const T=(M||e.nodes).map(A=>(A.selected=!1,bn(A.id,!1)));e.hooks.nodesChange.trigger(T)},b=M=>{const T=(M||e.edges).map(A=>(A.selected=!1,bn(A.id,!1)));e.hooks.edgesChange.trigger(T)},y=M=>{if(!M||!M.length)return p([],!1);const E=M.reduce((T,A)=>{const P=bn(A.id,!1);return Xn(A)?T.nodes.push(P):T.edges.push(P),T},{nodes:[],edges:[]});E.nodes.length&&e.hooks.nodesChange.trigger(E.nodes),E.edges.length&&e.hooks.edgesChange.trigger(E.edges)},_=M=>{var E;(E=e.d3Zoom)==null||E.scaleExtent([M,e.maxZoom]),e.minZoom=M},O=M=>{var E;(E=e.d3Zoom)==null||E.scaleExtent([e.minZoom,M]),e.maxZoom=M},B=M=>{var E;(E=e.d3Zoom)==null||E.translateExtent(M),e.translateExtent=M},$=M=>{e.nodeExtent=M,r()},C=M=>{var E;(E=e.d3Zoom)==null||E.clickDistance(M)},V=M=>{e.nodesDraggable=M,e.nodesConnectable=M,e.elementsSelectable=M},L=M=>{const E=M instanceof Function?M(e.nodes):M;!e.initialized&&!E.length||(e.nodes=Cf(E,c,e.hooks.error.trigger))},I=M=>{const E=M instanceof Function?M(e.edges):M;if(!e.initialized&&!E.length)return;const T=Bs(E,e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Ps(e.connectionLookup,n.value,T),e.edges=T},x=M=>{const E=M instanceof Function?M([...e.nodes,...e.edges]):M;!e.initialized&&!E.length||(L(E.filter(Xn)),I(E.filter(Pn)))},R=M=>{let E=M instanceof Function?M(e.nodes):M;E=Array.isArray(E)?E:[E];const T=Cf(E,c,e.hooks.error.trigger),A=[];for(const P of T)A.push(bf(P));A.length&&e.hooks.nodesChange.trigger(A)},k=M=>{let E=M instanceof Function?M(e.edges):M;E=Array.isArray(E)?E:[E];const T=Bs(E,e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),A=[];for(const P of T)A.push(bf(P));A.length&&e.hooks.edgesChange.trigger(A)},N=(M,E=!0,T=!1)=>{const A=M instanceof Function?M(e.nodes):M,P=Array.isArray(A)?A:[A],Q=[],K=[];function ae(de){const ve=l(de);for(const be of ve)(!Ie(be.deletable)||be.deletable)&&K.push(kf(be.id,be.source,be.target,be.sourceHandle,be.targetHandle))}function oe(de){const ve=[];for(const be of e.nodes)be.parentNode===de&&ve.push(be);if(ve.length){for(const be of ve)Q.push(_f(be.id));E&&ae(ve);for(const be of ve)oe(be.id)}}for(const de of P){const ve=typeof de=="string"?c(de):de;ve&&(Ie(ve.deletable)&&!ve.deletable||(Q.push(_f(ve.id)),E&&ae([ve]),T&&oe(ve.id)))}K.length&&e.hooks.edgesChange.trigger(K),Q.length&&e.hooks.nodesChange.trigger(Q)},D=M=>{const E=M instanceof Function?M(e.edges):M,T=Array.isArray(E)?E:[E],A=[];for(const P of T){const Q=typeof P=="string"?d(P):P;Q&&(Ie(Q.deletable)&&!Q.deletable||A.push(kf(typeof P=="string"?P:P.id,Q.source,Q.target,Q.sourceHandle,Q.targetHandle)))}e.hooks.edgesChange.trigger(A)},z=(M,E,T=!0)=>{const A=d(M.id);if(!A)return!1;const P=e.edges.indexOf(A),Q=jR(M,E,A,T,e.hooks.error.trigger);if(Q){const[K]=Bs([Q],e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((ae,oe)=>oe===P?K:ae),Ps(e.connectionLookup,n.value,[K]),K}return!1},F=(M,E,T={replace:!1})=>{const A=d(M);if(!A)return;const P=typeof E=="function"?E(A):E;A.data=T.replace?P:{...A.data,...P}},j=M=>wf(M,e.nodes),Y=M=>{const E=wf(M,e.edges);return Ps(e.connectionLookup,n.value,E),E},G=(M,E,T={replace:!1})=>{const A=c(M);if(!A)return;const P=typeof E=="function"?E(A):E;T.replace?e.nodes.splice(e.nodes.indexOf(A),1,P):Object.assign(A,P)},W=(M,E,T={replace:!1})=>{const A=c(M);if(!A)return;const P=typeof E=="function"?E(A):E;A.data=T.replace?P:{...A.data,...P}},le=(M,E,T=!1)=>{T?e.connectionClickStartHandle=M:e.connectionStartHandle=M,e.connectionEndHandle=null,e.connectionStatus=null,E&&(e.connectionPosition=E)},re=(M,E=null,T=null)=>{e.connectionStartHandle&&(e.connectionPosition=M,e.connectionEndHandle=E,e.connectionStatus=T)},X=(M,E)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,E?e.connectionClickStartHandle=null:e.connectionStartHandle=null},q=M=>{const E=yR(M),T=E?null:fr(M)?M:c(M.id);return!E&&!T?[null,null,E]:[E?M:ya(T),T,E]},J=(M,E=!0,T=e.nodes)=>{const[A,P,Q]=q(M);if(!A)return[];const K=[];for(const ae of T||e.nodes){if(!Q&&(ae.id===P.id||!ae.computedPosition))continue;const oe=ya(ae),de=wa(oe,A);(E&&de>0||de>=oe.width*oe.height||de>=Number(A.width)*Number(A.height))&&K.push(ae)}return K},pe=(M,E,T=!0)=>{const[A]=q(M);if(!A)return!1;const P=wa(A,E);return T&&P>0||P>=Number(A.width)*Number(A.height)},we=M=>{const{viewport:E,dimensions:T,d3Zoom:A,d3Selection:P,translateExtent:Q}=e;if(!A||!P||!M.x&&!M.y)return!1;const K=Io.translate(E.x+M.x,E.y+M.y).scale(E.zoom),ae=[[0,0],[T.width,T.height]],oe=A.constrain()(K,ae,Q),de=e.viewport.x!==oe.x||e.viewport.y!==oe.y||e.viewport.zoom!==oe.k;return A.transform(P,oe),de},me=M=>{const E=M instanceof Function?M(e):M,T=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ie(E.defaultEdgeOptions)&&(e.defaultEdgeOptions=E.defaultEdgeOptions);const A=E.modelValue||E.nodes||E.edges?[]:void 0;A&&(E.modelValue&&A.push(...E.modelValue),E.nodes&&A.push(...E.nodes),E.edges&&A.push(...E.edges),x(A));const P=()=>{Ie(E.maxZoom)&&O(E.maxZoom),Ie(E.minZoom)&&_(E.minZoom),Ie(E.translateExtent)&&B(E.translateExtent)};for(const Q of Object.keys(E)){const K=Q,ae=E[K];![...az,...T].includes(K)&&Ie(ae)&&(e[K]=ae)}pl(()=>e.d3Zoom).not.toBeNull().then(P),e.initialized||(e.initialized=!0)};return{updateNodePositions:f,updateNodeDimensions:h,setElements:x,setNodes:L,setEdges:I,addNodes:R,addEdges:k,removeNodes:N,removeEdges:D,findNode:c,findEdge:d,updateEdge:z,updateEdgeData:F,updateNode:G,updateNodeData:W,applyEdgeChanges:Y,applyNodeChanges:j,addSelectedElements:w,addSelectedNodes:m,addSelectedEdges:v,setMinZoom:_,setMaxZoom:O,setTranslateExtent:B,setNodeExtent:$,setPaneClickDistance:C,removeSelectedElements:y,removeSelectedNodes:g,removeSelectedEdges:b,startConnection:le,updateConnection:re,endConnection:X,setInteractive:V,setState:me,getIntersectingNodes:J,getIncomers:i,getOutgoers:a,getConnectedEdges:l,getHandleConnections:u,isNodeIntersecting:pe,panBy:we,fitView:M=>o.value.fitView(M),zoomIn:M=>o.value.zoomIn(M),zoomOut:M=>o.value.zoomOut(M),zoomTo:(M,E)=>o.value.zoomTo(M,E),setViewport:(M,E)=>o.value.setViewport(M,E),setTransform:(M,E)=>o.value.setTransform(M,E),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(M,E,T)=>o.value.setCenter(M,E,T),fitBounds:(M,E)=>o.value.fitBounds(M,E),project:M=>o.value.project(M),screenToFlowCoordinate:M=>o.value.screenToFlowCoordinate(M),flowToScreenCoordinate:M=>o.value.flowToScreenCoordinate(M),toObject:()=>{const M=[],E=[];for(const T of e.nodes){const{computedPosition:A,handleBounds:P,selected:Q,dimensions:K,isParent:ae,resizing:oe,dragging:de,events:ve,...be}=T;M.push(be)}for(const T of e.edges){const{selected:A,sourceNode:P,targetNode:Q,events:K,...ae}=T;E.push(ae)}return JSON.parse(JSON.stringify({nodes:M,edges:E,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:M=>new Promise(E=>{const{nodes:T,edges:A,position:P,zoom:Q,viewport:K}=M;T&&L(T),A&&I(A);const[ae,oe]=K?.x&&K?.y?[K.x,K.y]:P??[null,null];if(ae&&oe){const de=K?.zoom||Q||e.viewport.zoom;return pl(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:ae,y:oe,zoom:de}).then(()=>{E(!0)})})}else E(!0)}),updateNodeInternals:r,viewportHelper:o,$reset:()=>{const M=Wv();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const E=Io.translate(M.defaultViewport.x??0,M.defaultViewport.y??0).scale(to(M.defaultViewport.zoom??1,M.minZoom,M.maxZoom)),T=e.viewportRef.getBoundingClientRect(),A=[[0,0],[T.width,T.height]],P=e.d3Zoom.constrain()(E,A,M.translateExtent);e.d3Zoom.transform(e.d3Selection,P)}me(M)},$destroy:()=>{}}}const lz=["data-id","data-handleid","data-nodeid","data-handlepos"],uz={name:"Handle",compatConfig:{MODE:3}},no=s.defineComponent({...uz,props:{id:{default:null},type:{},position:{default:()=>se.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=s.createPropsRestProxy(e,["position","connectable","connectableStart","connectableEnd","id"]),o=s.toRef(()=>n.type??"source"),r=s.toRef(()=>n.isValidConnection??null),{id:i,connectionStartHandle:a,connectionClickStartHandle:l,connectionEndHandle:u,vueFlowRef:c,nodesConnectable:d,noDragClassName:f,noPanClassName:h}=Pe(),{id:p,node:m,nodeEl:v,connectedEdges:w}=Hv(),g=s.ref(),b=s.toRef(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),y=s.toRef(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),_=s.toRef(()=>{var I,x,R,k,N,D;return((I=a.value)==null?void 0:I.nodeId)===p&&((x=a.value)==null?void 0:x.id)===e.id&&((R=a.value)==null?void 0:R.type)===o.value||((k=u.value)==null?void 0:k.nodeId)===p&&((N=u.value)==null?void 0:N.id)===e.id&&((D=u.value)==null?void 0:D.type)===o.value}),O=s.toRef(()=>{var I,x,R;return((I=l.value)==null?void 0:I.nodeId)===p&&((x=l.value)==null?void 0:x.id)===e.id&&((R=l.value)==null?void 0:R.type)===o.value}),{handlePointerDown:B,handleClick:$}=Fv({nodeId:p,handleId:e.id,isValidConnection:r,type:o}),C=s.computed(()=>typeof e.connectable=="string"&&e.connectable==="single"?!w.value.some(I=>{const x=I[`${o.value}Handle`];return I[o.value]!==p?!1:x?x===e.id:!0}):typeof e.connectable=="number"?w.value.filter(I=>{const x=I[`${o.value}Handle`];return I[o.value]!==p?!1:x?x===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(m,w.value):Ie(e.connectable)?e.connectable:d.value);s.onMounted(()=>{var I;if(!m.dimensions.width||!m.dimensions.height)return;const x=(I=m.handleBounds[o.value])==null?void 0:I.find(j=>j.id===e.id);if(!c.value||x)return;const R=c.value.querySelector(".vue-flow__transformationpane");if(!v.value||!g.value||!R||!e.id)return;const k=v.value.getBoundingClientRect(),N=g.value.getBoundingClientRect(),D=window.getComputedStyle(R),{m22:z}=new window.DOMMatrixReadOnly(D.transform),F={id:e.id,position:e.position,x:(N.left-k.left)/z,y:(N.top-k.top)/z,type:o.value,nodeId:p,...Ka(g.value)};m.handleBounds[o.value]=[...m.handleBounds[o.value]??[],F]});function V(I){const x=Hu(I);C.value&&b.value&&(x&&I.button===0||!x)&&B(I)}function L(I){!p||!l.value&&!b.value||C.value&&$(I)}return t({handleClick:$,handlePointerDown:B,onClick:L,onPointerDown:V}),(I,x)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"handle",ref:g,"data-id":`${s.unref(i)}-${s.unref(p)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":s.unref(p),"data-handlepos":I.position,class:s.normalizeClass(["vue-flow__handle",[`vue-flow__handle-${I.position}`,`vue-flow__handle-${e.id}`,s.unref(f),s.unref(h),o.value,{connectable:C.value,connecting:O.value,connectablestart:b.value,connectableend:y.value,connectionindicator:C.value&&(b.value&&!_.value||y.value&&_.value)}]]),onMousedown:V,onTouchstartPassive:V,onClick:L},[s.renderSlot(I.$slots,"default",{id:I.id})],42,lz))}}),es=function({sourcePosition:e=se.Bottom,targetPosition:t=se.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:i,data:a}){const l=a.label??n;return[s.h(no,{type:"target",position:t,connectable:o,isValidConnection:r}),typeof l!="string"&&l?s.h(l):s.h(s.Fragment,[l]),s.h(no,{type:"source",position:e,connectable:o,isValidConnection:i})]};es.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];es.inheritAttrs=!1;es.compatConfig={MODE:3};const cz=es,ts=function({targetPosition:e=se.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:r}){const i=r.label??t;return[s.h(no,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof i!="string"&&i?s.h(i):s.h(s.Fragment,[i])]};ts.props=["targetPosition","label","isValidTargetPos","connectable","data"];ts.inheritAttrs=!1;ts.compatConfig={MODE:3};const dz=ts,ns=function({sourcePosition:e=se.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:r}){const i=r.label??t;return[typeof i!="string"&&i?s.h(i):s.h(s.Fragment,[i]),s.h(no,{type:"source",position:e,connectable:n,isValidConnection:o})]};ns.props=["sourcePosition","label","isValidSourcePos","connectable","data"];ns.inheritAttrs=!1;ns.compatConfig={MODE:3};const fz=ns,hz=["transform"],pz=["width","height","x","y","rx","ry"],mz=["y"],vz={name:"EdgeText",compatConfig:{MODE:3}},gz=s.defineComponent({...vz,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=s.ref({x:0,y:0,width:0,height:0}),n=s.ref(null),o=s.computed(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);s.onMounted(r),s.watch([()=>e.x,()=>e.y,n,()=>e.label],r);function r(){if(!n.value)return;const i=n.value.getBBox();(i.width!==t.value.width||i.height!==t.value.height)&&(t.value=i)}return(i,a)=>(s.openBlock(),s.createElementBlock("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[i.labelShowBg?(s.openBlock(),s.createElementBlock("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*i.labelBgPadding[0]}px`,height:`${t.value.height+2*i.labelBgPadding[1]}px`,x:-i.labelBgPadding[0],y:-i.labelBgPadding[1],style:s.normalizeStyle(i.labelBgStyle),rx:i.labelBgBorderRadius,ry:i.labelBgBorderRadius},null,12,pz)):s.createCommentVNode("",!0),s.createElementVNode("text",s.mergeProps(i.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:i.labelStyle}),[s.renderSlot(i.$slots,"default",{},()=>[typeof i.label!="string"?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.label),{key:0})):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(i.label),1)],64))])],16,mz)],8,hz))}}),yz=["id","d","marker-end","marker-start"],wz=["d","stroke-width"],bz={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},os=s.defineComponent({...bz,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=s.ref(null),o=s.ref(null),r=s.ref(null),i=s.useAttrs();return t({pathEl:n,interactionEl:o,labelEl:r}),(a,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("path",s.mergeProps(s.unref(i),{id:a.id,ref_key:"pathEl",ref:n,d:a.path,class:"vue-flow__edge-path","marker-end":a.markerEnd,"marker-start":a.markerStart}),null,16,yz),a.interactionWidth?(s.openBlock(),s.createElementBlock("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:a.path,"stroke-width":a.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,wz)):s.createCommentVNode("",!0),a.label&&a.labelX&&a.labelY?(s.openBlock(),s.createBlock(gz,{key:1,ref_key:"labelEl",ref:r,x:a.labelX,y:a.labelY,label:a.label,"label-show-bg":a.labelShowBg,"label-bg-style":a.labelBgStyle,"label-bg-padding":a.labelBgPadding,"label-bg-border-radius":a.labelBgBorderRadius,"label-style":a.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):s.createCommentVNode("",!0)],64))}});function Uv({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,l=o<t?o+a:o-a;return[i,l,r,a]}function Gv({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:l}){const u=e*.125+r*.375+a*.375+n*.125,c=t*.125+i*.375+l*.375+o*.125,d=Math.abs(u-e),f=Math.abs(c-t);return[u,c,d,f]}function Ei(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Pf({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let a,l;switch(e){case se.Left:a=t-Ei(t-o,i),l=n;break;case se.Right:a=t+Ei(o-t,i),l=n;break;case se.Top:a=t,l=n-Ei(n-r,i);break;case se.Bottom:a=t,l=n+Ei(r-n,i);break}return[a,l]}function Zv(e){const{sourceX:t,sourceY:n,sourcePosition:o=se.Bottom,targetX:r,targetY:i,targetPosition:a=se.Top,curvature:l=.25}=e,[u,c]=Pf({pos:o,x1:t,y1:n,x2:r,y2:i,c:l}),[d,f]=Pf({pos:a,x1:r,y1:i,x2:t,y2:n,c:l}),[h,p,m,v]=Gv({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:u,sourceControlY:c,targetControlX:d,targetControlY:f});return[`M${t},${n} C${u},${c} ${d},${f} ${r},${i}`,h,p,m,v]}function Bf({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,a;switch(e){case se.Left:case se.Right:i=.5*(t+o),a=n;break;case se.Top:case se.Bottom:i=t,a=.5*(n+r);break}return[i,a]}function Xv(e){const{sourceX:t,sourceY:n,sourcePosition:o=se.Bottom,targetX:r,targetY:i,targetPosition:a=se.Top}=e,[l,u]=Bf({pos:o,x1:t,y1:n,x2:r,y2:i}),[c,d]=Bf({pos:a,x1:r,y1:i,x2:t,y2:n}),[f,h,p,m]=Gv({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:l,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${l},${u} ${c},${d} ${r},${i}`,f,h,p,m]}const Yf={[se.Left]:{x:-1,y:0},[se.Right]:{x:1,y:0},[se.Top]:{x:0,y:-1},[se.Bottom]:{x:0,y:1}};function _z({source:e,sourcePosition:t=se.Bottom,target:n}){return t===se.Left||t===se.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function Af(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function kz({source:e,sourcePosition:t=se.Bottom,target:n,targetPosition:o=se.Top,center:r,offset:i}){const a=Yf[t],l=Yf[o],u={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+l.x*i,y:n.y+l.y*i},d=_z({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f];let p,m,v;const w={x:0,y:0},g={x:0,y:0},[b,y,_,O]=Uv({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){m=r.x??b,v=r.y??y;const $=[{x:m,y:u.y},{x:m,y:c.y}],C=[{x:u.x,y:v},{x:c.x,y:v}];a[f]===h?p=f==="x"?$:C:p=f==="x"?C:$}else{const $=[{x:u.x,y:c.y}],C=[{x:c.x,y:u.y}];if(f==="x"?p=a.x===h?C:$:p=a.y===h?$:C,t===o){const R=Math.abs(e[f]-n[f]);if(R<=i){const k=Math.min(i-1,i-R);a[f]===h?w[f]=(u[f]>e[f]?-1:1)*k:g[f]=(c[f]>n[f]?-1:1)*k}}if(t!==o){const R=f==="x"?"y":"x",k=a[f]===l[R],N=u[R]>c[R],D=u[R]<c[R];(a[f]===1&&(!k&&N||k&&D)||a[f]!==1&&(!k&&D||k&&N))&&(p=f==="x"?$:C)}const V={x:u.x+w.x,y:u.y+w.y},L={x:c.x+g.x,y:c.y+g.y},I=Math.max(Math.abs(V.x-p[0].x),Math.abs(L.x-p[0].x)),x=Math.max(Math.abs(V.y-p[0].y),Math.abs(L.y-p[0].y));I>=x?(m=(V.x+L.x)/2,v=p[0].y):(m=p[0].x,v=(V.y+L.y)/2)}return[[e,{x:u.x+w.x,y:u.y+w.y},...p,{x:c.x+g.x,y:c.y+g.y},n],m,v,_,O]}function xz(e,t,n,o){const r=Math.min(Af(e,t)/2,Af(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+r*c},${a}Q ${i},${a} ${i},${a+r*d}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${i},${a+r*u}Q ${i},${a} ${i+r*l},${a}`}function Dl(e){const{sourceX:t,sourceY:n,sourcePosition:o=se.Bottom,targetX:r,targetY:i,targetPosition:a=se.Top,borderRadius:l=5,centerX:u,centerY:c,offset:d=20}=e,[f,h,p,m,v]=kz({source:{x:t,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:u,y:c},offset:d});return[f.reduce((g,b,y)=>{let _;return y>0&&y<f.length-1?_=xz(f[y-1],b,f[y+1],l):_=`${y===0?"M":"L"}${b.x} ${b.y}`,g+=_,g},""),h,p,m,v]}function Ez(e){const{sourceX:t,sourceY:n,targetX:o,targetY:r}=e,[i,a,l,u]=Uv({sourceX:t,sourceY:n,targetX:o,targetY:r});return[`M ${t},${n}L ${o},${r}`,i,a,l,u]}const Sz=s.defineComponent({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Ez(e);return s.h(os,{path:n,labelX:o,labelY:r,...t,...e})}}}),Dz=Sz,Mz=s.defineComponent({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Dl({...e,sourcePosition:e.sourcePosition??se.Bottom,targetPosition:e.targetPosition??se.Top});return s.h(os,{path:n,labelX:o,labelY:r,...t,...e})}}}),qv=Mz,Nz=s.defineComponent({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>s.h(qv,{...e,...t,borderRadius:0})}}),Cz=Nz,Oz=s.defineComponent({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Zv({...e,sourcePosition:e.sourcePosition??se.Bottom,targetPosition:e.targetPosition??se.Top});return s.h(os,{path:n,labelX:o,labelY:r,...t,...e})}}}),Tz=Oz,$z=s.defineComponent({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Xv({...e,sourcePosition:e.sourcePosition??se.Bottom,targetPosition:e.targetPosition??se.Top});return s.h(os,{path:n,labelX:o,labelY:r,...t,...e})}}}),Pz=$z,Bz={input:fz,default:cz,output:dz},Yz={default:Tz,straight:Dz,step:Cz,smoothstep:qv,simplebezier:Pz};function Az(e,t,n){const o=s.computed(()=>v=>t.value.get(v)),r=s.computed(()=>v=>n.value.get(v)),i=s.computed(()=>{const v={...Yz,...e.edgeTypes},w=Object.keys(v);for(const g of e.edges)g.type&&!w.includes(g.type)&&(v[g.type]=g.type);return v}),a=s.computed(()=>{const v={...Bz,...e.nodeTypes},w=Object.keys(v);for(const g of e.nodes)g.type&&!w.includes(g.type)&&(v[g.type]=g.type);return v}),l=s.computed(()=>e.onlyRenderVisibleElements?Tv(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),u=s.computed(()=>{if(e.onlyRenderVisibleElements){const v=[];for(const w of e.edges){const g=t.value.get(w.source),b=t.value.get(w.target);$R({sourcePos:g.computedPosition||{x:0,y:0},targetPos:b.computedPosition||{x:0,y:0},sourceWidth:g.dimensions.width,sourceHeight:g.dimensions.height,targetWidth:b.dimensions.width,targetHeight:b.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&v.push(w)}return v}return e.edges}),c=s.computed(()=>[...l.value,...u.value]),d=s.computed(()=>{const v=[];for(const w of e.nodes)w.selected&&v.push(w);return v}),f=s.computed(()=>{const v=[];for(const w of e.edges)w.selected&&v.push(w);return v}),h=s.computed(()=>[...d.value,...f.value]),p=s.computed(()=>{const v=[];for(const w of e.nodes)w.dimensions.width&&w.dimensions.height&&w.handleBounds!==void 0&&v.push(w);return v}),m=s.computed(()=>l.value.length>0&&p.value.length===l.value.length);return{getNode:o,getEdge:r,getElements:c,getEdgeTypes:i,getNodeTypes:a,getEdges:u,getNodes:l,getSelectedElements:h,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:p,areNodesInitialized:m}}class Ln{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=s.getCurrentInstance())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??Ln.instance;return Ln.instance=o??new Ln,n&&(n.config.globalProperties.$vueFlowStorage=Ln.instance),Ln.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Wv(),r=s.reactive(o),i={};for(const[h,p]of Object.entries(r.hooks)){const m=`on${h.charAt(0).toUpperCase()+h.slice(1)}`;i[m]=p.on}const a={};for(const[h,p]of Object.entries(r.hooks))a[h]=p.trigger;const l=s.computed(()=>{const h=new Map;for(const p of r.nodes)h.set(p.id,p);return h}),u=s.computed(()=>{const h=new Map;for(const p of r.edges)h.set(p.id,p);return h}),c=Az(r,l,u),d=sz(r,l,u);d.setState({...r,...n});const f={...i,...c,...d,...MA(r),nodeLookup:l,edgeLookup:u,emits:a,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}};return this.set(t,f),f}getId(){return`vue-flow-${this.currentId++}`}}function Pe(e){const t=Ln.getInstance(),n=s.getCurrentScope(),o=typeof e=="object",r=o?e:{id:e},i=r.id,a=i??n?.vueFlowId;let l;if(n){const u=s.inject($f,null);typeof u<"u"&&u!==null&&(!a||u.id===a)&&(l=u)}if(l||a&&(l=t.get(a)),!l||a&&l.id!==a){const u=i??t.getId(),c=t.create(u,r);l=c,(n??s.effectScope(!0)).run(()=>{s.watch(c.applyDefault,(f,h,p)=>{const m=w=>{c.applyNodeChanges(w)},v=w=>{c.applyEdgeChanges(w)};f?(c.onNodesChange(m),c.onEdgesChange(v)):(c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(v)),p(()=>{c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(v)})},{immediate:!0}),Ir(()=>{if(l){const f=t.get(l.id);f?f.$destroy():ti(`No store instance found for id ${l.id} in storage.`)}})})}else o&&l.setState(r);if(n&&(s.provide($f,l),n.vueFlowId=l.id),o){const u=s.getCurrentInstance();u?.type.name!=="VueFlow"&&l.emits.error(new ze(Ve.USEVUEFLOW_OPTIONS))}return l}function Iz(e){const{emits:t,dimensions:n}=Pe();let o;s.onMounted(()=>{const r=()=>{var i,a;if(!e.value||!(((a=(i=e.value).checkVisibility)==null?void 0:a.call(i))??!0))return;const l=Ka(e.value);(l.width===0||l.height===0)&&t.error(new ze(Ve.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:l.width||500,height:l.height||500}};r(),window.addEventListener("resize",r),e.value&&(o=new ResizeObserver(()=>r()),o.observe(e.value)),s.onBeforeUnmount(()=>{window.removeEventListener("resize",r),o&&e.value&&o.unobserve(e.value)})})}const Vz={name:"UserSelection",compatConfig:{MODE:3}},Rz=s.defineComponent({...Vz,props:{userSelectionRect:{}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",{class:"vue-flow__selection vue-flow__container",style:s.normalizeStyle({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),zz=["tabIndex"],Lz={name:"NodesSelection",compatConfig:{MODE:3}},Fz=s.defineComponent({...Lz,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:r,disableKeyboardA11y:i,userSelectionActive:a}=Pe(),l=jv(),u=s.ref(null),c=Lv({el:u,onStart(m){t.selectionDragStart(m),t.nodeDragStart(m)},onDrag(m){t.selectionDrag(m),t.nodeDrag(m)},onStop(m){t.selectionDragStop(m),t.nodeDragStop(m)}});s.onMounted(()=>{var m;i.value||(m=u.value)==null||m.focus({preventScroll:!0})});const d=s.computed(()=>Ov(o.value)),f=s.computed(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function h(m){t.selectionContextMenu({event:m,nodes:o.value})}function p(m){i.value||No[m.key]&&(m.preventDefault(),l({x:No[m.key].x,y:No[m.key].y},m.shiftKey))}return(m,v)=>!s.unref(a)&&d.value.width&&d.value.height?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["vue-flow__nodesselection vue-flow__container",s.unref(r)]),style:s.normalizeStyle({transform:`translate(${s.unref(n).x}px,${s.unref(n).y}px) scale(${s.unref(n).zoom})`})},[s.createElementVNode("div",{ref_key:"el",ref:u,class:s.normalizeClass([{dragging:s.unref(c)},"vue-flow__nodesselection-rect"]),style:s.normalizeStyle(f.value),tabIndex:s.unref(i)?void 0:-1,onContextmenu:h,onKeydown:p},null,46,zz)],6)):s.createCommentVNode("",!0)}});function Hz(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const jz={name:"Pane",compatConfig:{MODE:3}},Wz=s.defineComponent({...jz,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:r,userSelectionActive:i,removeSelectedElements:a,userSelectionRect:l,elementsSelectable:u,nodesSelectionActive:c,getSelectedEdges:d,getSelectedNodes:f,removeNodes:h,removeEdges:p,selectionMode:m,deleteKeyCode:v,multiSelectionKeyCode:w,multiSelectionActive:g,edgeLookup:b,nodeLookup:y,connectionLookup:_,defaultEdgeOptions:O,connectionStartHandle:B,panOnDrag:$}=Pe(),C=s.shallowRef(null),V=s.shallowRef(new Set),L=s.shallowRef(new Set),I=s.shallowRef(null),x=s.toRef(()=>u.value&&(e.isSelecting||i.value)),R=s.toRef(()=>B.value!==null);let k=!1,N=!1;const D=xr(v,{actInsideInputWithModifier:!1}),z=xr(w);s.watch(D,X=>{X&&(h(f.value),p(d.value),c.value=!1)}),s.watch(z,X=>{g.value=X});function F(X,q){return J=>{J.target===q&&X?.(J)}}function j(X){if(k||R.value){k=!1;return}r.paneClick(X),a(),c.value=!1}function Y(X){var q;if(Array.isArray($.value)&&((q=$.value)!=null&&q.includes(2))){X.preventDefault();return}r.paneContextMenu(X)}function G(X){r.paneScroll(X)}function W(X){var q,J,pe;if(I.value=((q=t.value)==null?void 0:q.getBoundingClientRect())??null,!u.value||!e.isSelecting||X.button!==0||X.target!==C.value||!I.value)return;(pe=(J=X.target)==null?void 0:J.setPointerCapture)==null||pe.call(J,X.pointerId);const{x:we,y:me}=Hz(X,I.value);N=!0,k=!1,a(),l.value={width:0,height:0,startX:we,startY:me,x:we,y:me},r.selectionStart(X)}function le(X){var q;if(!I.value||!l.value)return;k=!0;const{x:J,y:pe}=Ot(X,I.value),{startX:we=0,startY:me=0}=l.value,ge={startX:we,startY:me,x:J<we?J:we,y:pe<me?pe:me,width:Math.abs(J-we),height:Math.abs(pe-me)},ue=V.value,ce=L.value;V.value=new Set(Tv(n.value,ge,o.value,m.value===Lu.Partial,!0).map(E=>E.id)),L.value=new Set;const M=((q=O.value)==null?void 0:q.selectable)??!0;for(const E of V.value){const T=_.value.get(E);if(T)for(const{edgeId:A}of T.values()){const P=b.value.get(A);P&&(P.selectable??M)&&L.value.add(A)}}if(!Tf(ue,V.value)){const E=_n(y.value,V.value,!0);r.nodesChange(E)}if(!Tf(ce,L.value)){const E=_n(b.value,L.value);r.edgesChange(E)}l.value=ge,i.value=!0,c.value=!1}function re(X){var q;X.button!==0||!N||((q=X.target)==null||q.releasePointerCapture(X.pointerId),!i.value&&l.value&&X.target===C.value&&j(X),i.value=!1,l.value=null,c.value=V.value.size>0,r.selectionEnd(X),e.selectionKeyPressed&&(k=!1),N=!1)}return(X,q)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"container",ref:C,class:s.normalizeClass(["vue-flow__pane vue-flow__container",{selection:X.isSelecting}]),onClick:q[0]||(q[0]=J=>x.value?void 0:F(j,C.value)(J)),onContextmenu:q[1]||(q[1]=J=>F(Y,C.value)(J)),onWheelPassive:q[2]||(q[2]=J=>F(G,C.value)(J)),onPointerenter:q[3]||(q[3]=J=>x.value?void 0:s.unref(r).paneMouseEnter(J)),onPointerdown:q[4]||(q[4]=J=>x.value?W(J):s.unref(r).paneMouseMove(J)),onPointermove:q[5]||(q[5]=J=>x.value?le(J):s.unref(r).paneMouseMove(J)),onPointerup:q[6]||(q[6]=J=>x.value?re(J):void 0),onPointerleave:q[7]||(q[7]=J=>s.unref(r).paneMouseLeave(J))},[s.renderSlot(X.$slots,"default"),s.unref(i)&&s.unref(l)?(s.openBlock(),s.createBlock(Rz,{key:0,"user-selection-rect":s.unref(l)},null,8,["user-selection-rect"])):s.createCommentVNode("",!0),s.unref(c)&&s.unref(f).length?(s.openBlock(),s.createBlock(Fz,{key:1})):s.createCommentVNode("",!0)],34))}}),Uz={name:"Transform",compatConfig:{MODE:3}},Gz=s.defineComponent({...Uz,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Pe(),r=s.computed(()=>n.value?!o.value:!1),i=s.computed(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(a,l)=>(s.openBlock(),s.createElementBlock("div",{class:"vue-flow__transformationpane vue-flow__container",style:s.normalizeStyle({transform:i.value,opacity:r.value?0:void 0})},[s.renderSlot(a.$slots,"default")],4))}}),Zz={name:"Viewport",compatConfig:{MODE:3}},Xz=s.defineComponent({...Zz,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:r,zoomActivationKeyCode:i,selectionKeyCode:a,panActivationKeyCode:l,panOnScroll:u,panOnScrollMode:c,panOnScrollSpeed:d,panOnDrag:f,zoomOnDoubleClick:h,zoomOnPinch:p,zoomOnScroll:m,preventScrolling:v,noWheelClassName:w,noPanClassName:g,emits:b,connectionStartHandle:y,userSelectionActive:_,paneDragging:O,d3Zoom:B,d3Selection:$,d3ZoomHandler:C,viewport:V,viewportRef:L,paneClickDistance:I}=Pe();Iz(L);const x=s.shallowRef(!1),R=s.shallowRef(!1);let k=null,N=!1,D=0,z={x:0,y:0,zoom:0};const F=xr(l),j=xr(a),Y=xr(i),G=s.toRef(()=>(!j.value||j.value&&a.value===!0)&&(F.value||f.value)),W=s.toRef(()=>F.value||u.value),le=s.toRef(()=>a.value===!0&&G.value!==!0),re=s.toRef(()=>j.value&&a.value!==!0||_.value||le.value),X=s.toRef(()=>y.value!==null);s.onMounted(()=>{if(!L.value){ti("Viewport element is missing");return}const me=L.value,ge=me.getBoundingClientRect(),ue=dR().clickDistance(I.value).scaleExtent([t.value,n.value]).translateExtent(r.value),ce=pt(me).call(ue),M=ce.on("wheel.zoom"),E=Io.translate(o.value.x??0,o.value.y??0).scale(to(o.value.zoom??1,t.value,n.value)),T=[[0,0],[ge.width,ge.height]],A=ue.constrain()(E,T,r.value);ue.transform(ce,A),ue.wheelDelta(gf),B.value=ue,$.value=ce,C.value=M,V.value={x:A.x,y:A.y,zoom:A.k},ue.on("start",P=>{var Q;if(!P.sourceEvent)return null;D=P.sourceEvent.button,x.value=!0;const K=pe(P.transform);((Q=P.sourceEvent)==null?void 0:Q.type)==="mousedown"&&(O.value=!0),z=K,b.viewportChangeStart(K),b.moveStart({event:P,flowTransform:K})}),ue.on("end",P=>{if(!P.sourceEvent)return null;if(x.value=!1,O.value=!1,q(G.value,D??0)&&!N&&b.paneContextMenu(P.sourceEvent),N=!1,J(z,P.transform)){const Q=pe(P.transform);z=Q,b.viewportChangeEnd(Q),b.moveEnd({event:P,flowTransform:Q})}}),ue.filter(P=>{var Q;const K=Y.value||m.value,ae=p.value&&P.ctrlKey,oe=P.button,de=P.type==="wheel";if(oe===1&&P.type==="mousedown"&&(we(P,"vue-flow__node")||we(P,"vue-flow__edge")))return!0;if(!G.value&&!K&&!W.value&&!h.value&&!p.value||_.value||X.value&&!de||!h.value&&P.type==="dblclick"||we(P,w.value)&&de||we(P,g.value)&&(!de||W.value&&de&&!Y.value)||!p.value&&P.ctrlKey&&de||!K&&!W.value&&!ae&&de)return!1;if(!p&&P.type==="touchstart"&&((Q=P.touches)==null?void 0:Q.length)>1)return P.preventDefault(),!1;if(!G.value&&(P.type==="mousedown"||P.type==="touchstart")||le.value&&Array.isArray(f.value)&&f.value.includes(0)&&oe===0||Array.isArray(f.value)&&!f.value.includes(oe)&&(P.type==="mousedown"||P.type==="touchstart"))return!1;const ve=Array.isArray(f.value)&&f.value.includes(oe)||a.value===!0&&Array.isArray(f.value)&&!f.value.includes(0)||!oe||oe<=1;return(!P.ctrlKey||F.value||de)&&ve}),s.watch([_,G],()=>{_.value&&!x.value?ue.on("zoom",null):_.value||ue.on("zoom",P=>{V.value={x:P.transform.x,y:P.transform.y,zoom:P.transform.k};const Q=pe(P.transform);N=q(G.value,D??0),b.viewportChange(Q),b.move({event:P,flowTransform:Q})})},{immediate:!0}),s.watch([_,W,c,Y,p,v,w],()=>{W.value&&!Y.value&&!_.value?ce.on("wheel.zoom",P=>{if(we(P,w.value))return!1;const Q=Y.value||m.value,K=p.value&&P.ctrlKey;if(!(!v.value||W.value||Q||K))return!1;P.preventDefault(),P.stopImmediatePropagation();const oe=ce.property("__zoom").k||1,de=ba();if(!F.value&&P.ctrlKey&&p.value&&de){const mn=Dt(P),Jo=gf(P),Yn=oe*2**Jo;ue.scaleTo(ce,Yn,mn,P);return}const ve=P.deltaMode===1?20:1;let be=c.value===kr.Vertical?0:P.deltaX*ve,Fe=c.value===kr.Horizontal?0:P.deltaY*ve;!de&&P.shiftKey&&c.value!==kr.Vertical&&!be&&Fe&&(be=Fe,Fe=0),ue.translateBy(ce,-(be/oe)*d.value,-(Fe/oe)*d.value);const Le=pe(ce.property("__zoom"));k&&clearTimeout(k),R.value?(b.move({event:P,flowTransform:Le}),b.viewportChange(Le),k=setTimeout(()=>{b.moveEnd({event:P,flowTransform:Le}),b.viewportChangeEnd(Le),R.value=!1},150)):(R.value=!0,b.moveStart({event:P,flowTransform:Le}),b.viewportChangeStart(Le))},{passive:!1}):typeof M<"u"&&ce.on("wheel.zoom",function(P,Q){const K=!v.value&&P.type==="wheel"&&!P.ctrlKey,ae=Y.value||m.value,oe=p.value&&P.ctrlKey;if(!ae&&!u.value&&!oe&&P.type==="wheel"||K||we(P,w.value))return null;P.preventDefault(),M.call(this,P,Q)},{passive:!1})},{immediate:!0})});function q(me,ge){return ge===2&&Array.isArray(me)&&me.includes(2)}function J(me,ge){return me.x!==ge.x&&!Number.isNaN(ge.x)||me.y!==ge.y&&!Number.isNaN(ge.y)||me.zoom!==ge.k&&!Number.isNaN(ge.k)}function pe(me){return{x:me.x,y:me.y,zoom:me.k}}function we(me,ge){return me.target.closest(`.${ge}`)}return(me,ge)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"viewportRef",ref:L,class:"vue-flow__viewport vue-flow__container"},[s.createVNode(Wz,{"is-selecting":re.value,"selection-key-pressed":s.unref(j),class:s.normalizeClass({connecting:X.value,dragging:s.unref(O),draggable:s.unref(f)===!0||Array.isArray(s.unref(f))&&s.unref(f).includes(0)})},{default:s.withCtx(()=>[s.createVNode(Gz,null,{default:s.withCtx(()=>[s.renderSlot(me.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),qz=["id"],Kz=["id"],Jz=["id"],Qz={name:"A11yDescriptions",compatConfig:{MODE:3}},eL=s.defineComponent({...Qz,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Pe();return(r,i)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{id:`${s.unref(kv)}-${s.unref(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+s.toDisplayString(s.unref(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,qz),s.createElementVNode("div",{id:`${s.unref(xv)}-${s.unref(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,Kz),s.unref(n)?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:0,id:`${s.unref(gR)}-${s.unref(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},s.toDisplayString(s.unref(o)),9,Jz))],64))}});function tL(){const e=Pe();s.watch(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function nL(e,t,n){return n===se.Left?e-t:n===se.Right?e+t:e}function oL(e,t,n){return n===se.Top?e-t:n===se.Bottom?e+t:e}const ju=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=se.Top,type:r}){return s.h("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:nL(t,e,o),cy:oL(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};ju.props=["radius","centerX","centerY","position","type"];ju.compatConfig={MODE:3};const If=ju,rL=s.defineComponent({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:r,emits:i,nodesSelectionActive:a,noPanClassName:l,getEdgeTypes:u,removeSelectedEdges:c,findEdge:d,findNode:f,isValidConnection:h,multiSelectionActive:p,disableKeyboardA11y:m,elementsSelectable:v,edgesUpdatable:w,edgesFocusable:g,hooks:b}=Pe(),y=s.computed(()=>d(e.id)),{emit:_,on:O}=ZR(y.value,i),B=s.inject(Qa),$=s.getCurrentInstance(),C=s.ref(!1),V=s.ref(!1),L=s.ref(""),I=s.ref(null),x=s.ref("source"),R=s.ref(null),k=s.toRef(()=>typeof y.value.selectable>"u"?v.value:y.value.selectable),N=s.toRef(()=>typeof y.value.updatable>"u"?w.value:y.value.updatable),D=s.toRef(()=>typeof y.value.focusable>"u"?g.value:y.value.focusable);s.provide(WR,e.id),s.provide(UR,R);const z=s.computed(()=>y.value.class instanceof Function?y.value.class(y.value):y.value.class),F=s.computed(()=>y.value.style instanceof Function?y.value.style(y.value):y.value.style),j=s.computed(()=>{const E=y.value.type||"default",T=B?.[`edge-${E}`];if(T)return T;let A=y.value.template??u.value[E];if(typeof A=="string"&&$){const P=Object.keys($.appContext.components);P&&P.includes(E)&&(A=s.resolveComponent(E,!1))}return A&&typeof A!="string"?A:(i.error(new ze(Ve.EDGE_TYPE_MISSING,A)),!1)}),{handlePointerDown:Y}=Fv({nodeId:L,handleId:I,type:x,isValidConnection:h,edgeUpdaterType:x,onEdgeUpdate:le,onEdgeUpdateEnd:re});return()=>{const E=f(y.value.source),T=f(y.value.target),A="pathOptions"in y.value?y.value.pathOptions:{};if(!E&&!T)return i.error(new ze(Ve.EDGE_SOURCE_TARGET_MISSING,y.value.id,y.value.source,y.value.target)),null;if(!E)return i.error(new ze(Ve.EDGE_SOURCE_MISSING,y.value.id,y.value.source)),null;if(!T)return i.error(new ze(Ve.EDGE_TARGET_MISSING,y.value.id,y.value.target)),null;if(!y.value||y.value.hidden||E.hidden||T.hidden)return null;let P;o.value===$n.Strict?P=E.handleBounds.source:P=[...E.handleBounds.source||[],...E.handleBounds.target||[]];const Q=Sf(P,y.value.sourceHandle);let K;o.value===$n.Strict?K=T.handleBounds.target:K=[...T.handleBounds.target||[],...T.handleBounds.source||[]];const ae=Sf(K,y.value.targetHandle),oe=Q?.position||se.Bottom,de=ae?.position||se.Top,{x:ve,y:be}=Vo(E,Q,oe),{x:Fe,y:Le}=Vo(T,ae,de);return y.value.sourceX=ve,y.value.sourceY=be,y.value.targetX=Fe,y.value.targetY=Le,s.h("g",{ref:R,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${j.value===!1?"default":y.value.type||"default"}`,l.value,z.value,{updating:C.value,selected:y.value.selected,animated:y.value.animated,inactive:!k.value&&!b.value.edgeClick.hasListeners()}],tabIndex:D.value?0:void 0,"aria-label":y.value.ariaLabel===null?void 0:y.value.ariaLabel??`Edge from ${y.value.source} to ${y.value.target}`,"aria-describedby":D.value?`${xv}-${t}`:void 0,"aria-roledescription":"edge",role:D.value?"group":"img",...y.value.domAttributes,onClick:q,onContextmenu:J,onDblclick:pe,onMouseenter:we,onMousemove:me,onMouseleave:ge,onKeyDown:D.value?M:void 0},[V.value?null:s.h(j.value===!1?u.value.default:j.value,{id:e.id,sourceNode:E,targetNode:T,source:y.value.source,target:y.value.target,type:y.value.type,updatable:N.value,selected:y.value.selected,animated:y.value.animated,label:y.value.label,labelStyle:y.value.labelStyle,labelShowBg:y.value.labelShowBg,labelBgStyle:y.value.labelBgStyle,labelBgPadding:y.value.labelBgPadding,labelBgBorderRadius:y.value.labelBgBorderRadius,data:y.value.data,events:{...y.value.events,...O},style:F.value,markerStart:`url('#${jr(y.value.markerStart,t)}')`,markerEnd:`url('#${jr(y.value.markerEnd,t)}')`,sourcePosition:oe,targetPosition:de,sourceX:ve,sourceY:be,targetX:Fe,targetY:Le,sourceHandleId:y.value.sourceHandle,targetHandleId:y.value.targetHandle,interactionWidth:y.value.interactionWidth,...A}),[N.value==="source"||N.value===!0?[s.h("g",{onMousedown:ue,onMouseenter:G,onMouseout:W},s.h(If,{position:oe,centerX:ve,centerY:be,radius:r.value,type:"source","data-type":"source"}))]:null,N.value==="target"||N.value===!0?[s.h("g",{onMousedown:ce,onMouseenter:G,onMouseout:W},s.h(If,{position:de,centerX:Fe,centerY:Le,radius:r.value,type:"target","data-type":"target"}))]:null]])};function G(){C.value=!0}function W(){C.value=!1}function le(E,T){_.update({event:E,edge:y.value,connection:T})}function re(E){_.updateEnd({event:E,edge:y.value}),V.value=!1}function X(E,T){E.button===0&&(V.value=!0,L.value=T?y.value.target:y.value.source,I.value=(T?y.value.targetHandle:y.value.sourceHandle)??null,x.value=T?"target":"source",_.updateStart({event:E,edge:y.value}),Y(E))}function q(E){var T;const A={event:E,edge:y.value};k.value&&(a.value=!1,y.value.selected&&p.value?(c([y.value]),(T=R.value)==null||T.blur()):n([y.value])),_.click(A)}function J(E){_.contextMenu({event:E,edge:y.value})}function pe(E){_.doubleClick({event:E,edge:y.value})}function we(E){_.mouseEnter({event:E,edge:y.value})}function me(E){_.mouseMove({event:E,edge:y.value})}function ge(E){_.mouseLeave({event:E,edge:y.value})}function ue(E){X(E,!0)}function ce(E){X(E,!1)}function M(E){var T;!m.value&&Ev.includes(E.key)&&k.value&&(E.key==="Escape"?((T=R.value)==null||T.blur(),c([d(e.id)])):n([d(e.id)]))}}}),iL=rL,aL=s.defineComponent({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:r,connectionPosition:i,connectionLineType:a,connectionLineStyle:l,connectionLineOptions:u,connectionStatus:c,viewport:d,findNode:f}=Pe(),h=(e=s.inject(Qa))==null?void 0:e["connection-line"],p=s.computed(()=>{var b;return f((b=o.value)==null?void 0:b.nodeId)}),m=s.computed(()=>{var b;return f((b=r.value)==null?void 0:b.nodeId)??null}),v=s.computed(()=>({x:(i.value.x-d.value.x)/d.value.zoom,y:(i.value.y-d.value.y)/d.value.zoom})),w=s.computed(()=>u.value.markerStart?`url(#${jr(u.value.markerStart,t)})`:""),g=s.computed(()=>u.value.markerEnd?`url(#${jr(u.value.markerEnd,t)})`:"");return()=>{var b,y,_;if(!p.value||!o.value)return null;const O=o.value.id,B=o.value.type,$=p.value.handleBounds;let C=$?.[B]??[];if(n.value===$n.Loose){const F=$?.[B==="source"?"target":"source"]??[];C=[...C,...F]}if(!C)return null;const V=(O?C.find(F=>F.id===O):C[0])??null,L=V?.position??se.Top,{x:I,y:x}=Vo(p.value,V,L);let R=null;m.value&&(n.value===$n.Strict?R=((b=m.value.handleBounds[B==="source"?"target":"source"])==null?void 0:b.find(F=>{var j;return F.id===((j=r.value)==null?void 0:j.id)}))||null:R=((y=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])==null?void 0:y.find(F=>{var j;return F.id===((j=r.value)==null?void 0:j.id)}))||null);const k=((_=r.value)==null?void 0:_.position)??(L?El[L]:null);if(!L||!k)return null;const N=a.value??u.value.type??zn.Bezier;let D="";const z={sourceX:I,sourceY:x,sourcePosition:L,targetX:v.value.x,targetY:v.value.y,targetPosition:k};return N===zn.Bezier?[D]=Zv(z):N===zn.Step?[D]=Dl({...z,borderRadius:0}):N===zn.SmoothStep?[D]=Dl(z):N===zn.SimpleBezier?[D]=Xv(z):D=`M${I},${x} ${v.value.x},${v.value.y}`,s.h("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},s.h("g",{class:"vue-flow__connection"},h?s.h(h,{sourceX:I,sourceY:x,sourcePosition:L,targetX:v.value.x,targetY:v.value.y,targetPosition:k,sourceNode:p.value,sourceHandle:V,targetNode:m.value,targetHandle:R,markerEnd:g.value,markerStart:w.value,connectionStatus:c.value}):s.h("path",{d:D,class:[u.value.class,c.value,"vue-flow__connection-path"],style:{...l.value,...u.value.style},"marker-end":g.value,"marker-start":w.value})))}}}),sL=aL,lL=["id","markerWidth","markerHeight","markerUnits","orient"],uL={name:"MarkerType",compatConfig:{MODE:3}},cL=s.defineComponent({...uL,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===s.unref(ga).ArrowClosed?(s.openBlock(),s.createElementBlock("polyline",{key:0,style:s.normalizeStyle({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):s.createCommentVNode("",!0),t.type===s.unref(ga).Arrow?(s.openBlock(),s.createElementBlock("polyline",{key:1,style:s.normalizeStyle({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):s.createCommentVNode("",!0)],8,lL))}}),dL={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},fL={name:"MarkerDefinitions",compatConfig:{MODE:3}},hL=s.defineComponent({...fL,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:r}=Pe(),i=s.computed(()=>{const a=new Set,l=[],u=c=>{if(c){const d=jr(c,t);a.has(d)||(typeof c=="object"?l.push({...c,id:d,color:c.color||r.value}):l.push({id:d,color:r.value,type:c}),a.add(d))}};for(const c of[o.value.markerEnd,o.value.markerStart])u(c);for(const c of n.value)for(const d of[c.markerStart,c.markerEnd])u(d);return l.sort((c,d)=>c.id.localeCompare(d.id))});return(a,l)=>(s.openBlock(),s.createElementBlock("svg",dL,[s.createElementVNode("defs",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,u=>(s.openBlock(),s.createBlock(cL,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),pL={name:"Edges",compatConfig:{MODE:3}},mL=s.defineComponent({...pL,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Pe();return(r,i)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(hL),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(n),a=>(s.openBlock(),s.createElementBlock("svg",{key:a.id,class:"vue-flow__edges vue-flow__container",style:s.normalizeStyle({zIndex:s.unref(PR)(a,s.unref(t),s.unref(o))})},[s.createVNode(s.unref(iL),{id:a.id},null,8,["id"])],4))),128)),s.createVNode(s.unref(sL))],64))}}),vL=s.defineComponent({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:r,multiSelectionActive:i,emits:a,removeSelectedNodes:l,addSelectedNodes:u,updateNodeDimensions:c,onUpdateNodeInternals:d,getNodeTypes:f,nodeExtent:h,elevateNodesOnSelect:p,disableKeyboardA11y:m,ariaLiveMessage:v,snapToGrid:w,snapGrid:g,nodeDragThreshold:b,nodesDraggable:y,elementsSelectable:_,nodesConnectable:O,nodesFocusable:B,hooks:$}=Pe(),C=s.ref(null);s.provide(zv,C),s.provide(Rv,e.id);const V=s.inject(Qa),L=s.getCurrentInstance(),I=jv(),{node:x,parentNode:R}=Hv(e.id),{emit:k,on:N}=JR(x,a),D=s.toRef(()=>typeof x.draggable>"u"?y.value:x.draggable),z=s.toRef(()=>typeof x.selectable>"u"?_.value:x.selectable),F=s.toRef(()=>typeof x.connectable>"u"?O.value:x.connectable),j=s.toRef(()=>typeof x.focusable>"u"?B.value:x.focusable),Y=s.computed(()=>z.value||D.value||$.value.nodeClick.hasListeners()||$.value.nodeDoubleClick.hasListeners()||$.value.nodeMouseEnter.hasListeners()||$.value.nodeMouseMove.hasListeners()||$.value.nodeMouseLeave.hasListeners()),G=s.toRef(()=>!!x.dimensions.width&&!!x.dimensions.height),W=s.computed(()=>{const T=x.type||"default",A=V?.[`node-${T}`];if(A)return A;let P=x.template||f.value[T];if(typeof P=="string"&&L){const Q=Object.keys(L.appContext.components);Q&&Q.includes(T)&&(P=s.resolveComponent(T,!1))}return P&&typeof P!="string"?P:(a.error(new ze(Ve.NODE_TYPE_MISSING,P)),!1)}),le=Lv({id:e.id,el:C,disabled:()=>!D.value,selectable:z,dragHandle:()=>x.dragHandle,onStart(T){k.dragStart(T)},onDrag(T){k.drag(T)},onStop(T){k.dragStop(T)},onClick(T){M(T)}}),re=s.computed(()=>x.class instanceof Function?x.class(x):x.class),X=s.computed(()=>{const T=(x.style instanceof Function?x.style(x):x.style)||{},A=x.width instanceof Function?x.width(x):x.width,P=x.height instanceof Function?x.height(x):x.height;return!T.width&&A&&(T.width=typeof A=="string"?A:`${A}px`),!T.height&&P&&(T.height=typeof P=="string"?P:`${P}px`),T}),q=s.toRef(()=>Number(x.zIndex??X.value.zIndex??0));return d(T=>{(T.includes(e.id)||!T.length)&&pe()}),s.onMounted(()=>{s.watch(()=>x.hidden,(T=!1,A,P)=>{!T&&C.value&&(e.resizeObserver.observe(C.value),P(()=>{C.value&&e.resizeObserver.unobserve(C.value)}))},{immediate:!0,flush:"post"})}),s.watch([()=>x.type,()=>x.sourcePosition,()=>x.targetPosition],()=>{s.nextTick(()=>{c([{id:e.id,nodeElement:C.value,forceUpdate:!0}])})}),s.watch([()=>x.position.x,()=>x.position.y,()=>{var T;return(T=R.value)==null?void 0:T.computedPosition.x},()=>{var T;return(T=R.value)==null?void 0:T.computedPosition.y},()=>{var T;return(T=R.value)==null?void 0:T.computedPosition.z},q,()=>x.selected,()=>x.dimensions.height,()=>x.dimensions.width,()=>{var T;return(T=R.value)==null?void 0:T.dimensions.height},()=>{var T;return(T=R.value)==null?void 0:T.dimensions.width}],([T,A,P,Q,K,ae])=>{const oe={x:T,y:A,z:ae+(p.value&&x.selected?1e3:0)};typeof P<"u"&&typeof Q<"u"?x.computedPosition=MR({x:P,y:Q,z:K},oe):x.computedPosition=oe},{flush:"post",immediate:!0}),s.watch([()=>x.extent,h],([T,A],[P,Q])=>{(T!==P||A!==Q)&&J()}),x.extent==="parent"||typeof x.extent=="object"&&"range"in x.extent&&x.extent.range==="parent"?pl(()=>G).toBe(!0).then(J):J(),()=>x.hidden?null:s.h("div",{ref:C,"data-id":x.id,class:["vue-flow__node",`vue-flow__node-${W.value===!1?"default":x.type||"default"}`,{[n.value]:D.value,dragging:le?.value,draggable:D.value,selected:x.selected,selectable:z.value,parent:x.isParent},re.value],style:{visibility:G.value?"visible":"hidden",zIndex:x.computedPosition.z??q.value,transform:`translate(${x.computedPosition.x}px,${x.computedPosition.y}px)`,pointerEvents:Y.value?"all":"none",...X.value},tabIndex:j.value?0:void 0,role:j.value?"group":void 0,"aria-describedby":m.value?void 0:`${kv}-${t}`,"aria-label":x.ariaLabel,"aria-roledescription":"node",...x.domAttributes,onMouseenter:we,onMousemove:me,onMouseleave:ge,onContextmenu:ue,onClick:M,onDblclick:ce,onKeydown:E},[s.h(W.value===!1?f.value.default:W.value,{id:x.id,type:x.type,data:x.data,events:{...x.events,...N},selected:x.selected,resizing:x.resizing,dragging:le.value,connectable:F.value,position:x.computedPosition,dimensions:x.dimensions,isValidTargetPos:x.isValidTargetPos,isValidSourcePos:x.isValidSourcePos,parent:x.parentNode,parentNodeId:x.parentNode,zIndex:x.computedPosition.z??q.value,targetPosition:x.targetPosition,sourcePosition:x.sourcePosition,label:x.label,dragHandle:x.dragHandle,onUpdateNodeInternals:pe})]);function J(){const T=x.computedPosition,{computedPosition:A,position:P}=Fu(x,w.value?Ja(T,g.value):T,a.error,h.value,R.value);(x.computedPosition.x!==A.x||x.computedPosition.y!==A.y)&&(x.computedPosition={...x.computedPosition,...A}),(x.position.x!==P.x||x.position.y!==P.y)&&(x.position=P)}function pe(){C.value&&c([{id:e.id,nodeElement:C.value,forceUpdate:!0}])}function we(T){le?.value||k.mouseEnter({event:T,node:x})}function me(T){le?.value||k.mouseMove({event:T,node:x})}function ge(T){le?.value||k.mouseLeave({event:T,node:x})}function ue(T){return k.contextMenu({event:T,node:x})}function ce(T){return k.doubleClick({event:T,node:x})}function M(T){z.value&&(!o.value||!D.value||b.value>0)&&Sl(x,i.value,u,l,r,!1,C.value),k.click({event:T,node:x})}function E(T){if(!(xl(T)||m.value))if(Ev.includes(T.key)&&z.value){const A=T.key==="Escape";Sl(x,i.value,u,l,r,A,C.value)}else D.value&&x.selected&&No[T.key]&&(T.preventDefault(),v.value=`Moved selected node ${T.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~x.position.x}, y: ${~~x.position.y}`,I({x:No[T.key].x,y:No[T.key].y},T.shiftKey))}}}),gL=vL;function yL(e={includeHiddenNodes:!1}){const{nodes:t}=Pe();return s.computed(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const wL={class:"vue-flow__nodes vue-flow__container"},bL={name:"Nodes",compatConfig:{MODE:3}},_L=s.defineComponent({...bL,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Pe(),r=yL(),i=s.ref();return s.watch(r,a=>{a&&s.nextTick(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),s.onMounted(()=>{i.value=new ResizeObserver(a=>{const l=a.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));s.nextTick(()=>n(l))})}),s.onBeforeUnmount(()=>{var a;return(a=i.value)==null?void 0:a.disconnect()}),(a,l)=>(s.openBlock(),s.createElementBlock("div",wL,[i.value?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(s.unref(t),(u,c,d,f)=>{const h=[u.id];if(f&&f.key===u.id&&s.isMemoSame(f,h))return f;const p=(s.openBlock(),s.createBlock(s.unref(gL),{id:u.id,key:u.id,"resize-observer":i.value},null,8,["id","resize-observer"]));return p.memo=h,p},l,0),128)):s.createCommentVNode("",!0)]))}});function kL(){const{emits:e}=Pe();s.onMounted(()=>{if(Vv()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new ze(Ve.MISSING_STYLES))}})}const xL=s.createElementVNode("div",{class:"vue-flow__edge-labels"},null,-1),EL={name:"VueFlow",compatConfig:{MODE:3}},SL=s.defineComponent({...EL,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,r=s.useSlots(),i=Ss(o,"modelValue",n),a=Ss(o,"nodes",n),l=Ss(o,"edges",n),u=Pe(o),c=nz({modelValue:i,nodes:a,edges:l},o,u);return rz(n,u.hooks),tL(),kL(),s.provide(Qa,r),s.onUnmounted(c),t(u),(d,f)=>(s.openBlock(),s.createElementBlock("div",{ref:s.unref(u).vueFlowRef,class:"vue-flow"},[s.createVNode(Xz,null,{default:s.withCtx(()=>[s.createVNode(mL),xL,s.createVNode(_L),s.renderSlot(d.$slots,"zoom-pane")]),_:3}),s.renderSlot(d.$slots,"default"),s.createVNode(eL)],512))}}),DL={name:"Panel",compatConfig:{MODE:3}},ML=s.defineComponent({...DL,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Pe(),o=s.computed(()=>`${t.position}`.split("-"));return(r,i)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vue-flow__panel",o.value]),style:s.normalizeStyle({pointerEvents:s.unref(n)?"none":"all"})},[s.renderSlot(r.$slots,"default")],6))}});var nn=(e=>(e.Lines="lines",e.Dots="dots",e))(nn||{});const Kv=function({dimensions:e,size:t,color:n}){return s.h("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Jv=function({radius:e,color:t}){return s.h("circle",{cx:e,cy:e,r:e,fill:t})};nn.Lines+"",nn.Dots+"";const NL={[nn.Dots]:"#81818a",[nn.Lines]:"#eee"},CL=["id","x","y","width","height","patternTransform"],OL={key:2,height:"100",width:"100"},TL=["fill"],$L=["x","y","fill"],PL={name:"Background",compatConfig:{MODE:3}},BL=s.defineComponent({...PL,props:{id:{},variant:{default:()=>nn.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Pe(),o=s.computed(()=>{const a=n.value.zoom,[l,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[l*a||1,u*a||1],d=e.size*a,[f,h]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],p=[f*a||1+c[0]/2,h*a||1+c[1]/2];return{scaledGap:c,offset:p,size:d}}),r=s.toRef(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),i=s.toRef(()=>e.color||e.patternColor||NL[e.variant||nn.Dots]);return(a,l)=>(s.openBlock(),s.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:s.normalizeStyle({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[s.renderSlot(a.$slots,"pattern-container",{id:r.value},()=>[s.createElementVNode("pattern",{id:r.value,x:s.unref(n).x%o.value.scaledGap[0],y:s.unref(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[s.renderSlot(a.$slots,"pattern",{},()=>[a.variant===s.unref(nn).Lines?(s.openBlock(),s.createBlock(s.unref(Kv),{key:0,size:a.lineWidth,color:i.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===s.unref(nn).Dots?(s.openBlock(),s.createBlock(s.unref(Jv),{key:1,color:i.value,radius:o.value.size/2},null,8,["color","radius"])):s.createCommentVNode("",!0),a.bgColor?(s.openBlock(),s.createElementBlock("svg",OL,[s.createElementVNode("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,TL)])):s.createCommentVNode("",!0)])],8,CL)]),s.createElementVNode("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,$L),s.renderSlot(a.$slots,"default",{id:r.value})],4))}}),YL={name:"ControlButton",compatConfig:{MODE:3}},AL=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},IL={type:"button",class:"vue-flow__controls-button"};function VL(e,t,n,o,r,i){return s.openBlock(),s.createElementBlock("button",IL,[s.renderSlot(e.$slots,"default")])}const Si=AL(YL,[["render",VL]]),RL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},zL=s.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),LL=[zL];function FL(e,t){return s.openBlock(),s.createElementBlock("svg",RL,LL)}const HL={render:FL},jL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},WL=s.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),UL=[WL];function GL(e,t){return s.openBlock(),s.createElementBlock("svg",jL,UL)}const ZL={render:GL},XL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},qL=s.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),KL=[qL];function JL(e,t){return s.openBlock(),s.createElementBlock("svg",XL,KL)}const QL={render:JL},e4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},t4=s.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),n4=[t4];function o4(e,t){return s.openBlock(),s.createElementBlock("svg",e4,n4)}const r4={render:o4},i4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a4=s.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),s4=[a4];function l4(e,t){return s.openBlock(),s.createElementBlock("svg",i4,s4)}const u4={render:l4},c4={name:"Controls",compatConfig:{MODE:3}},d4=s.defineComponent({...c4,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>_v.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:o,elementsSelectable:r,setInteractive:i,zoomIn:a,zoomOut:l,fitView:u,viewport:c,minZoom:d,maxZoom:f}=Pe(),h=s.toRef(()=>n.value||o.value||r.value),p=s.toRef(()=>c.value.zoom<=d.value),m=s.toRef(()=>c.value.zoom>=f.value);function v(){a(),t("zoomIn")}function w(){l(),t("zoomOut")}function g(){u(e.fitViewParams),t("fitView")}function b(){i(!h.value),t("interactionChange",!h.value)}return(y,_)=>(s.openBlock(),s.createBlock(s.unref(ML),{class:"vue-flow__controls",position:y.position},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"top"),y.showZoom?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.renderSlot(y.$slots,"control-zoom-in",{},()=>[s.createVNode(Si,{class:"vue-flow__controls-zoomin",disabled:m.value,onClick:v},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"icon-zoom-in",{},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(HL))))])]),_:3},8,["disabled"])]),s.renderSlot(y.$slots,"control-zoom-out",{},()=>[s.createVNode(Si,{class:"vue-flow__controls-zoomout",disabled:p.value,onClick:w},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"icon-zoom-out",{},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(ZL))))])]),_:3},8,["disabled"])])],64)):s.createCommentVNode("",!0),y.showFitView?s.renderSlot(y.$slots,"control-fit-view",{key:1},()=>[s.createVNode(Si,{class:"vue-flow__controls-fitview",onClick:g},{default:s.withCtx(()=>[s.renderSlot(y.$slots,"icon-fit-view",{},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(QL))))])]),_:3})]):s.createCommentVNode("",!0),y.showInteractive?s.renderSlot(y.$slots,"control-interactive",{key:2},()=>[y.showInteractive?(s.openBlock(),s.createBlock(Si,{key:0,class:"vue-flow__controls-interactive",onClick:b},{default:s.withCtx(()=>[h.value?s.renderSlot(y.$slots,"icon-unlock",{key:0},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(u4))))]):s.createCommentVNode("",!0),h.value?s.createCommentVNode("",!0):s.renderSlot(y.$slots,"icon-lock",{key:1},()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(r4))))])]),_:3})):s.createCommentVNode("",!0)]):s.createCommentVNode("",!0),s.renderSlot(y.$slots,"default")]),_:3},8,["position"]))}}),f4={class:"yu-relative yu-flex yu-h-16 yu-w-16 yu-items-center yu-justify-center"},h4=s.defineComponent({__name:"workflow-add-node",props:{data:{}},emits:["add"],setup(e,{emit:t}){const n=t;return(o,r)=>(s.openBlock(),s.createElementBlock("div",f4,[s.createVNode(s.unref(no),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-primary-500",type:"target",position:s.unref(se).Top,connectable:!1},null,8,["position"]),s.createVNode(s.unref(qn),{class:"nodrag nopan !yu-h-16 !yu-min-h-[4rem] !yu-w-16 !yu-rounded-full !yu-border-2 !yu-border-primary-500 !yu-bg-primary-50 !yu-text-2xl !yu-text-primary-500 hover:!yu-bg-primary-100",round:"",icon:"",soft:"","aria-label":`Adicionar etapa após ${e.data.parentRule.name}`,onPointerdown:r[0]||(r[0]=s.withModifiers(()=>{},["stop"])),onClick:r[1]||(r[1]=s.withModifiers(i=>n("add",e.data.parentRule),["stop"]))},{default:s.withCtx(()=>[...r[2]||(r[2]=[s.createTextVNode("+",-1)])]),_:1},8,["aria-label"])]))}}),p4=s.defineComponent({__name:"workflow-editor-toolbar",props:{canAdd:{type:Boolean},hasSelectedEdge:{type:Boolean}},emits:["add","deleteEdge"],setup(e,{emit:t}){const n=t;return(o,r)=>(s.openBlock(),s.createBlock(s.unref(Gi),{class:"yu-absolute yu-left-4 yu-top-4 yu-z-10","gap-sm":""},{default:s.withCtx(()=>[s.createVNode(s.unref(qn),{class:"yu-shadow",disabled:!e.canAdd,onClick:r[0]||(r[0]=i=>n("add"))},{default:s.withCtx(()=>[...r[2]||(r[2]=[s.createTextVNode("+ Adicionar etapa",-1)])]),_:1},8,["disabled"]),e.hasSelectedEdge?(s.openBlock(),s.createBlock(s.unref(qn),{key:0,class:"!yu-border-red-200 !yu-text-red-600 yu-shadow hover:!yu-bg-red-50",outline:"",onClick:r[1]||(r[1]=i=>n("deleteEdge"))},{default:s.withCtx(()=>[...r[3]||(r[3]=[s.createTextVNode("Excluir conexão",-1)])]),_:1})):s.createCommentVNode("",!0)]),_:1}))}}),m4=s.defineComponent({__name:"workflow-type-badge",props:{label:{},color:{}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",{class:"yu-inline-flex yu-rounded-full yu-px-3 yu-py-1.5",style:s.normalizeStyle({background:`color-mix(in srgb, ${e.color} 12%, white)`,color:e.color})},[s.createVNode(s.unref(Nt),{base:"",semibold:"",style:s.normalizeStyle({color:e.color})},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(e.label),1)]),_:1},8,["style"])],4))}}),v4={class:"yu-min-w-0 yu-flex-1"},g4=s.defineComponent({__name:"workflow-node-card",props:{data:{},selected:{type:Boolean}},emits:["delete","open"],setup(e,{emit:t}){const n=e,o=t,r=s.computed(()=>({"--workflow-accent":n.data.presentation.color}));return(i,a)=>(s.openBlock(),s.createElementBlock("article",{class:s.normalizeClass(["yu-group yu-relative yu-w-[25rem] yu-overflow-visible yu-rounded-xl yu-bg-white yu-shadow-md yu-transition-shadow hover:yu-shadow-lg",e.selected?"workflow-node-card--selected yu-border-2 yu-border-transparent":"yu-border yu-border-slate-200"]),style:s.normalizeStyle(r.value)},[a[6]||(a[6]=s.createElementVNode("span",{class:"yu-absolute yu-inset-y-0 yu-left-0 yu-w-1.5 yu-rounded-l-xl",style:{background:"var(--workflow-accent)"},"aria-hidden":"true"},null,-1)),s.createVNode(s.unref(no),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-[var(--workflow-accent)]",type:"target",position:s.unref(se).Top,connectable:!e.data.readOnly},null,8,["position","connectable"]),s.createVNode(s.unref(Gi),{class:"yu-min-h-[6.5rem] yu-p-5 yu-pl-7","center-between":"","gap-lg":""},{default:s.withCtx(()=>[s.createVNode(Hm,{icon:e.data.presentation.icon,color:e.data.presentation.color},null,8,["icon","color"]),s.createElementVNode("div",v4,[s.createVNode(m4,{label:e.data.presentation.label,color:e.data.presentation.color},null,8,["label","color"]),s.createVNode(s.unref(Nt),{class:"yu-mt-1.5 yu-truncate !yu-text-slate-950",extralarge:"",semibold:""},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(e.data.rule.name),1)]),_:1})])]),_:1}),s.createVNode(s.unref(Gi),{class:"nodrag yu-absolute yu-right-3 yu-top-3 yu-z-10 yu-opacity-0 yu-transition-opacity group-hover:yu-opacity-100 group-focus-within:yu-opacity-100",row:"","gap-xs":""},{default:s.withCtx(()=>[s.createVNode(s.unref(qn),{class:"nodrag !yu-text-slate-400 hover:!yu-bg-red-50 hover:!yu-text-red-600",ghost:"",icon:"",small:"",disabled:!e.data.canDelete,"aria-label":`Excluir ${e.data.rule.name}`,onClick:a[0]||(a[0]=s.withModifiers(l=>o("delete",e.data.rule),["stop"]))},{default:s.withCtx(()=>[...a[2]||(a[2]=[s.createTextVNode("×",-1)])]),_:1},8,["disabled","aria-label"])]),_:1}),s.createVNode(s.unref(qn),{class:"nodrag !yu-relative !yu-h-14 !yu-justify-start !yu-rounded-t-none !yu-rounded-b-xl !yu-border-t !yu-border-slate-100 !yu-px-7 !yu-text-slate-500 hover:!yu-bg-slate-50 hover:!yu-text-slate-800",ghost:"",large:"",fluid:"",onClick:a[1]||(a[1]=s.withModifiers(l=>o("open",e.data.rule),["stop"]))},{icon:s.withCtx(()=>[...a[3]||(a[3]=[s.createElementVNode("span",{class:"yu-h-3 yu-w-3 yu-rounded-full",style:{background:"var(--workflow-accent)"}},null,-1)])]),default:s.withCtx(()=>[a[4]||(a[4]=s.createTextVNode("Clique para editar",-1)),a[5]||(a[5]=s.createElementVNode("span",{class:"yu-absolute yu-right-6 yu-text-2xl yu-font-light yu-text-slate-300","aria-hidden":"true"},"›",-1))]),_:1}),s.createVNode(s.unref(no),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-[var(--workflow-accent)]",type:"source",position:s.unref(se).Bottom,connectable:e.data.canConnect},null,8,["position","connectable"])],6))}}),y4={class:"yu-absolute yu-left-1/2 yu-top-4 yu-z-10 yu-max-w-lg -yu-translate-x-1/2 yu-rounded-lg yu-border yu-border-amber-300 yu-bg-amber-50 yu-px-4 yu-py-3 yu-text-sm yu-text-amber-900 yu-shadow",role:"alert"},w4={key:0},b4=s.defineComponent({__name:"workflow-validation-banner",props:{reasons:{}},setup(e){return(t,n)=>(s.openBlock(),s.createElementBlock("div",y4,[s.createVNode(s.unref(Nt),{class:"!yu-text-amber-900",base:"",semibold:""},{default:s.withCtx(()=>[...n[0]||(n[0]=[s.createTextVNode("O fluxo está disponível somente para leitura.",-1)])]),_:1}),s.createVNode(s.unref(Nt),{class:"!yu-text-amber-900",base:""},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(e.reasons[0]),1),e.reasons.length>1?(s.openBlock(),s.createElementBlock("span",w4," (+"+s.toDisplayString(e.reasons.length-1)+" problemas)",1)):s.createCommentVNode("",!0)]),_:1})]))}}),_4={screen:{label:"Tela inicial",color:"#7c3aed",icon:"https://i.allsvgicons.com/lucide/monitor.svg",defaultName:"Nova tela"},identification:{label:"Formulário",color:"#0ea5e9",icon:"https://i.allsvgicons.com/lucide/clipboard-list.svg",defaultName:"Novo formulário"},service:{label:"Atendimento",color:"#10b981",icon:"https://i.allsvgicons.com/lucide/message-circle.svg",defaultName:"Novo atendimento"}},Vf=e=>e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()),Qv=e=>{const t=typeof e=="string"?{type:e}:e??{},n=String(t.type??t.action??"unknown"),o=_4[n],r=typeof t.maxChildren=="number"&&Number.isFinite(t.maxChildren)?Math.max(0,Math.floor(t.maxChildren)):void 0;return{type:n,label:t.label??o?.label??Vf(n),color:t.color??o?.color??"#64748b",icon:String(t.icon??o?.icon??"https://i.allsvgicons.com/lucide/diamond.svg"),defaultName:t.defaultName??o?.defaultName??`Novo ${Vf(n)}`,...r===void 0?{}:{maxChildren:r}}},k4=e=>e.map(Qv);var eg=Object.defineProperty,x4=(e,t,n)=>t in e?eg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E4=(e,t)=>{for(var n in t)eg(e,n,{get:t[n],enumerable:!0})},S4=(e,t,n)=>x4(e,t+"",n),D4={};E4(D4,{Graph:()=>St,alg:()=>Uu});var M4=Object.defineProperty,tg=(e,t)=>{for(var n in t)M4(e,n,{get:t[n],enumerable:!0})},Wu=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}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 typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(n=>{t!==void 0?this.setNode(n,t):this.setNode(n)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(n=>{this.setParent(n)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),o=this.successors(e);if(o)for(let r of o)n.add(r);return Array.from(n.values())}}isLeaf(e){var t;let n;return this.isDirected()?n=this.successors(e):n=this.neighbors(e),((t=n?.length)!=null?t:0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([r,i])=>{e(r)&&t.setNode(r,i)}),Object.values(this._edgeObjs).forEach(r=>{t.hasNode(r.v)&&t.hasNode(r.w)&&t.setEdge(r,this.edge(r))});let n={},o=r=>{let i=this.parent(r);return!i||t.hasNode(i)?(n[r]=i,i):i in n?n[i]:o(i)};return this._isCompound&&t.nodes().forEach(r=>t.setParent(r,o(r))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((n,o)=>(t!==void 0?this.setEdge(n,o,t):this.setEdge(n,o),o)),this}setEdge(e,t,n,o){let r,i,a,l,u=!1;typeof e=="object"&&e!==null&&"v"in e?(r=e.v,i=e.w,a=e.name,arguments.length===2&&(l=t,u=!0)):(r=e,i=t,a=o,arguments.length>2&&(l=n,u=!0)),r=""+r,i=""+i,a!==void 0&&(a=""+a);let c=hr(this._isDirected,r,i,a);if(c in this._edgeLabels)return u&&(this._edgeLabels[c]=l),this;if(a!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(i),this._edgeLabels[c]=u?l:this._defaultEdgeLabelFn(r,i,a);let d=N4(this._isDirected,r,i,a);return r=d.v,i=d.w,Object.freeze(d),this._edgeObjs[c]=d,Rf(this._preds[i],r),Rf(this._sucs[r],i),this._in[i][c]=d,this._out[r][c]=d,this._edgeCount++,this}edge(e,t,n){let o=arguments.length===1?As(this._isDirected,e):hr(this._isDirected,e,t,n);return this._edgeLabels[o]}edgeAsObj(e,t,n){let o=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof o!="object"||o===null?{label:o}:o}hasEdge(e,t,n){return(arguments.length===1?As(this._isDirected,e):hr(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let o=arguments.length===1?As(this._isDirected,e):hr(this._isDirected,e,t,n),r=this._edgeObjs[o];if(r){let i=r.v,a=r.w;delete this._edgeLabels[o],delete this._edgeObjs[o],zf(this._preds[a],i),zf(this._sucs[i],a),delete this._in[a][o],delete this._out[i][o],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let o=Object.values(e);return n?o.filter(r=>r.v===t&&r.w===n||r.v===n&&r.w===t):o}};function Rf(e,t){e[t]?e[t]++:e[t]=1}function zf(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function hr(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let a=r;r=i,i=a}return r+""+i+""+(o===void 0?"\0":o)}function N4(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let l=r;r=i,i=l}let a={v:r,w:i};return o&&(a.name=o),a}function As(e,t){return hr(e,t.v,t.w,t.name)}var C4={};tg(C4,{read:()=>P4,write:()=>O4});function O4(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:T4(e),edges:$4(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function T4(e){return e.nodes().map(t=>{let n=e.node(t),o=e.parent(t),r={v:t};return n!==void 0&&(r.value=n),o!==void 0&&(r.parent=o),r})}function $4(e){return e.edges().map(t=>{let n=e.edge(t),o={v:t.v,w:t.w};return t.name!==void 0&&(o.name=t.name),n!==void 0&&(o.value=n),o})}function P4(e){let t=new Wu(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Uu={};tg(Uu,{CycleException:()=>ka,bellmanFord:()=>ng,components:()=>A4,dijkstra:()=>_a,dijkstraAll:()=>R4,findCycles:()=>z4,floydWarshall:()=>F4,isAcyclic:()=>j4,postorder:()=>U4,preorder:()=>G4,prim:()=>Z4,shortestPaths:()=>X4,tarjan:()=>rg,topsort:()=>ig});var B4=()=>1;function ng(e,t,n,o){return Y4(e,String(t),n||B4,o||function(r){var i;return(i=e.outEdges(r))!=null?i:[]})}function Y4(e,t,n,o){let r={},i,a=0,l=e.nodes(),u=function(f){let h=r[f.v],p=r[f.w];if(!h||!p)return;let m=n(f);h.distance+m<p.distance&&(r[f.w]={distance:h.distance+m,predecessor:f.v},i=!0)},c=function(){l.forEach(function(f){o(f).forEach(function(h){let p=h.v===f?h.v:h.w,m=p===h.v?h.w:h.v;u({v:p,w:m})})})};l.forEach(function(f){let h=f===t?0:Number.POSITIVE_INFINITY;r[f]={distance:h,predecessor:""}});let d=l.length;for(let f=1;f<d&&(i=!1,a++,c(),!!i);f++);if(a===d-1&&(i=!1,c(),i))throw new Error("The graph contains a negative weight cycle");return r}function A4(e){let t={},n=[],o;function r(i){var a,l;i in t||(t[i]=!0,o.push(i),(a=e.successors(i))==null||a.forEach(r),(l=e.predecessors(i))==null||l.forEach(r))}return e.nodes().forEach(function(i){o=[],r(i),o.length&&n.push(o)}),n}var og=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,o=String(e);if(!(o in n)){let r=this._arr,i=r.length;return n[o]=i,r.push({key:o,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let o=this._arr[n].priority;if(t>o)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${o} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,o=n+1,r=e;n<t.length&&(r=t[n].priority<t[r].priority?n:r,o<t.length&&(r=t[o].priority<t[r].priority?o:r),r!==e&&(this._swap(e,r),this._heapify(r)))}_decrease(e){let t=this._arr,n=t[e].priority,o;for(;e!==0&&(o=e>>1,!(t[o].priority<n));)this._swap(e,o),e=o}_swap(e,t){let n=this._arr,o=this._keyIndices,r=n[e],i=n[t];n[e]=i,n[t]=r,o[i.key]=e,o[r.key]=t}},I4=()=>1;function _a(e,t,n,o){let r=function(i){var a;return(a=e.outEdges(i))!=null?a:[]};return V4(e,String(t),n||I4,o||r)}function V4(e,t,n,o){let r={},i=new og,a,l,u=function(c){let d=c.v!==a?c.v:c.w,f=r[d];if(!f)return;let h=n(c),p=l.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+h);p<f.distance&&(f.distance=p,f.predecessor=a,i.decrease(d,p))};for(e.nodes().forEach(function(c){let d=c===t?0:Number.POSITIVE_INFINITY;r[c]={distance:d,predecessor:""},i.add(c,d)});i.size()>0;){a=i.removeMin();let c=r[a];if(!c||c.distance===Number.POSITIVE_INFINITY)break;l=c,o(a).forEach(u)}return r}function R4(e,t,n){return e.nodes().reduce(function(o,r){return o[r]=_a(e,r,t,n),o},{})}function rg(e){let t=0,n=[],o={},r=[];function i(a){var l;let u=o[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),(l=e.successors(a))==null||l.forEach(function(c){if(c in o){let d=o[c];d!=null&&d.onStack&&(u.lowlink=Math.min(u.lowlink,d.index))}else{i(c);let d=o[c];d&&(u.lowlink=Math.min(u.lowlink,d.lowlink))}}),u.lowlink===u.index){let c=[],d;do{d=n.pop();let f=o[d];f&&(f.onStack=!1),c.push(d)}while(a!==d);r.push(c)}}return e.nodes().forEach(function(a){a in o||i(a)}),r}function z4(e){return rg(e).filter(function(t){var n;let o=t[0];return o?t.length>1||t.length===1&&((n=e.outEdges(o,o))!=null?n:[]).length>0:!1})}var L4=()=>1;function F4(e,t,n){return H4(e,t||L4,n||function(o){var r;return(r=e.outEdges(o))!=null?r:[]})}function H4(e,t,n){let o={},r=e.nodes();return r.forEach(function(i){let a={};o[i]=a,a[i]={distance:0,predecessor:""},r.forEach(function(l){i!==l&&(a[l]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(i).forEach(function(l){let u=l.v===i?l.w:l.v,c=t(l);a[u]={distance:c,predecessor:i}})}),r.forEach(function(i){let a=o[i];a&&r.forEach(function(l){let u=o[l];u&&r.forEach(function(c){let d=u[i],f=a[c],h=u[c];if(d&&f&&h){let p=d.distance+f.distance;p<h.distance&&(h.distance=p,h.predecessor=f.predecessor)}})})}),o}var ka=class extends Error{constructor(e){super(e),this.name="CycleException"}};function ig(e){let t={},n={},o=[];function r(i){var a;if(i in n)throw new ka;i in t||(n[i]=!0,t[i]=!0,(a=e.predecessors(i))==null||a.forEach(r),delete n[i],o.push(i))}if(e.sinks().forEach(r),Object.keys(t).length!==e.nodeCount())throw new ka;return o}function j4(e){try{ig(e)}catch(t){if(t instanceof ka)return!1;throw t}return!0}function W4(e,t,n,o,r){Array.isArray(t)||(t=[t]);let i=(l=>{var u;return(u=e.isDirected()?e.successors(l):e.neighbors(l))!=null?u:[]}),a={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);r=ag(e,l,n==="post",a,i,o,r)}),r}function ag(e,t,n,o,r,i,a){return t in o||(o[t]=!0,n||(a=i(a,t)),r(t).forEach(function(l){a=ag(e,l,n,o,r,i,a)}),n&&(a=i(a,t))),a}function sg(e,t,n){return W4(e,t,n,function(o,r){return o.push(r),o},[])}function U4(e,t){return sg(e,t,"post")}function G4(e,t){return sg(e,t,"pre")}function Z4(e,t){var n;let o=new Wu,r={},i=new og,a;function l(d){let f=d.v===a?d.w:d.v,h=i.priority(f);if(h!==void 0){let p=t(d);p<h&&(r[f]=a,i.decrease(f,p))}}if(e.nodeCount()===0)return o;e.nodes().forEach(function(d){i.add(d,Number.POSITIVE_INFINITY),o.setNode(d)});let u=e.nodes()[0];u!==void 0&&i.decrease(u,0);let c=!1;for(;i.size()>0;){if(a=i.removeMin(),a in r)o.setEdge(a,r[a]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}(n=e.nodeEdges(a))==null||n.forEach(l)}return o}function X4(e,t,n,o){return q4(e,t,n,o??(r=>{var i;return(i=e.outEdges(r))!=null?i:[]}))}function q4(e,t,n,o){if(n===void 0)return _a(e,t,n,o);let r=!1,i=e.nodes();for(let a=0;a<i.length;a++){let l=i[a];if(l===void 0)continue;let u=o(l);for(let c=0;c<u.length;c++){let d=u[c];if(!d)continue;let f=d.v===l?d.v:d.w,h=f===d.v?d.w:d.v;n({v:f,w:h})<0&&(r=!0)}if(r)return ng(e,t,n,o)}return _a(e,t,n,o)}var St=Wu;function Ko(e,t,n,o){let r=o;for(;e.hasNode(r);)r=Gu(o);return n.dummy=t,e.setNode(r,n),r}function K4(e){let t=new St().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let o=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:o.weight+r.weight,minlen:Math.max(o.minlen,r.minlen)})}),t}function lg(e){let t=new St({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function Lf(e,t){let n=e.x,o=e.y,r=t.x-n,i=t.y-o,a=e.width/2,l=e.height/2;if(!r&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let u,c;return r===0||Math.abs(i)*a>Math.abs(r)*l?(i<0&&(l=-l),u=l*r/i,c=l):(r<0&&(a=-a),u=a,c=a*i/r),{x:n+u,y:o+c}}function rs(e){let t=Wr(cg(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let o=e.node(n),r=o.rank;r!==void 0&&(t[r]||(t[r]=[]),t[r][o.order]=n)}),t}function J4(e){let t=e.nodes().map(o=>{let r=e.node(o).rank;return r===void 0?Number.MAX_VALUE:r}),n=Pt(Math.min,t);e.nodes().forEach(o=>{let r=e.node(o);Object.hasOwn(r,"rank")&&(r.rank-=n)})}function Q4(e){let t=e.nodes().map(a=>e.node(a).rank).filter(a=>a!==void 0),n=Pt(Math.min,t),o=[];e.nodes().forEach(a=>{let l=e.node(a).rank-n;o[l]||(o[l]=[]),o[l].push(a)});let r=0,i=e.graph().nodeRankFactor;Array.from(o).forEach((a,l)=>{a===void 0&&l%i!==0?--r:a!==void 0&&r&&a.forEach(u=>e.node(u).rank+=r)})}function Ff(e,t,n,o){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=o),Ko(e,"border",r,t)}function eF(e,t=ug){let n=[];for(let o=0;o<e.length;o+=t){let r=e.slice(o,o+t);n.push(r)}return n}var ug=65535;function Pt(e,t){if(t.length>ug){let n=eF(t);return e(...n.map(o=>e(...o)))}else return e(...t)}function cg(e){let t=e.nodes().map(n=>{let o=e.node(n).rank;return o===void 0?Number.MIN_VALUE:o});return Pt(Math.max,t)}function tF(e,t){let n={lhs:[],rhs:[]};return e.forEach(o=>{t(o)?n.lhs.push(o):n.rhs.push(o)}),n}function nF(e,t){return t()}var oF=0;function Gu(e){let t=++oF;return e+(""+t)}function Wr(e,t,n=1){t==null&&(t=e,e=0);let o=i=>i<t;n<0&&(o=i=>t<i);let r=[];for(let i=e;o(i);i+=n)r.push(i);return r}function xa(e,t){let n={};for(let o of t)e[o]!==void 0&&(n[o]=e[o]);return n}function is(e,t){let n;return typeof t=="string"?n=o=>o[t]:n=t,Object.entries(e).reduce((o,[r,i])=>(o[r]=n(i,r),o),{})}function rF(e,t){return e.reduce((n,o,r)=>(n[o]=t[r],n),{})}var as="\0";function dg(e,t,n){var o,r,i,a,l,u;if(!(e&&t&&n&&t.dummy==="edge"&&n.dummy==="edge"&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let c=!0;t.edgeObj.w===n.edgeObj.w&&(c=!1);let d=c?(r=(o=e[t.edgeObj.v])==null?void 0:o.rank)!=null?r:NaN+1:(a=(i=e[t.edgeObj.w])==null?void 0:i.rank)!=null?a:NaN-1,f=Object.entries(e).find(v=>{var w,g;return((w=v[1].edgeObj)==null?void 0:w.v)===t.edgeObj.v&&((g=v[1].edgeObj)==null?void 0:g.w)===t.edgeObj.w&&v[1].rank===d}),h=Object.entries(e).find(v=>{var w,g;return((w=v[1].edgeObj)==null?void 0:w.v)===n.edgeObj.v&&((g=v[1].edgeObj)==null?void 0:g.w)===n.edgeObj.w&&v[1].rank===d});if(!f||!h)return 0;let p=(l=f[1].order)!=null?l:NaN,m=(u=h[1].order)!=null?u:NaN;return isNaN(p-m)?0:p-m}var iF=class{constructor(){S4(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Hf(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Hf(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,aF)),n=n._prev;return"["+e.join(", ")+"]"}};function Hf(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function aF(e,t){if(e!=="_next"&&e!=="_prev")return t}var sF=iF,lF=()=>1;function uF(e,t){if(e.nodeCount()<=1)return[];let n=dF(e,t||lF);return cF(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w)||[])}function cF(e,t,n){var o;let r=[],i=t[t.length-1],a=t[0],l;for(;e.nodeCount();){for(;l=a.dequeue();)Is(e,t,n,l);for(;l=i.dequeue();)Is(e,t,n,l);if(e.nodeCount()){for(let u=t.length-2;u>0;--u)if(l=(o=t[u])==null?void 0:o.dequeue(),l){r=r.concat(Is(e,t,n,l,!0)||[]);break}}}return r}function Is(e,t,n,o,r){let i=[],a=r?i:void 0;return(e.inEdges(o.v)||[]).forEach(l=>{let u=e.edge(l),c=e.node(l.v);r&&i.push({v:l.v,w:l.w}),c.out-=u,Ml(t,n,c)}),(e.outEdges(o.v)||[]).forEach(l=>{let u=e.edge(l),c=l.w,d=e.node(c);d.in-=u,Ml(t,n,d)}),e.removeNode(o.v),a}function dF(e,t){let n=new St,o=0,r=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let u=n.edge(l.v,l.w)||0,c=t(l),d=u+c;n.setEdge(l.v,l.w,d);let f=n.node(l.v),h=n.node(l.w);r=Math.max(r,f.out+=c),o=Math.max(o,h.in+=c)});let i=fF(r+o+3).map(()=>new sF),a=o+1;return n.nodes().forEach(l=>{Ml(i,a,n.node(l))}),{graph:n,buckets:i,zeroIdx:a}}function Ml(e,t,n){var o,r,i;n.out?n.in?(i=e[n.out-n.in+t])==null||i.enqueue(n):(r=e[e.length-1])==null||r.enqueue(n):(o=e[0])==null||o.enqueue(n)}function fF(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function hF(e,t){(e.graph().acyclicer==="greedy"?uF(e,n(e)):pF(e,t??null)).forEach(o=>{let r=e.edge(o);e.removeEdge(o),r.forwardName=o.name,r.reversed=!0,e.setEdge(o.w,o.v,r,Gu("rev"))});function n(o){return r=>o.edge(r).weight}}function pF(e,t){let n=[],o={},r={};function i(u){Object.hasOwn(r,u)||(r[u]=!0,o[u]=!0,e.outEdges(u).forEach(c=>{Object.hasOwn(o,c.w)?n.push(c):i(c.w)}),delete o[u])}function a(u){var c;Object.hasOwn(r,u)||(r[u]=!0,o[u]=!0,(c=e.outEdges(u))==null||c.forEach(d=>{var f,h;Object.hasOwn(o,d.w)||((f=t.node(u))==null?void 0:f.rank)>((h=t.node(d.w))==null?void 0:h.rank)&&vF(e,d.w,d)?n.push(d):a(d.w)}),delete o[u])}let l=i;return t&&typeof t.node=="function"&&(l=a),e.sources().forEach(l),e.nodes().forEach(l),n}function mF(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let o=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,o)}})}function vF(e,t,n){let o=new Set;function r(i){var a;if(e.sources().includes(i))return!0;o.add(i);for(let l of(a=e.inEdges(i))!=null?a:[])if(!(l.v===n.v&&l.w===n.w)&&!o.has(l.v)&&r(l.v))return!0;return!1}return r(t)}function gF(e){e.graph().dummyChains=[],e.edges().forEach(t=>yF(e,t))}function yF(e,t){let n=t.v,o=e.node(n).rank,r=t.w,i=e.node(r).rank,a=t.name,l=e.edge(t),u=l.labelRank;if(i===o+1)return;e.removeEdge(t);let c,d,f;for(f=0,++o;o<i;++f,++o)l.points=[],d={width:0,height:0,edgeLabel:l,edgeObj:t,rank:o},c=Ko(e,"edge",d,"_d"),o===u&&(d.width=l.width,d.height=l.height,d.dummy="edge-label",d.labelpos=l.labelpos),e.setEdge(n,c,{weight:l.weight},a),f===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,r,{weight:l.weight},a)}function wF(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),o=n.edgeLabel,r;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}function Zu(e){let t={};function n(o){let r=e.node(o);if(Object.hasOwn(t,o))return r.rank;t[o]=!0;let i=e.outEdges(o),a=i?i.map(u=>u==null?Number.POSITIVE_INFINITY:n(u.w)-e.edge(u).minlen):[],l=Pt(Math.min,a);return l===Number.POSITIVE_INFINITY&&(l=0),r.rank=l}e.sources().forEach(n)}function Ro(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var fg=bF;function bF(e){let t=new St({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let o=n[0],r=e.nodeCount();t.setNode(o,{});let i,a;for(;_F(t,e)<r&&(i=kF(t,e),!!i);)a=t.hasNode(i.v)?Ro(e,i):-Ro(e,i),xF(t,e,a);return t}function _F(e,t){function n(o){let r=t.nodeEdges(o);r&&r.forEach(i=>{let a=i.v,l=o===a?i.w:a;!e.hasNode(l)&&!Ro(t,i)&&(e.setNode(l,{}),e.setEdge(o,l,{}),n(l))})}return e.nodes().forEach(n),e.nodeCount()}function kF(e,t){return t.edges().reduce((n,o)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(r=Ro(t,o)),r<n[0]?[r,o]:n},[Number.POSITIVE_INFINITY,null])[1]}function xF(e,t,n){e.nodes().forEach(o=>t.node(o).rank+=n)}var{preorder:EF,postorder:SF}=Uu,DF=uo;uo.initLowLimValues=qu;uo.initCutValues=Xu;uo.calcCutValue=hg;uo.leaveEdge=mg;uo.enterEdge=vg;uo.exchangeEdges=gg;function uo(e){e=K4(e),Zu(e);let t=fg(e);qu(t),Xu(t,e);let n,o;for(;n=mg(t);)o=vg(t,e,n),gg(t,e,n,o)}function Xu(e,t){let n=SF(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(o=>MF(e,t,o))}function MF(e,t,n){let o=e.node(n).parent,r=e.edge(n,o);r.cutvalue=hg(e,t,n)}function hg(e,t,n){let o=e.node(n).parent,r=!0,i=t.edge(n,o),a=0;i||(r=!1,i=t.edge(o,n)),a=i.weight;let l=t.nodeEdges(n);return l&&l.forEach(u=>{let c=u.v===n,d=c?u.w:u.v;if(d!==o){let f=c===r,h=t.edge(u).weight;if(a+=f?h:-h,CF(e,n,d)){let p=e.edge(n,d).cutvalue;a+=f?-p:p}}}),a}function qu(e,t){arguments.length<2&&(t=e.nodes()[0]),pg(e,{},1,t)}function pg(e,t,n,o,r){let i=n,a=e.node(o);t[o]=!0;let l=e.neighbors(o);return l&&l.forEach(u=>{Object.hasOwn(t,u)||(n=pg(e,t,n,u,o))}),a.low=i,a.lim=n++,r?a.parent=r:delete a.parent,n}function mg(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function vg(e,t,n){let o=n.v,r=n.w;t.hasEdge(o,r)||(o=n.w,r=n.v);let i=e.node(o),a=e.node(r),l=i,u=!1;return i.lim>a.lim&&(l=a,u=!0),t.edges().filter(c=>u===jf(e,e.node(c.v),l)&&u!==jf(e,e.node(c.w),l)).reduce((c,d)=>Ro(t,d)<Ro(t,c)?d:c)}function gg(e,t,n,o){let r=n.v,i=n.w;e.removeEdge(r,i),e.setEdge(o.v,o.w,{}),qu(e),Xu(e,t),NF(e,t)}function NF(e,t){let n=e.nodes().find(r=>!e.node(r).parent);if(!n)return;let o=EF(e,[n]);o=o.slice(1),o.forEach(r=>{let i=e.node(r).parent,a=t.edge(r,i),l=!1;a||(a=t.edge(i,r),l=!0),t.node(r).rank=t.node(i).rank+(l?a.minlen:-a.minlen)})}function CF(e,t,n){return e.hasEdge(t,n)}function jf(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var OF=TF;function TF(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":Wf(e);break;case"tight-tree":PF(e);break;case"longest-path":$F(e);break;case"none":break;default:Wf(e)}}var $F=Zu;function PF(e){Zu(e),fg(e)}function Wf(e){DF(e)}var BF=YF;function YF(e){let t=IF(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(o=>{let r=e.node(o),i=r.edgeObj,a=AF(e,t,i.v,i.w),l=a.path,u=a.lca,c=0,d=l[c],f=!0;for(;o!==i.w;){if(r=e.node(o),f){for(;(d=l[c])!==u&&e.node(d).maxRank<r.rank;)c++;d===u&&(f=!1)}if(!f){for(;c<l.length-1&&e.node(l[c+1]).minRank<=r.rank;)c++;d=l[c]}d!==void 0&&e.setParent(o,d),o=e.successors(o)[0]}})}function AF(e,t,n,o){let r=[],i=[],a=Math.min(t[n].low,t[o].low),l=Math.max(t[n].lim,t[o].lim),u;u=n;do u=e.parent(u),r.push(u);while(u&&(t[u].low>a||l>t[u].lim));let c=u,d=o;for(;(d=e.parent(d))!==c;)i.push(d);return{path:r.concat(i.reverse()),lca:c}}function IF(e){let t={},n=0;function o(r){let i=n;e.children(r).forEach(o),t[r]={low:i,lim:n++}}return e.children(as).forEach(o),t}function VF(e){let t=Ko(e,"root",{},"_root"),n=RF(e),o=Object.values(n),r=Pt(Math.max,o)-1,i=2*r+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=i);let a=zF(e)+1;e.children(as).forEach(l=>{yg(e,t,i,a,r,n,l)}),e.graph().nodeRankFactor=i}function yg(e,t,n,o,r,i,a){var l;let u=e.children(a);if(!u.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}let c=Ff(e,"_bt"),d=Ff(e,"_bb"),f=e.node(a);e.setParent(c,a),f.borderTop=c,e.setParent(d,a),f.borderBottom=d,u.forEach(h=>{var p;yg(e,t,n,o,r,i,h);let m=e.node(h),v=m.borderTop?m.borderTop:h,w=m.borderBottom?m.borderBottom:h,g=m.borderTop?o:2*o,b=v!==w?1:r-((p=i[a])!=null?p:0)+1;e.setEdge(c,v,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(w,d,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,c,{weight:0,minlen:r+((l=i[a])!=null?l:0)})}function RF(e){let t={};function n(o,r){let i=e.children(o);i&&i.length&&i.forEach(a=>n(a,r+1)),t[o]=r}return e.children(as).forEach(o=>n(o,1)),t}function zF(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function LF(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var FF=HF;function HF(e){function t(n){let o=e.children(n),r=e.node(n);if(o.length&&o.forEach(t),r&&Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let i=r.minRank,a=r.maxRank+1;i<a;++i)Uf(e,"borderLeft","_bl",n,r,i),Uf(e,"borderRight","_br",n,r,i)}}e.children(as).forEach(t)}function Uf(e,t,n,o,r,i){let a={width:0,height:0,rank:i,borderType:t},l=r[t][i-1],u=Ko(e,"border",a,n);r[t][i]=u,e.setParent(u,o),l&&e.setEdge(l,u,{weight:1})}function jF(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="lr"||n==="rl")&&wg(e)}function WF(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="bt"||n==="rl")&&UF(e),(n==="lr"||n==="rl")&&(GF(e),wg(e))}function wg(e){e.nodes().forEach(t=>Gf(e.node(t))),e.edges().forEach(t=>Gf(e.edge(t)))}function Gf(e){let t=e.width;e.width=e.height,e.height=t}function UF(e){e.nodes().forEach(t=>Vs(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Vs),Object.hasOwn(o,"y")&&Vs(o)})}function Vs(e){e.y=-e.y}function GF(e){e.nodes().forEach(t=>Rs(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Rs),Object.hasOwn(o,"x")&&Rs(o)})}function Rs(e){let t=e.x;e.x=e.y,e.y=t}function ZF(e,t=null){let n={},o=e.nodes().filter(c=>!e.children(c).length),r=o.map(c=>e.node(c).rank),i=Pt(Math.max,r),a=Wr(i+1).map(()=>[]);function l(c){if(n[c])return;n[c]=!0;let d=e.node(c);a[d.rank].push(c);let f=e.successors(c);f&&[...f].sort((h,p)=>u(h,p)).forEach(l)}o.sort((c,d)=>e.node(c).rank-e.node(d).rank).forEach(l);function u(c,d){let f=e.node(c),h=e.node(d);return dg(t,f,h)}return a}function XF(e,t){let n=0;for(let o=1;o<t.length;++o)n+=qF(e,t[o-1],t[o]);return n}function qF(e,t,n){let o=rF(n,n.map((c,d)=>d)),r=t.flatMap(c=>{let d=e.outEdges(c);return d?d.map(f=>({pos:o[f.w],weight:e.edge(f).weight})).sort((f,h)=>f.pos-h.pos):[]}),i=1;for(;i<n.length;)i<<=1;let a=2*i-1;i-=1;let l=new Array(a).fill(0),u=0;return r.forEach(c=>{let d=c.pos+i;l[d]+=c.weight;let f=0;for(;d>0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=c.weight;u+=c.weight*f}),u}function KF(e,t=[]){return t.map(n=>{let o=e.inEdges(n);if(!o||!o.length)return{v:n};{let r=o.reduce((i,a)=>{let l=e.edge(a),u=e.node(a.v);return{sum:i.sum+l.weight*u.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}})}function JF(e,t){let n={};e.forEach((r,i)=>{let a={indegree:0,in:[],out:[],vs:[r.v],i};r.barycenter!==void 0&&(a.barycenter=r.barycenter,a.weight=r.weight),n[r.v]=a}),t.edges().forEach(r=>{let i=n[r.v],a=n[r.w];i!==void 0&&a!==void 0&&(a.indegree++,i.out.push(a))});let o=Object.values(n).filter(r=>!r.indegree);return QF(o)}function QF(e){let t=[];function n(r){return i=>{i.merged||(i.barycenter===void 0||r.barycenter===void 0||i.barycenter>=r.barycenter)&&eH(r,i)}}function o(r){return i=>{i.in.push(r),--i.indegree===0&&e.push(i)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(o(r))}return t.filter(r=>!r.merged).map(r=>xa(r,["vs","i","barycenter","weight"]))}function eH(e,t){let n=0,o=0;e.weight&&(n+=e.barycenter*e.weight,o+=e.weight),t.weight&&(n+=t.barycenter*t.weight,o+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/o,e.weight=o,e.i=Math.min(t.i,e.i),t.merged=!0}function tH(e,t,n,o,r){let i={},a=null,l=null,u=r;typeof t=="boolean"?(u=t,i={}):t&&(i=t,a=n??null,l=o??null);let c=tF(e,g=>Object.hasOwn(g,"barycenter")),d=c.lhs,f=c.rhs.sort((g,b)=>b.i-g.i),h=[],p=0,m=0,v=0;d.sort(nH(l,a,!!u));for(let[g,b]of Object.entries(i)){let y=d.findIndex(_=>_.vs[0]===g);d.splice(y+1,0,b)}v=Zf(h,f,v),d.forEach(g=>{v+=g.vs.length,h.push(g.vs),p+=g.barycenter*g.weight,m+=g.weight,v=Zf(h,f,v)});let w={vs:h.flat(1)};return m&&(w.barycenter=p/m,w.weight=m),w}function Zf(e,t,n){let o;for(;t.length&&(o=t[t.length-1]).i<=n;)t.pop(),e.push(o.vs),n++;return n}function nH(e,t,n){return(o,r)=>{if(o.barycenter<r.barycenter)return-1;if(o.barycenter>r.barycenter)return 1;if(e&&(typeof o.vs[0]=="string"||typeof r.vs[0]=="string")){let i=e.node(o.vs[0]),a=e.node(r.vs[0]),l=dg(t,i,a);if(l!==0)return l}return n?r.i-o.i:o.i-r.i}}function bg(e,t,n,o,r){var i,a,l,u,c,d,f,h,p,m,v;let w=null,g=r;typeof o=="boolean"?(g=o,w=null):o!==void 0&&(w=o);let b=e.children(t),y=e.node(t),_=y?y.borderLeft:void 0,O=y?y.borderRight:void 0,B={};_&&(b=b.filter(x=>x!==_&&x!==O));let $=KF(e,b);$.forEach(x=>{if(e.children(x.v).length){let{result:R}=bg(e,x.v,n,w,g);B[x.v]=R,Object.hasOwn(R,"barycenter")&&rH(x,R)}});let C=JF($,n);oH(C,B);let V={},L=!1;for(let x=0;x<C.length;x++)for(let R=x+1;R<C.length;R++)if(!(!C[x]||!C[R]||!((i=C[x])!=null&&i.barycenter)||!((a=C[R])!=null&&a.barycenter))&&((l=C[x])==null?void 0:l.barycenter)===C[R].barycenter){let k=(c=(u=C[x])==null?void 0:u.vs[0])!=null?c:"",N=(f=(d=C[R])==null?void 0:d.vs[0])!=null?f:"",D=e.node(k),z=e.node(N);if(D.dummy==="edge"&&z.dummy==="edge"&&((h=D.edgeObj)==null?void 0:h.v)===((p=z.edgeObj)==null?void 0:p.v)&&((m=D.edgeObj)==null?void 0:m.w)===((v=z.edgeObj)==null?void 0:v.w))if(D.edgeLabel.reversed){V[N]=C[x],C.splice(x,1),x--;break}else V[k]||(V[k]=C[R],C.splice(R,1),R--);else L=!0}let I=tH(C,V,w,e,g);if(_&&O){I.vs=[_,I.vs,O].flat(1);let x=e.predecessors(_);if(x&&x.length){let R=e.node(x[0]),k=e.predecessors(O),N=e.node(k[0]);Object.hasOwn(I,"barycenter")||(I.barycenter=0,I.weight=0),I.barycenter=(I.barycenter*I.weight+R.order+N.order)/(I.weight+2),I.weight+=2}}return Object.defineProperty(I,"result",{value:I,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(I,"usedBias",{value:L,enumerable:!1,configurable:!0,writable:!0}),I}function oH(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(o=>t[o]?t[o].vs:o)})}function rH(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function iH(e,t,n,o){o||(o=e.nodes());let r=aH(e),i=new St({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(a=>e.node(a));return o.forEach(a=>{let l=e.node(a),u=e.parent(a);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){i.setNode(a),i.setParent(a,u||r);let c=e[n](a);c&&c.forEach(d=>{let f=d.v===a?d.w:d.v,h=i.edge(f,a),p=h!==void 0?h.weight:0;i.setEdge(f,a,{weight:e.edge(d).weight+p})}),Object.hasOwn(l,"minRank")&&i.setNode(a,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),i}function aH(e){let t;for(;e.hasNode(t=Gu("_root")););return t}function sH(e,t,n){let o={},r;n.forEach(i=>{let a=e.parent(i),l,u;for(;a;){if(l=e.parent(a),l?(u=o[l],o[l]=a):(u=r,r=a),u&&u!==a){t.setEdge(u,a);return}a=l}})}function _g(e,t={},n=null){if(typeof t.customOrder=="function"){t.customOrder(e,_g);return}let o=cg(e),r=Xf(e,Wr(1,o+1),"inEdges"),i=Xf(e,Wr(o-1,-1,-1),"outEdges"),a=ZF(e,n);if(qf(e,a),t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,u,c=t.constraints||[];for(let d=0,f=0;f<4;++d,++f){lH(d%2?r:i,d%4>=2,c,n),a=rs(e);let h=XF(e,a);h<l?(f=0,u=Object.assign({},a),l=h):h===l&&(u=structuredClone(a))}qf(e,u)}function Xf(e,t,n){let o=new Map,r=(i,a)=>{o.has(i)||o.set(i,[]),o.get(i).push(a)};for(let i of e.nodes()){let a=e.node(i);if(typeof a.rank=="number"&&r(a.rank,i),typeof a.minRank=="number"&&typeof a.maxRank=="number")for(let l=a.minRank;l<=a.maxRank;l++)l!==a.rank&&r(l,i)}return t.map(function(i){return iH(e,i,n,o.get(i)||[])})}function lH(e,t,n,o){let r=!0,i=new St;e.forEach(function(a){n.forEach(d=>i.setEdge(d.left,d.right));let l=a.graph().root,{result:u,usedBias:c}=bg(a,l,i,o,r);t&&c&&(r=!r),u.vs.forEach((d,f)=>a.node(d).order=f),sH(a,i,u.vs)})}function qf(e,t){Object.values(t).forEach(n=>n.forEach((o,r)=>e.node(o).order=r))}function uH(e,t){let n={};function o(r,i){let a=0,l=0,u=r.length,c=i[i.length-1];return i.forEach((d,f)=>{let h=dH(e,d),p=h?e.node(h).order:u;(h||d===c)&&(i.slice(l,f+1).forEach(m=>{let v=e.predecessors(m);v&&v.forEach(w=>{let g=e.node(w),b=g.order;(b<a||p<b)&&!(g.dummy&&e.node(m).dummy)&&kg(n,w,m)})}),l=f+1,a=p)}),i}return t.length&&t.reduce(o),n}function cH(e,t){let n={};function o(a){var l;return((l=e.node(a))==null?void 0:l.dummy)==="border"}if(!e.nodes().some(o))return n;function r(a,l,u,c,d){Wr(l,u).forEach(f=>{let h=a[f];if(h!==void 0&&e.node(h).dummy){let p=e.predecessors(h);p&&p.forEach(m=>{if(m===void 0)return;let v=e.node(m);v.dummy&&(v.order<c||v.order>d)&&kg(n,m,h)})}})}function i(a,l){let u=-1,c=-1,d=0;return l.forEach((f,h)=>{if(o(f)){let p=e.predecessors(f);if(p&&p.length){let m=p[0];if(m===void 0)return;c=e.node(m).order,r(l,d,h,u,c),d=h,u=c}}r(l,d,l.length,c,a.length)}),l}return t.length&&t.reduce(i),n}function dH(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(o=>e.node(o).dummy)}}function kg(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];o||(e[t]=o={}),o[n]=!0}function fH(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];return o!==void 0&&Object.hasOwn(o,n)}function hH(e,t,n,o,r){let i={},a={},l={};return t.forEach(u=>{u.forEach((c,d)=>{i[c]=c,a[c]=c,l[c]=d})}),t.forEach(u=>{let c=-1,d=-1,f=!1,h=u,p=u.findIndex(m=>r?.includes(m)||Kf(m,e,r));p>0&&(h=[u[p],...u.slice(0,p),...u.slice(p+1)],f=!0),h.forEach(m=>{var v;let w=o(m);if(w&&w.length){r!=null&&r.includes(m)&&(w=w.filter(y=>Kf(y,e,r)));let g=w.sort((y,_)=>{let O=l[y],B=l[_];return(O!==void 0?O:0)-(B!==void 0?B:0)}),b=(g.length-1)/2;for(let y=Math.floor(b),_=Math.ceil(b);y<=_;++y){let O=g[y];if(O===void 0)continue;let B=l[O];if(B!==void 0&&a[m]===m&&c<B&&l[O]!==d&&!fH(n,m,O)){let $=i[O];$!==void 0&&(a[O]=m,a[m]=i[m]=$,c=B,f&&(c=-1,d=(v=l[O])!=null?v:-1,f=!1))}}}})}),{root:i,align:a}}function pH(e,t,n,o,r=!1){let i={},a=mH(e,t,n,r),l=r?"borderLeft":"borderRight";function u(p,m){let v=a.nodes().slice(),w={},g=v.pop();for(;g;){if(w[g])p(g);else{w[g]=!0,v.push(g);for(let b of m(g))v.push(b)}g=v.pop()}}function c(p){let m=a.inEdges(p);m?i[p]=m.reduce((v,w)=>{var g;let b=(g=i[w.v])!=null?g:0,y=a.edge(w);return Math.max(v,b+(y!==void 0?y:0))},0):i[p]=0}function d(p){let m=a.outEdges(p),v=Number.POSITIVE_INFINITY;m&&(v=m.reduce((g,b)=>{let y=i[b.w],_=a.edge(b);return Math.min(g,(y!==void 0?y:0)-(_!==void 0?_:0))},Number.POSITIVE_INFINITY));let w=e.node(p);v!==Number.POSITIVE_INFINITY&&w.borderType!==l&&(i[p]=Math.max(i[p]!==void 0?i[p]:0,v))}function f(p){return a.predecessors(p)||[]}function h(p){return a.successors(p)||[]}return u(c,f),u(d,h),Object.keys(o).forEach(p=>{var m;let v=n[p];v!==void 0&&(i[p]=(m=i[v])!=null?m:0)}),i}function mH(e,t,n,o){let r=new St,i=e.graph(),a=bH(i.nodesep,i.edgesep,o);return t.forEach(l=>{let u;l.forEach(c=>{let d=n[c];if(d!==void 0){if(r.setNode(d),u!==void 0){let f=n[u];if(f!==void 0){let h=r.edge(f,d);r.setEdge(f,d,Math.max(a(e,c,u),h||0))}}u=c}})}),r}function vH(e,t){return Object.values(t).reduce((n,o)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(o).forEach(([l,u])=>{let c=_H(e,l)/2;r=Math.max(u+c,r),i=Math.min(u-c,i)});let a=r-i;return a<n[0]&&(n=[a,o]),n},[Number.POSITIVE_INFINITY,null])[1]}function gH(e,t){let n=Object.values(t),o=Pt(Math.min,n),r=Pt(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(a=>{let l=i+a,u=e[l];if(!u||u===t)return;let c=Object.values(u),d=o-Pt(Math.min,c);a!=="l"&&(d=r-Pt(Math.max,c)),d&&(e[l]=is(u,f=>f+d))})})}function yH(e,t=void 0){let n=e.ul;return n?is(n,(o,r)=>{var i,a;if(t){let u=t.toLowerCase(),c=e[u];if(c&&c[r]!==void 0)return c[r]}let l=Object.values(e).map(u=>{let c=u[r];return c!==void 0?c:0}).sort((u,c)=>u-c);return(((i=l[1])!=null?i:0)+((a=l[2])!=null?a:0))/2}):{}}function wH(e,t){let n=rs(e),o=Object.assign(uH(e,n),cH(e,n)),r={},i;["u","d"].forEach(l=>{i=l==="u"?n:Object.values(n).reverse(),["l","r"].forEach(u=>{u==="r"&&(i=i.map(f=>Object.values(f).reverse()));let c=hH(e,i,o,f=>(l==="u"?e.predecessors(f):e.successors(f))||[],t),d=pH(e,i,c.root,c.align,u==="r");u==="r"&&(d=is(d,f=>-f)),r[l+u]=d})});let a=vH(e,r);return gH(r,a),yH(r,e.graph().align)}function bH(e,t,n){return(o,r,i)=>{let a=o.node(r),l=o.node(i),u=0,c;if(u+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(u+=n?c:-c),c=void 0,u+=(a.dummy?t:e)/2,u+=(l.dummy?t:e)/2,u+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":c=l.width/2;break;case"r":c=-l.width/2;break}return c&&(u+=n?c:-c),u}}function _H(e,t){return e.node(t).width}function Kf(e,t,n){var o;if(!n)return!1;let r=(o=t.node(e))==null?void 0:o.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function kH(e,t){e=lg(e),xH(e),Object.entries(wH(e,t)).forEach(([n,o])=>e.node(n).x=o)}function xH(e){let t=rs(e),n=e.graph(),o=n.ranksep,r=n.rankalign,i=0;t.forEach(a=>{let l=a.reduce((u,c)=>{var d;let f=(d=e.node(c).height)!=null?d:0;return u>f?u:f},0);a.forEach(u=>{let c=e.node(u);r==="top"?c.y=i+c.height/2:r==="bottom"?c.y=i+l-c.height/2:c.y=i+l/2}),i+=l+o})}var Jf=new WeakMap;function EH(e,t={}){return xg(e,nF,t),e}function Qf(e,t,n){let o=t;for(;o!==void 0;){let r=e.parent(o);if(r===n)return o;o=r}}function xg(e,t,n){var o;let r=e.nodes().filter(b=>e.children(b).length),i={};r.forEach(b=>{let y=e.node(b);if(y&&y.rankdir){let _=new St({multigraph:!0,compound:!0});_.setGraph({rankdir:y.rankdir});let O=e.children(b);O.forEach(k=>{let N={...e.node(k)};_.setNode(k,N);let D=e.parent(k);D&&D!==b&&O.includes(D)&&_.setParent(k,D)});let B=new Set;e.edges().forEach(k=>{let N=Qf(e,k.v,b),D=Qf(e,k.w,b);if(N===k.v&&D===k.w)_.setEdge(k,{...e.edge(k)});else if(N&&D&&N!==D){let z=`${N}\0${D}`;B.has(z)||(B.add(z),_.setEdge(N,D,{...e.edge(k)}))}}),xg(_,t,n);let $=rh(_);th($,t,n,null),nh(_,$);let C=1/0,V=1/0,L=-1/0,I=-1/0;_.nodes().forEach(k=>{if(k===b)return;let N=_.node(k);N&&typeof N.x=="number"&&typeof N.y=="number"&&typeof N.width=="number"&&typeof N.height=="number"&&(C=Math.min(C,N.x-N.width/2),L=Math.max(L,N.x+N.width/2),V=Math.min(V,N.y-N.height/2),I=Math.max(I,N.y+N.height/2))}),(!isFinite(C)||!isFinite(V)||!isFinite(L)||!isFinite(I))&&(C=V=0,L=I=0);let x=L-C,R=I-V;i[b]={minX:C,minY:V,maxX:L,maxY:I,width:x,height:R,offsetX:C,offsetY:V},y._dagreClusterSubgraph=_}});let a=[],l=b=>{let y=[],_=(e.children(b)||[]).filter(O=>O!==b);for(;_.length>0;){let O=_.shift();y.push(O),(e.children(O)||[]).filter(B=>B!==O).forEach(B=>_.push(B))}return y},u=new Map;r.forEach(b=>{let y=e.node(b);y&&y.rankdir&&i[b]&&u.set(b,(e.children(b)||[]).filter(_=>_!==b))});let c=new Set([...u.values()].flat()),d=new Map;u.forEach((b,y)=>{c.has(y)||d.set(y,l(y))});let f=new Set([...d.values()].flat()),h=b=>{for(let[y,_]of d)if(_.includes(b))return y;return b},p=[];e.edges().forEach(b=>{(f.has(b.v)||f.has(b.w))&&p.push({edge:b,label:e.edge(b)})});let m=new Map;f.forEach(b=>{let y=e.parent(b);m.set(b,typeof y=="string"?y:void 0)}),d.forEach((b,y)=>{let _=e.node(y),O=[];b.forEach(C=>{let V=e.node(C);V&&(O.push({id:C,node:V,parent:m.get(C)}),e.removeNode(C))});let B=p.filter(({edge:C})=>b.includes(C.v)||b.includes(C.w)),$=i[y];_&&(a.push({clusterId:y,subgraph:_._dagreClusterSubgraph,bounds:$,children:b,removedNodes:O,removedEdges:B}),_.width=$.width,_.height=$.height)});let v=new Set;p.forEach(({edge:b,label:y})=>{let _=h(b.v),O=h(b.w);if(_!==O&&e.hasNode(_)&&e.hasNode(O)){let B=`${_}\0${O}`;v.has(B)||(v.add(B),e.setEdge(_,O,{...y,width:0,height:0}))}});let w=rh(e),g=th(w,t,n,(o=Jf.get(e))!=null?o:null);Jf.set(e,g),nh(e,w),v.forEach(b=>{let y=b.indexOf("\0"),_=b.slice(0,y),O=b.slice(y+1);e.hasEdge(_,O)&&e.removeEdge(_,O)}),a.forEach(({clusterId:b,subgraph:y,bounds:_,removedNodes:O,removedEdges:B})=>{var $,C;let V=e.node(b),L=($=V?.x)!=null?$:0,I=(C=V?.y)!=null?C:0,x=(_.minX+_.maxX)/2,R=(_.minY+_.maxY)/2;O.forEach(({id:k,node:N,parent:D})=>{e.setNode(k,N),D!==void 0&&e.setParent(k,D)}),B.forEach(({edge:k,label:N})=>{e.setEdge(k,N)}),y.nodes().forEach(k=>{if(k===b)return;let N=y.node(k),D=e.node(k);D&&N&&typeof N.x=="number"&&typeof N.y=="number"&&(D.x=L+(N.x-x),D.y=I+(N.y-R))}),eh(e,y,L-x,I-R),delete V._dagreClusterSubgraph}),r.forEach(b=>{var y,_;let O=e.node(b),B=i[b];if(O&&O.rankdir&&O._dagreClusterSubgraph&&B){let $=O._dagreClusterSubgraph,C=(y=O.x)!=null?y:0,V=(_=O.y)!=null?_:0,L=(B.minX+B.maxX)/2,I=(B.minY+B.maxY)/2;$.nodes().forEach(x=>{if(x===b)return;let R=$.node(x),k=e.node(x);if(k&&R&&typeof R.x=="number"&&typeof R.y=="number"){let N=R.x-L,D=R.y-I;k.x=C+N,k.y=V+D}}),eh(e,$,C-L,V-I),delete O._dagreClusterSubgraph}})}function eh(e,t,n,o){t.edges().forEach(r=>{if(!e.hasEdge(r))return;let i=t.edge(r),a=e.edge(r);a.points=i.points.map(l=>({x:l.x+n,y:l.y+o})),Object.hasOwn(i,"x")&&(a.x=i.x+n,a.y=i.y+o)})}function th(e,t,n,o=null){var r,i;let a=n?.useDynamic!==!1,l=a&&(r=o?.graph)!=null?r:null,u=a&&(i=o?.rawNodes)!=null?i:null;t(" makeSpaceForEdgeLabels",()=>$H(e)),t(" removeSelfEdges",()=>LH(e)),t(" acyclic",()=>hF(e,l)),t(" nestingGraph.run",()=>VF(e)),t(" rank",()=>OF(lg(e))),t(" injectEdgeLabelProxies",()=>PH(e)),t(" removeEmptyRanks",()=>Q4(e)),t(" nestingGraph.cleanup",()=>LF(e)),t(" normalizeRanks",()=>J4(e)),t(" assignRankMinMax",()=>BH(e)),t(" removeEdgeLabelProxies",()=>YH(e)),t(" normalize.run",()=>gF(e)),t(" parentDummyChains",()=>BF(e)),t(" addBorderSegments",()=>FF(e)),t(" order",()=>_g(e,n,u)),t(" insertSelfEdges",()=>FH(e)),t(" adjustCoordinateSystem",()=>jF(e)),t(" position",()=>kH(e,n.corePath)),t(" positionSelfEdges",()=>HH(e));let c=JSON.parse(JSON.stringify(e._nodes));return t(" removeBorderNodes",()=>zH(e)),t(" normalize.undo",()=>wF(e)),t(" fixupEdgeLabelCoords",()=>VH(e)),t(" undoCoordinateSystem",()=>WF(e)),t(" translateGraph",()=>AH(e)),t(" assignNodeIntersects",()=>IH(e)),t(" reversePoints",()=>RH(e)),t(" acyclic.undo",()=>mF(e)),{graph:e,rawNodes:c}}function nh(e,t){e.nodes().forEach(n=>{let o=e.node(n),r=t.node(n);o&&(o.x=r.x,o.y=r.y,o.order=r.order,o.rank=r.rank,t.children(n).length&&(o.width=r.width,o.height=r.height))}),e.edges().forEach(n=>{let o=e.edge(n),r=t.edge(n);o.points=r.points,Object.hasOwn(r,"x")&&(o.x=r.x,o.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var SH=["nodesep","edgesep","ranksep","marginx","marginy"],DH={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},MH=["acyclicer","ranker","rankdir","align","rankalign"],NH=["width","height","rank"],oh={width:0,height:0},CH=["minlen","weight","width","height","labeloffset"],OH={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},TH=["labelpos"];function rh(e){let t=new St({multigraph:!0,compound:!0}),n=Ls(e.graph());return t.setGraph(Object.assign({},DH,zs(n,SH),xa(n,MH))),e.nodes().forEach(o=>{let r=Ls(e.node(o)),i=zs(r,NH);Object.keys(oh).forEach(l=>{i[l]===void 0&&(i[l]=oh[l])}),t.setNode(o,i);let a=e.parent(o);a!==void 0&&t.setParent(o,a)}),e.edges().forEach(o=>{let r=Ls(e.edge(o));t.setEdge(o,Object.assign({},OH,zs(r,CH),xa(r,TH)))}),t}function $H(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{var o;let r=e.edge(n);r.minlen*=2,((o=r.labelpos)!=null?o:"r").toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function PH(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let o=e.node(t.v),r={rank:(e.node(t.w).rank-o.rank)/2+o.rank,e:t};Ko(e,"edge-proxy",r,"_ep")}})}function BH(e){let t=0;e.nodes().forEach(n=>{let o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=Math.max(t,o.maxRank))}),e.graph().maxRank=t}function YH(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let o=n;e.edge(o.e).labelRank=n.rank,e.removeNode(t)}})}function AH(e){let t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,r=0,i=e.graph(),a=i.marginx||0,l=i.marginy||0;function u(c){let d=c.x,f=c.y,h=c.width,p=c.height;t=Math.min(t,d-h/2),n=Math.max(n,d+h/2),o=Math.min(o,f-p/2),r=Math.max(r,f+p/2)}e.nodes().forEach(c=>u(e.node(c))),e.edges().forEach(c=>{let d=e.edge(c);Object.hasOwn(d,"x")&&u(d)}),t-=a,o-=l,e.nodes().forEach(c=>{let d=e.node(c);d.x-=t,d.y-=o}),e.edges().forEach(c=>{let d=e.edge(c);d.points.forEach(f=>{f.x-=t,f.y-=o}),Object.hasOwn(d,"x")&&(d.x-=t),Object.hasOwn(d,"y")&&(d.y-=o)}),i.width=n-t+a,i.height=r-o+l}function IH(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),o=e.node(t.v),r=e.node(t.w),i,a;n.points?(i=n.points[0],a=n.points[n.points.length-1]):(n.points=[],i=r,a=o),n.points.unshift(Lf(o,i)),n.points.push(Lf(r,a))})}function VH(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(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;break}})}function RH(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function zH(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),o=e.node(n.borderTop),r=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(r.y-o.y),n.x=i.x+n.width/2,n.y=o.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function LH(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function FH(e){rs(e).forEach(t=>{let n=0;t.forEach((o,r)=>{let i=e.node(o);typeof i.rank!="number"&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(a=>{Ko(e,"selfedge",{width:a.label.width,height:a.label.height,rank:i.rank,order:r+ ++n,e:a.e,edgeLabel:a.label},"_se"),(!Array.isArray(a.label.points)||a.label.points.length!==7)&&(a.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function HH(e){e.nodes().forEach(t=>{let n=e.node(t),o=r=>typeof r=="number"&&isFinite(r);if(n.dummy==="selfedge"){let r=n,i=e.node(r.e.v),a=o(i?.x)?i.x:0,l=o(i?.y)?i.y:0,u=o(i?.width)?i.width:0,c=o(i?.height)?i.height:0,d=o(n.x)?n.x:a,f=o(n.y)?n.y:l,h=u/2,p=c/2;r.edgeLabel.points=[{x:d+h,y:f-p},{x:d+h,y:f-p},{x:d,y:f},{x:d-h,y:f+p},{x:d-h,y:f+p},{x:d,y:f},{x:d,y:f}],r.edgeLabel.x=d,r.edgeLabel.y=f,e.setEdge(r.e,r.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(r=>{if(!Array.isArray(r.label.points)||r.label.points.length!==7){let i=o(n.x)?n.x:0,a=o(n.y)?n.y:0,l=o(n.width)?n.width:0,u=o(n.height)?n.height:0,c=l/2,d=u/2;r.label.points=[{x:i+c,y:a-d},{x:i+c,y:a-d},{x:i,y:a},{x:i-c,y:a+d},{x:i-c,y:a+d},{x:i,y:a},{x:i,y:a}]}})})}function zs(e,t){return is(xa(e,t),Number)}function Ls(e){let t={};return e&&Object.entries(e).forEach(([n,o])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=o}),t}const Li=400,Fi=160,kn=64,jH=(e,t,n)=>{const o=typeof e?.id=="string"&&e.id?e.id:`__invalid-rule-${t}`,r=n.has(o)?`__duplicate-${o}-${t}`:o;return n.add(r),{id:r,rule:e}},WH=e=>new Map(e.filter(({id:t,rule:n})=>n?.id===t).map(({rule:t})=>[t.id,t])),UH=e=>{const t=new St({multigraph:!0}).setGraph({rankdir:"TB",nodesep:128,ranksep:112,marginx:32,marginy:32});return t.setDefaultEdgeLabel(()=>({})),e.forEach(({id:n})=>t.setNode(n,{width:Li,height:Fi})),t},GH=(e,t,n)=>{const o=Array.isArray(e?.rules)?e.rules:[],r=new Set,i=o.map((a,l)=>jH(a,l,r));return{flow:e,nodeTypes:t,readOnly:n,rules:o,entries:i,ruleById:WH(i),usedNodeIds:r,usedEdgeIds:new Set,graph:UH(i),presentationFor:a=>t.find(l=>l.type===a)??Qv(a)}},ih=(e,t)=>{let n=e,o=0;for(;t.has(n);)n=`${e}-${++o}`;return t.add(n),n},Ku=(e,t)=>Array.isArray(e?.edges?.[t])?e.edges[t].length:0,Eg=(e,t,n)=>{const o=e?.rules?.find(r=>r?.id===t)?.action;return n.find(r=>r.type===o)?.maxChildren},Ju=(e,t,n)=>{const o=Eg(e,t,n);return o==null?1:Math.max(0,o-Ku(e,t))},Qu=(e,t,n)=>{const o=Eg(e,t,n);if(!(o===void 0||Ku(e,t)<o))return`A regra ${t} atingiu o limite de ${o} etapas filhas.`},ZH="#6d3595",XH=(e,t,n,o)=>{if(!n?.id||!e.ruleById.has(n.nextRuleId))return[];const r=e.usedEdgeIds.has(n.id)?`__duplicate-edge-${t}-${o}`:n.id,i=e.presentationFor(e.ruleById.get(t).action).color;return e.usedEdgeIds.add(r),e.graph.setEdge(t,n.nextRuleId,{},r),[{id:r,source:t,target:n.nextRuleId,type:"smoothstep",animated:!0,updatable:!e.readOnly,selectable:!e.readOnly,focusable:!e.readOnly,interactionWidth:18,markerEnd:{type:ga.ArrowClosed,color:i},style:{stroke:i,strokeWidth:2,strokeDasharray:"7 6"}}]},qH=(e,t,n)=>!e.ruleById.has(t)||!Array.isArray(n)?[]:n.flatMap((o,r)=>XH(e,t,o,r)),KH=e=>Object.entries(e.flow?.edges??{}).flatMap(([t,n])=>qH(e,t,n)),JH=(e,t,n)=>({id:n,source:e,target:t,type:"smoothstep",animated:!0,updatable:!1,selectable:!1,focusable:!1,deletable:!1,interactionWidth:0,data:{isAddControl:!0},style:{stroke:ZH,strokeWidth:2,strokeDasharray:"7 6"}}),QH=(e,t,n)=>{if(t.rule?.id!==t.id)return[];const o=Ku(e.flow,t.id);if(Ju(e.flow,t.id,e.nodeTypes)<=0)return[];const i=ih(`__workflow-add__${t.id}__${o}`,e.usedNodeIds),a=ih(`__workflow-add-edge__${t.id}__${o}`,e.usedEdgeIds);return e.graph.setNode(i,{width:kn,height:kn}),e.graph.setEdge(t.id,i,{},a),n.push(JH(t.id,i,a)),[{id:i,parentRule:t.rule}]},e5=(e,t)=>e.readOnly||e.nodeTypes.length===0?[]:e.entries.flatMap(n=>QH(e,n,t)),t5=(e,t)=>{const{id:n,rule:o}=t,r=e.graph.node(n)??{x:Li/2,y:Fi/2},i=e.presentationFor(o.action);return{id:n,type:"workflow",position:{x:r.x-Li/2,y:r.y-Fi/2},width:Li,height:Fi,sourcePosition:se.Bottom,targetPosition:se.Top,draggable:!e.readOnly,connectable:!e.readOnly,selectable:!0,focusable:!0,deletable:!1,ariaLabel:`${i.label}: ${o.name}`,data:{rule:o,presentation:i,readOnly:e.readOnly,canConnect:!e.readOnly&&Ju(e.flow,o.id,e.nodeTypes)>0,canDelete:!e.readOnly&&(o.isRoot!==!0||e.rules.length===1)}}},n5=e=>e.entries.map(t=>t5(e,t)),o5=(e,t)=>{const n=e.node(t.id)??{x:kn/2,y:kn/2};return{id:t.id,type:"workflow-add",position:{x:n.x-kn/2,y:n.y-kn/2},width:kn,height:kn,targetPosition:se.Top,draggable:!1,connectable:!1,selectable:!0,focusable:!1,deletable:!1,ariaLabel:`Adicionar etapa após ${t.parentRule.name}`,data:{isAddControl:!0,parentRule:t.parentRule}}},r5=(e,t)=>t.map(n=>o5(e,n)),ah=(e,t,n)=>{const o=GH(e,t,n),r=KH(o),i=e5(o,r);return EH(o.graph),{nodes:[...n5(o),...r5(o.graph,i)],edges:r}},Sg=e=>e?.edges&&typeof e.edges=="object"&&!Array.isArray(e.edges)?e.edges:{},i5=e=>{const t=[],n=e.map(i=>i?.id).filter(Boolean),o=new Set(n);n.length!==e.length&&t.push("Todas as regras devem possuir um identificador."),o.size!==n.length&&t.push("Existem regras com identificadores duplicados.");const r=e.filter(i=>i?.isRoot===!0);return e.length>0&&r.length!==1&&t.push("Um fluxo não vazio deve possuir exatamente uma regra com isRoot igual a true."),{knownIds:o,reasons:t}},a5=(e,t,n,o)=>{const r=[];return e?.id||r.push(`Uma conexão de ${t} não possui identificador.`),e?.id&&o.has(e.id)&&r.push(`A conexão ${e.id} está duplicada.`),e?.id&&o.add(e.id),n.has(e?.nextRuleId)||r.push(`O destino ${String(e?.nextRuleId)} não corresponde a uma regra existente.`),r},s5=(e,t,n,o)=>{const r=n.has(e)?[]:[`A origem ${e} não corresponde a uma regra existente.`];return Array.isArray(t)?[...r,...t.flatMap(i=>a5(i,e,n,o))]:[...r,`As conexões de ${e} devem ser uma lista.`]},l5=(e,t)=>{const n=new Set;return Object.entries(Sg(e)).flatMap(([o,r])=>s5(o,r,t,n))},Dg=e=>{if(!e||typeof e!="object")return["O fluxo deve ser um objeto."];if(!Array.isArray(e.rules))return["O fluxo deve possuir uma lista de regras."];const{knownIds:t,reasons:n}=i5(e.rules);return[...new Set([...n,...l5(e,t)])]},Mg=(e,t,n,o)=>(Sg(e)[t]??[]).some(r=>r?.id!==o&&r?.nextRuleId===n),Nl=()=>globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random().toString(16).slice(2)}`,ni=e=>({...e??{},rules:Array.isArray(e?.rules)?e.rules.map(t=>({...t})):[],edges:Object.fromEntries(Object.entries(e?.edges??{}).map(([t,n])=>[t,Array.isArray(n)?n.map(o=>({...o})):n]))}),oi=(e,t)=>{const n=Dg(e);return n.length?{error:{mutation:t,reason:n[0]}}:{flow:e,mutation:t}},Vt=(e,t)=>({error:{mutation:e,reason:t}}),ec=(e,t,n)=>{e.edges[t]=[...e.edges[t]??[],n]},tc=e=>{Object.keys(e.edges).filter(t=>e.edges[t].length===0).forEach(t=>delete e.edges[t])},Ng=(e,t)=>Object.entries(e.edges).flatMap(([n,o])=>o.map(r=>({source:n,edge:r}))).find(({edge:n})=>n.id===t),u5=(e,t,n,o)=>t===n?void 0:Qu(e,t,o),c5=(e,t,n,o=[])=>{const r=ni(e),i=Nl(),a={type:"add-node",nodeId:i,...n?{parentId:n}:{}};if(n&&!r.rules.some(c=>c.id===n))return Vt(a,"Origem inexistente.");const l=n?Qu(r,n,o):void 0;if(l)return Vt(a,l);const u={id:i,name:t.defaultName,action:t.type,isRoot:r.rules.length===0};if(r.rules.push(u),n){const c=Nl();ec(r,n,{id:c,nextRuleId:i})}return oi(r,a)},d5=(e,t)=>{const n=ni(e),o=n.rules.find(i=>i.id===t),r={type:"delete-node",nodeId:t};return o?o.isRoot===!0&&n.rules.length>1?Vt(r,"A regra raiz não pode ser removida enquanto houver outras regras."):(n.rules=n.rules.filter(i=>i.id!==t),delete n.edges[t],Object.keys(n.edges).forEach(i=>{n.edges[i]=n.edges[i].filter(a=>a.nextRuleId!==t)}),tc(n),oi(n,r)):Vt(r,"Regra inexistente.")},f5=(e,t,n,o=[])=>{const r=ni(e),i=Nl(),a={type:"connect",edgeId:i,source:t,target:n};if(Mg(r,t,n))return Vt(a,"Essa conexão já existe.");const l=Qu(r,t,o);return l?Vt(a,l):(ec(r,t,{id:i,nextRuleId:n}),oi(r,a))},h5=(e,t)=>{const n=ni(e),o=Ng(n,t),r={type:"disconnect",edgeId:t};return o?(n.edges[o.source]=n.edges[o.source].filter(i=>i.id!==t),tc(n),oi(n,{...r,source:o.source,target:o.edge.nextRuleId})):Vt(r,"Conexão inexistente.")},p5=(e,t,n,o,r=[])=>{const i=ni(e),a=Ng(i,t),l=a?.source??"",u=a?.edge,c={type:"reconnect",edgeId:t,source:n,target:o,previousSource:l,previousTarget:u?.nextRuleId};if(!u)return Vt(c,"Conexão inexistente.");if(Mg(i,n,o,t))return Vt(c,"Essa conexão já existe.");const d=u5(i,n,l,r);return d?Vt(c,d):(i.edges[l]=i.edges[l].filter(f=>f.id!==t),tc(i),ec(i,n,{...u,nextRuleId:o}),oi(i,c))},m5=["onKeydown"],v5={class:"yu-relative yu-h-full yu-min-h-[36rem] yu-w-full yu-overflow-hidden yu-rounded-xl yu-border yu-border-slate-200 yu-bg-slate-50 yu-font-primary"},Cg=s.defineComponent({__name:"app-service-workflow-editor",props:{workflowId:{},modelValue:{},allowedNodeTypes:{default:()=>[]}},emits:["update:modelValue","change","node","invalid-change","invalid-model"],setup(e,{emit:t}){const n=e,o=t,r=s.computed(()=>k4(n.allowedNodeTypes)),i=s.computed(()=>Dg(n.modelValue)),a=s.computed(()=>i.value.length>0),l=s.ref([]),u=s.ref([]),c=s.ref(),d=s.ref(),f=()=>c.value?.fitView?.({padding:.18,duration:250}),h=()=>{const $=ah(n.modelValue,r.value,a.value);l.value=$.nodes,u.value=$.edges,s.nextTick(f)},p=$=>{if($.error)return o("invalid-change",$.error),!1;o("update:modelValue",$.flow),o("change",$.flow,$.mutation);const C=ah($.flow,r.value,!1);return l.value=C.nodes,u.value=C.edges,!0},m=Pu(n.workflowId),v=$u(),w=Symbol(`workflow-editor:${n.workflowId}`),g=$=>a.value||r.value.length===0?!1:$?n.modelValue?.rules?.some(C=>C.id===$)&&Ju(n.modelValue,$,r.value)>0:!0,b=v.registerEditor(n.workflowId,w,{canAdd:g,add:($,C)=>p(c5(n.modelValue,$,C,r.value))});s.watch([()=>n.modelValue,r,a],()=>{h(),b&&v.syncEditor(n.workflowId,r.value,a.value)},{deep:!0,immediate:!0}),s.watch(()=>i.value.join("|"),($,C)=>{$&&$!==C&&o("invalid-model",{reasons:i.value})},{immediate:!0}),s.onBeforeUnmount(()=>{b&&v.unregisterEditor(n.workflowId,w)});const y=$=>p(f5(n.modelValue,$.source,$.target,r.value)),_=({edge:$,connection:C})=>p(p5(n.modelValue,$.id,C.source,C.target,r.value)),O=({edge:$})=>{d.value=$.data?.isAddControl?void 0:$.id},B=()=>{!d.value||a.value||(p(h5(n.modelValue,d.value)),d.value=void 0)};return($,C)=>(s.openBlock(),s.createElementBlock("section",{class:"yu-h-full yu-w-full","aria-label":"Editor de fluxo de serviço",tabindex:"0",onKeydown:[s.withKeys(s.withModifiers(B,["prevent"]),["delete"]),s.withKeys(s.withModifiers(B,["prevent"]),["backspace"])]},[s.createElementVNode("div",v5,[s.createVNode(p4,{"can-add":!a.value&&r.value.length>0,"has-selected-edge":!!d.value,onAdd:C[0]||(C[0]=V=>s.unref(m).requestAdd()),onDeleteEdge:B},null,8,["can-add","has-selected-edge"]),a.value?(s.openBlock(),s.createBlock(b4,{key:0,reasons:i.value},null,8,["reasons"])):s.createCommentVNode("",!0),s.createVNode(s.unref(SL),{nodes:l.value,"onUpdate:nodes":C[3]||(C[3]=V=>l.value=V),edges:u.value,"onUpdate:edges":C[4]||(C[4]=V=>u.value=V),"nodes-connectable":!a.value,"edges-updatable":!a.value,"delete-key-code":null,"min-zoom":.25,"max-zoom":1.75,onInit:C[5]||(C[5]=V=>c.value=V),onNodesInitialized:f,onConnect:y,onEdgeUpdate:_,onEdgeClick:O,onPaneClick:C[6]||(C[6]=V=>d.value=void 0)},{"node-workflow":s.withCtx(V=>[s.createVNode(g4,s.mergeProps(V,{onOpen:C[1]||(C[1]=L=>o("node",L)),onDelete:C[2]||(C[2]=L=>p(s.unref(d5)(n.modelValue,L.id)))}),null,16)]),"node-workflow-add":s.withCtx(V=>[s.createVNode(h4,s.mergeProps(V,{onAdd:s.unref(m).requestAdd}),null,16,["onAdd"])]),default:s.withCtx(()=>[s.createVNode(s.unref(BL),{"pattern-color":"#cbd5e1",gap:24,size:1.5}),s.createVNode(s.unref(d4),{position:"bottom-right"})]),_:1},8,["nodes","edges","nodes-connectable","edges-updatable"])])],40,m5))}}),g5={install(e){e.component("AppServiceWorkflowAddForm",jm),e.component("AppServiceWorkflowEditor",Cg)}};exports.AppServiceWorkflowAddForm=jm;exports.AppServiceWorkflowEditor=Cg;exports.default=g5;exports.useServiceWorkflowEditorChannel=Pu;
|
|
29
|
+
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class He extends Error{constructor(t,...n){var o;super((o=Vf[t])==null?void 0:o.call(Vf,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Zu(e){return"clientX"in e}function lR(e){return"sourceEvent"in e}function Pt(e,t){const n=Zu(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-(t?.left??0),y:i-(t?.top??0)}}const Na=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function uR(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function rs(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const cR=()=>!0;function Is(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function dR(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())ka(i,xa(a))>0&&o.push(a);return o}const fR=250;function hR(e,t,n,o){var i,a;let s=[],l=Number.POSITIVE_INFINITY;const u=dR(e,n,t+fR);for(const c of u){const d=[...((i=c.handleBounds)==null?void 0:i.source)??[],...((a=c.handleBounds)==null?void 0:a.target)??[]];for(const f of d){if(o.nodeId===f.nodeId&&o.type===f.type&&o.id===f.id)continue;const{x:h,y:p}=Ho(c,f,f.position,!0),m=Math.sqrt((h-e.x)**2+(p-e.y)**2);m>t||(m<l?(s=[{...f,x:h,y:p}],l=m):m===l&&s.push({...f,x:h,y:p}))}}if(!s.length)return null;if(s.length>1){const c=o.type==="source"?"target":"source";return s.find(d=>d.type===c)??s[0]}return s[0]}function Of(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:s,lib:l,flowId:u,isValidConnection:c=cR},d,f,h,p){const m=a==="target",g=t?s.querySelector(`.${l}-flow__handle[data-id="${u}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:b,y}=Pt(e),_=s.elementFromPoint(b,y),w=_?.classList.contains(`${l}-flow__handle`)?_:g,v={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const N=Fv(void 0,w),T=w.getAttribute("data-nodeid"),V=w.getAttribute("data-handleid"),$=w.classList.contains("connectable"),P=w.classList.contains("connectableend");if(!T||!N)return v;const A={source:m?T:o,sourceHandle:m?V:i,target:m?o:T,targetHandle:m?i:V};v.connection=A;const x=$&&P&&(n===In.Strict?m&&N==="source"||!m&&N==="target":T!==o||V!==i);v.isValid=x&&c(A,{nodes:f,edges:d,sourceNode:h(A.source),targetNode:h(A.target)}),v.toHandle=Hv(T,N,V,p,n,!0)}return v}function Fv(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function pR(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function mR(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Hv(e,t,n,o,i,a=!1){var s,l,u;const c=o.get(e);if(!c)return null;const d=i===In.Strict?(s=c.handleBounds)==null?void 0:s[t]:[...((l=c.handleBounds)==null?void 0:l.source)??[],...((u=c.handleBounds)==null?void 0:u.target)??[]],f=(n?d?.find(h=>h.id===n):d?.[0])??null;return f&&a?{...f,...Ho(c,f,f.position,!0)}:f}const Tl={[le.Left]:le.Right,[le.Right]:le.Left,[le.Top]:le.Bottom,[le.Bottom]:le.Top},vR=["production","prod"];function li(e,...t){jv()&&console.warn(`[Vue Flow]: ${e}`,...t)}function jv(){return!vR.includes(process.env.NODE_ENV||"")}function $f(e,t,n,o,i){const a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...os(s)}}):null}function Vl(e,t,n,o,i,a=!1,s){i.value=!1,e.selected?(a||e.selected&&t)&&(o([e]),r.nextTick(()=>{s.blur()})):n([e])}function Re(e){return typeof r.unref(e)<"u"}function gR(e,t,n,o){if(!e||!e.source||!e.target)return n(new He(Le.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let i;return zn(e)?i=e:i={...e,id:Bv(e)},i=Ov(i,void 0,o),Xz(i,t)?!1:i}function yR(e,t,n,o,i){if(!t.source||!t.target)return i(new He(Le.EDGE_INVALID,e.id)),!1;if(!n)return i(new He(Le.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...s}=e;return{...s,id:o?Bv(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function Bf(e,t,n){const o={},i=[];for(let a=0;a<e.length;++a){const s=e[a];if(!to(s)){n(new He(Le.NODE_INVALID,s?.id)||`[ID UNKNOWN|INDEX ${a}]`);continue}const l=Gz(s,t(s.id),s.parentNode);s.parentNode&&(o[s.parentNode]=!0),i[a]=l}for(const a of i){const s=t(a.parentNode)||i.find(l=>l.id===a.parentNode);a.parentNode&&!s&&n(new He(Le.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||o[a.id])&&(o[a.id]&&(a.isParent=!0),s&&(s.isParent=!0))}return i}function Pf(e,t,n,o,i,a){let s=i;const l=o.get(s)||new Map;o.set(s,l.set(n,t)),s=`${i}-${e}`;const u=o.get(s)||new Map;if(o.set(s,u.set(n,t)),a){s=`${i}-${e}-${a}`;const c=o.get(s)||new Map;o.set(s,c.set(n,t))}}function zs(e,t,n){e.clear();for(const o of n){const{source:i,target:a,sourceHandle:s=null,targetHandle:l=null}=o,u={edgeId:o.id,source:i,target:a,sourceHandle:s,targetHandle:l},c=`${i}-${s}--${a}-${l}`,d=`${a}-${l}--${i}-${s}`;Pf("source",u,d,e,i,s),Pf("target",u,c,e,a,l)}}function Af(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Rs(e,t,n,o,i,a,s,l){const u=[];for(const c of e){const d=zn(c)?c:gR(c,l,i,a);if(!d)continue;const f=n(d.source),h=n(d.target);if(!f||!h){i(new He(Le.EDGE_SOURCE_TARGET_MISSING,d.id,d.source,d.target));continue}if(!f){i(new He(Le.EDGE_SOURCE_MISSING,d.id,d.source));continue}if(!h){i(new He(Le.EDGE_TARGET_MISSING,d.id,d.target));continue}if(t&&!t(d,{edges:l,nodes:s,sourceNode:f,targetNode:h})){i(new He(Le.EDGE_INVALID,d.id));continue}const p=o(d.id);u.push({...Ov(d,p,a),sourceNode:f,targetNode:h})}return u}const Yf=Symbol("vueFlow"),Wv=Symbol("nodeId"),Uv=Symbol("nodeRef"),wR=Symbol("edgeId"),bR=Symbol("edgeRef"),is=Symbol("slots");function Gv(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodeLookup:a,nodeExtent:s,nodeDragThreshold:l,viewport:u,autoPanOnNodeDrag:c,autoPanSpeed:d,nodesDraggable:f,panBy:h,findNode:p,multiSelectionActive:m,nodesSelectionActive:g,selectNodesOnDrag:b,removeSelectedElements:y,addSelectedNodes:_,updateNodePositions:w,emits:v}=Ae(),{onStart:N,onDrag:T,onStop:V,onClick:$,el:P,disabled:A,id:O,selectable:x,dragHandle:R}=e,k=r.shallowRef(!1);let M=[],S,L=null,F={x:void 0,y:void 0},j={x:0,y:0},I=null,G=!1,W=!1,ue=0,ie=!1;const X=kR(),K=({x:ce,y:de})=>{F={x:ce,y:de};let D=!1;if(M=M.map(E=>{const B={x:ce-E.distance.x,y:de-E.distance.y},{computedPosition:z}=Gu(E,n.value?rs(B,o.value):B,v.error,s.value,E.parentNode?p(E.parentNode):void 0);return D=D||E.position.x!==z.x||E.position.y!==z.y,E.position=z,E}),W=W||D,!!D&&(w(M,!0,!0),k.value=!0,I)){const[E,B]=Ys({id:O,dragItems:M,findNode:p});T({event:I,node:E,nodes:B})}},Q=()=>{if(!L)return;const[ce,de]=Rv(j,L,d.value);if(ce!==0||de!==0){const D={x:(F.x??0)-ce/u.value.zoom,y:(F.y??0)-de/u.value.zoom};h({x:ce,y:de})&&K(D)}ue=requestAnimationFrame(Q)},ve=(ce,de)=>{G=!0;const D=p(O);!b.value&&!m.value&&D&&(D.selected||y()),D&&r.toValue(x)&&b.value&&Vl(D,m.value,_,y,g,!1,de);const E=X(ce.sourceEvent);if(F=E,M=nR(a.value,f.value,E,O),M.length){const[B,z]=Ys({id:O,dragItems:M,findNode:p});N({event:ce.sourceEvent,node:B,nodes:z})}},_e=(ce,de)=>{var D;ce.sourceEvent.type==="touchmove"&&ce.sourceEvent.touches.length>1||(W=!1,l.value===0&&ve(ce,de),F=X(ce.sourceEvent),L=((D=t.value)==null?void 0:D.getBoundingClientRect())||null,j=Pt(ce.sourceEvent,L))},ge=(ce,de)=>{const D=X(ce.sourceEvent);if(!ie&&G&&c.value&&(ie=!0,Q()),!G){const E=D.xSnapped-(F.x??0),B=D.ySnapped-(F.y??0);Math.sqrt(E*E+B*B)>l.value&&ve(ce,de)}(F.x!==D.xSnapped||F.y!==D.ySnapped)&&M.length&&G&&(I=ce.sourceEvent,j=Pt(ce.sourceEvent,L),K(D))},we=ce=>{let de=!1;if(!G&&!k.value&&!m.value){const D=ce.sourceEvent,E=X(D),B=E.xSnapped-(F.x??0),z=E.ySnapped-(F.y??0),Y=Math.sqrt(B*B+z*z);Y!==0&&Y<=l.value&&($?.(D),de=!0)}if(M.length&&!de){W&&(w(M,!1,!1),W=!1);const[D,E]=Ys({id:O,dragItems:M,findNode:p});V({event:ce.sourceEvent,node:D,nodes:E})}M=[],k.value=!1,ie=!1,G=!1,F={x:void 0,y:void 0},cancelAnimationFrame(ue)};return r.watch([()=>r.toValue(A),P],([ce,de],D,E)=>{if(de){const B=bt(de);ce||(S=UI().on("start",z=>_e(z,de)).on("drag",z=>ge(z,de)).on("end",z=>we(z)).filter(z=>{const Y=z.target,ee=r.toValue(R);return!z.button&&(!i.value||!Mf(Y,`.${i.value}`,de)&&(!ee||Mf(Y,ee,de)))}),B.call(S)),E(()=>{B.on(".drag",null),S&&(S.on("start",null),S.on("drag",null),S.on("end",null))})}}),k}function _R(){return{doubleClick:ne(),click:ne(),mouseEnter:ne(),mouseMove:ne(),mouseLeave:ne(),contextMenu:ne(),updateStart:ne(),update:ne(),updateEnd:ne()}}function xR(e,t){const n=_R();return n.doubleClick.on(o=>{var i,a;t.edgeDoubleClick(o),(a=(i=e.events)==null?void 0:i.doubleClick)==null||a.call(i,o)}),n.click.on(o=>{var i,a;t.edgeClick(o),(a=(i=e.events)==null?void 0:i.click)==null||a.call(i,o)}),n.mouseEnter.on(o=>{var i,a;t.edgeMouseEnter(o),(a=(i=e.events)==null?void 0:i.mouseEnter)==null||a.call(i,o)}),n.mouseMove.on(o=>{var i,a;t.edgeMouseMove(o),(a=(i=e.events)==null?void 0:i.mouseMove)==null||a.call(i,o)}),n.mouseLeave.on(o=>{var i,a;t.edgeMouseLeave(o),(a=(i=e.events)==null?void 0:i.mouseLeave)==null||a.call(i,o)}),n.contextMenu.on(o=>{var i,a;t.edgeContextMenu(o),(a=(i=e.events)==null?void 0:i.contextMenu)==null||a.call(i,o)}),n.updateStart.on(o=>{var i,a;t.edgeUpdateStart(o),(a=(i=e.events)==null?void 0:i.updateStart)==null||a.call(i,o)}),n.update.on(o=>{var i,a;t.edgeUpdate(o),(a=(i=e.events)==null?void 0:i.update)==null||a.call(i,o)}),n.updateEnd.on(o=>{var i,a;t.edgeUpdateEnd(o),(a=(i=e.events)==null?void 0:i.updateEnd)==null||a.call(i,o)}),Object.entries(n).reduce((o,[i,a])=>(o.emit[i]=a.trigger,o.on[i]=a.on,o),{emit:{},on:{}})}function kR(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Ae();return i=>{var a;const s=((a=o.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},l=lR(i)?i.sourceEvent:i,{x:u,y:c}=Pt(l,s),d=Xr({x:u,y:c},e.value),{x:f,y:h}=n.value?rs(d,t.value):d;return{xSnapped:f,ySnapped:h,...d}}}function Si(){return!0}function Zv({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:a,onEdgeUpdateEnd:s}){const{id:l,vueFlowRef:u,connectionMode:c,connectionRadius:d,connectOnClick:f,connectionClickStartHandle:h,nodesConnectable:p,autoPanOnConnect:m,autoPanSpeed:g,findNode:b,panBy:y,startConnection:_,updateConnection:w,endConnection:v,emits:N,viewport:T,edges:V,nodes:$,isValidConnection:P,nodeLookup:A}=Ae();let O=null,x=!1,R=null;function k(S){var L;const F=r.toValue(n)==="target",j=Zu(S),I=bf(S.target),G=S.currentTarget;if(G&&(j&&S.button===0||!j)){let W=function(re){D=Pt(re,we),K=hR(Xr(D,T.value,!1,[1,1]),d.value,A.value,z),E||(B(),E=!0);const fe=Of(re,{handle:K,connectionMode:c.value,fromNodeId:r.toValue(t),fromHandleId:r.toValue(e),fromType:F?"target":"source",isValidConnection:X,doc:I,lib:"vue",flowId:l,nodeLookup:A.value},V.value,$.value,b,A.value);R=fe.handleDomNode,O=fe.connection,x=mR(!!K,fe.isValid);const ye={...se,isValid:x,to:fe.toHandle&&x?qr({x:fe.toHandle.x,y:fe.toHandle.y},T.value):D,toHandle:fe.toHandle,toPosition:x&&fe.toHandle?fe.toHandle.position:Tl[z.position],toNode:fe.toHandle?A.value.get(fe.toHandle.nodeId):null};if(x&&K&&se?.toHandle&&ye.toHandle&&se.toHandle.type===ye.toHandle.type&&se.toHandle.nodeId===ye.toHandle.nodeId&&se.toHandle.id===ye.toHandle.id&&se.to.x===ye.to.x&&se.to.y===ye.to.y)return;const xe=K??fe.toHandle;if(w(xe&&x?qr({x:xe.x,y:xe.y},T.value):D,xe,pR(!!xe,x)),se=ye,!K&&!x&&!R)return Is(de);O&&O.source!==O.target&&R&&(Is(de),de=R,R.classList.add("connecting","vue-flow__handle-connecting"),R.classList.toggle("valid",!!x),R.classList.toggle("vue-flow__handle-valid",!!x))},ue=function(re){"touches"in re&&re.touches.length>0||((K||R)&&O&&x&&(a?a(re,O):N.connect(O)),N.connectEnd(re),i&&s?.(re),Is(de),cancelAnimationFrame(Q),v(re),E=!1,x=!1,O=null,R=null,I.removeEventListener("mousemove",W),I.removeEventListener("mouseup",ue),I.removeEventListener("touchmove",W),I.removeEventListener("touchend",ue))};const ie=b(r.toValue(t));let X=r.toValue(o)||P.value||Si;!X&&ie&&(X=(F?ie.isValidSourcePos:ie.isValidTargetPos)||Si);let K,Q=0;const{x:ve,y:_e}=Pt(S),ge=Fv(r.toValue(i),G),we=(L=u.value)==null?void 0:L.getBoundingClientRect();if(!we||!ge)return;const ce=Hv(r.toValue(t),ge,r.toValue(e),A.value,c.value);if(!ce)return;let de,D=Pt(S,we),E=!1;const B=()=>{if(!m.value)return;const[re,fe]=Rv(D,we,g.value);y({x:re,y:fe}),Q=requestAnimationFrame(B)},z={...ce,nodeId:r.toValue(t),type:ge,position:ce.position},Y=A.value.get(r.toValue(t)),J={inProgress:!0,isValid:null,from:Ho(Y,z,le.Left,!0),fromHandle:z,fromPosition:z.position,fromNode:Y,to:D,toHandle:null,toPosition:Tl[z.position],toNode:null};_({nodeId:r.toValue(t),id:r.toValue(e),type:ge,position:G?.getAttribute("data-handlepos")||le.Top,...D},{x:ve-we.left,y:_e-we.top}),N.connectStart({event:S,nodeId:r.toValue(t),handleId:r.toValue(e),handleType:ge});let se=J;I.addEventListener("mousemove",W),I.addEventListener("mouseup",ue),I.addEventListener("touchmove",W),I.addEventListener("touchend",ue)}}function M(S){var L,F;if(!f.value)return;const j=r.toValue(n)==="target";if(!h.value){N.clickConnectStart({event:S,nodeId:r.toValue(t),handleId:r.toValue(e)}),_({nodeId:r.toValue(t),type:r.toValue(n),id:r.toValue(e),position:le.Top,...Pt(S)},void 0,!0);return}let I=r.toValue(o)||P.value||Si;const G=b(r.toValue(t));if(!I&&G&&(I=(j?G.isValidSourcePos:G.isValidTargetPos)||Si),G&&(typeof G.connectable>"u"?p.value:G.connectable)===!1)return;const W=bf(S.target),ue=Of(S,{handle:{nodeId:r.toValue(t),id:r.toValue(e),type:r.toValue(n),position:le.Top,...Pt(S)},connectionMode:c.value,fromNodeId:h.value.nodeId,fromHandleId:h.value.id??null,fromType:h.value.type,isValidConnection:I,doc:W,lib:"vue",flowId:l,nodeLookup:A.value},V.value,$.value,b,A.value),ie=((L=ue.connection)==null?void 0:L.source)===((F=ue.connection)==null?void 0:F.target);ue.isValid&&ue.connection&&!ie&&N.connect(ue.connection),N.clickConnectEnd(S),v(S,!0)}return{handlePointerDown:k,handleClick:M}}function NR(){return r.inject(Wv,"")}function qv(e){const t=e??NR()??"",n=r.inject(Uv,r.ref(null)),{findNode:o,edges:i,emits:a}=Ae(),s=o(t);return s||a.error(new He(Le.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:s,parentNode:r.computed(()=>o(s.parentNode)),connectedEdges:r.computed(()=>Iv([s],i.value))}}function ER(){return{doubleClick:ne(),click:ne(),mouseEnter:ne(),mouseMove:ne(),mouseLeave:ne(),contextMenu:ne(),dragStart:ne(),drag:ne(),dragStop:ne()}}function CR(e,t){const n=ER();return n.doubleClick.on(o=>{var i,a;t.nodeDoubleClick(o),(a=(i=e.events)==null?void 0:i.doubleClick)==null||a.call(i,o)}),n.click.on(o=>{var i,a;t.nodeClick(o),(a=(i=e.events)==null?void 0:i.click)==null||a.call(i,o)}),n.mouseEnter.on(o=>{var i,a;t.nodeMouseEnter(o),(a=(i=e.events)==null?void 0:i.mouseEnter)==null||a.call(i,o)}),n.mouseMove.on(o=>{var i,a;t.nodeMouseMove(o),(a=(i=e.events)==null?void 0:i.mouseMove)==null||a.call(i,o)}),n.mouseLeave.on(o=>{var i,a;t.nodeMouseLeave(o),(a=(i=e.events)==null?void 0:i.mouseLeave)==null||a.call(i,o)}),n.contextMenu.on(o=>{var i,a;t.nodeContextMenu(o),(a=(i=e.events)==null?void 0:i.contextMenu)==null||a.call(i,o)}),n.dragStart.on(o=>{var i,a;t.nodeDragStart(o),(a=(i=e.events)==null?void 0:i.dragStart)==null||a.call(i,o)}),n.drag.on(o=>{var i,a;t.nodeDrag(o),(a=(i=e.events)==null?void 0:i.drag)==null||a.call(i,o)}),n.dragStop.on(o=>{var i,a;t.nodeDragStop(o),(a=(i=e.events)==null?void 0:i.dragStop)==null||a.call(i,o)}),Object.entries(n).reduce((o,[i,a])=>(o.emit[i]=a.trigger,o.on[i]=a.on,o),{emit:{},on:{}})}function Xv(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:a,nodesDraggable:s,emits:l}=Ae();return(u,c=!1)=>{const d=a.value?i.value[0]:5,f=a.value?i.value[1]:5,h=c?4:1,p=u.x*d*h,m=u.y*f*h,g=[];for(const b of e.value)if(b.draggable||s&&typeof b.draggable>"u"){const y={x:b.computedPosition.x+p,y:b.computedPosition.y+m},{position:_}=Gu(b,y,l.error,t.value,b.parentNode?o(b.parentNode):void 0);g.push({id:b.id,position:_,from:b.position,distance:{x:u.x,y:u.y},dimensions:b.dimensions})}n(g,!0,!1)}}const Di=.1,SR=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function xn(){return li("Viewport not initialized yet."),Promise.resolve(!1)}const DR={zoomIn:xn,zoomOut:xn,zoomTo:xn,fitView:xn,setCenter:xn,fitBounds:xn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:xn,setTransform:xn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function MR(e){function t(o,i){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?Dr:Fi).scaleBy(Ls(e.d3Selection,i?.duration,i?.ease,()=>{a(!0)}),o):a(!1)})}function n(o,i,a,s){return new Promise(l=>{var u;const{x:c,y:d}=Vv({x:-o,y:-i},e.translateExtent),f=Fo.translate(-c,-d).scale(a);e.d3Selection&&e.d3Zoom?(u=e.d3Zoom)==null||u.interpolate(s?.interpolate==="linear"?Dr:Fi).transform(Ls(e.d3Selection,s?.duration,s?.ease,()=>{l(!0)}),f):l(!1)})}return r.computed(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,a)=>new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(a?.interpolate==="linear"?Dr:Fi).scaleTo(Ls(e.d3Selection,a?.duration,a?.ease,()=>{s(!0)}),i):s(!1)}),setViewport:(i,a)=>n(i.x,i.y,i.zoom,a),setTransform:(i,a)=>n(i.x,i.y,i.zoom,a),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:Di,includeHiddenNodes:!1,duration:0})=>{var a,s;const l=[];for(const h of e.nodes)h.dimensions.width&&h.dimensions.height&&(i?.includeHiddenNodes||!h.hidden)&&(!((a=i.nodes)!=null&&a.length)||(s=i.nodes)!=null&&s.length&&i.nodes.includes(h.id))&&l.push(h);if(!l.length)return Promise.resolve(!1);const u=Av(l),{x:c,y:d,zoom:f}=_f(u,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??Di);return n(c,d,f,i)},setCenter:(i,a,s)=>{const l=typeof s?.zoom<"u"?s.zoom:e.maxZoom,u=e.dimensions.width/2-i*l,c=e.dimensions.height/2-a*l;return n(u,c,l,s)},fitBounds:(i,a={padding:Di})=>{const{x:s,y:l,zoom:u}=_f(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,a.padding??Di);return n(s,l,u,a)},project:i=>Xr(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:a,y:s}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x-a,y:i.y-s};return Xr(l,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:a,y:s}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x+a,y:i.y+s};return qr(l,e.viewport)}return{x:0,y:0}}}:DR)}function Ls(e,t=0,n=SR,o=()=>{}){const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function TR(e,t,n){const o=r.effectScope(!0);return o.run(()=>{const i=()=>{o.run(()=>{let g,b,y=!!(n.nodes.value.length||n.edges.value.length);g=bo([e.modelValue,()=>{var _,w;return(w=(_=e.modelValue)==null?void 0:_.value)==null?void 0:w.length}],([_])=>{_&&Array.isArray(_)&&(b?.pause(),n.setElements(_),!b&&!y&&_.length?y=!0:b?.resume())}),b=bo([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([_,w])=>{var v;(v=e.modelValue)!=null&&v.value&&Array.isArray(e.modelValue.value)&&(g?.pause(),e.modelValue.value=[..._,...w],r.nextTick(()=>{g?.resume()}))},{immediate:y}),r.onScopeDispose(()=>{g?.stop(),b?.stop()})})},a=()=>{o.run(()=>{let g,b,y=!!n.nodes.value.length;g=bo([e.nodes,()=>{var _,w;return(w=(_=e.nodes)==null?void 0:_.value)==null?void 0:w.length}],([_])=>{_&&Array.isArray(_)&&(b?.pause(),n.setNodes(_),!b&&!y&&_.length?y=!0:b?.resume())}),b=bo([n.nodes,()=>n.nodes.value.length],([_])=>{var w;(w=e.nodes)!=null&&w.value&&Array.isArray(e.nodes.value)&&(g?.pause(),e.nodes.value=[..._],r.nextTick(()=>{g?.resume()}))},{immediate:y}),r.onScopeDispose(()=>{g?.stop(),b?.stop()})})},s=()=>{o.run(()=>{let g,b,y=!!n.edges.value.length;g=bo([e.edges,()=>{var _,w;return(w=(_=e.edges)==null?void 0:_.value)==null?void 0:w.length}],([_])=>{_&&Array.isArray(_)&&(b?.pause(),n.setEdges(_),!b&&!y&&_.length?y=!0:b?.resume())}),b=bo([n.edges,()=>n.edges.value.length],([_])=>{var w;(w=e.edges)!=null&&w.value&&Array.isArray(e.edges.value)&&(g?.pause(),e.edges.value=[..._],r.nextTick(()=>{g?.resume()}))},{immediate:y}),r.onScopeDispose(()=>{g?.stop(),b?.stop()})})},l=()=>{o.run(()=>{r.watch(()=>t.maxZoom,()=>{t.maxZoom&&Re(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},u=()=>{o.run(()=>{r.watch(()=>t.minZoom,()=>{t.minZoom&&Re(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{o.run(()=>{r.watch(()=>t.translateExtent,()=>{t.translateExtent&&Re(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},d=()=>{o.run(()=>{r.watch(()=>t.nodeExtent,()=>{t.nodeExtent&&Re(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},f=()=>{o.run(()=>{r.watch(()=>t.applyDefault,()=>{Re(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},h=()=>{o.run(()=>{const g=async b=>{let y=b;typeof t.autoConnect=="function"&&(y=await t.autoConnect(b)),y!==!1&&n.addEdges([y])};r.watch(()=>t.autoConnect,()=>{Re(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),r.watch(n.autoConnect,(b,y,_)=>{b?n.onConnect(g):n.hooks.value.connect.off(g),_(()=>{n.hooks.value.connect.off(g)})},{immediate:!0})})},p=()=>{const g=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const b of Object.keys(t)){const y=b;if(!g.includes(y)){const _=r.toRef(()=>t[y]),w=n[y];r.isRef(w)&&o.run(()=>{r.watch(_,v=>{Re(v)&&(w.value=v)},{immediate:!0})})}}};(()=>{i(),a(),s(),u(),l(),c(),d(),f(),h(),p()})()}),()=>o.stop()}function VR(){return{edgesChange:ne(),nodesChange:ne(),nodeDoubleClick:ne(),nodeClick:ne(),nodeMouseEnter:ne(),nodeMouseMove:ne(),nodeMouseLeave:ne(),nodeContextMenu:ne(),nodeDragStart:ne(),nodeDrag:ne(),nodeDragStop:ne(),nodesInitialized:ne(),miniMapNodeClick:ne(),miniMapNodeDoubleClick:ne(),miniMapNodeMouseEnter:ne(),miniMapNodeMouseMove:ne(),miniMapNodeMouseLeave:ne(),connect:ne(),connectStart:ne(),connectEnd:ne(),clickConnectStart:ne(),clickConnectEnd:ne(),paneReady:ne(),init:ne(),move:ne(),moveStart:ne(),moveEnd:ne(),selectionDragStart:ne(),selectionDrag:ne(),selectionDragStop:ne(),selectionContextMenu:ne(),selectionStart:ne(),selectionEnd:ne(),viewportChangeStart:ne(),viewportChange:ne(),viewportChangeEnd:ne(),paneScroll:ne(),paneClick:ne(),paneContextMenu:ne(),paneMouseEnter:ne(),paneMouseMove:ne(),paneMouseLeave:ne(),edgeContextMenu:ne(),edgeMouseEnter:ne(),edgeMouseMove:ne(),edgeMouseLeave:ne(),edgeDoubleClick:ne(),edgeClick:ne(),edgeUpdateStart:ne(),edgeUpdate:ne(),edgeUpdateEnd:ne(),updateNodeInternals:ne(),error:ne(e=>li(e.message))}}function OR(e,t){const n=r.getCurrentInstance();r.onBeforeMount(()=>{for(const[i,a]of Object.entries(t.value)){const s=l=>{e(i,l)};a.setEmitter(s),jr(a.removeEmitter),a.setHasEmitListeners(()=>o(i)),jr(a.removeHasEmitListeners)}});function o(i){var a;const s=$R(i);return!!((a=n?.vnode.props)==null?void 0:a[s])}}function $R(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(i,a)=>a.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Kv(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Uu.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Mr.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Un.Bezier,style:{}},connectionMode:In.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Na()?"Meta":"Control",zoomActivationKeyCode:Na()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:VR(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const BR=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function PR(e,t,n){const o=MR(e),i=D=>{const E=D??[];e.hooks.updateNodeInternals.trigger(E)},a=D=>qz(D,e.nodes,e.edges),s=D=>Zz(D,e.nodes,e.edges),l=D=>Iv(D,e.edges),u=({id:D,type:E,nodeId:B})=>{var z;const Y=D?`-${E}-${D}`:`-${E}`;return Array.from(((z=e.connectionLookup.get(`${B}${Y}`))==null?void 0:z.values())??[])},c=D=>{if(D)return t.value.get(D)},d=D=>{if(D)return n.value.get(D)},f=(D,E,B)=>{var z,Y;const ee=[];for(const J of D){const se={id:J.id,type:"position",dragging:B,from:J.from};if(E&&(se.position=J.position,J.parentNode)){const re=c(J.parentNode);se.position={x:se.position.x-(((z=re?.computedPosition)==null?void 0:z.x)??0),y:se.position.y-(((Y=re?.computedPosition)==null?void 0:Y.y)??0)}}ee.push(se)}ee?.length&&e.hooks.nodesChange.trigger(ee)},h=D=>{if(!e.vueFlowRef)return;const E=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!E)return;const B=window.getComputedStyle(E),{m22:z}=new window.DOMMatrixReadOnly(B.transform),Y=[];for(const ee of D){const J=ee,se=c(J.id);if(se){const re=os(J.nodeElement);if(!!(re.width&&re.height&&(se.dimensions.width!==re.width||se.dimensions.height!==re.height||J.forceUpdate))){const ye=J.nodeElement.getBoundingClientRect();se.dimensions=re,se.handleBounds.source=$f("source",J.nodeElement,ye,z,se.id),se.handleBounds.target=$f("target",J.nodeElement,ye,z,se.id),Y.push({id:se.id,type:"dimensions",dimensions:re})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),Y.length&&e.hooks.nodesChange.trigger(Y)},p=(D,E)=>{const B=new Set,z=new Set;for(const J of D)to(J)?B.add(J.id):zn(J)&&z.add(J.id);const Y=Cn(t.value,B,!0),ee=Cn(n.value,z);if(e.multiSelectionActive){for(const J of B)Y.push(En(J,E));for(const J of z)ee.push(En(J,E))}Y.length&&e.hooks.nodesChange.trigger(Y),ee.length&&e.hooks.edgesChange.trigger(ee)},m=D=>{if(e.multiSelectionActive){const E=D.map(B=>En(B.id,!0));e.hooks.nodesChange.trigger(E);return}e.hooks.nodesChange.trigger(Cn(t.value,new Set(D.map(E=>E.id)),!0)),e.hooks.edgesChange.trigger(Cn(n.value))},g=D=>{if(e.multiSelectionActive){const E=D.map(B=>En(B.id,!0));e.hooks.edgesChange.trigger(E);return}e.hooks.edgesChange.trigger(Cn(n.value,new Set(D.map(E=>E.id)))),e.hooks.nodesChange.trigger(Cn(t.value,new Set,!0))},b=D=>{p(D,!0)},y=D=>{const B=(D||e.nodes).map(z=>(z.selected=!1,En(z.id,!1)));e.hooks.nodesChange.trigger(B)},_=D=>{const B=(D||e.edges).map(z=>(z.selected=!1,En(z.id,!1)));e.hooks.edgesChange.trigger(B)},w=D=>{if(!D||!D.length)return p([],!1);const E=D.reduce((B,z)=>{const Y=En(z.id,!1);return to(z)?B.nodes.push(Y):B.edges.push(Y),B},{nodes:[],edges:[]});E.nodes.length&&e.hooks.nodesChange.trigger(E.nodes),E.edges.length&&e.hooks.edgesChange.trigger(E.edges)},v=D=>{var E;(E=e.d3Zoom)==null||E.scaleExtent([D,e.maxZoom]),e.minZoom=D},N=D=>{var E;(E=e.d3Zoom)==null||E.scaleExtent([e.minZoom,D]),e.maxZoom=D},T=D=>{var E;(E=e.d3Zoom)==null||E.translateExtent(D),e.translateExtent=D},V=D=>{e.nodeExtent=D,i()},$=D=>{var E;(E=e.d3Zoom)==null||E.clickDistance(D)},P=D=>{e.nodesDraggable=D,e.nodesConnectable=D,e.elementsSelectable=D},A=D=>{const E=D instanceof Function?D(e.nodes):D;!e.initialized&&!E.length||(e.nodes=Bf(E,c,e.hooks.error.trigger))},O=D=>{const E=D instanceof Function?D(e.edges):D;if(!e.initialized&&!E.length)return;const B=Rs(E,e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);zs(e.connectionLookup,n.value,B),e.edges=B},x=D=>{const E=D instanceof Function?D([...e.nodes,...e.edges]):D;!e.initialized&&!E.length||(A(E.filter(to)),O(E.filter(zn)))},R=D=>{let E=D instanceof Function?D(e.nodes):D;E=Array.isArray(E)?E:[E];const B=Bf(E,c,e.hooks.error.trigger),z=[];for(const Y of B)z.push(Ef(Y));z.length&&e.hooks.nodesChange.trigger(z)},k=D=>{let E=D instanceof Function?D(e.edges):D;E=Array.isArray(E)?E:[E];const B=Rs(E,e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),z=[];for(const Y of B)z.push(Ef(Y));z.length&&e.hooks.edgesChange.trigger(z)},M=(D,E=!0,B=!1)=>{const z=D instanceof Function?D(e.nodes):D,Y=Array.isArray(z)?z:[z],ee=[],J=[];function se(fe){const ye=l(fe);for(const xe of ye)(!Re(xe.deletable)||xe.deletable)&&J.push(Sf(xe.id,xe.source,xe.target,xe.sourceHandle,xe.targetHandle))}function re(fe){const ye=[];for(const xe of e.nodes)xe.parentNode===fe&&ye.push(xe);if(ye.length){for(const xe of ye)ee.push(Cf(xe.id));E&&se(ye);for(const xe of ye)re(xe.id)}}for(const fe of Y){const ye=typeof fe=="string"?c(fe):fe;ye&&(Re(ye.deletable)&&!ye.deletable||(ee.push(Cf(ye.id)),E&&se([ye]),B&&re(ye.id)))}J.length&&e.hooks.edgesChange.trigger(J),ee.length&&e.hooks.nodesChange.trigger(ee)},S=D=>{const E=D instanceof Function?D(e.edges):D,B=Array.isArray(E)?E:[E],z=[];for(const Y of B){const ee=typeof Y=="string"?d(Y):Y;ee&&(Re(ee.deletable)&&!ee.deletable||z.push(Sf(typeof Y=="string"?Y:Y.id,ee.source,ee.target,ee.sourceHandle,ee.targetHandle)))}e.hooks.edgesChange.trigger(z)},L=(D,E,B=!0)=>{const z=d(D.id);if(!z)return!1;const Y=e.edges.indexOf(z),ee=yR(D,E,z,B,e.hooks.error.trigger);if(ee){const[J]=Rs([ee],e.isValidConnection,c,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((se,re)=>re===Y?J:se),zs(e.connectionLookup,n.value,[J]),J}return!1},F=(D,E,B={replace:!1})=>{const z=d(D);if(!z)return;const Y=typeof E=="function"?E(z):E;z.data=B.replace?Y:{...z.data,...Y}},j=D=>Nf(D,e.nodes),I=D=>{const E=Nf(D,e.edges);return zs(e.connectionLookup,n.value,E),E},G=(D,E,B={replace:!1})=>{const z=c(D);if(!z)return;const Y=typeof E=="function"?E(z):E;B.replace?e.nodes.splice(e.nodes.indexOf(z),1,Y):Object.assign(z,Y)},W=(D,E,B={replace:!1})=>{const z=c(D);if(!z)return;const Y=typeof E=="function"?E(z):E;z.data=B.replace?Y:{...z.data,...Y}},ue=(D,E,B=!1)=>{B?e.connectionClickStartHandle=D:e.connectionStartHandle=D,e.connectionEndHandle=null,e.connectionStatus=null,E&&(e.connectionPosition=E)},ie=(D,E=null,B=null)=>{e.connectionStartHandle&&(e.connectionPosition=D,e.connectionEndHandle=E,e.connectionStatus=B)},X=(D,E)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,E?e.connectionClickStartHandle=null:e.connectionStartHandle=null},K=D=>{const E=Uz(D),B=E?null:wr(D)?D:c(D.id);return!E&&!B?[null,null,E]:[E?D:xa(B),B,E]},Q=(D,E=!0,B=e.nodes)=>{const[z,Y,ee]=K(D);if(!z)return[];const J=[];for(const se of B||e.nodes){if(!ee&&(se.id===Y.id||!se.computedPosition))continue;const re=xa(se),fe=ka(re,z);(E&&fe>0||fe>=re.width*re.height||fe>=Number(z.width)*Number(z.height))&&J.push(se)}return J},ve=(D,E,B=!0)=>{const[z]=K(D);if(!z)return!1;const Y=ka(z,E);return B&&Y>0||Y>=Number(z.width)*Number(z.height)},_e=D=>{const{viewport:E,dimensions:B,d3Zoom:z,d3Selection:Y,translateExtent:ee}=e;if(!z||!Y||!D.x&&!D.y)return!1;const J=Fo.translate(E.x+D.x,E.y+D.y).scale(E.zoom),se=[[0,0],[B.width,B.height]],re=z.constrain()(J,se,ee),fe=e.viewport.x!==re.x||e.viewport.y!==re.y||e.viewport.zoom!==re.k;return z.transform(Y,re),fe},ge=D=>{const E=D instanceof Function?D(e):D,B=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Re(E.defaultEdgeOptions)&&(e.defaultEdgeOptions=E.defaultEdgeOptions);const z=E.modelValue||E.nodes||E.edges?[]:void 0;z&&(E.modelValue&&z.push(...E.modelValue),E.nodes&&z.push(...E.nodes),E.edges&&z.push(...E.edges),x(z));const Y=()=>{Re(E.maxZoom)&&N(E.maxZoom),Re(E.minZoom)&&v(E.minZoom),Re(E.translateExtent)&&T(E.translateExtent)};for(const ee of Object.keys(E)){const J=ee,se=E[J];![...BR,...B].includes(J)&&Re(se)&&(e[J]=se)}bl(()=>e.d3Zoom).not.toBeNull().then(Y),e.initialized||(e.initialized=!0)};return{updateNodePositions:f,updateNodeDimensions:h,setElements:x,setNodes:A,setEdges:O,addNodes:R,addEdges:k,removeNodes:M,removeEdges:S,findNode:c,findEdge:d,updateEdge:L,updateEdgeData:F,updateNode:G,updateNodeData:W,applyEdgeChanges:I,applyNodeChanges:j,addSelectedElements:b,addSelectedNodes:m,addSelectedEdges:g,setMinZoom:v,setMaxZoom:N,setTranslateExtent:T,setNodeExtent:V,setPaneClickDistance:$,removeSelectedElements:w,removeSelectedNodes:y,removeSelectedEdges:_,startConnection:ue,updateConnection:ie,endConnection:X,setInteractive:P,setState:ge,getIntersectingNodes:Q,getIncomers:a,getOutgoers:s,getConnectedEdges:l,getHandleConnections:u,isNodeIntersecting:ve,panBy:_e,fitView:D=>o.value.fitView(D),zoomIn:D=>o.value.zoomIn(D),zoomOut:D=>o.value.zoomOut(D),zoomTo:(D,E)=>o.value.zoomTo(D,E),setViewport:(D,E)=>o.value.setViewport(D,E),setTransform:(D,E)=>o.value.setTransform(D,E),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(D,E,B)=>o.value.setCenter(D,E,B),fitBounds:(D,E)=>o.value.fitBounds(D,E),project:D=>o.value.project(D),screenToFlowCoordinate:D=>o.value.screenToFlowCoordinate(D),flowToScreenCoordinate:D=>o.value.flowToScreenCoordinate(D),toObject:()=>{const D=[],E=[];for(const B of e.nodes){const{computedPosition:z,handleBounds:Y,selected:ee,dimensions:J,isParent:se,resizing:re,dragging:fe,events:ye,...xe}=B;D.push(xe)}for(const B of e.edges){const{selected:z,sourceNode:Y,targetNode:ee,events:J,...se}=B;E.push(se)}return JSON.parse(JSON.stringify({nodes:D,edges:E,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:D=>new Promise(E=>{const{nodes:B,edges:z,position:Y,zoom:ee,viewport:J}=D;B&&A(B),z&&O(z);const[se,re]=J?.x&&J?.y?[J.x,J.y]:Y??[null,null];if(se&&re){const fe=J?.zoom||ee||e.viewport.zoom;return bl(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:se,y:re,zoom:fe}).then(()=>{E(!0)})})}else E(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const D=Kv();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const E=Fo.translate(D.defaultViewport.x??0,D.defaultViewport.y??0).scale(ao(D.defaultViewport.zoom??1,D.minZoom,D.maxZoom)),B=e.viewportRef.getBoundingClientRect(),z=[[0,0],[B.width,B.height]],Y=e.d3Zoom.constrain()(E,z,D.translateExtent);e.d3Zoom.transform(e.d3Selection,Y)}ge(D)},$destroy:()=>{}}}const AR=["data-id","data-handleid","data-nodeid","data-handlepos"],YR={name:"Handle",compatConfig:{MODE:3}},so=r.defineComponent({...YR,props:{id:{default:null},type:{},position:{default:()=>le.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=r.createPropsRestProxy(e,["position","connectable","connectableStart","connectableEnd","id"]),o=r.toRef(()=>n.type??"source"),i=r.toRef(()=>n.isValidConnection??null),{id:a,connectionStartHandle:s,connectionClickStartHandle:l,connectionEndHandle:u,vueFlowRef:c,nodesConnectable:d,noDragClassName:f,noPanClassName:h}=Ae(),{id:p,node:m,nodeEl:g,connectedEdges:b}=qv(),y=r.ref(),_=r.toRef(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),w=r.toRef(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),v=r.toRef(()=>{var O,x,R,k,M,S;return((O=s.value)==null?void 0:O.nodeId)===p&&((x=s.value)==null?void 0:x.id)===e.id&&((R=s.value)==null?void 0:R.type)===o.value||((k=u.value)==null?void 0:k.nodeId)===p&&((M=u.value)==null?void 0:M.id)===e.id&&((S=u.value)==null?void 0:S.type)===o.value}),N=r.toRef(()=>{var O,x,R;return((O=l.value)==null?void 0:O.nodeId)===p&&((x=l.value)==null?void 0:x.id)===e.id&&((R=l.value)==null?void 0:R.type)===o.value}),{handlePointerDown:T,handleClick:V}=Zv({nodeId:p,handleId:e.id,isValidConnection:i,type:o}),$=r.computed(()=>typeof e.connectable=="string"&&e.connectable==="single"?!b.value.some(O=>{const x=O[`${o.value}Handle`];return O[o.value]!==p?!1:x?x===e.id:!0}):typeof e.connectable=="number"?b.value.filter(O=>{const x=O[`${o.value}Handle`];return O[o.value]!==p?!1:x?x===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(m,b.value):Re(e.connectable)?e.connectable:d.value);r.onMounted(()=>{var O;if(!m.dimensions.width||!m.dimensions.height)return;const x=(O=m.handleBounds[o.value])==null?void 0:O.find(j=>j.id===e.id);if(!c.value||x)return;const R=c.value.querySelector(".vue-flow__transformationpane");if(!g.value||!y.value||!R||!e.id)return;const k=g.value.getBoundingClientRect(),M=y.value.getBoundingClientRect(),S=window.getComputedStyle(R),{m22:L}=new window.DOMMatrixReadOnly(S.transform),F={id:e.id,position:e.position,x:(M.left-k.left)/L,y:(M.top-k.top)/L,type:o.value,nodeId:p,...os(y.value)};m.handleBounds[o.value]=[...m.handleBounds[o.value]??[],F]});function P(O){const x=Zu(O);$.value&&_.value&&(x&&O.button===0||!x)&&T(O)}function A(O){!p||!l.value&&!_.value||$.value&&V(O)}return t({handleClick:V,handlePointerDown:T,onClick:A,onPointerDown:P}),(O,x)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"handle",ref:y,"data-id":`${r.unref(a)}-${r.unref(p)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":r.unref(p),"data-handlepos":O.position,class:r.normalizeClass(["vue-flow__handle",[`vue-flow__handle-${O.position}`,`vue-flow__handle-${e.id}`,r.unref(f),r.unref(h),o.value,{connectable:$.value,connecting:N.value,connectablestart:_.value,connectableend:w.value,connectionindicator:$.value&&(_.value&&!v.value||w.value&&v.value)}]]),onMousedown:P,onTouchstartPassive:P,onClick:A},[r.renderSlot(O.$slots,"default",{id:O.id})],42,AR))}}),as=function({sourcePosition:e=le.Bottom,targetPosition:t=le.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:a,data:s}){const l=s.label??n;return[r.h(so,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof l!="string"&&l?r.h(l):r.h(r.Fragment,[l]),r.h(so,{type:"source",position:e,connectable:o,isValidConnection:a})]};as.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];as.inheritAttrs=!1;as.compatConfig={MODE:3};const IR=as,ss=function({targetPosition:e=le.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:i}){const a=i.label??t;return[r.h(so,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof a!="string"&&a?r.h(a):r.h(r.Fragment,[a])]};ss.props=["targetPosition","label","isValidTargetPos","connectable","data"];ss.inheritAttrs=!1;ss.compatConfig={MODE:3};const zR=ss,ls=function({sourcePosition:e=le.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:i}){const a=i.label??t;return[typeof a!="string"&&a?r.h(a):r.h(r.Fragment,[a]),r.h(so,{type:"source",position:e,connectable:n,isValidConnection:o})]};ls.props=["sourcePosition","label","isValidSourcePos","connectable","data"];ls.inheritAttrs=!1;ls.compatConfig={MODE:3};const RR=ls,LR=["transform"],FR=["width","height","x","y","rx","ry"],HR=["y"],jR={name:"EdgeText",compatConfig:{MODE:3}},WR=r.defineComponent({...jR,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=r.ref({x:0,y:0,width:0,height:0}),n=r.ref(null),o=r.computed(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);r.onMounted(i),r.watch([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const a=n.value.getBBox();(a.width!==t.value.width||a.height!==t.value.height)&&(t.value=a)}return(a,s)=>(r.openBlock(),r.createElementBlock("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?(r.openBlock(),r.createElementBlock("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*a.labelBgPadding[0]}px`,height:`${t.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:r.normalizeStyle(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,FR)):r.createCommentVNode("",!0),r.createElementVNode("text",r.mergeProps(a.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:a.labelStyle}),[r.renderSlot(a.$slots,"default",{},()=>[typeof a.label!="string"?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(a.label),{key:0})):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(a.label),1)],64))])],16,HR)],8,LR))}}),UR=["id","d","marker-end","marker-start"],GR=["d","stroke-width"],ZR={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},us=r.defineComponent({...ZR,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=r.ref(null),o=r.ref(null),i=r.ref(null),a=r.useAttrs();return t({pathEl:n,interactionEl:o,labelEl:i}),(s,l)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("path",r.mergeProps(r.unref(a),{id:s.id,ref_key:"pathEl",ref:n,d:s.path,class:"vue-flow__edge-path","marker-end":s.markerEnd,"marker-start":s.markerStart}),null,16,UR),s.interactionWidth?(r.openBlock(),r.createElementBlock("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,GR)):r.createCommentVNode("",!0),s.label&&s.labelX&&s.labelY?(r.openBlock(),r.createBlock(WR,{key:1,ref_key:"labelEl",ref:i,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):r.createCommentVNode("",!0)],64))}});function Jv({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,s=Math.abs(o-t)/2,l=o<t?o+s:o-s;return[a,l,i,s]}function Qv({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:s,targetControlY:l}){const u=e*.125+i*.375+s*.375+n*.125,c=t*.125+a*.375+l*.375+o*.125,d=Math.abs(u-e),f=Math.abs(c-t);return[u,c,d,f]}function Mi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function If({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){let s,l;switch(e){case le.Left:s=t-Mi(t-o,a),l=n;break;case le.Right:s=t+Mi(o-t,a),l=n;break;case le.Top:s=t,l=n-Mi(n-i,a);break;case le.Bottom:s=t,l=n+Mi(i-n,a);break}return[s,l]}function eg(e){const{sourceX:t,sourceY:n,sourcePosition:o=le.Bottom,targetX:i,targetY:a,targetPosition:s=le.Top,curvature:l=.25}=e,[u,c]=If({pos:o,x1:t,y1:n,x2:i,y2:a,c:l}),[d,f]=If({pos:s,x1:i,y1:a,x2:t,y2:n,c:l}),[h,p,m,g]=Qv({sourceX:t,sourceY:n,targetX:i,targetY:a,sourceControlX:u,sourceControlY:c,targetControlX:d,targetControlY:f});return[`M${t},${n} C${u},${c} ${d},${f} ${i},${a}`,h,p,m,g]}function zf({pos:e,x1:t,y1:n,x2:o,y2:i}){let a,s;switch(e){case le.Left:case le.Right:a=.5*(t+o),s=n;break;case le.Top:case le.Bottom:a=t,s=.5*(n+i);break}return[a,s]}function tg(e){const{sourceX:t,sourceY:n,sourcePosition:o=le.Bottom,targetX:i,targetY:a,targetPosition:s=le.Top}=e,[l,u]=zf({pos:o,x1:t,y1:n,x2:i,y2:a}),[c,d]=zf({pos:s,x1:i,y1:a,x2:t,y2:n}),[f,h,p,m]=Qv({sourceX:t,sourceY:n,targetX:i,targetY:a,sourceControlX:l,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${l},${u} ${c},${d} ${i},${a}`,f,h,p,m]}const Rf={[le.Left]:{x:-1,y:0},[le.Right]:{x:1,y:0},[le.Top]:{x:0,y:-1},[le.Bottom]:{x:0,y:1}};function qR({source:e,sourcePosition:t=le.Bottom,target:n}){return t===le.Left||t===le.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function Lf(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function XR({source:e,sourcePosition:t=le.Bottom,target:n,targetPosition:o=le.Top,center:i,offset:a}){const s=Rf[t],l=Rf[o],u={x:e.x+s.x*a,y:e.y+s.y*a},c={x:n.x+l.x*a,y:n.y+l.y*a},d=qR({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f];let p,m,g;const b={x:0,y:0},y={x:0,y:0},[_,w,v,N]=Jv({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*l[f]===-1){m=i.x??_,g=i.y??w;const V=[{x:m,y:u.y},{x:m,y:c.y}],$=[{x:u.x,y:g},{x:c.x,y:g}];s[f]===h?p=f==="x"?V:$:p=f==="x"?$:V}else{const V=[{x:u.x,y:c.y}],$=[{x:c.x,y:u.y}];if(f==="x"?p=s.x===h?$:V:p=s.y===h?V:$,t===o){const R=Math.abs(e[f]-n[f]);if(R<=a){const k=Math.min(a-1,a-R);s[f]===h?b[f]=(u[f]>e[f]?-1:1)*k:y[f]=(c[f]>n[f]?-1:1)*k}}if(t!==o){const R=f==="x"?"y":"x",k=s[f]===l[R],M=u[R]>c[R],S=u[R]<c[R];(s[f]===1&&(!k&&M||k&&S)||s[f]!==1&&(!k&&S||k&&M))&&(p=f==="x"?V:$)}const P={x:u.x+b.x,y:u.y+b.y},A={x:c.x+y.x,y:c.y+y.y},O=Math.max(Math.abs(P.x-p[0].x),Math.abs(A.x-p[0].x)),x=Math.max(Math.abs(P.y-p[0].y),Math.abs(A.y-p[0].y));O>=x?(m=(P.x+A.x)/2,g=p[0].y):(m=p[0].x,g=(P.y+A.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...p,{x:c.x+y.x,y:c.y+y.y},n],m,g,v,N]}function KR(e,t,n,o){const i=Math.min(Lf(e,t)/2,Lf(t,n)/2,o),{x:a,y:s}=t;if(e.x===a&&a===n.x||e.y===s&&s===n.y)return`L${a} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*c},${s}Q ${a},${s} ${a},${s+i*d}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${s+i*u}Q ${a},${s} ${a+i*l},${s}`}function Ol(e){const{sourceX:t,sourceY:n,sourcePosition:o=le.Bottom,targetX:i,targetY:a,targetPosition:s=le.Top,borderRadius:l=5,centerX:u,centerY:c,offset:d=20}=e,[f,h,p,m,g]=XR({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:a},targetPosition:s,center:{x:u,y:c},offset:d});return[f.reduce((y,_,w)=>{let v;return w>0&&w<f.length-1?v=KR(f[w-1],_,f[w+1],l):v=`${w===0?"M":"L"}${_.x} ${_.y}`,y+=v,y},""),h,p,m,g]}function JR(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[a,s,l,u]=Jv({sourceX:t,sourceY:n,targetX:o,targetY:i});return[`M ${t},${n}L ${o},${i}`,a,s,l,u]}const QR=r.defineComponent({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=JR(e);return r.h(us,{path:n,labelX:o,labelY:i,...t,...e})}}}),eL=QR,tL=r.defineComponent({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Ol({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return r.h(us,{path:n,labelX:o,labelY:i,...t,...e})}}}),ng=tL,nL=r.defineComponent({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>r.h(ng,{...e,...t,borderRadius:0})}}),oL=nL,rL=r.defineComponent({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=eg({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return r.h(us,{path:n,labelX:o,labelY:i,...t,...e})}}}),iL=rL,aL=r.defineComponent({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=tg({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return r.h(us,{path:n,labelX:o,labelY:i,...t,...e})}}}),sL=aL,lL={input:RR,default:IR,output:zR},uL={default:iL,straight:eL,step:oL,smoothstep:ng,simplebezier:sL};function cL(e,t,n){const o=r.computed(()=>g=>t.value.get(g)),i=r.computed(()=>g=>n.value.get(g)),a=r.computed(()=>{const g={...uL,...e.edgeTypes},b=Object.keys(g);for(const y of e.edges)y.type&&!b.includes(y.type)&&(g[y.type]=y.type);return g}),s=r.computed(()=>{const g={...lL,...e.nodeTypes},b=Object.keys(g);for(const y of e.nodes)y.type&&!b.includes(y.type)&&(g[y.type]=y.type);return g}),l=r.computed(()=>e.onlyRenderVisibleElements?Yv(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),u=r.computed(()=>{if(e.onlyRenderVisibleElements){const g=[];for(const b of e.edges){const y=t.value.get(b.source),_=t.value.get(b.target);aR({sourcePos:y.computedPosition||{x:0,y:0},targetPos:_.computedPosition||{x:0,y:0},sourceWidth:y.dimensions.width,sourceHeight:y.dimensions.height,targetWidth:_.dimensions.width,targetHeight:_.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&g.push(b)}return g}return e.edges}),c=r.computed(()=>[...l.value,...u.value]),d=r.computed(()=>{const g=[];for(const b of e.nodes)b.selected&&g.push(b);return g}),f=r.computed(()=>{const g=[];for(const b of e.edges)b.selected&&g.push(b);return g}),h=r.computed(()=>[...d.value,...f.value]),p=r.computed(()=>{const g=[];for(const b of e.nodes)b.dimensions.width&&b.dimensions.height&&b.handleBounds!==void 0&&g.push(b);return g}),m=r.computed(()=>l.value.length>0&&p.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:c,getEdgeTypes:a,getNodeTypes:s,getEdges:u,getNodes:l,getSelectedElements:h,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:p,areNodesInitialized:m}}class Gn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=r.getCurrentInstance())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??Gn.instance;return Gn.instance=o??new Gn,n&&(n.config.globalProperties.$vueFlowStorage=Gn.instance),Gn.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Kv(),i=r.reactive(o),a={};for(const[h,p]of Object.entries(i.hooks)){const m=`on${h.charAt(0).toUpperCase()+h.slice(1)}`;a[m]=p.on}const s={};for(const[h,p]of Object.entries(i.hooks))s[h]=p.trigger;const l=r.computed(()=>{const h=new Map;for(const p of i.nodes)h.set(p.id,p);return h}),u=r.computed(()=>{const h=new Map;for(const p of i.edges)h.set(p.id,p);return h}),c=cL(i,l,u),d=PR(i,l,u);d.setState({...i,...n});const f={...a,...c,...d,...tY(i),nodeLookup:l,edgeLookup:u,emits:s,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}};return this.set(t,f),f}getId(){return`vue-flow-${this.currentId++}`}}function Ae(e){const t=Gn.getInstance(),n=r.getCurrentScope(),o=typeof e=="object",i=o?e:{id:e},a=i.id,s=a??n?.vueFlowId;let l;if(n){const u=r.inject(Yf,null);typeof u<"u"&&u!==null&&(!s||u.id===s)&&(l=u)}if(l||s&&(l=t.get(s)),!l||s&&l.id!==s){const u=a??t.getId(),c=t.create(u,i);l=c,(n??r.effectScope(!0)).run(()=>{r.watch(c.applyDefault,(f,h,p)=>{const m=b=>{c.applyNodeChanges(b)},g=b=>{c.applyEdgeChanges(b)};f?(c.onNodesChange(m),c.onEdgesChange(g)):(c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(g)),p(()=>{c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(g)})},{immediate:!0}),jr(()=>{if(l){const f=t.get(l.id);f?f.$destroy():li(`No store instance found for id ${l.id} in storage.`)}})})}else o&&l.setState(i);if(n&&(r.provide(Yf,l),n.vueFlowId=l.id),o){const u=r.getCurrentInstance();u?.type.name!=="VueFlow"&&l.emits.error(new He(Le.USEVUEFLOW_OPTIONS))}return l}function dL(e){const{emits:t,dimensions:n}=Ae();let o;r.onMounted(()=>{const i=()=>{var a,s;if(!e.value||!(((s=(a=e.value).checkVisibility)==null?void 0:s.call(a))??!0))return;const l=os(e.value);(l.width===0||l.height===0)&&t.error(new He(Le.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:l.width||500,height:l.height||500}};i(),window.addEventListener("resize",i),e.value&&(o=new ResizeObserver(()=>i()),o.observe(e.value)),r.onBeforeUnmount(()=>{window.removeEventListener("resize",i),o&&e.value&&o.unobserve(e.value)})})}const fL={name:"UserSelection",compatConfig:{MODE:3}},hL=r.defineComponent({...fL,props:{userSelectionRect:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"vue-flow__selection vue-flow__container",style:r.normalizeStyle({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),pL=["tabIndex"],mL={name:"NodesSelection",compatConfig:{MODE:3}},vL=r.defineComponent({...mL,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:a,userSelectionActive:s}=Ae(),l=Xv(),u=r.ref(null),c=Gv({el:u,onStart(m){t.selectionDragStart(m),t.nodeDragStart(m)},onDrag(m){t.selectionDrag(m),t.nodeDrag(m)},onStop(m){t.selectionDragStop(m),t.nodeDragStop(m)}});r.onMounted(()=>{var m;a.value||(m=u.value)==null||m.focus({preventScroll:!0})});const d=r.computed(()=>Av(o.value)),f=r.computed(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function h(m){t.selectionContextMenu({event:m,nodes:o.value})}function p(m){a.value||$o[m.key]&&(m.preventDefault(),l({x:$o[m.key].x,y:$o[m.key].y},m.shiftKey))}return(m,g)=>!r.unref(s)&&d.value.width&&d.value.height?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["vue-flow__nodesselection vue-flow__container",r.unref(i)]),style:r.normalizeStyle({transform:`translate(${r.unref(n).x}px,${r.unref(n).y}px) scale(${r.unref(n).zoom})`})},[r.createElementVNode("div",{ref_key:"el",ref:u,class:r.normalizeClass([{dragging:r.unref(c)},"vue-flow__nodesselection-rect"]),style:r.normalizeStyle(f.value),tabIndex:r.unref(a)?void 0:-1,onContextmenu:h,onKeydown:p},null,46,pL)],6)):r.createCommentVNode("",!0)}});function gL(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const yL={name:"Pane",compatConfig:{MODE:3}},wL=r.defineComponent({...yL,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:a,removeSelectedElements:s,userSelectionRect:l,elementsSelectable:u,nodesSelectionActive:c,getSelectedEdges:d,getSelectedNodes:f,removeNodes:h,removeEdges:p,selectionMode:m,deleteKeyCode:g,multiSelectionKeyCode:b,multiSelectionActive:y,edgeLookup:_,nodeLookup:w,connectionLookup:v,defaultEdgeOptions:N,connectionStartHandle:T,panOnDrag:V}=Ae(),$=r.shallowRef(null),P=r.shallowRef(new Set),A=r.shallowRef(new Set),O=r.shallowRef(null),x=r.toRef(()=>u.value&&(e.isSelecting||a.value)),R=r.toRef(()=>T.value!==null);let k=!1,M=!1;const S=Tr(g,{actInsideInputWithModifier:!1}),L=Tr(b);r.watch(S,X=>{X&&(h(f.value),p(d.value),c.value=!1)}),r.watch(L,X=>{y.value=X});function F(X,K){return Q=>{Q.target===K&&X?.(Q)}}function j(X){if(k||R.value){k=!1;return}i.paneClick(X),s(),c.value=!1}function I(X){var K;if(Array.isArray(V.value)&&((K=V.value)!=null&&K.includes(2))){X.preventDefault();return}i.paneContextMenu(X)}function G(X){i.paneScroll(X)}function W(X){var K,Q,ve;if(O.value=((K=t.value)==null?void 0:K.getBoundingClientRect())??null,!u.value||!e.isSelecting||X.button!==0||X.target!==$.value||!O.value)return;(ve=(Q=X.target)==null?void 0:Q.setPointerCapture)==null||ve.call(Q,X.pointerId);const{x:_e,y:ge}=gL(X,O.value);M=!0,k=!1,s(),l.value={width:0,height:0,startX:_e,startY:ge,x:_e,y:ge},i.selectionStart(X)}function ue(X){var K;if(!O.value||!l.value)return;k=!0;const{x:Q,y:ve}=Pt(X,O.value),{startX:_e=0,startY:ge=0}=l.value,we={startX:_e,startY:ge,x:Q<_e?Q:_e,y:ve<ge?ve:ge,width:Math.abs(Q-_e),height:Math.abs(ve-ge)},ce=P.value,de=A.value;P.value=new Set(Yv(n.value,we,o.value,m.value===Uu.Partial,!0).map(E=>E.id)),A.value=new Set;const D=((K=N.value)==null?void 0:K.selectable)??!0;for(const E of P.value){const B=v.value.get(E);if(B)for(const{edgeId:z}of B.values()){const Y=_.value.get(z);Y&&(Y.selectable??D)&&A.value.add(z)}}if(!Af(ce,P.value)){const E=Cn(w.value,P.value,!0);i.nodesChange(E)}if(!Af(de,A.value)){const E=Cn(_.value,A.value);i.edgesChange(E)}l.value=we,a.value=!0,c.value=!1}function ie(X){var K;X.button!==0||!M||((K=X.target)==null||K.releasePointerCapture(X.pointerId),!a.value&&l.value&&X.target===$.value&&j(X),a.value=!1,l.value=null,c.value=P.value.size>0,i.selectionEnd(X),e.selectionKeyPressed&&(k=!1),M=!1)}return(X,K)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:$,class:r.normalizeClass(["vue-flow__pane vue-flow__container",{selection:X.isSelecting}]),onClick:K[0]||(K[0]=Q=>x.value?void 0:F(j,$.value)(Q)),onContextmenu:K[1]||(K[1]=Q=>F(I,$.value)(Q)),onWheelPassive:K[2]||(K[2]=Q=>F(G,$.value)(Q)),onPointerenter:K[3]||(K[3]=Q=>x.value?void 0:r.unref(i).paneMouseEnter(Q)),onPointerdown:K[4]||(K[4]=Q=>x.value?W(Q):r.unref(i).paneMouseMove(Q)),onPointermove:K[5]||(K[5]=Q=>x.value?ue(Q):r.unref(i).paneMouseMove(Q)),onPointerup:K[6]||(K[6]=Q=>x.value?ie(Q):void 0),onPointerleave:K[7]||(K[7]=Q=>r.unref(i).paneMouseLeave(Q))},[r.renderSlot(X.$slots,"default"),r.unref(a)&&r.unref(l)?(r.openBlock(),r.createBlock(hL,{key:0,"user-selection-rect":r.unref(l)},null,8,["user-selection-rect"])):r.createCommentVNode("",!0),r.unref(c)&&r.unref(f).length?(r.openBlock(),r.createBlock(vL,{key:1})):r.createCommentVNode("",!0)],34))}}),bL={name:"Transform",compatConfig:{MODE:3}},_L=r.defineComponent({...bL,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Ae(),i=r.computed(()=>n.value?!o.value:!1),a=r.computed(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:"vue-flow__transformationpane vue-flow__container",style:r.normalizeStyle({transform:a.value,opacity:i.value?0:void 0})},[r.renderSlot(s.$slots,"default")],4))}}),xL={name:"Viewport",compatConfig:{MODE:3}},kL=r.defineComponent({...xL,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:a,selectionKeyCode:s,panActivationKeyCode:l,panOnScroll:u,panOnScrollMode:c,panOnScrollSpeed:d,panOnDrag:f,zoomOnDoubleClick:h,zoomOnPinch:p,zoomOnScroll:m,preventScrolling:g,noWheelClassName:b,noPanClassName:y,emits:_,connectionStartHandle:w,userSelectionActive:v,paneDragging:N,d3Zoom:T,d3Selection:V,d3ZoomHandler:$,viewport:P,viewportRef:A,paneClickDistance:O}=Ae();dL(A);const x=r.shallowRef(!1),R=r.shallowRef(!1);let k=null,M=!1,S=0,L={x:0,y:0,zoom:0};const F=Tr(l),j=Tr(s),I=Tr(a),G=r.toRef(()=>(!j.value||j.value&&s.value===!0)&&(F.value||f.value)),W=r.toRef(()=>F.value||u.value),ue=r.toRef(()=>s.value===!0&&G.value!==!0),ie=r.toRef(()=>j.value&&s.value!==!0||v.value||ue.value),X=r.toRef(()=>w.value!==null);r.onMounted(()=>{if(!A.value){li("Viewport element is missing");return}const ge=A.value,we=ge.getBoundingClientRect(),ce=zz().clickDistance(O.value).scaleExtent([t.value,n.value]).translateExtent(i.value),de=bt(ge).call(ce),D=de.on("wheel.zoom"),E=Fo.translate(o.value.x??0,o.value.y??0).scale(ao(o.value.zoom??1,t.value,n.value)),B=[[0,0],[we.width,we.height]],z=ce.constrain()(E,B,i.value);ce.transform(de,z),ce.wheelDelta(xf),T.value=ce,V.value=de,$.value=D,P.value={x:z.x,y:z.y,zoom:z.k},ce.on("start",Y=>{var ee;if(!Y.sourceEvent)return null;S=Y.sourceEvent.button,x.value=!0;const J=ve(Y.transform);((ee=Y.sourceEvent)==null?void 0:ee.type)==="mousedown"&&(N.value=!0),L=J,_.viewportChangeStart(J),_.moveStart({event:Y,flowTransform:J})}),ce.on("end",Y=>{if(!Y.sourceEvent)return null;if(x.value=!1,N.value=!1,K(G.value,S??0)&&!M&&_.paneContextMenu(Y.sourceEvent),M=!1,Q(L,Y.transform)){const ee=ve(Y.transform);L=ee,_.viewportChangeEnd(ee),_.moveEnd({event:Y,flowTransform:ee})}}),ce.filter(Y=>{var ee;const J=I.value||m.value,se=p.value&&Y.ctrlKey,re=Y.button,fe=Y.type==="wheel";if(re===1&&Y.type==="mousedown"&&(_e(Y,"vue-flow__node")||_e(Y,"vue-flow__edge")))return!0;if(!G.value&&!J&&!W.value&&!h.value&&!p.value||v.value||X.value&&!fe||!h.value&&Y.type==="dblclick"||_e(Y,b.value)&&fe||_e(Y,y.value)&&(!fe||W.value&&fe&&!I.value)||!p.value&&Y.ctrlKey&&fe||!J&&!W.value&&!se&&fe)return!1;if(!p&&Y.type==="touchstart"&&((ee=Y.touches)==null?void 0:ee.length)>1)return Y.preventDefault(),!1;if(!G.value&&(Y.type==="mousedown"||Y.type==="touchstart")||ue.value&&Array.isArray(f.value)&&f.value.includes(0)&&re===0||Array.isArray(f.value)&&!f.value.includes(re)&&(Y.type==="mousedown"||Y.type==="touchstart"))return!1;const ye=Array.isArray(f.value)&&f.value.includes(re)||s.value===!0&&Array.isArray(f.value)&&!f.value.includes(0)||!re||re<=1;return(!Y.ctrlKey||F.value||fe)&&ye}),r.watch([v,G],()=>{v.value&&!x.value?ce.on("zoom",null):v.value||ce.on("zoom",Y=>{P.value={x:Y.transform.x,y:Y.transform.y,zoom:Y.transform.k};const ee=ve(Y.transform);M=K(G.value,S??0),_.viewportChange(ee),_.move({event:Y,flowTransform:ee})})},{immediate:!0}),r.watch([v,W,c,I,p,g,b],()=>{W.value&&!I.value&&!v.value?de.on("wheel.zoom",Y=>{if(_e(Y,b.value))return!1;const ee=I.value||m.value,J=p.value&&Y.ctrlKey;if(!(!g.value||W.value||ee||J))return!1;Y.preventDefault(),Y.stopImmediatePropagation();const re=de.property("__zoom").k||1,fe=Na();if(!F.value&&Y.ctrlKey&&p.value&&fe){const bn=Ot(Y),ir=xf(Y),Ln=re*2**ir;ce.scaleTo(de,Ln,bn,Y);return}const ye=Y.deltaMode===1?20:1;let xe=c.value===Mr.Vertical?0:Y.deltaX*ye,Ue=c.value===Mr.Horizontal?0:Y.deltaY*ye;!fe&&Y.shiftKey&&c.value!==Mr.Vertical&&!xe&&Ue&&(xe=Ue,Ue=0),ce.translateBy(de,-(xe/re)*d.value,-(Ue/re)*d.value);const je=ve(de.property("__zoom"));k&&clearTimeout(k),R.value?(_.move({event:Y,flowTransform:je}),_.viewportChange(je),k=setTimeout(()=>{_.moveEnd({event:Y,flowTransform:je}),_.viewportChangeEnd(je),R.value=!1},150)):(R.value=!0,_.moveStart({event:Y,flowTransform:je}),_.viewportChangeStart(je))},{passive:!1}):typeof D<"u"&&de.on("wheel.zoom",function(Y,ee){const J=!g.value&&Y.type==="wheel"&&!Y.ctrlKey,se=I.value||m.value,re=p.value&&Y.ctrlKey;if(!se&&!u.value&&!re&&Y.type==="wheel"||J||_e(Y,b.value))return null;Y.preventDefault(),D.call(this,Y,ee)},{passive:!1})},{immediate:!0})});function K(ge,we){return we===2&&Array.isArray(ge)&&ge.includes(2)}function Q(ge,we){return ge.x!==we.x&&!Number.isNaN(we.x)||ge.y!==we.y&&!Number.isNaN(we.y)||ge.zoom!==we.k&&!Number.isNaN(we.k)}function ve(ge){return{x:ge.x,y:ge.y,zoom:ge.k}}function _e(ge,we){return ge.target.closest(`.${we}`)}return(ge,we)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"viewportRef",ref:A,class:"vue-flow__viewport vue-flow__container"},[r.createVNode(wL,{"is-selecting":ie.value,"selection-key-pressed":r.unref(j),class:r.normalizeClass({connecting:X.value,dragging:r.unref(N),draggable:r.unref(f)===!0||Array.isArray(r.unref(f))&&r.unref(f).includes(0)})},{default:r.withCtx(()=>[r.createVNode(_L,null,{default:r.withCtx(()=>[r.renderSlot(ge.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),NL=["id"],EL=["id"],CL=["id"],SL={name:"A11yDescriptions",compatConfig:{MODE:3}},DL=r.defineComponent({...SL,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Ae();return(i,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{id:`${r.unref(Dv)}-${r.unref(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+r.toDisplayString(r.unref(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,NL),r.createElementVNode("div",{id:`${r.unref(Mv)}-${r.unref(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,EL),r.unref(n)?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,id:`${r.unref(Wz)}-${r.unref(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},r.toDisplayString(r.unref(o)),9,CL))],64))}});function ML(){const e=Ae();r.watch(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function TL(e,t,n){return n===le.Left?e-t:n===le.Right?e+t:e}function VL(e,t,n){return n===le.Top?e-t:n===le.Bottom?e+t:e}const qu=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=le.Top,type:i}){return r.h("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:TL(t,e,o),cy:VL(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};qu.props=["radius","centerX","centerY","position","type"];qu.compatConfig={MODE:3};const Ff=qu,OL=r.defineComponent({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:a,nodesSelectionActive:s,noPanClassName:l,getEdgeTypes:u,removeSelectedEdges:c,findEdge:d,findNode:f,isValidConnection:h,multiSelectionActive:p,disableKeyboardA11y:m,elementsSelectable:g,edgesUpdatable:b,edgesFocusable:y,hooks:_}=Ae(),w=r.computed(()=>d(e.id)),{emit:v,on:N}=xR(w.value,a),T=r.inject(is),V=r.getCurrentInstance(),$=r.ref(!1),P=r.ref(!1),A=r.ref(""),O=r.ref(null),x=r.ref("source"),R=r.ref(null),k=r.toRef(()=>typeof w.value.selectable>"u"?g.value:w.value.selectable),M=r.toRef(()=>typeof w.value.updatable>"u"?b.value:w.value.updatable),S=r.toRef(()=>typeof w.value.focusable>"u"?y.value:w.value.focusable);r.provide(wR,e.id),r.provide(bR,R);const L=r.computed(()=>w.value.class instanceof Function?w.value.class(w.value):w.value.class),F=r.computed(()=>w.value.style instanceof Function?w.value.style(w.value):w.value.style),j=r.computed(()=>{const E=w.value.type||"default",B=T?.[`edge-${E}`];if(B)return B;let z=w.value.template??u.value[E];if(typeof z=="string"&&V){const Y=Object.keys(V.appContext.components);Y&&Y.includes(E)&&(z=r.resolveComponent(E,!1))}return z&&typeof z!="string"?z:(a.error(new He(Le.EDGE_TYPE_MISSING,z)),!1)}),{handlePointerDown:I}=Zv({nodeId:A,handleId:O,type:x,isValidConnection:h,edgeUpdaterType:x,onEdgeUpdate:ue,onEdgeUpdateEnd:ie});return()=>{const E=f(w.value.source),B=f(w.value.target),z="pathOptions"in w.value?w.value.pathOptions:{};if(!E&&!B)return a.error(new He(Le.EDGE_SOURCE_TARGET_MISSING,w.value.id,w.value.source,w.value.target)),null;if(!E)return a.error(new He(Le.EDGE_SOURCE_MISSING,w.value.id,w.value.source)),null;if(!B)return a.error(new He(Le.EDGE_TARGET_MISSING,w.value.id,w.value.target)),null;if(!w.value||w.value.hidden||E.hidden||B.hidden)return null;let Y;o.value===In.Strict?Y=E.handleBounds.source:Y=[...E.handleBounds.source||[],...E.handleBounds.target||[]];const ee=Tf(Y,w.value.sourceHandle);let J;o.value===In.Strict?J=B.handleBounds.target:J=[...B.handleBounds.target||[],...B.handleBounds.source||[]];const se=Tf(J,w.value.targetHandle),re=ee?.position||le.Bottom,fe=se?.position||le.Top,{x:ye,y:xe}=Ho(E,ee,re),{x:Ue,y:je}=Ho(B,se,fe);return w.value.sourceX=ye,w.value.sourceY=xe,w.value.targetX=Ue,w.value.targetY=je,r.h("g",{ref:R,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${j.value===!1?"default":w.value.type||"default"}`,l.value,L.value,{updating:$.value,selected:w.value.selected,animated:w.value.animated,inactive:!k.value&&!_.value.edgeClick.hasListeners()}],tabIndex:S.value?0:void 0,"aria-label":w.value.ariaLabel===null?void 0:w.value.ariaLabel??`Edge from ${w.value.source} to ${w.value.target}`,"aria-describedby":S.value?`${Mv}-${t}`:void 0,"aria-roledescription":"edge",role:S.value?"group":"img",...w.value.domAttributes,onClick:K,onContextmenu:Q,onDblclick:ve,onMouseenter:_e,onMousemove:ge,onMouseleave:we,onKeyDown:S.value?D:void 0},[P.value?null:r.h(j.value===!1?u.value.default:j.value,{id:e.id,sourceNode:E,targetNode:B,source:w.value.source,target:w.value.target,type:w.value.type,updatable:M.value,selected:w.value.selected,animated:w.value.animated,label:w.value.label,labelStyle:w.value.labelStyle,labelShowBg:w.value.labelShowBg,labelBgStyle:w.value.labelBgStyle,labelBgPadding:w.value.labelBgPadding,labelBgBorderRadius:w.value.labelBgBorderRadius,data:w.value.data,events:{...w.value.events,...N},style:F.value,markerStart:`url('#${Kr(w.value.markerStart,t)}')`,markerEnd:`url('#${Kr(w.value.markerEnd,t)}')`,sourcePosition:re,targetPosition:fe,sourceX:ye,sourceY:xe,targetX:Ue,targetY:je,sourceHandleId:w.value.sourceHandle,targetHandleId:w.value.targetHandle,interactionWidth:w.value.interactionWidth,...z}),[M.value==="source"||M.value===!0?[r.h("g",{onMousedown:ce,onMouseenter:G,onMouseout:W},r.h(Ff,{position:re,centerX:ye,centerY:xe,radius:i.value,type:"source","data-type":"source"}))]:null,M.value==="target"||M.value===!0?[r.h("g",{onMousedown:de,onMouseenter:G,onMouseout:W},r.h(Ff,{position:fe,centerX:Ue,centerY:je,radius:i.value,type:"target","data-type":"target"}))]:null]])};function G(){$.value=!0}function W(){$.value=!1}function ue(E,B){v.update({event:E,edge:w.value,connection:B})}function ie(E){v.updateEnd({event:E,edge:w.value}),P.value=!1}function X(E,B){E.button===0&&(P.value=!0,A.value=B?w.value.target:w.value.source,O.value=(B?w.value.targetHandle:w.value.sourceHandle)??null,x.value=B?"target":"source",v.updateStart({event:E,edge:w.value}),I(E))}function K(E){var B;const z={event:E,edge:w.value};k.value&&(s.value=!1,w.value.selected&&p.value?(c([w.value]),(B=R.value)==null||B.blur()):n([w.value])),v.click(z)}function Q(E){v.contextMenu({event:E,edge:w.value})}function ve(E){v.doubleClick({event:E,edge:w.value})}function _e(E){v.mouseEnter({event:E,edge:w.value})}function ge(E){v.mouseMove({event:E,edge:w.value})}function we(E){v.mouseLeave({event:E,edge:w.value})}function ce(E){X(E,!0)}function de(E){X(E,!1)}function D(E){var B;!m.value&&Tv.includes(E.key)&&k.value&&(E.key==="Escape"?((B=R.value)==null||B.blur(),c([d(e.id)])):n([d(e.id)]))}}}),$L=OL,BL=r.defineComponent({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:a,connectionLineType:s,connectionLineStyle:l,connectionLineOptions:u,connectionStatus:c,viewport:d,findNode:f}=Ae(),h=(e=r.inject(is))==null?void 0:e["connection-line"],p=r.computed(()=>{var _;return f((_=o.value)==null?void 0:_.nodeId)}),m=r.computed(()=>{var _;return f((_=i.value)==null?void 0:_.nodeId)??null}),g=r.computed(()=>({x:(a.value.x-d.value.x)/d.value.zoom,y:(a.value.y-d.value.y)/d.value.zoom})),b=r.computed(()=>u.value.markerStart?`url(#${Kr(u.value.markerStart,t)})`:""),y=r.computed(()=>u.value.markerEnd?`url(#${Kr(u.value.markerEnd,t)})`:"");return()=>{var _,w,v;if(!p.value||!o.value)return null;const N=o.value.id,T=o.value.type,V=p.value.handleBounds;let $=V?.[T]??[];if(n.value===In.Loose){const F=V?.[T==="source"?"target":"source"]??[];$=[...$,...F]}if(!$)return null;const P=(N?$.find(F=>F.id===N):$[0])??null,A=P?.position??le.Top,{x:O,y:x}=Ho(p.value,P,A);let R=null;m.value&&(n.value===In.Strict?R=((_=m.value.handleBounds[T==="source"?"target":"source"])==null?void 0:_.find(F=>{var j;return F.id===((j=i.value)==null?void 0:j.id)}))||null:R=((w=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])==null?void 0:w.find(F=>{var j;return F.id===((j=i.value)==null?void 0:j.id)}))||null);const k=((v=i.value)==null?void 0:v.position)??(A?Tl[A]:null);if(!A||!k)return null;const M=s.value??u.value.type??Un.Bezier;let S="";const L={sourceX:O,sourceY:x,sourcePosition:A,targetX:g.value.x,targetY:g.value.y,targetPosition:k};return M===Un.Bezier?[S]=eg(L):M===Un.Step?[S]=Ol({...L,borderRadius:0}):M===Un.SmoothStep?[S]=Ol(L):M===Un.SimpleBezier?[S]=tg(L):S=`M${O},${x} ${g.value.x},${g.value.y}`,r.h("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},r.h("g",{class:"vue-flow__connection"},h?r.h(h,{sourceX:O,sourceY:x,sourcePosition:A,targetX:g.value.x,targetY:g.value.y,targetPosition:k,sourceNode:p.value,sourceHandle:P,targetNode:m.value,targetHandle:R,markerEnd:y.value,markerStart:b.value,connectionStatus:c.value}):r.h("path",{d:S,class:[u.value.class,c.value,"vue-flow__connection-path"],style:{...l.value,...u.value.style},"marker-end":y.value,"marker-start":b.value})))}}}),PL=BL,AL=["id","markerWidth","markerHeight","markerUnits","orient"],YL={name:"MarkerType",compatConfig:{MODE:3}},IL=r.defineComponent({...YL,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===r.unref(_a).ArrowClosed?(r.openBlock(),r.createElementBlock("polyline",{key:0,style:r.normalizeStyle({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):r.createCommentVNode("",!0),t.type===r.unref(_a).Arrow?(r.openBlock(),r.createElementBlock("polyline",{key:1,style:r.normalizeStyle({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):r.createCommentVNode("",!0)],8,AL))}}),zL={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},RL={name:"MarkerDefinitions",compatConfig:{MODE:3}},LL=r.defineComponent({...RL,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=Ae(),a=r.computed(()=>{const s=new Set,l=[],u=c=>{if(c){const d=Kr(c,t);s.has(d)||(typeof c=="object"?l.push({...c,id:d,color:c.color||i.value}):l.push({id:d,color:i.value,type:c}),s.add(d))}};for(const c of[o.value.markerEnd,o.value.markerStart])u(c);for(const c of n.value)for(const d of[c.markerStart,c.markerEnd])u(d);return l.sort((c,d)=>c.id.localeCompare(d.id))});return(s,l)=>(r.openBlock(),r.createElementBlock("svg",zL,[r.createElementVNode("defs",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,u=>(r.openBlock(),r.createBlock(IL,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),FL={name:"Edges",compatConfig:{MODE:3}},HL=r.defineComponent({...FL,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Ae();return(i,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(LL),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(n),s=>(r.openBlock(),r.createElementBlock("svg",{key:s.id,class:"vue-flow__edges vue-flow__container",style:r.normalizeStyle({zIndex:r.unref(sR)(s,r.unref(t),r.unref(o))})},[r.createVNode(r.unref($L),{id:s.id},null,8,["id"])],4))),128)),r.createVNode(r.unref(PL))],64))}}),jL=r.defineComponent({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:a,emits:s,removeSelectedNodes:l,addSelectedNodes:u,updateNodeDimensions:c,onUpdateNodeInternals:d,getNodeTypes:f,nodeExtent:h,elevateNodesOnSelect:p,disableKeyboardA11y:m,ariaLiveMessage:g,snapToGrid:b,snapGrid:y,nodeDragThreshold:_,nodesDraggable:w,elementsSelectable:v,nodesConnectable:N,nodesFocusable:T,hooks:V}=Ae(),$=r.ref(null);r.provide(Uv,$),r.provide(Wv,e.id);const P=r.inject(is),A=r.getCurrentInstance(),O=Xv(),{node:x,parentNode:R}=qv(e.id),{emit:k,on:M}=CR(x,s),S=r.toRef(()=>typeof x.draggable>"u"?w.value:x.draggable),L=r.toRef(()=>typeof x.selectable>"u"?v.value:x.selectable),F=r.toRef(()=>typeof x.connectable>"u"?N.value:x.connectable),j=r.toRef(()=>typeof x.focusable>"u"?T.value:x.focusable),I=r.computed(()=>L.value||S.value||V.value.nodeClick.hasListeners()||V.value.nodeDoubleClick.hasListeners()||V.value.nodeMouseEnter.hasListeners()||V.value.nodeMouseMove.hasListeners()||V.value.nodeMouseLeave.hasListeners()),G=r.toRef(()=>!!x.dimensions.width&&!!x.dimensions.height),W=r.computed(()=>{const B=x.type||"default",z=P?.[`node-${B}`];if(z)return z;let Y=x.template||f.value[B];if(typeof Y=="string"&&A){const ee=Object.keys(A.appContext.components);ee&&ee.includes(B)&&(Y=r.resolveComponent(B,!1))}return Y&&typeof Y!="string"?Y:(s.error(new He(Le.NODE_TYPE_MISSING,Y)),!1)}),ue=Gv({id:e.id,el:$,disabled:()=>!S.value,selectable:L,dragHandle:()=>x.dragHandle,onStart(B){k.dragStart(B)},onDrag(B){k.drag(B)},onStop(B){k.dragStop(B)},onClick(B){D(B)}}),ie=r.computed(()=>x.class instanceof Function?x.class(x):x.class),X=r.computed(()=>{const B=(x.style instanceof Function?x.style(x):x.style)||{},z=x.width instanceof Function?x.width(x):x.width,Y=x.height instanceof Function?x.height(x):x.height;return!B.width&&z&&(B.width=typeof z=="string"?z:`${z}px`),!B.height&&Y&&(B.height=typeof Y=="string"?Y:`${Y}px`),B}),K=r.toRef(()=>Number(x.zIndex??X.value.zIndex??0));return d(B=>{(B.includes(e.id)||!B.length)&&ve()}),r.onMounted(()=>{r.watch(()=>x.hidden,(B=!1,z,Y)=>{!B&&$.value&&(e.resizeObserver.observe($.value),Y(()=>{$.value&&e.resizeObserver.unobserve($.value)}))},{immediate:!0,flush:"post"})}),r.watch([()=>x.type,()=>x.sourcePosition,()=>x.targetPosition],()=>{r.nextTick(()=>{c([{id:e.id,nodeElement:$.value,forceUpdate:!0}])})}),r.watch([()=>x.position.x,()=>x.position.y,()=>{var B;return(B=R.value)==null?void 0:B.computedPosition.x},()=>{var B;return(B=R.value)==null?void 0:B.computedPosition.y},()=>{var B;return(B=R.value)==null?void 0:B.computedPosition.z},K,()=>x.selected,()=>x.dimensions.height,()=>x.dimensions.width,()=>{var B;return(B=R.value)==null?void 0:B.dimensions.height},()=>{var B;return(B=R.value)==null?void 0:B.dimensions.width}],([B,z,Y,ee,J,se])=>{const re={x:B,y:z,z:se+(p.value&&x.selected?1e3:0)};typeof Y<"u"&&typeof ee<"u"?x.computedPosition=tR({x:Y,y:ee,z:J},re):x.computedPosition=re},{flush:"post",immediate:!0}),r.watch([()=>x.extent,h],([B,z],[Y,ee])=>{(B!==Y||z!==ee)&&Q()}),x.extent==="parent"||typeof x.extent=="object"&&"range"in x.extent&&x.extent.range==="parent"?bl(()=>G).toBe(!0).then(Q):Q(),()=>x.hidden?null:r.h("div",{ref:$,"data-id":x.id,class:["vue-flow__node",`vue-flow__node-${W.value===!1?"default":x.type||"default"}`,{[n.value]:S.value,dragging:ue?.value,draggable:S.value,selected:x.selected,selectable:L.value,parent:x.isParent},ie.value],style:{visibility:G.value?"visible":"hidden",zIndex:x.computedPosition.z??K.value,transform:`translate(${x.computedPosition.x}px,${x.computedPosition.y}px)`,pointerEvents:I.value?"all":"none",...X.value},tabIndex:j.value?0:void 0,role:j.value?"group":void 0,"aria-describedby":m.value?void 0:`${Dv}-${t}`,"aria-label":x.ariaLabel,"aria-roledescription":"node",...x.domAttributes,onMouseenter:_e,onMousemove:ge,onMouseleave:we,onContextmenu:ce,onClick:D,onDblclick:de,onKeydown:E},[r.h(W.value===!1?f.value.default:W.value,{id:x.id,type:x.type,data:x.data,events:{...x.events,...M},selected:x.selected,resizing:x.resizing,dragging:ue.value,connectable:F.value,position:x.computedPosition,dimensions:x.dimensions,isValidTargetPos:x.isValidTargetPos,isValidSourcePos:x.isValidSourcePos,parent:x.parentNode,parentNodeId:x.parentNode,zIndex:x.computedPosition.z??K.value,targetPosition:x.targetPosition,sourcePosition:x.sourcePosition,label:x.label,dragHandle:x.dragHandle,onUpdateNodeInternals:ve})]);function Q(){const B=x.computedPosition,{computedPosition:z,position:Y}=Gu(x,b.value?rs(B,y.value):B,s.error,h.value,R.value);(x.computedPosition.x!==z.x||x.computedPosition.y!==z.y)&&(x.computedPosition={...x.computedPosition,...z}),(x.position.x!==Y.x||x.position.y!==Y.y)&&(x.position=Y)}function ve(){$.value&&c([{id:e.id,nodeElement:$.value,forceUpdate:!0}])}function _e(B){ue?.value||k.mouseEnter({event:B,node:x})}function ge(B){ue?.value||k.mouseMove({event:B,node:x})}function we(B){ue?.value||k.mouseLeave({event:B,node:x})}function ce(B){return k.contextMenu({event:B,node:x})}function de(B){return k.doubleClick({event:B,node:x})}function D(B){L.value&&(!o.value||!S.value||_.value>0)&&Vl(x,a.value,u,l,i,!1,$.value),k.click({event:B,node:x})}function E(B){if(!(Ml(B)||m.value))if(Tv.includes(B.key)&&L.value){const z=B.key==="Escape";Vl(x,a.value,u,l,i,z,$.value)}else S.value&&x.selected&&$o[B.key]&&(B.preventDefault(),g.value=`Moved selected node ${B.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~x.position.x}, y: ${~~x.position.y}`,O({x:$o[B.key].x,y:$o[B.key].y},B.shiftKey))}}}),WL=jL;function UL(e={includeHiddenNodes:!1}){const{nodes:t}=Ae();return r.computed(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const GL={class:"vue-flow__nodes vue-flow__container"},ZL={name:"Nodes",compatConfig:{MODE:3}},qL=r.defineComponent({...ZL,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Ae(),i=UL(),a=r.ref();return r.watch(i,s=>{s&&r.nextTick(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),r.onMounted(()=>{a.value=new ResizeObserver(s=>{const l=s.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));r.nextTick(()=>n(l))})}),r.onBeforeUnmount(()=>{var s;return(s=a.value)==null?void 0:s.disconnect()}),(s,l)=>(r.openBlock(),r.createElementBlock("div",GL,[a.value?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(t),(u,c,d,f)=>{const h=[u.id];if(f&&f.key===u.id&&r.isMemoSame(f,h))return f;const p=(r.openBlock(),r.createBlock(r.unref(WL),{id:u.id,key:u.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return p.memo=h,p},l,0),128)):r.createCommentVNode("",!0)]))}});function XL(){const{emits:e}=Ae();r.onMounted(()=>{if(jv()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new He(Le.MISSING_STYLES))}})}const KL=r.createElementVNode("div",{class:"vue-flow__edge-labels"},null,-1),JL={name:"VueFlow",compatConfig:{MODE:3}},QL=r.defineComponent({...JL,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=r.useSlots(),a=Vs(o,"modelValue",n),s=Vs(o,"nodes",n),l=Vs(o,"edges",n),u=Ae(o),c=TR({modelValue:a,nodes:s,edges:l},o,u);return OR(n,u.hooks),ML(),XL(),r.provide(is,i),r.onUnmounted(c),t(u),(d,f)=>(r.openBlock(),r.createElementBlock("div",{ref:r.unref(u).vueFlowRef,class:"vue-flow"},[r.createVNode(kL,null,{default:r.withCtx(()=>[r.createVNode(HL),KL,r.createVNode(qL),r.renderSlot(d.$slots,"zoom-pane")]),_:3}),r.renderSlot(d.$slots,"default"),r.createVNode(DL)],512))}}),e4={name:"Panel",compatConfig:{MODE:3}},t4=r.defineComponent({...e4,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ae(),o=r.computed(()=>`${t.position}`.split("-"));return(i,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-flow__panel",o.value]),style:r.normalizeStyle({pointerEvents:r.unref(n)?"none":"all"})},[r.renderSlot(i.$slots,"default")],6))}});var ln=(e=>(e.Lines="lines",e.Dots="dots",e))(ln||{});const og=function({dimensions:e,size:t,color:n}){return r.h("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},rg=function({radius:e,color:t}){return r.h("circle",{cx:e,cy:e,r:e,fill:t})};ln.Lines+"",ln.Dots+"";const n4={[ln.Dots]:"#81818a",[ln.Lines]:"#eee"},o4=["id","x","y","width","height","patternTransform"],r4={key:2,height:"100",width:"100"},i4=["fill"],a4=["x","y","fill"],s4={name:"Background",compatConfig:{MODE:3}},l4=r.defineComponent({...s4,props:{id:{},variant:{default:()=>ln.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Ae(),o=r.computed(()=>{const s=n.value.zoom,[l,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[l*s||1,u*s||1],d=e.size*s,[f,h]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],p=[f*s||1+c[0]/2,h*s||1+c[1]/2];return{scaledGap:c,offset:p,size:d}}),i=r.toRef(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=r.toRef(()=>e.color||e.patternColor||n4[e.variant||ln.Dots]);return(s,l)=>(r.openBlock(),r.createElementBlock("svg",{class:"vue-flow__background vue-flow__container",style:r.normalizeStyle({height:`${s.height>100?100:s.height}%`,width:`${s.width>100?100:s.width}%`})},[r.renderSlot(s.$slots,"pattern-container",{id:i.value},()=>[r.createElementVNode("pattern",{id:i.value,x:r.unref(n).x%o.value.scaledGap[0],y:r.unref(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[r.renderSlot(s.$slots,"pattern",{},()=>[s.variant===r.unref(ln).Lines?(r.openBlock(),r.createBlock(r.unref(og),{key:0,size:s.lineWidth,color:a.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===r.unref(ln).Dots?(r.openBlock(),r.createBlock(r.unref(rg),{key:1,color:a.value,radius:o.value.size/2},null,8,["color","radius"])):r.createCommentVNode("",!0),s.bgColor?(r.openBlock(),r.createElementBlock("svg",r4,[r.createElementVNode("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,i4)])):r.createCommentVNode("",!0)])],8,o4)]),r.createElementVNode("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,a4),r.renderSlot(s.$slots,"default",{id:i.value})],4))}}),u4={name:"ControlButton",compatConfig:{MODE:3}},c4=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},d4={type:"button",class:"vue-flow__controls-button"};function f4(e,t,n,o,i,a){return r.openBlock(),r.createElementBlock("button",d4,[r.renderSlot(e.$slots,"default")])}const Ti=c4(u4,[["render",f4]]),h4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},p4=r.createElementVNode("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),m4=[p4];function v4(e,t){return r.openBlock(),r.createElementBlock("svg",h4,m4)}const g4={render:v4},y4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},w4=r.createElementVNode("path",{d:"M0 0h32v4.2H0z"},null,-1),b4=[w4];function _4(e,t){return r.openBlock(),r.createElementBlock("svg",y4,b4)}const x4={render:_4},k4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},N4=r.createElementVNode("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),E4=[N4];function C4(e,t){return r.openBlock(),r.createElementBlock("svg",k4,E4)}const S4={render:C4},D4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M4=r.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),T4=[M4];function V4(e,t){return r.openBlock(),r.createElementBlock("svg",D4,T4)}const O4={render:V4},$4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},B4=r.createElementVNode("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),P4=[B4];function A4(e,t){return r.openBlock(),r.createElementBlock("svg",$4,P4)}const Y4={render:A4},I4={name:"Controls",compatConfig:{MODE:3}},z4=r.defineComponent({...I4,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Sv.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:o,elementsSelectable:i,setInteractive:a,zoomIn:s,zoomOut:l,fitView:u,viewport:c,minZoom:d,maxZoom:f}=Ae(),h=r.toRef(()=>n.value||o.value||i.value),p=r.toRef(()=>c.value.zoom<=d.value),m=r.toRef(()=>c.value.zoom>=f.value);function g(){s(),t("zoomIn")}function b(){l(),t("zoomOut")}function y(){u(e.fitViewParams),t("fitView")}function _(){a(!h.value),t("interactionChange",!h.value)}return(w,v)=>(r.openBlock(),r.createBlock(r.unref(t4),{class:"vue-flow__controls",position:w.position},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"top"),w.showZoom?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.renderSlot(w.$slots,"control-zoom-in",{},()=>[r.createVNode(Ti,{class:"vue-flow__controls-zoomin",disabled:m.value,onClick:g},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"icon-zoom-in",{},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(g4))))])]),_:3},8,["disabled"])]),r.renderSlot(w.$slots,"control-zoom-out",{},()=>[r.createVNode(Ti,{class:"vue-flow__controls-zoomout",disabled:p.value,onClick:b},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"icon-zoom-out",{},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(x4))))])]),_:3},8,["disabled"])])],64)):r.createCommentVNode("",!0),w.showFitView?r.renderSlot(w.$slots,"control-fit-view",{key:1},()=>[r.createVNode(Ti,{class:"vue-flow__controls-fitview",onClick:y},{default:r.withCtx(()=>[r.renderSlot(w.$slots,"icon-fit-view",{},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(S4))))])]),_:3})]):r.createCommentVNode("",!0),w.showInteractive?r.renderSlot(w.$slots,"control-interactive",{key:2},()=>[w.showInteractive?(r.openBlock(),r.createBlock(Ti,{key:0,class:"vue-flow__controls-interactive",onClick:_},{default:r.withCtx(()=>[h.value?r.renderSlot(w.$slots,"icon-unlock",{key:0},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(Y4))))]):r.createCommentVNode("",!0),h.value?r.createCommentVNode("",!0):r.renderSlot(w.$slots,"icon-lock",{key:1},()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(O4))))])]),_:3})):r.createCommentVNode("",!0)]):r.createCommentVNode("",!0),r.renderSlot(w.$slots,"default")]),_:3},8,["position"]))}}),R4={class:"yu-relative yu-flex yu-h-16 yu-w-16 yu-items-center yu-justify-center"},L4=r.defineComponent({__name:"workflow-add-node",props:{data:{}},emits:["add"],setup(e,{emit:t}){const n=t;return(o,i)=>(r.openBlock(),r.createElementBlock("div",R4,[r.createVNode(r.unref(so),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-primary-500",type:"target",position:r.unref(le).Top,connectable:!1},null,8,["position"]),r.createVNode(r.unref(it),{class:"nodrag nopan !yu-h-16 !yu-min-h-[4rem] !yu-w-16 !yu-rounded-full !yu-border-2 !yu-border-primary-500 !yu-bg-primary-50 !yu-text-2xl !yu-text-primary-500 hover:!yu-bg-primary-100",round:"",icon:"",soft:"","aria-label":`Adicionar etapa após ${e.data.parentRule.name}`,onPointerdown:i[0]||(i[0]=r.withModifiers(()=>{},["stop"])),onClick:i[1]||(i[1]=r.withModifiers(a=>n("add",e.data.parentRule),["stop"]))},{default:r.withCtx(()=>[...i[2]||(i[2]=[r.createTextVNode("+",-1)])]),_:1},8,["aria-label"])]))}}),F4=r.defineComponent({__name:"workflow-editor-toolbar",props:{canAdd:{type:Boolean},hasSelectedEdge:{type:Boolean}},emits:["add","deleteEdge"],setup(e,{emit:t}){const n=t;return(o,i)=>(r.openBlock(),r.createBlock(r.unref(q),{class:"yu-absolute yu-left-4 yu-top-4 yu-z-10","gap-sm":""},{default:r.withCtx(()=>[r.createVNode(r.unref(it),{class:"yu-shadow",disabled:!e.canAdd,onClick:i[0]||(i[0]=a=>n("add"))},{default:r.withCtx(()=>[...i[2]||(i[2]=[r.createTextVNode("+ Adicionar etapa",-1)])]),_:1},8,["disabled"]),e.hasSelectedEdge?(r.openBlock(),r.createBlock(r.unref(it),{key:0,class:"!yu-border-red-200 !yu-text-red-600 yu-shadow hover:!yu-bg-red-50",outline:"",onClick:i[1]||(i[1]=a=>n("deleteEdge"))},{default:r.withCtx(()=>[...i[3]||(i[3]=[r.createTextVNode("Excluir conexão",-1)])]),_:1})):r.createCommentVNode("",!0)]),_:1}))}}),H4=r.defineComponent({__name:"workflow-type-badge",props:{label:{},color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"yu-inline-flex yu-rounded-full yu-px-3 yu-py-1.5",style:r.normalizeStyle({background:`color-mix(in srgb, ${e.color} 12%, white)`,color:e.color})},[r.createVNode(r.unref(he),{base:"",semibold:"",style:r.normalizeStyle({color:e.color})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.label),1)]),_:1},8,["style"])],4))}}),j4=["aria-label"],W4={class:"yu-min-w-0 yu-flex-1"},U4=r.defineComponent({__name:"workflow-node-card",props:{data:{},selected:{type:Boolean}},emits:["delete","edit"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>({"--workflow-accent":n.data.presentation.color}));return(a,s)=>(r.openBlock(),r.createElementBlock("article",{class:r.normalizeClass(["yu-group yu-relative yu-w-[25rem] yu-cursor-pointer yu-overflow-visible yu-rounded-xl yu-bg-white yu-shadow-md yu-transition-shadow hover:yu-shadow-lg focus-visible:yu-outline-none focus-visible:yu-ring-2",e.selected?"workflow-node-card--selected yu-border-2 yu-border-transparent":"yu-border yu-border-slate-200"]),style:r.normalizeStyle(i.value),role:"button",tabindex:"0","aria-label":`Editar ${e.data.rule.name}`,onClick:s[3]||(s[3]=l=>o("edit",e.data.rule)),onKeydown:[s[4]||(s[4]=r.withKeys(r.withModifiers(l=>o("edit",e.data.rule),["self"]),["enter"])),s[5]||(s[5]=r.withKeys(r.withModifiers(l=>o("edit",e.data.rule),["self","prevent"]),["space"]))]},[s[7]||(s[7]=r.createElementVNode("span",{class:"yu-absolute yu-inset-y-0 yu-left-0 yu-w-1.5 yu-rounded-l-xl",style:{background:"var(--workflow-accent)"},"aria-hidden":"true"},null,-1)),r.createVNode(r.unref(so),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-[var(--workflow-accent)]",type:"target",position:r.unref(le).Top,connectable:!e.data.readOnly,onClick:s[0]||(s[0]=r.withModifiers(()=>{},["stop"]))},null,8,["position","connectable"]),r.createVNode(r.unref(q),{class:"yu-min-h-[6.5rem] yu-p-5 yu-pl-7","center-between":"","gap-lg":""},{default:r.withCtx(()=>[r.createVNode(Zm,{icon:e.data.presentation.icon,color:e.data.presentation.color},null,8,["icon","color"]),r.createElementVNode("div",W4,[r.createVNode(H4,{label:e.data.presentation.label,color:e.data.presentation.color},null,8,["label","color"]),r.createVNode(r.unref(he),{class:"yu-mt-1.5 yu-truncate !yu-text-slate-950",extralarge:"",semibold:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.data.rule.name),1)]),_:1})])]),_:1}),r.createVNode(r.unref(q),{class:"nodrag yu-absolute yu-right-3 yu-top-3 yu-z-10 yu-opacity-0 yu-transition-opacity group-hover:yu-opacity-100 group-focus-within:yu-opacity-100",row:"","gap-xs":""},{default:r.withCtx(()=>[r.createVNode(r.unref(it),{class:"nodrag !yu-text-slate-400 hover:!yu-bg-red-50 hover:!yu-text-red-600",ghost:"",icon:"",small:"",disabled:!e.data.canDelete,"aria-label":`Excluir ${e.data.rule.name}`,onClick:s[1]||(s[1]=r.withModifiers(l=>o("delete",e.data.rule),["stop"]))},{default:r.withCtx(()=>[...s[6]||(s[6]=[r.createTextVNode("×",-1)])]),_:1},8,["disabled","aria-label"])]),_:1}),r.createVNode(r.unref(so),{class:"!yu-h-3 !yu-w-3 !yu-border-2 !yu-border-white !yu-bg-[var(--workflow-accent)]",type:"source",position:r.unref(le).Bottom,connectable:e.data.canConnect,onClick:s[2]||(s[2]=r.withModifiers(()=>{},["stop"]))},null,8,["position","connectable"])],46,j4))}}),G4={class:"yu-absolute yu-left-1/2 yu-top-4 yu-z-10 yu-max-w-lg -yu-translate-x-1/2 yu-rounded-lg yu-border yu-border-amber-300 yu-bg-amber-50 yu-px-4 yu-py-3 yu-text-sm yu-text-amber-900 yu-shadow",role:"alert"},Z4={key:0},q4=r.defineComponent({__name:"workflow-validation-banner",props:{reasons:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",G4,[r.createVNode(r.unref(he),{class:"!yu-text-amber-900",base:"",semibold:""},{default:r.withCtx(()=>[...n[0]||(n[0]=[r.createTextVNode("O fluxo está disponível somente para leitura.",-1)])]),_:1}),r.createVNode(r.unref(he),{class:"!yu-text-amber-900",base:""},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.reasons[0]),1),e.reasons.length>1?(r.openBlock(),r.createElementBlock("span",Z4," (+"+r.toDisplayString(e.reasons.length-1)+" problemas)",1)):r.createCommentVNode("",!0)]),_:1})]))}}),X4={screen:{label:"Tela inicial",color:"#7c3aed",icon:"https://i.allsvgicons.com/lucide/monitor.svg",defaultName:"Nova tela"},identification:{label:"Formulário",color:"#0ea5e9",icon:"https://i.allsvgicons.com/lucide/clipboard-list.svg",defaultName:"Novo formulário"},service:{label:"Atendimento",color:"#10b981",icon:"https://i.allsvgicons.com/lucide/message-circle.svg",defaultName:"Novo atendimento"}},Hf=e=>e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()),ig=e=>{const t=typeof e=="string"?{type:e}:e??{},n=String(t.type??t.action??"unknown"),o=X4[n],i=typeof t.maxChildren=="number"&&Number.isFinite(t.maxChildren)?Math.max(0,Math.floor(t.maxChildren)):void 0;return{type:n,label:t.label??o?.label??Hf(n),color:t.color??o?.color??"#64748b",icon:String(t.icon??o?.icon??"https://i.allsvgicons.com/lucide/diamond.svg"),defaultName:t.defaultName??o?.defaultName??`Novo ${Hf(n)}`,...i===void 0?{}:{maxChildren:i}}},K4=e=>e.map(ig);var ag=Object.defineProperty,J4=(e,t,n)=>t in e?ag(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q4=(e,t)=>{for(var n in t)ag(e,n,{get:t[n],enumerable:!0})},eF=(e,t,n)=>J4(e,t+"",n),tF={};Q4(tF,{Graph:()=>Vt,alg:()=>Ku});var nF=Object.defineProperty,sg=(e,t)=>{for(var n in t)nF(e,n,{get:t[n],enumerable:!0})},Xu=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}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 typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(n=>{t!==void 0?this.setNode(n,t):this.setNode(n)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(n=>{this.setParent(n)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),o=this.successors(e);if(o)for(let i of o)n.add(i);return Array.from(n.values())}}isLeaf(e){var t;let n;return this.isDirected()?n=this.successors(e):n=this.neighbors(e),((t=n?.length)!=null?t:0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([i,a])=>{e(i)&&t.setNode(i,a)}),Object.values(this._edgeObjs).forEach(i=>{t.hasNode(i.v)&&t.hasNode(i.w)&&t.setEdge(i,this.edge(i))});let n={},o=i=>{let a=this.parent(i);return!a||t.hasNode(a)?(n[i]=a,a):a in n?n[a]:o(a)};return this._isCompound&&t.nodes().forEach(i=>t.setParent(i,o(i))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((n,o)=>(t!==void 0?this.setEdge(n,o,t):this.setEdge(n,o),o)),this}setEdge(e,t,n,o){let i,a,s,l,u=!1;typeof e=="object"&&e!==null&&"v"in e?(i=e.v,a=e.w,s=e.name,arguments.length===2&&(l=t,u=!0)):(i=e,a=t,s=o,arguments.length>2&&(l=n,u=!0)),i=""+i,a=""+a,s!==void 0&&(s=""+s);let c=br(this._isDirected,i,a,s);if(c in this._edgeLabels)return u&&(this._edgeLabels[c]=l),this;if(s!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(a),this._edgeLabels[c]=u?l:this._defaultEdgeLabelFn(i,a,s);let d=oF(this._isDirected,i,a,s);return i=d.v,a=d.w,Object.freeze(d),this._edgeObjs[c]=d,jf(this._preds[a],i),jf(this._sucs[i],a),this._in[a][c]=d,this._out[i][c]=d,this._edgeCount++,this}edge(e,t,n){let o=arguments.length===1?Fs(this._isDirected,e):br(this._isDirected,e,t,n);return this._edgeLabels[o]}edgeAsObj(e,t,n){let o=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof o!="object"||o===null?{label:o}:o}hasEdge(e,t,n){return(arguments.length===1?Fs(this._isDirected,e):br(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let o=arguments.length===1?Fs(this._isDirected,e):br(this._isDirected,e,t,n),i=this._edgeObjs[o];if(i){let a=i.v,s=i.w;delete this._edgeLabels[o],delete this._edgeObjs[o],Wf(this._preds[s],a),Wf(this._sucs[a],s),delete this._in[s][o],delete this._out[a][o],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let o=Object.values(e);return n?o.filter(i=>i.v===t&&i.w===n||i.v===n&&i.w===t):o}};function jf(e,t){e[t]?e[t]++:e[t]=1}function Wf(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function br(e,t,n,o){let i=""+t,a=""+n;if(!e&&i>a){let s=i;i=a,a=s}return i+""+a+""+(o===void 0?"\0":o)}function oF(e,t,n,o){let i=""+t,a=""+n;if(!e&&i>a){let l=i;i=a,a=l}let s={v:i,w:a};return o&&(s.name=o),s}function Fs(e,t){return br(e,t.v,t.w,t.name)}var rF={};sg(rF,{read:()=>lF,write:()=>iF});function iF(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:aF(e),edges:sF(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function aF(e){return e.nodes().map(t=>{let n=e.node(t),o=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),o!==void 0&&(i.parent=o),i})}function sF(e){return e.edges().map(t=>{let n=e.edge(t),o={v:t.v,w:t.w};return t.name!==void 0&&(o.name=t.name),n!==void 0&&(o.value=n),o})}function lF(e){let t=new Xu(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Ku={};sg(Ku,{CycleException:()=>Ca,bellmanFord:()=>lg,components:()=>dF,dijkstra:()=>Ea,dijkstraAll:()=>pF,findCycles:()=>mF,floydWarshall:()=>gF,isAcyclic:()=>wF,postorder:()=>_F,preorder:()=>xF,prim:()=>kF,shortestPaths:()=>NF,tarjan:()=>cg,topsort:()=>dg});var uF=()=>1;function lg(e,t,n,o){return cF(e,String(t),n||uF,o||function(i){var a;return(a=e.outEdges(i))!=null?a:[]})}function cF(e,t,n,o){let i={},a,s=0,l=e.nodes(),u=function(f){let h=i[f.v],p=i[f.w];if(!h||!p)return;let m=n(f);h.distance+m<p.distance&&(i[f.w]={distance:h.distance+m,predecessor:f.v},a=!0)},c=function(){l.forEach(function(f){o(f).forEach(function(h){let p=h.v===f?h.v:h.w,m=p===h.v?h.w:h.v;u({v:p,w:m})})})};l.forEach(function(f){let h=f===t?0:Number.POSITIVE_INFINITY;i[f]={distance:h,predecessor:""}});let d=l.length;for(let f=1;f<d&&(a=!1,s++,c(),!!a);f++);if(s===d-1&&(a=!1,c(),a))throw new Error("The graph contains a negative weight cycle");return i}function dF(e){let t={},n=[],o;function i(a){var s,l;a in t||(t[a]=!0,o.push(a),(s=e.successors(a))==null||s.forEach(i),(l=e.predecessors(a))==null||l.forEach(i))}return e.nodes().forEach(function(a){o=[],i(a),o.length&&n.push(o)}),n}var ug=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,o=String(e);if(!(o in n)){let i=this._arr,a=i.length;return n[o]=a,i.push({key:o,priority:t}),this._decrease(a),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let o=this._arr[n].priority;if(t>o)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${o} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,o=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,o<t.length&&(i=t[o].priority<t[i].priority?o:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,o;for(;e!==0&&(o=e>>1,!(t[o].priority<n));)this._swap(e,o),e=o}_swap(e,t){let n=this._arr,o=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,o[a.key]=e,o[i.key]=t}},fF=()=>1;function Ea(e,t,n,o){let i=function(a){var s;return(s=e.outEdges(a))!=null?s:[]};return hF(e,String(t),n||fF,o||i)}function hF(e,t,n,o){let i={},a=new ug,s,l,u=function(c){let d=c.v!==s?c.v:c.w,f=i[d];if(!f)return;let h=n(c),p=l.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+h);p<f.distance&&(f.distance=p,f.predecessor=s,a.decrease(d,p))};for(e.nodes().forEach(function(c){let d=c===t?0:Number.POSITIVE_INFINITY;i[c]={distance:d,predecessor:""},a.add(c,d)});a.size()>0;){s=a.removeMin();let c=i[s];if(!c||c.distance===Number.POSITIVE_INFINITY)break;l=c,o(s).forEach(u)}return i}function pF(e,t,n){return e.nodes().reduce(function(o,i){return o[i]=Ea(e,i,t,n),o},{})}function cg(e){let t=0,n=[],o={},i=[];function a(s){var l;let u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),(l=e.successors(s))==null||l.forEach(function(c){if(c in o){let d=o[c];d!=null&&d.onStack&&(u.lowlink=Math.min(u.lowlink,d.index))}else{a(c);let d=o[c];d&&(u.lowlink=Math.min(u.lowlink,d.lowlink))}}),u.lowlink===u.index){let c=[],d;do{d=n.pop();let f=o[d];f&&(f.onStack=!1),c.push(d)}while(s!==d);i.push(c)}}return e.nodes().forEach(function(s){s in o||a(s)}),i}function mF(e){return cg(e).filter(function(t){var n;let o=t[0];return o?t.length>1||t.length===1&&((n=e.outEdges(o,o))!=null?n:[]).length>0:!1})}var vF=()=>1;function gF(e,t,n){return yF(e,t||vF,n||function(o){var i;return(i=e.outEdges(o))!=null?i:[]})}function yF(e,t,n){let o={},i=e.nodes();return i.forEach(function(a){let s={};o[a]=s,s[a]={distance:0,predecessor:""},i.forEach(function(l){a!==l&&(s[l]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(a).forEach(function(l){let u=l.v===a?l.w:l.v,c=t(l);s[u]={distance:c,predecessor:a}})}),i.forEach(function(a){let s=o[a];s&&i.forEach(function(l){let u=o[l];u&&i.forEach(function(c){let d=u[a],f=s[c],h=u[c];if(d&&f&&h){let p=d.distance+f.distance;p<h.distance&&(h.distance=p,h.predecessor=f.predecessor)}})})}),o}var Ca=class extends Error{constructor(e){super(e),this.name="CycleException"}};function dg(e){let t={},n={},o=[];function i(a){var s;if(a in n)throw new Ca;a in t||(n[a]=!0,t[a]=!0,(s=e.predecessors(a))==null||s.forEach(i),delete n[a],o.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Ca;return o}function wF(e){try{dg(e)}catch(t){if(t instanceof Ca)return!1;throw t}return!0}function bF(e,t,n,o,i){Array.isArray(t)||(t=[t]);let a=(l=>{var u;return(u=e.isDirected()?e.successors(l):e.neighbors(l))!=null?u:[]}),s={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);i=fg(e,l,n==="post",s,a,o,i)}),i}function fg(e,t,n,o,i,a,s){return t in o||(o[t]=!0,n||(s=a(s,t)),i(t).forEach(function(l){s=fg(e,l,n,o,i,a,s)}),n&&(s=a(s,t))),s}function hg(e,t,n){return bF(e,t,n,function(o,i){return o.push(i),o},[])}function _F(e,t){return hg(e,t,"post")}function xF(e,t){return hg(e,t,"pre")}function kF(e,t){var n;let o=new Xu,i={},a=new ug,s;function l(d){let f=d.v===s?d.w:d.v,h=a.priority(f);if(h!==void 0){let p=t(d);p<h&&(i[f]=s,a.decrease(f,p))}}if(e.nodeCount()===0)return o;e.nodes().forEach(function(d){a.add(d,Number.POSITIVE_INFINITY),o.setNode(d)});let u=e.nodes()[0];u!==void 0&&a.decrease(u,0);let c=!1;for(;a.size()>0;){if(s=a.removeMin(),s in i)o.setEdge(s,i[s]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}(n=e.nodeEdges(s))==null||n.forEach(l)}return o}function NF(e,t,n,o){return EF(e,t,n,o??(i=>{var a;return(a=e.outEdges(i))!=null?a:[]}))}function EF(e,t,n,o){if(n===void 0)return Ea(e,t,n,o);let i=!1,a=e.nodes();for(let s=0;s<a.length;s++){let l=a[s];if(l===void 0)continue;let u=o(l);for(let c=0;c<u.length;c++){let d=u[c];if(!d)continue;let f=d.v===l?d.v:d.w,h=f===d.v?d.w:d.v;n({v:f,w:h})<0&&(i=!0)}if(i)return lg(e,t,n,o)}return Ea(e,t,n,o)}var Vt=Xu;function nr(e,t,n,o){let i=o;for(;e.hasNode(i);)i=Ju(o);return n.dummy=t,e.setNode(i,n),i}function CF(e){let t=new Vt().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let o=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:o.weight+i.weight,minlen:Math.max(o.minlen,i.minlen)})}),t}function pg(e){let t=new Vt({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function Uf(e,t){let n=e.x,o=e.y,i=t.x-n,a=t.y-o,s=e.width/2,l=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");let u,c;return i===0||Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,c=l):(i<0&&(s=-s),u=s,c=s*a/i),{x:n+u,y:o+c}}function cs(e){let t=Jr(vg(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let o=e.node(n),i=o.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][o.order]=n)}),t}function SF(e){let t=e.nodes().map(o=>{let i=e.node(o).rank;return i===void 0?Number.MAX_VALUE:i}),n=It(Math.min,t);e.nodes().forEach(o=>{let i=e.node(o);Object.hasOwn(i,"rank")&&(i.rank-=n)})}function DF(e){let t=e.nodes().map(s=>e.node(s).rank).filter(s=>s!==void 0),n=It(Math.min,t),o=[];e.nodes().forEach(s=>{let l=e.node(s).rank-n;o[l]||(o[l]=[]),o[l].push(s)});let i=0,a=e.graph().nodeRankFactor;Array.from(o).forEach((s,l)=>{s===void 0&&l%a!==0?--i:s!==void 0&&i&&s.forEach(u=>e.node(u).rank+=i)})}function Gf(e,t,n,o){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=o),nr(e,"border",i,t)}function MF(e,t=mg){let n=[];for(let o=0;o<e.length;o+=t){let i=e.slice(o,o+t);n.push(i)}return n}var mg=65535;function It(e,t){if(t.length>mg){let n=MF(t);return e(...n.map(o=>e(...o)))}else return e(...t)}function vg(e){let t=e.nodes().map(n=>{let o=e.node(n).rank;return o===void 0?Number.MIN_VALUE:o});return It(Math.max,t)}function TF(e,t){let n={lhs:[],rhs:[]};return e.forEach(o=>{t(o)?n.lhs.push(o):n.rhs.push(o)}),n}function VF(e,t){return t()}var OF=0;function Ju(e){let t=++OF;return e+(""+t)}function Jr(e,t,n=1){t==null&&(t=e,e=0);let o=a=>a<t;n<0&&(o=a=>t<a);let i=[];for(let a=e;o(a);a+=n)i.push(a);return i}function Sa(e,t){let n={};for(let o of t)e[o]!==void 0&&(n[o]=e[o]);return n}function ds(e,t){let n;return typeof t=="string"?n=o=>o[t]:n=t,Object.entries(e).reduce((o,[i,a])=>(o[i]=n(a,i),o),{})}function $F(e,t){return e.reduce((n,o,i)=>(n[o]=t[i],n),{})}var fs="\0";function gg(e,t,n){var o,i,a,s,l,u;if(!(e&&t&&n&&t.dummy==="edge"&&n.dummy==="edge"&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let c=!0;t.edgeObj.w===n.edgeObj.w&&(c=!1);let d=c?(i=(o=e[t.edgeObj.v])==null?void 0:o.rank)!=null?i:NaN+1:(s=(a=e[t.edgeObj.w])==null?void 0:a.rank)!=null?s:NaN-1,f=Object.entries(e).find(g=>{var b,y;return((b=g[1].edgeObj)==null?void 0:b.v)===t.edgeObj.v&&((y=g[1].edgeObj)==null?void 0:y.w)===t.edgeObj.w&&g[1].rank===d}),h=Object.entries(e).find(g=>{var b,y;return((b=g[1].edgeObj)==null?void 0:b.v)===n.edgeObj.v&&((y=g[1].edgeObj)==null?void 0:y.w)===n.edgeObj.w&&g[1].rank===d});if(!f||!h)return 0;let p=(l=f[1].order)!=null?l:NaN,m=(u=h[1].order)!=null?u:NaN;return isNaN(p-m)?0:p-m}var BF=class{constructor(){eF(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Zf(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Zf(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,PF)),n=n._prev;return"["+e.join(", ")+"]"}};function Zf(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function PF(e,t){if(e!=="_next"&&e!=="_prev")return t}var AF=BF,YF=()=>1;function IF(e,t){if(e.nodeCount()<=1)return[];let n=RF(e,t||YF);return zF(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w)||[])}function zF(e,t,n){var o;let i=[],a=t[t.length-1],s=t[0],l;for(;e.nodeCount();){for(;l=s.dequeue();)Hs(e,t,n,l);for(;l=a.dequeue();)Hs(e,t,n,l);if(e.nodeCount()){for(let u=t.length-2;u>0;--u)if(l=(o=t[u])==null?void 0:o.dequeue(),l){i=i.concat(Hs(e,t,n,l,!0)||[]);break}}}return i}function Hs(e,t,n,o,i){let a=[],s=i?a:void 0;return(e.inEdges(o.v)||[]).forEach(l=>{let u=e.edge(l),c=e.node(l.v);i&&a.push({v:l.v,w:l.w}),c.out-=u,$l(t,n,c)}),(e.outEdges(o.v)||[]).forEach(l=>{let u=e.edge(l),c=l.w,d=e.node(c);d.in-=u,$l(t,n,d)}),e.removeNode(o.v),s}function RF(e,t){let n=new Vt,o=0,i=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let u=n.edge(l.v,l.w)||0,c=t(l),d=u+c;n.setEdge(l.v,l.w,d);let f=n.node(l.v),h=n.node(l.w);i=Math.max(i,f.out+=c),o=Math.max(o,h.in+=c)});let a=LF(i+o+3).map(()=>new AF),s=o+1;return n.nodes().forEach(l=>{$l(a,s,n.node(l))}),{graph:n,buckets:a,zeroIdx:s}}function $l(e,t,n){var o,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(o=e[0])==null||o.enqueue(n)}function LF(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function FF(e,t){(e.graph().acyclicer==="greedy"?IF(e,n(e)):HF(e,t??null)).forEach(o=>{let i=e.edge(o);e.removeEdge(o),i.forwardName=o.name,i.reversed=!0,e.setEdge(o.w,o.v,i,Ju("rev"))});function n(o){return i=>o.edge(i).weight}}function HF(e,t){let n=[],o={},i={};function a(u){Object.hasOwn(i,u)||(i[u]=!0,o[u]=!0,e.outEdges(u).forEach(c=>{Object.hasOwn(o,c.w)?n.push(c):a(c.w)}),delete o[u])}function s(u){var c;Object.hasOwn(i,u)||(i[u]=!0,o[u]=!0,(c=e.outEdges(u))==null||c.forEach(d=>{var f,h;Object.hasOwn(o,d.w)||((f=t.node(u))==null?void 0:f.rank)>((h=t.node(d.w))==null?void 0:h.rank)&&WF(e,d.w,d)?n.push(d):s(d.w)}),delete o[u])}let l=a;return t&&typeof t.node=="function"&&(l=s),e.sources().forEach(l),e.nodes().forEach(l),n}function jF(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let o=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,o)}})}function WF(e,t,n){let o=new Set;function i(a){var s;if(e.sources().includes(a))return!0;o.add(a);for(let l of(s=e.inEdges(a))!=null?s:[])if(!(l.v===n.v&&l.w===n.w)&&!o.has(l.v)&&i(l.v))return!0;return!1}return i(t)}function UF(e){e.graph().dummyChains=[],e.edges().forEach(t=>GF(e,t))}function GF(e,t){let n=t.v,o=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,l=e.edge(t),u=l.labelRank;if(a===o+1)return;e.removeEdge(t);let c,d,f;for(f=0,++o;o<a;++f,++o)l.points=[],d={width:0,height:0,edgeLabel:l,edgeObj:t,rank:o},c=nr(e,"edge",d,"_d"),o===u&&(d.width=l.width,d.height=l.height,d.dummy="edge-label",d.labelpos=l.labelpos),e.setEdge(n,c,{weight:l.weight},s),f===0&&e.graph().dummyChains.push(c),n=c;e.setEdge(n,i,{weight:l.weight},s)}function ZF(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),o=n.edgeLabel,i;for(e.setEdge(n.edgeObj,o);n.dummy;)i=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=i,n=e.node(t)})}function Qu(e){let t={};function n(o){let i=e.node(o);if(Object.hasOwn(t,o))return i.rank;t[o]=!0;let a=e.outEdges(o),s=a?a.map(u=>u==null?Number.POSITIVE_INFINITY:n(u.w)-e.edge(u).minlen):[],l=It(Math.min,s);return l===Number.POSITIVE_INFINITY&&(l=0),i.rank=l}e.sources().forEach(n)}function jo(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var yg=qF;function qF(e){let t=new Vt({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let o=n[0],i=e.nodeCount();t.setNode(o,{});let a,s;for(;XF(t,e)<i&&(a=KF(t,e),!!a);)s=t.hasNode(a.v)?jo(e,a):-jo(e,a),JF(t,e,s);return t}function XF(e,t){function n(o){let i=t.nodeEdges(o);i&&i.forEach(a=>{let s=a.v,l=o===s?a.w:s;!e.hasNode(l)&&!jo(t,a)&&(e.setNode(l,{}),e.setEdge(o,l,{}),n(l))})}return e.nodes().forEach(n),e.nodeCount()}function KF(e,t){return t.edges().reduce((n,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=jo(t,o)),i<n[0]?[i,o]:n},[Number.POSITIVE_INFINITY,null])[1]}function JF(e,t,n){e.nodes().forEach(o=>t.node(o).rank+=n)}var{preorder:QF,postorder:e5}=Ku,t5=mo;mo.initLowLimValues=tc;mo.initCutValues=ec;mo.calcCutValue=wg;mo.leaveEdge=_g;mo.enterEdge=xg;mo.exchangeEdges=kg;function mo(e){e=CF(e),Qu(e);let t=yg(e);tc(t),ec(t,e);let n,o;for(;n=_g(t);)o=xg(t,e,n),kg(t,e,n,o)}function ec(e,t){let n=e5(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(o=>n5(e,t,o))}function n5(e,t,n){let o=e.node(n).parent,i=e.edge(n,o);i.cutvalue=wg(e,t,n)}function wg(e,t,n){let o=e.node(n).parent,i=!0,a=t.edge(n,o),s=0;a||(i=!1,a=t.edge(o,n)),s=a.weight;let l=t.nodeEdges(n);return l&&l.forEach(u=>{let c=u.v===n,d=c?u.w:u.v;if(d!==o){let f=c===i,h=t.edge(u).weight;if(s+=f?h:-h,r5(e,n,d)){let p=e.edge(n,d).cutvalue;s+=f?-p:p}}}),s}function tc(e,t){arguments.length<2&&(t=e.nodes()[0]),bg(e,{},1,t)}function bg(e,t,n,o,i){let a=n,s=e.node(o);t[o]=!0;let l=e.neighbors(o);return l&&l.forEach(u=>{Object.hasOwn(t,u)||(n=bg(e,t,n,u,o))}),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function _g(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function xg(e,t,n){let o=n.v,i=n.w;t.hasEdge(o,i)||(o=n.w,i=n.v);let a=e.node(o),s=e.node(i),l=a,u=!1;return a.lim>s.lim&&(l=s,u=!0),t.edges().filter(c=>u===qf(e,e.node(c.v),l)&&u!==qf(e,e.node(c.w),l)).reduce((c,d)=>jo(t,d)<jo(t,c)?d:c)}function kg(e,t,n,o){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(o.v,o.w,{}),tc(e),ec(e,t),o5(e,t)}function o5(e,t){let n=e.nodes().find(i=>!e.node(i).parent);if(!n)return;let o=QF(e,[n]);o=o.slice(1),o.forEach(i=>{let a=e.node(i).parent,s=t.edge(i,a),l=!1;s||(s=t.edge(a,i),l=!0),t.node(i).rank=t.node(a).rank+(l?s.minlen:-s.minlen)})}function r5(e,t,n){return e.hasEdge(t,n)}function qf(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var i5=a5;function a5(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":Xf(e);break;case"tight-tree":l5(e);break;case"longest-path":s5(e);break;case"none":break;default:Xf(e)}}var s5=Qu;function l5(e){Qu(e),yg(e)}function Xf(e){t5(e)}var u5=c5;function c5(e){let t=f5(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(o=>{let i=e.node(o),a=i.edgeObj,s=d5(e,t,a.v,a.w),l=s.path,u=s.lca,c=0,d=l[c],f=!0;for(;o!==a.w;){if(i=e.node(o),f){for(;(d=l[c])!==u&&e.node(d).maxRank<i.rank;)c++;d===u&&(f=!1)}if(!f){for(;c<l.length-1&&e.node(l[c+1]).minRank<=i.rank;)c++;d=l[c]}d!==void 0&&e.setParent(o,d),o=e.successors(o)[0]}})}function d5(e,t,n,o){let i=[],a=[],s=Math.min(t[n].low,t[o].low),l=Math.max(t[n].lim,t[o].lim),u;u=n;do u=e.parent(u),i.push(u);while(u&&(t[u].low>s||l>t[u].lim));let c=u,d=o;for(;(d=e.parent(d))!==c;)a.push(d);return{path:i.concat(a.reverse()),lca:c}}function f5(e){let t={},n=0;function o(i){let a=n;e.children(i).forEach(o),t[i]={low:a,lim:n++}}return e.children(fs).forEach(o),t}function h5(e){let t=nr(e,"root",{},"_root"),n=p5(e),o=Object.values(n),i=It(Math.max,o)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=a);let s=m5(e)+1;e.children(fs).forEach(l=>{Ng(e,t,a,s,i,n,l)}),e.graph().nodeRankFactor=a}function Ng(e,t,n,o,i,a,s){var l;let u=e.children(s);if(!u.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}let c=Gf(e,"_bt"),d=Gf(e,"_bb"),f=e.node(s);e.setParent(c,s),f.borderTop=c,e.setParent(d,s),f.borderBottom=d,u.forEach(h=>{var p;Ng(e,t,n,o,i,a,h);let m=e.node(h),g=m.borderTop?m.borderTop:h,b=m.borderBottom?m.borderBottom:h,y=m.borderTop?o:2*o,_=g!==b?1:i-((p=a[s])!=null?p:0)+1;e.setEdge(c,g,{weight:y,minlen:_,nestingEdge:!0}),e.setEdge(b,d,{weight:y,minlen:_,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,c,{weight:0,minlen:i+((l=a[s])!=null?l:0)})}function p5(e){let t={};function n(o,i){let a=e.children(o);a&&a.length&&a.forEach(s=>n(s,i+1)),t[o]=i}return e.children(fs).forEach(o=>n(o,1)),t}function m5(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function v5(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var g5=y5;function y5(e){function t(n){let o=e.children(n),i=e.node(n);if(o.length&&o.forEach(t),i&&Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let a=i.minRank,s=i.maxRank+1;a<s;++a)Kf(e,"borderLeft","_bl",n,i,a),Kf(e,"borderRight","_br",n,i,a)}}e.children(fs).forEach(t)}function Kf(e,t,n,o,i,a){let s={width:0,height:0,rank:a,borderType:t},l=i[t][a-1],u=nr(e,"border",s,n);i[t][a]=u,e.setParent(u,o),l&&e.setEdge(l,u,{weight:1})}function w5(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="lr"||n==="rl")&&Eg(e)}function b5(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="bt"||n==="rl")&&_5(e),(n==="lr"||n==="rl")&&(x5(e),Eg(e))}function Eg(e){e.nodes().forEach(t=>Jf(e.node(t))),e.edges().forEach(t=>Jf(e.edge(t)))}function Jf(e){let t=e.width;e.width=e.height,e.height=t}function _5(e){e.nodes().forEach(t=>js(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(js),Object.hasOwn(o,"y")&&js(o)})}function js(e){e.y=-e.y}function x5(e){e.nodes().forEach(t=>Ws(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Ws),Object.hasOwn(o,"x")&&Ws(o)})}function Ws(e){let t=e.x;e.x=e.y,e.y=t}function k5(e,t=null){let n={},o=e.nodes().filter(c=>!e.children(c).length),i=o.map(c=>e.node(c).rank),a=It(Math.max,i),s=Jr(a+1).map(()=>[]);function l(c){if(n[c])return;n[c]=!0;let d=e.node(c);s[d.rank].push(c);let f=e.successors(c);f&&[...f].sort((h,p)=>u(h,p)).forEach(l)}o.sort((c,d)=>e.node(c).rank-e.node(d).rank).forEach(l);function u(c,d){let f=e.node(c),h=e.node(d);return gg(t,f,h)}return s}function N5(e,t){let n=0;for(let o=1;o<t.length;++o)n+=E5(e,t[o-1],t[o]);return n}function E5(e,t,n){let o=$F(n,n.map((c,d)=>d)),i=t.flatMap(c=>{let d=e.outEdges(c);return d?d.map(f=>({pos:o[f.w],weight:e.edge(f).weight})).sort((f,h)=>f.pos-h.pos):[]}),a=1;for(;a<n.length;)a<<=1;let s=2*a-1;a-=1;let l=new Array(s).fill(0),u=0;return i.forEach(c=>{let d=c.pos+a;l[d]+=c.weight;let f=0;for(;d>0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=c.weight;u+=c.weight*f}),u}function C5(e,t=[]){return t.map(n=>{let o=e.inEdges(n);if(!o||!o.length)return{v:n};{let i=o.reduce((a,s)=>{let l=e.edge(s),u=e.node(s.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function S5(e,t){let n={};e.forEach((i,a)=>{let s={indegree:0,in:[],out:[],vs:[i.v],i:a};i.barycenter!==void 0&&(s.barycenter=i.barycenter,s.weight=i.weight),n[i.v]=s}),t.edges().forEach(i=>{let a=n[i.v],s=n[i.w];a!==void 0&&s!==void 0&&(s.indegree++,a.out.push(s))});let o=Object.values(n).filter(i=>!i.indegree);return D5(o)}function D5(e){let t=[];function n(i){return a=>{a.merged||(a.barycenter===void 0||i.barycenter===void 0||a.barycenter>=i.barycenter)&&M5(i,a)}}function o(i){return a=>{a.in.push(i),--a.indegree===0&&e.push(a)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(o(i))}return t.filter(i=>!i.merged).map(i=>Sa(i,["vs","i","barycenter","weight"]))}function M5(e,t){let n=0,o=0;e.weight&&(n+=e.barycenter*e.weight,o+=e.weight),t.weight&&(n+=t.barycenter*t.weight,o+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/o,e.weight=o,e.i=Math.min(t.i,e.i),t.merged=!0}function T5(e,t,n,o,i){let a={},s=null,l=null,u=i;typeof t=="boolean"?(u=t,a={}):t&&(a=t,s=n??null,l=o??null);let c=TF(e,y=>Object.hasOwn(y,"barycenter")),d=c.lhs,f=c.rhs.sort((y,_)=>_.i-y.i),h=[],p=0,m=0,g=0;d.sort(V5(l,s,!!u));for(let[y,_]of Object.entries(a)){let w=d.findIndex(v=>v.vs[0]===y);d.splice(w+1,0,_)}g=Qf(h,f,g),d.forEach(y=>{g+=y.vs.length,h.push(y.vs),p+=y.barycenter*y.weight,m+=y.weight,g=Qf(h,f,g)});let b={vs:h.flat(1)};return m&&(b.barycenter=p/m,b.weight=m),b}function Qf(e,t,n){let o;for(;t.length&&(o=t[t.length-1]).i<=n;)t.pop(),e.push(o.vs),n++;return n}function V5(e,t,n){return(o,i)=>{if(o.barycenter<i.barycenter)return-1;if(o.barycenter>i.barycenter)return 1;if(e&&(typeof o.vs[0]=="string"||typeof i.vs[0]=="string")){let a=e.node(o.vs[0]),s=e.node(i.vs[0]),l=gg(t,a,s);if(l!==0)return l}return n?i.i-o.i:o.i-i.i}}function Cg(e,t,n,o,i){var a,s,l,u,c,d,f,h,p,m,g;let b=null,y=i;typeof o=="boolean"?(y=o,b=null):o!==void 0&&(b=o);let _=e.children(t),w=e.node(t),v=w?w.borderLeft:void 0,N=w?w.borderRight:void 0,T={};v&&(_=_.filter(x=>x!==v&&x!==N));let V=C5(e,_);V.forEach(x=>{if(e.children(x.v).length){let{result:R}=Cg(e,x.v,n,b,y);T[x.v]=R,Object.hasOwn(R,"barycenter")&&$5(x,R)}});let $=S5(V,n);O5($,T);let P={},A=!1;for(let x=0;x<$.length;x++)for(let R=x+1;R<$.length;R++)if(!(!$[x]||!$[R]||!((a=$[x])!=null&&a.barycenter)||!((s=$[R])!=null&&s.barycenter))&&((l=$[x])==null?void 0:l.barycenter)===$[R].barycenter){let k=(c=(u=$[x])==null?void 0:u.vs[0])!=null?c:"",M=(f=(d=$[R])==null?void 0:d.vs[0])!=null?f:"",S=e.node(k),L=e.node(M);if(S.dummy==="edge"&&L.dummy==="edge"&&((h=S.edgeObj)==null?void 0:h.v)===((p=L.edgeObj)==null?void 0:p.v)&&((m=S.edgeObj)==null?void 0:m.w)===((g=L.edgeObj)==null?void 0:g.w))if(S.edgeLabel.reversed){P[M]=$[x],$.splice(x,1),x--;break}else P[k]||(P[k]=$[R],$.splice(R,1),R--);else A=!0}let O=T5($,P,b,e,y);if(v&&N){O.vs=[v,O.vs,N].flat(1);let x=e.predecessors(v);if(x&&x.length){let R=e.node(x[0]),k=e.predecessors(N),M=e.node(k[0]);Object.hasOwn(O,"barycenter")||(O.barycenter=0,O.weight=0),O.barycenter=(O.barycenter*O.weight+R.order+M.order)/(O.weight+2),O.weight+=2}}return Object.defineProperty(O,"result",{value:O,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(O,"usedBias",{value:A,enumerable:!1,configurable:!0,writable:!0}),O}function O5(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(o=>t[o]?t[o].vs:o)})}function $5(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function B5(e,t,n,o){o||(o=e.nodes());let i=P5(e),a=new Vt({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(s=>e.node(s));return o.forEach(s=>{let l=e.node(s),u=e.parent(s);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){a.setNode(s),a.setParent(s,u||i);let c=e[n](s);c&&c.forEach(d=>{let f=d.v===s?d.w:d.v,h=a.edge(f,s),p=h!==void 0?h.weight:0;a.setEdge(f,s,{weight:e.edge(d).weight+p})}),Object.hasOwn(l,"minRank")&&a.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),a}function P5(e){let t;for(;e.hasNode(t=Ju("_root")););return t}function A5(e,t,n){let o={},i;n.forEach(a=>{let s=e.parent(a),l,u;for(;s;){if(l=e.parent(s),l?(u=o[l],o[l]=s):(u=i,i=s),u&&u!==s){t.setEdge(u,s);return}s=l}})}function Sg(e,t={},n=null){if(typeof t.customOrder=="function"){t.customOrder(e,Sg);return}let o=vg(e),i=eh(e,Jr(1,o+1),"inEdges"),a=eh(e,Jr(o-1,-1,-1),"outEdges"),s=k5(e,n);if(th(e,s),t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,u,c=t.constraints||[];for(let d=0,f=0;f<4;++d,++f){Y5(d%2?i:a,d%4>=2,c,n),s=cs(e);let h=N5(e,s);h<l?(f=0,u=Object.assign({},s),l=h):h===l&&(u=structuredClone(s))}th(e,u)}function eh(e,t,n){let o=new Map,i=(a,s)=>{o.has(a)||o.set(a,[]),o.get(a).push(s)};for(let a of e.nodes()){let s=e.node(a);if(typeof s.rank=="number"&&i(s.rank,a),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&i(l,a)}return t.map(function(a){return B5(e,a,n,o.get(a)||[])})}function Y5(e,t,n,o){let i=!0,a=new Vt;e.forEach(function(s){n.forEach(d=>a.setEdge(d.left,d.right));let l=s.graph().root,{result:u,usedBias:c}=Cg(s,l,a,o,i);t&&c&&(i=!i),u.vs.forEach((d,f)=>s.node(d).order=f),A5(s,a,u.vs)})}function th(e,t){Object.values(t).forEach(n=>n.forEach((o,i)=>e.node(o).order=i))}function I5(e,t){let n={};function o(i,a){let s=0,l=0,u=i.length,c=a[a.length-1];return a.forEach((d,f)=>{let h=R5(e,d),p=h?e.node(h).order:u;(h||d===c)&&(a.slice(l,f+1).forEach(m=>{let g=e.predecessors(m);g&&g.forEach(b=>{let y=e.node(b),_=y.order;(_<s||p<_)&&!(y.dummy&&e.node(m).dummy)&&Dg(n,b,m)})}),l=f+1,s=p)}),a}return t.length&&t.reduce(o),n}function z5(e,t){let n={};function o(s){var l;return((l=e.node(s))==null?void 0:l.dummy)==="border"}if(!e.nodes().some(o))return n;function i(s,l,u,c,d){Jr(l,u).forEach(f=>{let h=s[f];if(h!==void 0&&e.node(h).dummy){let p=e.predecessors(h);p&&p.forEach(m=>{if(m===void 0)return;let g=e.node(m);g.dummy&&(g.order<c||g.order>d)&&Dg(n,m,h)})}})}function a(s,l){let u=-1,c=-1,d=0;return l.forEach((f,h)=>{if(o(f)){let p=e.predecessors(f);if(p&&p.length){let m=p[0];if(m===void 0)return;c=e.node(m).order,i(l,d,h,u,c),d=h,u=c}}i(l,d,l.length,c,s.length)}),l}return t.length&&t.reduce(a),n}function R5(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(o=>e.node(o).dummy)}}function Dg(e,t,n){if(t>n){let i=t;t=n,n=i}let o=e[t];o||(e[t]=o={}),o[n]=!0}function L5(e,t,n){if(t>n){let i=t;t=n,n=i}let o=e[t];return o!==void 0&&Object.hasOwn(o,n)}function F5(e,t,n,o,i){let a={},s={},l={};return t.forEach(u=>{u.forEach((c,d)=>{a[c]=c,s[c]=c,l[c]=d})}),t.forEach(u=>{let c=-1,d=-1,f=!1,h=u,p=u.findIndex(m=>i?.includes(m)||nh(m,e,i));p>0&&(h=[u[p],...u.slice(0,p),...u.slice(p+1)],f=!0),h.forEach(m=>{var g;let b=o(m);if(b&&b.length){i!=null&&i.includes(m)&&(b=b.filter(w=>nh(w,e,i)));let y=b.sort((w,v)=>{let N=l[w],T=l[v];return(N!==void 0?N:0)-(T!==void 0?T:0)}),_=(y.length-1)/2;for(let w=Math.floor(_),v=Math.ceil(_);w<=v;++w){let N=y[w];if(N===void 0)continue;let T=l[N];if(T!==void 0&&s[m]===m&&c<T&&l[N]!==d&&!L5(n,m,N)){let V=a[N];V!==void 0&&(s[N]=m,s[m]=a[m]=V,c=T,f&&(c=-1,d=(g=l[N])!=null?g:-1,f=!1))}}}})}),{root:a,align:s}}function H5(e,t,n,o,i=!1){let a={},s=j5(e,t,n,i),l=i?"borderLeft":"borderRight";function u(p,m){let g=s.nodes().slice(),b={},y=g.pop();for(;y;){if(b[y])p(y);else{b[y]=!0,g.push(y);for(let _ of m(y))g.push(_)}y=g.pop()}}function c(p){let m=s.inEdges(p);m?a[p]=m.reduce((g,b)=>{var y;let _=(y=a[b.v])!=null?y:0,w=s.edge(b);return Math.max(g,_+(w!==void 0?w:0))},0):a[p]=0}function d(p){let m=s.outEdges(p),g=Number.POSITIVE_INFINITY;m&&(g=m.reduce((y,_)=>{let w=a[_.w],v=s.edge(_);return Math.min(y,(w!==void 0?w:0)-(v!==void 0?v:0))},Number.POSITIVE_INFINITY));let b=e.node(p);g!==Number.POSITIVE_INFINITY&&b.borderType!==l&&(a[p]=Math.max(a[p]!==void 0?a[p]:0,g))}function f(p){return s.predecessors(p)||[]}function h(p){return s.successors(p)||[]}return u(c,f),u(d,h),Object.keys(o).forEach(p=>{var m;let g=n[p];g!==void 0&&(a[p]=(m=a[g])!=null?m:0)}),a}function j5(e,t,n,o){let i=new Vt,a=e.graph(),s=q5(a.nodesep,a.edgesep,o);return t.forEach(l=>{let u;l.forEach(c=>{let d=n[c];if(d!==void 0){if(i.setNode(d),u!==void 0){let f=n[u];if(f!==void 0){let h=i.edge(f,d);i.setEdge(f,d,Math.max(s(e,c,u),h||0))}}u=c}})}),i}function W5(e,t){return Object.values(t).reduce((n,o)=>{let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;Object.entries(o).forEach(([l,u])=>{let c=X5(e,l)/2;i=Math.max(u+c,i),a=Math.min(u-c,a)});let s=i-a;return s<n[0]&&(n=[s,o]),n},[Number.POSITIVE_INFINITY,null])[1]}function U5(e,t){let n=Object.values(t),o=It(Math.min,n),i=It(Math.max,n);["u","d"].forEach(a=>{["l","r"].forEach(s=>{let l=a+s,u=e[l];if(!u||u===t)return;let c=Object.values(u),d=o-It(Math.min,c);s!=="l"&&(d=i-It(Math.max,c)),d&&(e[l]=ds(u,f=>f+d))})})}function G5(e,t=void 0){let n=e.ul;return n?ds(n,(o,i)=>{var a,s;if(t){let u=t.toLowerCase(),c=e[u];if(c&&c[i]!==void 0)return c[i]}let l=Object.values(e).map(u=>{let c=u[i];return c!==void 0?c:0}).sort((u,c)=>u-c);return(((a=l[1])!=null?a:0)+((s=l[2])!=null?s:0))/2}):{}}function Z5(e,t){let n=cs(e),o=Object.assign(I5(e,n),z5(e,n)),i={},a;["u","d"].forEach(l=>{a=l==="u"?n:Object.values(n).reverse(),["l","r"].forEach(u=>{u==="r"&&(a=a.map(f=>Object.values(f).reverse()));let c=F5(e,a,o,f=>(l==="u"?e.predecessors(f):e.successors(f))||[],t),d=H5(e,a,c.root,c.align,u==="r");u==="r"&&(d=ds(d,f=>-f)),i[l+u]=d})});let s=W5(e,i);return U5(i,s),G5(i,e.graph().align)}function q5(e,t,n){return(o,i,a)=>{let s=o.node(i),l=o.node(a),u=0,c;if(u+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=-s.width/2;break;case"r":c=s.width/2;break}if(c&&(u+=n?c:-c),c=void 0,u+=(s.dummy?t:e)/2,u+=(l.dummy?t:e)/2,u+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":c=l.width/2;break;case"r":c=-l.width/2;break}return c&&(u+=n?c:-c),u}}function X5(e,t){return e.node(t).width}function nh(e,t,n){var o;if(!n)return!1;let i=(o=t.node(e))==null?void 0:o.edgeObj;if(!i||t.node(e).edgeLabel.reversed)return!1;let a=n.indexOf(i?.v),s=n.indexOf(i?.w);return a!==-1&&s!==-1&&a===(s+1)%n.length||a===(s-1)%n.length}function K5(e,t){e=pg(e),J5(e),Object.entries(Z5(e,t)).forEach(([n,o])=>e.node(n).x=o)}function J5(e){let t=cs(e),n=e.graph(),o=n.ranksep,i=n.rankalign,a=0;t.forEach(s=>{let l=s.reduce((u,c)=>{var d;let f=(d=e.node(c).height)!=null?d:0;return u>f?u:f},0);s.forEach(u=>{let c=e.node(u);i==="top"?c.y=a+c.height/2:i==="bottom"?c.y=a+l-c.height/2:c.y=a+l/2}),a+=l+o})}var oh=new WeakMap;function Q5(e,t={}){return Mg(e,VF,t),e}function rh(e,t,n){let o=t;for(;o!==void 0;){let i=e.parent(o);if(i===n)return o;o=i}}function Mg(e,t,n){var o;let i=e.nodes().filter(_=>e.children(_).length),a={};i.forEach(_=>{let w=e.node(_);if(w&&w.rankdir){let v=new Vt({multigraph:!0,compound:!0});v.setGraph({rankdir:w.rankdir});let N=e.children(_);N.forEach(k=>{let M={...e.node(k)};v.setNode(k,M);let S=e.parent(k);S&&S!==_&&N.includes(S)&&v.setParent(k,S)});let T=new Set;e.edges().forEach(k=>{let M=rh(e,k.v,_),S=rh(e,k.w,_);if(M===k.v&&S===k.w)v.setEdge(k,{...e.edge(k)});else if(M&&S&&M!==S){let L=`${M}\0${S}`;T.has(L)||(T.add(L),v.setEdge(M,S,{...e.edge(k)}))}}),Mg(v,t,n);let V=uh(v);ah(V,t,n,null),sh(v,V);let $=1/0,P=1/0,A=-1/0,O=-1/0;v.nodes().forEach(k=>{if(k===_)return;let M=v.node(k);M&&typeof M.x=="number"&&typeof M.y=="number"&&typeof M.width=="number"&&typeof M.height=="number"&&($=Math.min($,M.x-M.width/2),A=Math.max(A,M.x+M.width/2),P=Math.min(P,M.y-M.height/2),O=Math.max(O,M.y+M.height/2))}),(!isFinite($)||!isFinite(P)||!isFinite(A)||!isFinite(O))&&($=P=0,A=O=0);let x=A-$,R=O-P;a[_]={minX:$,minY:P,maxX:A,maxY:O,width:x,height:R,offsetX:$,offsetY:P},w._dagreClusterSubgraph=v}});let s=[],l=_=>{let w=[],v=(e.children(_)||[]).filter(N=>N!==_);for(;v.length>0;){let N=v.shift();w.push(N),(e.children(N)||[]).filter(T=>T!==N).forEach(T=>v.push(T))}return w},u=new Map;i.forEach(_=>{let w=e.node(_);w&&w.rankdir&&a[_]&&u.set(_,(e.children(_)||[]).filter(v=>v!==_))});let c=new Set([...u.values()].flat()),d=new Map;u.forEach((_,w)=>{c.has(w)||d.set(w,l(w))});let f=new Set([...d.values()].flat()),h=_=>{for(let[w,v]of d)if(v.includes(_))return w;return _},p=[];e.edges().forEach(_=>{(f.has(_.v)||f.has(_.w))&&p.push({edge:_,label:e.edge(_)})});let m=new Map;f.forEach(_=>{let w=e.parent(_);m.set(_,typeof w=="string"?w:void 0)}),d.forEach((_,w)=>{let v=e.node(w),N=[];_.forEach($=>{let P=e.node($);P&&(N.push({id:$,node:P,parent:m.get($)}),e.removeNode($))});let T=p.filter(({edge:$})=>_.includes($.v)||_.includes($.w)),V=a[w];v&&(s.push({clusterId:w,subgraph:v._dagreClusterSubgraph,bounds:V,children:_,removedNodes:N,removedEdges:T}),v.width=V.width,v.height=V.height)});let g=new Set;p.forEach(({edge:_,label:w})=>{let v=h(_.v),N=h(_.w);if(v!==N&&e.hasNode(v)&&e.hasNode(N)){let T=`${v}\0${N}`;g.has(T)||(g.add(T),e.setEdge(v,N,{...w,width:0,height:0}))}});let b=uh(e),y=ah(b,t,n,(o=oh.get(e))!=null?o:null);oh.set(e,y),sh(e,b),g.forEach(_=>{let w=_.indexOf("\0"),v=_.slice(0,w),N=_.slice(w+1);e.hasEdge(v,N)&&e.removeEdge(v,N)}),s.forEach(({clusterId:_,subgraph:w,bounds:v,removedNodes:N,removedEdges:T})=>{var V,$;let P=e.node(_),A=(V=P?.x)!=null?V:0,O=($=P?.y)!=null?$:0,x=(v.minX+v.maxX)/2,R=(v.minY+v.maxY)/2;N.forEach(({id:k,node:M,parent:S})=>{e.setNode(k,M),S!==void 0&&e.setParent(k,S)}),T.forEach(({edge:k,label:M})=>{e.setEdge(k,M)}),w.nodes().forEach(k=>{if(k===_)return;let M=w.node(k),S=e.node(k);S&&M&&typeof M.x=="number"&&typeof M.y=="number"&&(S.x=A+(M.x-x),S.y=O+(M.y-R))}),ih(e,w,A-x,O-R),delete P._dagreClusterSubgraph}),i.forEach(_=>{var w,v;let N=e.node(_),T=a[_];if(N&&N.rankdir&&N._dagreClusterSubgraph&&T){let V=N._dagreClusterSubgraph,$=(w=N.x)!=null?w:0,P=(v=N.y)!=null?v:0,A=(T.minX+T.maxX)/2,O=(T.minY+T.maxY)/2;V.nodes().forEach(x=>{if(x===_)return;let R=V.node(x),k=e.node(x);if(k&&R&&typeof R.x=="number"&&typeof R.y=="number"){let M=R.x-A,S=R.y-O;k.x=$+M,k.y=P+S}}),ih(e,V,$-A,P-O),delete N._dagreClusterSubgraph}})}function ih(e,t,n,o){t.edges().forEach(i=>{if(!e.hasEdge(i))return;let a=t.edge(i),s=e.edge(i);s.points=a.points.map(l=>({x:l.x+n,y:l.y+o})),Object.hasOwn(a,"x")&&(s.x=a.x+n,s.y=a.y+o)})}function ah(e,t,n,o=null){var i,a;let s=n?.useDynamic!==!1,l=s&&(i=o?.graph)!=null?i:null,u=s&&(a=o?.rawNodes)!=null?a:null;t(" makeSpaceForEdgeLabels",()=>sH(e)),t(" removeSelfEdges",()=>vH(e)),t(" acyclic",()=>FF(e,l)),t(" nestingGraph.run",()=>h5(e)),t(" rank",()=>i5(pg(e))),t(" injectEdgeLabelProxies",()=>lH(e)),t(" removeEmptyRanks",()=>DF(e)),t(" nestingGraph.cleanup",()=>v5(e)),t(" normalizeRanks",()=>SF(e)),t(" assignRankMinMax",()=>uH(e)),t(" removeEdgeLabelProxies",()=>cH(e)),t(" normalize.run",()=>UF(e)),t(" parentDummyChains",()=>u5(e)),t(" addBorderSegments",()=>g5(e)),t(" order",()=>Sg(e,n,u)),t(" insertSelfEdges",()=>gH(e)),t(" adjustCoordinateSystem",()=>w5(e)),t(" position",()=>K5(e,n.corePath)),t(" positionSelfEdges",()=>yH(e));let c=JSON.parse(JSON.stringify(e._nodes));return t(" removeBorderNodes",()=>mH(e)),t(" normalize.undo",()=>ZF(e)),t(" fixupEdgeLabelCoords",()=>hH(e)),t(" undoCoordinateSystem",()=>b5(e)),t(" translateGraph",()=>dH(e)),t(" assignNodeIntersects",()=>fH(e)),t(" reversePoints",()=>pH(e)),t(" acyclic.undo",()=>jF(e)),{graph:e,rawNodes:c}}function sh(e,t){e.nodes().forEach(n=>{let o=e.node(n),i=t.node(n);o&&(o.x=i.x,o.y=i.y,o.order=i.order,o.rank=i.rank,t.children(n).length&&(o.width=i.width,o.height=i.height))}),e.edges().forEach(n=>{let o=e.edge(n),i=t.edge(n);o.points=i.points,Object.hasOwn(i,"x")&&(o.x=i.x,o.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var eH=["nodesep","edgesep","ranksep","marginx","marginy"],tH={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},nH=["acyclicer","ranker","rankdir","align","rankalign"],oH=["width","height","rank"],lh={width:0,height:0},rH=["minlen","weight","width","height","labeloffset"],iH={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},aH=["labelpos"];function uh(e){let t=new Vt({multigraph:!0,compound:!0}),n=Gs(e.graph());return t.setGraph(Object.assign({},tH,Us(n,eH),Sa(n,nH))),e.nodes().forEach(o=>{let i=Gs(e.node(o)),a=Us(i,oH);Object.keys(lh).forEach(l=>{a[l]===void 0&&(a[l]=lh[l])}),t.setNode(o,a);let s=e.parent(o);s!==void 0&&t.setParent(o,s)}),e.edges().forEach(o=>{let i=Gs(e.edge(o));t.setEdge(o,Object.assign({},iH,Us(i,rH),Sa(i,aH)))}),t}function sH(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{var o;let i=e.edge(n);i.minlen*=2,((o=i.labelpos)!=null?o:"r").toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function lH(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let o=e.node(t.v),i={rank:(e.node(t.w).rank-o.rank)/2+o.rank,e:t};nr(e,"edge-proxy",i,"_ep")}})}function uH(e){let t=0;e.nodes().forEach(n=>{let o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=Math.max(t,o.maxRank))}),e.graph().maxRank=t}function cH(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let o=n;e.edge(o.e).labelRank=n.rank,e.removeNode(t)}})}function dH(e){let t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;function u(c){let d=c.x,f=c.y,h=c.width,p=c.height;t=Math.min(t,d-h/2),n=Math.max(n,d+h/2),o=Math.min(o,f-p/2),i=Math.max(i,f+p/2)}e.nodes().forEach(c=>u(e.node(c))),e.edges().forEach(c=>{let d=e.edge(c);Object.hasOwn(d,"x")&&u(d)}),t-=s,o-=l,e.nodes().forEach(c=>{let d=e.node(c);d.x-=t,d.y-=o}),e.edges().forEach(c=>{let d=e.edge(c);d.points.forEach(f=>{f.x-=t,f.y-=o}),Object.hasOwn(d,"x")&&(d.x-=t),Object.hasOwn(d,"y")&&(d.y-=o)}),a.width=n-t+s,a.height=i-o+l}function fH(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),o=e.node(t.v),i=e.node(t.w),a,s;n.points?(a=n.points[0],s=n.points[n.points.length-1]):(n.points=[],a=i,s=o),n.points.unshift(Uf(o,a)),n.points.push(Uf(i,s))})}function hH(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(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;break}})}function pH(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function mH(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),s=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function vH(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function gH(e){cs(e).forEach(t=>{let n=0;t.forEach((o,i)=>{let a=e.node(o);typeof a.rank!="number"&&(a.rank=0),a.order=i+n,(a.selfEdges||[]).forEach(s=>{nr(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:i+ ++n,e:s.e,edgeLabel:s.label},"_se"),(!Array.isArray(s.label.points)||s.label.points.length!==7)&&(s.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete a.selfEdges})})}function yH(e){e.nodes().forEach(t=>{let n=e.node(t),o=i=>typeof i=="number"&&isFinite(i);if(n.dummy==="selfedge"){let i=n,a=e.node(i.e.v),s=o(a?.x)?a.x:0,l=o(a?.y)?a.y:0,u=o(a?.width)?a.width:0,c=o(a?.height)?a.height:0,d=o(n.x)?n.x:s,f=o(n.y)?n.y:l,h=u/2,p=c/2;i.edgeLabel.points=[{x:d+h,y:f-p},{x:d+h,y:f-p},{x:d,y:f},{x:d-h,y:f+p},{x:d-h,y:f+p},{x:d,y:f},{x:d,y:f}],i.edgeLabel.x=d,i.edgeLabel.y=f,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(i=>{if(!Array.isArray(i.label.points)||i.label.points.length!==7){let a=o(n.x)?n.x:0,s=o(n.y)?n.y:0,l=o(n.width)?n.width:0,u=o(n.height)?n.height:0,c=l/2,d=u/2;i.label.points=[{x:a+c,y:s-d},{x:a+c,y:s-d},{x:a,y:s},{x:a-c,y:s+d},{x:a-c,y:s+d},{x:a,y:s},{x:a,y:s}]}})})}function Us(e,t){return ds(Sa(e,t),Number)}function Gs(e){let t={};return e&&Object.entries(e).forEach(([n,o])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=o}),t}const Ui=400,Gi=160,Sn=64,wH=(e,t,n)=>{const o=typeof e?.id=="string"&&e.id?e.id:`__invalid-rule-${t}`,i=n.has(o)?`__duplicate-${o}-${t}`:o;return n.add(i),{id:i,rule:e}},bH=e=>new Map(e.filter(({id:t,rule:n})=>n?.id===t).map(({rule:t})=>[t.id,t])),_H=e=>{const t=new Vt({multigraph:!0}).setGraph({rankdir:"TB",nodesep:128,ranksep:112,marginx:32,marginy:32});return t.setDefaultEdgeLabel(()=>({})),e.forEach(({id:n})=>t.setNode(n,{width:Ui,height:Gi})),t},xH=(e,t,n)=>{const o=Array.isArray(e?.rules)?e.rules:[],i=new Set,a=o.map((s,l)=>wH(s,l,i));return{flow:e,nodeTypes:t,readOnly:n,rules:o,entries:a,ruleById:bH(a),usedNodeIds:i,usedEdgeIds:new Set,graph:_H(a),presentationFor:s=>t.find(l=>l.type===s)??ig(s)}},ch=(e,t)=>{let n=e,o=0;for(;t.has(n);)n=`${e}-${++o}`;return t.add(n),n},nc=(e,t)=>Array.isArray(e?.edges?.[t])?e.edges[t].length:0,Tg=(e,t,n)=>{const o=e?.rules?.find(i=>i?.id===t)?.action;return n.find(i=>i.type===o)?.maxChildren},oc=(e,t,n)=>{const o=Tg(e,t,n);return o==null?1:Math.max(0,o-nc(e,t))},rc=(e,t,n)=>{const o=Tg(e,t,n);if(!(o===void 0||nc(e,t)<o))return`A regra ${t} atingiu o limite de ${o} etapas filhas.`},kH="#6d3595",NH=(e,t,n,o)=>{if(!n?.id||!e.ruleById.has(n.nextRuleId))return[];const i=e.usedEdgeIds.has(n.id)?`__duplicate-edge-${t}-${o}`:n.id,a=e.presentationFor(e.ruleById.get(t).action).color;return e.usedEdgeIds.add(i),e.graph.setEdge(t,n.nextRuleId,{},i),[{id:i,source:t,target:n.nextRuleId,type:"smoothstep",animated:!0,updatable:!e.readOnly,selectable:!e.readOnly,focusable:!e.readOnly,interactionWidth:18,markerEnd:{type:_a.ArrowClosed,color:a},style:{stroke:a,strokeWidth:2,strokeDasharray:"7 6"}}]},EH=(e,t,n)=>!e.ruleById.has(t)||!Array.isArray(n)?[]:n.flatMap((o,i)=>NH(e,t,o,i)),CH=e=>Object.entries(e.flow?.edges??{}).flatMap(([t,n])=>EH(e,t,n)),SH=(e,t,n)=>({id:n,source:e,target:t,type:"smoothstep",animated:!0,updatable:!1,selectable:!1,focusable:!1,deletable:!1,interactionWidth:0,data:{isAddControl:!0},style:{stroke:kH,strokeWidth:2,strokeDasharray:"7 6"}}),DH=(e,t,n)=>{if(t.rule?.id!==t.id)return[];const o=nc(e.flow,t.id);if(oc(e.flow,t.id,e.nodeTypes)<=0)return[];const a=ch(`__workflow-add__${t.id}__${o}`,e.usedNodeIds),s=ch(`__workflow-add-edge__${t.id}__${o}`,e.usedEdgeIds);return e.graph.setNode(a,{width:Sn,height:Sn}),e.graph.setEdge(t.id,a,{},s),n.push(SH(t.id,a,s)),[{id:a,parentRule:t.rule}]},MH=(e,t)=>e.readOnly||e.nodeTypes.length===0?[]:e.entries.flatMap(n=>DH(e,n,t)),TH=(e,t)=>{const{id:n,rule:o}=t,i=e.graph.node(n)??{x:Ui/2,y:Gi/2},a=e.presentationFor(o.action);return{id:n,type:"workflow",position:{x:i.x-Ui/2,y:i.y-Gi/2},width:Ui,height:Gi,sourcePosition:le.Bottom,targetPosition:le.Top,draggable:!e.readOnly,connectable:!e.readOnly,selectable:!0,focusable:!0,deletable:!1,ariaLabel:`${a.label}: ${o.name}`,data:{rule:o,presentation:a,readOnly:e.readOnly,canConnect:!e.readOnly&&oc(e.flow,o.id,e.nodeTypes)>0,canDelete:!e.readOnly&&(o.isRoot!==!0||e.rules.length===1)}}},VH=e=>e.entries.map(t=>TH(e,t)),OH=(e,t)=>{const n=e.node(t.id)??{x:Sn/2,y:Sn/2};return{id:t.id,type:"workflow-add",position:{x:n.x-Sn/2,y:n.y-Sn/2},width:Sn,height:Sn,targetPosition:le.Top,draggable:!1,connectable:!1,selectable:!0,focusable:!1,deletable:!1,ariaLabel:`Adicionar etapa após ${t.parentRule.name}`,data:{isAddControl:!0,parentRule:t.parentRule}}},$H=(e,t)=>t.map(n=>OH(e,n)),dh=(e,t,n)=>{const o=xH(e,t,n),i=CH(o),a=MH(o,i);return Q5(o.graph),{nodes:[...VH(o),...$H(o.graph,a)],edges:i}},Vg=e=>e?.edges&&typeof e.edges=="object"&&!Array.isArray(e.edges)?e.edges:{},BH=e=>{const t=[],n=e.map(a=>a?.id).filter(Boolean),o=new Set(n);n.length!==e.length&&t.push("Todas as regras devem possuir um identificador."),o.size!==n.length&&t.push("Existem regras com identificadores duplicados.");const i=e.filter(a=>a?.isRoot===!0);return e.length>0&&i.length!==1&&t.push("Um fluxo não vazio deve possuir exatamente uma regra com isRoot igual a true."),{knownIds:o,reasons:t}},PH=(e,t,n,o)=>{const i=[];return e?.id||i.push(`Uma conexão de ${t} não possui identificador.`),e?.id&&o.has(e.id)&&i.push(`A conexão ${e.id} está duplicada.`),e?.id&&o.add(e.id),n.has(e?.nextRuleId)||i.push(`O destino ${String(e?.nextRuleId)} não corresponde a uma regra existente.`),i},AH=(e,t,n,o)=>{const i=n.has(e)?[]:[`A origem ${e} não corresponde a uma regra existente.`];return Array.isArray(t)?[...i,...t.flatMap(a=>PH(a,e,n,o))]:[...i,`As conexões de ${e} devem ser uma lista.`]},YH=(e,t)=>{const n=new Set;return Object.entries(Vg(e)).flatMap(([o,i])=>AH(o,i,t,n))},Og=e=>{if(!e||typeof e!="object")return["O fluxo deve ser um objeto."];if(!Array.isArray(e.rules))return["O fluxo deve possuir uma lista de regras."];const{knownIds:t,reasons:n}=BH(e.rules);return[...new Set([...n,...YH(e,t)])]},$g=(e,t,n,o)=>(Vg(e)[t]??[]).some(i=>i?.id!==o&&i?.nextRuleId===n),Bl=()=>globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random().toString(16).slice(2)}`,or=e=>({...e??{},rules:Array.isArray(e?.rules)?e.rules.map(t=>({...t})):[],edges:Object.fromEntries(Object.entries(e?.edges??{}).map(([t,n])=>[t,Array.isArray(n)?n.map(o=>({...o})):n]))}),rr=(e,t)=>{const n=Og(e);return n.length?{error:{mutation:t,reason:n[0]}}:{flow:e,mutation:t}},pt=(e,t)=>({error:{mutation:e,reason:t}}),ic=(e,t,n)=>{e.edges[t]=[...e.edges[t]??[],n]},ac=e=>{Object.keys(e.edges).filter(t=>e.edges[t].length===0).forEach(t=>delete e.edges[t])},Bg=(e,t)=>Object.entries(e.edges).flatMap(([n,o])=>o.map(i=>({source:n,edge:i}))).find(({edge:n})=>n.id===t),IH=(e,t,n,o)=>t===n?void 0:rc(e,t,o),zH={screen:["header","body"],service:["features","behavior"],identification:["header","body","form"]},RH=(e,t)=>{const n=e&&typeof e=="object"&&!Array.isArray(e)?e:{},o=new Set(zH[t]);return Object.fromEntries(Object.entries(n).filter(([i])=>!o.has(i)))},LH=(e,t,n,o=[])=>{const i=or(e),a=Bl(),s={type:"add-node",nodeId:a,...n?{parentId:n}:{}};if(n&&!i.rules.some(c=>c.id===n))return pt(s,"Origem inexistente.");const l=n?rc(i,n,o):void 0;if(l)return pt(s,l);const u={id:a,name:t.defaultName,action:t.type,isRoot:i.rules.length===0};if(i.rules.push(u),n){const c=Bl();ic(i,n,{id:c,nextRuleId:a})}return rr(i,s)},FH=(e,t,n)=>{const o=or(e),i=o.rules.findIndex(l=>l.id===t),a={type:"edit-node",nodeId:t};if(i<0)return pt(a,"Regra inexistente.");if(o.rules[i].action!==n.action)return pt(a,"O tipo da regra foi alterado durante a edição.");const s=o.rules[i];return o.rules[i]={...s,name:n.name,action:n.action,settings:{...RH(s.settings,n.action),...n.settings}},rr(o,a)},HH=(e,t)=>{const n=or(e),o=n.rules.find(a=>a.id===t),i={type:"delete-node",nodeId:t};return o?o.isRoot===!0&&n.rules.length>1?pt(i,"A regra raiz não pode ser removida enquanto houver outras regras."):(n.rules=n.rules.filter(a=>a.id!==t),delete n.edges[t],Object.keys(n.edges).forEach(a=>{n.edges[a]=n.edges[a].filter(s=>s.nextRuleId!==t)}),ac(n),rr(n,i)):pt(i,"Regra inexistente.")},jH=(e,t,n,o=[])=>{const i=or(e),a=Bl(),s={type:"connect",edgeId:a,source:t,target:n};if($g(i,t,n))return pt(s,"Essa conexão já existe.");const l=rc(i,t,o);return l?pt(s,l):(ic(i,t,{id:a,nextRuleId:n}),rr(i,s))},WH=(e,t)=>{const n=or(e),o=Bg(n,t),i={type:"disconnect",edgeId:t};return o?(n.edges[o.source]=n.edges[o.source].filter(a=>a.id!==t),ac(n),rr(n,{...i,source:o.source,target:o.edge.nextRuleId})):pt(i,"Conexão inexistente.")},UH=(e,t,n,o,i=[])=>{const a=or(e),s=Bg(a,t),l=s?.source??"",u=s?.edge,c={type:"reconnect",edgeId:t,source:n,target:o,previousSource:l,previousTarget:u?.nextRuleId};if(!u)return pt(c,"Conexão inexistente.");if($g(a,n,o,t))return pt(c,"Essa conexão já existe.");const d=IH(a,n,l,i);return d?pt(c,d):(a.edges[l]=a.edges[l].filter(f=>f.id!==t),ac(a),ic(a,n,{...u,nextRuleId:o}),rr(a,c))},GH=["onKeydown"],ZH={class:"yu-relative yu-h-full yu-min-h-[36rem] yu-w-full yu-overflow-hidden yu-rounded-xl yu-border yu-border-slate-200 yu-bg-slate-50 yu-font-primary"},Pg=r.defineComponent({__name:"app-service-workflow-editor",props:{workflowId:{},modelValue:{},allowedNodeTypes:{default:()=>[]}},emits:["update:modelValue","change","node","invalid-change","invalid-model"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>K4(n.allowedNodeTypes)),a=r.computed(()=>Og(n.modelValue)),s=r.computed(()=>a.value.length>0),l=r.ref([]),u=r.ref([]),c=r.ref(),d=r.ref(),f=()=>c.value?.fitView?.({padding:.18,duration:250}),h=()=>{const P=dh(n.modelValue,i.value,s.value);l.value=P.nodes,u.value=P.edges,r.nextTick(f)},p=P=>{if(P.error)return o("invalid-change",P.error),!1;o("update:modelValue",P.flow),o("change",P.flow,P.mutation);const A=dh(P.flow,i.value,!1);return l.value=A.nodes,u.value=A.edges,!0},m=Ja(n.workflowId),g=Ka(),b=Symbol(`workflow-editor:${n.workflowId}`),y=P=>s.value||i.value.length===0?!1:P?n.modelValue?.rules?.some(A=>A.id===P)&&oc(n.modelValue,P,i.value)>0:!0,_=(P,A)=>s.value?!1:n.modelValue?.rules?.some(O=>O.id===P&&O.action===A)??!1,w=g.registerEditor(n.workflowId,b,{canAdd:y,add:(P,A)=>p(LH(n.modelValue,P,A,i.value)),canEdit:_,edit:(P,A)=>p(FH(n.modelValue,P,A))});r.watch([()=>n.modelValue,i,s],()=>{h(),w&&g.syncEditor(n.workflowId,i.value,s.value)},{deep:!0,immediate:!0}),r.watch(()=>a.value.join("|"),(P,A)=>{P&&P!==A&&o("invalid-model",{reasons:a.value})},{immediate:!0}),r.onBeforeUnmount(()=>{w&&g.unregisterEditor(n.workflowId,b)});const v=P=>p(jH(n.modelValue,P.source,P.target,i.value)),N=({edge:P,connection:A})=>p(UH(n.modelValue,P.id,A.source,A.target,i.value)),T=({edge:P})=>{d.value=P.data?.isAddControl?void 0:P.id},V=()=>{!d.value||s.value||(p(WH(n.modelValue,d.value)),d.value=void 0)},$=P=>{o("node",P),m.requestEdit(P)};return(P,A)=>(r.openBlock(),r.createElementBlock("section",{class:"yu-h-full yu-w-full","aria-label":"Editor de fluxo de serviço",tabindex:"0",onKeydown:[r.withKeys(r.withModifiers(V,["prevent"]),["delete"]),r.withKeys(r.withModifiers(V,["prevent"]),["backspace"])]},[r.createElementVNode("div",ZH,[r.createVNode(F4,{"can-add":!s.value&&i.value.length>0,"has-selected-edge":!!d.value,onAdd:A[0]||(A[0]=O=>r.unref(m).requestAdd()),onDeleteEdge:V},null,8,["can-add","has-selected-edge"]),s.value?(r.openBlock(),r.createBlock(q4,{key:0,reasons:a.value},null,8,["reasons"])):r.createCommentVNode("",!0),r.createVNode(r.unref(QL),{nodes:l.value,"onUpdate:nodes":A[2]||(A[2]=O=>l.value=O),edges:u.value,"onUpdate:edges":A[3]||(A[3]=O=>u.value=O),"nodes-connectable":!s.value,"edges-updatable":!s.value,"delete-key-code":null,"min-zoom":.25,"max-zoom":1.75,onInit:A[4]||(A[4]=O=>c.value=O),onNodesInitialized:f,onConnect:v,onEdgeUpdate:N,onEdgeClick:T,onPaneClick:A[5]||(A[5]=O=>d.value=void 0)},{"node-workflow":r.withCtx(O=>[r.createVNode(U4,r.mergeProps(O,{onEdit:$,onDelete:A[1]||(A[1]=x=>p(r.unref(HH)(n.modelValue,x.id)))}),null,16)]),"node-workflow-add":r.withCtx(O=>[r.createVNode(L4,r.mergeProps(O,{onAdd:r.unref(m).requestAdd}),null,16,["onAdd"])]),default:r.withCtx(()=>[r.createVNode(r.unref(l4),{"pattern-color":"#cbd5e1",gap:24,size:1.5}),r.createVNode(r.unref(z4),{position:"bottom-right"})]),_:1},8,["nodes","edges","nodes-connectable","edges-updatable"])])],40,GH))}}),qH={install(e){e.component("AppServiceWorkflowAddForm",qm),e.component("AppServiceWorkflowEditNodeForm",Xm),e.component("AppServiceWorkflowEditor",Pg)}};exports.AppServiceWorkflowAddForm=qm;exports.AppServiceWorkflowEditNodeForm=Xm;exports.AppServiceWorkflowEditor=Pg;exports.default=qH;exports.useServiceWorkflowEditorChannel=Ja;
|