2&&void 0!==arguments[2]?arguments[2]:1;sp(n<=Rg,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=function(e){var t=Dg.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 om(u)?parseFloat(u):u}return kf(i)?Mg(i,t,n+1):i}}var Fg=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Lg=function(e){return Fg.has(e)},Bg=function(e){return e===Sf||e===Df},zg=function(e,t){return parseFloat(e.split(", ")[t])},Zg=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 zg(a[1],t);var i=o.match(/^matrix\((.+)\)$/);return i?zg(i[1],e):0}},Ug=new Set(["x","y","z"]),Vg=df.filter((function(e){return!Ug.has(e)}));var Hg={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:Zg(4,13),y:Zg(5,14)};Hg.translateX=Hg.x,Hg.translateY=Hg.y;var qg=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(Lg),a=[],i=!1,s=[];if(o.forEach((function(o){var u=e.getValue(o);if(e.hasValue(o)){var l,c=n[o],f=pm(c),d=t[o];if(dd(d)){var p=d.length,h=null===d[0]?1:0;c=d[h],f=pm(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]=Hg[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]=Hg[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(),zc&&null!==u&&window.scrollTo({top:u}),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}};function Wg(e,t,n,r){return function(e){return Object.keys(e).some(Lg)}(t)?qg(e,t,n,r):{target:t,transitionEnd:r}}var Yg=function(e,t,n,r){var o=function(e,t,n){var r=Object.assign({},(jg(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(kf(t)){var n=Mg(t,o);n&&e.set(n)}})),r){var i=r[a];if(kf(i)){var s=Mg(i,o);s&&(r[a]=s,n||(n={}),void 0===n[a]&&(n[a]=i))}}return{target:r,transitionEnd:n}}(e,t,r);return Wg(e,t=o.target,n,r=o.transitionEnd)},Jg={current:null},Gg={current:!1};var $g=new WeakMap,Xg=["willChange"],Kg=["children"],Qg=Object.keys(Qc),ey=Qg.length,ty=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ny=Yc.length,ry=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,Hr.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 Sd.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=Jc(o),this.isVariantNode=Gc(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(r&&r.current);var p=this.scrapeMotionValuesFromProps(o,{}),h=p.willChange,m=u(p,Xg);for(var v in m){var g=m[v];void 0!==c[v]&&mf(g)&&(g.set(c[v],!1),rm(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,$g.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)})),Gg.current||function(){if(Gg.current=!0,zc)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Jg.current=e.matches};e.addListener(t),t()}else Jg.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Jg.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}},{key:"unmount",value:function(){for(var e in $g.delete(this.current),this.projection&&this.projection.unmount(),Td(this.notifyUpdate),Td(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=pf.has(e),o=t.on("change",(function(t){n.latestValues[e]=t,n.props.onUpdate&&Sd.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,Kg)),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;n0&&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}(N,["role","id"]):N,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}(N,["role","id"]);return c?(0,gr.jsxs)(gr.Fragment,{children:[E,(0,gr.jsx)(by,{children:_.isOpen&&(0,gr.jsx)(Mc,f(f({},v),{},{children:(0,gr.jsx)(vr.div,f(f({},_.getTooltipPositionerProps()),{},{__css:{zIndex:a.zIndex,pointerEvents:"none"},children:(0,gr.jsxs)(wy,f(f(f({variants:xu,initial:"exit",animate:"enter",exit:"exit"},w),I),{},{__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})}));xy.displayName="Tooltip";var Sy=n(6854),Ty=(Sy.domToReact,Sy.htmlToDOM,Sy.attributesToProps,Sy.Comment,Sy.Element,Sy.ProcessingInstruction,Sy.Text,Sy);function Ey(){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 _y=Ey({onlyFirst:!0});var Cy=Ey();function Oy(e){if("string"!==typeof e)throw new TypeError("Expected a `string`, got `".concat(typeof e,"`"));return e.replace(Cy,"")}var Ny,Iy=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",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)},Py=["children"],Ay=["behavior","align"],jy=["done","behavior","align","calculateViewLocation"],Dy=["listState","topItemsIndexes"],Ry=["style","children"],My=["style","children"],Fy=0,Ly=1,By=2,zy=4;function Zy(e,t){return function(n){return e(t(n))}}function Uy(e,t){return t(e)}function Vy(e,t){return function(n){return e(t,n)}}function Hy(e,t){return function(){return e(t)}}function qy(e,t){return t(e),e}function Wy(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&e.splice(t,1)};case Fy:return void e.slice().forEach((function(e){e(n)}));default:throw new Error("unrecognized action ".concat(t))}}}function ab(e){var t=e,n=ob();return function(e,r){switch(e){case Ly:r(t);break;case Fy:t=r;break;case zy:return t}return n(e,r)}}function ib(e){return qy(ob(),(function(t){return nb(e,t)}))}function sb(e,t){return qy(ab(t),(function(t){return nb(e,t)}))}function ub(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:cb;return function(n){return function(r){t(e,r)||(e=r,n(r))}}}function db(e){return function(t){return function(n){e(n)&&t(n)}}}function pb(e){return function(t){return Zy(t,e)}}function hb(e){return function(t){return function(){return t(e)}}}function mb(e,t){return function(n){return function(r){return n(t=e(t,r))}}}function vb(e){return function(t){return function(n){e>0?e--:t(n)}}}function gb(e){var t,n=null;return function(r){return function(o){n=o,t||(t=setTimeout((function(){t=void 0,r(n)}),e))}}}function yb(e){var t,n;return function(r){return function(o){t=o,n&&clearTimeout(n),n=setTimeout((function(){r(t)}),e)}}}function bb(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:cb))}function xb(){for(var e=ob(),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:Tb(),constructor:e,dependencies:t,singleton:n}}var Tb=function(){return Symbol()};var Eb="undefined"!==typeof document?r.useLayoutEffect:r.useEffect;function _b(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&&Qy(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:tb(e))&&console[Nb[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}));return{log:t,logLevel:e}}),[],{singleton:!0});function Pb(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 Ab(e){return Pb(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]).callbackRef}function jb(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]:Xy,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():_c.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(Db(document.documentElement,"height"),document.documentElement.scrollHeight),o=window.innerHeight,l=document.documentElement.scrollTop):(a=r.scrollHeight,o=Db(r,"height"),l=r.scrollTop);var f=a-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),Rb(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 Fb=Sb((function(){var e=ob(),t=ob(),n=ab(0),r=ob(),o=ab(0),a=ob(),i=ob(),s=ab(0),u=ab(0),l=ab(0),c=ab(0),f=ob(),d=ob(),p=ab(!1);return nb(lb(e,pb((function(e){return e.scrollTop}))),t),nb(lb(e,pb((function(e){return e.scrollHeight}))),i),nb(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}),Lb={lvl:0};function Bb(e,t,n){return{k:e,v:t,lvl:n,l:arguments.length>3&&void 0!==arguments[3]?arguments[3]:Lb,r:arguments.length>4&&void 0!==arguments[4]?arguments[4]:Lb}}function zb(e){return e===Lb}function Zb(){return Lb}function Ub(e,t){if(zb(e))return Lb;var n=e.k,r=e.l,o=e.r;if(t===n){if(zb(r))return o;if(zb(o))return r;var a=Jb(r),i=(0,v.Z)(a,2);return Qb($b(e,{k:i[0],v:i[1],l:Gb(r)}))}return Qb($b(e,t2&&void 0!==arguments[2]?arguments[2]:"k";if(zb(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])t&&(s=s.concat(Wb(a,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(Wb(i,t,n))),s}function Yb(e){return zb(e)?[]:[].concat((0,i.Z)(Yb(e.l)),[{k:e.k,v:e.v}],(0,i.Z)(Yb(e.r)))}function Jb(e){return zb(e.r)?[e.k,e.v]:Jb(e.r)}function Gb(e){return zb(e.r)?e.l:Qb($b(e,{r:Gb(e.r)}))}function $b(e,t){return Bb(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 Xb(e){return zb(e)||e.lvl>e.r.lvl}function Kb(e){return nk(rk(e))}function Qb(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(Xb(t))return rk($b(e,{lvl:r-1}));if(zb(t)||zb(t.r))throw new Error("Unexpected empty nodes");return $b(t.r,{l:$b(t,{r:t.r.l}),r:$b(e,{l:t.r.r,lvl:r-1}),lvl:r})}if(Xb(e))return nk($b(e,{lvl:r-1}));if(zb(n)||zb(n.l))throw new Error("Unexpected empty nodes");var o=n.l,a=Xb(o)?n.lvl-1:n.lvl;return $b(o,{l:$b(e,{r:o.l,lvl:r-1}),r:nk($b(n,{l:o.r,lvl:a})),lvl:o.lvl+1})}function ek(e,t,n){if(zb(e))return[];var r=Hb(e,t)[0];return tk(Wb(e,r,n),(function(e){return{index:e.k,value:e.v}}))}function tk(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 ak(e,t,n){return e[ok(e,t,n)]}var ik=Sb((function(){return{recalcInProgress:ab(!1)}}),[],{singleton:!0});function sk(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 uk(e,t){for(var n=0,r=0;n3&&void 0!==arguments[3]?arguments[3]:0;return r>0&&(t=Math.max(t,ak(e,r,lk).offset)),tk(function(e,t,n,r){var o=ok(e,t,r),a=ok(e,n,r,o);return e.slice(o,a+1)}(e,t,n,ck),fk)}function pk(e,t,n,r){var o=e,a=0,i=0,s=0,u=0;if(0!==t){s=o[u=ok(o,t-1,lk)].offset;var l=Hb(n,t-1);a=l[0],i=l[1],o.length&&o[u].size===Hb(n,t)[1]&&(u-=1),o=o.slice(0,u+1)}else o=[];var c,f=(0,y.Z)(ek(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 hk(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,Ob.DEBUG);var s=e.sizeTree,u=s,l=0;if(o.length>0&&zb(s)&&2===r.length){var c=r[0].size,f=r[1].size;u=o.reduce((function(e,t){return qb(qb(e,t,c),t+1,f)}),u)}else{var d=function(e,t){var n,r=zb(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),zb(e))e=qb(e,0,i);else{var l=ek(e,s-1,u+1);if(!l.some(sk(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=Ub(e,m)):(d=g!==i,f=!0),v>u&&u>=m&&g!==i&&(e=qb(e,u+1,g))}}catch(b){p.e(b)}finally{p.f()}d&&(e=qb(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=pk(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 qb(e,t,mk(t,m,i))}),Zb()),groupIndices:o}}function mk(e,t,n){if(0===t.length)return 0;var r=ak(t,e,lk),o=r.offset,a=e-r.index,i=r.size*a+(a-1)*n+o;return i>0?i+n:i}function vk(e,t,n){if(function(e){return"undefined"!==typeof e.groupIndex}(e))return t.groupIndices[e.groupIndex]+1;var r=gk("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r))}function gk(e,t){if(!yk(t))return e;for(var n=0;t.groupIndices[n]<=e+n;)n++;return e+n}function yk(e){return!zb(e.groupOffsetTree)}var bk={offsetHeight:"height",offsetWidth:"width"},kk=Sb((function(e){var t=(0,v.Z)(e,2),n=t[0].log,r=t[1].recalcInProgress,o=ob(),a=ob(),s=sb(a,0),u=ob(),l=ob(),c=ab(0),d=ab([]),p=ab(void 0),h=ab(void 0),m=ab((function(e,t){return Db(e,bk[t])})),g=ab(void 0),y=ab(0),b={offsetTree:[],sizeTree:Zb(),groupOffsetTree:Zb(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]},k=sb(lb(o,bb(d,n,y),mb(hk,b),fb()),b),w=sb(lb(d,fb(),mb((function(e,t){return{prev:e.current,current:t}}),{prev:[],current:[]}),pb((function(e){return e.prev}))),[]);nb(lb(d,db((function(e){return e.length>0})),bb(k,y),pb((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 qb(e,t,mk(t,r.offsetTree,o)||n)}),Zb());return f(f({},r),{},{groupIndices:n,groupOffsetTree:a})}))),k),nb(lb(a,bb(k),db((function(e){var t=(0,v.Z)(e,2);return t[0]0)Qy(r,!0),Qy(u,e+uk(e,t));else if(e<0){var n=tb(w);n.length>0&&(e-=uk(-e,n)),Qy(l,e)}})),Ky(lb(c,bb(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},Ob.ERROR)}));var T=ib(u);nb(lb(u,bb(k),pb((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=Vb(r.sizeTree,0),l=0,c=0;l0){if(zb(r.sizeTree))return r;for(var a=Zb(),i=tb(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=Yb(r.sizeTree).reduce((function(e,t){var r=t.k,o=t.v;return qb(e,Math.max(0,r+n),o)}),a),s!==-n)a=qb(a,0,Vb(r.sizeTree,l)),a=qb(a,1,Hb(r.sizeTree,1-n)[1]);return f(f({},r),{},{sizeTree:a},pk(r.offsetTree,0,a,o))}var d=Yb(r.sizeTree).reduce((function(e,t){var r=t.k,o=t.v;return qb(e,Math.max(0,r+n),o)}),Zb());return f(f({},r),{},{sizeTree:d},pk(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}}),Wy(Ib,ik),{singleton:!0}),wk="undefined"!==typeof document&&"scrollBehavior"in document.documentElement.style;function xk(e){var t="number"===typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&wk||(t.behavior="auto"),t.offset||(t.offset=0),t}var Sk=Sb((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=ob(),b=ab(0),k=null,w=null,x=null;function S(){k&&(k(),k=null),x&&(x(),x=null),w&&(clearTimeout(w),w=null),Qy(u,!1)}return nb(lb(y,bb(r,l,o,b,d,p,g),bb(i,h,m),pb((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=xk(r),T=b.align,E=b.behavior,_=b.offset,C=s-1,O=vk(b,o,C),N=mk(O,o.offsetTree,h)+c;"end"===T?(N+=m+Hb(o.sizeTree,O)[1]-i+g,O===C&&(N+=d)):"center"===T?N+=(m+Hb(o.sizeTree,O)[1]-i+g)/2:N-=l,_&&(N+=_);var I,P=function(e){S(),e?(p("retrying to scroll to",{location:r},Ob.DEBUG),Qy(y,r)):p("list did not change, scroll successful",{},Ob.DEBUG)};if(S(),"smooth"===E){var A=!1;x=Ky(a,(function(e){A=A||e})),k=rb(f,(function(){P(A)}))}else k=rb(lb(a,(I=150,function(e){var t=setTimeout((function(){e(!1)}),I);return function(n){n&&(e(!0),clearTimeout(t))}})),P);return w=setTimeout((function(){S()}),1200),Qy(u,!0),p("scrolling from index to",{index:O,top:N,behavior:E},Ob.DEBUG),{top:N,behavior:E}}))),c),{scrollToIndex:y,topListHeight:b}}),Wy(kk,Fb,Ib),{singleton:!0});var Tk="up",Ek="down",_k={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},Ck=Sb((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=ab(!1),l=ab(!0),c=ob(),f=ob(),d=ab(4),p=ab(0),h=sb(lb(kb(lb(wb(r),vb(1),hb(!0)),lb(wb(r),vb(1),hb(!1),yb(100))),fb()),!1),m=sb(lb(kb(lb(s,hb(!0)),lb(s,hb(!1),yb(200))),fb()),!1);nb(lb(xb(wb(r),wb(p)),pb((function(e){var t=(0,v.Z)(e,2);return t[0]<=t[1]})),fb()),l),nb(lb(l,gb(50)),f);var g=ib(lb(xb(n,wb(o),wb(a),wb(i),wb(d)),mb((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=Tk),(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:qk(e,o,a),topItems:qk(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 Yk(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=Ik(t,l),f=Array.from({length:l}).map((function(e,t){return{index:t+c,size:0,offset:0,data:a[t+c]}}));return Wk(f,[],l,o,n,r)}var Jk=Sb((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=ab([]),T=ab(0),E=ob();nb(u.topItemsIndexes,S);var _=sb(lb(xb(w,x,wb(c,Mk),wb(o),wb(r),wb(g),m,wb(S),wb(i),wb(s),a),db((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})),pb((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=tb(T);if(0===a)return f(f({},Hk),{},{totalCount:a});if(0===r&&0===o)return 0===b?f(f({},Hk),{},{totalCount:a}):Yk(b,s,i,c,d,p||[]);if(zb(m)){if(b>0)return null;var k=Wk(function(e,t,n){if(yk(t)){var r=gk(e,t);return[{index:Hb(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]}]}(Ik(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],_=0,C=(0,y.Z)(ek(m,S,E));try{for(C.s();!(x=C.n()).done;)for(var O=x.value,N=O.value,I=Math.max(O.start,S),P=Math.min(O.end,E),A=I;A<=P;A++)w.push({index:A,size:N,offset:_,data:p&&p[A]}),_+=N}catch(F){C.e(F)}finally{C.f()}}if(!u)return Wk([],w,a,d,h,c);var j=l.length>0?l[l.length-1]+1:0,D=dk(g,r,o,j);if(0===D.length)return null;var R=a-1,M=qy([],(function(e){var t,n=(0,y.Z)(D);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(F){n.e(F)}finally{n.f()}}));return Wk(M,w,a,d,h,c)})),db((function(e){return null!==e})),fb()),Hk);return nb(lb(a,db($y),pb((function(e){return null==e?void 0:e.length}))),o),nb(lb(_,pb((function(e){return e.topListHeight}))),b),nb(b,p),nb(lb(_,pb((function(e){return[e.top,e.bottom]}))),d),nb(lb(_,pb((function(e){return e.items}))),E),f({listState:_,topItemsIndexes:S,endReached:ib(lb(_,db((function(e){return e.items.length>0})),bb(o,a),db((function(e){var t=(0,v.Z)(e,2),n=t[0].items,r=t[1];return n[n.length-1].originalIndex===r-1})),pb((function(e){var t=(0,v.Z)(e,3);return[t[1]-1,t[2]]})),fb(Mk),pb((function(e){return(0,v.Z)(e,1)[0]})))),startReached:ib(lb(_,gb(200),db((function(e){var t=e.items,n=e.topItems;return t.length>0&&t[0].originalIndex===n.length})),pb((function(e){return e.items[0].index})),fb())),rangeChanged:ib(lb(_,db((function(e){return e.items.length>0})),pb((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}})),fb(Fk))),itemsRendered:E,initialItemCount:T},k)}),Wy(kk,Rk,Vk,Pk,Sk,Ck,Ok,ik),{singleton:!0}),Gk=Sb((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 nb(lb(t[3].didMount,bb(l),db((function(e){return 0!==(0,v.Z)(e,2)[1]})),bb(s,r,o,i,a),pb((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 Yk(n,r,o,a,i,void 0===s?[]:s)}))),c),{}}),Wy(kk,Pk,Jk,Ok),{singleton:!0}),$k=Sb((function(e){var t=(0,v.Z)(e,1)[0].scrollVelocity,n=ab(!1),r=ob(),o=ab(!1);return nb(lb(t,bb(o,n,r),db((function(e){var t=(0,v.Z)(e,2);t[0];return!!t[1]})),pb((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})),fb()),n),Ky(lb(xb(n,t,r),bb(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}}),Wy(Ck),{singleton:!0}),Xk=Sb((function(e){var t=(0,v.Z)(e,1)[0].topItemsIndexes,n=ab(0);return nb(lb(n,db((function(e){return e>0})),pb((function(e){return Array.from({length:e}).map((function(e,t){return t}))}))),t),{topItemCount:n}}),Wy(Jk)),Kk=Sb((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=ob(),l=sb(lb(xb(r,i,o,a,s),pb((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 nb(wb(l),u),{totalListHeight:l,totalListHeightChanged:u}}),Wy(Fb,Jk),{singleton:!0});function Qk(e){var t,n=!1;return function(){return n||(n=!0,t=e()),t}}var ew=Qk((function(){return/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)})),tw=Sb((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=ib(lb(d,bb(f),mb((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]),db((function(e){return 0!==(0,v.Z)(e,1)[0]})),bb(o,c,i,l,b,k),db((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===Tk})),pb((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},Ob.DEBUG),n}))));function x(e){e>0?(Qy(r,{top:-e,behavior:"auto"}),Qy(a,0)):(Qy(a,0),Qy(r,{top:-e,behavior:"auto"}))}return Ky(lb(w,bb(a,u)),(function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1];t[2]&&ew()?Qy(a,r-n):x(-n)})),Ky(lb(xb(sb(u,!1),a,k),db((function(e){var t=(0,v.Z)(e,3),n=t[0],r=t[1],o=t[2];return!n&&!o&&0!==r})),pb((function(e){var t=(0,v.Z)(e,2);t[0];return t[1]})),gb(1)),x),nb(lb(m,pb((function(e){return{top:-e}}))),r),Ky(lb(h,bb(g,y),pb((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=Vb(i,0),f=0,d=0;fn&&(l-=c,p=n-f+1),f+=p,l+=u(p),d++}return l}))),(function(e){Qy(a,e),requestAnimationFrame((function(){Qy(r,{top:e}),requestAnimationFrame((function(){Qy(a,0),Qy(k,!1)}))}))})),{deviation:a}}),Wy(Fb,Ck,Jk,kk,Ib,ik)),nw=Sb((function(e){var t=(0,v.Z)(e,3),n=t[0].didMount,r=t[1].scrollTo,o=t[2].listState,a=ab(0);return Ky(lb(n,bb(a),db((function(e){return 0!==(0,v.Z)(e,2)[1]})),pb((function(e){return{top:(0,v.Z)(e,2)[1]}}))),(function(e){rb(lb(o,vb(1),db((function(e){return e.items.length>1}))),(function(){requestAnimationFrame((function(){Qy(r,e)}))}))})),{initialScrollTop:a}}),Wy(Ok,Fb,Jk),{singleton:!0}),rw=Sb((function(e){var t=(0,v.Z)(e,2),n=t[0].viewportHeight,r=t[1].totalListHeight,o=ab(!1);return{alignToBottom:o,paddingTopAddition:sb(lb(xb(o,n,r),db((function(e){return(0,v.Z)(e,1)[0]})),pb((function(e){var t=(0,v.Z)(e,3),n=t[1],r=t[2];return Math.max(0,n-r)})),gb(0),fb()),0)}}),Wy(Fb,Kk),{singleton:!0}),ow=Sb((function(e){var t=(0,v.Z)(e,1)[0],n=t.scrollTo,r=t.scrollContainerState,o=ob(),a=ob(),i=ob(),s=ab(!1),u=ab(void 0);return nb(lb(xb(o,a),pb((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),nb(lb(n,bb(a),pb((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}}),Wy(Fb)),aw=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,Ay);return to?f(f({},l),{},{behavior:i,align:null!=s?s:"end"}):null},iw=Sb((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=ob();return nb(lb(g,bb(r,l,o,c,d,p,s),bb(a),pb((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?aw:b,w=u(r,jy),x=vk(r,o,i-1),S=mk(x,o.offsetTree,p)+s+l,T=k({itemTop:S,itemBottom:S+Hb(o.sizeTree,x)[1],viewportTop:d+l,viewportBottom:d+a-c,locationParams:f({behavior:g,align:y},w)});return T?m&&rb(lb(h,db((function(e){return!1===e})),vb(tb(h)?1:2)),m):m&&m(),T})),db((function(e){return null!==e}))),m),{scrollIntoView:g}}),Wy(kk,Fb,Sk,Jk,Ib),{singleton:!0}),sw=Sb((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=ob(),p=ab(void 0),h=ab(null),m=ab(null);return nb(c,h),nb(f,m),Ky(lb(d,bb(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=Yb(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})})),nb(lb(p,db($y),pb(uw)),i),nb(lb(s,bb(p),db((function(e){return void 0!==(0,v.Z)(e,2)[1]})),fb(),pb((function(e){return(0,v.Z)(e,2)[1].ranges}))),o),{getState:d,restoreStateFrom:p}}),Wy(kk,Fb,Pk,Ok,ow));function uw(e){return{offset:e.scrollTop,index:0,align:"start"}}var lw=Sb((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)}),Wy(Vk,Gk,Ok,$k,Kk,nw,rw,ow,iw,Ib)),cw=Sb((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,_=T.topItemsIndexes,C=u(T,Dy),O=t[6].scrollToIndex,N=(t[7],t[8].topItemCount),I=t[9].groupCounts,P=t[10];return nb(C.rangeChanged,P.scrollSeekRangeChanged),nb(lb(P.windowViewportRect,pb((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:_,topItemCount:N,groupCounts:I,fixedItemHeight:a,defaultItemHeight:i,gap:m},S),{},{statefulTotalCount:h,listState:E,scrollToIndex:O,trackItemSizes:s,itemSize:l,groupIndices:p},C),P),w),{},{sizes:g},x)}),Wy(kk,Pk,Fb,sw,jk,Jk,Sk,tw,Xk,Rk,lw)),fw="-webkit-sticky",dw="sticky",pw=Qk((function(){if("undefined"===typeof document)return dw;var e=document.createElement("div");return e.style.position=fw,e.style.position===fw?fw:dw}));function hw(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=Pb(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 mw=r.createContext(void 0),vw=r.createContext(void 0);function gw(e){return e}var yw=Sb((function(){var e=ab((function(e){return"Item ".concat(e)})),t=ab(null),n=ab((function(e){return"Group ".concat(e)})),r=ab({}),o=ab(gw),a=ab("div"),i=ab(Xy),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return sb(lb(r,pb((function(t){return t[e]})),fb()),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")}})),bw=Sb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),Wy(cw,yw)),kw=function(e){var t=e.height;return r.createElement("div",{style:{height:t}})},ww={position:pw(),zIndex:1,overflowAnchor:"none"},xw={overflowAnchor:"none"},Sw=r.memo((function(e){var t=e.showTopList,n=void 0!==t&&t,o=Lw("listState"),a=Fw("sizeRanges"),i=Lw("useWindowScroll"),s=Lw("customScrollParent"),u=Fw("windowScrollContainerState"),l=Fw("scrollContainerState"),c=s||i?u:l,d=Lw("itemContent"),p=Lw("context"),h=Lw("groupContent"),m=Lw("trackItemSizes"),g=jb(a,Lw("itemSize"),m,n?Xy:c,Lw("log"),Fw("gap"),s).callbackRef,y=r.useState(0),b=(0,v.Z)(y,2),k=b[0],w=b[1];Bw("deviation",(function(e){k!==e&&w(e)}));var x=Lw("EmptyPlaceholder"),S=Lw("ScrollSeekPlaceholder")||kw,T=Lw("ListComponent"),E=Lw("ItemComponent"),_=Lw("GroupComponent"),C=Lw("computeItemKey"),O=Lw("isSeeking"),N=Lw("groupIndices").length>0,I=Lw("paddingTopAddition"),P=Lw("scrolledToInitialItem"),A=n?{}:f({boxSizing:"border-box",paddingTop:o.offsetTop+I,paddingBottom:o.offsetBottom,marginTop:k},P?{}:{visibility:"hidden"});return!n&&0===o.totalCount&&x?r.createElement(x,Cw(x,p)):r.createElement(T,f(f({},Cw(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=C(t+o.firstItemIndex,e.data,p);return O?r.createElement(S,f(f({},Cw(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(_,f(f({},Cw(_,p)),{},{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,style:ww}),h(e.index,p)):r.createElement(E,f(f({},Cw(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:xw}),N?d(e.index,e.groupIndex,e.data,p):d(e.index,e.data,p))})))})),Tw={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Ew={width:"100%",height:"100%",position:"absolute",top:0},_w={width:"100%",position:pw(),top:0,zIndex:1};function Cw(e,t){if("string"!==typeof e)return{context:t}}var Ow=r.memo((function(){var e=Lw("HeaderComponent"),t=Fw("headerHeight"),n=Lw("headerFooterTag"),o=Ab((function(e){return t(Db(e,"height"))})),a=Lw("context");return e?r.createElement(n,{ref:o},r.createElement(e,Cw(e,a))):null})),Nw=r.memo((function(){var e=Lw("FooterComponent"),t=Fw("footerHeight"),n=Lw("headerFooterTag"),o=Ab((function(e){return t(Db(e,"height"))})),a=Lw("context");return e?r.createElement(n,{ref:o},r.createElement(e,Cw(e,a))):null}));function Iw(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,Ry),l=t("scrollContainerState"),c=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),p=o("scrollerRef"),h=o("context"),m=Mb(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({},Tw),a),"data-test-id":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0},s),Cw(c,h)),i)}))}function Pw(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,My),l=t("windowScrollContainerState"),c=o("ScrollerComponent"),d=t("smoothScrollTargetReached"),p=o("totalListHeight"),h=o("deviation"),m=o("customScrollParent"),v=o("context"),g=Mb(l,d,c,Xy,m),y=g.scrollerRef,b=g.scrollByCallback,k=g.scrollToCallback;return Cb((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),Cw(c,v)),i)}))}var Aw=function(e){var t=e.children,n=r.useContext(mw),o=Fw("viewportHeight"),a=Fw("fixedItemHeight"),i=Ab(Zy(o,(function(e){return Db(e,"height")})));return r.useEffect((function(){n&&(o(n.viewportHeight),a(n.itemHeight))}),[n,o,a]),r.createElement("div",{style:Ew,ref:i,"data-viewport-type":"element"},t)},jw=function(e){var t=e.children,n=r.useContext(mw),o=Fw("windowViewportRect"),a=Fw("fixedItemHeight"),i=Lw("customScrollParent"),s=hw(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:Ew,"data-viewport-type":"window"},t)},Dw=function(e){var t=e.children,n=Lw("TopItemListComponent"),o=Lw("headerHeight"),a=f(f({},_w),{},{marginTop:"".concat(o,"px")}),i=Lw("context");return r.createElement(n||"div",{style:a,context:i},t)},Rw=_b(bw,{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=Lw("useWindowScroll"),n=Lw("topItemsIndexes").length>0,o=Lw("customScrollParent"),a=o||t?Zw:zw,i=o||t?jw:Aw;return r.createElement(a,f({},e),n&&r.createElement(Dw,null,r.createElement(Sw,{showTopList:!0})),r.createElement(i,null,r.createElement(Ow,null),r.createElement(Sw,null),r.createElement(Nw,null)))}))),Mw=Rw.Component,Fw=Rw.usePublisher,Lw=Rw.useEmitterValue,Bw=Rw.useEmitter,zw=Iw({usePublisher:Fw,useEmitterValue:Lw,useEmitter:Bw}),Zw=Pw({usePublisher:Fw,useEmitterValue:Lw,useEmitter:Bw}),Uw=Mw,Vw={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},Hw={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},qw=Math.round,Ww=Math.ceil,Yw=Math.floor,Jw=Math.min,Gw=Math.max;function $w(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 Xw(e,t){return e&&e.column===t.column&&e.row===t.row}function Kw(e,t){return e&&e.width===t.width&&e.height===t.height}var Qw=Sb((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,_=x.windowScrollContainerState,C=x.windowScrollTo,O=t[6],N=ab(0),I=ab(0),P=ab(Vw),A=ab({height:0,width:0}),j=ab({height:0,width:0}),D=ob(),R=ob(),M=ab(0),F=ab(null),L=ab({row:0,column:0}),B=ob(),z=ob(),Z=ab(!1),U=ab(0),V=ab(!0),H=ab(!1);Ky(lb(w,bb(U),db((function(e){var t=(0,v.Z)(e,2);t[0];return!!t[1]}))),(function(){Qy(V,!1),Qy(I,0)})),Ky(lb(xb(w,V,j,A,U,H),db((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];Qy(H,!0),Nk(1,(function(){Qy(D,t)})),rb(lb(s),(function(){Qy(a,[0,0]),Qy(V,!0)}))})),nb(lb(z,db((function(e){return void 0!==e&&null!==e&&e.scrollTop>0})),hb(0)),I),Ky(lb(w,bb(z),db((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&&(Qy(A,t.viewport),Qy(j,null==t?void 0:t.item),Qy(L,t.gap),t.scrollTop>0&&(Qy(Z,!0),rb(lb(s,vb(1)),(function(e){Qy(Z,!1)})),Qy(c,{top:t.scrollTop})))})),nb(lb(A,pb((function(e){return e.height}))),u),nb(lb(xb(wb(A,Kw),wb(j,Kw),wb(L,(function(e,t){return e&&e.column===t.column&&e.row===t.row})),wb(s)),pb((function(e){var t=(0,v.Z)(e,4);return{viewport:t[0],item:t[1],gap:t[2],scrollTop:t[3]}}))),B),nb(lb(xb(wb(N),o,wb(L,Xw),wb(j,Kw),wb(A,Kw),wb(F),wb(I),wb(Z),wb(V),wb(U)),db((function(e){return!(0,v.Z)(e,8)[7]})),pb((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 Vw;if(0===y){var k=Ik(p,n);return function(e){return f(f({},Hw),{},{items:e})}($w(k,0===k?Math.max(c-1,0):k,l))}var w,x,S=nx(b,y,m);d?0===o&&0===a&&c>0?(w=0,x=c-1):(w=S*Yw((o+h)/(g+h)),x=S*Ww((a+h)/(g+h))-1,x=Jw(n-1,Gw(x,S-1)),w=Jw(x,Gw(0,w))):(w=0,x=-1);var T=$w(w,x,l),E=ex(u,i,s,T),_=E.top,C=E.bottom,O=Ww(n/S);return{items:T,offsetTop:_,offsetBottom:O*g+(O-1)*h-C,top:_,bottom:C,itemHeight:g,itemWidth:y}}))),P),nb(lb(F,db((function(e){return null!==e})),pb((function(e){return e.length}))),N),nb(lb(xb(A,j,P,L),db((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})),pb((function(e){var t=(0,v.Z)(e,4),n=t[0],r=t[1],o=t[2].items,a=ex(n,t[3],r,o);return[a.top,a.bottom]})),fb(Mk)),a);var q=ab(!1);nb(lb(s,bb(q),pb((function(e){var t=(0,v.Z)(e,2),n=t[0];return t[1]||0!==n}))),q);var W=ib(lb(wb(P),db((function(e){return e.items.length>0})),bb(N,q),db((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})),pb((function(e){return(0,v.Z)(e,2)[1]-1})),fb())),Y=ib(lb(wb(P),db((function(e){var t=e.items;return t.length>0&&0===t[0].index})),hb(0),fb())),J=ib(lb(wb(P),bb(Z),db((function(e){var t=(0,v.Z)(e,2),n=t[0].items,r=t[1];return n.length>0&&!r})),pb((function(e){var t=(0,v.Z)(e,1)[0].items;return{startIndex:t[0].index,endIndex:t[t.length-1].index}})),fb(Fk),gb(0)));nb(J,y.scrollSeekRangeChanged),nb(lb(D,bb(A,j,N,L),pb((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=xk(n),u=s.align,l=s.behavior,c=s.offset,f=s.index;"LAST"===f&&(f=a-1);var d=tx(r,i,o,f=Gw(0,f,Jw(a-1,f)));return"end"===u?d=qw(d-r.height+o.height):"center"===u&&(d=qw(d-r.height/2+o.height/2)),c&&(d+=c),{top:d,behavior:l}}))),c);var G=sb(lb(P,pb((function(e){return e.offsetBottom+e.bottom}))),0);return nb(lb(S,pb((function(e){return{width:e.visibleWidth,height:e.visibleHeight}}))),A),f(f(f({data:F,totalCount:N,viewportDimensions:A,itemDimensions:j,scrollTop:s,scrollHeight:R,overscan:r,scrollBy:l,scrollTo:c,scrollToIndex:D,smoothScrollTargetReached:d,windowViewportRect:S,windowScrollTo:C,useWindowScroll:T,customScrollParent:E,windowScrollContainerState:_,deviation:M,scrollContainerState:p,footerHeight:h,headerHeight:m,initialItemCount:I,gap:L,restoreStateFrom:z},y),{},{initialTopMostItemIndex:U,gridState:P,totalListHeight:G},g),{},{startReached:Y,endReached:W,rangeChanged:J,stateChanged:B,propsReady:k,stateRestoreInProgress:Z},O)}),Wy(Vk,Fb,Ck,$k,Ok,ow,Ib));function ex(e,t,n,r){var o=n.height;return void 0===o||0===r.length?{top:0,bottom:0}:{top:tx(e,t,n,r[0].index),bottom:tx(e,t,n,r[r.length-1].index)+o}}function tx(e,t,n,r){var o=nx(e.width,n.width,t.column),a=Yw(r/o),i=a*n.height+Gw(0,a-1)*t.row;return i>0?i+t.row:i}function nx(e,t,n){return Gw(1,Yw((e+n)/(Yw(t)+n)))}var rx=Sb((function(){var e=ab((function(e){return"Item ".concat(e)})),t=ab({}),n=ab(null),r=ab("virtuoso-grid-item"),o=ab("virtuoso-grid-list"),a=ab(gw),i=ab("div"),s=ab(Xy),u=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return sb(lb(t,pb((function(t){return t[e]})),fb()),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")}})),ox=Sb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),Wy(Qw,rx)),ax=r.memo((function(){var e=dx("gridState"),t=dx("listClassName"),n=dx("itemClassName"),o=dx("itemContent"),a=dx("computeItemKey"),i=dx("isSeeking"),s=fx("scrollHeight"),u=dx("ItemComponent"),l=dx("ListComponent"),c=dx("ScrollSeekPlaceholder"),d=dx("context"),p=fx("itemDimensions"),h=fx("gap"),m=dx("log"),v=dx("stateRestoreInProgress"),g=Ab((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:vx("row-gap",getComputedStyle(e).rowGap,m),column:vx("column-gap",getComputedStyle(e).columnGap,m)})}));return v?null:r.createElement(l,f(f({ref:g,className:t},Cw(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},Cw(c,d)),{},{index:t.index,height:e.itemHeight,width:e.itemWidth})):r.createElement(u,f(f({},Cw(u,d)),{},{className:n,"data-index":t.index,key:s}),o(t.index,t.data,d))})))})),ix=r.memo((function(){var e=dx("HeaderComponent"),t=fx("headerHeight"),n=dx("headerFooterTag"),o=Ab((function(e){return t(Db(e,"height"))})),a=dx("context");return e?r.createElement(n,{ref:o},r.createElement(e,Cw(e,a))):null})),sx=r.memo((function(){var e=dx("FooterComponent"),t=fx("footerHeight"),n=dx("headerFooterTag"),o=Ab((function(e){return t(Db(e,"height"))})),a=dx("context");return e?r.createElement(n,{ref:o},r.createElement(e,Cw(e,a))):null})),ux=function(e){var t=e.children,n=r.useContext(vw),o=fx("itemDimensions"),a=fx("viewportDimensions"),i=Ab((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:Ew,ref:i},t)},lx=function(e){var t=e.children,n=r.useContext(vw),o=fx("windowViewportRect"),a=fx("itemDimensions"),i=dx("customScrollParent"),s=hw(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:Ew},t)},cx=_b(ox,{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({},(jg(e),e)),n=dx("useWindowScroll"),o=dx("customScrollParent"),a=o||n?mx:hx,i=o||n?lx:ux;return r.createElement(a,f({},t),r.createElement(i,null,r.createElement(ix,null),r.createElement(ax,null),r.createElement(sx,null)))}))),fx=(cx.Component,cx.usePublisher),dx=cx.useEmitterValue,px=cx.useEmitter,hx=Iw({usePublisher:fx,useEmitterValue:dx,useEmitter:px}),mx=Pw({usePublisher:fx,useEmitterValue:dx,useEmitter:px});function vx(e,t,n){return"normal"===t||(null==t?void 0:t.endsWith("px"))||n("".concat(e," was not resolved to pixel value correctly"),t,Ob.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var gx=Sb((function(){var e=ab((function(e){return r.createElement("td",null,"Item $",e)})),t=ab(null),n=ab(null),o=ab(null),a=ab({}),i=ab(gw),s=ab(Xy),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return sb(lb(a,pb((function(t){return t[e]})),fb()),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")}})),yx=Sb((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];return f(f({},n),r)}),Wy(cw,gx)),bx=function(e){var t=e.height;return r.createElement("tr",null,r.createElement("td",{style:{height:t}}))},kx=function(e){var t=e.height;return r.createElement("tr",null,r.createElement("td",{style:{height:t,padding:0,border:0}}))},wx={overflowAnchor:"none"},xx=r.memo((function(){var e=Cx("listState"),t=_x("sizeRanges"),n=Cx("useWindowScroll"),o=Cx("customScrollParent"),a=_x("windowScrollContainerState"),s=_x("scrollContainerState"),u=o||n?a:s,l=Cx("itemContent"),c=Cx("trackItemSizes"),d=jb(t,Cx("itemSize"),c,u,Cx("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];Ox("deviation",(function(e){y!==e&&(h.current.style.marginTop="".concat(e,"px"),b(e))}));var k=Cx("EmptyPlaceholder"),w=Cx("ScrollSeekPlaceholder")||bx,x=Cx("FillerRow")||kx,S=Cx("TableBodyComponent"),T=Cx("TableRowComponent"),E=Cx("computeItemKey"),_=Cx("isSeeking"),C=Cx("paddingTopAddition"),O=Cx("firstItemIndex"),N=Cx("statefulTotalCount"),I=Cx("context");if(0===N&&k)return r.createElement(k,Cw(k,I));var P=e.offsetTop+C+y,A=e.offsetBottom,j=P>0?r.createElement(x,{height:P,key:"padding-top",context:I}):null,D=A>0?r.createElement(x,{height:A,key:"padding-bottom",context:I}):null,R=e.items.map((function(e){var t=e.originalIndex,n=E(t+O,e.data,I);return _?r.createElement(w,f(f({},Cw(w,I)),{},{key:n,index:e.index,height:e.size,type:e.type||"item"})):r.createElement(T,f(f({},Cw(T,I)),{},{key:n,"data-index":t,"data-known-size":e.size,"data-item-index":e.index,item:e.data,style:wx}),l(e.index,e.data,I))}));return r.createElement(S,f({ref:p,"data-test-id":"virtuoso-item-list"},Cw(S,I)),[j].concat((0,i.Z)(R),[D]))})),Sx=function(e){var t=e.children,n=r.useContext(mw),o=_x("viewportHeight"),a=_x("fixedItemHeight"),i=Ab(Zy(o,(function(e){return Db(e,"height")})));return r.useEffect((function(){n&&(o(n.viewportHeight),a(n.itemHeight))}),[n,o,a]),r.createElement("div",{style:Ew,ref:i,"data-viewport-type":"element"},t)},Tx=function(e){var t=e.children,n=r.useContext(mw),o=_x("windowViewportRect"),a=_x("fixedItemHeight"),i=Cx("customScrollParent"),s=hw(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:Ew,"data-viewport-type":"window"},t)},Ex=_b(yx,{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=Cx("useWindowScroll"),n=Cx("customScrollParent"),o=_x("fixedHeaderHeight"),a=_x("fixedFooterHeight"),i=Cx("fixedHeaderContent"),s=Cx("fixedFooterContent"),u=Cx("context"),l=Ab(Zy(o,(function(e){return Db(e,"height")}))),c=Ab(Zy(a,(function(e){return Db(e,"height")}))),d=n||t?Ix:Nx,p=n||t?Tx:Sx,h=Cx("TableComponent"),m=Cx("TableHeadComponent"),v=Cx("TableFooterComponent"),g=i?r.createElement(m,f({key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:l},Cw(m,u)),i()):null,y=s?r.createElement(v,f({key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:c},Cw(v,u)),s()):null;return r.createElement(d,f({},e),r.createElement(p,null,r.createElement(h,f({style:{borderSpacing:0,overflowAnchor:"none"}},Cw(h,u)),[g,r.createElement(xx,{key:"TableBody"}),y])))}))),_x=(Ex.Component,Ex.usePublisher),Cx=Ex.useEmitterValue,Ox=Ex.useEmitter,Nx=Iw({usePublisher:_x,useEmitterValue:Cx,useEmitter:Ox}),Ix=Pw({usePublisher:_x,useEmitterValue:Cx,useEmitter:Ox}),Px=["as","viewBox","color","focusable","children","className","__css"],Ax={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"},jx=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,Px),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:Ax.viewBox;if(n&&"string"!==typeof n)return(0,gr.jsx)(vr.svg,f(f({as:n},v),p));var y=null!=l?l:Ax.path;return(0,gr.jsx)(vr.svg,f(f(f({verticalAlign:"middle",viewBox:g},v),p),{},{children:y}))}));jx.displayName="Icon";function Dx(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)(jx,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 Rx=Dx({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"}),Mx=Dx({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"}),Fx=n(1842),Lx=new(n(5304)),Bx=function(e){var t=e.log;if(void 0!==t&&0!==t.length){var n=t;if(function(e){return _y.test(e)}(n)){var r=Lx.toHtml(n);n=Ty(r)}return(0,gr.jsx)(Cr,{style:Zx.row,children:n})}return(0,gr.jsx)(gr.Fragment,{})},zx=function(e){var t=e.logs,n=e.fileName,o=e.currentExecutionStatus,a=e.executionStatusText,i=(0,r.useState)(t),s=(0,v.Z)(i,2),u=s[0],l=s[1],c=(0,r.useRef)(null),f=mu().height,d=yu(""),p=d.onCopy,h=d.setValue,m=d.hasCopied,g=(0,r.useState)((0,gr.jsx)(gr.Fragment,{})),y=(0,v.Z)(g,2),b=y[0],k=y[1];(0,r.useEffect)((function(){l(t);var e=t.map((function(e){return Oy(e)}));h(e.join(Fx.EOL)),k(o)}),[t]);return(0,gr.jsxs)("div",{className:"flex flex-col bg-black",children:[(0,gr.jsx)(Uw,{style:{height:.8*(f-100),backgroundColor:"black"},ref:c,data:u,totalCount:u.length-1,itemContent:function(e,t){return(0,gr.jsx)(Bx,{index:e,log:t})},followOutput:"smooth"}),(0,gr.jsxs)(ku,{className:"bg-black",style:{height:"80px"},children:[(0,gr.jsx)(wu,{}),(0,gr.jsx)(Cr,{p:"2",m:"4",height:"40px",children:(0,gr.jsx)(Vr,{fontSize:"sm",children:a})}),(0,gr.jsx)(Cr,{p:"2",m:"4",height:"40px",children:b}),(0,gr.jsx)(xy,{label:"".concat(m?"Copied!":"Copy to clipboard"),placement:"top-end",closeOnClick:!1,children:(0,gr.jsx)(Cr,{p:"2",m:"4",onClick:p,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)(xy,{label:"Download to file",placement:"top",children:(0,gr.jsx)(Cr,{p:"2",m:"4",onClick:function(){var e=t.map((function(e){return Oy(e)})).join(Fx.EOL);Iy(e,n)},height:"40px",children:(0,gr.jsx)(Rx,{textColor:"white"})})}),(0,gr.jsx)(xy,{label:"Autoscroll to bottom",placement:"top",children:(0,gr.jsx)(Cr,{p:"2",m:"4",height:"40px",onClick:function(){c.current.scrollToIndex({index:u.length-1,behavior:"smooth",align:"end"})},children:(0,gr.jsx)(Mx,{textColor:"white"})})})]})]})},Zx={row:{fontSize:"10pt",fontFamily:"Menlo, Monaco, Inconsolata, Consolas, Courier, monospace",boxSizing:"border-box",borderBottom:"1px solid #222",padding:"1em",color:"white"}},Ux=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,Hs(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 t.containersStatus?{uuid:t.enclaveUuid,name:t.name,created:t.creationTime,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)}}(),Vx=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)}}(),Hx=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=Us(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)}}(),Wx=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 Yx=bc({strict:!1,name:"ButtonGroupContext"}),Jx=(0,v.Z)(Yx,2),Gx=(Jx[0],Jx[1]),$x=["children","className"];function Xx(e){var t=e.children,n=e.className,o=u(e,$x),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 Kx=Kn((function(e,t){var n=e.styles,o=Yn([n],void 0,r.useContext(Qn)),a=r.useRef();return $n((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]),$n((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 Qx(){for(var e=arguments.length,t=new Array(e),n=0;n\" "}),pS=(0,v.Z)(dS,2),hS=pS[0],mS=pS[1],vS=g((function(e,t){var n=Dr("Table",e),r=yt(e),o=r.className,a=r.layout,i=u(r,fS);return(0,gr.jsx)(hS,{value:n,children:(0,gr.jsx)(vr.table,f({ref:t,__css:f({tableLayout:a},n.table),className:T("chakra-table",o)},i))})}));vS.displayName="Table";var gS=g((function(e,t){var n=mS();return(0,gr.jsx)(vr.tr,f(f({},e),{},{ref:t,__css:n.tr}))})),yS=["isNumeric"],bS=g((function(e,t){var n=e.isNumeric,r=u(e,yS),o=mS();return(0,gr.jsx)(vr.td,f(f({},r),{},{ref:t,__css:o.td,"data-is-numeric":n}))})),kS=["overflow","overflowX","className"],wS=g((function(e,t){var n,r=e.overflow,o=e.overflowX,a=e.className,i=u(e,kS);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%"}}))})),xS=g((function(e,t){var n=mS();return(0,gr.jsx)(vr.tbody,f(f({},e),{},{ref:t,__css:n.tbody}))}));function SS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TS(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 ES(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=PS(LS)(n,t),o=PS(FS)(n),a=PS(RS.changes)(e),i=PS(MS)(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 vT(){}function gT(e,t,n,r){return function(e,t){return e.editor.getModel(yT(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?yT(e,r):void 0)}(e,t,n,r)}function yT(e,t){return e.Uri.parse(t)}var bT=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,_=e.wrapperProps,C=void 0===_?{}:_,O=e.beforeMount,N=void 0===O?vT:O,I=e.onMount,P=void 0===I?vT:I,A=(0,r.useState)(!1),j=(0,v.Z)(A,2),D=j[0],R=j[1],M=(0,r.useState)(!0),F=(0,v.Z)(M,2),L=F[0],B=F[1],z=(0,r.useRef)(null),Z=(0,r.useRef)(null),U=(0,r.useRef)(null),V=(0,r.useRef)(P),H=(0,r.useRef)(N),q=(0,r.useRef)(!1);hT((function(){var e=sT.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()}})),mT((function(){if(z.current&&Z.current){var e=z.current.getOriginalEditor(),n=gT(Z.current,t||"",a||o||"text",s||"");n!==e.getModel()&&e.setModel(n)}}),[s],D),mT((function(){if(z.current&&Z.current){var e=z.current.getModifiedEditor(),t=gT(Z.current,n||"",i||o||"text",u||"");t!==e.getModel()&&e.setModel(t)}}),[u],D),mT((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],D),mT((function(){var e;null===(e=z.current)||void 0===e||null===(e=e.getModel())||void 0===e||e.original.setValue(t||"")}),[t],D),mT((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],D),mT((function(){var e;null===(e=Z.current)||void 0===e||e.editor.setTheme(m)}),[m],D),mT((function(){var e;null===(e=z.current)||void 0===e||e.updateOptions(k)}),[k],D);var W=(0,r.useCallback)((function(){var e;if(Z.current){H.current(Z.current);var r=gT(Z.current,t||"",a||o||"text",s||""),l=gT(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]),Y=(0,r.useCallback)((function(){var e;!q.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),R(!0),q.current=!0)}),[k,m,W]);return(0,r.useEffect)((function(){D&&V.current(z.current,Z.current)}),[D]),(0,r.useEffect)((function(){!L&&!D&&Y()}),[L,D,Y]),r.createElement(pT,{width:T,height:x,isEditorReady:D,loading:y,_ref:U,className:E,wrapperProps:C})};(0,r.memo)(bT);var kT=function(e){var t=(0,r.useRef)();return(0,r.useEffect)((function(){t.current=e}),[e]),t.current},wT=new Map;var xT=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,_=void 0===E?"100%":E,C=e.className,O=e.wrapperProps,N=void 0===O?{}:O,I=e.beforeMount,P=void 0===I?vT:I,A=e.onMount,j=void 0===A?vT:A,D=e.onChange,R=e.onValidate,M=void 0===R?vT:R,F=(0,r.useState)(!1),L=(0,v.Z)(F,2),B=L[0],z=L[1],Z=(0,r.useState)(!0),U=(0,v.Z)(Z,2),V=U[0],H=U[1],q=(0,r.useRef)(null),W=(0,r.useRef)(null),Y=(0,r.useRef)(null),J=(0,r.useRef)(j),G=(0,r.useRef)(P),$=(0,r.useRef)(),X=(0,r.useRef)(a),K=kT(s),Q=(0,r.useRef)(!1),ee=(0,r.useRef)(!1);hT((function(){var e=sT.init();return e.then((function(e){return(q.current=e)&&H(!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=$.current)&&void 0!==e&&e.dispose(),x?k&&wT.set(s,W.current.saveViewState()):null===(t=W.current.getModel())||void 0===t||t.dispose(),W.current.dispose()}():e.cancel()}})),mT((function(){var e,r,u,l,c=gT(q.current,t||a||"",n||i||"",s||o||"");c!==(null===(e=W.current)||void 0===e?void 0:e.getModel())&&(k&&wT.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(wT.get(s))))}),[s],B),mT((function(){var e;null===(e=W.current)||void 0===e||e.updateOptions(m)}),[m],B),mT((function(){!W.current||void 0===a||(W.current.getOption(q.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),mT((function(){var e,t,n=null===(e=W.current)||void 0===e?void 0:e.getModel();n&&i&&(null===(t=q.current)||void 0===t||t.editor.setModelLanguage(n,i))}),[i],B),mT((function(){var e;void 0!==c&&(null===(e=W.current)||void 0===e||e.revealLine(c))}),[c],B),mT((function(){var e;null===(e=q.current)||void 0===e||e.editor.setTheme(l)}),[l],B);var te=(0,r.useCallback)((function(){if(Y.current&&q.current&&!Q.current){var e;G.current(q.current);var r=s||o,u=gT(q.current,a||t||"",n||i||"",r||"");W.current=null===(e=q.current)||void 0===e?void 0:e.editor.create(Y.current,f({model:u,automaticLayout:!0},m),y),k&&W.current.restoreViewState(wT.get(r)),q.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&&J.current(W.current,q.current)}),[B]),(0,r.useEffect)((function(){!V&&!B&&te()}),[V,B,te]),X.current=a,(0,r.useEffect)((function(){var e,t;B&&D&&(null!==(e=$.current)&&void 0!==e&&e.dispose(),$.current=null===(t=W.current)||void 0===t?void 0:t.onDidChangeModelContent((function(e){ee.current||D(W.current.getValue(),e)})))}),[B,D]),(0,r.useEffect)((function(){if(B){var e=q.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=q.current.editor.getModelMarkers({resource:n});null===M||void 0===M||M(r)}}));return function(){null===e||void 0===e||e.dispose()}}return function(){}}),[B,M]),r.createElement(pT,{width:T,height:_,isEditorReady:B,loading:p,_ref:Y,className:C,wrapperProps:N})},ST=(0,r.memo)(xT),TT=function(e){var t=e.uniqueId,n=e.dataCallback,o=void 0===n?function(e){}:n,a=e.readOnly,i=void 0!==a&&a,s=e.languages,u=void 0===s?["json"]:s,l=e.defaultWidthPx,c=void 0===l?500:l,f=e.defaultState,d=void 0===f?u.includes("json")?"{\n}":"":f,p=e.autoFormat,h=void 0!==p&&p,m=e.lineNumbers,g=void 0!==m&&m,y=e.showCopyButton,b=void 0===y||y,k=e.showDownloadButton,w=void 0===k||k,x=e.showFormatButton,S=void 0===x||x,T=e.buttonSizes,E=void 0===T?"sm":T,_=e.border,C=void 0===_?"1px":_,O=e.theme,N=void 0===O?"vs-dark":O,I=(0,r.useRef)(null),P=mu(),A=(0,r.useState)(!1),j=(0,v.Z)(A,2),D=j[0],R=j[1],M=(0,r.useState)(!1),F=(0,v.Z)(M,2),L=F[0],B=F[1],z=yu(""),Z=(0,r.useRef)(i),U=(0,r.useState)(i),V=(0,v.Z)(U,2),H=V[0],q=V[1],W=function(){return I.current?Y(t):null},Y=function(e){return I.current.editor.getEditors().find((function(t){return t.getModel().uri.toString()==="file:///".concat(e)}))};(0,r.useEffect)((function(){W()&&W().updateOptions({readOnly:H})}),[H]),(0,r.useEffect)((function(){D&&(!function(){try{return W().getOption(86)}catch(e){return}}()?W()&&W().getAction("editor.action.formatDocument").run().then((function(){q(Z.current),R(!1)})).catch((function(e){console.error("An error happened",e)})):q(!1))}),[D,L]),(0,r.useEffect)((function(){return J()}),[P]),(0,r.useEffect)((function(){return G(d)}),[d]);var J=function(){if(W()){var e=Math.min(750,W().getContentHeight());W().layout({width:c,height:e}),W().layout()}},G=function(e){J(),o(e),z.setValue(e)},$=function(){R(!0)};return J(),(0,gr.jsxs)(Cr,{border:C,borderColor:"gray.700",borderRadius:"7",margin:"1px",padding:1,children:[(0,gr.jsx)(ST,{margin:1,defaultLanguage:"json",value:d,theme:N,path:t,onMount:function(e,t){var n,r;I.current=t,J(),W().onDidChangeConfiguration((function(e){e.hasChanged(86)&&B(!L)})),h&&$(),n="kurtosis-theme",r={base:N,inherit:!0,rules:[],colors:{"editor.background":"#171923"}},I.current.editor.defineTheme(n,r),I.current.editor.setTheme(n)},onChange:G,options:{automaticLayout:!1,selectOnLineNumbers:g,lineNumbers:g,languages:u,readOnly:H,minimap:{enabled:!1},scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:function(e){return e?0:10}(H),alwaysConsumeMouseWheel:!i},renderLineHighlight:function(e){return e?"none":"line"}(H)}}),(0,gr.jsxs)(Cr,{marginTop:1,children:[b&&(0,gr.jsx)(sS,{margin:1,onClick:function(){z.setValue(d),z.onCopy()},size:E,children:z.hasCopied?"Copied!":"Copy"}),w&&(0,gr.jsx)(sS,{margin:1,onClick:function(){Iy(function(){var e;return null===(e=W())||void 0===e?void 0:e.getModel().getValue()}(),t)},size:E,children:"Download"}),S&&(0,gr.jsx)(sS,{margin:1,onClick:$,isDisabled:!u.includes("json"),size:E,children:"Format"})]})]})},ET=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)(gS,{color:"white",children:[(0,gr.jsx)(bS,{children:(0,gr.jsx)("p",{children:(0,gr.jsx)("b",{children:e})})}),(0,gr.jsx)(bS,{children:n})]},e)},_T=function(e,t,n,r){var o=JSON.stringify(r,null,2),a="".concat(e,"-").concat(t,"-").concat(n,".json");return(0,gr.jsx)(Cr,{children:(0,gr.jsx)(TT,{uniqueId:a,readOnly:!0,defaultWidthPx:250,defaultState:o,autoFormat:!0,showFormatButton:!1,buttonSizes:"xs"})})},CT=function(e){var t=e.service;return(0,gr.jsx)(wS,{children:(0,gr.jsx)(vS,{variant:"simple",size:"sm",children:(0,gr.jsxs)(xS,{children:[ET("Name",(function(){return t.name})),ET("UUID",(function(){return(0,gr.jsx)("pre",{children:t.serviceUuid})})),ET("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)(cS,{children:"N/A"});t="yellow",n="UNKNOWN"}return(0,gr.jsx)(cS,{colorScheme:t,children:n})}(t.serviceStatus)})),ET("Image",(function(){return t.container.imageName})),ET("Ports",(function(){return _T(t.shortenedUuid,t.name,"ports",t.ports)})),ET("ENTRYPOINT",(function(){return _T(t.shortenedUuid,t.name,"entrypoint",t.container.entrypointArgs)})),ET("CMD",(function(){return _T(t.shortenedUuid,t.name,"cmd",t.container.cmdArgs)})),ET("ENV",(function(){return _T(t.shortenedUuid,t.name,"env",t.container.envVars)}))]})})})},OT=function(){var e=Ga(),t=(0,r.useState)([]),n=(0,v.Z)(t,2),o=n[0],a=n[1],s=Ya().state,u=s.services,l=s.selected,c=uu().appData,f=Xa(),d=f.name,h=f.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,s,u,l,f;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,qx(e,d,h,c.apiHost,!0,1500);case 2:t=n.sent,n.prev=3,r=!1,o=!1,n.prev=6,u=p().mark((function e(){var t,n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=f.value,""!==(n=t.serviceLogsByServiceUuid[h].line[0])&&a((function(e){return[].concat((0,i.Z)(e),[n])}));case 3:case"end":return e.stop()}}),e)})),l=du(t);case 9:return n.next=11,l.next();case 11:if(!(r=!(f=n.sent).done)){n.next=16;break}return n.delegateYield(u(),"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,s=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 s;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.error("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(){a([]),e.abort()}}),[h]);var g=function(t){var n="/enclaves/".concat(d,"/services/").concat(t.serviceUuid);e(n,{state:{services:u,selected:t}})},y=function(){return"logs"===f["*"]};return(0,gr.jsxs)("div",{className:"flex h-full",children:[(0,gr.jsx)(nu,{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)}))}(u,g)}}),(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)(ku,{bg:"#171923",height:"80px",children:[(0,gr.jsx)(Cr,{p:"2",m:"4",children:(0,gr.jsxs)(Vr,{color:"white",fontSize:"xl",as:"b",children:[" ",y()?"Logs ":"Detailed Info "," for ",l.name," "]})}),(0,gr.jsx)(wu,{}),(0,gr.jsxs)(sS,{m:"4",onClick:function(){y()?e("/enclaves/".concat(d,"/services/").concat(l.serviceUuid),{state:{services:u,selected:l}}):e("/enclaves/".concat(d,"/services/").concat(l.serviceUuid,"/logs"),{state:{services:u,selected:l}})},children:[" ",y()?"Service":"Logs"," "]})]}),(0,gr.jsxs)(vi,{children:[(0,gr.jsx)(hi,{path:"/logs",element:o.length>0?(0,gr.jsx)(zx,{logs:o,fileName:"".concat(d,"-").concat(l.name)}):(0,gr.jsx)(Lr,{color:"white",children:" No Logs Available"})}),(0,gr.jsx)(hi,{path:"/",element:(0,gr.jsx)(CT,{service:l})})]})]})}),(0,gr.jsx)(ru,{home:!1,isServiceInfo:!0,enclaveName:d})]})},NT=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)(Di,{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)}))},PT=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),_=E[0],C=E[1],O=(0,r.useState)({}),N=(0,v.Z)(O,2),I=N[0],P=N[1],A=Ya().state.fileArtifacts,j=uu().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,eu(n[0].host,n[0].port,s,j.jwtToken,j.apiHost);case 4:r=e.sent,o=r.files,S(o),b(o),C([]),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 D=function(e){n("/enclaves/".concat(a,"/files/").concat(e),{replace:!0,state:{fileArtifacts:A}})},R=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)(Cr,{children:(0,gr.jsx)(TT,{uniqueId:i,readOnly:!0,languages:[o.extension],defaultState:o.textPreview,lineNumbers:!1,autoFormat:!0})}):(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)(Mi,{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)(nu,{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,D)}}),(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)(Mi,{color:"text-white",content:"".concat(a," - ").concat(s)})}),(0,gr.jsx)(NT,{currentPath:_,handleOnClick:function(e){if(e===_.length-1);else{var t=_.slice(0,e+1),n=x;t.map((function(e){n=n[e]})),b(n),C(t),P({})}},handleCleanButton:function(){C([]),P({}),b(x)}}),c?(0,gr.jsx)(ou,{}):(0,gr.jsx)(R,{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;_.map((function(e){r=r[e]})),C((function(t){return[].concat((0,i.Z)(t),[e])}))}else{var o=x;_.map((function(e){o=o[e]})),C((function(t){return[].concat((0,i.Z)(t),[e])})),b(o[e]),P({})}},detailInfo:I,enclaveName:a})]}),(0,gr.jsx)(ru,{isServiceInfo:!0,enclaveName:a})]})},AT=["id","isRequired","isInvalid","isDisabled","isReadOnly"],jT=["getRootProps","htmlProps"],DT=bc({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),RT=(0,v.Z)(DT,2),MT=RT[0],FT=RT[1],LT=bc({strict:!1,name:"FormControlContext"}),BT=(0,v.Z)(LT,2),zT=BT[0],ZT=BT[1];var UT=g((function(e,t){var n=Dr("Form",e),o=function(e){var t=e.id,n=e.isRequired,o=e.isInvalid,a=e.isDisabled,i=e.isReadOnly,s=u(e,AT),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),_=E[0],C=E[1],N=(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:zu(e,(function(e){e&&S(!0)}))})}),[h]),I=(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(_),"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,_,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:zu(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:!!_,onFocus:function(){return C(!0)},onBlur:function(){return C(!1)},hasFeedbackText:y,setHasFeedbackText:b,hasHelpText:x,setHasHelpText:S,id:c,labelId:d,feedbackId:p,helpTextId:h,htmlProps:s,getHelpTextProps:N,getErrorMessageProps:P,getRootProps:A,getLabelProps:I,getRequiredIndicatorProps:j}}(yt(e)),a=o.getRootProps,i=(o.htmlProps,u(o,jT)),s=T("chakra-form-control",e.className);return(0,gr.jsx)(zT,{value:i,children:(0,gr.jsx)(MT,{value:n,children:(0,gr.jsx)(vr.div,f(f({},a({},t)),{},{className:s,__css:n.container}))})})}));UT.displayName="FormControl";var VT=g((function(e,t){var n=ZT(),r=FT(),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}))}));VT.displayName="FormHelperText";var HT=["isDisabled","isInvalid","isReadOnly","isRequired"],qT=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function WT(e){var t,n,r,o=ZT(),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,qT),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:I(null==o?void 0:o.onFocus,m),onBlur:I(null==o?void 0:o.onBlur,v)})}var YT=["htmlSize"],JT=g((function(e,t){var n=e.htmlSize,r=u(e,YT),o=Dr("Input",r),a=function(e){var t=WT(e),n=t.isDisabled,r=t.isInvalid,o=t.isReadOnly,a=t.isRequired;return f(f({},u(t,HT)),{},{disabled:n,readOnly:o,required:a,"aria-invalid":N(r),"aria-required":N(a),"aria-readonly":N(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}))}));JT.displayName="Input",JT.id="Input";var GT=["area","colSpan","colStart","colEnd","rowEnd","rowSpan","rowStart"];function $T(e){return xr(e,(function(e){return"auto"===e?"auto":"span ".concat(e,"/span ").concat(e)}))}var XT=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,GT),d=Zr({gridArea:n,gridColumn:$T(r),gridRow:$T(s),gridColumnStart:o,gridColumnEnd:a,gridRowStart:l,gridRowEnd:i});return(0,gr.jsx)(vr.div,f({ref:t,__css:d},c))}));XT.displayName="GridItem";var KT=bc({name:"CheckboxGroupContext",strict:!1}),QT=(0,v.Z)(KT,2),eE=(QT[0],QT[1]),tE=["isIndeterminate","isChecked"];function nE(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 rE(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 oE(e){var t=e.isIndeterminate,n=e.isChecked,r=u(e,tE),o=t?rE:nE;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 aE(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 iE={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 uE=!1,lE=null,cE=!1,fE=!1,dE=new Set;function pE(e,t){dE.forEach((function(n){return n(e,t)}))}var hE="undefined"!==typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function mE(e){var t;cE=!0,(t=e).metaKey||!hE&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key||(lE="keyboard",pE("keyboard",e))}function vE(e){if(lE="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;pE("pointer",e)}}function gE(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(cE=!0,lE="virtual")}function yE(e){e.target!==window&&e.target!==document&&(cE||fE||(lE="virtual",pE("virtual",e)),cE=!1,fE=!1)}function bE(){cE=!1,fE=!0}function kE(){return"pointer"!==lE}function wE(){if(sE()&&!uE){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=WT(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"],_=e["aria-invalid"],C=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,SE),["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=dc(g),P=dc(l),A=dc(c),j=(0,r.useState)(!1),D=(0,v.Z)(j,2),R=D[0],M=D[1],F=(0,r.useState)(!1),L=(0,v.Z)(F,2),B=L[0],z=L[1],Z=(0,r.useState)(!1),U=(0,v.Z)(Z,2),V=U[0],H=U[1],q=(0,r.useState)(!1),W=(0,v.Z)(q,2),Y=W[0],J=W[1];(0,r.useEffect)((function(){return xE(M)}),[]);var G=(0,r.useRef)(null),$=(0,r.useState)(!0),X=(0,v.Z)($,2),K=X[0],Q=X[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==N||N(e))}),[o,n,ae,oe,b,N]);Ec((function(){G.current&&(G.current.indeterminate=Boolean(b))}),[b]),aE((function(){n&&z(!1)}),[n,z]),Ec((function(){var e=G.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&&J(!0)}),[J]),le=(0,r.useCallback)((function(e){" "===e.key&&J(!1)}),[J]);Ec((function(){G.current&&(G.current.checked!==ae&&re(G.current.checked))}),[G.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(Y),"data-hover":O(V),"data-checked":O(ae),"data-focus":O(B),"data-focus-visible":O(B&&R),"data-indeterminate":O(b),"data-disabled":O(n),"data-invalid":O(i),"data-readonly":O(o),"aria-hidden":!0,onMouseDown:I(e.onMouseDown,(function(e){B&&e.preventDefault(),J(!0)})),onMouseUp:I(e.onMouseUp,(function(){return J(!1)})),onMouseEnter:I(e.onMouseEnter,(function(){return H(!0)})),onMouseLeave:I(e.onMouseLeave,(function(){return H(!1)}))})}),[Y,ae,n,B,R,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(Y),"data-hover":O(V),"data-checked":O(ae),"data-focus":O(B),"data-focus-visible":O(B&&R),"data-indeterminate":O(b),"data-disabled":O(n),"data-invalid":O(i),"data-readonly":O(o)})}),[Y,ae,n,B,R,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({},C),e),{},{ref:zu(t,(function(e){e&&Q("LABEL"===e.tagName)})),onClick:I(e.onClick,(function(){var e;K||(null==(e=G.current)||e.click(),requestAnimationFrame((function(){var e;null==(e=G.current)||e.focus({preventScroll:!0})})))})),"data-disabled":O(n),"data-checked":O(ae),"data-invalid":O(i)})}),[C,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:zu(G,t),type:"checkbox",name:k,value:w,id:s,tabIndex:S,onChange:I(e.onChange,ie),onBlur:I(e.onBlur,P,(function(){return z(!1)})),onFocus:I(e.onFocus,A,(function(){return z(!0)})),onKeyDown:I(e.onKeyDown,ue),onKeyUp:I(e.onKeyUp,le),required:a,checked:ae,disabled:se,readOnly:o,"aria-label":T,"aria-labelledby":E,"aria-invalid":_?Boolean(_):i,"aria-describedby":d,"aria-disabled":n,style:iE})}),[k,w,s,ie,P,A,ue,le,a,ae,se,o,T,E,_,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:I(e.onMouseDown,EE),"data-disabled":O(n),"data-checked":O(ae),"data-invalid":O(i)})}),[ae,n,i]);return{state:{isInvalid:i,isFocused:B,isChecked:ae,isActive:Y,isHovered:V,isIndeterminate:b,isDisabled:n,isReadOnly:o,isRequired:a},getRootProps:de,getCheckboxProps:ce,getIndicatorProps:fe,getInputProps:pe,getLabelProps:he,htmlProps:C}}function EE(e){e.preventDefault(),e.stopPropagation()}var _E=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],CE={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},OE={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},NE=eS({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),IE=eS({from:{opacity:0},to:{opacity:1}}),PE=eS({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),AE=g((function(e,t){var n=eE(),o=Dr("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)(oE,{}):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,_E),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\" "}),HE=(0,v.Z)(VE,2),qE=HE[0],WE=HE[1],YE=g((function(e,t){var n=Dr("Input",e),o=yt(e),a=o.children,i=o.className,s=u(o,UE),l=T("chakra-input__group",i),c={},d=DE(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)(qE,{value:n,children:h})}))}));YE.displayName="InputGroup";var JE=["placement"],GE={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},$E=vr("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),XE=g((function(e,t){var n,r=e.placement,o=void 0===r?"left":r,a=u(e,JE),i=null!=(n=GE[o])?n:{},s=WE();return(0,gr.jsx)($E,f(f({ref:t},a),{},{__css:f(f({},s.addon),i)}))}));XE.displayName="InputAddon";var KE=g((function(e,t){return(0,gr.jsx)(XE,f(f({ref:t,placement:"left"},e),{},{className:T("chakra-input__left-addon",e.className)}))}));KE.displayName="InputLeftAddon",KE.id="InputLeftAddon";var QE=g((function(e,t){return(0,gr.jsx)(XE,f(f({ref:t,placement:"right"},e),{},{className:T("chakra-input__right-addon",e.className)}))}));function e_(){return e_=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,a=void 0!==o&&o;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),c_(e))for(n=0,r=e.length;n0;)if(t===(n=r[o]).toLowerCase())return n;return null}var E_="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,__=function(e){return!f_(e)&&e!==E_};var C_,O_=(C_="undefined"!==typeof Uint8Array&&i_(Uint8Array),function(e){return C_&&e instanceof C_}),N_=u_("HTMLFormElement"),I_=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),P_=u_("RegExp"),A_=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};S_(n,(function(n,o){var a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},j_="abcdefghijklmnopqrstuvwxyz",D_="0123456789",R_={DIGIT:D_,ALPHA:j_,ALPHA_DIGIT:j_+j_.toUpperCase()+D_};var M_=u_("AsyncFunction"),F_={isArray:c_,isArrayBuffer:d_,isBuffer:function(e){return null!==e&&!f_(e)&&null!==e.constructor&&!f_(e.constructor)&&h_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"===typeof FormData&&e instanceof FormData||h_(e.append)&&("formdata"===(t=s_(e))||"object"===t&&h_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d_(e.buffer)},isString:p_,isNumber:m_,isBoolean:function(e){return!0===e||!1===e},isObject:v_,isPlainObject:g_,isUndefined:f_,isDate:y_,isFile:b_,isBlob:k_,isRegExp:P_,isFunction:h_,isStream:function(e){return v_(e)&&h_(e.pipe)},isURLSearchParams:x_,isTypedArray:O_,isFileList:w_,forEach:S_,merge:function e(){for(var t=(__(this)&&this||{}).caseless,n={},r=function(r,o){var a=t&&T_(n,o)||o;g_(n[a])&&g_(r)?n[a]=e(n[a],r):g_(r)?n[a]=e({},r):c_(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&&i_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s_,kindOfTest:u_,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(c_(e))return e;var t=e.length;if(!m_(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:N_,hasOwnProperty:I_,hasOwnProp:I_,reduceDescriptors:A_,freezeMethods:function(e){A_(e,(function(t,n){if(h_(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];h_(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 c_(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:T_,global:E_,isContextDefined:__,ALPHABET:R_,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]:R_.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h_(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(v_(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=c_(n)?[]:{};return S_(n,(function(t,n){var a=e(t,r+1);!f_(a)&&(o[n]=a)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:M_,isThenable:function(e){return e&&(v_(e)||h_(e))&&h_(e.then)&&h_(e.catch)}};function L_(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)}F_.inherits(L_,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:F_.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var B_=L_.prototype,z_={};["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){z_[e]={value:e}})),Object.defineProperties(L_,z_),Object.defineProperty(B_,"isAxiosError",{value:!0}),L_.from=function(e,t,n,r,o,a){var i=Object.create(B_);return F_.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),L_.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};var Z_=L_;function U_(e){return F_.isPlainObject(e)||F_.isArray(e)}function V_(e){return F_.endsWith(e,"[]")?e.slice(0,-2):e}function H_(e,t,n){return e?e.concat(t).map((function(e,t){return e=V_(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var q_=F_.toFlatObject(F_,{},null,(function(e){return/^is[A-Z]/.test(e)}));var W_=function(e,t,n){if(!F_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=(n=F_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F_.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!==typeof Blob&&Blob)&&F_.isSpecCompliantForm(t);if(!F_.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(F_.isDate(e))return e.toISOString();if(!s&&F_.isBlob(e))throw new Z_("Blob is not supported. Use a Buffer instead.");return F_.isArrayBuffer(e)||F_.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(F_.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F_.isArray(e)&&function(e){return F_.isArray(e)&&!e.some(U_)}(e)||(F_.isFileList(e)||F_.endsWith(n,"[]"))&&(s=F_.toArray(e)))return n=V_(n),s.forEach((function(e,r){!F_.isUndefined(e)&&null!==e&&t.append(!0===i?H_([n],r,a):null===i?n:n+"[]",u(e))})),!1;return!!U_(e)||(t.append(H_(o,n,a),u(e)),!1)}var c=[],f=Object.assign(q_,{defaultVisitor:l,convertValue:u,isVisitable:U_});if(!F_.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!F_.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),F_.forEach(n,(function(n,a){!0===(!(F_.isUndefined(n)||null===n)&&o.call(t,n,F_.isString(a)?a.trim():a,r,f))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t};function Y_(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function J_(e,t){this._pairs=[],e&&W_(e,this,t)}var G_=J_.prototype;G_.append=function(e,t){this._pairs.push([e,t])},G_.toString=function(e){var t=e?function(t){return e.call(this,t,Y_)}:Y_;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var $_=J_;function X_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function K_(e,t,n){if(!t)return e;var r,o=n&&n.encode||X_,a=n&&n.serialize;if(r=a?a(t,n):F_.isURLSearchParams(t)?t.toString():new $_(t,n).toString(o)){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}var Q_=function(){function e(){(0,Hr.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){F_.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),eC=Q_,tC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nC={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:$_,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 rC=function(e){function t(e,n,r,o){var a=e[o++],i=Number.isFinite(+a),s=o>=e.length;return a=!a&&F_.isArray(r)?r.length:a,s?(F_.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i):(r[a]&&F_.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&F_.isArray(r[a])&&(r[a]=function(e){var t,n,r={},o=Object.keys(e),a=o.length;for(t=0;t-1,a=F_.isObject(e);if(a&&F_.isHTMLForm(e)&&(e=new FormData(e)),F_.isFormData(e))return o&&o?JSON.stringify(rC(e)):e;if(F_.isArrayBuffer(e)||F_.isBuffer(e)||F_.isStream(e)||F_.isFile(e)||F_.isBlob(e))return e;if(F_.isArrayBufferView(e))return e.buffer;if(F_.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 W_(e,new nC.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return nC.isNode&&F_.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=F_.isFileList(e))||r.indexOf("multipart/form-data")>-1){var i=this.env&&this.env.FormData;return W_(n?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),function(e,t,n){if(F_.isString(e))try{return(t||JSON.parse)(e),F_.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||oC.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&F_.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 Z_.from(a,Z_.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:nC.classes.FormData,Blob:nC.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F_.forEach(["delete","get","head","post","put","patch"],(function(e){oC.headers[e]={}}));var aC=oC,iC=F_.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"]),sC=Symbol("internals");function uC(e){return e&&String(e).trim().toLowerCase()}function lC(e){return!1===e||null==e?e:F_.isArray(e)?e.map(lC):String(e)}function cC(e,t,n,r,o){return F_.isFunction(r)?r.call(this,t,n):(o&&(t=n),F_.isString(t)?F_.isString(r)?-1!==t.indexOf(r):F_.isRegExp(r)?r.test(t):void 0:void 0)}var fC=function(e,t){function n(e){(0,Hr.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=uC(t);if(!o)throw new Error("header name must be a non-empty string");var a=F_.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=lC(e))}var a=function(e,t){return F_.forEach(e,(function(e,n){return o(e,n,t)}))};return F_.isPlainObject(e)||e instanceof this.constructor?a(e,t):F_.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]&&iC[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=uC(e)){var n=F_.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(F_.isFunction(t))return t.call(this,r,n);if(F_.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=uC(e)){var n=F_.findKey(this,e);return!(!n||void 0===this[n]||t&&!cC(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=uC(e)){var o=F_.findKey(n,e);!o||t&&!cC(0,n[o],o,t)||(delete n[o],r=!0)}}return F_.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&&!cC(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return F_.forEach(this,(function(r,o){var a=F_.findKey(n,o);if(a)return t[a]=lC(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]=lC(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(TC).join("\n"):" "+TC(s[0]):"as no adapter specified";throw new Z_("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return n};function CC(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vC(null,e)}function OC(e){return CC(e),e.headers=dC.from(e.headers),e.data=pC.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_C(e.adapter||aC.adapter)(e).then((function(t){return CC(e),t.data=pC.call(e,e.transformResponse,t),t.headers=dC.from(t.headers),t}),(function(t){return hC(t)||(CC(e),t&&t.response&&(t.response.data=pC.call(e,e.transformResponse,t.response),t.response.headers=dC.from(t.response.headers))),Promise.reject(t)}))}var NC=function(e){return e instanceof dC?e.toJSON():e};function IC(e,t){t=t||{};var n={};function r(e,t,n){return F_.isPlainObject(e)&&F_.isPlainObject(t)?F_.merge.call({caseless:n},e,t):F_.isPlainObject(t)?F_.merge({},t):F_.isArray(t)?t.slice():t}function o(e,t,n){return F_.isUndefined(t)?F_.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!F_.isUndefined(t))return r(void 0,t)}function i(e,t){return F_.isUndefined(t)?F_.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(NC(e),NC(t),!0)}};return F_.forEach(Object.keys(Object.assign({},e,t)),(function(r){var a=u[r]||o,i=a(e[r],t[r],r);F_.isUndefined(i)&&a!==s||(n[r]=i)})),n}var PC="1.5.1",AC={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){AC[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var jC={};AC.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 Z_(r(o," has been removed"+(t?" in "+t:"")),Z_.ERR_DEPRECATED);return t&&!jC[o]&&(jC[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 DC={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Z_("options must be an object",Z_.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 Z_("option "+a+" must be "+u,Z_.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z_("Unknown option "+a,Z_.ERR_BAD_OPTION)}},validators:AC},RC=DC.validators,MC=function(){function e(t){(0,Hr.Z)(this,e),this.defaults=t,this.interceptors={request:new eC,response:new eC}}return(0,qr.Z)(e,[{key:"request",value:function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};var n=t=IC(this.defaults,t),r=n.transitional,o=n.paramsSerializer,a=n.headers;void 0!==r&&DC.assertOptions(r,{silentJSONParsing:RC.transitional(RC.boolean),forcedJSONParsing:RC.transitional(RC.boolean),clarifyTimeoutError:RC.transitional(RC.boolean)},!1),null!=o&&(F_.isFunction(o)?t.paramsSerializer={serialize:o}:DC.assertOptions(o,{encode:RC.function,serialize:RC.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var i=a&&F_.merge(a.common,a[t.method]);a&&F_.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete a[e]})),t.headers=dC.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=[OC.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 vC(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}(),BC=LC;var zC={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(zC).forEach((function(e){var t=(0,v.Z)(e,2),n=t[0],r=t[1];zC[r]=n}));var ZC=zC;var UC=function e(t){var n=new FC(t),r=r_(FC.prototype.request,n);return F_.extend(r,FC.prototype,n,{allOwnKeys:!0}),F_.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(IC(t,n))},r}(aC);UC.Axios=FC,UC.CanceledError=vC,UC.CancelToken=BC,UC.isCancel=hC,UC.VERSION=PC,UC.toFormData=W_,UC.AxiosError=Z_,UC.Cancel=UC.CanceledError,UC.all=function(e){return Promise.all(e)},UC.spread=function(e){return function(t){return e.apply(null,t)}},UC.isAxiosError=function(e){return F_.isObject(e)&&!0===e.isAxiosError},UC.mergeConfig=IC,UC.AxiosHeaders=dC,UC.formToJSON=function(e){return rC(F_.isHTMLForm(e)?new FormData(e):e)},UC.getAdapter=_C,UC.HttpStatusCode=ZC,UC.default=UC;var VC=UC,HC="https://cloud.kurtosis.com:9770",qC=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,VC.post("".concat(HC,"/kurtosis_package_indexer.KurtosisPackageIndexer/GetPackages"),{field:""},{headers:{"Content-Type":"application/json"}});case 3:if(t=e.sent,!("packages"in(n=t.data))){e.next=8;break}return n.packages.sort((function(e,t){return e.name.toLowerCase()t.name.toLowerCase()?1:0})),e.abrupt("return",n.packages);case 8:return e.abrupt("return",[]);case 11:return e.prev=11,e.t0=e.catch(0),console.error("error occurred"),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),WC=function(){var e=m(p().mark((function e(t,n,r){var o,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,VC.post("".concat(HC,"/kurtosis_package_indexer.KurtosisPackageIndexer/ReadPackage"),{repository_metadata:{base_url:t,owner:n,name:r}},{headers:{"Content-Type":"application/json"}});case 3:return o=e.sent,a=o.data,console.log("Read package",a),e.abrupt("return",a);case 9:return e.prev=9,e.t0=e.catch(0),console.error("error occurred"),e.abrupt("return",{});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t,n,r){return e.apply(this,arguments)}}(),YC=function(e){var t=JC(e);return WC(t.base,t.owner,t.name)},JC=function(e){var t=e.split("/");if(t.length<3)throw"Illegal url, invalid number of components: ".concat(e);if(t[1].length<1||t[2].length<1)throw"Illegal url, empty components: ".concat(e);return{base:"github.com",owner:t[1],name:t[2]}},GC=n(4234),$C=function(e,t){if("LIST"===e)try{var n=KC(t);return void 0===n?"LIST":"".concat(n," LIST").toLowerCase()}catch(a){return"LIST".toLowerCase()}if("DICT"===e)try{var r=QC(t),o=eO(t);return void 0===r||void 0===o?"DICT":"".concat(r," -> ").concat(o).toLowerCase()}catch(a){return"DICT".toLowerCase()}return e.toLowerCase()},XC=function(e){return e.name},KC=function(e){return e.typeV2.topLevelType},QC=function(e){return e.typeV2.innerType1},eO=function(e){return e.typeV2.innerType2},tO=function(e){return e.isRequired},nO=function(e,t,n,r,o,a,i){var s="".concat(i,"-").concat(e),u=function(e){return a(e,o)};switch(t){case"INTEGER":case"STRING":case"BOOL":case"LIST":case"FLOAT":return(0,gr.jsx)(JT,{color:"gray.300",onChange:function(e){return a(e.target.value,o)},value:r[o],borderColor:n[o]?"red.400":null});case"JSON":var l=""===r[o]?"{}":r[o];return(0,gr.jsx)(Cr,{border:n[o]?"1px":null,borderColor:n[o]?"red.400":null,children:(0,gr.jsx)(TT,{uniqueId:s,dataCallback:u,defaultState:l})});case"DICT":return(0,gr.jsx)(Cr,{border:n[o]?"1px":null,borderColor:n[o]?"red.400":null,children:(0,gr.jsx)(n_,{dataCallback:u,defaultState:r[o]})});default:return(0,gr.jsx)("p",{children:"Unsupported data type encountered"},"data-".concat(o))}},rO=function(e,t){if("string"===typeof e)try{var n=JSON.parse(e);return!(t&&Object.keys(n).length<1)}catch(r){return console.error("Data is not serialized json",e),!1}else if("object"===typeof e)try{return!(t&&Object.keys(e).length<1)}catch(r){return!1}console.error("Data is unknown type ".concat(typeof e),e)},oO=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},aO=function(){var e=m(p().mark((function e(t,n,r,o){var a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xs(t,n,r,o);case 2:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),iO=function(e){var t=e.createEnclave,n=e.mode,o=uu().appData,a=Ga(),i=Ya().state,s=(0,r.useState)(!1),u=(0,v.Z)(s,2),c=u[0],d=u[1],h=(0,r.useState)(""),g=(0,v.Z)(h,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)({}),E=(0,v.Z)(T,2),_=E[0],C=E[1],O=(0,r.useState)({}),N=(0,v.Z)(O,2),I=N[0],P=N[1],A=(0,r.useState)({}),j=(0,v.Z)(A,2),D=j[0],R=j[1],M=function(){return"edit"===n},F=function(e,t,n,r){var o={},a={};e.args.forEach((function(e,t){"plan"!==e.name&&(o[t]=""),r&&r[e.name]&&(o[t]=function(e){var t=e;try{"object"===typeof t&&(t=JSON.stringify(t))}catch(n){}return t}(r[e.name]))})),e.args.forEach((function(e,t){"plan"!==e.name&&(a[t]="")})),P(o),R(a),C(e)};(0,r.useEffect)((function(){if("create"===n){var e=i.kurtosisPackage;F(e,0,0,null)}else if(M()){var t=i.name,r=i.host,a=i.port;i.enclave;qC().then((function(e){aO(r,a,o.jwtToken,o.apiHost).then((function(n){var r=e.find((function(e){return e.name===n.packageId}));b(t);var o=JSON.parse(n.serializedParams||"{}");r?F(r,0,0,o):(console.warn("Was not able to match an indexed package to the running enclave ".concat(n.name," for package id: ").concat(n.packageId,". Loading it manually...")),YC(n.packageId).then((function(e){e.package?(F(e.package,0,0,o),console.log("Loaded a package manually from the indexer that matched the package name in the run config ".concat(n.packageId),e.package)):console.error("Was not able to match a package to the running enclave ".concat(n.name," for package id: ").concat(n.packageId))})))}))}))}else console.error("Unsupported package configuration mode: ".concat(n))}),[]);var L=function(e,t){var n=f(f({},I),{},(0,l.Z)({},t,e));if(P(n),D[t]){var r=f(f({},D),{},(0,l.Z)({},t,!1));R(r)}},B=function(){var e=m(p().mark((function e(n,r,o,a,i){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(n,r,o,a,i);case 2:d(!1);case 3:case"end":return e.stop()}}),e)})));return function(t,n,r,o,a){return e.apply(this,arguments)}}(),z=(0,r.useState)((0,gr.jsx)(gr.Fragment,{})),Z=(0,v.Z)(z,2),U=Z[0],V=Z[1];return(0,r.useEffect)((function(){_.args&&I&&D&&V(function(e,t,n,r,o){return e.map((function(e,a){if("plan"!==XC(e)){var i="JSON";try{switch(KC(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){}return(0,gr.jsxs)(ku,{color:"white",children:[(0,gr.jsxs)(ku,{mr:"3",direction:"column",w:"15%",children:[(0,gr.jsxs)(Vr,{marginLeft:3,align:"right",fontSize:"l",children:[BE()(e.name),(0,gr.jsx)(Vr,{fontSize:"l",as:"span",color:"red",children:(0,gr.jsx)(xy,{label:"Required variable",children:(0,gr.jsx)("span",{children:e.isRequired?" *":null})})}),(0,gr.jsx)(xy,{label:e.description,children:(0,gr.jsx)(zE,{marginLeft:2})})]}),(0,gr.jsx)(Vr,{marginLeft:3,as:"kbd",fontSize:"xs",align:"right",children:$C(i,e)})]}),(0,gr.jsxs)(ku,{flex:"1",mr:"3",direction:"column",children:[r&&r[a]&&r[a].length>0?(0,gr.jsx)(Vr,{marginLeft:3,align:"left",fontSize:"xs",color:"red.500",children:r[a]}):null,nO(e.name,i,r,n,a,t,o)]})]},"entry-".concat(a))}}))}(_.args,L,I,D,_.name))}),[_.args,I,D,_.name]),(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)(XT,{area:"option",pt:"1",children:(0,gr.jsx)(FE,{catalog:!0})}),(0,gr.jsx)(XT,{area:"packageId",p:"1",children:(0,gr.jsxs)(ku,{direction:"column",gap:"2",children:[(0,gr.jsx)(Lr,{children:(0,gr.jsxs)(Vr,{color:"white",fontSize:"2xl",children:[" ",_.name," "]})}),(0,gr.jsx)(AE,{marginLeft:2,color:"white",fontSize:"xl",isChecked:x,onChange:function(e){return S(e.target.checked)},children:(0,gr.jsxs)(Vr,{children:["Restart services",(0,gr.jsx)(xy,{label:"When enabled, Kurtosis will automatically restart any services that crash inside the enclave",children:(0,gr.jsx)(zE,{marginLeft:2})})]})})]})}),(0,gr.jsx)(XT,{area:"main",h:"90%",overflowY:"scroll",mt:"10",children:(0,gr.jsxs)(ME,{spacing:4,children:[(0,gr.jsxs)(ku,{color:"white",children:[(0,gr.jsx)(ku,{mr:"3",direction:"column",w:"15%",children:(0,gr.jsxs)(Vr,{marginLeft:3,align:"right",fontSize:"l",children:["Enclave Name",(0,gr.jsx)(xy,{label:"Leave empty to auto-generate an enclave name",children:(0,gr.jsx)(zE,{marginLeft:2})})]})}),(0,gr.jsx)(ku,{flex:"1",mr:"3",direction:"column",children:(0,gr.jsx)(JT,{color:"gray.300",value:y,onChange:function(e){return b(e.target.value)},disabled:M()})})]}),U]})}),(0,gr.jsx)(XT,{area:"configure",m:"10px",children:(0,gr.jsxs)(ku,{gap:5,children:[(0,gr.jsx)(sS,{colorScheme:"red",w:"50%",onClick:function(){a("/catalog")},children:" Cancel "}),(0,gr.jsx)(sS,{bg:"#24BA27",w:"50%",onClick:function(){var e={};if(Object.keys(I).filter((function(t){var n=_.args[t],r="";try{r=KC(n)}catch(u){}var o=tO(n);if(o||0!==I[t].length){var a,i=!0;if("STRING"===r)i=function(e){if("undefined"===e||0===e.length)return!1;try{return"string"===typeof JSON.parse(e)}catch(t){return!e.includes('"')&&!e.includes("'")}}(I[t]);else if("INTEGER"===r)i=function(e){if("undefined"===e)return!1;try{var t=e.trim();return/^-?\d+$/.test(t)}catch(n){return!1}}(I[t]);else if("BOOL"===r)i=function(e){var t=e.trim();return["TRUE","FALSE"].includes(t.toUpperCase())}(I[t]);else if("FLOAT"===r)i=function(e){if("undefined"===e)return!1;var t=e.trim();return 0!==t.length&&!isNaN(Number(t))}(I[t]);else if("LIST"===r){var s=QC(n);i=function(e,t){if("undefined"===e)return!1;try{return oO(e,t),!0}catch(n){return!1}}(I[t],s)}else i="DICT"===r?rO(I[t],o):"JSON"===r?rO(I[t],!1):function(e){try{GC.load(e)}catch(t){return!1}return!0}(I[t]);a=void 0===r?"JSON":"BOOL"===r?"BOOLEAN (TRUE/FALSE)":$C(r,_.args[t]),i||(e[t]="Incorrect type: expected ".concat(a))}})),Object.keys(I).filter((function(t){var n=!0;tO(_.args[t])&&0===I[t].length&&(n=!1),n||(e[t]="This field is required and cannot be empty")})),0===Object.keys(e).length){d(!0);var t={};Object.keys(I).map((function(e){var n=_.args[e],r=XC(n),o="";try{o=KC(n)}catch(u){}var a,i=I[e];if(i.length>0)if("INTEGER"===o)a=parseInt(i),t[r]=a;else if("BOOL"===o)a=i.trim().toUpperCase(),t[r]="TRUE"===a;else if("FLOAT"===o)a=parseFloat(i),t[r]=a;else if("LIST"===o){var s=QC(_,e);a=oO(i,s),t[r]=a}else if("STRING"===o)t[r]=i;else if("DICT"===o)if("string"===typeof i)try{a=JSON.parse(i),Object.keys(a).length>0&&(t[r]=a)}catch(l){console.error("Expected data to be serialized json, but parsing failed. arg=".concat(r,", value=").concat(i))}else"object"===typeof i?Object.keys(i).length>0&&(t[r]=i):console.error("Data field '".concat(r,"' was not a valid object but was type ").concat(typeof i,". Contained value: '").concat(i,"'"));else try{a=JSON.parse(i),t[r]=a}catch(c){console.error("Data field '".concat(r,"' was not a valid object but was type ").concat(typeof i,". Contained value: '").concat(i,"'"))}})),console.log("raw args",t);var r=JSON.stringify(t),o={packageId:_.name,args:r};if(console.log("Creating enclave with package args",o),M()){var a=i.enclave;B(o,y,x,n,a)}else B(o,y,x,n,null)}else{var s=f(f({},D),e);R(s)}},isLoading:c,loadingText:"Running...",children:"Run"})]})})]})})},sO=["children","styleType","stylePosition","spacing"],uO=["as"],lO=["as"],cO=bc({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" "}),fO=(0,v.Z)(cO,2),dO=fO[0],pO=fO[1],hO=g((function(e,t){var n=Dr("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,sO),p=DE(o),h=c?(0,l.Z)({},"& > *:not(style) ~ *:not(style)",{mt:c}):{};return(0,gr.jsx)(dO,{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}))})}));hO.displayName="List",g((function(e,t){e.as;var n=u(e,uO);return(0,gr.jsx)(hO,f({ref:t,as:"ol",styleType:"decimal",marginStart:"1em"},n))})).displayName="OrderedList",g((function(e,t){e.as;var n=u(e,lO);return(0,gr.jsx)(hO,f({ref:t,as:"ul",styleType:"initial",marginStart:"1em"},n))})).displayName="UnorderedList";var mO=g((function(e,t){var n=pO();return(0,gr.jsx)(vr.li,f(f({ref:t},e),{},{__css:n.item}))}));mO.displayName="ListItem";var vO=g((function(e,t){var n=pO();return(0,gr.jsx)(jx,f(f({ref:t,role:"presentation"},e),{},{__css:n.icon}))}));vO.displayName="ListIcon";var gO=["placement"],yO=["className"],bO=["className"],kO=vr("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wO=g((function(e,t){var n,r,o,a=e.placement,i=void 0===a?"left":a,s=u(e,gO),c=WE(),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)(kO,f({ref:t,__css:h},s))}));wO.id="InputElement",wO.displayName="InputElement";var xO=g((function(e,t){var n=e.className,r=u(e,yO),o=T("chakra-input__left-element",n);return(0,gr.jsx)(wO,f({ref:t,placement:"left",className:o},r))}));xO.id="InputLeftElement",xO.displayName="InputLeftElement";var SO=g((function(e,t){var n=e.className,r=u(e,bO),o=T("chakra-input__right-element",n);return(0,gr.jsx)(wO,f({ref:t,placement:"right",className:o},r))}));SO.id="InputRightElement",SO.displayName="InputRightElement";var TO=Dx({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"}),EO=n(5586);function _O(e){return e&&"object"===typeof e?"position"in e||"type"in e?OO(e.position):"start"in e||"end"in e?OO(e):"line"in e||"column"in e?CO(e):"":""}function CO(e){return NO(e&&e.line)+":"+NO(e&&e.column)}function OO(e){return CO(e&&e.start)+"-"+CO(e&&e.end)}function NO(e){return e&&"number"===typeof e?e:1}var IO=function(e){(0,Wr.Z)(n,e);var t=(0,Yr.Z)(n);function n(e,r,o){var a;(0,Hr.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=_O(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)}(Qr(Error));IO.prototype.file="",IO.prototype.name="",IO.prototype.reason="",IO.prototype.message="",IO.prototype.stack="",IO.prototype.fatal=null,IO.prototype.column=null,IO.prototype.line=null,IO.prototype.source=null,IO.prototype.ruleId=null,IO.prototype.position=null;var PO={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');AO(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(AO(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){AO(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 AO(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var jO={cwd:function(){return"/"}};function DO(e){return null!==e&&"object"===typeof e&&e.href&&e.origin}function RO(e){if("string"===typeof e)e=new URL(e);else if(!DO(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?(rN(e,e.length,0,t),e):t}var aN={}.hasOwnProperty;function iN(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}}},EN={tokenize:function(e,t,n){return xN(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var _N={tokenize:function(e,t,n){return function(t){return yN(t)?xN(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||vN(e)?t(e):n(e)}},partial:!0};function CN(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 PN={tokenize:function(e){var t=this,n=e.attempt(_N,(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,xN(e,e.attempt(this.parser.constructs.flow,r,e.attempt(NN,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 AN={resolveAll:MN()},jN=RN("string"),DN=RN("text");function RN(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||vN(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),yN(t)?xN(e,a,"whitespace")(t):a(t))}}};var ZN={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:pN(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(zN,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 pN(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(_N,r.interrupt?n:l,e.attempt(UN,f,c))}function l(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function c(t){return yN(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(_N,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xN(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!yN(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(VN,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,xN(e,e.attempt(ZN,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)}},UN={tokenize:function(e,t,n){var r=this;return xN(e,(function(e){var o=r.events[r.events.length-1];return!yN(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},VN={tokenize:function(e,t,n){var r=this;return xN(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 HN={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 yN(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(yN(t))return xN(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(HN,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function qN(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||dN(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||vN(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&&!gN(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):vN(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||vN(t)||u++>999?(e.exit("chunkString"),l(t)):(e.consume(t),i||(i=!yN(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),u++,c):c(t)}}function YN(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):vN(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),xN(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===i||null===t||vN(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 JN(e,t){var n;return function r(o){if(vN(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(yN(o))return xN(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}function GN(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var $N={name:"definition",tokenize:function(e,t,n){var r,o=this;return function(t){return e.enter("definition"),function(t){return WN.call(o,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return r=GN(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 gN(t)?JN(e,s)(t):s(t)}function s(t){return qN(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function u(t){return e.attempt(XN,l,l)(t)}function l(t){return yN(t)?xN(e,c,"whitespace")(t):c(t)}function c(a){return null===a||vN(a)?(e.exit("definition"),o.parser.defined.push(r),t(a)):n(a)}}},XN={tokenize:function(e,t,n){return function(t){return gN(t)?JN(e,r)(t):n(t)};function r(t){return YN(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return yN(t)?xN(e,a,"whitespace")(t):a(t)}function a(e){return null===e||vN(e)?t(e):n(e)}},partial:!0};var KN={name:"codeIndented",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("codeIndented"),xN(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):vN(t)?e.attempt(QN,a,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||vN(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},QN={tokenize:function(e,t,n){var r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):vN(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):xN(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):vN(e)?o(e):n(e)}},partial:!0};var eI={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||gN(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||vN(n)?(e.exit("atxHeading"),t(n)):yN(n)?xN(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||gN(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&&rN(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 tI={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"),yN(t)?xN(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||vN(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 nI=["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"],rI=["pre","script","style","textarea"],oI={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:D):lN(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):lN(o)?(e.consume(o),r=4,u.interrupt?t:D):n(o)}function f(r){return 45===r?(e.consume(r),u.interrupt?t:D):n(r)}function d(r){var o="CDATA[";return r===o.charCodeAt(i++)?(e.consume(r),6===i?u.interrupt?t:_:d):n(r)}function p(t){return lN(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(i){if(null===i||47===i||62===i||gN(i)){var s=47===i,l=a.toLowerCase();return s||o||!rI.includes(l)?nI.includes(a.toLowerCase())?(r=6,s?(e.consume(i),m):u.interrupt?t(i):_(i)):(r=7,u.interrupt&&!u.parser.lazy[u.now().line]?n(i):o?v(i):g(i)):(r=1,u.interrupt?t(i):_(i))}return 45===i||cN(i)?(e.consume(i),a+=String.fromCharCode(i),h):n(i)}function m(r){return 62===r?(e.consume(r),u.interrupt?t:_):n(r)}function v(t){return yN(t)?(e.consume(t),v):T(t)}function g(t){return 47===t?(e.consume(t),T):58===t||95===t||lN(t)?(e.consume(t),y):yN(t)?(e.consume(t),g):T(t)}function y(t){return 45===t||46===t||58===t||95===t||cN(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),k):yN(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):yN(t)?(e.consume(t),k):x(t)}function w(t){return t===s?(e.consume(t),s=null,S):null===t||vN(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||gN(t)?b(t):(e.consume(t),x)}function S(e){return 47===e||62===e||yN(e)?g(e):n(e)}function T(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||vN(t)?_(t):yN(t)?(e.consume(t),E):n(t)}function _(t){return 45===t&&2===r?(e.consume(t),I):60===t&&1===r?(e.consume(t),P):62===t&&4===r?(e.consume(t),R):63===t&&3===r?(e.consume(t),D):93===t&&5===r?(e.consume(t),j):!vN(t)||6!==r&&7!==r?null===t||vN(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(aI,M,C)(t))}function C(t){return e.check(iI,O,M)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||vN(t)?C(t):(e.enter("htmlFlowData"),_(t))}function I(t){return 45===t?(e.consume(t),D):_(t)}function P(t){return 47===t?(e.consume(t),a="",A):_(t)}function A(t){if(62===t){var n=a.toLowerCase();return rI.includes(n)?(e.consume(t),R):_(t)}return lN(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),A):_(t)}function j(t){return 93===t?(e.consume(t),D):_(t)}function D(t){return 62===t?(e.consume(t),R):45===t&&2===r?(e.consume(t),D):_(t)}function R(t){return null===t||vN(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),R)}function M(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},aI={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(_N,t,n)}},partial:!0},iI={tokenize:function(e,t,n){var r=this;return function(t){if(vN(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 sI={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},uI={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"),yN(t)?xN(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"),yN(t)?xN(e,f,"whitespace")(t):f(t)):n(t)}function f(r){return null===r||vN(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"),yN(t)?xN(e,l,"whitespace")(t):l(t))}function l(n){return null===n||vN(n)?(e.exit("codeFencedFence"),o.interrupt?t(n):e.check(sI,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||vN(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):yN(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xN(e,f,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),c)}function f(t){return null===t||vN(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||vN(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&&yN(t)?xN(e,v,"linePrefix",i+1)(t):v(t)}function v(t){return null===t||vN(t)?e.check(sI,p,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||vN(t)?(e.exit("codeFlowValue"),v(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var lI=document.createElement("i");function cI(e){var t="&"+e+";";lI.innerHTML=t;var n=lI.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}var fI={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=cN,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=hN,l):(e.enter("characterReferenceValue"),r=7,o=pN,l(t))}function l(s){if(59===s&&i){var u=e.exit("characterReferenceValue");return o!==cN||cI(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);wI(f,-s),wI(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=oN(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=oN(u,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=oN(u,LN(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),u=oN(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=oN(u,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,rN(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 VI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HI(e){return e.replace(VI,qI)}function qI(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){var r=n.charCodeAt(1),o=120===r||88===r;return UI(n.slice(o?2:1),o?16:10)}return cI(n)||e}var WI={}.hasOwnProperty,YI=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:C,autolinkEmail:C,atxHeading:s(K),blockQuote:s(Y),characterEscape:C,characterReference:C,codeFenced:s(J),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(J,u),codeText:s(G,u),codeTextData:C,data:C,codeFlowValue:C,definition:s($),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(X),hardBreakEscape:s(Q),hardBreakTrailing:s(Q),htmlFlow:s(ee,u),htmlFlowData:C,htmlText:s(ee,u),htmlTextData:C,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:q,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,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(I),hardBreakTrailing:c(I),htmlFlow:c(P),htmlFlowData:O,htmlText:c(A),htmlTextData:O,image:c(R),label:F,labelText:M,lineEnding:N,link:c(D),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:U,resourceDestinationString:L,resourceTitleString:B,resource:z,setextHeading:c(_),setextHeadingLineSequence:E,setextHeadingText:T,strong:c(),thematicBreak:c()}};GI(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]||XI).call(r,void 0,h[0])}for(n.position={start:JI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:JI(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 eP=function(e){if(void 0===e||null===e)return nP;if("string"===typeof e)return function(e){return tP(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 uP={}.hasOwnProperty;function lP(e){return String(e||"").toUpperCase()}function cP(e,t){var n,r=String(t.identifier).toUpperCase(),o=QI(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 fP(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 dP(e){var t=e.spread;return void 0===t||null===t?e.children.length>1:t}var pP=9,hP=32;function mP(e){for(var t=String(e),n=/\r?\n|\r/g,r=n.exec(t),o=0,a=[];r;)a.push(vP(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(vP(t.slice(o),o>0,!1)),a.join("")}function vP(e,t,n){var r=0,o=e.length;if(t)for(var a=e.codePointAt(r);a===pP||a===hP;)r++,a=e.codePointAt(r);if(n)for(var i=e.codePointAt(o-1);i===pP||i===hP;)o--,i=e.codePointAt(o-1);return o>r?e.slice(r,o):""}var gP={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:cP,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},cP(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 fP(e,t);var r={src:QI(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:QI(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 fP(e,t);var r={href:QI(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:QI(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=aP(t.children[1]),u=iP(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 _P(e,t){var n=kP(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 CP=function(e,t){return e&&"run"in e?function(e,t){return function(n,r,o){e.run(_P(n,t),r,(function(e){o(e)}))}}(e,t):function(e){return function(t){return _P(t,e)}}(e||t)};var OP=n(2007),NP=(0,qr.Z)((function e(t,n,r){(0,Hr.Z)(this,e),this.property=t,this.normal=n,r&&(this.space=r)}));function IP(e,t){for(var n={},r={},o=-1;++oo||-1!==(o=t.indexOf("#"))&&r>o?t:"javascript:void(0)"}var mA={}.hasOwnProperty,vA=new Set(["table","thead","tbody","tfoot","tr"]);function gA(e,t){for(var n,r=[],o=-1;++o0?r.createElement(m,c,d):r.createElement(m,c)}function bA(e,t){for(var n=-1,r=0;++n4&&"data"===n.slice(0,4)&&iA.test(t)){if("-"===t.charAt(4)){var a=t.slice(5).replace(sA,cA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{var i=t.slice(4);if(!sA.test(i)){var s=i.replace(uA,lA);"-"!==s.charAt(0)&&(s="-"+s),t="data"+s}}o=VP}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{dA(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,wA)]=n}}(a)),o.space&&o.property?e[mA.call(fA,o.property)?fA[o.property]:o.property]=a:o.attribute&&(e[o.attribute]=a))}function wA(e,t){return t.toUpperCase()}var xA={}.hasOwnProperty,SA={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 TA(e){for(var t in SA)if(xA.call(SA,t)&&xA.call(e,t)){var n=SA[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 SA[t]}var o=qO().use(KI).use(e.remarkPlugins||[]).use(CP,f(f({},e.remarkRehypeOptions),{},{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(rA,e),a=new FO;"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,{},gA({options:e,schema:tA,listDepth:0},i));return e.className&&(s=r.createElement("div",{className:e.className},s)),s}TA.propTypes={children:OP.string,className:OP.string,allowElement:OP.func,allowedElements:OP.arrayOf(OP.string),disallowedElements:OP.arrayOf(OP.string),unwrapDisallowed:OP.bool,remarkPlugins:OP.arrayOf(OP.oneOfType([OP.object,OP.func,OP.arrayOf(OP.oneOfType([OP.bool,OP.string,OP.object,OP.func,OP.arrayOf(OP.any)]))])),rehypePlugins:OP.arrayOf(OP.oneOfType([OP.object,OP.func,OP.arrayOf(OP.oneOfType([OP.bool,OP.string,OP.object,OP.func,OP.arrayOf(OP.any)]))])),sourcePos:OP.bool,rawSourcePos:OP.bool,skipHtml:OP.bool,includeElementIndex:OP.bool,transformLinkUri:OP.oneOfType([OP.func,OP.bool]),linkTarget:OP.oneOfType([OP.func,OP.string]),transformImageUri:OP.func,components:OP.object};for(var EA={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},_A={tokenize:function(e,t,n){var r,o,a;return i;function i(t){return 46===t||95===t?e.check(OA,u,s)(t):null===t||gN(t)||kN(t)||45!==t&&bN(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},CA={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}jA[43]=AA,jA[45]=AA,jA[46]=AA,jA[95]=AA,jA[72]=[AA,PA],jA[104]=[AA,PA],jA[87]=[AA,IA],jA[119]=[AA,IA];var ZA={tokenize:function(e,t,n){var r=this;return xN(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 UA(){var e;return{document:(0,l.Z)({},91,{tokenize:WA,continuation:{tokenize:YA},exit:JA}),text:(e={},(0,l.Z)(e,91,{tokenize:qA}),(0,l.Z)(e,93,{add:"after",tokenize:VA,resolveTo:HA}),e)}}function VA(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=GN(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 HA(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 qA(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||gN(s))return n(s);if(93===s){e.exit("chunkString");var c=e.exit("gfmFootnoteCallString");return a.includes(GN(o.sliceSerialize(c)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return gN(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 WA(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||gN(t))return n(t);if(93===t){e.exit("chunkString");var i=e.exit("gfmFootnoteDefinitionLabelString");return r=GN(a.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return gN(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),xN(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function YA(e,t,n){return e.check(_N,t,e.attempt(ZA,t,n))}function JA(e){e.exit("gfmFootnoteDefinition")}function GA(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=bI(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=bI(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 XA(e,t){for(var n=!1,r=[];t