2&&void 0!==arguments[2]?arguments[2]:1;rp(n<=Pg,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=function(e){var t=Ng.exec(e);if(!t)return[,];var n=(0,v.Z)(t,3);return[n[1],n[2]]}(e),o=(0,v.Z)(r,2),a=o[0],i=o[1];if(a){var s=window.getComputedStyle(t).getPropertyValue(a);if(s){var u=s.trim();return em(u)?parseFloat(u):u}return vf(i)?Ag(i,t,n+1):i}}var jg=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rg=function(e){return jg.has(e)},Dg=function(e){return e===bf||e===Nf},Fg=function(e,t){return parseFloat(e.split(", ")[t])},Lg=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var a=o.match(/^matrix3d\((.+)\)$/);if(a)return Fg(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?Fg(i[1],e):0}},Mg=new Set(["x","y","z"]),Bg=uf.filter((function(e){return!Mg.has(e)}));var zg={width:function(e,t){var n=e.x,r=t.paddingLeft,o=void 0===r?"0":r,a=t.paddingRight,i=void 0===a?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:function(e,t){var n=e.y,r=t.paddingTop,o=void 0===r?"0":r,a=t.paddingBottom,i=void 0===a?"0":a;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Lg(4,13),y:Lg(5,14)};zg.translateX=zg.x,zg.translateY=zg.y;var Zg=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=f({},t),r=f({},r);var o=Object.keys(t).filter(Rg),a=[],i=!1,s=[];if(o.forEach((function(o){var u=e.getValue(o);if(e.hasValue(o)){var l,c=n[o],f=lm(c),d=t[o];if(ud(d)){var p=d.length,h=null===d[0]?1:0;c=d[h],f=lm(c);for(var m=h;m=0?window.pageYOffset:null,l=function(e,t,n){var r=t.measureViewportBox(),o=t.current,a=getComputedStyle(o),i=a.display,s={};"none"===i&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=zg[e](r,a)})),t.render();var u=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);r&&r.jump(s[n]),e[n]=zg[n](u,a)})),e}(t,e,s);return a.length&&a.forEach((function(t){var n=(0,v.Z)(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.render(),Fc&&null!==u&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}};function Ug(e,t,n,r){return function(e){return Object.keys(e).some(Rg)}(t)?Zg(e,t,n,r):{target:t,transitionEnd:r}}var Vg=function(e,t,n,r){var o=function(e,t,n){var r=Object.assign({},(Ig(t),t)),o=e.current;if(!(o instanceof Element))return{target:r,transitionEnd:n};for(var a in n&&(n=f({},n)),e.values.forEach((function(e){var t=e.get();if(vf(t)){var n=Ag(t,o);n&&e.set(n)}})),r){var i=r[a];if(vf(i)){var s=Ag(i,o);s&&(r[a]=s,n||(n={}),void 0===n[a]&&(n[a]=i))}}return{target:r,transitionEnd:n}}(e,t,r);return Ug(e,t=o.target,n,r=o.transitionEnd)},qg={current:null},Hg={current:!1};var Wg=new WeakMap,Jg=["willChange"],Gg=["children"],Yg=Object.keys(Yc),Xg=Yg.length,$g=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Kg=Vc.length,Qg=function(){function e(t){var n=this,r=t.parent,o=t.props,a=t.presenceContext,i=t.reducedMotionConfig,s=t.visualState,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Vr.Z)(this,e),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=function(){return n.notify("Update",n.latestValues)},this.render=function(){n.current&&(n.triggerBuild(),n.renderInstance(n.current,n.renderState,n.props.style,n.projection))},this.scheduleRender=function(){return bd.render(n.render,!1,!0)};var c=s.latestValues,d=s.renderState;this.latestValues=c,this.baseTarget=f({},c),this.initialValues=o.initial?f({},c):{},this.renderState=d,this.parent=r,this.props=o,this.presenceContext=a,this.depth=r?r.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.isControllingVariants=qc(o),this.isVariantNode=Hc(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(r&&r.current);var p=this.scrapeMotionValuesFromProps(o,{}),h=p.willChange,m=u(p,Jg);for(var v in m){var g=m[v];void 0!==c[v]&&ff(g)&&(g.set(c[v],!1),Qh(h)&&h.add(v))}}return(0,qr.Z)(e,[{key:"scrapeMotionValuesFromProps",value:function(e,t){return{}}},{key:"mount",value:function(e){var t=this;this.current=e,Wg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((function(e,n){return t.bindToMotionValue(n,e)})),Hg.current||function(){if(Hg.current=!0,Fc)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return qg.current=e.matches};e.addListener(t),t()}else qg.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||qg.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}},{key:"unmount",value:function(){for(var e in Wg.delete(this.current),this.projection&&this.projection.unmount(),kd(this.notifyUpdate),kd(this.render),this.valueSubscriptions.forEach((function(e){return e()})),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(var t in this.features)this.features[t].unmount();this.current=null}},{key:"bindToMotionValue",value:function(e,t){var n=this,r=lf.has(e),o=t.on("change",(function(t){n.latestValues[e]=t,n.props.onUpdate&&bd.update(n.notifyUpdate,!1,!0),r&&n.projection&&(n.projection.isTransformDirty=!0)})),a=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(function(){o(),a()}))}},{key:"sortNodePosition",value:function(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}},{key:"loadFeatures",value:function(e,t,n,r){for(var o,a,i=this,s=(e.children,u(e,Gg)),l=0;l1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(e,this.props,t)}},{key:"update",value:function(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(var n=0;n<$g.length;n++){var r=$g[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);var o=e["on"+r];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=function(e,t,n){var r=t.willChange;for(var o in t){var a=t[o],i=n[o];if(ff(a))e.addValue(o,a),Qh(r)&&r.add(o);else if(ff(i))e.addValue(o,im(a,{owner:e})),Qh(r)&&r.remove(o);else if(i!==a)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(a)}else{var u=e.getStaticValue(o);e.addValue(o,im(void 0!==u?u:a,{owner:e}))}}for(var l in n)void 0===t[l]&&e.removeValue(l);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}},{key:"getProps",value:function(){return this.props}},{key:"getVariant",value:function(e){return this.props.variants?this.props.variants[e]:void 0}},{key:"getDefaultTransition",value:function(){return this.props.transition}},{key:"getTransformPagePoint",value:function(){return this.props.transformPagePoint}},{key:"getClosestVariantNode",value:function(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}},{key:"getVariantContext",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){var e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}for(var t={},n=0;n1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=(0,y.Z)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;a in r&&delete r[a]}}catch(i){o.e(i)}finally{o.f()}return r}(I,["role","id"]):I,P=function(e,t){var n,r={},o=(0,y.Z)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;a in e&&(r[a]=e[a])}}catch(i){o.e(i)}finally{o.f()}return r}(I,["role","id"]);return c?(0,gr.jsxs)(gr.Fragment,{children:[E,(0,gr.jsx)(my,{children:C.isOpen&&(0,gr.jsx)(Ac,f(f({},v),{},{children:(0,gr.jsx)(vr.div,f(f({},C.getTooltipPositionerProps()),{},{__css:{zIndex:a.zIndex,pointerEvents:"none"},children:(0,gr.jsxs)(gy,f(f(f({variants:yu,initial:"exit",animate:"enter",exit:"exit"},w),N),{},{__css:a,children:[c,O&&(0,gr.jsx)(vr.span,f(f({srOnly:!0},P),{},{children:p})),h&&(0,gr.jsx)(vr.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,gr.jsx)(vr.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:a.bg}})})]}))}))}))})]}):(0,gr.jsx)(gr.Fragment,{children:l})}));yy.displayName="Tooltip";var by=["as","viewBox","color","focusable","children","className","__css"],ky={path:(0,gr.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,gr.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,gr.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,gr.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},wy=g((function(e,t){var n=e.as,r=e.viewBox,o=e.color,a=void 0===o?"currentColor":o,i=e.focusable,s=void 0!==i&&i,l=e.children,c=e.className,d=e.__css,p=u(e,by),h=T("chakra-icon",c),m=jr("Icon",e),v={ref:t,focusable:s,className:h,__css:f(f({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},d),m)},g=null!=r?r:ky.viewBox;if(n&&"string"!==typeof n)return(0,gr.jsx)(vr.svg,f(f({as:n},v),p));var y=null!=l?l:ky.path;return(0,gr.jsx)(vr.svg,f(f(f({verticalAlign:"middle",viewBox:g},v),p),{},{children:y}))}));wy.displayName="Icon";function xy(e){var t=e.viewBox,n=void 0===t?"0 0 24 24":t,o=e.d,a=e.displayName,i=e.defaultProps,s=void 0===i?{}:i,u=r.Children.toArray(e.path),l=g((function(e,t){return(0,gr.jsx)(wy,f(f(f({ref:t,viewBox:n},s),e),{},{children:u.length?u:(0,gr.jsx)("path",{fill:"currentColor",d:o})}))}));return l.displayName=a,l}var Sy=xy({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"}),Ty=xy({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"}),Ey=n(6854),Cy=(Ey.domToReact,Ey.htmlToDOM,Ey.attributesToProps,Ey.Comment,Ey.Element,Ey.ProcessingInstruction,Ey.Text,Ey);function _y(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}var Oy=_y({onlyFirst:!0});var Iy=_y();function Ny(e){if("string"!==typeof e)throw new TypeError("Expected a `string`, got `".concat(typeof e,"`"));return e.replace(Iy,"")}var Py=n(6998),Ay=["timeout"];function jy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,r.useState)(!1),o=(0,v.Z)(n,2),a=o[0],i=o[1],s=(0,r.useState)(e),l=(0,v.Z)(s,2),c=l[0],f=l[1];(0,r.useEffect)((function(){return f(e)}),[e]);var d="number"===typeof t?{timeout:t}:t,p=d.timeout,h=void 0===p?1500:p,m=u(d,Ay),g=(0,r.useCallback)((function(){var e=Py(c,m);i(e)}),[c,m]);return(0,r.useEffect)((function(){var e=null;return a&&(e=window.setTimeout((function(){i(!1)}),h)),function(){e&&window.clearTimeout(e)}}),[h,a]),{value:c,setValue:f,onCopy:g,hasCopied:a}}var Ry,Dy=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.elementName?n.elementName:"a",o=n.fileType?n.fileType:"text/plain";console.log(t,o,r);var a=new Blob([e],{type:o}),i=document.createElement(r);i.download=t,i.innerHTML="Download File",window.webkitURL?i.href=window.webkitURL.createObjectURL(a):(i.href=window.URL.createObjectURL(a),i.onclick=function(e){e.target&&document.body.removeChild(e.target)},i.style.display="none",document.body.appendChild(i)),i.click(),window.webkitURL?window.webkitURL.revokeObjectURL(i.href):window.URL.revokeObjectURL(i.href)},Fy=["children"],Ly=["behavior","align"],My=["done","behavior","align","calculateViewLocation"],By=["listState","topItemsIndexes"],zy=["style","children"],Zy=["style","children"],Uy=0,Vy=1,qy=2,Hy=4;function Wy(e,t){return function(n){return e(t(n))}}function Jy(e,t){return t(e)}function Gy(e,t){return function(n){return e(t,n)}}function Yy(e,t){return function(){return e(t)}}function Xy(e,t){return t(e),e}function $y(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&e.splice(t,1)};case Uy:return void e.slice().forEach((function(e){e(n)}));default:throw new Error("unrecognized action ".concat(t))}}}function cb(e){var t=e,n=lb();return function(e,r){switch(e){case Vy:r(t);break;case Uy:t=r;break;case Hy:return t}return n(e,r)}}function fb(e){return Xy(lb(),(function(t){return sb(e,t)}))}function db(e,t){return Xy(cb(t),(function(t){return sb(e,t)}))}function pb(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:mb;return function(n){return function(r){t(e,r)||(e=r,n(r))}}}function gb(e){return function(t){return function(n){e(n)&&t(n)}}}function yb(e){return function(t){return Wy(t,e)}}function bb(e){return function(t){return function(){return t(e)}}}function kb(e,t){return function(n){return function(r){return n(t=e(t,r))}}}function wb(e){return function(t){return function(n){e>0?e--:t(n)}}}function xb(e){var t,n=null;return function(r){return function(o){n=o,t||(t=setTimeout((function(){t=void 0,r(n)}),e))}}}function Sb(e){var t,n;return function(r){return function(o){t=o,n&&clearTimeout(n),n=setTimeout((function(){r(t)}),e)}}}function Tb(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:mb))}function _b(){for(var e=lb(),t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:[],n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{singleton:!0}).singleton;return{id:Ib(),constructor:e,dependencies:t,singleton:n}}var Ib=function(){return Symbol()};var Nb="undefined"!==typeof document?r.useLayoutEffect:r.useEffect;function Pb(e,t,n){var o=Object.keys(t.required||{}),a=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),l=r.createContext({});function c(e,n){e.propsReady&&ob(e.propsReady,!1);for(var r=0,i=o;r2&&void 0!==arguments[2]?arguments[2]:1;o>=(null!=(r=("undefined"===typeof globalThis?window:globalThis).VIRTUOSO_LOG_LEVEL)?r:ib(e))&&console[Rb[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}));return{log:t,logLevel:e}}),[],{singleton:!0});function Fb(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=r.useRef(null),o=function(e){};if("undefined"!==typeof ResizeObserver){var a=r.useMemo((function(){return new ResizeObserver((function(t){var n=t[0].target;null!==n.offsetParent&&e(n)}))}),[e]);o=function(e){e&&t?(a.observe(e),n.current=e):(n.current&&a.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:o}}function Lb(e){return Fb(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]).callbackRef}function Mb(e,t,n,o,a,i,s){var u=r.useCallback((function(n){for(var r=function(e,t,n,r){var o=e.length;if(0===o)return null;for(var a=[],i=0;i3&&void 0!==arguments[3]?arguments[3]:nb,a=arguments.length>4?arguments[4]:void 0,i=r.useRef(null),s=r.useRef(null),u=r.useRef(null),l=r.useCallback((function(n){var r=n.target,o=r===window||r===document,a=o?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,i=o?document.documentElement.scrollHeight:r.scrollHeight,l=o?window.innerHeight:r.offsetHeight,c=function(){e({scrollTop:Math.max(a,0),scrollHeight:i,viewportHeight:l})};n.suppressFlushSync?c():xc.flushSync(c),null!==s.current&&(a===s.current||a<=0||a===i-l)&&(s.current=null,t(!0),u.current&&(clearTimeout(u.current),u.current=null))}),[e,t]);return r.useEffect((function(){var e=a||i.current;return o(a||i.current),l({target:e,suppressFlushSync:!0}),e.addEventListener("scroll",l,{passive:!0}),function(){o(null),e.removeEventListener("scroll",l)}}),[i,l,n,o,a]),{scrollerRef:i,scrollByCallback:function(e){i.current.scrollBy(e)},scrollToCallback:function(n){var r=i.current;if(r&&(!("offsetHeight"in r)||0!==r.offsetHeight)){var o,a,l,c="smooth"===n.behavior;r===window?(a=Math.max(Bb(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,l=document.documentElement.scrollTop):(a=r.scrollHeight,o=Bb(r,"height"),l=r.scrollTop);var f=a-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),zb(o,a)||n.top===l)return e({scrollTop:l,scrollHeight:a,viewportHeight:o}),void(c&&t(!0));c?(s.current=n.top,u.current&&clearTimeout(u.current),u.current=setTimeout((function(){u.current=null,s.current=null,t(!0)}),1e3)):s.current=null,r.scrollTo(n)}}}}var Ub=Ob((function(){var e=lb(),t=lb(),n=cb(0),r=lb(),o=cb(0),a=lb(),i=lb(),s=cb(0),u=cb(0),l=cb(0),c=cb(0),f=lb(),d=lb(),p=cb(!1);return sb(hb(e,yb((function(e){return e.scrollTop}))),t),sb(hb(e,yb((function(e){return e.scrollHeight}))),i),sb(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:a,headerHeight:s,fixedHeaderHeight:u,fixedFooterHeight:l,footerHeight:c,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:p}}),[],{singleton:!0}),Vb={lvl:0};function qb(e,t,n){return{k:e,v:t,lvl:n,l:arguments.length>3&&void 0!==arguments[3]?arguments[3]:Vb,r:arguments.length>4&&void 0!==arguments[4]?arguments[4]:Vb}}function Hb(e){return e===Vb}function Wb(){return Vb}function Jb(e,t){if(Hb(e))return Vb;var n=e.k,r=e.l,o=e.r;if(t===n){if(Hb(r))return o;if(Hb(o))return r;var a=Qb(r),i=(0,v.Z)(a,2);return ok(tk(e,{k:i[0],v:i[1],l:ek(r)}))}return ok(tk(e,t2&&void 0!==arguments[2]?arguments[2]:"k";if(Hb(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])t&&(s=s.concat($b(a,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat($b(i,t,n))),s}function Kb(e){return Hb(e)?[]:[].concat((0,i.Z)(Kb(e.l)),[{k:e.k,v:e.v}],(0,i.Z)(Kb(e.r)))}function Qb(e){return Hb(e.r)?[e.k,e.v]:Qb(e.r)}function ek(e){return Hb(e.r)?e.l:ok(tk(e,{r:ek(e.r)}))}function tk(e,t){return qb(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function nk(e){return Hb(e)||e.lvl>e.r.lvl}function rk(e){return sk(uk(e))}function ok(e){var t=e.l,n=e.r,r=e.lvl;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(nk(t))return uk(tk(e,{lvl:r-1}));if(Hb(t)||Hb(t.r))throw new Error("Unexpected empty nodes");return tk(t.r,{l:tk(t,{r:t.r.l}),r:tk(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(nk(e))return sk(tk(e,{lvl:r-1}));if(Hb(n)||Hb(n.l))throw new Error("Unexpected empty nodes");var o=n.l,a=nk(o)?n.lvl-1:n.lvl;return tk(o,{l:tk(e,{r:o.l,lvl:r-1}),r:sk(tk(n,{l:o.r,lvl:a})),lvl:o.lvl+1})}function ak(e,t,n){if(Hb(e))return[];var r=Yb(e,t)[0];return ik($b(e,r,n),(function(e){return{index:e.k,value:e.v}}))}function ik(e,t){var n=e.length;if(0===n)return[];for(var r=t(e[0]),o=r.index,a=r.value,i=[],s=1;s3&&void 0!==arguments[3]?arguments[3]:0,o=e.length-1;r<=o;){var a=Math.floor((r+o)/2),i=n(e[a],t);if(0===i)return a;if(-1===i){if(o-r<2)return a-1;o=a-1}else{if(o===r)return a;r=a+1}}throw new Error("Failed binary finding record in array - ".concat(e.join(","),", searched for ").concat(t))}function ck(e,t,n){return e[lk(e,t,n)]}var fk=Ob((function(){return{recalcInProgress:cb(!1)}}),[],{singleton:!0});function dk(e){var t=e.size,n=e.startIndex,r=e.endIndex;return function(e){return e.start===n&&(e.end===r||e.end===1/0)&&e.value===t}}function pk(e,t){for(var n=0,r=0;n3&&void 0!==arguments[3]?arguments[3]:0;return r>0&&(t=Math.max(t,ck(e,r,hk).offset)),ik(function(e,t,n,r){var o=lk(e,t,r),a=lk(e,n,r,o);return e.slice(o,a+1)}(e,t,n,mk),vk)}function yk(e,t,n,r){var o=e,a=0,i=0,s=0,u=0;if(0!==t){s=o[u=lk(o,t-1,hk)].offset;var l=Yb(n,t-1);a=l[0],i=l[1],o.length&&o[u].size===Yb(n,t)[1]&&(u-=1),o=o.slice(0,u+1)}else o=[];var c,f=(0,y.Z)(ak(n,t,1/0));try{for(f.s();!(c=f.n()).done;){var d=c.value,p=d.start,h=d.value,m=p-a,v=m*i+s+m*r;o.push({offset:v,size:h,index:p}),a=p,s=v,i=h}}catch(g){f.e(g)}finally{f.f()}return{offsetTree:o,lastIndex:a,lastOffset:s,lastSize:i}}function bk(e,t){var n=(0,v.Z)(t,4),r=n[0],o=n[1],a=n[2],i=n[3];r.length>0&&a("received item sizes",r,jb.DEBUG);var s=e.sizeTree,u=s,l=0;if(o.length>0&&Hb(s)&&2===r.length){var c=r[0].size,f=r[1].size;u=o.reduce((function(e,t){return Xb(Xb(e,t,c),t+1,f)}),u)}else{var d=function(e,t){var n,r=Hb(e)?0:1/0,o=(0,y.Z)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=a.size,s=a.startIndex,u=a.endIndex;if(r=Math.min(r,s),Hb(e))e=Xb(e,0,i);else{var l=ak(e,s-1,u+1);if(!l.some(dk(a))){var c,f=!1,d=!1,p=(0,y.Z)(l);try{for(p.s();!(c=p.n()).done;){var h=c.value,m=h.start,v=h.end,g=h.value;f?(u>=m||i===g)&&(e=Jb(e,m)):(d=g!==i,f=!0),v>u&&u>=m&&g!==i&&(e=Xb(e,u+1,g))}}catch(b){p.e(b)}finally{p.f()}d&&(e=Xb(e,s,i))}}}}catch(b){o.e(b)}finally{o.f()}return[e,r]}(u,r),p=(0,v.Z)(d,2);u=p[0],l=p[1]}if(u===s)return e;var h=yk(e.offsetTree,l,u,i),m=h.offsetTree,g=h.lastIndex,b=h.lastSize,k=h.lastOffset;return{sizeTree:u,offsetTree:m,lastIndex:g,lastOffset:k,lastSize:b,groupOffsetTree:o.reduce((function(e,t){return Xb(e,t,kk(t,m,i))}),Wb()),groupIndices:o}}function kk(e,t,n){if(0===t.length)return 0;var r=ck(t,e,hk),o=r.offset,a=e-r.index,i=r.size*a+(a-1)*n+o;return i>0?i+n:i}function wk(e,t,n){if(function(e){return"undefined"!==typeof e.groupIndex}(e))return t.groupIndices[e.groupIndex]+1;var r=xk("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r))}function xk(e,t){if(!Sk(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function Sk(e){return!Hb(e.groupOffsetTree)}var Tk={offsetHeight:"height",offsetWidth:"width"},Ek=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0].log,r=t[1].recalcInProgress,o=lb(),a=lb(),s=db(a,0),u=lb(),l=lb(),c=cb(0),d=cb([]),p=cb(void 0),h=cb(void 0),m=cb((function(e,t){return Bb(e,Tk[t])})),g=cb(void 0),y=cb(0),b={offsetTree:[],sizeTree:Wb(),groupOffsetTree:Wb(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},k=db(hb(o,Tb(d,n,y),kb(bk,b),vb()),b),w=db(hb(d,vb(),kb((function(e,t){return{prev:e.current,current:t}}),{prev:[],current:[]}),yb((function(e){return e.prev}))),[]);sb(hb(d,gb((function(e){return e.length>0})),Tb(k,y),yb((function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1],o=t[2],a=n.reduce((function(e,t,n){return Xb(e,t,kk(t,r.offsetTree,o)||n)}),Wb());return f(f({},r),{},{groupIndices:n,groupOffsetTree:a})}))),k),sb(hb(a,Tb(k),gb((function(e){var t=(0,v.Z)(e,2);return t[0]0)ob(r,!0),ob(u,e+pk(e,t));else if(e<0){var n=ib(w);n.length>0&&(e-=pk(-e,n)),ob(l,e)}})),rb(hb(c,Tb(n)),(function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];n<0&&r("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},jb.ERROR)}));var T=fb(u);sb(hb(u,Tb(k),yb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1],o=r.groupIndices.length>0,a=[],s=r.lastSize;if(o){for(var u=Gb(r.sizeTree,0),l=0,c=0;l0){if(Hb(r.sizeTree))return r;for(var a=Wb(),i=ib(w),s=0,u=0,l=0;s<-n;){l=i[u];var c=i[u+1]-l-1;u++,s+=c+1}if(a=Kb(r.sizeTree).reduce((function(e,t){var r=t.k,o=t.v;return Xb(e,Math.max(0,r+n),o)}),a),s!==-n)a=Xb(a,0,Gb(r.sizeTree,l)),a=Xb(a,1,Yb(r.sizeTree,1-n)[1]);return f(f({},r),{},{sizeTree:a},yk(r.offsetTree,0,a,o))}var d=Kb(r.sizeTree).reduce((function(e,t){var r=t.k,o=t.v;return Xb(e,Math.max(0,r+n),o)}),Wb());return f(f({},r),{},{sizeTree:d},yk(r.offsetTree,0,d,o))}))),k),{data:g,totalCount:a,sizeRanges:o,groupIndices:d,defaultItemSize:h,fixedItemSize:p,unshiftWith:u,shiftWith:l,shiftWithOffset:E,beforeUnshiftWith:T,firstItemIndex:c,gap:y,sizes:k,listRefresh:S,statefulTotalCount:s,trackItemSizes:x,itemSize:m}}),$y(Db,fk),{singleton:!0}),Ck="undefined"!==typeof document&&"scrollBehavior"in document.documentElement.style;function _k(e){var t="number"===typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&Ck||(t.behavior="auto"),t.offset||(t.offset=0),t}var Ok=Ob((function(e){var t=(0,v.Z)(e,3),n=t[0],r=n.sizes,o=n.totalCount,a=n.listRefresh,i=n.gap,s=t[1],u=s.scrollingInProgress,l=s.viewportHeight,c=s.scrollTo,f=s.smoothScrollTargetReached,d=s.headerHeight,p=s.footerHeight,h=s.fixedHeaderHeight,m=s.fixedFooterHeight,g=t[2].log,y=lb(),b=cb(0),k=null,w=null,x=null;function S(){k&&(k(),k=null),x&&(x(),x=null),w&&(clearTimeout(w),w=null),ob(u,!1)}return sb(hb(y,Tb(r,l,o,b,d,p,g),Tb(i,h,m),yb((function(e){var t=(0,v.Z)(e,4),n=(0,v.Z)(t[0],8),r=n[0],o=n[1],i=n[2],s=n[3],l=n[4],c=n[5],d=n[6],p=n[7],h=t[1],m=t[2],g=t[3],b=_k(r),T=b.align,E=b.behavior,C=b.offset,_=s-1,O=wk(b,o,_),I=kk(O,o.offsetTree,h)+c;"end"===T?(I+=m+Yb(o.sizeTree,O)[1]-i+g,O===_&&(I+=d)):"center"===T?I+=(m+Yb(o.sizeTree,O)[1]-i+g)/2:I-=l,C&&(I+=C);var N,P=function(e){S(),e?(p("retrying to scroll to",{location:r},jb.DEBUG),ob(y,r)):p("list did not change, scroll successful",{},jb.DEBUG)};if(S(),"smooth"===E){var A=!1;x=rb(a,(function(e){A=A||e})),k=ub(f,(function(){P(A)}))}else k=ub(hb(a,(N=150,function(e){var t=setTimeout((function(){e(!1)}),N);return function(n){n&&(e(!0),clearTimeout(t))}})),P);return w=setTimeout((function(){S()}),1200),ob(u,!0),p("scrolling from index to",{index:O,top:I,behavior:E},jb.DEBUG),{top:I,behavior:E}}))),c),{scrollToIndex:y,topListHeight:b}}),$y(Ek,Ub,Db),{singleton:!0});var Ik="up",Nk="down",Pk={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Ak=Ob((function(e){var t=(0,v.Z)(e,1)[0],n=t.scrollContainerState,r=t.scrollTop,o=t.viewportHeight,a=t.headerHeight,i=t.footerHeight,s=t.scrollBy,u=cb(!1),l=cb(!0),c=lb(),f=lb(),d=cb(4),p=cb(0),h=db(hb(Eb(hb(Cb(r),wb(1),bb(!0)),hb(Cb(r),wb(1),bb(!1),Sb(100))),vb()),!1),m=db(hb(Eb(hb(s,bb(!0)),hb(s,bb(!1),Sb(200))),vb()),!1);sb(hb(_b(Cb(r),Cb(p)),yb((function(e){var t=(0,v.Z)(e,2);return t[0]<=t[1]})),vb()),l),sb(hb(l,xb(50)),f);var g=fb(hb(_b(n,Cb(o),Cb(a),Cb(i),Cb(d)),kb((function(e,t){var n,r,o=(0,v.Z)(t,5),a=o[0],i=a.scrollTop,s=a.scrollHeight,u=o[1],l=(o[2],o[3],{viewportHeight:u,scrollTop:i,scrollHeight:s});return i+u-s>-o[4]?(i>e.state.scrollTop?(n="SCROLLED_DOWN",r=e.state.scrollTop-i):(n="SIZE_DECREASED",r=e.state.scrollTop-i||e.scrollTopDelta),{atBottom:!0,state:l,atBottomBecause:n,scrollTopDelta:r}):{atBottom:!1,notAtBottomBecause:l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":un+h-y&&(g=Ik),(s-=f)0){l=e[0].offset;var f=e[e.length-1];c=f.offset+f.size}var d=n-u,p=l,h=s+d*i+(d-1)*r-c;return{items:Xk(e,o,a),topItems:Xk(t,o,a),topListHeight:t.reduce((function(e,t){return t.size+e}),0),offsetTop:l,offsetBottom:h,top:p,bottom:c,totalCount:n,firstItemIndex:a}}function Kk(e,t,n,r,o,a){var i=0;if(n.groupIndices.length>0){var s,u=(0,y.Z)(n.groupIndices);try{for(u.s();!(s=u.n()).done;){if(s.value-i>=e)break;i++}}catch(d){u.e(d)}finally{u.f()}}var l=e+i,c=Dk(t,l),f=Array.from({length:l}).map((function(e,t){return{index:t+c,size:0,offset:0,data:a[t+c]}}));return $k(f,[],l,o,n,r)}var Qk=Ob((function(e){var t=(0,v.Z)(e,8),n=t[0],r=n.sizes,o=n.totalCount,a=n.data,i=n.firstItemIndex,s=n.gap,u=t[1],l=t[2],c=l.visibleRange,d=l.listBoundary,p=l.topListHeight,h=t[3],m=h.scrolledToInitialItem,g=h.initialTopMostItemIndex,b=t[4].topListHeight,k=t[5],w=t[6].didMount,x=t[7].recalcInProgress,S=cb([]),T=cb(0),E=lb();sb(u.topItemsIndexes,S);var C=db(hb(_b(w,x,Cb(c,Zk),Cb(o),Cb(r),Cb(g),m,Cb(S),Cb(i),Cb(s),a),gb((function(e){var t=(0,v.Z)(e,11),n=t[0],r=t[1],o=t[3],a=t[10],i=a&&a.length!==o;return n&&!r&&!i})),yb((function(e){var t=(0,v.Z)(e,11),n=(0,v.Z)(t[2],2),r=n[0],o=n[1],a=t[3],i=t[4],s=t[5],u=t[6],l=t[7],c=t[8],d=t[9],p=t[10],h=i,m=h.sizeTree,g=h.offsetTree,b=ib(T);if(0===a)return f(f({},Yk),{},{totalCount:a});if(0===r&&0===o)return 0===b?f(f({},Yk),{},{totalCount:a}):Kk(b,s,i,c,d,p||[]);if(Hb(m)){if(b>0)return null;var k=$k(function(e,t,n){if(Sk(t)){var r=xk(e,t);return[{index:Yb(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}(Dk(s,a),h,p),[],a,d,h,c);return k}var w=[];if(l.length>0){var x,S=l[0],E=l[l.length-1],C=0,_=(0,y.Z)(ak(m,S,E));try{for(_.s();!(x=_.n()).done;)for(var O=x.value,I=O.value,N=Math.max(O.start,S),P=Math.min(O.end,E),A=N;A<=P;A++)w.push({index:A,size:I,offset:C,data:p&&p[A]}),C+=I}catch(L){_.e(L)}finally{_.f()}}if(!u)return $k([],w,a,d,h,c);var j=l.length>0?l[l.length-1]+1:0,R=gk(g,r,o,j);if(0===R.length)return null;var D=a-1,F=Xy([],(function(e){var t,n=(0,y.Z)(R);try{for(n.s();!(t=n.n()).done;){var a=t.value,i=a.value,s=i.offset,u=a.start,l=i.size;if(i.offset=o);h++)e.push({index:h,size:l,offset:s,data:p&&p[h]}),s+=l+d}}catch(L){n.e(L)}finally{n.f()}}));return $k(F,w,a,d,h,c)})),gb((function(e){return null!==e})),vb()),Yk);return sb(hb(a,gb(tb),yb((function(e){return null==e?void 0:e.length}))),o),sb(hb(C,yb((function(e){return e.topListHeight}))),b),sb(b,p),sb(hb(C,yb((function(e){return[e.top,e.bottom]}))),d),sb(hb(C,yb((function(e){return e.items}))),E),f({listState:C,topItemsIndexes:S,endReached:fb(hb(C,gb((function(e){return e.items.length>0})),Tb(o,a),gb((function(e){var t=(0,v.Z)(e,2),n=t[0].items,r=t[1];return n[n.length-1].originalIndex===r-1})),yb((function(e){var t=(0,v.Z)(e,3);return[t[1]-1,t[2]]})),vb(Zk),yb((function(e){return(0,v.Z)(e,1)[0]})))),startReached:fb(hb(C,xb(200),gb((function(e){var t=e.items,n=e.topItems;return t.length>0&&t[0].originalIndex===n.length})),yb((function(e){return e.items[0].index})),vb())),rangeChanged:fb(hb(C,gb((function(e){return e.items.length>0})),yb((function(e){for(var t=e.items,n=0,r=t.length-1;"group"===t[n].type&&nn;)r--;return{startIndex:t[n].index,endIndex:t[r].index}})),vb(Uk))),itemsRendered:E,initialItemCount:T},k)}),$y(Ek,zk,Gk,Fk,Ok,Ak,jk,fk),{singleton:!0}),ew=Ob((function(e){var t=(0,v.Z)(e,4),n=t[0],r=n.sizes,o=n.firstItemIndex,a=n.data,i=n.gap,s=t[1].initialTopMostItemIndex,u=t[2],l=u.initialItemCount,c=u.listState;return sb(hb(t[3].didMount,Tb(l),gb((function(e){return 0!==(0,v.Z)(e,2)[1]})),Tb(s,r,o,i,a),yb((function(e){var t=(0,v.Z)(e,6),n=(0,v.Z)(t[0],2)[1],r=t[1],o=t[2],a=t[3],i=t[4],s=t[5];return Kk(n,r,o,a,i,void 0===s?[]:s)}))),c),{}}),$y(Ek,Fk,Qk,jk),{singleton:!0}),tw=Ob((function(e){var t=(0,v.Z)(e,1)[0].scrollVelocity,n=cb(!1),r=lb(),o=cb(!1);return sb(hb(t,Tb(o,n,r),gb((function(e){var t=(0,v.Z)(e,2);t[0];return!!t[1]})),yb((function(e){var t=(0,v.Z)(e,4),n=t[0],r=t[1],o=t[2],a=t[3],i=r.exit,s=r.enter;if(o){if(i(n,a))return!1}else if(s(n,a))return!0;return o})),vb()),n),rb(hb(_b(n,t,r),Tb(o)),(function(e){var t=(0,v.Z)(e,2),n=(0,v.Z)(t[0],3),r=n[0],o=n[1],a=n[2],i=t[1];return r&&i&&i.change&&i.change(o,a)})),{isSeeking:n,scrollSeekConfiguration:o,scrollVelocity:t,scrollSeekRangeChanged:r}}),$y(Ak),{singleton:!0}),nw=Ob((function(e){var t=(0,v.Z)(e,1)[0].topItemsIndexes,n=cb(0);return sb(hb(n,gb((function(e){return e>0})),yb((function(e){return Array.from({length:e}).map((function(e,t){return t}))}))),t),{topItemCount:n}}),$y(Qk)),rw=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0],r=n.footerHeight,o=n.headerHeight,a=n.fixedHeaderHeight,i=n.fixedFooterHeight,s=t[1].listState,u=lb(),l=db(hb(_b(r,i,o,a,s),yb((function(e){var t=(0,v.Z)(e,5),n=t[0],r=t[1],o=t[2],a=t[3],i=t[4];return n+r+o+a+i.offsetBottom+i.bottom}))),0);return sb(Cb(l),u),{totalListHeight:l,totalListHeightChanged:u}}),$y(Ub,Qk),{singleton:!0});function ow(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var aw=ow((function(){return/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)})),iw=Ob((function(e){var t=(0,v.Z)(e,6),n=t[0],r=n.scrollBy,o=n.scrollTop,a=n.deviation,i=n.scrollingInProgress,s=t[1],u=s.isScrolling,l=s.isAtBottom,c=s.scrollDirection,f=s.lastJumpDueToItemResize,d=t[2].listState,p=t[3],h=p.beforeUnshiftWith,m=p.shiftWithOffset,g=p.sizes,y=p.gap,b=t[4].log,k=t[5].recalcInProgress,w=fb(hb(d,Tb(f),kb((function(e,t){var n=(0,v.Z)(e,4),r=n[1],o=n[2],a=n[3],i=(0,v.Z)(t,2),s=i[0],u=s.items,l=s.totalCount,c=s.bottom,f=s.offsetBottom,d=i[1],p=c+f,h=0;o===l&&(r.length>0&&u.length>0&&(0===u[0].originalIndex&&0===r[0].originalIndex||0!==(h=p-a)&&(h+=d)));return[h,u,l,p]}),[0,[],0,0]),gb((function(e){return 0!==(0,v.Z)(e,1)[0]})),Tb(o,c,i,l,b,k),gb((function(e){var t=(0,v.Z)(e,7),n=t[1],r=t[2],o=t[3];return!t[6]&&!o&&0!==n&&r===Ik})),yb((function(e){var t=(0,v.Z)(e,6),n=(0,v.Z)(t[0],1)[0];return(0,t[5])("Upward scrolling compensation",{amount:n},jb.DEBUG),n}))));function x(e){e>0?(ob(r,{top:-e,behavior:"auto"}),ob(a,0)):(ob(a,0),ob(r,{top:-e,behavior:"auto"}))}return rb(hb(w,Tb(a,u)),(function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1];t[2]&&aw()?ob(a,r-n):x(-n)})),rb(hb(_b(db(u,!1),a,k),gb((function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1],o=t[2];return!n&&!o&&0!==r})),yb((function(e){var t=(0,v.Z)(e,2);t[0];return t[1]})),xb(1)),x),sb(hb(m,yb((function(e){return{top:-e}}))),r),rb(hb(h,Tb(g,y),yb((function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1],o=r.lastSize,a=r.groupIndices,i=r.sizeTree,s=t[2];function u(e){return e*(o+s)}if(0===a.length)return u(n);for(var l=0,c=Gb(i,0),f=0,d=0;fn&&(l-=c,p=n-f+1),f+=p,l+=u(p),d++}return l}))),(function(e){ob(a,e),requestAnimationFrame((function(){ob(r,{top:e}),requestAnimationFrame((function(){ob(a,0),ob(k,!1)}))}))})),{deviation:a}}),$y(Ub,Ak,Qk,Ek,Db,fk)),sw=Ob((function(e){var t=(0,v.Z)(e,3),n=t[0].didMount,r=t[1].scrollTo,o=t[2].listState,a=cb(0);return rb(hb(n,Tb(a),gb((function(e){return 0!==(0,v.Z)(e,2)[1]})),yb((function(e){return{top:(0,v.Z)(e,2)[1]}}))),(function(e){ub(hb(o,wb(1),gb((function(e){return e.items.length>1}))),(function(){requestAnimationFrame((function(){ob(r,e)}))}))})),{initialScrollTop:a}}),$y(jk,Ub,Qk),{singleton:!0}),uw=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0].viewportHeight,r=t[1].totalListHeight,o=cb(!1);return{alignToBottom:o,paddingTopAddition:db(hb(_b(o,n,r),gb((function(e){return(0,v.Z)(e,1)[0]})),yb((function(e){var t=(0,v.Z)(e,3),n=t[1],r=t[2];return Math.max(0,n-r)})),xb(0),vb()),0)}}),$y(Ub,rw),{singleton:!0}),lw=Ob((function(e){var t=(0,v.Z)(e,1)[0],n=t.scrollTo,r=t.scrollContainerState,o=lb(),a=lb(),i=lb(),s=cb(!1),u=cb(void 0);return sb(hb(_b(o,a),yb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=n.viewportHeight,o=n.scrollTop,a=n.scrollHeight,i=t[1].offsetTop;return{scrollTop:Math.max(0,o-i),scrollHeight:a,viewportHeight:r}}))),r),sb(hb(n,Tb(a),yb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1].offsetTop;return f(f({},n),{},{top:n.top+r})}))),i),{useWindowScroll:s,customScrollParent:u,windowScrollContainerState:o,windowViewportRect:a,windowScrollTo:i}}),$y(Ub)),cw=function(e){var t=e.itemTop,n=e.itemBottom,r=e.viewportTop,o=e.viewportBottom,a=e.locationParams,i=a.behavior,s=a.align,l=u(a,Ly);return to?f(f({},l),{},{behavior:i,align:null!=s?s:"end"}):null},fw=Ob((function(e){var t=(0,v.Z)(e,3),n=t[0],r=n.sizes,o=n.totalCount,a=n.gap,i=t[1],s=i.scrollTop,l=i.viewportHeight,c=i.headerHeight,d=i.fixedHeaderHeight,p=i.fixedFooterHeight,h=i.scrollingInProgress,m=t[2].scrollToIndex,g=lb();return sb(hb(g,Tb(r,l,o,c,d,p,s),Tb(a),yb((function(e){var t=(0,v.Z)(e,2),n=(0,v.Z)(t[0],8),r=n[0],o=n[1],a=n[2],i=n[3],s=n[4],l=n[5],c=n[6],d=n[7],p=t[1],m=r.done,g=r.behavior,y=r.align,b=r.calculateViewLocation,k=void 0===b?cw:b,w=u(r,My),x=wk(r,o,i-1),S=kk(x,o.offsetTree,p)+s+l,T=k({itemTop:S,itemBottom:S+Yb(o.sizeTree,x)[1],viewportTop:d+l,viewportBottom:d+a-c,locationParams:f({behavior:g,align:y},w)});return T?m&&ub(hb(h,gb((function(e){return!1===e})),wb(ib(h)?1:2)),m):m&&m(),T})),gb((function(e){return null!==e}))),m),{scrollIntoView:g}}),$y(Ek,Ub,Ok,Qk,Db),{singleton:!0}),dw=Ob((function(e){var t=(0,v.Z)(e,5),n=t[0],r=n.sizes,o=n.sizeRanges,a=t[1].scrollTop,i=t[2].initialTopMostItemIndex,s=t[3].didMount,u=t[4],l=u.useWindowScroll,c=u.windowScrollContainerState,f=u.windowViewportRect,d=lb(),p=cb(void 0),h=cb(null),m=cb(null);return sb(c,h),sb(f,m),rb(hb(d,Tb(r,a,l,h,m)),(function(e){var t=(0,v.Z)(e,6),n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],s=t[5],u=Kb(r.sizeTree).map((function(e,t,n){var r=e.k,o=e.v,a=n[t+1];return{startIndex:r,endIndex:a?a.k-1:1/0,size:o}}));a&&null!==i&&null!==s&&(o=i.scrollTop-s.offsetTop),n({ranges:u,scrollTop:o})})),sb(hb(p,gb(tb),yb(pw)),i),sb(hb(s,Tb(p),gb((function(e){return void 0!==(0,v.Z)(e,2)[1]})),vb(),yb((function(e){return(0,v.Z)(e,2)[1].ranges}))),o),{getState:d,restoreStateFrom:p}}),$y(Ek,Ub,Fk,jk,lw));function pw(e){return{offset:e.scrollTop,index:0,align:"start"}}var hw=Ob((function(e){var t=(0,v.Z)(e,10),n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],s=t[5],u=t[6],l=t[7],c=t[8],d=t[9];return f(f(f(f(f(f(f(f(f(f({},n),r),o),a),i),s),u),l),c),d)}),$y(Gk,ew,jk,tw,rw,sw,uw,lw,fw,Db)),mw=Ob((function(e){var t=(0,v.Z)(e,11),n=t[0],r=n.totalCount,o=n.sizeRanges,a=n.fixedItemSize,i=n.defaultItemSize,s=n.trackItemSizes,l=n.itemSize,c=n.data,d=n.firstItemIndex,p=n.groupIndices,h=n.statefulTotalCount,m=n.gap,g=n.sizes,y=t[1],b=y.initialTopMostItemIndex,k=y.scrolledToInitialItem,w=t[2],x=t[3],S=t[4],T=t[5],E=T.listState,C=T.topItemsIndexes,_=u(T,By),O=t[6].scrollToIndex,I=(t[7],t[8].topItemCount),N=t[9].groupCounts,P=t[10];return sb(_.rangeChanged,P.scrollSeekRangeChanged),sb(hb(P.windowViewportRect,yb((function(e){return e.visibleHeight}))),w.viewportHeight),f(f(f(f(f({totalCount:r,data:c,firstItemIndex:d,sizeRanges:o,initialTopMostItemIndex:b,scrolledToInitialItem:k,topItemsIndexes:C,topItemCount:I,groupCounts:N,fixedItemHeight:a,defaultItemHeight:i,gap:m},S),{},{statefulTotalCount:h,listState:E,scrollToIndex:O,trackItemSizes:s,itemSize:l,groupIndices:p},_),P),w),{},{sizes:g},x)}),$y(Ek,Fk,Ub,dw,Mk,Qk,Ok,iw,nw,zk,hw)),vw="-webkit-sticky",gw="sticky",yw=ow((function(){if("undefined"===typeof document)return gw;var e=document.createElement("div");return e.style.position=vw,e.style.position===vw?vw:gw}));function bw(e,t){var n=r.useRef(null),o=r.useCallback((function(r){if(null!==r&&r.offsetParent){var o,a,i=r.getBoundingClientRect(),s=i.width;if(t){var u=t.getBoundingClientRect(),l=i.top-u.top;o=u.height-Math.max(0,l),a=l+t.scrollTop}else o=window.innerHeight-Math.max(0,i.top),a=i.top+window.pageYOffset;n.current={offsetTop:a,visibleHeight:o,visibleWidth:s},e(n.current)}}),[e,t]),a=Fb(o),i=a.callbackRef,s=a.ref,u=r.useCallback((function(){o(s.current)}),[o,s]);return r.useEffect((function(){if(t){t.addEventListener("scroll",u);var e=new ResizeObserver(u);return e.observe(t),function(){t.removeEventListener("scroll",u),e.unobserve(t)}}return window.addEventListener("scroll",u),window.addEventListener("resize",u),function(){window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}}),[u,t]),i}var kw=r.createContext(void 0),ww=r.createContext(void 0);function xw(e){return e}var Sw=Ob((function(){var e=cb((function(e){return"Item ".concat(e)})),t=cb(null),n=cb((function(e){return"Group ".concat(e)})),r=cb({}),o=cb(xw),a=cb("div"),i=cb(nb),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return db(hb(r,yb((function(t){return t[e]})),vb()),t)};return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:a,scrollerRef:i,FooterComponent:s("Footer"),HeaderComponent:s("Header"),TopItemListComponent:s("TopItemList"),ListComponent:s("List","div"),ItemComponent:s("Item","div"),GroupComponent:s("Group","div"),ScrollerComponent:s("Scroller","div"),EmptyPlaceholder:s("EmptyPlaceholder"),ScrollSeekPlaceholder:s("ScrollSeekPlaceholder")}})),Tw=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),$y(mw,Sw)),Ew=function(e){var t=e.height;return r.createElement("div",{style:{height:t}})},Cw={position:yw(),zIndex:1,overflowAnchor:"none"},_w={overflowAnchor:"none"},Ow=r.memo((function(e){var t=e.showTopList,n=void 0!==t&&t,o=Vw("listState"),a=Uw("sizeRanges"),i=Vw("useWindowScroll"),s=Vw("customScrollParent"),u=Uw("windowScrollContainerState"),l=Uw("scrollContainerState"),c=s||i?u:l,d=Vw("itemContent"),p=Vw("context"),h=Vw("groupContent"),m=Vw("trackItemSizes"),g=Mb(a,Vw("itemSize"),m,n?nb:c,Vw("log"),Uw("gap"),s).callbackRef,y=r.useState(0),b=(0,v.Z)(y,2),k=b[0],w=b[1];qw("deviation",(function(e){k!==e&&w(e)}));var x=Vw("EmptyPlaceholder"),S=Vw("ScrollSeekPlaceholder")||Ew,T=Vw("ListComponent"),E=Vw("ItemComponent"),C=Vw("GroupComponent"),_=Vw("computeItemKey"),O=Vw("isSeeking"),I=Vw("groupIndices").length>0,N=Vw("paddingTopAddition"),P=Vw("scrolledToInitialItem"),A=n?{}:f({boxSizing:"border-box",paddingTop:o.offsetTop+N,paddingBottom:o.offsetBottom,marginTop:k},P?{}:{visibility:"hidden"});return!n&&0===o.totalCount&&x?r.createElement(x,Aw(x,p)):r.createElement(T,f(f({},Aw(T,p)),{},{ref:g,style:A,"data-test-id":n?"virtuoso-top-item-list":"virtuoso-item-list"}),(n?o.topItems:o.items).map((function(e){var t=e.originalIndex,n=_(t+o.firstItemIndex,e.data,p);return O?r.createElement(S,f(f({},Aw(S,p)),{},{key:n,index:e.index,height:e.size,type:e.type||"item"},"group"===e.type?{}:{groupIndex:e.groupIndex})):"group"===e.type?r.createElement(C,f(f({},Aw(C,p)),{},{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:Cw}),h(e.index,p)):r.createElement(E,f(f({},Aw(E,p)),{},{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,"data-item-group-index":e.groupIndex,item:e.data,style:_w}),I?d(e.index,e.groupIndex,e.data,p):d(e.index,e.data,p))})))})),Iw={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Nw={width:"100%",height:"100%",position:"absolute",top:0},Pw={width:"100%",position:yw(),top:0,zIndex:1};function Aw(e,t){if("string"!==typeof e)return{context:t}}var jw=r.memo((function(){var e=Vw("HeaderComponent"),t=Uw("headerHeight"),n=Vw("headerFooterTag"),o=Lb((function(e){return t(Bb(e,"height"))})),a=Vw("context");return e?r.createElement(n,{ref:o},r.createElement(e,Aw(e,a))):null})),Rw=r.memo((function(){var e=Vw("FooterComponent"),t=Uw("footerHeight"),n=Vw("headerFooterTag"),o=Lb((function(e){return t(Bb(e,"height"))})),a=Vw("context");return e?r.createElement(n,{ref:o},r.createElement(e,Aw(e,a))):null}));function Dw(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return r.memo((function(e){var a=e.style,i=e.children,s=u(e,zy),l=t("scrollContainerState"),c=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),p=o("scrollerRef"),h=o("context"),m=Zb(l,d,c,p),v=m.scrollerRef,g=m.scrollByCallback,y=m.scrollToCallback;return n("scrollTo",y),n("scrollBy",g),r.createElement(c,f(f({ref:v,style:f(f({},Iw),a),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},s),Aw(c,h)),i)}))}function Fw(e){var t=e.usePublisher,n=e.useEmitter,o=e.useEmitterValue;return r.memo((function(e){var a=e.style,i=e.children,s=u(e,Zy),l=t("windowScrollContainerState"),c=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),p=o("totalListHeight"),h=o("deviation"),m=o("customScrollParent"),v=o("context"),g=Zb(l,d,c,nb,m),y=g.scrollerRef,b=g.scrollByCallback,k=g.scrollToCallback;return Ab((function(){return y.current=m||window,function(){y.current=null}}),[y,m]),n("windowScrollTo",k),n("scrollBy",b),r.createElement(c,f(f({style:f(f({position:"relative"},a),0!==p?{height:p+h}:{}),"data-virtuoso-scroller":!0},s),Aw(c,v)),i)}))}var Lw=function(e){var t=e.children,n=r.useContext(kw),o=Uw("viewportHeight"),a=Uw("fixedItemHeight"),i=Lb(Wy(o,(function(e){return Bb(e,"height")})));return r.useEffect((function(){n&&(o(n.viewportHeight),a(n.itemHeight))}),[n,o,a]),r.createElement("div",{style:Nw,ref:i,"data-viewport-type":"element"},t)},Mw=function(e){var t=e.children,n=r.useContext(kw),o=Uw("windowViewportRect"),a=Uw("fixedItemHeight"),i=Vw("customScrollParent"),s=bw(o,i);return r.useEffect((function(){n&&(a(n.itemHeight),o({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))}),[n,o,a]),r.createElement("div",{ref:s,style:Nw,"data-viewport-type":"window"},t)},Bw=function(e){var t=e.children,n=Vw("TopItemListComponent"),o=Vw("headerHeight"),a=f(f({},Pw),{},{marginTop:"".concat(o,"px")}),i=Vw("context");return r.createElement(n||"div",{style:a,context:i},t)},zw=Pb(Tw,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},r.memo((function(e){var t=Vw("useWindowScroll"),n=Vw("topItemsIndexes").length>0,o=Vw("customScrollParent"),a=o||t?Ww:Hw,i=o||t?Mw:Lw;return r.createElement(a,f({},e),n&&r.createElement(Bw,null,r.createElement(Ow,{showTopList:!0})),r.createElement(i,null,r.createElement(jw,null),r.createElement(Ow,null),r.createElement(Rw,null)))}))),Zw=zw.Component,Uw=zw.usePublisher,Vw=zw.useEmitterValue,qw=zw.useEmitter,Hw=Dw({usePublisher:Uw,useEmitterValue:Vw,useEmitter:qw}),Ww=Fw({usePublisher:Uw,useEmitterValue:Vw,useEmitter:qw}),Jw=Zw,Gw={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Yw={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Xw=Math.round,$w=Math.ceil,Kw=Math.floor,Qw=Math.min,ex=Math.max;function tx(e,t,n){return Array.from({length:t-e+1}).map((function(t,r){var o=null===n?null:n[r+e];return{index:r+e,data:o}}))}function nx(e,t){return e&&e.column===t.column&&e.row===t.row}function rx(e,t){return e&&e.width===t.width&&e.height===t.height}var ox=Ob((function(e){var t=(0,v.Z)(e,7),n=t[0],r=n.overscan,o=n.visibleRange,a=n.listBoundary,i=t[1],s=i.scrollTop,u=i.viewportHeight,l=i.scrollBy,c=i.scrollTo,d=i.smoothScrollTargetReached,p=i.scrollContainerState,h=i.footerHeight,m=i.headerHeight,g=t[2],y=t[3],b=t[4],k=b.propsReady,w=b.didMount,x=t[5],S=x.windowViewportRect,T=x.useWindowScroll,E=x.customScrollParent,C=x.windowScrollContainerState,_=x.windowScrollTo,O=t[6],I=cb(0),N=cb(0),P=cb(Gw),A=cb({height:0,width:0}),j=cb({height:0,width:0}),R=lb(),D=lb(),F=cb(0),L=cb(null),M=cb({row:0,column:0}),B=lb(),z=lb(),Z=cb(!1),U=cb(0),V=cb(!0),q=cb(!1);rb(hb(w,Tb(U),gb((function(e){var t=(0,v.Z)(e,2);t[0];return!!t[1]}))),(function(){ob(V,!1),ob(N,0)})),rb(hb(_b(w,V,j,A,U,q),gb((function(e){var t=(0,v.Z)(e,6),n=t[0],r=t[1],o=t[2],a=t[3],i=t[5];return n&&!r&&0!==o.height&&0!==a.height&&!i}))),(function(e){var t=(0,v.Z)(e,5)[4];ob(q,!0),Rk(1,(function(){ob(R,t)})),ub(hb(s),(function(){ob(a,[0,0]),ob(V,!0)}))})),sb(hb(z,gb((function(e){return void 0!==e&&null!==e&&e.scrollTop>0})),bb(0)),N),rb(hb(w,Tb(z),gb((function(e){var t=(0,v.Z)(e,2)[1];return void 0!==t&&null!==t}))),(function(e){var t=(0,v.Z)(e,2)[1];t&&(ob(A,t.viewport),ob(j,null==t?void 0:t.item),ob(M,t.gap),t.scrollTop>0&&(ob(Z,!0),ub(hb(s,wb(1)),(function(e){ob(Z,!1)})),ob(c,{top:t.scrollTop})))})),sb(hb(A,yb((function(e){return e.height}))),u),sb(hb(_b(Cb(A,rx),Cb(j,rx),Cb(M,(function(e,t){return e&&e.column===t.column&&e.row===t.row})),Cb(s)),yb((function(e){var t=(0,v.Z)(e,4);return{viewport:t[0],item:t[1],gap:t[2],scrollTop:t[3]}}))),B),sb(hb(_b(Cb(I),o,Cb(M,nx),Cb(j,rx),Cb(A,rx),Cb(L),Cb(N),Cb(Z),Cb(V),Cb(U)),gb((function(e){return!(0,v.Z)(e,8)[7]})),yb((function(e){var t=(0,v.Z)(e,10),n=t[0],r=(0,v.Z)(t[1],2),o=r[0],a=r[1],i=t[2],s=t[3],u=t[4],l=t[5],c=t[6],d=t[8],p=t[9],h=i.row,m=i.column,g=s.height,y=s.width,b=u.width;if(0===c&&(0===n||0===b))return Gw;if(0===y){var k=Dk(p,n);return function(e){return f(f({},Yw),{},{items:e})}(tx(k,0===k?Math.max(c-1,0):k,l))}var w,x,S=sx(b,y,m);d?0===o&&0===a&&c>0?(w=0,x=c-1):(w=S*Kw((o+h)/(g+h)),x=S*$w((a+h)/(g+h))-1,x=Qw(n-1,ex(x,S-1)),w=Qw(x,ex(0,w))):(w=0,x=-1);var T=tx(w,x,l),E=ax(u,i,s,T),C=E.top,_=E.bottom,O=$w(n/S);return{items:T,offsetTop:C,offsetBottom:O*g+(O-1)*h-_,top:C,bottom:_,itemHeight:g,itemWidth:y}}))),P),sb(hb(L,gb((function(e){return null!==e})),yb((function(e){return e.length}))),I),sb(hb(_b(A,j,P,M),gb((function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1];return t[2].items.length>0&&0!==r.height&&0!==n.height})),yb((function(e){var t=(0,v.Z)(e,4),n=t[0],r=t[1],o=t[2].items,a=ax(n,t[3],r,o);return[a.top,a.bottom]})),vb(Zk)),a);var H=cb(!1);sb(hb(s,Tb(H),yb((function(e){var t=(0,v.Z)(e,2),n=t[0];return t[1]||0!==n}))),H);var W=fb(hb(Cb(P),gb((function(e){return e.items.length>0})),Tb(I,H),gb((function(e){var t=(0,v.Z)(e,3),n=t[0].items,r=t[1];return t[2]&&n[n.length-1].index===r-1})),yb((function(e){return(0,v.Z)(e,2)[1]-1})),vb())),J=fb(hb(Cb(P),gb((function(e){var t=e.items;return t.length>0&&0===t[0].index})),bb(0),vb())),G=fb(hb(Cb(P),Tb(Z),gb((function(e){var t=(0,v.Z)(e,2),n=t[0].items,r=t[1];return n.length>0&&!r})),yb((function(e){var t=(0,v.Z)(e,1)[0].items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),vb(Uk),xb(0)));sb(G,y.scrollSeekRangeChanged),sb(hb(R,Tb(A,j,I,M),yb((function(e){var t=(0,v.Z)(e,5),n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],s=_k(n),u=s.align,l=s.behavior,c=s.offset,f=s.index;"LAST"===f&&(f=a-1);var d=ix(r,i,o,f=ex(0,f,Qw(a-1,f)));return"end"===u?d=Xw(d-r.height+o.height):"center"===u&&(d=Xw(d-r.height/2+o.height/2)),c&&(d+=c),{top:d,behavior:l}}))),c);var Y=db(hb(P,yb((function(e){return e.offsetBottom+e.bottom}))),0);return sb(hb(S,yb((function(e){return{width:e.visibleWidth,height:e.visibleHeight}}))),A),f(f(f({data:L,totalCount:I,viewportDimensions:A,itemDimensions:j,scrollTop:s,scrollHeight:D,overscan:r,scrollBy:l,scrollTo:c,scrollToIndex:R,smoothScrollTargetReached:d,windowViewportRect:S,windowScrollTo:_,useWindowScroll:T,customScrollParent:E,windowScrollContainerState:C,deviation:F,scrollContainerState:p,footerHeight:h,headerHeight:m,initialItemCount:N,gap:M,restoreStateFrom:z},y),{},{initialTopMostItemIndex:U,gridState:P,totalListHeight:Y},g),{},{startReached:J,endReached:W,rangeChanged:G,stateChanged:B,propsReady:k,stateRestoreInProgress:Z},O)}),$y(Gk,Ub,Ak,tw,jk,lw,Db));function ax(e,t,n,r){var o=n.height;return void 0===o||0===r.length?{top:0,bottom:0}:{top:ix(e,t,n,r[0].index),bottom:ix(e,t,n,r[r.length-1].index)+o}}function ix(e,t,n,r){var o=sx(e.width,n.width,t.column),a=Kw(r/o),i=a*n.height+ex(0,a-1)*t.row;return i>0?i+t.row:i}function sx(e,t,n){return ex(1,Kw((e+n)/(Kw(t)+n)))}var ux=Ob((function(){var e=cb((function(e){return"Item ".concat(e)})),t=cb({}),n=cb(null),r=cb("virtuoso-grid-item"),o=cb("virtuoso-grid-list"),a=cb(xw),i=cb("div"),s=cb(nb),u=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return db(hb(t,yb((function(t){return t[e]})),vb()),n)};return{context:n,itemContent:e,components:t,computeItemKey:a,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:s,FooterComponent:u("Footer"),HeaderComponent:u("Header"),ListComponent:u("List","div"),ItemComponent:u("Item","div"),ScrollerComponent:u("Scroller","div"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder","div")}})),lx=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),$y(ox,ux)),cx=r.memo((function(){var e=gx("gridState"),t=gx("listClassName"),n=gx("itemClassName"),o=gx("itemContent"),a=gx("computeItemKey"),i=gx("isSeeking"),s=vx("scrollHeight"),u=gx("ItemComponent"),l=gx("ListComponent"),c=gx("ScrollSeekPlaceholder"),d=gx("context"),p=vx("itemDimensions"),h=vx("gap"),m=gx("log"),v=gx("stateRestoreInProgress"),g=Lb((function(e){var t=e.parentElement.parentElement.scrollHeight;s(t);var n=e.firstChild;if(n){var r=n.getBoundingClientRect(),o=r.width,a=r.height;p({width:o,height:a})}h({row:wx("row-gap",getComputedStyle(e).rowGap,m),column:wx("column-gap",getComputedStyle(e).columnGap,m)})}));return v?null:r.createElement(l,f(f({ref:g,className:t},Aw(l,d)),{},{style:{paddingTop:e.offsetTop,paddingBottom:e.offsetBottom},"data-test-id":"virtuoso-item-list"}),e.items.map((function(t){var s=a(t.index,t.data,d);return i?r.createElement(c,f(f({key:s},Aw(c,d)),{},{index:t.index,height:e.itemHeight,width:e.itemWidth})):r.createElement(u,f(f({},Aw(u,d)),{},{className:n,"data-index":t.index,key:s}),o(t.index,t.data,d))})))})),fx=r.memo((function(){var e=gx("HeaderComponent"),t=vx("headerHeight"),n=gx("headerFooterTag"),o=Lb((function(e){return t(Bb(e,"height"))})),a=gx("context");return e?r.createElement(n,{ref:o},r.createElement(e,Aw(e,a))):null})),dx=r.memo((function(){var e=gx("FooterComponent"),t=vx("footerHeight"),n=gx("headerFooterTag"),o=Lb((function(e){return t(Bb(e,"height"))})),a=gx("context");return e?r.createElement(n,{ref:o},r.createElement(e,Aw(e,a))):null})),px=function(e){var t=e.children,n=r.useContext(ww),o=vx("itemDimensions"),a=vx("viewportDimensions"),i=Lb((function(e){a(e.getBoundingClientRect())}));return r.useEffect((function(){n&&(a({height:n.viewportHeight,width:n.viewportWidth}),o({height:n.itemHeight,width:n.itemWidth}))}),[n,a,o]),r.createElement("div",{style:Nw,ref:i},t)},hx=function(e){var t=e.children,n=r.useContext(ww),o=vx("windowViewportRect"),a=vx("itemDimensions"),i=gx("customScrollParent"),s=bw(o,i);return r.useEffect((function(){n&&(a({height:n.itemHeight,width:n.itemWidth}),o({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:n.viewportWidth}))}),[n,o,a]),r.createElement("div",{ref:s,style:Nw},t)},mx=Pb(lx,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},r.memo((function(e){var t=Object.assign({},(Ig(e),e)),n=gx("useWindowScroll"),o=gx("customScrollParent"),a=o||n?kx:bx,i=o||n?hx:px;return r.createElement(a,f({},t),r.createElement(i,null,r.createElement(fx,null),r.createElement(cx,null),r.createElement(dx,null)))}))),vx=(mx.Component,mx.usePublisher),gx=mx.useEmitterValue,yx=mx.useEmitter,bx=Dw({usePublisher:vx,useEmitterValue:gx,useEmitter:yx}),kx=Fw({usePublisher:vx,useEmitterValue:gx,useEmitter:yx});function wx(e,t,n){return"normal"===t||(null==t?void 0:t.endsWith("px"))||n("".concat(e," was not resolved to pixel value correctly"),t,jb.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var xx=Ob((function(){var e=cb((function(e){return r.createElement("td",null,"Item $",e)})),t=cb(null),n=cb(null),o=cb(null),a=cb({}),i=cb(xw),s=cb(nb),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return db(hb(a,yb((function(t){return t[e]})),vb()),t)};return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:o,components:a,computeItemKey:i,scrollerRef:s,TableComponent:u("Table","table"),TableHeadComponent:u("TableHead","thead"),TableFooterComponent:u("TableFoot","tfoot"),TableBodyComponent:u("TableBody","tbody"),TableRowComponent:u("TableRow","tr"),ScrollerComponent:u("Scroller","div"),EmptyPlaceholder:u("EmptyPlaceholder"),ScrollSeekPlaceholder:u("ScrollSeekPlaceholder"),FillerRow:u("FillerRow")}})),Sx=Ob((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),$y(mw,xx)),Tx=function(e){var t=e.height;return r.createElement("tr",null,r.createElement("td",{style:{height:t}}))},Ex=function(e){var t=e.height;return r.createElement("tr",null,r.createElement("td",{style:{height:t,padding:0,border:0}}))},Cx={overflowAnchor:"none"},_x=r.memo((function(){var e=Ax("listState"),t=Px("sizeRanges"),n=Ax("useWindowScroll"),o=Ax("customScrollParent"),a=Px("windowScrollContainerState"),s=Px("scrollContainerState"),u=o||n?a:s,l=Ax("itemContent"),c=Ax("trackItemSizes"),d=Mb(t,Ax("itemSize"),c,u,Ax("log"),void 0,o),p=d.callbackRef,h=d.ref,m=r.useState(0),g=(0,v.Z)(m,2),y=g[0],b=g[1];jx("deviation",(function(e){y!==e&&(h.current.style.marginTop="".concat(e,"px"),b(e))}));var k=Ax("EmptyPlaceholder"),w=Ax("ScrollSeekPlaceholder")||Tx,x=Ax("FillerRow")||Ex,S=Ax("TableBodyComponent"),T=Ax("TableRowComponent"),E=Ax("computeItemKey"),C=Ax("isSeeking"),_=Ax("paddingTopAddition"),O=Ax("firstItemIndex"),I=Ax("statefulTotalCount"),N=Ax("context");if(0===I&&k)return r.createElement(k,Aw(k,N));var P=e.offsetTop+_+y,A=e.offsetBottom,j=P>0?r.createElement(x,{height:P,key:"padding-top",context:N}):null,R=A>0?r.createElement(x,{height:A,key:"padding-bottom",context:N}):null,D=e.items.map((function(e){var t=e.originalIndex,n=E(t+O,e.data,N);return C?r.createElement(w,f(f({},Aw(w,N)),{},{key:n,index:e.index,height:e.size,type:e.type||"item"})):r.createElement(T,f(f({},Aw(T,N)),{},{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,item:e.data,style:Cx}),l(e.index,e.data,N))}));return r.createElement(S,f({ref:p,"data-test-id":"virtuoso-item-list"},Aw(S,N)),[j].concat((0,i.Z)(D),[R]))})),Ox=function(e){var t=e.children,n=r.useContext(kw),o=Px("viewportHeight"),a=Px("fixedItemHeight"),i=Lb(Wy(o,(function(e){return Bb(e,"height")})));return r.useEffect((function(){n&&(o(n.viewportHeight),a(n.itemHeight))}),[n,o,a]),r.createElement("div",{style:Nw,ref:i,"data-viewport-type":"element"},t)},Ix=function(e){var t=e.children,n=r.useContext(kw),o=Px("windowViewportRect"),a=Px("fixedItemHeight"),i=Ax("customScrollParent"),s=bw(o,i);return r.useEffect((function(){n&&(a(n.itemHeight),o({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))}),[n,o,a]),r.createElement("div",{ref:s,style:Nw,"data-viewport-type":"window"},t)},Nx=Pb(Sx,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},r.memo((function(e){var t=Ax("useWindowScroll"),n=Ax("customScrollParent"),o=Px("fixedHeaderHeight"),a=Px("fixedFooterHeight"),i=Ax("fixedHeaderContent"),s=Ax("fixedFooterContent"),u=Ax("context"),l=Lb(Wy(o,(function(e){return Bb(e,"height")}))),c=Lb(Wy(a,(function(e){return Bb(e,"height")}))),d=n||t?Dx:Rx,p=n||t?Ix:Ox,h=Ax("TableComponent"),m=Ax("TableHeadComponent"),v=Ax("TableFooterComponent"),g=i?r.createElement(m,f({key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:l},Aw(m,u)),i()):null,y=s?r.createElement(v,f({key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:c},Aw(v,u)),s()):null;return r.createElement(d,f({},e),r.createElement(p,null,r.createElement(h,f({style:{borderSpacing:0,overflowAnchor:"none"}},Aw(h,u)),[g,r.createElement(_x,{key:"TableBody"}),y])))}))),Px=(Nx.Component,Nx.usePublisher),Ax=Nx.useEmitterValue,jx=Nx.useEmitter,Rx=Dw({usePublisher:Px,useEmitterValue:Ax,useEmitter:jx}),Dx=Fw({usePublisher:Px,useEmitterValue:Ax,useEmitter:jx}),Fx=n(1842),Lx=new(n(5304)),Mx=function(e){var t=e.log;if(void 0!==t&&0!==t.length){var n=t;if(function(e){return Oy.test(e)}(n)){var r=Lx.toHtml(n);n=Cy(r)}return(0,gr.jsx)(_r,{style:zx.row,children:n})}return(0,gr.jsx)(gr.Fragment,{})},Bx=function(e){var t=e.logs,n=e.fileName,o=(0,r.useState)(!1),a=(0,v.Z)(o,2),i=a[0],s=a[1],u=(0,r.useState)(t),l=(0,v.Z)(u,2),c=l[0],f=l[1],d=(0,r.useRef)(null),p=(0,r.useState)(!1),h=(0,v.Z)(p,2),m=h[0],g=h[1],y=(0,r.useState)(!1),b=(0,v.Z)(y,2),k=(b[0],b[1]),w=(0,r.useState)(!1),x=(0,v.Z)(w,2),S=x[0],T=x[1],E=hu().height,C=jy(""),_=C.onCopy,O=(C.value,C.setValue),I=C.hasCopied;(0,r.useEffect)((function(){f(t);var e=t.map((function(e){return Ny(e)}));O(e.join(Fx.EOL)),T(!1)}),[t]);var N=i||!S&&!m,P=S?"scroll to bottom":"scroll to see new logs";return(0,gr.jsxs)("div",{className:"flex flex-col bg-black",children:[(0,gr.jsx)(Jw,{style:{height:.8*(E-100),backgroundColor:"black"},ref:d,data:c,totalCount:c.length-1,endReached:function(){T(!0)},atBottomStateChange:function(e){k(e)},isScrolling:function(e){g(e)},itemContent:function(e,t){return(0,gr.jsx)(Mx,{index:e,log:t})},followOutput:"smooth"}),(0,gr.jsxs)(vu,{className:"bg-black",style:{height:"80px"},children:[(0,gr.jsx)(gu,{}),(0,gr.jsx)(yy,{label:"".concat(I?"copied":"copy"),placement:"top-end",closeOnClick:!1,children:(0,gr.jsx)(_r,{p:"2",m:"4",onClick:_,height:"40px",children:(0,gr.jsxs)("svg",{className:"w-6 h-6 text-gray-800 dark:text-white","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20",children:[(0,gr.jsx)("path",{d:"M5 9V4.13a2.96 2.96 0 0 0-1.293.749L.879 7.707A2.96 2.96 0 0 0 .13 9H5Zm11.066-9H9.829a2.98 2.98 0 0 0-2.122.879L7 1.584A.987.987 0 0 0 6.766 2h4.3A3.972 3.972 0 0 1 15 6v10h1.066A1.97 1.97 0 0 0 18 14V2a1.97 1.97 0 0 0-1.934-2Z"}),(0,gr.jsx)("path",{d:"M11.066 4H7v5a2 2 0 0 1-2 2H0v7a1.969 1.969 0 0 0 1.933 2h9.133A1.97 1.97 0 0 0 13 18V6a1.97 1.97 0 0 0-1.934-2Z"})]})})}),(0,gr.jsx)(yy,{label:"download",placement:"top",closeOnClick:!1,children:(0,gr.jsx)(_r,{p:"2",m:"4",onClick:function(){var e=t.map((function(e){return Ny(e)})).join(Fx.EOL);Dy(e,n)},height:"40px",children:(0,gr.jsx)(Sy,{textColor:"white"})})}),(0,gr.jsx)(yy,{label:P,placement:"top",closeOnClick:!0,isOpen:N,children:(0,gr.jsx)(_r,{p:"2",m:"4",onClick:function(){d.current.scrollToIndex({index:c.length-1,behavior:"smooth",align:"end"})},height:"40px",onMouseEnter:function(){return s(!0)},onMouseLeave:function(){return s(!1)},children:(0,gr.jsx)(Ty,{textColor:"white"})})})]})]})},zx={row:{fontSize:"10pt",fontFamily:"Menlo, Monaco, Inconsolata, Consolas, Courier, monospace",boxSizing:"border-box",borderBottom:"1px solid #222",padding:"1em",color:"white"}},Zx=function(){var e=m(p().mark((function e(t,n){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vs(t,n);case 2:if(!("enclaveInfo"in(r=e.sent))){e.next=5;break}return e.abrupt("return",Object.keys(r.enclaveInfo).map((function(e){var t=r.enclaveInfo[e];return{uuid:t.enclaveUuid,name:t.name,status:t.apiContainerStatus,host:t.apiContainerInfo.bridgeIpAddress,port:t.apiContainerInfo.grpcPortInsideEnclave,mode:t.mode}})));case 5:return e.abrupt("return",[]);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ux=function(){var e=m(p().mark((function e(t,n,r){var o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Js(r,t,n);case 2:return o=e.sent,o.enclaveInfo,e.abrupt("return",{});case 5:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Vx=function(){var e=m(p().mark((function e(t,n,r,o){var a,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"","info",e.next=4,Gs(r,"info","",t,n,o);case 4:return a=e.sent,i=a.enclaveInfo,e.abrupt("return",{uuid:i.enclaveUuid,name:i.name,created:i.creationTime,status:i.apiContainerStatus,host:i.apiContainerInfo.bridgeIpAddress,port:i.apiContainerInfo.grpcPortInsideEnclave});case 7:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),qx=function(){var e=m(p().mark((function e(t,n,r,o,a,i){var s,u;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=Zs(o),u={enclaveIdentifier:n,serviceUuidSet:(0,l.Z)({},r,!0),followLogs:a,returnAllLogs:!1,numLogLines:i},e.abrupt("return",s.getServiceLogs(u,{signal:t.signal}));case 3:case"end":return e.stop()}}),e)})));return function(t,n,r,o,a,i){return e.apply(this,arguments)}}(),Hx=function(){var e=m(p().mark((function e(t,n,r,o,a,i){var s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$s(t,n,r,o,a,i);case 2:return s=e.sent,e.abrupt("return",s);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r,o,a,i){return e.apply(this,arguments)}}();var Wx=mc({strict:!1,name:"ButtonGroupContext"}),Jx=(0,v.Z)(Wx,2),Gx=(Jx[0],Jx[1]),Yx=["children","className"];function Xx(e){var t=e.children,n=e.className,o=u(e,Yx),a=(0,r.isValidElement)(t)?(0,r.cloneElement)(t,{"aria-hidden":!0,focusable:!1}):t,i=T("chakra-button__icon",n);return(0,gr.jsx)(vr.span,f(f({display:"inline-flex",alignSelf:"center",flexShrink:0},o),{},{className:i,children:a}))}Xx.displayName="ButtonIcon";n(2110);var $x=Kn((function(e,t){var n=e.styles,o=Jn([n],void 0,r.useContext(Qn)),a=r.useRef();return Xn((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+o.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),a.current=[n,r],function(){n.flush()}}),[t]),Xn((function(){var e=a.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==o.next&&rr(t,o.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",o,n,!1)}}),[t,o.name]),null}));function Kx(){for(var e=arguments.length,t=new Array(e),n=0;n\" "}),dS=(0,v.Z)(fS,2),pS=dS[0],hS=dS[1],mS=g((function(e,t){var n=Rr("Table",e),r=yt(e),o=r.className,a=r.layout,i=u(r,cS);return(0,gr.jsx)(pS,{value:n,children:(0,gr.jsx)(vr.table,f({ref:t,__css:f({tableLayout:a},n.table),className:T("chakra-table",o)},i))})}));mS.displayName="Table";var vS=g((function(e,t){var n=hS();return(0,gr.jsx)(vr.tr,f(f({},e),{},{ref:t,__css:n.tr}))})),gS=["isNumeric"],yS=g((function(e,t){var n=e.isNumeric,r=u(e,gS),o=hS();return(0,gr.jsx)(vr.td,f(f({},r),{},{ref:t,__css:o.td,"data-is-numeric":n}))})),bS=["overflow","overflowX","className"],kS=g((function(e,t){var n,r=e.overflow,o=e.overflowX,a=e.className,i=u(e,bS);return(0,gr.jsx)(vr.div,f(f({ref:t,className:T("chakra-table__container",a)},i),{},{__css:{display:"block",whiteSpace:"nowrap",WebkitOverflowScrolling:"touch",overflowX:null!=(n=null!=r?r:o)?n:"auto",overflowY:"hidden",maxWidth:"100%"}}))})),wS=g((function(e,t){var n=hS();return(0,gr.jsx)(vr.tbody,f(f({},e),{},{ref:t,__css:n.tbody}))}));function xS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SS(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 TS(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function CS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};RS.initial(e),RS.handler(t);var n={current:e},r=NS(LS)(n,t),o=NS(FS)(n),a=NS(RS.changes)(e),i=NS(DS)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return RS.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=new Array(e),a=0;a2&&void 0!==arguments[2])||arguments[2],o=(0,r.useRef)(!0);(0,r.useEffect)(o.current||!n?function(){o.current=!1}:e,t)};function mT(){}function vT(e,t,n,r){return function(e,t){return e.editor.getModel(gT(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?gT(e,r):void 0)}(e,t,n,r)}function gT(e,t){return e.Uri.parse(t)}var yT=function(e){var t=e.original,n=e.modified,o=e.language,a=e.originalLanguage,i=e.modifiedLanguage,s=e.originalModelPath,u=e.modifiedModelPath,l=e.keepCurrentOriginalModel,c=void 0!==l&&l,d=e.keepCurrentModifiedModel,p=void 0!==d&&d,h=e.theme,m=void 0===h?"light":h,g=e.loading,y=void 0===g?"Loading...":g,b=e.options,k=void 0===b?{}:b,w=e.height,x=void 0===w?"100%":w,S=e.width,T=void 0===S?"100%":S,E=e.className,C=e.wrapperProps,_=void 0===C?{}:C,O=e.beforeMount,I=void 0===O?mT:O,N=e.onMount,P=void 0===N?mT:N,A=(0,r.useState)(!1),j=(0,v.Z)(A,2),R=j[0],D=j[1],F=(0,r.useState)(!0),L=(0,v.Z)(F,2),M=L[0],B=L[1],z=(0,r.useRef)(null),Z=(0,r.useRef)(null),U=(0,r.useRef)(null),V=(0,r.useRef)(P),q=(0,r.useRef)(I),H=(0,r.useRef)(!1);pT((function(){var e=iT.init();return e.then((function(e){return(Z.current=e)&&B(!1)})).catch((function(e){return"cancelation"!==(null===e||void 0===e?void 0:e.type)&&console.error("Monaco initialization: error:",e)})),function(){return z.current?function(){var e,t,n,r,o=null===(e=z.current)||void 0===e?void 0:e.getModel();c||null!==o&&void 0!==o&&null!==(t=o.original)&&void 0!==t&&t.dispose(),p||null!==o&&void 0!==o&&null!==(n=o.modified)&&void 0!==n&&n.dispose(),null===(r=z.current)||void 0===r||r.dispose()}():e.cancel()}})),hT((function(){if(z.current&&Z.current){var e=z.current.getOriginalEditor(),n=vT(Z.current,t||"",a||o||"text",s||"");n!==e.getModel()&&e.setModel(n)}}),[s],R),hT((function(){if(z.current&&Z.current){var e=z.current.getModifiedEditor(),t=vT(Z.current,n||"",i||o||"text",u||"");t!==e.getModel()&&e.setModel(t)}}),[u],R),hT((function(){var e=z.current.getModifiedEditor();e.getOption(Z.current.editor.EditorOption.readOnly)?e.setValue(n||""):n!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),e.pushUndoStop())}),[n],R),hT((function(){var e;null===(e=z.current)||void 0===e||null===(e=e.getModel())||void 0===e||e.original.setValue(t||"")}),[t],R),hT((function(){var e=z.current.getModel(),t=e.original,n=e.modified;Z.current.editor.setModelLanguage(t,a||o||"text"),Z.current.editor.setModelLanguage(n,i||o||"text")}),[o,a,i],R),hT((function(){var e;null===(e=Z.current)||void 0===e||e.editor.setTheme(m)}),[m],R),hT((function(){var e;null===(e=z.current)||void 0===e||e.updateOptions(k)}),[k],R);var W=(0,r.useCallback)((function(){var e;if(Z.current){q.current(Z.current);var r=vT(Z.current,t||"",a||o||"text",s||""),l=vT(Z.current,n||"",i||o||"text",u||"");null===(e=z.current)||void 0===e||e.setModel({original:r,modified:l})}}),[o,n,i,t,a,s,u]),J=(0,r.useCallback)((function(){var e;!H.current&&U.current&&(z.current=Z.current.editor.createDiffEditor(U.current,f({automaticLayout:!0},k)),W(),null!==(e=Z.current)&&void 0!==e&&e.editor.setTheme(m),D(!0),H.current=!0)}),[k,m,W]);return(0,r.useEffect)((function(){R&&V.current(z.current,Z.current)}),[R]),(0,r.useEffect)((function(){!M&&!R&&J()}),[M,R,J]),r.createElement(dT,{width:T,height:x,isEditorReady:R,loading:y,_ref:U,className:E,wrapperProps:_})};(0,r.memo)(yT);var bT=function(e){var t=(0,r.useRef)();return(0,r.useEffect)((function(){t.current=e}),[e]),t.current},kT=new Map;var wT=function(e){var t=e.defaultValue,n=e.defaultLanguage,o=e.defaultPath,a=e.value,i=e.language,s=e.path,u=e.theme,l=void 0===u?"light":u,c=e.line,d=e.loading,p=void 0===d?"Loading...":d,h=e.options,m=void 0===h?{}:h,g=e.overrideServices,y=void 0===g?{}:g,b=e.saveViewState,k=void 0===b||b,w=e.keepCurrentModel,x=void 0!==w&&w,S=e.width,T=void 0===S?"100%":S,E=e.height,C=void 0===E?"100%":E,_=e.className,O=e.wrapperProps,I=void 0===O?{}:O,N=e.beforeMount,P=void 0===N?mT:N,A=e.onMount,j=void 0===A?mT:A,R=e.onChange,D=e.onValidate,F=void 0===D?mT:D,L=(0,r.useState)(!1),M=(0,v.Z)(L,2),B=M[0],z=M[1],Z=(0,r.useState)(!0),U=(0,v.Z)(Z,2),V=U[0],q=U[1],H=(0,r.useRef)(null),W=(0,r.useRef)(null),J=(0,r.useRef)(null),G=(0,r.useRef)(j),Y=(0,r.useRef)(P),X=(0,r.useRef)(),$=(0,r.useRef)(a),K=bT(s),Q=(0,r.useRef)(!1),ee=(0,r.useRef)(!1);pT((function(){var e=iT.init();return e.then((function(e){return(H.current=e)&&q(!1)})).catch((function(e){return"cancelation"!==(null===e||void 0===e?void 0:e.type)&&console.error("Monaco initialization: error:",e)})),function(){return W.current?function(){var e,t;null!==(e=X.current)&&void 0!==e&&e.dispose(),x?k&&kT.set(s,W.current.saveViewState()):null===(t=W.current.getModel())||void 0===t||t.dispose(),W.current.dispose()}():e.cancel()}})),hT((function(){var e,r,u,l,c=vT(H.current,t||a||"",n||i||"",s||o||"");c!==(null===(e=W.current)||void 0===e?void 0:e.getModel())&&(k&&kT.set(K,null===(r=W.current)||void 0===r?void 0:r.saveViewState()),null!==(u=W.current)&&void 0!==u&&u.setModel(c),k&&(null===(l=W.current)||void 0===l||l.restoreViewState(kT.get(s))))}),[s],B),hT((function(){var e;null===(e=W.current)||void 0===e||e.updateOptions(m)}),[m],B),hT((function(){!W.current||void 0===a||(W.current.getOption(H.current.editor.EditorOption.readOnly)?W.current.setValue(a):a!==W.current.getValue()&&(ee.current=!0,W.current.executeEdits("",[{range:W.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),W.current.pushUndoStop(),ee.current=!1))}),[a],B),hT((function(){var e,t,n=null===(e=W.current)||void 0===e?void 0:e.getModel();n&&i&&(null===(t=H.current)||void 0===t||t.editor.setModelLanguage(n,i))}),[i],B),hT((function(){var e;void 0!==c&&(null===(e=W.current)||void 0===e||e.revealLine(c))}),[c],B),hT((function(){var e;null===(e=H.current)||void 0===e||e.editor.setTheme(l)}),[l],B);var te=(0,r.useCallback)((function(){if(J.current&&H.current&&!Q.current){var e;Y.current(H.current);var r=s||o,u=vT(H.current,a||t||"",n||i||"",r||"");W.current=null===(e=H.current)||void 0===e?void 0:e.editor.create(J.current,f({model:u,automaticLayout:!0},m),y),k&&W.current.restoreViewState(kT.get(r)),H.current.editor.setTheme(l),z(!0),Q.current=!0}}),[t,n,o,a,i,s,m,y,k,l]);return(0,r.useEffect)((function(){B&&G.current(W.current,H.current)}),[B]),(0,r.useEffect)((function(){!V&&!B&&te()}),[V,B,te]),$.current=a,(0,r.useEffect)((function(){var e,t;B&&R&&(null!==(e=X.current)&&void 0!==e&&e.dispose(),X.current=null===(t=W.current)||void 0===t?void 0:t.onDidChangeModelContent((function(e){ee.current||R(W.current.getValue(),e)})))}),[B,R]),(0,r.useEffect)((function(){if(B){var e=H.current.editor.onDidChangeMarkers((function(e){var t,n=null===(t=W.current.getModel())||void 0===t?void 0:t.uri;if(n&&e.find((function(e){return e.path===n.path}))){var r=H.current.editor.getModelMarkers({resource:n});null===F||void 0===F||F(r)}}));return function(){null===e||void 0===e||e.dispose()}}return function(){}}),[B,F]),r.createElement(dT,{width:T,height:C,isEditorReady:B,loading:p,_ref:J,className:_,wrapperProps:I})},xT=(0,r.memo)(wT),ST=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["json"],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:500,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:o.includes("json")?"{\n}":"",s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=!(arguments.length>8&&void 0!==arguments[8])||arguments[8],c=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],f=!(arguments.length>10&&void 0!==arguments[10])||arguments[10],d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"sm",p=arguments.length>12&&void 0!==arguments[12]?arguments[12]:"1px",h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:"vs-dark",m=(0,r.useRef)(null),g=hu(),y=(0,r.useState)(!1),b=(0,v.Z)(y,2),k=b[0],w=b[1],x=(0,r.useState)(!1),S=(0,v.Z)(x,2),T=S[0],E=S[1],C=jy(""),_=(0,r.useRef)(n),O=(0,r.useState)(n),I=(0,v.Z)(O,2),N=I[0],P=I[1],A=function(){return m.current?j(e):null},j=function(e){return m.current.editor.getEditors().find((function(t){return t.getModel().uri.toString()==="file:///".concat(e)}))};(0,r.useEffect)((function(){A()&&A().updateOptions({readOnly:N})}),[N]),(0,r.useEffect)((function(){k&&(!function(){try{return A().getOption(86)}catch(e){return}}()?A()&&A().getAction("editor.action.formatDocument").run().then((function(){P(_.current),w(!1)})).catch((function(e){console.error("An error happened",e)})):P(!1))}),[k,T]),(0,r.useEffect)((function(){return R()}),[g]),(0,r.useEffect)((function(){return D(i)}),[i]);var R=function(){if(A()){var e=Math.min(750,A().getContentHeight());A().layout({width:a,height:e}),A().layout()}},D=function(e){R(),t(e),C.setValue(e)},F=function(){w(!0)};return R(),(0,gr.jsxs)(_r,{border:p,borderColor:"gray.700",borderRadius:"7",margin:"1px",padding:1,children:[(0,gr.jsx)(xT,{margin:1,defaultLanguage:"json",value:i,theme:h,path:e,onMount:function(e,t){var n,r;m.current=t,R(),A().onDidChangeConfiguration((function(e){e.hasChanged(86)&&E(!T)})),s&&F(),n="kurtosis-theme",r={base:h,inherit:!0,rules:[],colors:{"editor.background":"#171923"}},m.current.editor.defineTheme(n,r),m.current.editor.setTheme(n)},onChange:D,options:{automaticLayout:!1,selectOnLineNumbers:u,lineNumbers:u,languages:o,readOnly:N,minimap:{enabled:!1},scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:function(e){return e?0:10}(N),alwaysConsumeMouseWheel:!n},renderLineHighlight:function(e){return e?"none":"line"}(N)}}),(0,gr.jsxs)(_r,{marginTop:1,children:[l&&(0,gr.jsx)(iS,{margin:1,onClick:function(){C.setValue(i),C.onCopy()},size:d,children:C.hasCopied?"Copied!":"Copy"}),c&&(0,gr.jsx)(iS,{margin:1,onClick:function(){Dy(function(){var e;return null===(e=A())||void 0===e?void 0:e.getModel().getValue()}(),e)},size:d,children:"Download"}),f&&(0,gr.jsx)(iS,{margin:1,onClick:F,isDisabled:!o.includes("json"),size:d,children:"Format"})]})]})},TT=function(e,t){var n="";try{n=t()}catch(r){console.error("Error while processing row",r),n="Error while retrieving information"}return(0,gr.jsxs)(vS,{color:"white",children:[(0,gr.jsx)(yS,{children:(0,gr.jsx)("p",{children:(0,gr.jsx)("b",{children:e})})}),(0,gr.jsx)(yS,{children:n})]},e)},ET=function(e,t,n,r){var o=JSON.stringify(r,null,2),a="".concat(e,"-").concat(t,"-").concat(n,".json");return(0,gr.jsx)(_r,{children:ST(a,(function(){}),!0,["json"],250,o,!0,!1,!0,!0,!1,"xs")})},CT=function(e){var t=e.service;return(0,gr.jsx)(kS,{children:(0,gr.jsx)(mS,{variant:"simple",size:"sm",children:(0,gr.jsxs)(wS,{children:[TT("Name",(function(){return t.name})),TT("UUID",(function(){return(0,gr.jsx)("pre",{children:t.serviceUuid})})),TT("Status",(function(){return function(e){var t="",n="";if("RUNNING"===e||1===e)t="green",n="RUNNING";else if("STOPPED"===e||0===e)t="red",n="STOPPED";else{if("UNKNOWN"!==e&&2!==e)return(0,gr.jsx)(lS,{children:"N/A"});t="yellow",n="UNKNOWN"}return(0,gr.jsx)(lS,{colorScheme:t,children:n})}(t.serviceStatus)})),TT("Image",(function(){return t.container.imageName})),TT("Ports",(function(){return ET(t.shortenedUuid,t.name,"ports",t.ports)})),TT("ENTRYPOINT",(function(){return ET(t.shortenedUuid,t.name,"entrypoint",t.container.entrypointArgs)})),TT("CMD",(function(){return ET(t.shortenedUuid,t.name,"cmd",t.container.cmdArgs)})),TT("ENV",(function(){return ET(t.shortenedUuid,t.name,"env",t.container.envVars)}))]})})})},_T=function(){var e=Ga(),t=(0,r.useState)(!1),n=(0,v.Z)(t,2),o=(n[0],n[1],(0,r.useState)([])),a=(0,v.Z)(o,2),s=a[0],u=a[1],l=Wa().state,c=l.services,f=l.selected,d=su().appData,h=Xa(),g=h.name,y=h.uuid;(0,r.useEffect)((function(){var e=new AbortController;return function(e){var t,n=function(){var n=m(p().mark((function n(){var r,o,a,s,l,c;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,qx(e,g,y,d.apiHost,!0,1500);case 2:t=n.sent,n.prev=3,r=!1,o=!1,n.prev=6,s=p().mark((function e(){var t,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.value,""!==(n=t.serviceLogsByServiceUuid[y].line[0])&&u((function(e){return[].concat((0,i.Z)(e),[n])}));case 3:case"end":return e.stop()}}),e)})),l=fu(t);case 9:return n.next=11,l.next();case 11:if(!(r=!(c=n.sent).done)){n.next=16;break}return n.delegateYield(s(),"t0",13);case 13:r=!1,n.next=9;break;case 16:n.next=22;break;case 18:n.prev=18,n.t1=n.catch(6),o=!0,a=n.t1;case 22:if(n.prev=22,n.prev=23,!r||null==l.return){n.next=27;break}return n.next=27,l.return();case 27:if(n.prev=27,!o){n.next=30;break}throw a;case 30:return n.finish(27);case 31:return n.finish(22);case 32:n.next=37;break;case 34:n.prev=34,n.t2=n.catch(3),console.log("Abort Initial Log Stream! with error ",n.t2);case 37:case"end":return n.stop()}}),n,null,[[3,34],[6,18,22,32],[23,,27,31]])})));return function(){return n.apply(this,arguments)}}();n()}(e),function(){u([]),e.abort()}}),[y]);var b=function(t){var n="/enclaves/".concat(g,"/services/").concat(t.serviceUuid);e(n,{state:{services:c,selected:t}})},k=function(){return"logs"===h["*"]};return(0,gr.jsxs)("div",{className:"flex h-full",children:[(0,gr.jsx)(tu,{home:!1,isServiceInfo:!0,heading:"Services",renderList:function(){return function(e,t){return e.map((function(e){return(0,gr.jsx)("div",{className:"flex items-center justify-center h-14 text-base bg-[#24BA27]",onClick:function(){return t(e)},children:(0,gr.jsxs)("div",{className:"cursor-default text-lg text-white",children:[" ",e.name," "]})},e.name)}))}(c,b)}}),(0,gr.jsx)("div",{className:"flex h-full w-[calc(100vw-39rem)] flex-col space-y-5",children:(0,gr.jsxs)("div",{className:"flex-col flex space-y-1 bg-[#171923]",children:[(0,gr.jsxs)(vu,{bg:"#171923",height:"80px",children:[(0,gr.jsx)(_r,{p:"2",m:"4",children:(0,gr.jsxs)(Ur,{color:"white",fontSize:"xl",as:"b",children:[" ",k()?"Logs ":"Detailed Info "," for ",f.name," "]})}),(0,gr.jsx)(gu,{}),(0,gr.jsxs)(iS,{m:"4",onClick:function(){k()?e("/enclaves/".concat(g,"/services/").concat(f.serviceUuid),{state:{services:c,selected:f}}):e("/enclaves/".concat(g,"/services/").concat(f.serviceUuid,"/logs"),{state:{services:c,selected:f}})},children:[" ",k()?"View ".concat(f.name):"View Logs"," "]})]}),(0,gr.jsxs)(mi,{children:[(0,gr.jsx)(pi,{path:"/logs",element:s.length>0?(0,gr.jsx)(Bx,{logs:s,fileName:"".concat(g,"-").concat(f.name)}):(0,gr.jsx)(Mr,{color:"white",children:" No Logs Available"})}),(0,gr.jsx)(pi,{path:"/",element:(0,gr.jsx)(CT,{service:f})})]})]})}),(0,gr.jsx)(nu,{home:!1,isServiceInfo:!0,enclaveName:g})]})},OT=function(e){var t=e.currentPath,n=e.handleOnClick,r=e.handleCleanButton,o=t.length,a=function(e){var t=e.text,n=e.last,r=e.color,o=void 0===r?"text-white":r,a=e.index,i=e.handleOnClick;return(0,gr.jsxs)("div",{className:"".concat(o," cursor-default font-bold"),onClick:function(){return i(a)},children:[t," ",n?"":"/"]})};return(0,gr.jsxs)("div",{className:"flex flex-row py-2 px-5 flex-wrap",children:[t.map((function(e,t){return(0,gr.jsx)(a,{text:e,last:o-1===t,index:t,handleOnClick:n},t)})),t.length>0?(0,gr.jsx)("div",{className:"mx-3",onClick:r,children:(0,gr.jsx)("svg",{className:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:(0,gr.jsx)("path",{color:"gray",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}):null]})},IT=function(e,t){return 0===e.length?(0,gr.jsx)(ji,{text:"No File Preview Available",size:"text-xl",color:"text-red-400"}):Object.keys(e).map((function(n,r){var o="".concat(n,"-").concat(r);return(0,gr.jsx)("div",{className:"border-2 bg-[#171923] text-lg align-middle text-center h-16 p-3 text-[#24BA27]",onClick:function(){return t(n,e[n])},children:(0,gr.jsxs)("div",{children:[" ",n," "]})},o)}))},NT=function(e){var t=e.enclaves,n=Ga(),o=Xa(),a=o.name,s=o.fileArtifactName,u=(0,r.useState)(!1),l=(0,v.Z)(u,2),c=l[0],d=l[1],h=(0,r.useState)({}),g=(0,v.Z)(h,2),y=g[0],b=g[1],k=(0,r.useState)({}),w=(0,v.Z)(k,2),x=w[0],S=w[1],T=(0,r.useState)([]),E=(0,v.Z)(T,2),C=E[0],_=E[1],O=(0,r.useState)({}),I=(0,v.Z)(O,2),N=I[0],P=I[1],A=Wa().state.fileArtifacts,j=su().appData;(0,r.useEffect)((function(){if(0===t.length)n("/enclaves/".concat(a));else{d(!0);var e=function(){var e=m(p().mark((function e(){var n,r,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((n=t.filter((function(e){return e.name===a}))).length>0)){e.next=10;break}return e.next=4,Qs(n[0].host,n[0].port,s,j.jwtToken,j.apiHost);case 4:r=e.sent,o=r.files,S(o),b(o),_([]),P({});case 10:d(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}}),[s,j.jwtToken]);var R=function(e){n("/enclaves/".concat(a,"/files/").concat(e),{replace:!0,state:{fileArtifacts:A}})},D=function(e){var t,n=e.files,r=e.handleFileClick,o=e.detailInfo,a=e.enclaveName,i="".concat(a,"-").concat(o.path);return(0,gr.jsx)("div",{className:"flex flex-col h-full space-y-1 overflow-auto",children:0!==Object.keys(o).length?(0,gr.jsxs)("div",{className:"flex h-3/4 flex-col text-white",children:[(0,gr.jsxs)("p",{className:"text-sm font-bold text-left",children:[" Size: ",null===(t=o.size)||void 0===t?void 0:t.toString()," B "]}),(0,gr.jsxs)("p",{className:"text-sm font-bold text-left",children:[" Type: ",o.extension," "]}),o.textPreview.length>0?(0,gr.jsx)(_r,{children:ST(i,(function(){}),!0,[o.extension],500,o.textPreview,!1)}):(0,gr.jsx)("p",{className:"break-all overflow-y-auto",children:(0,gr.jsx)("h2",{className:"text-2xl text-center mt-20 text-red-800 font-bold",children:"No Preview Available"})})]}):(0,gr.jsxs)("div",{className:"flex flex-col h-[85%] min-h-[85%] border-2",children:[(0,gr.jsx)(Di,{color:"text-white",content:"Files",size:"text-xl"}),(0,gr.jsx)("div",{className:"overflow-auto space-y-2",children:IT(n,r)})]})})};return(0,gr.jsxs)("div",{className:"flex h-full",children:[(0,gr.jsx)(tu,{home:!1,heading:"File Artifacts",renderList:function(){return function(e,t){return e.map((function(e,n){var r="".concat(e.name,"-").concat(n);return(0,gr.jsx)("div",{className:"flex items-center justify-center h-14 text-base bg-[#24BA27]",onClick:function(){return t(e.name)},children:(0,gr.jsxs)("div",{className:"cursor-default text-lg text-white",children:[" ",e.name," "]})},r)}))}(A,R)}}),(0,gr.jsxs)("div",{className:"flex bg-[#171923] w-[calc(100vw-39rem)] flex-col space-y-5",children:[(0,gr.jsx)("div",{className:"h-[3rem] flex items-center justify-center m-2",children:(0,gr.jsx)(Di,{color:"text-white",content:"".concat(a," - ").concat(s)})}),(0,gr.jsx)(OT,{currentPath:C,handleOnClick:function(e){if(e===C.length-1);else{var t=C.slice(0,e+1),n=x;t.map((function(e){n=n[e]})),b(n),_(t),P({})}},handleCleanButton:function(){_([]),P({}),b(x)}}),c?(0,gr.jsx)(ru,{}):(0,gr.jsx)(D,{files:y,handleFileClick:function(e,t){var n=function(e){if(e)return e.split(".").pop()}(t.path);if((t=f(f({},t),{},{extension:n})).path){P(t);var r=x;C.map((function(e){r=r[e]})),_((function(t){return[].concat((0,i.Z)(t),[e])}))}else{var o=x;C.map((function(e){o=o[e]})),_((function(t){return[].concat((0,i.Z)(t),[e])})),b(o[e]),P({})}},detailInfo:N,enclaveName:a})]}),(0,gr.jsx)(nu,{isServiceInfo:!0,enclaveName:a})]})},PT=function(e){return(0,gr.jsx)(vr.div,f(f({className:"chakra-stack__item"},e),{},{__css:f({display:"inline-block",flex:"0 0 auto",minWidth:0},e.__css)}))};function AT(e){return r.Children.toArray(e).filter((function(e){return(0,r.isValidElement)(e)}))}PT.displayName="StackItem";var jT=["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"],RT=g((function(e,t){var n=e.isInline,o=e.direction,a=e.align,i=e.justify,s=e.spacing,l=void 0===s?"0.5rem":s,c=e.wrap,d=e.children,p=e.divider,h=e.className,m=e.shouldWrapChildren,v=u(e,jT),g=n?"row":null!=o?o:"column",y=(0,r.useMemo)((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":xr(n,(function(e){return r[e]}))}}({spacing:l,direction:g})}),[l,g]),b=!!p,k=!m&&!b,w=(0,r.useMemo)((function(){var e=AT(d);return k?e:e.map((function(t,n){var o="undefined"!==typeof t.key?t.key:n,a=n+1===e.length,i=m?(0,gr.jsx)(PT,{children:t},o):t;if(!b)return i;var s=(0,r.cloneElement)(p,{__css:y}),u=a?null:s;return(0,gr.jsxs)(r.Fragment,{children:[i,u]},o)}))}),[p,y,b,k,m,d]),x=T("chakra-stack",h);return(0,gr.jsx)(vr.div,f(f({ref:t,display:"flex",alignItems:a,justifyContent:i,flexDirection:g,flexWrap:c,gap:b?void 0:l,className:x},v),{},{children:w}))}));RT.displayName="Stack";var DT=g((function(e,t){return(0,gr.jsx)(RT,f(f({align:"center"},e),{},{direction:"row",ref:t}))}));DT.displayName="HStack";var FT=["children","className"],LT=mc({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),MT=(0,v.Z)(LT,2),BT=MT[0],zT=MT[1],ZT=g((function(e,t){var n=Rr("Input",e),o=yt(e),a=o.children,i=o.className,s=u(o,FT),l=T("chakra-input__group",i),c={},d=AT(a),p=n.field;d.forEach((function(e){var t,r;n&&(p&&"InputLeftElement"===e.type.id&&(c.paddingStart=null!=(t=p.height)?t:p.h),p&&"InputRightElement"===e.type.id&&(c.paddingEnd=null!=(r=p.height)?r:p.h),"InputRightAddon"===e.type.id&&(c.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(c.borderStartRadius=0))}));var h=d.map((function(t){var n,o,a=zr({size:(null==(n=t.props)?void 0:n.size)||e.size,variant:(null==(o=t.props)?void 0:o.variant)||e.variant});return"Input"!==t.type.id?(0,r.cloneElement)(t,a):(0,r.cloneElement)(t,Object.assign(a,c,t.props))}));return(0,gr.jsx)(vr.div,f(f({className:l,ref:t,__css:f({width:"100%",display:"flex",position:"relative",isolation:"isolate"},n.group),"data-group":!0},s),{},{children:(0,gr.jsx)(BT,{value:n,children:h})}))}));ZT.displayName="InputGroup";var UT=["placement"],VT={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},qT=vr("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),HT=g((function(e,t){var n,r=e.placement,o=void 0===r?"left":r,a=u(e,UT),i=null!=(n=VT[o])?n:{},s=zT();return(0,gr.jsx)(qT,f(f({ref:t},a),{},{__css:f(f({},s.addon),i)}))}));HT.displayName="InputAddon";var WT=g((function(e,t){return(0,gr.jsx)(HT,f(f({ref:t,placement:"left"},e),{},{className:T("chakra-input__left-addon",e.className)}))}));WT.displayName="InputLeftAddon",WT.id="InputLeftAddon";var JT=g((function(e,t){return(0,gr.jsx)(HT,f(f({ref:t,placement:"right"},e),{},{className:T("chakra-input__right-addon",e.className)}))}));JT.displayName="InputRightAddon",JT.id="InputRightAddon";var GT=["id","isRequired","isInvalid","isDisabled","isReadOnly"],YT=["getRootProps","htmlProps"],XT=mc({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),$T=(0,v.Z)(XT,2),KT=$T[0],QT=$T[1],eE=mc({strict:!1,name:"FormControlContext"}),tE=(0,v.Z)(eE,2),nE=tE[0],rE=tE[1];var oE=g((function(e,t){var n=Rr("Form",e),o=function(e){var t=e.id,n=e.isRequired,o=e.isInvalid,a=e.isDisabled,i=e.isReadOnly,s=u(e,GT),l=(0,r.useId)(),c=t||"field-".concat(l),d="".concat(c,"-label"),p="".concat(c,"-feedback"),h="".concat(c,"-helptext"),m=(0,r.useState)(!1),g=(0,v.Z)(m,2),y=g[0],b=g[1],k=(0,r.useState)(!1),w=(0,v.Z)(k,2),x=w[0],S=w[1],T=(0,r.useState)(!1),E=(0,v.Z)(T,2),C=E[0],_=E[1],I=(0,r.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({id:h},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Fu(e,(function(e){e&&S(!0)}))})}),[h]),N=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,"data-focus":O(C),"data-disabled":O(a),"data-invalid":O(o),"data-readonly":O(i),id:void 0!==e.id?e.id:d,htmlFor:void 0!==e.htmlFor?e.htmlFor:c})}),[c,a,C,o,i,d]),P=(0,r.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({id:p},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Fu(e,(function(e){e&&b(!0)})),"aria-live":"polite"})}),[p]),A=(0,r.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),s),{},{ref:e,role:"group"})}),[s]),j=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})}),[]);return{isRequired:!!n,isInvalid:!!o,isReadOnly:!!i,isDisabled:!!a,isFocused:!!C,onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},hasFeedbackText:y,setHasFeedbackText:b,hasHelpText:x,setHasHelpText:S,id:c,labelId:d,feedbackId:p,helpTextId:h,htmlProps:s,getHelpTextProps:I,getErrorMessageProps:P,getRootProps:A,getLabelProps:N,getRequiredIndicatorProps:j}}(yt(e)),a=o.getRootProps,i=(o.htmlProps,u(o,YT)),s=T("chakra-form-control",e.className);return(0,gr.jsx)(nE,{value:i,children:(0,gr.jsx)(KT,{value:n,children:(0,gr.jsx)(vr.div,f(f({},a({},t)),{},{className:s,__css:n.container}))})})}));oE.displayName="FormControl";var aE=g((function(e,t){var n=rE(),r=QT(),o=T("chakra-form__helper-text",e.className);return(0,gr.jsx)(vr.div,f(f({},null==n?void 0:n.getHelpTextProps(e,t)),{},{__css:r.helperText,className:o}))}));aE.displayName="FormHelperText";var iE=["isDisabled","isInvalid","isReadOnly","isRequired"],sE=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function uE(e){var t,n,r,o=rE(),a=e.id,i=e.disabled,s=e.readOnly,l=e.required,c=e.isRequired,d=e.isInvalid,p=e.isReadOnly,h=e.isDisabled,m=e.onFocus,v=e.onBlur,g=u(e,sE),y=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==o?void 0:o.hasFeedbackText)&&(null==o?void 0:o.isInvalid)&&y.push(o.feedbackId),(null==o?void 0:o.hasHelpText)&&y.push(o.helpTextId),f(f({},g),{},{"aria-describedby":y.join(" ")||void 0,id:null!=a?a:null==o?void 0:o.id,isDisabled:null!=(t=null!=i?i:h)?t:null==o?void 0:o.isDisabled,isReadOnly:null!=(n=null!=s?s:p)?n:null==o?void 0:o.isReadOnly,isRequired:null!=(r=null!=l?l:c)?r:null==o?void 0:o.isRequired,isInvalid:null!=d?d:null==o?void 0:o.isInvalid,onFocus:N(null==o?void 0:o.onFocus,m),onBlur:N(null==o?void 0:o.onBlur,v)})}var lE=["htmlSize"],cE=g((function(e,t){var n=e.htmlSize,r=u(e,lE),o=Rr("Input",r),a=function(e){var t=uE(e),n=t.isDisabled,r=t.isInvalid,o=t.isReadOnly,a=t.isRequired;return f(f({},u(t,iE)),{},{disabled:n,readOnly:o,required:a,"aria-invalid":I(r),"aria-required":I(a),"aria-readonly":I(o)})}(yt(r)),i=T("chakra-input",e.className);return(0,gr.jsx)(vr.input,f(f({size:n},a),{},{__css:o.field,ref:t,className:i}))}));cE.displayName="Input",cE.id="Input";var fE=["area","colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart"];function dE(e){return xr(e,(function(e){return"auto"===e?"auto":"span ".concat(e,"/span ").concat(e)}))}var pE=g((function(e,t){var n=e.area,r=e.colSpan,o=e.colStart,a=e.colEnd,i=e.rowEnd,s=e.rowSpan,l=e.rowStart,c=u(e,fE),d=zr({gridArea:n,gridColumn:dE(r),gridRow:dE(s),gridColumnStart:o,gridColumnEnd:a,gridRowStart:l,gridRowEnd:i});return(0,gr.jsx)(vr.div,f({ref:t,__css:d},c))}));pE.displayName="GridItem";var hE=mc({name:"CheckboxGroupContext",strict:!1}),mE=(0,v.Z)(hE,2),vE=(mE[0],mE[1]),gE=["isIndeterminate","isChecked"];function yE(e){return(0,gr.jsx)(vr.svg,f(f({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},e),{},{children:(0,gr.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})}))}function bE(e){return(0,gr.jsx)(vr.svg,f(f({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},e),{},{children:(0,gr.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}))}function kE(e){var t=e.isIndeterminate,n=e.isChecked,r=u(e,gE),o=t?bE:yE;return n||t?(0,gr.jsx)(vr.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,gr.jsx)(o,f({},r))}):null}function wE(e,t){var n=(0,r.useRef)(!1),o=(0,r.useRef)(!1);(0,r.useEffect)((function(){if(n.current&&o.current)return e();o.current=!0}),t),(0,r.useEffect)((function(){return n.current=!0,function(){n.current=!1}}),[])}var xE={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};var SE=function(){return"undefined"!==typeof document};var TE=!1,EE=null,CE=!1,_E=!1,OE=new Set;function IE(e,t){OE.forEach((function(n){return n(e,t)}))}var NE="undefined"!==typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function PE(e){var t;CE=!0,(t=e).metaKey||!NE&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key||(EE="keyboard",IE("keyboard",e))}function AE(e){if(EE="pointer","mousedown"===e.type||"pointerdown"===e.type){CE=!0;var t=e.composedPath?e.composedPath()[0]:e.target,n=!1;try{n=t.matches(":focus-visible")}catch(r){}if(n)return;IE("pointer",e)}}function jE(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(CE=!0,EE="virtual")}function RE(e){e.target!==window&&e.target!==document&&(CE||_E||(EE="virtual",IE("virtual",e)),CE=!1,_E=!1)}function DE(){CE=!1,_E=!0}function FE(){return"pointer"!==EE}function LE(){if(SE()&&!TE){var e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){CE=!0;for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=uE(e),n=t.isDisabled,o=t.isReadOnly,a=t.isRequired,i=t.isInvalid,s=t.id,l=t.onBlur,c=t.onFocus,d=t["aria-describedby"],p=e.defaultChecked,h=e.isChecked,m=e.isFocusable,g=e.onChange,b=e.isIndeterminate,k=e.name,w=e.value,x=e.tabIndex,S=void 0===x?void 0:x,T=e["aria-label"],E=e["aria-labelledby"],C=e["aria-invalid"],_=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=(0,y.Z)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;a in r&&delete r[a]}}catch(i){o.e(i)}finally{o.f()}return r}(u(e,BE),["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),I=uc(g),P=uc(l),A=uc(c),j=(0,r.useState)(!1),R=(0,v.Z)(j,2),D=R[0],F=R[1],L=(0,r.useState)(!1),M=(0,v.Z)(L,2),B=M[0],z=M[1],Z=(0,r.useState)(!1),U=(0,v.Z)(Z,2),V=U[0],q=U[1],H=(0,r.useState)(!1),W=(0,v.Z)(H,2),J=W[0],G=W[1];(0,r.useEffect)((function(){return ME(F)}),[]);var Y=(0,r.useRef)(null),X=(0,r.useState)(!0),$=(0,v.Z)(X,2),K=$[0],Q=$[1],ee=(0,r.useState)(!!p),te=(0,v.Z)(ee,2),ne=te[0],re=te[1],oe=void 0!==h,ae=oe?h:ne,ie=(0,r.useCallback)((function(e){o||n?e.preventDefault():(oe||re(ae?e.target.checked:!!b||e.target.checked),null==I||I(e))}),[o,n,ae,oe,b,I]);wc((function(){Y.current&&(Y.current.indeterminate=Boolean(b))}),[b]),wE((function(){n&&z(!1)}),[n,z]),wc((function(){var e=Y.current;if(null==e?void 0:e.form){var t=function(){re(!!p)};return e.form.addEventListener("reset",t),function(){var n;return null==(n=e.form)?void 0:n.removeEventListener("reset",t)}}}),[]);var se=n&&!m,ue=(0,r.useCallback)((function(e){" "===e.key&&G(!0)}),[G]),le=(0,r.useCallback)((function(e){" "===e.key&&G(!1)}),[G]);wc((function(){Y.current&&(Y.current.checked!==ae&&re(Y.current.checked))}),[Y.current]);var ce=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,"data-active":O(J),"data-hover":O(V),"data-checked":O(ae),"data-focus":O(B),"data-focus-visible":O(B&&D),"data-indeterminate":O(b),"data-disabled":O(n),"data-invalid":O(i),"data-readonly":O(o),"aria-hidden":!0,onMouseDown:N(e.onMouseDown,(function(e){B&&e.preventDefault(),G(!0)})),onMouseUp:N(e.onMouseUp,(function(){return G(!1)})),onMouseEnter:N(e.onMouseEnter,(function(){return q(!0)})),onMouseLeave:N(e.onMouseLeave,(function(){return q(!1)}))})}),[J,ae,n,B,D,V,b,i,o]),fe=(0,r.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,"data-active":O(J),"data-hover":O(V),"data-checked":O(ae),"data-focus":O(B),"data-focus-visible":O(B&&D),"data-indeterminate":O(b),"data-disabled":O(n),"data-invalid":O(i),"data-readonly":O(o)})}),[J,ae,n,B,D,V,b,i,o]),de=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f(f({},_),e),{},{ref:Fu(t,(function(e){e&&Q("LABEL"===e.tagName)})),onClick:N(e.onClick,(function(){var e;K||(null==(e=Y.current)||e.click(),requestAnimationFrame((function(){var e;null==(e=Y.current)||e.focus({preventScroll:!0})})))})),"data-disabled":O(n),"data-checked":O(ae),"data-invalid":O(i)})}),[_,n,ae,i,K]),pe=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:Fu(Y,t),type:"checkbox",name:k,value:w,id:s,tabIndex:S,onChange:N(e.onChange,ie),onBlur:N(e.onBlur,P,(function(){return z(!1)})),onFocus:N(e.onFocus,A,(function(){return z(!0)})),onKeyDown:N(e.onKeyDown,ue),onKeyUp:N(e.onKeyUp,le),required:a,checked:ae,disabled:se,readOnly:o,"aria-label":T,"aria-labelledby":E,"aria-invalid":C?Boolean(C):i,"aria-describedby":d,"aria-disabled":n,style:xE})}),[k,w,s,ie,P,A,ue,le,a,ae,se,o,T,E,C,i,d,n,S]),he=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,onMouseDown:N(e.onMouseDown,ZE),"data-disabled":O(n),"data-checked":O(ae),"data-invalid":O(i)})}),[ae,n,i]);return{state:{isInvalid:i,isFocused:B,isChecked:ae,isActive:J,isHovered:V,isIndeterminate:b,isDisabled:n,isReadOnly:o,isRequired:a},getRootProps:de,getCheckboxProps:ce,getIndicatorProps:fe,getInputProps:pe,getLabelProps:he,htmlProps:_}}function ZE(e){e.preventDefault(),e.stopPropagation()}var UE=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],VE={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},qE={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},HE=Qx({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),WE=Qx({from:{opacity:0},to:{opacity:1}}),JE=Qx({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),GE=g((function(e,t){var n=vE(),o=Rr("Checkbox",f(f({},n),e)),a=yt(e),i=a.spacing,s=void 0===i?"0.5rem":i,l=a.className,c=a.children,d=a.iconColor,p=a.iconSize,h=a.icon,m=void 0===h?(0,gr.jsx)(kE,{}):h,g=a.isChecked,y=a.isDisabled,b=void 0===y?null==n?void 0:n.isDisabled:y,k=a.onChange,w=a.inputProps,x=u(a,UE),S=g;(null==n?void 0:n.value)&&a.value&&(S=n.value.includes(a.value));var E=k;(null==n?void 0:n.onChange)&&a.value&&(E=function(){for(var e=arguments.length,t=new Array(e),n=0;n ").concat(o).toLowerCase()}catch(a){return"DICT".toLowerCase()}return e.toLowerCase()},oC=function(e){return e.name},aC=function(e){return e.typeV2.topLevelType},iC=function(e){return e.typeV2.innerType1},sC=function(e){return e.typeV2.innerType2},uC=function(e){return e.isRequired},lC=function(e,t,n,r,o){return e.map((function(e,a){if("plan"!==oC(e)){var i="STRING";try{switch(aC(e)){case"INTEGER":i="INTEGER";break;case"STRING":i="STRING";break;case"BOOL":i="BOOL";break;case"FLOAT":i="FLOAT";break;case"DICT":i="DICT";break;case"LIST":i="LIST";break;default:i="JSON"}}catch(s){console.log("no data type provided, falling back to string")}return(0,gr.jsxs)(vu,{color:"white",children:[(0,gr.jsxs)(vu,{mr:"3",direction:"column",w:"15%",children:[(0,gr.jsxs)(Ur,{marginLeft:3,align:"right",fontSize:"l",children:[$E()(e.name),(0,gr.jsx)(Ur,{fontSize:"l",as:"span",color:"red",children:(0,gr.jsx)(yy,{label:"Required variable",children:(0,gr.jsx)("span",{children:e.isRequired?" *":null})})}),(0,gr.jsx)(yy,{label:e.description,children:(0,gr.jsx)(KE,{marginLeft:2})})]}),(0,gr.jsx)(Ur,{marginLeft:3,as:"kbd",fontSize:"xs",align:"right",children:rC(i,e)})]}),(0,gr.jsxs)(vu,{flex:"1",mr:"3",direction:"column",children:[r[a].length>0?(0,gr.jsx)(Ur,{marginLeft:3,align:"left",fontSize:"xs",color:"red.500",children:r[a]}):null,cC(e.name,i,r,n,a,t,o)]})]},"entry-".concat(a))}}))},cC=function(e,t,n,r,o,a,i){var s="".concat(i,"-").concat(e);switch(t){case"INTEGER":case"STRING":case"BOOL":case"LIST":case"FLOAT":return(0,gr.jsx)(cE,{color:"gray.300",onChange:function(e){return a(e.target.value,o)},value:r[o],borderColor:n[o]?"red.400":null});case"JSON":return(0,gr.jsx)(_r,{border:n[o]?"1px":null,borderColor:n[o]?"red.400":null,children:ST(s,(function(e){return a(e,o)}))});case"DICT":return(0,gr.jsx)(_r,{border:n[o]?"1px":null,borderColor:n[o]?"red.400":null,children:nC((function(e){return a(e,o)}))});default:return(0,gr.jsx)("p",{children:"Unsupported data type encountered"},"data-".concat(o))}},fC=function(e){if(void 0===e||"undefined"===e||0===e.length)return!1;try{return JSON.parse(e),!0}catch(t){return!1}},dC=function(e,t){var n=function(e){switch(e.trim().toLowerCase()){case"int":case"integer":case"float":return"number";case"str":case"string":return"string";case"bool":case"boolean":return"boolean";case"dict":case"json":return"object"}}(t),r=e.trim(),o="[".concat(r,"]"),a=JSON.parse(o);return a.forEach((function(e){var t=typeof e;if(t!==n)throw"Invalid datatype: Expected ".concat(n," but got ").concat(t)})),a},pC=function(e){var t=e.createEnclave,n=Ga(),o=Wa().state.kurtosisPackage,a=(0,r.useState)(!1),i=(0,v.Z)(a,2),s=i[0],u=i[1],c=(0,r.useState)(""),d=(0,v.Z)(c,2),h=d[0],g=d[1],y=(0,r.useState)(!1),b=(0,v.Z)(y,2),k=b[0],w=b[1],x={};o.args.forEach((function(e,t){"plan"!==e.name&&(x[t]="")}));var S=(0,r.useState)(x),T=(0,v.Z)(S,2),E=T[0],C=T[1],_={};o.args.forEach((function(e,t){"plan"!==e.name&&(_[t]="")}));var O=(0,r.useState)(_),I=(0,v.Z)(O,2),N=I[0],P=I[1],A=function(){var e=m(p().mark((function e(n,r,o){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n,r,o);case 2:u(!1);case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();return(0,gr.jsx)("div",{className:"w-screen",children:(0,gr.jsxs)(br,{templateAreas:'"option"\n "packageId"\n "main"\n "configure"',gridTemplateRows:"60px 60px 1fr 60px",gridTemplateColumns:"1fr",h:"100%",w:"100%",color:"blackAlpha.700",fontWeight:"bold",gap:2,children:[(0,gr.jsx)(pE,{area:"option",pt:"1",children:(0,gr.jsx)(YE,{catalog:!0})}),(0,gr.jsx)(pE,{area:"packageId",p:"1",children:(0,gr.jsxs)(vu,{direction:"column",gap:"2",children:[(0,gr.jsx)(Mr,{children:(0,gr.jsxs)(Ur,{color:"white",fontSize:"2xl",children:[" ",o.name," "]})}),(0,gr.jsx)(GE,{marginLeft:2,color:"white",fontSize:"xl",isChecked:k,onChange:function(e){return w(e.target.checked)},children:(0,gr.jsxs)(Ur,{children:["Restart services",(0,gr.jsx)(yy,{label:"When enabled, Kurtosis will automatically restart any services that crash inside the enclave",children:(0,gr.jsx)(KE,{marginLeft:2})})]})})]})}),(0,gr.jsx)(pE,{area:"main",h:"90%",overflowY:"scroll",mt:"10",children:(0,gr.jsxs)(RT,{spacing:4,children:[(0,gr.jsxs)(vu,{color:"white",children:[(0,gr.jsx)(vu,{mr:"3",direction:"column",w:"15%",children:(0,gr.jsxs)(Ur,{marginLeft:3,align:"right",fontSize:"l",children:["Enclave Name",(0,gr.jsx)(yy,{label:"Leave empty to auto-generate an enclave name",children:(0,gr.jsx)(KE,{marginLeft:2})})]})}),(0,gr.jsx)(vu,{flex:"1",mr:"3",direction:"column",children:(0,gr.jsx)(cE,{color:"gray.300",value:h,onChange:function(e){return g(e.target.value)}})})]}),lC(o.args,(function(e,t){var n=f(f({},E),{},(0,l.Z)({},t,e));if(C(n),N[t]){var r=f(f({},N),{},(0,l.Z)({},t,!1));P(r)}}),E,N,o.name)]})}),(0,gr.jsx)(pE,{area:"configure",m:"10px",children:(0,gr.jsxs)(vu,{gap:5,children:[(0,gr.jsx)(iS,{colorScheme:"red",w:"50%",onClick:function(){n("/catalog")},children:" Cancel "}),(0,gr.jsx)(iS,{bg:"#24BA27",w:"50%",onClick:function(){var e={};if(Object.keys(E).filter((function(t){var n=o.args[t],r="";try{r=aC(n)}catch(u){}if(uC(n)||0!==E[t].length){var a=!0;if("STRING"===r)a=function(e){if("undefined"===e||0===e.length)return!1;try{return"string"===typeof JSON.parse(e)}catch(t){return!e.includes('"')&&!e.includes("'")}}(E[t]);else if("INTEGER"===r)a=function(e){if("undefined"===e)return!1;try{var t=e.trim();return/^-?\d+$/.test(t)}catch(n){return!1}}(E[t]);else if("BOOL"===r)a=function(e){var t=e.trim();return["TRUE","FALSE"].includes(t.toUpperCase())}(E[t]);else if("FLOAT"===r)a=function(e){if("undefined"===e)return!1;var t=e.trim();return 0!==t.length&&!isNaN(Number(t))}(E[t]);else if("LIST"===r){var i=iC(n);a=function(e,t){if("undefined"===e)return!1;try{return dC(e,t),!0}catch(n){return!1}}(E[t],i)}else a="DICT"===r||"JSON"===r?fC(E[t]):function(e){try{tC.load(e)}catch(t){return!1}return!0}(E[t]);var s=r;s=void 0===r?"JSON":"BOOL"===r?"BOOLEAN (TRUE/FALSE)":rC(r,o.args[t]),a||(e[t]="Incorrect type: expected ".concat(s))}})),Object.keys(E).filter((function(t){var n=!0;uC(o.args[t])&&0===E[t].length&&(n=!1),n||(e[t]="This field is required and cannot be empty")})),0===Object.keys(e).length){u(!0);var t={};Object.keys(E).map((function(e){var n=o.args[e],r=oC(n),a="";try{a=aC(n)}catch(l){}var i,s=E[e];if(s.length>0)if("INTEGER"===a)i=parseInt(s),t[r]=i;else if("BOOL"===a)i=s.toUpperCase(),t[r]="TRUE"===i;else if("FLOAT"===a)i=parseFloat(s),t[r]=i;else if("LIST"===a){var u=iC(o,e);i=dC(s,u),t[r]=i}else"STRING"===a?t[r]=s:(i=JSON.parse(s),t[r]=i)}));var n=JSON.stringify(t),r={packageId:o.name,args:n};A(r,h,k)}else{var a=f(f({},N),e);P(a)}},isLoading:s,loadingText:"Running...",children:"Run"})]})})]})})},hC=["children","styleType","stylePosition","spacing"],mC=["as"],vC=["as"],gC=mc({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" "}),yC=(0,v.Z)(gC,2),bC=yC[0],kC=yC[1],wC=g((function(e,t){var n=Rr("List",e),r=yt(e),o=r.children,a=r.styleType,i=void 0===a?"none":a,s=r.stylePosition,c=r.spacing,d=u(r,hC),p=AT(o),h=c?(0,l.Z)({},"& > *:not(style) ~ *:not(style)",{mt:c}):{};return(0,gr.jsx)(bC,{value:n,children:(0,gr.jsx)(vr.ul,f(f({ref:t,listStyleType:i,listStylePosition:s,role:"list",__css:f(f({},n.container),h)},d),{},{children:p}))})}));wC.displayName="List",g((function(e,t){e.as;var n=u(e,mC);return(0,gr.jsx)(wC,f({ref:t,as:"ol",styleType:"decimal",marginStart:"1em"},n))})).displayName="OrderedList",g((function(e,t){e.as;var n=u(e,vC);return(0,gr.jsx)(wC,f({ref:t,as:"ul",styleType:"initial",marginStart:"1em"},n))})).displayName="UnorderedList";var xC=g((function(e,t){var n=kC();return(0,gr.jsx)(vr.li,f(f({ref:t},e),{},{__css:n.item}))}));xC.displayName="ListItem";var SC=g((function(e,t){var n=kC();return(0,gr.jsx)(wy,f(f({ref:t,role:"presentation"},e),{},{__css:n.icon}))}));SC.displayName="ListIcon";var TC=["placement"],EC=["className"],CC=["className"],_C=vr("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),OC=g((function(e,t){var n,r,o,a=e.placement,i=void 0===a?"left":a,s=u(e,TC),c=zT(),d=c.field,p="left"===i?"insetStart":"insetEnd",h=f((n={},(0,l.Z)(n,p,"0"),(0,l.Z)(n,"width",null!=(r=null==d?void 0:d.height)?r:null==d?void 0:d.h),(0,l.Z)(n,"height",null!=(o=null==d?void 0:d.height)?o:null==d?void 0:d.h),(0,l.Z)(n,"fontSize",null==d?void 0:d.fontSize),n),c.element);return(0,gr.jsx)(_C,f({ref:t,__css:h},s))}));OC.id="InputElement",OC.displayName="InputElement";var IC=g((function(e,t){var n=e.className,r=u(e,EC),o=T("chakra-input__left-element",n);return(0,gr.jsx)(OC,f({ref:t,placement:"left",className:o},r))}));IC.id="InputLeftElement",IC.displayName="InputLeftElement";var NC=g((function(e,t){var n=e.className,r=u(e,CC),o=T("chakra-input__right-element",n);return(0,gr.jsx)(OC,f({ref:t,placement:"right",className:o},r))}));NC.id="InputRightElement",NC.displayName="InputRightElement";var PC=xy({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),AC=n(5586);function jC(e){return e&&"object"===typeof e?"position"in e||"type"in e?DC(e.position):"start"in e||"end"in e?DC(e):"line"in e||"column"in e?RC(e):"":""}function RC(e){return FC(e&&e.line)+":"+FC(e&&e.column)}function DC(e){return RC(e&&e.start)+"-"+RC(e&&e.end)}function FC(e){return e&&"number"===typeof e?e:1}var LC=function(e){(0,Hr.Z)(n,e);var t=(0,Wr.Z)(n);function n(e,r,o){var a;(0,Vr.Z)(this,n);var i=[null,null],s={start:{line:null,column:null},end:{line:null,column:null}};if(a=t.call(this),"string"===typeof r&&(o=r,r=void 0),"string"===typeof o){var u=o.indexOf(":");-1===u?i[1]=o:(i[0]=o.slice(0,u),i[1]=o.slice(u+1))}return r&&("type"in r||"position"in r?r.position&&(s=r.position):"start"in r||"end"in r?s=r:("line"in r||"column"in r)&&(s.start=r)),a.name=jC(r)||"1:1",a.message="object"===typeof e?e.message:e,a.stack="","object"===typeof e&&e.stack&&(a.stack=e.stack),a.reason=a.message,a.fatal,a.line=s.start.line,a.column=s.start.column,a.position=s,a.source=i[0],a.ruleId=i[1],a.file,a.actual,a.expected,a.url,a.note,a}return(0,qr.Z)(n)}(Kr(Error));LC.prototype.file="",LC.prototype.name="",LC.prototype.reason="",LC.prototype.message="",LC.prototype.stack="",LC.prototype.fatal=null,LC.prototype.column=null,LC.prototype.line=null,LC.prototype.source=null,LC.prototype.ruleId=null,LC.prototype.position=null;var MC={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');BC(e);var n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.charCodeAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";var i=-1,s=t.length-1;for(;a--;)if(47===e.charCodeAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),s>-1&&(e.charCodeAt(a)===t.charCodeAt(s--)?s<0&&(o=a):(s=-1,o=i));r===o?o=i:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(BC(e),0===e.length)return".";var t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)},extname:function(e){BC(e);var t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){var s=e.charCodeAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}if(a<0||r<0||0===i||1===i&&a===r-1&&a===o+1)return"";return e.slice(a,r)},join:function(){for(var e,t=-1,n=arguments.length,r=new Array(n),o=0;o2){if((r=o.lastIndexOf("/"))!==o.length-1){r<0?(o="",a=0):a=(o=o.slice(0,r)).length-1-o.lastIndexOf("/"),i=u,s=0;continue}}else if(o.length>0){o="",a=0,i=u,s=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,u):o=e.slice(i+1,u),a=u-i-1;i=u,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},sep:"/"};function BC(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var zC={cwd:function(){return"/"}};function ZC(e){return null!==e&&"object"===typeof e&&e.href&&e.origin}function UC(e){if("string"===typeof e)e=new URL(e);else if(!ZC(e)){var 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){var n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return function(e){if(""!==e.hostname){var t=new TypeError('File URL host must be "localhost" or empty on darwin');throw t.code="ERR_INVALID_FILE_URL_HOST",t}var n=e.pathname,r=-1;for(;++r1?u-1:0),c=1;co.length;l&&o.push(a);try{u=e.apply(this,o)}catch(r){if(l&&n)throw r;return a(r)}l||(u instanceof Promise?u.then(i,a):u instanceof Error?a(u):i(u))}function a(e){if(!n){n=!0;for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a1?n-1:0),u=1;ua?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)(o=Array.from(r)).unshift(t,n),e.splice.apply(e,(0,i.Z)(o));else for(n&&e.splice(t,n);s0?(c_(e,e.length,0,t),e):t}var d_={}.hasOwnProperty;function p_(e){for(var t={},n=-1;++nr))return;for(var l,c,f=o.events.length,d=f;d--;)if("exit"===o.events[d][0]&&"chunkFlow"===o.events[d][1].type){if(l){c=o.events[d][1].end;break}l=!0}for(g(i),u=f;ut;){var r=a[n];o.containerState=r[1],r[0].exit.call(o,e)}a.length=t}function y(){t.write([null]),n=void 0,t=void 0,o.containerState._closeFlow=void 0}}},A_={tokenize:function(e,t,n){return I_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var j_={tokenize:function(e,t,n){return function(t){return E_(t)?I_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||S_(e)?t(e):n(e)}},partial:!0};function R_(e){for(var t,n,r,o,a,i,s,u={},l=-1;++l=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}},partial:!0};var M_={tokenize:function(e){var t=this,n=e.attempt(j_,(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,I_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(F_,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)}}};var B_={resolveAll:V_()},z_=U_("string"),Z_=U_("text");function U_(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return u(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return u(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function u(e){if(null===e)return!0;var t=r[e],o=-1;if(t)for(;++o-1){var s=n[0];"string"===typeof s?n[0]=s.slice(o):n.shift()}i>0&&n.push(e[a].slice(0,i))}return n}(s,e)}function p(){var e=r;return{line:e.line,column:e.column,offset:e.offset,_index:e._index,_bufferIndex:e._bufferIndex}}function h(){for(var e;r._index=3&&(null===a||S_(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),E_(t)?I_(e,a,"whitespace")(t):a(t))}}};var G_={name:"list",tokenize:function(e,t,n){var r=this,o=r.events[r.events.length-1],a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){var o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:k_(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(J_,n,u)(t):u(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return k_(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),u(t)):n(t)}function u(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(j_,r.interrupt?n:l,e.attempt(Y_,f,c))}function l(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function c(t){return E_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(j_,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,I_(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!E_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(X_,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,I_(e,e.attempt(G_,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},Y_={tokenize:function(e,t,n){var r=this;return I_(e,(function(e){var o=r.events[r.events.length-1];return!E_(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},X_={tokenize:function(e,t,n){var r=this;return I_(e,(function(e){var 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)},partial:!0};var $_={name:"blockQuote",tokenize:function(e,t,n){var r=this;return function(t){if(62===t){var a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return E_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){var r=this;return function(t){if(E_(t))return I_(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt($_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function K_(e,t,n,r,o,a,i,s,u){var l=u||Number.POSITIVE_INFINITY,c=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),f;if(null===t||32===t||41===t||b_(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||S_(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(o){return c||null!==o&&41!==o&&!T_(o)?c999||null===f||91===f||93===f&&!i||94===f&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):93===f?(e.exit(a),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):S_(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||S_(t)||u++>999?(e.exit("chunkString"),l(t)):(e.consume(t),i||(i=!E_(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,c):c(t)}}function eO(e,t,n,r,o,a){var i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),u(n))}function u(t){return t===i?(e.exit(a),s(i)):null===t?n(t):S_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I_(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===i||null===t||S_(t)?(e.exit("chunkString"),u(t)):(e.consume(t),92===t?c:l)}function c(t){return t===i||92===t?(e.consume(t),l):l(t)}}function tO(e,t){var n;return function r(o){if(S_(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(E_(o))return I_(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}function nO(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var rO={name:"definition",tokenize:function(e,t,n){var r,o=this;return function(t){return e.enter("definition"),function(t){return Q_.call(o,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return r=nO(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return T_(t)?tO(e,s)(t):s(t)}function s(t){return K_(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function u(t){return e.attempt(oO,l,l)(t)}function l(t){return E_(t)?I_(e,c,"whitespace")(t):c(t)}function c(a){return null===a||S_(a)?(e.exit("definition"),o.parser.defined.push(r),t(a)):n(a)}}},oO={tokenize:function(e,t,n){return function(t){return T_(t)?tO(e,r)(t):n(t)};function r(t){return eO(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return E_(t)?I_(e,a,"whitespace")(t):a(t)}function a(e){return null===e||S_(e)?t(e):n(e)}},partial:!0};var aO={name:"codeIndented",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("codeIndented"),I_(e,o,"linePrefix",5)(t)};function o(e){var t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?s(t):S_(t)?e.attempt(iO,a,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||S_(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},iO={tokenize:function(e,t,n){var r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):S_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):I_(e,a,"linePrefix",5)(t)}function a(e){var a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):S_(e)?o(e):n(e)}},partial:!0};var sO={name:"headingAtx",tokenize:function(e,t,n){var 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||T_(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||S_(n)?(e.exit("atxHeading"),t(n)):E_(n)?I_(e,a,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function s(t){return null===t||35===t||T_(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),s)}},resolve:function(e,t){var n,r,o=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);o-2>a&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4);o>a&&c_(e,a,o-a+1,[["enter",n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},t],["enter",r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},t],["exit",r,t],["exit",n,t]]);return e}};var uO={name:"setextUnderline",tokenize:function(e,t,n){var r,o=this;return function(t){var i,s=o.events.length;for(;s--;)if("lineEnding"!==o.events[s][1].type&&"linePrefix"!==o.events[s][1].type&&"content"!==o.events[s][1].type){i="paragraph"===o.events[s][1].type;break}if(!o.parser.lazy[o.now().line]&&(o.interrupt||i))return e.enter("setextHeadingLine"),r=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===r?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),E_(t)?I_(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||S_(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){var n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);var i={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[o][1].end)):e[n][1]=i;return e.push(["exit",i,t]),e}};var lO=["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"],cO=["pre","script","style","textarea"],fO={name:"htmlFlow",tokenize:function(e,t,n){var r,o,a,i,s,u=this;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(i){return 33===i?(e.consume(i),c):47===i?(e.consume(i),o=!0,p):63===i?(e.consume(i),r=3,u.interrupt?t:R):v_(i)?(e.consume(i),a=String.fromCharCode(i),h):n(i)}function c(o){return 45===o?(e.consume(o),r=2,f):91===o?(e.consume(o),r=5,i=0,d):v_(o)?(e.consume(o),r=4,u.interrupt?t:R):n(o)}function f(r){return 45===r?(e.consume(r),u.interrupt?t:R):n(r)}function d(r){var o="CDATA[";return r===o.charCodeAt(i++)?(e.consume(r),6===i?u.interrupt?t:C:d):n(r)}function p(t){return v_(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(i){if(null===i||47===i||62===i||T_(i)){var s=47===i,l=a.toLowerCase();return s||o||!cO.includes(l)?lO.includes(a.toLowerCase())?(r=6,s?(e.consume(i),m):u.interrupt?t(i):C(i)):(r=7,u.interrupt&&!u.parser.lazy[u.now().line]?n(i):o?v(i):g(i)):(r=1,u.interrupt?t(i):C(i))}return 45===i||g_(i)?(e.consume(i),a+=String.fromCharCode(i),h):n(i)}function m(r){return 62===r?(e.consume(r),u.interrupt?t:C):n(r)}function v(t){return E_(t)?(e.consume(t),v):T(t)}function g(t){return 47===t?(e.consume(t),T):58===t||95===t||v_(t)?(e.consume(t),y):E_(t)?(e.consume(t),g):T(t)}function y(t){return 45===t||46===t||58===t||95===t||g_(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),k):E_(t)?(e.consume(t),b):g(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):E_(t)?(e.consume(t),k):x(t)}function w(t){return t===s?(e.consume(t),s=null,S):null===t||S_(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||T_(t)?b(t):(e.consume(t),x)}function S(e){return 47===e||62===e||E_(e)?g(e):n(e)}function T(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||S_(t)?C(t):E_(t)?(e.consume(t),E):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),P):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),R):93===t&&5===r?(e.consume(t),j):!S_(t)||6!==r&&7!==r?null===t||S_(t)?(e.exit("htmlFlowData"),_(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(dO,F,_)(t))}function _(t){return e.check(pO,O,F)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||S_(t)?_(t):(e.enter("htmlFlowData"),C(t))}function N(t){return 45===t?(e.consume(t),R):C(t)}function P(t){return 47===t?(e.consume(t),a="",A):C(t)}function A(t){if(62===t){var n=a.toLowerCase();return cO.includes(n)?(e.consume(t),D):C(t)}return v_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),A):C(t)}function j(t){return 93===t?(e.consume(t),R):C(t)}function R(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),R):C(t)}function D(t){return null===t||S_(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),D)}function F(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){var 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},concrete:!0},dO={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(j_,t,n)}},partial:!0},pO={tokenize:function(e,t,n){var r=this;return function(t){if(S_(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)}},partial:!0};var hO={tokenize:function(e,t,n){var 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)}},partial:!0},mO={name:"codeFenced",tokenize:function(e,t,n){var r,o=this,a={tokenize:function(e,t,n){var a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u}function u(t){return e.enter("codeFencedFence"),E_(t)?I_(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===r?(a++,e.consume(t),c):a>=s?(e.exit("codeFencedFenceSequence"),E_(t)?I_(e,f,"whitespace")(t):f(t)):n(t)}function f(r){return null===r||S_(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},i=0,s=0;return function(t){return function(t){var n=o.events[o.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(t)}(t)};function u(t){return t===r?(s++,e.consume(t),u):s<3?n(t):(e.exit("codeFencedFenceSequence"),E_(t)?I_(e,l,"whitespace")(t):l(t))}function l(n){return null===n||S_(n)?(e.exit("codeFencedFence"),o.interrupt?t(n):e.check(hO,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||S_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):E_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),I_(e,f,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),c)}function f(t){return null===t||S_(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||S_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===r?n(t):(e.consume(t),d)}function p(t){return e.attempt(a,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&E_(t)?I_(e,v,"linePrefix",i+1)(t):v(t)}function v(t){return null===t||S_(t)?e.check(hO,p,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||S_(t)?(e.exit("codeFlowValue"),v(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var vO=document.createElement("i");function gO(e){var t="&"+e+";";vO.innerHTML=t;var n=vO.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}var yO={name:"characterReference",tokenize:function(e,t,n){var r,o,a=this,i=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"),u):(e.enter("characterReferenceValue"),r=31,o=g_,l(t))}function u(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,o=w_,l):(e.enter("characterReferenceValue"),r=7,o=k_,l(t))}function l(s){if(59===s&&i){var u=e.exit("characterReferenceValue");return o!==g_||gO(a.sliceSerialize(u))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;var f=Object.assign({},e[n][1].end),d=Object.assign({},e[c][1].start);OO(f,-s),OO(d,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},i={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[c][1].start),end:d},o={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[c][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},i.end)},e[n][1].end=Object.assign({},a.start),e[c][1].start=Object.assign({},i.end),u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=f_(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=f_(u,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=f_(u,H_(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),u=f_(u,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,u=f_(u,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,c_(e,n-1,c-n+3,u),c=n+u.length-l-2;break}c=-1;for(;++c13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":String.fromCharCode(n)}var XO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $O(e){return e.replace(XO,KO)}function KO(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){var r=n.charCodeAt(1),o=120===r||88===r;return YO(n.slice(o?2:1),o?16:10)}return gO(n)||e}var QO={}.hasOwnProperty,eI=function(t,n,r){return"string"!==typeof n&&(r=n,n=void 0),function(e){var t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ne),autolinkProtocol:_,autolinkEmail:_,atxHeading:s(K),blockQuote:s(J),characterEscape:_,characterReference:_,codeFenced:s(G),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(G,u),codeText:s(Y,u),codeTextData:_,data:_,codeFlowValue:_,definition:s(X),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s($),hardBreakEscape:s(Q),hardBreakTrailing:s(Q),htmlFlow:s(ee,u),htmlFlowData:_,htmlText:s(ee,u),htmlTextData:_,image:s(te),label:u,link:s(ne),listItem:s(oe),listItemValue:h,listOrdered:s(re,p),listUnordered:s(re),paragraph:s(ae),reference:Z,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(K),strong:s(ie),thematicBreak:s(ue)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:W,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:q,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:c(b),codeText:c(j),codeTextData:O,data:O,definition:c(),definitionDestinationString:x,definitionLabelString:k,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(N),hardBreakTrailing:c(N),htmlFlow:c(P),htmlFlowData:O,htmlText:c(A),htmlTextData:O,image:c(D),label:L,labelText:F,lineEnding:I,link:c(R),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:U,resourceDestinationString:M,resourceTitleString:B,resource:z,setextHeading:c(C),setextHeadingLineSequence:E,setextHeadingText:T,strong:c(),thematicBreak:c()}};nI(t,(e||{}).mdastExtensions||[]);var n={};return r;function r(e){for(var n={type:"root",children:[]},r={stack:[n],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:d,setData:a,getData:i},s=[],c=-1;++c0){var h=r.tokenStack[r.tokenStack.length-1];(h[1]||oI).call(r,void 0,h[0])}for(n.position={start:tI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tI(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c55295&&a<57344){var s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),o=1):i="\ufffd"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}var sI=function(e){if(void 0===e||null===e)return lI;if("string"===typeof e)return function(e){return uI(t);function t(t){return t&&t.type===e}}(e);if("object"===typeof e)return Array.isArray(e)?function(e){var t=[],n=-1;for(;++n1?n-1:0),o=1;o":"")+")"})}return f;function f(){var l,c,f,d=[];if((!t||o(i,s,u[u.length-1]||null))&&(d=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[true,e];return[e]}(n(i,u)),false===d[0]))return d;if(i.children&&"skip"!==d[0])for(c=(r?i.children.length:-1)+a,f=u.concat(i);c>-1&&c-1?n.offset:null}}}var mI={}.hasOwnProperty;function vI(e){return String(e||"").toUpperCase()}function gI(e,t){var n,r=String(t.identifier).toUpperCase(),o=iI(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);-1===a?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,n=e.footnoteOrder.length):(e.footnoteCounts[r]++,n=a+1);var i=e.footnoteCounts[r],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+o,id:e.clobberPrefix+"fnref-"+o+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);var u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function yI(e,t){var n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};var o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});var i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function bI(e){var t=e.spread;return void 0===t||null===t?e.children.length>1:t}var kI=9,wI=32;function xI(e){for(var t=String(e),n=/\r?\n|\r/g,r=n.exec(t),o=0,a=[];r;)a.push(SI(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(SI(t.slice(o),o>0,!1)),a.join("")}function SI(e,t,n){var r=0,o=e.length;if(t)for(var a=e.codePointAt(r);a===kI||a===wI;)r++,a=e.codePointAt(r);if(n)for(var i=e.codePointAt(o-1);i===kI||i===wI;)o--,i=e.codePointAt(o-1);return o>r?e.slice(r,o):""}var TI={blockquote:function(e,t){var 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){var n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){var n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);var a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a={type:"element",tagName:"pre",properties:{},children:[a=e.applyData(t,a)]},e.patch(t,a),a},delete:function(e,t){var n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){var n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:gI,footnote:function(e,t){for(var n=e.footnoteById,r=1;r in n;)r++;var o=String(r);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},gI(e,{type:"footnoteReference",identifier:o,position:t.position})},heading:function(e,t){var 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.dangerous){var n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){var n=e.definition(t.identifier);if(!n)return yI(e,t);var r={src:iI(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);var o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){var n={src:iI(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);var r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){var n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);var r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){var n=e.definition(t.identifier);if(!n)return yI(e,t);var r={href:iI(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);var o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){var n={href:iI(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);var 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){var r=e.all(t),o=n?function(e){var t=!1;if("list"===e.type){t=e.spread||!1;for(var n=e.children,r=-1;!t&&++r0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}for(var c=-1;++c0){var i={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=dI(t.children[1]),u=pI(t.children[t.children.length-1]);s.line&&u.line&&(i.position={start:s,end:u}),o.push(i)}var l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)},tableCell:function(e,t){var n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){for(var r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length,s=-1,u=[];++s0&&n.push({type:"text",value:"\n"}),n}function jI(e,t){var n=_I(e,t),r=n.one(e,null),o=function(e){for(var t=[],n=-1;++n1?"-"+s:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21a9"}]};s>1&&l.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(s)}]}),u.length>0&&u.push({type:"text",value:" "}),u.push(l)}var c=o[o.length-1];if(c&&"element"===c.type&&"p"===c.tagName){var d,p=c.children[c.children.length-1];p&&"text"===p.type?p.value+=" ":c.children.push({type:"text",value:" "}),(d=c.children).push.apply(d,u)}else o.push.apply(o,u);var h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(o,!0)};e.patch(r,h),t.push(h)}}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:f(f({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{},{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return o&&r.children.push({type:"text",value:"\n"},o),Array.isArray(r)?{type:"root",children:r}:r}var RI=function(e,t){return e&&"run"in e?function(e,t){return function(n,r,o){e.run(jI(n,t),r,(function(e){o(e)}))}}(e,t):function(e){return function(t){return jI(t,e)}}(e||t)};var DI=n(2007),FI=(0,qr.Z)((function e(t,n,r){(0,Vr.Z)(this,e),this.property=t,this.normal=n,r&&(this.space=r)}));function LI(e,t){for(var n={},r={},o=-1;++oo||-1!==(o=t.indexOf("#"))&&r>o?t:"javascript:void(0)"}var xN={}.hasOwnProperty,SN=new Set(["table","thead","tbody","tfoot","tr"]);function TN(e,t){for(var n,r=[],o=-1;++o0?r.createElement(m,c,d):r.createElement(m,c)}function CN(e,t){for(var n=-1,r=0;++n4&&"data"===n.slice(0,4)&&pN.test(t)){if("-"===t.charAt(4)){var a=t.slice(5).replace(hN,gN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{var i=t.slice(4);if(!hN.test(i)){var s=i.replace(mN,vN);"-"!==s.charAt(0)&&(s="-"+s),t="data"+s}}o=XI}return new o(r,t)}(r.schema,t),a=n;null!==a&&void 0!==a&&a===a&&(Array.isArray(a)&&(a=o.commaSeparated?function(e,t){var n=t||{};return(""===e[e.length-1]?[].concat((0,i.Z)(e),[""]):e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(a):a.join(" ").trim()),"style"===o.property&&"string"===typeof a&&(a=function(e){var t={};try{bN(e,n)}catch(r){}return t;function n(e,n){var r="-ms-"===e.slice(0,4)?"ms-".concat(e.slice(4)):e;t[r.replace(/-([a-z])/g,ON)]=n}}(a)),o.space&&o.property?e[xN.call(yN,o.property)?yN[o.property]:o.property]=a:o.attribute&&(e[o.attribute]=a))}function ON(e,t){return t.toUpperCase()}var IN={}.hasOwnProperty,NN={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function PN(e){for(var t in NN)if(IN.call(NN,t)&&IN.call(e,t)){var n=NN[t];console.warn("[react-markdown] Warning: please ".concat(n.to?"use `".concat(n.to,"` instead of"):"remove"," `").concat(t,"` (see <").concat("https://github.com/remarkjs/react-markdown/blob/main/changelog.md","#").concat(n.id,"> for more info)")),delete NN[t]}var o=KC().use(aI).use(e.remarkPlugins||[]).use(RI,f(f({},e.remarkRehypeOptions),{},{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(cN,e),a=new qC;"string"===typeof e.children?a.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));var i=o.runSync(o.parse(a),a);if("root"!==i.type)throw new TypeError("Expected a `root` node");var s=r.createElement(r.Fragment,{},TN({options:e,schema:uN,listDepth:0},i));return e.className&&(s=r.createElement("div",{className:e.className},s)),s}PN.propTypes={children:DI.string,className:DI.string,allowElement:DI.func,allowedElements:DI.arrayOf(DI.string),disallowedElements:DI.arrayOf(DI.string),unwrapDisallowed:DI.bool,remarkPlugins:DI.arrayOf(DI.oneOfType([DI.object,DI.func,DI.arrayOf(DI.oneOfType([DI.bool,DI.string,DI.object,DI.func,DI.arrayOf(DI.any)]))])),rehypePlugins:DI.arrayOf(DI.oneOfType([DI.object,DI.func,DI.arrayOf(DI.oneOfType([DI.bool,DI.string,DI.object,DI.func,DI.arrayOf(DI.any)]))])),sourcePos:DI.bool,rawSourcePos:DI.bool,skipHtml:DI.bool,includeElementIndex:DI.bool,transformLinkUri:DI.oneOfType([DI.func,DI.bool]),linkTarget:DI.oneOfType([DI.func,DI.string]),transformImageUri:DI.func,components:DI.object};for(var AN={tokenize:function(e,t,n){var r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),o;return n(a)};function o(e){return null===e?n(e):t(e)}},partial:!0},jN={tokenize:function(e,t,n){var r,o,a;return i;function i(t){return 46===t||95===t?e.check(DN,u,s)(t):null===t||T_(t)||__(t)||45!==t&&C_(t)?u(t):(a=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),i}function u(e){return o||r||!a?n(e):t(e)}},partial:!0},RN={tokenize:function(e,t){var n=0,r=0;return o;function o(i){return 40===i?(n++,e.consume(i),o):41===i&&r0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}zN[43]=BN,zN[45]=BN,zN[46]=BN,zN[95]=BN,zN[72]=[BN,MN],zN[104]=[BN,MN],zN[87]=[BN,LN],zN[119]=[BN,LN];var GN={tokenize:function(e,t,n){var r=this;return I_(e,(function(e){var 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 YN(){var e;return{document:(0,l.Z)({},91,{tokenize:QN,continuation:{tokenize:eP},exit:tP}),text:(e={},(0,l.Z)(e,91,{tokenize:KN}),(0,l.Z)(e,93,{add:"after",tokenize:XN,resolveTo:$N}),e)}}function XN(e,t,n){for(var r,o=this,a=o.events.length,i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);a--;){var s=o.events[a][1];if("labelImage"===s.type){r=s;break}if("gfmFootnoteCall"===s.type||"labelLink"===s.type||"label"===s.type||"image"===s.type||"link"===s.type)break}return function(a){if(!r||!r._balanced)return n(a);var s=nO(o.sliceSerialize({start:r.end,end:o.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function $N(e,t){for(var n=e.length;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";var 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++;var a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice.apply(e,[n,e.length-n+1].concat(s)),e}function KN(e,t,n){var r,o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),i=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",u)}function u(s){if(i>999||93===s&&!r||null===s||91===s||T_(s))return n(s);if(93===s){e.exit("chunkString");var c=e.exit("gfmFootnoteCallString");return a.includes(nO(o.sliceSerialize(c)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return T_(s)||(r=!0),i++,e.consume(s),92===s?l:u}function l(t){return 91===t||92===t||93===t?(e.consume(t),i++,u):u(t)}}function QN(e,t,n){var r,o,a=this,i=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),u};function u(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(t)}function l(t){if(s>999||93===t&&!o||null===t||91===t||T_(t))return n(t);if(93===t){e.exit("chunkString");var i=e.exit("gfmFootnoteDefinitionLabelString");return r=nO(a.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return T_(t)||(o=!0),s++,e.consume(t),92===t?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(r)||i.push(r),I_(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function eP(e,t,n){return e.check(j_,t,e.attempt(GN,t,n))}function tP(e){e.exit("gfmFootnoteDefinition")}function nP(e){var t=(e||{}).singleTilde,n={tokenize:function(e,n,r){var o=this.previous,a=this.events,i=0;return function(t){if(126===o&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){var u=CO(o);if(126===a)return i>1?r(a):(e.consume(a),i++,s);if(i<2&&!t)return r(a);var l=e.exit("strikethroughSequenceTemporary"),c=CO(a);return l._open=!c||2===c&&Boolean(u),l._close=!u||2===u&&Boolean(c),n(a)}},resolveAll:function(e,t){var n=-1;for(;++n0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1])),n.push(this.map[t][2]),e.length=this.map[t][0];n.push((0,i.Z)(e)),e.length=0;for(var r=n.pop();r;)e.push.apply(e,(0,i.Z)(r)),r=n.pop();this.map.length=0}}}]),e}();function oP(e,t){for(var n=!1,r=[];t-1;){var r=o.events[t][1].type;if("lineEnding"!==r&&"linePrefix"!==r)break;t--}var a=t>-1?o.events[t][1].type:null,i="tableHead"===a||"tableRow"===a?k:s;if(i===k&&o.parser.lazy[o.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return u(e);return r=!0,i+=1,u(e)}(t)}function u(t){return null===t?n(t):S_(t)?i>1?(i=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):n(t):E_(t)?I_(e,u,"whitespace")(t):(i+=1,r&&(r=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,u):(e.enter("data"),l(t)))}function l(t){return null===t||124===t||T_(t)?(e.exit("data"),u(t)):(e.consume(t),92===t?c:l)}function c(t){return 92===t||124===t?(e.consume(t),l):l(t)}function f(t){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(t):(e.enter("tableDelimiterRow"),r=!1,E_(t)?I_(e,d,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?h(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return E_(t)?I_(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||S_(t)?y(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),v(t)):b(t)}function v(t){return 45===t?(e.consume(t),v):58===t?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(t))}function g(t){return E_(t)?I_(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?d(n):(null===n||S_(n))&&r&&a===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function k(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||S_(n)?(e.exit("tableRow"),t(n)):E_(n)?I_(e,w,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||T_(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:x)}function S(t){return 92===t||124===t?(e.consume(t),x):x(t)}},resolveAll:function(e,t){var n,r,o,a=-1,i=!0,s=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d=new rP;for(;++an[2]+1){var p=n[2]+1,h=n[3]-n[2]-1;e.add(p,h,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return void 0!==o&&(a.end=Object.assign({},uP(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function sP(e,t,n,r,o){var a=[],i=uP(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function uP(e,t){var n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var lP={tokenize:function(e,t,n){var 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 T_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return S_(r)?t(r):E_(r)?e.check({tokenize:fP},t,n)(r):n(r)}}},cP={text:(0,l.Z)({},91,lP)};function fP(e,t,n){return I_(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}function dP(e,t){var n=String(e);if("string"!==typeof t)throw new TypeError("Expected character");for(var r=0,o=n.indexOf(t);-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}var pP={}.hasOwnProperty,hP=function(e,t,n,r){var o,a;"string"===typeof t||t instanceof RegExp?(a=[[t,n]],o=r):(a=t,o=n),o||(o={});for(var s=sI(o.ignore||[]),u=function(e){var t=[];if("object"!==typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e))for(var n=-1;++n0?{type:"text",value:m}:void 0),!1!==m){var v;if(a!==p&&f.push({type:"text",value:e.value.slice(a,p)}),Array.isArray(m))(v=f).push.apply(v,(0,i.Z)(m));else m&&f.push(m);a=p+d[0].length,c=!0}if(!r.global)break;d=r.exec(e.value)}if(c){var g;a?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);var n=t[0],r=n.indexOf(")"),o=dP(e,"("),a=dP(e,")");for(;-1!==r&&o>a;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),a++;return[e,n]}(n+r);if(!i[0])return!1;var s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function SP(e,t,n,r){return!(!TP(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TP(e,t){var n=e.input.charCodeAt(e.index-1);return(0===e.index||__(n)||C_(n))&&(!t||47!==n)}function EP(e){return e.label||!e.identifier?e.label||"":$O(e.identifier)}function CP(e,t,n,r){for(var o=r.join.length;o--;){var a=r.join[o](e,t,n,r);if(!0===a||1===a)break;if("number"===typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}var _P=/\r?\n|\r/g;function OP(e){if(!e._compiled){var t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function IP(e,t){return NP(e,t.inConstruct,!0)&&!NP(e,t.notInConstruct,!1)}function NP(e,t,n){if("string"===typeof t&&(t=[t]),!t||0===t.length)return n;for(var r=-1;++r=m||(v+10?" ":"")),o.shift(4),a+=o.move(function(e,t){for(var n,r=[],o=0,a=0;n=_P.exec(e);)i(e.slice(o,n.index)),r.push(n[0]),o=n.index+n[0].length,a++;return i(e.slice(o)),r.join("");function i(e){r.push(t(e,a,!e))}}(function(e,t,n){var r=t.indexStack,o=e.children||[],a=t.createTracker(n),i=[],s=-1;for(r.push(-1);++s0&&("\r"===s||"\n"===s)&&"html"===l.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" ",(u=t.createTracker(n)).move(a.join(""))),a.push(u.move(t.handle(l,e,t,f(f({},u.current()),{},{before:s,after:c})))),s=a[a.length-1].slice(-1)}return r.pop(),a.join("")}VP.peek=function(){return"["};YP.peek=function(){return"~"};var JP={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},GP={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:YP}};function YP(e,t,n,r){var o=RP(r),a=n.enter("strikethrough"),i=o.move("~~");return i+=WP(e,n,f(f({},o.current()),{},{before:i,after:"~"})),i+=o.move("~~"),a(),i}function XP(e,t,n){for(var r=e.value||"",o="`",a=-1;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a1&&void 0!==arguments[1]?arguments[1]:{},r=(n.align||[]).concat(),o=n.stringLength||$P,a=[],i=[],s=[],u=[],l=0,c=-1;++cl&&(l=e[c].length);++pu[p])&&(u[p]=m)}f.push(h)}i[c]=f,s[c]=d}var v=-1;if("object"===typeof r&&"length"in r)for(;++vu[v]&&(u[v]=S),b[v]=S),y[v]=T}i.splice(1,0,y),s.splice(1,0,b),c=-1;for(var E=[];++c-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);var i=a.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));var s=n.createTracker(r);s.move(a+" ".repeat(i-a.length)),s.shift(i);var u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?a:a+" ".repeat(i-a.length))+e}));return u(),l}var aA={exit:{taskListCheckValueChecked:sA,taskListCheckValueUnchecked:sA,paragraph:function(e){var t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"===typeof t.checked){var n=this.stack[this.stack.length-1],r=n.children[0];if(r&&"text"===r.type){for(var o,a=t.children,i=-1;++i0&&void 0!==arguments[0]?arguments[0]:{},t=this.data();function n(e,n){(t[e]?t[e]:t[e]=[]).push(n)}n("micromarkExtensions",function(e){return p_([ZN,YN(),nP(e),aP,cP])}(e)),n("fromMarkdownExtensions",[bP,{enter:{gfmFootnoteDefinition:DP,gfmFootnoteDefinitionLabelString:FP,gfmFootnoteCall:BP,gfmFootnoteCallString:zP},exit:{gfmFootnoteDefinition:MP,gfmFootnoteDefinitionLabelString:LP,gfmFootnoteCall:UP,gfmFootnoteCallString:ZP}},JP,QP,aA]),n("toMarkdownExtensions",function(e){return{extensions:[kP,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:qP,footnoteReference:VP}},GP,rA(e),iA]}}(e))}var lA=function(e){var t=e.content;return(0,gr.jsx)("div",{className:"markdown bg-white prose m-5",style:{height:"100%"},children:(0,gr.jsx)(PN,{children:t,remarkPlugins:[uA]})})},cA=function(e){var t=e.renderKurtosisPackages,n=e.selectedKurtosisPackage;return(0,gr.jsxs)(br,{templateAreas:'"enclaves description"',gridTemplateRows:"1fr",gridTemplateColumns:"1fr 1fr",h:"100%",w:"100%",color:"blackAlpha.700",fontWeight:"bold",gap:2,children:[(0,gr.jsx)(pE,{area:"enclaves",h:"100%",overflowY:"scroll",children:(0,gr.jsx)(wC,{spacing:1,padding:"10px",h:"100%",children:t()})}),(0,gr.jsx)(pE,{area:"description",h:"100%",overflowY:"scroll",className:"bg-white",children:n.description?(0,gr.jsx)(lA,{content:n.description}):(0,gr.jsx)(lA,{content:"No Description found for: ".concat(n.name)})})]})},fA=function(e){var t=e.kurtosisPackages,n=Ga(),o=(0,r.useState)([]),a=(0,v.Z)(o,2),i=a[0],s=a[1],u=(0,r.useState)({}),l=(0,v.Z)(u,2),c=l[0],f=l[1];(0,r.useEffect)((function(){s(t)}),[t.length]);var d=function(){return i.map((function(e,t){var n=e.name===c.name?"#24BA27":"gray.300";if("name"in e)return(0,gr.jsx)(xC,{bg:n,onClick:function(){var t;(t=e).name===c.name?f({}):f(t)},children:(0,gr.jsx)(Mr,{h:"70px",w:"100%",children:(0,gr.jsxs)(Ur,{fontSize:"2xl",color:"blue.800",fontWeight:"bold",children:[" ",e.name," "]})})},t)}))};return(0,gr.jsx)("div",{className:"w-screen",children:(0,gr.jsxs)(br,{templateAreas:'"option"\n "search"\n "main"\n "configure"',gridTemplateRows:"60px 60px 1fr 60px",gridTemplateColumns:"1fr",h:"100%",w:"100%",color:"blackAlpha.700",fontWeight:"bold",gap:2,children:[(0,gr.jsx)(pE,{area:"option",pt:"1",children:(0,gr.jsx)(YE,{catalog:!0})}),(0,gr.jsx)(pE,{area:"search",m:"10px",children:(0,gr.jsxs)(ZT,{children:[(0,gr.jsx)(IC,{pointerEvents:"none",children:(0,gr.jsx)(PC,{color:"gray.300"})}),(0,gr.jsx)(cE,{placeholder:"Package Name",color:"gray.300",onChange:function(e){var n=e.target.value;""===n&&s(t);var r=t.filter((function(e){if("name"in e){var t=n.trim();return e.name.toLowerCase().includes(t)}return!1}));s(r)}})]})}),(0,gr.jsx)(pE,{area:"main",h:"100%",overflowY:"scroll",children:"name"in c?(0,gr.jsx)(cA,{renderKurtosisPackages:d,selectedKurtosisPackage:c}):(0,gr.jsx)(wC,{spacing:1,padding:"10px",h:"100%",children:d()})}),(0,gr.jsx)(pE,{area:"configure",m:"10px",children:(0,gr.jsx)(iS,{bg:"#24BA27",w:"100%",isDisabled:0===Object.keys(c).length,onClick:function(){n("/catalog/form",{state:{kurtosisPackage:c}})},children:"Configure >> "})})]})})},dA=function(e){var t=e.packageId,n=e.enclave,o=e.args,a=e.appData,s=Ga(),u=(0,r.useState)(!1),l=(0,v.Z)(u,2),c=l[0],f=l[1],d=(0,r.useState)([]),h=(0,v.Z)(d,2),g=h[0],y=h[1],b=(0,r.useState)([]),k=(0,v.Z)(b,2),w=k[0],x=k[1],S=function(){var e=m(p().mark((function e(t){var n,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eu(t.host,t.port,a.jwtToken,a.apiHost);case 2:n=e.sent,(r=n.services).length>w.length&&x(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(e){if("instruction"===e.case&&y((function(t){return[].concat((0,i.Z)(t),[e.value.executableInstruction])})),"progressInfo"===e.case&&e.value.currentStepInfo.length>0&&void 0!==e.value.currentStepInfo[e.value.currentStepNumber]&&y((function(t){return[].concat((0,i.Z)(t),[e.value.currentStepInfo[e.value.currentStepNumber]])})),"instructionResult"===e.case&&e.value.serializedInstructionResult&&(e.value.serializedInstructionResult.includes("added with service")&&S(n),y((function(t){return[].concat((0,i.Z)(t),[e.value.serializedInstructionResult])}))),"error"===e.case){var t=e.value.error.value.errorMessage;y((function(e){return[].concat((0,i.Z)(e),[t])}))}};(0,r.useEffect)((function(){var e;f(!0);var r=function(){var r=m(p().mark((function r(){var i,s,u,l,c,d,h;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Hx(n.host,n.port,t,o,a.jwtToken,a.apiHost);case 3:e=r.sent,i=!1,s=!1,r.prev=6,l=fu(e);case 8:return r.next=10,l.next();case 10:if(!(i=!(c=r.sent).done)){r.next=17;break}d=c.value,h=d.runResponseLine,T(h);case 14:i=!1,r.next=8;break;case 17:r.next=23;break;case 19:r.prev=19,r.t0=r.catch(6),s=!0,u=r.t0;case 23:if(r.prev=23,r.prev=24,!i||null==l.return){r.next=28;break}return r.next=28,l.return();case 28:if(r.prev=28,!s){r.next=31;break}throw u;case 31:return r.finish(28);case 32:return r.finish(23);case 33:r.next=38;break;case 35:r.prev=35,r.t1=r.catch(0),console.error("Error occured while reading data from the enclave: ",n.name);case 38:return r.prev=38,f(!1),r.finish(38);case 41:case"end":return r.stop()}}),r,null,[[0,35,38,41],[6,19,23,33],[24,,28,32]])})));return function(){return r.apply(this,arguments)}}();r()}),[t]);var E=function(e){s("/enclaves/".concat(n.name,"/services/").concat(e.serviceUuid),{state:{services:w,selected:e}})};return(0,gr.jsx)("div",{className:"flex h-full",children:(0,gr.jsxs)("div",{className:"flex h-full",children:[(0,gr.jsx)(tu,{home:!1,heading:"Services",isServiceInfo:!0,renderList:function(){return function(e,t){return e.map((function(e){return(0,gr.jsx)("div",{className:"flex items-center justify-center h-14 text-base bg-[#24BA27]",onClick:function(){return t(e)},children:(0,gr.jsxs)("div",{className:"cursor-default text-lg text-white",children:[" ",e.name," "]})},e.name)}))}(w,E)}}),(0,gr.jsx)("div",{className:"flex h-full w-[calc(100vw-39rem)] flex-col space-y-5",children:(0,gr.jsxs)("div",{className:"flex flex-col h-full space-y-1 bg-[#171923]",children:[(0,gr.jsxs)(vu,{bg:"#171923",height:"80px",children:[(0,gr.jsx)(_r,{p:"2",m:"4",children:(0,gr.jsxs)(Ur,{color:"white",fontSize:"xl",as:"b",children:["Logs for ",n.name]})}),(0,gr.jsx)(gu,{})]}),c&&0===g.length?(0,gr.jsx)(ru,{}):g.length>0?(0,gr.jsx)(Bx,{logs:g,fileName:n.name}):(0,gr.jsx)(Mr,{color:"white",children:" No Logs Available"})]})}),(0,gr.jsx)(nu,{home:!1,isServiceInfo:!c,enclaveName:n.name})]})})},pA=function(e){var t=e.appData,n=Wa().state,r=n.enclave,o=n.runArgs.packageId,a=n.runArgs.args;return(0,gr.jsx)("div",{className:"h-full w-full flex",children:(0,gr.jsx)(dA,{args:a,packageId:o,enclave:r,appData:t})})};function hA(e,t){return function(){return e.apply(t,arguments)}}var mA,vA=Object.prototype.toString,gA=Object.getPrototypeOf,yA=(mA=Object.create(null),function(e){var t=vA.call(e);return mA[t]||(mA[t]=t.slice(8,-1).toLowerCase())}),bA=function(e){return e=e.toLowerCase(),function(t){return yA(t)===e}},kA=function(e){return function(t){return typeof t===e}},wA=Array.isArray,xA=kA("undefined");var SA=bA("ArrayBuffer");var TA=kA("string"),EA=kA("function"),CA=kA("number"),_A=function(e){return null!==e&&"object"===typeof e},OA=function(e){if("object"!==yA(e))return!1;var t=gA(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},IA=bA("Date"),NA=bA("File"),PA=bA("Blob"),AA=bA("FileList"),jA=bA("URLSearchParams");function RA(e,t){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==o&&o;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),wA(e))for(n=0,r=e.length;n0;)if(t===(n=r[o]).toLowerCase())return n;return null}var FA="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,LA=function(e){return!xA(e)&&e!==FA};var MA,BA=(MA="undefined"!==typeof Uint8Array&&gA(Uint8Array),function(e){return MA&&e instanceof MA}),zA=bA("HTMLFormElement"),ZA=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),UA=bA("RegExp"),VA=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};RA(n,(function(n,o){var a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},qA="abcdefghijklmnopqrstuvwxyz",HA="0123456789",WA={DIGIT:HA,ALPHA:qA,ALPHA_DIGIT:qA+qA.toUpperCase()+HA};var JA=bA("AsyncFunction"),GA={isArray:wA,isArrayBuffer:SA,isBuffer:function(e){return null!==e&&!xA(e)&&null!==e.constructor&&!xA(e.constructor)&&EA(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"===typeof FormData&&e instanceof FormData||EA(e.append)&&("formdata"===(t=yA(e))||"object"===t&&EA(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&SA(e.buffer)},isString:TA,isNumber:CA,isBoolean:function(e){return!0===e||!1===e},isObject:_A,isPlainObject:OA,isUndefined:xA,isDate:IA,isFile:NA,isBlob:PA,isRegExp:UA,isFunction:EA,isStream:function(e){return _A(e)&&EA(e.pipe)},isURLSearchParams:jA,isTypedArray:BA,isFileList:AA,forEach:RA,merge:function e(){for(var t=(LA(this)&&this||{}).caseless,n={},r=function(r,o){var a=t&&DA(n,o)||o;OA(n[a])&&OA(r)?n[a]=e(n[a],r):OA(r)?n[a]=e({},r):wA(r)?n[a]=r.slice():n[a]=r},o=0,a=arguments.length;o3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,a,i,s={};if(t=t||{},null==e)return t;do{for(a=(o=Object.getOwnPropertyNames(e)).length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&gA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:yA,kindOfTest:bA,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(wA(e))return e;var t=e.length;if(!CA(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:zA,hasOwnProperty:ZA,hasOwnProp:ZA,reduceDescriptors:VA,freezeMethods:function(e){VA(e,(function(t,n){if(EA(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];EA(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return wA(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:DA,global:FA,isContextDefined:LA,ALPHABET:WA,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WA.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&EA(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(_A(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=wA(n)?[]:{};return RA(n,(function(t,n){var a=e(t,r+1);!xA(a)&&(o[n]=a)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:JA,isThenable:function(e){return e&&(_A(e)||EA(e))&&EA(e.then)&&EA(e.catch)}};function YA(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}GA.inherits(YA,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:GA.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var XA=YA.prototype,$A={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){$A[e]={value:e}})),Object.defineProperties(YA,$A),Object.defineProperty(XA,"isAxiosError",{value:!0}),YA.from=function(e,t,n,r,o,a){var i=Object.create(XA);return GA.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),YA.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};var KA=YA;function QA(e){return GA.isPlainObject(e)||GA.isArray(e)}function ej(e){return GA.endsWith(e,"[]")?e.slice(0,-2):e}function tj(e,t,n){return e?e.concat(t).map((function(e,t){return e=ej(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var nj=GA.toFlatObject(GA,{},null,(function(e){return/^is[A-Z]/.test(e)}));var rj=function(e,t,n){if(!GA.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=GA.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!GA.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&GA.isSpecCompliantForm(t);if(!GA.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(GA.isDate(e))return e.toISOString();if(!s&&GA.isBlob(e))throw new KA("Blob is not supported. Use a Buffer instead.");return GA.isArrayBuffer(e)||GA.isTypedArray(e)?s&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){var s=e;if(e&&!o&&"object"===typeof e)if(GA.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(GA.isArray(e)&&function(e){return GA.isArray(e)&&!e.some(QA)}(e)||(GA.isFileList(e)||GA.endsWith(n,"[]"))&&(s=GA.toArray(e)))return n=ej(n),s.forEach((function(e,r){!GA.isUndefined(e)&&null!==e&&t.append(!0===i?tj([n],r,a):null===i?n:n+"[]",u(e))})),!1;return!!QA(e)||(t.append(tj(o,n,a),u(e)),!1)}var c=[],f=Object.assign(nj,{defaultVisitor:l,convertValue:u,isVisitable:QA});if(!GA.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!GA.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),GA.forEach(n,(function(n,a){!0===(!(GA.isUndefined(n)||null===n)&&o.call(t,n,GA.isString(a)?a.trim():a,r,f))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t};function oj(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function aj(e,t){this._pairs=[],e&&rj(e,this,t)}var ij=aj.prototype;ij.append=function(e,t){this._pairs.push([e,t])},ij.toString=function(e){var t=e?function(t){return e.call(this,t,oj)}:oj;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var sj=aj;function uj(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lj(e,t,n){if(!t)return e;var r,o=n&&n.encode||uj,a=n&&n.serialize;if(r=a?a(t,n):GA.isURLSearchParams(t)?t.toString():new sj(t,n).toString(o)){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var cj=function(){function e(){(0,Vr.Z)(this,e),this.handlers=[]}return(0,qr.Z)(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){GA.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),fj=cj,dj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pj={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:sj,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},isStandardBrowserEnv:function(){var e;return("undefined"===typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!==typeof window&&"undefined"!==typeof document)}(),isStandardBrowserWebWorkerEnv:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};var hj=function(e){function t(e,n,r,o){var a=e[o++],i=Number.isFinite(+a),s=o>=e.length;return a=!a&&GA.isArray(r)?r.length:a,s?(GA.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i):(r[a]&&GA.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&GA.isArray(r[a])&&(r[a]=function(e){var t,n,r={},o=Object.keys(e),a=o.length;for(t=0;t-1,a=GA.isObject(e);if(a&&GA.isHTMLForm(e)&&(e=new FormData(e)),GA.isFormData(e))return o&&o?JSON.stringify(hj(e)):e;if(GA.isArrayBuffer(e)||GA.isBuffer(e)||GA.isStream(e)||GA.isFile(e)||GA.isBlob(e))return e;if(GA.isArrayBufferView(e))return e.buffer;if(GA.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return rj(e,new pj.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return pj.isNode&&GA.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=GA.isFileList(e))||r.indexOf("multipart/form-data")>-1){var i=this.env&&this.env.FormData;return rj(n?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),function(e,t,n){if(GA.isString(e))try{return(t||JSON.parse)(e),GA.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||mj.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&GA.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o){if("SyntaxError"===a.name)throw KA.from(a,KA.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pj.classes.FormData,Blob:pj.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};GA.forEach(["delete","get","head","post","put","patch"],(function(e){mj.headers[e]={}}));var vj=mj,gj=GA.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yj=Symbol("internals");function bj(e){return e&&String(e).trim().toLowerCase()}function kj(e){return!1===e||null==e?e:GA.isArray(e)?e.map(kj):String(e)}function wj(e,t,n,r,o){return GA.isFunction(r)?r.call(this,t,n):(o&&(t=n),GA.isString(t)?GA.isString(r)?-1!==t.indexOf(r):GA.isRegExp(r)?r.test(t):void 0:void 0)}var xj=function(e,t){function n(e){(0,Vr.Z)(this,n),e&&this.set(e)}return(0,qr.Z)(n,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=bj(t);if(!o)throw new Error("header name must be a non-empty string");var a=GA.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=kj(e))}var a=function(e,t){return GA.forEach(e,(function(e,n){return o(e,n,t)}))};return GA.isPlainObject(e)||e instanceof this.constructor?a(e,t):GA.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a(function(e){var t,n,r,o={};return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!t||o[t]&&gj[t]||("set-cookie"===t?o[t]?o[t].push(n):o[t]=[n]:o[t]=o[t]?o[t]+", "+n:n)})),o}(e),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=bj(e)){var n=GA.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(GA.isFunction(t))return t.call(this,r,n);if(GA.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=bj(e)){var n=GA.findKey(this,e);return!(!n||void 0===this[n]||t&&!wj(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=bj(e)){var o=GA.findKey(n,e);!o||t&&!wj(0,n[o],o,t)||(delete n[o],r=!0)}}return GA.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!wj(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return GA.forEach(this,(function(r,o){var a=GA.findKey(n,o);if(a)return t[a]=kj(r),void delete t[o];var i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();i!==o&&delete t[o],t[i]=kj(r),n[i]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r1?n-1:0),o=1;o1?"since :\n"+s.map(Dj).join("\n"):" "+Dj(s[0]):"as no adapter specified";throw new KA("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n};function Mj(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new _j(null,e)}function Bj(e){return Mj(e),e.headers=Sj.from(e.headers),e.data=Tj.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lj(e.adapter||vj.adapter)(e).then((function(t){return Mj(e),t.data=Tj.call(e,e.transformResponse,t),t.headers=Sj.from(t.headers),t}),(function(t){return Ej(t)||(Mj(e),t&&t.response&&(t.response.data=Tj.call(e,e.transformResponse,t.response),t.response.headers=Sj.from(t.response.headers))),Promise.reject(t)}))}var zj=function(e){return e instanceof Sj?e.toJSON():e};function Zj(e,t){t=t||{};var n={};function r(e,t,n){return GA.isPlainObject(e)&&GA.isPlainObject(t)?GA.merge.call({caseless:n},e,t):GA.isPlainObject(t)?GA.merge({},t):GA.isArray(t)?t.slice():t}function o(e,t,n){return GA.isUndefined(t)?GA.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!GA.isUndefined(t))return r(void 0,t)}function i(e,t){return GA.isUndefined(t)?GA.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}var u={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:function(e,t){return o(zj(e),zj(t),!0)}};return GA.forEach(Object.keys(Object.assign({},e,t)),(function(r){var a=u[r]||o,i=a(e[r],t[r],r);GA.isUndefined(i)&&a!==s||(n[r]=i)})),n}var Uj="1.5.1",Vj={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Vj[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var qj={};Vj.transitional=function(e,t,n){function r(e,t){return"[Axios v1.5.1] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,a){if(!1===e)throw new KA(r(o," has been removed"+(t?" in "+t:"")),KA.ERR_DEPRECATED);return t&&!qj[o]&&(qj[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var Hj={assertOptions:function(e,t,n){if("object"!==typeof e)throw new KA("options must be an object",KA.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],u=void 0===s||i(s,a,e);if(!0!==u)throw new KA("option "+a+" must be "+u,KA.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new KA("Unknown option "+a,KA.ERR_BAD_OPTION)}},validators:Vj},Wj=Hj.validators,Jj=function(){function e(t){(0,Vr.Z)(this,e),this.defaults=t,this.interceptors={request:new fj,response:new fj}}return(0,qr.Z)(e,[{key:"request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n=t=Zj(this.defaults,t),r=n.transitional,o=n.paramsSerializer,a=n.headers;void 0!==r&&Hj.assertOptions(r,{silentJSONParsing:Wj.transitional(Wj.boolean),forcedJSONParsing:Wj.transitional(Wj.boolean),clarifyTimeoutError:Wj.transitional(Wj.boolean)},!1),null!=o&&(GA.isFunction(o)?t.paramsSerializer={serialize:o}:Hj.assertOptions(o,{encode:Wj.function,serialize:Wj.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var i=a&&GA.merge(a.common,a[t.method]);a&&GA.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=Sj.concat(i,a);var s=[],u=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var l,c=[];this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));var f,d=0;if(!u){var p=[Bj.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,c),f=p.length,l=Promise.resolve(t);d0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t((function(e,t,o){r.reason||(r.reason=new _j(e,t,o),n(r.reason))}))}return(0,qr.Z)(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),Xj=Yj;var $j={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($j).forEach((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];$j[r]=n}));var Kj=$j;var Qj=function e(t){var n=new Gj(t),r=hA(Gj.prototype.request,n);return GA.extend(r,Gj.prototype,n,{allOwnKeys:!0}),GA.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Zj(t,n))},r}(vj);Qj.Axios=Gj,Qj.CanceledError=_j,Qj.CancelToken=Xj,Qj.isCancel=Ej,Qj.VERSION=Uj,Qj.toFormData=rj,Qj.AxiosError=KA,Qj.Cancel=Qj.CanceledError,Qj.all=function(e){return Promise.all(e)},Qj.spread=function(e){return function(t){return e.apply(null,t)}},Qj.isAxiosError=function(e){return GA.isObject(e)&&!0===e.isAxiosError},Qj.mergeConfig=Zj,Qj.AxiosHeaders=Sj,Qj.formToJSON=function(e){return hj(GA.isHTMLForm(e)?new FormData(e):e)},Qj.getAdapter=Lj,Qj.HttpStatusCode=Kj,Qj.default=Qj;var eR=Qj,tR=function(){var e=m(p().mark((function e(){var t,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eR.post("https://cloud.kurtosis.com:9770/kurtosis_package_indexer.KurtosisPackageIndexer/GetPackages",{field:""},{headers:{"Content-Type":"application/json"}});case 3:if(t=e.sent,!("packages"in(n=t.data))){e.next=7;break}return e.abrupt("return",n.packages);case 7:return e.abrupt("return",[]);case 10:return e.prev=10,e.t0=e.catch(0),console.log("error occurred"),e.abrupt("return",[]);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),nR=function(e){var t=e.addEnclave,n=Ga(),o=su().appData,a=(0,r.useState)([]),i=(0,v.Z)(a,2),s=i[0],u=i[1];(0,r.useEffect)((function(){var e=function(){var e=m(p().mark((function e(){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tR();case 2:t=e.sent,u(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]);var l=function(){var e=m(p().mark((function e(r,a,i){var s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=function(){var e=m(p().mark((function e(){var s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Vx(o.jwtToken,o.apiHost,a,i);case 3:s=e.sent,t(s),n("/catalog/progress",{state:{enclave:s,runArgs:r}}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),alert("Error occurred while creating enclave for package. An error message should be printed in console, please share it with us to help debug this problem");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),e.next=3,s();case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();return(0,gr.jsx)("div",{className:"h-full w-full flex",children:(0,gr.jsxs)(mi,{children:[(0,gr.jsx)(pi,{path:"/progress",element:(0,gr.jsx)(pA,{appData:o})}),(0,gr.jsx)(pi,{path:"/form",element:(0,gr.jsx)(pC,{createEnclave:l})}),(0,gr.jsx)(pi,{path:"/",element:(0,gr.jsx)(fA,{kurtosisPackages:s})})]})})},rR={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]};var oR={enter:{duration:.2,ease:rR.easeOut},exit:{duration:.1,ease:rR.easeIn}},aR=function(e,t){return f(f({},e),{},{delay:"number"===typeof t?t:null==t?void 0:t.enter})},iR=function(e,t){return f(f({},e),{},{delay:"number"===typeof t?t:null==t?void 0:t.exit})},sR=["unmountOnExit","in","reverse","className","offsetX","offsetY","transition","transitionEnd","delay"],uR={initial:function(e){var t,n=e.offsetX,r=e.offsetY,o=e.transition,a=e.transitionEnd,i=e.delay;return{opacity:0,x:n,y:r,transition:null!=(t=null==o?void 0:o.exit)?t:iR(oR.exit,i),transitionEnd:null==a?void 0:a.exit}},enter:function(e){var t,n=e.transition,r=e.transitionEnd,o=e.delay;return{opacity:1,x:0,y:0,transition:null!=(t=null==n?void 0:n.enter)?t:aR(oR.enter,o),transitionEnd:null==r?void 0:r.enter}},exit:function(e){var t,n=e.offsetY,r=e.offsetX,o=e.transition,a=e.transitionEnd,i=e.reverse,s=e.delay,u={x:r,y:n};return f({opacity:0,transition:null!=(t=null==o?void 0:o.exit)?t:iR(oR.exit,s)},i?f(f({},u),{},{transitionEnd:null==a?void 0:a.exit}):{transitionEnd:f(f({},u),null==a?void 0:a.exit)})}},lR={initial:"initial",animate:"enter",exit:"exit",variants:uR},cR=(0,r.forwardRef)((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.reverse,a=void 0===o||o,i=e.className,s=e.offsetX,l=void 0===s?0:s,c=e.offsetY,d=void 0===c?8:c,p=e.transition,h=e.transitionEnd,m=e.delay,v=u(e,sR),g=!n||r&&n,y=r||n?"enter":"exit",b={offsetX:l,offsetY:d,reverse:a,transition:p,transitionEnd:h,delay:m};return(0,gr.jsx)(my,{custom:b,children:g&&(0,gr.jsx)(uy.div,f(f({ref:t,className:T("chakra-offset-slide",i),custom:b},lR),{},{animate:y},v))})}));cR.displayName="SlideFade";var fR=["unmountOnExit","in","reverse","initialScale","className","transition","transitionEnd","delay"],dR={exit:function(e){var t,n=e.reverse,r=e.initialScale,o=e.transition,a=e.transitionEnd,i=e.delay;return f(f({opacity:0},n?{scale:r,transitionEnd:null==a?void 0:a.exit}:{transitionEnd:f({scale:r},null==a?void 0:a.exit)}),{},{transition:null!=(t=null==o?void 0:o.exit)?t:iR(oR.exit,i)})},enter:function(e){var t,n=e.transitionEnd,r=e.transition,o=e.delay;return{opacity:1,scale:1,transition:null!=(t=null==r?void 0:r.enter)?t:aR(oR.enter,o),transitionEnd:null==n?void 0:n.enter}}},pR={initial:"exit",animate:"enter",exit:"exit",variants:dR},hR=(0,r.forwardRef)((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.reverse,a=void 0===o||o,i=e.initialScale,s=void 0===i?.95:i,l=e.className,c=e.transition,d=e.transitionEnd,p=e.delay,h=u(e,fR),m=!n||r&&n,v=r||n?"enter":"exit",g={initialScale:s,reverse:a,transition:c,transitionEnd:d,delay:p};return(0,gr.jsx)(my,{custom:g,children:m&&(0,gr.jsx)(uy.div,f(f({ref:t,className:T("chakra-offset-slide",l)},pR),{},{animate:v,custom:g},h))})}));hR.displayName="ScaleFade";var mR=["preset","motionProps"],vR={slideInBottom:f(f({},lR),{},{custom:{offsetY:16,reverse:!0}}),slideInRight:f(f({},lR),{},{custom:{offsetX:16,reverse:!0}}),slideInTop:f(f({},lR),{},{custom:{offsetY:-16,reverse:!0}}),slideInLeft:f(f({},lR),{},{custom:{offsetX:-16,reverse:!0}}),scale:f(f({},pR),{},{custom:{initialScale:.95,reverse:!0}}),none:{}},gR=vr(uy.section),yR=(0,r.forwardRef)((function(e,t){var n=e.preset,r=e.motionProps,o=void 0===r?function(e){return vR[e||"none"]}(n):r,a=u(e,mR);return(0,gr.jsx)(gR,f(f({ref:t},o),a))}));yR.displayName="ModalTransition";var bR=Object.defineProperty,kR=function(e,t,n){return function(e,t,n){t in e?bR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==typeof t?t+"":t,n),n},wR=new(function(){function e(){(0,Vr.Z)(this,e),kR(this,"modals"),this.modals=new Map}return(0,qr.Z)(e,[{key:"add",value:function(e){return this.modals.set(e,this.modals.size+1),this.modals.size}},{key:"remove",value:function(e){this.modals.delete(e)}},{key:"isTopModal",value:function(e){return!!e&&this.modals.get(e)===this.modals.size}}]),e}());function xR(e,t){var n=(0,r.useState)(0),o=(0,v.Z)(n,2),a=o[0],i=o[1];return(0,r.useEffect)((function(){var n=e.current;if(n){if(t){var r=wR.add(n);i(r)}return function(){wR.remove(n),i(0)}}}),[t,e]),a}var SR=function(e){return"undefined"===typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},TR=new WeakMap,ER=new WeakMap,CR={},_R=0,OR=function e(t){return t&&(t.host||e(t.parentNode))},IR=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=OR(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);CR[n]||(CR[n]=new WeakMap);var a=CR[n],i=[],s=new Set,u=new Set(o);o.forEach((function e(t){t&&!s.has(t)&&(s.add(t),e(t.parentNode))}));return function e(t){t&&!u.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(s.has(t))e(t);else{var o=t.getAttribute(r),u=null!==o&&"false"!==o,l=(TR.get(t)||0)+1,c=(a.get(t)||0)+1;TR.set(t,l),a.set(t,c),i.push(t),1===l&&u&&ER.set(t,!0),1===c&&t.setAttribute(n,"true"),u||t.setAttribute(r,"true")}}))}(t),s.clear(),_R++,function(){i.forEach((function(e){var t=TR.get(e)-1,o=a.get(e)-1;TR.set(e,t),a.set(e,o),t||(ER.has(e)||e.removeAttribute(r),ER.delete(e)),o||e.removeAttribute(n)})),--_R||(TR=new WeakMap,TR=new WeakMap,ER=new WeakMap,CR={})}},NR=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||SR(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),IR(r,o,n,"aria-hidden")):function(){return null}};function PR(e){var t=e.isOpen,n=e.onClose,o=e.id,a=e.closeOnOverlayClick,i=void 0===a||a,s=e.closeOnEsc,u=void 0===s||s,l=e.useInert,c=void 0===l||l,d=e.onOverlayClick,p=e.onEsc,h=(0,r.useRef)(null),m=(0,r.useRef)(null),g=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({role:"dialog"},e),{},{ref:Fu(t,h),id:b,tabIndex:-1,"aria-modal":!0,"aria-labelledby":O?k:void 0,"aria-describedby":j?w:void 0,onClick:N(e.onClick,(function(e){return e.stopPropagation()}))})}),[w,j,b,k,O]),F=(0,r.useCallback)((function(e){e.stopPropagation(),S.current===e.target&&wR.isTopModal(h.current)&&(i&&(null==n||n()),null==d||d())}),[n,i,d]),L=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:Fu(t,m),onClick:N(e.onClick,F),onKeyDown:N(e.onKeyDown,E),onMouseDown:N(e.onMouseDown,T)})}),[E,T,F]);return{isOpen:t,onClose:n,headerId:k,bodyId:w,setBodyMounted:R,setHeaderMounted:I,dialogRef:h,overlayRef:m,getDialogProps:D,getDialogContainerProps:L,index:x}}var AR=mc({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),jR=(0,v.Z)(AR,2),RR=jR[0],DR=jR[1],FR=mc({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),LR=(0,v.Z)(FR,2),MR=LR[0],BR=LR[1],zR=function(e){var t=f({scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0},e),n=t.portalProps,r=t.children,o=t.autoFocus,a=t.trapFocus,i=t.initialFocusRef,s=t.finalFocusRef,u=t.returnFocusOnClose,l=t.blockScrollOnMount,c=t.allowPinchZoom,d=t.preserveScrollBarGap,p=t.motionPreset,h=t.lockFocusAcrossFrames,m=t.onCloseComplete,v=Rr("Modal",t),g=f(f({},PR(t)),{},{autoFocus:o,trapFocus:a,initialFocusRef:i,finalFocusRef:s,returnFocusOnClose:u,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:d,motionPreset:p,lockFocusAcrossFrames:h});return(0,gr.jsx)(MR,{value:g,children:(0,gr.jsx)(RR,{value:v,children:(0,gr.jsx)(my,{onExitComplete:m,children:g.isOpen&&(0,gr.jsx)(Ac,f(f({},n),{},{children:r}))})})})};zR.displayName="Modal";var ZR="data-focus-lock",UR="data-focus-lock-disabled";function VR(e,t){return function(e,t){var n=(0,r.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t||null,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}var qR={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},HR=function(e){var t=e.children;return r.createElement(r.Fragment,null,r.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:qR}),t,t&&r.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:qR}))};HR.propTypes={},HR.defaultProps={children:null};var WR=function(){return WR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0})).sort(xD)},TD=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),ED="".concat(TD,", [data-focus-guard]"),CD=function e(t,n){return sD((t.shadowRoot||t).children).reduce((function(t,r){return t.concat(r.matches(n?ED:TD)?[r]:[],e(r))}),[])},_D=function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?OD([e.contentDocument.body],t):[e]},OD=function(e,t){return e.reduce((function(e,n){var r,o=CD(n,t),a=(r=[]).concat.apply(r,o.map((function(e){return _D(e,t)})));return e.concat(a,n.parentNode?sD(n.parentNode.querySelectorAll(TD)).filter((function(e){return e===n})):[])}),[])},ID=function(e,t){return sD(e).filter((function(e){return pD(t,e)})).filter((function(e){return function(e){return!((vD(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},ND=function(e,t){return void 0===t&&(t=new Map),sD(e).filter((function(e){return hD(t,e)}))},PD=function(e,t,n){return SD(ID(OD(e,n),t),!0,n)},AD=function(e,t){return SD(ID(OD(e),t),!1)},jD=function(e,t){return ID(function(e){var t=e.querySelectorAll("[".concat("data-autofocus-inside","]"));return sD(t).map((function(e){return OD([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e),t)},RD=function e(t,n){return t.shadowRoot?e(t.shadowRoot,n):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,n))||sD(t.children).some((function(t){var r;if(t instanceof HTMLIFrameElement){var o=null===(r=t.contentDocument)||void 0===r?void 0:r.body;return!!o&&e(o,n)}return e(t,n)}))},DD=function e(t){if(void 0===t&&(t=document),t&&t.activeElement){var n=t.activeElement;return n.shadowRoot?e(n.shadowRoot):n instanceof HTMLIFrameElement&&function(e){try{return e()}catch(t){return}}((function(){return n.contentWindow.document}))?e(n.contentWindow.document):n}},FD=function e(t){return t.parentNode?e(t.parentNode):t},LD=function(e){return uD(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(ZR);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(sD(FD(t).querySelectorAll("[".concat(ZR,'="').concat(n,'"]:not([').concat(UR,'="disabled"])')))):[t]),e}),[])},MD=function(e,t){return void 0===t&&(t=DD(lD(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&LD(e).some((function(e){return RD(e,t)||function(e,t){return Boolean(sD(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},BD=function(e,t){return gD(e)&&e.name?function(e,t){return t.filter(gD).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},zD=function(e){return e[0]&&e.length>1?BD(e[0],e):e[0]},ZD=function(e,t){return e.length>1?e.indexOf(BD(e[t],e)):t},UD="NEW_FOCUS",VD=function(e,t,n,r){var o=e.length,a=e[0],i=e[o-1],s=bD(n);if(!(n&&e.indexOf(n)>=0)){var u=void 0!==n?t.indexOf(n):-1,l=r?t.indexOf(r):u,c=r?e.indexOf(r):-1,f=u-l,d=t.indexOf(a),p=t.indexOf(i),h=function(e){var t=new Set;return e.forEach((function(n){return t.add(BD(n,e))})),e.filter((function(e){return t.has(e)}))}(t),m=(void 0!==n?h.indexOf(n):-1)-(r?h.indexOf(r):u),v=ZD(e,0),g=ZD(e,o-1);return-1===u||-1===c?UD:!f&&c>=0?c:u<=d&&s&&Math.abs(f)>1?g:u>=p&&s&&Math.abs(f)>1?v:f&&Math.abs(m)>1?c:u<=d?g:u>p?v:f?Math.abs(f)>1?c:(o+c+f)%o:void 0}},qD=function(e,t,n){var r,o=e.map((function(e){return e.node})),a=ND(o.filter((r=n,function(e){var t,n=null===(t=mD(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return a&&a.length?zD(a):zD(ND(t))},HD=function e(t,n){return void 0===n&&(n=[]),n.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,n),n},WD=function(e,t){for(var n=HD(e),r=HD(t),o=0;o=0)return a}return!1},JD=function(e,t,n){var r=uD(e),o=uD(t),a=r[0],i=!1;return o.filter(Boolean).forEach((function(e){i=WD(i||e,e)||i,n.filter(Boolean).forEach((function(e){var t=WD(a,e);t&&(i=!i||RD(t,i)?t:WD(t,i))}))})),i},GD=function(e,t){var n=DD(uD(e).length>0?document:lD(e).ownerDocument),r=LD(e).filter(kD),o=JD(n||e,e,r),a=new Map,i=AD(r,a),s=PD(r,a).filter((function(e){var t=e.node;return kD(t)}));if(s[0]||(s=i)[0]){var u=AD([o],a).map((function(e){return e.node})),l=function(e,t){var n=new Map;return t.forEach((function(e){return n.set(e.node,e)})),e.map((function(e){return n.get(e)})).filter(wD)}(u,s),c=l.map((function(e){return e.node})),f=VD(c,u,n,t);if(f===UD){var d=qD(i,c,function(e,t){return e.reduce((function(e,n){return e.concat(jD(n,t))}),[])}(r,a));return d?{node:d}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===f?f:l[f]}},YD=0,XD=!1,$D=function(e,t,n){void 0===n&&(n={});var r,o,a=GD(e,t);if(!XD&&a){if(YD>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),XD=!0,void setTimeout((function(){XD=!1}),1);YD++,r=a.node,o=n.focusOptions,"focus"in r&&r.focus(o),"contentWindow"in r&&r.contentWindow&&r.contentWindow.focus(),YD--}},KD=function(e){var t=LD(e).filter(kD),n=JD(e,e,t),r=new Map,o=PD([n],r,!0),a=PD(t,r).filter((function(e){var t=e.node;return kD(t)})).map((function(e){return e.node}));return o.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:a.indexOf(t)>=0,guard:bD(t)}}))};function QD(e){setTimeout(e,1)}var eF=function(){return document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var t=DD(e);return!!t&&sD(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return RD(e,t)}))}()},tF=null,nF=null,rF=null,oF=!1,aF=function(){return!0};function iF(e,t,n,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=n)!==t);o&&(o.node.tabIndex=0)}var sF=function(e){return e&&"current"in e?e.current:e},uF=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},lF=function(){var e,t=!1;if(tF){var n=tF,r=n.observed,o=n.persistentFocus,a=n.autoFocus,i=n.shards,s=n.crossFrame,u=n.focusOptions,l=r||rF&&rF.portaledElement,c=document&&document.activeElement;if(l){var f=[l].concat(i.map(sF).filter(Boolean));if(c&&!function(e){return(tF.whiteList||aF)(e)}(c)||(o||(s?Boolean(oF):"meanwhile"===oF)||!eF()||!nF&&a)&&(l&&!(MD(f)||c&&function(e,t){return t.some((function(t){return uF(e,t,t)}))}(c,f)||(e=c,rF&&rF.portaledElement===e))&&(document&&!nF&&c&&!a?(c.blur&&c.blur(),document.body.focus()):(t=$D(f,nF,{focusOptions:u}),rF={})),oF=!1,nF=document&&document.activeElement),document){var d=document&&document.activeElement,p=KD(f),h=p.map((function(e){return e.node})).indexOf(d);h>-1&&(p.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),iF(h,p.length,1,p),iF(h,-1,-1,p))}}}return t},cF=function(e){lF()&&e&&(e.stopPropagation(),e.preventDefault())},fF=function(){return QD(lF)},dF=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(rF={observerNode:n,portaledElement:t})},pF=function(){oF="just",QD((function(){oF="meanwhile"}))};QR.assignSyncMedium(dF),eD.assignMedium(fF),tD.assignMedium((function(e){return e({moveFocusInside:$D,focusInside:MD})}));var hF=iD((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!tF&&(document.addEventListener("focusin",cF),document.addEventListener("focusout",fF),window.addEventListener("blur",pF));var n=tF,r=n&&t&&t.id===n.id;tF=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(nF=null,r&&n.observed===t.observed||t.onActivation(),lF(),QD(lF)):(document.removeEventListener("focusin",cF),document.removeEventListener("focusout",fF),window.removeEventListener("blur",pF),nF=null)}))((function(){return null})),mF=r.forwardRef((function(e,t){return r.createElement(aD,It({sideCar:hF,ref:t},e))})),vF=aD.propTypes||{};vF.sideCar,s(vF,["sideCar"]);mF.propTypes={};var gF=mF,yF=function(e){return e.hasAttribute("tabindex")};function bF(e){return!(!e.parentElement||!bF(e.parentElement))||e.hidden}function kF(e){if(!ku(e)||bF(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;var t=e.localName;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;var n={a:function(){return e.hasAttribute("href")},audio:function(){return e.hasAttribute("controls")},video:function(){return e.hasAttribute("controls")}};return t in n?n[t]():!!function(e){var t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||yF(e)}var wF,xF=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join(),SF=function(e){return e.offsetWidth>0&&e.offsetHeight>0};function TF(e){var t=Array.from(e.querySelectorAll(xF));return t.unshift(e),t.filter((function(e){return kF(e)&&SF(e)}))}var EF=null!=(wF=gF.default)?wF:gF,CF=function(e){var t=e.initialFocusRef,n=e.finalFocusRef,o=e.contentRef,a=e.restoreFocus,i=e.children,s=e.isDisabled,u=e.autoFocus,l=e.persistentFocus,c=e.lockFocusAcrossFrames,f=(0,r.useCallback)((function(){if(null==t?void 0:t.current)t.current.focus();else if(null==o?void 0:o.current){0===TF(o.current).length&&requestAnimationFrame((function(){var e;null==(e=o.current)||e.focus()}))}}),[t,o]),d=(0,r.useCallback)((function(){var e;null==(e=null==n?void 0:n.current)||e.focus()}),[n]),p=a&&!n;return(0,gr.jsx)(EF,{crossFrame:c,persistentFocus:l,autoFocus:u,disabled:s,onActivation:f,onDeactivation:d,returnFocus:p,children:i})};CF.displayName="FocusLock";var _F="right-scroll-bar-position",OF="width-before-scroll-bar",IF=KR(),NF=function(){},PF=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:NF,onWheelCapture:NF,onTouchMoveCapture:NF}),a=o[0],i=o[1],s=e.forwardProps,u=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,k=JR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=p,x=VR([n,t]),S=WR(WR({},k),a);return r.createElement(r.Fragment,null,f&&r.createElement(w,{sideCar:IF,removeScrollBar:c,shards:d,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:b}),s?r.cloneElement(r.Children.only(u),WR(WR({},S),{ref:x})):r.createElement(y,WR({},S,{className:l,ref:x}),u))}));PF.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},PF.classNames={fullWidth:OF,zeroRight:_F};var AF,jF=function(e){var t=e.sideCar,n=JR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,WR({},n))};jF.isSideCarExport=!0;function RF(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=AF||n.nc;return t&&e.setAttribute("nonce",t),e}var DF=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=RF())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},FF=function(){var e=function(){var e=DF();return function(t,n){r.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},LF={left:0,top:0,right:0,gap:0},MF=function(e){return parseInt(e||"",10)||0},BF=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return LF;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[MF(n),MF(r),MF(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zF=FF(),ZF=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(_F," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(OF," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(_F," .").concat(_F," {\n right: 0 ").concat(r,";\n }\n \n .").concat(OF," .").concat(OF," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},UF=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,a=void 0===o?"margin":o,i=r.useMemo((function(){return BF(a)}),[a]);return r.createElement(zF,{styles:ZF(i,!t,a,n?"":"!important")})},VF=!1;if("undefined"!==typeof window)try{var qF=Object.defineProperty({},"passive",{get:function(){return VF=!0,!0}});window.addEventListener("test",qF,qF),window.removeEventListener("test",qF,qF)}catch(WW){VF=!1}var HF=!!VF&&{passive:!1},WF=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},JF=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!==typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),GF(e,r)){var o=YF(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GF=function(e,t){return"v"===e?function(e){return WF(e,"overflowY")}(t):function(e){return WF(e,"overflowX")}(t)},YF=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},XF=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$F=function(e){return[e.deltaX,e.deltaY]},KF=function(e){return e&&"current"in e?e.current:e},QF=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},eL=0,tL=[];var nL,rL=(nL=function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),a=r.useState(eL++)[0],i=r.useState(FF)[0],s=r.useRef(e);r.useEffect((function(){s.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=GR([e.lockRef.current],(e.shards||[]).map(KF),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var u=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var r,a=XF(e),i=n.current,u="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],c=e.target,f=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===f&&"range"===c.type)return!1;var d=JF(f,c);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=JF(f,c)),!d)return!1;if(!o.current&&"changedTouches"in e&&(u||l)&&(o.current=r),!r)return!0;var p=o.current||r;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,u=t.contains(s),l=!1,c=i>0,f=0,d=0;do{var p=YF(e,s),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&GF(e,s)&&(f+=m,d+=h),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(o&&0===f||!o&&i>f)||!c&&(o&&0===d||!o&&-i>d))&&(l=!0),l}(p,t,e,"h"===p?u:l,!0)}),[]),l=r.useCallback((function(e){var n=e;if(tL.length&&tL[tL.length-1]===i){var r="deltaY"in n?$F(n):XF(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(s.current.shards||[]).map(KF).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?u(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=r.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=r.useCallback((function(e){n.current=XF(e),o.current=void 0}),[]),d=r.useCallback((function(t){c(t.type,$F(t),t.target,u(t,e.lockRef.current))}),[]),p=r.useCallback((function(t){c(t.type,XF(t),t.target,u(t,e.lockRef.current))}),[]);r.useEffect((function(){return tL.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,HF),document.addEventListener("touchmove",l,HF),document.addEventListener("touchstart",f,HF),function(){tL=tL.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,HF),document.removeEventListener("touchmove",l,HF),document.removeEventListener("touchstart",f,HF)}}),[]);var h=e.removeScrollBar,m=e.inert;return r.createElement(r.Fragment,null,m?r.createElement(i,{styles:QF(a)}):null,h?r.createElement(UF,{gapMode:e.gapMode}):null)},IF.useMedium(nL),jF),oL=r.forwardRef((function(e,t){return r.createElement(PF,WR({},e,{ref:t,sideCar:rL}))}));oL.classNames=PF.classNames;var aL=oL;function iL(e){var t=BR(),n=t.autoFocus,o=t.trapFocus,a=t.dialogRef,i=t.initialFocusRef,s=t.blockScrollOnMount,u=t.allowPinchZoom,l=t.finalFocusRef,c=t.returnFocusOnClose,f=t.preserveScrollBarGap,d=t.lockFocusAcrossFrames,p=t.isOpen,h=xv(),m=(0,v.Z)(h,2),g=m[0],y=m[1];(0,r.useEffect)((function(){!g&&y&&setTimeout(y)}),[g,y]);var b=xR(a,p);return(0,gr.jsx)(CF,{autoFocus:n,isDisabled:!o,initialFocusRef:i,finalFocusRef:l,restoreFocus:c,contentRef:a,lockFocusAcrossFrames:d,children:(0,gr.jsx)(aL,{removeScrollBar:!f,allowPinchZoom:u,enabled:1===b&&s,forwardProps:!0,children:e.children})})}var sL=["className","children","containerProps","motionProps"],uL=g((function(e,t){var n=e.className,r=e.children,o=e.containerProps,a=e.motionProps,i=u(e,sL),s=BR(),l=s.getDialogProps,c=s.getDialogContainerProps,d=l(i,t),p=c(o),h=T("chakra-modal__content",n),m=DR(),v=f({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},m.dialog),g=f({display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0},m.dialogContainer),y=BR().motionPreset;return(0,gr.jsx)(iL,{children:(0,gr.jsx)(vr.div,f(f({},p),{},{className:"chakra-modal__content-container",tabIndex:-1,__css:g,children:(0,gr.jsx)(yR,f(f({preset:y,motionProps:a,className:h},d),{},{__css:v,children:r}))}))})}));uL.displayName="ModalContent";var lL=["leastDestructiveRef"];function cL(e){var t=e.leastDestructiveRef,n=u(e,lL);return(0,gr.jsx)(zR,f(f({},n),{},{initialFocusRef:t}))}var fL=g((function(e,t){return(0,gr.jsx)(uL,f({ref:t,role:"alertdialog"},e))})),dL=["unmountOnExit","in","className","transition","transitionEnd","delay"],pL={enter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.transition,r=t.transitionEnd,o=t.delay;return{opacity:1,transition:null!=(e=null==n?void 0:n.enter)?e:aR(oR.enter,o),transitionEnd:null==r?void 0:r.enter}},exit:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.transition,r=t.transitionEnd,o=t.delay;return{opacity:0,transition:null!=(e=null==n?void 0:n.exit)?e:iR(oR.exit,o),transitionEnd:null==r?void 0:r.exit}}},hL={initial:"exit",animate:"enter",exit:"exit",variants:pL},mL=(0,r.forwardRef)((function(e,t){var n=e.unmountOnExit,r=e.in,o=e.className,a=e.transition,i=e.transitionEnd,s=e.delay,l=u(e,dL),c=r||n?"enter":"exit",d=!n||r&&n,p={transition:a,transitionEnd:i,delay:s};return(0,gr.jsx)(my,{custom:p,children:d&&(0,gr.jsx)(uy.div,f(f({ref:t,className:T("chakra-fade",o),custom:p},hL),{},{animate:c},l))})}));mL.displayName="Fade";var vL=["className","transition","motionProps"],gL=vr(uy.div),yL=g((function(e,t){var n=e.className,r=(e.transition,e.motionProps),o=u(e,vL),a=T("chakra-modal__overlay",n),i=f({pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh"},DR().overlay),s=BR().motionPreset,l=r||("none"===s?{}:hL);return(0,gr.jsx)(gL,f(f({},l),{},{__css:i,ref:t,className:a},o))}));yL.displayName="ModalOverlay";var bL=["className"],kL=g((function(e,t){var n=e.className,o=u(e,bL),a=BR(),i=a.headerId,s=a.setHeaderMounted;(0,r.useEffect)((function(){return s(!0),function(){return s(!1)}}),[s]);var l=T("chakra-modal__header",n),c=f({flex:0},DR().header);return(0,gr.jsx)(vr.header,f(f({ref:t,className:l,id:i},o),{},{__css:c}))}));kL.displayName="ModalHeader";var wL=["className"],xL=g((function(e,t){var n=e.className,o=u(e,wL),a=BR(),i=a.bodyId,s=a.setBodyMounted;(0,r.useEffect)((function(){return s(!0),function(){return s(!1)}}),[s]);var l=T("chakra-modal__body",n),c=DR();return(0,gr.jsx)(vr.div,f(f({ref:t,className:l,id:i},o),{},{__css:c.body}))}));xL.displayName="ModalBody";var SL=["className"],TL=g((function(e,t){var n=e.className,r=u(e,SL),o=T("chakra-modal__footer",n),a=f({display:"flex",alignItems:"center",justifyContent:"flex-end"},DR().footer);return(0,gr.jsx)(vr.footer,f(f({ref:t},r),{},{__css:a,className:o}))}));function EL(e,t){var n=(0,r.useId)();return(0,r.useMemo)((function(){return e||[t,n].filter(Boolean).join("-")}),[e,t,n])}function CL(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}TL.displayName="ModalFooter";var _L=CL()?r.useLayoutEffect:r.useEffect;function OL(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,r.useRef)(e);return _L((function(){n.current=e})),(0,r.useCallback)((function(){for(var e,t,r=arguments.length,o=new Array(r),a=0;a