@linkdlab/funcnodes_react_flow 0.3.12 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.esm.js +2 -2
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/style.css +79 -79
- package/dist/iife/index.js +106 -0
- package/dist/iife/index.js.map +1 -0
- package/dist/iife/style.css +1726 -0
- package/dist/index.d.ts +1 -1
- package/dist/style.css +79 -79
- package/dist/umd/index.umd.js +2 -2
- package/dist/umd/index.umd.js.map +1 -1
- package/dist/umd/style.css +79 -79
- package/package.json +3 -3
package/dist/umd/index.umd.js
CHANGED
|
@@ -137,10 +137,10 @@ function(e,t){const n=dy(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
|
|
|
137
137
|
animation-iteration-count: infinite;
|
|
138
138
|
animation-delay: 200ms;
|
|
139
139
|
}
|
|
140
|
-
`,Tw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=n,[l,c]=r.useState([]),u=r.useRef(0),d=r.useRef(null);r.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=r.useRef(!1),f=uh(),h=r.useRef(null),m=r.useRef(null),g=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,Lu.jsx(Ow,{classes:{ripple:wh(i.ripple,Iw.ripple),rippleVisible:wh(i.rippleVisible,Iw.rippleVisible),ripplePulsate:wh(i.ripplePulsate,Iw.ripplePulsate),child:wh(i.child,Iw.child),childLeaving:wh(i.childLeaving,Iw.childLeaving),childPulsate:wh(i.childPulsate,Iw.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),y=r.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,f]),b=r.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=r.useCallback(((e,t)=>{if(f.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void f.start(0,(()=>{v(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[f]);return r.useImperativeHandle(t,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Lu.jsx(Rw,{className:wh(Iw.root,i.root,a),ref:m,...s,children:Lu.jsx(kw,{component:null,exit:!0,children:l})})}));function Mw(e){return yh("MuiButtonBase",e)}"production"!==process.env.NODE_ENV&&(Tw.propTypes={center:Yf.bool,classes:Yf.object,className:Yf.string});const Pw=bh("MuiButtonBase",["root","disabled","focusVisible"]),Dw=gv("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Pw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Bw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:f,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:b,onFocus:v,onFocusVisible:w,onKeyDown:x,onKeyUp:C,onMouseDown:E,onMouseLeave:k,onMouseUp:S,onTouchEnd:I,onTouchMove:_,onTouchStart:A,tabIndex:N=0,TouchRippleProps:R,touchRippleRef:O,type:T,...M}=n,P=r.useRef(null),D=hw.use(),B=ih(D.ref,O),[j,L]=r.useState(!1);c&&j&&L(!1),r.useImperativeHandle(o,(()=>({focusVisible:()=>{L(!0),P.current.focus()}})),[]);const F=D.shouldMount&&!u&&!c;r.useEffect((()=>{j&&p&&!u&&D.pulsate()}),[u,p,j,D]);const V=jw(D,"start",E,d),z=jw(D,"stop",y,d),G=jw(D,"stop",b,d),W=jw(D,"stop",S,d),H=jw(D,"stop",(e=>{j&&e.preventDefault(),k&&k(e)}),d),X=jw(D,"start",A,d),Z=jw(D,"stop",I,d),$=jw(D,"stop",_,d),Y=jw(D,"stop",(e=>{dh(e.target)||L(!1),m&&m(e)}),!1),U=oh((e=>{P.current||(P.current=e.currentTarget),dh(e.target)&&(L(!0),w&&w(e)),v&&v(e)})),J=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},K=oh((e=>{p&&!e.repeat&&j&&" "===e.key&&D.stop(e,(()=>{D.start(e)})),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),Q=oh((e=>{p&&" "===e.key&&j&&!e.defaultPrevented&&D.stop(e,(()=>{D.pulsate(e)})),C&&C(e),g&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let q=l;"button"===q&&(M.href||M.to)&&(q=h);const ee={};"button"===q?(ee.type=void 0===T?"button":T,ee.disabled=c):(M.href||M.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=ih(t,P),ne={...n,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:N,focusVisible:j},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=fh({root:["root",t&&"disabled",n&&"focusVisible"]},Mw,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return Lu.jsxs(Dw,{as:q,className:wh(re.root,s),ownerState:ne,onBlur:Y,onClick:g,onContextMenu:z,onFocus:U,onKeyDown:K,onKeyUp:Q,onMouseDown:V,onMouseLeave:H,onMouseUp:W,onDragLeave:G,onTouchEnd:Z,onTouchMove:$,onTouchStart:X,ref:te,tabIndex:c?-1:N,type:T,...ee,...M,children:[a,F?Lu.jsx(Tw,{ref:B,center:i,...R}):null]})}));function jw(e,t,n,r=!1){return oh((o=>(n&&n(o),r||e[t](o),!0)))}"production"!==process.env.NODE_ENV&&(Bw.propTypes={action:th,centerRipple:Yf.bool,children:Yf.node,classes:Yf.object,className:Yf.string,component:Kf,disabled:Yf.bool,disableRipple:Yf.bool,disableTouchRipple:Yf.bool,focusRipple:Yf.bool,focusVisibleClassName:Yf.string,href:Yf.any,LinkComponent:Yf.elementType,onBlur:Yf.func,onClick:Yf.func,onContextMenu:Yf.func,onDragLeave:Yf.func,onFocus:Yf.func,onFocusVisible:Yf.func,onKeyDown:Yf.func,onKeyUp:Yf.func,onMouseDown:Yf.func,onMouseLeave:Yf.func,onMouseUp:Yf.func,onTouchEnd:Yf.func,onTouchMove:Yf.func,onTouchStart:Yf.func,sx:Yf.oneOfType([Yf.arrayOf(Yf.oneOfType([Yf.func,Yf.object,Yf.bool])),Yf.func,Yf.object]),tabIndex:Yf.number,TouchRippleProps:Yf.object,touchRippleRef:Yf.oneOfType([Yf.func,Yf.shape({current:Yf.shape({pulsate:Yf.func.isRequired,start:Yf.func.isRequired,stop:Yf.func.isRequired})})]),type:Yf.oneOfType([Yf.oneOf(["button","reset","submit"]),Yf.string])});var Lw=Cv(Lu.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Fw(e){return yh("MuiTableSortLabel",e)}const Vw=bh("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function zw(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,f=u[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=Ch({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),b=ih(y,h?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:{...t,ownerState:{...t.ownerState,...n}}}(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[f,w]}const Gw=gv(Bw,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(yv((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${Vw.icon}`]:{opacity:.5}},[`&.${Vw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Vw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),Ww=gv("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${nh(n.direction)}`]]}})(yv((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),Hw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=Lw,slots:c={},slotProps:u={},...d}=n,p={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},f=(e=>{const{classes:t,direction:n,active:r}=e;return fh({root:["root",r&&"active",`direction${nh(n)}`],icon:["icon",`iconDirection${nh(n)}`]},Fw,t)})(p),h={slots:c,slotProps:u},[m,g]=zw("root",{elementType:Gw,externalForwardedProps:h,ownerState:p,className:wh(f.root,i),ref:t}),[y,b]=zw("icon",{elementType:Ww,externalForwardedProps:h,ownerState:p,className:f.icon});return Lu.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,s&&!r?null:Lu.jsx(y,{as:l,...b})]})}));"production"!==process.env.NODE_ENV&&(Hw.propTypes={active:Yf.bool,children:Yf.node,classes:Yf.object,className:Yf.string,direction:Yf.oneOf(["asc","desc"]),hideSortIcon:Yf.bool,IconComponent:Yf.elementType,slotProps:Yf.shape({icon:Yf.oneOfType([Yf.func,Yf.object]),root:Yf.oneOfType([Yf.func,Yf.object])}),slots:Yf.shape({icon:Yf.elementType,root:Yf.elementType}),sx:Yf.oneOfType([Yf.arrayOf(Yf.oneOfType([Yf.func,Yf.object,Yf.bool])),Yf.func,Yf.object])});var Xw=Cv(Lu.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Zw=Cv(Lu.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");const $w=({trigger:t,title:n,description:r,children:o,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:l,setOpen:c,modal:u=!0})=>e.createElement(Kp,{open:l,onOpenChange:e=>{c&&c(e),a&&a(e)},modal:u},t&&e.createElement(Qp,{asChild:!0},t),e.createElement(qp,null,e.createElement(ef,{className:"dialogoverlay funcnodescontainer"}),e.createElement(tf,{className:"dialogconent funcnodescontainer "},n&&e.createElement(nf,{className:"dialogtitle"},n),r&&e.createElement(rf,{className:"dialogdescription"},r),e.createElement("div",{className:"dialogchildren"},o),e.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(s||[]).map(((t,n)=>e.createElement(of,{asChild:!0,key:n},e.createElement("button",{className:"dialogsendbutton",onClick:t.onClick},t.text))))),i&&e.createElement(of,{asChild:!0},e.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},e.createElement(Xw,null))))));function Yw(t){const n=t+"CollectionProvider",[r,o]=Fu(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:n,children:r}=t,o=e.useRef(null),a=e.useRef(new Map).current;return Lu.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=t+"CollectionSlot",c=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Ru(t,a(l,n).collectionRef);return Lu.jsx($u,{ref:o,children:r})}));c.displayName=l;const u=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,s=e.useRef(null),l=Ru(n,s),c=a(u,r);return e.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),Lu.jsx($u,{[d]:"",ref:l,children:o})}));return p.displayName=u,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}var Uw=r.createContext(void 0);function Jw(e){const t=r.useContext(Uw);return e||t||"ltr"}const Kw=["top","right","bottom","left"],Qw=Math.min,qw=Math.max,ex=Math.round,tx=Math.floor,nx=e=>({x:e,y:e}),rx={left:"right",right:"left",bottom:"top",top:"bottom"},ox={start:"end",end:"start"};function ix(e,t,n){return qw(e,Qw(t,n))}function ax(e,t){return"function"==typeof e?e(t):e}function sx(e){return e.split("-")[0]}function lx(e){return e.split("-")[1]}function cx(e){return"x"===e?"y":"x"}function ux(e){return"y"===e?"height":"width"}function dx(e){return["top","bottom"].includes(sx(e))?"y":"x"}function px(e){return cx(dx(e))}function fx(e){return e.replace(/start|end/g,(e=>ox[e]))}function hx(e){return e.replace(/left|right|bottom|top/g,(e=>rx[e]))}function mx(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function gx(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yx(e,t,n){let{reference:r,floating:o}=e;const i=dx(t),a=px(t),s=ux(a),l=sx(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(lx(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function bx(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ax(t,e),h=mx(f),m=s[p?"floating"===d?"reference":"floating":d],g=gx(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=gx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}function vx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wx(e){return Kw.some((t=>e[t]>=0))}function xx(){return"undefined"!=typeof window}function Cx(e){return Sx(e)?(e.nodeName||"").toLowerCase():"#document"}function Ex(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kx(e){var t;return null==(t=(Sx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Sx(e){return!!xx()&&(e instanceof Node||e instanceof Ex(e).Node)}function Ix(e){return!!xx()&&(e instanceof Element||e instanceof Ex(e).Element)}function _x(e){return!!xx()&&(e instanceof HTMLElement||e instanceof Ex(e).HTMLElement)}function Ax(e){return!(!xx()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ex(e).ShadowRoot)}function Nx(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dx(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Rx(e){return["table","td","th"].includes(Cx(e))}function Ox(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Tx(e){const t=Mx(),n=Ix(e)?Dx(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Mx(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Px(e){return["html","body","#document"].includes(Cx(e))}function Dx(e){return Ex(e).getComputedStyle(e)}function Bx(e){return Ix(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jx(e){if("html"===Cx(e))return e;const t=e.assignedSlot||e.parentNode||Ax(e)&&e.host||kx(e);return Ax(t)?t.host:t}function Lx(e){const t=jx(e);return Px(t)?e.ownerDocument?e.ownerDocument.body:e.body:_x(t)&&Nx(t)?t:Lx(t)}function Fx(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Lx(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ex(o);if(i){const e=Vx(a);return t.concat(a,a.visualViewport||[],Nx(o)?o:[],e&&n?Fx(e):[])}return t.concat(o,Fx(o,[],n))}function Vx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zx(e){const t=Dx(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_x(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ex(n)!==i||ex(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Gx(e){return Ix(e)?e:e.contextElement}function Wx(e){const t=Gx(e);if(!_x(t))return nx(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zx(t);let a=(i?ex(n.width):n.width)/r,s=(i?ex(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Hx=nx(0);function Xx(e){const t=Ex(e);return Mx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Hx}function Zx(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Gx(e);let a=nx(1);t&&(r?Ix(r)&&(a=Wx(r)):a=Wx(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ex(e))&&t}(i,n,r)?Xx(i):nx(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ex(i),t=r&&Ix(r)?Ex(r):r;let n=e,o=Vx(n);for(;o&&r&&t!==n;){const e=Wx(o),t=o.getBoundingClientRect(),r=Dx(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ex(o),o=Vx(n)}}return gx({width:u,height:d,x:l,y:c})}function $x(e,t){const n=Bx(e).scrollLeft;return t?t.left+n:Zx(kx(e)).left+n}function Yx(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:$x(e,r)),y:r.top+t.scrollTop}}function Ux(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ex(e),r=kx(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Mx();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=kx(e),n=Bx(e),r=e.ownerDocument.body,o=qw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+$x(e);const s=-n.scrollTop;return"rtl"===Dx(r).direction&&(a+=qw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(kx(e));else if(Ix(t))r=function(e,t){const n=Zx(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_x(e)?Wx(e):nx(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Xx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return gx(r)}function Jx(e,t){const n=jx(e);return!(n===t||!Ix(n)||Px(n))&&("fixed"===Dx(n).position||Jx(n,t))}function Kx(e,t,n){const r=_x(t),o=kx(t),i="fixed"===n,a=Zx(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nx(0);if(r||!r&&!i)if(("body"!==Cx(t)||Nx(o))&&(s=Bx(t)),r){const e=Zx(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=$x(o));const c=!o||r||i?nx(0):Yx(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Qx(e){return"static"===Dx(e).position}function qx(e,t){if(!_x(e)||"fixed"===Dx(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kx(e)===n&&(n=n.ownerDocument.body),n}function eC(e,t){const n=Ex(e);if(Ox(e))return n;if(!_x(e)){let t=jx(e);for(;t&&!Px(t);){if(Ix(t)&&!Qx(t))return t;t=jx(t)}return n}let r=qx(e,t);for(;r&&Rx(r)&&Qx(r);)r=qx(r,t);return r&&Px(r)&&Qx(r)&&!Tx(r)?n:r||function(e){let t=jx(e);for(;_x(t)&&!Px(t);){if(Tx(t))return t;if(Ox(t))return null;t=jx(t)}return null}(e)||n}const tC={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=kx(r),s=!!t&&Ox(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nx(1);const u=nx(0),d=_x(r);if((d||!d&&!i)&&(("body"!==Cx(r)||Nx(a))&&(l=Bx(r)),_x(r))){const e=Zx(r);c=Wx(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nx(0):Yx(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:kx,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ox(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Fx(e,[],!1).filter((e=>Ix(e)&&"body"!==Cx(e))),o=null;const i="fixed"===Dx(e).position;let a=i?jx(e):e;for(;Ix(a)&&!Px(a);){const t=Dx(a),n=Tx(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Nx(a)&&!n&&Jx(e,a))?r=r.filter((e=>e!==a)):o=t,a=jx(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Ux(t,n,o);return e.top=qw(r.top,e.top),e.right=Qw(r.right,e.right),e.bottom=Qw(r.bottom,e.bottom),e.left=qw(r.left,e.left),e}),Ux(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:eC,getElementRects:async function(e){const t=this.getOffsetParent||eC,n=this.getDimensions,r=await n(e.floating);return{reference:Kx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zx(e);return{width:t,height:n}},getScale:Wx,isElement:Ix,isRTL:function(e){return"rtl"===Dx(e).direction}};function nC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rC(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Gx(e),u=o||i?[...c?Fx(c):[],...Fx(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=kx(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-tx(d)+"px "+-tx(o.clientWidth-(u+p))+"px "+-tx(o.clientHeight-(d+f))+"px "+-tx(u)+"px",threshold:qw(0,Qw(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||nC(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?Zx(e):null;return l&&function t(){const r=Zx(e);m&&!nC(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const oC=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sx(n),s=lx(n),l="y"===dx(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ax(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},iC=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ax(e,t),c={x:n,y:r},u=await bx(t,l),d=dx(sx(o)),p=cx(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=ix(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";h=ix(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},aC=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ax(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=sx(o),b=dx(s),v=sx(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[hx(s)]:function(e){const t=hx(e);return[fx(e),t,fx(t)]}(s)),C="none"!==h;!p&&C&&x.push(...function(e,t,n,r){const o=lx(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(sx(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fx)))),i}(s,m,h,w));const E=[s,...x],k=await bx(t,g),S=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(k[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lx(e),o=px(e),i=ux(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=hx(a)),[a,hx(a)]}(o,a,w);S.push(k[e[0]],k[e[1]])}if(I=[...I,{placement:o,overflows:S}],!S.every((e=>e<=0))){var _,A;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(A=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=I.filter((e=>{if(C){const t=dx(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},sC=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ax(e,t),u=await bx(t,c),d=sx(o),p=lx(o),f="y"===dx(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,w=Qw(m-u[g],b),x=Qw(h-u[y],v),C=!t.middlewareData.shift;let E=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),C&&!p){const e=qw(u.left,0),t=qw(u.right,0),n=qw(u.top,0),r=qw(u.bottom,0);f?k=h-2*(0!==e||0!==t?e+t:qw(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:qw(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:E});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},lC=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ax(e,t);switch(r){case"referenceHidden":{const e=vx(await bx(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:wx(e)}}}case"escaped":{const e=vx(await bx(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:wx(e)}}}default:return{}}}}},cC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ax(e,t)||{};if(null==c)return{};const d=mx(u),p={x:n,y:r},f=px(o),h=ux(f),m=await a.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=C?C[v]:0;E&&await(null==a.isElement?void 0:a.isElement(C))||(E=s.floating[v]||i.floating[h]);const k=w/2-x/2,S=E/2-m[h]/2-1,I=Qw(d[y],S),_=Qw(d[b],S),A=I,N=E-m[h]-_,R=E/2-m[h]/2+k,O=ix(A,R,N),T=!l.arrow&&null!=lx(o)&&R!==O&&i.reference[h]/2-(R<A?I:_)-m[h]/2<0,M=T?R<A?R-A:R-N:0;return{[f]:p[f]+M,data:{[f]:O,centerOffset:R-O-M,...T&&{alignmentOffset:M}},reset:T}}}),uC=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ax(e,t),u={x:n,y:r},d=dx(o),p=cx(d);let f=u[p],h=u[d];const m=ax(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=["top","left"].includes(sx(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},dC=(e,t,n)=>{const r=new Map,o={platform:tC,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=yx(c,r,l),p=r,f={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[i]:{...f[i],...b}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=yx(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var pC="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function fC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!fC(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!fC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hC(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mC(e,t){const n=hC(e);return Math.round(t*n)/n}function gC(e){const t=r.useRef(e);return pC((()=>{t.current=e})),t}const yC=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?cC({element:n.current,padding:r}).fn(t):{}:n?cC({element:n,padding:r}).fn(t):{};var o}}),bC=(e,t)=>({...oC(e),options:[e,t]}),vC=(e,t)=>({...iC(e),options:[e,t]}),wC=(e,t)=>({...uC(e),options:[e,t]}),xC=(e,t)=>({...aC(e),options:[e,t]}),CC=(e,t)=>({...sC(e),options:[e,t]}),EC=(e,t)=>({...lC(e),options:[e,t]}),kC=(e,t)=>({...yC(e),options:[e,t]});var SC=r.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return Lu.jsx(Ku.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Lu.jsx("polygon",{points:"0,0 30,0 15,10"})})}));SC.displayName="Arrow";var IC=SC;function _C(e){const[t,n]=r.useState(void 0);return zu((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var AC="Popper",[NC,RC]=Fu(AC),[OC,TC]=NC(AC),MC=e=>{const{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return Lu.jsx(OC,{scope:t,anchor:o,onAnchorChange:i,children:n})};MC.displayName=AC;var PC="PopperAnchor",DC=r.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=TC(PC,n),s=r.useRef(null),l=Ru(t,s);return r.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:Lu.jsx(Ku.div,{...i,ref:l})}));DC.displayName=PC;var BC="PopperContent",[jC,LC]=NC(BC),FC=r.forwardRef(((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...y}=e,b=TC(BC,n),[v,w]=r.useState(null),x=Ru(t,(e=>w(e))),[C,E]=r.useState(null),k=_C(C),S=k?.width??0,I=k?.height??0,_=i+("center"!==s?"-"+s:""),A="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(d)?d:[d],R=N.length>0,O={padding:A,boundary:N.filter(WC),altBoundary:R},{refs:T,floatingStyles:M,placement:P,isPositioned:D,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=r.useState(i);fC(h,i)||m(i);const[g,y]=r.useState(null),[b,v]=r.useState(null),w=r.useCallback((e=>{e!==k.current&&(k.current=e,y(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),C=s||g,E=l||b,k=r.useRef(null),S=r.useRef(null),I=r.useRef(p),_=null!=u,A=gC(u),N=gC(a),R=gC(d),O=r.useCallback((()=>{if(!k.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};N.current&&(e.platform=N.current),dC(k.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!fC(I.current,t)&&(I.current=t,o.flushSync((()=>{f(t)})))}))}),[h,t,n,N,R]);pC((()=>{!1===d&&I.current.isPositioned&&(I.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const T=r.useRef(!1);pC((()=>(T.current=!0,()=>{T.current=!1})),[]),pC((()=>{if(C&&(k.current=C),E&&(S.current=E),C&&E){if(A.current)return A.current(C,E,O);O()}}),[C,E,O,A,_]);const M=r.useMemo((()=>({reference:k,floating:S,setReference:w,setFloating:x})),[w,x]),P=r.useMemo((()=>({reference:C,floating:E})),[C,E]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=mC(P.floating,p.x),r=mC(P.floating,p.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...hC(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,P.floating,p.x,p.y]);return r.useMemo((()=>({...p,update:O,refs:M,elements:P,floatingStyles:D})),[p,O,M,P,D])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>rC(...e,{animationFrame:"always"===m}),elements:{reference:b.anchor},middleware:[bC({mainAxis:a+I,alignmentAxis:l}),u&&vC({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?wC():void 0,...O}),u&&xC({...O}),CC({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),C&&kC({element:C,padding:c}),HC({arrowWidth:S,arrowHeight:I}),h&&EC({strategy:"referenceHidden",...O})]}),[j,L]=XC(P),F=Xu(g);zu((()=>{D&&F?.()}),[D,F]);const V=B.arrow?.x,z=B.arrow?.y,G=0!==B.arrow?.centerOffset,[W,H]=r.useState();return zu((()=>{v&&H(window.getComputedStyle(v).zIndex)}),[v]),Lu.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Lu.jsx(jC,{scope:n,placedSide:j,onArrowChange:E,arrowX:V,arrowY:z,shouldHideArrow:G,children:Lu.jsx(Ku.div,{"data-side":j,"data-align":L,...y,ref:x,style:{...y.style,animation:D?void 0:"none"}})})})}));FC.displayName=BC;var VC="PopperArrow",zC={top:"bottom",right:"left",bottom:"top",left:"right"},GC=r.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=LC(VC,n),i=zC[o.placedSide];return Lu.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Lu.jsx(IC,{...r,ref:t,style:{...r.style,display:"block"}})})}));function WC(e){return null!==e}GC.displayName=VC;var HC=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=XC(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?u:`${d}px`,h=-s+"px"):"top"===l?(f=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?u:`${p}px`):"left"===l&&(f=`${r.floating.width+s}px`,h=i?u:`${p}px`),{data:{x:f,y:h}}}});function XC(e){const[t,n="center"]=e.split("-");return[t,n]}var ZC=MC,$C=DC,YC=FC,UC=GC,JC="rovingFocusGroup.onEntryFocus",KC={bubbles:!1,cancelable:!0},QC="RovingFocusGroup",[qC,eE,tE]=Yw(QC),[nE,rE]=Fu(QC,[tE]),[oE,iE]=nE(QC),aE=r.forwardRef(((e,t)=>Lu.jsx(qC.Provider,{scope:e.__scopeRovingFocusGroup,children:Lu.jsx(qC.Slot,{scope:e.__scopeRovingFocusGroup,children:Lu.jsx(sE,{...e,ref:t})})})));aE.displayName=QC;var sE=r.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=e,f=r.useRef(null),h=Ru(t,f),m=Jw(a),[g=null,y]=Zu({prop:s,defaultProp:l,onChange:c}),[b,v]=r.useState(!1),w=Xu(u),x=eE(n),C=r.useRef(!1),[E,k]=r.useState(0);return r.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(JC,w),()=>e.removeEventListener(JC,w)}),[w]),Lu.jsx(oE,{scope:n,orientation:o,dir:m,loop:i,currentTabStopId:g,onItemFocus:r.useCallback((e=>y(e)),[y]),onItemShiftTab:r.useCallback((()=>v(!0)),[]),onFocusableItemAdd:r.useCallback((()=>k((e=>e+1))),[]),onFocusableItemRemove:r.useCallback((()=>k((e=>e-1))),[]),children:Lu.jsx(Ku.div,{tabIndex:b||0===E?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:_u(e.onMouseDown,(()=>{C.current=!0})),onFocus:_u(e.onFocus,(e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(JC,KC);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));dE([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}C.current=!1})),onBlur:_u(e.onBlur,(()=>v(!1)))})})})),lE="RovingFocusGroupItem",cE=r.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,...s}=e,l=Hu(),c=a||l,u=iE(lE,n),d=u.currentTabStopId===c,p=eE(n),{onFocusableItemAdd:f,onFocusableItemRemove:h}=u;return r.useEffect((()=>{if(o)return f(),()=>h()}),[o,f,h]),Lu.jsx(qC.ItemSlot,{scope:n,id:c,focusable:o,active:i,children:Lu.jsx(Ku.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:_u(e.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:_u(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:_u(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:uE[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>dE(n)))}}))})})}));cE.displayName=lE;var uE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dE(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var pE=aE,fE=cE,hE=["Enter"," "],mE=["ArrowUp","PageDown","End"],gE=["ArrowDown","PageUp","Home",...mE],yE={ltr:[...hE,"ArrowRight"],rtl:[...hE,"ArrowLeft"]},bE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vE="Menu",[wE,xE,CE]=Yw(vE),[EE,kE]=Fu(vE,[CE,RC,rE]),SE=RC(),IE=rE(),[_E,AE]=EE(vE),[NE,RE]=EE(vE),OE=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=e,l=SE(t),[c,u]=r.useState(null),d=r.useRef(!1),p=Xu(a),f=Jw(i);return r.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),Lu.jsx(ZC,{...l,children:Lu.jsx(_E,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:u,children:Lu.jsx(NE,{scope:t,onClose:r.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:d,dir:f,modal:s,children:o})})})};OE.displayName=vE;var TE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SE(n);return Lu.jsx($C,{...o,...r,ref:t})}));TE.displayName="MenuAnchor";var ME="MenuPortal",[PE,DE]=EE(ME,{forceMount:void 0}),BE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=AE(ME,t);return Lu.jsx(PE,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};BE.displayName=ME;var jE="MenuContent",[LE,FE]=EE(jE),VE=r.forwardRef(((e,t)=>{const n=DE(jE,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=AE(jE,e.__scopeMenu),a=RE(jE,e.__scopeMenu);return Lu.jsx(wE.Provider,{scope:e.__scopeMenu,children:Lu.jsx(vd,{present:r||i.open,children:Lu.jsx(wE.Slot,{scope:e.__scopeMenu,children:a.modal?Lu.jsx(zE,{...o,ref:t}):Lu.jsx(GE,{...o,ref:t})})})})})),zE=r.forwardRef(((e,t)=>{const n=AE(jE,e.__scopeMenu),o=r.useRef(null),i=Ru(t,o);return r.useEffect((()=>{const e=o.current;if(e)return bp(e)}),[]),Lu.jsx(WE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_u(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),GE=r.forwardRef(((e,t)=>{const n=AE(jE,e.__scopeMenu);return Lu.jsx(WE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),WE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,disableOutsideScroll:m,...g}=e,y=AE(jE,n),b=RE(jE,n),v=SE(n),w=IE(n),x=xE(n),[C,E]=r.useState(null),k=r.useRef(null),S=Ru(t,k,y.onContentChange),I=r.useRef(0),_=r.useRef(""),A=r.useRef(0),N=r.useRef(null),R=r.useRef("right"),O=r.useRef(0),T=m?dp:r.Fragment,M=m?{as:$u,allowPinchZoom:!0}:void 0,P=e=>{const t=_.current+e,n=x().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const s=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){_.current=t,window.clearTimeout(I.current),""!==t&&(I.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};r.useEffect((()=>()=>window.clearTimeout(I.current)),[]),Cd();const D=r.useCallback((e=>R.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,N.current?.area)),[]);return Lu.jsx(LE,{scope:n,searchRef:_,onItemEnter:r.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:r.useCallback((e=>{D(e)||(k.current?.focus(),E(null))}),[D]),onTriggerLeave:r.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:A,onPointerGraceIntentChange:r.useCallback((e=>{N.current=e}),[]),children:Lu.jsx(T,{...M,children:Lu.jsx(dd,{asChild:!0,trapped:i,onMountAutoFocus:_u(a,(e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,children:Lu.jsx(pE,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:_u(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:Lu.jsx(YC,{role:"menu","aria-orientation":"vertical","data-state":yk(y.open),"data-radix-menu-content":"",dir:b.dir,...v,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:_u(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&P(e.key));const o=k.current;if(e.target!==o)return;if(!gE.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));mE.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:_u(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),_.current="")})),onPointerMove:_u(e.onPointerMove,wk((e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";R.current=t,O.current=e.clientX}})))})})})})})})}));VE.displayName=jE;var HE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{role:"group",...r,ref:t})}));HE.displayName="MenuGroup";var XE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{...r,ref:t})}));XE.displayName="MenuLabel";var ZE="MenuItem",$E="menu.itemSelect",YE=r.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,a=r.useRef(null),s=RE(ZE,e.__scopeMenu),l=FE(ZE,e.__scopeMenu),c=Ru(t,a),u=r.useRef(!1);return Lu.jsx(UE,{...i,ref:c,disabled:n,onClick:_u(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent($E,{bubbles:!0,cancelable:!0});e.addEventListener($E,(e=>o?.(e)),{once:!0}),Qu(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:_u(e.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:_u(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||hE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));YE.displayName=ZE;var UE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...a}=e,s=FE(ZE,n),l=IE(n),c=r.useRef(null),u=Ru(t,c),[d,p]=r.useState(!1),[f,h]=r.useState("");return r.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[a.children]),Lu.jsx(wE.ItemSlot,{scope:n,disabled:o,textValue:i??f,children:Lu.jsx(fE,{asChild:!0,...l,focusable:!o,children:Lu.jsx(Ku.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:_u(e.onPointerMove,wk((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:_u(e.onPointerLeave,wk((e=>s.onItemLeave(e)))),onFocus:_u(e.onFocus,(()=>p(!0))),onBlur:_u(e.onBlur,(()=>p(!1)))})})})})),JE=r.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return Lu.jsx(ok,{scope:e.__scopeMenu,checked:n,children:Lu.jsx(YE,{role:"menuitemcheckbox","aria-checked":bk(n)?"mixed":n,...o,ref:t,"data-state":vk(n),onSelect:_u(o.onSelect,(()=>r?.(!!bk(n)||!n)),{checkForDefaultPrevented:!1})})})}));JE.displayName="MenuCheckboxItem";var KE="MenuRadioGroup",[QE,qE]=EE(KE,{value:void 0,onValueChange:()=>{}}),ek=r.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xu(r);return Lu.jsx(QE,{scope:e.__scopeMenu,value:n,onValueChange:i,children:Lu.jsx(HE,{...o,ref:t})})}));ek.displayName=KE;var tk="MenuRadioItem",nk=r.forwardRef(((e,t)=>{const{value:n,...r}=e,o=qE(tk,e.__scopeMenu),i=n===o.value;return Lu.jsx(ok,{scope:e.__scopeMenu,checked:i,children:Lu.jsx(YE,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":vk(i),onSelect:_u(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));nk.displayName=tk;var rk="MenuItemIndicator",[ok,ik]=EE(rk,{checked:!1}),ak=r.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=ik(rk,n);return Lu.jsx(vd,{present:r||bk(i.checked)||!0===i.checked,children:Lu.jsx(Ku.span,{...o,ref:t,"data-state":vk(i.checked)})})}));ak.displayName=rk;var sk=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));sk.displayName="MenuSeparator";var lk=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SE(n);return Lu.jsx(UC,{...o,...r,ref:t})}));lk.displayName="MenuArrow";var ck="MenuSub",[uk,dk]=EE(ck),pk=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,a=AE(ck,t),s=SE(t),[l,c]=r.useState(null),[u,d]=r.useState(null),p=Xu(i);return r.useEffect((()=>(!1===a.open&&p(!1),()=>p(!1))),[a.open,p]),Lu.jsx(ZC,{...s,children:Lu.jsx(_E,{scope:t,open:o,onOpenChange:p,content:u,onContentChange:d,children:Lu.jsx(uk,{scope:t,contentId:Hu(),triggerId:Hu(),trigger:l,onTriggerChange:c,children:n})})})};pk.displayName=ck;var fk="MenuSubTrigger",hk=r.forwardRef(((e,t)=>{const n=AE(fk,e.__scopeMenu),o=RE(fk,e.__scopeMenu),i=dk(fk,e.__scopeMenu),a=FE(fk,e.__scopeMenu),s=r.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=r.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return r.useEffect((()=>d),[d]),r.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),Lu.jsx(TE,{asChild:!0,...u,children:Lu.jsx(UE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yk(n.open),...e,ref:Nu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_u(e.onPointerMove,wk((t=>{a.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{n.onOpenChange(!0),d()}),100))}))),onPointerLeave:_u(e.onPointerLeave,wk((e=>{d();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:_u(e.onKeyDown,(t=>{const r=""!==a.searchRef.current;e.disabled||r&&" "===t.key||yE[o.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())}))})})}));hk.displayName=fk;var mk="MenuSubContent",gk=r.forwardRef(((e,t)=>{const n=DE(jE,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,a=AE(jE,e.__scopeMenu),s=RE(jE,e.__scopeMenu),l=dk(mk,e.__scopeMenu),c=r.useRef(null),u=Ru(t,c);return Lu.jsx(wE.Provider,{scope:e.__scopeMenu,children:Lu.jsx(vd,{present:o||a.open,children:Lu.jsx(wE.Slot,{scope:e.__scopeMenu,children:Lu.jsx(WE,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:_u(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:_u(e.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:_u(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=bE[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function yk(e){return e?"open":"closed"}function bk(e){return"indeterminate"===e}function vk(e){return bk(e)?"indeterminate":e?"checked":"unchecked"}function wk(e){return t=>"mouse"===t.pointerType?e(t):void 0}gk.displayName=mk;var xk=OE,Ck=TE,Ek=BE,kk=VE,Sk=HE,Ik=XE,_k=YE,Ak=JE,Nk=ek,Rk=nk,Ok=ak,Tk=sk,Mk=lk,Pk=pk,Dk=hk,Bk=gk,jk="DropdownMenu",[Lk,Fk]=Fu(jk,[kE]),Vk=kE(),[zk,Gk]=Lk(jk),Wk=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=Vk(t),u=r.useRef(null),[d=!1,p]=Zu({prop:i,defaultProp:a,onChange:s});return Lu.jsx(zk,{scope:t,triggerId:Hu(),triggerRef:u,contentId:Hu(),open:d,onOpenChange:p,onOpenToggle:r.useCallback((()=>p((e=>!e))),[p]),modal:l,children:Lu.jsx(xk,{...c,open:d,onOpenChange:p,dir:o,modal:l,children:n})})};Wk.displayName=jk;var Hk="DropdownMenuTrigger",Xk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Gk(Hk,n),a=Vk(n);return Lu.jsx(Ck,{asChild:!0,...a,children:Lu.jsx(Ku.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Nu(t,i.triggerRef),onPointerDown:_u(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:_u(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));Xk.displayName=Hk;var Zk=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Vk(t);return Lu.jsx(Ek,{...r,...n})};Zk.displayName="DropdownMenuPortal";var $k="DropdownMenuContent",Yk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Gk($k,n),a=Vk(n),s=r.useRef(!1);return Lu.jsx(kk,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:t,onCloseAutoFocus:_u(e.onCloseAutoFocus,(e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:_u(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(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)"}})}));Yk.displayName=$k;var Uk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Sk,{...o,...r,ref:t})}));Uk.displayName="DropdownMenuGroup";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ik,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var Jk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(_k,{...o,...r,ref:t})}));Jk.displayName="DropdownMenuItem";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ak,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var Kk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Nk,{...o,...r,ref:t})}));Kk.displayName="DropdownMenuRadioGroup";var Qk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Rk,{...o,...r,ref:t})}));Qk.displayName="DropdownMenuRadioItem";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ok,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Tk,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Mk,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var qk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Dk,{...o,...r,ref:t})}));qk.displayName="DropdownMenuSubTrigger";var eS=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Bk,{...o,...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)"}})}));eS.displayName="DropdownMenuSubContent";var tS=Wk,nS=Xk,rS=Zk,oS=Yk,iS=Uk,aS=Jk,sS=Kk,lS=Qk,cS=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Vk(t),[s=!1,l]=Zu({prop:r,defaultProp:i,onChange:o});return Lu.jsx(Pk,{...a,open:s,onOpenChange:l,children:n})},uS=qk,dS=eS;function pS(e,t){return function(e,t){return new Blob([e],{type:t})}(function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r}(e),t)}function fS(e,t=!0){return new Promise((n=>{const r=new FileReader;r.onload=()=>{const e=r.result;t&&n(e.split(",")[1]),n(e)},r.readAsDataURL(e)}))}function hS(e){return function(e){return new Promise((t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.onchange=()=>{const e=n.files?.[0];e&&t(e)},n.click()}))}(e).then(fS)}const mS=({trigger:t,setOpen:n,open:r})=>{const[o,i]=e.useState(""),a=e.useContext(oL);return a.options.useWorkerManager?e.createElement($w,{setOpen:n,open:r,trigger:t,title:"New Worker",description:"Create a new worker"},e.createElement("div",null,"Name:",e.createElement("br",null),e.createElement("input",{className:"styledinput",onChange:e=>{i(e.currentTarget.value)},value:o})),e.createElement("div",null,o&&e.createElement("div",null,e.createElement("button",{className:"styledbtn",onClick:()=>{a.workermanager?.new_worker({name:o}),n(!1)}},"Create")))):null},gS=({trigger:t,setOpen:n,open:r})=>{const o=e.useContext(oL),[i,a]=e.useState(!1),s=o.workers(),l=o.worker?.uuid,c=(l?s[l]?.name:void 0)||l||"worker";return e.createElement($w,{setOpen:n,open:r,trigger:t,title:"Export Worker",description:"Export the worker as a .fnw file"},e.createElement("div",null,e.createElement("div",null,e.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:i,onChange:e=>{a(e.currentTarget.checked)}}),"Include Files"),e.createElement("button",{className:"styledbtn",onClick:async()=>{if(!o.worker)return;!function(e,t,n){const r=pS(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await o.worker.export({withFiles:i}),c+".fnw","application/zip"),n(!1)}},"Export")))},yS=()=>{const t=e.useContext(oL).progress_state();return e.createElement("div",{className:"statusbar"},e.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),e.createElement("span",{className:"statusbar-message"},t.message))},bS=()=>{const t=e.useContext(oL),n=t.workers(),[r,o]=e.useState(!1),[i,a]=e.useState(!1),s=t.options.useWorkerManager&&t.workermanager&&t.workermanager.open,l=s&&Object.keys(n).length>0,c=t.worker&&t.worker.is_open,u=c&&s;return s||c?e.createElement(e.Fragment,null,e.createElement(tS,null,e.createElement(nS,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Ov,{direction:"row",spacing:1},e.createElement(Rv,null,"Worker")," ",e.createElement(Ev,null)))),e.createElement(rS,null,e.createElement(oS,{className:"headermenucontent funcnodescontainer"},e.createElement(iS,null,l&&e.createElement(cS,null,e.createElement(uS,{className:"headermenuitem submenuitem"},e.createElement(Ov,{direction:"row",spacing:1},"Select",e.createElement(Tv,null))),e.createElement(rS,null,e.createElement(dS,{className:"headermenucontent",sideOffset:2,alignOffset:-5},e.createElement(sS,{value:t.worker?.uuid,onValueChange:e=>{(e=>{if("__select__"!==e&&t.workers&&t.workermanager&&n[e]){if(!n[e].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;t.workermanager.set_active(e)}})(e)}},Object.keys(n).sort(((e,t)=>{if(n[e].active&&!n[t].active)return-1;if(!n[e].active&&n[t].active)return 1;const r=n[e].name||e,o=n[t].name||t;return r.localeCompare(o)})).map((r=>e.createElement(lS,{className:"headermenuitem workerselectoption"+(n[r]?.active?" active":" inactive")+" headermenuitem",key:r,value:r,disabled:r===t.worker?.uuid},n[r]?.name||r))))))),c&&e.createElement(e.Fragment,null,u&&e.createElement(aS,{className:"headermenuitem",onClick:()=>{if(t.worker)return t.workermanager?void t.workermanager?.restart_worker(t.worker.uuid):t.logger.error("no workermanager")}},"Restart"),e.createElement(aS,{className:"headermenuitem",onClick:()=>{t.worker&&t.worker.stop()}},"Stop"),e.createElement(aS,{className:"headermenuitem",onClick:()=>a(!0)},"Export"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{if(!t.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const e=await hS(".fnw");t.worker.update_from_export(e)}},"Update")),s&&e.createElement(e.Fragment,null,e.createElement(aS,{className:"headermenuitem",onClick:()=>o(!0)},"New")))))),e.createElement(mS,{open:r,setOpen:o}),e.createElement(gS,{open:i,setOpen:a})):null},vS=()=>{const t=e.useContext(oL);return e.createElement(e.Fragment,null,e.createElement(tS,null,e.createElement(nS,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Ov,{direction:"row",spacing:1},e.createElement(Rv,null,"Nodespace")," ",e.createElement(Ev,null)))),e.createElement(rS,null,e.createElement(oS,{className:"headermenucontent funcnodescontainer"},e.createElement(iS,null,e.createElement(aS,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&t.worker?.clear()}},"New"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{const e=await(t.worker?.save());if(!e)return;const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="flow.json",o.click(),URL.revokeObjectURL(r),o.remove()}},"Save"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.onchange=async e=>{const n=e.target.files?.[0];if(!n)return;const r=new FileReader;r.onload=async e=>{const n=e.target?.result;if(!n)return;const r=JSON.parse(n);await(t.worker?.load(r))},r.readAsText(n)},e.click()}},"Load"))))))},wS=({...t})=>{const n=e.useContext(oL),r=n.workerstate();return Object.keys(t).length>0&&n.logger.debug("headerprops",t),e.createElement("div",{className:"funcnodesreactflowheader"},e.createElement("div",{className:"headerelement"},e.createElement(yS,null)),t.showmenu&&e.createElement(e.Fragment,null,e.createElement("div",{className:"headerelement"},e.createElement(bS,null)),n.worker&&r.is_open&&e.createElement("div",{className:"headerelement"},e.createElement(vS,null))))};const xS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ES={};function kS(e,t){return(ES.jsx?CS:xS).test(e)}const SS=/[ \t\n\f\r]/g;function IS(e){return""===e.replace(SS,"")}class _S{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function AS(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new _S(n,r,t)}function NS(e){return e.toLowerCase()}_S.prototype.property={},_S.prototype.normal={},_S.prototype.space=null;class RS{constructor(e,t){this.property=e,this.attribute=t}}RS.prototype.space=null,RS.prototype.boolean=!1,RS.prototype.booleanish=!1,RS.prototype.overloadedBoolean=!1,RS.prototype.number=!1,RS.prototype.commaSeparated=!1,RS.prototype.spaceSeparated=!1,RS.prototype.commaOrSpaceSeparated=!1,RS.prototype.mustUseProperty=!1,RS.prototype.defined=!1;let OS=0;const TS=FS(),MS=FS(),PS=FS(),DS=FS(),BS=FS(),jS=FS(),LS=FS();function FS(){return 2**++OS}var VS=Object.freeze({__proto__:null,boolean:TS,booleanish:MS,commaOrSpaceSeparated:LS,commaSeparated:jS,number:DS,overloadedBoolean:PS,spaceSeparated:BS});const zS=Object.keys(VS);class GS extends RS{constructor(e,t,n,r){let o=-1;if(super(e,t),WS(this,"space",r),"number"==typeof n)for(;++o<zS.length;){const e=zS[o];WS(this,zS[o],(n&VS[e])===VS[e])}}}function WS(e,t,n){n&&(e[t]=n)}GS.prototype.defined=!0;const HS={}.hasOwnProperty;function XS(e){const t={},n={};let r;for(r in e.properties)if(HS.call(e.properties,r)){const o=e.properties[r],i=new GS(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[NS(r)]=r,n[NS(i.attribute)]=r}return new _S(t,n,e.space)}const ZS=XS({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),$S=XS({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function YS(e,t){return t in e?e[t]:t}function US(e,t){return YS(e,t.toLowerCase())}const JS=XS({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:US,properties:{xmlns:null,xmlnsXLink:null}}),KS=XS({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:MS,ariaAutoComplete:null,ariaBusy:MS,ariaChecked:MS,ariaColCount:DS,ariaColIndex:DS,ariaColSpan:DS,ariaControls:BS,ariaCurrent:null,ariaDescribedBy:BS,ariaDetails:null,ariaDisabled:MS,ariaDropEffect:BS,ariaErrorMessage:null,ariaExpanded:MS,ariaFlowTo:BS,ariaGrabbed:MS,ariaHasPopup:null,ariaHidden:MS,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:BS,ariaLevel:DS,ariaLive:null,ariaModal:MS,ariaMultiLine:MS,ariaMultiSelectable:MS,ariaOrientation:null,ariaOwns:BS,ariaPlaceholder:null,ariaPosInSet:DS,ariaPressed:MS,ariaReadOnly:MS,ariaRelevant:null,ariaRequired:MS,ariaRoleDescription:BS,ariaRowCount:DS,ariaRowIndex:DS,ariaRowSpan:DS,ariaSelected:MS,ariaSetSize:DS,ariaSort:null,ariaValueMax:DS,ariaValueMin:DS,ariaValueNow:DS,ariaValueText:null,role:null}}),QS=XS({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:US,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jS,acceptCharset:BS,accessKey:BS,action:null,allow:null,allowFullScreen:TS,allowPaymentRequest:TS,allowUserMedia:TS,alt:null,as:null,async:TS,autoCapitalize:null,autoComplete:BS,autoFocus:TS,autoPlay:TS,blocking:BS,capture:null,charSet:null,checked:TS,cite:null,className:BS,cols:DS,colSpan:null,content:null,contentEditable:MS,controls:TS,controlsList:BS,coords:DS|jS,crossOrigin:null,data:null,dateTime:null,decoding:null,default:TS,defer:TS,dir:null,dirName:null,disabled:TS,download:PS,draggable:MS,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:TS,formTarget:null,headers:BS,height:DS,hidden:TS,high:DS,href:null,hrefLang:null,htmlFor:BS,httpEquiv:BS,id:null,imageSizes:null,imageSrcSet:null,inert:TS,inputMode:null,integrity:null,is:null,isMap:TS,itemId:null,itemProp:BS,itemRef:BS,itemScope:TS,itemType:BS,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:TS,low:DS,manifest:null,max:null,maxLength:DS,media:null,method:null,min:null,minLength:DS,multiple:TS,muted:TS,name:null,nonce:null,noModule:TS,noValidate:TS,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:TS,optimum:DS,pattern:null,ping:BS,placeholder:null,playsInline:TS,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:TS,referrerPolicy:null,rel:BS,required:TS,reversed:TS,rows:DS,rowSpan:DS,sandbox:BS,scope:null,scoped:TS,seamless:TS,selected:TS,shadowRootClonable:TS,shadowRootDelegatesFocus:TS,shadowRootMode:null,shape:null,size:DS,sizes:null,slot:null,span:DS,spellCheck:MS,src:null,srcDoc:null,srcLang:null,srcSet:null,start:DS,step:null,style:null,tabIndex:DS,target:null,title:null,translate:null,type:null,typeMustMatch:TS,useMap:null,value:MS,width:DS,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:BS,axis:null,background:null,bgColor:null,border:DS,borderColor:null,bottomMargin:DS,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:TS,declare:TS,event:null,face:null,frame:null,frameBorder:null,hSpace:DS,leftMargin:DS,link:null,longDesc:null,lowSrc:null,marginHeight:DS,marginWidth:DS,noResize:TS,noHref:TS,noShade:TS,noWrap:TS,object:null,profile:null,prompt:null,rev:null,rightMargin:DS,rules:null,scheme:null,scrolling:MS,standby:null,summary:null,text:null,topMargin:DS,valueType:null,version:null,vAlign:null,vLink:null,vSpace:DS,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:TS,disableRemotePlayback:TS,prefix:null,property:null,results:DS,security:null,unselectable:null}}),qS=XS({space:"svg",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"},transform:YS,properties:{about:LS,accentHeight:DS,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:DS,amplitude:DS,arabicForm:null,ascent:DS,attributeName:null,attributeType:null,azimuth:DS,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:DS,by:null,calcMode:null,capHeight:DS,className:BS,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:DS,diffuseConstant:DS,direction:null,display:null,dur:null,divisor:DS,dominantBaseline:null,download:TS,dx:null,dy:null,edgeMode:null,editable:null,elevation:DS,enableBackground:null,end:null,event:null,exponent:DS,externalResourcesRequired:null,fill:null,fillOpacity:DS,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:jS,g2:jS,glyphName:jS,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:DS,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:DS,horizOriginX:DS,horizOriginY:DS,id:null,ideographic:DS,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:DS,k:DS,k1:DS,k2:DS,k3:DS,k4:DS,kernelMatrix:LS,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:DS,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:DS,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:DS,overlineThickness:DS,paintOrder:null,panose1:null,path:null,pathLength:DS,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:BS,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:DS,pointsAtY:DS,pointsAtZ:DS,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:LS,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:LS,rev:LS,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:LS,requiredFeatures:LS,requiredFonts:LS,requiredFormats:LS,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:DS,specularExponent:DS,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:DS,strikethroughThickness:DS,string:null,stroke:null,strokeDashArray:LS,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:DS,strokeOpacity:DS,strokeWidth:null,style:null,surfaceScale:DS,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:LS,tabIndex:DS,tableValues:null,target:null,targetX:DS,targetY:DS,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:LS,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:DS,underlineThickness:DS,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:DS,values:null,vAlphabetic:DS,vMathematical:DS,vectorEffect:null,vHanging:DS,vIdeographic:DS,version:null,vertAdvY:DS,vertOriginX:DS,vertOriginY:DS,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:DS,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),eI=/^data[-\w.:]+$/i,tI=/-[a-z]/g,nI=/[A-Z]/g;function rI(e){return"-"+e.toLowerCase()}function oI(e){return e.charAt(1).toUpperCase()}const iI={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"},aI=AS([$S,ZS,JS,KS,QS],"html"),sI=AS([$S,ZS,JS,KS,qS],"svg");var lI,cI,uI,dI={};var pI=function(){if(uI)return dI;uI=1;var e=dI&&dI.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dI,"__esModule",{value:!0}),dI.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(cI)return lI;cI=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return lI=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,p=1;function f(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+p+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=p,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return f(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return p+=2,f(n),s=s.slice(t),p+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},lI}());return dI}(),fI=s(pI),hI=fI.default||fI;const mI=yI("end"),gI=yI("start");function yI(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function bI(e){return e&&"object"==typeof e?"position"in e||"type"in e?wI(e.position):"start"in e||"end"in e?wI(e):"line"in e||"column"in e?vI(e):"":""}function vI(e){return xI(e&&e.line)+":"+xI(e&&e.column)}function wI(e){return vI(e&&e.start)+"-"+vI(e&&e.end)}function xI(e){return e&&"number"==typeof e?e:1}class CI extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=bI(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}CI.prototype.file="",CI.prototype.name="",CI.prototype.reason="",CI.prototype.message="",CI.prototype.stack="",CI.prototype.column=void 0,CI.prototype.line=void 0,CI.prototype.ancestors=void 0,CI.prototype.cause=void 0,CI.prototype.fatal=void 0,CI.prototype.place=void 0,CI.prototype.ruleId=void 0,CI.prototype.source=void 0;const EI={}.hasOwnProperty,kI=new Map,SI=/[A-Z]/g,II=/-([a-z])/g,_I=new Set(["table","tbody","thead","tfoot","tr"]),AI=new Set(["td","th"]),NI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RI(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=gI(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?sI:aI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=OI(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function OI(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=sI,e.schema=o);e.ancestors.push(t);const i=BI(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&EI.call(t.properties,o)){const i=DI(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&AI.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=PI(e,t);_I.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&IS(t.value):IS(t));var t})));return TI(e,a,i,t),MI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}jI(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=sI,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:BI(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else jI(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else jI(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=PI(e,t);return TI(e,a,i,t),MI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jI(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return MI(r,PI(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function TI(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function MI(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PI(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:kI;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=OI(e,i,a);void 0!==s&&n.push(s)}return n}function DI(e,t,n){const r=function(e,t){const n=NS(t);let r=t,o=RS;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&eI.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(tI,oI);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!tI.test(e)){let n=e.replace(nI,rI);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=GS}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{hI(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new CI("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=NI+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(II,FI)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)EI.call(e,n)&&(t[LI(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?iI[r.property]||r.property:r.attribute,n]}}function BI(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=kS(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=kS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return EI.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);jI(e)}function jI(e,t){const n=new CI("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=NI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LI(e){let t=e.replace(SI,VI);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function FI(e,t){return t.toUpperCase()}function VI(e){return"-"+e.toLowerCase()}const zI={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"]},GI={};function WI(e,t){return HI(e,"boolean"!=typeof GI.includeImageAlt||GI.includeImageAlt,"boolean"!=typeof GI.includeHtml||GI.includeHtml)}function HI(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return XI(e.children,t,n)}return Array.isArray(e)?XI(e,t,n):""}function XI(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=HI(e[o],t,n);return r.join("")}const ZI=document.createElement("i");function $I(e){const t="&"+e+";";ZI.innerHTML=t;const n=ZI.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function YI(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function UI(e,t){return e.length>0?(YI(e,e.length,0,t),e):t}const JI={}.hasOwnProperty;function KI(e){const t={};let n=-1;for(;++n<e.length;)QI(t,e[n]);return t}function QI(e,t){let n;for(n in t){const r=(JI.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){JI.call(r,i)||(r[i]=[]);const e=o[i];qI(r[i],Array.isArray(e)?e:e?[e]:[])}}}function qI(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);YI(e,0,0,r)}function e_(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function t_(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const n_=h_(/[A-Za-z]/),r_=h_(/[\dA-Za-z]/),o_=h_(/[#-'*+\--9=?A-Z^-~]/);function i_(e){return null!==e&&(e<32||127===e)}const a_=h_(/\d/),s_=h_(/[\dA-Fa-f]/),l_=h_(/[!-/:-@[-`{-~]/);function c_(e){return null!==e&&e<-2}function u_(e){return null!==e&&(e<0||32===e)}function d_(e){return-2===e||-1===e||32===e}const p_=h_(/\p{P}|\p{S}/u),f_=h_(/\s/);function h_(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function m_(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&r_(e.charCodeAt(n+1))&&r_(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function g_(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(d_(r))return e.enter(n),a(r);return t(r)};function a(r){return d_(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const y_={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g_(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):c_(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const b_={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return YI(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(v_,u,d)(o)}function u(e){return r&&b(),y(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(v_,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):c_(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;YI(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},v_={tokenize:function(e,t,n){return g_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function w_(e){return null===e||u_(e)||f_(e)?1:p_(e)?2:void 0}function x_(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const C_={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};E_(d,-s),E_(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=UI(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=UI(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=UI(l,x_(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=UI(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=UI(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,YI(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=w_(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=w_(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function E_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const k_={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return n_(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||r_(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||r_(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||i_(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):o_(t)?(e.consume(t),l):n(t)}function c(e){return r_(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||r_(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const S_={partial:!0,tokenize:function(e,t,n){return function(t){return d_(t)?g_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||c_(e)?t(e):n(e)}}};const I_={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(d_(t))return g_(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(I_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return d_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const __={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return l_(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const A_={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=r_,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=s_,c):(e.enter("characterReferenceValue"),o=7,i=a_,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==r_||$I(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const N_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},R_={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),d_(t)?g_(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),d_(t)?g_(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||c_(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),d_(t)?g_(e,c,"whitespace")(t):c(t))}function c(n){return null===n||c_(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(N_,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||c_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):d_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g_(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||c_(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||c_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&d_(t)?g_(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||c_(t)?e.check(N_,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||c_(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const O_={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),g_(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):c_(t)?e.attempt(T_,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||c_(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},T_={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):g_(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):c_(e)?o(e):n(e)}}};const M_={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||c_(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class P_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&D_(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),D_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),D_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);D_(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);D_(this.left,t.reverse())}}}function D_(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 B_(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new P_(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,j_(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return YI(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function j_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const L_={resolve:function(e){return B_(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):c_(t)?e.check(F_,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},F_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g_(e,o,"linePrefix")};function o(o){if(null===o||c_(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function V_(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||i_(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||c_(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!u_(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||i_(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function z_(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):c_(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||c_(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!d_(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function G_(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g_(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||c_(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function W_(e,t){let n;return function r(o){if(c_(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(d_(o))return g_(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const H_={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return z_.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=t_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return u_(t)?W_(e,s)(t):s(t)}function s(t){return V_(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(X_,c,c)(t)}function c(t){return d_(t)?g_(e,u,"whitespace")(t):u(t)}function u(i){return null===i||c_(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},X_={partial:!0,tokenize:function(e,t,n){return function(t){return u_(t)?W_(e,r)(t):n(t)};function r(t){return G_(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return d_(t)?g_(e,i,"whitespace")(t):i(t)}function i(e){return null===e||c_(e)?t(e):n(e)}}};const Z_={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return c_(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const $_={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},YI(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||u_(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||c_(n)?(e.exit("atxHeading"),t(n)):d_(n)?g_(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||u_(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Y_=["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"],U_=["pre","script","style","textarea"],J_={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:P):n_(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,p):n_(i)?(e.consume(i),o=4,r.interrupt?t:P):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function p(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:I:p):n(o)}function f(t){return n_(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||u_(s)){const l=47===s,c=a.toLowerCase();return l||i||!U_.includes(c)?Y_.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):I(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):I(s))}return 45===s||r_(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:I):n(o)}function g(t){return d_(t)?(e.consume(t),g):k(t)}function y(t){return 47===t?(e.consume(t),k):58===t||95===t||n_(t)?(e.consume(t),b):d_(t)?(e.consume(t),y):k(t)}function b(t){return 45===t||46===t||58===t||95===t||r_(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):d_(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):d_(t)?(e.consume(t),w):C(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||c_(t)?n(t):(e.consume(t),x)}function C(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||u_(t)?v(t):(e.consume(t),C)}function E(e){return 47===e||62===e||d_(e)?y(e):n(e)}function k(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||c_(t)?I(t):d_(t)?(e.consume(t),S):n(t)}function I(t){return 45===t&&2===o?(e.consume(t),R):60===t&&1===o?(e.consume(t),O):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),M):!c_(t)||6!==o&&7!==o?null===t||c_(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),I):(e.exit("htmlFlowData"),e.check(K_,B,_)(t))}function _(t){return e.check(Q_,A,B)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||c_(t)?_(t):(e.enter("htmlFlowData"),I(t))}function R(t){return 45===t?(e.consume(t),P):I(t)}function O(t){return 47===t?(e.consume(t),a="",T):I(t)}function T(t){if(62===t){const n=a.toLowerCase();return U_.includes(n)?(e.consume(t),D):I(t)}return n_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):I(t)}function M(t){return 93===t?(e.consume(t),P):I(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),P):I(t)}function D(t){return null===t||c_(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),D)}function B(n){return e.exit("htmlFlow"),t(n)}}},K_={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(S_,t,n)}}},Q_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(c_(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const q_={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):n_(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):n_(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):c_(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):c_(t)?(a=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):c_(t)?(a=y,T(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):c_(t)?(a=b,T(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function w(t){return n_(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||r_(t)?(e.consume(t),x):C(t)}function C(t){return c_(t)?(a=C,T(t)):d_(t)?(e.consume(t),C):O(t)}function E(t){return 45===t||r_(t)?(e.consume(t),E):47===t||62===t||u_(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),O):58===t||95===t||n_(t)?(e.consume(t),S):c_(t)?(a=k,T(t)):d_(t)?(e.consume(t),k):O(t)}function S(t){return 45===t||46===t||58===t||95===t||r_(t)?(e.consume(t),S):I(t)}function I(t){return 61===t?(e.consume(t),_):c_(t)?(a=I,T(t)):d_(t)?(e.consume(t),I):k(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):c_(t)?(a=_,T(t)):d_(t)?(e.consume(t),_):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,R):null===t?n(t):c_(t)?(a=A,T(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||u_(t)?k(t):(e.consume(t),N)}function R(e){return 47===e||62===e||u_(e)?k(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return d_(t)?g_(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const eA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&YI(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=UI(i,e.slice(r+1,r+s+3)),i=UI(i,[["enter",u,t]]),i=UI(i,x_(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=UI(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=UI(i,e.slice(o+1)),i=UI(i,[["exit",l,t]]),YI(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(t_(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(tA,c,i?c:u)(t):91===t?e.attempt(nA,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(rA,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},tA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return u_(t)?W_(e,o)(t):o(t)}function o(t){return 41===t?c(t):V_(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return u_(t)?W_(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?G_(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return u_(t)?W_(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},nA={tokenize:function(e,t,n){const r=this;return function(t){return z_.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(t_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},rA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const oA={name:"labelStartImage",resolveAll:eA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const iA={name:"labelStartLink",resolveAll:eA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const aA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g_(e,t,"linePrefix")}}};const sA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||c_(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),d_(t)?g_(e,i,"whitespace")(t):i(t))}}};const lA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(S_,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,g_(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!d_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uA,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,g_(e,e.attempt(lA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:a_(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(sA,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return a_(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(S_,r.interrupt?n:c,e.attempt(cA,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return d_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},cA={partial:!0,tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return!d_(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},uA={partial:!0,tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const dA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),d_(t)?g_(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||c_(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const pA={tokenize:function(e){const t=this,n=e.attempt(S_,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,g_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(L_,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const fA={resolveAll:yA()},hA=gA("string"),mA=gA("text");function gA(e){return{resolveAll:yA("text"===e?bA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function yA(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function bA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const vA={42:lA,43:lA,45:lA,48:lA,49:lA,50:lA,51:lA,52:lA,53:lA,54:lA,55:lA,56:lA,57:lA,62:I_},wA={91:H_},xA={[-2]:O_,[-1]:O_,32:O_},CA={35:$_,42:sA,45:[dA,sA],60:J_,61:dA,95:sA,96:R_,126:R_},EA={38:A_,92:__},kA={[-5]:aA,[-4]:aA,[-3]:aA,33:oA,38:A_,42:C_,60:[k_,q_],91:iA,92:[Z_,__],93:eA,95:C_,96:M_},SA={null:[C_,fA]};var IA=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wA,disable:{null:[]},document:vA,flow:CA,flowInitial:xA,insideSpan:SA,string:EA,text:kA});function _A(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 o={},i=[];let a=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){c_(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=UI(a,e),f(),null!==a[a.length-1])return[];return y(t,0),c.events=x_(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),o}function y(e){return f.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&YI(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const AA=/[\0\t\n\r]/g;const NA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return e_(n.slice(t?2:1),t?16:10)}return $I(n)||e}const OA={}.hasOwnProperty;function TA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(K),blockQuote:i(Z),characterEscape:S,characterReference:S,codeFenced:i($),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i($,a),codeText:i(Y,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(Q),hardBreakTrailing:i(Q),htmlFlow:i(q,a),htmlFlowData:S,htmlText:i(q,a),htmlTextData:S,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:p,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(K),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:X,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:G,characterReference:W,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:I,codeIndented:l(y),codeText:l(O),codeTextData:I,data:I,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:I,htmlText:l(R),htmlTextData:I,image:l(M),label:D,labelText:P,lineEnding:_,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:B,resourceTitleString:j,resource:L,setextHeading:l(k),setextHeadingLineSequence:E,setextHeadingText:C,strong:l(),thematicBreak:l()}};PA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];OA.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||BA).call(i,void 0,e[0])}for(r.position={start:MA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:MA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:MA(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+bI({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||BA).call(this,e,r[0])}n.position.end=MA(e.end)}function u(){return WI(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t_(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:MA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function I(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=MA(e.end)}function _(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=MA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),I.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(NA,RA)}(t),n.identifier=t_(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function B(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function V(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function G(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=e_(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=$I(t)}this.stack[this.stack.length-1].value+=r}function W(e){this.stack.pop().position.end=MA(e.end)}function H(e){I.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){I.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Z(){return{type:"blockquote",children:[]}}function $(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!B_(e););return e}(function(e){const t={constructs:KI([IA,...(e||{}).extensions||[]]),content:n(y_),defined:[],document:n(b_),flow:n(pA),lazy:{},string:n(hA),text:n(mA)};return t;function n(e){return function(n){return _A(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(AA.lastIndex=u,l=AA.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function MA(e){return{line:e.line,column:e.column,offset:e.offset}}function PA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PA(e,r):DA(e,r)}}function DA(e,t){let n;for(n in t)if(OA.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 BA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+bI({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bI({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+bI({start:t.start,end:t.end})+") is still open")}function jA(e){const t=this;t.parser=function(n){return TA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LA(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function FA(e){const t=e.spread;return null==t?e.children.length>1:t}function VA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(zA(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(zA(t.slice(o),o>0,!1)),i.join("")}function zA(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const GA={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=m_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LA(e,t);const o={src:m_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:m_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LA(e,t);const o={href:m_(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:m_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=FA(n[r])}return t}(n):FA(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=gI(t.children[1]),a=mI(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:VA(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:WA,yaml:WA,definition:WA,footnoteDefinition:WA};function WA(){}const HA="object"==typeof self?self:globalThis,XA=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new HA[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new HA[i](a),o)};return r})(new Map,e)(0),ZA="",{toString:$A}={},{keys:YA}=Object,UA=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=$A.call(e).slice(8,-1);switch(n){case"Array":return[1,ZA];case"Object":return[2,ZA];case"Date":return[3,ZA];case"RegExp":return[4,ZA];case"Map":return[5,ZA];case"Set":return[6,ZA];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},JA=([e,t])=>0===e&&("function"===t||"symbol"===t),KA=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=UA(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of YA(r))!e&&JA(UA(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!JA(UA(n))&&!JA(UA(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&JA(UA(n))||t.push(i(n));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var QA="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?XA(KA(e,t)):structuredClone(e):(e,t)=>XA(KA(e,t));function qA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function eN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const tN=function(e){if(null==e)return rN;if("function"==typeof e)return nN(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tN(e[n]);return nN(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return nN(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return nN(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function nN(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function rN(){return!0}const oN=[],iN=!0,aN=!1;function sN(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=tN(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=oN;if((!t||i(o,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[iN,e];return null==e?oN:[e]}(n(o,l)),p[0]===aN))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===aN)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function lN(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),sN(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),o)}const cN={}.hasOwnProperty,uN={};function dN(e,t){e.position&&(t.position=function(e){const t=gI(e),n=mI(e);if(t&&n)return{start:t,end:n}}(e))}function pN(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,QA(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function fN(e,t){const n=t.data||{},r=!("value"in t)||cN.call(n,"hProperties")||cN.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function hN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function mN(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function gN(e,t){const n=function(e,t){const n=t||uN,r=new Map,o=new Map,i=new Map,a={...GA,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=mN(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=mN(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:pN,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(cN.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=QA(n);return r.children=s.all(e),r}return QA(e)}return(s.options.unknownHandler||fN)(s,e,t)},options:n,patch:dN,wrap:hN};return lN(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qA,r=e.options.footnoteBackLabel||eN,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=m_(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...QA(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function yN(e,t){return e&&"run"in e?async function(n,r){const o=gN(n,{file:r,...t});await e.run(o,r)}:function(n,r){return gN(n,{file:r,...e||t})}}function bN(e){if(e)throw e}var vN,wN;var xN=function(){if(wN)return vN;wN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return vN=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},vN}(),CN=s(xN);function EN(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function kN(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const SN={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');IN(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(IN(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){IN(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)IN(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){IN(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function IN(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _N={cwd:function(){return"/"}};function AN(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function NN(e){if("string"==typeof e)e=new URL(e);else if(!AN(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const RN=["history","path","basename","stem","extname","dirname"];class ON{constructor(e){let t;t=e?AN(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":_N.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<RN.length;){const e=RN[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)RN.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?SN.basename(this.path):void 0}set basename(e){MN(e,"basename"),TN(e,"basename"),this.path=SN.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?SN.dirname(this.path):void 0}set dirname(e){PN(this.basename,"dirname"),this.path=SN.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?SN.extname(this.path):void 0}set extname(e){if(TN(e,"extname"),PN(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=SN.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){AN(e)&&(e=NN(e)),MN(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?SN.basename(this.path,this.extname):void 0}set stem(e){MN(e,"stem"),TN(e,"stem"),this.path=SN.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new CI(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function TN(e,t){if(e&&e.includes(SN.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+SN.sep+"`")}function MN(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function PN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const DN=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},BN={}.hasOwnProperty;class jN extends DN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kN()}copy(){const e=new jN;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(CN(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(zN("data",this.frozen),this.namespace[e]=t,this):BN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zN("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=HN(e),n=this.parser||this.Parser;return FN("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),FN("process",this.parser||this.Parser),VN("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=HN(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,(function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),FN("processSync",this.parser||this.Parser),VN("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,bN(e),t=r})),WN("processSync","process",n),t}run(e,t,n){GN(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=HN(t);r.run(e,a,(function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){bN(e),n=t,r=!0})),WN("runSync","run",r),n}stringify(e,t){this.freeze();const n=HN(t),r=this.compiler||this.Compiler;return VN("stringify",r),GN(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(zN("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=CN(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];EN(a)&&EN(r)&&(r=CN(!0,a,r)),n[o]=[e,r,...i]}}}}const LN=(new jN).freeze();function FN(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function VN(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function zN(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GN(e){if(!EN(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function WN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function HN(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ON(e)}const XN=[],ZN={allowDangerousHtml:!0},$N=/^(https?|ircs?|mailto|xmpp)$/i,YN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function UN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||XN,l=e.remarkPlugins||XN,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ZN}:ZN,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||JN,f=LN().use(jA).use(l).use(yN,c).use(s),h=new ON;"string"==typeof r&&(h.value=r);for(const t of YN)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=f.parse(h);let g=f.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),lN(g,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in zI)if(Object.hasOwn(zI,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=zI[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),RI(g,{Fragment:Lu.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Lu.jsx,jsxs:Lu.jsxs,passKeys:!0,passNode:!0})}function JN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||$N.test(e.slice(0,t))?e:""}function KN(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function QN(e,t,n){const r=tN((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([qN(e[0]),eR(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)sN(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function qN(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function eR(e){return"function"==typeof e?e:function(){return e}}const tR="phrasing",nR=["autolink","link","image","label"];function rR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oR(e){this.config.enter.autolinkProtocol.call(this,e)}function iR(e){this.config.exit.autolinkProtocol.call(this,e)}function aR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function sR(e){this.config.exit.autolinkEmail.call(this,e)}function lR(e){this.exit(e)}function cR(e){QN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,dR]],{ignore:["link","linkReference"]})}function uR(e,t,n,r,o){let i="";if(!pR(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=KN(e,"(");let i=KN(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function dR(e,t,n,r){return!(!pR(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pR(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||f_(n)||p_(n))&&(!t||47!==n)}function fR(){this.buffer()}function hR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mR(){this.buffer()}function gR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function yR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bR(e){this.exit(e)}function vR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wR(e){this.exit(e)}function xR(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function CR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?kR:ER)));return s(),a},footnoteReference:xR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ER(e,t,n){return 0===t?e:kR(e,t,n)}function kR(e,t,n){return(n?"":" ")+e}xR.peek=function(){return"["};const SR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function IR(e){this.enter({type:"delete",children:[]},e)}function _R(e){this.exit(e)}function AR(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function NR(e){return e.length}function RR(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function OR(e,t,n){return">"+(n?"":" ")+e}function TR(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function MR(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&(i=n.stack,a=n.unsafe[o],TR(i,a.inConstruct,!0)&&!TR(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function PR(e,t,n){return(n?"":" ")+e}function DR(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function BR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jR(e,t,n){const r=w_(e),o=w_(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function LR(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=jR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=BR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=jR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+BR(d));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function FR(e){return e.value||""}function VR(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function zR(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function GR(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function WR(e,t){const n=WI(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function HR(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(WR(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function XR(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function ZR(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function $R(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}AR.peek=function(){return"~"},LR.peek=function(e,t,n){return n.options.emphasis||"*"},FR.peek=function(){return"<"},VR.peek=function(){return"!"},zR.peek=function(){return"!"},GR.peek=function(){return"`"},HR.peek=function(e,t,n){return WR(e,n)?"<":"["},XR.peek=function(){return"["};const YR=tN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UR(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=jR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=BR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=jR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+BR(d));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}UR.peek=function(e,t,n){return n.options.strong||"*"};const JR={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),OR);return o(),a},break:MR,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,PR);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:LR,hardBreak:MR,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return lN(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,aN})),Boolean((!e.depth||e.depth<3)&&WI(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=BR(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:FR,image:VR,imageReference:zR,inlineCode:GR,link:HR,linkReference:XR,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):ZR(n);const s=e.ordered?"."===a?")":".":function(e){const t=ZR(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$R(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||ZR(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some((function(e){return YR(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:UR,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($R(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function KR(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function QR(e){this.exit(e),this.data.inTable=void 0}function qR(e){this.enter({type:"tableRow",children:[]},e)}function eO(e){this.exit(e)}function tO(e){this.enter({type:"tableCell",children:[]},e)}function nO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rO(e,t){return"|"===t?t:e}function oO(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=JR.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=l(e,n,r),i=s([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||NR,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)i[p]=RR(r[p]);else{const e=RR(r);for(;++p<c;)i[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=i[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[p]&&(l[p]=o),h[p]=o),f[p]=a}a.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=s[u];p=-1;const r=[];for(;++p<c;){const o=e[p]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=i[p];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function iO(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function aO(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function sO(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=JR.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const lO={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},cO={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(dO,l,s)(t):null===t||u_(t)||f_(t)||45!==t&&p_(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},uO={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(dO,t,i)(a):null===a||u_(a)||f_(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},dO={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||u_(a)||f_(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||u_(e)||f_(e)?t(e):r(e)}function i(e){return n_(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):n_(t)?(e.consume(t),a):n(t)}},partial:!0},pO={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return r_(e)?n(e):t(e)}},partial:!0},fO={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!bO.call(r,r.previous)||CO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lO,e.attempt(cO,e.attempt(uO,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:bO},hO={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&vO.call(r,r.previous)&&!CO(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(n_(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||i_(t)||u_(t)||f_(t)||p_(t)?n(t):e.attempt(cO,e.attempt(uO,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:vO},mO={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!xO(t)||!wO.call(r,r.previous)||CO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return xO(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(pO,c,l)(t):45===t||95===t||r_(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&n_(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:wO},gO={};let yO=48;for(;yO<123;)gO[yO]=mO,yO++,58===yO?yO=65:91===yO&&(yO=97);function bO(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||u_(e)}function vO(e){return!n_(e)}function wO(e){return!(47===e||xO(e))}function xO(e){return 43===e||45===e||46===e||95===e||r_(e)}function CO(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}gO[43]=mO,gO[45]=mO,gO[46]=mO,gO[95]=mO,gO[72]=[mO,hO],gO[104]=[mO,hO],gO[87]=[mO,fO],gO[119]=[mO,fO];const EO={tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function kO(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=t_(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function SO(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function IO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||u_(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(t_(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return u_(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function _O(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||u_(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=t_(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return u_(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),g_(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function AO(e,t,n){return e.check(S_,t,e.attempt(EO,t,n))}function NO(e){e.exit("gfmFootnoteDefinition")}function RO(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=w_(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=w_(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&YI(a,a.length,0,x_(s,e.slice(r+1,n),t)),YI(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),YI(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class OO{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function TO(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function MO(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):c_(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):d_(t)?g_(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||u_(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,d_(t)?g_(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return d_(t)?g_(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||c_(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return d_(t)?g_(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||c_(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||c_(n)?(e.exit("tableRow"),t(n)):d_(n)?g_(e,x,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||u_(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:C)}function E(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function PO(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new OO;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(BO(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=DO(p,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=DO(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=DO(p,t,l,s,i,o)):0!==c[1]&&(o=DO(p,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&BO(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=TO(t.events,i))}return e}function DO(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},jO(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=jO(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=jO(t.events,n[2]),i=jO(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},jO(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function BO(e,t,n,r,o){const i=[],a=jO(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function jO(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const LO={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return u_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return c_(r)?t(r):d_(r)?e.check({tokenize:FO},t,n)(r):n(r)}}};function FO(e,t,n){return g_(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const VO={};function zO(e){const t=e||VO,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return KI([{text:gO},{document:{91:{name:"gfmFootnoteDefinition",tokenize:_O,continuation:{tokenize:AO},exit:NO}},text:{91:{name:"gfmFootnoteCall",tokenize:IO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kO,resolveTo:SO}}},RO(e),{flow:{null:{name:"table",tokenize:MO,resolveAll:PO}}},{text:{91:LO}}])}(t)),o.push([{transforms:[cR],enter:{literalAutolink:rR,literalAutolinkEmail:oR,literalAutolinkHttp:oR,literalAutolinkWww:oR},exit:{literalAutolink:lR,literalAutolinkEmail:sR,literalAutolinkHttp:iR,literalAutolinkWww:aR}},{enter:{gfmFootnoteCallString:fR,gfmFootnoteCall:hR,gfmFootnoteDefinitionLabelString:mR,gfmFootnoteDefinition:gR},exit:{gfmFootnoteCallString:yR,gfmFootnoteCall:bR,gfmFootnoteDefinitionLabelString:vR,gfmFootnoteDefinition:wR}},{canContainEols:["delete"],enter:{strikethrough:IR},exit:{strikethrough:_R}},{enter:{table:KR,tableData:tO,tableHeader:tO,tableRow:qR},exit:{codeText:nO,table:QR,tableData:eO,tableHeader:eO,tableRow:eO}},{exit:{taskListCheckValueChecked:iO,taskListCheckValueUnchecked:iO,paragraph:aO}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tR,notInConstruct:nR},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tR,notInConstruct:nR},{character:":",before:"[ps]",after:"\\/",inConstruct:tR,notInConstruct:nR}]},CR(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:SR}],handlers:{delete:AR}},oO(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sO}}]}}(t))}const GO=({item:t})=>{const n=e.useContext(oL);return e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&n.worker?.add_node(t.node_id)},title:t.description},t.node_name||t.node_id)},WO=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>WO(e,t)))??!1;return n||r},HO=({item:t,filter:n})=>{const[r,o]=e.useState(!1),i=t.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase()))),a=r||n.length>0;return WO(t,n)?e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.description},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(a?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,i.map(((t,n)=>e.createElement(GO,{key:n,item:t})))),t.subshelves&&e.createElement(e.Fragment,null,t.subshelves.map(((t,r)=>e.createElement(HO,{key:r,item:t,filter:n})))))),e.createElement("hr",null)):e.createElement(e.Fragment,null)},XO=({filter:t,setFilter:n})=>e.createElement("div",{className:"libfilter"},e.createElement(Zw,{fontSize:"inherit"}),e.createElement("input",{type:"text",placeholder:"Filter",value:t,onChange:e=>{n(e.target.value)}}),t&&e.createElement(Xw,{fontSize:"inherit",onClick:()=>{n("")}})),ZO=({availableModule:t})=>e.createElement("div",{className:"module-links"},t.homepage&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),t.source&&t.homepage&&" | ",t.source&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),$O=({availableModule:t})=>{const[n,r]=e.useState(!1),o=t.description.length>150?t.description.substring(0,150)+"...":t.description;return e.createElement("div",{className:"module-description"},e.createElement(UN,{remarkPlugins:[zO]},n?t.description.replace(/\\n/g," \n"):o.replace(/\\n/g," \n")),t.description.length>150&&e.createElement("button",{onClick:()=>r(!n),className:"toggle-description"},n?"Show less":"Show more"))},YO=({availableModule:t,on_change:n})=>{const[r,o]=e.useState(t.version||"latest"),[i,a]=e.useState(">=");return t.releases&&!t.releases.includes(r)&&t.releases.unshift(r),e.createElement(e.Fragment,null,e.createElement("select",{value:i,onChange:e=>{a(e.target.value),"latest"!==r&&n(e.target.value+r)}},e.createElement("option",{value:">="},">="),e.createElement("option",{value:"=="},"=="),e.createElement("option",{value:"<="},"<=")),e.createElement("select",{onChange:e=>{const t=e.target.value;o(t),n("latest"!==t?i+t:t)},value:r},t.releases&&t.releases.map((t=>e.createElement("option",{key:t,value:t},t)))))},UO=({availableModule:t,on_remove:n,on_update:r})=>{const[o,i]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:i}),e.createElement("button",{className:"update-button",disabled:o===t.version,onClick:()=>{r(t,o)}},"Update"),e.createElement("button",{className:"remove-button",onClick:()=>{n(t)}},"Remove")))},JO=({availableModule:t,on_add:n})=>{const[r,o]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},KO=({availableModule:t,on_add:n})=>{const[r,o]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},QO=({children:t})=>{const[n,r]=e.useState(""),o=e.useContext(oL),[i,a]=e.useState(!0),[s,l]=e.useState(!0),[c,u]=e.useState(!0),[d,p]=e.useState({installed:[],available:[],active:[]}),[f,h]=e.useState(!1);if(!o.worker)return e.createElement(e.Fragment,null);const m=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},g=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},y=e=>{h(!1),void 0!==o.worker&&o.worker.remove_lib(e.name)},b=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},v=e=>e.filter((e=>e.name.toLowerCase().includes(n.toLowerCase())||e.description.toLowerCase().includes(n.toLowerCase()))),w=v(d.available),x=v(d.installed),C=v(d.active);return e.createElement($w,{title:"Manage Library",trigger:t,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==o.worker&&o.worker.is_open&&o.worker.get_available_modules().then((e=>{console.log(e),p(e)}))},open:f,setOpen:h},e.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:n,onChange:e=>r(e.target.value)}),e.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},x.length>0&&e.createElement("h3",{onClick:()=>{u(!c)}},"Installed"),c&&x.map(((t,n)=>e.createElement(JO,{key:n,availableModule:t,on_add:m}))),w.length>0&&e.createElement("h3",{onClick:()=>{l(!s)}},"Available"),s&&w.map(((t,n)=>e.createElement(KO,{key:n,availableModule:t,on_add:g}))),C.length>0&&e.createElement("h3",{onClick:()=>{a(!i)}},"Active"),i&&C.map(((t,n)=>e.createElement(UO,{key:n,availableModule:t,on_remove:y,on_update:b})))))},qO=({ins:t})=>{const[n,r]=e.useState(t.name),o=e.useContext(oL);return e.createElement(e.Fragment,null,e.createElement($w,{title:t.name,description:"Settings for"+t.name,trigger:e.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{o.worker&&(o.worker.update_external_worker(t.uuid,t.nodeclassid,{name:n}),t.name=n)},close:!0},{text:"Delete",onClick:()=>{o.worker&&o.worker.remove_external_worker(t.uuid,t.nodeclassid)},close:!0}]},e.createElement("div",null,e.createElement("div",null,e.createElement("label",{htmlFor:"name"},"Name: "),e.createElement("input",{type:"text",name:"name",value:n,onChange:e=>r(e.target.value),className:"styledinput"})))))},eT=({ins:t,lib:n,filter:r=""})=>{const[o,i]=e.useState(!1),a=n?.nodes?.filter((e=>e.node_id.toLowerCase().includes(r.toLowerCase())));return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:t.name},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(o?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},o&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",title:t.uuid},e.createElement(qO,{ins:t})),n&&e.createElement(e.Fragment,null,a&&e.createElement(e.Fragment,null,a.map(((t,n)=>e.createElement(GO,{key:n,item:t})))),n.subshelves.map(((t,n)=>e.createElement(HO,{key:n,item:t,filter:r}))))))))},tT=({item:t,mod:n,lib:r})=>{const o=e.useContext(oL),[i,a]=e.useState(!1),s=t.name||t.module+"."+t.class_name;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>a(!i),style:{cursor:"pointer"},title:s},e.createElement("div",{className:"shelftitle_text"},s),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&o.worker?.add_external_worker({module:n,cls_module:t.module,cls_name:t.class_name})},title:t.name},"New Instance"),t.instances.map(((t,n)=>e.createElement(eT,{key:n,ins:t,lib:r?.subshelves.find((e=>e.name===t.uuid))})))))))},nT=({externalworkermod:t,lib:n})=>{const[r,o]=e.useState(!1),i=r;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.module},e.createElement("div",{className:"shelftitle_text"},t.module),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},t.worker_classes.map(((r,o)=>e.createElement(tT,{key:o,item:r,mod:t.module,lib:n}))))),e.createElement("hr",null))},rT=()=>{const t=e.useContext(oL),n=t.lib.libstate(),[r,o]=e.useState(""),i=t.worker?.state((e=>e.is_open))??!1;return e.createElement("div",{className:"libcontainer"},e.createElement("div",{className:"library"},e.createElement("div",{className:"libtitle"},"Lib"),e.createElement("hr",{className:"hr_prominent"}),e.createElement(XO,{filter:r,setFilter:o}),e.createElement("div",{className:"vscrollcontainer"},n.lib.shelves.map(((t,n)=>"_external_worker"==t.name?e.createElement(e.Fragment,null):e.createElement(HO,{key:n,item:t,filter:r})))),e.createElement("hr",null),e.createElement("div",{className:"libtitle"},"External Worker"),e.createElement("hr",{className:"hr_prominent"}),e.createElement("div",{className:"vscrollcontainer"},n.external_worker?.map(((t,r)=>e.createElement(nT,{key:r,externalworkermod:t,lib:n.lib.shelves.find((e=>"_external_worker"===e.name))})))),e.createElement("hr",null)),e.createElement("div",{style:{paddingTop:"0.5rem"}}),i&&e.createElement("div",{className:"addlib"},e.createElement(QO,null,e.createElement("button",null,"Manage Libraries"))))};const{useRef:oT}=e;function iT(e){const t=oT();return n=>{const r=e(n);return function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))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}(t.current,r)?t.current:t.current=r}}var aT=r.forwardRef(((e,t)=>Lu.jsx(Ku.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));aT.displayName="VisuallyHidden";var sT=aT,[lT,cT]=Fu("Tooltip",[RC]),uT=RC(),dT="TooltipProvider",pT=700,fT="tooltip.open",[hT,mT]=lT(dT),gT=e=>{const{__scopeTooltip:t,delayDuration:n=pT,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,[s,l]=r.useState(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),Lu.jsx(hT,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:r.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:r.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};gT.displayName=dT;var yT="Tooltip",[bT,vT]=lT(yT),wT=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=mT(yT,e.__scopeTooltip),u=uT(t),[d,p]=r.useState(null),f=Hu(),h=r.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,y=r.useRef(!1),[b=!1,v]=Zu({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(fT))):c.onClose(),a?.(e)}}),w=r.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),x=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,v(!0)}),[v]),C=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,v(!1)}),[v]),E=r.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,v(!0),h.current=0}),g)}),[g,v]);return r.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),Lu.jsx(ZC,{...u,children:Lu.jsx(bT,{scope:t,contentId:f,open:b,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:r.useCallback((()=>{c.isOpenDelayed?E():x()}),[c.isOpenDelayed,E,x]),onTriggerLeave:r.useCallback((()=>{m?C():(window.clearTimeout(h.current),h.current=0)}),[C,m]),onOpen:x,onClose:C,disableHoverableContent:m,children:n})})};wT.displayName=yT;var xT="TooltipTrigger",CT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,...o}=e,i=vT(xT,n),a=mT(xT,n),s=uT(n),l=Ru(t,r.useRef(null),i.onTriggerChange),c=r.useRef(!1),u=r.useRef(!1),d=r.useCallback((()=>c.current=!1),[]);return r.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),Lu.jsx($C,{asChild:!0,...s,children:Lu.jsx(Ku.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:_u(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:_u(e.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:_u(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:_u(e.onFocus,(()=>{c.current||i.onOpen()})),onBlur:_u(e.onBlur,i.onClose),onClick:_u(e.onClick,i.onClose)})})}));CT.displayName=xT;var ET="TooltipPortal",[kT,ST]=lT(ET,{forceMount:void 0}),IT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=vT(ET,t);return Lu.jsx(kT,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};IT.displayName=ET;var _T="TooltipContent",AT=r.forwardRef(((e,t)=>{const n=ST(_T,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=vT(_T,e.__scopeTooltip);return Lu.jsx(vd,{present:r||a.open,children:a.disableHoverableContent?Lu.jsx(TT,{side:o,...i,ref:t}):Lu.jsx(NT,{side:o,...i,ref:t})})})),NT=r.forwardRef(((e,t)=>{const n=vT(_T,e.__scopeTooltip),o=mT(_T,e.__scopeTooltip),i=r.useRef(null),a=Ru(t,i),[s,l]=r.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:p}=o,f=r.useCallback((()=>{l(null),p(!1)}),[p]),h=r.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),p(!0)}),[p]);return r.useEffect((()=>()=>f()),[f]),r.useEffect((()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,h,f]),r.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,f]),Lu.jsx(TT,{...e,ref:a})})),[RT,OT]=lT(yT,{isInside:!1}),TT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=vT(_T,n),u=uT(n),{onClose:d}=c;return r.useEffect((()=>(document.addEventListener(fT,d),()=>document.removeEventListener(fT,d))),[d]),r.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:Lu.jsxs(YC,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[Lu.jsx(Uu,{children:o}),Lu.jsx(RT,{scope:n,isInside:!0,children:Lu.jsx(sT,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));AT.displayName=_T;var MT="TooltipArrow",PT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=uT(n);return OT(MT,n).isInside?null:Lu.jsx(UC,{...o,...r,ref:t})}));PT.displayName=MT;var DT=gT,BT=wT,jT=CT,LT=IT,FT=AT,VT=PT,zT="Popover",[GT,WT]=Fu(zT,[RC]),HT=RC(),[XT,ZT]=GT(zT),$T=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,l=HT(t),c=r.useRef(null),[u,d]=r.useState(!1),[p=!1,f]=Zu({prop:o,defaultProp:i,onChange:a});return Lu.jsx(ZC,{...l,children:Lu.jsx(XT,{scope:t,contentId:Hu(),triggerRef:c,open:p,onOpenChange:f,onOpenToggle:r.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:r.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:r.useCallback((()=>d(!1)),[]),modal:s,children:n})})};$T.displayName=zT;var YT="PopoverAnchor";r.forwardRef(((e,t)=>{const{__scopePopover:n,...o}=e,i=ZT(YT,n),a=HT(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return r.useEffect((()=>(s(),()=>l())),[s,l]),Lu.jsx($C,{...a,...o,ref:t})})).displayName=YT;var UT="PopoverTrigger",JT=r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ZT(UT,n),i=HT(n),a=Ru(t,o.triggerRef),s=Lu.jsx(Ku.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sM(o.open),...r,ref:a,onClick:_u(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:Lu.jsx($C,{asChild:!0,...i,children:s})}));JT.displayName=UT;var KT="PopoverPortal",[QT,qT]=GT(KT,{forceMount:void 0}),eM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ZT(KT,t);return Lu.jsx(QT,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};eM.displayName=KT;var tM="PopoverContent",nM=r.forwardRef(((e,t)=>{const n=qT(tM,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ZT(tM,e.__scopePopover);return Lu.jsx(vd,{present:r||i.open,children:i.modal?Lu.jsx(rM,{...o,ref:t}):Lu.jsx(oM,{...o,ref:t})})}));nM.displayName=tM;var rM=r.forwardRef(((e,t)=>{const n=ZT(tM,e.__scopePopover),o=r.useRef(null),i=Ru(t,o),a=r.useRef(!1);return r.useEffect((()=>{const e=o.current;if(e)return bp(e)}),[]),Lu.jsx(dp,{as:$u,allowPinchZoom:!0,children:Lu.jsx(iM,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_u(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:_u(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:_u(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),oM=r.forwardRef(((e,t)=>{const n=ZT(tM,e.__scopePopover),o=r.useRef(!1),i=r.useRef(!1);return Lu.jsx(iM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const r=t.target,a=n.triggerRef.current?.contains(r);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),iM=r.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=ZT(tM,n),f=HT(n);return Cd(),Lu.jsx(dd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:Lu.jsx(YC,{"data-state":sM(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.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)"}})})})})),aM="PopoverClose";r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ZT(aM,n);return Lu.jsx(Ku.button,{type:"button",...r,ref:t,onClick:_u(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=aM;function sM(e){return e?"open":"closed"}r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=HT(n);return Lu.jsx(UC,{...o,...r,ref:t})})).displayName="PopoverArrow";var lM,cM,uM,dM,pM,fM,hM,mM,gM=$T,yM=JT,bM=eM,vM=nM;function wM(){if(dM)return uM;dM=1;const e=cM?lM:(cM=1,lM={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};uM=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=i-o;let s,l;i===o?s=0:t===i?s=(n-r)/a:n===i?s=2+(r-t)/a:r===i&&(s=4+(t-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+i)/2;return l=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[s,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(s),r=d(l),a===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,i=1/0;for(const t of Object.keys(e)){const r=e[t],l=(s=r,((a=n)[0]-s[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2);l<i&&(i=l,o=t)}var a,s;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,a;a=(2-n)*r;const s=(2-n)*o;return i=n*o,i/=s<=1?s:2-s,i=i||0,a/=2,[t,100*i,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),s=1-r;i=6*t-a,1&a&&(i=1-i);const l=n+i*(s-n);let c,u,d;switch(a){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,a;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*o,255*i,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),a=o-i;let s,l;return s=a<1?i/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,a=i%1,s=1-a;let l=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},uM}function xM(){if(fM)return pM;fM=1;const e=wM();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),i=n(e[r[a].parent][a],i),a=r[a].parent;return i.conversion=o,i}return pM=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},pM}var CM=function(){if(mM)return hM;mM=1;const e=wM(),t=xM(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),hM=n}(),EM=s(CM);const kM=(e,t)=>{if(Array.isArray(t)||(t=[t]),void 0===t[0]||null===t[0])return kM("rgb",[0,0,0]);const n=EM[e];if(!n)throw new Error("Unsupported color type: "+e);n[e]=()=>t;const r=n.rgb(t);if(!Array.isArray(r))return kM("rgb",[0,0,0]);if(void 0===r[0]||null===r[0])return kM("rgb",[0,0,0]);const o=n.hsl(t);if(!Array.isArray(o))return kM("rgb",[0,0,0]);if(void 0===o[0]||null===o[0])return kM("rgb",[0,0,0]);const i={};return Object.keys(n).forEach((e=>{const r=n[e];"function"==typeof r&&(i[e]=()=>r.apply(null,t))})),i},SM=({onChange:t,colorconverter:n,allow_null:r=!1})=>{if(null===n&&!r)throw new Error("Color converter is null");const[o,i]=e.useState(n),[a,s]=e.useState([0,0,0]),[l,c]=e.useState([0,0,0]),[u,d]=e.useState([0,0,0]),[p,f]=e.useState("000");e.useEffect((()=>{if(!o){if(!r)throw new Error("Color converter is null");return c([0,0,0]),s([0,0,0]),d([0,0,0]),void f("")}s(o.hsl()),c(o.rgb()),d(o.hsv()),f(o.hex())}),[o]);const h={backgroundColor:`hsl(${a[0]}, ${a[1]}%, ${a[2]}%)`,padding:"10px",margin:"10px 0"};return e.createElement("div",{style:{backgroundColor:"white"}},e.createElement("div",{style:h},"Color Preview"),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"RGB"),e.createElement("div",null),e.createElement("label",null,"Red"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[0],onChange:e=>{const n=[parseInt(e.target.value),l[1],l[2]],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),e.createElement("label",null,"Green"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[1],onChange:e=>{const n=[l[0],parseInt(e.target.value),l[2]],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),e.createElement("label",null,"Blue"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[2],onChange:e=>{const n=[l[0],l[1],parseInt(e.target.value)],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSL"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:a[0],onChange:e=>{const n=[parseInt(e.target.value),a[1],a[2]],r=kM("hsl",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[1],onChange:e=>{const n=[a[0],parseInt(e.target.value),a[2]],r=kM("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Lightness"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[2],onChange:e=>{const n=[a[0],a[1],parseInt(e.target.value)],r=kM("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%), #fff)`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSV"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:u[0],onChange:e=>{const n=[parseInt(e.target.value),u[1],u[2]],r=kM("hsv",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:u[1],onChange:e=>{const n=[u[0],parseInt(e.target.value),u[2]],r=kM("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Value"),e.createElement("input",{type:"range",min:"0",max:"100",value:u[2],onChange:e=>{const n=[u[0],u[1],parseInt(e.target.value)],r=kM("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%))`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HEX"),e.createElement("div",null),e.createElement("input",{type:"text",value:p,onChange:e=>{const n=""===e.target.value?null:kM("hex",[e.target.value]);i(n),t(n)}})))},IM=({inicolordata:t,inicolorspace:n="hex",allow_null:r=!1,onChange:o})=>{void 0===t&&(t=[0,0,0],n="rgb"),Array.isArray(t)||(t=[t]);let i=kM(n,t);void 0===i.rgb()&&(i=kM("rgb",[0,0,0]));const[a,s]=e.useState(i),l={background:"#"+a.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"};return e.createElement(gM,null,e.createElement(yM,{asChild:!0},e.createElement("button",{style:l})),e.createElement(bM,null,e.createElement(vM,{side:"left"},e.createElement(SM,{onChange:e=>{if(null===e&&!r)throw new Error("Color is null");null!==e&&s(e),o&&o(e)},colorconverter:a,allow_null:r}))))};function _M(e,[t,n]){return Math.min(n,Math.max(t,e))}var AM=["PageUp","PageDown"],NM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],RM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},OM="Slider",[TM,MM,PM]=Yw(OM),[DM,BM]=Fu(OM,[PM]),[jM,LM]=DM(OM),FM=r.forwardRef(((e,t)=>{const{name:n,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:p=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:m,...g}=e,y=r.useRef(new Set),b=r.useRef(0),v="horizontal"===s?GM:WM,[w=[],x]=Zu({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),p(e)}}),C=r.useRef(w);function E(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=_M(s,[o,i]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return Lu.jsx(jM,{scope:e.__scopeSlider,name:n,disabled:l,min:o,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:s,form:m,children:Lu.jsx(TM.Provider,{scope:e.__scopeSlider,children:Lu.jsx(TM.Slot,{scope:e.__scopeSlider,children:Lu.jsx(v,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:_u(g.onPointerDown,(()=>{l||(C.current=w)})),min:o,max:i,inverted:h,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(w,e);E(e,t)},onSlideMove:l?void 0:function(e){E(e,b.current)},onSlideEnd:l?void 0:function(){const e=C.current[b.current];w[b.current]!==e&&f(w)},onHomeKeyDown:()=>!l&&E(o,0,{commit:!0}),onEndKeyDown:()=>!l&&E(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=AM.includes(e.key)||e.shiftKey&&NM.includes(e.key)?10:1,r=b.current;E(w[r]+a*n*t,r,{commit:!0})}}})})})})}));FM.displayName=OM;var[VM,zM]=DM(OM,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GM=r.forwardRef(((e,t)=>{const{min:n,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[p,f]=r.useState(null),h=Ru(t,(e=>f(e))),m=r.useRef(void 0),g=Jw(i),y="ltr"===g,b=y&&!a||!y&&a;function v(e){const t=m.current||p.getBoundingClientRect(),r=eP([0,t.width],b?[n,o]:[o,n]);return m.current=t,r(e-t.left)}return Lu.jsx(VM,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:Lu.jsx(HM,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=v(e.clientX);s?.(t)},onSlideMove:e=>{const t=v(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=RM[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),WM=r.forwardRef(((e,t)=>{const{min:n,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=r.useRef(null),p=Ru(t,d),f=r.useRef(void 0),h=!i;function m(e){const t=f.current||d.current.getBoundingClientRect(),r=eP([0,t.height],h?[o,n]:[n,o]);return f.current=t,r(e-t.top)}return Lu.jsx(VM,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:Lu.jsx(HM,{"data-orientation":"vertical",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);a?.(t)},onSlideMove:e=>{const t=m(e.clientY);s?.(t)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:e=>{const t=RM[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),HM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=LM(OM,n);return Lu.jsx(Ku.span,{...c,ref:t,onKeyDown:_u(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):AM.concat(NM).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:_u(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:_u(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:_u(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),XM="SliderTrack",ZM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=LM(XM,n);return Lu.jsx(Ku.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));ZM.displayName=XM;var $M="SliderRange",YM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,...o}=e,i=LM($M,n),a=zM($M,n),s=Ru(t,r.useRef(null)),l=i.values.length,c=i.values.map((e=>qM(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return Lu.jsx(Ku.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})}));YM.displayName=$M;var UM="SliderThumb",JM=r.forwardRef(((e,t)=>{const n=MM(e.__scopeSlider),[o,i]=r.useState(null),a=Ru(t,(e=>i(e))),s=r.useMemo((()=>o?n().findIndex((e=>e.ref.current===o)):-1),[n,o]);return Lu.jsx(KM,{...e,ref:a,index:s})})),KM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,index:o,name:i,...a}=e,s=LM(UM,n),l=zM(UM,n),[c,u]=r.useState(null),d=Ru(t,(e=>u(e))),p=!c||(s.form||!!c.closest("form")),f=_C(c),h=s.values[o],m=void 0===h?0:qM(h,s.min,s.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),y=f?.[l.size],b=y?function(e,t,n){const r=e/2,o=eP([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return r.useEffect((()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}}),[c,s.thumbs]),Lu.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${b}px)`},children:[Lu.jsx(TM.ItemSlot,{scope:e.__scopeSlider,children:Lu.jsx(Ku.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:void 0===h?{display:"none"}:e.style,onFocus:_u(e.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))})}),p&&Lu.jsx(QM,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},o)]})}));JM.displayName=UM;var QM=e=>{const{value:t,...n}=e,o=r.useRef(null),i=function(e){const t=r.useRef({value:e,previous:e});return r.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(t);return r.useEffect((()=>{const e=o.current,n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}}),[i,t]),Lu.jsx("input",{style:{display:"none"},...n,ref:o,defaultValue:t})};function qM(e,t,n){return _M(100/(n-t)*(e-t),[0,100])}function eP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var tP=FM,nP=ZM,rP=YM,oP=JM;function iP(e){return iP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iP(e)}function aP(e){var t=function(e,t){if("object"!=iP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=iP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iP(t)?t:t+""}function sP(e,t,n){return(t=aP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lP(Object(n),!0).forEach((function(t){sP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dP(e,t){if(e){if("string"==typeof e)return uP(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uP(e,t):void 0}}function pP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||dP(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fP(e,t){if(null==e)return{};var n,r,o=mw(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hP=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aP(r.key),r)}}function gP(e){return gP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gP(e)}function yP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yP=function(){return!!e})()}function bP(e){var t=yP();return function(){var n,r=gP(e);if(t){var o=gP(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==iP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vw(e)}(this,n)}}function vP(e){return function(e){if(Array.isArray(e))return uP(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dP(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wP=e.useLayoutEffect,xP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],CP=function(){};function EP(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function kP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(EP(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var SP=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===iP(e)&&null!==e?[e]:[]},IP=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,cP({},fP(e,xP))},_P=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function AP(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function NP(e){return AP(e)?window.pageYOffset:e.scrollTop}function RP(e,t){AP(e)?window.scrollTo(0,t):e.scrollTop=t}function OP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:CP,o=NP(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;RP(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function TP(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?RP(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&RP(e,Math.max(t.offsetTop-o,0))}function MP(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var PP=!1,DP={get passive(){return PP=!0}},BP="undefined"!=typeof window?window:{};BP.addEventListener&&BP.removeEventListener&&(BP.addEventListener("p",CP,DP),BP.removeEventListener("p",CP,!1));var jP=PP;function LP(e){return null!=e}function FP(e,t,n){return e?t:n}var VP=["children","innerProps"],zP=["children","innerProps"];function GP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,h=p.height,m=p.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:AP(u=l)?window.innerHeight:u.clientHeight,b=NP(l),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,C=y-m,E=x+b,k=d-b-m,S=f-y+b+v,I=b+m-w,_=160;switch(o){case"auto":case"bottom":if(C>=h)return{placement:"bottom",maxHeight:t};if(k>=h&&!a)return i&&OP(l,S,_),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&C>=r)return i&&OP(l,S,_),{placement:"bottom",maxHeight:a?C-v:k-v};if("auto"===o||a){var A=t,N=a?x:E;return N>=r&&(A=Math.min(N-v-s,t)),{placement:"top",maxHeight:A}}if("bottom"===o)return i&&RP(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(E>=h&&!a)return i&&OP(l,I,_),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&x>=r){var R=t;return(!a&&E>=r||a&&x>=r)&&(R=a?x-w:E-w),i&&OP(l,I,_),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var WP,HP=function(e){return"auto"===e?"bottom":e},XP=e.createContext(null),ZP=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,c=(e.useContext(XP)||{}).setPortalPlacement,u=e.useRef(null),d=pP(e.useState(o),2),p=d[0],f=d[1],h=pP(e.useState(null),2),m=h[0],g=h[1],y=l.spacing.controlHeight;return wP((function(){var e=u.current;if(e){var t="fixed"===a,n=GP({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:y});f(n.maxHeight),g(n.placement),null==c||c(n.placement)}}),[o,i,a,s,r,c,y]),n({ref:u,placerProps:cP(cP({},t),{},{placement:m||HP(i),maxHeight:p})})},$P=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return ny("div",Sm({},_P(e,"menu",{menu:!0}),{ref:n},r),t)},YP=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return cP({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},UP=YP,JP=YP,KP=["size"],QP=["innerProps","isRtl","size"];var qP,eD,tD="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},nD=function(e){var t=e.size,n=fP(e,KP);return ny("svg",Sm({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:tD},n))},rD=function(e){return ny(nD,Sm({size:20},e),ny("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"}))},oD=function(e){return ny(nD,Sm({size:20},e),ny("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"}))},iD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cP({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},aD=iD,sD=iD,lD=oy(WP||(qP=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],eD||(eD=qP.slice(0)),WP=Object.freeze(Object.defineProperties(qP,{raw:{value:Object.freeze(eD)}})))),cD=function(e){var t=e.delay,n=e.offset;return ny("span",{css:ry({animation:"".concat(lD," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},uD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return ny("div",Sm({ref:o},_P(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},dD=["data"],pD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return ny("div",Sm({},_P(e,"group",{group:!0}),s),ny(i,Sm({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),ny("div",null,t))},fD=["innerRef","isDisabled","isHidden","inputClassName"],hD={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":cP({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},hD)},gD=function(e){return cP({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},hD)},yD=function(e){var t=e.cx,n=e.value,r=IP(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=fP(r,fD);return ny("div",Sm({},_P(e,"input",{"input-container":!0}),{"data-value":n||""}),ny("input",Sm({className:t({input:!0},s),ref:o,style:gD(a),disabled:i},l)))},bD=function(e){var t=e.children,n=e.innerProps;return ny("div",n,t)};var vD=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return ny(l,{data:r,innerProps:cP(cP({},_P(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},ny(c,{data:r,innerProps:cP({},_P(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),ny(u,{data:r,innerProps:cP(cP({},_P(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},wD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return ny("div",Sm({},_P(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},xD=function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"placeholder",{placeholder:!0}),n),t)},CD=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return ny("div",Sm({},_P(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ED={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ny(rD,null))},Control:uD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ny(oD,null))},DownChevron:oD,CrossIcon:rD,Group:pD,GroupHeading:function(e){var t=IP(e);t.data;var n=fP(t,dD);return ny("div",Sm({},_P(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ny("span",Sm({},t,_P(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:yD,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=fP(e,QP);return ny("div",Sm({},_P(cP(cP({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ny(cD,{delay:0,offset:n}),ny(cD,{delay:160,offset:!0}),ny(cD,{delay:320,offset:!n}))},Menu:$P,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return ny("div",Sm({},_P(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(n){var r=n.appendTo,o=n.children,i=n.controlElement,a=n.innerProps,s=n.menuPlacement,l=n.menuPosition,c=e.useRef(null),u=e.useRef(null),d=pP(e.useState(HP(s)),2),p=d[0],f=d[1],h=e.useMemo((function(){return{setPortalPlacement:f}}),[]),m=pP(e.useState(null),2),g=m[0],y=m[1],b=e.useCallback((function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===l?0:window.pageYOffset,n=e[p]+t;n===(null==g?void 0:g.offset)&&e.left===(null==g?void 0:g.rect.left)&&e.width===(null==g?void 0:g.rect.width)||y({offset:n,rect:e})}}),[i,l,p,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);wP((function(){b()}),[b]);var v=e.useCallback((function(){"function"==typeof u.current&&(u.current(),u.current=null),i&&c.current&&(u.current=rC(i,c.current,b,{elementResize:"ResizeObserver"in window}))}),[i,b]);wP((function(){v()}),[v]);var w=e.useCallback((function(e){c.current=e,v()}),[v]);if(!r&&"fixed"!==l||!g)return null;var x=ny("div",Sm({ref:w},_P(cP(cP({},n),{},{offset:g.offset,position:l,rect:g.rect}),"menuPortal",{"menu-portal":!0}),a),o);return ny(XP.Provider,{value:h},r?t.createPortal(x,r):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=fP(e,zP);return ny("div",Sm({},_P(cP(cP({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=fP(e,VP);return ny("div",Sm({},_P(cP(cP({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:vD,MultiValueContainer:bD,MultiValueLabel:bD,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({role:"button"},n),t||ny(rD,{size:14}))},Option:wD,Placeholder:xD,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return ny("div",Sm({},_P(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:CD,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return ny("div",Sm({},_P(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},kD=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function SD(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||kD(r)&&kD(o)))return!1;var r,o;return!0}for(var ID="production"===process.env.NODE_ENV?{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"}:{name:"1f43avz-a11yText-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;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},_D=function(e){return ny("span",Sm({css:ID},e))},AD={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){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(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ND=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,u=t.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,f=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,b=l.options,v=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,C=l["aria-label"],E=l["aria-live"],k=e.useMemo((function(){return cP(cP({},AD),d||{})}),[d]),S=e.useMemo((function(){var e,t="";if(n&&k.onChange){var r=n.option,o=n.options,i=n.removedValue,a=n.removedValues,l=n.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",d=o||a||void 0,f=d?d.map(p):[],h=cP({isDisabled:c&&m(c,s),label:u,labels:f},n);t=k.onChange(h)}return t}),[n,k,m,s,p]),I=e.useMemo((function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&k.onFocus){var a={focused:t,label:p(t),isDisabled:m(t,s),isSelected:n,options:i,context:t===r?"menu":"value",selectValue:s,isAppleDevice:u};e=k.onFocus(a)}return e}),[r,o,p,m,k,i,s,u]),_=e.useMemo((function(){var e="";if(y&&b.length&&!x&&k.onFilter){var t=v({count:i.length});e=k.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,y,k,b,v,x]),A="initial-input-focus"===(null==n?void 0:n.action),N=e.useMemo((function(){var e="";if(k.guidance){var t=o?"value":y?"menu":"input";e=k.guidance({"aria-label":C,context:t,isDisabled:r&&m(r,s),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:A})}return e}),[C,r,o,h,m,g,y,k,s,w,A]),R=ny(e.Fragment,null,ny("span",{id:"aria-selection"},S),ny("span",{id:"aria-focused"},I),ny("span",{id:"aria-results"},_),ny("span",{id:"aria-guidance"},N));return ny(e.Fragment,null,ny(_D,{id:c},A&&R),ny(_D,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&R))},RD=[{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źẑżžẓẕƶȥɀⱬꝣ"}],OD=new RegExp("["+RD.map((function(e){return e.letters})).join("")+"]","g"),TD={},MD=0;MD<RD.length;MD++)for(var PD=RD[MD],DD=0;DD<PD.letters.length;DD++)TD[PD.letters[DD]]=PD.base;var BD=function(e){return e.replace(OD,(function(e){return TD[e]}))},jD=function(e,t){void 0===t&&(t=SD);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(BD),LD=function(e){return e.replace(/^\s+|\s+$/g,"")},FD=function(e){return"".concat(e.label," ").concat(e.value)},VD=["innerRef"];function zD(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=pP(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=pP(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(fP(e,VD),"onExited","in","enter","exit","appear");return ny("input",Sm({ref:t},n,{css:ry({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)"},"production"===process.env.NODE_ENV?"":";label:DummyInput;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var GD=["boxSizing","height","overflow","paddingRight","position"],WD={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function HD(e){e.cancelable&&e.preventDefault()}function XD(e){e.stopPropagation()}function ZD(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function $D(){return"ontouchstart"in window||navigator.maxTouchPoints}var YD=!("undefined"==typeof window||!window.document||!window.document.createElement),UD=0,JD={capture:!1,passive:!1};var KD=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},QD="production"===process.env.NODE_ENV?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function qD(t){var n=t.children,r=t.lockEnabled,o=t.captureEnabled,i=function(t){var n=t.isEnabled,r=t.onBottomArrive,o=t.onBottomLeave,i=t.onTopArrive,a=t.onTopLeave,s=e.useRef(!1),l=e.useRef(!1),c=e.useRef(0),u=e.useRef(null),d=e.useCallback((function(e,t){if(null!==u.current){var n=u.current,c=n.scrollTop,d=n.scrollHeight,p=n.clientHeight,f=u.current,h=t>0,m=d-p-c,g=!1;m>t&&s.current&&(o&&o(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>m?(r&&!s.current&&r(e),f.scrollTop=d,g=!0,s.current=!0):!h&&-t>c&&(i&&!l.current&&i(e),f.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[r,o,i,a]),p=e.useCallback((function(e){d(e,e.deltaY)}),[d]),f=e.useCallback((function(e){c.current=e.changedTouches[0].clientY}),[]),h=e.useCallback((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=e.useCallback((function(e){if(e){var t=!!jP&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),g=e.useCallback((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return e.useEffect((function(){if(n){var e=u.current;return m(e),function(){g(e)}}}),[n,m,g]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),a=function(t){var n=t.isEnabled,r=t.accountForScrollbars,o=void 0===r||r,i=e.useRef({}),a=e.useRef(null),s=e.useCallback((function(e){if(YD){var t=document.body,n=t&&t.style;if(o&&GD.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&UD<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(WD).forEach((function(e){var t=WD[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&$D()&&(t.addEventListener("touchmove",HD,JD),e&&(e.addEventListener("touchstart",ZD,JD),e.addEventListener("touchmove",XD,JD))),UD+=1}}),[o]),l=e.useCallback((function(e){if(YD){var t=document.body,n=t&&t.style;UD=Math.max(UD-1,0),o&&UD<1&&GD.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&$D()&&(t.removeEventListener("touchmove",HD,JD),e&&(e.removeEventListener("touchstart",ZD,JD),e.removeEventListener("touchmove",XD,JD)))}}),[o]);return e.useEffect((function(){if(n){var e=a.current;return s(e),function(){l(e)}}}),[n,s,l]),function(e){a.current=e}}({isEnabled:r});return ny(e.Fragment,null,r&&ny("div",{onClick:KD,css:QD}),n((function(e){i(e),a(e)})))}var eB="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},tB=function(e){var t=e.name,n=e.onFocus;return ny("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:eB,value:"",onChange:function(){}})};function nB(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function rB(){return nB(/^Mac/i)}function oB(){return nB(/^iPhone/i)||nB(/^iPad/i)||rB()&&navigator.maxTouchPoints>1}var iB,aB={clearIndicator:sD,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return cP({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:aD,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return cP({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cP({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return cP(cP({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},mD),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return cP({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:JP,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return cP((sP(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),sP(n,"position","absolute"),sP(n,"width","100%"),sP(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return cP({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return cP({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return cP({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return cP({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:UP,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return cP({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return cP({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return cP({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return cP({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},sB={borderRadius:4,colors:{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%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},lB={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:MP(),captureMenuScroll:!MP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=cP({ignoreCase:!0,ignoreAccents:!0,stringify:FD,trim:!0,matchFrom:"any"},iB),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?LD(t):t,c=a?LD(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=jD(l),c=BD(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function cB(e,t,n,r){return{type:"option",data:t,isDisabled:yB(e,t,n),isSelected:bB(e,t,n),label:mB(e,t),value:gB(e,t),index:r}}function uB(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return cB(e,n,t,r)})).filter((function(t){return fB(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=cB(e,n,t,r);return fB(e,i)?i:void 0})).filter(LP)}function dB(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,vP(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function pB(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,vP(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function fB(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!wB(e)||!i)&&vB(e,{label:a,value:s,data:o},r)}var hB=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},mB=function(e,t){return e.getOptionLabel(t)},gB=function(e,t){return e.getOptionValue(t)};function yB(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function bB(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=gB(e,t);return n.some((function(t){return gB(e,t)===r}))}function vB(e,t,n){return!e.filterOption||e.filterOption(t,n)}var wB=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},xB=1,CB=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gw(e,t)}(n,e.Component);var t=bP(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).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:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=rB()||oB(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(vP(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=FP(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(FP(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=FP(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return hB(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return pB(uB(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return kP.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return mB(r.props,e)},r.getOptionValue=function(e){return gB(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=aB[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,cP(cP({},ED),e.components);var e},r.buildCategorizedOptions=function(){return uB(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return dB(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:cP({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&AP(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return wB(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++xB),r.state.selectValue=SP(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=hB(o,i[a])}return r}return function(e,t,n){t&&mP(e.prototype,t),n&&mP(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(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&&TP(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(TP(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(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(sB):cP(cP({},sB),this.props.theme):sB}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return yB(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return bB(this.props,e,t)}},{key:"filterOption",value:function(e,t){return vB(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{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 e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=cP(cP(cP({"aria-autocomplete":"list","aria-expanded":l,"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":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(u,Sm({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):r.createElement(zD,Sm({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:CP,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!d)return h?null:r.createElement(l,Sm({},c,{key:"placeholder",isDisabled:p,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return y.map((function(t,s){var l=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,Sm({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=y[0];return r.createElement(s,Sm({},c,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,Sm({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return r.createElement(e,Sm({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return r.createElement(n,Sm({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,Sm({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,m=f.inputValue,g=f.isLoading,y=f.loadingMessage,b=f.minMenuHeight,v=f.maxMenuHeight,w=f.menuIsOpen,x=f.menuPlacement,C=f.menuPosition,E=f.menuPortalTarget,k=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,I=f.noOptionsMessage,_=f.onMenuScrollToTop,A=f.onMenuScrollToBottom;if(!w)return null;var N,R=function(t,n){var o=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,f=p===i,h=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},g="".concat(e.getElementId("option"),"-").concat(n),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return r.createElement(u,Sm({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return r.createElement(n,Sm({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return R(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return R(t,"".concat(t.index))}));else if(g){var O=y({inputValue:m});if(null===O)return null;N=r.createElement(l,d,O)}else{var T=I({inputValue:m});if(null===T)return null;N=r.createElement(c,d,T)}var M={minMenuHeight:b,maxMenuHeight:v,menuPlacement:x,menuPosition:C,menuShouldScrollIntoView:S},P=r.createElement(ZP,Sm({},d,M),(function(t){var n=t.ref,o=t.placerProps,s=o.placement,l=o.maxHeight;return r.createElement(i,Sm({},d,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:s}),r.createElement(qD,{captureEnabled:h,onTopArrive:_,onBottomArrive:A,lockEnabled:k},(function(t){return r.createElement(a,Sm({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:p}),N)})))}));return E||"fixed"===C?r.createElement(s,Sm({},d,{appendTo:E,controlElement:this.controlRef,menuPlacement:x,menuPosition:C}),P):P}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return r.createElement(tB,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:a,type:"hidden",value:""});return r.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return r.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return r.createElement(ND,Sm({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return r.createElement(o,Sm({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),r.createElement(t,Sm({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),r.createElement(i,Sm({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,Sm({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=SP(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return dB(uB(e,t))}(e,h):[],y=d?pB(uB(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:v,focusedOptionId:hB(y,v),focusableOptionsWithIds:y,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,C=a&&s;return a&&!C&&(x={value:FP(f,h,h[0]||null),options:h,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),cP(cP(cP({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:C})}}]),n}();CB.defaultProps=lB;var EB=e.forwardRef((function(t,n){var o=function(t){var n=t.defaultInputValue,r=void 0===n?"":n,o=t.defaultMenuIsOpen,i=void 0!==o&&o,a=t.defaultValue,s=void 0===a?null:a,l=t.inputValue,c=t.menuIsOpen,u=t.onChange,d=t.onInputChange,p=t.onMenuClose,f=t.onMenuOpen,h=t.value,m=fP(t,hP),g=pP(e.useState(void 0!==l?l:r),2),y=g[0],b=g[1],v=pP(e.useState(void 0!==c?c:i),2),w=v[0],x=v[1],C=pP(e.useState(void 0!==h?h:s),2),E=C[0],k=C[1],S=e.useCallback((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),I=e.useCallback((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),_=e.useCallback((function(){"function"==typeof f&&f(),x(!0)}),[f]),A=e.useCallback((function(){"function"==typeof p&&p(),x(!1)}),[p]),N=void 0!==l?l:y,R=void 0!==c?c:w,O=void 0!==h?h:E;return cP(cP({},m),{},{inputValue:N,menuIsOpen:R,onChange:S,onInputChange:I,onMenuClose:A,onMenuOpen:_,value:O})}(t);return r.createElement(CB,Sm({ref:n},o))})),kB=EB;const SB=({options:t,items_per_page:n,className:r,defaultValue:o,onChange:i})=>{const[a,s]=e.useState(""),[l,c]=e.useState(0),u=t.filter((e=>e.label.toLowerCase().includes(a)||e.value.toLowerCase().includes(a)));var d;d=void 0!==n?u.slice(l*n,(l+1)*n):u;const p={control:e=>({...e,minHeight:void 0})};return e.createElement(kB,{options:d,onInputChange:e=>{s(e.toLowerCase()),c(0)},onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:r,unstyled:!0,styles:p,classNamePrefix:"styled-select",defaultValue:o,value:o})},IB=({io:t,inputconverter:n,parser:r=e=>parseFloat(e)})=>{const o=e.useContext(oL),[i,a]=e.useState(n[1](t.value));e.useEffect((()=>{a(n[1](t.value))}),[t.value]);const s=e=>{e=r(parseFloat(e.toString()).toString()),isNaN(e)?(e="<NoValue>",a("")):(void 0!==t.value_options?.min&&e<t.value_options.min&&(e=t.value_options.min),void 0!==t.value_options?.max&&e>t.value_options.max&&(e=t.value_options.max),a(e.toString()));try{e=n[0](e)}catch(e){}o.worker?.set_io_value({nid:t.node,ioid:t.id,value:e,set_default:t.render_options.set_default})};let l=t.connected?n[1](t.value):i;return void 0===l&&(l=t.value_options?.min),void 0===l&&(l=t.value_options?.max),void 0===l&&(l=""),null===l&&(l=""),void 0!==t.value_options?.max&&void 0!==t.value_options?.min?e.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},e.createElement(tP,{className:"SliderRoot",value:[void 0===l?t.value_options?.min:l],min:t.value_options?.min,max:t.value_options?.max,step:t.value_options.step||(t.value_options?.max-t.value_options?.min)/1e3,disabled:t.connected,onValueCommit:e=>{isNaN(e[0])||s(e[0])},onValueChange:e=>{isNaN(e[0])||a(e[0].toString())}},e.createElement(nP,{className:"SliderTrack"},e.createElement(rP,{className:"SliderRange"})),e.createElement(gT,null,e.createElement(BT,{open:!0},e.createElement(jT,{asChild:!0},e.createElement(oP,{className:"SliderThumb"})),e.createElement(FT,{className:"SliderTooltipContent"},l))))):e.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:l,onChange:e=>a(e.target.value),onBlur:e=>{s(e.target.value)},onKeyDown:e=>{if("ArrowUp"!==e.key)if("ArrowDown"!==e.key)/^[0-9.eE+-]$/.test(e.key)||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)||e.preventDefault();else{let n=t.render_options.step||1;e.shiftKey&&(n*=10);let r=(parseFloat(l)||0)-n;s(r)}else{let n=t.render_options.step||1;e.shiftKey&&(n*=10);let r=(parseFloat(l)||0)+n;s(r)}},disabled:t.connected,step:t.render_options.step,min:t.value_options?.min,max:t.value_options?.max})},_B=({io:t,inputconverter:n})=>{const r=e.useContext(oL),[o,i]=e.useState(n[1](t.value));e.useEffect((()=>{i(n[1](t.value))}),[t.value]);let a=t.connected?n[1](t.value):o;return null==a&&(a=""),e.createElement("input",{className:"nodedatainput styledinput stringinput",value:a,onChange:e=>i(e.target.value),onBlur:e=>{let o=e.target.value;o||(o="<NoValue>");try{o=n[0](o)}catch(e){}r.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},disabled:t.connected})},AB=e=>e,NB=e=>parseFloat(e),RB=e=>!!e,OB=e=>"null"===e?null:e,TB=({io:t,inputconverter:n,parser:r})=>{let o=t.value_options?.options||[];Array.isArray(o)&&(o={type:"enum",values:o,keys:o.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==o.type&&(o={type:"enum",values:Object.values(o),keys:Object.keys(o),nullable:!1}),!o.nullable||o.values.includes(null)||o.keys.includes("None")||(o.values.unshift(null),o.keys.unshift("None"));const i=[];for(let e=0;e<o.values.length;e++){const t=null===o.values[e]||void 0===o.values[e]?"undefined":typeof o.values[e];let n=o.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),i.push([o.keys[e],n.toString(),t])}const a=e.useContext(oL),s=({value:e,datatype:o})=>{const i=r||(e=>"nuinputconvertermber"===e?NB:"boolean"===e?RB:"undefined"===e?OB:AB)(o);let s=i(e);try{s=n[0](e)}catch(e){}a.worker?.set_io_value({nid:t.node,ioid:t.id,value:s,set_default:t.render_options.set_default})};let l=t.value;null===l&&(l="null"),void 0===l&&(l="undefined");const c=i.find((e=>e[1]===l.toString()));let u;void 0!==c&&(u={value:c[1],label:c[0],datatype:c[2]});const d=i.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return e.createElement(SB,{className:"nodedatainput styleddropdown",options:d,defaultValue:u,onChange:e=>{s(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},MB=e=>!!e&&e instanceof Date,PB=e=>!!e&&e instanceof Object&&"function"==typeof e;function DB(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function BB(t){let{field:n,value:r,data:o,lastElement:i,openBracket:a,closeBracket:s,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:p}=t;const f=e.useRef(!1),[h,m,g]=function(t){const[n,r]=e.useState(t());return[n,()=>r((e=>!e)),r]}((()=>u(l,r,n))),y=e.useRef(null);e.useEffect((()=>{f.current?g(u(l,r,n)):f.current=!0}),[u]);const b=h?c.collapseIcon:c.expandIcon,v=h?"collapse JSON":"expand JSON",w=e.useId(),x=l+1,C=o.length-1,E=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!p.current)return;const n=p.current.querySelectorAll("[role=button]");let r=-1;for(let e=0;e<n.length;e++)if(0===n[e].tabIndex){r=e;break}if(r<0)return;const o=(r+t+n.length)%n.length;n[r].tabIndex=-1,n[o].tabIndex=0,n[o].focus()}},k=()=>{var e;m();const t=y.current;if(!t)return;const n=null===(e=p.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return e.createElement("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},e.createElement("span",{className:b,onClick:k,onKeyDown:E,role:"button","aria-label":v,"aria-expanded":h,"aria-controls":h?w:void 0,ref:y,tabIndex:0===l?0:-1}),(n||""===n)&&(d?e.createElement("span",{className:c.clickableLabel,onClick:k,onKeyDown:E},DB(n,c.quotesForFieldNames),":"):e.createElement("span",{className:c.label},DB(n,c.quotesForFieldNames),":")),e.createElement("span",{className:c.punctuation},a),h?e.createElement("ul",{id:w,role:"group",className:c.childFieldsContainer},o.map(((t,n)=>e.createElement(zB,{key:t[0]||n,field:t[0],value:t[1],style:c,lastElement:n===C,level:x,shouldExpandNode:u,clickToExpandNode:d,outerRef:p})))):e.createElement("span",{className:c.collapsedContent,onClick:k,onKeyDown:E}),e.createElement("span",{className:c.punctuation},s),!i&&e.createElement("span",{className:c.punctuation},","))}function jB(t){let{field:n,openBracket:r,closeBracket:o,lastElement:i,style:a}=t;return e.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&e.createElement("span",{className:a.label},DB(n,a.quotesForFieldNames),":"),e.createElement("span",{className:a.punctuation},r),e.createElement("span",{className:a.punctuation},o),!i&&e.createElement("span",{className:a.punctuation},","))}function LB(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:s,outerRef:l}=e;return 0===Object.keys(n).length?jB({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):BB({field:t,value:n,lastElement:o||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:l})}function FB(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:s,outerRef:l}=e;return 0===n.length?jB({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):BB({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:s,data:n.map((e=>[void 0,e])),outerRef:l})}function VB(t){let n,{field:r,value:o,style:i,lastElement:a}=t,s=i.otherValue;var l;return null===o?(n="null",s=i.nullValue):void 0===o?(n="undefined",s=i.undefinedValue):"string"==typeof(l=o)||l instanceof String?(n=function(e,t){return t?`"${e}"`:e}(o,!i.noQuotesForStringValues),s=i.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(o)?(n=o?"true":"false",s=i.booleanValue):(e=>"number"==typeof e||e instanceof Number)(o)?(n=o.toString(),s=i.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(o)?(n=`${o.toString()}n`,s=i.numberValue):n=MB(o)?o.toISOString():PB(o)?"function() { }":o.toString(),e.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(r||""===r)&&e.createElement("span",{className:i.label},DB(r,i.quotesForFieldNames),":"),e.createElement("span",{className:s},n),!a&&e.createElement("span",{className:i.punctuation},","))}function zB(t){const n=t.value;return r=n,Array.isArray(r)?e.createElement(FB,Object.assign({},t)):!(e=>"object"==typeof e&&null!==e)(n)||MB(n)||PB(n)?e.createElement(VB,Object.assign({},t)):e.createElement(LB,Object.assign({},t));var r}var GB="_2bkNM",WB="_1BXBN";const HB={container:"_2IvMF _GzYRV",basicChildStyle:GB,childFieldsContainer:WB,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},XB={container:"_11RoI _GzYRV",basicChildStyle:GB,childFieldsContainer:WB,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},ZB=()=>!0,$B=e=>e<1,YB=t=>{let{data:n,style:r=HB,shouldExpandNode:o=ZB,clickToExpandNode:i=!1,...a}=t;const s=e.useRef(null);return e.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:r.container,ref:s,role:"tree"}),e.createElement(zB,{value:n,style:{...HB,...r},lastElement:!0,level:0,shouldExpandNode:o,clickToExpandNode:i,outerRef:s}))},UB=({data:t})=>e.createElement(YB,{data:t,style:XB,shouldExpandNode:$B}),JB=({tabledata:t})=>{const n=e.useMemo((()=>(e=>{const t=[];if(void 0===e)return{header:[],rows:[]};void 0===e.data&&(e.data=[]),void 0===e.columns&&(0===e.data.length?e.columns=[]:e.columns=e.data[0].map(((e,t)=>`col${t}`))),void 0===e.index&&(e.index=e.data.map(((e,t)=>`row${t}`)));for(let n=0;n<e.index.length;n++){const r=[e.index[n]];for(let t=0;t<e.columns.length;t++)r.push(e.data[n][t]);t.push(r)}return{header:["index",...e.columns],rows:t}})(t)),[t]),[r,o]=e.useState("asc"),[i,a]=e.useState("index");let s=n.header.indexOf(i);-1===s&&(s=0);const l=((e,t)=>{const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>t(e[0],n[0]))),n.map((e=>e[0]))})(n.rows,(e=>"desc"===e?(e,t)=>t[s]<e[s]?-1:1:(e,t)=>e[s]<t[s]?-1:1)(r));return e.createElement(rw,{className:"tablecontainer"},e.createElement(Hv,{size:"small"},e.createElement(lw,{className:"tableHead"},e.createElement(fw,{className:"tableheadercolor"},n.header.map((t=>e.createElement(ew,{key:t,sortDirection:i===t&&r,className:"tableheadercolor"},e.createElement(Hw,{active:i===t,direction:i===t?r:"asc",onClick:()=>(e=>{o(i===e&&"asc"===r?"desc":"asc"),a(e)})(t),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},t)))))),e.createElement(Jv,null,l.map(((n,r)=>e.createElement(fw,{key:t.index[r]},n.map(((t,n)=>e.createElement(ew,{key:n,className:0==n?"indexcol":"datacol"},t)))))))))};var KB,QB={};
|
|
140
|
+
`,Tw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=n,[l,c]=r.useState([]),u=r.useRef(0),d=r.useRef(null);r.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const p=r.useRef(!1),f=uh(),h=r.useRef(null),m=r.useRef(null),g=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,Lu.jsx(Ow,{classes:{ripple:wh(i.ripple,Iw.ripple),rippleVisible:wh(i.rippleVisible,Iw.rippleVisible),ripplePulsate:wh(i.ripplePulsate,Iw.ripplePulsate),child:wh(i.child,Iw.child),childLeaving:wh(i.childLeaving,Iw.childLeaving),childPulsate:wh(i.childPulsate,Iw.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),y=r.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,f]),b=r.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=r.useCallback(((e,t)=>{if(f.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void f.start(0,(()=>{v(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[f]);return r.useImperativeHandle(t,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Lu.jsx(Rw,{className:wh(Iw.root,i.root,a),ref:m,...s,children:Lu.jsx(kw,{component:null,exit:!0,children:l})})}));function Mw(e){return yh("MuiButtonBase",e)}"production"!==process.env.NODE_ENV&&(Tw.propTypes={center:Yf.bool,classes:Yf.object,className:Yf.string});const Pw=bh("MuiButtonBase",["root","disabled","focusVisible"]),Dw=gv("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Pw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Bw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:f,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:b,onFocus:v,onFocusVisible:w,onKeyDown:x,onKeyUp:C,onMouseDown:E,onMouseLeave:k,onMouseUp:S,onTouchEnd:I,onTouchMove:_,onTouchStart:A,tabIndex:N=0,TouchRippleProps:R,touchRippleRef:O,type:T,...M}=n,P=r.useRef(null),D=hw.use(),B=ih(D.ref,O),[j,L]=r.useState(!1);c&&j&&L(!1),r.useImperativeHandle(o,(()=>({focusVisible:()=>{L(!0),P.current.focus()}})),[]);const F=D.shouldMount&&!u&&!c;r.useEffect((()=>{j&&p&&!u&&D.pulsate()}),[u,p,j,D]);const V=jw(D,"start",E,d),z=jw(D,"stop",y,d),G=jw(D,"stop",b,d),W=jw(D,"stop",S,d),H=jw(D,"stop",(e=>{j&&e.preventDefault(),k&&k(e)}),d),X=jw(D,"start",A,d),Z=jw(D,"stop",I,d),$=jw(D,"stop",_,d),Y=jw(D,"stop",(e=>{dh(e.target)||L(!1),m&&m(e)}),!1),U=oh((e=>{P.current||(P.current=e.currentTarget),dh(e.target)&&(L(!0),w&&w(e)),v&&v(e)})),J=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},K=oh((e=>{p&&!e.repeat&&j&&" "===e.key&&D.stop(e,(()=>{D.start(e)})),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),Q=oh((e=>{p&&" "===e.key&&j&&!e.defaultPrevented&&D.stop(e,(()=>{D.pulsate(e)})),C&&C(e),g&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let q=l;"button"===q&&(M.href||M.to)&&(q=h);const ee={};"button"===q?(ee.type=void 0===T?"button":T,ee.disabled=c):(M.href||M.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=ih(t,P),ne={...n,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:N,focusVisible:j},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=fh({root:["root",t&&"disabled",n&&"focusVisible"]},Mw,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return Lu.jsxs(Dw,{as:q,className:wh(re.root,s),ownerState:ne,onBlur:Y,onClick:g,onContextMenu:z,onFocus:U,onKeyDown:K,onKeyUp:Q,onMouseDown:V,onMouseLeave:H,onMouseUp:W,onDragLeave:G,onTouchEnd:Z,onTouchMove:$,onTouchStart:X,ref:te,tabIndex:c?-1:N,type:T,...ee,...M,children:[a,F?Lu.jsx(Tw,{ref:B,center:i,...R}):null]})}));function jw(e,t,n,r=!1){return oh((o=>(n&&n(o),r||e[t](o),!0)))}"production"!==process.env.NODE_ENV&&(Bw.propTypes={action:th,centerRipple:Yf.bool,children:Yf.node,classes:Yf.object,className:Yf.string,component:Kf,disabled:Yf.bool,disableRipple:Yf.bool,disableTouchRipple:Yf.bool,focusRipple:Yf.bool,focusVisibleClassName:Yf.string,href:Yf.any,LinkComponent:Yf.elementType,onBlur:Yf.func,onClick:Yf.func,onContextMenu:Yf.func,onDragLeave:Yf.func,onFocus:Yf.func,onFocusVisible:Yf.func,onKeyDown:Yf.func,onKeyUp:Yf.func,onMouseDown:Yf.func,onMouseLeave:Yf.func,onMouseUp:Yf.func,onTouchEnd:Yf.func,onTouchMove:Yf.func,onTouchStart:Yf.func,sx:Yf.oneOfType([Yf.arrayOf(Yf.oneOfType([Yf.func,Yf.object,Yf.bool])),Yf.func,Yf.object]),tabIndex:Yf.number,TouchRippleProps:Yf.object,touchRippleRef:Yf.oneOfType([Yf.func,Yf.shape({current:Yf.shape({pulsate:Yf.func.isRequired,start:Yf.func.isRequired,stop:Yf.func.isRequired})})]),type:Yf.oneOfType([Yf.oneOf(["button","reset","submit"]),Yf.string])});var Lw=Cv(Lu.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Fw(e){return yh("MuiTableSortLabel",e)}const Vw=bh("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function zw(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,f=u[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=Ch({className:n,...l,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:h}),b=ih(y,h?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:{...t,ownerState:{...t.ownerState,...n}}}(f,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[f,w]}const Gw=gv(Bw,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(yv((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${Vw.icon}`]:{opacity:.5}},[`&.${Vw.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Vw.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),Ww=gv("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${nh(n.direction)}`]]}})(yv((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),Hw=r.forwardRef((function(e,t){const n=bv({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=Lw,slots:c={},slotProps:u={},...d}=n,p={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},f=(e=>{const{classes:t,direction:n,active:r}=e;return fh({root:["root",r&&"active",`direction${nh(n)}`],icon:["icon",`iconDirection${nh(n)}`]},Fw,t)})(p),h={slots:c,slotProps:u},[m,g]=zw("root",{elementType:Gw,externalForwardedProps:h,ownerState:p,className:wh(f.root,i),ref:t}),[y,b]=zw("icon",{elementType:Ww,externalForwardedProps:h,ownerState:p,className:f.icon});return Lu.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,s&&!r?null:Lu.jsx(y,{as:l,...b})]})}));"production"!==process.env.NODE_ENV&&(Hw.propTypes={active:Yf.bool,children:Yf.node,classes:Yf.object,className:Yf.string,direction:Yf.oneOf(["asc","desc"]),hideSortIcon:Yf.bool,IconComponent:Yf.elementType,slotProps:Yf.shape({icon:Yf.oneOfType([Yf.func,Yf.object]),root:Yf.oneOfType([Yf.func,Yf.object])}),slots:Yf.shape({icon:Yf.elementType,root:Yf.elementType}),sx:Yf.oneOfType([Yf.arrayOf(Yf.oneOfType([Yf.func,Yf.object,Yf.bool])),Yf.func,Yf.object])});var Xw=Cv(Lu.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Zw=Cv(Lu.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");const $w=({trigger:t,title:n,description:r,children:o,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:l,setOpen:c,modal:u=!0})=>e.createElement(Kp,{open:l,onOpenChange:e=>{c&&c(e),a&&a(e)},modal:u},t&&e.createElement(Qp,{asChild:!0},t),e.createElement(qp,null,e.createElement(ef,{className:"dialogoverlay funcnodescontainer"}),e.createElement(tf,{className:"dialogconent funcnodescontainer "},n&&e.createElement(nf,{className:"dialogtitle"},n),r&&e.createElement(rf,{className:"dialogdescription"},r),e.createElement("div",{className:"dialogchildren"},o),e.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(s||[]).map(((t,n)=>e.createElement(of,{asChild:!0,key:n},e.createElement("button",{className:"dialogsendbutton",onClick:t.onClick},t.text))))),i&&e.createElement(of,{asChild:!0},e.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},e.createElement(Xw,null))))));function Yw(t){const n=t+"CollectionProvider",[r,o]=Fu(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:n,children:r}=t,o=e.useRef(null),a=e.useRef(new Map).current;return Lu.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=t+"CollectionSlot",c=e.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Ru(t,a(l,n).collectionRef);return Lu.jsx($u,{ref:o,children:r})}));c.displayName=l;const u=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,s=e.useRef(null),l=Ru(n,s),c=a(u,r);return e.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),Lu.jsx($u,{[d]:"",ref:l,children:o})}));return p.displayName=u,[{Provider:s,Slot:c,ItemSlot:p},function(n){const r=a(t+"CollectionConsumer",n);return e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}var Uw=r.createContext(void 0);function Jw(e){const t=r.useContext(Uw);return e||t||"ltr"}const Kw=["top","right","bottom","left"],Qw=Math.min,qw=Math.max,ex=Math.round,tx=Math.floor,nx=e=>({x:e,y:e}),rx={left:"right",right:"left",bottom:"top",top:"bottom"},ox={start:"end",end:"start"};function ix(e,t,n){return qw(e,Qw(t,n))}function ax(e,t){return"function"==typeof e?e(t):e}function sx(e){return e.split("-")[0]}function lx(e){return e.split("-")[1]}function cx(e){return"x"===e?"y":"x"}function ux(e){return"y"===e?"height":"width"}function dx(e){return["top","bottom"].includes(sx(e))?"y":"x"}function px(e){return cx(dx(e))}function fx(e){return e.replace(/start|end/g,(e=>ox[e]))}function hx(e){return e.replace(/left|right|bottom|top/g,(e=>rx[e]))}function mx(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function gx(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yx(e,t,n){let{reference:r,floating:o}=e;const i=dx(t),a=px(t),s=ux(a),l=sx(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(lx(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function bx(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ax(t,e),h=mx(f),m=s[p?"floating"===d?"reference":"floating":d],g=gx(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=gx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}function vx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wx(e){return Kw.some((t=>e[t]>=0))}function xx(){return"undefined"!=typeof window}function Cx(e){return Sx(e)?(e.nodeName||"").toLowerCase():"#document"}function Ex(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kx(e){var t;return null==(t=(Sx(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Sx(e){return!!xx()&&(e instanceof Node||e instanceof Ex(e).Node)}function Ix(e){return!!xx()&&(e instanceof Element||e instanceof Ex(e).Element)}function _x(e){return!!xx()&&(e instanceof HTMLElement||e instanceof Ex(e).HTMLElement)}function Ax(e){return!(!xx()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ex(e).ShadowRoot)}function Nx(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dx(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Rx(e){return["table","td","th"].includes(Cx(e))}function Ox(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Tx(e){const t=Mx(),n=Ix(e)?Dx(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Mx(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Px(e){return["html","body","#document"].includes(Cx(e))}function Dx(e){return Ex(e).getComputedStyle(e)}function Bx(e){return Ix(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jx(e){if("html"===Cx(e))return e;const t=e.assignedSlot||e.parentNode||Ax(e)&&e.host||kx(e);return Ax(t)?t.host:t}function Lx(e){const t=jx(e);return Px(t)?e.ownerDocument?e.ownerDocument.body:e.body:_x(t)&&Nx(t)?t:Lx(t)}function Fx(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Lx(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ex(o);if(i){const e=Vx(a);return t.concat(a,a.visualViewport||[],Nx(o)?o:[],e&&n?Fx(e):[])}return t.concat(o,Fx(o,[],n))}function Vx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zx(e){const t=Dx(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_x(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ex(n)!==i||ex(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Gx(e){return Ix(e)?e:e.contextElement}function Wx(e){const t=Gx(e);if(!_x(t))return nx(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zx(t);let a=(i?ex(n.width):n.width)/r,s=(i?ex(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Hx=nx(0);function Xx(e){const t=Ex(e);return Mx()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Hx}function Zx(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Gx(e);let a=nx(1);t&&(r?Ix(r)&&(a=Wx(r)):a=Wx(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ex(e))&&t}(i,n,r)?Xx(i):nx(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ex(i),t=r&&Ix(r)?Ex(r):r;let n=e,o=Vx(n);for(;o&&r&&t!==n;){const e=Wx(o),t=o.getBoundingClientRect(),r=Dx(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ex(o),o=Vx(n)}}return gx({width:u,height:d,x:l,y:c})}function $x(e,t){const n=Bx(e).scrollLeft;return t?t.left+n:Zx(kx(e)).left+n}function Yx(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:$x(e,r)),y:r.top+t.scrollTop}}function Ux(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ex(e),r=kx(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Mx();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=kx(e),n=Bx(e),r=e.ownerDocument.body,o=qw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+$x(e);const s=-n.scrollTop;return"rtl"===Dx(r).direction&&(a+=qw(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(kx(e));else if(Ix(t))r=function(e,t){const n=Zx(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_x(e)?Wx(e):nx(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Xx(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return gx(r)}function Jx(e,t){const n=jx(e);return!(n===t||!Ix(n)||Px(n))&&("fixed"===Dx(n).position||Jx(n,t))}function Kx(e,t,n){const r=_x(t),o=kx(t),i="fixed"===n,a=Zx(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nx(0);if(r||!r&&!i)if(("body"!==Cx(t)||Nx(o))&&(s=Bx(t)),r){const e=Zx(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=$x(o));const c=!o||r||i?nx(0):Yx(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Qx(e){return"static"===Dx(e).position}function qx(e,t){if(!_x(e)||"fixed"===Dx(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kx(e)===n&&(n=n.ownerDocument.body),n}function eC(e,t){const n=Ex(e);if(Ox(e))return n;if(!_x(e)){let t=jx(e);for(;t&&!Px(t);){if(Ix(t)&&!Qx(t))return t;t=jx(t)}return n}let r=qx(e,t);for(;r&&Rx(r)&&Qx(r);)r=qx(r,t);return r&&Px(r)&&Qx(r)&&!Tx(r)?n:r||function(e){let t=jx(e);for(;_x(t)&&!Px(t);){if(Tx(t))return t;if(Ox(t))return null;t=jx(t)}return null}(e)||n}const tC={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=kx(r),s=!!t&&Ox(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nx(1);const u=nx(0),d=_x(r);if((d||!d&&!i)&&(("body"!==Cx(r)||Nx(a))&&(l=Bx(r)),_x(r))){const e=Zx(r);c=Wx(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nx(0):Yx(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:kx,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ox(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Fx(e,[],!1).filter((e=>Ix(e)&&"body"!==Cx(e))),o=null;const i="fixed"===Dx(e).position;let a=i?jx(e):e;for(;Ix(a)&&!Px(a);){const t=Dx(a),n=Tx(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Nx(a)&&!n&&Jx(e,a))?r=r.filter((e=>e!==a)):o=t,a=jx(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Ux(t,n,o);return e.top=qw(r.top,e.top),e.right=Qw(r.right,e.right),e.bottom=Qw(r.bottom,e.bottom),e.left=qw(r.left,e.left),e}),Ux(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:eC,getElementRects:async function(e){const t=this.getOffsetParent||eC,n=this.getDimensions,r=await n(e.floating);return{reference:Kx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zx(e);return{width:t,height:n}},getScale:Wx,isElement:Ix,isRTL:function(e){return"rtl"===Dx(e).direction}};function nC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rC(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Gx(e),u=o||i?[...c?Fx(c):[],...Fx(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=kx(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-tx(d)+"px "+-tx(o.clientWidth-(u+p))+"px "+-tx(o.clientHeight-(d+f))+"px "+-tx(u)+"px",threshold:qw(0,Qw(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||nC(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?Zx(e):null;return l&&function t(){const r=Zx(e);m&&!nC(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const oC=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sx(n),s=lx(n),l="y"===dx(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ax(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},iC=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ax(e,t),c={x:n,y:r},u=await bx(t,l),d=dx(sx(o)),p=cx(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=ix(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";h=ix(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},aC=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ax(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=sx(o),b=dx(s),v=sx(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[hx(s)]:function(e){const t=hx(e);return[fx(e),t,fx(t)]}(s)),C="none"!==h;!p&&C&&x.push(...function(e,t,n,r){const o=lx(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(sx(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fx)))),i}(s,m,h,w));const E=[s,...x],k=await bx(t,g),S=[];let I=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(k[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lx(e),o=px(e),i=ux(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=hx(a)),[a,hx(a)]}(o,a,w);S.push(k[e[0]],k[e[1]])}if(I=[...I,{placement:o,overflows:S}],!S.every((e=>e<=0))){var _,A;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(A=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=I.filter((e=>{if(C){const t=dx(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},sC=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ax(e,t),u=await bx(t,c),d=sx(o),p=lx(o),f="y"===dx(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,w=Qw(m-u[g],b),x=Qw(h-u[y],v),C=!t.middlewareData.shift;let E=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),C&&!p){const e=qw(u.left,0),t=qw(u.right,0),n=qw(u.top,0),r=qw(u.bottom,0);f?k=h-2*(0!==e||0!==t?e+t:qw(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:qw(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:E});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},lC=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ax(e,t);switch(r){case"referenceHidden":{const e=vx(await bx(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:wx(e)}}}case"escaped":{const e=vx(await bx(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:wx(e)}}}default:return{}}}}},cC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ax(e,t)||{};if(null==c)return{};const d=mx(u),p={x:n,y:r},f=px(o),h=ux(f),m=await a.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=C?C[v]:0;E&&await(null==a.isElement?void 0:a.isElement(C))||(E=s.floating[v]||i.floating[h]);const k=w/2-x/2,S=E/2-m[h]/2-1,I=Qw(d[y],S),_=Qw(d[b],S),A=I,N=E-m[h]-_,R=E/2-m[h]/2+k,O=ix(A,R,N),T=!l.arrow&&null!=lx(o)&&R!==O&&i.reference[h]/2-(R<A?I:_)-m[h]/2<0,M=T?R<A?R-A:R-N:0;return{[f]:p[f]+M,data:{[f]:O,centerOffset:R-O-M,...T&&{alignmentOffset:M}},reset:T}}}),uC=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ax(e,t),u={x:n,y:r},d=dx(o),p=cx(d);let f=u[p],h=u[d];const m=ax(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=["top","left"].includes(sx(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},dC=(e,t,n)=>{const r=new Map,o={platform:tC,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=yx(c,r,l),p=r,f={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[i]:{...f[i],...b}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=yx(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var pC="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function fC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!fC(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!fC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function hC(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mC(e,t){const n=hC(e);return Math.round(t*n)/n}function gC(e){const t=r.useRef(e);return pC((()=>{t.current=e})),t}const yC=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?cC({element:n.current,padding:r}).fn(t):{}:n?cC({element:n,padding:r}).fn(t):{};var o}}),bC=(e,t)=>({...oC(e),options:[e,t]}),vC=(e,t)=>({...iC(e),options:[e,t]}),wC=(e,t)=>({...uC(e),options:[e,t]}),xC=(e,t)=>({...aC(e),options:[e,t]}),CC=(e,t)=>({...sC(e),options:[e,t]}),EC=(e,t)=>({...lC(e),options:[e,t]}),kC=(e,t)=>({...yC(e),options:[e,t]});var SC=r.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return Lu.jsx(Ku.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Lu.jsx("polygon",{points:"0,0 30,0 15,10"})})}));SC.displayName="Arrow";var IC=SC;function _C(e){const[t,n]=r.useState(void 0);return zu((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var AC="Popper",[NC,RC]=Fu(AC),[OC,TC]=NC(AC),MC=e=>{const{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return Lu.jsx(OC,{scope:t,anchor:o,onAnchorChange:i,children:n})};MC.displayName=AC;var PC="PopperAnchor",DC=r.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=TC(PC,n),s=r.useRef(null),l=Ru(t,s);return r.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:Lu.jsx(Ku.div,{...i,ref:l})}));DC.displayName=PC;var BC="PopperContent",[jC,LC]=NC(BC),FC=r.forwardRef(((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...y}=e,b=TC(BC,n),[v,w]=r.useState(null),x=Ru(t,(e=>w(e))),[C,E]=r.useState(null),k=_C(C),S=k?.width??0,I=k?.height??0,_=i+("center"!==s?"-"+s:""),A="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(d)?d:[d],R=N.length>0,O={padding:A,boundary:N.filter(WC),altBoundary:R},{refs:T,floatingStyles:M,placement:P,isPositioned:D,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=r.useState(i);fC(h,i)||m(i);const[g,y]=r.useState(null),[b,v]=r.useState(null),w=r.useCallback((e=>{e!==k.current&&(k.current=e,y(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),C=s||g,E=l||b,k=r.useRef(null),S=r.useRef(null),I=r.useRef(p),_=null!=u,A=gC(u),N=gC(a),R=gC(d),O=r.useCallback((()=>{if(!k.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};N.current&&(e.platform=N.current),dC(k.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!fC(I.current,t)&&(I.current=t,o.flushSync((()=>{f(t)})))}))}),[h,t,n,N,R]);pC((()=>{!1===d&&I.current.isPositioned&&(I.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const T=r.useRef(!1);pC((()=>(T.current=!0,()=>{T.current=!1})),[]),pC((()=>{if(C&&(k.current=C),E&&(S.current=E),C&&E){if(A.current)return A.current(C,E,O);O()}}),[C,E,O,A,_]);const M=r.useMemo((()=>({reference:k,floating:S,setReference:w,setFloating:x})),[w,x]),P=r.useMemo((()=>({reference:C,floating:E})),[C,E]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=mC(P.floating,p.x),r=mC(P.floating,p.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...hC(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,P.floating,p.x,p.y]);return r.useMemo((()=>({...p,update:O,refs:M,elements:P,floatingStyles:D})),[p,O,M,P,D])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>rC(...e,{animationFrame:"always"===m}),elements:{reference:b.anchor},middleware:[bC({mainAxis:a+I,alignmentAxis:l}),u&&vC({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?wC():void 0,...O}),u&&xC({...O}),CC({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),C&&kC({element:C,padding:c}),HC({arrowWidth:S,arrowHeight:I}),h&&EC({strategy:"referenceHidden",...O})]}),[j,L]=XC(P),F=Xu(g);zu((()=>{D&&F?.()}),[D,F]);const V=B.arrow?.x,z=B.arrow?.y,G=0!==B.arrow?.centerOffset,[W,H]=r.useState();return zu((()=>{v&&H(window.getComputedStyle(v).zIndex)}),[v]),Lu.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Lu.jsx(jC,{scope:n,placedSide:j,onArrowChange:E,arrowX:V,arrowY:z,shouldHideArrow:G,children:Lu.jsx(Ku.div,{"data-side":j,"data-align":L,...y,ref:x,style:{...y.style,animation:D?void 0:"none"}})})})}));FC.displayName=BC;var VC="PopperArrow",zC={top:"bottom",right:"left",bottom:"top",left:"right"},GC=r.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=LC(VC,n),i=zC[o.placedSide];return Lu.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Lu.jsx(IC,{...r,ref:t,style:{...r.style,display:"block"}})})}));function WC(e){return null!==e}GC.displayName=VC;var HC=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=XC(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?u:`${d}px`,h=-s+"px"):"top"===l?(f=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?u:`${p}px`):"left"===l&&(f=`${r.floating.width+s}px`,h=i?u:`${p}px`),{data:{x:f,y:h}}}});function XC(e){const[t,n="center"]=e.split("-");return[t,n]}var ZC=MC,$C=DC,YC=FC,UC=GC,JC="rovingFocusGroup.onEntryFocus",KC={bubbles:!1,cancelable:!0},QC="RovingFocusGroup",[qC,eE,tE]=Yw(QC),[nE,rE]=Fu(QC,[tE]),[oE,iE]=nE(QC),aE=r.forwardRef(((e,t)=>Lu.jsx(qC.Provider,{scope:e.__scopeRovingFocusGroup,children:Lu.jsx(qC.Slot,{scope:e.__scopeRovingFocusGroup,children:Lu.jsx(sE,{...e,ref:t})})})));aE.displayName=QC;var sE=r.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...p}=e,f=r.useRef(null),h=Ru(t,f),m=Jw(a),[g=null,y]=Zu({prop:s,defaultProp:l,onChange:c}),[b,v]=r.useState(!1),w=Xu(u),x=eE(n),C=r.useRef(!1),[E,k]=r.useState(0);return r.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(JC,w),()=>e.removeEventListener(JC,w)}),[w]),Lu.jsx(oE,{scope:n,orientation:o,dir:m,loop:i,currentTabStopId:g,onItemFocus:r.useCallback((e=>y(e)),[y]),onItemShiftTab:r.useCallback((()=>v(!0)),[]),onFocusableItemAdd:r.useCallback((()=>k((e=>e+1))),[]),onFocusableItemRemove:r.useCallback((()=>k((e=>e-1))),[]),children:Lu.jsx(Ku.div,{tabIndex:b||0===E?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:_u(e.onMouseDown,(()=>{C.current=!0})),onFocus:_u(e.onFocus,(e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(JC,KC);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));dE([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}C.current=!1})),onBlur:_u(e.onBlur,(()=>v(!1)))})})})),lE="RovingFocusGroupItem",cE=r.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,...s}=e,l=Hu(),c=a||l,u=iE(lE,n),d=u.currentTabStopId===c,p=eE(n),{onFocusableItemAdd:f,onFocusableItemRemove:h}=u;return r.useEffect((()=>{if(o)return f(),()=>h()}),[o,f,h]),Lu.jsx(qC.ItemSlot,{scope:n,id:c,focusable:o,active:i,children:Lu.jsx(Ku.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:_u(e.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:_u(e.onFocus,(()=>u.onItemFocus(c))),onKeyDown:_u(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:uE[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>dE(n)))}}))})})}));cE.displayName=lE;var uE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dE(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var pE=aE,fE=cE,hE=["Enter"," "],mE=["ArrowUp","PageDown","End"],gE=["ArrowDown","PageUp","Home",...mE],yE={ltr:[...hE,"ArrowRight"],rtl:[...hE,"ArrowLeft"]},bE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vE="Menu",[wE,xE,CE]=Yw(vE),[EE,kE]=Fu(vE,[CE,RC,rE]),SE=RC(),IE=rE(),[_E,AE]=EE(vE),[NE,RE]=EE(vE),OE=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=e,l=SE(t),[c,u]=r.useState(null),d=r.useRef(!1),p=Xu(a),f=Jw(i);return r.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),Lu.jsx(ZC,{...l,children:Lu.jsx(_E,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:u,children:Lu.jsx(NE,{scope:t,onClose:r.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:d,dir:f,modal:s,children:o})})})};OE.displayName=vE;var TE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SE(n);return Lu.jsx($C,{...o,...r,ref:t})}));TE.displayName="MenuAnchor";var ME="MenuPortal",[PE,DE]=EE(ME,{forceMount:void 0}),BE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=AE(ME,t);return Lu.jsx(PE,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};BE.displayName=ME;var jE="MenuContent",[LE,FE]=EE(jE),VE=r.forwardRef(((e,t)=>{const n=DE(jE,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=AE(jE,e.__scopeMenu),a=RE(jE,e.__scopeMenu);return Lu.jsx(wE.Provider,{scope:e.__scopeMenu,children:Lu.jsx(vd,{present:r||i.open,children:Lu.jsx(wE.Slot,{scope:e.__scopeMenu,children:a.modal?Lu.jsx(zE,{...o,ref:t}):Lu.jsx(GE,{...o,ref:t})})})})})),zE=r.forwardRef(((e,t)=>{const n=AE(jE,e.__scopeMenu),o=r.useRef(null),i=Ru(t,o);return r.useEffect((()=>{const e=o.current;if(e)return bp(e)}),[]),Lu.jsx(WE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_u(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})})),GE=r.forwardRef(((e,t)=>{const n=AE(jE,e.__scopeMenu);return Lu.jsx(WE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),WE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,disableOutsideScroll:m,...g}=e,y=AE(jE,n),b=RE(jE,n),v=SE(n),w=IE(n),x=xE(n),[C,E]=r.useState(null),k=r.useRef(null),S=Ru(t,k,y.onContentChange),I=r.useRef(0),_=r.useRef(""),A=r.useRef(0),N=r.useRef(null),R=r.useRef("right"),O=r.useRef(0),T=m?dp:r.Fragment,M=m?{as:$u,allowPinchZoom:!0}:void 0,P=e=>{const t=_.current+e,n=x().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const s=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){_.current=t,window.clearTimeout(I.current),""!==t&&(I.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};r.useEffect((()=>()=>window.clearTimeout(I.current)),[]),Cd();const D=r.useCallback((e=>R.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,N.current?.area)),[]);return Lu.jsx(LE,{scope:n,searchRef:_,onItemEnter:r.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:r.useCallback((e=>{D(e)||(k.current?.focus(),E(null))}),[D]),onTriggerLeave:r.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:A,onPointerGraceIntentChange:r.useCallback((e=>{N.current=e}),[]),children:Lu.jsx(T,{...M,children:Lu.jsx(dd,{asChild:!0,trapped:i,onMountAutoFocus:_u(a,(e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,onDismiss:h,children:Lu.jsx(pE,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:_u(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:Lu.jsx(YC,{role:"menu","aria-orientation":"vertical","data-state":yk(y.open),"data-radix-menu-content":"",dir:b.dir,...v,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:_u(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&P(e.key));const o=k.current;if(e.target!==o)return;if(!gE.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));mE.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:_u(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),_.current="")})),onPointerMove:_u(e.onPointerMove,wk((e=>{const t=e.target,n=O.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>O.current?"right":"left";R.current=t,O.current=e.clientX}})))})})})})})})}));VE.displayName=jE;var HE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{role:"group",...r,ref:t})}));HE.displayName="MenuGroup";var XE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{...r,ref:t})}));XE.displayName="MenuLabel";var ZE="MenuItem",$E="menu.itemSelect",YE=r.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:o,...i}=e,a=r.useRef(null),s=RE(ZE,e.__scopeMenu),l=FE(ZE,e.__scopeMenu),c=Ru(t,a),u=r.useRef(!1);return Lu.jsx(UE,{...i,ref:c,disabled:n,onClick:_u(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent($E,{bubbles:!0,cancelable:!0});e.addEventListener($E,(e=>o?.(e)),{once:!0}),Qu(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:_u(e.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:_u(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||hE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));YE.displayName=ZE;var UE=r.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:i,...a}=e,s=FE(ZE,n),l=IE(n),c=r.useRef(null),u=Ru(t,c),[d,p]=r.useState(!1),[f,h]=r.useState("");return r.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[a.children]),Lu.jsx(wE.ItemSlot,{scope:n,disabled:o,textValue:i??f,children:Lu.jsx(fE,{asChild:!0,...l,focusable:!o,children:Lu.jsx(Ku.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:_u(e.onPointerMove,wk((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:_u(e.onPointerLeave,wk((e=>s.onItemLeave(e)))),onFocus:_u(e.onFocus,(()=>p(!0))),onBlur:_u(e.onBlur,(()=>p(!1)))})})})})),JE=r.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return Lu.jsx(ok,{scope:e.__scopeMenu,checked:n,children:Lu.jsx(YE,{role:"menuitemcheckbox","aria-checked":bk(n)?"mixed":n,...o,ref:t,"data-state":vk(n),onSelect:_u(o.onSelect,(()=>r?.(!!bk(n)||!n)),{checkForDefaultPrevented:!1})})})}));JE.displayName="MenuCheckboxItem";var KE="MenuRadioGroup",[QE,qE]=EE(KE,{value:void 0,onValueChange:()=>{}}),ek=r.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xu(r);return Lu.jsx(QE,{scope:e.__scopeMenu,value:n,onValueChange:i,children:Lu.jsx(HE,{...o,ref:t})})}));ek.displayName=KE;var tk="MenuRadioItem",nk=r.forwardRef(((e,t)=>{const{value:n,...r}=e,o=qE(tk,e.__scopeMenu),i=n===o.value;return Lu.jsx(ok,{scope:e.__scopeMenu,checked:i,children:Lu.jsx(YE,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":vk(i),onSelect:_u(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));nk.displayName=tk;var rk="MenuItemIndicator",[ok,ik]=EE(rk,{checked:!1}),ak=r.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=ik(rk,n);return Lu.jsx(vd,{present:r||bk(i.checked)||!0===i.checked,children:Lu.jsx(Ku.span,{...o,ref:t,"data-state":vk(i.checked)})})}));ak.displayName=rk;var sk=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lu.jsx(Ku.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));sk.displayName="MenuSeparator";var lk=r.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=SE(n);return Lu.jsx(UC,{...o,...r,ref:t})}));lk.displayName="MenuArrow";var ck="MenuSub",[uk,dk]=EE(ck),pk=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:i}=e,a=AE(ck,t),s=SE(t),[l,c]=r.useState(null),[u,d]=r.useState(null),p=Xu(i);return r.useEffect((()=>(!1===a.open&&p(!1),()=>p(!1))),[a.open,p]),Lu.jsx(ZC,{...s,children:Lu.jsx(_E,{scope:t,open:o,onOpenChange:p,content:u,onContentChange:d,children:Lu.jsx(uk,{scope:t,contentId:Hu(),triggerId:Hu(),trigger:l,onTriggerChange:c,children:n})})})};pk.displayName=ck;var fk="MenuSubTrigger",hk=r.forwardRef(((e,t)=>{const n=AE(fk,e.__scopeMenu),o=RE(fk,e.__scopeMenu),i=dk(fk,e.__scopeMenu),a=FE(fk,e.__scopeMenu),s=r.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=r.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return r.useEffect((()=>d),[d]),r.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),Lu.jsx(TE,{asChild:!0,...u,children:Lu.jsx(UE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":yk(n.open),...e,ref:Nu(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_u(e.onPointerMove,wk((t=>{a.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{n.onOpenChange(!0),d()}),100))}))),onPointerLeave:_u(e.onPointerLeave,wk((e=>{d();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:_u(e.onKeyDown,(t=>{const r=""!==a.searchRef.current;e.disabled||r&&" "===t.key||yE[o.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())}))})})}));hk.displayName=fk;var mk="MenuSubContent",gk=r.forwardRef(((e,t)=>{const n=DE(jE,e.__scopeMenu),{forceMount:o=n.forceMount,...i}=e,a=AE(jE,e.__scopeMenu),s=RE(jE,e.__scopeMenu),l=dk(mk,e.__scopeMenu),c=r.useRef(null),u=Ru(t,c);return Lu.jsx(wE.Provider,{scope:e.__scopeMenu,children:Lu.jsx(vd,{present:o||a.open,children:Lu.jsx(wE.Slot,{scope:e.__scopeMenu,children:Lu.jsx(WE,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:_u(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:_u(e.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:_u(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=bE[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function yk(e){return e?"open":"closed"}function bk(e){return"indeterminate"===e}function vk(e){return bk(e)?"indeterminate":e?"checked":"unchecked"}function wk(e){return t=>"mouse"===t.pointerType?e(t):void 0}gk.displayName=mk;var xk=OE,Ck=TE,Ek=BE,kk=VE,Sk=HE,Ik=XE,_k=YE,Ak=JE,Nk=ek,Rk=nk,Ok=ak,Tk=sk,Mk=lk,Pk=pk,Dk=hk,Bk=gk,jk="DropdownMenu",[Lk,Fk]=Fu(jk,[kE]),Vk=kE(),[zk,Gk]=Lk(jk),Wk=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=Vk(t),u=r.useRef(null),[d=!1,p]=Zu({prop:i,defaultProp:a,onChange:s});return Lu.jsx(zk,{scope:t,triggerId:Hu(),triggerRef:u,contentId:Hu(),open:d,onOpenChange:p,onOpenToggle:r.useCallback((()=>p((e=>!e))),[p]),modal:l,children:Lu.jsx(xk,{...c,open:d,onOpenChange:p,dir:o,modal:l,children:n})})};Wk.displayName=jk;var Hk="DropdownMenuTrigger",Xk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Gk(Hk,n),a=Vk(n);return Lu.jsx(Ck,{asChild:!0,...a,children:Lu.jsx(Ku.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Nu(t,i.triggerRef),onPointerDown:_u(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:_u(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));Xk.displayName=Hk;var Zk=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Vk(t);return Lu.jsx(Ek,{...r,...n})};Zk.displayName="DropdownMenuPortal";var $k="DropdownMenuContent",Yk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,i=Gk($k,n),a=Vk(n),s=r.useRef(!1);return Lu.jsx(kk,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:t,onCloseAutoFocus:_u(e.onCloseAutoFocus,(e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:_u(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(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)"}})}));Yk.displayName=$k;var Uk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Sk,{...o,...r,ref:t})}));Uk.displayName="DropdownMenuGroup";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ik,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var Jk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(_k,{...o,...r,ref:t})}));Jk.displayName="DropdownMenuItem";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ak,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var Kk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Nk,{...o,...r,ref:t})}));Kk.displayName="DropdownMenuRadioGroup";var Qk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Rk,{...o,...r,ref:t})}));Qk.displayName="DropdownMenuRadioItem";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Ok,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Tk,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Mk,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var qk=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Dk,{...o,...r,ref:t})}));qk.displayName="DropdownMenuSubTrigger";var eS=r.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vk(n);return Lu.jsx(Bk,{...o,...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)"}})}));eS.displayName="DropdownMenuSubContent";var tS=Wk,nS=Xk,rS=Zk,oS=Yk,iS=Uk,aS=Jk,sS=Kk,lS=Qk,cS=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Vk(t),[s=!1,l]=Zu({prop:r,defaultProp:i,onChange:o});return Lu.jsx(Pk,{...a,open:s,onOpenChange:l,children:n})},uS=qk,dS=eS;function pS(e,t){return function(e,t){return new Blob([e],{type:t})}(function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r}(e),t)}function fS(e,t=!0){return new Promise((n=>{const r=new FileReader;r.onload=()=>{const e=r.result;t&&n(e.split(",")[1]),n(e)},r.readAsDataURL(e)}))}function hS(e){return function(e){return new Promise((t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.onchange=()=>{const e=n.files?.[0];e&&t(e)},n.click()}))}(e).then(fS)}const mS=({trigger:t,setOpen:n,open:r})=>{const[o,i]=e.useState(""),a=e.useContext(oL);return a.options.useWorkerManager?e.createElement($w,{setOpen:n,open:r,trigger:t,title:"New Worker",description:"Create a new worker"},e.createElement("div",null,"Name:",e.createElement("br",null),e.createElement("input",{className:"styledinput",onChange:e=>{i(e.currentTarget.value)},value:o})),e.createElement("div",null,o&&e.createElement("div",null,e.createElement("button",{className:"styledbtn",onClick:()=>{a.workermanager?.new_worker({name:o}),n(!1)}},"Create")))):null},gS=({trigger:t,setOpen:n,open:r})=>{const o=e.useContext(oL),[i,a]=e.useState(!1),s=o.workers(),l=o.worker?.uuid,c=(l?s[l]?.name:void 0)||l||"worker";return e.createElement($w,{setOpen:n,open:r,trigger:t,title:"Export Worker",description:"Export the worker as a .fnw file"},e.createElement("div",null,e.createElement("div",null,e.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:i,onChange:e=>{a(e.currentTarget.checked)}}),"Include Files"),e.createElement("button",{className:"styledbtn",onClick:async()=>{if(!o.worker)return;!function(e,t,n){const r=pS(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await o.worker.export({withFiles:i}),c+".fnw","application/zip"),n(!1)}},"Export")))},yS=()=>{const t=e.useContext(oL).progress_state();return e.createElement("div",{className:"statusbar"},e.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),e.createElement("span",{className:"statusbar-message"},t.message))},bS=()=>{const t=e.useContext(oL),n=t.workers(),[r,o]=e.useState(!1),[i,a]=e.useState(!1),s=t.options.useWorkerManager&&t.workermanager&&t.workermanager.open,l=s&&Object.keys(n).length>0,c=t.worker&&t.worker.is_open,u=c&&s;return s||c?e.createElement(e.Fragment,null,e.createElement(tS,null,e.createElement(nS,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Ov,{direction:"row",spacing:1},e.createElement(Rv,null,"Worker")," ",e.createElement(Ev,null)))),e.createElement(rS,null,e.createElement(oS,{className:"headermenucontent funcnodescontainer"},e.createElement(iS,null,l&&e.createElement(cS,null,e.createElement(uS,{className:"headermenuitem submenuitem"},e.createElement(Ov,{direction:"row",spacing:1},"Select",e.createElement(Tv,null))),e.createElement(rS,null,e.createElement(dS,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},e.createElement(sS,{value:t.worker?.uuid,onValueChange:e=>{(e=>{if("__select__"!==e&&t.workers&&t.workermanager&&n[e]){if(!n[e].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;t.workermanager.set_active(e)}})(e)}},Object.keys(n).sort(((e,t)=>{if(n[e].active&&!n[t].active)return-1;if(!n[e].active&&n[t].active)return 1;const r=n[e].name||e,o=n[t].name||t;return r.localeCompare(o)})).map((r=>e.createElement(lS,{className:"headermenuitem workerselectoption"+(n[r]?.active?" active":" inactive")+" headermenuitem",key:r,value:r,disabled:r===t.worker?.uuid},n[r]?.name||r))))))),c&&e.createElement(e.Fragment,null,u&&e.createElement(aS,{className:"headermenuitem",onClick:()=>{if(t.worker)return t.workermanager?void t.workermanager?.restart_worker(t.worker.uuid):t.logger.error("no workermanager")}},"Restart"),e.createElement(aS,{className:"headermenuitem",onClick:()=>{t.worker&&t.worker.stop()}},"Stop"),e.createElement(aS,{className:"headermenuitem",onClick:()=>a(!0)},"Export"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{if(!t.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const e=await hS(".fnw");t.worker.update_from_export(e)}},"Update")),s&&e.createElement(e.Fragment,null,e.createElement(aS,{className:"headermenuitem",onClick:()=>o(!0)},"New")))))),e.createElement(mS,{open:r,setOpen:o}),e.createElement(gS,{open:i,setOpen:a})):null},vS=()=>{const t=e.useContext(oL);return e.createElement(e.Fragment,null,e.createElement(tS,null,e.createElement(nS,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Ov,{direction:"row",spacing:1},e.createElement(Rv,null,"Nodespace")," ",e.createElement(Ev,null)))),e.createElement(rS,null,e.createElement(oS,{className:"headermenucontent funcnodescontainer"},e.createElement(iS,null,e.createElement(aS,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&t.worker?.clear()}},"New"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{const e=await(t.worker?.save());if(!e)return;const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="flow.json",o.click(),URL.revokeObjectURL(r),o.remove()}},"Save"),e.createElement(aS,{className:"headermenuitem",onClick:async()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.onchange=async e=>{const n=e.target.files?.[0];if(!n)return;const r=new FileReader;r.onload=async e=>{const n=e.target?.result;if(!n)return;const r=JSON.parse(n);await(t.worker?.load(r))},r.readAsText(n)},e.click()}},"Load"))))))},wS=({...t})=>{const n=e.useContext(oL),r=n.workerstate();return Object.keys(t).length>0&&n.logger.debug("headerprops",t),e.createElement("div",{className:"funcnodesreactflowheader"},e.createElement("div",{className:"headerelement"},e.createElement(yS,null)),t.showmenu&&e.createElement(e.Fragment,null,e.createElement("div",{className:"headerelement"},e.createElement(bS,null)),n.worker&&r.is_open&&e.createElement("div",{className:"headerelement"},e.createElement(vS,null))))};const xS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ES={};function kS(e,t){return(ES.jsx?CS:xS).test(e)}const SS=/[ \t\n\f\r]/g;function IS(e){return""===e.replace(SS,"")}class _S{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function AS(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new _S(n,r,t)}function NS(e){return e.toLowerCase()}_S.prototype.property={},_S.prototype.normal={},_S.prototype.space=null;class RS{constructor(e,t){this.property=e,this.attribute=t}}RS.prototype.space=null,RS.prototype.boolean=!1,RS.prototype.booleanish=!1,RS.prototype.overloadedBoolean=!1,RS.prototype.number=!1,RS.prototype.commaSeparated=!1,RS.prototype.spaceSeparated=!1,RS.prototype.commaOrSpaceSeparated=!1,RS.prototype.mustUseProperty=!1,RS.prototype.defined=!1;let OS=0;const TS=FS(),MS=FS(),PS=FS(),DS=FS(),BS=FS(),jS=FS(),LS=FS();function FS(){return 2**++OS}var VS=Object.freeze({__proto__:null,boolean:TS,booleanish:MS,commaOrSpaceSeparated:LS,commaSeparated:jS,number:DS,overloadedBoolean:PS,spaceSeparated:BS});const zS=Object.keys(VS);class GS extends RS{constructor(e,t,n,r){let o=-1;if(super(e,t),WS(this,"space",r),"number"==typeof n)for(;++o<zS.length;){const e=zS[o];WS(this,zS[o],(n&VS[e])===VS[e])}}}function WS(e,t,n){n&&(e[t]=n)}GS.prototype.defined=!0;const HS={}.hasOwnProperty;function XS(e){const t={},n={};let r;for(r in e.properties)if(HS.call(e.properties,r)){const o=e.properties[r],i=new GS(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[NS(r)]=r,n[NS(i.attribute)]=r}return new _S(t,n,e.space)}const ZS=XS({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),$S=XS({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function YS(e,t){return t in e?e[t]:t}function US(e,t){return YS(e,t.toLowerCase())}const JS=XS({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:US,properties:{xmlns:null,xmlnsXLink:null}}),KS=XS({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:MS,ariaAutoComplete:null,ariaBusy:MS,ariaChecked:MS,ariaColCount:DS,ariaColIndex:DS,ariaColSpan:DS,ariaControls:BS,ariaCurrent:null,ariaDescribedBy:BS,ariaDetails:null,ariaDisabled:MS,ariaDropEffect:BS,ariaErrorMessage:null,ariaExpanded:MS,ariaFlowTo:BS,ariaGrabbed:MS,ariaHasPopup:null,ariaHidden:MS,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:BS,ariaLevel:DS,ariaLive:null,ariaModal:MS,ariaMultiLine:MS,ariaMultiSelectable:MS,ariaOrientation:null,ariaOwns:BS,ariaPlaceholder:null,ariaPosInSet:DS,ariaPressed:MS,ariaReadOnly:MS,ariaRelevant:null,ariaRequired:MS,ariaRoleDescription:BS,ariaRowCount:DS,ariaRowIndex:DS,ariaRowSpan:DS,ariaSelected:MS,ariaSetSize:DS,ariaSort:null,ariaValueMax:DS,ariaValueMin:DS,ariaValueNow:DS,ariaValueText:null,role:null}}),QS=XS({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:US,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jS,acceptCharset:BS,accessKey:BS,action:null,allow:null,allowFullScreen:TS,allowPaymentRequest:TS,allowUserMedia:TS,alt:null,as:null,async:TS,autoCapitalize:null,autoComplete:BS,autoFocus:TS,autoPlay:TS,blocking:BS,capture:null,charSet:null,checked:TS,cite:null,className:BS,cols:DS,colSpan:null,content:null,contentEditable:MS,controls:TS,controlsList:BS,coords:DS|jS,crossOrigin:null,data:null,dateTime:null,decoding:null,default:TS,defer:TS,dir:null,dirName:null,disabled:TS,download:PS,draggable:MS,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:TS,formTarget:null,headers:BS,height:DS,hidden:TS,high:DS,href:null,hrefLang:null,htmlFor:BS,httpEquiv:BS,id:null,imageSizes:null,imageSrcSet:null,inert:TS,inputMode:null,integrity:null,is:null,isMap:TS,itemId:null,itemProp:BS,itemRef:BS,itemScope:TS,itemType:BS,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:TS,low:DS,manifest:null,max:null,maxLength:DS,media:null,method:null,min:null,minLength:DS,multiple:TS,muted:TS,name:null,nonce:null,noModule:TS,noValidate:TS,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:TS,optimum:DS,pattern:null,ping:BS,placeholder:null,playsInline:TS,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:TS,referrerPolicy:null,rel:BS,required:TS,reversed:TS,rows:DS,rowSpan:DS,sandbox:BS,scope:null,scoped:TS,seamless:TS,selected:TS,shadowRootClonable:TS,shadowRootDelegatesFocus:TS,shadowRootMode:null,shape:null,size:DS,sizes:null,slot:null,span:DS,spellCheck:MS,src:null,srcDoc:null,srcLang:null,srcSet:null,start:DS,step:null,style:null,tabIndex:DS,target:null,title:null,translate:null,type:null,typeMustMatch:TS,useMap:null,value:MS,width:DS,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:BS,axis:null,background:null,bgColor:null,border:DS,borderColor:null,bottomMargin:DS,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:TS,declare:TS,event:null,face:null,frame:null,frameBorder:null,hSpace:DS,leftMargin:DS,link:null,longDesc:null,lowSrc:null,marginHeight:DS,marginWidth:DS,noResize:TS,noHref:TS,noShade:TS,noWrap:TS,object:null,profile:null,prompt:null,rev:null,rightMargin:DS,rules:null,scheme:null,scrolling:MS,standby:null,summary:null,text:null,topMargin:DS,valueType:null,version:null,vAlign:null,vLink:null,vSpace:DS,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:TS,disableRemotePlayback:TS,prefix:null,property:null,results:DS,security:null,unselectable:null}}),qS=XS({space:"svg",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"},transform:YS,properties:{about:LS,accentHeight:DS,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:DS,amplitude:DS,arabicForm:null,ascent:DS,attributeName:null,attributeType:null,azimuth:DS,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:DS,by:null,calcMode:null,capHeight:DS,className:BS,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:DS,diffuseConstant:DS,direction:null,display:null,dur:null,divisor:DS,dominantBaseline:null,download:TS,dx:null,dy:null,edgeMode:null,editable:null,elevation:DS,enableBackground:null,end:null,event:null,exponent:DS,externalResourcesRequired:null,fill:null,fillOpacity:DS,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:jS,g2:jS,glyphName:jS,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:DS,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:DS,horizOriginX:DS,horizOriginY:DS,id:null,ideographic:DS,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:DS,k:DS,k1:DS,k2:DS,k3:DS,k4:DS,kernelMatrix:LS,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:DS,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:DS,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:DS,overlineThickness:DS,paintOrder:null,panose1:null,path:null,pathLength:DS,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:BS,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:DS,pointsAtY:DS,pointsAtZ:DS,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:LS,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:LS,rev:LS,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:LS,requiredFeatures:LS,requiredFonts:LS,requiredFormats:LS,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:DS,specularExponent:DS,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:DS,strikethroughThickness:DS,string:null,stroke:null,strokeDashArray:LS,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:DS,strokeOpacity:DS,strokeWidth:null,style:null,surfaceScale:DS,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:LS,tabIndex:DS,tableValues:null,target:null,targetX:DS,targetY:DS,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:LS,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:DS,underlineThickness:DS,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:DS,values:null,vAlphabetic:DS,vMathematical:DS,vectorEffect:null,vHanging:DS,vIdeographic:DS,version:null,vertAdvY:DS,vertOriginX:DS,vertOriginY:DS,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:DS,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),eI=/^data[-\w.:]+$/i,tI=/-[a-z]/g,nI=/[A-Z]/g;function rI(e){return"-"+e.toLowerCase()}function oI(e){return e.charAt(1).toUpperCase()}const iI={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"},aI=AS([$S,ZS,JS,KS,QS],"html"),sI=AS([$S,ZS,JS,KS,qS],"svg");var lI,cI,uI,dI={};var pI=function(){if(uI)return dI;uI=1;var e=dI&&dI.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dI,"__esModule",{value:!0}),dI.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(cI)return lI;cI=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return lI=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,p=1;function f(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function h(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+p+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=p,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return f(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return p+=2,f(n),s=s.slice(t),p+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},lI}());return dI}(),fI=s(pI),hI=fI.default||fI;const mI=yI("end"),gI=yI("start");function yI(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function bI(e){return e&&"object"==typeof e?"position"in e||"type"in e?wI(e.position):"start"in e||"end"in e?wI(e):"line"in e||"column"in e?vI(e):"":""}function vI(e){return xI(e&&e.line)+":"+xI(e&&e.column)}function wI(e){return vI(e&&e.start)+"-"+vI(e&&e.end)}function xI(e){return e&&"number"==typeof e?e:1}class CI extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=bI(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}CI.prototype.file="",CI.prototype.name="",CI.prototype.reason="",CI.prototype.message="",CI.prototype.stack="",CI.prototype.column=void 0,CI.prototype.line=void 0,CI.prototype.ancestors=void 0,CI.prototype.cause=void 0,CI.prototype.fatal=void 0,CI.prototype.place=void 0,CI.prototype.ruleId=void 0,CI.prototype.source=void 0;const EI={}.hasOwnProperty,kI=new Map,SI=/[A-Z]/g,II=/-([a-z])/g,_I=new Set(["table","tbody","thead","tfoot","tr"]),AI=new Set(["td","th"]),NI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RI(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=gI(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?sI:aI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=OI(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function OI(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=sI,e.schema=o);e.ancestors.push(t);const i=BI(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&EI.call(t.properties,o)){const i=DI(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&AI.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=PI(e,t);_I.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&IS(t.value):IS(t));var t})));return TI(e,a,i,t),MI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}jI(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=sI,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:BI(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else jI(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else jI(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=PI(e,t);return TI(e,a,i,t),MI(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jI(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return MI(r,PI(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function TI(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function MI(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PI(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:kI;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=OI(e,i,a);void 0!==s&&n.push(s)}return n}function DI(e,t,n){const r=function(e,t){const n=NS(t);let r=t,o=RS;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&eI.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(tI,oI);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!tI.test(e)){let n=e.replace(nI,rI);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=GS}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{hI(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new CI("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=NI+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(II,FI)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)EI.call(e,n)&&(t[LI(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?iI[r.property]||r.property:r.attribute,n]}}function BI(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=kS(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=kS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return EI.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);jI(e)}function jI(e,t){const n=new CI("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=NI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LI(e){let t=e.replace(SI,VI);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function FI(e,t){return t.toUpperCase()}function VI(e){return"-"+e.toLowerCase()}const zI={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"]},GI={};function WI(e,t){return HI(e,"boolean"!=typeof GI.includeImageAlt||GI.includeImageAlt,"boolean"!=typeof GI.includeHtml||GI.includeHtml)}function HI(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return XI(e.children,t,n)}return Array.isArray(e)?XI(e,t,n):""}function XI(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=HI(e[o],t,n);return r.join("")}const ZI=document.createElement("i");function $I(e){const t="&"+e+";";ZI.innerHTML=t;const n=ZI.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function YI(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function UI(e,t){return e.length>0?(YI(e,e.length,0,t),e):t}const JI={}.hasOwnProperty;function KI(e){const t={};let n=-1;for(;++n<e.length;)QI(t,e[n]);return t}function QI(e,t){let n;for(n in t){const r=(JI.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){JI.call(r,i)||(r[i]=[]);const e=o[i];qI(r[i],Array.isArray(e)?e:e?[e]:[])}}}function qI(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);YI(e,0,0,r)}function e_(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function t_(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const n_=h_(/[A-Za-z]/),r_=h_(/[\dA-Za-z]/),o_=h_(/[#-'*+\--9=?A-Z^-~]/);function i_(e){return null!==e&&(e<32||127===e)}const a_=h_(/\d/),s_=h_(/[\dA-Fa-f]/),l_=h_(/[!-/:-@[-`{-~]/);function c_(e){return null!==e&&e<-2}function u_(e){return null!==e&&(e<0||32===e)}function d_(e){return-2===e||-1===e||32===e}const p_=h_(/\p{P}|\p{S}/u),f_=h_(/\s/);function h_(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function m_(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&r_(e.charCodeAt(n+1))&&r_(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function g_(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(d_(r))return e.enter(n),a(r);return t(r)};function a(r){return d_(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const y_={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g_(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):c_(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const b_={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return YI(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(v_,u,d)(o)}function u(e){return r&&b(),y(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(v_,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):c_(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;YI(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},v_={tokenize:function(e,t,n){return g_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function w_(e){return null===e||u_(e)||f_(e)?1:p_(e)?2:void 0}function x_(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const C_={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};E_(d,-s),E_(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=UI(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=UI(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=UI(l,x_(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=UI(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=UI(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,YI(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=w_(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=w_(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function E_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const k_={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return n_(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||r_(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||r_(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||i_(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):o_(t)?(e.consume(t),l):n(t)}function c(e){return r_(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||r_(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const S_={partial:!0,tokenize:function(e,t,n){return function(t){return d_(t)?g_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||c_(e)?t(e):n(e)}}};const I_={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(d_(t))return g_(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(I_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return d_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const __={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return l_(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const A_={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=r_,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=s_,c):(e.enter("characterReferenceValue"),o=7,i=a_,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==r_||$I(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const N_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},R_={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),d_(t)?g_(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),d_(t)?g_(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||c_(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),d_(t)?g_(e,c,"whitespace")(t):c(t))}function c(n){return null===n||c_(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(N_,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||c_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):d_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g_(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||c_(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||c_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&d_(t)?g_(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||c_(t)?e.check(N_,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||c_(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const O_={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),g_(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):c_(t)?e.attempt(T_,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||c_(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},T_={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):g_(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):c_(e)?o(e):n(e)}}};const M_={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||c_(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class P_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&D_(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),D_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),D_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);D_(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);D_(this.left,t.reverse())}}}function D_(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 B_(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new P_(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,j_(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return YI(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function j_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const L_={resolve:function(e){return B_(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):c_(t)?e.check(F_,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},F_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g_(e,o,"linePrefix")};function o(o){if(null===o||c_(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function V_(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||i_(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||c_(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!u_(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||i_(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function z_(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):c_(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||c_(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!d_(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function G_(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):c_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g_(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||c_(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function W_(e,t){let n;return function r(o){if(c_(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(d_(o))return g_(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const H_={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return z_.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=t_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return u_(t)?W_(e,s)(t):s(t)}function s(t){return V_(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(X_,c,c)(t)}function c(t){return d_(t)?g_(e,u,"whitespace")(t):u(t)}function u(i){return null===i||c_(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},X_={partial:!0,tokenize:function(e,t,n){return function(t){return u_(t)?W_(e,r)(t):n(t)};function r(t){return G_(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return d_(t)?g_(e,i,"whitespace")(t):i(t)}function i(e){return null===e||c_(e)?t(e):n(e)}}};const Z_={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return c_(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const $_={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},YI(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||u_(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||c_(n)?(e.exit("atxHeading"),t(n)):d_(n)?g_(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||u_(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Y_=["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"],U_=["pre","script","style","textarea"],J_={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:P):n_(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,p):n_(i)?(e.consume(i),o=4,r.interrupt?t:P):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function p(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:I:p):n(o)}function f(t){return n_(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||u_(s)){const l=47===s,c=a.toLowerCase();return l||i||!U_.includes(c)?Y_.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):I(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):I(s))}return 45===s||r_(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:I):n(o)}function g(t){return d_(t)?(e.consume(t),g):k(t)}function y(t){return 47===t?(e.consume(t),k):58===t||95===t||n_(t)?(e.consume(t),b):d_(t)?(e.consume(t),y):k(t)}function b(t){return 45===t||46===t||58===t||95===t||r_(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):d_(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):d_(t)?(e.consume(t),w):C(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||c_(t)?n(t):(e.consume(t),x)}function C(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||u_(t)?v(t):(e.consume(t),C)}function E(e){return 47===e||62===e||d_(e)?y(e):n(e)}function k(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||c_(t)?I(t):d_(t)?(e.consume(t),S):n(t)}function I(t){return 45===t&&2===o?(e.consume(t),R):60===t&&1===o?(e.consume(t),O):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),M):!c_(t)||6!==o&&7!==o?null===t||c_(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),I):(e.exit("htmlFlowData"),e.check(K_,B,_)(t))}function _(t){return e.check(Q_,A,B)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||c_(t)?_(t):(e.enter("htmlFlowData"),I(t))}function R(t){return 45===t?(e.consume(t),P):I(t)}function O(t){return 47===t?(e.consume(t),a="",T):I(t)}function T(t){if(62===t){const n=a.toLowerCase();return U_.includes(n)?(e.consume(t),D):I(t)}return n_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):I(t)}function M(t){return 93===t?(e.consume(t),P):I(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),P):I(t)}function D(t){return null===t||c_(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),D)}function B(n){return e.exit("htmlFlow"),t(n)}}},K_={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(S_,t,n)}}},Q_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(c_(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const q_={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):n_(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):n_(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):c_(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):c_(t)?(a=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):c_(t)?(a=y,T(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):c_(t)?(a=b,T(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function w(t){return n_(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||r_(t)?(e.consume(t),x):C(t)}function C(t){return c_(t)?(a=C,T(t)):d_(t)?(e.consume(t),C):O(t)}function E(t){return 45===t||r_(t)?(e.consume(t),E):47===t||62===t||u_(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),O):58===t||95===t||n_(t)?(e.consume(t),S):c_(t)?(a=k,T(t)):d_(t)?(e.consume(t),k):O(t)}function S(t){return 45===t||46===t||58===t||95===t||r_(t)?(e.consume(t),S):I(t)}function I(t){return 61===t?(e.consume(t),_):c_(t)?(a=I,T(t)):d_(t)?(e.consume(t),I):k(t)}function _(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):c_(t)?(a=_,T(t)):d_(t)?(e.consume(t),_):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,R):null===t?n(t):c_(t)?(a=A,T(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||u_(t)?k(t):(e.consume(t),N)}function R(e){return 47===e||62===e||u_(e)?k(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return d_(t)?g_(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const eA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&YI(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=UI(i,e.slice(r+1,r+s+3)),i=UI(i,[["enter",u,t]]),i=UI(i,x_(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=UI(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=UI(i,e.slice(o+1)),i=UI(i,[["exit",l,t]]),YI(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(t_(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(tA,c,i?c:u)(t):91===t?e.attempt(nA,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(rA,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},tA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return u_(t)?W_(e,o)(t):o(t)}function o(t){return 41===t?c(t):V_(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return u_(t)?W_(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?G_(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return u_(t)?W_(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},nA={tokenize:function(e,t,n){const r=this;return function(t){return z_.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(t_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},rA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const oA={name:"labelStartImage",resolveAll:eA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const iA={name:"labelStartLink",resolveAll:eA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const aA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),g_(e,t,"linePrefix")}}};const sA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||c_(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),d_(t)?g_(e,i,"whitespace")(t):i(t))}}};const lA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(S_,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,g_(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!d_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uA,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,g_(e,e.attempt(lA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:a_(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(sA,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return a_(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(S_,r.interrupt?n:c,e.attempt(cA,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return d_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},cA={partial:!0,tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return!d_(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},uA={partial:!0,tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const dA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),d_(t)?g_(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||c_(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const pA={tokenize:function(e){const t=this,n=e.attempt(S_,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,g_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(L_,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const fA={resolveAll:yA()},hA=gA("string"),mA=gA("text");function gA(e){return{resolveAll:yA("text"===e?bA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function yA(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function bA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const vA={42:lA,43:lA,45:lA,48:lA,49:lA,50:lA,51:lA,52:lA,53:lA,54:lA,55:lA,56:lA,57:lA,62:I_},wA={91:H_},xA={[-2]:O_,[-1]:O_,32:O_},CA={35:$_,42:sA,45:[dA,sA],60:J_,61:dA,95:sA,96:R_,126:R_},EA={38:A_,92:__},kA={[-5]:aA,[-4]:aA,[-3]:aA,33:oA,38:A_,42:C_,60:[k_,q_],91:iA,92:[Z_,__],93:eA,95:C_,96:M_},SA={null:[C_,fA]};var IA=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wA,disable:{null:[]},document:vA,flow:CA,flowInitial:xA,insideSpan:SA,string:EA,text:kA});function _A(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 o={},i=[];let a=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){c_(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=UI(a,e),f(),null!==a[a.length-1])return[];return y(t,0),c.events=x_(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),o}function y(e){return f.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&YI(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const AA=/[\0\t\n\r]/g;const NA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return e_(n.slice(t?2:1),t?16:10)}return $I(n)||e}const OA={}.hasOwnProperty;function TA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(K),blockQuote:i(Z),characterEscape:S,characterReference:S,codeFenced:i($),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i($,a),codeText:i(Y,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(Q),hardBreakTrailing:i(Q),htmlFlow:i(q,a),htmlFlowData:S,htmlText:i(q,a),htmlTextData:S,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:p,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(K),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:X,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:G,characterReference:W,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:I,codeIndented:l(y),codeText:l(O),codeTextData:I,data:I,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:I,htmlText:l(R),htmlTextData:I,image:l(M),label:D,labelText:P,lineEnding:_,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:B,resourceTitleString:j,resource:L,setextHeading:l(k),setextHeadingLineSequence:E,setextHeadingText:C,strong:l(),thematicBreak:l()}};PA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];OA.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||BA).call(i,void 0,e[0])}for(r.position={start:MA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:MA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:MA(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+bI({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||BA).call(this,e,r[0])}n.position.end=MA(e.end)}function u(){return WI(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t_(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:MA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function I(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=MA(e.end)}function _(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=MA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),I.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(NA,RA)}(t),n.identifier=t_(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function B(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function V(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function G(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=e_(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=$I(t)}this.stack[this.stack.length-1].value+=r}function W(e){this.stack.pop().position.end=MA(e.end)}function H(e){I.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){I.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Z(){return{type:"blockquote",children:[]}}function $(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!B_(e););return e}(function(e){const t={constructs:KI([IA,...(e||{}).extensions||[]]),content:n(y_),defined:[],document:n(b_),flow:n(pA),lazy:{},string:n(hA),text:n(mA)};return t;function n(e){return function(n){return _A(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(AA.lastIndex=u,l=AA.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function MA(e){return{line:e.line,column:e.column,offset:e.offset}}function PA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?PA(e,r):DA(e,r)}}function DA(e,t){let n;for(n in t)if(OA.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 BA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+bI({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bI({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+bI({start:t.start,end:t.end})+") is still open")}function jA(e){const t=this;t.parser=function(n){return TA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LA(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function FA(e){const t=e.spread;return null==t?e.children.length>1:t}function VA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(zA(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(zA(t.slice(o),o>0,!1)),i.join("")}function zA(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const GA={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=m_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LA(e,t);const o={src:m_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:m_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LA(e,t);const o={href:m_(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:m_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=FA(n[r])}return t}(n):FA(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=gI(t.children[1]),a=mI(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:VA(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:WA,yaml:WA,definition:WA,footnoteDefinition:WA};function WA(){}const HA="object"==typeof self?self:globalThis,XA=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new HA[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new HA[i](a),o)};return r})(new Map,e)(0),ZA="",{toString:$A}={},{keys:YA}=Object,UA=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=$A.call(e).slice(8,-1);switch(n){case"Array":return[1,ZA];case"Object":return[2,ZA];case"Date":return[3,ZA];case"RegExp":return[4,ZA];case"Map":return[5,ZA];case"Set":return[6,ZA];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},JA=([e,t])=>0===e&&("function"===t||"symbol"===t),KA=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=UA(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of YA(r))!e&&JA(UA(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!JA(UA(n))&&!JA(UA(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&JA(UA(n))||t.push(i(n));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var QA="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?XA(KA(e,t)):structuredClone(e):(e,t)=>XA(KA(e,t));function qA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function eN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const tN=function(e){if(null==e)return rN;if("function"==typeof e)return nN(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tN(e[n]);return nN(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return nN(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return nN(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function nN(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function rN(){return!0}const oN=[],iN=!0,aN=!1;function sN(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=tN(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=oN;if((!t||i(o,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[iN,e];return null==e?oN:[e]}(n(o,l)),p[0]===aN))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===aN)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function lN(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),sN(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),o)}const cN={}.hasOwnProperty,uN={};function dN(e,t){e.position&&(t.position=function(e){const t=gI(e),n=mI(e);if(t&&n)return{start:t,end:n}}(e))}function pN(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,QA(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function fN(e,t){const n=t.data||{},r=!("value"in t)||cN.call(n,"hProperties")||cN.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function hN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function mN(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function gN(e,t){const n=function(e,t){const n=t||uN,r=new Map,o=new Map,i=new Map,a={...GA,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=mN(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=mN(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:pN,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(cN.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=QA(n);return r.children=s.all(e),r}return QA(e)}return(s.options.unknownHandler||fN)(s,e,t)},options:n,patch:dN,wrap:hN};return lN(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||qA,r=e.options.footnoteBackLabel||eN,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=m_(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...QA(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function yN(e,t){return e&&"run"in e?async function(n,r){const o=gN(n,{file:r,...t});await e.run(o,r)}:function(n,r){return gN(n,{file:r,...e||t})}}function bN(e){if(e)throw e}var vN,wN;var xN=function(){if(wN)return vN;wN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return vN=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},vN}(),CN=s(xN);function EN(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function kN(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const SN={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');IN(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(IN(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){IN(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)IN(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){IN(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function IN(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _N={cwd:function(){return"/"}};function AN(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function NN(e){if("string"==typeof e)e=new URL(e);else if(!AN(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const RN=["history","path","basename","stem","extname","dirname"];class ON{constructor(e){let t;t=e?AN(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":_N.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<RN.length;){const e=RN[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)RN.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?SN.basename(this.path):void 0}set basename(e){MN(e,"basename"),TN(e,"basename"),this.path=SN.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?SN.dirname(this.path):void 0}set dirname(e){PN(this.basename,"dirname"),this.path=SN.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?SN.extname(this.path):void 0}set extname(e){if(TN(e,"extname"),PN(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=SN.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){AN(e)&&(e=NN(e)),MN(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?SN.basename(this.path,this.extname):void 0}set stem(e){MN(e,"stem"),TN(e,"stem"),this.path=SN.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new CI(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function TN(e,t){if(e&&e.includes(SN.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+SN.sep+"`")}function MN(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function PN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const DN=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},BN={}.hasOwnProperty;class jN extends DN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kN()}copy(){const e=new jN;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(CN(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(zN("data",this.frozen),this.namespace[e]=t,this):BN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zN("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=HN(e),n=this.parser||this.Parser;return FN("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),FN("process",this.parser||this.Parser),VN("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=HN(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,(function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),FN("processSync",this.parser||this.Parser),VN("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,bN(e),t=r})),WN("processSync","process",n),t}run(e,t,n){GN(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=HN(t);r.run(e,a,(function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){bN(e),n=t,r=!0})),WN("runSync","run",r),n}stringify(e,t){this.freeze();const n=HN(t),r=this.compiler||this.Compiler;return VN("stringify",r),GN(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(zN("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=CN(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];EN(a)&&EN(r)&&(r=CN(!0,a,r)),n[o]=[e,r,...i]}}}}const LN=(new jN).freeze();function FN(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function VN(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function zN(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GN(e){if(!EN(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function WN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function HN(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ON(e)}const XN=[],ZN={allowDangerousHtml:!0},$N=/^(https?|ircs?|mailto|xmpp)$/i,YN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function UN(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||XN,l=e.remarkPlugins||XN,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ZN}:ZN,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||JN,f=LN().use(jA).use(l).use(yN,c).use(s),h=new ON;"string"==typeof r&&(h.value=r);for(const t of YN)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=f.parse(h);let g=f.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),lN(g,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in zI)if(Object.hasOwn(zI,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=zI[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),RI(g,{Fragment:Lu.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Lu.jsx,jsxs:Lu.jsxs,passKeys:!0,passNode:!0})}function JN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||$N.test(e.slice(0,t))?e:""}function KN(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function QN(e,t,n){const r=tN((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([qN(e[0]),eR(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)sN(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function qN(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function eR(e){return"function"==typeof e?e:function(){return e}}const tR="phrasing",nR=["autolink","link","image","label"];function rR(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function oR(e){this.config.enter.autolinkProtocol.call(this,e)}function iR(e){this.config.exit.autolinkProtocol.call(this,e)}function aR(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function sR(e){this.config.exit.autolinkEmail.call(this,e)}function lR(e){this.exit(e)}function cR(e){QN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,dR]],{ignore:["link","linkReference"]})}function uR(e,t,n,r,o){let i="";if(!pR(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=KN(e,"(");let i=KN(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function dR(e,t,n,r){return!(!pR(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pR(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||f_(n)||p_(n))&&(!t||47!==n)}function fR(){this.buffer()}function hR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mR(){this.buffer()}function gR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function yR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bR(e){this.exit(e)}function vR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=t_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wR(e){this.exit(e)}function xR(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function CR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?kR:ER)));return s(),a},footnoteReference:xR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ER(e,t,n){return 0===t?e:kR(e,t,n)}function kR(e,t,n){return(n?"":" ")+e}xR.peek=function(){return"["};const SR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function IR(e){this.enter({type:"delete",children:[]},e)}function _R(e){this.exit(e)}function AR(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function NR(e){return e.length}function RR(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function OR(e,t,n){return">"+(n?"":" ")+e}function TR(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function MR(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&(i=n.stack,a=n.unsafe[o],TR(i,a.inConstruct,!0)&&!TR(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function PR(e,t,n){return(n?"":" ")+e}function DR(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function BR(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jR(e,t,n){const r=w_(e),o=w_(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function LR(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=jR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=BR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=jR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+BR(d));const f=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function FR(e){return e.value||""}function VR(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function zR(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function GR(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function WR(e,t){const n=WI(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function HR(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(WR(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function XR(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function ZR(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function $R(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}AR.peek=function(){return"~"},LR.peek=function(e,t,n){return n.options.emphasis||"*"},FR.peek=function(){return"<"},VR.peek=function(){return"!"},zR.peek=function(){return"!"},GR.peek=function(){return"`"},HR.peek=function(e,t,n){return WR(e,n)?"<":"["},XR.peek=function(){return"["};const YR=tN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UR(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=jR(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=BR(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=jR(r.after.charCodeAt(0),d,o);p.inside&&(l=l.slice(0,-1)+BR(d));const f=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}UR.peek=function(e,t,n){return n.options.strong||"*"};const JR={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),OR);return o(),a},break:MR,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,PR);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=DR(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:LR,hardBreak:MR,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return lN(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,aN})),Boolean((!e.depth||e.depth<3)&&WI(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=BR(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:FR,image:VR,imageReference:zR,inlineCode:GR,link:HR,linkReference:XR,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):ZR(n);const s=e.ordered?"."===a?")":".":function(e){const t=ZR(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$R(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||ZR(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some((function(e){return YR(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:UR,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($R(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function KR(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function QR(e){this.exit(e),this.data.inTable=void 0}function qR(e){this.enter({type:"tableRow",children:[]},e)}function eO(e){this.exit(e)}function tO(e){this.enter({type:"tableCell",children:[]},e)}function nO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rO(e,t){return"|"===t?t:e}function oO(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=JR.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=l(e,n,r),i=s([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||NR,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)i[p]=RR(r[p]);else{const e=RR(r);for(;++p<c;)i[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=i[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[p]&&(l[p]=o),h[p]=o),f[p]=a}a.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=s[u];p=-1;const r=[];for(;++p<c;){const o=e[p]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=i[p];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function iO(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function aO(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function sO(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=JR.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const lO={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},cO={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(dO,l,s)(t):null===t||u_(t)||f_(t)||45!==t&&p_(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},uO={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(dO,t,i)(a):null===a||u_(a)||f_(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},dO={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||u_(a)||f_(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||u_(e)||f_(e)?t(e):r(e)}function i(e){return n_(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):n_(t)?(e.consume(t),a):n(t)}},partial:!0},pO={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return r_(e)?n(e):t(e)}},partial:!0},fO={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!bO.call(r,r.previous)||CO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lO,e.attempt(cO,e.attempt(uO,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:bO},hO={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&vO.call(r,r.previous)&&!CO(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(n_(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||i_(t)||u_(t)||f_(t)||p_(t)?n(t):e.attempt(cO,e.attempt(uO,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:vO},mO={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!xO(t)||!wO.call(r,r.previous)||CO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return xO(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(pO,c,l)(t):45===t||95===t||r_(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&n_(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:wO},gO={};let yO=48;for(;yO<123;)gO[yO]=mO,yO++,58===yO?yO=65:91===yO&&(yO=97);function bO(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||u_(e)}function vO(e){return!n_(e)}function wO(e){return!(47===e||xO(e))}function xO(e){return 43===e||45===e||46===e||95===e||r_(e)}function CO(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}gO[43]=mO,gO[45]=mO,gO[46]=mO,gO[95]=mO,gO[72]=[mO,hO],gO[104]=[mO,hO],gO[87]=[mO,fO],gO[119]=[mO,fO];const EO={tokenize:function(e,t,n){const r=this;return g_(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function kO(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=t_(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function SO(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function IO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||u_(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(t_(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return u_(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function _O(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||u_(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=t_(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return u_(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),g_(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function AO(e,t,n){return e.check(S_,t,e.attempt(EO,t,n))}function NO(e){e.exit("gfmFootnoteDefinition")}function RO(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=w_(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=w_(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&YI(a,a.length,0,x_(s,e.slice(r+1,n),t)),YI(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),YI(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class OO{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function TO(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function MO(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):c_(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):d_(t)?g_(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||u_(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,d_(t)?g_(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return d_(t)?g_(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||c_(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return d_(t)?g_(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||c_(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||c_(n)?(e.exit("tableRow"),t(n)):d_(n)?g_(e,x,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||u_(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:C)}function E(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function PO(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new OO;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(BO(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=DO(p,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=DO(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=DO(p,t,l,s,i,o)):0!==c[1]&&(o=DO(p,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&BO(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=TO(t.events,i))}return e}function DO(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},jO(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=jO(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=jO(t.events,n[2]),i=jO(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},jO(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function BO(e,t,n,r,o){const i=[],a=jO(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function jO(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const LO={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return u_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return c_(r)?t(r):d_(r)?e.check({tokenize:FO},t,n)(r):n(r)}}};function FO(e,t,n){return g_(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const VO={};function zO(e){const t=e||VO,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return KI([{text:gO},{document:{91:{name:"gfmFootnoteDefinition",tokenize:_O,continuation:{tokenize:AO},exit:NO}},text:{91:{name:"gfmFootnoteCall",tokenize:IO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kO,resolveTo:SO}}},RO(e),{flow:{null:{name:"table",tokenize:MO,resolveAll:PO}}},{text:{91:LO}}])}(t)),o.push([{transforms:[cR],enter:{literalAutolink:rR,literalAutolinkEmail:oR,literalAutolinkHttp:oR,literalAutolinkWww:oR},exit:{literalAutolink:lR,literalAutolinkEmail:sR,literalAutolinkHttp:iR,literalAutolinkWww:aR}},{enter:{gfmFootnoteCallString:fR,gfmFootnoteCall:hR,gfmFootnoteDefinitionLabelString:mR,gfmFootnoteDefinition:gR},exit:{gfmFootnoteCallString:yR,gfmFootnoteCall:bR,gfmFootnoteDefinitionLabelString:vR,gfmFootnoteDefinition:wR}},{canContainEols:["delete"],enter:{strikethrough:IR},exit:{strikethrough:_R}},{enter:{table:KR,tableData:tO,tableHeader:tO,tableRow:qR},exit:{codeText:nO,table:QR,tableData:eO,tableHeader:eO,tableRow:eO}},{exit:{taskListCheckValueChecked:iO,taskListCheckValueUnchecked:iO,paragraph:aO}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tR,notInConstruct:nR},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tR,notInConstruct:nR},{character:":",before:"[ps]",after:"\\/",inConstruct:tR,notInConstruct:nR}]},CR(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:SR}],handlers:{delete:AR}},oO(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sO}}]}}(t))}const GO=({item:t})=>{const n=e.useContext(oL);return e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&n.worker?.add_node(t.node_id)},title:t.description},t.node_name||t.node_id)},WO=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>WO(e,t)))??!1;return n||r},HO=({item:t,filter:n})=>{const[r,o]=e.useState(!1),i=t.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase()))),a=r||n.length>0;return WO(t,n)?e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.description},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(a?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,i.map(((t,n)=>e.createElement(GO,{key:n,item:t})))),t.subshelves&&e.createElement(e.Fragment,null,t.subshelves.map(((t,r)=>e.createElement(HO,{key:r,item:t,filter:n})))))),e.createElement("hr",null)):e.createElement(e.Fragment,null)},XO=({filter:t,setFilter:n})=>e.createElement("div",{className:"libfilter"},e.createElement(Zw,{fontSize:"inherit"}),e.createElement("input",{type:"text",placeholder:"Filter",value:t,onChange:e=>{n(e.target.value)}}),t&&e.createElement(Xw,{fontSize:"inherit",onClick:()=>{n("")}})),ZO=({availableModule:t})=>e.createElement("div",{className:"module-links"},t.homepage&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),t.source&&t.homepage&&" | ",t.source&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),$O=({availableModule:t})=>{const[n,r]=e.useState(!1),o=t.description.length>150?t.description.substring(0,150)+"...":t.description;return e.createElement("div",{className:"module-description"},e.createElement(UN,{remarkPlugins:[zO]},n?t.description.replace(/\\n/g," \n"):o.replace(/\\n/g," \n")),t.description.length>150&&e.createElement("button",{onClick:()=>r(!n),className:"toggle-description"},n?"Show less":"Show more"))},YO=({availableModule:t,on_change:n})=>{const[r,o]=e.useState(t.version||"latest"),[i,a]=e.useState(">=");return t.releases&&!t.releases.includes(r)&&t.releases.unshift(r),e.createElement(e.Fragment,null,e.createElement("select",{value:i,onChange:e=>{a(e.target.value),"latest"!==r&&n(e.target.value+r)}},e.createElement("option",{value:">="},">="),e.createElement("option",{value:"=="},"=="),e.createElement("option",{value:"<="},"<=")),e.createElement("select",{onChange:e=>{const t=e.target.value;o(t),n("latest"!==t?i+t:t)},value:r},t.releases&&t.releases.map((t=>e.createElement("option",{key:t,value:t},t)))))},UO=({availableModule:t,on_remove:n,on_update:r})=>{const[o,i]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:i}),e.createElement("button",{className:"update-button",disabled:o===t.version,onClick:()=>{r(t,o)}},"Update"),e.createElement("button",{className:"remove-button",onClick:()=>{n(t)}},"Remove")))},JO=({availableModule:t,on_add:n})=>{const[r,o]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},KO=({availableModule:t,on_add:n})=>{const[r,o]=e.useState(t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name),e.createElement(ZO,{availableModule:t}),e.createElement($O,{availableModule:t}),e.createElement("div",null,e.createElement(YO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},QO=({children:t})=>{const[n,r]=e.useState(""),o=e.useContext(oL),[i,a]=e.useState(!0),[s,l]=e.useState(!0),[c,u]=e.useState(!0),[d,p]=e.useState({installed:[],available:[],active:[]}),[f,h]=e.useState(!1);if(!o.worker)return e.createElement(e.Fragment,null);const m=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},g=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},y=e=>{h(!1),void 0!==o.worker&&o.worker.remove_lib(e.name)},b=(e,t)=>{h(!1),void 0!==o.worker&&o.worker.add_lib(e.name,t)},v=e=>e.filter((e=>e.name.toLowerCase().includes(n.toLowerCase())||e.description.toLowerCase().includes(n.toLowerCase()))),w=v(d.available),x=v(d.installed),C=v(d.active);return e.createElement($w,{title:"Manage Library",trigger:t,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==o.worker&&o.worker.is_open&&o.worker.get_available_modules().then((e=>{console.log(e),p(e)}))},open:f,setOpen:h},e.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:n,onChange:e=>r(e.target.value)}),e.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},x.length>0&&e.createElement("h3",{onClick:()=>{u(!c)}},"Installed"),c&&x.map(((t,n)=>e.createElement(JO,{key:n,availableModule:t,on_add:m}))),w.length>0&&e.createElement("h3",{onClick:()=>{l(!s)}},"Available"),s&&w.map(((t,n)=>e.createElement(KO,{key:n,availableModule:t,on_add:g}))),C.length>0&&e.createElement("h3",{onClick:()=>{a(!i)}},"Active"),i&&C.map(((t,n)=>e.createElement(UO,{key:n,availableModule:t,on_remove:y,on_update:b})))))},qO=({ins:t})=>{const[n,r]=e.useState(t.name),o=e.useContext(oL);return e.createElement(e.Fragment,null,e.createElement($w,{title:t.name,description:"Settings for"+t.name,trigger:e.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{o.worker&&(o.worker.update_external_worker(t.uuid,t.nodeclassid,{name:n}),t.name=n)},close:!0},{text:"Delete",onClick:()=>{o.worker&&o.worker.remove_external_worker(t.uuid,t.nodeclassid)},close:!0}]},e.createElement("div",null,e.createElement("div",null,e.createElement("label",{htmlFor:"name"},"Name: "),e.createElement("input",{type:"text",name:"name",value:n,onChange:e=>r(e.target.value),className:"styledinput"})))))},eT=({ins:t,lib:n,filter:r=""})=>{const[o,i]=e.useState(!1),a=n?.nodes?.filter((e=>e.node_id.toLowerCase().includes(r.toLowerCase())));return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:t.name},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(o?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(o?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},o&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",title:t.uuid},e.createElement(qO,{ins:t})),n&&e.createElement(e.Fragment,null,a&&e.createElement(e.Fragment,null,a.map(((t,n)=>e.createElement(GO,{key:n,item:t})))),n.subshelves.map(((t,n)=>e.createElement(HO,{key:n,item:t,filter:r}))))))))},tT=({item:t,mod:n,lib:r})=>{const o=e.useContext(oL),[i,a]=e.useState(!1),s=t.name||t.module+"."+t.class_name;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>a(!i),style:{cursor:"pointer"},title:s},e.createElement("div",{className:"shelftitle_text"},s),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&o.worker?.add_external_worker({module:n,cls_module:t.module,cls_name:t.class_name})},title:t.name},"New Instance"),t.instances.map(((t,n)=>e.createElement(eT,{key:n,ins:t,lib:r?.subshelves.find((e=>e.name===t.uuid))})))))))},nT=({externalworkermod:t,lib:n})=>{const[r,o]=e.useState(!1),i=r;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.module},e.createElement("div",{className:"shelftitle_text"},t.module),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(Bv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},t.worker_classes.map(((r,o)=>e.createElement(tT,{key:o,item:r,mod:t.module,lib:n}))))),e.createElement("hr",null))},rT=()=>{const t=e.useContext(oL),n=t.lib.libstate(),[r,o]=e.useState(""),i=t.worker?.state((e=>e.is_open))??!1;return e.createElement("div",{className:"libcontainer"},e.createElement("div",{className:"library"},e.createElement("div",{className:"libtitle"},"Lib"),e.createElement("hr",{className:"hr_prominent"}),e.createElement(XO,{filter:r,setFilter:o}),e.createElement("div",{className:"vscrollcontainer"},n.lib.shelves.map(((t,n)=>"_external_worker"==t.name?e.createElement(e.Fragment,null):e.createElement(HO,{key:n,item:t,filter:r})))),e.createElement("hr",null),e.createElement("div",{className:"libtitle"},"External Worker"),e.createElement("hr",{className:"hr_prominent"}),e.createElement("div",{className:"vscrollcontainer"},n.external_worker?.map(((t,r)=>e.createElement(nT,{key:r,externalworkermod:t,lib:n.lib.shelves.find((e=>"_external_worker"===e.name))})))),e.createElement("hr",null)),e.createElement("div",{style:{paddingTop:"0.5rem"}}),i&&e.createElement("div",{className:"addlib"},e.createElement(QO,null,e.createElement("button",null,"Manage Libraries"))))};const{useRef:oT}=e;function iT(e){const t=oT();return n=>{const r=e(n);return function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))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}(t.current,r)?t.current:t.current=r}}var aT=r.forwardRef(((e,t)=>Lu.jsx(Ku.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));aT.displayName="VisuallyHidden";var sT=aT,[lT,cT]=Fu("Tooltip",[RC]),uT=RC(),dT="TooltipProvider",pT=700,fT="tooltip.open",[hT,mT]=lT(dT),gT=e=>{const{__scopeTooltip:t,delayDuration:n=pT,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=e,[s,l]=r.useState(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),Lu.jsx(hT,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:r.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:r.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};gT.displayName=dT;var yT="Tooltip",[bT,vT]=lT(yT),wT=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=mT(yT,e.__scopeTooltip),u=uT(t),[d,p]=r.useState(null),f=Hu(),h=r.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,y=r.useRef(!1),[b=!1,v]=Zu({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(fT))):c.onClose(),a?.(e)}}),w=r.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),x=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,v(!0)}),[v]),C=r.useCallback((()=>{window.clearTimeout(h.current),h.current=0,v(!1)}),[v]),E=r.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,v(!0),h.current=0}),g)}),[g,v]);return r.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),Lu.jsx(ZC,{...u,children:Lu.jsx(bT,{scope:t,contentId:f,open:b,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:r.useCallback((()=>{c.isOpenDelayed?E():x()}),[c.isOpenDelayed,E,x]),onTriggerLeave:r.useCallback((()=>{m?C():(window.clearTimeout(h.current),h.current=0)}),[C,m]),onOpen:x,onClose:C,disableHoverableContent:m,children:n})})};wT.displayName=yT;var xT="TooltipTrigger",CT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,...o}=e,i=vT(xT,n),a=mT(xT,n),s=uT(n),l=Ru(t,r.useRef(null),i.onTriggerChange),c=r.useRef(!1),u=r.useRef(!1),d=r.useCallback((()=>c.current=!1),[]);return r.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),Lu.jsx($C,{asChild:!0,...s,children:Lu.jsx(Ku.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:_u(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:_u(e.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:_u(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:_u(e.onFocus,(()=>{c.current||i.onOpen()})),onBlur:_u(e.onBlur,i.onClose),onClick:_u(e.onClick,i.onClose)})})}));CT.displayName=xT;var ET="TooltipPortal",[kT,ST]=lT(ET,{forceMount:void 0}),IT=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=vT(ET,t);return Lu.jsx(kT,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};IT.displayName=ET;var _T="TooltipContent",AT=r.forwardRef(((e,t)=>{const n=ST(_T,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=vT(_T,e.__scopeTooltip);return Lu.jsx(vd,{present:r||a.open,children:a.disableHoverableContent?Lu.jsx(TT,{side:o,...i,ref:t}):Lu.jsx(NT,{side:o,...i,ref:t})})})),NT=r.forwardRef(((e,t)=>{const n=vT(_T,e.__scopeTooltip),o=mT(_T,e.__scopeTooltip),i=r.useRef(null),a=Ru(t,i),[s,l]=r.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:p}=o,f=r.useCallback((()=>{l(null),p(!1)}),[p]),h=r.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),p(!0)}),[p]);return r.useEffect((()=>()=>f()),[f]),r.useEffect((()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,h,f]),r.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,f]),Lu.jsx(TT,{...e,ref:a})})),[RT,OT]=lT(yT,{isInside:!1}),TT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,c=vT(_T,n),u=uT(n),{onClose:d}=c;return r.useEffect((()=>(document.addEventListener(fT,d),()=>document.removeEventListener(fT,d))),[d]),r.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:Lu.jsxs(YC,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[Lu.jsx(Uu,{children:o}),Lu.jsx(RT,{scope:n,isInside:!0,children:Lu.jsx(sT,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));AT.displayName=_T;var MT="TooltipArrow",PT=r.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=uT(n);return OT(MT,n).isInside?null:Lu.jsx(UC,{...o,...r,ref:t})}));PT.displayName=MT;var DT=gT,BT=wT,jT=CT,LT=IT,FT=AT,VT=PT,zT="Popover",[GT,WT]=Fu(zT,[RC]),HT=RC(),[XT,ZT]=GT(zT),$T=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,l=HT(t),c=r.useRef(null),[u,d]=r.useState(!1),[p=!1,f]=Zu({prop:o,defaultProp:i,onChange:a});return Lu.jsx(ZC,{...l,children:Lu.jsx(XT,{scope:t,contentId:Hu(),triggerRef:c,open:p,onOpenChange:f,onOpenToggle:r.useCallback((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:r.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:r.useCallback((()=>d(!1)),[]),modal:s,children:n})})};$T.displayName=zT;var YT="PopoverAnchor";r.forwardRef(((e,t)=>{const{__scopePopover:n,...o}=e,i=ZT(YT,n),a=HT(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return r.useEffect((()=>(s(),()=>l())),[s,l]),Lu.jsx($C,{...a,...o,ref:t})})).displayName=YT;var UT="PopoverTrigger",JT=r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ZT(UT,n),i=HT(n),a=Ru(t,o.triggerRef),s=Lu.jsx(Ku.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":sM(o.open),...r,ref:a,onClick:_u(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:Lu.jsx($C,{asChild:!0,...i,children:s})}));JT.displayName=UT;var KT="PopoverPortal",[QT,qT]=GT(KT,{forceMount:void 0}),eM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=ZT(KT,t);return Lu.jsx(QT,{scope:t,forceMount:n,children:Lu.jsx(vd,{present:n||i.open,children:Lu.jsx(bd,{asChild:!0,container:o,children:r})})})};eM.displayName=KT;var tM="PopoverContent",nM=r.forwardRef(((e,t)=>{const n=qT(tM,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=ZT(tM,e.__scopePopover);return Lu.jsx(vd,{present:r||i.open,children:i.modal?Lu.jsx(rM,{...o,ref:t}):Lu.jsx(oM,{...o,ref:t})})}));nM.displayName=tM;var rM=r.forwardRef(((e,t)=>{const n=ZT(tM,e.__scopePopover),o=r.useRef(null),i=Ru(t,o),a=r.useRef(!1);return r.useEffect((()=>{const e=o.current;if(e)return bp(e)}),[]),Lu.jsx(dp,{as:$u,allowPinchZoom:!0,children:Lu.jsx(iM,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_u(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()})),onPointerDownOutside:_u(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:_u(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),oM=r.forwardRef(((e,t)=>{const n=ZT(tM,e.__scopePopover),o=r.useRef(!1),i=r.useRef(!1);return Lu.jsx(iM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const r=t.target,a=n.triggerRef.current?.contains(r);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),iM=r.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=ZT(tM,n),f=HT(n);return Cd(),Lu.jsx(dd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Lu.jsx(od,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:Lu.jsx(YC,{"data-state":sM(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.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)"}})})})})),aM="PopoverClose";r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=ZT(aM,n);return Lu.jsx(Ku.button,{type:"button",...r,ref:t,onClick:_u(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=aM;function sM(e){return e?"open":"closed"}r.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=HT(n);return Lu.jsx(UC,{...o,...r,ref:t})})).displayName="PopoverArrow";var lM,cM,uM,dM,pM,fM,hM,mM,gM=$T,yM=JT,bM=eM,vM=nM;function wM(){if(dM)return uM;dM=1;const e=cM?lM:(cM=1,lM={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};uM=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=i-o;let s,l;i===o?s=0:t===i?s=(n-r)/a:n===i?s=2+(r-t)/a:r===i&&(s=4+(t-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+i)/2;return l=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[s,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(s),r=d(l),a===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,i=1/0;for(const t of Object.keys(e)){const r=e[t],l=(s=r,((a=n)[0]-s[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2);l<i&&(i=l,o=t)}var a,s;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,a;a=(2-n)*r;const s=(2-n)*o;return i=n*o,i/=s<=1?s:2-s,i=i||0,a/=2,[t,100*i,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),s=1-r;i=6*t-a,1&a&&(i=1-i);const l=n+i*(s-n);let c,u,d;switch(a){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,a;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*o,255*i,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),a=o-i;let s,l;return s=a<1?i/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,a=i%1,s=1-a;let l=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},uM}function xM(){if(fM)return pM;fM=1;const e=wM();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),i=n(e[r[a].parent][a],i),a=r[a].parent;return i.conversion=o,i}return pM=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},pM}var CM=function(){if(mM)return hM;mM=1;const e=wM(),t=xM(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),hM=n}(),EM=s(CM);const kM=(e,t)=>{if(Array.isArray(t)||(t=[t]),void 0===t[0]||null===t[0])return kM("rgb",[0,0,0]);const n=EM[e];if(!n)throw new Error("Unsupported color type: "+e);n[e]=()=>t;const r=n.rgb(t);if(!Array.isArray(r))return kM("rgb",[0,0,0]);if(void 0===r[0]||null===r[0])return kM("rgb",[0,0,0]);const o=n.hsl(t);if(!Array.isArray(o))return kM("rgb",[0,0,0]);if(void 0===o[0]||null===o[0])return kM("rgb",[0,0,0]);const i={};return Object.keys(n).forEach((e=>{const r=n[e];"function"==typeof r&&(i[e]=()=>r.apply(null,t))})),i},SM=({onChange:t,colorconverter:n,allow_null:r=!1})=>{if(null===n&&!r)throw new Error("Color converter is null");const[o,i]=e.useState(n),[a,s]=e.useState([0,0,0]),[l,c]=e.useState([0,0,0]),[u,d]=e.useState([0,0,0]),[p,f]=e.useState("000");e.useEffect((()=>{if(!o){if(!r)throw new Error("Color converter is null");return c([0,0,0]),s([0,0,0]),d([0,0,0]),void f("")}s(o.hsl()),c(o.rgb()),d(o.hsv()),f(o.hex())}),[o]);const h={backgroundColor:`hsl(${a[0]}, ${a[1]}%, ${a[2]}%)`,padding:"10px",margin:"10px 0"};return e.createElement("div",{style:{backgroundColor:"white"}},e.createElement("div",{style:h},"Color Preview"),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"RGB"),e.createElement("div",null),e.createElement("label",null,"Red"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[0],onChange:e=>{const n=[parseInt(e.target.value),l[1],l[2]],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),e.createElement("label",null,"Green"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[1],onChange:e=>{const n=[l[0],parseInt(e.target.value),l[2]],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),e.createElement("label",null,"Blue"),e.createElement("input",{type:"range",min:"0",max:"255",value:l[2],onChange:e=>{const n=[l[0],l[1],parseInt(e.target.value)],r=kM("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSL"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:a[0],onChange:e=>{const n=[parseInt(e.target.value),a[1],a[2]],r=kM("hsl",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[1],onChange:e=>{const n=[a[0],parseInt(e.target.value),a[2]],r=kM("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Lightness"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[2],onChange:e=>{const n=[a[0],a[1],parseInt(e.target.value)],r=kM("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%), #fff)`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSV"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:u[0],onChange:e=>{const n=[parseInt(e.target.value),u[1],u[2]],r=kM("hsv",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:u[1],onChange:e=>{const n=[u[0],parseInt(e.target.value),u[2]],r=kM("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Value"),e.createElement("input",{type:"range",min:"0",max:"100",value:u[2],onChange:e=>{const n=[u[0],u[1],parseInt(e.target.value)],r=kM("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%))`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HEX"),e.createElement("div",null),e.createElement("input",{type:"text",value:p,onChange:e=>{const n=""===e.target.value?null:kM("hex",[e.target.value]);i(n),t(n)}})))},IM=({inicolordata:t,inicolorspace:n="hex",allow_null:r=!1,onChange:o})=>{void 0===t&&(t=[0,0,0],n="rgb"),Array.isArray(t)||(t=[t]);let i=kM(n,t);void 0===i.rgb()&&(i=kM("rgb",[0,0,0]));const[a,s]=e.useState(i),l={background:"#"+a.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"};return e.createElement(gM,null,e.createElement(yM,{asChild:!0},e.createElement("button",{style:l})),e.createElement(bM,null,e.createElement(vM,{side:"left"},e.createElement(SM,{onChange:e=>{if(null===e&&!r)throw new Error("Color is null");null!==e&&s(e),o&&o(e)},colorconverter:a,allow_null:r}))))};function _M(e,[t,n]){return Math.min(n,Math.max(t,e))}var AM=["PageUp","PageDown"],NM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],RM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},OM="Slider",[TM,MM,PM]=Yw(OM),[DM,BM]=Fu(OM,[PM]),[jM,LM]=DM(OM),FM=r.forwardRef(((e,t)=>{const{name:n,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:p=()=>{},onValueCommit:f=()=>{},inverted:h=!1,form:m,...g}=e,y=r.useRef(new Set),b=r.useRef(0),v="horizontal"===s?GM:WM,[w=[],x]=Zu({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),p(e)}}),C=r.useRef(w);function E(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=_M(s,[o,i]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return Lu.jsx(jM,{scope:e.__scopeSlider,name:n,disabled:l,min:o,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:s,form:m,children:Lu.jsx(TM.Provider,{scope:e.__scopeSlider,children:Lu.jsx(TM.Slot,{scope:e.__scopeSlider,children:Lu.jsx(v,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:_u(g.onPointerDown,(()=>{l||(C.current=w)})),min:o,max:i,inverted:h,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(w,e);E(e,t)},onSlideMove:l?void 0:function(e){E(e,b.current)},onSlideEnd:l?void 0:function(){const e=C.current[b.current];w[b.current]!==e&&f(w)},onHomeKeyDown:()=>!l&&E(o,0,{commit:!0}),onEndKeyDown:()=>!l&&E(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=AM.includes(e.key)||e.shiftKey&&NM.includes(e.key)?10:1,r=b.current;E(w[r]+a*n*t,r,{commit:!0})}}})})})})}));FM.displayName=OM;var[VM,zM]=DM(OM,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GM=r.forwardRef(((e,t)=>{const{min:n,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[p,f]=r.useState(null),h=Ru(t,(e=>f(e))),m=r.useRef(void 0),g=Jw(i),y="ltr"===g,b=y&&!a||!y&&a;function v(e){const t=m.current||p.getBoundingClientRect(),r=eP([0,t.width],b?[n,o]:[o,n]);return m.current=t,r(e-t.left)}return Lu.jsx(VM,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:Lu.jsx(HM,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=v(e.clientX);s?.(t)},onSlideMove:e=>{const t=v(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=RM[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),WM=r.forwardRef(((e,t)=>{const{min:n,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=r.useRef(null),p=Ru(t,d),f=r.useRef(void 0),h=!i;function m(e){const t=f.current||d.current.getBoundingClientRect(),r=eP([0,t.height],h?[o,n]:[n,o]);return f.current=t,r(e-t.top)}return Lu.jsx(VM,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:Lu.jsx(HM,{"data-orientation":"vertical",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);a?.(t)},onSlideMove:e=>{const t=m(e.clientY);s?.(t)},onSlideEnd:()=>{f.current=void 0,l?.()},onStepKeyDown:e=>{const t=RM[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),HM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=LM(OM,n);return Lu.jsx(Ku.span,{...c,ref:t,onKeyDown:_u(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):AM.concat(NM).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:_u(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:_u(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:_u(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),XM="SliderTrack",ZM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=LM(XM,n);return Lu.jsx(Ku.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));ZM.displayName=XM;var $M="SliderRange",YM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,...o}=e,i=LM($M,n),a=zM($M,n),s=Ru(t,r.useRef(null)),l=i.values.length,c=i.values.map((e=>qM(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return Lu.jsx(Ku.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:s,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})}));YM.displayName=$M;var UM="SliderThumb",JM=r.forwardRef(((e,t)=>{const n=MM(e.__scopeSlider),[o,i]=r.useState(null),a=Ru(t,(e=>i(e))),s=r.useMemo((()=>o?n().findIndex((e=>e.ref.current===o)):-1),[n,o]);return Lu.jsx(KM,{...e,ref:a,index:s})})),KM=r.forwardRef(((e,t)=>{const{__scopeSlider:n,index:o,name:i,...a}=e,s=LM(UM,n),l=zM(UM,n),[c,u]=r.useState(null),d=Ru(t,(e=>u(e))),p=!c||(s.form||!!c.closest("form")),f=_C(c),h=s.values[o],m=void 0===h?0:qM(h,s.min,s.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),y=f?.[l.size],b=y?function(e,t,n){const r=e/2,o=eP([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return r.useEffect((()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}}),[c,s.thumbs]),Lu.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${b}px)`},children:[Lu.jsx(TM.ItemSlot,{scope:e.__scopeSlider,children:Lu.jsx(Ku.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:void 0===h?{display:"none"}:e.style,onFocus:_u(e.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))})}),p&&Lu.jsx(QM,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},o)]})}));JM.displayName=UM;var QM=e=>{const{value:t,...n}=e,o=r.useRef(null),i=function(e){const t=r.useRef({value:e,previous:e});return r.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(t);return r.useEffect((()=>{const e=o.current,n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}}),[i,t]),Lu.jsx("input",{style:{display:"none"},...n,ref:o,defaultValue:t})};function qM(e,t,n){return _M(100/(n-t)*(e-t),[0,100])}function eP(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var tP=FM,nP=ZM,rP=YM,oP=JM;function iP(e){return iP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iP(e)}function aP(e){var t=function(e,t){if("object"!=iP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=iP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iP(t)?t:t+""}function sP(e,t,n){return(t=aP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lP(Object(n),!0).forEach((function(t){sP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dP(e,t){if(e){if("string"==typeof e)return uP(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uP(e,t):void 0}}function pP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||dP(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fP(e,t){if(null==e)return{};var n,r,o=mw(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hP=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function mP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aP(r.key),r)}}function gP(e){return gP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gP(e)}function yP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yP=function(){return!!e})()}function bP(e){var t=yP();return function(){var n,r=gP(e);if(t){var o=gP(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==iP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vw(e)}(this,n)}}function vP(e){return function(e){if(Array.isArray(e))return uP(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dP(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wP=e.useLayoutEffect,xP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],CP=function(){};function EP(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function kP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(EP(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var SP=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===iP(e)&&null!==e?[e]:[]},IP=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,cP({},fP(e,xP))},_P=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function AP(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function NP(e){return AP(e)?window.pageYOffset:e.scrollTop}function RP(e,t){AP(e)?window.scrollTo(0,t):e.scrollTop=t}function OP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:CP,o=NP(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;RP(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function TP(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?RP(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&RP(e,Math.max(t.offsetTop-o,0))}function MP(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var PP=!1,DP={get passive(){return PP=!0}},BP="undefined"!=typeof window?window:{};BP.addEventListener&&BP.removeEventListener&&(BP.addEventListener("p",CP,DP),BP.removeEventListener("p",CP,!1));var jP=PP;function LP(e){return null!=e}function FP(e,t,n){return e?t:n}var VP=["children","innerProps"],zP=["children","innerProps"];function GP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,h=p.height,m=p.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:AP(u=l)?window.innerHeight:u.clientHeight,b=NP(l),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,C=y-m,E=x+b,k=d-b-m,S=f-y+b+v,I=b+m-w,_=160;switch(o){case"auto":case"bottom":if(C>=h)return{placement:"bottom",maxHeight:t};if(k>=h&&!a)return i&&OP(l,S,_),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&C>=r)return i&&OP(l,S,_),{placement:"bottom",maxHeight:a?C-v:k-v};if("auto"===o||a){var A=t,N=a?x:E;return N>=r&&(A=Math.min(N-v-s,t)),{placement:"top",maxHeight:A}}if("bottom"===o)return i&&RP(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(E>=h&&!a)return i&&OP(l,I,_),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&x>=r){var R=t;return(!a&&E>=r||a&&x>=r)&&(R=a?x-w:E-w),i&&OP(l,I,_),{placement:"top",maxHeight:R}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var WP,HP=function(e){return"auto"===e?"bottom":e},XP=e.createContext(null),ZP=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,c=(e.useContext(XP)||{}).setPortalPlacement,u=e.useRef(null),d=pP(e.useState(o),2),p=d[0],f=d[1],h=pP(e.useState(null),2),m=h[0],g=h[1],y=l.spacing.controlHeight;return wP((function(){var e=u.current;if(e){var t="fixed"===a,n=GP({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:y});f(n.maxHeight),g(n.placement),null==c||c(n.placement)}}),[o,i,a,s,r,c,y]),n({ref:u,placerProps:cP(cP({},t),{},{placement:m||HP(i),maxHeight:p})})},$P=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return ny("div",Sm({},_P(e,"menu",{menu:!0}),{ref:n},r),t)},YP=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return cP({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},UP=YP,JP=YP,KP=["size"],QP=["innerProps","isRtl","size"];var qP,eD,tD="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},nD=function(e){var t=e.size,n=fP(e,KP);return ny("svg",Sm({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:tD},n))},rD=function(e){return ny(nD,Sm({size:20},e),ny("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"}))},oD=function(e){return ny(nD,Sm({size:20},e),ny("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"}))},iD=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cP({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},aD=iD,sD=iD,lD=oy(WP||(qP=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],eD||(eD=qP.slice(0)),WP=Object.freeze(Object.defineProperties(qP,{raw:{value:Object.freeze(eD)}})))),cD=function(e){var t=e.delay,n=e.offset;return ny("span",{css:ry({animation:"".concat(lD," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},uD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return ny("div",Sm({ref:o},_P(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},dD=["data"],pD=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return ny("div",Sm({},_P(e,"group",{group:!0}),s),ny(i,Sm({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),ny("div",null,t))},fD=["innerRef","isDisabled","isHidden","inputClassName"],hD={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mD={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":cP({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},hD)},gD=function(e){return cP({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},hD)},yD=function(e){var t=e.cx,n=e.value,r=IP(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=fP(r,fD);return ny("div",Sm({},_P(e,"input",{"input-container":!0}),{"data-value":n||""}),ny("input",Sm({className:t({input:!0},s),ref:o,style:gD(a),disabled:i},l)))},bD=function(e){var t=e.children,n=e.innerProps;return ny("div",n,t)};var vD=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return ny(l,{data:r,innerProps:cP(cP({},_P(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},ny(c,{data:r,innerProps:cP({},_P(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),ny(u,{data:r,innerProps:cP(cP({},_P(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},wD=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return ny("div",Sm({},_P(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},xD=function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"placeholder",{placeholder:!0}),n),t)},CD=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return ny("div",Sm({},_P(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ED={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ny(rD,null))},Control:uD,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ny(oD,null))},DownChevron:oD,CrossIcon:rD,Group:pD,GroupHeading:function(e){var t=IP(e);t.data;var n=fP(t,dD);return ny("div",Sm({},_P(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({},_P(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ny("span",Sm({},t,_P(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:yD,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=fP(e,QP);return ny("div",Sm({},_P(cP(cP({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ny(cD,{delay:0,offset:n}),ny(cD,{delay:160,offset:!0}),ny(cD,{delay:320,offset:!n}))},Menu:$P,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return ny("div",Sm({},_P(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(n){var r=n.appendTo,o=n.children,i=n.controlElement,a=n.innerProps,s=n.menuPlacement,l=n.menuPosition,c=e.useRef(null),u=e.useRef(null),d=pP(e.useState(HP(s)),2),p=d[0],f=d[1],h=e.useMemo((function(){return{setPortalPlacement:f}}),[]),m=pP(e.useState(null),2),g=m[0],y=m[1],b=e.useCallback((function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===l?0:window.pageYOffset,n=e[p]+t;n===(null==g?void 0:g.offset)&&e.left===(null==g?void 0:g.rect.left)&&e.width===(null==g?void 0:g.rect.width)||y({offset:n,rect:e})}}),[i,l,p,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);wP((function(){b()}),[b]);var v=e.useCallback((function(){"function"==typeof u.current&&(u.current(),u.current=null),i&&c.current&&(u.current=rC(i,c.current,b,{elementResize:"ResizeObserver"in window}))}),[i,b]);wP((function(){v()}),[v]);var w=e.useCallback((function(e){c.current=e,v()}),[v]);if(!r&&"fixed"!==l||!g)return null;var x=ny("div",Sm({ref:w},_P(cP(cP({},n),{},{offset:g.offset,position:l,rect:g.rect}),"menuPortal",{"menu-portal":!0}),a),o);return ny(XP.Provider,{value:h},r?t.createPortal(x,r):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=fP(e,zP);return ny("div",Sm({},_P(cP(cP({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=fP(e,VP);return ny("div",Sm({},_P(cP(cP({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:vD,MultiValueContainer:bD,MultiValueLabel:bD,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ny("div",Sm({role:"button"},n),t||ny(rD,{size:14}))},Option:wD,Placeholder:xD,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return ny("div",Sm({},_P(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:CD,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return ny("div",Sm({},_P(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},kD=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function SD(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||kD(r)&&kD(o)))return!1;var r,o;return!0}for(var ID="production"===process.env.NODE_ENV?{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"}:{name:"1f43avz-a11yText-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;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},_D=function(e){return ny("span",Sm({css:ID},e))},AD={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){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(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ND=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,u=t.isAppleDevice,d=l.ariaLiveMessages,p=l.getOptionLabel,f=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,b=l.options,v=l.screenReaderStatus,w=l.tabSelectsValue,x=l.isLoading,C=l["aria-label"],E=l["aria-live"],k=e.useMemo((function(){return cP(cP({},AD),d||{})}),[d]),S=e.useMemo((function(){var e,t="";if(n&&k.onChange){var r=n.option,o=n.options,i=n.removedValue,a=n.removedValues,l=n.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?p(c):"",d=o||a||void 0,f=d?d.map(p):[],h=cP({isDisabled:c&&m(c,s),label:u,labels:f},n);t=k.onChange(h)}return t}),[n,k,m,s,p]),I=e.useMemo((function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&k.onFocus){var a={focused:t,label:p(t),isDisabled:m(t,s),isSelected:n,options:i,context:t===r?"menu":"value",selectValue:s,isAppleDevice:u};e=k.onFocus(a)}return e}),[r,o,p,m,k,i,s,u]),_=e.useMemo((function(){var e="";if(y&&b.length&&!x&&k.onFilter){var t=v({count:i.length});e=k.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,y,k,b,v,x]),A="initial-input-focus"===(null==n?void 0:n.action),N=e.useMemo((function(){var e="";if(k.guidance){var t=o?"value":y?"menu":"input";e=k.guidance({"aria-label":C,context:t,isDisabled:r&&m(r,s),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:A})}return e}),[C,r,o,h,m,g,y,k,s,w,A]),R=ny(e.Fragment,null,ny("span",{id:"aria-selection"},S),ny("span",{id:"aria-focused"},I),ny("span",{id:"aria-results"},_),ny("span",{id:"aria-guidance"},N));return ny(e.Fragment,null,ny(_D,{id:c},A&&R),ny(_D,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!A&&R))},RD=[{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źẑżžẓẕƶȥɀⱬꝣ"}],OD=new RegExp("["+RD.map((function(e){return e.letters})).join("")+"]","g"),TD={},MD=0;MD<RD.length;MD++)for(var PD=RD[MD],DD=0;DD<PD.letters.length;DD++)TD[PD.letters[DD]]=PD.base;var BD=function(e){return e.replace(OD,(function(e){return TD[e]}))},jD=function(e,t){void 0===t&&(t=SD);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(BD),LD=function(e){return e.replace(/^\s+|\s+$/g,"")},FD=function(e){return"".concat(e.label," ").concat(e.value)},VD=["innerRef"];function zD(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=pP(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=pP(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(fP(e,VD),"onExited","in","enter","exit","appear");return ny("input",Sm({ref:t},n,{css:ry({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)"},"production"===process.env.NODE_ENV?"":";label:DummyInput;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var GD=["boxSizing","height","overflow","paddingRight","position"],WD={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function HD(e){e.cancelable&&e.preventDefault()}function XD(e){e.stopPropagation()}function ZD(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function $D(){return"ontouchstart"in window||navigator.maxTouchPoints}var YD=!("undefined"==typeof window||!window.document||!window.document.createElement),UD=0,JD={capture:!1,passive:!1};var KD=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},QD="production"===process.env.NODE_ENV?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function qD(t){var n=t.children,r=t.lockEnabled,o=t.captureEnabled,i=function(t){var n=t.isEnabled,r=t.onBottomArrive,o=t.onBottomLeave,i=t.onTopArrive,a=t.onTopLeave,s=e.useRef(!1),l=e.useRef(!1),c=e.useRef(0),u=e.useRef(null),d=e.useCallback((function(e,t){if(null!==u.current){var n=u.current,c=n.scrollTop,d=n.scrollHeight,p=n.clientHeight,f=u.current,h=t>0,m=d-p-c,g=!1;m>t&&s.current&&(o&&o(e),s.current=!1),h&&l.current&&(a&&a(e),l.current=!1),h&&t>m?(r&&!s.current&&r(e),f.scrollTop=d,g=!0,s.current=!0):!h&&-t>c&&(i&&!l.current&&i(e),f.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[r,o,i,a]),p=e.useCallback((function(e){d(e,e.deltaY)}),[d]),f=e.useCallback((function(e){c.current=e.changedTouches[0].clientY}),[]),h=e.useCallback((function(e){var t=c.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=e.useCallback((function(e){if(e){var t=!!jP&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,p]),g=e.useCallback((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))}),[h,f,p]);return e.useEffect((function(){if(n){var e=u.current;return m(e),function(){g(e)}}}),[n,m,g]),function(e){u.current=e}}({isEnabled:void 0===o||o,onBottomArrive:t.onBottomArrive,onBottomLeave:t.onBottomLeave,onTopArrive:t.onTopArrive,onTopLeave:t.onTopLeave}),a=function(t){var n=t.isEnabled,r=t.accountForScrollbars,o=void 0===r||r,i=e.useRef({}),a=e.useRef(null),s=e.useCallback((function(e){if(YD){var t=document.body,n=t&&t.style;if(o&&GD.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&UD<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(WD).forEach((function(e){var t=WD[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&$D()&&(t.addEventListener("touchmove",HD,JD),e&&(e.addEventListener("touchstart",ZD,JD),e.addEventListener("touchmove",XD,JD))),UD+=1}}),[o]),l=e.useCallback((function(e){if(YD){var t=document.body,n=t&&t.style;UD=Math.max(UD-1,0),o&&UD<1&&GD.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&$D()&&(t.removeEventListener("touchmove",HD,JD),e&&(e.removeEventListener("touchstart",ZD,JD),e.removeEventListener("touchmove",XD,JD)))}}),[o]);return e.useEffect((function(){if(n){var e=a.current;return s(e),function(){l(e)}}}),[n,s,l]),function(e){a.current=e}}({isEnabled:r});return ny(e.Fragment,null,r&&ny("div",{onClick:KD,css:QD}),n((function(e){i(e),a(e)})))}var eB="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},tB=function(e){var t=e.name,n=e.onFocus;return ny("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:eB,value:"",onChange:function(){}})};function nB(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function rB(){return nB(/^Mac/i)}function oB(){return nB(/^iPhone/i)||nB(/^iPad/i)||rB()&&navigator.maxTouchPoints>1}var iB,aB={clearIndicator:sD,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return cP({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:aD,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return cP({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cP({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return cP(cP({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},mD),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return cP({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:JP,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return cP((sP(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),sP(n,"position","absolute"),sP(n,"width","100%"),sP(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return cP({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return cP({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return cP({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return cP({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:UP,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return cP({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return cP({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return cP({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return cP({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},sB={borderRadius:4,colors:{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%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},lB={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:MP(),captureMenuScroll:!MP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=cP({ignoreCase:!0,ignoreAccents:!0,stringify:FD,trim:!0,matchFrom:"any"},iB),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?LD(t):t,c=a?LD(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=jD(l),c=BD(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function cB(e,t,n,r){return{type:"option",data:t,isDisabled:yB(e,t,n),isSelected:bB(e,t,n),label:mB(e,t),value:gB(e,t),index:r}}function uB(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return cB(e,n,t,r)})).filter((function(t){return fB(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=cB(e,n,t,r);return fB(e,i)?i:void 0})).filter(LP)}function dB(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,vP(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function pB(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,vP(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function fB(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!wB(e)||!i)&&vB(e,{label:a,value:s,data:o},r)}var hB=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},mB=function(e,t){return e.getOptionLabel(t)},gB=function(e,t){return e.getOptionValue(t)};function yB(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function bB(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=gB(e,t);return n.some((function(t){return gB(e,t)===r}))}function vB(e,t,n){return!e.filterOption||e.filterOption(t,n)}var wB=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},xB=1,CB=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gw(e,t)}(n,e.Component);var t=bP(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).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:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=rB()||oB(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(vP(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=FP(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(FP(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=FP(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return hB(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return pB(uB(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return kP.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return mB(r.props,e)},r.getOptionValue=function(e){return gB(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=aB[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,cP(cP({},ED),e.components);var e},r.buildCategorizedOptions=function(){return uB(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return dB(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:cP({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&AP(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return wB(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++xB),r.state.selectValue=SP(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=hB(o,i[a])}return r}return function(e,t,n){t&&mP(e.prototype,t),n&&mP(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(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&&TP(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(TP(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(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(sB):cP(cP({},sB),this.props.theme):sB}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return yB(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return bB(this.props,e,t)}},{key:"filterOption",value:function(e,t){return vB(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{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 e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,l=e.menuIsOpen,c=e.required,u=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=cP(cP(cP({"aria-autocomplete":"list","aria-expanded":l,"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":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?r.createElement(u,Sm({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):r.createElement(zD,Sm({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:CP,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!d)return h?null:r.createElement(l,Sm({},c,{key:"placeholder",isDisabled:p,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return y.map((function(t,s){var l=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return r.createElement(n,Sm({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:u,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=y[0];return r.createElement(s,Sm({},c,{data:w,isDisabled:p}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,Sm({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!e||!i)return null;return r.createElement(e,Sm({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return r.createElement(n,Sm({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return r.createElement(e,Sm({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,i=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,m=f.inputValue,g=f.isLoading,y=f.loadingMessage,b=f.minMenuHeight,v=f.maxMenuHeight,w=f.menuIsOpen,x=f.menuPlacement,C=f.menuPosition,E=f.menuPortalTarget,k=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,I=f.noOptionsMessage,_=f.onMenuScrollToTop,A=f.onMenuScrollToBottom;if(!w)return null;var N,R=function(t,n){var o=t.type,i=t.data,a=t.isDisabled,s=t.isSelected,l=t.label,c=t.value,f=p===i,h=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},g="".concat(e.getElementId("option"),"-").concat(n),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return r.createElement(u,Sm({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,a=t.options,s=t.index,l="".concat(e.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return r.createElement(n,Sm({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return R(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return R(t,"".concat(t.index))}));else if(g){var O=y({inputValue:m});if(null===O)return null;N=r.createElement(l,d,O)}else{var T=I({inputValue:m});if(null===T)return null;N=r.createElement(c,d,T)}var M={minMenuHeight:b,maxMenuHeight:v,menuPlacement:x,menuPosition:C,menuShouldScrollIntoView:S},P=r.createElement(ZP,Sm({},d,M),(function(t){var n=t.ref,o=t.placerProps,s=o.placement,l=o.maxHeight;return r.createElement(i,Sm({},d,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:s}),r.createElement(qD,{captureEnabled:h,onTopArrive:_,onBottomArrive:A,lockEnabled:k},(function(t){return r.createElement(a,Sm({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:p}),N)})))}));return E||"fixed"===C?r.createElement(s,Sm({},d,{appendTo:E,controlElement:this.controlRef,menuPlacement:x,menuPosition:C}),P):P}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,a=t.name,s=t.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return r.createElement(tB,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(n){var c=l.map((function(t){return e.getOptionValue(t)})).join(n);return r.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(t,n){return r.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):r.createElement("input",{name:a,type:"hidden",value:""});return r.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return r.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,a=t.isFocused,s=t.selectValue,l=this.getFocusableOptions();return r.createElement(ND,Sm({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return r.createElement(o,Sm({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),r.createElement(t,Sm({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),r.createElement(i,Sm({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),r.createElement(n,Sm({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=SP(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return dB(uB(e,t))}(e,h):[],y=d?pB(uB(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:v,focusedOptionId:hB(y,v),focusableOptionsWithIds:y,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,C=a&&s;return a&&!C&&(x={value:FP(f,h,h[0]||null),options:h,action:"initial-input-focus"},C=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),cP(cP(cP({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:C})}}]),n}();CB.defaultProps=lB;var EB=e.forwardRef((function(t,n){var o=function(t){var n=t.defaultInputValue,r=void 0===n?"":n,o=t.defaultMenuIsOpen,i=void 0!==o&&o,a=t.defaultValue,s=void 0===a?null:a,l=t.inputValue,c=t.menuIsOpen,u=t.onChange,d=t.onInputChange,p=t.onMenuClose,f=t.onMenuOpen,h=t.value,m=fP(t,hP),g=pP(e.useState(void 0!==l?l:r),2),y=g[0],b=g[1],v=pP(e.useState(void 0!==c?c:i),2),w=v[0],x=v[1],C=pP(e.useState(void 0!==h?h:s),2),E=C[0],k=C[1],S=e.useCallback((function(e,t){"function"==typeof u&&u(e,t),k(e)}),[u]),I=e.useCallback((function(e,t){var n;"function"==typeof d&&(n=d(e,t)),b(void 0!==n?n:e)}),[d]),_=e.useCallback((function(){"function"==typeof f&&f(),x(!0)}),[f]),A=e.useCallback((function(){"function"==typeof p&&p(),x(!1)}),[p]),N=void 0!==l?l:y,R=void 0!==c?c:w,O=void 0!==h?h:E;return cP(cP({},m),{},{inputValue:N,menuIsOpen:R,onChange:S,onInputChange:I,onMenuClose:A,onMenuOpen:_,value:O})}(t);return r.createElement(CB,Sm({ref:n},o))})),kB=EB;const SB=({options:t,items_per_page:n,className:r,defaultValue:o,onChange:i})=>{const[a,s]=e.useState(""),[l,c]=e.useState(0),u=t.filter((e=>e.label.toLowerCase().includes(a)||e.value.toLowerCase().includes(a)));var d;d=void 0!==n?u.slice(l*n,(l+1)*n):u;const p={control:e=>({...e,minHeight:void 0})};return e.createElement(kB,{options:d,onInputChange:e=>{s(e.toLowerCase()),c(0)},onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:r,unstyled:!0,styles:p,classNamePrefix:"styled-select",defaultValue:o,value:o})},IB=({io:t,inputconverter:n,parser:r=e=>parseFloat(e)})=>{const o=e.useContext(oL),[i,a]=e.useState(n[1](t.value));e.useEffect((()=>{a(n[1](t.value))}),[t.value]);const s=e=>{e=r(parseFloat(e.toString()).toString()),isNaN(e)?(e="<NoValue>",a("")):(void 0!==t.value_options?.min&&e<t.value_options.min&&(e=t.value_options.min),void 0!==t.value_options?.max&&e>t.value_options.max&&(e=t.value_options.max),a(e.toString()));try{e=n[0](e)}catch(e){}o.worker?.set_io_value({nid:t.node,ioid:t.id,value:e,set_default:t.render_options.set_default})};let l=t.connected?n[1](t.value):i;return void 0===l&&(l=t.value_options?.min),void 0===l&&(l=t.value_options?.max),void 0===l&&(l=""),null===l&&(l=""),void 0!==t.value_options?.max&&void 0!==t.value_options?.min?e.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},e.createElement(tP,{className:"SliderRoot",value:[void 0===l?t.value_options?.min:l],min:t.value_options?.min,max:t.value_options?.max,step:t.value_options.step||(t.value_options?.max-t.value_options?.min)/1e3,disabled:t.connected,onValueCommit:e=>{isNaN(e[0])||s(e[0])},onValueChange:e=>{isNaN(e[0])||a(e[0].toString())}},e.createElement(nP,{className:"SliderTrack"},e.createElement(rP,{className:"SliderRange"})),e.createElement(gT,null,e.createElement(BT,{open:!0},e.createElement(jT,{asChild:!0},e.createElement(oP,{className:"SliderThumb"})),e.createElement(FT,{className:"SliderTooltipContent"},l))))):e.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:l,onChange:e=>a(e.target.value),onBlur:e=>{s(e.target.value)},onKeyDown:e=>{if("ArrowUp"!==e.key)if("ArrowDown"!==e.key)/^[0-9.eE+-]$/.test(e.key)||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)||e.preventDefault();else{let n=t.render_options.step||1;e.shiftKey&&(n*=10);let r=(parseFloat(l)||0)-n;s(r)}else{let n=t.render_options.step||1;e.shiftKey&&(n*=10);let r=(parseFloat(l)||0)+n;s(r)}},disabled:t.connected,step:t.render_options.step,min:t.value_options?.min,max:t.value_options?.max})},_B=({io:t,inputconverter:n})=>{const r=e.useContext(oL),[o,i]=e.useState(n[1](t.value));e.useEffect((()=>{i(n[1](t.value))}),[t.value]);let a=t.connected?n[1](t.value):o;return null==a&&(a=""),e.createElement("input",{className:"nodedatainput styledinput stringinput",value:a,onChange:e=>i(e.target.value),onBlur:e=>{let o=e.target.value;o||(o="<NoValue>");try{o=n[0](o)}catch(e){}r.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},disabled:t.connected})},AB=e=>e,NB=e=>parseFloat(e),RB=e=>!!e,OB=e=>"null"===e?null:e,TB=({io:t,inputconverter:n,parser:r})=>{let o=t.value_options?.options||[];Array.isArray(o)&&(o={type:"enum",values:o,keys:o.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==o.type&&(o={type:"enum",values:Object.values(o),keys:Object.keys(o),nullable:!1}),!o.nullable||o.values.includes(null)||o.keys.includes("None")||(o.values.unshift(null),o.keys.unshift("None"));const i=[];for(let e=0;e<o.values.length;e++){const t=null===o.values[e]||void 0===o.values[e]?"undefined":typeof o.values[e];let n=o.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),i.push([o.keys[e],n.toString(),t])}const a=e.useContext(oL),s=({value:e,datatype:o})=>{const i=r||(e=>"nuinputconvertermber"===e?NB:"boolean"===e?RB:"undefined"===e?OB:AB)(o);let s=i(e);try{s=n[0](e)}catch(e){}a.worker?.set_io_value({nid:t.node,ioid:t.id,value:s,set_default:t.render_options.set_default})};let l=t.value;null===l&&(l="null"),void 0===l&&(l="undefined");const c=i.find((e=>e[1]===l.toString()));let u;void 0!==c&&(u={value:c[1],label:c[0],datatype:c[2]});const d=i.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return e.createElement(SB,{className:"nodedatainput styleddropdown",options:d,defaultValue:u,onChange:e=>{s(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},MB=e=>!!e&&e instanceof Date,PB=e=>!!e&&e instanceof Object&&"function"==typeof e;function DB(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function BB(t){let{field:n,value:r,data:o,lastElement:i,openBracket:a,closeBracket:s,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:p}=t;const f=e.useRef(!1),[h,m,g]=function(t){const[n,r]=e.useState(t());return[n,()=>r((e=>!e)),r]}((()=>u(l,r,n))),y=e.useRef(null);e.useEffect((()=>{f.current?g(u(l,r,n)):f.current=!0}),[u]);const b=h?c.collapseIcon:c.expandIcon,v=h?"collapse JSON":"expand JSON",w=e.useId(),x=l+1,C=o.length-1,E=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),g("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!p.current)return;const n=p.current.querySelectorAll("[role=button]");let r=-1;for(let e=0;e<n.length;e++)if(0===n[e].tabIndex){r=e;break}if(r<0)return;const o=(r+t+n.length)%n.length;n[r].tabIndex=-1,n[o].tabIndex=0,n[o].focus()}},k=()=>{var e;m();const t=y.current;if(!t)return;const n=null===(e=p.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return e.createElement("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},e.createElement("span",{className:b,onClick:k,onKeyDown:E,role:"button","aria-label":v,"aria-expanded":h,"aria-controls":h?w:void 0,ref:y,tabIndex:0===l?0:-1}),(n||""===n)&&(d?e.createElement("span",{className:c.clickableLabel,onClick:k,onKeyDown:E},DB(n,c.quotesForFieldNames),":"):e.createElement("span",{className:c.label},DB(n,c.quotesForFieldNames),":")),e.createElement("span",{className:c.punctuation},a),h?e.createElement("ul",{id:w,role:"group",className:c.childFieldsContainer},o.map(((t,n)=>e.createElement(zB,{key:t[0]||n,field:t[0],value:t[1],style:c,lastElement:n===C,level:x,shouldExpandNode:u,clickToExpandNode:d,outerRef:p})))):e.createElement("span",{className:c.collapsedContent,onClick:k,onKeyDown:E}),e.createElement("span",{className:c.punctuation},s),!i&&e.createElement("span",{className:c.punctuation},","))}function jB(t){let{field:n,openBracket:r,closeBracket:o,lastElement:i,style:a}=t;return e.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&e.createElement("span",{className:a.label},DB(n,a.quotesForFieldNames),":"),e.createElement("span",{className:a.punctuation},r),e.createElement("span",{className:a.punctuation},o),!i&&e.createElement("span",{className:a.punctuation},","))}function LB(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:s,outerRef:l}=e;return 0===Object.keys(n).length?jB({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):BB({field:t,value:n,lastElement:o||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:l})}function FB(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:s,outerRef:l}=e;return 0===n.length?jB({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):BB({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:s,data:n.map((e=>[void 0,e])),outerRef:l})}function VB(t){let n,{field:r,value:o,style:i,lastElement:a}=t,s=i.otherValue;var l;return null===o?(n="null",s=i.nullValue):void 0===o?(n="undefined",s=i.undefinedValue):"string"==typeof(l=o)||l instanceof String?(n=function(e,t){return t?`"${e}"`:e}(o,!i.noQuotesForStringValues),s=i.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(o)?(n=o?"true":"false",s=i.booleanValue):(e=>"number"==typeof e||e instanceof Number)(o)?(n=o.toString(),s=i.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(o)?(n=`${o.toString()}n`,s=i.numberValue):n=MB(o)?o.toISOString():PB(o)?"function() { }":o.toString(),e.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(r||""===r)&&e.createElement("span",{className:i.label},DB(r,i.quotesForFieldNames),":"),e.createElement("span",{className:s},n),!a&&e.createElement("span",{className:i.punctuation},","))}function zB(t){const n=t.value;return r=n,Array.isArray(r)?e.createElement(FB,Object.assign({},t)):!(e=>"object"==typeof e&&null!==e)(n)||MB(n)||PB(n)?e.createElement(VB,Object.assign({},t)):e.createElement(LB,Object.assign({},t));var r}var GB="_2bkNM",WB="_1BXBN";const HB={container:"_2IvMF _GzYRV",basicChildStyle:GB,childFieldsContainer:WB,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},XB={container:"_11RoI _GzYRV",basicChildStyle:GB,childFieldsContainer:WB,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},ZB=()=>!0,$B=e=>e<1,YB=t=>{let{data:n,style:r=HB,shouldExpandNode:o=ZB,clickToExpandNode:i=!1,...a}=t;const s=e.useRef(null);return e.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:r.container,ref:s,role:"tree"}),e.createElement(zB,{value:n,style:{...HB,...r},lastElement:!0,level:0,shouldExpandNode:o,clickToExpandNode:i,outerRef:s}))},UB=({data:t})=>e.createElement(YB,{data:t,style:XB,shouldExpandNode:$B}),JB=({tabledata:t})=>{const n=e.useMemo((()=>(e=>{const t=[];if(void 0===e)return{header:[],rows:[]};void 0===e.data&&(e.data=[]),void 0===e.columns&&(0===e.data.length?e.columns=[]:e.columns=e.data[0].map(((e,t)=>`col${t}`))),void 0===e.index&&(e.index=e.data.map(((e,t)=>`row${t}`)));for(let n=0;n<e.index.length;n++){const r=[e.index[n]];for(let t=0;t<e.columns.length;t++)r.push(e.data[n][t]);t.push(r)}return{header:["index",...e.columns],rows:t}})(t)),[t]),[r,o]=e.useState("asc"),[i,a]=e.useState("index");let s=n.header.indexOf(i);-1===s&&(s=0);const l=((e,t)=>{const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>t(e[0],n[0]))),n.map((e=>e[0]))})(n.rows,(e=>"desc"===e?(e,t)=>t[s]<e[s]?-1:1:(e,t)=>e[s]<t[s]?-1:1)(r));return e.createElement(rw,{className:"tablecontainer"},e.createElement(Hv,{size:"small"},e.createElement(lw,{className:"tableHead"},e.createElement(fw,{className:"tableheadercolor"},n.header.map((t=>e.createElement(ew,{key:t,sortDirection:i===t&&r,className:"tableheadercolor"},e.createElement(Hw,{active:i===t,direction:i===t?r:"asc",onClick:()=>(e=>{o(i===e&&"asc"===r?"desc":"asc"),a(e)})(t),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},t)))))),e.createElement(Jv,null,l.map(((n,r)=>e.createElement(fw,{key:t.index[r]},n.map(((t,n)=>e.createElement(ew,{key:n,className:0==n?"indexcol":"datacol"},t)))))))))};var KB,QB={};
|
|
141
141
|
/*!
|
|
142
142
|
* content-type
|
|
143
143
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
144
144
|
* MIT Licensed
|
|
145
|
-
*/var qB=function(){if(KB)return QB;KB=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return QB.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},QB.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},QB}(),ej=new Map,tj=function(e){return e.cloneNode(!0)},nj=function(){return"file:"===window.location.protocol},rj=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=qB.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(nj()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||nj()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},oj={},ij=function(e,t){oj[e]=oj[e]||[],oj[e].push(t)},aj=function(e,t,n){if(ej.has(e)){var r=ej.get(e);if(void 0===r)return void ij(e,n);if(r instanceof SVGSVGElement)return void n(null,tj(r))}ej.set(e,void 0),ij(e,n),rj(e,t,(function(t,n){var r;t?ej.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&ej.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(oj[e])){var n=ej.get(e),r=oj[e][t];n instanceof SVGSVGElement&&r(null,tj(n)),n instanceof Error&&r(n),t===oj[e].length-1&&delete oj[e]}}),0)},n=0,r=oj[e].length;n<r;n++)t(n)}(e)}))},sj=function(e,t,n){rj(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},lj=0,cj=[],uj={},dj="http://www.w3.org/1999/xlink",pj=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==cj.indexOf(e))return cj.splice(cj.indexOf(e),1),void(e=null);cj.push(e),e.setAttribute("src",""),(r?aj:sj)(s,o,(function(r,o){if(!o)return cj.splice(cj.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var p=Array.from(new Set(Id(Id(Id([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var m,g,y,b,v,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;b=g[e].id,v=b+"-"+ ++lj,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+v+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(dj,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(dj,"href","#"+v);g[e].id=v},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,C,E=o.querySelectorAll("script"),k=[],S=0,I=E.length;S<I;S++)(C=E[S].getAttribute("type"))&&"application/ecmascript"!==C&&"application/javascript"!==C&&"text/javascript"!==C||((x=E[S].innerText||E[S].textContent)&&k.push(x),o.removeChild(E[S]));if(k.length>0&&("always"===t||"once"===t&&!uj[s])){for(var _=0,A=k.length;_<A;_++)new Function(k[_])(window);uj[s]=!0}var N=o.querySelectorAll("style");if(Array.prototype.forEach.call(N,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",dj),i(o),!e.parentNode)return cj.splice(cj.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),cj.splice(cj.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},fj=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],hj="http://www.w3.org/2000/svg",mj="http://www.w3.org/1999/xlink",gj=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}yw(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof function(e){return((null==e?void 0:e.ownerDocument)||document).defaultView||window}(this.reactWrapper).Node){var t,n,r=this.props,o=r.desc,i=r.evalScripts,a=r.httpRequestWithCredentials,s=r.renumerateIRIElements,l=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,f=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(hj,h)).setAttribute("xmlns",hj),t.setAttribute("xmlns:xlink",mj),n=document.createElementNS(hj,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);var m=function(t){e.removeSVG(),e._isMounted?e.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){d(t)})):d(t)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,p=void 0===d?"never":d,f=n.httpRequestWithCredentials,h=void 0!==f&&f,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,b=0,v=e.length;b<v;b++)pj(e[b],p,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?pj(e,p,g,u,h,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(n,{afterEach:function(t,n){t?m(t):e._isMounted&&e.setState((function(){return{isLoading:!1}}),(function(){try{f(n)}catch(e){m(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(c){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=c,e.prepend(i)}try{p(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:s})}},n.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(Sm({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var o=e.wrapper,i=mw(e,fj),a=o;return r.createElement(a,Sm({},i,{ref:this.refCallback},"svg"===o?{xmlns:hj,xmlnsXlink:mj}:{}),this.state.isLoading&&n&&r.createElement(n,null),this.state.hasError&&t&&r.createElement(t,null))},t}(r.Component);gj.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},gj.propTypes={afterInjection:$f.func,beforeInjection:$f.func,desc:$f.string,evalScripts:$f.oneOf(["always","once","never"]),fallback:$f.oneOfType([$f.func,$f.object,$f.string]),httpRequestWithCredentials:$f.bool,loading:$f.oneOfType([$f.func,$f.object,$f.string]),onError:$f.func,renumerateIRIElements:$f.bool,src:$f.string.isRequired,title:$f.string,useRequestCache:$f.bool,wrapper:$f.oneOf(["div","span","svg"])};const yj=({value:t,renderoptions:n})=>(void 0===n&&(n={}),void 0===n.format&&(n.format="jpeg"),e.createElement("img",{src:"data:image/"+n.format+";base64, "+t,style:{maxWidth:"100%",maxHeight:"100%"}})),bj=({value:t})=>e.createElement(gj,{src:`data:image/svg+xml;base64,${btoa(t)}`,style:{maxWidth:"100%",maxHeight:"100%"},beforeInjection:e=>{e.classList.add("svg-class-name"),e.setAttribute("style","max-width: 100%; max-height: 100%;"),e.setAttribute("width","100%"),e.setAttribute("height","100%")}}),vj=({io:t})=>{let n=t.fullvalue;if(null==n&&(n=t.value),void 0===n&&(n=""),"string"!=typeof n||n.length%4!=0)return e.createElement("div",null,n);const r=Math.round(3*n.length/4);return e.createElement("div",null,e.createElement("pre",null,"Bytes(",r,")"))},wj=({io:t})=>{let n=t.fullvalue;return void 0===n&&(n=t.value),void 0===n&&(n={}),e.createElement(UB,{data:n})},xj={float:({io:e,inputconverter:t})=>IB({io:e,inputconverter:t,parser:parseFloat}),int:({io:e,inputconverter:t})=>IB({io:e,inputconverter:t,parser:parseInt}),bool:({io:t,inputconverter:n})=>{const r=e.useContext(oL),o=void 0===t.value,i=e.useRef(null);e.useEffect((()=>{i.current&&(i.current.indeterminate=o)}),[i,o]);return e.createElement("input",{ref:i,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!n[1](t.value),onChange:e=>{let o=e.target.checked;try{o=n[0](e.target.checked)}catch(e){}r.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},disabled:t.connected})},string:_B,str:_B,color:({io:t})=>{const n=e.useContext(oL),r=t.value_options?.colorspace||"hex";let o=!1;return"string"!=typeof t.type&&"anyOf"in t.type&&void 0!==t.type.anyOf&&(o=t.type.anyOf.some((e=>"None"===e))),e.createElement(IM,{onChange:e=>{let o="<NoValue>";e&&(o=e[r]?e[r]():e.hex()),null===e&&(o=null),n.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},inicolordata:t.value,allow_null:o,inicolorspace:r})},select:TB,enum:TB,bytes:vj},Cj={Inputrenderer:xj,Outputrenderer:{},HandlePreviewRenderer:{bytes:vj},DataOverlayRenderer:{},DataPreviewViewRenderer:{string:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),n=void 0===n?"":JSON.stringify(t.value).replace(/\\n/g,"\n"),e.createElement("div",null,e.createElement("pre",null,n))},table:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=[]),e.createElement(JB,{tabledata:n})},image:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=""),e.createElement(yj,{value:n})},svg:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=""),e.createElement(bj,{value:n})},dict:wj,bytes:vj},DataViewRenderer:{},InLineRenderer:{bytes:({io:e})=>{let t=e.fullvalue;null==t&&(t=e.value),t=void 0===t?"":JSON.stringify(e.value).replace(/\\n/g,"\n");return`Bytes(${Math.round(3*t.length/4)})`}}},Ej=(e,t)=>{const n=t.options||{},r=void 0===n.overwrite||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_FROM_PLUGIN":let n=!1;const o=[[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]];for(const[e,t]of o){if(Object.keys(e).length>0)if(r)n=!0;else for(const r in e)if(!t[r]){n=!0;break}if(n)break}if(!n)return e;for(const[e,t]of o)for(const n in e)!r&&t[n]||(t[n]=e[n]);return{...e};default:return e}},kj=({children:t,plugins:n,fnrf_zst:r})=>{const[o,i]=e.useReducer(Ej,Cj),a=(e,t)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return e.useEffect((()=>{for(const t in n){const o=n[t].RendererPlugin;o&&a(o);const i=n[t].renderpluginfactory;i&&a(i({React:e,fnrf_zst:r}))}}),[n]),e.createElement(Sj.Provider,{value:{Inputrenderer:o.Inputrenderer,Outputrenderer:o.Outputrenderer,HandlePreviewRenderer:o.HandlePreviewRenderer,DataOverlayRenderer:o.DataOverlayRenderer,DataPreviewViewRenderer:o.DataPreviewViewRenderer,DataViewRenderer:o.DataViewRenderer,InLineRenderer:o.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendFromPlugin:a}},t)},Sj=e.createContext({Inputrenderer:Cj.Inputrenderer,Outputrenderer:Cj.Outputrenderer,HandlePreviewRenderer:Cj.HandlePreviewRenderer,DataOverlayRenderer:Cj.DataOverlayRenderer,DataPreviewViewRenderer:Cj.DataPreviewViewRenderer,DataViewRenderer:Cj.DataViewRenderer,InLineRenderer:Cj.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),Ij=({component:t,...n})=>e.createElement(t,{...n}),_j=t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{});if(!r)return wj;const{DataOverlayRenderer:o,DataPreviewViewRenderer:i}=e.useContext(Sj);return o[r]?o[r]:i[r]?i[r]:wj},Aj=(e,t)=>{if("string"==typeof e)return e in t?[t[e],e]:[e,e];if("allOf"in e&&void 0!==e.allOf)return[void 0,void 0];if("anyOf"in e&&void 0!==e.anyOf){const n=e.anyOf.map((e=>Aj(e,t)));for(const e of n)switch(e[0]){case"bool":return["bool",e[1]];case"enum":return["enum",e[1]];case"float":return["float",e[1]];case"int":return["int",e[1]];case"string":case"str":return["string",e[1]]}return[void 0,void 0]}return"type"in e&&void 0!==e.type&&"enum"===e.type?["enum","enum"]:[void 0,void 0]},Nj=({io:t,typestring:n,preview:r,...o})=>{const[i,a]=e.useState(!1),[s,l]=e.useState(!1),[c,u]=t?(t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),{HandlePreviewRenderer:o,DataPreviewViewRenderer:i}=e.useContext(Sj),a=_j(t);return r?o[r]?[o[r],a]:i[r]?[i[r],a]:[wj,a]:[wj,a]})(t):[void 0,void 0];return e.createElement(DT,null,e.createElement(BT,{open:i||s,onOpenChange:l},e.createElement(jT,{asChild:!0},e.createElement(si,{id:t.id,...o})),e.createElement(LT,null,e.createElement(FT,{className:"iotooltipcontent",sideOffset:5},e.createElement("div",{className:"iotooltip_container"},e.createElement("div",{className:"iotooltip_header"},i?e.createElement(Pv,{onClick:()=>a(!1)}):e.createElement(Mv,{onClick:()=>a(!0)}),u&&e.createElement($w,{title:t.full_id,trigger:e.createElement(Dv,null),onOpenChange:e=>{e&&t.try_get_full_value&&t.try_get_full_value(),a(e)}},e.createElement(Ij,{component:u,io:t}))),c?e.createElement(Ij,{component:c,io:t}):`no preview available for "${n}"`),e.createElement(VT,{className:"iotooltipcontentarrow"})))))},Rj={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>"string"==typeof e?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch(t){try{return JSON.parse("["+e+"]")}catch(e){}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},Oj=({io:t})=>{const n=e.useContext(oL).render_options(),[r,o]=Aj(t.render_options.type,n.typemap||{}),{Inputrenderer:i}=e.useContext(Sj),a=r?t.value_options?.options?TB:i[r]:void 0,s=Rj[(o&&n.inputconverter?.[o])??""];return e.createElement("div",{className:"nodeinput"},e.createElement(Nj,{io:t,typestring:r,position:Eo.Left,type:"target"}),a&&e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(a,{io:t,inputconverter:s})),e.createElement("div",{className:"ioname"},t.name),e.createElement(Nj,{io:t,typestring:r,position:Eo.Right,type:"source"}))},Tj=({io:t,typestring:n})=>{const{InLineRenderer:r}=e.useContext(Sj);if(n&&r[n])return e.createElement("div",null,r[n]({io:t}));let o=t.fullvalue;return null==o&&(o=t.value),o=void 0===o?"":JSON.stringify(o).replace(/\\n/g,"\n"),o.length>63&&(o=o.slice(0,60)+"..."),e.createElement("div",null,o)},Mj=({io:t})=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),{Outputrenderer:o}=e.useContext(Sj),i=r?o[r]:void 0;return e.createElement("div",{className:"nodeoutput"},e.createElement(Nj,{io:t,typestring:r,position:Eo.Right,type:"source"}),e.createElement("div",{className:"ioname"},t.name),i?e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(i,{io:t})):e.createElement("div",{className:"iovaluefield"},e.createElement(Tj,{io:t,typestring:r})))};function Pj(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function Dj(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 Bj=({state:t,className:n="reacttqdm",...r})=>{const o=e.useRef(null),i=e.useRef(null);e.useEffect((()=>{const e=()=>{o.current&&i.current&&function(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:i=.9}=n;if(!e||!t)return;if(i>=1||i<=0)throw new Error("decrementFactor must be between 0 and 1");const a=e.getBoundingClientRect(),s=a.width,l=a.height;let c=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=c+"px";let u=t.getBoundingClientRect();for(;(u.width>s||u.height>l)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(o.current,i.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]);const a=t.total?t.n/t.total*100:0;return e.createElement("div",{ref:o,className:n,...r},e.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},e.createElement("div",{className:n+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},e.createElement("div",{className:n+"-progress",style:{width:`${a}%`,height:"100%"}})),e.createElement("div",{className:n+"-text",ref:i},function(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n:n,unit_scale:r,elapsed:o,unit:i,unit_divisor:a,prefix:s="",rate:l,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,p=t,f=l;r&&!0!==r&&1!==r&&(null!==t&&(p=t*r),d=n*r,void 0!==l&&(f=l*r));const h=Pj(o);void 0===f&&o>0&&(f=(d-u)/o);const m=f?1/f:void 0,[g,y]=f?Dj(f,a):[void 0,""],[b,v]=m?Dj(m,1e3):[void 0,""],w=m&&m>1?b?`${b}${v}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?Dj(d,a).join(""):d.toString(),C=r&&null!==p?Dj(p,a).join(""):p?.toString()??"?",E=f?Pj(f&&null!==p?(p-d)/f:0):"?",k=s?`${s}: `:"";if(null!==t){const e=` ${x}/${C} [${h} < ${E}, ${w}${c??""}]`;return`${k}${(d/t*100).toFixed(0)}%${e}`}return`${k}${x}${i} [${h}, ${w}${c??""}]`}(t))))},jj=({node_data:t})=>{const n=e.useContext(oL);return e.createElement("div",{className:"nodeheader",title:t.description||t.node_name},e.createElement("div",{className:"nodeheader_element"},e.createElement(Lv,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{n.on_node_action({type:"trigger",from_remote:!1,id:t.id})}}),e.createElement(jv,{fontSize:"inherit",onClick:async()=>{n.logger.info("nodestatus",await(n.worker?.get_node_status(t.id)))}})),e.createElement("div",{className:"nodeheader_element nodeheader_title"},e.createElement("div",{className:"nodeheader_title_text"},t.node_name)),e.createElement("div",{className:"nodeheader_element"},e.createElement(Bv,{fontSize:"inherit"})))},Lj=({node_data:t})=>{const n=t.render_options?.data?.src?t.io[t.render_options?.data?.src]:void 0,[r,o]=n?(t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),o=_j(t),{DataPreviewViewRenderer:i,DataViewRenderer:a}=e.useContext(Sj);return r?a[r]?[a[r],o]:i[r]?[i[r],o]:[wj,o]:[wj,o]})(n):[void 0,void 0];return e.createElement("div",{className:"nodrag nodedatabody"},r&&n&&e.createElement($w,{title:n.full_id,trigger:e.createElement("div",null,e.createElement(Ij,{component:r,io:n})),onOpenChange:e=>{e&&n?.try_get_full_value&&n?.try_get_full_value()}},e.createElement(Ij,{component:o,io:n})))},Fj=({node_data:t})=>{const n=Object.values(t.io).filter((e=>e.is_input)),r=Object.values(t.io).filter((e=>!e.is_input));return t.render_options,e.createElement("div",{className:"nodebody"},r.map((t=>t.hidden?null:e.createElement(Mj,{key:t.id,io:t}))),e.createElement(Lj,{node_data:t}),n.map((t=>t.hidden?null:e.createElement(Oj,{key:t.id,io:t}))))},Vj=({node_data:t})=>{const[n,r]=e.useState(t.name);e.useEffect((()=>{r(t.name)}),[t]);const o=e.useContext(oL);return e.createElement("input",{className:"nodename_input",value:n,onChange:e=>{r(e.target.value)},onBlur:e=>{const n=e.target.value;o.on_node_action({type:"update",from_remote:!1,id:t.id,node:{name:n}})}})},zj=({node_data:t})=>t.progress?e.createElement(Bj,{style:{height:"idle"===t.progress.prefix?"0px":void 0},state:t.progress,className:"nodeprogress"}):null,Gj=({node_data:t})=>e.createElement("div",{className:"nodefooter"},t.error&&e.createElement("div",{className:"nodeerror"},t.error),e.createElement(zj,{node_data:t})),Wj=({io:t})=>{const n=e.useContext(oL).render_options(),[r,o]=Aj(t.render_options.type,n.typemap||{}),{Inputrenderer:i}=e.useContext(Sj),a=r?t.value_options?.options?TB:i[r]:void 0,s=Rj[(o&&n.inputconverter?.[o])??""];return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,t.name),a&&e.createElement(a,{io:t,inputconverter:s}),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:e=>{t.set_hidden?.(e.target.checked)},checked:t.hidden}))))},Hj=({io:t})=>e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,t.name),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:e=>{t.set_hidden?.(e.target.checked)},checked:t.hidden})))),Xj=({nodestore:t})=>{const n=t(),r=Object.values(n.io).filter((e=>e.is_input)),o=Object.values(n.io).filter((e=>!e.is_input));return e.createElement("div",null,e.createElement("div",{className:"nodesettings_section"},e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,"Name"),e.createElement("div",null,e.createElement(Vj,{node_data:n})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Inputs"),r.map((t=>e.createElement(Wj,{io:t,key:t.id})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Outputs"),o.map((t=>e.createElement(Hj,{io:t,key:t.id})))))},Zj=()=>{const t=e.useContext(oL),n=t.local_state((e=>e.selected_nodes));if(0===n.length)return e.createElement("div",null,"Node Settings");if(n.length>1)return e.createElement("div",null,"Multiple Nodes Selected");const r=t.nodespace.get_node(n[0]);return r?e.createElement(Xj,{nodestore:r}):e.createElement("div",null,"Node not found")},$j=()=>{const t=e.useContext(oL),n=t.local_settings((e=>e.view_settings.expand_node_props)),r=t.local_settings((e=>e.update_view_settings)),o=e=>{r({expand_node_props:e})};return e.createElement("div",{className:"nodesettings_container"},e.createElement("div",{className:"nodesettings_expander"},n?e.createElement(Tv,{onClick:()=>{o(!1)}}):e.createElement(Fv,{onClick:()=>{o(!0)}})),e.createElement("div",{className:"nodesettings_content "+(n?"expanded":"collapsed")},n&&e.createElement(Zj,null)))},Yj=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),Uj={default:({data:t})=>{const n=t.UseNodeStore(),r=n.frontend.collapsed||!1,[o,i]=e.useState(!1);return e.useEffect((()=>{let e;return n.in_trigger?i(!0):o&&(e=setTimeout((()=>i(!1)),200)),()=>clearTimeout(e)}),[n.in_trigger,o]),e.createElement(e.Fragment,null,e.createElement("div",{className:"innernode"+(o?" intrigger":"")+(n.error?" error":"")},e.createElement(jj,{node_data:n}),e.createElement(Vj,{node_data:n}),r?null:e.createElement(Fj,{node_data:n}),e.createElement(Gj,{node_data:n})))}},Jj={default:({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:a,targetPosition:s,data:l,...c})=>{const[u]=Bo({sourceX:n,sourceY:r,sourcePosition:a,targetX:o,targetY:i,targetPosition:s});return e.createElement(e.Fragment,null,e.createElement(ho,{id:t,path:u,...c}))}},Kj=()=>{const t=Xi();return e.useContext(oL).rf_instance=t,e.createElement(e.Fragment,null)},Qj=()=>{const t=e.useContext(oL),n=Ti("Delete"),r=Gr(ws,X),o=Gr(vs,X);if(n){for(const n of r)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);if(!n.source||!n.target)return e.createElement(e.Fragment,null);if(!n.sourceHandle||!n.targetHandle)return e.createElement(e.Fragment,null);t.worker.remove_edge({src_nid:n.source,src_ioid:n.sourceHandle,trg_nid:n.target,trg_ioid:n.targetHandle})}for(const n of o)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);t.worker.remove_node(n.id)}}return e.createElement(e.Fragment,null)},qj=({id:t,top:n,left:r,right:o,bottom:i,...a})=>{const{getNode:s,setNodes:l,addNodes:c,setEdges:u}=Xi(),d=e.useContext(oL),p=e.useCallback((()=>{const e=s(t);if(!e)return;const n={x:e.position.x+50,y:e.position.y+50};c({...e,id:`${e.id}-copy`,position:n})}),[t,s,c]),f=e.useCallback((()=>{d.on_node_action({type:"delete",id:t,from_remote:!1})}),[t,l,u]),h=d.nodespace.get_node(t,!1);if(!h)return e.createElement(e.Fragment,null," ");const m=h();return e.createElement("div",{style:{top:n,left:r,right:o,bottom:i},className:"context-menu",...a},e.createElement("p",{style:{fontWeight:"bold"}},e.createElement("small",null,m.name)),e.createElement("button",{onClick:p},"duplicate"),e.createElement("button",{onClick:f},"delete"))},eL=t=>{const n=e.useContext(oL),r=e.useRef(null);e.useEffect((()=>{n.reactflowRef=r.current}),[r]);const[o,i]=e.useState(null),a=e.useCallback((()=>i(null)),[i]),{nodes:s,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d}=n.useReactFlowStore(iT(Yj));return e.createElement("div",{className:"reactflowlayer"},e.createElement(bs,{nodes:s,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d,nodeTypes:Uj,edgeTypes:Jj,minZoom:t.minZoom,maxZoom:t.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:t})=>{const r=n.local_state.getState();n.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:t.map((e=>e.id))})},ref:r,onPaneClick:a,panOnDrag:!t.static},e.createElement(Kj,null),e.createElement(Qj,null),e.createElement(js,{color:"#888",gap:16,size:1}),t.minimap&&e.createElement(Rs,{nodeStrokeWidth:3,pannable:!t.static,zoomable:!t.static,zoomStep:3}),o&&e.createElement(qj,{onClick:a,...o})))},tL=({fnrf_zst:t,header:n,flow:r,library:o})=>{const[i,a]=e.useState(t.options.worker);t.workermanager&&(t.workermanager.on_setWorker=a),t.set_worker(i),t.auto_progress();const s=t.plugins();return e.createElement(kj,{plugins:s,fnrf_zst:t},e.createElement(oL.Provider,{value:t},e.createElement("div",{className:"funcnodesreactflowcontainer funcnodescontainer"},n.show&&e.createElement(wS,{...n}),e.createElement("div",{className:"funcnodesreactflowbody"},i&&o.show&&e.createElement(rT,null),e.createElement(eL,{...r}),i&&e.createElement($j,null)))))},nL={},rL={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5},library:{show:!0}},oL=e.createContext(Ys(rL)),iL=t=>{let n=T(t,{...rL,id:Eu()}).new_obj;if(!n.useWorkerManager&&void 0===n.worker)return e.createElement("div",null,"Error: If you don't use a worker manager, you must provide a default worker.");if(t.useWorkerManager&&void 0===t.workermanager_url)return e.createElement("div",null,"Error: If you use a worker manager, you must provide a worker manager url.");if(void 0===window.fnrf_zst&&(window.fnrf_zst=nL),void 0===nL[n.id]){const e=Ys(n);nL[n.id]=e}if(n.worker&&n.worker.set_zustand(nL[n.id]),nL[n.id].options.debug=n.debug,n.useWorkerManager){const e=new Iu(n.workermanager_url,nL[n.id]);nL[n.id].workermanager=e}return e.createElement(tL,{fnrf_zst:nL[n.id],header:n.header,library:n.library,flow:n.flow})},aL={set_io_value:({nid:t,ioid:n,value:r,set_default:o=!1})=>{const i=e.useContext(oL);i.worker?.set_io_value({nid:t,ioid:n,value:r,set_default:o})}};exports.FuncNodes=t=>{const n=new Xs("FuncNodes",t.debug?"debug":"info");n.debug("Initalizing FuncNodes with props:",t);let r=T(t,{...rL,id:Eu()}).new_obj;if(void 0===t.worker&&void 0!==t.worker_url&&(r.useWorkerManager=!1,r.worker=new Su({url:t.worker_url,uuid:r.id,on_sync_complete:t.on_sync_complete})),void 0!==r.worker){const e=Ys(r);r.worker.set_zustand(e)}if(void 0!==t.fnw_url){if(void 0===r.worker)throw new Error("defining fnw_url requires a worker to be defined");const e=async function(e,t=!0){try{const n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch from URL: ${n.status} ${n.statusText}`);const r=await n.blob();return await new Promise(((e,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;"string"!=typeof r&&(n("Failed to convert URL to Base64: No result from FileReader"),n(o.error)),e(t?r.split(",")[1]:r)},o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}catch(e){throw console.error("Error converting URL to Base64:",e),e}}(t.fnw_url),n=r.worker.on_sync_complete,o=async t=>{const r=await e;t.on_sync_complete=n,await t.update_from_export(r)};r.worker.on_sync_complete=o}return n.debug("Initalizing FuncnodesReactFlow with props:",r),e.createElement("div",{className:"App",style:{height:"100%",width:"100%"}},e.createElement(iL,{...r}))},exports.FuncNodesContext=oL,exports.FuncNodesReactFlowZustand=Ys,exports.FuncNodesWorker=ku,exports.ReactFlowLayer=eL,exports.RenderMappingProvider=kj,exports.WebSocketWorker=Su,exports.assert_full_node=j,exports.deep_update=T,exports.default=iL,exports.helperfunctions=aL;
|
|
145
|
+
*/var qB=function(){if(KB)return QB;KB=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return QB.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},QB.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},QB}(),ej=new Map,tj=function(e){return e.cloneNode(!0)},nj=function(){return"file:"===window.location.protocol},rj=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=qB.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(nj()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||nj()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},oj={},ij=function(e,t){oj[e]=oj[e]||[],oj[e].push(t)},aj=function(e,t,n){if(ej.has(e)){var r=ej.get(e);if(void 0===r)return void ij(e,n);if(r instanceof SVGSVGElement)return void n(null,tj(r))}ej.set(e,void 0),ij(e,n),rj(e,t,(function(t,n){var r;t?ej.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&ej.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(oj[e])){var n=ej.get(e),r=oj[e][t];n instanceof SVGSVGElement&&r(null,tj(n)),n instanceof Error&&r(n),t===oj[e].length-1&&delete oj[e]}}),0)},n=0,r=oj[e].length;n<r;n++)t(n)}(e)}))},sj=function(e,t,n){rj(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},lj=0,cj=[],uj={},dj="http://www.w3.org/1999/xlink",pj=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==cj.indexOf(e))return cj.splice(cj.indexOf(e),1),void(e=null);cj.push(e),e.setAttribute("src",""),(r?aj:sj)(s,o,(function(r,o){if(!o)return cj.splice(cj.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var p=Array.from(new Set(Id(Id(Id([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",p);var f=e.getAttribute("style");f&&o.setAttribute("style",f),o.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var m,g,y,b,v,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;b=g[e].id,v=b+"-"+ ++lj,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+v+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(dj,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(dj,"href","#"+v);g[e].id=v},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,C,E=o.querySelectorAll("script"),k=[],S=0,I=E.length;S<I;S++)(C=E[S].getAttribute("type"))&&"application/ecmascript"!==C&&"application/javascript"!==C&&"text/javascript"!==C||((x=E[S].innerText||E[S].textContent)&&k.push(x),o.removeChild(E[S]));if(k.length>0&&("always"===t||"once"===t&&!uj[s])){for(var _=0,A=k.length;_<A;_++)new Function(k[_])(window);uj[s]=!0}var N=o.querySelectorAll("style");if(Array.prototype.forEach.call(N,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",dj),i(o),!e.parentNode)return cj.splice(cj.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),cj.splice(cj.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},fj=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],hj="http://www.w3.org/2000/svg",mj="http://www.w3.org/1999/xlink",gj=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}yw(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof function(e){return((null==e?void 0:e.ownerDocument)||document).defaultView||window}(this.reactWrapper).Node){var t,n,r=this.props,o=r.desc,i=r.evalScripts,a=r.httpRequestWithCredentials,s=r.renumerateIRIElements,l=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,p=this.props.beforeInjection,f=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(hj,h)).setAttribute("xmlns",hj),t.setAttribute("xmlns:xlink",mj),n=document.createElementNS(hj,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);var m=function(t){e.removeSVG(),e._isMounted?e.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){d(t)})):d(t)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,p=void 0===d?"never":d,f=n.httpRequestWithCredentials,h=void 0!==f&&f,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,b=0,v=e.length;b<v;b++)pj(e[b],p,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?pj(e,p,g,u,h,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(n,{afterEach:function(t,n){t?m(t):e._isMounted&&e.setState((function(){return{isLoading:!1}}),(function(){try{f(n)}catch(e){m(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(c){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=c,e.prepend(i)}try{p(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:s})}},n.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(Sm({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var o=e.wrapper,i=mw(e,fj),a=o;return r.createElement(a,Sm({},i,{ref:this.refCallback},"svg"===o?{xmlns:hj,xmlnsXlink:mj}:{}),this.state.isLoading&&n&&r.createElement(n,null),this.state.hasError&&t&&r.createElement(t,null))},t}(r.Component);gj.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},gj.propTypes={afterInjection:$f.func,beforeInjection:$f.func,desc:$f.string,evalScripts:$f.oneOf(["always","once","never"]),fallback:$f.oneOfType([$f.func,$f.object,$f.string]),httpRequestWithCredentials:$f.bool,loading:$f.oneOfType([$f.func,$f.object,$f.string]),onError:$f.func,renumerateIRIElements:$f.bool,src:$f.string.isRequired,title:$f.string,useRequestCache:$f.bool,wrapper:$f.oneOf(["div","span","svg"])};const yj=({value:t,renderoptions:n})=>(void 0===n&&(n={}),void 0===n.format&&(n.format="jpeg"),e.createElement("img",{src:"data:image/"+n.format+";base64, "+t,style:{maxWidth:"100%",maxHeight:"100%"}})),bj=({value:t})=>e.createElement(gj,{src:`data:image/svg+xml;base64,${btoa(t)}`,style:{maxWidth:"100%",maxHeight:"100%"},beforeInjection:e=>{e.classList.add("svg-class-name"),e.setAttribute("style","max-width: 100%; max-height: 100%;"),e.setAttribute("width","100%"),e.setAttribute("height","100%")}}),vj=({io:t})=>{let n=t.fullvalue;if(null==n&&(n=t.value),void 0===n&&(n=""),"string"!=typeof n||n.length%4!=0)return e.createElement("div",null,n);const r=Math.round(3*n.length/4);return e.createElement("div",null,e.createElement("pre",null,"Bytes(",r,")"))},wj=({io:t})=>{let n=t.fullvalue;return void 0===n&&(n=t.value),void 0===n&&(n={}),e.createElement(UB,{data:n})},xj={float:({io:e,inputconverter:t})=>IB({io:e,inputconverter:t,parser:parseFloat}),int:({io:e,inputconverter:t})=>IB({io:e,inputconverter:t,parser:parseInt}),bool:({io:t,inputconverter:n})=>{const r=e.useContext(oL),o=void 0===t.value,i=e.useRef(null);e.useEffect((()=>{i.current&&(i.current.indeterminate=o)}),[i,o]);return e.createElement("input",{ref:i,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!n[1](t.value),onChange:e=>{let o=e.target.checked;try{o=n[0](e.target.checked)}catch(e){}r.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},disabled:t.connected})},string:_B,str:_B,color:({io:t})=>{const n=e.useContext(oL),r=t.value_options?.colorspace||"hex";let o=!1;return"string"!=typeof t.type&&"anyOf"in t.type&&void 0!==t.type.anyOf&&(o=t.type.anyOf.some((e=>"None"===e))),e.createElement(IM,{onChange:e=>{let o="<NoValue>";e&&(o=e[r]?e[r]():e.hex()),null===e&&(o=null),n.worker?.set_io_value({nid:t.node,ioid:t.id,value:o,set_default:t.render_options.set_default})},inicolordata:t.value,allow_null:o,inicolorspace:r})},select:TB,enum:TB,bytes:vj},Cj={Inputrenderer:xj,Outputrenderer:{},HandlePreviewRenderer:{bytes:vj},DataOverlayRenderer:{},DataPreviewViewRenderer:{string:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),n=void 0===n?"":JSON.stringify(t.value).replace(/\\n/g,"\n"),e.createElement("div",null,e.createElement("pre",null,n))},table:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=[]),e.createElement(JB,{tabledata:n})},image:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=""),e.createElement(yj,{value:n})},svg:({io:t})=>{let n=t.fullvalue;return null==n&&(n=t.value),void 0===n&&(n=""),e.createElement(bj,{value:n})},dict:wj,bytes:vj},DataViewRenderer:{},InLineRenderer:{bytes:({io:e})=>{let t=e.fullvalue;null==t&&(t=e.value),t=void 0===t?"":JSON.stringify(e.value).replace(/\\n/g,"\n");return`Bytes(${Math.round(3*t.length/4)})`}}},Ej=(e,t)=>{const n=t.options||{},r=void 0===n.overwrite||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_FROM_PLUGIN":let n=!1;const o=[[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]];for(const[e,t]of o){if(Object.keys(e).length>0)if(r)n=!0;else for(const r in e)if(!t[r]){n=!0;break}if(n)break}if(!n)return e;for(const[e,t]of o)for(const n in e)!r&&t[n]||(t[n]=e[n]);return{...e};default:return e}},kj=({children:t,plugins:n,fnrf_zst:r})=>{const[o,i]=e.useReducer(Ej,Cj),a=(e,t)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return e.useEffect((()=>{for(const t in n){const o=n[t].RendererPlugin;o&&a(o);const i=n[t].renderpluginfactory;i&&a(i({React:e,fnrf_zst:r}))}}),[n]),e.createElement(Sj.Provider,{value:{Inputrenderer:o.Inputrenderer,Outputrenderer:o.Outputrenderer,HandlePreviewRenderer:o.HandlePreviewRenderer,DataOverlayRenderer:o.DataOverlayRenderer,DataPreviewViewRenderer:o.DataPreviewViewRenderer,DataViewRenderer:o.DataViewRenderer,InLineRenderer:o.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendFromPlugin:a}},t)},Sj=e.createContext({Inputrenderer:Cj.Inputrenderer,Outputrenderer:Cj.Outputrenderer,HandlePreviewRenderer:Cj.HandlePreviewRenderer,DataOverlayRenderer:Cj.DataOverlayRenderer,DataPreviewViewRenderer:Cj.DataPreviewViewRenderer,DataViewRenderer:Cj.DataViewRenderer,InLineRenderer:Cj.InLineRenderer,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),Ij=({component:t,...n})=>e.createElement(t,{...n}),_j=t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{});if(!r)return wj;const{DataOverlayRenderer:o,DataPreviewViewRenderer:i}=e.useContext(Sj);return o[r]?o[r]:i[r]?i[r]:wj},Aj=(e,t)=>{if("string"==typeof e)return e in t?[t[e],e]:[e,e];if("allOf"in e&&void 0!==e.allOf)return[void 0,void 0];if("anyOf"in e&&void 0!==e.anyOf){const n=e.anyOf.map((e=>Aj(e,t)));for(const e of n)switch(e[0]){case"bool":return["bool",e[1]];case"enum":return["enum",e[1]];case"float":return["float",e[1]];case"int":return["int",e[1]];case"string":case"str":return["string",e[1]]}return[void 0,void 0]}return"type"in e&&void 0!==e.type&&"enum"===e.type?["enum","enum"]:[void 0,void 0]},Nj=({io:t,typestring:n,preview:r,...o})=>{const[i,a]=e.useState(!1),[s,l]=e.useState(!1),[c,u]=t?(t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),{HandlePreviewRenderer:o,DataPreviewViewRenderer:i}=e.useContext(Sj),a=_j(t);return r?o[r]?[o[r],a]:i[r]?[i[r],a]:[wj,a]:[wj,a]})(t):[void 0,void 0];return e.createElement(DT,null,e.createElement(BT,{open:i||s,onOpenChange:l},e.createElement(jT,{asChild:!0},e.createElement(si,{id:t.id,...o})),e.createElement(LT,null,e.createElement(FT,{className:"iotooltipcontent",sideOffset:5},e.createElement("div",{className:"iotooltip_container"},e.createElement("div",{className:"iotooltip_header"},i?e.createElement(Pv,{onClick:()=>a(!1)}):e.createElement(Mv,{onClick:()=>a(!0)}),u&&e.createElement($w,{title:t.full_id,trigger:e.createElement(Dv,null),onOpenChange:e=>{e&&t.try_get_full_value&&t.try_get_full_value(),a(e)}},e.createElement(Ij,{component:u,io:t}))),c?e.createElement(Ij,{component:c,io:t}):`no preview available for "${n}"`),e.createElement(VT,{className:"iotooltipcontentarrow"})))))},Rj={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>"string"==typeof e?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch(t){try{return JSON.parse("["+e+"]")}catch(e){}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},Oj=({io:t})=>{const n=e.useContext(oL).render_options(),[r,o]=Aj(t.render_options.type,n.typemap||{}),{Inputrenderer:i}=e.useContext(Sj),a=r?t.value_options?.options?TB:i[r]:void 0,s=Rj[(o&&n.inputconverter?.[o])??""];return e.createElement("div",{className:"nodeinput"},e.createElement(Nj,{io:t,typestring:r,position:Eo.Left,type:"target"}),a&&e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(a,{io:t,inputconverter:s})),e.createElement("div",{className:"ioname"},t.name),e.createElement(Nj,{io:t,typestring:r,position:Eo.Right,type:"source"}))},Tj=({io:t,typestring:n})=>{const{InLineRenderer:r}=e.useContext(Sj);if(n&&r[n])return e.createElement("div",null,r[n]({io:t}));let o=t.fullvalue;return null==o&&(o=t.value),o=void 0===o?"":JSON.stringify(o).replace(/\\n/g,"\n"),o.length>63&&(o=o.slice(0,60)+"..."),e.createElement("div",null,o)},Mj=({io:t})=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),{Outputrenderer:o}=e.useContext(Sj),i=r?o[r]:void 0;return e.createElement("div",{className:"nodeoutput"},e.createElement(Nj,{io:t,typestring:r,position:Eo.Right,type:"source"}),e.createElement("div",{className:"ioname"},t.name),i?e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(i,{io:t})):e.createElement("div",{className:"iovaluefield"},e.createElement(Tj,{io:t,typestring:r})))};function Pj(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function Dj(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 Bj=({state:t,className:n="reacttqdm",...r})=>{const o=e.useRef(null),i=e.useRef(null);e.useEffect((()=>{const e=()=>{o.current&&i.current&&function(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:i=.9}=n;if(!e||!t)return;if(i>=1||i<=0)throw new Error("decrementFactor must be between 0 and 1");const a=e.getBoundingClientRect(),s=a.width,l=a.height;let c=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=c+"px";let u=t.getBoundingClientRect();for(;(u.width>s||u.height>l)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(o.current,i.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]);const a=t.total?t.n/t.total*100:0;return e.createElement("div",{ref:o,className:n,...r},e.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},e.createElement("div",{className:n+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},e.createElement("div",{className:n+"-progress",style:{width:`${a}%`,height:"100%"}})),e.createElement("div",{className:n+"-text",ref:i},function(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n:n,unit_scale:r,elapsed:o,unit:i,unit_divisor:a,prefix:s="",rate:l,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,p=t,f=l;r&&!0!==r&&1!==r&&(null!==t&&(p=t*r),d=n*r,void 0!==l&&(f=l*r));const h=Pj(o);void 0===f&&o>0&&(f=(d-u)/o);const m=f?1/f:void 0,[g,y]=f?Dj(f,a):[void 0,""],[b,v]=m?Dj(m,1e3):[void 0,""],w=m&&m>1?b?`${b}${v}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?Dj(d,a).join(""):d.toString(),C=r&&null!==p?Dj(p,a).join(""):p?.toString()??"?",E=f?Pj(f&&null!==p?(p-d)/f:0):"?",k=s?`${s}: `:"";if(null!==t){const e=` ${x}/${C} [${h} < ${E}, ${w}${c??""}]`;return`${k}${(d/t*100).toFixed(0)}%${e}`}return`${k}${x}${i} [${h}, ${w}${c??""}]`}(t))))},jj=({node_data:t})=>{const n=e.useContext(oL);return e.createElement("div",{className:"nodeheader",title:t.description||t.node_name},e.createElement("div",{className:"nodeheader_element"},e.createElement(Lv,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{n.on_node_action({type:"trigger",from_remote:!1,id:t.id})}}),e.createElement(jv,{fontSize:"inherit",onClick:async()=>{n.logger.info("nodestatus",await(n.worker?.get_node_status(t.id)))}})),e.createElement("div",{className:"nodeheader_element nodeheader_title"},e.createElement("div",{className:"nodeheader_title_text"},t.node_name)),e.createElement("div",{className:"nodeheader_element"},e.createElement(Bv,{fontSize:"inherit"})))},Lj=({node_data:t})=>{const n=t.render_options?.data?.src?t.io[t.render_options?.data?.src]:void 0,[r,o]=n?(t=>{const n=e.useContext(oL).render_options(),[r]=Aj(t.type,n.typemap||{}),o=_j(t),{DataPreviewViewRenderer:i,DataViewRenderer:a}=e.useContext(Sj);return r?a[r]?[a[r],o]:i[r]?[i[r],o]:[wj,o]:[wj,o]})(n):[void 0,void 0];return e.createElement("div",{className:"nodrag nodedatabody"},r&&n&&e.createElement($w,{title:n.full_id,trigger:e.createElement("div",null,e.createElement(Ij,{component:r,io:n})),onOpenChange:e=>{e&&n?.try_get_full_value&&n?.try_get_full_value()}},e.createElement(Ij,{component:o,io:n})))},Fj=({node_data:t})=>{const n=Object.values(t.io).filter((e=>e.is_input)),r=Object.values(t.io).filter((e=>!e.is_input));return t.render_options,e.createElement("div",{className:"nodebody"},r.map((t=>t.hidden?null:e.createElement(Mj,{key:t.id,io:t}))),e.createElement(Lj,{node_data:t}),n.map((t=>t.hidden?null:e.createElement(Oj,{key:t.id,io:t}))))},Vj=({node_data:t})=>{const[n,r]=e.useState(t.name);e.useEffect((()=>{r(t.name)}),[t]);const o=e.useContext(oL);return e.createElement("input",{className:"nodename_input",value:n,onChange:e=>{r(e.target.value)},onBlur:e=>{const n=e.target.value;o.on_node_action({type:"update",from_remote:!1,id:t.id,node:{name:n}})}})},zj=({node_data:t})=>t.progress?e.createElement(Bj,{style:{height:"idle"===t.progress.prefix?"0px":void 0},state:t.progress,className:"nodeprogress"}):null,Gj=({node_data:t})=>e.createElement("div",{className:"nodefooter"},t.error&&e.createElement("div",{className:"nodeerror"},t.error),e.createElement(zj,{node_data:t})),Wj=({io:t})=>{const n=e.useContext(oL).render_options(),[r,o]=Aj(t.render_options.type,n.typemap||{}),{Inputrenderer:i}=e.useContext(Sj),a=r?t.value_options?.options?TB:i[r]:void 0,s=Rj[(o&&n.inputconverter?.[o])??""];return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,t.name),a&&e.createElement(a,{io:t,inputconverter:s}),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:e=>{t.set_hidden?.(e.target.checked)},checked:t.hidden}))))},Hj=({io:t})=>e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,t.name),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:t.connected,onChange:e=>{t.set_hidden?.(e.target.checked)},checked:t.hidden})))),Xj=({nodestore:t})=>{const n=t(),r=Object.values(n.io).filter((e=>e.is_input)),o=Object.values(n.io).filter((e=>!e.is_input));return e.createElement("div",null,e.createElement("div",{className:"nodesettings_section"},e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,"Name"),e.createElement("div",null,e.createElement(Vj,{node_data:n})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Inputs"),r.map((t=>e.createElement(Wj,{io:t,key:t.id})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Outputs"),o.map((t=>e.createElement(Hj,{io:t,key:t.id})))))},Zj=()=>{const t=e.useContext(oL),n=t.local_state((e=>e.selected_nodes));if(0===n.length)return e.createElement("div",null,"Node Settings");if(n.length>1)return e.createElement("div",null,"Multiple Nodes Selected");const r=t.nodespace.get_node(n[0]);return r?e.createElement(Xj,{nodestore:r}):e.createElement("div",null,"Node not found")},$j=()=>{const t=e.useContext(oL),n=t.local_settings((e=>e.view_settings.expand_node_props)),r=t.local_settings((e=>e.update_view_settings)),o=e=>{r({expand_node_props:e})};return e.createElement("div",{className:"nodesettings_container"},e.createElement("div",{className:"nodesettings_expander"},n?e.createElement(Tv,{onClick:()=>{o(!1)}}):e.createElement(Fv,{onClick:()=>{o(!0)}})),e.createElement("div",{className:"nodesettings_content "+(n?"expanded":"collapsed")},n&&e.createElement(Zj,null)))},Yj=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),Uj={default:({data:t})=>{const n=t.UseNodeStore(),r=n.frontend.collapsed||!1,[o,i]=e.useState(!1);return e.useEffect((()=>{let e;return n.in_trigger?i(!0):o&&(e=setTimeout((()=>i(!1)),200)),()=>clearTimeout(e)}),[n.in_trigger,o]),e.createElement(e.Fragment,null,e.createElement("div",{className:"innernode"+(o?" intrigger":"")+(n.error?" error":"")},e.createElement(jj,{node_data:n}),e.createElement(Vj,{node_data:n}),r?null:e.createElement(Fj,{node_data:n}),e.createElement(Gj,{node_data:n})))}},Jj={default:({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:a,targetPosition:s,data:l,...c})=>{const[u]=Bo({sourceX:n,sourceY:r,sourcePosition:a,targetX:o,targetY:i,targetPosition:s});return e.createElement(e.Fragment,null,e.createElement(ho,{id:t,path:u,...c}))}},Kj=()=>{const t=Xi();return e.useContext(oL).rf_instance=t,e.createElement(e.Fragment,null)},Qj=()=>{const t=e.useContext(oL),n=Ti("Delete"),r=Gr(ws,X),o=Gr(vs,X);if(n){for(const n of r)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);if(!n.source||!n.target)return e.createElement(e.Fragment,null);if(!n.sourceHandle||!n.targetHandle)return e.createElement(e.Fragment,null);t.worker.remove_edge({src_nid:n.source,src_ioid:n.sourceHandle,trg_nid:n.target,trg_ioid:n.targetHandle})}for(const n of o)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);t.worker.remove_node(n.id)}}return e.createElement(e.Fragment,null)},qj=({id:t,top:n,left:r,right:o,bottom:i,...a})=>{const{getNode:s,setNodes:l,addNodes:c,setEdges:u}=Xi(),d=e.useContext(oL),p=e.useCallback((()=>{const e=s(t);if(!e)return;const n={x:e.position.x+50,y:e.position.y+50};c({...e,id:`${e.id}-copy`,position:n})}),[t,s,c]),f=e.useCallback((()=>{d.on_node_action({type:"delete",id:t,from_remote:!1})}),[t,l,u]),h=d.nodespace.get_node(t,!1);if(!h)return e.createElement(e.Fragment,null," ");const m=h();return e.createElement("div",{style:{top:n,left:r,right:o,bottom:i},className:"context-menu",...a},e.createElement("p",{style:{fontWeight:"bold"}},e.createElement("small",null,m.name)),e.createElement("button",{onClick:p},"duplicate"),e.createElement("button",{onClick:f},"delete"))},eL=t=>{const n=e.useContext(oL),r=e.useRef(null);e.useEffect((()=>{n.reactflowRef=r.current}),[r]);const[o,i]=e.useState(null),a=e.useCallback((()=>i(null)),[i]),{nodes:s,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d}=n.useReactFlowStore(iT(Yj));return e.createElement("div",{className:"reactflowlayer"},e.createElement(bs,{nodes:s,edges:l,onNodesChange:c,onEdgesChange:u,onConnect:d,nodeTypes:Uj,edgeTypes:Jj,minZoom:t.minZoom,maxZoom:t.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:t})=>{const r=n.local_state.getState();n.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:t.map((e=>e.id))})},ref:r,onPaneClick:a,panOnDrag:!t.static},e.createElement(Kj,null),e.createElement(Qj,null),e.createElement(js,{color:"#888",gap:16,size:1}),t.minimap&&e.createElement(Rs,{nodeStrokeWidth:3,pannable:!t.static,zoomable:!t.static,zoomStep:3}),o&&e.createElement(qj,{onClick:a,...o})))},tL=({fnrf_zst:t,header:n,flow:r,library:o})=>{const[i,a]=e.useState(t.options.worker);t.workermanager&&(t.workermanager.on_setWorker=a),t.set_worker(i),t.auto_progress();const s=t.plugins();return e.createElement(kj,{plugins:s,fnrf_zst:t},e.createElement(oL.Provider,{value:t},e.createElement("div",{className:"funcnodesreactflowcontainer funcnodescontainer"},n.show&&e.createElement(wS,{...n}),e.createElement("div",{className:"funcnodesreactflowbody"},i&&o.show&&e.createElement(rT,null),e.createElement(eL,{...r}),i&&e.createElement($j,null)))))},nL={},rL={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5},library:{show:!0}},oL=e.createContext(Ys(rL)),iL=t=>{let n=T(t,{...rL,id:Eu()}).new_obj;if(!n.useWorkerManager&&void 0===n.worker)return e.createElement("div",null,"Error: If you don't use a worker manager, you must provide a default worker.");if(t.useWorkerManager&&void 0===t.workermanager_url)return e.createElement("div",null,"Error: If you use a worker manager, you must provide a worker manager url.");if(void 0===window.fnrf_zst&&(window.fnrf_zst=nL),void 0===nL[n.id]){const e=Ys(n);nL[n.id]=e}if(n.worker&&n.worker.set_zustand(nL[n.id]),nL[n.id].options.debug=n.debug,n.useWorkerManager){const e=new Iu(n.workermanager_url,nL[n.id]);nL[n.id].workermanager=e}return e.createElement(tL,{fnrf_zst:nL[n.id],header:n.header,library:n.library,flow:n.flow})},aL={set_io_value:({nid:t,ioid:n,value:r,set_default:o=!1})=>{const i=e.useContext(oL);i.worker?.set_io_value({nid:t,ioid:n,value:r,set_default:o})}};exports.FuncNodesContext=oL,exports.FuncNodesReactFlowZustand=Ys,exports.FuncNodesWorker=ku,exports.FuncnodesReactFlow=iL,exports.ReactFlowLayer=eL,exports.RenderMappingProvider=kj,exports.WebSocketWorker=Su,exports.assert_full_node=j,exports.deep_update=T,exports.default=t=>{const n=new Xs("FuncNodes",t.debug?"debug":"info");n.debug("Initalizing FuncNodes with props:",t);let r=T(t,{...rL,id:Eu()}).new_obj;if(void 0===t.worker&&void 0!==t.worker_url&&(r.useWorkerManager=!1,r.worker=new Su({url:t.worker_url,uuid:r.id,on_sync_complete:t.on_sync_complete})),void 0!==r.worker){const e=Ys(r);r.worker.set_zustand(e)}if(void 0!==t.fnw_url){if(void 0===r.worker)throw new Error("defining fnw_url requires a worker to be defined");const e=async function(e,t=!0){try{const n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch from URL: ${n.status} ${n.statusText}`);const r=await n.blob();return await new Promise(((e,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;"string"!=typeof r&&(n("Failed to convert URL to Base64: No result from FileReader"),n(o.error)),e(t?r.split(",")[1]:r)},o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}catch(e){throw console.error("Error converting URL to Base64:",e),e}}(t.fnw_url),n=r.worker.on_sync_complete,o=async t=>{const r=await e;t.on_sync_complete=n,await t.update_from_export(r)};r.worker.on_sync_complete=o}return n.debug("Initalizing FuncnodesReactFlow with props:",r),e.createElement("div",{className:"App",style:{height:"100%",width:"100%"}},e.createElement(iL,{...r}))},exports.helperfunctions=aL;
|
|
146
146
|
//# sourceMappingURL=index.umd.js.map
|