funcnodes-react-flow 0.4.5__py3-none-any.whl → 0.4.7__py3-none-any.whl
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.
- funcnodes_react_flow/static/funcnodes_react_flow-style.css +1 -1
- funcnodes_react_flow/static/funcnodes_react_flow.css +1 -0
- funcnodes_react_flow/static/funcnodes_react_flow.es.js +48859 -0
- funcnodes_react_flow/static/funcnodes_react_flow.iife.js +824 -0
- funcnodes_react_flow/static/funcnodes_react_flow.js +4 -4
- funcnodes_react_flow/static/index.html +5 -5
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/METADATA +1 -1
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/RECORD +12 -9
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/WHEEL +0 -0
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/entry_points.txt +0 -0
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/licenses/LICENSE +0 -0
- {funcnodes_react_flow-0.4.5.dist-info → funcnodes_react_flow-0.4.7.dist-info}/top_level.txt +0 -0
@@ -661,7 +661,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
661
661
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
662
662
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
663
663
|
* Copyright 2024 Fonticons, Inc.
|
664
|
-
*/const N7={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"]},M7={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},D7={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},P7={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"]},z7={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},j7={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},I7={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"]},L7={prefix:"fas",iconName:"network-wired",icon:[640,512,[],"f6ff","M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z"]},F7={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},B7={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},$7={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},H7={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},V7={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},U7={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},q7={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"]};h7.autoAddCss=!1;const yn=e=>{const{style:t,...n}=e;return _.jsx("span",{style:{marginLeft:"5px",...t},children:_.jsx(b0,{...n})})},ak=e=>_.jsx(yn,{...e,icon:M7}),x0=e=>_.jsx(yn,{...e,icon:U7}),sk=e=>_.jsx(yn,{...e,icon:V7}),lk=e=>_.jsx(yn,{...e,icon:$7}),Y7=e=>_.jsx(yn,{...e,icon:D7}),G7=e=>_.jsx(yn,{...e,icon:N7}),X7=e=>_.jsx(yn,{...e,icon:q7}),uk=e=>_.jsx(yn,{...e,icon:B7}),w0=e=>_.jsx(yn,{...e,icon:z7}),du=w0,ck=e=>_.jsx(yn,{...e,icon:H7}),W7=e=>_.jsx(yn,{...e,icon:I7}),K7=e=>_.jsx(yn,{...e,icon:P7}),Z7=e=>_.jsx(yn,{...e,icon:L7}),Q7=e=>_.jsx(yn,{...e,icon:j7}),J7=e=>_.jsx(yn,{...e,icon:F7}),vs=({trigger:e,title:t,description:n,children:r,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:u,setOpen:f,modal:d=!0})=>{const h=b=>{f&&f(b),a&&a(b)},g=C.useContext(Xe).local_state(b=>b.funcnodescontainerRef),y=_.jsx(hB,{asChild:!0,children:_.jsxs("div",{className:"dialogconent funcnodescontainer",children:[t&&_.jsx(pB,{className:"dialogtitle",children:t}),_.jsx(mB,{className:"dialogdescription",children:n}),_.jsx("div",{className:"dialogchildren",children:r}),_.jsx("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"},children:(s||[]).map((b,x)=>_.jsx(UE,{asChild:!0,children:_.jsx("button",{className:"dialogsendbutton",onClick:b.onClick,children:b.text})},x))}),i&&_.jsx(UE,{asChild:!0,children:_.jsx("button",{className:"dialogclosebutton","aria-label":"Close",children:_.jsx(ck,{})})})]})});return _.jsxs(uB,{open:u,onOpenChange:h,modal:d,children:[e&&_.jsx(cB,{asChild:!0,children:e}),_.jsxs(fB,{container:g,children:[_.jsx(dB,{className:"dialogoverlay funcnodescontainer"}),y]})]})};function S0(e){const t=e+"CollectionProvider",[n,r]=lo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:E,children:S}=x,A=Xt.useRef(null),k=Xt.useRef(new Map).current;return _.jsx(i,{scope:E,itemMap:k,collectionRef:A,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=ls(u),d=Xt.forwardRef((x,E)=>{const{scope:S,children:A}=x,k=a(u,S),R=_t(E,k.collectionRef);return _.jsx(f,{ref:R,children:A})});d.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=ls(h),y=Xt.forwardRef((x,E)=>{const{scope:S,children:A,...k}=x,R=Xt.useRef(null),N=_t(E,R),D=a(h,S);return Xt.useEffect(()=>(D.itemMap.set(R,{ref:R,...k}),()=>void D.itemMap.delete(R))),_.jsx(g,{[p]:"",ref:N,children:A})});y.displayName=h;function b(x){const E=a(e+"CollectionConsumer",x);return Xt.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const k=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((D,P)=>k.indexOf(D.ref.current)-k.indexOf(P.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:d,ItemSlot:y},b,r]}var eH=C.createContext(void 0);function _0(e){const t=C.useContext(eH);return e||t||"ltr"}const tH=["top","right","bottom","left"],mo=Math.min,Vn=Math.max,_d=Math.round,Ed=Math.floor,Xr=e=>({x:e,y:e}),nH={left:"right",right:"left",bottom:"top",top:"bottom"},rH={start:"end",end:"start"};function E0(e,t,n){return Vn(e,mo(t,n))}function Ci(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function C0(e){return e==="x"?"y":"x"}function k0(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(ki(e))?"y":"x"}function A0(e){return C0(go(e))}function iH(e,t,n){n===void 0&&(n=!1);const r=bs(e),i=A0(e),a=k0(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Cd(s)),[s,Cd(s)]}function oH(e){const t=Cd(e);return[T0(e),t,T0(t)]}function T0(e){return e.replace(/start|end/g,t=>rH[t])}function aH(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:s;default:return[]}}function sH(e,t,n,r){const i=bs(e);let a=aH(ki(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(T0)))),a}function Cd(e){return e.replace(/left|right|bottom|top/g,t=>nH[t])}function lH(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return typeof e!="number"?lH(e):{top:e,right:e,bottom:e,left:e}}function kd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dk(e,t,n){let{reference:r,floating:i}=e;const a=go(t),s=A0(t),u=k0(s),f=ki(t),d=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let y;switch(f){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(bs(t)){case"start":y[s]-=g*(n&&d?-1:1);break;case"end":y[s]+=g*(n&&d?-1:1);break}return y}const uH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=dk(d,r,f),g=r,y={},b=0;for(let x=0;x<u.length;x++){const{name:E,fn:S}=u[x],{x:A,y:k,data:R,reset:N}=await S({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:d,platform:s,elements:{reference:e,floating:t}});h=A??h,p=k??p,y={...y,[E]:{...y[E],...R}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(d=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=dk(d,g,f)),x=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}};async function hu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Ci(t,e),b=fk(y),E=u[g?p==="floating"?"reference":"floating":p],S=kd(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:d,rootBoundary:h,strategy:f})),A=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),R=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},N=kd(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:A,offsetParent:k,strategy:f}):A);return{top:(S.top-N.top+b.top)/R.y,bottom:(N.bottom-S.bottom+b.bottom)/R.y,left:(S.left-N.left+b.left)/R.x,right:(N.right-S.right+b.right)/R.x}}const cH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:d,padding:h=0}=Ci(e,t)||{};if(d==null)return{};const p=fk(h),g={x:n,y:r},y=A0(i),b=k0(y),x=await s.getDimensions(d),E=y==="y",S=E?"top":"left",A=E?"bottom":"right",k=E?"clientHeight":"clientWidth",R=a.reference[b]+a.reference[y]-g[y]-a.floating[b],N=g[y]-a.reference[y],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let P=D?D[k]:0;(!P||!await(s.isElement==null?void 0:s.isElement(D)))&&(P=u.floating[k]||a.floating[b]);const F=R/2-N/2,V=P/2-x[b]/2-1,T=mo(p[S],V),$=mo(p[A],V),H=T,G=P-x[b]-$,j=P/2-x[b]/2+F,U=E0(H,j,G),z=!f.arrow&&bs(i)!=null&&j!==U&&a.reference[b]/2-(j<H?T:$)-x[b]/2<0,B=z?j<H?j-H:j-G:0;return{[y]:g[y]+B,data:{[y]:U,centerOffset:j-U-B,...z&&{alignmentOffset:B}},reset:z}}}),fH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:u,platform:f,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...E}=Ci(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=ki(i),A=go(u),k=ki(u)===u,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),N=g||(k||!x?[Cd(u)]:oH(u)),D=b!=="none";!g&&D&&N.push(...sH(u,x,b,R));const P=[u,...N],F=await hu(t,E),V=[];let T=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&V.push(F[S]),p){const j=iH(i,s,R);V.push(F[j[0]],F[j[1]])}if(T=[...T,{placement:i,overflows:V}],!V.every(j=>j<=0)){var $,H;const j=((($=a.flip)==null?void 0:$.index)||0)+1,U=P[j];if(U)return{data:{index:j,overflows:T},reset:{placement:U}};let z=(H=T.filter(B=>B.overflows[0]<=0).sort((B,q)=>B.overflows[1]-q.overflows[1])[0])==null?void 0:H.placement;if(!z)switch(y){case"bestFit":{var G;const B=(G=T.filter(q=>{if(D){const Y=go(q.placement);return Y===A||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,O)=>Y+O,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];B&&(z=B);break}case"initialPlacement":z=u;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function hk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pk(e){return tH.some(t=>e[t]>=0)}const dH=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ci(e,t);switch(r){case"referenceHidden":{const a=await hu(t,{...i,elementContext:"reference"}),s=hk(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pk(s)}}}case"escaped":{const a=await hu(t,{...i,altBoundary:!0}),s=hk(a,n.floating);return{data:{escapedOffsets:s,escaped:pk(s)}}}default:return{}}}}};async function hH(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ki(n),u=bs(n),f=go(n)==="y",d=["left","top"].includes(s)?-1:1,h=a&&f?-1:1,p=Ci(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),f?{x:y*h,y:g*d}:{x:g*d,y:y*h}}const pH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await hH(t,e);return s===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},mH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:E=>{let{x:S,y:A}=E;return{x:S,y:A}}},...f}=Ci(e,t),d={x:n,y:r},h=await hu(t,f),p=go(ki(i)),g=C0(p);let y=d[g],b=d[p];if(a){const E=g==="y"?"top":"left",S=g==="y"?"bottom":"right",A=y+h[E],k=y-h[S];y=E0(A,y,k)}if(s){const E=p==="y"?"top":"left",S=p==="y"?"bottom":"right",A=b+h[E],k=b-h[S];b=E0(A,b,k)}const x=u.fn({...t,[g]:y,[p]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:a,[p]:s}}}}}},gH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=Ci(e,t),h={x:n,y:r},p=go(i),g=C0(p);let y=h[g],b=h[p];const x=Ci(u,t),E=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const k=g==="y"?"height":"width",R=a.reference[g]-a.floating[k]+E.mainAxis,N=a.reference[g]+a.reference[k]-E.mainAxis;y<R?y=R:y>N&&(y=N)}if(d){var S,A;const k=g==="y"?"width":"height",R=["top","left"].includes(ki(i)),N=a.reference[p]-a.floating[k]+(R&&((S=s.offset)==null?void 0:S[p])||0)+(R?0:E.crossAxis),D=a.reference[p]+a.reference[k]+(R?0:((A=s.offset)==null?void 0:A[p])||0)-(R?E.crossAxis:0);b<N?b=N:b>D&&(b=D)}return{[g]:y,[p]:b}}}},yH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...d}=Ci(e,t),h=await hu(t,d),p=ki(i),g=bs(i),y=go(i)==="y",{width:b,height:x}=a.floating;let E,S;p==="top"||p==="bottom"?(E=p,S=g===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=p,E=g==="end"?"top":"bottom");const A=x-h.top-h.bottom,k=b-h.left-h.right,R=mo(x-h[E],A),N=mo(b-h[S],k),D=!t.middlewareData.shift;let P=R,F=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=A),D&&!g){const T=Vn(h.left,0),$=Vn(h.right,0),H=Vn(h.top,0),G=Vn(h.bottom,0);y?F=b-2*(T!==0||$!==0?T+$:Vn(h.left,h.right)):P=x-2*(H!==0||G!==0?H+G:Vn(h.top,h.bottom))}await f({...t,availableWidth:F,availableHeight:P});const V=await s.getDimensions(u.floating);return b!==V.width||x!==V.height?{reset:{rects:!0}}:{}}}};function Ad(){return typeof window<"u"}function xs(e){return mk(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(mk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mk(e){return Ad()?e instanceof Node||e instanceof Un(e).Node:!1}function Tr(e){return Ad()?e instanceof Element||e instanceof Un(e).Element:!1}function Kr(e){return Ad()?e instanceof HTMLElement||e instanceof Un(e).HTMLElement:!1}function gk(e){return!Ad()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}function pu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vH(e){return["table","td","th"].includes(xs(e))}function Td(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function R0(e){const t=O0(),n=Tr(e)?Rr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function bH(e){let t=yo(e);for(;Kr(t)&&!ws(t);){if(R0(t))return t;if(Td(t))return null;t=yo(t)}return null}function O0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ws(e){return["html","body","#document"].includes(xs(e))}function Rr(e){return Un(e).getComputedStyle(e)}function Rd(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yo(e){if(xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gk(e)&&e.host||Wr(e);return gk(t)?t.host:t}function yk(e){const t=yo(e);return ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&pu(t)?t:yk(t)}function mu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=yk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Un(i);if(a){const u=N0(s);return t.concat(s,s.visualViewport||[],pu(i)?i:[],u&&n?mu(u):[])}return t.concat(i,mu(i,[],n))}function N0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vk(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Kr(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,u=_d(n)!==a||_d(r)!==s;return u&&(n=a,r=s),{width:n,height:r,$:u}}function M0(e){return Tr(e)?e:e.contextElement}function Ss(e){const t=M0(e);if(!Kr(t))return Xr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=vk(t);let s=(a?_d(n.width):n.width)/r,u=(a?_d(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const xH=Xr(0);function bk(e){const t=Un(e);return!O0()||!t.visualViewport?xH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Un(e)?!1:t}function pa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=M0(e);let s=Xr(1);t&&(r?Tr(r)&&(s=Ss(r)):s=Ss(e));const u=wH(a,n,r)?bk(a):Xr(0);let f=(i.left+u.x)/s.x,d=(i.top+u.y)/s.y,h=i.width/s.x,p=i.height/s.y;if(a){const g=Un(a),y=r&&Tr(r)?Un(r):r;let b=g,x=N0(b);for(;x&&r&&y!==b;){const E=Ss(x),S=x.getBoundingClientRect(),A=Rr(x),k=S.left+(x.clientLeft+parseFloat(A.paddingLeft))*E.x,R=S.top+(x.clientTop+parseFloat(A.paddingTop))*E.y;f*=E.x,d*=E.y,h*=E.x,p*=E.y,f+=k,d+=R,b=Un(x),x=N0(b)}}return kd({width:h,height:p,x:f,y:d})}function D0(e,t){const n=Rd(e).scrollLeft;return t?t.left+n:pa(Wr(e)).left+n}function xk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:D0(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function SH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=Wr(r),u=t?Td(t.floating):!1;if(r===s||u&&a)return n;let f={scrollLeft:0,scrollTop:0},d=Xr(1);const h=Xr(0),p=Kr(r);if((p||!p&&!a)&&((xs(r)!=="body"||pu(s))&&(f=Rd(r)),Kr(r))){const y=pa(r);d=Ss(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=s&&!p&&!a?xk(s,f,!0):Xr(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-f.scrollTop*d.y+h.y+g.y}}function _H(e){return Array.from(e.getClientRects())}function EH(e){const t=Wr(e),n=Rd(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+D0(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(s+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:u}}function CH(e,t){const n=Un(e),r=Wr(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=O0();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}return{width:a,height:s,x:u,y:f}}function kH(e,t){const n=pa(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Kr(e)?Ss(e):Xr(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,d=r*a.y;return{width:s,height:u,x:f,y:d}}function wk(e,t,n){let r;if(t==="viewport")r=CH(e,n);else if(t==="document")r=EH(Wr(e));else if(Tr(t))r=kH(t,n);else{const i=bk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return kd(r)}function Sk(e,t){const n=yo(e);return n===t||!Tr(n)||ws(n)?!1:Rr(n).position==="fixed"||Sk(n,t)}function AH(e,t){const n=t.get(e);if(n)return n;let r=mu(e,[],!1).filter(u=>Tr(u)&&xs(u)!=="body"),i=null;const a=Rr(e).position==="fixed";let s=a?yo(e):e;for(;Tr(s)&&!ws(s);){const u=Rr(s),f=R0(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pu(s)&&!f&&Sk(e,s))?r=r.filter(h=>h!==s):i=u,s=yo(s)}return t.set(e,r),r}function TH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Td(t)?[]:AH(t,this._c):[].concat(n),r],u=s[0],f=s.reduce((d,h)=>{const p=wk(t,h,i);return d.top=Vn(p.top,d.top),d.right=mo(p.right,d.right),d.bottom=mo(p.bottom,d.bottom),d.left=Vn(p.left,d.left),d},wk(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function RH(e){const{width:t,height:n}=vk(e);return{width:t,height:n}}function OH(e,t,n){const r=Kr(t),i=Wr(t),a=n==="fixed",s=pa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Xr(0);if(r||!r&&!a)if((xs(t)!=="body"||pu(i))&&(u=Rd(t)),r){const g=pa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&(f.x=D0(i));const d=i&&!r&&!a?xk(i,u):Xr(0),h=s.left+u.scrollLeft-f.x-d.x,p=s.top+u.scrollTop-f.y-d.y;return{x:h,y:p,width:s.width,height:s.height}}function P0(e){return Rr(e).position==="static"}function _k(e,t){if(!Kr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function Ek(e,t){const n=Un(e);if(Td(e))return n;if(!Kr(e)){let i=yo(e);for(;i&&!ws(i);){if(Tr(i)&&!P0(i))return i;i=yo(i)}return n}let r=_k(e,t);for(;r&&vH(r)&&P0(r);)r=_k(r,t);return r&&ws(r)&&P0(r)&&!R0(r)?n:r||bH(e)||n}const NH=async function(e){const t=this.getOffsetParent||Ek,n=this.getDimensions,r=await n(e.floating);return{reference:OH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MH(e){return Rr(e).direction==="rtl"}const DH={convertOffsetParentRelativeRectToViewportRelativeRect:SH,getDocumentElement:Wr,getClippingRect:TH,getOffsetParent:Ek,getElementRects:NH,getClientRects:_H,getDimensions:RH,getScale:Ss,isElement:Tr,isRTL:MH};function Ck(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function PH(e,t){let n=null,r;const i=Wr(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const d=e.getBoundingClientRect(),{left:h,top:p,width:g,height:y}=d;if(u||t(),!g||!y)return;const b=Ed(p),x=Ed(i.clientWidth-(h+g)),E=Ed(i.clientHeight-(p+y)),S=Ed(h),k={rootMargin:-b+"px "+-x+"px "+-E+"px "+-S+"px",threshold:Vn(0,mo(1,f))||1};let R=!0;function N(D){const P=D[0].intersectionRatio;if(P!==f){if(!R)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!Ck(d,e.getBoundingClientRect())&&s(),R=!1}try{n=new IntersectionObserver(N,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,k)}n.observe(e)}return s(!0),a}function kk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=M0(e),h=i||a?[...d?mu(d):[],...mu(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const p=d&&u?PH(d,n):null;let g=-1,y=null;s&&(y=new ResizeObserver(S=>{let[A]=S;A&&A.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),d&&!f&&y.observe(d),y.observe(t));let b,x=f?pa(e):null;f&&E();function E(){const S=pa(e);x&&!Ck(x,S)&&n(),x=S,b=requestAnimationFrame(E)}return n(),()=>{var S;h.forEach(A=>{i&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),p?.(),(S=y)==null||S.disconnect(),y=null,f&&cancelAnimationFrame(b)}}const zH=pH,jH=mH,IH=fH,LH=yH,FH=dH,Ak=cH,BH=gH,$H=(e,t,n)=>{const r=new Map,i={platform:DH,...n},a={...i.platform,_c:r};return uH(e,t,{...i,platform:a})};var Od=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Nd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Nd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Nd(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Tk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rk(e,t){const n=Tk(e);return Math.round(t*n)/n}function z0(e){const t=C.useRef(e);return Od(()=>{t.current=e}),t}function HH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:d}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(r);Nd(g,r)||y(r);const[b,x]=C.useState(null),[E,S]=C.useState(null),A=C.useCallback(q=>{q!==D.current&&(D.current=q,x(q))},[]),k=C.useCallback(q=>{q!==P.current&&(P.current=q,S(q))},[]),R=a||b,N=s||E,D=C.useRef(null),P=C.useRef(null),F=C.useRef(h),V=f!=null,T=z0(f),$=z0(i),H=z0(d),G=C.useCallback(()=>{if(!D.current||!P.current)return;const q={placement:t,strategy:n,middleware:g};$.current&&(q.platform=$.current),$H(D.current,P.current,q).then(Y=>{const O={...Y,isPositioned:H.current!==!1};j.current&&!Nd(F.current,O)&&(F.current=O,Zl.flushSync(()=>{p(O)}))})},[g,t,n,$,H]);Od(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[d]);const j=C.useRef(!1);Od(()=>(j.current=!0,()=>{j.current=!1}),[]),Od(()=>{if(R&&(D.current=R),N&&(P.current=N),R&&N){if(T.current)return T.current(R,N,G);G()}},[R,N,G,T,V]);const U=C.useMemo(()=>({reference:D,floating:P,setReference:A,setFloating:k}),[A,k]),z=C.useMemo(()=>({reference:R,floating:N}),[R,N]),B=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!z.floating)return q;const Y=Rk(z.floating,h.x),O=Rk(z.floating,h.y);return u?{...q,transform:"translate("+Y+"px, "+O+"px)",...Tk(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:O}},[n,u,z.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:G,refs:U,elements:z,floatingStyles:B}),[h,G,U,z,B])}const VH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ak({element:r.current,padding:i}).fn(n):{}:r?Ak({element:r,padding:i}).fn(n):{}}}},UH=(e,t)=>({...zH(e),options:[e,t]}),qH=(e,t)=>({...jH(e),options:[e,t]}),YH=(e,t)=>({...BH(e),options:[e,t]}),GH=(e,t)=>({...IH(e),options:[e,t]}),XH=(e,t)=>({...LH(e),options:[e,t]}),WH=(e,t)=>({...FH(e),options:[e,t]}),KH=(e,t)=>({...VH(e),options:[e,t]});var ZH="Arrow",Ok=C.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return _.jsx(gt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ok.displayName=ZH;var QH=Ok;function Nk(e){const[t,n]=C.useState(void 0);return ua(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var j0="Popper",[Mk,Md]=lo(j0),[JH,Dk]=Mk(j0),Pk=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.useState(null);return _.jsx(JH,{scope:t,anchor:r,onAnchorChange:i,children:n})};Pk.displayName=j0;var zk="PopperAnchor",jk=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=Dk(zk,n),s=C.useRef(null),u=_t(t,s);return C.useEffect(()=>{a.onAnchorChange(r?.current||s.current)}),r?null:_.jsx(gt.div,{...i,ref:u})});jk.displayName=zk;var I0="PopperContent",[eV,tV]=Mk(I0),Ik=C.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...x}=e,E=Dk(I0,n),[S,A]=C.useState(null),k=_t(t,le=>A(le)),[R,N]=C.useState(null),D=Nk(R),P=D?.width??0,F=D?.height??0,V=r+(a!=="center"?"-"+a:""),T=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},$=Array.isArray(d)?d:[d],H=$.length>0,G={padding:T,boundary:$.filter(rV),altBoundary:H},{refs:j,floatingStyles:U,placement:z,isPositioned:B,middlewareData:q}=HH({strategy:"fixed",placement:V,whileElementsMounted:(...le)=>kk(...le,{animationFrame:y==="always"}),elements:{reference:E.anchor},middleware:[UH({mainAxis:i+F,alignmentAxis:s}),f&&qH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?YH():void 0,...G}),f&&GH({...G}),XH({...G,apply:({elements:le,rects:he,availableWidth:ye,availableHeight:je})=>{const{width:Oe,height:be}=he.reference,Le=le.floating.style;Le.setProperty("--radix-popper-available-width",`${ye}px`),Le.setProperty("--radix-popper-available-height",`${je}px`),Le.setProperty("--radix-popper-anchor-width",`${Oe}px`),Le.setProperty("--radix-popper-anchor-height",`${be}px`)}}),R&&KH({element:R,padding:u}),iV({arrowWidth:P,arrowHeight:F}),g&&WH({strategy:"referenceHidden",...G})]}),[Y,O]=Bk(z),W=or(b);ua(()=>{B&&W?.()},[B,W]);const Z=q.arrow?.x,I=q.arrow?.y,ie=q.arrow?.centerOffset!==0,[fe,re]=C.useState();return ua(()=>{S&&re(window.getComputedStyle(S).zIndex)},[S]),_.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(eV,{scope:n,placedSide:Y,onArrowChange:N,arrowX:Z,arrowY:I,shouldHideArrow:ie,children:_.jsx(gt.div,{"data-side":Y,"data-align":O,...x,ref:k,style:{...x.style,animation:B?void 0:"none"}})})})});Ik.displayName=I0;var Lk="PopperArrow",nV={top:"bottom",right:"left",bottom:"top",left:"right"},Fk=C.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=tV(Lk,r),s=nV[a.placedSide];return _.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:_.jsx(QH,{...i,ref:n,style:{...i.style,display:"block"}})})});Fk.displayName=Lk;function rV(e){return e!==null}var iV=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,h]=Bk(n),p={start:"0%",center:"50%",end:"100%"}[h],g=(i.arrow?.x??0)+u/2,y=(i.arrow?.y??0)+f/2;let b="",x="";return d==="bottom"?(b=s?p:`${g}px`,x=`${-f}px`):d==="top"?(b=s?p:`${g}px`,x=`${r.floating.height+f}px`):d==="right"?(b=`${-f}px`,x=s?p:`${y}px`):d==="left"&&(b=`${r.floating.width+f}px`,x=s?p:`${y}px`),{data:{x:b,y:x}}}});function Bk(e){const[t,n="center"]=e.split("-");return[t,n]}var L0=Pk,F0=jk,$k=Ik,Hk=Fk,B0="rovingFocusGroup.onEntryFocus",oV={bubbles:!1,cancelable:!0},Dd="RovingFocusGroup",[$0,Vk,aV]=S0(Dd),[sV,Uk]=lo(Dd,[aV]),[lV,uV]=sV(Dd),qk=C.forwardRef((e,t)=>_.jsx($0.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx($0.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(cV,{...e,ref:t})})}));qk.displayName=Dd;var cV=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...p}=e,g=C.useRef(null),y=_t(t,g),b=_0(a),[x=null,E]=ss({prop:s,defaultProp:u,onChange:f}),[S,A]=C.useState(!1),k=or(d),R=Vk(n),N=C.useRef(!1),[D,P]=C.useState(0);return C.useEffect(()=>{const F=g.current;if(F)return F.addEventListener(B0,k),()=>F.removeEventListener(B0,k)},[k]),_.jsx(lV,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:x,onItemFocus:C.useCallback(F=>E(F),[E]),onItemShiftTab:C.useCallback(()=>A(!0),[]),onFocusableItemAdd:C.useCallback(()=>P(F=>F+1),[]),onFocusableItemRemove:C.useCallback(()=>P(F=>F-1),[]),children:_.jsx(gt.div,{tabIndex:S||D===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:Me(e.onMouseDown,()=>{N.current=!0}),onFocus:Me(e.onFocus,F=>{const V=!N.current;if(F.target===F.currentTarget&&V&&!S){const T=new CustomEvent(B0,oV);if(F.currentTarget.dispatchEvent(T),!T.defaultPrevented){const $=R().filter(z=>z.focusable),H=$.find(z=>z.active),G=$.find(z=>z.id===x),U=[H,G,...$].filter(Boolean).map(z=>z.ref.current);Xk(U,h)}}N.current=!1}),onBlur:Me(e.onBlur,()=>A(!1))})})}),Yk="RovingFocusGroupItem",Gk=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...s}=e,u=xi(),f=a||u,d=uV(Yk,n),h=d.currentTabStopId===f,p=Vk(n),{onFocusableItemAdd:g,onFocusableItemRemove:y}=d;return C.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),_.jsx($0.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:_.jsx(gt.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Me(e.onMouseDown,b=>{r?d.onItemFocus(f):b.preventDefault()}),onFocus:Me(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:Me(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=hV(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=p().filter(A=>A.focusable).map(A=>A.ref.current);if(x==="last")S.reverse();else if(x==="prev"||x==="next"){x==="prev"&&S.reverse();const A=S.indexOf(b.currentTarget);S=d.loop?pV(S,A+1):S.slice(A+1)}setTimeout(()=>Xk(S))}})})})});Gk.displayName=Yk;var fV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function hV(e,t,n){const r=dV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return fV[r]}function Xk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mV=qk,gV=Gk,H0=["Enter"," "],yV=["ArrowDown","PageUp","Home"],Wk=["ArrowUp","PageDown","End"],vV=[...yV,...Wk],bV={ltr:[...H0,"ArrowRight"],rtl:[...H0,"ArrowLeft"]},xV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gu="Menu",[yu,wV,SV]=S0(gu),[ma,Kk]=lo(gu,[SV,Md,Uk]),vu=Md(),Zk=Uk(),[Qk,ga]=ma(gu),[_V,bu]=ma(gu),Jk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:s=!0}=e,u=vu(t),[f,d]=C.useState(null),h=C.useRef(!1),p=or(a),g=_0(i);return C.useEffect(()=>{const y=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),_.jsx(L0,{...u,children:_.jsx(Qk,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:d,children:_.jsx(_V,{scope:t,onClose:C.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:g,modal:s,children:r})})})};Jk.displayName=gu;var EV="MenuAnchor",V0=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vu(n);return _.jsx(F0,{...i,...r,ref:t})});V0.displayName=EV;var CV="MenuPortal",[sue,eA]=ma(CV,{forceMount:void 0}),ar="MenuContent",[kV,U0]=ma(ar),tA=C.forwardRef((e,t)=>{const n=eA(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ga(ar,e.__scopeMenu),s=bu(ar,e.__scopeMenu);return _.jsx(yu.Provider,{scope:e.__scopeMenu,children:_.jsx(wi,{present:r||a.open,children:_.jsx(yu.Slot,{scope:e.__scopeMenu,children:s.modal?_.jsx(AV,{...i,ref:t}):_.jsx(TV,{...i,ref:t})})})})}),AV=C.forwardRef((e,t)=>{const n=ga(ar,e.__scopeMenu),r=C.useRef(null),i=_t(t,r);return C.useEffect(()=>{const a=r.current;if(a)return Rg(a)},[]),_.jsx(q0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Me(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TV=C.forwardRef((e,t)=>{const n=ga(ar,e.__scopeMenu);return _.jsx(q0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),RV=ls("MenuContent.ScrollLock"),q0=C.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...x}=e,E=ga(ar,n),S=bu(ar,n),A=vu(n),k=Zk(n),R=wV(n),[N,D]=C.useState(null),P=C.useRef(null),F=_t(t,P,E.onContentChange),V=C.useRef(0),T=C.useRef(""),$=C.useRef(0),H=C.useRef(null),G=C.useRef("right"),j=C.useRef(0),U=b?sd:C.Fragment,z=b?{as:RV,allowPinchZoom:!0}:void 0,B=Y=>{const O=T.current+Y,W=R().filter(le=>!le.disabled),Z=document.activeElement,I=W.find(le=>le.ref.current===Z)?.textValue,ie=W.map(le=>le.textValue),fe=$V(ie,O,I),re=W.find(le=>le.textValue===fe)?.ref.current;(function le(he){T.current=he,window.clearTimeout(V.current),he!==""&&(V.current=window.setTimeout(()=>le(""),1e3))})(O),re&&setTimeout(()=>re.focus())};C.useEffect(()=>()=>window.clearTimeout(V.current),[]),_g();const q=C.useCallback(Y=>G.current===H.current?.side&&VV(Y,H.current?.area),[]);return _.jsx(kV,{scope:n,searchRef:T,onItemEnter:C.useCallback(Y=>{q(Y)&&Y.preventDefault()},[q]),onItemLeave:C.useCallback(Y=>{q(Y)||(P.current?.focus(),D(null))},[q]),onTriggerLeave:C.useCallback(Y=>{q(Y)&&Y.preventDefault()},[q]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.useCallback(Y=>{H.current=Y},[]),children:_.jsx(U,{...z,children:_.jsx(Jf,{asChild:!0,trapped:i,onMountAutoFocus:Me(a,Y=>{Y.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:_.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:_.jsx(mV,{asChild:!0,...k,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:D,onEntryFocus:Me(f,Y=>{S.isUsingKeyboardRef.current||Y.preventDefault()}),preventScrollOnEntryFocus:!0,children:_.jsx($k,{role:"menu","aria-orientation":"vertical","data-state":bA(E.open),"data-radix-menu-content":"",dir:S.dir,...A,...x,ref:F,style:{outline:"none",...x.style},onKeyDown:Me(x.onKeyDown,Y=>{const W=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,Z=Y.ctrlKey||Y.altKey||Y.metaKey,I=Y.key.length===1;W&&(Y.key==="Tab"&&Y.preventDefault(),!Z&&I&&B(Y.key));const ie=P.current;if(Y.target!==ie||!vV.includes(Y.key))return;Y.preventDefault();const re=R().filter(le=>!le.disabled).map(le=>le.ref.current);Wk.includes(Y.key)&&re.reverse(),FV(re)}),onBlur:Me(e.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(V.current),T.current="")}),onPointerMove:Me(e.onPointerMove,wu(Y=>{const O=Y.target,W=j.current!==Y.clientX;if(Y.currentTarget.contains(O)&&W){const Z=Y.clientX>j.current?"right":"left";G.current=Z,j.current=Y.clientX}}))})})})})})})});tA.displayName=ar;var OV="MenuGroup",Y0=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{role:"group",...r,ref:t})});Y0.displayName=OV;var NV="MenuLabel",nA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{...r,ref:t})});nA.displayName=NV;var Pd="MenuItem",rA="menu.itemSelect",zd=C.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=C.useRef(null),s=bu(Pd,e.__scopeMenu),u=U0(Pd,e.__scopeMenu),f=_t(t,a),d=C.useRef(!1),h=()=>{const p=a.current;if(!n&&p){const g=new CustomEvent(rA,{bubbles:!0,cancelable:!0});p.addEventListener(rA,y=>r?.(y),{once:!0}),iE(p,g),g.defaultPrevented?d.current=!1:s.onClose()}};return _.jsx(iA,{...i,ref:f,disabled:n,onClick:Me(e.onClick,h),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:Me(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:Me(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||H0.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});zd.displayName=Pd;var iA=C.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,s=U0(Pd,n),u=Zk(n),f=C.useRef(null),d=_t(t,f),[h,p]=C.useState(!1),[g,y]=C.useState("");return C.useEffect(()=>{const b=f.current;b&&y((b.textContent??"").trim())},[a.children]),_.jsx(yu.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:_.jsx(gV,{asChild:!0,...u,focusable:!r,children:_.jsx(gt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:Me(e.onPointerMove,wu(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Me(e.onPointerLeave,wu(b=>s.onItemLeave(b))),onFocus:Me(e.onFocus,()=>p(!0)),onBlur:Me(e.onBlur,()=>p(!1))})})})}),MV="MenuCheckboxItem",oA=C.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return _.jsx(cA,{scope:e.__scopeMenu,checked:n,children:_.jsx(zd,{role:"menuitemcheckbox","aria-checked":jd(n)?"mixed":n,...i,ref:t,"data-state":W0(n),onSelect:Me(i.onSelect,()=>r?.(jd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});oA.displayName=MV;var aA="MenuRadioGroup",[DV,PV]=ma(aA,{value:void 0,onValueChange:()=>{}}),sA=C.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=or(r);return _.jsx(DV,{scope:e.__scopeMenu,value:n,onValueChange:a,children:_.jsx(Y0,{...i,ref:t})})});sA.displayName=aA;var lA="MenuRadioItem",uA=C.forwardRef((e,t)=>{const{value:n,...r}=e,i=PV(lA,e.__scopeMenu),a=n===i.value;return _.jsx(cA,{scope:e.__scopeMenu,checked:a,children:_.jsx(zd,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":W0(a),onSelect:Me(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});uA.displayName=lA;var G0="MenuItemIndicator",[cA,zV]=ma(G0,{checked:!1}),fA=C.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=zV(G0,n);return _.jsx(wi,{present:r||jd(a.checked)||a.checked===!0,children:_.jsx(gt.span,{...i,ref:t,"data-state":W0(a.checked)})})});fA.displayName=G0;var jV="MenuSeparator",dA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dA.displayName=jV;var IV="MenuArrow",hA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vu(n);return _.jsx(Hk,{...i,...r,ref:t})});hA.displayName=IV;var X0="MenuSub",[LV,pA]=ma(X0),mA=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ga(X0,t),s=vu(t),[u,f]=C.useState(null),[d,h]=C.useState(null),p=or(i);return C.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),_.jsx(L0,{...s,children:_.jsx(Qk,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:h,children:_.jsx(LV,{scope:t,contentId:xi(),triggerId:xi(),trigger:u,onTriggerChange:f,children:n})})})};mA.displayName=X0;var xu="MenuSubTrigger",gA=C.forwardRef((e,t)=>{const n=ga(xu,e.__scopeMenu),r=bu(xu,e.__scopeMenu),i=pA(xu,e.__scopeMenu),a=U0(xu,e.__scopeMenu),s=C.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=a,d={__scopeMenu:e.__scopeMenu},h=C.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return C.useEffect(()=>h,[h]),C.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),f(null)}},[u,f]),_.jsx(V0,{asChild:!0,...d,children:_.jsx(iA,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":bA(n.open),...e,ref:Zf(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Me(e.onPointerMove,wu(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Me(e.onPointerLeave,wu(p=>{h();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,b=y==="right",x=b?-5:5,E=g[b?"left":"right"],S=g[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+x,y:p.clientY},{x:E,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x:E,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Me(e.onKeyDown,p=>{const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||bV[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});gA.displayName=xu;var yA="MenuSubContent",vA=C.forwardRef((e,t)=>{const n=eA(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ga(ar,e.__scopeMenu),s=bu(ar,e.__scopeMenu),u=pA(yA,e.__scopeMenu),f=C.useRef(null),d=_t(t,f);return _.jsx(yu.Provider,{scope:e.__scopeMenu,children:_.jsx(wi,{present:r||a.open,children:_.jsx(yu.Slot,{scope:e.__scopeMenu,children:_.jsx(q0,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{s.isUsingKeyboardRef.current&&f.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Me(e.onFocusOutside,h=>{h.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Me(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:Me(e.onKeyDown,h=>{const p=h.currentTarget.contains(h.target),g=xV[s.dir].includes(h.key);p&&g&&(a.onOpenChange(!1),u.trigger?.focus(),h.preventDefault())})})})})})});vA.displayName=yA;function bA(e){return e?"open":"closed"}function jd(e){return e==="indeterminate"}function W0(e){return jd(e)?"indeterminate":e?"checked":"unchecked"}function FV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function BV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $V(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=BV(e,Math.max(a,0));i.length===1&&(s=s.filter(d=>d!==n));const f=s.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function HV(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const u=t[a].x,f=t[a].y,d=t[s].x,h=t[s].y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(i=!i)}return i}function VV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HV(n,t)}function wu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var UV=Jk,qV=V0,YV=tA,GV=Y0,XV=nA,WV=zd,KV=oA,ZV=sA,QV=uA,JV=fA,eU=dA,tU=hA,nU=mA,rU=gA,iU=vA,K0="DropdownMenu",[oU,lue]=lo(K0,[Kk]),vn=Kk(),[aU,xA]=oU(K0),wA=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:u=!0}=e,f=vn(t),d=C.useRef(null),[h=!1,p]=ss({prop:i,defaultProp:a,onChange:s});return _.jsx(aU,{scope:t,triggerId:xi(),triggerRef:d,contentId:xi(),open:h,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(g=>!g),[p]),modal:u,children:_.jsx(UV,{...f,open:h,onOpenChange:p,dir:r,modal:u,children:n})})};wA.displayName=K0;var SA="DropdownMenuTrigger",_A=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=xA(SA,n),s=vn(n);return _.jsx(qV,{asChild:!0,...s,children:_.jsx(gt.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Zf(t,a.triggerRef),onPointerDown:Me(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:Me(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});_A.displayName=SA;var EA="DropdownMenuContent",CA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=xA(EA,n),a=vn(n),s=C.useRef(!1);return _.jsx(YV,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Me(e.onCloseAutoFocus,u=>{s.current||i.triggerRef.current?.focus(),s.current=!1,u.preventDefault()}),onInteractOutside:Me(e.onInteractOutside,u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,h=f.button===2||d;(!i.modal||h)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});CA.displayName=EA;var sU="DropdownMenuGroup",kA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(GV,{...i,...r,ref:t})});kA.displayName=sU;var lU="DropdownMenuLabel",uU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(XV,{...i,...r,ref:t})});uU.displayName=lU;var cU="DropdownMenuItem",AA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(WV,{...i,...r,ref:t})});AA.displayName=cU;var fU="DropdownMenuCheckboxItem",dU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(KV,{...i,...r,ref:t})});dU.displayName=fU;var hU="DropdownMenuRadioGroup",TA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(ZV,{...i,...r,ref:t})});TA.displayName=hU;var pU="DropdownMenuRadioItem",RA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(QV,{...i,...r,ref:t})});RA.displayName=pU;var mU="DropdownMenuItemIndicator",gU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(JV,{...i,...r,ref:t})});gU.displayName=mU;var yU="DropdownMenuSeparator",vU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(eU,{...i,...r,ref:t})});vU.displayName=yU;var bU="DropdownMenuArrow",xU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(tU,{...i,...r,ref:t})});xU.displayName=bU;var wU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,s=vn(t),[u=!1,f]=ss({prop:r,defaultProp:a,onChange:i});return _.jsx(nU,{...s,open:u,onOpenChange:f,children:n})},SU="DropdownMenuSubTrigger",OA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(rU,{...i,...r,ref:t})});OA.displayName=SU;var _U="DropdownMenuSubContent",NA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(iU,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});NA.displayName=_U;var MA=wA,DA=_A,PA=CA,zA=kA,vo=AA,EU=TA,CU=RA,kU=wU,AU=OA,TU=NA;const Z0={xxs:0,xs:320,s:480,m:768,l:960,xl:1280,xxl:1920},jA=C.createContext(void 0),RU=C.forwardRef((e,t)=>{const{className:n,children:r,...i}=e,[a,s]=C.useState("m"),[u,f]=C.useState(0),[d,h]=C.useState(0),p=C.useRef(null);C.useImperativeHandle(t,()=>p.current,[]);const g=C.useCallback(y=>{const b=y.width,x=y.height;let E="xxs";Object.entries(Z0).forEach(([S,A])=>{b>=A&&(E=S)}),s(S=>S!==E?E:S),f(b),h(x)},[]);return C.useEffect(()=>{const y=p.current;if(!y)return;const b=new ResizeObserver(x=>{for(let E of x)g(E.contentRect)});return b.observe(y),g(y.getBoundingClientRect()),()=>{b.disconnect()}},[]),_.jsx(jA.Provider,{value:{wKey:a,w:u,h:d},children:_.jsx("div",{ref:p,className:`size-context w-${a} ${n||""}`.trim(),...i,children:r})})}),OU=()=>{const e=C.useContext(jA);if(!e)throw new Error("useSizeContext must be used within a SizeContextContainerContext");return e},NU=(e,t)=>e==t?!1:e==""?!0:Z0[e]<Z0[t],MU=e=>NU(OU().wKey,e),_s=({direction:e,className:t="",children:n,wrap:r=!1,grow:i=!1,...a})=>{const s="float-container";let u="";typeof e=="string"?u=`direction-${e} `:typeof e=="object"&&e!==null&&Object.entries(e).forEach(([h,p])=>{h===""?u+=`direction-${p} `:u+=`${h}-direction-${p} `});let f="";typeof i=="boolean"?f=i?"grow ":"":typeof i=="object"&&i!==null&&Object.entries(i).forEach(([h,p])=>{h===""?f+=p?"grow ":"no-grow":f+=p?`${h}-grow `:`${h}-no-grow`}),u+=f,r&&(u+="flex-wrap "),u=u.trim();const d=`${s} ${u} ${t}`.trim();return _.jsx("div",{className:d,...a,children:n})},IA=({direction:e,expanded:t=!0,children:n,className:r,maxSize:i,expanderSize:a="40px",containerStyle:s,style:u,containerClassName:f,onExpandChange:d,...h})=>{const p={up:w0,down:uk,left:sk,right:x0}[e],g={up:uk,down:w0,left:x0,right:sk}[e],[y,b]=C.useState(t),x=F=>{y!==F&&(b(F),d&&d(F))},E=`${e} ${y?"expanded":"collapsed"}`,S=e==="right"||e==="left"?{width:y?i:a}:{height:y?i:a},A=e==="right"||e==="left"?{width:y?i:0}:{height:y?i:0},k=e==="right"||e==="left"?{width:a}:{height:a},R=_.jsx("div",{className:`expanding_container_content ${E} ${r||""}`.trim(),style:{...u,...A},...h,children:n}),N=_.jsx("div",{className:`expanding_container_expander ${E}`,onClick:()=>x(!y),style:k,children:y?_.jsx(g,{}):_.jsx(p,{})}),D=e==="right"||e==="down"?R:N,P=e==="left"||e==="up"?R:N;return _.jsxs("div",{className:`expanding_container ${E} ${f||""}`,style:{...s,...S},children:[D,P]})},DU=({trigger:e,setOpen:t,open:n})=>{const[r,i]=C.useState(""),a=C.useContext(Xe);return a.options.useWorkerManager?_.jsxs(vs,{setOpen:t,open:n,trigger:e,title:"New Worker",description:"Create a new worker",children:[_.jsxs("div",{children:["Name:",_.jsx("br",{}),_.jsx("input",{className:"styledinput",onChange:s=>{i(s.currentTarget.value)},value:r})]}),_.jsx("div",{children:r&&_.jsx("div",{children:_.jsx("button",{className:"styledbtn",onClick:()=>{a.workermanager?.new_worker({name:r}),t(!1)},children:"Create"})})})]}):null},PU=({trigger:e,setOpen:t,open:n})=>{const r=C.useContext(Xe),[i,a]=C.useState(!1),s=r.workers(),u=r.worker?.uuid,f=(u?s[u]?.name:void 0)||u||"worker",d=async()=>{if(!r.worker)return;const h=await r.worker.export({withFiles:i});z9(h,f+".fnw","application/zip"),t(!1)};return _.jsx(vs,{setOpen:t,open:n,trigger:e,title:"Export Worker",description:"Export the worker as a .fnw file",children:_.jsxs("div",{children:[_.jsxs("div",{children:[_.jsx("input",{type:"checkbox",className:"styledcheckbox",checked:i,onChange:h=>{a(h.currentTarget.checked)}}),"Include Files"]}),_.jsx("button",{className:"styledbtn",onClick:d,children:"Export"})]})})},zU=()=>{const t=C.useContext(Xe).progress_state();return _.jsxs("div",{className:"statusbar",children:[_.jsx("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),_.jsx("span",{className:"statusbar-message",children:t.message})]})},jU=()=>{const e=C.useContext(Xe),t=e.workers(),[n,r]=C.useState(!1),[i,a]=C.useState(!1),s=y=>{y!=="__select__"&&e.workers&&e.workermanager&&t[y]&&(!t[y].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?")||e.workermanager.set_active(y))},u=async()=>{if(!e.worker||!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const b=await L9(".fnw");e.worker.update_from_export(b)},f=e.options.useWorkerManager&&e.workermanager&&e.workermanager.open||ig,d=f&&Object.keys(t).length>0,h=e.worker&&e.worker.is_open,p=h&&f;return f||h?_.jsxs(_.Fragment,{children:[_.jsxs(MA,{children:[_.jsx(DA,{asChild:!0,children:_.jsx("button",{className:"styledbtn",children:_.jsxs(_s,{direction:"row",children:["Worker ",_.jsx(ak,{})]})})}),_.jsx(PA,{className:"headermenucontent funcnodescontainer",children:_.jsxs(zA,{children:[d&&_.jsxs(kU,{children:[_.jsx(AU,{className:"headermenuitem submenuitem",children:_.jsxs(_s,{direction:"row",children:["Select",_.jsx(x0,{})]})}),_.jsx(TU,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5,children:_.jsx(EU,{value:e.worker?.uuid,onValueChange:y=>{s(y)},children:Object.keys(t).sort((y,b)=>{if(t[y].active&&!t[b].active)return-1;if(!t[y].active&&t[b].active)return 1;const x=t[y].name||y,E=t[b].name||b;return x.localeCompare(E)}).map(y=>_.jsx(CU,{className:"headermenuitem workerselectoption"+(t[y]?.active?" active":" inactive")+" headermenuitem",value:y,disabled:y===e.worker?.uuid,children:t[y]?.name||y},y))})})]}),h&&_.jsxs(_.Fragment,{children:[p&&_.jsx(vo,{className:"headermenuitem",onClick:()=>{if(e.worker){if(!e.workermanager)return e.logger.error("no workermanager");e.workermanager?.restart_worker(e.worker.uuid)}},children:"Restart"}),_.jsx(vo,{className:"headermenuitem",onClick:()=>{e.worker&&e.worker.stop()},children:"Stop"}),_.jsx(vo,{className:"headermenuitem",onClick:()=>a(!0),children:"Export"}),_.jsx(vo,{className:"headermenuitem",onClick:u,children:"Update"})]}),f&&_.jsx(_.Fragment,{children:_.jsx(vo,{className:"headermenuitem",onClick:()=>r(!0),children:"New"})})]})})]}),_.jsx(DU,{open:n,setOpen:r}),_.jsx(PU,{open:i,setOpen:a})]}):null},IU=()=>{const e=C.useContext(Xe),t=()=>{window.confirm("Are you sure you want to start a new flow?")&&e.worker?.clear()},n=async()=>{const i=await e.worker?.save();if(!i)return;const a=new Blob([JSON.stringify(i)],{type:"application/json"}),s=URL.createObjectURL(a),u=document.createElement("a");u.href=s,u.download="flow.json",u.click(),URL.revokeObjectURL(s),u.remove()},r=async()=>{const i=document.createElement("input");i.type="file",i.accept=".json",i.onchange=async a=>{const s=a.target.files?.[0];if(!s)return;const u=new FileReader;u.onload=async f=>{const d=f.target?.result;if(!d)return;const h=JSON.parse(d);await e.worker?.load(h)},u.readAsText(s)},i.click()};return _.jsx(_.Fragment,{children:_.jsxs(MA,{children:[_.jsx(DA,{asChild:!0,children:_.jsx("button",{className:"styledbtn",children:_.jsxs(_s,{direction:"row",children:["Nodespace ",_.jsx(ak,{})]})})}),_.jsx(PA,{className:"headermenucontent funcnodescontainer",children:_.jsxs(zA,{children:[_.jsx(vo,{className:"headermenuitem",onClick:t,children:"New"}),_.jsx(vo,{className:"headermenuitem",onClick:n,children:"Save"}),_.jsx(vo,{className:"headermenuitem",onClick:r,children:"Load"})]})})]})})},LU=({...e})=>{const t=C.useContext(Xe),n=t.workerstate();return Object.keys(e).length>0&&t.logger.debug("headerprops",e),_.jsxs(_s,{className:"funcnodesreactflowheader",direction:"row",wrap:!0,children:[_.jsx(_s,{className:"headerelement m-w-6",grow:{"":!0,m:!1},children:_.jsx(zU,{})}),(e.showmenu||ig)&&_.jsxs(_s,{direction:"row",wrap:!0,children:[_.jsx("div",{className:"headerelement",children:_.jsx(jU,{})}),(t.worker&&n.is_open||ig)&&_.jsx("div",{className:"headerelement",children:_.jsx(IU,{})})]})]})};function uue(){}function cue(){}function FU(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$U=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HU={};function LA(e,t){return(HU.jsx?$U:BU).test(e)}const VU=/[ \t\n\f\r]/g;function UU(e){return typeof e=="object"?e.type==="text"?FA(e.value):!1:FA(e)}function FA(e){return e.replace(VU,"")===""}class Su{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Su.prototype.normal={},Su.prototype.property={},Su.prototype.space=void 0;function BA(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Su(n,r,t)}function Q0(e){return e.toLowerCase()}class Tn{constructor(t,n){this.attribute=n,this.property=t}}Tn.prototype.attribute="",Tn.prototype.booleanish=!1,Tn.prototype.boolean=!1,Tn.prototype.commaOrSpaceSeparated=!1,Tn.prototype.commaSeparated=!1,Tn.prototype.defined=!1,Tn.prototype.mustUseProperty=!1,Tn.prototype.number=!1,Tn.prototype.overloadedBoolean=!1,Tn.prototype.property="",Tn.prototype.spaceSeparated=!1,Tn.prototype.space=void 0;let qU=0;const Be=ya(),Ft=ya(),$A=ya(),ge=ya(),yt=ya(),Es=ya(),qn=ya();function ya(){return 2**++qU}const J0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Ft,commaOrSpaceSeparated:qn,commaSeparated:Es,number:ge,overloadedBoolean:$A,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),ey=Object.keys(J0);class ty extends Tn{constructor(t,n,r,i){let a=-1;if(super(t,n),HA(this,"space",i),typeof r=="number")for(;++a<ey.length;){const s=ey[a];HA(this,ey[a],(r&J0[s])===J0[s])}}}ty.prototype.defined=!0;function HA(e,t,n){n&&(e[t]=n)}function Cs(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ty(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Q0(r)]=r,n[Q0(a.attribute)]=r}return new Su(t,n,e.space)}const VA=Cs({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:yt,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ge,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:yt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Ft,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function UA(e,t){return t in e?e[t]:t}function qA(e,t){return UA(e,t.toLowerCase())}const YU=Cs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Es,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:yt,autoFocus:Be,autoPlay:Be,blocking:yt,capture:null,charSet:null,checked:Be,cite:null,className:yt,cols:ge,colSpan:null,content:null,contentEditable:Ft,controls:Be,controlsList:yt,coords:ge|Es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:$A,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:yt,height:ge,hidden:Be,high:ge,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:yt,itemRef:yt,itemScope:Be,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:ge,pattern:null,ping:yt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:yt,required:Be,reversed:Be,rows:ge,rowSpan:ge,sandbox:yt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Ft,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:qA}),GU=Cs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Es,g2:Es,glyphName:Es,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:UA}),YA=Cs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),GA=Cs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qA}),XA=Cs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},WU=/[A-Z]/g,WA=/-[a-z]/g,KU=/^data[-\w.:]+$/i;function ZU(e,t){const n=Q0(t);let r=t,i=Tn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&KU.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(WA,JU);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!WA.test(a)){let s=a.replace(WU,QU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ty}return new i(r,t)}function QU(e){return"-"+e.toLowerCase()}function JU(e){return e.charAt(1).toUpperCase()}const eq=BA([VA,YU,YA,GA,XA],"html"),ny=BA([VA,GU,YA,GA,XA],"svg");function tq(e){return e.join(" ").trim()}var ks={},ry,KA;function nq(){if(KA)return ry;KA=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,f=`
|
664
|
+
*/const N7={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"]},M7={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},D7={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},P7={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"]},z7={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},j7={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},I7={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"]},L7={prefix:"fas",iconName:"network-wired",icon:[640,512,[],"f6ff","M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z"]},F7={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},B7={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},$7={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},H7={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},V7={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},U7={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},q7={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"]};h7.autoAddCss=!1;const yn=e=>{const{style:t,...n}=e;return _.jsx("span",{style:{marginLeft:"5px",...t},children:_.jsx(b0,{...n})})},ak=e=>_.jsx(yn,{...e,icon:M7}),x0=e=>_.jsx(yn,{...e,icon:U7}),sk=e=>_.jsx(yn,{...e,icon:V7}),lk=e=>_.jsx(yn,{...e,icon:$7}),Y7=e=>_.jsx(yn,{...e,icon:D7}),G7=e=>_.jsx(yn,{...e,icon:N7}),X7=e=>_.jsx(yn,{...e,icon:q7}),uk=e=>_.jsx(yn,{...e,icon:B7}),w0=e=>_.jsx(yn,{...e,icon:z7}),du=w0,ck=e=>_.jsx(yn,{...e,icon:H7}),W7=e=>_.jsx(yn,{...e,icon:I7}),K7=e=>_.jsx(yn,{...e,icon:P7}),Z7=e=>_.jsx(yn,{...e,icon:L7}),Q7=e=>_.jsx(yn,{...e,icon:j7}),J7=e=>_.jsx(yn,{...e,icon:F7}),vs=({trigger:e,title:t,description:n,children:r,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:u,setOpen:f,modal:d=!0})=>{const h=b=>{f&&f(b),a&&a(b)},g=C.useContext(Xe).local_state(b=>b.funcnodescontainerRef),y=_.jsx(hB,{asChild:!0,children:_.jsxs("div",{className:"dialogconent funcnodescontainer",children:[t&&_.jsx(pB,{className:"dialogtitle",children:t}),_.jsx(mB,{className:"dialogdescription",children:n}),_.jsx("div",{className:"dialogchildren",children:r}),_.jsx("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"},children:(s||[]).map((b,x)=>_.jsx(UE,{asChild:!0,children:_.jsx("button",{className:"dialogsendbutton",onClick:b.onClick,children:b.text})},x))}),i&&_.jsx(UE,{asChild:!0,children:_.jsx("button",{className:"dialogclosebutton","aria-label":"Close",children:_.jsx(ck,{})})})]})});return _.jsxs(uB,{open:u,onOpenChange:h,modal:d,children:[e&&_.jsx(cB,{asChild:!0,children:e}),_.jsxs(fB,{container:g,children:[_.jsx(dB,{className:"dialogoverlay funcnodescontainer"}),y]})]})};function S0(e){const t=e+"CollectionProvider",[n,r]=lo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:E,children:S}=x,A=Xt.useRef(null),k=Xt.useRef(new Map).current;return _.jsx(i,{scope:E,itemMap:k,collectionRef:A,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=ls(u),d=Xt.forwardRef((x,E)=>{const{scope:S,children:A}=x,k=a(u,S),R=_t(E,k.collectionRef);return _.jsx(f,{ref:R,children:A})});d.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=ls(h),y=Xt.forwardRef((x,E)=>{const{scope:S,children:A,...k}=x,R=Xt.useRef(null),N=_t(E,R),D=a(h,S);return Xt.useEffect(()=>(D.itemMap.set(R,{ref:R,...k}),()=>void D.itemMap.delete(R))),_.jsx(g,{[p]:"",ref:N,children:A})});y.displayName=h;function b(x){const E=a(e+"CollectionConsumer",x);return Xt.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const k=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((D,P)=>k.indexOf(D.ref.current)-k.indexOf(P.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:d,ItemSlot:y},b,r]}var eH=C.createContext(void 0);function _0(e){const t=C.useContext(eH);return e||t||"ltr"}const tH=["top","right","bottom","left"],mo=Math.min,Vn=Math.max,_d=Math.round,Ed=Math.floor,Xr=e=>({x:e,y:e}),nH={left:"right",right:"left",bottom:"top",top:"bottom"},rH={start:"end",end:"start"};function E0(e,t,n){return Vn(e,mo(t,n))}function Ci(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function bs(e){return e.split("-")[1]}function C0(e){return e==="x"?"y":"x"}function k0(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(ki(e))?"y":"x"}function A0(e){return C0(go(e))}function iH(e,t,n){n===void 0&&(n=!1);const r=bs(e),i=A0(e),a=k0(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Cd(s)),[s,Cd(s)]}function oH(e){const t=Cd(e);return[T0(e),t,T0(t)]}function T0(e){return e.replace(/start|end/g,t=>rH[t])}function aH(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:s;default:return[]}}function sH(e,t,n,r){const i=bs(e);let a=aH(ki(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(T0)))),a}function Cd(e){return e.replace(/left|right|bottom|top/g,t=>nH[t])}function lH(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return typeof e!="number"?lH(e):{top:e,right:e,bottom:e,left:e}}function kd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dk(e,t,n){let{reference:r,floating:i}=e;const a=go(t),s=A0(t),u=k0(s),f=ki(t),d=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[u]/2-i[u]/2;let y;switch(f){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(bs(t)){case"start":y[s]-=g*(n&&d?-1:1);break;case"end":y[s]+=g*(n&&d?-1:1);break}return y}const uH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=dk(d,r,f),g=r,y={},b=0;for(let x=0;x<u.length;x++){const{name:E,fn:S}=u[x],{x:A,y:k,data:R,reset:N}=await S({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:y,rects:d,platform:s,elements:{reference:e,floating:t}});h=A??h,p=k??p,y={...y,[E]:{...y[E],...R}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(d=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=dk(d,g,f)),x=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:y}};async function hu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Ci(t,e),b=fk(y),E=u[g?p==="floating"?"reference":"floating":p],S=kd(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:d,rootBoundary:h,strategy:f})),A=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),R=await(a.isElement==null?void 0:a.isElement(k))?await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1}:{x:1,y:1},N=kd(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:A,offsetParent:k,strategy:f}):A);return{top:(S.top-N.top+b.top)/R.y,bottom:(N.bottom-S.bottom+b.bottom)/R.y,left:(S.left-N.left+b.left)/R.x,right:(N.right-S.right+b.right)/R.x}}const cH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:d,padding:h=0}=Ci(e,t)||{};if(d==null)return{};const p=fk(h),g={x:n,y:r},y=A0(i),b=k0(y),x=await s.getDimensions(d),E=y==="y",S=E?"top":"left",A=E?"bottom":"right",k=E?"clientHeight":"clientWidth",R=a.reference[b]+a.reference[y]-g[y]-a.floating[b],N=g[y]-a.reference[y],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let P=D?D[k]:0;(!P||!await(s.isElement==null?void 0:s.isElement(D)))&&(P=u.floating[k]||a.floating[b]);const F=R/2-N/2,V=P/2-x[b]/2-1,T=mo(p[S],V),$=mo(p[A],V),H=T,G=P-x[b]-$,j=P/2-x[b]/2+F,U=E0(H,j,G),z=!f.arrow&&bs(i)!=null&&j!==U&&a.reference[b]/2-(j<H?T:$)-x[b]/2<0,B=z?j<H?j-H:j-G:0;return{[y]:g[y]+B,data:{[y]:U,centerOffset:j-U-B,...z&&{alignmentOffset:B}},reset:z}}}),fH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:u,platform:f,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...E}=Ci(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=ki(i),A=go(u),k=ki(u)===u,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),N=g||(k||!x?[Cd(u)]:oH(u)),D=b!=="none";!g&&D&&N.push(...sH(u,x,b,R));const P=[u,...N],F=await hu(t,E),V=[];let T=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&V.push(F[S]),p){const j=iH(i,s,R);V.push(F[j[0]],F[j[1]])}if(T=[...T,{placement:i,overflows:V}],!V.every(j=>j<=0)){var $,H;const j=((($=a.flip)==null?void 0:$.index)||0)+1,U=P[j];if(U)return{data:{index:j,overflows:T},reset:{placement:U}};let z=(H=T.filter(B=>B.overflows[0]<=0).sort((B,q)=>B.overflows[1]-q.overflows[1])[0])==null?void 0:H.placement;if(!z)switch(y){case"bestFit":{var G;const B=(G=T.filter(q=>{if(D){const Y=go(q.placement);return Y===A||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,O)=>Y+O,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];B&&(z=B);break}case"initialPlacement":z=u;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function hk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pk(e){return tH.some(t=>e[t]>=0)}const dH=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ci(e,t);switch(r){case"referenceHidden":{const a=await hu(t,{...i,elementContext:"reference"}),s=hk(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pk(s)}}}case"escaped":{const a=await hu(t,{...i,altBoundary:!0}),s=hk(a,n.floating);return{data:{escapedOffsets:s,escaped:pk(s)}}}default:return{}}}}};async function hH(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=ki(n),u=bs(n),f=go(n)==="y",d=["left","top"].includes(s)?-1:1,h=a&&f?-1:1,p=Ci(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),f?{x:y*h,y:g*d}:{x:g*d,y:y*h}}const pH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await hH(t,e);return s===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},mH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:E=>{let{x:S,y:A}=E;return{x:S,y:A}}},...f}=Ci(e,t),d={x:n,y:r},h=await hu(t,f),p=go(ki(i)),g=C0(p);let y=d[g],b=d[p];if(a){const E=g==="y"?"top":"left",S=g==="y"?"bottom":"right",A=y+h[E],k=y-h[S];y=E0(A,y,k)}if(s){const E=p==="y"?"top":"left",S=p==="y"?"bottom":"right",A=b+h[E],k=b-h[S];b=E0(A,b,k)}const x=u.fn({...t,[g]:y,[p]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:a,[p]:s}}}}}},gH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=Ci(e,t),h={x:n,y:r},p=go(i),g=C0(p);let y=h[g],b=h[p];const x=Ci(u,t),E=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){const k=g==="y"?"height":"width",R=a.reference[g]-a.floating[k]+E.mainAxis,N=a.reference[g]+a.reference[k]-E.mainAxis;y<R?y=R:y>N&&(y=N)}if(d){var S,A;const k=g==="y"?"width":"height",R=["top","left"].includes(ki(i)),N=a.reference[p]-a.floating[k]+(R&&((S=s.offset)==null?void 0:S[p])||0)+(R?0:E.crossAxis),D=a.reference[p]+a.reference[k]+(R?0:((A=s.offset)==null?void 0:A[p])||0)-(R?E.crossAxis:0);b<N?b=N:b>D&&(b=D)}return{[g]:y,[p]:b}}}},yH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...d}=Ci(e,t),h=await hu(t,d),p=ki(i),g=bs(i),y=go(i)==="y",{width:b,height:x}=a.floating;let E,S;p==="top"||p==="bottom"?(E=p,S=g===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=p,E=g==="end"?"top":"bottom");const A=x-h.top-h.bottom,k=b-h.left-h.right,R=mo(x-h[E],A),N=mo(b-h[S],k),D=!t.middlewareData.shift;let P=R,F=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=A),D&&!g){const T=Vn(h.left,0),$=Vn(h.right,0),H=Vn(h.top,0),G=Vn(h.bottom,0);y?F=b-2*(T!==0||$!==0?T+$:Vn(h.left,h.right)):P=x-2*(H!==0||G!==0?H+G:Vn(h.top,h.bottom))}await f({...t,availableWidth:F,availableHeight:P});const V=await s.getDimensions(u.floating);return b!==V.width||x!==V.height?{reset:{rects:!0}}:{}}}};function Ad(){return typeof window<"u"}function xs(e){return mk(e)?(e.nodeName||"").toLowerCase():"#document"}function Un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(mk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mk(e){return Ad()?e instanceof Node||e instanceof Un(e).Node:!1}function Tr(e){return Ad()?e instanceof Element||e instanceof Un(e).Element:!1}function Kr(e){return Ad()?e instanceof HTMLElement||e instanceof Un(e).HTMLElement:!1}function gk(e){return!Ad()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Un(e).ShadowRoot}function pu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function vH(e){return["table","td","th"].includes(xs(e))}function Td(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function R0(e){const t=O0(),n=Tr(e)?Rr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function bH(e){let t=yo(e);for(;Kr(t)&&!ws(t);){if(R0(t))return t;if(Td(t))return null;t=yo(t)}return null}function O0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ws(e){return["html","body","#document"].includes(xs(e))}function Rr(e){return Un(e).getComputedStyle(e)}function Rd(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yo(e){if(xs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gk(e)&&e.host||Wr(e);return gk(t)?t.host:t}function yk(e){const t=yo(e);return ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&pu(t)?t:yk(t)}function mu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=yk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Un(i);if(a){const u=N0(s);return t.concat(s,s.visualViewport||[],pu(i)?i:[],u&&n?mu(u):[])}return t.concat(i,mu(i,[],n))}function N0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vk(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Kr(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,u=_d(n)!==a||_d(r)!==s;return u&&(n=a,r=s),{width:n,height:r,$:u}}function M0(e){return Tr(e)?e:e.contextElement}function Ss(e){const t=M0(e);if(!Kr(t))return Xr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=vk(t);let s=(a?_d(n.width):n.width)/r,u=(a?_d(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const xH=Xr(0);function bk(e){const t=Un(e);return!O0()||!t.visualViewport?xH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Un(e)?!1:t}function pa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=M0(e);let s=Xr(1);t&&(r?Tr(r)&&(s=Ss(r)):s=Ss(e));const u=wH(a,n,r)?bk(a):Xr(0);let f=(i.left+u.x)/s.x,d=(i.top+u.y)/s.y,h=i.width/s.x,p=i.height/s.y;if(a){const g=Un(a),y=r&&Tr(r)?Un(r):r;let b=g,x=N0(b);for(;x&&r&&y!==b;){const E=Ss(x),S=x.getBoundingClientRect(),A=Rr(x),k=S.left+(x.clientLeft+parseFloat(A.paddingLeft))*E.x,R=S.top+(x.clientTop+parseFloat(A.paddingTop))*E.y;f*=E.x,d*=E.y,h*=E.x,p*=E.y,f+=k,d+=R,b=Un(x),x=N0(b)}}return kd({width:h,height:p,x:f,y:d})}function D0(e,t){const n=Rd(e).scrollLeft;return t?t.left+n:pa(Wr(e)).left+n}function xk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:D0(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function SH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=Wr(r),u=t?Td(t.floating):!1;if(r===s||u&&a)return n;let f={scrollLeft:0,scrollTop:0},d=Xr(1);const h=Xr(0),p=Kr(r);if((p||!p&&!a)&&((xs(r)!=="body"||pu(s))&&(f=Rd(r)),Kr(r))){const y=pa(r);d=Ss(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=s&&!p&&!a?xk(s,f,!0):Xr(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-f.scrollTop*d.y+h.y+g.y}}function _H(e){return Array.from(e.getClientRects())}function EH(e){const t=Wr(e),n=Rd(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+D0(e);const u=-n.scrollTop;return Rr(r).direction==="rtl"&&(s+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:u}}function CH(e,t){const n=Un(e),r=Wr(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=O0();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}return{width:a,height:s,x:u,y:f}}function kH(e,t){const n=pa(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Kr(e)?Ss(e):Xr(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,d=r*a.y;return{width:s,height:u,x:f,y:d}}function wk(e,t,n){let r;if(t==="viewport")r=CH(e,n);else if(t==="document")r=EH(Wr(e));else if(Tr(t))r=kH(t,n);else{const i=bk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return kd(r)}function Sk(e,t){const n=yo(e);return n===t||!Tr(n)||ws(n)?!1:Rr(n).position==="fixed"||Sk(n,t)}function AH(e,t){const n=t.get(e);if(n)return n;let r=mu(e,[],!1).filter(u=>Tr(u)&&xs(u)!=="body"),i=null;const a=Rr(e).position==="fixed";let s=a?yo(e):e;for(;Tr(s)&&!ws(s);){const u=Rr(s),f=R0(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||pu(s)&&!f&&Sk(e,s))?r=r.filter(h=>h!==s):i=u,s=yo(s)}return t.set(e,r),r}function TH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Td(t)?[]:AH(t,this._c):[].concat(n),r],u=s[0],f=s.reduce((d,h)=>{const p=wk(t,h,i);return d.top=Vn(p.top,d.top),d.right=mo(p.right,d.right),d.bottom=mo(p.bottom,d.bottom),d.left=Vn(p.left,d.left),d},wk(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function RH(e){const{width:t,height:n}=vk(e);return{width:t,height:n}}function OH(e,t,n){const r=Kr(t),i=Wr(t),a=n==="fixed",s=pa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Xr(0);if(r||!r&&!a)if((xs(t)!=="body"||pu(i))&&(u=Rd(t)),r){const g=pa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&(f.x=D0(i));const d=i&&!r&&!a?xk(i,u):Xr(0),h=s.left+u.scrollLeft-f.x-d.x,p=s.top+u.scrollTop-f.y-d.y;return{x:h,y:p,width:s.width,height:s.height}}function P0(e){return Rr(e).position==="static"}function _k(e,t){if(!Kr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wr(e)===n&&(n=n.ownerDocument.body),n}function Ek(e,t){const n=Un(e);if(Td(e))return n;if(!Kr(e)){let i=yo(e);for(;i&&!ws(i);){if(Tr(i)&&!P0(i))return i;i=yo(i)}return n}let r=_k(e,t);for(;r&&vH(r)&&P0(r);)r=_k(r,t);return r&&ws(r)&&P0(r)&&!R0(r)?n:r||bH(e)||n}const NH=async function(e){const t=this.getOffsetParent||Ek,n=this.getDimensions,r=await n(e.floating);return{reference:OH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MH(e){return Rr(e).direction==="rtl"}const DH={convertOffsetParentRelativeRectToViewportRelativeRect:SH,getDocumentElement:Wr,getClippingRect:TH,getOffsetParent:Ek,getElementRects:NH,getClientRects:_H,getDimensions:RH,getScale:Ss,isElement:Tr,isRTL:MH};function Ck(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function PH(e,t){let n=null,r;const i=Wr(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const d=e.getBoundingClientRect(),{left:h,top:p,width:g,height:y}=d;if(u||t(),!g||!y)return;const b=Ed(p),x=Ed(i.clientWidth-(h+g)),E=Ed(i.clientHeight-(p+y)),S=Ed(h),k={rootMargin:-b+"px "+-x+"px "+-E+"px "+-S+"px",threshold:Vn(0,mo(1,f))||1};let R=!0;function N(D){const P=D[0].intersectionRatio;if(P!==f){if(!R)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!Ck(d,e.getBoundingClientRect())&&s(),R=!1}try{n=new IntersectionObserver(N,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,k)}n.observe(e)}return s(!0),a}function kk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=M0(e),h=i||a?[...d?mu(d):[],...mu(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const p=d&&u?PH(d,n):null;let g=-1,y=null;s&&(y=new ResizeObserver(S=>{let[A]=S;A&&A.target===d&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),d&&!f&&y.observe(d),y.observe(t));let b,x=f?pa(e):null;f&&E();function E(){const S=pa(e);x&&!Ck(x,S)&&n(),x=S,b=requestAnimationFrame(E)}return n(),()=>{var S;h.forEach(A=>{i&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),p?.(),(S=y)==null||S.disconnect(),y=null,f&&cancelAnimationFrame(b)}}const zH=pH,jH=mH,IH=fH,LH=yH,FH=dH,Ak=cH,BH=gH,$H=(e,t,n)=>{const r=new Map,i={platform:DH,...n},a={...i.platform,_c:r};return uH(e,t,{...i,platform:a})};var Od=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Nd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Nd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Nd(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Tk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rk(e,t){const n=Tk(e);return Math.round(t*n)/n}function z0(e){const t=C.useRef(e);return Od(()=>{t.current=e}),t}function HH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:d}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=C.useState(r);Nd(g,r)||y(r);const[b,x]=C.useState(null),[E,S]=C.useState(null),A=C.useCallback(q=>{q!==D.current&&(D.current=q,x(q))},[]),k=C.useCallback(q=>{q!==P.current&&(P.current=q,S(q))},[]),R=a||b,N=s||E,D=C.useRef(null),P=C.useRef(null),F=C.useRef(h),V=f!=null,T=z0(f),$=z0(i),H=z0(d),G=C.useCallback(()=>{if(!D.current||!P.current)return;const q={placement:t,strategy:n,middleware:g};$.current&&(q.platform=$.current),$H(D.current,P.current,q).then(Y=>{const O={...Y,isPositioned:H.current!==!1};j.current&&!Nd(F.current,O)&&(F.current=O,Zl.flushSync(()=>{p(O)}))})},[g,t,n,$,H]);Od(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[d]);const j=C.useRef(!1);Od(()=>(j.current=!0,()=>{j.current=!1}),[]),Od(()=>{if(R&&(D.current=R),N&&(P.current=N),R&&N){if(T.current)return T.current(R,N,G);G()}},[R,N,G,T,V]);const U=C.useMemo(()=>({reference:D,floating:P,setReference:A,setFloating:k}),[A,k]),z=C.useMemo(()=>({reference:R,floating:N}),[R,N]),B=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!z.floating)return q;const Y=Rk(z.floating,h.x),O=Rk(z.floating,h.y);return u?{...q,transform:"translate("+Y+"px, "+O+"px)",...Tk(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:O}},[n,u,z.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:G,refs:U,elements:z,floatingStyles:B}),[h,G,U,z,B])}const VH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ak({element:r.current,padding:i}).fn(n):{}:r?Ak({element:r,padding:i}).fn(n):{}}}},UH=(e,t)=>({...zH(e),options:[e,t]}),qH=(e,t)=>({...jH(e),options:[e,t]}),YH=(e,t)=>({...BH(e),options:[e,t]}),GH=(e,t)=>({...IH(e),options:[e,t]}),XH=(e,t)=>({...LH(e),options:[e,t]}),WH=(e,t)=>({...FH(e),options:[e,t]}),KH=(e,t)=>({...VH(e),options:[e,t]});var ZH="Arrow",Ok=C.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return _.jsx(gt.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ok.displayName=ZH;var QH=Ok;function Nk(e){const[t,n]=C.useState(void 0);return ua(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var j0="Popper",[Mk,Md]=lo(j0),[JH,Dk]=Mk(j0),Pk=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.useState(null);return _.jsx(JH,{scope:t,anchor:r,onAnchorChange:i,children:n})};Pk.displayName=j0;var zk="PopperAnchor",jk=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=Dk(zk,n),s=C.useRef(null),u=_t(t,s);return C.useEffect(()=>{a.onAnchorChange(r?.current||s.current)}),r?null:_.jsx(gt.div,{...i,ref:u})});jk.displayName=zk;var I0="PopperContent",[eV,tV]=Mk(I0),Ik=C.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...x}=e,E=Dk(I0,n),[S,A]=C.useState(null),k=_t(t,le=>A(le)),[R,N]=C.useState(null),D=Nk(R),P=D?.width??0,F=D?.height??0,V=r+(a!=="center"?"-"+a:""),T=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},$=Array.isArray(d)?d:[d],H=$.length>0,G={padding:T,boundary:$.filter(rV),altBoundary:H},{refs:j,floatingStyles:U,placement:z,isPositioned:B,middlewareData:q}=HH({strategy:"fixed",placement:V,whileElementsMounted:(...le)=>kk(...le,{animationFrame:y==="always"}),elements:{reference:E.anchor},middleware:[UH({mainAxis:i+F,alignmentAxis:s}),f&&qH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?YH():void 0,...G}),f&&GH({...G}),XH({...G,apply:({elements:le,rects:he,availableWidth:ye,availableHeight:je})=>{const{width:Oe,height:be}=he.reference,Le=le.floating.style;Le.setProperty("--radix-popper-available-width",`${ye}px`),Le.setProperty("--radix-popper-available-height",`${je}px`),Le.setProperty("--radix-popper-anchor-width",`${Oe}px`),Le.setProperty("--radix-popper-anchor-height",`${be}px`)}}),R&&KH({element:R,padding:u}),iV({arrowWidth:P,arrowHeight:F}),g&&WH({strategy:"referenceHidden",...G})]}),[Y,O]=Bk(z),W=or(b);ua(()=>{B&&W?.()},[B,W]);const Z=q.arrow?.x,I=q.arrow?.y,ie=q.arrow?.centerOffset!==0,[fe,re]=C.useState();return ua(()=>{S&&re(window.getComputedStyle(S).zIndex)},[S]),_.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:B?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(eV,{scope:n,placedSide:Y,onArrowChange:N,arrowX:Z,arrowY:I,shouldHideArrow:ie,children:_.jsx(gt.div,{"data-side":Y,"data-align":O,...x,ref:k,style:{...x.style,animation:B?void 0:"none"}})})})});Ik.displayName=I0;var Lk="PopperArrow",nV={top:"bottom",right:"left",bottom:"top",left:"right"},Fk=C.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=tV(Lk,r),s=nV[a.placedSide];return _.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:_.jsx(QH,{...i,ref:n,style:{...i.style,display:"block"}})})});Fk.displayName=Lk;function rV(e){return e!==null}var iV=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,h]=Bk(n),p={start:"0%",center:"50%",end:"100%"}[h],g=(i.arrow?.x??0)+u/2,y=(i.arrow?.y??0)+f/2;let b="",x="";return d==="bottom"?(b=s?p:`${g}px`,x=`${-f}px`):d==="top"?(b=s?p:`${g}px`,x=`${r.floating.height+f}px`):d==="right"?(b=`${-f}px`,x=s?p:`${y}px`):d==="left"&&(b=`${r.floating.width+f}px`,x=s?p:`${y}px`),{data:{x:b,y:x}}}});function Bk(e){const[t,n="center"]=e.split("-");return[t,n]}var L0=Pk,F0=jk,$k=Ik,Hk=Fk,B0="rovingFocusGroup.onEntryFocus",oV={bubbles:!1,cancelable:!0},Dd="RovingFocusGroup",[$0,Vk,aV]=S0(Dd),[sV,Uk]=lo(Dd,[aV]),[lV,uV]=sV(Dd),qk=C.forwardRef((e,t)=>_.jsx($0.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx($0.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(cV,{...e,ref:t})})}));qk.displayName=Dd;var cV=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...p}=e,g=C.useRef(null),y=_t(t,g),b=_0(a),[x=null,E]=ss({prop:s,defaultProp:u,onChange:f}),[S,A]=C.useState(!1),k=or(d),R=Vk(n),N=C.useRef(!1),[D,P]=C.useState(0);return C.useEffect(()=>{const F=g.current;if(F)return F.addEventListener(B0,k),()=>F.removeEventListener(B0,k)},[k]),_.jsx(lV,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:x,onItemFocus:C.useCallback(F=>E(F),[E]),onItemShiftTab:C.useCallback(()=>A(!0),[]),onFocusableItemAdd:C.useCallback(()=>P(F=>F+1),[]),onFocusableItemRemove:C.useCallback(()=>P(F=>F-1),[]),children:_.jsx(gt.div,{tabIndex:S||D===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:Me(e.onMouseDown,()=>{N.current=!0}),onFocus:Me(e.onFocus,F=>{const V=!N.current;if(F.target===F.currentTarget&&V&&!S){const T=new CustomEvent(B0,oV);if(F.currentTarget.dispatchEvent(T),!T.defaultPrevented){const $=R().filter(z=>z.focusable),H=$.find(z=>z.active),G=$.find(z=>z.id===x),U=[H,G,...$].filter(Boolean).map(z=>z.ref.current);Xk(U,h)}}N.current=!1}),onBlur:Me(e.onBlur,()=>A(!1))})})}),Yk="RovingFocusGroupItem",Gk=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...s}=e,u=xi(),f=a||u,d=uV(Yk,n),h=d.currentTabStopId===f,p=Vk(n),{onFocusableItemAdd:g,onFocusableItemRemove:y}=d;return C.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),_.jsx($0.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:_.jsx(gt.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Me(e.onMouseDown,b=>{r?d.onItemFocus(f):b.preventDefault()}),onFocus:Me(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:Me(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=hV(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=p().filter(A=>A.focusable).map(A=>A.ref.current);if(x==="last")S.reverse();else if(x==="prev"||x==="next"){x==="prev"&&S.reverse();const A=S.indexOf(b.currentTarget);S=d.loop?pV(S,A+1):S.slice(A+1)}setTimeout(()=>Xk(S))}})})})});Gk.displayName=Yk;var fV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function hV(e,t,n){const r=dV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return fV[r]}function Xk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mV=qk,gV=Gk,H0=["Enter"," "],yV=["ArrowDown","PageUp","Home"],Wk=["ArrowUp","PageDown","End"],vV=[...yV,...Wk],bV={ltr:[...H0,"ArrowRight"],rtl:[...H0,"ArrowLeft"]},xV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gu="Menu",[yu,wV,SV]=S0(gu),[ma,Kk]=lo(gu,[SV,Md,Uk]),vu=Md(),Zk=Uk(),[Qk,ga]=ma(gu),[_V,bu]=ma(gu),Jk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:s=!0}=e,u=vu(t),[f,d]=C.useState(null),h=C.useRef(!1),p=or(a),g=_0(i);return C.useEffect(()=>{const y=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),_.jsx(L0,{...u,children:_.jsx(Qk,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:d,children:_.jsx(_V,{scope:t,onClose:C.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:g,modal:s,children:r})})})};Jk.displayName=gu;var EV="MenuAnchor",V0=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vu(n);return _.jsx(F0,{...i,...r,ref:t})});V0.displayName=EV;var CV="MenuPortal",[sue,eA]=ma(CV,{forceMount:void 0}),ar="MenuContent",[kV,U0]=ma(ar),tA=C.forwardRef((e,t)=>{const n=eA(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ga(ar,e.__scopeMenu),s=bu(ar,e.__scopeMenu);return _.jsx(yu.Provider,{scope:e.__scopeMenu,children:_.jsx(wi,{present:r||a.open,children:_.jsx(yu.Slot,{scope:e.__scopeMenu,children:s.modal?_.jsx(AV,{...i,ref:t}):_.jsx(TV,{...i,ref:t})})})})}),AV=C.forwardRef((e,t)=>{const n=ga(ar,e.__scopeMenu),r=C.useRef(null),i=_t(t,r);return C.useEffect(()=>{const a=r.current;if(a)return Rg(a)},[]),_.jsx(q0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Me(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TV=C.forwardRef((e,t)=>{const n=ga(ar,e.__scopeMenu);return _.jsx(q0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),RV=ls("MenuContent.ScrollLock"),q0=C.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...x}=e,E=ga(ar,n),S=bu(ar,n),A=vu(n),k=Zk(n),R=wV(n),[N,D]=C.useState(null),P=C.useRef(null),F=_t(t,P,E.onContentChange),V=C.useRef(0),T=C.useRef(""),$=C.useRef(0),H=C.useRef(null),G=C.useRef("right"),j=C.useRef(0),U=b?sd:C.Fragment,z=b?{as:RV,allowPinchZoom:!0}:void 0,B=Y=>{const O=T.current+Y,W=R().filter(le=>!le.disabled),Z=document.activeElement,I=W.find(le=>le.ref.current===Z)?.textValue,ie=W.map(le=>le.textValue),fe=$V(ie,O,I),re=W.find(le=>le.textValue===fe)?.ref.current;(function le(he){T.current=he,window.clearTimeout(V.current),he!==""&&(V.current=window.setTimeout(()=>le(""),1e3))})(O),re&&setTimeout(()=>re.focus())};C.useEffect(()=>()=>window.clearTimeout(V.current),[]),_g();const q=C.useCallback(Y=>G.current===H.current?.side&&VV(Y,H.current?.area),[]);return _.jsx(kV,{scope:n,searchRef:T,onItemEnter:C.useCallback(Y=>{q(Y)&&Y.preventDefault()},[q]),onItemLeave:C.useCallback(Y=>{q(Y)||(P.current?.focus(),D(null))},[q]),onTriggerLeave:C.useCallback(Y=>{q(Y)&&Y.preventDefault()},[q]),pointerGraceTimerRef:$,onPointerGraceIntentChange:C.useCallback(Y=>{H.current=Y},[]),children:_.jsx(U,{...z,children:_.jsx(Jf,{asChild:!0,trapped:i,onMountAutoFocus:Me(a,Y=>{Y.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:_.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:_.jsx(mV,{asChild:!0,...k,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:D,onEntryFocus:Me(f,Y=>{S.isUsingKeyboardRef.current||Y.preventDefault()}),preventScrollOnEntryFocus:!0,children:_.jsx($k,{role:"menu","aria-orientation":"vertical","data-state":bA(E.open),"data-radix-menu-content":"",dir:S.dir,...A,...x,ref:F,style:{outline:"none",...x.style},onKeyDown:Me(x.onKeyDown,Y=>{const W=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,Z=Y.ctrlKey||Y.altKey||Y.metaKey,I=Y.key.length===1;W&&(Y.key==="Tab"&&Y.preventDefault(),!Z&&I&&B(Y.key));const ie=P.current;if(Y.target!==ie||!vV.includes(Y.key))return;Y.preventDefault();const re=R().filter(le=>!le.disabled).map(le=>le.ref.current);Wk.includes(Y.key)&&re.reverse(),FV(re)}),onBlur:Me(e.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(V.current),T.current="")}),onPointerMove:Me(e.onPointerMove,wu(Y=>{const O=Y.target,W=j.current!==Y.clientX;if(Y.currentTarget.contains(O)&&W){const Z=Y.clientX>j.current?"right":"left";G.current=Z,j.current=Y.clientX}}))})})})})})})});tA.displayName=ar;var OV="MenuGroup",Y0=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{role:"group",...r,ref:t})});Y0.displayName=OV;var NV="MenuLabel",nA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{...r,ref:t})});nA.displayName=NV;var Pd="MenuItem",rA="menu.itemSelect",zd=C.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=C.useRef(null),s=bu(Pd,e.__scopeMenu),u=U0(Pd,e.__scopeMenu),f=_t(t,a),d=C.useRef(!1),h=()=>{const p=a.current;if(!n&&p){const g=new CustomEvent(rA,{bubbles:!0,cancelable:!0});p.addEventListener(rA,y=>r?.(y),{once:!0}),iE(p,g),g.defaultPrevented?d.current=!1:s.onClose()}};return _.jsx(iA,{...i,ref:f,disabled:n,onClick:Me(e.onClick,h),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:Me(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:Me(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||H0.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});zd.displayName=Pd;var iA=C.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,s=U0(Pd,n),u=Zk(n),f=C.useRef(null),d=_t(t,f),[h,p]=C.useState(!1),[g,y]=C.useState("");return C.useEffect(()=>{const b=f.current;b&&y((b.textContent??"").trim())},[a.children]),_.jsx(yu.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:_.jsx(gV,{asChild:!0,...u,focusable:!r,children:_.jsx(gt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:Me(e.onPointerMove,wu(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Me(e.onPointerLeave,wu(b=>s.onItemLeave(b))),onFocus:Me(e.onFocus,()=>p(!0)),onBlur:Me(e.onBlur,()=>p(!1))})})})}),MV="MenuCheckboxItem",oA=C.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return _.jsx(cA,{scope:e.__scopeMenu,checked:n,children:_.jsx(zd,{role:"menuitemcheckbox","aria-checked":jd(n)?"mixed":n,...i,ref:t,"data-state":W0(n),onSelect:Me(i.onSelect,()=>r?.(jd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});oA.displayName=MV;var aA="MenuRadioGroup",[DV,PV]=ma(aA,{value:void 0,onValueChange:()=>{}}),sA=C.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=or(r);return _.jsx(DV,{scope:e.__scopeMenu,value:n,onValueChange:a,children:_.jsx(Y0,{...i,ref:t})})});sA.displayName=aA;var lA="MenuRadioItem",uA=C.forwardRef((e,t)=>{const{value:n,...r}=e,i=PV(lA,e.__scopeMenu),a=n===i.value;return _.jsx(cA,{scope:e.__scopeMenu,checked:a,children:_.jsx(zd,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":W0(a),onSelect:Me(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});uA.displayName=lA;var G0="MenuItemIndicator",[cA,zV]=ma(G0,{checked:!1}),fA=C.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=zV(G0,n);return _.jsx(wi,{present:r||jd(a.checked)||a.checked===!0,children:_.jsx(gt.span,{...i,ref:t,"data-state":W0(a.checked)})})});fA.displayName=G0;var jV="MenuSeparator",dA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return _.jsx(gt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});dA.displayName=jV;var IV="MenuArrow",hA=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vu(n);return _.jsx(Hk,{...i,...r,ref:t})});hA.displayName=IV;var X0="MenuSub",[LV,pA]=ma(X0),mA=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ga(X0,t),s=vu(t),[u,f]=C.useState(null),[d,h]=C.useState(null),p=or(i);return C.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),_.jsx(L0,{...s,children:_.jsx(Qk,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:h,children:_.jsx(LV,{scope:t,contentId:xi(),triggerId:xi(),trigger:u,onTriggerChange:f,children:n})})})};mA.displayName=X0;var xu="MenuSubTrigger",gA=C.forwardRef((e,t)=>{const n=ga(xu,e.__scopeMenu),r=bu(xu,e.__scopeMenu),i=pA(xu,e.__scopeMenu),a=U0(xu,e.__scopeMenu),s=C.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=a,d={__scopeMenu:e.__scopeMenu},h=C.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return C.useEffect(()=>h,[h]),C.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),f(null)}},[u,f]),_.jsx(V0,{asChild:!0,...d,children:_.jsx(iA,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":bA(n.open),...e,ref:Zf(t,i.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Me(e.onPointerMove,wu(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Me(e.onPointerLeave,wu(p=>{h();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,b=y==="right",x=b?-5:5,E=g[b?"left":"right"],S=g[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+x,y:p.clientY},{x:E,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x:E,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Me(e.onKeyDown,p=>{const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||bV[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});gA.displayName=xu;var yA="MenuSubContent",vA=C.forwardRef((e,t)=>{const n=eA(ar,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ga(ar,e.__scopeMenu),s=bu(ar,e.__scopeMenu),u=pA(yA,e.__scopeMenu),f=C.useRef(null),d=_t(t,f);return _.jsx(yu.Provider,{scope:e.__scopeMenu,children:_.jsx(wi,{present:r||a.open,children:_.jsx(yu.Slot,{scope:e.__scopeMenu,children:_.jsx(q0,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{s.isUsingKeyboardRef.current&&f.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Me(e.onFocusOutside,h=>{h.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Me(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:Me(e.onKeyDown,h=>{const p=h.currentTarget.contains(h.target),g=xV[s.dir].includes(h.key);p&&g&&(a.onOpenChange(!1),u.trigger?.focus(),h.preventDefault())})})})})})});vA.displayName=yA;function bA(e){return e?"open":"closed"}function jd(e){return e==="indeterminate"}function W0(e){return jd(e)?"indeterminate":e?"checked":"unchecked"}function FV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function BV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $V(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=BV(e,Math.max(a,0));i.length===1&&(s=s.filter(d=>d!==n));const f=s.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function HV(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const u=t[a].x,f=t[a].y,d=t[s].x,h=t[s].y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(i=!i)}return i}function VV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HV(n,t)}function wu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var UV=Jk,qV=V0,YV=tA,GV=Y0,XV=nA,WV=zd,KV=oA,ZV=sA,QV=uA,JV=fA,eU=dA,tU=hA,nU=mA,rU=gA,iU=vA,K0="DropdownMenu",[oU,lue]=lo(K0,[Kk]),vn=Kk(),[aU,xA]=oU(K0),wA=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:u=!0}=e,f=vn(t),d=C.useRef(null),[h=!1,p]=ss({prop:i,defaultProp:a,onChange:s});return _.jsx(aU,{scope:t,triggerId:xi(),triggerRef:d,contentId:xi(),open:h,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(g=>!g),[p]),modal:u,children:_.jsx(UV,{...f,open:h,onOpenChange:p,dir:r,modal:u,children:n})})};wA.displayName=K0;var SA="DropdownMenuTrigger",_A=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=xA(SA,n),s=vn(n);return _.jsx(qV,{asChild:!0,...s,children:_.jsx(gt.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Zf(t,a.triggerRef),onPointerDown:Me(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:Me(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});_A.displayName=SA;var EA="DropdownMenuContent",CA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=xA(EA,n),a=vn(n),s=C.useRef(!1);return _.jsx(YV,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Me(e.onCloseAutoFocus,u=>{s.current||i.triggerRef.current?.focus(),s.current=!1,u.preventDefault()}),onInteractOutside:Me(e.onInteractOutside,u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,h=f.button===2||d;(!i.modal||h)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});CA.displayName=EA;var sU="DropdownMenuGroup",kA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(GV,{...i,...r,ref:t})});kA.displayName=sU;var lU="DropdownMenuLabel",uU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(XV,{...i,...r,ref:t})});uU.displayName=lU;var cU="DropdownMenuItem",AA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(WV,{...i,...r,ref:t})});AA.displayName=cU;var fU="DropdownMenuCheckboxItem",dU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(KV,{...i,...r,ref:t})});dU.displayName=fU;var hU="DropdownMenuRadioGroup",TA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(ZV,{...i,...r,ref:t})});TA.displayName=hU;var pU="DropdownMenuRadioItem",RA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(QV,{...i,...r,ref:t})});RA.displayName=pU;var mU="DropdownMenuItemIndicator",gU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(JV,{...i,...r,ref:t})});gU.displayName=mU;var yU="DropdownMenuSeparator",vU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(eU,{...i,...r,ref:t})});vU.displayName=yU;var bU="DropdownMenuArrow",xU=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(tU,{...i,...r,ref:t})});xU.displayName=bU;var wU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,s=vn(t),[u=!1,f]=ss({prop:r,defaultProp:a,onChange:i});return _.jsx(nU,{...s,open:u,onOpenChange:f,children:n})},SU="DropdownMenuSubTrigger",OA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(rU,{...i,...r,ref:t})});OA.displayName=SU;var _U="DropdownMenuSubContent",NA=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=vn(n);return _.jsx(iU,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});NA.displayName=_U;var MA=wA,DA=_A,PA=CA,zA=kA,vo=AA,EU=TA,CU=RA,kU=wU,AU=OA,TU=NA;const Z0={xxs:0,xs:320,s:480,m:768,l:960,xl:1280,xxl:1920},jA=C.createContext(void 0),RU=C.forwardRef((e,t)=>{const{className:n,children:r,...i}=e,[a,s]=C.useState("m"),[u,f]=C.useState(0),[d,h]=C.useState(0),p=C.useRef(null);C.useImperativeHandle(t,()=>p.current,[]);const g=C.useCallback(y=>{const b=y.width,x=y.height;let E="xxs";Object.entries(Z0).forEach(([S,A])=>{b>=A&&(E=S)}),s(S=>S!==E?E:S),f(b),h(x)},[]);return C.useEffect(()=>{const y=p.current;if(!y)return;const b=new ResizeObserver(x=>{for(let E of x)g(E.contentRect)});return b.observe(y),g(y.getBoundingClientRect()),()=>{b.disconnect()}},[]),_.jsx(jA.Provider,{value:{wKey:a,w:u,h:d},children:_.jsx("div",{ref:p,className:`size-context w-${a} ${n||""}`.trim(),...i,children:r})})}),OU=()=>{const e=C.useContext(jA);if(!e)throw new Error("useSizeContext must be used within a SizeContextContainerContext");return e},NU=(e,t)=>e==t?!1:e==""?!0:Z0[e]<Z0[t],MU=e=>NU(OU().wKey,e),_s=({direction:e,className:t="",children:n,wrap:r=!1,grow:i=!1,...a})=>{const s="float-container";let u="";typeof e=="string"?u=`direction-${e} `:typeof e=="object"&&e!==null&&Object.entries(e).forEach(([h,p])=>{h===""?u+=`direction-${p} `:u+=`${h}-direction-${p} `});let f="";typeof i=="boolean"?f=i?"grow ":"":typeof i=="object"&&i!==null&&Object.entries(i).forEach(([h,p])=>{h===""?f+=p?"grow ":"no-grow":f+=p?`${h}-grow `:`${h}-no-grow`}),u+=f,r&&(u+="flex-wrap "),u=u.trim();const d=`${s} ${u} ${t}`.trim();return _.jsx("div",{className:d,...a,children:n})},IA=({direction:e,expanded:t=!0,children:n,className:r,maxSize:i="18.75rem",expanderSize:a="2rem",containerStyle:s,style:u,containerClassName:f,onExpandChange:d,...h})=>{const p={up:w0,down:uk,left:sk,right:x0}[e],g={up:uk,down:w0,left:x0,right:sk}[e],[y,b]=C.useState(t),x=F=>{y!==F&&(b(F),d&&d(F))},E=`${e} ${y?"expanded":"collapsed"}`,S=e==="right"||e==="left"?{width:y?i:a}:{height:y?i:a},A=e==="right"||e==="left"?{width:y?i:0}:{height:y?i:0},k=e==="right"||e==="left"?{width:a}:{height:a},R=_.jsx("div",{className:`expanding_container_content ${E} ${r||""}`.trim(),style:{...u,...A},...h,children:n}),N=_.jsx("div",{className:`expanding_container_expander ${E}`,onClick:()=>x(!y),style:k,children:y?_.jsx(g,{}):_.jsx(p,{})}),D=e==="right"||e==="down"?R:N,P=e==="left"||e==="up"?R:N;return _.jsxs("div",{className:`expanding_container ${E} ${f||""}`,style:{...s,...S},children:[D,P]})},DU=({trigger:e,setOpen:t,open:n})=>{const[r,i]=C.useState(""),a=C.useContext(Xe);return a.options.useWorkerManager?_.jsxs(vs,{setOpen:t,open:n,trigger:e,title:"New Worker",description:"Create a new worker",children:[_.jsxs("div",{children:["Name:",_.jsx("br",{}),_.jsx("input",{className:"styledinput",onChange:s=>{i(s.currentTarget.value)},value:r})]}),_.jsx("div",{children:r&&_.jsx("div",{children:_.jsx("button",{className:"styledbtn",onClick:()=>{a.workermanager?.new_worker({name:r}),t(!1)},children:"Create"})})})]}):null},PU=({trigger:e,setOpen:t,open:n})=>{const r=C.useContext(Xe),[i,a]=C.useState(!1),s=r.workers(),u=r.worker?.uuid,f=(u?s[u]?.name:void 0)||u||"worker",d=async()=>{if(!r.worker)return;const h=await r.worker.export({withFiles:i});z9(h,f+".fnw","application/zip"),t(!1)};return _.jsx(vs,{setOpen:t,open:n,trigger:e,title:"Export Worker",description:"Export the worker as a .fnw file",children:_.jsxs("div",{children:[_.jsxs("div",{children:[_.jsx("input",{type:"checkbox",className:"styledcheckbox",checked:i,onChange:h=>{a(h.currentTarget.checked)}}),"Include Files"]}),_.jsx("button",{className:"styledbtn",onClick:d,children:"Export"})]})})},zU=()=>{const t=C.useContext(Xe).progress_state();return _.jsxs("div",{className:"statusbar",children:[_.jsx("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),_.jsx("span",{className:"statusbar-message",children:t.message})]})},jU=()=>{const e=C.useContext(Xe),t=e.workers(),[n,r]=C.useState(!1),[i,a]=C.useState(!1),s=y=>{y!=="__select__"&&e.workers&&e.workermanager&&t[y]&&(!t[y].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?")||e.workermanager.set_active(y))},u=async()=>{if(!e.worker||!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const b=await L9(".fnw");e.worker.update_from_export(b)},f=e.options.useWorkerManager&&e.workermanager&&e.workermanager.open||ig,d=f&&Object.keys(t).length>0,h=e.worker&&e.worker.is_open,p=h&&f;return f||h?_.jsxs(_.Fragment,{children:[_.jsxs(MA,{children:[_.jsx(DA,{asChild:!0,children:_.jsx("button",{className:"styledbtn",children:_.jsxs(_s,{direction:"row",children:["Worker ",_.jsx(ak,{})]})})}),_.jsx(PA,{className:"headermenucontent funcnodescontainer",children:_.jsxs(zA,{children:[d&&_.jsxs(kU,{children:[_.jsx(AU,{className:"headermenuitem submenuitem",children:_.jsxs(_s,{direction:"row",children:["Select",_.jsx(x0,{})]})}),_.jsx(TU,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5,children:_.jsx(EU,{value:e.worker?.uuid,onValueChange:y=>{s(y)},children:Object.keys(t).sort((y,b)=>{if(t[y].active&&!t[b].active)return-1;if(!t[y].active&&t[b].active)return 1;const x=t[y].name||y,E=t[b].name||b;return x.localeCompare(E)}).map(y=>_.jsx(CU,{className:"headermenuitem workerselectoption"+(t[y]?.active?" active":" inactive")+" headermenuitem",value:y,disabled:y===e.worker?.uuid,children:t[y]?.name||y},y))})})]}),h&&_.jsxs(_.Fragment,{children:[p&&_.jsx(vo,{className:"headermenuitem",onClick:()=>{if(e.worker){if(!e.workermanager)return e.logger.error("no workermanager");e.workermanager?.restart_worker(e.worker.uuid)}},children:"Restart"}),_.jsx(vo,{className:"headermenuitem",onClick:()=>{e.worker&&e.worker.stop()},children:"Stop"}),_.jsx(vo,{className:"headermenuitem",onClick:()=>a(!0),children:"Export"}),_.jsx(vo,{className:"headermenuitem",onClick:u,children:"Update"})]}),f&&_.jsx(_.Fragment,{children:_.jsx(vo,{className:"headermenuitem",onClick:()=>r(!0),children:"New"})})]})})]}),_.jsx(DU,{open:n,setOpen:r}),_.jsx(PU,{open:i,setOpen:a})]}):null},IU=()=>{const e=C.useContext(Xe),t=()=>{window.confirm("Are you sure you want to start a new flow?")&&e.worker?.clear()},n=async()=>{const i=await e.worker?.save();if(!i)return;const a=new Blob([JSON.stringify(i)],{type:"application/json"}),s=URL.createObjectURL(a),u=document.createElement("a");u.href=s,u.download="flow.json",u.click(),URL.revokeObjectURL(s),u.remove()},r=async()=>{const i=document.createElement("input");i.type="file",i.accept=".json",i.onchange=async a=>{const s=a.target.files?.[0];if(!s)return;const u=new FileReader;u.onload=async f=>{const d=f.target?.result;if(!d)return;const h=JSON.parse(d);await e.worker?.load(h)},u.readAsText(s)},i.click()};return _.jsx(_.Fragment,{children:_.jsxs(MA,{children:[_.jsx(DA,{asChild:!0,children:_.jsx("button",{className:"styledbtn",children:_.jsxs(_s,{direction:"row",children:["Nodespace ",_.jsx(ak,{})]})})}),_.jsx(PA,{className:"headermenucontent funcnodescontainer",children:_.jsxs(zA,{children:[_.jsx(vo,{className:"headermenuitem",onClick:t,children:"New"}),_.jsx(vo,{className:"headermenuitem",onClick:n,children:"Save"}),_.jsx(vo,{className:"headermenuitem",onClick:r,children:"Load"})]})})]})})},LU=({...e})=>{const t=C.useContext(Xe),n=t.workerstate();return Object.keys(e).length>0&&t.logger.debug("headerprops",e),_.jsxs(_s,{className:"funcnodesreactflowheader",direction:"row",wrap:!0,children:[_.jsx(_s,{className:"headerelement m-w-6",grow:{"":!0,m:!1},children:_.jsx(zU,{})}),(e.showmenu||ig)&&_.jsxs(_s,{direction:"row",wrap:!0,children:[_.jsx("div",{className:"headerelement",children:_.jsx(jU,{})}),(t.worker&&n.is_open||ig)&&_.jsx("div",{className:"headerelement",children:_.jsx(IU,{})})]})]})};function uue(){}function cue(){}function FU(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const BU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$U=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HU={};function LA(e,t){return(HU.jsx?$U:BU).test(e)}const VU=/[ \t\n\f\r]/g;function UU(e){return typeof e=="object"?e.type==="text"?FA(e.value):!1:FA(e)}function FA(e){return e.replace(VU,"")===""}class Su{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Su.prototype.normal={},Su.prototype.property={},Su.prototype.space=void 0;function BA(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Su(n,r,t)}function Q0(e){return e.toLowerCase()}class Tn{constructor(t,n){this.attribute=n,this.property=t}}Tn.prototype.attribute="",Tn.prototype.booleanish=!1,Tn.prototype.boolean=!1,Tn.prototype.commaOrSpaceSeparated=!1,Tn.prototype.commaSeparated=!1,Tn.prototype.defined=!1,Tn.prototype.mustUseProperty=!1,Tn.prototype.number=!1,Tn.prototype.overloadedBoolean=!1,Tn.prototype.property="",Tn.prototype.spaceSeparated=!1,Tn.prototype.space=void 0;let qU=0;const Be=ya(),Ft=ya(),$A=ya(),ge=ya(),yt=ya(),Es=ya(),qn=ya();function ya(){return 2**++qU}const J0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Ft,commaOrSpaceSeparated:qn,commaSeparated:Es,number:ge,overloadedBoolean:$A,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),ey=Object.keys(J0);class ty extends Tn{constructor(t,n,r,i){let a=-1;if(super(t,n),HA(this,"space",i),typeof r=="number")for(;++a<ey.length;){const s=ey[a];HA(this,ey[a],(r&J0[s])===J0[s])}}}ty.prototype.defined=!0;function HA(e,t,n){n&&(e[t]=n)}function Cs(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ty(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Q0(r)]=r,n[Q0(a.attribute)]=r}return new Su(t,n,e.space)}const VA=Cs({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:yt,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ge,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:yt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Ft,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function UA(e,t){return t in e?e[t]:t}function qA(e,t){return UA(e,t.toLowerCase())}const YU=Cs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Es,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:yt,autoFocus:Be,autoPlay:Be,blocking:yt,capture:null,charSet:null,checked:Be,cite:null,className:yt,cols:ge,colSpan:null,content:null,contentEditable:Ft,controls:Be,controlsList:yt,coords:ge|Es,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:$A,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:yt,height:ge,hidden:Be,high:ge,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:yt,itemRef:yt,itemScope:Be,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:ge,pattern:null,ping:yt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:yt,required:Be,reversed:Be,rows:ge,rowSpan:ge,sandbox:yt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Ft,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:qA}),GU=Cs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Es,g2:Es,glyphName:Es,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:UA}),YA=Cs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),GA=Cs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qA}),XA=Cs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},WU=/[A-Z]/g,WA=/-[a-z]/g,KU=/^data[-\w.:]+$/i;function ZU(e,t){const n=Q0(t);let r=t,i=Tn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&KU.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(WA,JU);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!WA.test(a)){let s=a.replace(WU,QU);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ty}return new i(r,t)}function QU(e){return"-"+e.toLowerCase()}function JU(e){return e.charAt(1).toUpperCase()}const eq=BA([VA,YU,YA,GA,XA],"html"),ny=BA([VA,GU,YA,GA,XA],"svg");function tq(e){return e.join(" ").trim()}var ks={},ry,KA;function nq(){if(KA)return ry;KA=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,f=`
|
665
665
|
`,d="/",h="*",p="",g="comment",y="declaration";ry=function(x,E){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];E=E||{};var S=1,A=1;function k(G){var j=G.match(t);j&&(S+=j.length);var U=G.lastIndexOf(f);A=~U?G.length-U:A+G.length}function R(){var G={line:S,column:A};return function(j){return j.position=new N(G),F(),j}}function N(G){this.start=G,this.end={line:S,column:A},this.source=E.source}N.prototype.content=x;function D(G){var j=new Error(E.source+":"+S+":"+A+": "+G);if(j.reason=G,j.filename=E.source,j.line=S,j.column=A,j.source=x,!E.silent)throw j}function P(G){var j=G.exec(x);if(j){var U=j[0];return k(U),x=x.slice(U.length),j}}function F(){P(n)}function V(G){var j;for(G=G||[];j=T();)j!==!1&&G.push(j);return G}function T(){var G=R();if(!(d!=x.charAt(0)||h!=x.charAt(1))){for(var j=2;p!=x.charAt(j)&&(h!=x.charAt(j)||d!=x.charAt(j+1));)++j;if(j+=2,p===x.charAt(j-1))return D("End of comment missing");var U=x.slice(2,j-2);return A+=2,k(U),x=x.slice(j),A+=2,G({type:g,comment:U})}}function $(){var G=R(),j=P(r);if(j){if(T(),!P(i))return D("property missing ':'");var U=P(a),z=G({type:y,property:b(j[0].replace(e,p)),value:U?b(U[0].replace(e,p)):p});return P(s),z}}function H(){var G=[];V(G);for(var j;j=$();)j!==!1&&(G.push(j),V(G));return G}return F(),H()};function b(x){return x?x.replace(u,p):p}return ry}var ZA;function rq(){if(ZA)return ks;ZA=1;var e=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=n;var t=e(nq());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),u=typeof i=="function";return s.forEach(function(f){if(f.type==="declaration"){var d=f.property,h=f.value;u?i(d,h,f):h&&(a=a||{},a[d]=h)}}),a}return ks}var _u={},QA;function iq(){if(QA)return _u;QA=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},s=function(d,h){return h.toUpperCase()},u=function(d,h){return"".concat(h,"-")},f=function(d,h){return h===void 0&&(h={}),a(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(i,u):d=d.replace(r,u),d.replace(t,s))};return _u.camelCase=f,_u}var Eu,JA;function oq(){if(JA)return Eu;JA=1;var e=Eu&&Eu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(rq()),n=iq();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,f){u&&f&&(s[(0,n.camelCase)(u,a)]=f)}),s}return r.default=r,Eu=r,Eu}var aq=oq();const sq=En(aq),eT=tT("end"),iy=tT("start");function tT(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function lq(e){const t=iy(e),n=eT(e);if(t&&n)return{start:t,end:n}}function Cu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nT(e.position):"start"in e||"end"in e?nT(e):"line"in e||"column"in e?oy(e):""}function oy(e){return rT(e&&e.line)+":"+rT(e&&e.column)}function nT(e){return oy(e&&e.start)+"-"+oy(e&&e.end)}function rT(e){return e&&typeof e=="number"?e:1}class un extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=u?u.line:void 0,this.name=Cu(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}un.prototype.file="",un.prototype.name="",un.prototype.reason="",un.prototype.message="",un.prototype.stack="",un.prototype.column=void 0,un.prototype.line=void 0,un.prototype.ancestors=void 0,un.prototype.cause=void 0,un.prototype.fatal=void 0,un.prototype.place=void 0,un.prototype.ruleId=void 0,un.prototype.source=void 0;const ay={}.hasOwnProperty,uq=new Map,cq=/[A-Z]/g,fq=new Set(["table","tbody","thead","tfoot","tr"]),dq=new Set(["td","th"]),iT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hq(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wq(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xq(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ny:eq,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=oT(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function oT(e,t,n){if(t.type==="element")return pq(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return mq(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yq(e,t,n);if(t.type==="mdxjsEsm")return gq(e,t);if(t.type==="root")return vq(e,t,n);if(t.type==="text")return bq(e,t)}function pq(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ny,e.schema=i),e.ancestors.push(t);const a=sT(e,t.tagName,!1),s=Sq(e,t);let u=ly(e,t);return fq.has(t.tagName)&&(u=u.filter(function(f){return typeof f=="string"?!UU(f):!0})),aT(e,s,a,t),sy(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function mq(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ku(e,t.position)}function gq(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ku(e,t.position)}function yq(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ny,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:sT(e,t.name,!0),s=_q(e,t),u=ly(e,t);return aT(e,s,a,t),sy(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function vq(e,t,n){const r={};return sy(r,ly(e,t)),e.create(t,e.Fragment,r,n)}function bq(e,t){return t.value}function aT(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xq(e,t,n){return r;function r(i,a,s,u){const d=Array.isArray(s.children)?n:t;return u?d(a,s,u):d(a,s)}}function wq(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),f=iy(r);return t(i,a,s,u,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Sq(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ay.call(t.properties,i)){const a=Eq(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&dq.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _q(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ku(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ku(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ly(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:uq;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const d=i.get(f)||0;s=f+"-"+d,i.set(f,d+1)}}const u=oT(e,a,s);u!==void 0&&n.push(u)}return n}function Eq(e,t,n){const r=ZU(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?FU(n):tq(n)),r.property==="style"){let i=typeof n=="object"?n:Cq(e,String(n));return e.stylePropertyNameCase==="css"&&(i=kq(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?XU[r.property]||r.property:r.attribute,n]}}function Cq(e,t){try{return sq(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new un("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=iT+"#cannot-parse-style-attribute",i}}function sT(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=LA(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=LA(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ay.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ku(e)}function ku(e,t){const n=new un("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=iT+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kq(e){const t={};let n;for(n in e)ay.call(e,n)&&(t[Aq(n)]=e[n]);return t}function Aq(e){let t=e.replace(cq,Tq);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Tq(e){return"-"+e.toLowerCase()}const uy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Rq={};function cy(e,t){const n=Rq,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return lT(e,r,i)}function lT(e,t,n){if(Oq(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uT(e.children,t,n)}return Array.isArray(e)?uT(e,t,n):""}function uT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=lT(e[i],t,n);return r.join("")}function Oq(e){return!!(e&&typeof e=="object")}const cT=document.createElement("i");function fy(e){const t="&"+e+";";cT.innerHTML=t;const n=cT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yn(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function sr(e,t){return e.length>0?(Yn(e,e.length,0,t),e):t}const fT={}.hasOwnProperty;function dT(e){const t={};let n=-1;for(;++n<e.length;)Nq(t,e[n]);return t}function Nq(e,t){let n;for(n in t){const i=(fT.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){fT.call(i,s)||(i[s]=[]);const u=a[s];Mq(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Mq(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yn(e,0,0,r)}function hT(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Or(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bn=bo(/[A-Za-z]/),cn=bo(/[\dA-Za-z]/),Dq=bo(/[#-'*+\--9=?A-Z^-~]/);function Id(e){return e!==null&&(e<32||e===127)}const dy=bo(/\d/),Pq=bo(/[\dA-Fa-f]/),zq=bo(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const Ld=bo(/\p{P}|\p{S}/u),va=bo(/\s/);function bo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function As(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&cn(e.charCodeAt(n+1))&&cn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(f){return qe(f)?(e.enter(n),u(f)):t(f)}function u(f){return qe(f)&&a++<i?(e.consume(f),u):(e.exit(n),t(f))}}const jq={tokenize:Iq};function Iq(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Te(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const Lq={tokenize:Fq},pT={tokenize:Bq};function Fq(e){const t=this,n=[];let r=0,i,a,s;return u;function u(k){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,f,d)(k)}return d(k)}function f(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const R=t.events.length;let N=R,D;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){D=t.events[N][1].end;break}S(r);let P=R;for(;P<t.events.length;)t.events[P][1].end={...D},P++;return Yn(t.events,N+1,0,t.events.slice(R)),t.events.length=P,d(k)}return u(k)}function d(k){if(r===n.length){if(!i)return g(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pT,h,p)(k)}function h(k){return i&&A(),S(r),g(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(k)}function g(k){return t.containerState={},e.attempt(pT,y,b)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function b(k){if(k===null){i&&A(),S(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(k)}function x(k){if(k===null){E(e.exit("chunkFlow"),!0),S(0),e.consume(k);return}return Te(k)?(e.consume(k),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),x)}function E(k,R){const N=t.sliceStream(k);if(R&&N.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(N),t.parser.lazy[k.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<s&&(!i.events[D][1].end||i.events[D][1].end.offset>s))return;const P=t.events.length;let F=P,V,T;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(V){T=t.events[F][1].end;break}V=!0}for(S(r),D=P;D<t.events.length;)t.events[D][1].end={...T},D++;Yn(t.events,F+1,0,t.events.slice(P)),t.events.length=D}}function S(k){let R=n.length;for(;R-- >k;){const N=n[R];t.containerState=N[1],N[0].exit.call(t,e)}n.length=k}function A(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Bq(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ts(e){if(e===null||ft(e)||va(e))return 1;if(Ld(e))return 2}function Fd(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const hy={name:"attention",resolveAll:$q,tokenize:Hq};function $q(e,t){let n=-1,r,i,a,s,u,f,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},g={...e[n][1].start};mT(p,-f),mT(g,f),s={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=sr(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=sr(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=sr(d,Fd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=sr(d,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=sr(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Yn(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Hq(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ts(r);let a;return s;function s(f){return a=f,e.enter("attentionSequence"),u(f)}function u(f){if(f===a)return e.consume(f),u;const d=e.exit("attentionSequence"),h=Ts(f),p=!h||h===2&&i||n.includes(f),g=!i||i===2&&h||n.includes(r);return d._open=!!(a===42?p:p&&(i||!g)),d._close=!!(a===42?g:g&&(h||!p)),t(f)}}function mT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vq={name:"autolink",tokenize:Uq};function Uq(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return bn(y)?(e.consume(y),s):y===64?n(y):d(y)}function s(y){return y===43||y===45||y===46||cn(y)?(r=1,u(y)):d(y)}function u(y){return y===58?(e.consume(y),r=0,f):(y===43||y===45||y===46||cn(y))&&r++<32?(e.consume(y),u):(r=0,d(y))}function f(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Id(y)?n(y):(e.consume(y),f)}function d(y){return y===64?(e.consume(y),h):Dq(y)?(e.consume(y),d):n(y)}function h(y){return cn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||cn(y))&&r++<63){const b=y===45?g:p;return e.consume(y),b}return n(y)}}const Au={partial:!0,tokenize:qq};function qq(e,t,n){return r;function r(a){return qe(a)?Ke(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Te(a)?t(a):n(a)}}const gT={continuation:{tokenize:Gq},exit:Xq,name:"blockQuote",tokenize:Yq};function Yq(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return qe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Gq(e,t,n){const r=this;return i;function i(s){return qe(s)?Ke(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(gT,t,n)(s)}}function Xq(e){e.exit("blockQuote")}const yT={name:"characterEscape",tokenize:Wq};function Wq(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return zq(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const vT={name:"characterReference",tokenize:Kq};function Kq(e,t,n){const r=this;let i=0,a,s;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=cn,h(p))}function d(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Pq,h):(e.enter("characterReferenceValue"),a=7,s=dy,h(p))}function h(p){if(p===59&&i){const g=e.exit("characterReferenceValue");return s===cn&&!fy(r.sliceSerialize(g))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&i++<a?(e.consume(p),h):n(p)}}const bT={partial:!0,tokenize:Qq},xT={concrete:!0,name:"codeFenced",tokenize:Zq};function Zq(e,t,n){const r=this,i={partial:!0,tokenize:N};let a=0,s=0,u;return f;function f(D){return d(D)}function d(D){const P=r.events[r.events.length-1];return a=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,u=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(D)}function h(D){return D===u?(s++,e.consume(D),h):s<3?n(D):(e.exit("codeFencedFenceSequence"),qe(D)?Ke(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Te(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(bT,x,R)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(D))}function g(D){return D===null||Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):qe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,y,"whitespace")(D)):D===96&&D===u?n(D):(e.consume(D),g)}function y(D){return D===null||Te(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===u?n(D):(e.consume(D),b)}function x(D){return e.attempt(i,R,E)(D)}function E(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),S}function S(D){return a>0&&qe(D)?Ke(e,A,"linePrefix",a+1)(D):A(D)}function A(D){return D===null||Te(D)?e.check(bT,x,R)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||Te(D)?(e.exit("codeFlowValue"),A(D)):(e.consume(D),k)}function R(D){return e.exit("codeFenced"),t(D)}function N(D,P,F){let V=0;return T;function T(U){return D.enter("lineEnding"),D.consume(U),D.exit("lineEnding"),$}function $(U){return D.enter("codeFencedFence"),qe(U)?Ke(D,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):H(U)}function H(U){return U===u?(D.enter("codeFencedFenceSequence"),G(U)):F(U)}function G(U){return U===u?(V++,D.consume(U),G):V>=s?(D.exit("codeFencedFenceSequence"),qe(U)?Ke(D,j,"whitespace")(U):j(U)):F(U)}function j(U){return U===null||Te(U)?(D.exit("codeFencedFence"),P(U)):F(U)}}}function Qq(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const py={name:"codeIndented",tokenize:eY},Jq={partial:!0,tokenize:tY};function eY(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),Ke(e,a,"linePrefix",5)(d)}function a(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?f(d):Te(d)?e.attempt(Jq,s,f)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||Te(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),u)}function f(d){return e.exit("codeIndented"),t(d)}}function tY(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ke(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Te(s)?i(s):n(s)}}const nY={name:"codeText",previous:iY,resolve:rY,tokenize:oY};function rY(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function iY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oY(e,t,n){let r=0,i,a;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(a=e.enter("codeTextSequence"),i=0,h(p)):Te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(p))}function d(p){return p===null||p===32||p===96||Te(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),d)}function h(p){return p===96?(e.consume(p),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",d(p))}}class aY{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Tu(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Tu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Tu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Tu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Tu(this.left,n.reverse())}}}function Tu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function wT(e){const t={};let n=-1,r,i,a,s,u,f,d;const h=new aY(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sY(h,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Yn(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function sY(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,f=[],d={};let h,p,g=-1,y=n,b=0,x=0;const E=[x];for(;y;){for(;e.get(++i)[1]!==y;);a.push(i),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),p&&s.defineSkip(y.start),y._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),y._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(x=g+1,E.push(x),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(s.events=[],y?(y._tokenizer=void 0,y.previous=void 0):E.pop(),g=E.length;g--;){const S=u.slice(E[g],E[g+1]),A=a.pop();f.push([A,A+S.length-1]),e.splice(A,2,S)}for(f.reverse(),g=-1;++g<f.length;)d[b+f[g][0]]=b+f[g][1],b+=f[g][1]-f[g][0]-1;return d}const lY={resolve:cY,tokenize:fY},uY={partial:!0,tokenize:dY};function cY(e){return wT(e),e}function fY(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Te(u)?e.check(uY,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function dY(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,a,"linePrefix")}function a(s){if(s===null||Te(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ST(e,t,n,r,i,a,s,u,f){const d=f||Number.POSITIVE_INFINITY;let h=0;return p;function p(S){return S===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(S),e.exit(a),g):S===null||S===32||S===41||Id(S)?n(S):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(S))}function g(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===62?(e.exit("chunkString"),e.exit(u),g(S)):S===null||S===60||Te(S)?n(S):(e.consume(S),S===92?b:y)}function b(S){return S===60||S===62||S===92?(e.consume(S),y):y(S)}function x(S){return!h&&(S===null||S===41||ft(S))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(S)):h<d&&S===40?(e.consume(S),h++,x):S===41?(e.consume(S),h--,x):S===null||S===32||S===40||Id(S)?n(S):(e.consume(S),S===92?E:x)}function E(S){return S===40||S===41||S===92?(e.consume(S),x):x(S)}}function _T(e,t,n,r,i,a){const s=this;let u=0,f;return d;function d(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(a),h}function h(y){return u>999||y===null||y===91||y===93&&!f||y===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(y):y===93?(e.exit(a),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):Te(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||Te(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),f||(f=!qe(y)),y===92?g:p)}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function ET(e,t,n,r,i,a){let s;return u;function u(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),s=g===40?41:g,f):n(g)}function f(g){return g===s?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(a),d(g))}function d(g){return g===s?(e.exit(a),f(s)):g===null?n(g):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Ke(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===s||g===null||Te(g)?(e.exit("chunkString"),d(g)):(e.consume(g),g===92?p:h)}function p(g){return g===s||g===92?(e.consume(g),h):h(g)}}function Ru(e,t){let n;return r;function r(i){return Te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):qe(i)?Ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const hY={name:"definition",tokenize:mY},pY={partial:!0,tokenize:gY};function mY(e,t,n){const r=this;let i;return a;function a(y){return e.enter("definition"),s(y)}function s(y){return _T.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return i=Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return ft(y)?Ru(e,d)(y):d(y)}function d(y){return ST(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(pY,p,p)(y)}function p(y){return qe(y)?Ke(e,g,"whitespace")(y):g(y)}function g(y){return y===null||Te(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function gY(e,t,n){return r;function r(u){return ft(u)?Ru(e,i)(u):n(u)}function i(u){return ET(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return qe(u)?Ke(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Te(u)?t(u):n(u)}}const yY={name:"hardBreakEscape",tokenize:vY};function vY(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Te(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const bY={name:"headingAtx",resolve:xY,tokenize:wY};function xY(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function wY(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||ft(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||Te(h)?(e.exit("atxHeading"),t(h)):qe(h)?Ke(e,u,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),u(h))}function d(h){return h===null||h===35||ft(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),d)}}const SY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],CT=["pre","script","style","textarea"],_Y={concrete:!0,name:"htmlFlow",resolveTo:kY,tokenize:AY},EY={partial:!0,tokenize:RY},CY={partial:!0,tokenize:TY};function kY(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function AY(e,t,n){const r=this;let i,a,s,u,f;return d;function d(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),p}function p(I){return I===33?(e.consume(I),g):I===47?(e.consume(I),a=!0,x):I===63?(e.consume(I),i=3,r.interrupt?t:O):bn(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function g(I){return I===45?(e.consume(I),i=2,y):I===91?(e.consume(I),i=5,u=0,b):bn(I)?(e.consume(I),i=4,r.interrupt?t:O):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:O):n(I)}function b(I){const ie="CDATA[";return I===ie.charCodeAt(u++)?(e.consume(I),u===ie.length?r.interrupt?t:H:b):n(I)}function x(I){return bn(I)?(e.consume(I),s=String.fromCharCode(I),E):n(I)}function E(I){if(I===null||I===47||I===62||ft(I)){const ie=I===47,fe=s.toLowerCase();return!ie&&!a&&CT.includes(fe)?(i=1,r.interrupt?t(I):H(I)):SY.includes(s.toLowerCase())?(i=6,ie?(e.consume(I),S):r.interrupt?t(I):H(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?A(I):k(I))}return I===45||cn(I)?(e.consume(I),s+=String.fromCharCode(I),E):n(I)}function S(I){return I===62?(e.consume(I),r.interrupt?t:H):n(I)}function A(I){return qe(I)?(e.consume(I),A):T(I)}function k(I){return I===47?(e.consume(I),T):I===58||I===95||bn(I)?(e.consume(I),R):qe(I)?(e.consume(I),k):T(I)}function R(I){return I===45||I===46||I===58||I===95||cn(I)?(e.consume(I),R):N(I)}function N(I){return I===61?(e.consume(I),D):qe(I)?(e.consume(I),N):k(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),f=I,P):qe(I)?(e.consume(I),D):F(I)}function P(I){return I===f?(e.consume(I),f=null,V):I===null||Te(I)?n(I):(e.consume(I),P)}function F(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ft(I)?N(I):(e.consume(I),F)}function V(I){return I===47||I===62||qe(I)?k(I):n(I)}function T(I){return I===62?(e.consume(I),$):n(I)}function $(I){return I===null||Te(I)?H(I):qe(I)?(e.consume(I),$):n(I)}function H(I){return I===45&&i===2?(e.consume(I),z):I===60&&i===1?(e.consume(I),B):I===62&&i===4?(e.consume(I),W):I===63&&i===3?(e.consume(I),O):I===93&&i===5?(e.consume(I),Y):Te(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(EY,Z,G)(I)):I===null||Te(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),H)}function G(I){return e.check(CY,j,Z)(I)}function j(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),U}function U(I){return I===null||Te(I)?G(I):(e.enter("htmlFlowData"),H(I))}function z(I){return I===45?(e.consume(I),O):H(I)}function B(I){return I===47?(e.consume(I),s="",q):H(I)}function q(I){if(I===62){const ie=s.toLowerCase();return CT.includes(ie)?(e.consume(I),W):H(I)}return bn(I)&&s.length<8?(e.consume(I),s+=String.fromCharCode(I),q):H(I)}function Y(I){return I===93?(e.consume(I),O):H(I)}function O(I){return I===62?(e.consume(I),W):I===45&&i===2?(e.consume(I),O):H(I)}function W(I){return I===null||Te(I)?(e.exit("htmlFlowData"),Z(I)):(e.consume(I),W)}function Z(I){return e.exit("htmlFlow"),t(I)}}function TY(e,t,n){const r=this;return i;function i(s){return Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function RY(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Au,t,n)}}const OY={name:"htmlText",tokenize:NY};function NY(e,t,n){const r=this;let i,a,s;return u;function u(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),d):O===47?(e.consume(O),N):O===63?(e.consume(O),k):bn(O)?(e.consume(O),F):n(O)}function d(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,b):bn(O)?(e.consume(O),A):n(O)}function h(O){return O===45?(e.consume(O),y):n(O)}function p(O){return O===null?n(O):O===45?(e.consume(O),g):Te(O)?(s=p,B(O)):(e.consume(O),p)}function g(O){return O===45?(e.consume(O),y):p(O)}function y(O){return O===62?z(O):O===45?g(O):p(O)}function b(O){const W="CDATA[";return O===W.charCodeAt(a++)?(e.consume(O),a===W.length?x:b):n(O)}function x(O){return O===null?n(O):O===93?(e.consume(O),E):Te(O)?(s=x,B(O)):(e.consume(O),x)}function E(O){return O===93?(e.consume(O),S):x(O)}function S(O){return O===62?z(O):O===93?(e.consume(O),S):x(O)}function A(O){return O===null||O===62?z(O):Te(O)?(s=A,B(O)):(e.consume(O),A)}function k(O){return O===null?n(O):O===63?(e.consume(O),R):Te(O)?(s=k,B(O)):(e.consume(O),k)}function R(O){return O===62?z(O):k(O)}function N(O){return bn(O)?(e.consume(O),D):n(O)}function D(O){return O===45||cn(O)?(e.consume(O),D):P(O)}function P(O){return Te(O)?(s=P,B(O)):qe(O)?(e.consume(O),P):z(O)}function F(O){return O===45||cn(O)?(e.consume(O),F):O===47||O===62||ft(O)?V(O):n(O)}function V(O){return O===47?(e.consume(O),z):O===58||O===95||bn(O)?(e.consume(O),T):Te(O)?(s=V,B(O)):qe(O)?(e.consume(O),V):z(O)}function T(O){return O===45||O===46||O===58||O===95||cn(O)?(e.consume(O),T):$(O)}function $(O){return O===61?(e.consume(O),H):Te(O)?(s=$,B(O)):qe(O)?(e.consume(O),$):V(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,G):Te(O)?(s=H,B(O)):qe(O)?(e.consume(O),H):(e.consume(O),j)}function G(O){return O===i?(e.consume(O),i=void 0,U):O===null?n(O):Te(O)?(s=G,B(O)):(e.consume(O),G)}function j(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||ft(O)?V(O):(e.consume(O),j)}function U(O){return O===47||O===62||ft(O)?V(O):n(O)}function z(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function B(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),q}function q(O){return qe(O)?Ke(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):Y(O)}function Y(O){return e.enter("htmlTextData"),s(O)}}const my={name:"labelEnd",resolveAll:zY,resolveTo:jY,tokenize:IY},MY={tokenize:LY},DY={tokenize:FY},PY={tokenize:BY};function zY(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Yn(e,0,e.length,n),e}function jY(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",f,t],["enter",d,t]],u=sr(u,e.slice(a+1,a+r+3)),u=sr(u,[["enter",h,t]]),u=sr(u,Fd(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=sr(u,[["exit",h,t],e[s-2],e[s-1],["exit",d,t]]),u=sr(u,e.slice(s+1)),u=sr(u,[["exit",f,t]]),Yn(e,a,e.length,u),e}function IY(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(g){return a?a._inactive?p(g):(s=r.parser.defined.includes(Or(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),f):n(g)}function f(g){return g===40?e.attempt(MY,h,s?h:p)(g):g===91?e.attempt(DY,h,s?d:p)(g):s?h(g):p(g)}function d(g){return e.attempt(PY,h,p)(g)}function h(g){return t(g)}function p(g){return a._balanced=!0,n(g)}}function LY(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return ft(p)?Ru(e,a)(p):a(p)}function a(p){return p===41?h(p):ST(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return ft(p)?Ru(e,f)(p):h(p)}function u(p){return n(p)}function f(p){return p===34||p===39||p===40?ET(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function d(p){return ft(p)?Ru(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function FY(e,t,n){const r=this;return i;function i(u){return _T.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(Or(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function BY(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const $Y={name:"labelStartImage",resolveAll:my.resolveAll,tokenize:HY};function HY(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const VY={name:"labelStartLink",resolveAll:my.resolveAll,tokenize:UY};function UY(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const gy={name:"lineEnding",tokenize:qY};function qY(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Bd={name:"thematicBreak",tokenize:YY};function YY(e,t,n){let r=0,i;return a;function a(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,u(d)}function u(d){return d===i?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||Te(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===i?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),qe(d)?Ke(e,u,"whitespace")(d):u(d))}}const Rn={continuation:{tokenize:KY},exit:QY,name:"list",tokenize:WY},GY={partial:!0,tokenize:JY},XY={partial:!0,tokenize:ZY};function WY(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:dy(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Bd,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return dy(y)&&++s<10?(e.consume(y),f):(!r.interrupt||s<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Au,r.interrupt?n:h,e.attempt(GY,g,p))}function h(y){return r.containerState.initialBlankLine=!0,a++,g(y)}function p(y){return qe(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function KY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Au,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!qe(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(XY,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(Rn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function ZY(e,t,n){const r=this;return Ke(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function QY(e){e.exit(this.containerState.type)}function JY(e,t,n){const r=this;return Ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!qe(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const kT={name:"setextUnderline",resolveTo:eG,tokenize:tG};function eG(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function tG(e,t,n){const r=this;let i;return a;function a(d){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===i?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),qe(d)?Ke(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||Te(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const nG={tokenize:rG};function rG(e){const t=this,n=e.attempt(Au,r,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lY,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const iG={resolveAll:TT()},oG=AT("string"),aG=AT("text");function AT(e){return{resolveAll:TT(e==="text"?sG:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return d(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return d(h)?(n.exit("data"),a(h)):(n.consume(h),f)}function d(h){if(h===null)return!0;const p=i[h];let g=-1;if(p)for(;++g<p.length;){const y=p[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function TT(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function sG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,f;for(;a--;){const d=i[a];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(d===-2)f=!0,u++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const d={type:n===e.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const lG=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:hY},disable:{null:[]},document:{42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:gT},flow:{35:bY,42:Bd,45:[kT,Bd],60:_Y,61:kT,95:Bd,96:xT,126:xT},flowInitial:{[-2]:py,[-1]:py,32:py},insideSpan:{null:[hy,iG]},string:{38:vT,92:yT},text:{[-5]:gy,[-4]:gy,[-3]:gy,33:$Y,38:vT,42:hy,60:[Vq,OY],91:VY,92:[yY,yT],93:my,95:hy,96:nY}},Symbol.toStringTag,{value:"Module"}));function uG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const f={attempt:P(N),check:P(D),consume:A,enter:k,exit:R,interrupt:P(D,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:p};let h=t.tokenize.call(d,f);return t.resolveAll&&a.push(t),d;function p($){return s=sr(s,$),E(),s[s.length-1]!==null?[]:(F(t,0),d.events=Fd(a,d.events,d),d.events)}function g($,H){return fG(y($),H)}function y($){return cG(s,$)}function b(){const{_bufferIndex:$,_index:H,line:G,column:j,offset:U}=r;return{_bufferIndex:$,_index:H,line:G,column:j,offset:U}}function x($){i[$.line]=$.column,T()}function E(){let $;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<H.length;)S(H.charCodeAt(r._bufferIndex));else S(H)}}function S($){h=h($)}function A($){Te($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,T()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=$}function k($,H){const G=H||{};return G.type=$,G.start=b(),d.events.push(["enter",G,d]),u.push(G),G}function R($){const H=u.pop();return H.end=b(),d.events.push(["exit",H,d]),H}function N($,H){F($,H.from)}function D($,H){H.restore()}function P($,H){return G;function G(j,U,z){let B,q,Y,O;return Array.isArray(j)?Z(j):"tokenize"in j?Z([j]):W(j);function W(re){return le;function le(he){const ye=he!==null&&re[he],je=he!==null&&re.null,Oe=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(je)?je:je?[je]:[]];return Z(Oe)(he)}}function Z(re){return B=re,q=0,re.length===0?z:I(re[q])}function I(re){return le;function le(he){return O=V(),Y=re,re.partial||(d.currentConstruct=re),re.name&&d.parser.constructs.disable.null.includes(re.name)?fe():re.tokenize.call(H?Object.assign(Object.create(d),H):d,f,ie,fe)(he)}}function ie(re){return $(Y,O),U}function fe(re){return O.restore(),++q<B.length?I(B[q]):z}}}function F($,H){$.resolveAll&&!a.includes($)&&a.push($),$.resolve&&Yn(d.events,H,d.events.length-H,$.resolve(d.events.slice(H),d)),$.resolveTo&&(d.events=$.resolveTo(d.events,d))}function V(){const $=b(),H=d.previous,G=d.currentConstruct,j=d.events.length,U=Array.from(u);return{from:j,restore:z};function z(){r=$,d.previous=H,d.currentConstruct=G,d.events.length=j,u=U,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function cG(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function fG(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
666
666
|
`;break}case-3:{s=`\r
|
667
667
|
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function dG(e){const r={constructs:dT([lG,...(e||{}).extensions||[]]),content:i(jq),defined:[],document:i(Lq),flow:i(nG),lazy:{},string:i(oG),text:i(aG)};return r;function i(a){return s;function s(u){return uG(r,a,u)}}}function hG(e){for(;!wT(e););return e}const RT=/[\0\t\n\r]/g;function pG(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const f=[];let d,h,p,g,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),p=0,t="",n&&(a.charCodeAt(0)===65279&&p++,n=void 0);p<a.length;){if(RT.lastIndex=p,d=RT.exec(a),g=d&&d.index!==void 0?d.index:a.length,y=a.charCodeAt(g),!d){t=a.slice(p);break}if(y===10&&p===g&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),p<g&&(f.push(a.slice(p,g)),e+=g-p),y){case 0:{f.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,f.push(-2);e++<h;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}p=g+1}return u&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const mG=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gG(e){return e.replace(mG,yG)}function yG(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return hT(n.slice(a?2:1),a?16:10)}return fy(n)||e}const OT={}.hasOwnProperty;function vG(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bG(n)(hG(dG(n).document().write(pG()(e,t,!0))))}function bG(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Dr),autolinkProtocol:V,autolinkEmail:V,atxHeading:a(pt),blockQuote:a(je),characterEscape:V,characterReference:V,codeFenced:a(Oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Oe,s),codeText:a(be,s),codeTextData:V,data:V,codeFlowValue:V,definition:a(Le),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Ie),hardBreakEscape:a(tn),hardBreakTrailing:a(tn),htmlFlow:a(xt,s),htmlFlowData:V,htmlText:a(xt,s),htmlTextData:V,image:a(Kn),label:s,link:a(Dr),listItem:a(dr),listItemValue:g,listOrdered:a(Nn,p),listUnordered:a(Nn),paragraph:a(Pe),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(pt),strong:a(si),thematicBreak:a(Ii)},exit:{atxHeading:f(),atxHeadingSequence:N,autolink:f(),autolinkEmail:ye,autolinkProtocol:he,blockQuote:f(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:re,characterReference:le,codeFenced:f(E),codeFencedFence:x,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:T,codeIndented:f(S),codeText:f(U),codeTextData:T,data:T,definition:f(),definitionDestinationString:R,definitionLabelString:A,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(H),hardBreakTrailing:f(H),htmlFlow:f(G),htmlFlowData:T,htmlText:f(j),htmlTextData:T,image:f(B),label:Y,labelText:q,lineEnding:$,link:f(z),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ie,resourceDestinationString:O,resourceTitleString:W,resource:Z,setextHeading:f(F),setextHeadingLineSequence:P,setextHeadingText:D,strong:f(),thematicBreak:f()}};NT(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ae){let pe={type:"root",children:[]};const ke={stack:[pe],tokenStack:[],config:t,enter:u,exit:d,buffer:s,resume:h,data:n},Ae=[];let tt=-1;for(;++tt<ae.length;)if(ae[tt][1].type==="listOrdered"||ae[tt][1].type==="listUnordered")if(ae[tt][0]==="enter")Ae.push(tt);else{const wn=Ae.pop();tt=i(ae,wn,tt)}for(tt=-1;++tt<ae.length;){const wn=t[ae[tt][0]];OT.call(wn,ae[tt][1].type)&&wn[ae[tt][1].type].call(Object.assign({sliceSerialize:ae[tt][2].sliceSerialize},ke),ae[tt][1])}if(ke.tokenStack.length>0){const wn=ke.tokenStack[ke.tokenStack.length-1];(wn[1]||MT).call(ke,void 0,wn[0])}for(pe.position={start:xo(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:xo(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)pe=t.transforms[tt](pe)||pe;return pe}function i(ae,pe,ke){let Ae=pe-1,tt=-1,wn=!1,Pr,hn,hr,Sn;for(;++Ae<=ke;){const Ht=ae[Ae];switch(Ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ht[0]==="enter"?tt++:tt--,Sn=void 0;break}case"lineEndingBlank":{Ht[0]==="enter"&&(Pr&&!Sn&&!tt&&!hr&&(hr=Ae),Sn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Sn=void 0}if(!tt&&Ht[0]==="enter"&&Ht[1].type==="listItemPrefix"||tt===-1&&Ht[0]==="exit"&&(Ht[1].type==="listUnordered"||Ht[1].type==="listOrdered")){if(Pr){let Mn=Ae;for(hn=void 0;Mn--;){const Zn=ae[Mn];if(Zn[1].type==="lineEnding"||Zn[1].type==="lineEndingBlank"){if(Zn[0]==="exit")continue;hn&&(ae[hn][1].type="lineEndingBlank",wn=!0),Zn[1].type="lineEnding",hn=Mn}else if(!(Zn[1].type==="linePrefix"||Zn[1].type==="blockQuotePrefix"||Zn[1].type==="blockQuotePrefixWhitespace"||Zn[1].type==="blockQuoteMarker"||Zn[1].type==="listItemIndent"))break}hr&&(!hn||hr<hn)&&(Pr._spread=!0),Pr.end=Object.assign({},hn?ae[hn][1].start:Ht[1].end),ae.splice(hn||Ae,0,["exit",Pr,Ht[2]]),Ae++,ke++}if(Ht[1].type==="listItemPrefix"){const Mn={type:"listItem",_spread:!1,start:Object.assign({},Ht[1].start),end:void 0};Pr=Mn,ae.splice(Ae,0,["enter",Mn,Ht[2]]),Ae++,ke++,hr=void 0,Sn=!0}}}return ae[pe][1]._spread=wn,ke}function a(ae,pe){return ke;function ke(Ae){u.call(this,ae(Ae),Ae),pe&&pe.call(this,Ae)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(ae,pe,ke){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([pe,ke||void 0]),ae.position={start:xo(pe.start),end:void 0}}function f(ae){return pe;function pe(ke){ae&&ae.call(this,ke),d.call(this,ke)}}function d(ae,pe){const ke=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==ae.type&&(pe?pe.call(this,ae,Ae[0]):(Ae[1]||MT).call(this,ae,Ae[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Cu({start:ae.start,end:ae.end})+"): it’s not open");ke.position.end=xo(ae.end)}function h(){return cy(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(ae){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=ae}function b(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=ae}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ae.replace(/(\r?\n|\r)$/g,"")}function A(ae){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.label=pe,ke.identifier=Or(this.sliceSerialize(ae)).toLowerCase()}function k(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ae}function R(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ae}function N(ae){const pe=this.stack[this.stack.length-1];if(!pe.depth){const ke=this.sliceSerialize(ae).length;pe.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function P(ae){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function V(ae){const ke=this.stack[this.stack.length-1].children;let Ae=ke[ke.length-1];(!Ae||Ae.type!=="text")&&(Ae=ka(),Ae.position={start:xo(ae.start),end:void 0},ke.push(Ae)),this.stack.push(Ae)}function T(ae){const pe=this.stack.pop();pe.value+=this.sliceSerialize(ae),pe.position.end=xo(ae.end)}function $(ae){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=pe.children[pe.children.length-1];ke.position.end=xo(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(V.call(this,ae),T.call(this,ae))}function H(){this.data.atHardBreak=!0}function G(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ae}function j(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ae}function U(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ae}function z(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=pe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=pe,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function q(ae){const pe=this.sliceSerialize(ae),ke=this.stack[this.stack.length-2];ke.label=gG(pe),ke.identifier=Or(pe).toLowerCase()}function Y(){const ae=this.stack[this.stack.length-1],pe=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Ae=ae.children;ke.children=Ae}else ke.alt=pe}function O(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ae}function W(){const ae=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ae}function Z(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ie(ae){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.label=pe,ke.identifier=Or(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function fe(ae){this.data.characterReferenceType=ae.type}function re(ae){const pe=this.sliceSerialize(ae),ke=this.data.characterReferenceType;let Ae;ke?(Ae=hT(pe,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=fy(pe);const tt=this.stack[this.stack.length-1];tt.value+=Ae}function le(ae){const pe=this.stack.pop();pe.position.end=xo(ae.end)}function he(ae){T.call(this,ae);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(ae)}function ye(ae){T.call(this,ae);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(ae)}function je(){return{type:"blockquote",children:[]}}function Oe(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function Le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ie(){return{type:"emphasis",children:[]}}function pt(){return{type:"heading",depth:0,children:[]}}function tn(){return{type:"break"}}function xt(){return{type:"html",value:""}}function Kn(){return{type:"image",title:null,url:"",alt:null}}function Dr(){return{type:"link",title:null,url:"",children:[]}}function Nn(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function dr(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function si(){return{type:"strong",children:[]}}function ka(){return{type:"text",value:""}}function Ii(){return{type:"thematicBreak"}}}function xo(e){return{line:e.line,column:e.column,offset:e.offset}}function NT(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?NT(e,r):xG(e,r)}}function xG(e,t){let n;for(n in t)if(OT.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function MT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cu({start:t.start,end:t.end})+") is still open")}function wG(e){const t=this;t.parser=n;function n(r){return vG(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function SG(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _G(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
@@ -691,7 +691,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
691
691
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:s,tableCell:f,tableRow:u}};function s(y,b,x,E){return d(h(y,x,E),y.align)}function u(y,b,x,E){const S=p(y,x,E),A=d([S]);return A.slice(0,A.indexOf(`
|
692
692
|
`))}function f(y,b,x,E){const S=x.enter("tableCell"),A=x.enter("phrasing"),k=x.containerPhrasing(y,{...E,before:a,after:a});return A(),S(),k}function d(y,b){return AW(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,x){const E=y.children;let S=-1;const A=[],k=b.enter("table");for(;++S<E.length;)A[S]=p(E[S],b,x);return k(),A}function p(y,b,x){const E=y.children;let S=-1;const A=[],k=b.enter("tableRow");for(;++S<E.length;)A[S]=f(E[S],y,b,x);return k(),A}function g(y,b,x){let E=xR.inlineCode(y,b,x);return x.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function pK(){return{exit:{taskListCheckValueChecked:SR,taskListCheckValueUnchecked:SR,paragraph:gK}}}function mK(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yK}}}function SR(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function gK(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function yK(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let f=xR.listItem(e,t,n,{...r,...u.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(h){return h+s}}function vK(){return[KX(),yW(),wW(),sK(),pK()]}function bK(e){return{extensions:[ZX(),vW(e),SW(),hK(e),mK()]}}const xK={tokenize:kK,partial:!0},_R={tokenize:AK,partial:!0},ER={tokenize:TK,partial:!0},CR={tokenize:RK,partial:!0},wK={tokenize:OK,partial:!0},kR={name:"wwwAutolink",tokenize:EK,previous:TR},AR={name:"protocolAutolink",tokenize:CK,previous:RR},Ai={name:"emailAutolink",tokenize:_K,previous:OR},Qr={};function SK(){return{text:Qr}}let ba=48;for(;ba<123;)Qr[ba]=Ai,ba++,ba===58?ba=65:ba===91&&(ba=97);Qr[43]=Ai,Qr[45]=Ai,Qr[46]=Ai,Qr[95]=Ai,Qr[72]=[Ai,AR],Qr[104]=[Ai,AR],Qr[87]=[Ai,kR],Qr[119]=[Ai,kR];function _K(e,t,n){const r=this;let i,a;return s;function s(p){return!$y(p)||!OR.call(r,r.previous)||Hy(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return $y(p)?(e.consume(p),u):p===64?(e.consume(p),f):n(p)}function f(p){return p===46?e.check(wK,h,d)(p):p===45||p===95||cn(p)?(a=!0,e.consume(p),f):h(p)}function d(p){return e.consume(p),i=!0,f}function h(p){return a&&i&&bn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function EK(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!TR.call(r,r.previous)||Hy(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xK,e.attempt(_R,e.attempt(ER,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function CK(e,t,n){const r=this;let i="",a=!1;return s;function s(p){return(p===72||p===104)&&RR.call(r,r.previous)&&!Hy(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(bn(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(p),f}return n(p)}function f(p){return p===47?(e.consume(p),a?d:(a=!0,f)):n(p)}function d(p){return p===null||Id(p)||ft(p)||va(p)||Ld(p)?n(p):e.attempt(_R,e.attempt(ER,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function kK(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function AK(e,t,n){let r,i,a;return s;function s(d){return d===46||d===95?e.check(CR,f,u)(d):d===null||ft(d)||va(d)||d!==45&&Ld(d)?f(d):(a=!0,e.consume(d),s)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),s}function f(d){return i||r||!a?n(d):t(d)}}function TK(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(CR,t,a)(s):s===null||ft(s)||va(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function RK(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||ft(u)||va(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ft(u)||va(u)?t(u):r(u)}function a(u){return bn(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):bn(u)?(e.consume(u),s):n(u)}}function OK(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return cn(a)?n(a):t(a)}}function TR(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function RR(e){return!bn(e)}function OR(e){return!(e===47||$y(e))}function $y(e){return e===43||e===45||e===46||e===95||cn(e)}function Hy(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const NK={tokenize:FK,partial:!0};function MK(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jK,continuation:{tokenize:IK},exit:LK}},text:{91:{name:"gfmFootnoteCall",tokenize:zK},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DK,resolveTo:PK}}}}function DK(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){s=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return u;function u(f){if(!s||!s._balanced)return n(f);const d=Or(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function PK(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function zK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(p){if(a>999||p===93&&!s||p===null||p===91||ft(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(Or(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return ft(p)||(s=!0),a++,e.consume(p),p===92?h:d}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function jK(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return f;function f(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||ft(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=Or(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return ft(b)||(u=!0),s++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function g(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ke(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function IK(e,t,n){return e.check(Au,t,e.attempt(NK,t,n))}function LK(e){e.exit("gfmFootnoteDefinition")}function FK(e,t,n){const r=this;return Ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function BK(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let f=-1;for(;++f<s.length;)if(s[f][0]==="enter"&&s[f][1].type==="strikethroughSequenceTemporary"&&s[f][1]._close){let d=f;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[f][1].end.offset-s[f][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[f][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[f][1].end)},p={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[f][1].start)},g=[["enter",h,u],["enter",s[d][1],u],["exit",s[d][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Yn(g,g.length,0,Fd(y,s.slice(d+1,f),u)),Yn(g,g.length,0,[["exit",p,u],["enter",s[f][1],u],["exit",s[f][1],u],["exit",h,u]]),Yn(s,d-1,f-d+3,g),f=d+g.length-2;break}}for(f=-1;++f<s.length;)s[f][1].type==="strikethroughSequenceTemporary"&&(s[f][1].type="data");return s}function a(s,u,f){const d=this.previous,h=this.events;let p=0;return g;function g(b){return d===126&&h[h.length-1][1].type!=="characterEscape"?f(b):(s.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const x=Ts(d);if(b===126)return p>1?f(b):(s.consume(b),p++,y);if(p<2&&!n)return f(b);const E=s.exit("strikethroughSequenceTemporary"),S=Ts(b);return E._open=!S||S===2&&!!x,E._close=!x||x===2&&!!S,u(b)}}}class $K{constructor(){this.map=[]}add(t,n,r){HK(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function HK(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function VK(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function UK(){return{flow:{null:{name:"table",tokenize:qK,resolveAll:YK}}}}function qK(e,t,n){const r=this;let i=0,a=0,s;return u;function u(T){let $=r.events.length-1;for(;$>-1;){const j=r.events[$][1].type;if(j==="lineEnding"||j==="linePrefix")$--;else break}const H=$>-1?r.events[$][1].type:null,G=H==="tableHead"||H==="tableRow"?D:f;return G===D&&r.parser.lazy[r.now().line]?n(T):G(T)}function f(T){return e.enter("tableHead"),e.enter("tableRow"),d(T)}function d(T){return T===124||(s=!0,a+=1),h(T)}function h(T){return T===null?n(T):Te(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),y):n(T):qe(T)?Ke(e,h,"whitespace")(T):(a+=1,s&&(s=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),p(T)))}function p(T){return T===null||T===124||ft(T)?(e.exit("data"),h(T)):(e.consume(T),T===92?g:p)}function g(T){return T===92||T===124?(e.consume(T),p):p(T)}function y(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),s=!1,qe(T)?Ke(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):b(T))}function b(T){return T===45||T===58?E(T):T===124?(s=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),x):N(T)}function x(T){return qe(T)?Ke(e,E,"whitespace")(T):E(T)}function E(T){return T===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),S):T===45?(a+=1,S(T)):T===null||Te(T)?R(T):N(T)}function S(T){return T===45?(e.enter("tableDelimiterFiller"),A(T)):N(T)}function A(T){return T===45?(e.consume(T),A):T===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(T))}function k(T){return qe(T)?Ke(e,R,"whitespace")(T):R(T)}function R(T){return T===124?b(T):T===null||Te(T)?!s||i!==a?N(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):N(T)}function N(T){return n(T)}function D(T){return e.enter("tableRow"),P(T)}function P(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),P):T===null||Te(T)?(e.exit("tableRow"),t(T)):qe(T)?Ke(e,P,"whitespace")(T):(e.enter("data"),F(T))}function F(T){return T===null||T===124||ft(T)?(e.exit("data"),P(T)):(e.consume(T),T===92?V:F)}function V(T){return T===92||T===124?(e.consume(T),F):F(T)}}function YK(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,f=0,d,h,p;const g=new $K;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,f!==0&&(NR(g,t,f,d,h),h=void 0,f=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],p=Kd(g,t,a,i,void 0,p),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],p=Kd(g,t,a,i,void 0,p)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,f=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(f=n,a[1]!==0?(s[0]=s[1],p=Kd(g,t,a,i,n,p)):s[1]!==0&&(p=Kd(g,t,s,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(f!==0&&NR(g,t,f,d,h),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=VK(t.events,n))}return e}function Kd(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Os(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=Os(t.events,n[1]);if(a={type:s,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=Os(t.events,n[2]),h=Os(t.events,n[3]),p={type:u,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(a.end=Object.assign({},Os(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function NR(e,t,n,r,i){const a=[],s=Os(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Os(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const GK={name:"tasklistCheck",tokenize:WK};function XK(){return{text:{91:GK}}}function WK(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return ft(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),s):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),s):n(f)}function s(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(f)}function u(f){return Te(f)?t(f):qe(f)?e.check({tokenize:KK},t,n)(f):n(f)}}function KK(e,t,n){return Ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ZK(e){return dT([SK(),MK(),BK(e),UK(),XK()])}const QK={};function JK(e){const t=this,n=e||QK,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ZK(n)),a.push(vK()),s.push(bK(n))}const MR=({item:e})=>{const t=C.useContext(Xe),n=()=>{t.worker?.add_node(e.node_id)},r=i=>{i.detail===2&&n()};return _.jsx("div",{className:"libnodeentry",onClick:r,title:e.description,children:e.node_name||e.node_id})},DR=(e,t)=>{const n=e.nodes?.some(i=>i.node_id.toLowerCase().includes(t.toLowerCase()))??!1,r=e.subshelves?.some(i=>DR(i,t))??!1;return n||r},Vy=({item:e,filter:t,parentkey:n})=>{const[r,i]=C.useState(!1),a=()=>i(!r),s=e.nodes?.filter(f=>f.node_id.toLowerCase().includes(t.toLowerCase())),u=r||t.length>0;return DR(e,t)?_.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:a,style:{cursor:"pointer"},title:e.description,children:[_.jsx("div",{className:"shelftitle_text",children:e.name}),_.jsx("div",{className:"expandicon "+(u?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(u?"open":"close"),children:_.jsxs("div",{className:"libnodecontainer_inner",children:[s&&_.jsx(_.Fragment,{children:s.map(f=>_.jsx(MR,{item:f},f.node_id))}),e.subshelves&&_.jsx(_.Fragment,{children:e.subshelves.map(f=>_.jsx(Vy,{item:f,filter:t,parentkey:n+f.name},n+f.name))})]})}),_.jsx("hr",{})]}):_.jsx(_.Fragment,{})},eZ=({filter:e,setFilter:t})=>_.jsxs("div",{className:"libfilter",children:[_.jsx(J7,{fontSize:"inherit"}),_.jsx("input",{type:"text",placeholder:"Filter",value:e,onChange:n=>{t(n.target.value)}}),e&&_.jsx(ck,{fontSize:"inherit",onClick:()=>{t("")}})]}),PR=[">=","==","<=","<",">"],Zd=">=",Uy=({availableModule:e})=>_.jsxs("div",{className:"module-links",children:[e.homepage&&_.jsx(_.Fragment,{children:_.jsx("a",{href:e.homepage,target:"_blank",rel:"noopener noreferrer",children:"Homepage"})}),e.source&&e.homepage&&" | ",e.source&&_.jsx(_.Fragment,{children:_.jsx("a",{href:e.source,target:"_blank",rel:"noopener noreferrer",children:"Source"})})]}),qy=({availableModule:e})=>{const[t,n]=C.useState(!1),r=()=>n(!t),i=150,a=e.description.length>i?e.description.substring(0,i)+"...":e.description;return _.jsxs("div",{className:"module-description",children:[_.jsx(BX,{remarkPlugins:[JK],children:t?e.description.replace(/\\n/g,`
|
693
693
|
`):a.replace(/\\n/g,`
|
694
|
-
`)}),e.description.length>i&&_.jsx("button",{onClick:r,className:"toggle-description",children:t?"Show less":"Show more"})]})},Yy=({availableModule:e,on_change:t})=>{const[n,r]=C.useState(e.version||"latest"),[i,a]=C.useState(Zd),s=f=>{const d=f.target.value;r(d),t(d!=="latest"?i+d:d)},u=f=>{f.target.value!==i&&PR.includes(f.target.value)&&(a(f.target.value),n!=="latest"&&t(f.target.value+n))};return e.releases&&!e.releases.includes(n)&&e.releases.unshift(n),_.jsxs(_.Fragment,{children:[_.jsx("select",{value:i,onChange:u,children:PR.map(f=>_.jsx("option",{value:f,children:f},f))}),_.jsx("select",{onChange:s,value:n,children:e.releases&&e.releases.map(f=>_.jsx("option",{value:f,children:f},f))})]})},tZ=({availableModule:e,on_remove:t,on_update:n})=>{const[r,i]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name+(e.version?` (${e.version})`:"")}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:i}),_.jsx("button",{className:"update-button",disabled:r===e.version,onClick:()=>{n(e,r)},children:"Update"}),_.jsx("button",{className:"remove-button",onClick:()=>{t(e)},children:"Remove"})]})]})},nZ=({availableModule:e,on_add:t})=>{const[n,r]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name+(e.version?` (${e.version})`:"")}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:r}),_.jsx("button",{className:"add-button",onClick:()=>{t(e,n)},children:"Add"})]})]})},rZ=({availableModule:e,on_add:t})=>{const[n,r]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:r}),_.jsx("button",{className:"add-button",onClick:()=>{t(e,n)},children:"Add"})]})]})},iZ=({children:e})=>{const[t,n]=C.useState(""),r=C.useContext(Xe),[i,a]=C.useState(!0),[s,u]=C.useState(!0),[f,d]=C.useState(!0),[h,p]=C.useState({installed:[],available:[],active:[]}),[g,y]=C.useState(!1),b=P=>{P&&(r.worker===void 0||!r.worker.is_open||r.worker.get_available_modules().then(F=>{p(F)}))};if(!r.worker)return _.jsx(_.Fragment,{});const x=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},E=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},S=P=>{y(!1),r.worker!==void 0&&r.worker.remove_lib(P.name)},A=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},k=P=>P.filter(F=>F.name.toLowerCase().includes(t.toLowerCase())||F.description.toLowerCase().includes(t.toLowerCase())),R=k(h.available),N=k(h.installed),D=k(h.active);return _.jsxs(vs,{title:"Manage Library",trigger:e,description:"Add or remove libraries to the current worker.",onOpenChange:b,open:g,setOpen:y,children:[_.jsx("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:t,onChange:P=>n(P.target.value)}),_.jsxs("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"},children:[N.length>0&&_.jsx("h3",{onClick:()=>{d(!f)},children:"Installed"}),f&&N.map(P=>_.jsx(nZ,{availableModule:P,on_add:x},P.name+P.source)),R.length>0&&_.jsx("h3",{onClick:()=>{u(!s)},children:"Available"}),s&&R.map(P=>_.jsx(rZ,{availableModule:P,on_add:E},P.name+P.source)),D.length>0&&_.jsx("h3",{onClick:()=>{a(!i)},children:"Active"}),i&&D.map(P=>_.jsx(tZ,{availableModule:P,on_remove:S,on_update:A},P.name+P.source))]})]})},oZ=({ins:e})=>{const[t,n]=C.useState(e.name),r=C.useContext(Xe),i=()=>{r.worker&&r.worker.remove_external_worker(e.uuid,e.nodeclassid)},a=()=>{r.worker&&(r.worker.update_external_worker(e.uuid,e.nodeclassid,{name:t}),e.name=t)};return _.jsx(_.Fragment,{children:_.jsx(vs,{title:e.name,description:"Settings for"+e.name,trigger:_.jsx("div",{children:"Settings"}),buttons:[{text:"Save",onClick:a,close:!0},{text:"Delete",onClick:i,close:!0}],children:_.jsx("div",{children:_.jsxs("div",{children:[_.jsx("label",{htmlFor:"name",children:"Name: "}),_.jsx("input",{type:"text",name:"name",value:t,onChange:s=>n(s.target.value),className:"styledinput"})]})})})})},aZ=({ins:e,lib:t,filter:n="",parentkey:r})=>{const[i,a]=C.useState(!1),s=()=>a(!i),u=t?.nodes?.filter(f=>f.node_id.toLowerCase().includes(n.toLowerCase()));return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:s,style:{cursor:"pointer"},title:e.name,children:[_.jsx("div",{className:"shelftitle_text",children:e.name}),_.jsx("div",{className:"expandicon "+(i?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(i?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:i&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"libnodeentry",title:e.uuid,children:_.jsx(oZ,{ins:e})}),t&&_.jsxs(_.Fragment,{children:[u&&_.jsx(_.Fragment,{children:u.map(f=>_.jsx(MR,{item:f},r+f.node_id))}),t.subshelves.map(f=>_.jsx(Vy,{item:f,filter:n,parentkey:r+f.name},r+f.name))]})]})})})]})},sZ=({item:e,mod:t,lib:n})=>{const r=C.useContext(Xe),[i,a]=C.useState(!1),s=()=>a(!i),u=()=>{r.worker?.add_external_worker({module:t,cls_module:e.module,cls_name:e.class_name})},f=h=>{h.detail===2&&u()},d=e.name||e.module+"."+e.class_name;return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:s,style:{cursor:"pointer"},title:d,children:[_.jsx("div",{className:"shelftitle_text",children:d}),_.jsx("div",{className:"expandicon "+(i?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(i?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:i&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"libnodeentry",onClick:f,title:e.name,children:"New Instance"}),e.instances.map(h=>_.jsx(aZ,{ins:h,lib:n?.subshelves.find(p=>p.name===h.uuid),parentkey:h.uuid},h.uuid))]})})})]})},lZ=({externalworkermod:e,lib:t})=>{const[n,r]=C.useState(!1),i=()=>r(!n),a=n;return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:i,style:{cursor:"pointer"},title:e.module,children:[_.jsx("div",{className:"shelftitle_text",children:e.module}),_.jsx("div",{className:"expandicon "+(a?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(a?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:e.worker_classes.map(s=>_.jsx(sZ,{item:s,mod:e.module,lib:t},s.module+s.class_name))})}),_.jsx("hr",{})]})},uZ=()=>{const e=C.useContext(Xe),t=e.lib.libstate(),n=C.useContext(Xe),r=n.local_settings(h=>h.view_settings.expand_lib),i=n.local_settings(h=>h.update_view_settings),a=h=>{i({expand_lib:h})},s=MU("m"),[u,f]=C.useState(""),d=e.worker?.state(h=>h.is_open)??!1;return _.jsx(IA,{maxSize:s?"100%":"300px",direction:s?"down":"right",containerClassName:"pos-left pos-top bg1 h-12",onExpandChange:a,expanded:r===void 0?!0:r,children:_.jsxs("div",{className:"libcontainer",children:[_.jsxs("div",{className:"library",children:[_.jsx("div",{className:"libtitle",children:"Lib"}),_.jsx("hr",{className:"hr_prominent"}),_.jsx(eZ,{filter:u,setFilter:f}),_.jsx("div",{className:"vscrollcontainer",children:t.lib.shelves.filter(h=>h.name!=="_external_worker").map(h=>_.jsx(Vy,{item:h,filter:u,parentkey:h.name},h.name))}),_.jsx("hr",{}),_.jsx("div",{className:"libtitle",children:"External Worker"}),_.jsx("hr",{className:"hr_prominent"}),_.jsx("div",{className:"vscrollcontainer",children:t.external_worker?.map(h=>_.jsx(lZ,{externalworkermod:h,lib:t.lib.shelves.find(p=>p.name==="_external_worker")},h.module))}),_.jsx("hr",{})]}),_.jsx("div",{style:{paddingTop:"0.5rem"}}),d&&_.jsx("div",{className:"addlib",children:_.jsx(iZ,{children:_.jsx("button",{children:"Manage Libraries"})})})]})})};function cZ(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:fZ}=Xt;function dZ(e){const t=fZ();return n=>{const r=e(n);return cZ(t.current,r)?t.current:t.current=r}}var Gy="Popover",[zR,wue]=lo(Gy,[Md]),Pu=Md(),[hZ,wo]=zR(Gy),jR=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,u=Pu(t),f=C.useRef(null),[d,h]=C.useState(!1),[p=!1,g]=ss({prop:r,defaultProp:i,onChange:a});return _.jsx(L0,{...u,children:_.jsx(hZ,{scope:t,contentId:xi(),triggerRef:f,open:p,onOpenChange:g,onOpenToggle:C.useCallback(()=>g(y=>!y),[g]),hasCustomAnchor:d,onCustomAnchorAdd:C.useCallback(()=>h(!0),[]),onCustomAnchorRemove:C.useCallback(()=>h(!1),[]),modal:s,children:n})})};jR.displayName=Gy;var IR="PopoverAnchor",pZ=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(IR,n),a=Pu(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:u}=i;return C.useEffect(()=>(s(),()=>u()),[s,u]),_.jsx(F0,{...a,...r,ref:t})});pZ.displayName=IR;var LR="PopoverTrigger",FR=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(LR,n),a=Pu(n),s=_t(t,i.triggerRef),u=_.jsx(gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qR(i.open),...r,ref:s,onClick:Me(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:_.jsx(F0,{asChild:!0,...a,children:u})});FR.displayName=LR;var Xy="PopoverPortal",[mZ,gZ]=zR(Xy,{forceMount:void 0}),BR=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=wo(Xy,t);return _.jsx(mZ,{scope:t,forceMount:n,children:_.jsx(wi,{present:n||a.open,children:_.jsx(wg,{asChild:!0,container:i,children:r})})})};BR.displayName=Xy;var Ns="PopoverContent",$R=C.forwardRef((e,t)=>{const n=gZ(Ns,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=wo(Ns,e.__scopePopover);return _.jsx(wi,{present:r||a.open,children:a.modal?_.jsx(vZ,{...i,ref:t}):_.jsx(bZ,{...i,ref:t})})});$R.displayName=Ns;var yZ=ls("PopoverContent.RemoveScroll"),vZ=C.forwardRef((e,t)=>{const n=wo(Ns,e.__scopePopover),r=C.useRef(null),i=_t(t,r),a=C.useRef(!1);return C.useEffect(()=>{const s=r.current;if(s)return Rg(s)},[]),_.jsx(sd,{as:yZ,allowPinchZoom:!0,children:_.jsx(HR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Me(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,d=u.button===2||f;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),bZ=C.forwardRef((e,t)=>{const n=wo(Ns,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return _.jsx(HR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;n.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),HR=C.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,...p}=e,g=wo(Ns,n),y=Pu(n);return _g(),_.jsx(Jf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:_.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:_.jsx($k,{"data-state":qR(g.open),role:"dialog",id:g.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),VR="PopoverClose",xZ=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(VR,n);return _.jsx(gt.button,{type:"button",...r,ref:t,onClick:Me(e.onClick,()=>i.onOpenChange(!1))})});xZ.displayName=VR;var wZ="PopoverArrow",UR=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Pu(n);return _.jsx(Hk,{...i,...r,ref:t})});UR.displayName=wZ;function qR(e){return e?"open":"closed"}var YR=jR,GR=FR,XR=BR,WR=$R,SZ=UR;const _Z={bytes:({iostore:e})=>{const{full:t,preview:n}=e.valuestore(),r=JSON.stringify(t?.value||n?.value)||"";return`Bytes(${Math.round(3*r.length/4)})`}},EZ=e=>typeof e=="boolean"||e instanceof Boolean,CZ=e=>typeof e=="number"||e instanceof Number,kZ=e=>typeof e=="bigint"||e instanceof BigInt,KR=e=>!!e&&e instanceof Date,AZ=e=>typeof e=="string"||e instanceof String,TZ=e=>Array.isArray(e),RZ=e=>typeof e=="object"&&e!==null,ZR=e=>!!e&&e instanceof Object&&typeof e=="function";function Qd(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function OZ(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function QR(e){let{field:t,value:n,data:r,lastElement:i,openBracket:a,closeBracket:s,level:u,style:f,shouldExpandNode:d,clickToExpandNode:h,outerRef:p,beforeExpandChange:g}=e;const y=C.useRef(!1),[b,x]=C.useState(()=>d(u,n,t)),E=C.useRef(null);C.useEffect(()=>{y.current?x(d(u,n,t)):y.current=!0},[d]);const S=C.useId();if(r.length===0)return NZ({field:t,openBracket:a,closeBracket:s,lastElement:i,style:f});const A=b?f.collapseIcon:f.expandIcon,k=b?f.ariaLables.collapseJson:f.ariaLables.expandJson,R=u+1,N=r.length-1,D=V=>{b!==V&&(!g||g({level:u,value:n,field:t,newExpandValue:V}))&&x(V)},P=V=>{if(V.key==="ArrowRight"||V.key==="ArrowLeft")V.preventDefault(),D(V.key==="ArrowRight");else if(V.key==="ArrowUp"||V.key==="ArrowDown"){V.preventDefault();const T=V.key==="ArrowUp"?-1:1;if(!p.current)return;const $=p.current.querySelectorAll("[role=button]");let H=-1;for(let j=0;j<$.length;j++)if($[j].tabIndex===0){H=j;break}if(H<0)return;const G=(H+T+$.length)%$.length;$[H].tabIndex=-1,$[G].tabIndex=0,$[G].focus()}},F=()=>{var V;D(!b);const T=E.current;if(!T)return;const $=(V=p.current)===null||V===void 0?void 0:V.querySelector('[role=button][tabindex="0"]');$&&($.tabIndex=-1),T.tabIndex=0,T.focus()};return C.createElement("div",{className:f.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},C.createElement("span",{className:A,onClick:F,onKeyDown:P,role:"button","aria-label":k,"aria-expanded":b,"aria-controls":b?S:void 0,ref:E,tabIndex:u===0?0:-1}),(t||t==="")&&(h?C.createElement("span",{className:f.clickableLabel,onClick:F,onKeyDown:P},Qd(t,f.quotesForFieldNames),":"):C.createElement("span",{className:f.label},Qd(t,f.quotesForFieldNames),":")),C.createElement("span",{className:f.punctuation},a),b?C.createElement("ul",{id:S,role:"group",className:f.childFieldsContainer},r.map((V,T)=>C.createElement(JR,{key:V[0]||T,field:V[0],value:V[1],style:f,lastElement:T===N,level:R,shouldExpandNode:d,clickToExpandNode:h,outerRef:p}))):C.createElement("span",{className:f.collapsedContent,onClick:F,onKeyDown:P}),C.createElement("span",{className:f.punctuation},s),!i&&C.createElement("span",{className:f.punctuation},","))}function NZ(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:a}=e;return C.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&C.createElement("span",{className:a.label},Qd(t,a.quotesForFieldNames),":"),C.createElement("span",{className:a.punctuation},n),C.createElement("span",{className:a.punctuation},r),!i&&C.createElement("span",{className:a.punctuation},","))}function MZ(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:a,clickToExpandNode:s,level:u,outerRef:f,beforeExpandChange:d}=e;return QR({field:t,value:n,lastElement:i||!1,level:u,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:a,clickToExpandNode:s,data:Object.keys(n).map(h=>[h,n[h]]),outerRef:f,beforeExpandChange:d})}function DZ(e){let{field:t,value:n,style:r,lastElement:i,level:a,shouldExpandNode:s,clickToExpandNode:u,outerRef:f,beforeExpandChange:d}=e;return QR({field:t,value:n,lastElement:i||!1,level:a,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:u,data:n.map(h=>[void 0,h]),outerRef:f,beforeExpandChange:d})}function PZ(e){let{field:t,value:n,style:r,lastElement:i}=e,a,s=r.otherValue;return n===null?(a="null",s=r.nullValue):n===void 0?(a="undefined",s=r.undefinedValue):AZ(n)?(a=OZ(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):EZ(n)?(a=n?"true":"false",s=r.booleanValue):CZ(n)?(a=n.toString(),s=r.numberValue):kZ(n)?(a=`${n.toString()}n`,s=r.numberValue):KR(n)?a=n.toISOString():ZR(n)?a="function() { }":a=n.toString(),C.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&C.createElement("span",{className:r.label},Qd(t,r.quotesForFieldNames),":"),C.createElement("span",{className:s},a),!i&&C.createElement("span",{className:r.punctuation},","))}function JR(e){const t=e.value;return TZ(t)?C.createElement(DZ,Object.assign({},e)):RZ(t)&&!KR(t)&&!ZR(t)?C.createElement(MZ,Object.assign({},e)):C.createElement(PZ,Object.assign({},e))}var rt={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const eO={collapseJson:"collapse JSON",expandJson:"expand JSON"},tO={container:rt["container-light"],basicChildStyle:rt["basic-element-style"],childFieldsContainer:rt["child-fields-container"],label:rt["label-light"],clickableLabel:rt["clickable-label-light"],nullValue:rt["value-null-light"],undefinedValue:rt["value-undefined-light"],stringValue:rt["value-string-light"],booleanValue:rt["value-boolean-light"],numberValue:rt["value-number-light"],otherValue:rt["value-other-light"],punctuation:rt["punctuation-light"],collapseIcon:rt["collapse-icon-light"],expandIcon:rt["expand-icon-light"],collapsedContent:rt["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:eO,stringifyStringValues:!1},zZ={container:rt["container-dark"],basicChildStyle:rt["basic-element-style"],childFieldsContainer:rt["child-fields-container"],label:rt["label-dark"],clickableLabel:rt["clickable-label-dark"],nullValue:rt["value-null-dark"],undefinedValue:rt["value-undefined-dark"],stringValue:rt["value-string-dark"],booleanValue:rt["value-boolean-dark"],numberValue:rt["value-number-dark"],otherValue:rt["value-other-dark"],punctuation:rt["punctuation-dark"],collapseIcon:rt["collapse-icon-dark"],expandIcon:rt["expand-icon-dark"],collapsedContent:rt["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:eO,stringifyStringValues:!1},jZ=()=>!0,IZ=e=>e<1,LZ=e=>{let{data:t,style:n=tO,shouldExpandNode:r=jZ,clickToExpandNode:i=!1,beforeExpandChange:a,...s}=e;const u=C.useRef(null);return C.createElement("div",Object.assign({"aria-label":"JSON view"},s,{className:n.container,ref:u,role:"tree"}),C.createElement(JR,{value:t,style:{...tO,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:u,beforeExpandChange:a}))};function FZ(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}function BZ(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype?!1:FZ(e)}const $Z=({data:e})=>_.jsx(LZ,{data:BZ(e)?"":e,style:zZ,shouldExpandNode:IZ});function nO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nO(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nO(e))&&(r&&(r+=" "),r+=t);return r}function Ti(e,t,n=void 0){const r={};for(const i in e){const a=e[i];let s="",u=!0;for(let f=0;f<a.length;f+=1){const d=a[f];d&&(s+=(u===!0?"":" ")+t(d),u=!1,n&&n[d]&&(s+=" "+n[d]))}r[i]=s}return r}const rO=C.createContext();function xa(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function xn(e){if(typeof e!="string")throw new Error(xa(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Wy={exports:{}},st={};/**
|
694
|
+
`)}),e.description.length>i&&_.jsx("button",{onClick:r,className:"toggle-description",children:t?"Show less":"Show more"})]})},Yy=({availableModule:e,on_change:t})=>{const[n,r]=C.useState(e.version||"latest"),[i,a]=C.useState(Zd),s=f=>{const d=f.target.value;r(d),t(d!=="latest"?i+d:d)},u=f=>{f.target.value!==i&&PR.includes(f.target.value)&&(a(f.target.value),n!=="latest"&&t(f.target.value+n))};return e.releases&&!e.releases.includes(n)&&e.releases.unshift(n),_.jsxs(_.Fragment,{children:[_.jsx("select",{value:i,onChange:u,children:PR.map(f=>_.jsx("option",{value:f,children:f},f))}),_.jsx("select",{onChange:s,value:n,children:e.releases&&e.releases.map(f=>_.jsx("option",{value:f,children:f},f))})]})},tZ=({availableModule:e,on_remove:t,on_update:n})=>{const[r,i]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name+(e.version?` (${e.version})`:"")}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:i}),_.jsx("button",{className:"update-button",disabled:r===e.version,onClick:()=>{n(e,r)},children:"Update"}),_.jsx("button",{className:"remove-button",onClick:()=>{t(e)},children:"Remove"})]})]})},nZ=({availableModule:e,on_add:t})=>{const[n,r]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name+(e.version?` (${e.version})`:"")}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:r}),_.jsx("button",{className:"add-button",onClick:()=>{t(e,n)},children:"Add"})]})]})},rZ=({availableModule:e,on_add:t})=>{const[n,r]=C.useState(Zd+e.version||"latest");return _.jsxs("div",{className:"addable-module",children:[_.jsx("div",{className:"module-name",children:e.name}),_.jsx(Uy,{availableModule:e}),_.jsx(qy,{availableModule:e}),_.jsxs("div",{children:[_.jsx(Yy,{availableModule:e,on_change:r}),_.jsx("button",{className:"add-button",onClick:()=>{t(e,n)},children:"Add"})]})]})},iZ=({children:e})=>{const[t,n]=C.useState(""),r=C.useContext(Xe),[i,a]=C.useState(!0),[s,u]=C.useState(!0),[f,d]=C.useState(!0),[h,p]=C.useState({installed:[],available:[],active:[]}),[g,y]=C.useState(!1),b=P=>{P&&(r.worker===void 0||!r.worker.is_open||r.worker.get_available_modules().then(F=>{p(F)}))};if(!r.worker)return _.jsx(_.Fragment,{});const x=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},E=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},S=P=>{y(!1),r.worker!==void 0&&r.worker.remove_lib(P.name)},A=(P,F)=>{y(!1),r.worker!==void 0&&r.worker.add_lib(P.name,F)},k=P=>P.filter(F=>F.name.toLowerCase().includes(t.toLowerCase())||F.description.toLowerCase().includes(t.toLowerCase())),R=k(h.available),N=k(h.installed),D=k(h.active);return _.jsxs(vs,{title:"Manage Library",trigger:e,description:"Add or remove libraries to the current worker.",onOpenChange:b,open:g,setOpen:y,children:[_.jsx("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:t,onChange:P=>n(P.target.value)}),_.jsxs("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"},children:[N.length>0&&_.jsx("h3",{onClick:()=>{d(!f)},children:"Installed"}),f&&N.map(P=>_.jsx(nZ,{availableModule:P,on_add:x},P.name+P.source)),R.length>0&&_.jsx("h3",{onClick:()=>{u(!s)},children:"Available"}),s&&R.map(P=>_.jsx(rZ,{availableModule:P,on_add:E},P.name+P.source)),D.length>0&&_.jsx("h3",{onClick:()=>{a(!i)},children:"Active"}),i&&D.map(P=>_.jsx(tZ,{availableModule:P,on_remove:S,on_update:A},P.name+P.source))]})]})},oZ=({ins:e})=>{const[t,n]=C.useState(e.name),r=C.useContext(Xe),i=()=>{r.worker&&r.worker.remove_external_worker(e.uuid,e.nodeclassid)},a=()=>{r.worker&&(r.worker.update_external_worker(e.uuid,e.nodeclassid,{name:t}),e.name=t)};return _.jsx(_.Fragment,{children:_.jsx(vs,{title:e.name,description:"Settings for"+e.name,trigger:_.jsx("div",{children:"Settings"}),buttons:[{text:"Save",onClick:a,close:!0},{text:"Delete",onClick:i,close:!0}],children:_.jsx("div",{children:_.jsxs("div",{children:[_.jsx("label",{htmlFor:"name",children:"Name: "}),_.jsx("input",{type:"text",name:"name",value:t,onChange:s=>n(s.target.value),className:"styledinput"})]})})})})},aZ=({ins:e,lib:t,filter:n="",parentkey:r})=>{const[i,a]=C.useState(!1),s=()=>a(!i),u=t?.nodes?.filter(f=>f.node_id.toLowerCase().includes(n.toLowerCase()));return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:s,style:{cursor:"pointer"},title:e.name,children:[_.jsx("div",{className:"shelftitle_text",children:e.name}),_.jsx("div",{className:"expandicon "+(i?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(i?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:i&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"libnodeentry",title:e.uuid,children:_.jsx(oZ,{ins:e})}),t&&_.jsxs(_.Fragment,{children:[u&&_.jsx(_.Fragment,{children:u.map(f=>_.jsx(MR,{item:f},r+f.node_id))}),t.subshelves.map(f=>_.jsx(Vy,{item:f,filter:n,parentkey:r+f.name},r+f.name))]})]})})})]})},sZ=({item:e,mod:t,lib:n})=>{const r=C.useContext(Xe),[i,a]=C.useState(!1),s=()=>a(!i),u=()=>{r.worker?.add_external_worker({module:t,cls_module:e.module,cls_name:e.class_name})},f=h=>{h.detail===2&&u()},d=e.name||e.module+"."+e.class_name;return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:s,style:{cursor:"pointer"},title:d,children:[_.jsx("div",{className:"shelftitle_text",children:d}),_.jsx("div",{className:"expandicon "+(i?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(i?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:i&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"libnodeentry",onClick:f,title:e.name,children:"New Instance"}),e.instances.map(h=>_.jsx(aZ,{ins:h,lib:n?.subshelves.find(p=>p.name===h.uuid),parentkey:h.uuid},h.uuid))]})})})]})},lZ=({externalworkermod:e,lib:t})=>{const[n,r]=C.useState(!1),i=()=>r(!n),a=n;return _.jsxs("div",{className:"shelfcontainer",children:[_.jsxs("div",{className:"shelftitle",onClick:i,style:{cursor:"pointer"},title:e.module,children:[_.jsx("div",{className:"shelftitle_text",children:e.module}),_.jsx("div",{className:"expandicon "+(a?"open":"close"),children:_.jsx(du,{})})]}),_.jsx("div",{className:"libnodecontainer "+(a?"open":"close"),children:_.jsx("div",{className:"libnodecontainer_inner",children:e.worker_classes.map(s=>_.jsx(sZ,{item:s,mod:e.module,lib:t},s.module+s.class_name))})}),_.jsx("hr",{})]})},uZ=()=>{const e=C.useContext(Xe),t=e.lib.libstate(),n=C.useContext(Xe),r=n.local_settings(h=>h.view_settings.expand_lib),i=n.local_settings(h=>h.update_view_settings),a=h=>{i({expand_lib:h})},s=MU("m"),[u,f]=C.useState(""),d=e.worker?.state(h=>h.is_open)??!1;return _.jsx(IA,{maxSize:s?"100%":"18.75rem",direction:s?"down":"right",containerClassName:"pos-left pos-top bg1 h-12",onExpandChange:a,expanded:r===void 0?!0:r,children:_.jsxs("div",{className:"libcontainer",children:[_.jsxs("div",{className:"library",children:[_.jsx("div",{className:"libtitle",children:"Lib"}),_.jsx("hr",{className:"hr_prominent"}),_.jsx(eZ,{filter:u,setFilter:f}),_.jsx("div",{className:"vscrollcontainer",children:t.lib.shelves.filter(h=>h.name!=="_external_worker").map(h=>_.jsx(Vy,{item:h,filter:u,parentkey:h.name},h.name))}),_.jsx("hr",{}),_.jsx("div",{className:"libtitle",children:"External Worker"}),_.jsx("hr",{className:"hr_prominent"}),_.jsx("div",{className:"vscrollcontainer",children:t.external_worker?.map(h=>_.jsx(lZ,{externalworkermod:h,lib:t.lib.shelves.find(p=>p.name==="_external_worker")},h.module))}),_.jsx("hr",{})]}),_.jsx("div",{style:{paddingTop:"0.5rem"}}),d&&_.jsx("div",{className:"addlib",children:_.jsx(iZ,{children:_.jsx("button",{children:"Manage Libraries"})})})]})})};function cZ(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:fZ}=Xt;function dZ(e){const t=fZ();return n=>{const r=e(n);return cZ(t.current,r)?t.current:t.current=r}}var Gy="Popover",[zR,wue]=lo(Gy,[Md]),Pu=Md(),[hZ,wo]=zR(Gy),jR=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,u=Pu(t),f=C.useRef(null),[d,h]=C.useState(!1),[p=!1,g]=ss({prop:r,defaultProp:i,onChange:a});return _.jsx(L0,{...u,children:_.jsx(hZ,{scope:t,contentId:xi(),triggerRef:f,open:p,onOpenChange:g,onOpenToggle:C.useCallback(()=>g(y=>!y),[g]),hasCustomAnchor:d,onCustomAnchorAdd:C.useCallback(()=>h(!0),[]),onCustomAnchorRemove:C.useCallback(()=>h(!1),[]),modal:s,children:n})})};jR.displayName=Gy;var IR="PopoverAnchor",pZ=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(IR,n),a=Pu(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:u}=i;return C.useEffect(()=>(s(),()=>u()),[s,u]),_.jsx(F0,{...a,...r,ref:t})});pZ.displayName=IR;var LR="PopoverTrigger",FR=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(LR,n),a=Pu(n),s=_t(t,i.triggerRef),u=_.jsx(gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qR(i.open),...r,ref:s,onClick:Me(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:_.jsx(F0,{asChild:!0,...a,children:u})});FR.displayName=LR;var Xy="PopoverPortal",[mZ,gZ]=zR(Xy,{forceMount:void 0}),BR=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=wo(Xy,t);return _.jsx(mZ,{scope:t,forceMount:n,children:_.jsx(wi,{present:n||a.open,children:_.jsx(wg,{asChild:!0,container:i,children:r})})})};BR.displayName=Xy;var Ns="PopoverContent",$R=C.forwardRef((e,t)=>{const n=gZ(Ns,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=wo(Ns,e.__scopePopover);return _.jsx(wi,{present:r||a.open,children:a.modal?_.jsx(vZ,{...i,ref:t}):_.jsx(bZ,{...i,ref:t})})});$R.displayName=Ns;var yZ=ls("PopoverContent.RemoveScroll"),vZ=C.forwardRef((e,t)=>{const n=wo(Ns,e.__scopePopover),r=C.useRef(null),i=_t(t,r),a=C.useRef(!1);return C.useEffect(()=>{const s=r.current;if(s)return Rg(s)},[]),_.jsx(sd,{as:yZ,allowPinchZoom:!0,children:_.jsx(HR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Me(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,d=u.button===2||f;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),bZ=C.forwardRef((e,t)=>{const n=wo(Ns,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return _.jsx(HR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;n.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),HR=C.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,...p}=e,g=wo(Ns,n),y=Pu(n);return _g(),_.jsx(Jf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:_.jsx(Qf,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:_.jsx($k,{"data-state":qR(g.open),role:"dialog",id:g.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),VR="PopoverClose",xZ=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=wo(VR,n);return _.jsx(gt.button,{type:"button",...r,ref:t,onClick:Me(e.onClick,()=>i.onOpenChange(!1))})});xZ.displayName=VR;var wZ="PopoverArrow",UR=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Pu(n);return _.jsx(Hk,{...i,...r,ref:t})});UR.displayName=wZ;function qR(e){return e?"open":"closed"}var YR=jR,GR=FR,XR=BR,WR=$R,SZ=UR;const _Z={bytes:({iostore:e})=>{const{full:t,preview:n}=e.valuestore(),r=JSON.stringify(t?.value||n?.value)||"";return`Bytes(${Math.round(3*r.length/4)})`}},EZ=e=>typeof e=="boolean"||e instanceof Boolean,CZ=e=>typeof e=="number"||e instanceof Number,kZ=e=>typeof e=="bigint"||e instanceof BigInt,KR=e=>!!e&&e instanceof Date,AZ=e=>typeof e=="string"||e instanceof String,TZ=e=>Array.isArray(e),RZ=e=>typeof e=="object"&&e!==null,ZR=e=>!!e&&e instanceof Object&&typeof e=="function";function Qd(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function OZ(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function QR(e){let{field:t,value:n,data:r,lastElement:i,openBracket:a,closeBracket:s,level:u,style:f,shouldExpandNode:d,clickToExpandNode:h,outerRef:p,beforeExpandChange:g}=e;const y=C.useRef(!1),[b,x]=C.useState(()=>d(u,n,t)),E=C.useRef(null);C.useEffect(()=>{y.current?x(d(u,n,t)):y.current=!0},[d]);const S=C.useId();if(r.length===0)return NZ({field:t,openBracket:a,closeBracket:s,lastElement:i,style:f});const A=b?f.collapseIcon:f.expandIcon,k=b?f.ariaLables.collapseJson:f.ariaLables.expandJson,R=u+1,N=r.length-1,D=V=>{b!==V&&(!g||g({level:u,value:n,field:t,newExpandValue:V}))&&x(V)},P=V=>{if(V.key==="ArrowRight"||V.key==="ArrowLeft")V.preventDefault(),D(V.key==="ArrowRight");else if(V.key==="ArrowUp"||V.key==="ArrowDown"){V.preventDefault();const T=V.key==="ArrowUp"?-1:1;if(!p.current)return;const $=p.current.querySelectorAll("[role=button]");let H=-1;for(let j=0;j<$.length;j++)if($[j].tabIndex===0){H=j;break}if(H<0)return;const G=(H+T+$.length)%$.length;$[H].tabIndex=-1,$[G].tabIndex=0,$[G].focus()}},F=()=>{var V;D(!b);const T=E.current;if(!T)return;const $=(V=p.current)===null||V===void 0?void 0:V.querySelector('[role=button][tabindex="0"]');$&&($.tabIndex=-1),T.tabIndex=0,T.focus()};return C.createElement("div",{className:f.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},C.createElement("span",{className:A,onClick:F,onKeyDown:P,role:"button","aria-label":k,"aria-expanded":b,"aria-controls":b?S:void 0,ref:E,tabIndex:u===0?0:-1}),(t||t==="")&&(h?C.createElement("span",{className:f.clickableLabel,onClick:F,onKeyDown:P},Qd(t,f.quotesForFieldNames),":"):C.createElement("span",{className:f.label},Qd(t,f.quotesForFieldNames),":")),C.createElement("span",{className:f.punctuation},a),b?C.createElement("ul",{id:S,role:"group",className:f.childFieldsContainer},r.map((V,T)=>C.createElement(JR,{key:V[0]||T,field:V[0],value:V[1],style:f,lastElement:T===N,level:R,shouldExpandNode:d,clickToExpandNode:h,outerRef:p}))):C.createElement("span",{className:f.collapsedContent,onClick:F,onKeyDown:P}),C.createElement("span",{className:f.punctuation},s),!i&&C.createElement("span",{className:f.punctuation},","))}function NZ(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:a}=e;return C.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&C.createElement("span",{className:a.label},Qd(t,a.quotesForFieldNames),":"),C.createElement("span",{className:a.punctuation},n),C.createElement("span",{className:a.punctuation},r),!i&&C.createElement("span",{className:a.punctuation},","))}function MZ(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:a,clickToExpandNode:s,level:u,outerRef:f,beforeExpandChange:d}=e;return QR({field:t,value:n,lastElement:i||!1,level:u,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:a,clickToExpandNode:s,data:Object.keys(n).map(h=>[h,n[h]]),outerRef:f,beforeExpandChange:d})}function DZ(e){let{field:t,value:n,style:r,lastElement:i,level:a,shouldExpandNode:s,clickToExpandNode:u,outerRef:f,beforeExpandChange:d}=e;return QR({field:t,value:n,lastElement:i||!1,level:a,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:u,data:n.map(h=>[void 0,h]),outerRef:f,beforeExpandChange:d})}function PZ(e){let{field:t,value:n,style:r,lastElement:i}=e,a,s=r.otherValue;return n===null?(a="null",s=r.nullValue):n===void 0?(a="undefined",s=r.undefinedValue):AZ(n)?(a=OZ(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):EZ(n)?(a=n?"true":"false",s=r.booleanValue):CZ(n)?(a=n.toString(),s=r.numberValue):kZ(n)?(a=`${n.toString()}n`,s=r.numberValue):KR(n)?a=n.toISOString():ZR(n)?a="function() { }":a=n.toString(),C.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&C.createElement("span",{className:r.label},Qd(t,r.quotesForFieldNames),":"),C.createElement("span",{className:s},a),!i&&C.createElement("span",{className:r.punctuation},","))}function JR(e){const t=e.value;return TZ(t)?C.createElement(DZ,Object.assign({},e)):RZ(t)&&!KR(t)&&!ZR(t)?C.createElement(MZ,Object.assign({},e)):C.createElement(PZ,Object.assign({},e))}var rt={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const eO={collapseJson:"collapse JSON",expandJson:"expand JSON"},tO={container:rt["container-light"],basicChildStyle:rt["basic-element-style"],childFieldsContainer:rt["child-fields-container"],label:rt["label-light"],clickableLabel:rt["clickable-label-light"],nullValue:rt["value-null-light"],undefinedValue:rt["value-undefined-light"],stringValue:rt["value-string-light"],booleanValue:rt["value-boolean-light"],numberValue:rt["value-number-light"],otherValue:rt["value-other-light"],punctuation:rt["punctuation-light"],collapseIcon:rt["collapse-icon-light"],expandIcon:rt["expand-icon-light"],collapsedContent:rt["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:eO,stringifyStringValues:!1},zZ={container:rt["container-dark"],basicChildStyle:rt["basic-element-style"],childFieldsContainer:rt["child-fields-container"],label:rt["label-dark"],clickableLabel:rt["clickable-label-dark"],nullValue:rt["value-null-dark"],undefinedValue:rt["value-undefined-dark"],stringValue:rt["value-string-dark"],booleanValue:rt["value-boolean-dark"],numberValue:rt["value-number-dark"],otherValue:rt["value-other-dark"],punctuation:rt["punctuation-dark"],collapseIcon:rt["collapse-icon-dark"],expandIcon:rt["expand-icon-dark"],collapsedContent:rt["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:eO,stringifyStringValues:!1},jZ=()=>!0,IZ=e=>e<1,LZ=e=>{let{data:t,style:n=tO,shouldExpandNode:r=jZ,clickToExpandNode:i=!1,beforeExpandChange:a,...s}=e;const u=C.useRef(null);return C.createElement("div",Object.assign({"aria-label":"JSON view"},s,{className:n.container,ref:u,role:"tree"}),C.createElement(JR,{value:t,style:{...tO,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:u,beforeExpandChange:a}))};function FZ(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}function BZ(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype?!1:FZ(e)}const $Z=({data:e})=>_.jsx(LZ,{data:BZ(e)?"":e,style:zZ,shouldExpandNode:IZ});function nO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nO(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nO(e))&&(r&&(r+=" "),r+=t);return r}function Ti(e,t,n=void 0){const r={};for(const i in e){const a=e[i];let s="",u=!0;for(let f=0;f<a.length;f+=1){const d=a[f];d&&(s+=(u===!0?"":" ")+t(d),u=!1,n&&n[d]&&(s+=" "+n[d]))}r[i]=s}return r}const rO=C.createContext();function xa(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function xn(e){if(typeof e!="string")throw new Error(xa(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Wy={exports:{}},st={};/**
|
695
695
|
* @license React
|
696
696
|
* react-is.production.js
|
697
697
|
*
|
@@ -796,8 +796,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
796
796
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iv(e){return are(e)||sre(e)||XN(e)||lre()}function ure(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Lv=C.useLayoutEffect,cre=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ph=function(){};function fre(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function dre(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&a.push("".concat(fre(e,s)));return a.filter(function(u){return u}).map(function(u){return String(u).trim()}).join(" ")}var ZN=function(t){return wre(t)?t.filter(Boolean):_a(t)==="object"&&t!==null?[t]:[]},QN=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=zi(t,cre);return Re({},n)},Rt=function(t,n,r){var i=t.cx,a=t.getStyles,s=t.getClassNames,u=t.className;return{css:a(n,t),className:i(r??{},s(n,t),u)}};function zh(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function hre(e){return zh(e)?window.innerHeight:e.clientHeight}function JN(e){return zh(e)?window.pageYOffset:e.scrollTop}function jh(e,t){if(zh(e)){window.scrollTo(0,t);return}e.scrollTop=t}function pre(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function mre(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ih(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ph,i=JN(e),a=t-i,s=10,u=0;function f(){u+=s;var d=mre(u,i,a,n);jh(e,d),u<n?window.requestAnimationFrame(f):r(e)}f()}function e2(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?jh(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&jh(e,Math.max(t.offsetTop-i,0))}function gre(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function t2(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function yre(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var n2=!1,vre={get passive(){return n2=!0}},Lh=typeof window<"u"?window:{};Lh.addEventListener&&Lh.removeEventListener&&(Lh.addEventListener("p",Ph,vre),Lh.removeEventListener("p",Ph,!1));var bre=n2;function xre(e){return e!=null}function wre(e){return Array.isArray(e)}function Fh(e,t,n){return e?t:n}function kue(e){return e}function Aue(e){return e}var Sre=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=Object.entries(t).filter(function(s){var u=Pi(s,1),f=u[0];return!r.includes(f)});return a.reduce(function(s,u){var f=Pi(u,2),d=f[0],h=f[1];return s[d]=h,s},{})},_re=["children","innerProps"],Ere=["children","innerProps"];function Cre(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,a=e.shouldScroll,s=e.isFixedPosition,u=e.controlHeight,f=pre(n),d={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return d;var h=f.getBoundingClientRect(),p=h.height,g=n.getBoundingClientRect(),y=g.bottom,b=g.height,x=g.top,E=n.offsetParent.getBoundingClientRect(),S=E.top,A=s?window.innerHeight:hre(f),k=JN(f),R=parseInt(getComputedStyle(n).marginBottom,10),N=parseInt(getComputedStyle(n).marginTop,10),D=S-N,P=A-x,F=D+k,V=p-k-x,T=y-A+k+R,$=k+x-N,H=160;switch(i){case"auto":case"bottom":if(P>=b)return{placement:"bottom",maxHeight:t};if(V>=b&&!s)return a&&Ih(f,T,H),{placement:"bottom",maxHeight:t};if(!s&&V>=r||s&&P>=r){a&&Ih(f,T,H);var G=s?P-R:V-R;return{placement:"bottom",maxHeight:G}}if(i==="auto"||s){var j=t,U=s?D:F;return U>=r&&(j=Math.min(U-R-u,t)),{placement:"top",maxHeight:j}}if(i==="bottom")return a&&jh(f,T),{placement:"bottom",maxHeight:t};break;case"top":if(D>=b)return{placement:"top",maxHeight:t};if(F>=b&&!s)return a&&Ih(f,$,H),{placement:"top",maxHeight:t};if(!s&&F>=r||s&&D>=r){var z=t;return(!s&&F>=r||s&&D>=r)&&(z=s?D-N:F-N),a&&Ih(f,$,H),{placement:"top",maxHeight:z}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return d}function kre(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var r2=function(t){return t==="auto"?"bottom":t},Are=function(t,n){var r,i=t.placement,a=t.theme,s=a.borderRadius,u=a.spacing,f=a.colors;return Re((r={label:"menu"},Wu(r,kre(i),"100%"),Wu(r,"position","absolute"),Wu(r,"width","100%"),Wu(r,"zIndex",1),r),n?{}:{backgroundColor:f.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:u.menuGutter,marginTop:u.menuGutter})},i2=C.createContext(null),Tre=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,a=t.menuPlacement,s=t.menuPosition,u=t.menuShouldScrollIntoView,f=t.theme,d=C.useContext(i2)||{},h=d.setPortalPlacement,p=C.useRef(null),g=C.useState(i),y=Pi(g,2),b=y[0],x=y[1],E=C.useState(null),S=Pi(E,2),A=S[0],k=S[1],R=f.spacing.controlHeight;return Lv(function(){var N=p.current;if(N){var D=s==="fixed",P=u&&!D,F=Cre({maxHeight:i,menuEl:N,minHeight:r,placement:a,shouldScroll:P,isFixedPosition:D,controlHeight:R});x(F.maxHeight),k(F.placement),h?.(F.placement)}},[i,a,s,u,r,h,R]),n({ref:p,placerProps:Re(Re({},t),{},{placement:A||r2(a),maxHeight:b})})},Rre=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Ee("div",Ce({},Rt(t,"menu",{menu:!0}),{ref:r},i),n)},Ore=Rre,Nre=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Re({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},Mre=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,a=t.isMulti;return Ee("div",Ce({},Rt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":a}),{ref:i},r),n)},o2=function(t,n){var r=t.theme,i=r.spacing.baseUnit,a=r.colors;return Re({textAlign:"center"},n?{}:{color:a.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},Dre=o2,Pre=o2,zre=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,a=zi(t,_re);return Ee("div",Ce({},Rt(Re(Re({},a),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},jre=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,a=zi(t,Ere);return Ee("div",Ce({},Rt(Re(Re({},a),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},Ire=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},Lre=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,a=t.innerProps,s=t.menuPlacement,u=t.menuPosition,f=C.useRef(null),d=C.useRef(null),h=C.useState(r2(s)),p=Pi(h,2),g=p[0],y=p[1],b=C.useMemo(function(){return{setPortalPlacement:y}},[]),x=C.useState(null),E=Pi(x,2),S=E[0],A=E[1],k=C.useCallback(function(){if(i){var P=gre(i),F=u==="fixed"?0:window.pageYOffset,V=P[g]+F;(V!==S?.offset||P.left!==S?.rect.left||P.width!==S?.rect.width)&&A({offset:V,rect:P})}},[i,u,g,S?.offset,S?.rect.left,S?.rect.width]);Lv(function(){k()},[k]);var R=C.useCallback(function(){typeof d.current=="function"&&(d.current(),d.current=null),i&&f.current&&(d.current=kk(i,f.current,k,{elementResize:"ResizeObserver"in window}))},[i,k]);Lv(function(){R()},[R]);var N=C.useCallback(function(P){f.current=P,R()},[R]);if(!n&&u!=="fixed"||!S)return null;var D=Ee("div",Ce({ref:N},Rt(Re(Re({},t),{},{offset:S.offset,position:u,rect:S.rect}),"menuPortal",{"menu-portal":!0}),a),r);return Ee(i2.Provider,{value:b},n?Zl.createPortal(D,n):D)},Fre=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Bre=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,a=t.isRtl;return Ee("div",Ce({},Rt(t,"container",{"--is-disabled":i,"--is-rtl":a}),r),n)},$re=function(t,n){var r=t.theme.spacing,i=t.isMulti,a=t.hasValue,s=t.selectProps.controlShouldRenderValue;return Re({alignItems:"center",display:i&&a&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Hre=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,a=t.hasValue;return Ee("div",Ce({},Rt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":a}),r),n)},Vre=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ure=function(t){var n=t.children,r=t.innerProps;return Ee("div",Ce({},Rt(t,"indicatorsContainer",{indicators:!0}),r),n)},a2,qre=["size"],Yre=["innerProps","isRtl","size"],Gre={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},s2=function(t){var n=t.size,r=zi(t,qre);return Ee("svg",Ce({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Gre},r))},Fv=function(t){return Ee(s2,Ce({size:20},t),Ee("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},l2=function(t){return Ee(s2,Ce({size:20},t),Ee("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},u2=function(t,n){var r=t.isFocused,i=t.theme,a=i.spacing.baseUnit,s=i.colors;return Re({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2,":hover":{color:r?s.neutral80:s.neutral40}})},Xre=u2,Wre=function(t){var n=t.children,r=t.innerProps;return Ee("div",Ce({},Rt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Ee(l2,null))},Kre=u2,Zre=function(t){var n=t.children,r=t.innerProps;return Ee("div",Ce({},Rt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Ee(Fv,null))},Qre=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing.baseUnit,s=i.colors;return Re({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:a*2,marginTop:a*2})},Jre=function(t){var n=t.innerProps;return Ee("span",Ce({},n,Rt(t,"indicatorSeparator",{"indicator-separator":!0})))},eie=yh(a2||(a2=ure([`
|
797
797
|
0%, 80%, 100% { opacity: 0; }
|
798
798
|
40% { opacity: 1; }
|
799
|
-
`]))),tie=function(t,n){var r=t.isFocused,i=t.size,a=t.theme,s=a.colors,u=a.spacing.baseUnit;return Re({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:u*2})},Bv=function(t){var n=t.delay,r=t.offset;return Ee("span",{css:fv({animation:"".concat(eie," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nie=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,a=i===void 0?4:i,s=zi(t,Yre);return Ee("div",Ce({},Rt(Re(Re({},s),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ee(Bv,{delay:0,offset:r}),Ee(Bv,{delay:160,offset:!0}),Ee(Bv,{delay:320,offset:!r}))},rie=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.theme,s=a.colors,u=a.borderRadius,f=a.spacing;return Re({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:f.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},iie=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.innerRef,s=t.innerProps,u=t.menuIsOpen;return Ee("div",Ce({ref:a},Rt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":u}),s,{"aria-disabled":r||void 0}),n)},oie=iie,aie=["data"],sie=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},lie=function(t){var n=t.children,r=t.cx,i=t.getStyles,a=t.getClassNames,s=t.Heading,u=t.headingProps,f=t.innerProps,d=t.label,h=t.theme,p=t.selectProps;return Ee("div",Ce({},Rt(t,"group",{group:!0}),f),Ee(s,Ce({},u,{selectProps:p,theme:h,getStyles:i,getClassNames:a,cx:r}),d),Ee("div",null,n))},uie=function(t,n){var r=t.theme,i=r.colors,a=r.spacing;return Re({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},cie=function(t){var n=QN(t);n.data;var r=zi(n,aie);return Ee("div",Ce({},Rt(t,"groupHeading",{"group-heading":!0}),r))},fie=lie,die=["innerRef","isDisabled","isHidden","inputClassName"],hie=function(t,n){var r=t.isDisabled,i=t.value,a=t.theme,s=a.spacing,u=a.colors;return Re(Re({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},pie),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:u.neutral80})},c2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pie={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},c2)},mie=function(t){return Re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},c2)},gie=function(t){var n=t.cx,r=t.value,i=QN(t),a=i.innerRef,s=i.isDisabled,u=i.isHidden,f=i.inputClassName,d=zi(i,die);return Ee("div",Ce({},Rt(t,"input",{"input-container":!0}),{"data-value":r||""}),Ee("input",Ce({className:n({input:!0},f),ref:a,style:mie(u),disabled:s},d)))},yie=gie,vie=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors;return Re({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:a/2,margin:i.baseUnit/2})},bie=function(t,n){var r=t.theme,i=r.borderRadius,a=r.colors,s=t.cropWithEllipsis;return Re({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},xie=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors,u=t.isFocused;return Re({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:u?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},f2=function(t){var n=t.children,r=t.innerProps;return Ee("div",r,n)},wie=f2,Sie=f2;function _ie(e){var t=e.children,n=e.innerProps;return Ee("div",Ce({role:"button"},n),t||Ee(Fv,{size:14}))}var Eie=function(t){var n=t.children,r=t.components,i=t.data,a=t.innerProps,s=t.isDisabled,u=t.removeProps,f=t.selectProps,d=r.Container,h=r.Label,p=r.Remove;return Ee(d,{data:i,innerProps:Re(Re({},Rt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),a),selectProps:f},Ee(h,{data:i,innerProps:Re({},Rt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:f},n),Ee(p,{data:i,innerProps:Re(Re({},Rt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},u),selectProps:f}))},Cie=Eie,kie=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,s=t.theme,u=s.spacing,f=s.colors;return Re({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?f.primary:i?f.primary25:"transparent",color:r?f.neutral20:a?f.neutral0:"inherit",padding:"".concat(u.baseUnit*2,"px ").concat(u.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?f.primary:f.primary50}})},Aie=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.isSelected,s=t.innerRef,u=t.innerProps;return Ee("div",Ce({},Rt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":a}),{ref:s,"aria-disabled":r},u),n)},Tie=Aie,Rie=function(t,n){var r=t.theme,i=r.spacing,a=r.colors;return Re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Oie=function(t){var n=t.children,r=t.innerProps;return Ee("div",Ce({},Rt(t,"placeholder",{placeholder:!0}),r),n)},Nie=Oie,Mie=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing,s=i.colors;return Re({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Die=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ee("div",Ce({},Rt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},Pie=Die,zie={ClearIndicator:Zre,Control:oie,DropdownIndicator:Wre,DownChevron:l2,CrossIcon:Fv,Group:fie,GroupHeading:cie,IndicatorsContainer:Ure,IndicatorSeparator:Jre,Input:yie,LoadingIndicator:nie,Menu:Ore,MenuList:Mre,MenuPortal:Lre,LoadingMessage:jre,NoOptionsMessage:zre,MultiValue:Cie,MultiValueContainer:wie,MultiValueLabel:Sie,MultiValueRemove:_ie,Option:Tie,Placeholder:Nie,SelectContainer:Bre,SingleValue:Pie,ValueContainer:Hre},jie=function(t){return Re(Re({},zie),t.components)},d2=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Iie(e,t){return!!(e===t||d2(e)&&d2(t))}function Lie(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Iie(e[n],t[n]))return!1;return!0}function Fie(e,t){t===void 0&&(t=Lie);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}for(var Bie={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},$ie=function(t){return Ee("span",Ce({css:Bie},t))},h2=$ie,Hie={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,a=t.context,s=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,a=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,a=t.label,s=a===void 0?"":a,u=t.selectValue,f=t.isDisabled,d=t.isSelected,h=t.isAppleDevice,p=function(x,E){return x&&x.length?"".concat(x.indexOf(E)+1," of ").concat(x.length):""};if(n==="value"&&u)return"value ".concat(s," focused, ").concat(p(u,r),".");if(n==="menu"&&h){var g=f?" disabled":"",y="".concat(d?" selected":"").concat(g);return"".concat(s).concat(y,", ").concat(p(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Vie=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,s=t.isFocused,u=t.selectValue,f=t.selectProps,d=t.id,h=t.isAppleDevice,p=f.ariaLiveMessages,g=f.getOptionLabel,y=f.inputValue,b=f.isMulti,x=f.isOptionDisabled,E=f.isSearchable,S=f.menuIsOpen,A=f.options,k=f.screenReaderStatus,R=f.tabSelectsValue,N=f.isLoading,D=f["aria-label"],P=f["aria-live"],F=C.useMemo(function(){return Re(Re({},Hie),p||{})},[p]),V=C.useMemo(function(){var U="";if(n&&F.onChange){var z=n.option,B=n.options,q=n.removedValue,Y=n.removedValues,O=n.value,W=function(he){return Array.isArray(he)?null:he},Z=q||z||W(O),I=Z?g(Z):"",ie=B||Y||void 0,fe=ie?ie.map(g):[],re=Re({isDisabled:Z&&x(Z,u),label:I,labels:fe},n);U=F.onChange(re)}return U},[n,F,x,u,g]),T=C.useMemo(function(){var U="",z=r||i,B=!!(r&&u&&u.includes(r));if(z&&F.onFocus){var q={focused:z,label:g(z),isDisabled:x(z,u),isSelected:B,options:a,context:z===r?"menu":"value",selectValue:u,isAppleDevice:h};U=F.onFocus(q)}return U},[r,i,g,x,F,a,u,h]),$=C.useMemo(function(){var U="";if(S&&A.length&&!N&&F.onFilter){var z=k({count:a.length});U=F.onFilter({inputValue:y,resultsMessage:z})}return U},[a,y,S,F,A,k,N]),H=n?.action==="initial-input-focus",G=C.useMemo(function(){var U="";if(F.guidance){var z=i?"value":S?"menu":"input";U=F.guidance({"aria-label":D,context:z,isDisabled:r&&x(r,u),isMulti:b,isSearchable:E,tabSelectsValue:R,isInitialFocus:H})}return U},[D,r,i,b,x,E,S,F,u,R,H]),j=Ee(C.Fragment,null,Ee("span",{id:"aria-selection"},V),Ee("span",{id:"aria-focused"},T),Ee("span",{id:"aria-results"},$),Ee("span",{id:"aria-guidance"},G));return Ee(C.Fragment,null,Ee(h2,{id:d},H&&j),Ee(h2,{"aria-live":P,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!H&&j))},Uie=Vie,$v=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],qie=new RegExp("["+$v.map(function(e){return e.letters}).join("")+"]","g"),p2={},Hv=0;Hv<$v.length;Hv++)for(var Vv=$v[Hv],Uv=0;Uv<Vv.letters.length;Uv++)p2[Vv.letters[Uv]]=Vv.base;var m2=function(t){return t.replace(qie,function(n){return p2[n]})},Yie=Fie(m2),g2=function(t){return t.replace(/^\s+|\s+$/g,"")},Gie=function(t){return"".concat(t.label," ").concat(t.value)},Xie=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Re({ignoreCase:!0,ignoreAccents:!0,stringify:Gie,trim:!0,matchFrom:"any"},t),a=i.ignoreCase,s=i.ignoreAccents,u=i.stringify,f=i.trim,d=i.matchFrom,h=f?g2(r):r,p=f?g2(u(n)):u(n);return a&&(h=h.toLowerCase(),p=p.toLowerCase()),s&&(h=Yie(h),p=m2(p)),d==="start"?p.substr(0,h.length)===h:p.indexOf(h)>-1}},Wie=["innerRef"];function Kie(e){var t=e.innerRef,n=zi(e,Wie),r=Sre(n,"onExited","in","enter","exit","appear");return Ee("input",Ce({ref:t},r,{css:fv({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Zie=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Qie(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,s=C.useRef(!1),u=C.useRef(!1),f=C.useRef(0),d=C.useRef(null),h=C.useCallback(function(E,S){if(d.current!==null){var A=d.current,k=A.scrollTop,R=A.scrollHeight,N=A.clientHeight,D=d.current,P=S>0,F=R-N-k,V=!1;F>S&&s.current&&(r&&r(E),s.current=!1),P&&u.current&&(a&&a(E),u.current=!1),P&&S>F?(n&&!s.current&&n(E),D.scrollTop=R,V=!0,s.current=!0):!P&&-S>k&&(i&&!u.current&&i(E),D.scrollTop=0,V=!0,u.current=!0),V&&Zie(E)}},[n,r,i,a]),p=C.useCallback(function(E){h(E,E.deltaY)},[h]),g=C.useCallback(function(E){f.current=E.changedTouches[0].clientY},[]),y=C.useCallback(function(E){var S=f.current-E.changedTouches[0].clientY;h(E,S)},[h]),b=C.useCallback(function(E){if(E){var S=bre?{passive:!1}:!1;E.addEventListener("wheel",p,S),E.addEventListener("touchstart",g,S),E.addEventListener("touchmove",y,S)}},[y,g,p]),x=C.useCallback(function(E){E&&(E.removeEventListener("wheel",p,!1),E.removeEventListener("touchstart",g,!1),E.removeEventListener("touchmove",y,!1))},[y,g,p]);return C.useEffect(function(){if(t){var E=d.current;return b(E),function(){x(E)}}},[t,b,x]),function(E){d.current=E}}var y2=["boxSizing","height","overflow","paddingRight","position"],v2={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function b2(e){e.cancelable&&e.preventDefault()}function x2(e){e.stopPropagation()}function w2(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function S2(){return"ontouchstart"in window||navigator.maxTouchPoints}var _2=!!(typeof window<"u"&&window.document&&window.document.createElement),Ku=0,qs={capture:!1,passive:!1};function Jie(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),a=C.useRef(null),s=C.useCallback(function(f){if(_2){var d=document.body,h=d&&d.style;if(r&&y2.forEach(function(b){var x=h&&h[b];i.current[b]=x}),r&&Ku<1){var p=parseInt(i.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,y=window.innerWidth-g+p||0;Object.keys(v2).forEach(function(b){var x=v2[b];h&&(h[b]=x)}),h&&(h.paddingRight="".concat(y,"px"))}d&&S2()&&(d.addEventListener("touchmove",b2,qs),f&&(f.addEventListener("touchstart",w2,qs),f.addEventListener("touchmove",x2,qs))),Ku+=1}},[r]),u=C.useCallback(function(f){if(_2){var d=document.body,h=d&&d.style;Ku=Math.max(Ku-1,0),r&&Ku<1&&y2.forEach(function(p){var g=i.current[p];h&&(h[p]=g)}),d&&S2()&&(d.removeEventListener("touchmove",b2,qs),f&&(f.removeEventListener("touchstart",w2,qs),f.removeEventListener("touchmove",x2,qs)))}},[r]);return C.useEffect(function(){if(t){var f=a.current;return s(f),function(){u(f)}}},[t,s,u]),function(f){a.current=f}}var eoe=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},toe={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function noe(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,s=e.onBottomLeave,u=e.onTopArrive,f=e.onTopLeave,d=Qie({isEnabled:i,onBottomArrive:a,onBottomLeave:s,onTopArrive:u,onTopLeave:f}),h=Jie({isEnabled:n}),p=function(y){d(y),h(y)};return Ee(C.Fragment,null,n&&Ee("div",{onClick:eoe,css:toe}),t(p))}var roe={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ioe=function(t){var n=t.name,r=t.onFocus;return Ee("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:roe,value:"",onChange:function(){}})},ooe=ioe;function qv(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function aoe(){return qv(/^iPhone/i)}function E2(){return qv(/^Mac/i)}function soe(){return qv(/^iPad/i)||E2()&&navigator.maxTouchPoints>1}function loe(){return aoe()||soe()}function uoe(){return E2()||loe()}var coe=function(t){return t.label},foe=function(t){return t.label},doe=function(t){return t.value},hoe=function(t){return!!t.isDisabled},poe={clearIndicator:Kre,container:Fre,control:rie,dropdownIndicator:Xre,group:sie,groupHeading:uie,indicatorsContainer:Vre,indicatorSeparator:Qre,input:hie,loadingIndicator:tie,loadingMessage:Pre,menu:Are,menuList:Nre,menuPortal:Ire,multiValue:vie,multiValueLabel:bie,multiValueRemove:xie,noOptionsMessage:Dre,option:kie,placeholder:Rie,singleValue:Mie,valueContainer:$re},moe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},goe=4,C2=4,yoe=38,voe=C2*2,boe={baseUnit:C2,controlHeight:yoe,menuGutter:voe},Yv={borderRadius:goe,colors:moe,spacing:boe},xoe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:t2(),captureMenuScroll:!t2(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Xie(),formatGroupLabel:coe,getOptionLabel:foe,getOptionValue:doe,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:hoe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!yre(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function k2(e,t,n,r){var i=N2(e,t,n),a=M2(e,t,n),s=O2(e,t),u=$h(e,t);return{type:"option",data:t,isDisabled:i,isSelected:a,label:s,value:u,index:r}}function Bh(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,u){return k2(e,s,t,u)}).filter(function(s){return R2(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=k2(e,n,t,r);return R2(e,a)?a:void 0}).filter(xre)}function A2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Iv(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function T2(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Iv(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function woe(e,t){return A2(Bh(e,t))}function R2(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,a=t.isSelected,s=t.label,u=t.value;return(!P2(e)||!a)&&D2(e,{label:s,value:u,data:i},r)}function Soe(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var a=t.indexOf(n);if(a>-1)return n;if(i<t.length)return t[i]}return null}function _oe(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Gv=function(t,n){var r,i=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return i||null},O2=function(t,n){return t.getOptionLabel(n)},$h=function(t,n){return t.getOptionValue(n)};function N2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function M2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=$h(e,t);return n.some(function(i){return $h(e,i)===r})}function D2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var P2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Eoe=1,z2=function(e){rre(n,e);var t=ore(n);function n(r){var i;if(tre(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=uoe(),i.controlRef=null,i.getControlRef=function(f){i.controlRef=f},i.focusedOptionRef=null,i.getFocusedOptionRef=function(f){i.focusedOptionRef=f},i.menuListRef=null,i.getMenuListRef=function(f){i.menuListRef=f},i.inputRef=null,i.getInputRef=function(f){i.inputRef=f},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(f,d){var h=i.props,p=h.onChange,g=h.name;d.name=g,i.ariaOnChange(f,d),p(f,d)},i.setValue=function(f,d,h){var p=i.props,g=p.closeMenuOnSelect,y=p.isMulti,b=p.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:b}),g&&(i.setState({inputIsHiddenAfterUpdate:!y}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(f,{action:d,option:h})},i.selectOption=function(f){var d=i.props,h=d.blurInputOnSelect,p=d.isMulti,g=d.name,y=i.state.selectValue,b=p&&i.isOptionSelected(f,y),x=i.isOptionDisabled(f,y);if(b){var E=i.getOptionValue(f);i.setValue(y.filter(function(S){return i.getOptionValue(S)!==E}),"deselect-option",f)}else if(!x)p?i.setValue([].concat(Iv(y),[f]),"select-option",f):i.setValue(f,"select-option");else{i.ariaOnChange(f,{action:"select-option",option:f,name:g});return}h&&i.blurInput()},i.removeValue=function(f){var d=i.props.isMulti,h=i.state.selectValue,p=i.getOptionValue(f),g=h.filter(function(b){return i.getOptionValue(b)!==p}),y=Fh(d,g,g[0]||null);i.onChange(y,{action:"remove-value",removedValue:f}),i.focusInput()},i.clearValue=function(){var f=i.state.selectValue;i.onChange(Fh(i.props.isMulti,[],null),{action:"clear",removedValues:f})},i.popValue=function(){var f=i.props.isMulti,d=i.state.selectValue,h=d[d.length-1],p=d.slice(0,d.length-1),g=Fh(f,p,p[0]||null);h&&i.onChange(g,{action:"pop-value",removedValue:h})},i.getFocusedOptionId=function(f){return Gv(i.state.focusableOptionsWithIds,f)},i.getFocusableOptionsWithIds=function(){return T2(Bh(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var f=arguments.length,d=new Array(f),h=0;h<f;h++)d[h]=arguments[h];return dre.apply(void 0,[i.props.classNamePrefix].concat(d))},i.getOptionLabel=function(f){return O2(i.props,f)},i.getOptionValue=function(f){return $h(i.props,f)},i.getStyles=function(f,d){var h=i.props.unstyled,p=poe[f](d,h);p.boxSizing="border-box";var g=i.props.styles[f];return g?g(p,d):p},i.getClassNames=function(f,d){var h,p;return(h=(p=i.props.classNames)[f])===null||h===void 0?void 0:h.call(p,d)},i.getElementId=function(f){return"".concat(i.state.instancePrefix,"-").concat(f)},i.getComponents=function(){return jie(i.props)},i.buildCategorizedOptions=function(){return Bh(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return A2(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(f,d){i.setState({ariaSelection:Re({value:f},d)})},i.onMenuMouseDown=function(f){f.button===0&&(f.stopPropagation(),f.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(f){i.blockOptionHover=!1},i.onControlMouseDown=function(f){if(!f.defaultPrevented){var d=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&i.onMenuClose():d&&i.openMenu("first"):(d&&(i.openAfterFocus=!0),i.focusInput()),f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&f.preventDefault()}},i.onDropdownIndicatorMouseDown=function(f){if(!(f&&f.type==="mousedown"&&f.button!==0)&&!i.props.isDisabled){var d=i.props,h=d.isMulti,p=d.menuIsOpen;i.focusInput(),p?(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()):i.openMenu("first"),f.preventDefault()}},i.onClearIndicatorMouseDown=function(f){f&&f.type==="mousedown"&&f.button!==0||(i.clearValue(),f.preventDefault(),i.openAfterFocus=!1,f.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(f){typeof i.props.closeMenuOnScroll=="boolean"?f.target instanceof HTMLElement&&zh(f.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(f)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(f){var d=f.touches,h=d&&d.item(0);h&&(i.initialTouchX=h.clientX,i.initialTouchY=h.clientY,i.userIsDragging=!1)},i.onTouchMove=function(f){var d=f.touches,h=d&&d.item(0);if(h){var p=Math.abs(h.clientX-i.initialTouchX),g=Math.abs(h.clientY-i.initialTouchY),y=5;i.userIsDragging=p>y||g>y}},i.onTouchEnd=function(f){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(f.target)&&i.menuListRef&&!i.menuListRef.contains(f.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(f){i.userIsDragging||i.onControlMouseDown(f)},i.onClearIndicatorTouchEnd=function(f){i.userIsDragging||i.onClearIndicatorMouseDown(f)},i.onDropdownIndicatorTouchEnd=function(f){i.userIsDragging||i.onDropdownIndicatorMouseDown(f)},i.handleInputChange=function(f){var d=i.props.inputValue,h=f.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(h,{action:"input-change",prevInputValue:d}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(f){i.props.onFocus&&i.props.onFocus(f),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(f){var d=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(f),i.onInputChange("",{action:"input-blur",prevInputValue:d}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(f){if(!(i.blockOptionHover||i.state.focusedOption===f)){var d=i.getFocusableOptions(),h=d.indexOf(f);i.setState({focusedOption:f,focusedOptionId:h>-1?i.getFocusedOptionId(f):null})}},i.shouldHideSelectedOptions=function(){return P2(i.props)},i.onValueInputFocus=function(f){f.preventDefault(),f.stopPropagation(),i.focus()},i.onKeyDown=function(f){var d=i.props,h=d.isMulti,p=d.backspaceRemovesValue,g=d.escapeClearsValue,y=d.inputValue,b=d.isClearable,x=d.isDisabled,E=d.menuIsOpen,S=d.onKeyDown,A=d.tabSelectsValue,k=d.openMenuOnFocus,R=i.state,N=R.focusedOption,D=R.focusedValue,P=R.selectValue;if(!x&&!(typeof S=="function"&&(S(f),f.defaultPrevented))){switch(i.blockOptionHover=!0,f.key){case"ArrowLeft":if(!h||y)return;i.focusValue("previous");break;case"ArrowRight":if(!h||y)return;i.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(D)i.removeValue(D);else{if(!p)return;h?i.popValue():b&&i.clearValue()}break;case"Tab":if(i.isComposing||f.shiftKey||!E||!A||!N||k&&i.isOptionSelected(N,P))return;i.selectOption(N);break;case"Enter":if(f.keyCode===229)break;if(E){if(!N||i.isComposing)return;i.selectOption(N);break}return;case"Escape":E?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:y}),i.onMenuClose()):b&&g&&i.clearValue();break;case" ":if(y)return;if(!E){i.openMenu("first");break}if(!N)return;i.selectOption(N);break;case"ArrowUp":E?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":E?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!E)return;i.focusOption("pageup");break;case"PageDown":if(!E)return;i.focusOption("pagedown");break;case"Home":if(!E)return;i.focusOption("first");break;case"End":if(!E)return;i.focusOption("last");break;default:return}f.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++Eoe),i.state.selectValue=ZN(r.value),r.menuIsOpen&&i.state.selectValue.length){var a=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),u=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=a,i.state.focusedOption=s[u],i.state.focusedOptionId=Gv(a,s[u])}return i}return nre(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&e2(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isDisabled,u=a.menuIsOpen,f=this.state.isFocused;(f&&!s&&i.isDisabled||f&&u&&!i.menuIsOpen)&&this.focusInput(),f&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!f&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(e2(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,a){this.props.onInputChange(i,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var a=this,s=this.state,u=s.selectValue,f=s.isFocused,d=this.buildFocusableOptions(),h=i==="first"?0:d.length-1;if(!this.props.isMulti){var p=d.indexOf(u[0]);p>-1&&(h=p)}this.scrollToFocusedOptionOnUpdate=!(f&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:d[h],focusedOptionId:this.getFocusedOptionId(d[h])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(i){var a=this.state,s=a.selectValue,u=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var f=s.indexOf(u);u||(f=-1);var d=s.length-1,h=-1;if(s.length){switch(i){case"previous":f===0?h=0:f===-1?h=d:h=f-1;break;case"next":f>-1&&f<d&&(h=f+1);break}this.setState({inputIsHidden:h!==-1,focusedValue:s[h]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,s=this.state.focusedOption,u=this.getFocusableOptions();if(u.length){var f=0,d=u.indexOf(s);s||(d=-1),i==="up"?f=d>0?d-1:u.length-1:i==="down"?f=(d+1)%u.length:i==="pageup"?(f=d-a,f<0&&(f=0)):i==="pagedown"?(f=d+a,f>u.length-1&&(f=u.length-1)):i==="last"&&(f=u.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:u[f],focusedValue:null,focusedOptionId:this.getFocusedOptionId(u[f])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Yv):Re(Re({},Yv),this.props.theme):Yv}},{key:"getCommonProps",value:function(){var i=this.clearValue,a=this.cx,s=this.getStyles,u=this.getClassNames,f=this.getValue,d=this.selectOption,h=this.setValue,p=this.props,g=p.isMulti,y=p.isRtl,b=p.options,x=this.hasValue();return{clearValue:i,cx:a,getStyles:s,getClassNames:u,getValue:f,hasValue:x,isMulti:g,isRtl:y,options:b,selectOption:d,selectProps:p,setValue:h,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,a=i.isClearable,s=i.isMulti;return a===void 0?s:a}},{key:"isOptionDisabled",value:function(i,a){return N2(this.props,i,a)}},{key:"isOptionSelected",value:function(i,a){return M2(this.props,i,a)}},{key:"filterOption",value:function(i,a){return D2(this.props,i,a)}},{key:"formatOptionLabel",value:function(i,a){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,u=this.state.selectValue;return this.props.formatOptionLabel(i,{context:a,inputValue:s,selectValue:u})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,a=i.isDisabled,s=i.isSearchable,u=i.inputId,f=i.inputValue,d=i.tabIndex,h=i.form,p=i.menuIsOpen,g=i.required,y=this.getComponents(),b=y.Input,x=this.state,E=x.inputIsHidden,S=x.ariaSelection,A=this.commonProps,k=u||this.getElementId("input"),R=Re(Re(Re({"aria-autocomplete":"list","aria-expanded":p,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},p&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?S?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?C.createElement(b,Ce({},A,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:k,innerRef:this.getInputRef,isDisabled:a,isHidden:E,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:d,form:h,type:"text",value:f},R)):C.createElement(Kie,Ce({id:k,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ph,onFocus:this.onInputFocus,disabled:a,tabIndex:d,inputMode:"none",form:h,value:""},R))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,a=this.getComponents(),s=a.MultiValue,u=a.MultiValueContainer,f=a.MultiValueLabel,d=a.MultiValueRemove,h=a.SingleValue,p=a.Placeholder,g=this.commonProps,y=this.props,b=y.controlShouldRenderValue,x=y.isDisabled,E=y.isMulti,S=y.inputValue,A=y.placeholder,k=this.state,R=k.selectValue,N=k.focusedValue,D=k.isFocused;if(!this.hasValue()||!b)return S?null:C.createElement(p,Ce({},g,{key:"placeholder",isDisabled:x,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),A);if(E)return R.map(function(F,V){var T=F===N,$="".concat(i.getOptionLabel(F),"-").concat(i.getOptionValue(F));return C.createElement(s,Ce({},g,{components:{Container:u,Label:f,Remove:d},isFocused:T,isDisabled:x,key:$,index:V,removeProps:{onClick:function(){return i.removeValue(F)},onTouchEnd:function(){return i.removeValue(F)},onMouseDown:function(G){G.preventDefault()}},data:F}),i.formatOptionLabel(F,"value"))});if(S)return null;var P=R[0];return C.createElement(h,Ce({},g,{data:P,isDisabled:x}),this.formatOptionLabel(P,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),a=i.ClearIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,d=u.isLoading,h=this.state.isFocused;if(!this.isClearable()||!a||f||!this.hasValue()||d)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:p,isFocused:h}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),a=i.LoadingIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,d=u.isLoading,h=this.state.isFocused;if(!a||!d)return null;var p={"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:p,isDisabled:f,isFocused:h}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator,s=i.IndicatorSeparator;if(!a||!s)return null;var u=this.commonProps,f=this.props.isDisabled,d=this.state.isFocused;return C.createElement(s,Ce({},u,{isDisabled:f,isFocused:d}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator;if(!a)return null;var s=this.commonProps,u=this.props.isDisabled,f=this.state.isFocused,d={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:d,isDisabled:u,isFocused:f}))}},{key:"renderMenu",value:function(){var i=this,a=this.getComponents(),s=a.Group,u=a.GroupHeading,f=a.Menu,d=a.MenuList,h=a.MenuPortal,p=a.LoadingMessage,g=a.NoOptionsMessage,y=a.Option,b=this.commonProps,x=this.state.focusedOption,E=this.props,S=E.captureMenuScroll,A=E.inputValue,k=E.isLoading,R=E.loadingMessage,N=E.minMenuHeight,D=E.maxMenuHeight,P=E.menuIsOpen,F=E.menuPlacement,V=E.menuPosition,T=E.menuPortalTarget,$=E.menuShouldBlockScroll,H=E.menuShouldScrollIntoView,G=E.noOptionsMessage,j=E.onMenuScrollToTop,U=E.onMenuScrollToBottom;if(!P)return null;var z=function(I,ie){var fe=I.type,re=I.data,le=I.isDisabled,he=I.isSelected,ye=I.label,je=I.value,Oe=x===re,be=le?void 0:function(){return i.onOptionHover(re)},Le=le?void 0:function(){return i.selectOption(re)},Ie="".concat(i.getElementId("option"),"-").concat(ie),pt={id:Ie,onClick:Le,onMouseMove:be,onMouseOver:be,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:he};return C.createElement(y,Ce({},b,{innerProps:pt,data:re,isDisabled:le,isSelected:he,key:Ie,label:ye,type:fe,value:je,isFocused:Oe,innerRef:Oe?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(I.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(Z){if(Z.type==="group"){var I=Z.data,ie=Z.options,fe=Z.index,re="".concat(i.getElementId("group"),"-").concat(fe),le="".concat(re,"-heading");return C.createElement(s,Ce({},b,{key:re,data:I,options:ie,Heading:u,headingProps:{id:le,data:Z.data},label:i.formatGroupLabel(Z.data)}),Z.options.map(function(he){return z(he,"".concat(fe,"-").concat(he.index))}))}else if(Z.type==="option")return z(Z,"".concat(Z.index))});else if(k){var q=R({inputValue:A});if(q===null)return null;B=C.createElement(p,b,q)}else{var Y=G({inputValue:A});if(Y===null)return null;B=C.createElement(g,b,Y)}var O={minMenuHeight:N,maxMenuHeight:D,menuPlacement:F,menuPosition:V,menuShouldScrollIntoView:H},W=C.createElement(Tre,Ce({},b,O),function(Z){var I=Z.ref,ie=Z.placerProps,fe=ie.placement,re=ie.maxHeight;return C.createElement(f,Ce({},b,O,{innerRef:I,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:k,placement:fe}),C.createElement(noe,{captureEnabled:S,onTopArrive:j,onBottomArrive:U,lockEnabled:$},function(le){return C.createElement(d,Ce({},b,{innerRef:function(ye){i.getMenuListRef(ye),le(ye)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:i.getElementId("listbox")},isLoading:k,maxHeight:re,focusedOption:x}),B)}))});return T||V==="fixed"?C.createElement(h,Ce({},b,{appendTo:T,controlElement:this.controlRef,menuPlacement:F,menuPosition:V}),W):W}},{key:"renderFormField",value:function(){var i=this,a=this.props,s=a.delimiter,u=a.isDisabled,f=a.isMulti,d=a.name,h=a.required,p=this.state.selectValue;if(h&&!this.hasValue()&&!u)return C.createElement(ooe,{name:d,onFocus:this.onValueInputFocus});if(!(!d||u))if(f)if(s){var g=p.map(function(x){return i.getOptionValue(x)}).join(s);return C.createElement("input",{name:d,type:"hidden",value:g})}else{var y=p.length>0?p.map(function(x,E){return C.createElement("input",{key:"i-".concat(E),name:d,type:"hidden",value:i.getOptionValue(x)})}):C.createElement("input",{name:d,type:"hidden",value:""});return C.createElement("div",null,y)}else{var b=p[0]?this.getOptionValue(p[0]):"";return C.createElement("input",{name:d,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,a=this.state,s=a.ariaSelection,u=a.focusedOption,f=a.focusedValue,d=a.isFocused,h=a.selectValue,p=this.getFocusableOptions();return C.createElement(Uie,Ce({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:u,focusedValue:f,isFocused:d,selectValue:h,focusableOptions:p,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),a=i.Control,s=i.IndicatorsContainer,u=i.SelectContainer,f=i.ValueContainer,d=this.props,h=d.className,p=d.id,g=d.isDisabled,y=d.menuIsOpen,b=this.state.isFocused,x=this.commonProps=this.getCommonProps();return C.createElement(u,Ce({},x,{className:h,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:b}),this.renderLiveRegion(),C.createElement(a,Ce({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:b,menuIsOpen:y}),C.createElement(f,Ce({},x,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),C.createElement(s,Ce({},x,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var s=a.prevProps,u=a.clearFocusValueOnUpdate,f=a.inputIsHiddenAfterUpdate,d=a.ariaSelection,h=a.isFocused,p=a.prevWasFocused,g=a.instancePrefix,y=i.options,b=i.value,x=i.menuIsOpen,E=i.inputValue,S=i.isMulti,A=ZN(b),k={};if(s&&(b!==s.value||y!==s.options||x!==s.menuIsOpen||E!==s.inputValue)){var R=x?woe(i,A):[],N=x?T2(Bh(i,A),"".concat(g,"-option")):[],D=u?Soe(a,A):null,P=_oe(a,R),F=Gv(N,P);k={selectValue:A,focusedOption:P,focusedOptionId:F,focusableOptionsWithIds:N,focusedValue:D,clearFocusValueOnUpdate:!1}}var V=f!=null&&i!==s?{inputIsHidden:f,inputIsHiddenAfterUpdate:void 0}:{},T=d,$=h&&p;return h&&!$&&(T={value:Fh(S,A,A[0]||null),options:A,action:"initial-input-focus"},$=!p),d?.action==="initial-input-focus"&&(T=null),Re(Re(Re({},k),V),{},{prevProps:i,ariaSelection:T,prevWasFocused:$})}}]),n}(C.Component);z2.defaultProps=xoe;var Coe=C.forwardRef(function(e,t){var n=ere(e);return C.createElement(z2,Ce({ref:t},n))}),koe=Coe;const Aoe=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:i})=>{const[a,s]=C.useState(""),[u,f]=C.useState(0),d=y=>{s(y.toLowerCase()),f(0)},h=e.filter(y=>y.label.toLowerCase().includes(a)||y.value.toLowerCase().includes(a));var p;t!==void 0?p=h.slice(u*t,(u+1)*t):p=h;const g={control:y=>({...y,minHeight:void 0})};return _.jsx(koe,{options:p,onInputChange:d,onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:g,classNamePrefix:"styled-select",defaultValue:r,value:r})};function Toe(e){return e===0?0:Math.abs(e)<1e-12?e:Number(e.toPrecision(12))}const j2=({iostore:e,inputconverter:t,parser:n=r=>parseFloat(r)})=>{const r=C.useContext(Xe),{preview:i}=e.valuestore(),a=e.use(),[s,u]=C.useState(t[1](i?.value));C.useEffect(()=>{u(t[1](i?.value))},[i]);const f=y=>{y=n(parseFloat(y.toString()).toString()),isNaN(y)?(y="<NoValue>",u("")):(a.value_options?.min!==void 0&&y<a.value_options.min&&(y=a.value_options.min),a.value_options?.max!==void 0&&y>a.value_options.max&&(y=a.value_options.max),y=Toe(y),u(y.toString()));try{y=t[0](y)}catch{}r.worker?.set_io_value({nid:a.node,ioid:a.id,value:y,set_default:a.render_options.set_default})},d=y=>{f(y.target.value)};let h=a.connected?t[1](i?.value):s;h===void 0&&(h=a.value_options?.min),h===void 0&&(h=a.value_options?.max),h===void 0&&(h=""),h===null&&(h="");let p=null,g=1;return a.value_options?.step!==void 0?g=a.value_options.step:a.value_options?.max!==void 0&&a.value_options?.min!==void 0&&(g=(a.value_options?.max-a.value_options?.min)/1e3),a.value_options?.max!==void 0&&a.value_options?.min!==void 0&&!a.connected&&(p=_.jsx("div",{style:{minWidth:"100px"},className:"SliderContainer",children:_.jsxs(Dne,{className:"SliderRoot",value:[h===void 0?a.value_options?.min:h],min:a.value_options?.min,max:a.value_options?.max,step:g,disabled:a.connected,onValueCommit:y=>{isNaN(y[0])||f(y[0])},onValueChange:y=>{isNaN(y[0])||u(y[0].toString())},onKeyDown:y=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(y.key)&&y.stopPropagation()},children:[_.jsx(Pne,{className:"SliderTrack",children:_.jsx(zne,{className:"SliderRange"})}),_.jsx(jne,{className:"SliderThumb"})]})})),_.jsxs(_.Fragment,{children:[p,_.jsx("input",{type:"text",className:"nodedatainput styledinput numberinput",value:h,onChange:y=>u(y.target.value),onBlur:d,step:g,onKeyDown:y=>{if(!(y.ctrlKey||y.metaKey)){if(y.key==="ArrowUp"){y.shiftKey&&(g*=10);let b=(parseFloat(h)||0)+g;f(b);return}if(y.key==="ArrowDown"){y.shiftKey&&(g*=10);let b=(parseFloat(h)||0)-g;f(b);return}!/^[0-9.eE+-]$/.test(y.key)&&!["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(y.key)&&y.preventDefault()}},disabled:a.connected,min:a.value_options?.min,max:a.value_options?.max})]})},Roe=({iostore:e,inputconverter:t})=>j2({iostore:e,inputconverter:t,parser:parseFloat}),Ooe=({iostore:e,inputconverter:t})=>j2({iostore:e,inputconverter:t,parser:parseInt}),Noe=({iostore:e,inputconverter:t})=>{const n=C.useContext(Xe),{preview:r}=e.valuestore(),i=e.use(),a=r?.value===void 0,s=C.useRef(null);C.useEffect(()=>{s.current&&(s.current.indeterminate=a)},[s,a]);const u=f=>{let d=f.target.checked;try{d=t[0](f.target.checked)}catch{}n.worker?.set_io_value({nid:i.node,ioid:i.id,value:d,set_default:i.render_options.set_default})};return _.jsx("input",{ref:s,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!t[1](r?.value),onChange:u,disabled:i.connected})},I2=({iostore:e,inputconverter:t})=>{const n=C.useContext(Xe),{preview:r,full:i}=e.valuestore(),a=e.use(),s=i===void 0?r?.value:i?.value,[u,f]=C.useState(t[1](s));C.useEffect(()=>{f(t[1](s))},[s]);const d=p=>{let g=p.target.value;g||(g="<NoValue>");try{g=t[0](g)}catch{}n.worker?.set_io_value({nid:a.node,ioid:a.id,value:g,set_default:a.render_options.set_default})};let h=a.connected?t[1](s):u;return h==null&&(h=""),_.jsx("input",{className:"nodedatainput styledinput stringinput",value:h,onChange:p=>f(p.target.value),onBlur:d,disabled:a.connected})},Moe=({iostore:e})=>{const t=C.useContext(Xe),n=e.use(),{preview:r,full:i}=e.valuestore(),a=i===void 0?r?.value:i.value,s=n.value_options?.colorspace||"hex",u=d=>{let h="<NoValue>";d&&(d[s]?h=d[s]():h=d.hex()),d===null&&(h=null);try{h=h}catch{}t.worker?.set_io_value({nid:n.node,ioid:n.id,value:h,set_default:n.render_options.set_default})};let f=!1;return typeof n.type!="string"&&"anyOf"in n.type&&n.type.anyOf!==void 0&&(f=n.type.anyOf.some(d=>d==="None")),_.jsx(Xne,{onChange:u,inicolordata:a,allow_null:f,inicolorspace:s})},Doe=e=>e,Poe=e=>parseFloat(e),zoe=e=>!!e,joe=e=>e==="null"?null:e,Ioe=e=>e==="nuinputconvertermber"?Poe:e==="boolean"?zoe:e==="undefined"?joe:Doe,Hh=({iostore:e,inputconverter:t,parser:n})=>{const r=e.use(),{preview:i,full:a}=e.valuestore(),s=a===void 0?i?.value:a.value;let u=r.value_options?.options||[];Array.isArray(u)&&(u={type:"enum",values:u,keys:u.map(x=>x===null?"None":x.toString()),nullable:!1}),u.type!=="enum"&&(u={type:"enum",values:Object.values(u),keys:Object.keys(u),nullable:!1}),u=u,u.nullable&&!u.values.includes(null)&&!u.keys.includes("None")&&(u.values.unshift(null),u.keys.unshift("None"));const f=[];for(let x=0;x<u.values.length;x++){const E=u.values[x]===null||u.values[x]===void 0?"undefined":typeof u.values[x];let S=u.values[x];S===null&&(S="null"),S===void 0&&(S="undefined"),f.push([u.keys[x],S.toString(),E])}const d=C.useContext(Xe),h=({value:x,datatype:E})=>{let A=(n||Ioe(E))(x);try{A=t[0](x)}catch{}d.worker?.set_io_value({nid:r.node,ioid:r.id,value:A,set_default:r.render_options.set_default})};let p=s;p===null&&(p="null"),p===void 0&&(p="undefined");const g=f.find(x=>x[1]===p.toString());let y;g!==void 0&&(y={value:g[1],label:g[0],datatype:g[2]});const b=f.map(x=>({value:x[1],label:x[0],datatype:x[2]}));return _.jsx(Aoe,{className:"nodedatainput styleddropdown",options:b,defaultValue:y,onChange:x=>{if(x===null){h({value:"<NoValue>",datatype:"string"});return}h(x)}})},Loe={float:Roe,int:Ooe,bool:Noe,string:I2,str:I2,color:Moe,select:Hh,enum:Hh,bytes:((e,t=void 0)=>({iostore:n})=>{const{full:r,preview:i}=n.valuestore(),s=(r===void 0?i:r)?.value||t;return _.jsx(e,{iostore:n,value:s})})(Nv,"")},Foe=({iostore:e,typestring:t})=>{const{InLineRenderer:n}=C.useContext(ji),{preview:r,full:i}=e.valuestore();if(t&&n[t])return _.jsx("div",{children:n[t]({iostore:e})});let a=(JSON.stringify(i||r)||"").replace(/\\n/g,`
|
800
|
-
`);return a.length>63&&(a=a.slice(0,60)+"..."),_.jsx("div",{children:a})},Boe={},Nr=(e,t=void 0)=>({iostore:n})=>{const{full:r,preview:i}=n.valuestore(),s=(r===void 0?i:r)?.value||t;return _.jsx(e,{iostore:n,value:s})},$oe={string:Nr(RN),table:Nr(ON),image:Nr(AN),svg:Nr(TN,""),dict:Nr(Oh,"{}"),bytes:Nr(Nv,"")},Hoe={},L2=e=>({iostore:t,value:n,preValue:r,onLoaded:i})=>_.jsx(e,{iostore:t,value:n,preValue:r,onLoaded:i}),F2=L2(Oh),Mr={Inputrenderer:Loe,Outputrenderer:Boe,HandlePreviewRenderer:Hoe,DataOverlayRenderer:{},DataPreviewViewRenderer:$oe,DataViewRenderer:gne,InLineRenderer:_Z,NodeContextExtenders:{},NodeRenderer:{},NodeHooks:{}},Voe=(e,t)=>{const n=t.options||{},r=n.overwrite===void 0?!0:n.overwrite;switch(t.type){case"EXTEND_INPUT_RENDER":return!r&&e.Inputrenderer[t.payload.type]?e:{...e,Inputrenderer:{...e.Inputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_OUTPUT_RENDER":return!r&&e.Outputrenderer[t.payload.type]?e:{...e,Outputrenderer:{...e.Outputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_HANDLE_PREVIEW_RENDER":return!r&&e.HandlePreviewRenderer[t.payload.type]?e:{...e,HandlePreviewRenderer:{...e.HandlePreviewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_OVERLAY_RENDER":return!r&&e.DataOverlayRenderer[t.payload.type]?e:{...e,DataOverlayRenderer:{...e.DataOverlayRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_PREVIEW_RENDER":return!r&&e.DataPreviewViewRenderer[t.payload.type]?e:{...e,DataPreviewViewRenderer:{...e.DataPreviewViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_VIEW_RENDER":return!r&&e.DataViewRenderer[t.payload.type]?e:{...e,DataViewRenderer:{...e.DataViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_CONTEXT_EXTENDER":return!r&&e.NodeContextExtenders[t.payload.type]?e:{...e,NodeContextExtenders:{...e.NodeContextExtenders,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_RENDERER":return!r&&e.NodeRenderer[t.payload.type]?e:{...e,NodeRenderer:{...e.NodeRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_HOOKS":return!r&&e.NodeHooks[t.payload.type]?e:{...e,NodeHooks:{...e.NodeHooks,[t.payload.type]:t.payload.component}};case"EXTEND_FROM_PLUGIN":let i=!1;const a=[[t.payload.plugin.input_renderers||{},e.Inputrenderer],[t.payload.plugin.output_renderers||{},e.Outputrenderer],[t.payload.plugin.handle_preview_renderers||{},e.HandlePreviewRenderer],[t.payload.plugin.data_overlay_renderers||{},e.DataOverlayRenderer],[t.payload.plugin.data_preview_renderers||{},e.DataPreviewViewRenderer],[t.payload.plugin.data_view_renderers||{},e.DataViewRenderer],[t.payload.plugin.node_context_extenders||{},e.NodeContextExtenders],[t.payload.plugin.node_renderers||{},e.NodeRenderer],[t.payload.plugin.node_hooks||{},e.NodeHooks]];for(const[u,f]of a){if(Object.keys(u).length>0){if(r)i=!0;else for(const d in u)if(!f[d]){i=!0;break}}if(i)break}if(!i)return e;for(const[u,f]of a)for(const d in u)(r||!f[d])&&(f[d]=u[d]);return{...e};default:return e}},Uoe=({children:e,plugins:t,fnrf_zst:n})=>{const[r,i]=C.useReducer(Voe,Mr),a=(x,E,S)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:x,component:E},options:S})},s=(x,E,S)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:x,component:E},options:S})},u=(x,E,S)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:x,component:E},options:S})},f=(x,E,S)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:x,component:E},options:S})},d=(x,E,S)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:x,component:E},options:S})},h=(x,E,S)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:x,component:E},options:S})},p=(x,E,S)=>{i({type:"EXTEND_NODE_CONTEXT_EXTENDER",payload:{type:x,component:E},options:S})},g=(x,E,S)=>{i({type:"EXTEND_NODE_RENDERER",payload:{type:x,component:E},options:S})},y=(x,E,S)=>{i({type:"EXTEND_NODE_HOOKS",payload:{type:x,component:E},options:S})},b=(x,E)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:x},options:E})};return C.useEffect(()=>{for(const x in t){const E=t[x];if(!E)continue;const S=E.renderpluginfactory;S&&b(S({React:tf,fnrf_zst:n,NodeContext:q2}))}},[t]),_.jsx(ji.Provider,{value:{Inputrenderer:r.Inputrenderer,Outputrenderer:r.Outputrenderer,HandlePreviewRenderer:r.HandlePreviewRenderer,DataOverlayRenderer:r.DataOverlayRenderer,DataPreviewViewRenderer:r.DataPreviewViewRenderer,DataViewRenderer:r.DataViewRenderer,InLineRenderer:r.InLineRenderer,NodeContextExtenders:r.NodeContextExtenders,NodeRenderer:r.NodeRenderer,NodeHooks:r.NodeHooks,extendInputRenderMapping:a,extendOutputRenderMapping:s,extendHandlePreviewRenderMapping:u,extendDataOverlayRenderMapping:f,extendDataPreviewRenderMapping:d,extendDataViewRenderMapping:h,extendNodeContextExtender:p,extendNodeRenderer:g,extendNodeHooks:y,extendFromPlugin:b},children:e})},ji=C.createContext({Inputrenderer:Mr.Inputrenderer,Outputrenderer:Mr.Outputrenderer,HandlePreviewRenderer:Mr.HandlePreviewRenderer,DataOverlayRenderer:Mr.DataOverlayRenderer,DataPreviewViewRenderer:Mr.DataPreviewViewRenderer,DataViewRenderer:Mr.DataViewRenderer,InLineRenderer:Mr.InLineRenderer,NodeContextExtenders:Mr.NodeContextExtenders,NodeRenderer:Mr.NodeRenderer,NodeHooks:Mr.NodeHooks,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendNodeContextExtender:(e,t,n)=>{},extendNodeRenderer:(e,t,n)=>{},extendNodeHooks:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),B2=e=>{const t=C.useContext(Xe),{DataOverlayRenderer:n,DataViewRenderer:r}=C.useContext(ji);if(e===void 0)return;const i=t.render_options(),[a]=Ea(e.type,i.typemap||{});return a?n[a]?n[a]:r[a]?L2(r[a]):F2:F2},qoe=e=>{const n=C.useContext(Xe).render_options(),{HandlePreviewRenderer:r,DataPreviewViewRenderer:i}=C.useContext(ji),a=B2(e);let s;if(e){const[u]=Ea(e.type,n.typemap||{});u?r[u]?s=r[u]:i[u]?s=i[u]:s=Nr(Nh):s=Nr(Nh)}return[s,a]},$2=({iostore:e,Component:t})=>{const[n,r]=C.useState(void 0),[i,a]=C.useState(void 0),{full:s}=e.valuestore();C.useEffect(()=>{s===void 0?e.getState().try_get_full_value():a(s.value)},[s]);const u=()=>{i!==void 0&&r(i)};return _.jsx(t,{iostore:e,value:i,preValue:n,onLoaded:u})},H2=({iostore:e,Component:t})=>_.jsx(t,{iostore:e}),Ea=(e,t)=>{if(typeof e=="string")return e in t?[t[e],e]:[e,e];if("allOf"in e&&e.allOf!==void 0)return[void 0,void 0];if("anyOf"in e&&e.anyOf!==void 0){const n=e.anyOf.map(r=>Ea(r,t));for(const r of n)switch(r[0]){case"bool":return["bool",r[1]];case"enum":return["enum",r[1]];case"float":return["float",r[1]];case"int":return["int",r[1]];case"string":return["string",r[1]];case"str":return["string",r[1]]}return[void 0,void 0]}return!("type"in e)||e.type===void 0?[void 0,void 0]:e.type==="enum"?["enum","enum"]:[void 0,void 0]},Xv=({iostore:e,typestring:t,preview:n,...r})=>{const[i,a]=C.useState(!1),[s,u]=C.useState(!1),f=C.useContext(Xe),d=e.use(),[h,p]=qoe(d),g=f.local_state(()=>f.reactflowRef);return _.jsxs(YR,{open:i||s,onOpenChange:u,children:[_.jsx(GR,{asChild:!0,children:_.jsx(Jl,{id:d.id,"data-type":t,...r})}),_.jsx(XR,{container:g,children:_.jsxs(WR,{className:"iotooltipcontent",sideOffset:5,children:[_.jsxs("div",{className:"iotooltip_container",children:[_.jsxs("div",{className:"iotooltip_header",children:[i?_.jsx(K7,{onClick:()=>a(!1)}):_.jsx(W7,{onClick:()=>a(!0)}),p&&_.jsx(vs,{title:d.full_id,trigger:_.jsx(lk,{}),onOpenChange:y=>{y&&d.try_get_full_value&&d.try_get_full_value(),a(y)},children:_.jsx($2,{Component:p,iostore:e})})]}),h?_.jsx(H2,{Component:h,iostore:e}):`no preview available for "${t}"`]}),_.jsx(SZ,{className:"iotooltipcontentarrow"})]})})]})},Vh={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>typeof e=="string"?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch{try{return JSON.parse("["+e+"]")}catch{}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},Yoe=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i,a]=Ea(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=C.useContext(ji),u=i?r.value_options?.options?Hh:s[i]:void 0,f=Vh[(a&&n.inputconverter?.[a])??""]||Vh[""];return r.hidden?null:_.jsxs("div",{className:"nodeinput","data-type":i,children:[_.jsx(Xv,{iostore:e,typestring:i,position:_e.Left,type:"target"}),u&&_.jsx("div",{className:"iovaluefield nodrag","data-type":i,children:_.jsx(u,{iostore:e,inputconverter:f})}),_.jsx("div",{className:"ioname",children:r.name}),_.jsx(Xv,{iostore:e,typestring:i,position:_e.Right,type:"source"})]})},Goe=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i]=Ea(r.type,n.typemap||{}),{Outputrenderer:a}=C.useContext(ji),s=i?a[i]:void 0;return r.hidden?null:_.jsxs("div",{className:"nodeoutput","data-type":i,children:[_.jsx(Xv,{iostore:e,typestring:i,position:_e.Right,type:"source"}),_.jsx("div",{className:"ioname",children:r.name}),s?_.jsx("div",{className:"iovaluefield nodrag",children:_.jsx(s,{iostore:e})}):_.jsx("div",{className:"iovaluefield",children:_.jsx(Foe,{iostore:e,typestring:i})})]})},Xoe=e=>{const t=C.useContext(Xe),n=B2(e),{DataPreviewViewRenderer:r,DataViewRenderer:i}=C.useContext(ji),a=t.render_options();if(e===void 0)return[void 0,n];const[s]=Ea(e.type,a.typemap||{});return s?r[s]?[r[s],n]:i[s]?[Nr(i[s]),n]:[Nr(Nh),n]:[Nr(Nh),n]};function Woe(e,t,n={}){const{maxFontSize:r=100,minFontSize:i=6,decrementFactor:a=.9}=n;if(!e||!t)return;if(a>=1||a<=0)throw new Error("decrementFactor must be between 0 and 1");const s=e.getBoundingClientRect(),u=s.width,f=s.height;let d=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=d+"px";let h=t.getBoundingClientRect();for(;(h.width>u||h.height>f)&&d>i;)d*=a,t.style.fontSize=d+"px",h=t.getBoundingClientRect()}function Koe(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n,unit_scale:r,elapsed:i,unit:a,unit_divisor:s,prefix:u="",rate:f=void 0,postfix:d=null,initial:h=0}=e;t!==null&&n>=t+.5&&(t=null);let p=n,g=t,y=f;r&&r!==!0&&r!==1&&(t!==null&&(g=t*r),p=n*r,f!==void 0&&(y=f*r));const b=V2(i);y===void 0&&i>0&&(y=(p-h)/i);const x=y?1/y:void 0,[E,S]=y?Uh(y,s):[void 0,""],[A,k]=x?Uh(x,1e3):[void 0,""],R=(E||"?")+`${S}${a}/s`,N=A?`${A}${k}s/`+a:"?",D=x&&x>1?N:R,P=r?Uh(p,s).join(""):p.toString(),F=r&&g!==null?Uh(g,s).join(""):g?.toString()??"?",V=y&&g!==null?(g-p)/y:0,T=y?V2(V):"?",$=u?`${u}: `:"";if(t!==null){const H=p/t*100,G=` ${P}/${F} [${b} < ${T}, ${D}${d??""}]`;return`${$}${H.toFixed(0)}%${G}`}return`${$}${P}${a} [${b}, ${D}${d??""}]`}function V2(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function Uh(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const Zoe=({state:e,className:t="reacttqdm",...n})=>{const r=C.useRef(null),i=C.useRef(null);C.useEffect(()=>{const s=()=>{!r.current||!i.current||Woe(r.current,i.current,{maxFontSize:12,decrementFactor:.9})};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]);const a=e.total?e.n/e.total*100:0;return _.jsx("div",{ref:r,className:t,...n,children:_.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[_.jsx("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"},children:_.jsx("div",{className:t+"-progress",style:{width:`${a}%`,height:"100%"}})}),_.jsx("div",{className:t+"-text",ref:i,children:Koe(e)})]})})},Qoe=C.memo(({node_data:e})=>{const t=C.useContext(Xe),n=()=>{t.on_node_action({type:"trigger",from_remote:!1,id:e.id})};return _.jsxs("div",{className:"nodeheader",title:e.description||e.node_name,children:[_.jsxs("div",{className:"nodeheader_element",children:[_.jsx(Q7,{fontSize:"inherit",className:"triggerbutton",onClick:n}),_.jsx(Z7,{fontSize:"inherit",onClick:async()=>{console.log("nodestatus",await t.worker?.get_node_status(e.id))}})]}),_.jsx("div",{className:"nodeheader_element nodeheader_title",children:_.jsx("div",{className:"nodeheader_title_text",children:e.node_name})}),_.jsx("div",{className:"nodeheader_element",children:_.jsx(du,{fontSize:"inherit"})})]})}),Joe=({iostore:e,node_data:t})=>{const n=e.use(),[r,i]=Xoe(n);return _.jsx("div",{className:"nodrag nodedatabody","data-src":t.render_options?.data?.src||"",children:r&&n&&_.jsx(vs,{title:n.full_id,trigger:_.jsx("div",{className:"nodedatabutton",children:_.jsx(H2,{Component:r,iostore:e})}),onOpenChange:a=>{a&&n?.try_get_full_value&&n?.try_get_full_value()},children:i&&_.jsx($2,{Component:i,iostore:e})})})},eae=C.memo(({node_data:e})=>{const t=e.render_options?.data?.src?e.io[e.render_options?.data?.src]:void 0;return _.jsxs("div",{className:"nodebody",children:[e.outputs.map(n=>_.jsx(Goe,{iostore:e.io[n]},n)),t&&_.jsx(Joe,{node_data:e,iostore:t}),e.inputs.map(n=>_.jsx(Yoe,{iostore:e.io[n]},n))]})}),U2=C.memo(({node_data:e})=>{const[t,n]=C.useState(e.name);C.useEffect(()=>{n(e.name)},[e]);const r=C.useContext(Xe),i=s=>{n(s.target.value)},a=s=>{const u=s.target.value;r.on_node_action({type:"update",from_remote:!1,id:e.id,node:{name:u}})};return _.jsx("input",{className:"nodename_input",value:t,onChange:i,onBlur:a})}),tae=({node_data:e})=>{if(!e.progress)return null;const t=e.progress();return _.jsx(Zoe,{state:t,className:"nodeprogress"})},nae=C.memo(({node_data:e})=>_.jsxs("div",{className:"nodefooter",children:[e.error&&_.jsx("div",{className:"nodeerror",children:e.error}),_.jsx(tae,{node_data:e})]})),rae=e=>{const t=C.useContext(Xe),[n,r]=C.useState(!1),i=e.in_trigger(),a=C.useContext(ji),s=a.NodeContextExtenders[e.node_id],u=C.useMemo(()=>s?.({node_data:e})||{},[s,e]),f=C.useMemo(()=>({...u,node_data:e}),[u,e]),d=a.NodeHooks[e.node_id];for(const h of d||[])h({nodecontext:f});return C.useEffect(()=>{t.worker?.call_hooks("node_mounted",e.id)},[t.worker,e.id]),C.useEffect(()=>{let h;return i&&!n?r(!0):n&&(h=setTimeout(()=>r(!1),200)),()=>clearTimeout(h)},[i,n]),{visualTrigger:n,nodecontext:f}},q2=C.createContext(null),iae=({data:e})=>{const t=e.nodestore.use(),n=t.properties["frontend:collapsed"]||!1,{visualTrigger:r,nodecontext:i}=rae(t);return _.jsx(q2.Provider,{value:i,children:_.jsxs("div",{className:"innernode"+(r?" intrigger":"")+(t.error?" error":""),children:[_.jsx(Qoe,{node_data:t}),_.jsx(U2,{node_data:t}),n?null:_.jsx(eae,{node_data:t}),_.jsx(nae,{node_data:t})]})})},oae=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i,a]=Ea(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=C.useContext(ji),u=i?r.value_options?.options?Hh:s[i]:void 0,f=Vh[(a&&n.inputconverter?.[a])??""]||Vh[""];return _.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:r.name}),u&&_.jsx(u,{iostore:e,inputconverter:f}),_.jsx("div",{children:_.jsxs("label",{children:["hidden:",_.jsx("input",{className:"styledcheckbox",type:"checkbox",disabled:r.connected,onChange:d=>{r.set_hidden?.(d.target.checked)},checked:r.hidden})]})})]})},aae=({iostore:e})=>{const t=e.use();return _.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:t.name}),_.jsx("div",{children:_.jsxs("label",{children:["hidden:",_.jsx("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:n=>{t.set_hidden?.(n.target.checked)},checked:t.hidden})]})})]})},sae=({nodestore:e})=>{const t=e.use();return _.jsxs("div",{className:"nodesettings_content",children:[_.jsx("div",{className:"nodesettings_section",children:_.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:"Name"}),_.jsx("div",{children:_.jsx(U2,{node_data:t})})]})}),_.jsxs("div",{className:"nodesettings_section",children:[_.jsx("div",{children:"Inputs"}),t.inputs.map(n=>_.jsx(oae,{iostore:t.io[n]},n))]}),_.jsxs("div",{className:"nodesettings_section",children:[_.jsx("div",{children:"Outputs"}),t.outputs.map(n=>_.jsx(aae,{iostore:t.io[n]},n))]})]})},lae=()=>{const e=C.useContext(Xe),t=e.local_state(r=>r.selected_nodes);if(t.length===0)return _.jsx("div",{children:"Node Settings"});if(t.length>1)return _.jsx("div",{children:"Multiple Nodes Selected"});const n=e.nodespace.get_node(t[0]);return n?_.jsx(sae,{nodestore:n}):_.jsx("div",{children:"Node not found"})},uae=()=>{const e=C.useContext(Xe),t=e.local_settings(i=>i.view_settings.expand_node_props),n=e.local_settings(i=>i.update_view_settings),r=i=>{n({expand_node_props:i})};return _.jsx(IA,{maxSize:"300px",direction:"left",expanded:t===void 0?!1:t,containerClassName:"pos-right pos-top bg1 h-12",className:"nodesettings_content",onExpandChange:r,children:_.jsx(lae,{})})},cae=({id:e,sourceX:t,sourceY:n,targetX:r,targetY:i,sourcePosition:a,targetPosition:s,data:u,...f})=>{const[d]=$m({sourceX:t,sourceY:n,sourcePosition:a,targetX:r,targetY:i,targetPosition:s});return _.jsx(_.Fragment,{children:_.jsx(eu,{id:e,path:d,...f})})},fae=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),dae={default:iae},hae={default:cae},pae=()=>{const e=Ql(),t=C.useContext(Xe);return t.rf_instance=e,_.jsx(_.Fragment,{})},mae=()=>{const e=C.useContext(Xe),t=ns("Delete"),n=wL(),r=bL();if(t){for(const i of n)if(i.selected){if(!e.worker)return _.jsx(_.Fragment,{});if(!i.source||!i.target)return _.jsx(_.Fragment,{});if(!i.sourceHandle||!i.targetHandle)return _.jsx(_.Fragment,{});e.worker.remove_edge({src_nid:i.source,src_ioid:i.sourceHandle,trg_nid:i.target,trg_ioid:i.targetHandle})}for(const i of r)if(i.selected){if(!e.worker)return _.jsx(_.Fragment,{});e.worker.remove_node(i.id)}}return _.jsx(_.Fragment,{})},gae=({id:e,top:t,left:n,right:r,bottom:i,...a})=>{const{getNode:s,setNodes:u,addNodes:f,setEdges:d}=Ql(),h=C.useContext(Xe),p=C.useCallback(()=>{const x=s(e);if(!x)return;const E={x:x.position.x+50,y:x.position.y+50};f({...x,id:`${x.id}-copy`,position:E})},[e,s,f]),g=C.useCallback(()=>{h.on_node_action({type:"delete",id:e,from_remote:!1})},[e,u,d]),y=h.nodespace.get_node(e,!1);if(!y)return _.jsx(_.Fragment,{children:" "});const b=y.use();return _.jsxs("div",{style:{top:t,left:n,right:r,bottom:i},className:"context-menu",...a,children:[_.jsx("p",{style:{fontWeight:"bold"},children:_.jsx("small",{children:b.name})}),_.jsx("button",{onClick:p,children:"duplicate"}),_.jsx("button",{onClick:g,children:"delete"})]})},yae=e=>{const t=C.useContext(Xe),n=C.useRef(null);C.useEffect(()=>{t.reactflowRef=n.current},[n]);const[r,i]=C.useState(null),a=({nodes:g,edges:y})=>{const b=t.local_state.getState();t.local_state.setState({...b,selected_nodes:g.map(x=>x.id),selected_edges:y.map(x=>x.id)})},s=C.useCallback(()=>i(null),[i]),{nodes:u,edges:f,onNodesChange:d,onEdgesChange:h,onConnect:p}=t.useReactFlowStore(dZ(fae));return _.jsx("div",{className:"reactflowlayer",children:_.jsxs(yL,{nodes:u,edges:f,onNodesChange:d,onEdgesChange:h,onConnect:p,nodeTypes:dae,edgeTypes:hae,minZoom:e.minZoom,maxZoom:e.maxZoom,fitView:!0,onSelectionChange:a,ref:n,onPaneClick:s,panOnDrag:!e.static,children:[_.jsx(pae,{}),_.jsx(mae,{}),_.jsx(kL,{color:"#888",gap:16,size:1}),e.minimap&&_.jsx(qL,{nodeStrokeWidth:3,pannable:!e.static,zoomable:!e.static,zoomStep:3}),r&&_.jsx(gae,{onClick:s,...r})]})})},qh=C.createContext(void 0),Ca=C.forwardRef((e,t)=>{const{asChild:n,children:r,className:i,style:a,...s}=e,[u,f]=C.useState(!1),d=C.useRef(null),[h,p]=C.useState(null),[g,y]=C.useState({}),b=e.htime||300,x=e.vtime||300,E=e.hdelay||0,S=e.vdelay||200;C.useImperativeHandle(t,()=>d.current,[]);const A=async()=>{if(!d.current)return;d.current.style.transition="none",d.current.style.position="",d.current.style.top="",d.current.style.left="",d.current.style.width="",d.current.style.height="";const P=d.current.getBoundingClientRect();p([P.left,P.top,P.width,P.height]),d.current.style.transition="none",y({position:"absolute",top:`${P.top}px`,left:`${P.left}px`,width:`${P.width}px`,height:`${P.height}px`}),y(H=>({...H,transitionProperty:"width, left, height, top",transitionDuration:`${b}ms, ${b}ms, ${x}ms, ${x}ms`})),f(!0);const F=new Promise(H=>{setTimeout(()=>{y(G=>({...G,left:"0px",width:"100vw"})),H()},E)}),V=new Promise(H=>{setTimeout(()=>{y(G=>({...G,top:"0px",height:"100vh"})),H()},S)}),T=Math.max(b+E,x+S),$=new Promise(H=>{setTimeout(()=>{H()},T)});await Promise.all([F,V,$])},k=async()=>{if(!d.current||!h)return;const P={transitionProperty:"width, left, height, top",transitionDuration:`${b}ms, ${b}ms, ${x}ms, ${x}ms`};y(z=>({...z,...P}));const[F,V,T,$]=h,H=new Promise(z=>{setTimeout(()=>{y(B=>({...B,left:`${F}px`,width:`${T}px`})),z()},S)}),G=new Promise(z=>{setTimeout(()=>{y(B=>({...B,top:`${V}px`,height:`${$}px`})),z()},E)}),j=Math.max(b+E,x+S),U=new Promise(z=>{setTimeout(()=>{z()},j)});await Promise.all([H,G,U]),d.current.style.transition="",y({}),f(!1)},R=async()=>{d.current&&(u?await k():await A())};let N;if(n&&C.isValidElement(r)){const P=r,F=[P.props.className,i,"smooth-expand",u?"smooth-expand-expanded":""].filter(Boolean).join(" "),V={...P.props.style,...a,...g};N=C.cloneElement(P,{ref:d,className:F,style:V,...s})}else N=_.jsx("div",{ref:d,...s,className:`smooth-expand ${u?"smooth-expand-expanded":""} ${i||""}`,style:{...a,...g},children:r});const D=_.jsx(qh.Provider,{value:{isExpanded:u,toggleExpand:R},children:N});return u?Zl.createPortal(D,document.body):D});Ca.Trigger=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return _.jsx("div",{style:{cursor:"pointer"},onClick:t.toggleExpand,children:e})},Ca.Expanded=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return t.isExpanded?_.jsx(_.Fragment,{children:e}):null},Ca.Collapsed=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return t.isExpanded?null:_.jsx(_.Fragment,{children:e})};const Yh=C.createContext(void 0),Eo=C.forwardRef((e,t)=>{const{asChild:n,children:r,className:i,style:a,...s}=e,u=C.useRef(null);C.useImperativeHandle(t,()=>u.current,[]);const[f,d]=C.useState(!1),h=C.useCallback(async()=>{try{const g=u.current;if(!g)return;if(!f)g.requestFullscreen?await g.requestFullscreen():g.mozRequestFullScreen?await g.mozRequestFullScreen():g.webkitRequestFullscreen?await g.webkitRequestFullscreen():g.msRequestFullscreen&&await g.msRequestFullscreen(),d(!0);else{const y=document;y.exitFullscreen?await y.exitFullscreen():y.mozCancelFullScreen?await y.mozCancelFullScreen():y.webkitExitFullscreen?await y.webkitExitFullscreen():y.msExitFullscreen&&await y.msExitFullscreen(),d(!1)}}catch(g){console.error("Error toggling fullscreen",g)}},[f]);C.useEffect(()=>{const g=()=>{const y=document.fullscreenElement;d(!!y)};return document.addEventListener("fullscreenchange",g),document.addEventListener("webkitfullscreenchange",g),document.addEventListener("mozfullscreenchange",g),document.addEventListener("MSFullscreenChange",g),()=>{document.removeEventListener("fullscreenchange",g),document.removeEventListener("webkitfullscreenchange",g),document.removeEventListener("mozfullscreenchange",g),document.removeEventListener("MSFullscreenChange",g)}},[]);let p;if(n&&C.isValidElement(r)){const g=r,y=[g.props.className,i].filter(Boolean).join(" "),b={...g.props.style,...a};p=C.cloneElement(g,{ref:u,className:y,style:b,...s})}else p=_.jsx("div",{ref:u,...s,className:i,style:a,children:r});return _.jsx(Yh.Provider,{value:{isFullScreen:f,toggleFullscreen:h},children:p})});Eo.Trigger=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return _.jsx("div",{style:{cursor:"pointer"},onClick:t.toggleFullscreen,children:e})},Eo.InFullScreen=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return t.isFullScreen?_.jsx(_.Fragment,{children:e}):null},Eo.OutFullScreen=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return t.isFullScreen?null:_.jsx(_.Fragment,{children:e})};const vae=({fnrf_zst:e,header:t,flow:n,library:r})=>{const[i,a]=C.useState(e.options.worker),s=C.useRef(null);e.workermanager&&(e.workermanager.on_setWorker=a),e.set_worker(i),C.useEffect(()=>{e.auto_progress()},[]),C.useEffect(()=>{e.local_state.setState({funcnodescontainerRef:s.current})},[s]);const u=e.plugins();return _.jsx(Uoe,{plugins:u,fnrf_zst:e,children:_.jsx(Xe.Provider,{value:e,children:_.jsx(Ca,{asChild:!0,children:_.jsx(Eo,{asChild:!0,children:_.jsx(RU,{style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",flex:1},children:_.jsxs("div",{ref:s,className:"funcnodesreactflowcontainer funcnodescontainer",children:[t.show&&_.jsx(LU,{...t}),_.jsxs("div",{className:"funcnodesreactflowbody",children:[_.jsx(yae,{...n}),i&&r.show&&_.jsx(uZ,{}),i&&n.showNodeSettings&&_.jsx(uae,{})]}),_.jsxs("div",{className:"funcnodesflaotingmenu",children:[_.jsx(Eo.OutFullScreen,{children:n.allowExpand&&_.jsxs(Ca.Trigger,{children:[_.jsx(Ca.Expanded,{children:_.jsx(G7,{size:"xl",style:{padding:"4px"}})}),_.jsx(Ca.Collapsed,{children:_.jsx(X7,{size:"xl",style:{padding:"4px"}})})]})}),n.allowFullScreen&&_.jsxs(Eo.Trigger,{children:[_.jsx(Eo.OutFullScreen,{children:_.jsx(lk,{size:"xl",style:{padding:"4px"}})}),_.jsx(Eo.InFullScreen,{children:_.jsx(Y7,{size:"xl",style:{padding:"4px"}})})]})]})]})})})})})})},Wv={};window.fnrf_zst===void 0&&(window.fnrf_zst=Wv);const Y2={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},Xe=C.createContext(y_(Y2)),bae=e=>{let t=nf(e,{...Y2,id:tE()}).new_obj;if(!t.useWorkerManager&&t.worker===void 0)return _.jsx("div",{children:"Error: If you don't use a worker manager, you must provide a default worker."});if(e.useWorkerManager&&e.workermanager_url===void 0)return _.jsx("div",{children:"Error: If you use a worker manager, you must provide a worker manager url."});let n=Wv[t.id];n===void 0&&(n=y_(t),Wv[t.id]=n),n.options.debug=t.debug;const[r,i]=C.useState(t);return C.useEffect(()=>{const a=[];if(r.worker===void 0&&r.worker_url!==void 0){r.useWorkerManager=!1;const s=new nE({url:r.worker_url,uuid:r.id,on_sync_complete:r.on_sync_complete});r.worker=s,a.push(()=>{s.disconnect()})}if(r.fnw_url!==void 0){if(r.worker===void 0)throw new Error("defining fnw_url requires a worker to be defined");const s=F9(r.fnw_url),u=r.worker.on_sync_complete,f=async d=>{const h=await s;d.on_sync_complete=u,await d.update_from_export(h)};r.worker.on_sync_complete=f}if(r.worker!==void 0&&r.worker.set_zustand(n),t.useWorkerManager){const s=new N9(t.workermanager_url,n);n.workermanager=s,a.push(()=>{s.remove()})}return i({...r}),r.on_ready&&typeof r.on_ready=="function"&&r.on_ready({fnrf_zst:n}),()=>{for(const s of a)s()}},[]),_.jsx(vae,{fnrf_zst:n,header:r.header,library:r.library,flow:r.flow})},xae=e=>(new g_("FuncNodes",e.debug?"debug":"info").debug("Initalizing FuncNodes with props:",e),_.jsx("div",{className:"FuncnodesApp",children:_.jsx(bae,{...e})}));var Kv={exports:{}},Zu={},Zv={exports:{}},Qv={};/**
|
799
|
+
`]))),tie=function(t,n){var r=t.isFocused,i=t.size,a=t.theme,s=a.colors,u=a.spacing.baseUnit;return Re({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:u*2})},Bv=function(t){var n=t.delay,r=t.offset;return Ee("span",{css:fv({animation:"".concat(eie," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nie=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,a=i===void 0?4:i,s=zi(t,Yre);return Ee("div",Ce({},Rt(Re(Re({},s),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ee(Bv,{delay:0,offset:r}),Ee(Bv,{delay:160,offset:!0}),Ee(Bv,{delay:320,offset:!r}))},rie=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.theme,s=a.colors,u=a.borderRadius,f=a.spacing;return Re({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:f.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},iie=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.innerRef,s=t.innerProps,u=t.menuIsOpen;return Ee("div",Ce({ref:a},Rt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":u}),s,{"aria-disabled":r||void 0}),n)},oie=iie,aie=["data"],sie=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},lie=function(t){var n=t.children,r=t.cx,i=t.getStyles,a=t.getClassNames,s=t.Heading,u=t.headingProps,f=t.innerProps,d=t.label,h=t.theme,p=t.selectProps;return Ee("div",Ce({},Rt(t,"group",{group:!0}),f),Ee(s,Ce({},u,{selectProps:p,theme:h,getStyles:i,getClassNames:a,cx:r}),d),Ee("div",null,n))},uie=function(t,n){var r=t.theme,i=r.colors,a=r.spacing;return Re({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},cie=function(t){var n=QN(t);n.data;var r=zi(n,aie);return Ee("div",Ce({},Rt(t,"groupHeading",{"group-heading":!0}),r))},fie=lie,die=["innerRef","isDisabled","isHidden","inputClassName"],hie=function(t,n){var r=t.isDisabled,i=t.value,a=t.theme,s=a.spacing,u=a.colors;return Re(Re({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},pie),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:u.neutral80})},c2={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pie={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},c2)},mie=function(t){return Re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},c2)},gie=function(t){var n=t.cx,r=t.value,i=QN(t),a=i.innerRef,s=i.isDisabled,u=i.isHidden,f=i.inputClassName,d=zi(i,die);return Ee("div",Ce({},Rt(t,"input",{"input-container":!0}),{"data-value":r||""}),Ee("input",Ce({className:n({input:!0},f),ref:a,style:mie(u),disabled:s},d)))},yie=gie,vie=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors;return Re({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:a/2,margin:i.baseUnit/2})},bie=function(t,n){var r=t.theme,i=r.borderRadius,a=r.colors,s=t.cropWithEllipsis;return Re({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},xie=function(t,n){var r=t.theme,i=r.spacing,a=r.borderRadius,s=r.colors,u=t.isFocused;return Re({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:u?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},f2=function(t){var n=t.children,r=t.innerProps;return Ee("div",r,n)},wie=f2,Sie=f2;function _ie(e){var t=e.children,n=e.innerProps;return Ee("div",Ce({role:"button"},n),t||Ee(Fv,{size:14}))}var Eie=function(t){var n=t.children,r=t.components,i=t.data,a=t.innerProps,s=t.isDisabled,u=t.removeProps,f=t.selectProps,d=r.Container,h=r.Label,p=r.Remove;return Ee(d,{data:i,innerProps:Re(Re({},Rt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),a),selectProps:f},Ee(h,{data:i,innerProps:Re({},Rt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:f},n),Ee(p,{data:i,innerProps:Re(Re({},Rt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},u),selectProps:f}))},Cie=Eie,kie=function(t,n){var r=t.isDisabled,i=t.isFocused,a=t.isSelected,s=t.theme,u=s.spacing,f=s.colors;return Re({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?f.primary:i?f.primary25:"transparent",color:r?f.neutral20:a?f.neutral0:"inherit",padding:"".concat(u.baseUnit*2,"px ").concat(u.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?f.primary:f.primary50}})},Aie=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,a=t.isSelected,s=t.innerRef,u=t.innerProps;return Ee("div",Ce({},Rt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":a}),{ref:s,"aria-disabled":r},u),n)},Tie=Aie,Rie=function(t,n){var r=t.theme,i=r.spacing,a=r.colors;return Re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Oie=function(t){var n=t.children,r=t.innerProps;return Ee("div",Ce({},Rt(t,"placeholder",{placeholder:!0}),r),n)},Nie=Oie,Mie=function(t,n){var r=t.isDisabled,i=t.theme,a=i.spacing,s=i.colors;return Re({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Die=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Ee("div",Ce({},Rt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},Pie=Die,zie={ClearIndicator:Zre,Control:oie,DropdownIndicator:Wre,DownChevron:l2,CrossIcon:Fv,Group:fie,GroupHeading:cie,IndicatorsContainer:Ure,IndicatorSeparator:Jre,Input:yie,LoadingIndicator:nie,Menu:Ore,MenuList:Mre,MenuPortal:Lre,LoadingMessage:jre,NoOptionsMessage:zre,MultiValue:Cie,MultiValueContainer:wie,MultiValueLabel:Sie,MultiValueRemove:_ie,Option:Tie,Placeholder:Nie,SelectContainer:Bre,SingleValue:Pie,ValueContainer:Hre},jie=function(t){return Re(Re({},zie),t.components)},d2=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Iie(e,t){return!!(e===t||d2(e)&&d2(t))}function Lie(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Iie(e[n],t[n]))return!1;return!0}function Fie(e,t){t===void 0&&(t=Lie);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}for(var Bie={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},$ie=function(t){return Ee("span",Ce({css:Bie},t))},h2=$ie,Hie={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,a=t.context,s=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,a=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,a=t.label,s=a===void 0?"":a,u=t.selectValue,f=t.isDisabled,d=t.isSelected,h=t.isAppleDevice,p=function(x,E){return x&&x.length?"".concat(x.indexOf(E)+1," of ").concat(x.length):""};if(n==="value"&&u)return"value ".concat(s," focused, ").concat(p(u,r),".");if(n==="menu"&&h){var g=f?" disabled":"",y="".concat(d?" selected":"").concat(g);return"".concat(s).concat(y,", ").concat(p(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Vie=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.focusableOptions,s=t.isFocused,u=t.selectValue,f=t.selectProps,d=t.id,h=t.isAppleDevice,p=f.ariaLiveMessages,g=f.getOptionLabel,y=f.inputValue,b=f.isMulti,x=f.isOptionDisabled,E=f.isSearchable,S=f.menuIsOpen,A=f.options,k=f.screenReaderStatus,R=f.tabSelectsValue,N=f.isLoading,D=f["aria-label"],P=f["aria-live"],F=C.useMemo(function(){return Re(Re({},Hie),p||{})},[p]),V=C.useMemo(function(){var U="";if(n&&F.onChange){var z=n.option,B=n.options,q=n.removedValue,Y=n.removedValues,O=n.value,W=function(he){return Array.isArray(he)?null:he},Z=q||z||W(O),I=Z?g(Z):"",ie=B||Y||void 0,fe=ie?ie.map(g):[],re=Re({isDisabled:Z&&x(Z,u),label:I,labels:fe},n);U=F.onChange(re)}return U},[n,F,x,u,g]),T=C.useMemo(function(){var U="",z=r||i,B=!!(r&&u&&u.includes(r));if(z&&F.onFocus){var q={focused:z,label:g(z),isDisabled:x(z,u),isSelected:B,options:a,context:z===r?"menu":"value",selectValue:u,isAppleDevice:h};U=F.onFocus(q)}return U},[r,i,g,x,F,a,u,h]),$=C.useMemo(function(){var U="";if(S&&A.length&&!N&&F.onFilter){var z=k({count:a.length});U=F.onFilter({inputValue:y,resultsMessage:z})}return U},[a,y,S,F,A,k,N]),H=n?.action==="initial-input-focus",G=C.useMemo(function(){var U="";if(F.guidance){var z=i?"value":S?"menu":"input";U=F.guidance({"aria-label":D,context:z,isDisabled:r&&x(r,u),isMulti:b,isSearchable:E,tabSelectsValue:R,isInitialFocus:H})}return U},[D,r,i,b,x,E,S,F,u,R,H]),j=Ee(C.Fragment,null,Ee("span",{id:"aria-selection"},V),Ee("span",{id:"aria-focused"},T),Ee("span",{id:"aria-results"},$),Ee("span",{id:"aria-guidance"},G));return Ee(C.Fragment,null,Ee(h2,{id:d},H&&j),Ee(h2,{"aria-live":P,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!H&&j))},Uie=Vie,$v=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],qie=new RegExp("["+$v.map(function(e){return e.letters}).join("")+"]","g"),p2={},Hv=0;Hv<$v.length;Hv++)for(var Vv=$v[Hv],Uv=0;Uv<Vv.letters.length;Uv++)p2[Vv.letters[Uv]]=Vv.base;var m2=function(t){return t.replace(qie,function(n){return p2[n]})},Yie=Fie(m2),g2=function(t){return t.replace(/^\s+|\s+$/g,"")},Gie=function(t){return"".concat(t.label," ").concat(t.value)},Xie=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Re({ignoreCase:!0,ignoreAccents:!0,stringify:Gie,trim:!0,matchFrom:"any"},t),a=i.ignoreCase,s=i.ignoreAccents,u=i.stringify,f=i.trim,d=i.matchFrom,h=f?g2(r):r,p=f?g2(u(n)):u(n);return a&&(h=h.toLowerCase(),p=p.toLowerCase()),s&&(h=Yie(h),p=m2(p)),d==="start"?p.substr(0,h.length)===h:p.indexOf(h)>-1}},Wie=["innerRef"];function Kie(e){var t=e.innerRef,n=zi(e,Wie),r=Sre(n,"onExited","in","enter","exit","appear");return Ee("input",Ce({ref:t},r,{css:fv({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Zie=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Qie(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,s=C.useRef(!1),u=C.useRef(!1),f=C.useRef(0),d=C.useRef(null),h=C.useCallback(function(E,S){if(d.current!==null){var A=d.current,k=A.scrollTop,R=A.scrollHeight,N=A.clientHeight,D=d.current,P=S>0,F=R-N-k,V=!1;F>S&&s.current&&(r&&r(E),s.current=!1),P&&u.current&&(a&&a(E),u.current=!1),P&&S>F?(n&&!s.current&&n(E),D.scrollTop=R,V=!0,s.current=!0):!P&&-S>k&&(i&&!u.current&&i(E),D.scrollTop=0,V=!0,u.current=!0),V&&Zie(E)}},[n,r,i,a]),p=C.useCallback(function(E){h(E,E.deltaY)},[h]),g=C.useCallback(function(E){f.current=E.changedTouches[0].clientY},[]),y=C.useCallback(function(E){var S=f.current-E.changedTouches[0].clientY;h(E,S)},[h]),b=C.useCallback(function(E){if(E){var S=bre?{passive:!1}:!1;E.addEventListener("wheel",p,S),E.addEventListener("touchstart",g,S),E.addEventListener("touchmove",y,S)}},[y,g,p]),x=C.useCallback(function(E){E&&(E.removeEventListener("wheel",p,!1),E.removeEventListener("touchstart",g,!1),E.removeEventListener("touchmove",y,!1))},[y,g,p]);return C.useEffect(function(){if(t){var E=d.current;return b(E),function(){x(E)}}},[t,b,x]),function(E){d.current=E}}var y2=["boxSizing","height","overflow","paddingRight","position"],v2={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function b2(e){e.cancelable&&e.preventDefault()}function x2(e){e.stopPropagation()}function w2(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function S2(){return"ontouchstart"in window||navigator.maxTouchPoints}var _2=!!(typeof window<"u"&&window.document&&window.document.createElement),Ku=0,qs={capture:!1,passive:!1};function Jie(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),a=C.useRef(null),s=C.useCallback(function(f){if(_2){var d=document.body,h=d&&d.style;if(r&&y2.forEach(function(b){var x=h&&h[b];i.current[b]=x}),r&&Ku<1){var p=parseInt(i.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,y=window.innerWidth-g+p||0;Object.keys(v2).forEach(function(b){var x=v2[b];h&&(h[b]=x)}),h&&(h.paddingRight="".concat(y,"px"))}d&&S2()&&(d.addEventListener("touchmove",b2,qs),f&&(f.addEventListener("touchstart",w2,qs),f.addEventListener("touchmove",x2,qs))),Ku+=1}},[r]),u=C.useCallback(function(f){if(_2){var d=document.body,h=d&&d.style;Ku=Math.max(Ku-1,0),r&&Ku<1&&y2.forEach(function(p){var g=i.current[p];h&&(h[p]=g)}),d&&S2()&&(d.removeEventListener("touchmove",b2,qs),f&&(f.removeEventListener("touchstart",w2,qs),f.removeEventListener("touchmove",x2,qs)))}},[r]);return C.useEffect(function(){if(t){var f=a.current;return s(f),function(){u(f)}}},[t,s,u]),function(f){a.current=f}}var eoe=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},toe={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function noe(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,s=e.onBottomLeave,u=e.onTopArrive,f=e.onTopLeave,d=Qie({isEnabled:i,onBottomArrive:a,onBottomLeave:s,onTopArrive:u,onTopLeave:f}),h=Jie({isEnabled:n}),p=function(y){d(y),h(y)};return Ee(C.Fragment,null,n&&Ee("div",{onClick:eoe,css:toe}),t(p))}var roe={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ioe=function(t){var n=t.name,r=t.onFocus;return Ee("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:roe,value:"",onChange:function(){}})},ooe=ioe;function qv(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function aoe(){return qv(/^iPhone/i)}function E2(){return qv(/^Mac/i)}function soe(){return qv(/^iPad/i)||E2()&&navigator.maxTouchPoints>1}function loe(){return aoe()||soe()}function uoe(){return E2()||loe()}var coe=function(t){return t.label},foe=function(t){return t.label},doe=function(t){return t.value},hoe=function(t){return!!t.isDisabled},poe={clearIndicator:Kre,container:Fre,control:rie,dropdownIndicator:Xre,group:sie,groupHeading:uie,indicatorsContainer:Vre,indicatorSeparator:Qre,input:hie,loadingIndicator:tie,loadingMessage:Pre,menu:Are,menuList:Nre,menuPortal:Ire,multiValue:vie,multiValueLabel:bie,multiValueRemove:xie,noOptionsMessage:Dre,option:kie,placeholder:Rie,singleValue:Mie,valueContainer:$re},moe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},goe=4,C2=4,yoe=38,voe=C2*2,boe={baseUnit:C2,controlHeight:yoe,menuGutter:voe},Yv={borderRadius:goe,colors:moe,spacing:boe},xoe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:t2(),captureMenuScroll:!t2(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Xie(),formatGroupLabel:coe,getOptionLabel:foe,getOptionValue:doe,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:hoe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!yre(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function k2(e,t,n,r){var i=N2(e,t,n),a=M2(e,t,n),s=O2(e,t),u=$h(e,t);return{type:"option",data:t,isDisabled:i,isSelected:a,label:s,value:u,index:r}}function Bh(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,u){return k2(e,s,t,u)}).filter(function(s){return R2(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var a=k2(e,n,t,r);return R2(e,a)?a:void 0}).filter(xre)}function A2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Iv(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function T2(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Iv(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function woe(e,t){return A2(Bh(e,t))}function R2(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,a=t.isSelected,s=t.label,u=t.value;return(!P2(e)||!a)&&D2(e,{label:s,value:u,data:i},r)}function Soe(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var a=t.indexOf(n);if(a>-1)return n;if(i<t.length)return t[i]}return null}function _oe(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Gv=function(t,n){var r,i=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return i||null},O2=function(t,n){return t.getOptionLabel(n)},$h=function(t,n){return t.getOptionValue(n)};function N2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function M2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=$h(e,t);return n.some(function(i){return $h(e,i)===r})}function D2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var P2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Eoe=1,z2=function(e){rre(n,e);var t=ore(n);function n(r){var i;if(tre(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=uoe(),i.controlRef=null,i.getControlRef=function(f){i.controlRef=f},i.focusedOptionRef=null,i.getFocusedOptionRef=function(f){i.focusedOptionRef=f},i.menuListRef=null,i.getMenuListRef=function(f){i.menuListRef=f},i.inputRef=null,i.getInputRef=function(f){i.inputRef=f},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(f,d){var h=i.props,p=h.onChange,g=h.name;d.name=g,i.ariaOnChange(f,d),p(f,d)},i.setValue=function(f,d,h){var p=i.props,g=p.closeMenuOnSelect,y=p.isMulti,b=p.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:b}),g&&(i.setState({inputIsHiddenAfterUpdate:!y}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(f,{action:d,option:h})},i.selectOption=function(f){var d=i.props,h=d.blurInputOnSelect,p=d.isMulti,g=d.name,y=i.state.selectValue,b=p&&i.isOptionSelected(f,y),x=i.isOptionDisabled(f,y);if(b){var E=i.getOptionValue(f);i.setValue(y.filter(function(S){return i.getOptionValue(S)!==E}),"deselect-option",f)}else if(!x)p?i.setValue([].concat(Iv(y),[f]),"select-option",f):i.setValue(f,"select-option");else{i.ariaOnChange(f,{action:"select-option",option:f,name:g});return}h&&i.blurInput()},i.removeValue=function(f){var d=i.props.isMulti,h=i.state.selectValue,p=i.getOptionValue(f),g=h.filter(function(b){return i.getOptionValue(b)!==p}),y=Fh(d,g,g[0]||null);i.onChange(y,{action:"remove-value",removedValue:f}),i.focusInput()},i.clearValue=function(){var f=i.state.selectValue;i.onChange(Fh(i.props.isMulti,[],null),{action:"clear",removedValues:f})},i.popValue=function(){var f=i.props.isMulti,d=i.state.selectValue,h=d[d.length-1],p=d.slice(0,d.length-1),g=Fh(f,p,p[0]||null);h&&i.onChange(g,{action:"pop-value",removedValue:h})},i.getFocusedOptionId=function(f){return Gv(i.state.focusableOptionsWithIds,f)},i.getFocusableOptionsWithIds=function(){return T2(Bh(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var f=arguments.length,d=new Array(f),h=0;h<f;h++)d[h]=arguments[h];return dre.apply(void 0,[i.props.classNamePrefix].concat(d))},i.getOptionLabel=function(f){return O2(i.props,f)},i.getOptionValue=function(f){return $h(i.props,f)},i.getStyles=function(f,d){var h=i.props.unstyled,p=poe[f](d,h);p.boxSizing="border-box";var g=i.props.styles[f];return g?g(p,d):p},i.getClassNames=function(f,d){var h,p;return(h=(p=i.props.classNames)[f])===null||h===void 0?void 0:h.call(p,d)},i.getElementId=function(f){return"".concat(i.state.instancePrefix,"-").concat(f)},i.getComponents=function(){return jie(i.props)},i.buildCategorizedOptions=function(){return Bh(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return A2(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(f,d){i.setState({ariaSelection:Re({value:f},d)})},i.onMenuMouseDown=function(f){f.button===0&&(f.stopPropagation(),f.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(f){i.blockOptionHover=!1},i.onControlMouseDown=function(f){if(!f.defaultPrevented){var d=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&i.onMenuClose():d&&i.openMenu("first"):(d&&(i.openAfterFocus=!0),i.focusInput()),f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&f.preventDefault()}},i.onDropdownIndicatorMouseDown=function(f){if(!(f&&f.type==="mousedown"&&f.button!==0)&&!i.props.isDisabled){var d=i.props,h=d.isMulti,p=d.menuIsOpen;i.focusInput(),p?(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()):i.openMenu("first"),f.preventDefault()}},i.onClearIndicatorMouseDown=function(f){f&&f.type==="mousedown"&&f.button!==0||(i.clearValue(),f.preventDefault(),i.openAfterFocus=!1,f.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(f){typeof i.props.closeMenuOnScroll=="boolean"?f.target instanceof HTMLElement&&zh(f.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(f)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(f){var d=f.touches,h=d&&d.item(0);h&&(i.initialTouchX=h.clientX,i.initialTouchY=h.clientY,i.userIsDragging=!1)},i.onTouchMove=function(f){var d=f.touches,h=d&&d.item(0);if(h){var p=Math.abs(h.clientX-i.initialTouchX),g=Math.abs(h.clientY-i.initialTouchY),y=5;i.userIsDragging=p>y||g>y}},i.onTouchEnd=function(f){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(f.target)&&i.menuListRef&&!i.menuListRef.contains(f.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(f){i.userIsDragging||i.onControlMouseDown(f)},i.onClearIndicatorTouchEnd=function(f){i.userIsDragging||i.onClearIndicatorMouseDown(f)},i.onDropdownIndicatorTouchEnd=function(f){i.userIsDragging||i.onDropdownIndicatorMouseDown(f)},i.handleInputChange=function(f){var d=i.props.inputValue,h=f.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(h,{action:"input-change",prevInputValue:d}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(f){i.props.onFocus&&i.props.onFocus(f),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(f){var d=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(f),i.onInputChange("",{action:"input-blur",prevInputValue:d}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(f){if(!(i.blockOptionHover||i.state.focusedOption===f)){var d=i.getFocusableOptions(),h=d.indexOf(f);i.setState({focusedOption:f,focusedOptionId:h>-1?i.getFocusedOptionId(f):null})}},i.shouldHideSelectedOptions=function(){return P2(i.props)},i.onValueInputFocus=function(f){f.preventDefault(),f.stopPropagation(),i.focus()},i.onKeyDown=function(f){var d=i.props,h=d.isMulti,p=d.backspaceRemovesValue,g=d.escapeClearsValue,y=d.inputValue,b=d.isClearable,x=d.isDisabled,E=d.menuIsOpen,S=d.onKeyDown,A=d.tabSelectsValue,k=d.openMenuOnFocus,R=i.state,N=R.focusedOption,D=R.focusedValue,P=R.selectValue;if(!x&&!(typeof S=="function"&&(S(f),f.defaultPrevented))){switch(i.blockOptionHover=!0,f.key){case"ArrowLeft":if(!h||y)return;i.focusValue("previous");break;case"ArrowRight":if(!h||y)return;i.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(D)i.removeValue(D);else{if(!p)return;h?i.popValue():b&&i.clearValue()}break;case"Tab":if(i.isComposing||f.shiftKey||!E||!A||!N||k&&i.isOptionSelected(N,P))return;i.selectOption(N);break;case"Enter":if(f.keyCode===229)break;if(E){if(!N||i.isComposing)return;i.selectOption(N);break}return;case"Escape":E?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:y}),i.onMenuClose()):b&&g&&i.clearValue();break;case" ":if(y)return;if(!E){i.openMenu("first");break}if(!N)return;i.selectOption(N);break;case"ArrowUp":E?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":E?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!E)return;i.focusOption("pageup");break;case"PageDown":if(!E)return;i.focusOption("pagedown");break;case"Home":if(!E)return;i.focusOption("first");break;case"End":if(!E)return;i.focusOption("last");break;default:return}f.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++Eoe),i.state.selectValue=ZN(r.value),r.menuIsOpen&&i.state.selectValue.length){var a=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),u=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=a,i.state.focusedOption=s[u],i.state.focusedOptionId=Gv(a,s[u])}return i}return nre(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&e2(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isDisabled,u=a.menuIsOpen,f=this.state.isFocused;(f&&!s&&i.isDisabled||f&&u&&!i.menuIsOpen)&&this.focusInput(),f&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!f&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(e2(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,a){this.props.onInputChange(i,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var a=this,s=this.state,u=s.selectValue,f=s.isFocused,d=this.buildFocusableOptions(),h=i==="first"?0:d.length-1;if(!this.props.isMulti){var p=d.indexOf(u[0]);p>-1&&(h=p)}this.scrollToFocusedOptionOnUpdate=!(f&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:d[h],focusedOptionId:this.getFocusedOptionId(d[h])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(i){var a=this.state,s=a.selectValue,u=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var f=s.indexOf(u);u||(f=-1);var d=s.length-1,h=-1;if(s.length){switch(i){case"previous":f===0?h=0:f===-1?h=d:h=f-1;break;case"next":f>-1&&f<d&&(h=f+1);break}this.setState({inputIsHidden:h!==-1,focusedValue:s[h]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,s=this.state.focusedOption,u=this.getFocusableOptions();if(u.length){var f=0,d=u.indexOf(s);s||(d=-1),i==="up"?f=d>0?d-1:u.length-1:i==="down"?f=(d+1)%u.length:i==="pageup"?(f=d-a,f<0&&(f=0)):i==="pagedown"?(f=d+a,f>u.length-1&&(f=u.length-1)):i==="last"&&(f=u.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:u[f],focusedValue:null,focusedOptionId:this.getFocusedOptionId(u[f])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Yv):Re(Re({},Yv),this.props.theme):Yv}},{key:"getCommonProps",value:function(){var i=this.clearValue,a=this.cx,s=this.getStyles,u=this.getClassNames,f=this.getValue,d=this.selectOption,h=this.setValue,p=this.props,g=p.isMulti,y=p.isRtl,b=p.options,x=this.hasValue();return{clearValue:i,cx:a,getStyles:s,getClassNames:u,getValue:f,hasValue:x,isMulti:g,isRtl:y,options:b,selectOption:d,selectProps:p,setValue:h,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,a=i.isClearable,s=i.isMulti;return a===void 0?s:a}},{key:"isOptionDisabled",value:function(i,a){return N2(this.props,i,a)}},{key:"isOptionSelected",value:function(i,a){return M2(this.props,i,a)}},{key:"filterOption",value:function(i,a){return D2(this.props,i,a)}},{key:"formatOptionLabel",value:function(i,a){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,u=this.state.selectValue;return this.props.formatOptionLabel(i,{context:a,inputValue:s,selectValue:u})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,a=i.isDisabled,s=i.isSearchable,u=i.inputId,f=i.inputValue,d=i.tabIndex,h=i.form,p=i.menuIsOpen,g=i.required,y=this.getComponents(),b=y.Input,x=this.state,E=x.inputIsHidden,S=x.ariaSelection,A=this.commonProps,k=u||this.getElementId("input"),R=Re(Re(Re({"aria-autocomplete":"list","aria-expanded":p,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},p&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?S?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?C.createElement(b,Ce({},A,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:k,innerRef:this.getInputRef,isDisabled:a,isHidden:E,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:d,form:h,type:"text",value:f},R)):C.createElement(Kie,Ce({id:k,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ph,onFocus:this.onInputFocus,disabled:a,tabIndex:d,inputMode:"none",form:h,value:""},R))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,a=this.getComponents(),s=a.MultiValue,u=a.MultiValueContainer,f=a.MultiValueLabel,d=a.MultiValueRemove,h=a.SingleValue,p=a.Placeholder,g=this.commonProps,y=this.props,b=y.controlShouldRenderValue,x=y.isDisabled,E=y.isMulti,S=y.inputValue,A=y.placeholder,k=this.state,R=k.selectValue,N=k.focusedValue,D=k.isFocused;if(!this.hasValue()||!b)return S?null:C.createElement(p,Ce({},g,{key:"placeholder",isDisabled:x,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),A);if(E)return R.map(function(F,V){var T=F===N,$="".concat(i.getOptionLabel(F),"-").concat(i.getOptionValue(F));return C.createElement(s,Ce({},g,{components:{Container:u,Label:f,Remove:d},isFocused:T,isDisabled:x,key:$,index:V,removeProps:{onClick:function(){return i.removeValue(F)},onTouchEnd:function(){return i.removeValue(F)},onMouseDown:function(G){G.preventDefault()}},data:F}),i.formatOptionLabel(F,"value"))});if(S)return null;var P=R[0];return C.createElement(h,Ce({},g,{data:P,isDisabled:x}),this.formatOptionLabel(P,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),a=i.ClearIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,d=u.isLoading,h=this.state.isFocused;if(!this.isClearable()||!a||f||!this.hasValue()||d)return null;var p={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:p,isFocused:h}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),a=i.LoadingIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,d=u.isLoading,h=this.state.isFocused;if(!a||!d)return null;var p={"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:p,isDisabled:f,isFocused:h}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator,s=i.IndicatorSeparator;if(!a||!s)return null;var u=this.commonProps,f=this.props.isDisabled,d=this.state.isFocused;return C.createElement(s,Ce({},u,{isDisabled:f,isFocused:d}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),a=i.DropdownIndicator;if(!a)return null;var s=this.commonProps,u=this.props.isDisabled,f=this.state.isFocused,d={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return C.createElement(a,Ce({},s,{innerProps:d,isDisabled:u,isFocused:f}))}},{key:"renderMenu",value:function(){var i=this,a=this.getComponents(),s=a.Group,u=a.GroupHeading,f=a.Menu,d=a.MenuList,h=a.MenuPortal,p=a.LoadingMessage,g=a.NoOptionsMessage,y=a.Option,b=this.commonProps,x=this.state.focusedOption,E=this.props,S=E.captureMenuScroll,A=E.inputValue,k=E.isLoading,R=E.loadingMessage,N=E.minMenuHeight,D=E.maxMenuHeight,P=E.menuIsOpen,F=E.menuPlacement,V=E.menuPosition,T=E.menuPortalTarget,$=E.menuShouldBlockScroll,H=E.menuShouldScrollIntoView,G=E.noOptionsMessage,j=E.onMenuScrollToTop,U=E.onMenuScrollToBottom;if(!P)return null;var z=function(I,ie){var fe=I.type,re=I.data,le=I.isDisabled,he=I.isSelected,ye=I.label,je=I.value,Oe=x===re,be=le?void 0:function(){return i.onOptionHover(re)},Le=le?void 0:function(){return i.selectOption(re)},Ie="".concat(i.getElementId("option"),"-").concat(ie),pt={id:Ie,onClick:Le,onMouseMove:be,onMouseOver:be,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:he};return C.createElement(y,Ce({},b,{innerProps:pt,data:re,isDisabled:le,isSelected:he,key:Ie,label:ye,type:fe,value:je,isFocused:Oe,innerRef:Oe?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(I.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(Z){if(Z.type==="group"){var I=Z.data,ie=Z.options,fe=Z.index,re="".concat(i.getElementId("group"),"-").concat(fe),le="".concat(re,"-heading");return C.createElement(s,Ce({},b,{key:re,data:I,options:ie,Heading:u,headingProps:{id:le,data:Z.data},label:i.formatGroupLabel(Z.data)}),Z.options.map(function(he){return z(he,"".concat(fe,"-").concat(he.index))}))}else if(Z.type==="option")return z(Z,"".concat(Z.index))});else if(k){var q=R({inputValue:A});if(q===null)return null;B=C.createElement(p,b,q)}else{var Y=G({inputValue:A});if(Y===null)return null;B=C.createElement(g,b,Y)}var O={minMenuHeight:N,maxMenuHeight:D,menuPlacement:F,menuPosition:V,menuShouldScrollIntoView:H},W=C.createElement(Tre,Ce({},b,O),function(Z){var I=Z.ref,ie=Z.placerProps,fe=ie.placement,re=ie.maxHeight;return C.createElement(f,Ce({},b,O,{innerRef:I,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:k,placement:fe}),C.createElement(noe,{captureEnabled:S,onTopArrive:j,onBottomArrive:U,lockEnabled:$},function(le){return C.createElement(d,Ce({},b,{innerRef:function(ye){i.getMenuListRef(ye),le(ye)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:i.getElementId("listbox")},isLoading:k,maxHeight:re,focusedOption:x}),B)}))});return T||V==="fixed"?C.createElement(h,Ce({},b,{appendTo:T,controlElement:this.controlRef,menuPlacement:F,menuPosition:V}),W):W}},{key:"renderFormField",value:function(){var i=this,a=this.props,s=a.delimiter,u=a.isDisabled,f=a.isMulti,d=a.name,h=a.required,p=this.state.selectValue;if(h&&!this.hasValue()&&!u)return C.createElement(ooe,{name:d,onFocus:this.onValueInputFocus});if(!(!d||u))if(f)if(s){var g=p.map(function(x){return i.getOptionValue(x)}).join(s);return C.createElement("input",{name:d,type:"hidden",value:g})}else{var y=p.length>0?p.map(function(x,E){return C.createElement("input",{key:"i-".concat(E),name:d,type:"hidden",value:i.getOptionValue(x)})}):C.createElement("input",{name:d,type:"hidden",value:""});return C.createElement("div",null,y)}else{var b=p[0]?this.getOptionValue(p[0]):"";return C.createElement("input",{name:d,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,a=this.state,s=a.ariaSelection,u=a.focusedOption,f=a.focusedValue,d=a.isFocused,h=a.selectValue,p=this.getFocusableOptions();return C.createElement(Uie,Ce({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:u,focusedValue:f,isFocused:d,selectValue:h,focusableOptions:p,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),a=i.Control,s=i.IndicatorsContainer,u=i.SelectContainer,f=i.ValueContainer,d=this.props,h=d.className,p=d.id,g=d.isDisabled,y=d.menuIsOpen,b=this.state.isFocused,x=this.commonProps=this.getCommonProps();return C.createElement(u,Ce({},x,{className:h,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:b}),this.renderLiveRegion(),C.createElement(a,Ce({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:b,menuIsOpen:y}),C.createElement(f,Ce({},x,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),C.createElement(s,Ce({},x,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,a){var s=a.prevProps,u=a.clearFocusValueOnUpdate,f=a.inputIsHiddenAfterUpdate,d=a.ariaSelection,h=a.isFocused,p=a.prevWasFocused,g=a.instancePrefix,y=i.options,b=i.value,x=i.menuIsOpen,E=i.inputValue,S=i.isMulti,A=ZN(b),k={};if(s&&(b!==s.value||y!==s.options||x!==s.menuIsOpen||E!==s.inputValue)){var R=x?woe(i,A):[],N=x?T2(Bh(i,A),"".concat(g,"-option")):[],D=u?Soe(a,A):null,P=_oe(a,R),F=Gv(N,P);k={selectValue:A,focusedOption:P,focusedOptionId:F,focusableOptionsWithIds:N,focusedValue:D,clearFocusValueOnUpdate:!1}}var V=f!=null&&i!==s?{inputIsHidden:f,inputIsHiddenAfterUpdate:void 0}:{},T=d,$=h&&p;return h&&!$&&(T={value:Fh(S,A,A[0]||null),options:A,action:"initial-input-focus"},$=!p),d?.action==="initial-input-focus"&&(T=null),Re(Re(Re({},k),V),{},{prevProps:i,ariaSelection:T,prevWasFocused:$})}}]),n}(C.Component);z2.defaultProps=xoe;var Coe=C.forwardRef(function(e,t){var n=ere(e);return C.createElement(z2,Ce({ref:t},n))}),koe=Coe;const Aoe=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:i})=>{const[a,s]=C.useState(""),[u,f]=C.useState(0),d=y=>{s(y.toLowerCase()),f(0)},h=e.filter(y=>y.label.toLowerCase().includes(a)||y.value.toLowerCase().includes(a));var p;t!==void 0?p=h.slice(u*t,(u+1)*t):p=h;const g={control:y=>({...y,minHeight:void 0})};return _.jsx(koe,{options:p,onInputChange:d,onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:g,classNamePrefix:"styled-select",defaultValue:r,value:r})};function Toe(e){return e===0?0:Math.abs(e)<1e-12?e:Number(e.toPrecision(12))}const j2=({iostore:e,inputconverter:t,parser:n=r=>parseFloat(r)})=>{const r=C.useContext(Xe),{preview:i}=e.valuestore(),a=e.use(),[s,u]=C.useState(t[1](i?.value));C.useEffect(()=>{u(t[1](i?.value))},[i]);const f=y=>{y=n(parseFloat(y.toString()).toString()),isNaN(y)?(y="<NoValue>",u("")):(a.value_options?.min!==void 0&&y<a.value_options.min&&(y=a.value_options.min),a.value_options?.max!==void 0&&y>a.value_options.max&&(y=a.value_options.max),y=Toe(y),u(y.toString()));try{y=t[0](y)}catch{}r.worker?.set_io_value({nid:a.node,ioid:a.id,value:y,set_default:a.render_options.set_default})},d=y=>{f(y.target.value)};let h=a.connected?t[1](i?.value):s;h===void 0&&(h=a.value_options?.min),h===void 0&&(h=a.value_options?.max),h===void 0&&(h=""),h===null&&(h="");let p=null,g=1;return a.value_options?.step!==void 0?g=a.value_options.step:a.value_options?.max!==void 0&&a.value_options?.min!==void 0&&(g=(a.value_options?.max-a.value_options?.min)/1e3),a.value_options?.max!==void 0&&a.value_options?.min!==void 0&&!a.connected&&(p=_.jsx("div",{style:{minWidth:"6.25rem"},className:"SliderContainer",children:_.jsxs(Dne,{className:"SliderRoot",value:[h===void 0?a.value_options?.min:h],min:a.value_options?.min,max:a.value_options?.max,step:g,disabled:a.connected,onValueCommit:y=>{isNaN(y[0])||f(y[0])},onValueChange:y=>{isNaN(y[0])||u(y[0].toString())},onKeyDown:y=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(y.key)&&y.stopPropagation()},children:[_.jsx(Pne,{className:"SliderTrack",children:_.jsx(zne,{className:"SliderRange"})}),_.jsx(jne,{className:"SliderThumb"})]})})),_.jsxs(_.Fragment,{children:[p,_.jsx("input",{type:"text",className:"nodedatainput styledinput numberinput",value:h,onChange:y=>u(y.target.value),onBlur:d,step:g,onKeyDown:y=>{if(!(y.ctrlKey||y.metaKey)){if(y.key==="ArrowUp"){y.shiftKey&&(g*=10);let b=(parseFloat(h)||0)+g;f(b);return}if(y.key==="ArrowDown"){y.shiftKey&&(g*=10);let b=(parseFloat(h)||0)-g;f(b);return}!/^[0-9.eE+-]$/.test(y.key)&&!["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(y.key)&&y.preventDefault()}},disabled:a.connected,min:a.value_options?.min,max:a.value_options?.max})]})},Roe=({iostore:e,inputconverter:t})=>j2({iostore:e,inputconverter:t,parser:parseFloat}),Ooe=({iostore:e,inputconverter:t})=>j2({iostore:e,inputconverter:t,parser:parseInt}),Noe=({iostore:e,inputconverter:t})=>{const n=C.useContext(Xe),{preview:r}=e.valuestore(),i=e.use(),a=r?.value===void 0,s=C.useRef(null);C.useEffect(()=>{s.current&&(s.current.indeterminate=a)},[s,a]);const u=f=>{let d=f.target.checked;try{d=t[0](f.target.checked)}catch{}n.worker?.set_io_value({nid:i.node,ioid:i.id,value:d,set_default:i.render_options.set_default})};return _.jsx("input",{ref:s,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!t[1](r?.value),onChange:u,disabled:i.connected})},I2=({iostore:e,inputconverter:t})=>{const n=C.useContext(Xe),{preview:r,full:i}=e.valuestore(),a=e.use(),s=i===void 0?r?.value:i?.value,[u,f]=C.useState(t[1](s));C.useEffect(()=>{f(t[1](s))},[s]);const d=p=>{let g=p.target.value;g||(g="<NoValue>");try{g=t[0](g)}catch{}n.worker?.set_io_value({nid:a.node,ioid:a.id,value:g,set_default:a.render_options.set_default})};let h=a.connected?t[1](s):u;return h==null&&(h=""),_.jsx("input",{className:"nodedatainput styledinput stringinput",value:h,onChange:p=>f(p.target.value),onBlur:d,disabled:a.connected})},Moe=({iostore:e})=>{const t=C.useContext(Xe),n=e.use(),{preview:r,full:i}=e.valuestore(),a=i===void 0?r?.value:i.value,s=n.value_options?.colorspace||"hex",u=d=>{let h="<NoValue>";d&&(d[s]?h=d[s]():h=d.hex()),d===null&&(h=null);try{h=h}catch{}t.worker?.set_io_value({nid:n.node,ioid:n.id,value:h,set_default:n.render_options.set_default})};let f=!1;return typeof n.type!="string"&&"anyOf"in n.type&&n.type.anyOf!==void 0&&(f=n.type.anyOf.some(d=>d==="None")),_.jsx(Xne,{onChange:u,inicolordata:a,allow_null:f,inicolorspace:s})},Doe=e=>e,Poe=e=>parseFloat(e),zoe=e=>!!e,joe=e=>e==="null"?null:e,Ioe=e=>e==="nuinputconvertermber"?Poe:e==="boolean"?zoe:e==="undefined"?joe:Doe,Hh=({iostore:e,inputconverter:t,parser:n})=>{const r=e.use(),{preview:i,full:a}=e.valuestore(),s=a===void 0?i?.value:a.value;let u=r.value_options?.options||[];Array.isArray(u)&&(u={type:"enum",values:u,keys:u.map(x=>x===null?"None":x.toString()),nullable:!1}),u.type!=="enum"&&(u={type:"enum",values:Object.values(u),keys:Object.keys(u),nullable:!1}),u=u,u.nullable&&!u.values.includes(null)&&!u.keys.includes("None")&&(u.values.unshift(null),u.keys.unshift("None"));const f=[];for(let x=0;x<u.values.length;x++){const E=u.values[x]===null||u.values[x]===void 0?"undefined":typeof u.values[x];let S=u.values[x];S===null&&(S="null"),S===void 0&&(S="undefined"),f.push([u.keys[x],S.toString(),E])}const d=C.useContext(Xe),h=({value:x,datatype:E})=>{let A=(n||Ioe(E))(x);try{A=t[0](x)}catch{}d.worker?.set_io_value({nid:r.node,ioid:r.id,value:A,set_default:r.render_options.set_default})};let p=s;p===null&&(p="null"),p===void 0&&(p="undefined");const g=f.find(x=>x[1]===p.toString());let y;g!==void 0&&(y={value:g[1],label:g[0],datatype:g[2]});const b=f.map(x=>({value:x[1],label:x[0],datatype:x[2]}));return _.jsx(Aoe,{className:"nodedatainput styleddropdown",options:b,defaultValue:y,onChange:x=>{if(x===null){h({value:"<NoValue>",datatype:"string"});return}h(x)}})},Loe={float:Roe,int:Ooe,bool:Noe,string:I2,str:I2,color:Moe,select:Hh,enum:Hh,bytes:((e,t=void 0)=>({iostore:n})=>{const{full:r,preview:i}=n.valuestore(),s=(r===void 0?i:r)?.value||t;return _.jsx(e,{iostore:n,value:s})})(Nv,"")},Foe=({iostore:e,typestring:t})=>{const{InLineRenderer:n}=C.useContext(ji),{preview:r,full:i}=e.valuestore();if(t&&n[t])return _.jsx("div",{children:n[t]({iostore:e})});let a=(JSON.stringify(i||r)||"").replace(/\\n/g,`
|
800
|
+
`);return a.length>63&&(a=a.slice(0,60)+"..."),_.jsx("div",{children:a})},Boe={},Nr=(e,t=void 0)=>({iostore:n})=>{const{full:r,preview:i}=n.valuestore(),s=(r===void 0?i:r)?.value||t;return _.jsx(e,{iostore:n,value:s})},$oe={string:Nr(RN),table:Nr(ON),image:Nr(AN),svg:Nr(TN,""),dict:Nr(Oh,"{}"),bytes:Nr(Nv,"")},Hoe={},L2=e=>({iostore:t,value:n,preValue:r,onLoaded:i})=>_.jsx(e,{iostore:t,value:n,preValue:r,onLoaded:i}),F2=L2(Oh),Mr={Inputrenderer:Loe,Outputrenderer:Boe,HandlePreviewRenderer:Hoe,DataOverlayRenderer:{},DataPreviewViewRenderer:$oe,DataViewRenderer:gne,InLineRenderer:_Z,NodeContextExtenders:{},NodeRenderer:{},NodeHooks:{}},Voe=(e,t)=>{const n=t.options||{},r=n.overwrite===void 0?!0:n.overwrite;switch(t.type){case"EXTEND_INPUT_RENDER":return!r&&e.Inputrenderer[t.payload.type]?e:{...e,Inputrenderer:{...e.Inputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_OUTPUT_RENDER":return!r&&e.Outputrenderer[t.payload.type]?e:{...e,Outputrenderer:{...e.Outputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_HANDLE_PREVIEW_RENDER":return!r&&e.HandlePreviewRenderer[t.payload.type]?e:{...e,HandlePreviewRenderer:{...e.HandlePreviewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_OVERLAY_RENDER":return!r&&e.DataOverlayRenderer[t.payload.type]?e:{...e,DataOverlayRenderer:{...e.DataOverlayRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_PREVIEW_RENDER":return!r&&e.DataPreviewViewRenderer[t.payload.type]?e:{...e,DataPreviewViewRenderer:{...e.DataPreviewViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_VIEW_RENDER":return!r&&e.DataViewRenderer[t.payload.type]?e:{...e,DataViewRenderer:{...e.DataViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_CONTEXT_EXTENDER":return!r&&e.NodeContextExtenders[t.payload.type]?e:{...e,NodeContextExtenders:{...e.NodeContextExtenders,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_RENDERER":return!r&&e.NodeRenderer[t.payload.type]?e:{...e,NodeRenderer:{...e.NodeRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_HOOKS":return!r&&e.NodeHooks[t.payload.type]?e:{...e,NodeHooks:{...e.NodeHooks,[t.payload.type]:t.payload.component}};case"EXTEND_FROM_PLUGIN":let i=!1;const a=[[t.payload.plugin.input_renderers||{},e.Inputrenderer],[t.payload.plugin.output_renderers||{},e.Outputrenderer],[t.payload.plugin.handle_preview_renderers||{},e.HandlePreviewRenderer],[t.payload.plugin.data_overlay_renderers||{},e.DataOverlayRenderer],[t.payload.plugin.data_preview_renderers||{},e.DataPreviewViewRenderer],[t.payload.plugin.data_view_renderers||{},e.DataViewRenderer],[t.payload.plugin.node_context_extenders||{},e.NodeContextExtenders],[t.payload.plugin.node_renderers||{},e.NodeRenderer],[t.payload.plugin.node_hooks||{},e.NodeHooks]];for(const[u,f]of a){if(Object.keys(u).length>0){if(r)i=!0;else for(const d in u)if(!f[d]){i=!0;break}}if(i)break}if(!i)return e;for(const[u,f]of a)for(const d in u)(r||!f[d])&&(f[d]=u[d]);return{...e};default:return e}},Uoe=({children:e,plugins:t,fnrf_zst:n})=>{const[r,i]=C.useReducer(Voe,Mr),a=(x,E,S)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:x,component:E},options:S})},s=(x,E,S)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:x,component:E},options:S})},u=(x,E,S)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:x,component:E},options:S})},f=(x,E,S)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:x,component:E},options:S})},d=(x,E,S)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:x,component:E},options:S})},h=(x,E,S)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:x,component:E},options:S})},p=(x,E,S)=>{i({type:"EXTEND_NODE_CONTEXT_EXTENDER",payload:{type:x,component:E},options:S})},g=(x,E,S)=>{i({type:"EXTEND_NODE_RENDERER",payload:{type:x,component:E},options:S})},y=(x,E,S)=>{i({type:"EXTEND_NODE_HOOKS",payload:{type:x,component:E},options:S})},b=(x,E)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:x},options:E})};return C.useEffect(()=>{for(const x in t){const E=t[x];if(!E)continue;const S=E.renderpluginfactory;S&&b(S({React:tf,fnrf_zst:n,NodeContext:q2}))}},[t]),_.jsx(ji.Provider,{value:{Inputrenderer:r.Inputrenderer,Outputrenderer:r.Outputrenderer,HandlePreviewRenderer:r.HandlePreviewRenderer,DataOverlayRenderer:r.DataOverlayRenderer,DataPreviewViewRenderer:r.DataPreviewViewRenderer,DataViewRenderer:r.DataViewRenderer,InLineRenderer:r.InLineRenderer,NodeContextExtenders:r.NodeContextExtenders,NodeRenderer:r.NodeRenderer,NodeHooks:r.NodeHooks,extendInputRenderMapping:a,extendOutputRenderMapping:s,extendHandlePreviewRenderMapping:u,extendDataOverlayRenderMapping:f,extendDataPreviewRenderMapping:d,extendDataViewRenderMapping:h,extendNodeContextExtender:p,extendNodeRenderer:g,extendNodeHooks:y,extendFromPlugin:b},children:e})},ji=C.createContext({Inputrenderer:Mr.Inputrenderer,Outputrenderer:Mr.Outputrenderer,HandlePreviewRenderer:Mr.HandlePreviewRenderer,DataOverlayRenderer:Mr.DataOverlayRenderer,DataPreviewViewRenderer:Mr.DataPreviewViewRenderer,DataViewRenderer:Mr.DataViewRenderer,InLineRenderer:Mr.InLineRenderer,NodeContextExtenders:Mr.NodeContextExtenders,NodeRenderer:Mr.NodeRenderer,NodeHooks:Mr.NodeHooks,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendNodeContextExtender:(e,t,n)=>{},extendNodeRenderer:(e,t,n)=>{},extendNodeHooks:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),B2=e=>{const t=C.useContext(Xe),{DataOverlayRenderer:n,DataViewRenderer:r}=C.useContext(ji);if(e===void 0)return;const i=t.render_options(),[a]=Ea(e.type,i.typemap||{});return a?n[a]?n[a]:r[a]?L2(r[a]):F2:F2},qoe=e=>{const n=C.useContext(Xe).render_options(),{HandlePreviewRenderer:r,DataPreviewViewRenderer:i}=C.useContext(ji),a=B2(e);let s;if(e){const[u]=Ea(e.type,n.typemap||{});u?r[u]?s=r[u]:i[u]?s=i[u]:s=Nr(Nh):s=Nr(Nh)}return[s,a]},$2=({iostore:e,Component:t})=>{const[n,r]=C.useState(void 0),[i,a]=C.useState(void 0),{full:s}=e.valuestore();C.useEffect(()=>{s===void 0?e.getState().try_get_full_value():a(s.value)},[s]);const u=()=>{i!==void 0&&r(i)};return _.jsx(t,{iostore:e,value:i,preValue:n,onLoaded:u})},H2=({iostore:e,Component:t})=>_.jsx(t,{iostore:e}),Ea=(e,t)=>{if(typeof e=="string")return e in t?[t[e],e]:[e,e];if("allOf"in e&&e.allOf!==void 0)return[void 0,void 0];if("anyOf"in e&&e.anyOf!==void 0){const n=e.anyOf.map(r=>Ea(r,t));for(const r of n)switch(r[0]){case"bool":return["bool",r[1]];case"enum":return["enum",r[1]];case"float":return["float",r[1]];case"int":return["int",r[1]];case"string":return["string",r[1]];case"str":return["string",r[1]]}return[void 0,void 0]}return!("type"in e)||e.type===void 0?[void 0,void 0]:e.type==="enum"?["enum","enum"]:[void 0,void 0]},Xv=({iostore:e,typestring:t,preview:n,...r})=>{const[i,a]=C.useState(!1),[s,u]=C.useState(!1),f=C.useContext(Xe),d=e.use(),[h,p]=qoe(d),g=f.local_state(()=>f.reactflowRef);return _.jsxs(YR,{open:i||s,onOpenChange:u,children:[_.jsx(GR,{asChild:!0,children:_.jsx(Jl,{id:d.id,"data-type":t,...r})}),_.jsx(XR,{container:g,children:_.jsxs(WR,{className:"iotooltipcontent",sideOffset:5,children:[_.jsxs("div",{className:"iotooltip_container",children:[_.jsxs("div",{className:"iotooltip_header",children:[i?_.jsx(K7,{onClick:()=>a(!1)}):_.jsx(W7,{onClick:()=>a(!0)}),p&&_.jsx(vs,{title:d.full_id,trigger:_.jsx(lk,{}),onOpenChange:y=>{y&&d.try_get_full_value&&d.try_get_full_value(),a(y)},children:_.jsx($2,{Component:p,iostore:e})})]}),h?_.jsx(H2,{Component:h,iostore:e}):`no preview available for "${t}"`]}),_.jsx(SZ,{className:"iotooltipcontentarrow"})]})})]})},Vh={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>typeof e=="string"?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch{try{return JSON.parse("["+e+"]")}catch{}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},Yoe=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i,a]=Ea(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=C.useContext(ji),u=i?r.value_options?.options?Hh:s[i]:void 0,f=Vh[(a&&n.inputconverter?.[a])??""]||Vh[""];return r.hidden?null:_.jsxs("div",{className:"nodeinput","data-type":i,children:[_.jsx(Xv,{iostore:e,typestring:i,position:_e.Left,type:"target"}),u&&_.jsx("div",{className:"iovaluefield nodrag","data-type":i,children:_.jsx(u,{iostore:e,inputconverter:f})}),_.jsx("div",{className:"ioname",children:r.name}),_.jsx(Xv,{iostore:e,typestring:i,position:_e.Right,type:"source"})]})},Goe=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i]=Ea(r.type,n.typemap||{}),{Outputrenderer:a}=C.useContext(ji),s=i?a[i]:void 0;return r.hidden?null:_.jsxs("div",{className:"nodeoutput","data-type":i,children:[_.jsx(Xv,{iostore:e,typestring:i,position:_e.Right,type:"source"}),_.jsx("div",{className:"ioname",children:r.name}),s?_.jsx("div",{className:"iovaluefield nodrag",children:_.jsx(s,{iostore:e})}):_.jsx("div",{className:"iovaluefield",children:_.jsx(Foe,{iostore:e,typestring:i})})]})},Xoe=e=>{const t=C.useContext(Xe),n=B2(e),{DataPreviewViewRenderer:r,DataViewRenderer:i}=C.useContext(ji),a=t.render_options();if(e===void 0)return[void 0,n];const[s]=Ea(e.type,a.typemap||{});return s?r[s]?[r[s],n]:i[s]?[Nr(i[s]),n]:[Nr(Nh),n]:[Nr(Nh),n]};function Woe(e,t,n={}){const{maxFontSize:r=100,minFontSize:i=6,decrementFactor:a=.9}=n;if(!e||!t)return;if(a>=1||a<=0)throw new Error("decrementFactor must be between 0 and 1");const s=e.getBoundingClientRect(),u=s.width,f=s.height;let d=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=d+"px";let h=t.getBoundingClientRect();for(;(h.width>u||h.height>f)&&d>i;)d*=a,t.style.fontSize=d+"px",h=t.getBoundingClientRect()}function Koe(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n,unit_scale:r,elapsed:i,unit:a,unit_divisor:s,prefix:u="",rate:f=void 0,postfix:d=null,initial:h=0}=e;t!==null&&n>=t+.5&&(t=null);let p=n,g=t,y=f;r&&r!==!0&&r!==1&&(t!==null&&(g=t*r),p=n*r,f!==void 0&&(y=f*r));const b=V2(i);y===void 0&&i>0&&(y=(p-h)/i);const x=y?1/y:void 0,[E,S]=y?Uh(y,s):[void 0,""],[A,k]=x?Uh(x,1e3):[void 0,""],R=(E||"?")+`${S}${a}/s`,N=A?`${A}${k}s/`+a:"?",D=x&&x>1?N:R,P=r?Uh(p,s).join(""):p.toString(),F=r&&g!==null?Uh(g,s).join(""):g?.toString()??"?",V=y&&g!==null?(g-p)/y:0,T=y?V2(V):"?",$=u?`${u}: `:"";if(t!==null){const H=p/t*100,G=` ${P}/${F} [${b} < ${T}, ${D}${d??""}]`;return`${$}${H.toFixed(0)}%${G}`}return`${$}${P}${a} [${b}, ${D}${d??""}]`}function V2(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function Uh(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const Zoe=({state:e,className:t="reacttqdm",...n})=>{const r=C.useRef(null),i=C.useRef(null);C.useEffect(()=>{const s=()=>{!r.current||!i.current||Woe(r.current,i.current,{maxFontSize:12,decrementFactor:.9})};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]);const a=e.total?e.n/e.total*100:0;return _.jsx("div",{ref:r,className:t,...n,children:_.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[_.jsx("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"},children:_.jsx("div",{className:t+"-progress",style:{width:`${a}%`,height:"100%"}})}),_.jsx("div",{className:t+"-text",ref:i,children:Koe(e)})]})})},Qoe=C.memo(({node_data:e})=>{const t=C.useContext(Xe),n=()=>{t.on_node_action({type:"trigger",from_remote:!1,id:e.id})};return _.jsxs("div",{className:"nodeheader",title:e.description||e.node_name,children:[_.jsxs("div",{className:"nodeheader_element",children:[_.jsx(Q7,{fontSize:"inherit",className:"triggerbutton",onClick:n}),_.jsx(Z7,{fontSize:"inherit",onClick:async()=>{console.log("nodestatus",await t.worker?.get_node_status(e.id))}})]}),_.jsx("div",{className:"nodeheader_element nodeheader_title",children:_.jsx("div",{className:"nodeheader_title_text",children:e.node_name})}),_.jsx("div",{className:"nodeheader_element",children:_.jsx(du,{fontSize:"inherit"})})]})}),Joe=({iostore:e,node_data:t})=>{const n=e.use(),[r,i]=Xoe(n);return _.jsx("div",{className:"nodrag nodedatabody","data-src":t.render_options?.data?.src||"",children:r&&n&&_.jsx(vs,{title:n.full_id,trigger:_.jsx("div",{className:"nodedatabutton",children:_.jsx(H2,{Component:r,iostore:e})}),onOpenChange:a=>{a&&n?.try_get_full_value&&n?.try_get_full_value()},children:i&&_.jsx($2,{Component:i,iostore:e})})})},eae=C.memo(({node_data:e})=>{const t=e.render_options?.data?.src?e.io[e.render_options?.data?.src]:void 0;return _.jsxs("div",{className:"nodebody",children:[e.outputs.map(n=>_.jsx(Goe,{iostore:e.io[n]},n)),t&&_.jsx(Joe,{node_data:e,iostore:t}),e.inputs.map(n=>_.jsx(Yoe,{iostore:e.io[n]},n))]})}),U2=C.memo(({node_data:e})=>{const[t,n]=C.useState(e.name);C.useEffect(()=>{n(e.name)},[e]);const r=C.useContext(Xe),i=s=>{n(s.target.value)},a=s=>{const u=s.target.value;r.on_node_action({type:"update",from_remote:!1,id:e.id,node:{name:u}})};return _.jsx("input",{className:"nodename_input",value:t,onChange:i,onBlur:a})}),tae=({node_data:e})=>{if(!e.progress)return null;const t=e.progress();return _.jsx(Zoe,{state:t,className:"nodeprogress"})},nae=C.memo(({node_data:e})=>_.jsxs("div",{className:"nodefooter",children:[e.error&&_.jsx("div",{className:"nodeerror",children:e.error}),_.jsx(tae,{node_data:e})]})),rae=e=>{const t=C.useContext(Xe),[n,r]=C.useState(!1),i=e.in_trigger(),a=C.useContext(ji),s=a.NodeContextExtenders[e.node_id],u=C.useMemo(()=>s?.({node_data:e})||{},[s,e]),f=C.useMemo(()=>({...u,node_data:e}),[u,e]),d=a.NodeHooks[e.node_id];for(const h of d||[])h({nodecontext:f});return C.useEffect(()=>{t.worker?.call_hooks("node_mounted",e.id)},[t.worker,e.id]),C.useEffect(()=>{let h;return i&&!n?r(!0):n&&(h=setTimeout(()=>r(!1),200)),()=>clearTimeout(h)},[i,n]),{visualTrigger:n,nodecontext:f}},q2=C.createContext(null),iae=({data:e})=>{const t=e.nodestore.use(),n=t.properties["frontend:collapsed"]||!1,{visualTrigger:r,nodecontext:i}=rae(t);return _.jsx(q2.Provider,{value:i,children:_.jsxs("div",{className:"innernode"+(r?" intrigger":"")+(t.error?" error":""),children:[_.jsx(Qoe,{node_data:t}),_.jsx(U2,{node_data:t}),n?null:_.jsx(eae,{node_data:t}),_.jsx(nae,{node_data:t})]})})},oae=({iostore:e})=>{const n=C.useContext(Xe).render_options(),r=e.use(),[i,a]=Ea(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=C.useContext(ji),u=i?r.value_options?.options?Hh:s[i]:void 0,f=Vh[(a&&n.inputconverter?.[a])??""]||Vh[""];return _.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:r.name}),u&&_.jsx(u,{iostore:e,inputconverter:f}),_.jsx("div",{children:_.jsxs("label",{children:["hidden:",_.jsx("input",{className:"styledcheckbox",type:"checkbox",disabled:r.connected,onChange:d=>{r.set_hidden?.(d.target.checked)},checked:r.hidden})]})})]})},aae=({iostore:e})=>{const t=e.use();return _.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:t.name}),_.jsx("div",{children:_.jsxs("label",{children:["hidden:",_.jsx("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:n=>{t.set_hidden?.(n.target.checked)},checked:t.hidden})]})})]})},sae=({nodestore:e})=>{const t=e.use();return _.jsxs("div",{className:"nodesettings_content",children:[_.jsx("div",{className:"nodesettings_section",children:_.jsxs("div",{className:"nodesettings_component",children:[_.jsx("div",{children:"Name"}),_.jsx("div",{children:_.jsx(U2,{node_data:t})})]})}),_.jsxs("div",{className:"nodesettings_section",children:[_.jsx("div",{children:"Inputs"}),t.inputs.map(n=>_.jsx(oae,{iostore:t.io[n]},n))]}),_.jsxs("div",{className:"nodesettings_section",children:[_.jsx("div",{children:"Outputs"}),t.outputs.map(n=>_.jsx(aae,{iostore:t.io[n]},n))]})]})},lae=()=>{const e=C.useContext(Xe),t=e.local_state(r=>r.selected_nodes);if(t.length===0)return _.jsx("div",{children:"Node Settings"});if(t.length>1)return _.jsx("div",{children:"Multiple Nodes Selected"});const n=e.nodespace.get_node(t[0]);return n?_.jsx(sae,{nodestore:n}):_.jsx("div",{children:"Node not found"})},uae=()=>{const e=C.useContext(Xe),t=e.local_settings(i=>i.view_settings.expand_node_props),n=e.local_settings(i=>i.update_view_settings),r=i=>{n({expand_node_props:i})};return _.jsx(IA,{direction:"left",expanded:t===void 0?!1:t,containerClassName:"pos-right pos-top bg1 h-12",className:"nodesettings_content",onExpandChange:r,children:_.jsx(lae,{})})},cae=({id:e,sourceX:t,sourceY:n,targetX:r,targetY:i,sourcePosition:a,targetPosition:s,data:u,...f})=>{const[d]=$m({sourceX:t,sourceY:n,sourcePosition:a,targetX:r,targetY:i,targetPosition:s});return _.jsx(_.Fragment,{children:_.jsx(eu,{id:e,path:d,...f})})},fae=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),dae={default:iae},hae={default:cae},pae=()=>{const e=Ql(),t=C.useContext(Xe);return t.rf_instance=e,_.jsx(_.Fragment,{})},mae=()=>{const e=C.useContext(Xe),t=ns("Delete"),n=wL(),r=bL();if(t){for(const i of n)if(i.selected){if(!e.worker)return _.jsx(_.Fragment,{});if(!i.source||!i.target)return _.jsx(_.Fragment,{});if(!i.sourceHandle||!i.targetHandle)return _.jsx(_.Fragment,{});e.worker.remove_edge({src_nid:i.source,src_ioid:i.sourceHandle,trg_nid:i.target,trg_ioid:i.targetHandle})}for(const i of r)if(i.selected){if(!e.worker)return _.jsx(_.Fragment,{});e.worker.remove_node(i.id)}}return _.jsx(_.Fragment,{})},gae=({id:e,top:t,left:n,right:r,bottom:i,...a})=>{const{getNode:s,setNodes:u,addNodes:f,setEdges:d}=Ql(),h=C.useContext(Xe),p=C.useCallback(()=>{const x=s(e);if(!x)return;const E={x:x.position.x+50,y:x.position.y+50};f({...x,id:`${x.id}-copy`,position:E})},[e,s,f]),g=C.useCallback(()=>{h.on_node_action({type:"delete",id:e,from_remote:!1})},[e,u,d]),y=h.nodespace.get_node(e,!1);if(!y)return _.jsx(_.Fragment,{children:" "});const b=y.use();return _.jsxs("div",{style:{top:t,left:n,right:r,bottom:i},className:"context-menu",...a,children:[_.jsx("p",{style:{fontWeight:"bold"},children:_.jsx("small",{children:b.name})}),_.jsx("button",{onClick:p,children:"duplicate"}),_.jsx("button",{onClick:g,children:"delete"})]})},yae=e=>{const t=C.useContext(Xe),n=C.useRef(null);C.useEffect(()=>{t.reactflowRef=n.current},[n]);const[r,i]=C.useState(null),a=({nodes:g,edges:y})=>{const b=t.local_state.getState();t.local_state.setState({...b,selected_nodes:g.map(x=>x.id),selected_edges:y.map(x=>x.id)})},s=C.useCallback(()=>i(null),[i]),{nodes:u,edges:f,onNodesChange:d,onEdgesChange:h,onConnect:p}=t.useReactFlowStore(dZ(fae));return _.jsx("div",{className:"reactflowlayer",children:_.jsxs(yL,{nodes:u,edges:f,onNodesChange:d,onEdgesChange:h,onConnect:p,nodeTypes:dae,edgeTypes:hae,minZoom:e.minZoom,maxZoom:e.maxZoom,fitView:!0,onSelectionChange:a,ref:n,onPaneClick:s,panOnDrag:!e.static,children:[_.jsx(pae,{}),_.jsx(mae,{}),_.jsx(kL,{color:"#888",gap:16,size:1}),e.minimap&&_.jsx(qL,{nodeStrokeWidth:3,pannable:!e.static,zoomable:!e.static,zoomStep:3}),r&&_.jsx(gae,{onClick:s,...r})]})})},qh=C.createContext(void 0),Ca=C.forwardRef((e,t)=>{const{asChild:n,children:r,className:i,style:a,...s}=e,[u,f]=C.useState(!1),d=C.useRef(null),[h,p]=C.useState(null),[g,y]=C.useState({}),b=e.htime||300,x=e.vtime||300,E=e.hdelay||0,S=e.vdelay||200;C.useImperativeHandle(t,()=>d.current,[]);const A=async()=>{if(!d.current)return;d.current.style.transition="none",d.current.style.position="",d.current.style.top="",d.current.style.left="",d.current.style.width="",d.current.style.height="";const P=d.current.getBoundingClientRect();p([P.left,P.top,P.width,P.height]),d.current.style.transition="none",y({position:"absolute",top:`${P.top}px`,left:`${P.left}px`,width:`${P.width}px`,height:`${P.height}px`}),y(H=>({...H,transitionProperty:"width, left, height, top",transitionDuration:`${b}ms, ${b}ms, ${x}ms, ${x}ms`})),f(!0);const F=new Promise(H=>{setTimeout(()=>{y(G=>({...G,left:"0px",width:"100vw"})),H()},E)}),V=new Promise(H=>{setTimeout(()=>{y(G=>({...G,top:"0px",height:"100vh"})),H()},S)}),T=Math.max(b+E,x+S),$=new Promise(H=>{setTimeout(()=>{H()},T)});await Promise.all([F,V,$])},k=async()=>{if(!d.current||!h)return;const P={transitionProperty:"width, left, height, top",transitionDuration:`${b}ms, ${b}ms, ${x}ms, ${x}ms`};y(z=>({...z,...P}));const[F,V,T,$]=h,H=new Promise(z=>{setTimeout(()=>{y(B=>({...B,left:`${F}px`,width:`${T}px`})),z()},S)}),G=new Promise(z=>{setTimeout(()=>{y(B=>({...B,top:`${V}px`,height:`${$}px`})),z()},E)}),j=Math.max(b+E,x+S),U=new Promise(z=>{setTimeout(()=>{z()},j)});await Promise.all([H,G,U]),d.current.style.transition="",y({}),f(!1)},R=async()=>{d.current&&(u?await k():await A())};let N;if(n&&C.isValidElement(r)){const P=r,F=[P.props.className,i,"smooth-expand",u?"smooth-expand-expanded":""].filter(Boolean).join(" "),V={...P.props.style,...a,...g};N=C.cloneElement(P,{ref:d,className:F,style:V,...s})}else N=_.jsx("div",{ref:d,...s,className:`smooth-expand ${u?"smooth-expand-expanded":""} ${i||""}`,style:{...a,...g},children:r});const D=_.jsx(qh.Provider,{value:{isExpanded:u,toggleExpand:R},children:N});return u?Zl.createPortal(D,document.body):D});Ca.Trigger=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return _.jsx("div",{style:{cursor:"pointer"},onClick:t.toggleExpand,children:e})},Ca.Expanded=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return t.isExpanded?_.jsx(_.Fragment,{children:e}):null},Ca.Collapsed=function({children:e}){const t=C.useContext(qh);if(!t)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return t.isExpanded?null:_.jsx(_.Fragment,{children:e})};const Yh=C.createContext(void 0),Eo=C.forwardRef((e,t)=>{const{asChild:n,children:r,className:i,style:a,...s}=e,u=C.useRef(null);C.useImperativeHandle(t,()=>u.current,[]);const[f,d]=C.useState(!1),h=C.useCallback(async()=>{try{const g=u.current;if(!g)return;if(!f)g.requestFullscreen?await g.requestFullscreen():g.mozRequestFullScreen?await g.mozRequestFullScreen():g.webkitRequestFullscreen?await g.webkitRequestFullscreen():g.msRequestFullscreen&&await g.msRequestFullscreen(),d(!0);else{const y=document;y.exitFullscreen?await y.exitFullscreen():y.mozCancelFullScreen?await y.mozCancelFullScreen():y.webkitExitFullscreen?await y.webkitExitFullscreen():y.msExitFullscreen&&await y.msExitFullscreen(),d(!1)}}catch(g){console.error("Error toggling fullscreen",g)}},[f]);C.useEffect(()=>{const g=()=>{const y=document.fullscreenElement;d(!!y)};return document.addEventListener("fullscreenchange",g),document.addEventListener("webkitfullscreenchange",g),document.addEventListener("mozfullscreenchange",g),document.addEventListener("MSFullscreenChange",g),()=>{document.removeEventListener("fullscreenchange",g),document.removeEventListener("webkitfullscreenchange",g),document.removeEventListener("mozfullscreenchange",g),document.removeEventListener("MSFullscreenChange",g)}},[]);let p;if(n&&C.isValidElement(r)){const g=r,y=[g.props.className,i].filter(Boolean).join(" "),b={...g.props.style,...a};p=C.cloneElement(g,{ref:u,className:y,style:b,...s})}else p=_.jsx("div",{ref:u,...s,className:i,style:a,children:r});return _.jsx(Yh.Provider,{value:{isFullScreen:f,toggleFullscreen:h},children:p})});Eo.Trigger=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return _.jsx("div",{style:{cursor:"pointer"},onClick:t.toggleFullscreen,children:e})},Eo.InFullScreen=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return t.isFullScreen?_.jsx(_.Fragment,{children:e}):null},Eo.OutFullScreen=function({children:e}){const t=C.useContext(Yh);if(!t)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return t.isFullScreen?null:_.jsx(_.Fragment,{children:e})};const vae=({fnrf_zst:e,header:t,flow:n,library:r})=>{const[i,a]=C.useState(e.options.worker),s=C.useRef(null);e.workermanager&&(e.workermanager.on_setWorker=a),e.set_worker(i),C.useEffect(()=>{e.auto_progress()},[]),C.useEffect(()=>{e.local_state.setState({funcnodescontainerRef:s.current})},[s]);const u=e.plugins();return _.jsx(Uoe,{plugins:u,fnrf_zst:e,children:_.jsx(Xe.Provider,{value:e,children:_.jsx(Ca,{asChild:!0,children:_.jsx(Eo,{asChild:!0,children:_.jsx(RU,{style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",flex:1},children:_.jsxs("div",{ref:s,className:"funcnodesreactflowcontainer funcnodescontainer",children:[t.show&&_.jsx(LU,{...t}),_.jsxs("div",{className:"funcnodesreactflowbody",children:[_.jsx(yae,{...n}),i&&r.show&&_.jsx(uZ,{}),i&&n.showNodeSettings&&_.jsx(uae,{})]}),_.jsxs("div",{className:"funcnodesflaotingmenu",children:[_.jsx(Eo.OutFullScreen,{children:n.allowExpand&&_.jsxs(Ca.Trigger,{children:[_.jsx(Ca.Expanded,{children:_.jsx(G7,{size:"xl",style:{padding:"4px"}})}),_.jsx(Ca.Collapsed,{children:_.jsx(X7,{size:"xl",style:{padding:"4px"}})})]})}),n.allowFullScreen&&_.jsxs(Eo.Trigger,{children:[_.jsx(Eo.OutFullScreen,{children:_.jsx(lk,{size:"xl",style:{padding:"4px"}})}),_.jsx(Eo.InFullScreen,{children:_.jsx(Y7,{size:"xl",style:{padding:"4px"}})})]})]})]})})})})})})},Wv={};window.fnrf_zst===void 0&&(window.fnrf_zst=Wv);const Y2={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},Xe=C.createContext(y_(Y2)),bae=e=>{let t=nf(e,{...Y2,id:tE()}).new_obj;if(!t.useWorkerManager&&t.worker===void 0)return _.jsx("div",{children:"Error: If you don't use a worker manager, you must provide a default worker."});if(e.useWorkerManager&&e.workermanager_url===void 0)return _.jsx("div",{children:"Error: If you use a worker manager, you must provide a worker manager url."});let n=Wv[t.id];n===void 0&&(n=y_(t),Wv[t.id]=n),n.options.debug=t.debug;const[r,i]=C.useState(t);return C.useEffect(()=>{const a=[];if(r.worker===void 0&&r.worker_url!==void 0){r.useWorkerManager=!1;const s=new nE({url:r.worker_url,uuid:r.id,on_sync_complete:r.on_sync_complete});r.worker=s,a.push(()=>{s.disconnect()})}if(r.fnw_url!==void 0){if(r.worker===void 0)throw new Error("defining fnw_url requires a worker to be defined");const s=F9(r.fnw_url),u=r.worker.on_sync_complete,f=async d=>{const h=await s;d.on_sync_complete=u,await d.update_from_export(h)};r.worker.on_sync_complete=f}if(r.worker!==void 0&&r.worker.set_zustand(n),t.useWorkerManager){const s=new N9(t.workermanager_url,n);n.workermanager=s,a.push(()=>{s.remove()})}return i({...r}),r.on_ready&&typeof r.on_ready=="function"&&r.on_ready({fnrf_zst:n}),()=>{for(const s of a)s()}},[]),_.jsx(vae,{fnrf_zst:n,header:r.header,library:r.library,flow:r.flow})},xae=e=>(new g_("FuncNodes",e.debug?"debug":"info").debug("Initalizing FuncNodes with props:",e),_.jsx("div",{className:"FuncnodesApp",children:_.jsx(bae,{...e})}));var Kv={exports:{}},Zu={},Zv={exports:{}},Qv={};/**
|
801
801
|
* @license React
|
802
802
|
* scheduler.production.js
|
803
803
|
*
|