@abi-software/simulationvuer 3.2.1 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1132,7 +1132,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1132
1132
  width: `).concat(this.breakpoints[r],` !important;
1133
1133
  }
1134
1134
  }
1135
- `);this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){e.target.closest("div").getAttribute("data-pc-section")!=="headeractions"&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",document.body.setAttribute("data-p-unselectable-text","true"),!this.isUnstyled&&ea(document.body,{"user-select":"none"}),this.$emit("dragstart",e))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var r=br(e.container),n=Vn(e.container),i=t.pageX-e.lastPageX,o=t.pageY-e.lastPageY,s=e.container.getBoundingClientRect(),u=s.left+i,c=s.top+o,l=Fs(),d=getComputedStyle(e.container),f=parseFloat(d.marginLeft),p=parseFloat(d.marginTop);e.container.style.position="fixed",e.keepInViewport?(u>=e.minX&&u+r<l.width&&(e.lastPageX=t.pageX,e.container.style.left=u-f+"px"),c>=e.minY&&c+n<l.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=u-f+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute("data-p-unselectable-text"),!e.isUnstyled&&(document.body.style["user-select"]=""),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaLabelledById:function(){return this.header!=null||this.$attrs["aria-labelledby"]!==null?this.id+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:Dr,focustrap:Cp},components:{Button:kn,Portal:La,WindowMinimizeIcon:S3,WindowMaximizeIcon:x3,TimesIcon:Ci}};function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function T3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T3(Object(r),!0).forEach(function(n){sX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sX(e,t,r){return(t=lX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lX(e){var t=uX(e,"string");return Ks(t)=="symbol"?t:t+""}function uX(e,t){if(Ks(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cX=["aria-labelledby","aria-modal"],dX=["id"];function fX(e,t,r,n,i,o){var s=a.resolveComponent("Button"),u=a.resolveComponent("Portal"),c=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(u,{appendTo:e.appendTo},{default:a.withCtx(function(){return[i.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onMousedown:t[1]||(t[1]=function(){return o.onMaskMouseDown&&o.onMaskMouseDown.apply(o,arguments)}),onMouseup:t[2]||(t[2]=function(){return o.onMaskMouseUp&&o.onMaskMouseUp.apply(o,arguments)})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-dialog",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx(function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":o.ariaLabelledById,"aria-modal":e.modal},e.ptmi("root")),[e.$slots.container?a.renderSlot(e.$slots,"container",{key:0,closeCallback:o.close,maximizeCallback:function(l){return o.maximize(l)}}):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[e.showHeader?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.headerContainerRef,class:e.cx("header"),onMousedown:t[0]||(t[0]=function(){return o.initDrag&&o.initDrag.apply(o,arguments)})},e.ptm("header")),[a.renderSlot(e.$slots,"header",{class:a.normalizeClass(e.cx("title"))},function(){return[e.header?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,id:o.ariaLabelledById,class:e.cx("title")},e.ptm("title")),a.toDisplayString(e.header),17,dX)):a.createCommentVNode("",!0)]}),a.createElementVNode("div",a.mergeProps({class:e.cx("headerActions")},e.ptm("headerActions")),[e.maximizable?(a.openBlock(),a.createBlock(s,a.mergeProps({key:0,ref:o.maximizableRef,autofocus:i.focusableMax,class:e.cx("pcMaximizeButton"),onClick:o.maximize,tabindex:e.maximizable?"0":"-1",unstyled:e.unstyled},e.maximizeButtonProps,{pt:e.ptm("pcMaximizeButton"),"data-pc-group-section":"headericon"}),{icon:a.withCtx(function(l){return[a.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.maximizeIconComponent),a.mergeProps({class:[l.class,i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("pcMaximizeButton").icon),null,16,["class"]))]})]}),_:3},16,["autofocus","class","onClick","tabindex","unstyled","pt"])):a.createCommentVNode("",!0),e.closable?(a.openBlock(),a.createBlock(s,a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:i.focusableClose,class:e.cx("pcCloseButton"),onClick:o.close,"aria-label":o.closeAriaLabel,unstyled:e.unstyled},e.closeButtonProps,{pt:e.ptm("pcCloseButton"),"data-pc-group-section":"headericon"}),{icon:a.withCtx(function(l){return[a.renderSlot(e.$slots,"closeicon",{},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.closeIcon,l.class]},e.ptm("pcCloseButton").icon),null,16,["class"]))]})]}),_:3},16,["autofocus","class","onClick","aria-label","unstyled","pt"])):a.createCommentVNode("",!0)],16)],16)):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},I3(I3({},e.contentProps),e.ptm("content"))),[a.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,ref:o.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[a.renderSlot(e.$slots,"footer",{},function(){return[a.createTextVNode(a.toDisplayString(e.footer),1)]})],16)):a.createCommentVNode("",!0)],64))],16,cX)),[[c,{disabled:!e.modal}]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]}),_:3},8,["appendTo"])}A3.render=fX;const pX=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11]);async function mX(){return function(e){const{exports:{mem:t,xxh32:r,xxh64:n,init32:i,update32:o,digest32:s,init64:u,update64:c,digest64:l}}=e;let d=new Uint8Array(t.buffer);function f(y,x){if(t.buffer.byteLength<y+x){const E=Math.ceil((y+x-t.buffer.byteLength)/65536);t.grow(E),d=new Uint8Array(t.buffer)}}function p(y,x,E,N,B,D){f(y);const M=new Uint8Array(y);return d.set(M),E(0,x),M.set(d.subarray(0,y)),{update(T){let O;return d.set(M),typeof T=="string"?(f(3*T.length,y),O=b.encodeInto(T,d.subarray(y)).written):(f(T.byteLength,y),d.set(T,y),O=T.byteLength),N(0,y,O),M.set(d.subarray(0,y)),this},digest:()=>(d.set(M),D(B(0)))}}function m(y){return y>>>0}const h=2n**64n-1n;function g(y){return y&h}const b=new TextEncoder,v=0,S=0n;function w(y,x=v){return f(3*y.length,0),m(r(0,b.encodeInto(y,d).written,x))}function k(y,x=S){return f(3*y.length,0),g(n(0,b.encodeInto(y,d).written,x))}return{h32:w,h32ToString:(y,x=v)=>w(y,x).toString(16).padStart(8,"0"),h32Raw:(y,x=v)=>(f(y.byteLength,0),d.set(y),m(r(0,y.byteLength,x))),create32:(y=v)=>p(48,y,i,o,s,m),h64:k,h64ToString:(y,x=S)=>k(y,x).toString(16).padStart(16,"0"),h64Raw:(y,x=S)=>(f(y.byteLength,0),d.set(y),g(n(0,y.byteLength,x))),create64:(y=S)=>p(88,y,u,c,l,g)}}((await WebAssembly.instantiate(pX)).instance)}let F3=null,jp=null,Qi=null,Nn=null,Qp=null;const hX=e=>{F3=e},gX=e=>{jp=e},vX=e=>{Qi=e},bX=e=>{Nn=e},yX=mX().then(e=>(Qp=e,e)),Oe=window.electronApi;let ao=null;const Mc=()=>{if(ao)return ao;try{const e=window.navigator.userAgent;/Android/i.test(e)?ao="Android":/iPhone|iPad|iPod/i.test(e)?ao="iOS":/Windows/i.test(e)?ao="Windows":/Linux/i.test(e)?ao="Linux":/Mac/i.test(e)?ao="macOS":ao="Unknown"}catch{ao="Unknown"}return ao},wX=()=>Mc()==="Windows",xX=()=>Mc()==="Linux",qp=()=>Mc()==="macOS",Wp=()=>{const e=Mc();return e==="Windows"||e==="Linux"||e==="macOS"},Hp=e=>qp()?e.metaKey:e.ctrlKey,O3=e=>{Oe==null||Oe.enableDisableMainMenu(e)},SX="OMEX #",Ac=e=>e.startsWith("http://")||e.startsWith("https://"),Js=e=>`https://cors-proxy.opencor.workers.dev/?url=${e}`,R3=e=>typeof e=="string"?Qp.h64(e).toString(16).padStart(16,"0"):Qp.h64Raw(e).toString(16).padStart(16,"0"),kX=e=>{const t=Math.floor(e%1e3),r=Math.floor(e/1e3%60),n=Math.floor(e/(1e3*60)%60),i=Math.floor(e/(1e3*60*60)%24),o=Math.floor(e/(1e3*60*60*24)%24);let s="";return o&&(s=`${o}d`),(i||(n||r||t)&&s)&&(s+=`${s?" ":""}${i}h`),(n||(r||t)&&s)&&(s+=`${s?" ":""}${n}m`),(r||t&&s)&&(s+=`${s?" ":""}${r}s`),(t||!s)&&(s+=`${s?" ":""}${t}ms`),s},Bt=e=>e instanceof Error?e.message:String(e),er=(e,t=!0)=>(e=t?e.charAt(0).toUpperCase()+e.slice(1):e.charAt(0).toLowerCase()+e.slice(1),e.endsWith("...")?e:e.endsWith(".")?t?e:e.slice(0,-1):t?`${e}.`:e),Zp=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||t===0)return!1;const r=e/t,n=Math.round(r);return Math.abs(r-n)<=Number.EPSILON*Math.max(1,Math.abs(n))},P3=(e,t,r)=>{const n=document.createElement("a"),i=t instanceof Blob?t:new Blob([t],{type:r}),o=URL.createObjectURL(i);n.href=o,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)},L3=e=>{const t=e.split(/(\\|\/)/g).pop()||"";try{return decodeURIComponent(t)}catch(r){return console.warn("OpenCOR: failed to decode the file path:",t,Bt(r)),t}},Tc=e=>new Promise(t=>{setTimeout(t,e)}),NX=()=>new Promise(e=>{requestAnimationFrame(e)}),EX=Object.freeze(new Float64Array(0)),V3=Object.freeze({data:EX,unit:""}),Ys=e=>{const t={};for(const r of e)t[r]={...V3};return t},z3=Symbol("DialogState"),BX=()=>{const e=ue.ref(0),t=ue.computed(()=>e.value>0),r={activeDialogs:e,isDialogActive:t,incrementDialogs:()=>{++e.value},decrementDialogs:()=>{--e.value}};return ue.provide(z3,r),r},DX=()=>{const e=ue.inject(z3);if(!e)throw new Error("useDialogState() must be called within a component that has provideDialogState in its ancestor tree.");return e},ra=a.defineComponent({__name:"BaseDialog",emits:["cancel"],setup(e,{emit:t}){const r=t,{incrementDialogs:n,decrementDialogs:i}=DX();let o=null,s=null,u=null;const c=()=>{if(o instanceof HTMLElement&&s instanceof HTMLElement){const f=o.getBoundingClientRect(),p=s.getBoundingClientRect();o.style.top=`${Math.max(Math.min(f.top,p.bottom-f.height),p.top)}px`,o.style.left=`${Math.max(Math.min(f.left,p.right-f.width),p.left)}px`}},l=()=>{n(),O3(!1),ue.nextTick(()=>{o=document.querySelector(".p-dialog"),s=o==null?void 0:o.closest('[data-pc-section="mask"]'),o&&s&&(u=new MutationObserver(()=>{c()}),u.observe(o,{attributes:!0,attributeFilter:["style"]}),c())})},d=()=>{i(),O3(!0),r("cancel"),ue.nextTick(()=>{u&&(u.disconnect(),u=null)})};return(f,p)=>{const m=A3;return a.openBlock(),a.createBlock(m,{modal:!0,appendTo:"self","pt:mask:style":{position:"absolute"},"pt:content":{class:"h-full",style:"padding-bottom: 0"},"pt:footer":{style:"padding-top: 1.25rem"},onShow:l,onHide:d},a.createSlots({_:2},[a.renderList(f.$slots,(h,g)=>({name:g,fn:a.withCtx(b=>[a.renderSlot(f.$slots,g,a.normalizeProps(a.guardReactiveProps(b)))])}))]),1024)}}}),MX="0.20260612.2",AX={version:MX},{version:Gp}=AX,Ic=ue.ref(!1),Xs=ue.ref(""),_3=async()=>{try{const e=await fetch(`./assets/version.json?t=${Date.now()}`);if(!e.ok)return console.warn("OpenCOR: failed to fetch the version information."),Ic.value=!1,Xs.value="",!1;const t=await e.json();Xs.value=t.version;const r=TX(Xs.value,Gp);return Ic.value=r,r}catch{return Ic.value=!1,Xs.value="",!1}},TX=(e,t)=>{const r=e.split(".").map(Number),n=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,n.length);++i){const o=r[i]||0,s=n[i]||0;if(o>s)return!0;if(o<s)return!1}return!1};let U3=null;const IX=()=>{_3(),U3||(U3=window.setInterval(()=>{_3()},300*1e3))},$s=e=>(a.pushScopeId("data-v-c05d59eb"),e=e(),a.popScopeId(),e),FX={class:"space-y-7"},OX={class:"text-center"},RX={class:"text-3xl font-bold"},PX={class:"highlight highlight-version"},LX={class:"space-y-2"},VX={class:"text-center"},zX=$s(()=>a.createElementVNode("span",{class:"text-lg"},[a.createTextVNode("Feel free to "),a.createElementVNode("strong",null,"force reload"),a.createTextVNode(" OpenCOR whenever you are ready.")],-1)),_X=$s(()=>a.createElementVNode("br",null,null,-1)),UX={key:0,class:"highlight"},CX={key:1},jX=$s(()=>a.createElementVNode("span",{class:"highlight"},"Ctrl",-1)),QX=$s(()=>a.createElementVNode("span",{class:"highlight"},"Shift",-1)),qX=$s(()=>a.createElementVNode("span",{class:"highlight"},"R",-1)),WX=a.defineComponent({__name:"UpdateAvailableDialog",emits:["close"],setup(e){return(t,r)=>{const n=kn,i=ra;return a.openBlock(),a.createBlock(i,{header:" ",class:"w-169"},{footer:a.withCtx(()=>[a.createVNode(n,{label:"OK",autofocus:"",onClick:r[0]||(r[0]=o=>t.$emit("close"))})]),default:a.withCtx(()=>[a.createElementVNode("div",FX,[a.createElementVNode("div",OX,[a.createElementVNode("div",RX,[a.createTextVNode("OpenCOR "),a.createElementVNode("span",PX,a.toDisplayString(a.unref(Xs)),1),a.createTextVNode(" is available!")])]),a.createElementVNode("div",LX,[a.createElementVNode("div",VX,[zX,_X,a.createElementVNode("em",null,[a.createTextVNode("(You can force reload by pressing "),qp()?(a.openBlock(),a.createElementBlock("span",UX,"⇧⌘R")):(a.openBlock(),a.createElementBlock("span",CX,[jX,a.createTextVNode("+"),QX,a.createTextVNode("+"),qX])),a.createTextVNode(".)")])])])])]),_:1})}}}),Qn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},HX=Qn(WX,[["__scopeId","data-v-c05d59eb"]]),ZX="opencor",C3=`${ZX}://`,GX=0,Fc=69,j3=369,Ao=3e3,KX=500,JX=40,Q3=new Date().getFullYear(),q3=Q3===2025?"2025":`2025-${Q3}`;var _e=(e=>(e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFORMATION=2]="INFORMATION",e))(_e||{});const Kp=e=>{const t=[];for(const r of e)t.push({type:r.type.value,description:r.description});return t},la=class la{constructor(){Ot(this,"_fileManager",null)}static instance(){return la._instance??(la._instance=new la),la._instance}fileManager(){return this._fileManager??(this._fileManager=Wi.FileManager.instance()),this._fileManager}file(t){if(it()){const n=ot.fileContents(t);return n?new qi(t,n):null}const r=this.fileManager().files;for(const n of r)if(n.path===t)return new qi(t,n.contents());return null}unmanage(t){if(it())ot.fileManagerUnmanage(t);else{const r=this.fileManager(),n=r.files;for(const i of n)if(i.path===t){r.unmanage(i);break}}}};Ot(la,"_instance",null);let Jp=la;const W3=Jp.instance();var Va=(e=>(e[e.UNKNOWN_FILE=0]="UNKNOWN_FILE",e[e.CELLML_FILE=1]="CELLML_FILE",e[e.SEDML_FILE=2]="SEDML_FILE",e[e.COMBINE_ARCHIVE=3]="COMBINE_ARCHIVE",e[e.IRRETRIEVABLE_FILE=4]="IRRETRIEVABLE_FILE",e))(Va||{});let qi=class{constructor(e,t=void 0){Ot(this,"_path");Ot(this,"_wasmFile",{});Ot(this,"_issues",[]);if(this._path=e,it())ot.fileCreate(e,t),this._issues=ot.fileIssues(e);else if(t)this._wasmFile=ue.markRaw(new Wi.File(e)),this._wasmFile.setContents(t),this._issues=Kp(this._wasmFile.issues);else{console.warn(`OpenCOR: no contents provided for file '${e}'.`);return}}type(){return it()?ot.fileType(this._path):this._wasmFile.type.value}path(){return this._path}issues(){return this._issues}contents(){return it()?ot.fileContents(this._path):this._wasmFile.contents()}document(){return new YX(this._path,this._wasmFile)}uiJson(){let e;if(it()){if(e=ot.fileUiJson(this._path),!e)return}else{const n=this._wasmFile.childFileFromFileName("simulation.json");if(!n)return;e=n.contents()}const t=new TextDecoder;let r;try{r=JSON.parse(t.decode(e))}catch{console.warn(`OpenCOR: unable to parse the UI JSON for file '${this._path}'.`);return}if(!r||typeof r!="object"||Array.isArray(r)){console.warn(`OpenCOR: the UI JSON for file '${this._path}' has an unexpected structure.`);return}return H3(r)}};class Oc{constructor(t){Ot(this,"_index");this._index=t}}class YX{constructor(t,r){Ot(this,"_cppDocumentId",-1);Ot(this,"_wasmSedDocument",{});Ot(this,"_issues",[]);if(it()?this._cppDocumentId=ot.sedDocumentCreate(t):this._wasmSedDocument=new Wi.SedDocument(r),this._issues=it()?ot.sedDocumentIssues(this._cppDocumentId):Kp(this._wasmSedDocument.issues),this.modelCount()!==1){this._issues.push({type:_e.WARNING,description:"Only SED-ML files with one model are currently supported."});return}if(this.simulationCount()!==1){this._issues.push({type:_e.WARNING,description:"Only SED-ML files with one simulation are currently supported."});return}const n=this.simulation(0);if(n.type()!==3){this._issues.push({type:_e.WARNING,description:"Only uniform time course simulations are currently supported."});return}const i=n.initialTime(),o=n.outputStartTime(),s=n.outputEndTime(),u=n.numberOfSteps();i!==o&&this._issues.push({type:_e.WARNING,description:`Only uniform time course simulations with the same values for 'initialTime' (${i}) and 'outputStartTime' (${o}) are currently supported.`}),o===s&&this._issues.push({type:_e.ERROR,description:`The uniform time course simulation must have different values for 'outputStartTime' (${o}) and 'outputEndTime' (${s}).`}),u<=0&&this._issues.push({type:_e.ERROR,description:`The uniform time course simulation must have a positive value for 'numberOfSteps' (${u}).`})}issues(){return this._issues}modelCount(){return it()?ot.sedDocumentModelCount(this._cppDocumentId):this._wasmSedDocument.modelCount}model(t){return new XX(this._cppDocumentId,this._wasmSedDocument,t)}simulationCount(){return it()?ot.sedDocumentSimulationCount(this._cppDocumentId):this._wasmSedDocument.simulationCount}simulation(t){let r;if(it())r=ot.sedDocumentSimulationType(this._cppDocumentId,t);else switch(this._wasmSedDocument.simulation(t).constructor.name){case"SedAnalysis":r=0;break;case"SedSteadyState":r=1;break;case"SedOneStep":r=2;break;default:r=3}return r===0?new $X(this._cppDocumentId,this._wasmSedDocument,t,r):r===1?new e$(this._cppDocumentId,this._wasmSedDocument,t,r):r===2?new t$(this._cppDocumentId,this._wasmSedDocument,t,r):new r$(this._cppDocumentId,this._wasmSedDocument,t,r)}instantiate(){return new o$(this._cppDocumentId,this._wasmSedDocument)}serialise(){return it()?ot.sedDocumentSerialise(this._cppDocumentId):this._wasmSedDocument.serialise()}}class XX extends Oc{constructor(r,n,i){super(i);Ot(this,"_cppDocumentId");Ot(this,"_wasmSedModel",{});this._cppDocumentId=r,tl()&&(this._wasmSedModel=n.model(i))}file(){return W3.file(it()?ot.sedModelFilePath(this._cppDocumentId,this._index):this._wasmSedModel.file.path)}addChange(r,n,i){it()?ot.sedModelAddChange(this._cppDocumentId,this._index,r,n,i):this._wasmSedModel.addChange(new Wi.SedChangeAttribute(r,n,i))}removeAllChanges(){it()?ot.sedModelRemoveAllChanges(this._cppDocumentId,this._index):this._wasmSedModel.removeAllChanges()}}class Rc extends Oc{constructor(r,n,i,o){super(i);Ot(this,"_cppDocumentId");Ot(this,"_type");this._cppDocumentId=r,this._type=o}type(){return this._type}}class $X extends Rc{}class e$ extends Rc{}class t$ extends Rc{constructor(r,n,i,o){super(r,n,i,o);Ot(this,"_wasmSedOneStep",{});tl()&&(this._wasmSedOneStep=n.simulation(i))}step(){return it()?ot.sedOneStepStep(this._cppDocumentId,this._index):this._wasmSedOneStep.step}}class r$ extends Rc{constructor(r,n,i,o){super(r,n,i,o);Ot(this,"_wasmSedUniformTimeCourse",{});tl()&&(this._wasmSedUniformTimeCourse=n.simulation(i))}initialTime(){return it()?ot.sedUniformTimeCourseInitialTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.initialTime}setInitialTime(r){it()?ot.sedUniformTimeCourseSetInitialTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.initialTime=r}outputStartTime(){return it()?ot.sedUniformTimeCourseOutputStartTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputStartTime}setOutputStartTime(r){it()?ot.sedUniformTimeCourseSetOutputStartTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputStartTime=r}outputEndTime(){return it()?ot.sedUniformTimeCourseOutputEndTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputEndTime}setOutputEndTime(r){it()?ot.sedUniformTimeCourseSetOutputEndTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputEndTime=r}numberOfSteps(){return it()?ot.sedUniformTimeCourseNumberOfSteps(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.numberOfSteps}setNumberOfSteps(r){it()?ot.sedUniformTimeCourseSetNumberOfSteps(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.numberOfSteps=r}cvode(){return new n$(this._cppDocumentId,this._wasmSedUniformTimeCourse,this._index)}}class n$ extends Oc{constructor(r,n,i){super(i);Ot(this,"_cppDocumentId");Ot(this,"_wasmSolverCvode",{});this._cppDocumentId=r,tl()&&(this._wasmSolverCvode=n.odeSolver)}maximumStep(){return it()?ot.solverCvodeMaximumStep(this._cppDocumentId,this._index):this._wasmSolverCvode.maximumStep}setMaximumStep(r){it()?ot.solverCvodeSetMaximumStep(this._cppDocumentId,this._index,r):this._wasmSolverCvode.maximumStep=r}}class o${constructor(t,r){Ot(this,"_cppInstanceId",-1);Ot(this,"_wasmSedInstance",{});it()?this._cppInstanceId=ot.sedDocumentInstantiate(t):this._wasmSedInstance=ue.markRaw(r.instantiate())}hasIssues(){return it()?ot.sedInstanceHasIssues(this._cppInstanceId):this._wasmSedInstance.hasIssues}issues(){return it()?ot.sedInstanceIssues(this._cppInstanceId):Kp(this._wasmSedInstance.issues)}task(t){return new a$(this._cppInstanceId,t,this._wasmSedInstance)}run(){return it()?ot.sedInstanceRun(this._cppInstanceId):this._wasmSedInstance.run()}}class a$ extends Oc{constructor(r,n,i){super(n);Ot(this,"_cppInstanceId");Ot(this,"_wasmSedInstanceTask",{});this._cppInstanceId=r,tl()&&(this._wasmSedInstanceTask=i.task(n))}voiName(){return it()?ot.sedInstanceTaskVoiName(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiName}voiUnit(){return it()?ot.sedInstanceTaskVoiUnit(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiUnit}voi(){return it()?ot.sedInstanceTaskVoi(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiAsArray}stateCount(){return it()?ot.sedInstanceTaskStateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.stateCount}stateName(r){return it()?ot.sedInstanceTaskStateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateName(r)}stateUnit(r){return it()?ot.sedInstanceTaskStateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateUnit(r)}state(r){return it()?ot.sedInstanceTaskState(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateAsArray(r)}rateCount(){return it()?ot.sedInstanceTaskRateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.rateCount}rateName(r){return it()?ot.sedInstanceTaskRateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateName(r)}rateUnit(r){return it()?ot.sedInstanceTaskRateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateUnit(r)}rate(r){return it()?ot.sedInstanceTaskRate(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateAsArray(r)}constantCount(){return it()?ot.sedInstanceTaskConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.constantCount}constantName(r){return it()?ot.sedInstanceTaskConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantName(r)}constantUnit(r){return it()?ot.sedInstanceTaskConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantUnit(r)}constant(r){return it()?ot.sedInstanceTaskConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantAsArray(r)}computedConstantCount(){return it()?ot.sedInstanceTaskComputedConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.computedConstantCount}computedConstantName(r){return it()?ot.sedInstanceTaskComputedConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantName(r)}computedConstantUnit(r){return it()?ot.sedInstanceTaskComputedConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantUnit(r)}computedConstant(r){return it()?ot.sedInstanceTaskComputedConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantAsArray(r)}algebraicVariableCount(){return it()?ot.sedInstanceTaskAlgebraicVariableCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.algebraicVariableCount}algebraicVariableName(r){return it()?ot.sedInstanceTaskAlgebraicVariableName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableName(r)}algebraicVariableUnit(r){return it()?ot.sedInstanceTaskAlgebraicVariableUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableUnit(r)}algebraicVariable(r){return it()?ot.sedInstanceTaskAlgebraicVariable(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableAsArray(r)}}const el=e=>"maximumValue"in e&&"minimumValue"in e,za=e=>"possibleValues"in e,Yp=(e,t)=>t instanceof Float64Array?Array.from(t):t,H3=e=>{for(const t of e.output.externalData??[]){t.voiValues instanceof Float64Array||(t.voiValues=new Float64Array(t.voiValues));for(const r of t.dataSeries)r.values instanceof Float64Array||(r.values=new Float64Array(r.values))}return e},i$=e=>{var t;return(t=e.output.externalData)!=null&&t.length?{...e,output:{...e.output,externalData:e.output.externalData.map(r=>({...r,voiValues:Array.from(r.voiValues),dataSeries:r.dataSeries.map(n=>({...n,values:Array.from(n.values)}))}))}}:e},Z3=e=>{const t=r=>{if(!(r==null||typeof r=="string"&&r==="")){if(r instanceof Float64Array)return r;if(Array.isArray(r))return r.map(t).filter(n=>n!==void 0);if(typeof r=="object"){const n={};for(const[i,o]of Object.entries(r)){const s=t(o);s!==void 0&&(n[i]=s)}return n}return r}};return t(e)},Pc=e=>{if(e.size===0)return"";const t=[...e].map(r=>`'${r}'`);return t.length===1?t[0]:t.length===2?`${t[0]} or ${t[1]}`:`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`},Xp=(e,t)=>{if(!e)return[{type:_e.WARNING,description:"UI JSON: no UI JSON was provided."}];e=Z3(e);const r=new F3.Validator,n={additionalProperties:!1,properties:{input:{items:{oneOf:[{additionalProperties:!1,properties:{defaultValue:{required:!0,type:"number"},id:{required:!0,type:"string"},name:{required:!0,type:"string"},possibleValues:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},value:{required:!0,type:"number"}},type:"object"},minItems:1,required:!0,type:"array"},visible:{type:"string"}}},{additionalProperties:!1,properties:{defaultValue:{required:!0,type:"number"},id:{required:!0,type:"string"},maximumValue:{required:!0,type:"number"},minimumValue:{required:!0,type:"number"},name:{required:!0,type:"string"},stepValue:{type:"number"},visible:{type:"string"}}}],type:"object"},minItems:1,required:!0,type:"array"},output:{additionalProperties:!1,minItems:1,properties:{data:{items:{additionalProperties:!1,properties:{id:{required:!0,type:"string"},name:{required:!0,type:"string"}},type:"object"},minItems:1,required:!0,type:"array"},externalData:{items:{additionalProperties:!1,properties:{data:{items:{additionalProperties:!1,properties:{id:{required:!0,type:"string"},name:{required:!0,type:"string"}},type:"object"},required:!0,type:"array"},dataSeries:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},values:{items:{required:!0,type:"number"},minItems:1,required:!0,type:"array"}},type:"object"},minItems:1,required:!0,type:"array"},description:{type:"string"},voiExpression:{type:"string"},voiValues:{items:{required:!0,type:"number"},minItems:1,required:!0,type:"array"}},type:"object"},type:"array"},plots:{items:{additionalProperties:!1,properties:{xAxisTitle:{type:"string"},xValue:{required:!0,type:"string"},yAxisTitle:{type:"string"},yValue:{required:!0,type:"string"},name:{type:"string"},additionalTraces:{items:{additionalProperties:!1,properties:{xValue:{required:!0,type:"string"},yValue:{required:!0,type:"string"},name:{type:"string"}},type:"object"},type:"array"}},type:"object"},minItems:1,required:!0,type:"array"}},required:!0,type:"object"},parameters:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},value:{required:!0,type:"string"}},type:"object"},minItems:1,required:!0,type:"array"}},type:"object"},i=r.validate(i$(e),n,{nestedErrors:!0});if(!i.valid){const p=[];for(const m of String(i).split(`
1135
+ `);this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){e.target.closest("div").getAttribute("data-pc-section")!=="headeractions"&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",document.body.setAttribute("data-p-unselectable-text","true"),!this.isUnstyled&&ea(document.body,{"user-select":"none"}),this.$emit("dragstart",e))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var r=br(e.container),n=Vn(e.container),i=t.pageX-e.lastPageX,o=t.pageY-e.lastPageY,s=e.container.getBoundingClientRect(),u=s.left+i,c=s.top+o,l=Fs(),d=getComputedStyle(e.container),f=parseFloat(d.marginLeft),p=parseFloat(d.marginTop);e.container.style.position="fixed",e.keepInViewport?(u>=e.minX&&u+r<l.width&&(e.lastPageX=t.pageX,e.container.style.left=u-f+"px"),c>=e.minY&&c+n<l.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=u-f+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute("data-p-unselectable-text"),!e.isUnstyled&&(document.body.style["user-select"]=""),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaLabelledById:function(){return this.header!=null||this.$attrs["aria-labelledby"]!==null?this.id+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:Dr,focustrap:Cp},components:{Button:kn,Portal:La,WindowMinimizeIcon:S3,WindowMaximizeIcon:x3,TimesIcon:Ci}};function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function T3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T3(Object(r),!0).forEach(function(n){sX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sX(e,t,r){return(t=lX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lX(e){var t=uX(e,"string");return Ks(t)=="symbol"?t:t+""}function uX(e,t){if(Ks(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cX=["aria-labelledby","aria-modal"],dX=["id"];function fX(e,t,r,n,i,o){var s=a.resolveComponent("Button"),u=a.resolveComponent("Portal"),c=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(u,{appendTo:e.appendTo},{default:a.withCtx(function(){return[i.containerVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onMousedown:t[1]||(t[1]=function(){return o.onMaskMouseDown&&o.onMaskMouseDown.apply(o,arguments)}),onMouseup:t[2]||(t[2]=function(){return o.onMaskMouseUp&&o.onMaskMouseUp.apply(o,arguments)})},e.ptm("mask")),[a.createVNode(a.Transition,a.mergeProps({name:"p-dialog",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},e.ptm("transition")),{default:a.withCtx(function(){return[e.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":o.ariaLabelledById,"aria-modal":e.modal},e.ptmi("root")),[e.$slots.container?a.renderSlot(e.$slots,"container",{key:0,closeCallback:o.close,maximizeCallback:function(l){return o.maximize(l)}}):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[e.showHeader?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.headerContainerRef,class:e.cx("header"),onMousedown:t[0]||(t[0]=function(){return o.initDrag&&o.initDrag.apply(o,arguments)})},e.ptm("header")),[a.renderSlot(e.$slots,"header",{class:a.normalizeClass(e.cx("title"))},function(){return[e.header?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:0,id:o.ariaLabelledById,class:e.cx("title")},e.ptm("title")),a.toDisplayString(e.header),17,dX)):a.createCommentVNode("",!0)]}),a.createElementVNode("div",a.mergeProps({class:e.cx("headerActions")},e.ptm("headerActions")),[e.maximizable?(a.openBlock(),a.createBlock(s,a.mergeProps({key:0,ref:o.maximizableRef,autofocus:i.focusableMax,class:e.cx("pcMaximizeButton"),onClick:o.maximize,tabindex:e.maximizable?"0":"-1",unstyled:e.unstyled},e.maximizeButtonProps,{pt:e.ptm("pcMaximizeButton"),"data-pc-group-section":"headericon"}),{icon:a.withCtx(function(l){return[a.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.maximizeIconComponent),a.mergeProps({class:[l.class,i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("pcMaximizeButton").icon),null,16,["class"]))]})]}),_:3},16,["autofocus","class","onClick","tabindex","unstyled","pt"])):a.createCommentVNode("",!0),e.closable?(a.openBlock(),a.createBlock(s,a.mergeProps({key:1,ref:o.closeButtonRef,autofocus:i.focusableClose,class:e.cx("pcCloseButton"),onClick:o.close,"aria-label":o.closeAriaLabel,unstyled:e.unstyled},e.closeButtonProps,{pt:e.ptm("pcCloseButton"),"data-pc-group-section":"headericon"}),{icon:a.withCtx(function(l){return[a.renderSlot(e.$slots,"closeicon",{},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),a.mergeProps({class:[e.closeIcon,l.class]},e.ptm("pcCloseButton").icon),null,16,["class"]))]})]}),_:3},16,["autofocus","class","onClick","aria-label","unstyled","pt"])):a.createCommentVNode("",!0)],16)],16)):a.createCommentVNode("",!0),a.createElementVNode("div",a.mergeProps({ref:o.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},I3(I3({},e.contentProps),e.ptm("content"))),[a.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,ref:o.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[a.renderSlot(e.$slots,"footer",{},function(){return[a.createTextVNode(a.toDisplayString(e.footer),1)]})],16)):a.createCommentVNode("",!0)],64))],16,cX)),[[c,{disabled:!e.modal}]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]}),_:3},8,["appendTo"])}A3.render=fX;const pX=new Uint8Array([0,97,115,109,1,0,0,0,1,48,8,96,3,127,127,127,1,127,96,3,127,127,127,0,96,2,127,127,0,96,1,127,1,127,96,3,127,127,126,1,126,96,3,126,127,127,1,126,96,2,127,126,0,96,1,127,1,126,3,11,10,0,0,2,1,3,4,5,6,1,7,5,3,1,0,1,7,85,9,3,109,101,109,2,0,5,120,120,104,51,50,0,0,6,105,110,105,116,51,50,0,2,8,117,112,100,97,116,101,51,50,0,3,8,100,105,103,101,115,116,51,50,0,4,5,120,120,104,54,52,0,5,6,105,110,105,116,54,52,0,7,8,117,112,100,97,116,101,54,52,0,8,8,100,105,103,101,115,116,54,52,0,9,10,251,22,10,242,1,1,4,127,32,0,32,1,106,33,3,32,1,65,16,79,4,127,32,3,65,16,107,33,6,32,2,65,168,136,141,161,2,106,33,3,32,2,65,137,235,208,208,7,107,33,4,32,2,65,207,140,162,142,6,106,33,5,3,64,32,3,32,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,4,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,4,32,2,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,5,32,0,65,4,106,34,0,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,6,32,0,65,4,106,34,0,79,13,0,11,32,2,65,12,119,32,5,65,18,119,106,32,4,65,7,119,106,32,3,65,1,119,106,5,32,2,65,177,207,217,178,1,106,11,32,1,106,32,0,32,1,65,15,113,16,1,11,146,1,0,32,1,32,2,106,33,2,3,64,32,1,65,4,106,32,2,75,69,4,64,32,0,32,1,40,2,0,65,189,220,202,149,124,108,106,65,17,119,65,175,214,211,190,2,108,33,0,32,1,65,4,106,33,1,12,1,11,11,3,64,32,1,32,2,79,69,4,64,32,0,32,1,45,0,0,65,177,207,217,178,1,108,106,65,11,119,65,177,243,221,241,121,108,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,65,15,118,115,65,247,148,175,175,120,108,34,0,65,13,118,32,0,115,65,189,220,202,149,124,108,34,0,65,16,118,32,0,115,11,63,0,32,0,65,8,106,32,1,65,168,136,141,161,2,106,54,2,0,32,0,65,12,106,32,1,65,137,235,208,208,7,107,54,2,0,32,0,65,16,106,32,1,54,2,0,32,0,65,20,106,32,1,65,207,140,162,142,6,106,54,2,0,11,195,4,1,6,127,32,1,32,2,106,33,6,32,0,65,24,106,33,4,32,0,65,40,106,40,2,0,33,3,32,0,32,0,40,2,0,32,2,106,54,2,0,32,0,65,4,106,34,5,32,5,40,2,0,32,2,65,16,79,32,0,40,2,0,65,16,79,114,114,54,2,0,32,2,32,3,106,65,16,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,40,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,16,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,40,2,0,32,4,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,12,106,34,3,32,3,40,2,0,32,4,65,4,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,16,106,34,3,32,3,40,2,0,32,4,65,8,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,20,106,34,3,32,3,40,2,0,32,4,65,12,106,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,54,2,0,32,0,65,40,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,32,6,65,16,107,77,4,64,32,6,65,16,107,33,8,32,0,65,8,106,40,2,0,33,2,32,0,65,12,106,40,2,0,33,3,32,0,65,16,106,40,2,0,33,5,32,0,65,20,106,40,2,0,33,7,3,64,32,2,32,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,2,32,3,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,3,32,5,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,5,32,7,32,1,65,4,106,34,1,40,2,0,65,247,148,175,175,120,108,106,65,13,119,65,177,243,221,241,121,108,33,7,32,8,32,1,65,4,106,34,1,79,13,0,11,32,0,65,8,106,32,2,54,2,0,32,0,65,12,106,32,3,54,2,0,32,0,65,16,106,32,5,54,2,0,32,0,65,20,106,32,7,54,2,0,11,32,1,32,6,73,4,64,32,4,32,1,32,6,32,1,107,34,1,252,10,0,0,32,0,65,40,106,32,1,54,2,0,11,11,97,1,1,127,32,0,65,16,106,40,2,0,33,1,32,0,65,4,106,40,2,0,4,127,32,1,65,12,119,32,0,65,20,106,40,2,0,65,18,119,106,32,0,65,12,106,40,2,0,65,7,119,106,32,0,65,8,106,40,2,0,65,1,119,106,5,32,1,65,177,207,217,178,1,106,11,32,0,40,2,0,106,32,0,65,24,106,32,0,65,40,106,40,2,0,16,1,11,255,3,2,3,126,1,127,32,0,32,1,106,33,6,32,1,65,32,79,4,126,32,6,65,32,107,33,6,32,2,66,214,235,130,238,234,253,137,245,224,0,124,33,3,32,2,66,177,169,172,193,173,184,212,166,61,125,33,4,32,2,66,249,234,208,208,231,201,161,228,225,0,124,33,5,3,64,32,3,32,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,3,32,4,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,4,32,2,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,2,32,5,32,0,65,8,106,34,0,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,5,32,6,32,0,65,8,106,34,0,79,13,0,11,32,2,66,12,137,32,5,66,18,137,124,32,4,66,7,137,124,32,3,66,1,137,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,2,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,2,66,197,207,217,178,241,229,186,234,39,124,11,32,1,173,124,32,0,32,1,65,31,113,16,6,11,134,2,0,32,1,32,2,106,33,2,3,64,32,2,32,1,65,8,106,79,4,64,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,32,0,133,66,27,137,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,33,0,32,1,65,8,106,33,1,12,1,11,11,32,1,65,4,106,32,2,77,4,64,32,0,32,1,53,2,0,66,135,149,175,175,152,182,222,155,158,127,126,133,66,23,137,66,207,214,211,190,210,199,171,217,66,126,66,249,243,221,241,153,246,153,171,22,124,33,0,32,1,65,4,106,33,1,11,3,64,32,1,32,2,73,4,64,32,0,32,1,49,0,0,66,197,207,217,178,241,229,186,234,39,126,133,66,11,137,66,135,149,175,175,152,182,222,155,158,127,126,33,0,32,1,65,1,106,33,1,12,1,11,11,32,0,32,0,66,33,136,133,66,207,214,211,190,210,199,171,217,66,126,34,0,32,0,66,29,136,133,66,249,243,221,241,153,246,153,171,22,126,34,0,32,0,66,32,136,133,11,77,0,32,0,65,8,106,32,1,66,214,235,130,238,234,253,137,245,224,0,124,55,3,0,32,0,65,16,106,32,1,66,177,169,172,193,173,184,212,166,61,125,55,3,0,32,0,65,24,106,32,1,55,3,0,32,0,65,32,106,32,1,66,249,234,208,208,231,201,161,228,225,0,124,55,3,0,11,244,4,2,3,127,4,126,32,1,32,2,106,33,5,32,0,65,40,106,33,4,32,0,65,200,0,106,40,2,0,33,3,32,0,32,0,41,3,0,32,2,173,124,55,3,0,32,2,32,3,106,65,32,73,4,64,32,3,32,4,106,32,1,32,2,252,10,0,0,32,0,65,200,0,106,32,2,32,3,106,54,2,0,15,11,32,3,4,64,32,3,32,4,106,32,1,65,32,32,3,107,34,2,252,10,0,0,32,0,65,8,106,34,3,32,3,41,3,0,32,4,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,16,106,34,3,32,3,41,3,0,32,4,65,8,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,24,106,34,3,32,3,41,3,0,32,4,65,16,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,32,106,34,3,32,3,41,3,0,32,4,65,24,106,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,55,3,0,32,0,65,200,0,106,65,0,54,2,0,32,1,32,2,106,33,1,11,32,1,65,32,106,32,5,77,4,64,32,5,65,32,107,33,2,32,0,65,8,106,41,3,0,33,6,32,0,65,16,106,41,3,0,33,7,32,0,65,24,106,41,3,0,33,8,32,0,65,32,106,41,3,0,33,9,3,64,32,6,32,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,6,32,7,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,7,32,8,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,8,32,9,32,1,65,8,106,34,1,41,3,0,66,207,214,211,190,210,199,171,217,66,126,124,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,33,9,32,2,32,1,65,8,106,34,1,79,13,0,11,32,0,65,8,106,32,6,55,3,0,32,0,65,16,106,32,7,55,3,0,32,0,65,24,106,32,8,55,3,0,32,0,65,32,106,32,9,55,3,0,11,32,1,32,5,73,4,64,32,4,32,1,32,5,32,1,107,34,1,252,10,0,0,32,0,65,200,0,106,32,1,54,2,0,11,11,188,2,1,5,126,32,0,65,24,106,41,3,0,33,1,32,0,41,3,0,34,2,66,32,90,4,126,32,0,65,8,106,41,3,0,34,3,66,1,137,32,0,65,16,106,41,3,0,34,4,66,7,137,124,32,1,66,12,137,32,0,65,32,106,41,3,0,34,5,66,18,137,124,124,32,3,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,4,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,1,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,32,5,66,207,214,211,190,210,199,171,217,66,126,66,31,137,66,135,149,175,175,152,182,222,155,158,127,126,133,66,135,149,175,175,152,182,222,155,158,127,126,66,157,163,181,234,131,177,141,138,250,0,125,5,32,1,66,197,207,217,178,241,229,186,234,39,124,11,32,2,124,32,0,65,40,106,32,2,66,31,131,167,16,6,11]);async function mX(){return function(e){const{exports:{mem:t,xxh32:r,xxh64:n,init32:i,update32:o,digest32:s,init64:u,update64:c,digest64:l}}=e;let d=new Uint8Array(t.buffer);function f(y,x){if(t.buffer.byteLength<y+x){const E=Math.ceil((y+x-t.buffer.byteLength)/65536);t.grow(E),d=new Uint8Array(t.buffer)}}function p(y,x,E,N,B,D){f(y);const M=new Uint8Array(y);return d.set(M),E(0,x),M.set(d.subarray(0,y)),{update(T){let O;return d.set(M),typeof T=="string"?(f(3*T.length,y),O=b.encodeInto(T,d.subarray(y)).written):(f(T.byteLength,y),d.set(T,y),O=T.byteLength),N(0,y,O),M.set(d.subarray(0,y)),this},digest:()=>(d.set(M),D(B(0)))}}function m(y){return y>>>0}const h=2n**64n-1n;function g(y){return y&h}const b=new TextEncoder,v=0,S=0n;function w(y,x=v){return f(3*y.length,0),m(r(0,b.encodeInto(y,d).written,x))}function k(y,x=S){return f(3*y.length,0),g(n(0,b.encodeInto(y,d).written,x))}return{h32:w,h32ToString:(y,x=v)=>w(y,x).toString(16).padStart(8,"0"),h32Raw:(y,x=v)=>(f(y.byteLength,0),d.set(y),m(r(0,y.byteLength,x))),create32:(y=v)=>p(48,y,i,o,s,m),h64:k,h64ToString:(y,x=S)=>k(y,x).toString(16).padStart(16,"0"),h64Raw:(y,x=S)=>(f(y.byteLength,0),d.set(y),g(n(0,y.byteLength,x))),create64:(y=S)=>p(88,y,u,c,l,g)}}((await WebAssembly.instantiate(pX)).instance)}let F3=null,jp=null,Qi=null,Nn=null,Qp=null;const hX=e=>{F3=e},gX=e=>{jp=e},vX=e=>{Qi=e},bX=e=>{Nn=e},yX=mX().then(e=>(Qp=e,e)),Oe=window.electronApi;let ao=null;const Mc=()=>{if(ao)return ao;try{const e=window.navigator.userAgent;/Android/i.test(e)?ao="Android":/iPhone|iPad|iPod/i.test(e)?ao="iOS":/Windows/i.test(e)?ao="Windows":/Linux/i.test(e)?ao="Linux":/Mac/i.test(e)?ao="macOS":ao="Unknown"}catch{ao="Unknown"}return ao},wX=()=>Mc()==="Windows",xX=()=>Mc()==="Linux",qp=()=>Mc()==="macOS",Wp=()=>{const e=Mc();return e==="Windows"||e==="Linux"||e==="macOS"},Hp=e=>qp()?e.metaKey:e.ctrlKey,O3=e=>{Oe==null||Oe.enableDisableMainMenu(e)},SX="OMEX #",Ac=e=>e.startsWith("http://")||e.startsWith("https://"),Js=e=>`https://cors-proxy.opencor.workers.dev/?url=${e}`,R3=e=>typeof e=="string"?Qp.h64(e).toString(16).padStart(16,"0"):Qp.h64Raw(e).toString(16).padStart(16,"0"),kX=e=>{const t=Math.floor(e%1e3),r=Math.floor(e/1e3%60),n=Math.floor(e/(1e3*60)%60),i=Math.floor(e/(1e3*60*60)%24),o=Math.floor(e/(1e3*60*60*24)%24);let s="";return o&&(s=`${o}d`),(i||(n||r||t)&&s)&&(s+=`${s?" ":""}${i}h`),(n||(r||t)&&s)&&(s+=`${s?" ":""}${n}m`),(r||t&&s)&&(s+=`${s?" ":""}${r}s`),(t||!s)&&(s+=`${s?" ":""}${t}ms`),s},Bt=e=>e instanceof Error?e.message:String(e),er=(e,t=!0)=>(e=t?e.charAt(0).toUpperCase()+e.slice(1):e.charAt(0).toLowerCase()+e.slice(1),e.endsWith("...")?e:e.endsWith(".")?t?e:e.slice(0,-1):t?`${e}.`:e),Zp=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||t===0)return!1;const r=e/t,n=Math.round(r);return Math.abs(r-n)<=Number.EPSILON*Math.max(1,Math.abs(n))},P3=(e,t,r)=>{const n=document.createElement("a"),i=t instanceof Blob?t:new Blob([t],{type:r}),o=URL.createObjectURL(i);n.href=o,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)},L3=e=>{const t=e.split(/(\\|\/)/g).pop()||"";try{return decodeURIComponent(t)}catch(r){return console.warn("OpenCOR: failed to decode the file path:",t,Bt(r)),t}},Tc=e=>new Promise(t=>{setTimeout(t,e)}),NX=()=>new Promise(e=>{requestAnimationFrame(e)}),EX=Object.freeze(new Float64Array(0)),V3=Object.freeze({data:EX,unit:""}),Ys=e=>{const t={};for(const r of e)t[r]={...V3};return t},z3=Symbol("DialogState"),BX=()=>{const e=ue.ref(0),t=ue.computed(()=>e.value>0),r={activeDialogs:e,isDialogActive:t,incrementDialogs:()=>{++e.value},decrementDialogs:()=>{--e.value}};return ue.provide(z3,r),r},DX=()=>{const e=ue.inject(z3);if(!e)throw new Error("useDialogState() must be called within a component that has provideDialogState in its ancestor tree.");return e},ra=a.defineComponent({__name:"BaseDialog",emits:["cancel"],setup(e,{emit:t}){const r=t,{incrementDialogs:n,decrementDialogs:i}=DX();let o=null,s=null,u=null;const c=()=>{if(o instanceof HTMLElement&&s instanceof HTMLElement){const f=o.getBoundingClientRect(),p=s.getBoundingClientRect();o.style.top=`${Math.max(Math.min(f.top,p.bottom-f.height),p.top)}px`,o.style.left=`${Math.max(Math.min(f.left,p.right-f.width),p.left)}px`}},l=()=>{n(),O3(!1),ue.nextTick(()=>{o=document.querySelector(".p-dialog"),s=o==null?void 0:o.closest('[data-pc-section="mask"]'),o&&s&&(u=new MutationObserver(()=>{c()}),u.observe(o,{attributes:!0,attributeFilter:["style"]}),c())})},d=()=>{i(),O3(!0),r("cancel"),ue.nextTick(()=>{u&&(u.disconnect(),u=null)})};return(f,p)=>{const m=A3;return a.openBlock(),a.createBlock(m,{modal:!0,appendTo:"self","pt:mask:style":{position:"absolute"},"pt:content":{class:"h-full",style:"padding-bottom: 0"},"pt:footer":{style:"padding-top: 1.25rem"},onShow:l,onHide:d},a.createSlots({_:2},[a.renderList(f.$slots,(h,g)=>({name:g,fn:a.withCtx(b=>[a.renderSlot(f.$slots,g,a.normalizeProps(a.guardReactiveProps(b)))])}))]),1024)}}}),MX="0.20260612.4",AX={version:MX},{version:Gp}=AX,Ic=ue.ref(!1),Xs=ue.ref(""),_3=async()=>{try{const e=await fetch(`./assets/version.json?t=${Date.now()}`);if(!e.ok)return console.warn("OpenCOR: failed to fetch the version information."),Ic.value=!1,Xs.value="",!1;const t=await e.json();Xs.value=t.version;const r=TX(Xs.value,Gp);return Ic.value=r,r}catch{return Ic.value=!1,Xs.value="",!1}},TX=(e,t)=>{const r=e.split(".").map(Number),n=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,n.length);++i){const o=r[i]||0,s=n[i]||0;if(o>s)return!0;if(o<s)return!1}return!1};let U3=null;const IX=()=>{_3(),U3||(U3=window.setInterval(()=>{_3()},300*1e3))},$s=e=>(a.pushScopeId("data-v-c05d59eb"),e=e(),a.popScopeId(),e),FX={class:"space-y-7"},OX={class:"text-center"},RX={class:"text-3xl font-bold"},PX={class:"highlight highlight-version"},LX={class:"space-y-2"},VX={class:"text-center"},zX=$s(()=>a.createElementVNode("span",{class:"text-lg"},[a.createTextVNode("Feel free to "),a.createElementVNode("strong",null,"force reload"),a.createTextVNode(" OpenCOR whenever you are ready.")],-1)),_X=$s(()=>a.createElementVNode("br",null,null,-1)),UX={key:0,class:"highlight"},CX={key:1},jX=$s(()=>a.createElementVNode("span",{class:"highlight"},"Ctrl",-1)),QX=$s(()=>a.createElementVNode("span",{class:"highlight"},"Shift",-1)),qX=$s(()=>a.createElementVNode("span",{class:"highlight"},"R",-1)),WX=a.defineComponent({__name:"UpdateAvailableDialog",emits:["close"],setup(e){return(t,r)=>{const n=kn,i=ra;return a.openBlock(),a.createBlock(i,{header:" ",class:"w-169"},{footer:a.withCtx(()=>[a.createVNode(n,{label:"OK",autofocus:"",onClick:r[0]||(r[0]=o=>t.$emit("close"))})]),default:a.withCtx(()=>[a.createElementVNode("div",FX,[a.createElementVNode("div",OX,[a.createElementVNode("div",RX,[a.createTextVNode("OpenCOR "),a.createElementVNode("span",PX,a.toDisplayString(a.unref(Xs)),1),a.createTextVNode(" is available!")])]),a.createElementVNode("div",LX,[a.createElementVNode("div",VX,[zX,_X,a.createElementVNode("em",null,[a.createTextVNode("(You can force reload by pressing "),qp()?(a.openBlock(),a.createElementBlock("span",UX,"⇧⌘R")):(a.openBlock(),a.createElementBlock("span",CX,[jX,a.createTextVNode("+"),QX,a.createTextVNode("+"),qX])),a.createTextVNode(".)")])])])])]),_:1})}}}),Qn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},HX=Qn(WX,[["__scopeId","data-v-c05d59eb"]]),ZX="opencor",C3=`${ZX}://`,GX=0,Fc=69,j3=369,Ao=3e3,KX=500,JX=40,Q3=new Date().getFullYear(),q3=Q3===2025?"2025":`2025-${Q3}`;var _e=(e=>(e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFORMATION=2]="INFORMATION",e))(_e||{});const Kp=e=>{const t=[];for(const r of e)t.push({type:r.type.value,description:r.description});return t},la=class la{constructor(){Ot(this,"_fileManager",null)}static instance(){return la._instance??(la._instance=new la),la._instance}fileManager(){return this._fileManager??(this._fileManager=Wi.FileManager.instance()),this._fileManager}file(t){if(it()){const n=ot.fileContents(t);return n?new qi(t,n):null}const r=this.fileManager().files;for(const n of r)if(n.path===t)return new qi(t,n.contents());return null}unmanage(t){if(it())ot.fileManagerUnmanage(t);else{const r=this.fileManager(),n=r.files;for(const i of n)if(i.path===t){r.unmanage(i);break}}}};Ot(la,"_instance",null);let Jp=la;const W3=Jp.instance();var Va=(e=>(e[e.UNKNOWN_FILE=0]="UNKNOWN_FILE",e[e.CELLML_FILE=1]="CELLML_FILE",e[e.SEDML_FILE=2]="SEDML_FILE",e[e.COMBINE_ARCHIVE=3]="COMBINE_ARCHIVE",e[e.IRRETRIEVABLE_FILE=4]="IRRETRIEVABLE_FILE",e))(Va||{});let qi=class{constructor(e,t=void 0){Ot(this,"_path");Ot(this,"_wasmFile",{});Ot(this,"_issues",[]);if(this._path=e,it())ot.fileCreate(e,t),this._issues=ot.fileIssues(e);else if(t)this._wasmFile=ue.markRaw(new Wi.File(e)),this._wasmFile.setContents(t),this._issues=Kp(this._wasmFile.issues);else{console.warn(`OpenCOR: no contents provided for file '${e}'.`);return}}type(){return it()?ot.fileType(this._path):this._wasmFile.type.value}path(){return this._path}issues(){return this._issues}contents(){return it()?ot.fileContents(this._path):this._wasmFile.contents()}document(){return new YX(this._path,this._wasmFile)}uiJson(){let e;if(it()){if(e=ot.fileUiJson(this._path),!e)return}else{const n=this._wasmFile.childFileFromFileName("simulation.json");if(!n)return;e=n.contents()}const t=new TextDecoder;let r;try{r=JSON.parse(t.decode(e))}catch{console.warn(`OpenCOR: unable to parse the UI JSON for file '${this._path}'.`);return}if(!r||typeof r!="object"||Array.isArray(r)){console.warn(`OpenCOR: the UI JSON for file '${this._path}' has an unexpected structure.`);return}return H3(r)}};class Oc{constructor(t){Ot(this,"_index");this._index=t}}class YX{constructor(t,r){Ot(this,"_cppDocumentId",-1);Ot(this,"_wasmSedDocument",{});Ot(this,"_issues",[]);if(it()?this._cppDocumentId=ot.sedDocumentCreate(t):this._wasmSedDocument=new Wi.SedDocument(r),this._issues=it()?ot.sedDocumentIssues(this._cppDocumentId):Kp(this._wasmSedDocument.issues),this.modelCount()!==1){this._issues.push({type:_e.WARNING,description:"Only SED-ML files with one model are currently supported."});return}if(this.simulationCount()!==1){this._issues.push({type:_e.WARNING,description:"Only SED-ML files with one simulation are currently supported."});return}const n=this.simulation(0);if(n.type()!==3){this._issues.push({type:_e.WARNING,description:"Only uniform time course simulations are currently supported."});return}const i=n.initialTime(),o=n.outputStartTime(),s=n.outputEndTime(),u=n.numberOfSteps();i!==o&&this._issues.push({type:_e.WARNING,description:`Only uniform time course simulations with the same values for 'initialTime' (${i}) and 'outputStartTime' (${o}) are currently supported.`}),o===s&&this._issues.push({type:_e.ERROR,description:`The uniform time course simulation must have different values for 'outputStartTime' (${o}) and 'outputEndTime' (${s}).`}),u<=0&&this._issues.push({type:_e.ERROR,description:`The uniform time course simulation must have a positive value for 'numberOfSteps' (${u}).`})}issues(){return this._issues}modelCount(){return it()?ot.sedDocumentModelCount(this._cppDocumentId):this._wasmSedDocument.modelCount}model(t){return new XX(this._cppDocumentId,this._wasmSedDocument,t)}simulationCount(){return it()?ot.sedDocumentSimulationCount(this._cppDocumentId):this._wasmSedDocument.simulationCount}simulation(t){let r;if(it())r=ot.sedDocumentSimulationType(this._cppDocumentId,t);else switch(this._wasmSedDocument.simulation(t).constructor.name){case"SedAnalysis":r=0;break;case"SedSteadyState":r=1;break;case"SedOneStep":r=2;break;default:r=3}return r===0?new $X(this._cppDocumentId,this._wasmSedDocument,t,r):r===1?new e$(this._cppDocumentId,this._wasmSedDocument,t,r):r===2?new t$(this._cppDocumentId,this._wasmSedDocument,t,r):new r$(this._cppDocumentId,this._wasmSedDocument,t,r)}instantiate(){return new o$(this._cppDocumentId,this._wasmSedDocument)}serialise(){return it()?ot.sedDocumentSerialise(this._cppDocumentId):this._wasmSedDocument.serialise()}}class XX extends Oc{constructor(r,n,i){super(i);Ot(this,"_cppDocumentId");Ot(this,"_wasmSedModel",{});this._cppDocumentId=r,tl()&&(this._wasmSedModel=n.model(i))}file(){return W3.file(it()?ot.sedModelFilePath(this._cppDocumentId,this._index):this._wasmSedModel.file.path)}addChange(r,n,i){it()?ot.sedModelAddChange(this._cppDocumentId,this._index,r,n,i):this._wasmSedModel.addChange(new Wi.SedChangeAttribute(r,n,i))}removeAllChanges(){it()?ot.sedModelRemoveAllChanges(this._cppDocumentId,this._index):this._wasmSedModel.removeAllChanges()}}class Rc extends Oc{constructor(r,n,i,o){super(i);Ot(this,"_cppDocumentId");Ot(this,"_type");this._cppDocumentId=r,this._type=o}type(){return this._type}}class $X extends Rc{}class e$ extends Rc{}class t$ extends Rc{constructor(r,n,i,o){super(r,n,i,o);Ot(this,"_wasmSedOneStep",{});tl()&&(this._wasmSedOneStep=n.simulation(i))}step(){return it()?ot.sedOneStepStep(this._cppDocumentId,this._index):this._wasmSedOneStep.step}}class r$ extends Rc{constructor(r,n,i,o){super(r,n,i,o);Ot(this,"_wasmSedUniformTimeCourse",{});tl()&&(this._wasmSedUniformTimeCourse=n.simulation(i))}initialTime(){return it()?ot.sedUniformTimeCourseInitialTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.initialTime}setInitialTime(r){it()?ot.sedUniformTimeCourseSetInitialTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.initialTime=r}outputStartTime(){return it()?ot.sedUniformTimeCourseOutputStartTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputStartTime}setOutputStartTime(r){it()?ot.sedUniformTimeCourseSetOutputStartTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputStartTime=r}outputEndTime(){return it()?ot.sedUniformTimeCourseOutputEndTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputEndTime}setOutputEndTime(r){it()?ot.sedUniformTimeCourseSetOutputEndTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputEndTime=r}numberOfSteps(){return it()?ot.sedUniformTimeCourseNumberOfSteps(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.numberOfSteps}setNumberOfSteps(r){it()?ot.sedUniformTimeCourseSetNumberOfSteps(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.numberOfSteps=r}cvode(){return new n$(this._cppDocumentId,this._wasmSedUniformTimeCourse,this._index)}}class n$ extends Oc{constructor(r,n,i){super(i);Ot(this,"_cppDocumentId");Ot(this,"_wasmSolverCvode",{});this._cppDocumentId=r,tl()&&(this._wasmSolverCvode=n.odeSolver)}maximumStep(){return it()?ot.solverCvodeMaximumStep(this._cppDocumentId,this._index):this._wasmSolverCvode.maximumStep}setMaximumStep(r){it()?ot.solverCvodeSetMaximumStep(this._cppDocumentId,this._index,r):this._wasmSolverCvode.maximumStep=r}}class o${constructor(t,r){Ot(this,"_cppInstanceId",-1);Ot(this,"_wasmSedInstance",{});it()?this._cppInstanceId=ot.sedDocumentInstantiate(t):this._wasmSedInstance=ue.markRaw(r.instantiate())}hasIssues(){return it()?ot.sedInstanceHasIssues(this._cppInstanceId):this._wasmSedInstance.hasIssues}issues(){return it()?ot.sedInstanceIssues(this._cppInstanceId):Kp(this._wasmSedInstance.issues)}task(t){return new a$(this._cppInstanceId,t,this._wasmSedInstance)}run(){return it()?ot.sedInstanceRun(this._cppInstanceId):this._wasmSedInstance.run()}}class a$ extends Oc{constructor(r,n,i){super(n);Ot(this,"_cppInstanceId");Ot(this,"_wasmSedInstanceTask",{});this._cppInstanceId=r,tl()&&(this._wasmSedInstanceTask=i.task(n))}voiName(){return it()?ot.sedInstanceTaskVoiName(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiName}voiUnit(){return it()?ot.sedInstanceTaskVoiUnit(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiUnit}voi(){return it()?ot.sedInstanceTaskVoi(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiAsArray}stateCount(){return it()?ot.sedInstanceTaskStateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.stateCount}stateName(r){return it()?ot.sedInstanceTaskStateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateName(r)}stateUnit(r){return it()?ot.sedInstanceTaskStateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateUnit(r)}state(r){return it()?ot.sedInstanceTaskState(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateAsArray(r)}rateCount(){return it()?ot.sedInstanceTaskRateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.rateCount}rateName(r){return it()?ot.sedInstanceTaskRateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateName(r)}rateUnit(r){return it()?ot.sedInstanceTaskRateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateUnit(r)}rate(r){return it()?ot.sedInstanceTaskRate(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateAsArray(r)}constantCount(){return it()?ot.sedInstanceTaskConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.constantCount}constantName(r){return it()?ot.sedInstanceTaskConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantName(r)}constantUnit(r){return it()?ot.sedInstanceTaskConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantUnit(r)}constant(r){return it()?ot.sedInstanceTaskConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantAsArray(r)}computedConstantCount(){return it()?ot.sedInstanceTaskComputedConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.computedConstantCount}computedConstantName(r){return it()?ot.sedInstanceTaskComputedConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantName(r)}computedConstantUnit(r){return it()?ot.sedInstanceTaskComputedConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantUnit(r)}computedConstant(r){return it()?ot.sedInstanceTaskComputedConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantAsArray(r)}algebraicVariableCount(){return it()?ot.sedInstanceTaskAlgebraicVariableCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.algebraicVariableCount}algebraicVariableName(r){return it()?ot.sedInstanceTaskAlgebraicVariableName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableName(r)}algebraicVariableUnit(r){return it()?ot.sedInstanceTaskAlgebraicVariableUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableUnit(r)}algebraicVariable(r){return it()?ot.sedInstanceTaskAlgebraicVariable(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableAsArray(r)}}const el=e=>"maximumValue"in e&&"minimumValue"in e,za=e=>"possibleValues"in e,Yp=(e,t)=>t instanceof Float64Array?Array.from(t):t,H3=e=>{for(const t of e.output.externalData??[]){t.voiValues instanceof Float64Array||(t.voiValues=new Float64Array(t.voiValues));for(const r of t.dataSeries)r.values instanceof Float64Array||(r.values=new Float64Array(r.values))}return e},i$=e=>{var t;return(t=e.output.externalData)!=null&&t.length?{...e,output:{...e.output,externalData:e.output.externalData.map(r=>({...r,voiValues:Array.from(r.voiValues),dataSeries:r.dataSeries.map(n=>({...n,values:Array.from(n.values)}))}))}}:e},Z3=e=>{const t=r=>{if(!(r==null||typeof r=="string"&&r==="")){if(r instanceof Float64Array)return r;if(Array.isArray(r))return r.map(t).filter(n=>n!==void 0);if(typeof r=="object"){const n={};for(const[i,o]of Object.entries(r)){const s=t(o);s!==void 0&&(n[i]=s)}return n}return r}};return t(e)},Pc=e=>{if(e.size===0)return"";const t=[...e].map(r=>`'${r}'`);return t.length===1?t[0]:t.length===2?`${t[0]} or ${t[1]}`:`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`},Xp=(e,t)=>{if(!e)return[{type:_e.WARNING,description:"UI JSON: no UI JSON was provided."}];e=Z3(e);const r=new F3.Validator,n={additionalProperties:!1,properties:{input:{items:{oneOf:[{additionalProperties:!1,properties:{defaultValue:{required:!0,type:"number"},id:{required:!0,type:"string"},name:{required:!0,type:"string"},possibleValues:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},value:{required:!0,type:"number"}},type:"object"},minItems:1,required:!0,type:"array"},visible:{type:"string"}}},{additionalProperties:!1,properties:{defaultValue:{required:!0,type:"number"},id:{required:!0,type:"string"},maximumValue:{required:!0,type:"number"},minimumValue:{required:!0,type:"number"},name:{required:!0,type:"string"},stepValue:{type:"number"},visible:{type:"string"}}}],type:"object"},minItems:1,required:!0,type:"array"},output:{additionalProperties:!1,minItems:1,properties:{data:{items:{additionalProperties:!1,properties:{id:{required:!0,type:"string"},name:{required:!0,type:"string"}},type:"object"},minItems:1,required:!0,type:"array"},externalData:{items:{additionalProperties:!1,properties:{data:{items:{additionalProperties:!1,properties:{id:{required:!0,type:"string"},name:{required:!0,type:"string"}},type:"object"},required:!0,type:"array"},dataSeries:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},values:{items:{required:!0,type:"number"},minItems:1,required:!0,type:"array"}},type:"object"},minItems:1,required:!0,type:"array"},description:{type:"string"},voiExpression:{type:"string"},voiValues:{items:{required:!0,type:"number"},minItems:1,required:!0,type:"array"}},type:"object"},type:"array"},plots:{items:{additionalProperties:!1,properties:{xAxisTitle:{type:"string"},xValue:{required:!0,type:"string"},yAxisTitle:{type:"string"},yValue:{required:!0,type:"string"},name:{type:"string"},additionalTraces:{items:{additionalProperties:!1,properties:{xValue:{required:!0,type:"string"},yValue:{required:!0,type:"string"},name:{type:"string"}},type:"object"},type:"array"}},type:"object"},minItems:1,required:!0,type:"array"}},required:!0,type:"object"},parameters:{items:{additionalProperties:!1,properties:{name:{required:!0,type:"string"},value:{required:!0,type:"string"}},type:"object"},minItems:1,required:!0,type:"array"}},type:"object"},i=r.validate(i$(e),n,{nestedErrors:!0});if(!i.valid){const p=[];for(const m of String(i).split(`
1136
1136
  `))m&&p.push({type:_e.WARNING,description:`UI JSON: ${er(m)}`});return p}const o=new Set((t==null?void 0:t.allModelParameters)??[]),s=new Set((t==null?void 0:t.editableModelParameters)??[]),u=[],c={};for(const p of e.input){if(p.id?(c[p.id]&&u.push({type:_e.WARNING,description:`UI JSON: an input id must be unique ('${p.id}' is used more than once).`}),c[p.id]=!0):u.push({type:_e.WARNING,description:"UI JSON: an input id must not be empty."}),p.name||u.push({type:_e.WARNING,description:"UI JSON: an input name must not be empty."}),"possibleValues"in p){for(const b of p.possibleValues)b.name||u.push({type:_e.WARNING,description:"UI JSON: an input possible value name must not be empty."});const m=p.possibleValues.map(b=>b.value),h=Pc(new Set(m.map(b=>String(b)))),g={};for(const b of m)g[b]&&u.push({type:_e.WARNING,description:`UI JSON: an input possible value must have a unique value ('${b}' is used more than once).`}),g[b]=!0;m.includes(p.defaultValue)||u.push({type:_e.WARNING,description:`UI JSON: an input default value must be one of the possible values ('${p.defaultValue}' is not one of ${h}).`})}if(el(p)){p.minimumValue>=p.maximumValue&&u.push({type:_e.WARNING,description:`UI JSON: an input minimum value must be lower than the maximum value (${p.minimumValue} is not lower than ${p.maximumValue}).`}),(p.defaultValue<p.minimumValue||p.defaultValue>p.maximumValue)&&u.push({type:_e.WARNING,description:`UI JSON: an input default value must be greater or equal than the minimum value and lower or equal than the maximum value (${p.defaultValue} is not between ${p.minimumValue} and ${p.maximumValue}).`});const m=p.maximumValue-p.minimumValue;p.stepValue!==void 0&&p.stepValue!==null?((p.stepValue<=0||p.stepValue>m)&&u.push({type:_e.WARNING,description:`UI JSON: an input step value must be greater than zero and lower or equal than the range value (${p.stepValue} is not between 0 and ${m}).`}),Zp(m,p.stepValue)||u.push({type:_e.WARNING,description:`UI JSON: an input step value must be a factor of the range value (${p.stepValue} is not a factor of ${m}).`})):Zp(m,1)||u.push({type:_e.WARNING,description:`UI JSON: an input step value must be a factor of the range value (1 is not a factor of ${m}).`})}p.visible!==void 0&&p.visible!==null&&!p.visible&&u.push({type:_e.WARNING,description:"UI JSON: an input visible must not be empty."})}const l={},d=Pc(o);for(const p of e.output.data)p.id||u.push({type:_e.WARNING,description:"UI JSON: an output data id must not be empty."}),l[p.id]&&u.push({type:_e.WARNING,description:`UI JSON: an output data id must be unique ('${p.id}' is used more than once).`}),l[p.id]=!0,p.name?o.size>0&&!o.has(p.name)&&u.push({type:_e.WARNING,description:`UI JSON: an output data name must match one of the available options ('${p.name}' is not one of ${d}).`}):u.push({type:_e.WARNING,description:"UI JSON: an output data name must not be empty."});if(e.output.externalData!==void 0&&e.output.externalData!==null)for(const p of e.output.externalData){if(p.voiExpression)try{Qi.parse(p.voiExpression)}catch(b){u.push({type:_e.WARNING,description:`UI JSON: an output external data VOI expression must be valid ('${p.voiExpression}' is not: ${er(Bt(b),!1)}).`})}p.voiValues.length||u.push({type:_e.WARNING,description:"UI JSON: an output external data VOI values must not be empty."});const m={};for(const b of p.dataSeries)m[b.name]&&u.push({type:_e.WARNING,description:`UI JSON: an output external data series name must be unique ('${b.name}' is used more than once).`}),m[b.name]=!0,b.name||u.push({type:_e.WARNING,description:"UI JSON: an output external data series name must not be empty."}),b.values.length||u.push({type:_e.WARNING,description:"UI JSON: an output external data series values must not be empty."}),b.values.length!==p.voiValues.length&&u.push({type:_e.WARNING,description:`UI JSON: an output external data series values length must match the output external data VOI values length (${b.values.length} is not equal to ${p.voiValues.length}).`});const h={},g=Pc(new Set(Object.keys(m)));for(const b of p.data)b.id||u.push({type:_e.WARNING,description:"UI JSON: an output external data id must not be empty."}),h[b.id]&&u.push({type:_e.WARNING,description:`UI JSON: an output external data id must be unique ('${b.id}' is used more than once).`}),h[b.id]=!0,b.id&&l[b.id]&&u.push({type:_e.WARNING,description:`UI JSON: an output external data id must be unique across simulation and external data ('${b.id}' is used more than once).`}),b.id&&(l[b.id]=!0),b.name||u.push({type:_e.WARNING,description:"UI JSON: an output external data name must not be empty."}),m[b.name]||u.push({type:_e.WARNING,description:`UI JSON: an output external data name must match one of the available options ('${b.name}' is not one of ${g}).`});p.dataSeries.length||u.push({type:_e.WARNING,description:"UI JSON: an output external data series entries must not be empty."})}for(const p of e.output.plots){const m=(h,g)=>{if(h)try{Qi.parse(h)}catch(b){u.push({type:_e.WARNING,description:`UI JSON: an output plot ${g} must be valid ('${h}' is not: ${er(Bt(b),!1)}).`})}};if(p.xValue?m(p.xValue,"X value"):u.push({type:_e.WARNING,description:"UI JSON: an output plot X value must not be empty."}),p.yValue?m(p.yValue,"Y value"):u.push({type:_e.WARNING,description:"UI JSON: an output plot Y value must not be empty."}),p.additionalTraces!==void 0&&p.additionalTraces!==null)for(const h of p.additionalTraces)h.xValue?m(h.xValue,"X value"):u.push({type:_e.WARNING,description:"UI JSON: an output plot additional trace X value must not be empty."}),h.yValue?m(h.yValue,"Y value"):u.push({type:_e.WARNING,description:"UI JSON: an output plot additional trace Y value must not be empty."})}const f=Pc(s);for(const p of e.parameters)if(p.name?s.size>0&&!s.has(p.name)&&u.push({type:_e.WARNING,description:`UI JSON: a parameter name must match one of the available options ('${p.name}' is not one of ${f}).`}):u.push({type:_e.WARNING,description:"UI JSON: a parameter name must not be empty."}),!p.value)u.push({type:_e.WARNING,description:"UI JSON: a parameter value must not be empty."});else try{Qi.parse(p.value)}catch(m){u.push({type:_e.WARNING,description:`UI JSON: a parameter value must be valid ('${p.value}' is not: ${er(Bt(m),!1)}).`})}return u},it=()=>Oe!==void 0,tl=()=>!it(),s$=()=>it()?ot.version():Wi.versionString();let ot={},Wi={};const l$=e=>{ot=e},u$=e=>{Wi=e},c$={class:"space-y-7"},d$={class:"text-center"},f$={class:"text-3xl font-bold"},p$={key:0,class:"text-xl italic font-bold"},m$={class:"text-sm italic"},h$={class:"space-y-2"},g$=a.createElementVNode("a",{href:"https://opencor.ws/",target:"_blank",rel:"noopener"},"OpenCOR",-1),v$=a.createElementVNode("a",{href:"https://opencor.ws/libopencor/",target:"_blank",rel:"noopener"},"libOpenCOR",-1),b$=a.createElementVNode("a",{href:"https://cellml.org/",target:"_blank",rel:"noopener"},"CellML",-1),y$=a.createElementVNode("div",{class:"space-y-0"},[a.createElementVNode("div",null,"There are two versions of OpenCOR:"),a.createElementVNode("ol",{class:"list-decimal list-inside ml-2"},[a.createElementVNode("li",null,[a.createElementVNode("span",{class:"font-bold"},[a.createElementVNode("a",{href:"https://github.com/opencor/webapp/releases/latest",target:"_blank",rel:"noopener"},"OpenCOR"),a.createTextVNode(":")]),a.createTextVNode(" a desktop application that can be run on "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/List_of_Intel_processors",target:"_blank",rel:"noopener"},"Intel"),a.createTextVNode("-based and "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/ARM_architecture_family",target:"_blank",rel:"noopener"},"ARM"),a.createTextVNode("-based "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/Microsoft_Windows",target:"_blank",rel:"noopener"},"Windows"),a.createTextVNode(", "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/Linux",target:"_blank",rel:"noopener"},"Linux"),a.createTextVNode(", and "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/MacOS",target:"_blank",rel:"noopener"},"macOS"),a.createTextVNode(" machines; and ")]),a.createElementVNode("li",null,[a.createElementVNode("span",{class:"font-bold"},[a.createElementVNode("a",{href:"https://opencor.ws/app",target:"_blank",rel:"noopener"},"OpenCOR's Web app"),a.createTextVNode(":")]),a.createTextVNode(" a "),a.createElementVNode("a",{href:"https://en.wikipedia.org/wiki/Web_application",target:"_blank",rel:"noopener"},"Web app"),a.createTextVNode(" that can be run on a Web browser. ")])])],-1),w$=a.defineComponent({__name:"AboutDialog",emits:["close"],setup(e){return(t,r)=>{const n=kn,i=ra;return a.openBlock(),a.createBlock(i,{header:" ",class:"w-169"},{footer:a.withCtx(()=>[a.createVNode(n,{label:"OK",autofocus:"",onClick:r[0]||(r[0]=o=>t.$emit("close"))})]),default:a.withCtx(()=>[a.createElementVNode("div",c$,[a.createElementVNode("div",d$,[a.createElementVNode("div",f$,"OpenCOR "+a.toDisplayString(a.unref(Gp)),1),a.unref(Oe)?(a.openBlock(),a.createElementBlock("div",p$,a.toDisplayString(a.unref(Oe).operatingSystem()),1)):a.createCommentVNode("",!0),a.createElementVNode("div",m$,"Copyright "+a.toDisplayString(a.unref(q3)),1)]),a.createElementVNode("div",h$,[a.createElementVNode("div",null,[g$,a.createTextVNode(" is a frontend to "),v$,a.createTextVNode(" "+a.toDisplayString(s$())+", a library that can be used to organise, edit, simulate, and analyse ",1),b$,a.createTextVNode(" files. ")]),y$])])]),_:1})}}});var na={name:"CheckIcon",extends:Pt};function x$(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{d:"M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",fill:"currentColor"},null,-1)]),16)}na.render=x$;var $p={name:"MinusIcon",extends:Pt};function S$(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{d:"M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z",fill:"currentColor"},null,-1)]),16)}$p.render=S$;var Lc={name:"BaseEditableHolder",extends:st,emits:["update:modelValue","value-change"],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:this.defaultValue||this.modelValue}},watch:{modelValue:function(e){this.d_value=e},defaultValue:function(e){this.d_value=e},$formName:{immediate:!0,handler:function(e){var t,r;this.formField=((t=this.$pcForm)===null||t===void 0||(r=t.register)===null||r===void 0?void 0:r.call(t,e,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(e){var t,r;this.formField=((t=this.$pcForm)===null||t===void 0||(r=t.register)===null||r===void 0?void 0:r.call(t,this.$formName,e))||{}}},$formDefaultValue:{immediate:!0,handler:function(e){this.d_value!==e&&(this.d_value=e)}}},formField:{},methods:{writeValue:function(e,t){var r,n;this.controlled&&(this.d_value=e,this.$emit("update:modelValue",e)),this.$emit("value-change",e),(r=(n=this.formField).onChange)===null||r===void 0||r.call(n,{originalEvent:t,value:e})}},computed:{$filled:function(){return Ce(this.d_value)},$invalid:function(){var e,t,r,n;return(e=(t=this.invalid)!==null&&t!==void 0?t:(r=this.$pcFormField)===null||r===void 0||(r=r.$field)===null||r===void 0?void 0:r.invalid)!==null&&e!==void 0?e:(n=this.$pcForm)===null||n===void 0||(n=n.states)===null||n===void 0||(n=n[this.$formName])===null||n===void 0?void 0:n.invalid},$formName:function(){var e;return this.name||((e=this.$formControl)===null||e===void 0?void 0:e.name)},$formControl:function(){var e;return this.formControl||((e=this.$pcFormField)===null||e===void 0?void 0:e.formControl)},$formDefaultValue:function(){var e,t,r,n;return(e=(t=this.d_value)!==null&&t!==void 0?t:(r=this.$pcFormField)===null||r===void 0?void 0:r.initialValue)!==null&&e!==void 0?e:(n=this.$pcForm)===null||n===void 0||(n=n.initialValues)===null||n===void 0?void 0:n[this.$formName]},controlled:function(){return this.$inProps.hasOwnProperty("modelValue")||!this.$inProps.hasOwnProperty("modelValue")&&!this.$inProps.hasOwnProperty("defaultValue")},filled:function(){return this.$filled}}},rl={name:"BaseInput",extends:Lc,props:{size:{type:String,default:null},fluid:{type:Boolean,default:null},variant:{type:String,default:null}},inject:{$parentInstance:{default:void 0},$pcFluid:{default:void 0}},computed:{$variant:function(){var e;return(e=this.variant)!==null&&e!==void 0?e:this.$primevue.config.inputStyle||this.$primevue.config.inputVariant},$fluid:function(){var e;return(e=this.fluid)!==null&&e!==void 0?e:!!this.$pcFluid},hasFluid:function(){return this.$fluid}}},k$=function(e){var t=e.dt;return`
1137
1137
  .p-checkbox {
1138
1138
  position: relative;
@@ -2218,7 +2218,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2218
2218
  .pi {
2219
2219
  font-family: 'primeicons';
2220
2220
  }
2221
- `;if(!document.head.querySelector('style[primeicons-css="injected"]')){const e=document.createElement("style");e.setAttribute("primeicons-css","injected"),e.textContent=Sde,document.head.appendChild(e)}const fS=[{name:"jsonschema",url:"https://cdn.jsdelivr.net/npm/jsonschema@1.5.0/+esm",set:e=>hX(e)},{name:"JSZip",url:"https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm",set:e=>gX(e)},{name:"Math.js",url:"https://cdn.jsdelivr.net/npm/mathjs@15.2.0/+esm",set:e=>vX(e)},{name:"Plotly.js",url:"https://cdn.jsdelivr.net/npm/plotly.js-gl2d-dist-min@3.6.0/+esm",set:e=>bX(e)}],Gi=ue.ref(0),kde=(Oe?0:2)+fS.reduce((e,t)=>e+(t.url?1:0)+(t.cssUrl?1:0),0)+1,Nde=async()=>{if(window.locApi)l$(window.locApi);else{const e="0.20260604.0";try{const t=(await import(Js(`https://opencor.ws/libopencor/downloads/wasm/${e}/libopencor.js`))).default;++Gi.value,u$(await t({locateFile:r=>r.endsWith(".wasm")?Js(`https://opencor.ws/libopencor/downloads/wasm/${e}/libopencor.wasm`):r})),++Gi.value}catch(t){throw console.error("OpenCOR: failed to load libOpenCOR:",Bt(t)),t}}},pS=new Set,Ede=(e,t,r,n)=>async()=>{try{const i=await import(t);if(r(i.default??i),++Gi.value,n){if(!pS.has(n)){const o=await fetch(n,{mode:"cors"});if(!o.ok)throw new Error(`Failed to load ${e??"stylesheet"}: ${o.statusText}`);const s=document.createElement("style");s.textContent=await o.text(),document.head.appendChild(s),pS.add(n)}++Gi.value}}catch(i){throw console.error(`OpenCOR: failed to import ${e??t}:`,Bt(i)),i}},lm=e=>{cl.value.length||cl.value.push({type:_e.INFORMATION,description:"An error occurred while initialising OpenCOR. Please check your setup and reload the page."}),cl.value.splice(Math.max(0,cl.value.length-1),0,{type:_e.ERROR,description:er(Bt(e))}),mS.value=!0};Nde().catch(e=>{lm(e)});for(const e of fS)Ede(e.name,e.url,e.set,e.cssUrl)().catch(t=>{lm(t)});yX.then(()=>{++Gi.value}).catch(e=>{lm(e)});const Bde=ue.computed(()=>hS.value>=100),mS=ue.ref(!1),cl=ue.ref([]),hS=ue.computed(()=>Math.round(100*Gi.value/kde)),gS=(e,t)=>{if(e instanceof Uint8Array||e instanceof File)return{res:!1};const r=`data:${t};base64,`;if(!(e.startsWith(`#${r}`)||e.startsWith(r)))return{res:!1};let n;try{n=atob(e.slice(r.length+(e.startsWith("#")?1:0)))}catch(o){return{res:!0,error:`The data URL contains invalid Base64 encoding (${er(Bt(o),!1)}).`}}const i=Uint8Array.from(n,o=>o.charCodeAt(0));return i.length<4||i[0]!==80||i[1]!==75||i[2]!==3||i[3]!==4?{res:!0,error:`The data URL of MIME type ${t} does not contain a ZIP file.`}:{res:!0,data:i}},Dde=async e=>{const t="application/x.vnd.zip-cellml+zip",r=gS(e,t);if(r.res){if(!r.data)return r;try{const n=await new jp().loadAsync(r.data),i=Object.keys(n.files);if(i.length!==1)return{res:!0,error:`The data URL of MIME type ${t} does not contain exactly one (CellML) file.`};const o=i[0],s=n.files[o];return!s||s.dir?{res:!0,error:`The data URL of MIME type ${t} does not contain a valid file.`}:{res:!0,fileName:o,data:await s.async("uint8array")}}catch(n){return{res:!0,error:`The data URL of MIME type ${t} contains an invalid ZIP file (${er(Bt(n),!1)}).`}}}return{res:!1}},Mde=e=>{const t=gS(e,"application/zip");return t.res?t.data?{res:!0,data:t.data}:t:{res:!1}},dl=(e,t,r)=>t||(r?`${SX}${r}`:e instanceof File?Oe?Oe.filePath(e):e.name:typeof e=="string"?e:R3(e)),Ade=(e,t,r)=>typeof e=="string"?Ac(e)?new Promise((n,i)=>{fetch(Js(e)).then(o=>{if(o.ok)return o.arrayBuffer();throw new Error(`Failed to fetch the file through OpenCOR's CORS proxy. The server responded with a status of ${o.status}.`)}).catch(o=>{if(!(o instanceof TypeError))throw new Error(Bt(o));return fetch(e).then(s=>{if(s.ok)return s.arrayBuffer();throw new Error(`Failed to fetch the file directly. The server responded with a status of ${s.status}.`)})}).then(o=>{const s=new Uint8Array(o);n(new qi(dl(e,t,r),s))}).catch(o=>{i(new Error(Bt(o)))})}):new Promise((n,i)=>{Oe?n(new qi(dl(e,t,r))):i(new Error("Local files cannot be opened."))}):e instanceof Uint8Array?new Promise(n=>{n(new qi(dl(e,t,r),e))}):new Promise((n,i)=>{e.arrayBuffer().then(o=>{const s=new Uint8Array(o);n(new qi(dl(e,t,r),s))}).catch(o=>{i(new Error(Bt(o)))})});var um=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.VOI=1]="VOI",e[e.STATE=2]="STATE",e[e.RATE=3]="RATE",e[e.CONSTANT=4]="CONSTANT",e[e.COMPUTED_CONSTANT=5]="COMPUTED_CONSTANT",e[e.ALGEBRAIC=6]="ALGEBRAIC",e))(um||{});const Qc=(e,t)=>{if(!t)return{type:0,index:-1};if(t===e.voiName())return{type:1,index:-1};for(let r=0;r<e.stateCount();r++)if(t===e.stateName(r))return{type:2,index:r};for(let r=0;r<e.rateCount();r++)if(t===e.rateName(r))return{type:3,index:r};for(let r=0;r<e.constantCount();r++)if(t===e.constantName(r))return{type:4,index:r};for(let r=0;r<e.computedConstantCount();r++)if(t===e.computedConstantName(r))return{type:5,index:r};for(let r=0;r<e.algebraicVariableCount();r++)if(t===e.algebraicVariableName(r))return{type:6,index:r};return{type:0,index:-1}},qc=(e,t)=>{switch(t.type){case 1:return{data:e.voi(),unit:e.voiUnit()};case 2:return{data:e.state(t.index),unit:e.stateUnit(t.index)};case 3:return{data:e.rate(t.index),unit:e.rateUnit(t.index)};case 4:return{data:e.constant(t.index),unit:e.constantUnit(t.index)};case 5:return{data:e.computedConstant(t.index),unit:e.computedConstantUnit(t.index)};case 6:return{data:e.algebraicVariable(t.index),unit:e.algebraicVariableUnit(t.index)};default:return{...V3}}};function Tde(e,t){return a.getCurrentScope()?(a.onScopeDispose(e,t),!0):!1}function vS(e){let t=!1,r;const n=a.effectScope(!0);return(...i)=>(t||(r=n.run(()=>e(...i)),t=!0),r)}const Ide=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fde=Object.prototype.toString,Ode=e=>Fde.call(e)==="[object Object]";function cm(e){return Array.isArray(e)?e:[e]}function Rde(e,t,r){return a.watch(e,t,{...r,immediate:!0})}const Wc=Ide?window:void 0;function dm(e){var t;const r=a.toValue(e);return(t=r==null?void 0:r.$el)!==null&&t!==void 0?t:r}function fm(...e){const t=(n,i,o,s)=>(n.addEventListener(i,o,s),()=>n.removeEventListener(i,o,s)),r=a.computed(()=>{const n=cm(a.toValue(e[0])).filter(i=>i!=null);return n.every(i=>typeof i!="string")?n:void 0});return Rde(()=>{var n,i;return[(n=(i=r.value)===null||i===void 0?void 0:i.map(o=>dm(o)))!==null&&n!==void 0?n:[Wc].filter(o=>o!=null),cm(a.toValue(r.value?e[1]:e[0])),cm(a.unref(r.value?e[2]:e[1])),a.toValue(r.value?e[3]:e[2])]},([n,i,o,s],u,c)=>{if(!(n!=null&&n.length)||!(i!=null&&i.length)||!(o!=null&&o.length))return;const l=Ode(s)?{...s}:s,d=n.flatMap(f=>i.flatMap(p=>o.map(m=>t(f,p,m,l))));c(()=>{d.forEach(f=>f())})},{flush:"post"})}function Pde(){const e=a.shallowRef(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function Lde(e){const t=Pde();return a.computed(()=>(t.value,!!e()))}function Vde(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function pm(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:i=Wc,eventName:o="keydown",passive:s=!1,dedupe:u=!1}=n,c=Vde(t);return fm(i,o,l=>{l.repeat&&a.toValue(u)||c(l)&&r(l)},s)}function bS(e,t,r={}){const{window:n=Wc,...i}=r;let o;const s=Lde(()=>n&&"ResizeObserver"in n),u=()=>{o&&(o.disconnect(),o=void 0)},c=a.watch(a.computed(()=>{const d=a.toValue(e);return Array.isArray(d)?d.map(f=>dm(f)):[dm(d)]}),d=>{if(u(),s.value&&n){o=new ResizeObserver(t);for(const f of d)f&&o.observe(f,i)}},{immediate:!0,flush:"post"}),l=()=>{u(),c()};return Tde(l),{isSupported:s,stop:l}}function zde(e={}){const{window:t=Wc}=e;if(!t)return a.shallowRef(!1);const r=a.shallowRef(t.document.hasFocus()),n={passive:!0};return fm(t,"blur",()=>{r.value=!1},n),fm(t,"focus",()=>{r.value=!0},n),r}const _de=vS(()=>ue.ref(null)),yS=vS(()=>{const e=window.matchMedia("(prefers-color-scheme: light)"),t=ue.ref(e.matches),r=ue.ref(!e.matches),n=ue.ref("system"),i=s=>{t.value=s.matches,r.value=!s.matches},o=()=>{document.documentElement.classList.toggle("opencor-dark-mode",r.value)};return e.addEventListener("change",s=>{n.value==="system"&&(i(s),o())}),{theme:()=>n.value,setTheme:s=>{n.value=s??"system",n.value==="light"?(t.value=!0,r.value=!1):n.value==="dark"?(t.value=!1,r.value=!0):i(e),o()},useLightMode:()=>t.value,useDarkMode:()=>r.value}}),Ude=(e,t,r)=>{const n=()=>{const o=e.offsetHeight;t.style.setProperty(r,`${o}px`)};n();const{stop:i}=bS(e,()=>{n()},{box:"border-box"});return i},fl=()=>{const e=ue.shallowRef(void 0),t="opencor-overlay-container";return ue.onMounted(()=>{var i,o;const r=(o=(i=ue.getCurrentInstance())==null?void 0:i.vnode)==null?void 0:o.el,n=r instanceof Element?r.closest(".opencor"):document.querySelector(".opencor");if(n){let s=n.querySelector(`.${t}`);if(!s){s=document.createElement("div"),s.className=t,s.style.cssText="position: fixed; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 99999;",s.appendChild(Object.assign(document.createElement("style"),{textContent:`.${t} > * { pointer-events: auto; }`}));const u=s,c=()=>{u.style.top=`-${window.scrollY}px`,u.style.left=`-${window.scrollX}px`};c(),window.addEventListener("scroll",c,{passive:!0}),n.appendChild(s)}e.value=s}}),e};var Cde=function(e){var t=e.dt;return`
2221
+ `;if(!document.head.querySelector('style[primeicons-css="injected"]')){const e=document.createElement("style");e.setAttribute("primeicons-css","injected"),e.textContent=Sde,document.head.appendChild(e)}const fS=[{name:"jsonschema",url:"https://cdn.jsdelivr.net/npm/jsonschema@1.5.0/+esm",set:e=>hX(e)},{name:"JSZip",url:"https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm",set:e=>gX(e)},{name:"Math.js",url:"https://cdn.jsdelivr.net/npm/mathjs@15.2.0/+esm",set:e=>vX(e)},{name:"Plotly.js",url:"https://cdn.jsdelivr.net/npm/plotly.js-gl2d-dist-min@3.6.0/+esm",set:e=>bX(e)}],Gi=ue.ref(0),kde=(Oe?0:2)+fS.reduce((e,t)=>e+(t.url?1:0)+(t.cssUrl?1:0),0)+1,Nde=async()=>{if(window.locApi)l$(window.locApi);else{const e="0.20260604.0";try{const t=(await import(Js(`https://opencor.ws/libopencor/downloads/wasm/${e}/libopencor.js`))).default;++Gi.value,u$(await t({locateFile:r=>r.endsWith(".wasm")?Js(`https://opencor.ws/libopencor/downloads/wasm/${e}/libopencor.wasm`):r})),++Gi.value}catch(t){throw console.error("OpenCOR: failed to load libOpenCOR:",Bt(t)),t}}},pS=new Set,Ede=(e,t,r,n)=>async()=>{try{const i=await import(t);if(r(i.default??i),++Gi.value,n){if(!pS.has(n)){const o=await fetch(n,{mode:"cors"});if(!o.ok)throw new Error(`Failed to load ${e??"stylesheet"}: ${o.statusText}`);const s=document.createElement("style");s.textContent=await o.text(),document.head.appendChild(s),pS.add(n)}++Gi.value}}catch(i){throw console.error(`OpenCOR: failed to import ${e??t}:`,Bt(i)),i}},lm=e=>{cl.value.length||cl.value.push({type:_e.INFORMATION,description:"An error occurred while initialising OpenCOR. Please check your setup and reload the page."}),cl.value.splice(Math.max(0,cl.value.length-1),0,{type:_e.ERROR,description:er(Bt(e))}),mS.value=!0};Nde().catch(e=>{lm(e)});for(const e of fS)Ede(e.name,e.url,e.set,e.cssUrl)().catch(t=>{lm(t)});yX.then(()=>{++Gi.value}).catch(e=>{lm(e)});const Bde=ue.computed(()=>hS.value>=100),mS=ue.ref(!1),cl=ue.ref([]),hS=ue.computed(()=>Math.round(100*Gi.value/kde)),gS=(e,t)=>{if(e instanceof Uint8Array||e instanceof File)return{res:!1};const r=`data:${t};base64,`;if(!(e.startsWith(`#${r}`)||e.startsWith(r)))return{res:!1};let n;try{n=atob(e.slice(r.length+(e.startsWith("#")?1:0)))}catch(o){return{res:!0,error:`The data URL contains invalid Base64 encoding (${er(Bt(o),!1)}).`}}const i=Uint8Array.from(n,o=>o.charCodeAt(0));return i.length<4||i[0]!==80||i[1]!==75||i[2]!==3||i[3]!==4?{res:!0,error:`The data URL of MIME type ${t} does not contain a ZIP file.`}:{res:!0,data:i}},Dde=async e=>{const t="application/x.vnd.zip-cellml+zip",r=gS(e,t);if(r.res){if(!r.data)return r;try{const n=await new jp().loadAsync(r.data),i=Object.keys(n.files);if(i.length!==1)return{res:!0,error:`The data URL of MIME type ${t} does not contain exactly one (CellML) file.`};const o=i[0],s=n.files[o];return!s||s.dir?{res:!0,error:`The data URL of MIME type ${t} does not contain a valid file.`}:{res:!0,fileName:o,data:await s.async("uint8array")}}catch(n){return{res:!0,error:`The data URL of MIME type ${t} contains an invalid ZIP file (${er(Bt(n),!1)}).`}}}return{res:!1}},Mde=e=>{const t=gS(e,"application/zip");return t.res?t.data?{res:!0,data:t.data}:t:{res:!1}},dl=(e,t,r)=>t||(r?`${SX}${r}`:e instanceof File?Oe?Oe.filePath(e):e.name:typeof e=="string"?e:R3(e)),Ade=(e,t,r)=>typeof e=="string"?Ac(e)?new Promise((n,i)=>{fetch(Js(e)).then(o=>{if(o.ok)return o.arrayBuffer();throw new Error(`Failed to fetch the file through OpenCOR's CORS proxy. The server responded with a status of ${o.status}.`)}).catch(o=>{if(!(o instanceof TypeError))throw new Error(Bt(o));return fetch(e).then(s=>{if(s.ok)return s.arrayBuffer();throw new Error(`Failed to fetch the file directly. The server responded with a status of ${s.status}.`)})}).then(o=>{const s=new Uint8Array(o);n(new qi(dl(e,t,r),s))}).catch(o=>{i(new Error(Bt(o)))})}):new Promise((n,i)=>{Oe?n(new qi(dl(e,t,r))):i(new Error("Local files cannot be opened."))}):e instanceof Uint8Array?new Promise(n=>{n(new qi(dl(e,t,r),e))}):new Promise((n,i)=>{e.arrayBuffer().then(o=>{const s=new Uint8Array(o);n(new qi(dl(e,t,r),s))}).catch(o=>{i(new Error(Bt(o)))})});var um=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.VOI=1]="VOI",e[e.STATE=2]="STATE",e[e.RATE=3]="RATE",e[e.CONSTANT=4]="CONSTANT",e[e.COMPUTED_CONSTANT=5]="COMPUTED_CONSTANT",e[e.ALGEBRAIC=6]="ALGEBRAIC",e))(um||{});const Qc=(e,t)=>{if(!t)return{type:0,index:-1};if(t===e.voiName())return{type:1,index:-1};for(let r=0;r<e.stateCount();r++)if(t===e.stateName(r))return{type:2,index:r};for(let r=0;r<e.rateCount();r++)if(t===e.rateName(r))return{type:3,index:r};for(let r=0;r<e.constantCount();r++)if(t===e.constantName(r))return{type:4,index:r};for(let r=0;r<e.computedConstantCount();r++)if(t===e.computedConstantName(r))return{type:5,index:r};for(let r=0;r<e.algebraicVariableCount();r++)if(t===e.algebraicVariableName(r))return{type:6,index:r};return{type:0,index:-1}},qc=(e,t)=>{switch(t.type){case 1:return{data:e.voi(),unit:e.voiUnit()};case 2:return{data:e.state(t.index),unit:e.stateUnit(t.index)};case 3:return{data:e.rate(t.index),unit:e.rateUnit(t.index)};case 4:return{data:e.constant(t.index),unit:e.constantUnit(t.index)};case 5:return{data:e.computedConstant(t.index),unit:e.computedConstantUnit(t.index)};case 6:return{data:e.algebraicVariable(t.index),unit:e.algebraicVariableUnit(t.index)};default:return{...V3}}};function Tde(e,t){return a.getCurrentScope()?(a.onScopeDispose(e,t),!0):!1}function vS(e){let t=!1,r;const n=a.effectScope(!0);return(...i)=>(t||(r=n.run(()=>e(...i)),t=!0),r)}const Ide=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fde=Object.prototype.toString,Ode=e=>Fde.call(e)==="[object Object]";function cm(e){return Array.isArray(e)?e:[e]}function Rde(e,t,r){return a.watch(e,t,{...r,immediate:!0})}const Wc=Ide?window:void 0;function dm(e){var t;const r=a.toValue(e);return(t=r==null?void 0:r.$el)!==null&&t!==void 0?t:r}function fm(...e){const t=(n,i,o,s)=>(n.addEventListener(i,o,s),()=>n.removeEventListener(i,o,s)),r=a.computed(()=>{const n=cm(a.toValue(e[0])).filter(i=>i!=null);return n.every(i=>typeof i!="string")?n:void 0});return Rde(()=>{var n,i;return[(n=(i=r.value)===null||i===void 0?void 0:i.map(o=>dm(o)))!==null&&n!==void 0?n:[Wc].filter(o=>o!=null),cm(a.toValue(r.value?e[1]:e[0])),cm(a.unref(r.value?e[2]:e[1])),a.toValue(r.value?e[3]:e[2])]},([n,i,o,s],u,c)=>{if(!(n!=null&&n.length)||!(i!=null&&i.length)||!(o!=null&&o.length))return;const l=Ode(s)?{...s}:s,d=n.flatMap(f=>i.flatMap(p=>o.map(m=>t(f,p,m,l))));c(()=>{d.forEach(f=>f())})},{flush:"post"})}function Pde(){const e=a.shallowRef(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function Lde(e){const t=Pde();return a.computed(()=>(t.value,!!e()))}function Vde(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function pm(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:i=Wc,eventName:o="keydown",passive:s=!1,dedupe:u=!1}=n,c=Vde(t);return fm(i,o,l=>{l.repeat&&a.toValue(u)||c(l)&&r(l)},s)}function bS(e,t,r={}){const{window:n=Wc,...i}=r;let o;const s=Lde(()=>n&&"ResizeObserver"in n),u=()=>{o&&(o.disconnect(),o=void 0)},c=a.watch(a.computed(()=>{const d=a.toValue(e);return Array.isArray(d)?d.map(f=>dm(f)):[dm(d)]}),d=>{if(u(),s.value&&n){o=new ResizeObserver(t);for(const f of d)f&&o.observe(f,i)}},{immediate:!0,flush:"post"}),l=()=>{u(),c()};return Tde(l),{isSupported:s,stop:l}}function zde(e={}){const{window:t=Wc}=e;if(!t)return a.shallowRef(!1);const r=a.shallowRef(t.document.hasFocus()),n={passive:!0};return fm(t,"blur",()=>{r.value=!1},n),fm(t,"focus",()=>{r.value=!0},n),r}const _de=vS(()=>ue.ref(null)),yS=vS(()=>{const e=window.matchMedia("(prefers-color-scheme: light)"),t=ue.ref(e.matches),r=ue.ref(!e.matches),n=ue.ref("system"),i=s=>{t.value=s.matches,r.value=!s.matches},o=()=>{document.documentElement.classList.toggle("opencor-dark-mode",r.value)};return e.addEventListener("change",s=>{n.value==="system"&&(i(s),o())}),{theme:()=>n.value,setTheme:s=>{n.value=s??"system",n.value==="light"?(t.value=!0,r.value=!1):n.value==="dark"?(t.value=!1,r.value=!0):i(e),o()},useLightMode:()=>t.value,useDarkMode:()=>r.value}}),Ude=(e,t,r)=>{const n=()=>{const o=e.offsetHeight;t.style.setProperty(r,`${o}px`)};n();const{stop:i}=bS(e,()=>{n()},{box:"border-box"});return i},fl=()=>{const e=ue.shallowRef(void 0),t="opencor-overlay-container",r=i=>{var c;const o=(c=i==null?void 0:i.vnode)==null?void 0:c.el,s=o instanceof Element?o.closest(".opencor"):document.querySelector(".opencor");if(!s)return;let u=s.querySelector(`.${t}`);if(!u){u=document.createElement("div"),u.className=t,u.style.cssText="position: fixed; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 99999;",u.appendChild(Object.assign(document.createElement("style"),{textContent:`.${t} > * { pointer-events: auto; }`})),s.appendChild(u);const l=u,d=()=>{const f=l.getBoundingClientRect(),p=parseFloat(l.style.top)||0,m=parseFloat(l.style.left)||0,h=p-f.top-window.scrollY,g=m-f.left-window.scrollX;(Math.abs(h-p)>=.5||Math.abs(g-m)>=.5)&&(l.style.top=`${h}px`,l.style.left=`${g}px`)};d(),window.addEventListener("scroll",d,{passive:!0})}return u},n=i=>{const o=document.fullscreenElement;return o&&!o.contains(document.body)?r(i)??document.body:document.body};return ue.onMounted(()=>{const i=ue.getCurrentInstance();e.value=n(i),document.addEventListener("fullscreenchange",()=>{e.value=n(i)})}),e};var Cde=function(e){var t=e.dt;return`
2222
2222
  .p-tabs {
2223
2223
  display: flex;
2224
2224
  flex-direction: column;
@@ -2619,7 +2619,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2619
2619
  width: `).concat(this.breakpoints[r],` !important;
2620
2620
  }
2621
2621
  }
2622
- `);this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},onOverlayClick:function(e){Bn.emit("overlay-click",{originalEvent:e,target:this.target})}},directives:{focustrap:Cp,ripple:Dr},components:{Portal:La}},Zfe=["aria-modal"];function Gfe(e,t,r,n,i,o){var s=a.resolveComponent("Portal"),u=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,{appendTo:e.appendTo},{default:a.withCtx(function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-popover",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm("transition")),{default:a.withCtx(function(){return[i.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,role:"dialog","aria-modal":i.visible,onClick:t[3]||(t[3]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),class:e.cx("root")},e.ptmi("root")),[e.$slots.container?a.renderSlot(e.$slots,"container",{key:0,closeCallback:o.hide,keydownCallback:function(c){return o.onButtonKeydown(c)}}):(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:e.cx("content"),onClick:t[0]||(t[0]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onMousedown:t[1]||(t[1]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onKeydown:t[2]||(t[2]=function(){return o.onContentKeydown&&o.onContentKeydown.apply(o,arguments)})},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16))],16,Zfe)),[[u]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])}Ji.render=Gfe;const Kfe=["innerHTML"],Jfe=a.defineComponent({__name:"TooltipWidget",props:{content:{}},setup(e){const t=e,r=ue.ref(),n=ue.ref(),i=fl(),o=u=>{var c;t.content&&((c=n.value)==null||c.show(u,r.value))},s=()=>{var u;(u=n.value)==null||u.hide()};return(u,c)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapperRef",ref:r,onMouseenter:o,onMouseleave:s},[a.renderSlot(u.$slots,"default",{},void 0,!0),a.createVNode(a.unref(Ji),{ref_key:"popoverRef",ref:n,class:"tooltip",appendTo:a.unref(i),closeOnEscape:!1},{default:a.withCtx(()=>[a.createElementVNode("div",{class:"tooltip",innerHTML:u.content},null,8,Kfe)]),_:1},8,["appendTo"])],544))}}),IS=Qn(Jfe,[["__scopeId","data-v-f2cdf017"]]);var FS={name:"BlankIcon",extends:Pt};function Yfe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("rect",{width:"1",height:"1",fill:"currentColor","fill-opacity":"0"},null,-1)]),16)}FS.render=Yfe;var Kc={name:"ChevronDownIcon",extends:Pt};function Xfe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1)]),16)}Kc.render=Xfe;var OS={name:"SearchIcon",extends:Pt};function $fe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z",fill:"currentColor"},null,-1)]),16)}OS.render=$fe;var epe=function(e){var t=e.dt;return`
2622
+ `);this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},onOverlayClick:function(e){Bn.emit("overlay-click",{originalEvent:e,target:this.target})}},directives:{focustrap:Cp,ripple:Dr},components:{Portal:La}},Zfe=["aria-modal"];function Gfe(e,t,r,n,i,o){var s=a.resolveComponent("Portal"),u=a.resolveDirective("focustrap");return a.openBlock(),a.createBlock(s,{appendTo:e.appendTo},{default:a.withCtx(function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-popover",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm("transition")),{default:a.withCtx(function(){return[i.visible?a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,role:"dialog","aria-modal":i.visible,onClick:t[3]||(t[3]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),class:e.cx("root")},e.ptmi("root")),[e.$slots.container?a.renderSlot(e.$slots,"container",{key:0,closeCallback:o.hide,keydownCallback:function(c){return o.onButtonKeydown(c)}}):(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:e.cx("content"),onClick:t[0]||(t[0]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onMousedown:t[1]||(t[1]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onKeydown:t[2]||(t[2]=function(){return o.onContentKeydown&&o.onContentKeydown.apply(o,arguments)})},e.ptm("content")),[a.renderSlot(e.$slots,"default")],16))],16,Zfe)),[[u]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])}Ji.render=Gfe;const Kfe=["innerHTML"],Jfe=a.defineComponent({__name:"TooltipWidget",props:{content:{}},setup(e){const t=e,r=ue.ref(),n=ue.ref(),i=fl(),o=u=>{var c;t.content&&((c=n.value)==null||c.show(u,r.value))},s=()=>{var u;(u=n.value)==null||u.hide()};return(u,c)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapperRef",ref:r,onMouseenter:o,onMouseleave:s},[a.renderSlot(u.$slots,"default",{},void 0,!0),a.createVNode(a.unref(Ji),{ref_key:"popoverRef",ref:n,class:"tooltip",appendTo:a.unref(i),closeOnEscape:!1},{default:a.withCtx(()=>[a.createElementVNode("div",{class:"tooltip-content",innerHTML:u.content},null,8,Kfe)]),_:1},8,["appendTo"])],544))}}),IS=Qn(Jfe,[["__scopeId","data-v-40eb0714"]]);var FS={name:"BlankIcon",extends:Pt};function Yfe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("rect",{width:"1",height:"1",fill:"currentColor","fill-opacity":"0"},null,-1)]),16)}FS.render=Yfe;var Kc={name:"ChevronDownIcon",extends:Pt};function Xfe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1)]),16)}Kc.render=Xfe;var OS={name:"SearchIcon",extends:Pt};function $fe(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z",fill:"currentColor"},null,-1)]),16)}OS.render=$fe;var epe=function(e){var t=e.dt;return`
2623
2623
  .p-iconfield {
2624
2624
  position: relative;
2625
2625
  }
@@ -4483,15 +4483,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4483
4483
  transform: rotate(-90deg);
4484
4484
  }
4485
4485
  `)},u1e={root:function(e){var t=e.instance;return["p-contextmenu p-component",{"p-contextmenu-mobile":t.queryMatches}]},rootList:"p-contextmenu-root-list",item:function(e){var t=e.instance,r=e.processedItem;return["p-contextmenu-item",{"p-contextmenu-item-active":t.isItemActive(r),"p-focus":t.isItemFocused(r),"p-disabled":t.isItemDisabled(r)}]},itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},c1e=$e.extend({name:"contextmenu",theme:l1e,classes:u1e}),d1e={name:"BaseContextMenu",extends:st,props:{model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},global:{type:Boolean,default:!1},breakpoint:{type:String,default:"960px"},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:c1e,provide:function(){return{$pcContextMenu:this,$parentInstance:this}}},X4={name:"ContextMenuSub",hostName:"ContextMenu",extends:st,emits:["item-click","item-mouseenter","item-mousemove"],props:{items:{type:Array,default:null},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},root:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:0}},methods:{getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,t,r){return e&&e.item?fr(e.item[t],r):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getItemLabelId:function(e){return"".concat(this.menuId,"_").concat(e.key,"_label")},getPTOptions:function(e,t,r){return this.ptm(e,{context:{item:t.item,active:this.isItemActive(t),focused:this.isItemFocused(t),disabled:this.isItemDisabled(t),index:r}})},isItemActive:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return Ce(e.items)},onItemClick:function(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemMouseMove:function(e,t){this.$emit("item-mousemove",{originalEvent:e,processedItem:t,isFocus:!0})},getAriaSetSize:function(){var e=this;return this.items.filter(function(t){return e.isItemVisible(t)&&!e.getItemProp(t,"separator")}).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter(function(r){return t.isItemVisible(r)&&t.getItemProp(r,"separator")}).length+1},onEnter:function(){uJ(this.$refs.container,this.level)},getMenuItemProps:function(e,t){return{action:a.mergeProps({class:this.cx("itemLink"),tabindex:-1},this.getPTOptions("itemLink",e,t)),icon:a.mergeProps({class:[this.cx("itemIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("itemIcon",e,t)),label:a.mergeProps({class:this.cx("itemLabel")},this.getPTOptions("itemLabel",e,t)),submenuicon:a.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,t))}}},components:{AngleRightIcon:Yc},directives:{ripple:Dr}},f1e=["tabindex"],p1e=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-active","data-p-focused","data-p-disabled"],m1e=["onClick","onMouseenter","onMousemove"],h1e=["href","target"],g1e=["id"],v1e=["id"];function b1e(e,t,r,n,i,o){var s=a.resolveComponent("AngleRightIcon"),u=a.resolveComponent("ContextMenuSub",!0),c=a.resolveDirective("ripple");return a.openBlock(),a.createBlock(a.Transition,a.mergeProps({name:"p-contextmenusub",onEnter:o.onEnter},e.ptm("menu.transition")),{default:a.withCtx(function(){return[r.root||r.visible?(a.openBlock(),a.createElementBlock("ul",a.mergeProps({key:0,ref:"container",tabindex:r.tabindex},e.ptm("rootList")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.items,function(l,d){return a.openBlock(),a.createElementBlock(a.Fragment,{key:o.getItemKey(l)},[o.isItemVisible(l)&&!o.getItemProp(l,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:0,id:o.getItemId(l),style:o.getItemProp(l,"style"),class:[e.cx("item",{processedItem:l}),o.getItemProp(l,"class")],role:"menuitem","aria-label":o.getItemLabel(l),"aria-disabled":o.isItemDisabled(l)||void 0,"aria-expanded":o.isItemGroup(l)?o.isItemActive(l):void 0,"aria-haspopup":o.isItemGroup(l)&&!o.getItemProp(l,"to")?"menu":void 0,"aria-level":r.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(d),ref_for:!0},o.getPTOptions("item",l,d),{"data-p-active":o.isItemActive(l),"data-p-focused":o.isItemFocused(l),"data-p-disabled":o.isItemDisabled(l)}),[a.createElementVNode("div",a.mergeProps({class:e.cx("itemContent"),onClick:function(f){return o.onItemClick(f,l)},onMouseenter:function(f){return o.onItemMouseEnter(f,l)},onMousemove:function(f){return o.onItemMouseMove(f,l)},ref_for:!0},o.getPTOptions("itemContent",l,d)),[r.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.templates.item),{key:1,item:l.item,hasSubmenu:o.getItemProp(l,"items"),label:o.getItemLabel(l),props:o.getMenuItemProps(l,d)},null,8,["item","hasSubmenu","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:o.getItemProp(l,"url"),class:e.cx("itemLink"),target:o.getItemProp(l,"target"),tabindex:"-1",ref_for:!0},o.getPTOptions("itemLink",l,d)),[r.templates.itemicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.templates.itemicon),{key:0,item:l.item,class:a.normalizeClass(e.cx("itemIcon"))},null,8,["item","class"])):o.getItemProp(l,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:1,class:[e.cx("itemIcon"),o.getItemProp(l,"icon")],ref_for:!0},o.getPTOptions("itemIcon",l,d)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({id:o.getItemLabelId(l),class:e.cx("itemLabel"),ref_for:!0},o.getPTOptions("itemLabel",l,d)),a.toDisplayString(o.getItemLabel(l)),17,g1e),o.getItemProp(l,"items")?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[r.templates.submenuicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.templates.submenuicon),{key:0,active:o.isItemActive(l),class:a.normalizeClass(e.cx("submenuIcon"))},null,8,["active","class"])):(a.openBlock(),a.createBlock(s,a.mergeProps({key:1,class:e.cx("submenuIcon"),ref_for:!0},o.getPTOptions("submenuicon",l,d)),null,16,["class"]))],64)):a.createCommentVNode("",!0)],16,h1e)),[[c]])],16,m1e),o.isItemVisible(l)&&o.isItemGroup(l)?(a.openBlock(),a.createBlock(u,a.mergeProps({key:0,id:o.getItemId(l)+"_list",role:"menu",class:e.cx("submenu"),menuId:r.menuId,focusedItemId:r.focusedItemId,items:l.items,templates:r.templates,activeItemPath:r.activeItemPath,level:r.level+1,visible:o.isItemActive(l)&&o.isItemGroup(l),pt:e.pt,unstyled:e.unstyled,onItemClick:t[0]||(t[0]=function(f){return e.$emit("item-click",f)}),onItemMouseenter:t[1]||(t[1]=function(f){return e.$emit("item-mouseenter",f)}),onItemMousemove:t[2]||(t[2]=function(f){return e.$emit("item-mousemove",f)}),"aria-labelledby":o.getItemLabelId(l),ref_for:!0},e.ptm("submenu")),null,16,["id","class","menuId","focusedItemId","items","templates","activeItemPath","level","visible","pt","unstyled","aria-labelledby"])):a.createCommentVNode("",!0)],16,p1e)):a.createCommentVNode("",!0),o.isItemVisible(l)&&o.getItemProp(l,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:1,id:o.getItemId(l),style:o.getItemProp(l,"style"),class:[e.cx("separator"),o.getItemProp(l,"class")],role:"separator",ref_for:!0},e.ptm("separator")),null,16,v1e)):a.createCommentVNode("",!0)],64)}),128))],16,f1e)):a.createCommentVNode("",!0)]}),_:1},16,["onEnter"])}X4.render=b1e;var $4={name:"ContextMenu",extends:d1e,inheritAttrs:!1,emits:["focus","blur","show","hide","before-show","before-hide"],target:null,outsideClickListener:null,resizeListener:null,documentContextMenuListener:null,matchMediaListener:null,pageX:null,pageY:null,container:null,list:null,data:function(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],visible:!1,submenuVisible:!1,query:null,queryMatches:!1}},watch:{"$attrs.id":function(e){this.id=e||Br()},activeItemPath:function(e){Ce(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):this.visible||(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted:function(){this.id=this.id||Br(),this.bindMatchMediaListener(),this.global&&this.bindDocumentContextMenuListener()},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.unbindDocumentContextMenuListener(),this.unbindMatchMediaListener(),this.container&&this.autoZIndex&&Jt.clear(this.container),this.target=null,this.container=null},methods:{getItemProp:function(e,t){return e?fr(e[t]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemGroup:function(e){return Ce(this.getItemProp(e,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(e){return e&&Ce(e.items)},toggle:function(e){this.visible?this.hide():this.show(e)},show:function(e){this.$emit("before-show"),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},Ct(this.list),this.pageX=e.pageX,this.pageY=e.pageY,this.visible?this.position():this.visible=!0,e.stopPropagation(),e.preventDefault()},hide:function(){this.$emit("before-hide"),this.visible=!1,this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""}},onFocus:function(e){this.focused=!0,this.focusedItemInfo=this.focusedItemInfo.index!==-1?this.focusedItemInfo:{index:-1,level:0,parentKey:""},this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&Ip(e.key)&&this.searchItems(e,e.key);break}},onItemChange:function(e,t){var r=e.processedItem,n=e.isFocus;if(!ur(r)){var i=r.index,o=r.key,s=r.level,u=r.parentKey,c=r.items,l=Ce(c),d=this.activeItemPath.filter(function(f){return f.parentKey!==u&&f.parentKey!==o});l&&(d.push(r),this.submenuVisible=!0),this.focusedItemInfo={index:i,level:s,parentKey:u},n&&Ct(this.list),!(t==="hover"&&this.queryMatches)&&(this.activeItemPath=d)}},onItemClick:function(e){var t=e.processedItem,r=this.isProccessedItemGroup(t),n=this.isSelected(t);if(n){var i=t.index,o=t.key,s=t.level,u=t.parentKey;this.activeItemPath=this.activeItemPath.filter(function(c){return o!==c.key&&o.startsWith(c.key)}),this.focusedItemInfo={index:i,level:s,parentKey:u},Ct(this.list)}else r?this.onItemChange(e):this.hide()},onItemMouseEnter:function(e){this.onItemChange(e,"hover")},onItemMouseMove:function(e){this.focused&&this.changeFocusedItemIndex(e,e.processedItem.index)},onArrowDownKey:function(e){var t=this.focusedItemInfo.index!==-1?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index],r=this.isProccessedItemGroup(t);!r&&this.onItemChange({originalEvent:e,processedItem:t})}this.popup&&this.hide(),e.preventDefault()}else{var n=this.focusedItemInfo.index!==-1?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()}},onArrowLeftKey:function(e){var t=this,r=this.visibleItems[this.focusedItemInfo.index],n=this.activeItemPath.find(function(o){return o.key===r.parentKey}),i=ur(r.parent);i||(this.focusedItemInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),this.activeItemPath=this.activeItemPath.filter(function(o){return o.parentKey!==t.focusedItemInfo.parentKey}),e.preventDefault()},onArrowRightKey:function(e){var t=this.visibleItems[this.focusedItemInfo.index],r=this.isProccessedItemGroup(t);r&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()},onHomeKey:function(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(e){if(this.focusedItemInfo.index!==-1){var t=Or(this.list,'li[id="'.concat("".concat(this.focusedItemIdx),'"]')),r=t&&Or(t,'[data-pc-section="itemlink"]');r?r.click():t&&t.click();var n=this.visibleItems[this.focusedItemInfo.index],i=this.isProccessedItemGroup(n);!i&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(e){this.hide(),!this.popup&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex()),e.preventDefault()},onTabKey:function(e){if(this.focusedItemInfo.index!==-1){var t=this.visibleItems[this.focusedItemInfo.index],r=this.isProccessedItemGroup(t);!r&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},onEnter:function(e){ea(e,{position:"absolute"}),this.position(),this.autoZIndex&&Jt.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu)},onAfterEnter:function(){this.bindOutsideClickListener(),this.bindResizeListener(),this.$emit("show"),Ct(this.list)},onLeave:function(){this.$emit("hide"),this.container=null},onAfterLeave:function(e){this.autoZIndex&&Jt.clear(e),this.unbindOutsideClickListener(),this.unbindResizeListener()},position:function(){var e=this.pageX+1,t=this.pageY+1,r=this.container.offsetParent?this.container.offsetWidth:kp(this.container),n=this.container.offsetParent?this.container.offsetHeight:Sp(this.container),i=Fs(),o=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0,s=window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft||0;e+r-s>i.width&&(e-=r),t+n-o>i.height&&(t-=n),e<s&&(e=s),t<o&&(t=o),this.container.style.left=e+"px",this.container.style.top=t+"px"},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var r=e.container&&!e.container.contains(t.target),n=e.visible?!(e.target&&(e.target===t.target||e.target.contains(t.target))):!0;r&&n&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!Rs()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindDocumentContextMenuListener:function(){var e=this;this.documentContextMenuListener||(this.documentContextMenuListener=function(t){t.button===2&&e.show(t)},document.addEventListener("contextmenu",this.documentContextMenuListener))},unbindDocumentContextMenuListener:function(){this.documentContextMenuListener&&(document.removeEventListener("contextmenu",this.documentContextMenuListener),this.documentContextMenuListener=null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var t=matchMedia("(max-width: ".concat(this.breakpoint,")"));this.query=t,this.queryMatches=t.matches,this.matchMediaListener=function(){e.queryMatches=t.matches},this.query.addEventListener("change",this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)},isItemMatched:function(e){var t;return this.isValidItem(e)&&((t=this.getProccessedItemLabel(e))===null||t===void 0?void 0:t.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()))},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(e){return this.activeItemPath.some(function(t){return t.key===e.key})},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidItem(t)})},findLastItemIndex:function(){var e=this;return zi(this.visibleItems,function(t){return e.isValidItem(t)})},findNextItemIndex:function(e){var t=this,r=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(function(n){return t.isValidItem(n)}):-1;return r>-1?r+e+1:e},findPrevItemIndex:function(e){var t=this,r=e>0?zi(this.visibleItems.slice(0,e),function(n){return t.isValidItem(n)}):-1;return r>-1?r:e},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex(function(t){return e.isValidSelectedItem(t)})},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},searchItems:function(e,t){var r=this;this.searchValue=(this.searchValue||"")+t;var n=-1,i=!1;return this.focusedItemInfo.index!==-1?(n=this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(o){return r.isItemMatched(o)}),n=n===-1?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex(function(o){return r.isItemMatched(o)}):n+this.focusedItemInfo.index):n=this.visibleItems.findIndex(function(o){return r.isItemMatched(o)}),n!==-1&&(i=!0),n===-1&&this.focusedItemInfo.index===-1&&(n=this.findFirstFocusedItemIndex()),n!==-1&&this.changeFocusedItemIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){r.searchValue="",r.searchTimeout=null},500),i},changeFocusedItemIndex:function(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,t=e!==-1?"".concat(this.id,"_").concat(e):this.focusedItemIdx,r=Or(this.list,'li[id="'.concat(t,'"]'));r&&r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",o=[];return e&&e.forEach(function(s,u){var c=(i!==""?i+"_":"")+u,l={item:s,index:u,level:r,key:c,parent:n,parentKey:i};l.items=t.createProcessedItems(s.items,r+1,l,c),o.push(l)}),o},containerRef:function(e){this.container=e},listRef:function(e){this.list=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var e=this,t=this.activeItemPath.find(function(r){return r.key===e.focusedItemInfo.parentKey});return t?t.items:this.processedItems},focusedItemIdx:function(){return this.focusedItemInfo.index!==-1?"".concat(this.id).concat(Ce(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:"","_").concat(this.focusedItemInfo.index):null}},components:{ContextMenuSub:X4,Portal:La}};function y1e(e,t,r,n,i,o){var s=a.resolveComponent("ContextMenuSub"),u=a.resolveComponent("Portal");return a.openBlock(),a.createBlock(u,{appendTo:e.appendTo},{default:a.withCtx(function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-contextmenu",onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},e.ptm("transition")),{default:a.withCtx(function(){return[i.visible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:o.containerRef,class:e.cx("root")},e.ptmi("root")),[a.createVNode(s,{ref:o.listRef,id:i.id+"_list",class:a.normalizeClass(e.cx("rootList")),role:"menubar",root:!0,tabindex:e.tabindex,"aria-orientation":"vertical","aria-activedescendant":i.focused?o.focusedItemIdx:void 0,menuId:i.id,focusedItemId:i.focused?o.focusedItemIdx:void 0,items:o.processedItems,templates:e.$slots,activeItemPath:i.activeItemPath,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,level:0,visible:i.submenuVisible,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter,onItemMousemove:o.onItemMouseMove},null,8,["id","class","tabindex","aria-activedescendant","menuId","focusedItemId","items","templates","activeItemPath","aria-labelledby","aria-label","visible","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter","onItemMousemove"])],16)):a.createCommentVNode("",!0)]}),_:1},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:1},8,["appendTo"])}$4.render=y1e;const w1e={class:"flex flex-row h-full"},x1e={key:0,class:"w-0.75 bg-primary"},jm="graph-panel-context-menu-open",e5=a.defineComponent({__name:"GraphPanelWidget",props:{data:{},showMarker:{type:Boolean,default:!1},margins:{},showLegend:{type:Boolean,default:!0}},emits:["marginsUpdated","resetMargins"],setup(e,{expose:t,emit:r}){const n=(R,W)=>(R==null?void 0:R.left)===W.left&&(R==null?void 0:R.right)===W.right,i=e,o=r,s=()=>{var R,W;S=((R=d.value)==null?void 0:R.clientWidth)||0,w=((W=d.value)==null?void 0:W.clientHeight)||0},u=()=>{v||(v=!0,requestAnimationFrame(()=>{v=!1,c()}))},c=()=>(!d.value||!b||E!==void 0||(E=requestAnimationFrame(()=>{E=void 0,Nn.Plots.resize(d.value).then(()=>{s(),oe()})})),Promise.resolve());t({resize:c});const l=Symbol("GraphPanelWidget"),d=ue.ref(null),f=ue.ref({left:-1,right:-1}),p=yS(),m=ue.ref(null),h=fl(),g=ue.inject("progressMessage");let b=!1,v=!1,S=0,w=0,k,y,x,E;const N=ue.computed(()=>[{icon:"pi pi-search-plus",label:"Zoom In",command:()=>D()},{icon:"pi pi-search-minus",label:"Zoom Out",command:()=>M()},{icon:"pi pi-refresh",label:"Reset Zoom",command:()=>T()},{separator:!0},{icon:"pi pi-copy",label:"Copy to Clipboard",command:()=>O()},{icon:"pi pi-chart-line",label:"Export Plot",items:[{icon:"pi pi-file",label:"Export to JPEG",command:()=>V("jpeg")},{icon:"pi pi-file",label:"Export to PNG",command:()=>V("png")},{icon:"pi pi-file",label:"Export to SVG",command:()=>V("svg")},{icon:"pi pi-file",label:"Export to WebP",command:()=>V("webp")}]},{separator:!0},{label:"Export Data to CSV",icon:"pi pi-download",command:()=>L()}]),B=R=>{var W;R.preventDefault(),window.dispatchEvent(new CustomEvent(jm,{detail:{sourceId:l}})),(W=m.value)==null||W.show(R)},D=()=>{var Se,Fe;if(!d.value)return;const R=d.value.layout;if(!((Se=R==null?void 0:R.xaxis)!=null&&Se.range)||!((Fe=R==null?void 0:R.yaxis)!=null&&Fe.range))return;const W=R.xaxis.range,re=R.yaxis.range,Y=.5*(W[0]+W[1]),de=.5*(re[0]+re[1]),fe=.5*(W[1]-W[0]),be=.5*(re[1]-re[0]);Nn.relayout(d.value,{"xaxis.range":[Y-.5*fe,Y+.5*fe],"yaxis.range":[de-.5*be,de+.5*be]}),o("resetMargins")},M=()=>{var Se,Fe;if(!d.value)return;const R=d.value.layout;if(!((Se=R==null?void 0:R.xaxis)!=null&&Se.range)||!((Fe=R==null?void 0:R.yaxis)!=null&&Fe.range))return;const W=R.xaxis.range,re=R.yaxis.range,Y=.5*(W[0]+W[1]),de=.5*(re[0]+re[1]),fe=.5*(W[1]-W[0]),be=.5*(re[1]-re[0]);Nn.relayout(d.value,{"xaxis.range":[Y-2*fe,Y+2*fe],"yaxis.range":[de-2*be,de+2*be]}),o("resetMargins")},T=()=>{d.value&&(Nn.relayout(d.value,{"xaxis.autorange":!0,"yaxis.autorange":!0}),o("resetMargins"))},O=async()=>{if(d.value)try{const R=await Nn.toImage(d.value,{format:"png",width:d.value.clientWidth,height:d.value.clientHeight}),W=atob(R.split(",")[1]),re=Uint8Array.from(W,Y=>Y.charCodeAt(0));await navigator.clipboard.write([new ClipboardItem({"image/png":new Blob([re],{type:"image/png"})})])}catch(R){console.warn("OpenCOR: failed to copy to clipboard:",Bt(R))}},V=async R=>{if(d.value)try{await Nn.downloadImage(d.value,{format:R,width:d.value.clientWidth,height:d.value.clientHeight,filename:"plot"})}catch(W){console.warn("OpenCOR: failed to export image:",Bt(W))}},L=async()=>{var re;const R=i.data.traces[0];if(!R)return;g&&g.show("Exporting data to CSV...");let W=!0;try{await Tc(Fc);const Y=[],de=[i.data.traces.every(Me=>Me.xValue===R.xValue)?R.xValue:"X"];for(const Me of i.data.traces)de.push(Me.name.replace(/<[^>]*>|,/g,"")||Me.yValue);Y.push(de.join(","));const fe=new Set,be=[];for(const Me of i.data.traces){const H=new Map;for(let X=0;X<Me.x.length;++X){const z=Me.x[X],Z=Me.y[X];z!==void 0&&Z!==void 0&&(fe.add(z),H.set(z,Z))}be.push(H)}const Se=Array.from(fe).sort((Me,H)=>Me-H),Fe=Math.max(1,Math.floor(.01*Se.length)),we=100/Se.length;let Re=0;for(const Me of Se){const H=[String(Me)];for(let X=0;X<i.data.traces.length;++X){const z=(re=be[X])==null?void 0:re.get(Me);H.push(z!==void 0?String(z):"")}Y.push(H.join(",")),++Re,g&&(Re%Fe===0||Re===Se.length)&&(g.update(Math.floor(we*Re)),await Tc(GX))}g&&g.update(100),P3("data.csv",Y.join(`
4486
- `),"text/csv;charset=utf-8;")}catch(Y){W=!1,console.warn("OpenCOR: failed to export to CSV:",Bt(Y))}finally{g&&(W&&await Tc(j3),g.hide())}};let A,P;const C=()=>{const R=p.useLightMode();if(P!==void 0&&A===R)return P;const W=()=>({zerolinecolor:R?"#94a3b8":"#71717a",gridcolor:R?"#e2e8f0":"#3f3f46",minor:{gridcolor:R?"#f1f5f9":"#27272a"}});return A=R,P={paper_bgcolor:R?"#ffffff":"#18181b",plot_bgcolor:R?"#ffffff":"#18181b",font:{color:R?"#334155":"#ffffff"},colorway:Qa,xaxis:W(),yaxis:W()},P};let _,J,te;const K=()=>{const R=i.data.xAxisTitle,W=i.data.yAxisTitle;if(_!==void 0&&J===R&&te===W)return _;J=R,te=W;const re=10;return _={xaxis:{automargin:!0,tickangle:0,tickfont:{size:re},title:{standoff:8,text:R}},yaxis:{automargin:!0,tickangle:0,tickfont:{size:re},title:{standoff:8,text:W}}},_},F=(R,W)=>R!==void 0?R:W===-1?0:W,G=()=>{var Se,Fe,we,Re,Me;const R=d.value;if(!R)return{left:0,right:0};const W=R.querySelectorAll(".ytick text");let re=0;W!=null&&W.length&&W.forEach(H=>{var X;re=Math.max(re,((X=H.getBoundingClientRect())==null?void 0:X.width)||0)});const Y=i.data.yAxisTitle&&((Fe=(Se=R.querySelector(".ytitle"))==null?void 0:Se.getBoundingClientRect())==null?void 0:Fe.width)||0,de=re+Y;let fe=0;i.showLegend&&(fe=((Re=(we=R.querySelector(".legend"))==null?void 0:we.getBoundingClientRect())==null?void 0:Re.width)||0);const be=R.querySelectorAll(".xtick text");if(be!=null&&be.length){const H=be[be.length-1],X=H.style.display;H.style.display="block",fe+=.5*(((Me=H==null?void 0:H.getBoundingClientRect())==null?void 0:Me.width)||0),H.style.display=X}return{left:de?Math.ceil(de+5):0,right:fe?Math.ceil(fe+5):0}},U=()=>{const R=d.value;if(!R)return!1;const{width:W,height:re}=R.getBoundingClientRect();return W>0&&re>0},oe=()=>{x===void 0&&(x=requestAnimationFrame(()=>{if(x=void 0,!U())return;const R=G();n(k,R)||(k=R,o("marginsUpdated",R));const W={};i.margins||(f.value.left!==R.left&&(f.value.left=R.left,W["margin.l"]=f.value.left),f.value.right!==R.right&&(f.value.right=R.right,W["margin.r"]=f.value.right)),Object.keys(W).length&&Nn.relayout(d.value,W)}))},ae=()=>{var be,Se,Fe;b=!1,i.margins||(f.value.left=-1,f.value.right=-1);const R=we=>{if(we.traceId)return`id::${we.traceId}`;if(we.name&&we.xValue&&we.yValue)return`expr::${we.xValue}::${we.yValue}::${we.name}`},W={},re=(be=d.value)==null?void 0:be.data;for(const we of re??[]){const Re=R(we);Re&&we.visible!==void 0&&(W[Re]=we.visible)}const Y=i.data.traces,de=Y.length,fe=new Array(de);for(let we=0;we<de;++we){const Re=Y[we],Me=R(Re);fe[we]={x:Re.x,y:Re.y,name:Re.name,visible:Me?W[Me]:void 0,line:{color:Re.color},legendrank:Re.zorder}}Nn.react(d.value,fe,{...C(),margin:{t:0,l:F((Se=i.margins)==null?void 0:Se.left,f.value.left),b:i.data.xAxisTitle?35:20,r:F((Fe=i.margins)==null?void 0:Fe.right,f.value.right),pad:0},showlegend:i.showLegend,...K()},{responsive:!0,displayModeBar:!1,doubleClickDelay:1e3,scrollZoom:!0,showTips:!1}).then(()=>{b=!0,u()})},Q=R=>{var re,Y;const W=R==null?void 0:R.detail;!W||W.sourceId===l||((Y=(re=m.value)==null?void 0:re.hide)==null||Y.call(re))};return ue.onMounted(()=>{window.addEventListener(jm,Q);const{stop:R}=bS(d,()=>{var Y,de;const W=((Y=d.value)==null?void 0:Y.clientWidth)||0,re=((de=d.value)==null?void 0:de.clientHeight)||0;!b||W<=0||re<=0||W===S&&re===w||(S=W,w=re,u())},{box:"border-box"});y=R,ue.nextTick(()=>{const W=d.value;W.on("plotly_doubleclick",()=>{o("resetMargins")}),W.on("plotly_relayout",(...re)=>{const Y=re[0];Y&&("xaxis.range[0]"in Y||"yaxis.range[0]"in Y)&&o("resetMargins")})})}),ue.onUnmounted(()=>{window.removeEventListener(jm,Q),y==null||y()}),ue.watch(()=>i.data,()=>{ue.nextTick(()=>{ae()})},{immediate:!0}),ue.watch(()=>p.useLightMode(),()=>{ue.nextTick(()=>{b&&d.value&&Nn.relayout(d.value,{...C(),...K()})})},{immediate:!0}),ue.watch(()=>i.margins,()=>{ue.nextTick(()=>{var R,W;if(b&&d.value)return Nn.relayout(d.value,{"margin.l":F((R=i.margins)==null?void 0:R.left,f.value.left),"margin.r":F((W=i.margins)==null?void 0:W.right,f.value.right)})}).then(()=>{i.margins||(k=void 0,oe())})},{immediate:!0}),ue.watch(()=>i.showLegend,()=>{ue.nextTick(()=>{b&&d.value&&Nn.relayout(d.value,{showlegend:i.showLegend}).then(()=>{oe()})})},{immediate:!0}),(R,W)=>(a.openBlock(),a.createElementBlock("div",w1e,[R.showMarker?(a.openBlock(),a.createElementBlock("div",x1e)):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"mainDivRef",ref:d,class:"grow h-full",onContextmenu:B},null,544),a.createVNode(a.unref($4),{ref_key:"contextMenuRef",ref:m,model:a.unref(N),appendTo:a.unref(h)},null,8,["model","appendTo"])]))}}),$i=e=>(a.pushScopeId("data-v-8e9d78f4"),e=e(),a.popScopeId(),e),S1e={class:"h-full"},k1e={key:1,class:"w-full h-full flex flex-col"},N1e={key:1,class:"grow h-full min-h-0"},E1e=$i(()=>a.createElementVNode("br",null,null,-1)),B1e=["innerHTML"],D1e={key:2,class:"grow min-h-0"},M1e={class:"flex h-full"},A1e={key:0,class:"flex flex-col items-center justify-center grow"},T1e=$i(()=>a.createElementVNode("i",{class:"pi pi-info-circle text-[1.5rem]! text-muted-color mb-3"},null,-1)),I1e=$i(()=>a.createElementVNode("p",{class:"text-muted-color text-center"},[a.createTextVNode(" The "),a.createElementVNode("em",null,"Interactive mode"),a.createTextVNode(" needs to be configured."),a.createElementVNode("br"),a.createTextVNode(" Please click on the "),a.createElementVNode("i",{class:"pi pi-cog"}),a.createTextVNode(" icon in the top-right corner. ")],-1)),F1e=[T1e,I1e],O1e={key:2,class:"flex grow min-h-0"},R1e={class:"ml-4 mr-4 mb-4"},P1e={class:"flex flex-col gap-4"},L1e={class:"flex gap-2"},V1e={class:"flex flex-col gap-2"},z1e={class:"flex items-center"},_1e={class:"flex items-center"},U1e={key:1,class:"w-5 h-5"},C1e={key:0,class:"empty-state p-2 text-center rounded-lg"},j1e=$i(()=>a.createElementVNode("i",{class:"pi pi-info-circle empty-state-icon mb-1.5 opacity-50"},null,-1)),Q1e=$i(()=>a.createElementVNode("p",{class:"text-xs"}," No runs are being tracked. ",-1)),q1e=[j1e,Q1e],W1e=$i(()=>a.createElementVNode("br",null,null,-1)),H1e={class:"relative flex flex-col grow h-full min-h-0"},Z1e={class:"flex gap-2"},G1e=["title","onClick"],K1e=a.defineComponent({__name:"SimulationExperimentView",props:{file:{},isActive:{type:Boolean},isActiveFile:{type:Boolean},simulationOnly:{type:Boolean},uiEnabled:{type:Boolean},uiJson:{}},emits:["error","simulationData"],setup(e,{expose:t,emit:r}){const n=e,i=r,o=ue.ref(null),s=(De,se,ie=!1)=>{const ke=ge=>{De.value.push(ge)};ie||ke(se.voiName());for(let ge=0;ge<se.stateCount();ge++)ke(se.stateName(ge));if(!ie)for(let ge=0;ge<se.rateCount();ge++)ke(se.rateName(ge));for(let ge=0;ge<se.constantCount();ge++)ke(se.constantName(ge));if(!ie){for(let ge=0;ge<se.computedConstantCount();ge++)ke(se.computedConstantName(ge));for(let ge=0;ge<se.algebraicVariableCount();ge++)ke(se.algebraicVariableName(ge))}De.value.sort((ge,Ze)=>ge.localeCompare(Ze))},u=()=>new Promise(De=>{requestAnimationFrame(()=>{setTimeout(De,0)})}),c=async()=>{if(!L.value){const De=k.run();k.hasIssues()?k.issues().forEach(se=>{const ie=se.type===_e.ERROR?ed.Red:se.type===_e.WARNING?ed.Orange:ed.Blue,ke=se.type===_e.ERROR?"Error":se.type===_e.WARNING?"Warning":"Info",ge=se.description.replace("Task | ","");D.value+=`<br />&nbsp;&nbsp;<span style="color: ${ie};"><strong>${ke}:</strong> ${ge}</span>`}):D.value+=`<br />&nbsp;&nbsp;<strong>Simulation time:</strong> <span style="color: ${ed.Blue};">${kX(De)}</span>`,ue.nextTick(()=>{const se=o.value;se&&(se.scrollTop=se.scrollHeight)}),await u(),V();return}Ge(!0)},l=()=>{const De=new jp,se=L3(C.path()).replace(/\.[^/.]+$/,""),ie=re.file();if(!ie){i("error","Cannot create COMBINE archive: no model file available.");return}De.file("manifest.xml",`<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
4486
+ `),"text/csv;charset=utf-8;")}catch(Y){W=!1,console.warn("OpenCOR: failed to export to CSV:",Bt(Y))}finally{g&&(W&&await Tc(j3),g.hide())}};let A,P;const C=()=>{const R=p.useLightMode();if(P!==void 0&&A===R)return P;const W=()=>({zerolinecolor:R?"#94a3b8":"#71717a",gridcolor:R?"#e2e8f0":"#3f3f46",minor:{gridcolor:R?"#f1f5f9":"#27272a"}});return A=R,P={paper_bgcolor:R?"#ffffff":"#18181b",plot_bgcolor:R?"#ffffff":"#18181b",font:{color:R?"#334155":"#ffffff"},colorway:Qa,xaxis:W(),yaxis:W()},P};let _,J,te;const K=()=>{const R=i.data.xAxisTitle,W=i.data.yAxisTitle;if(_!==void 0&&J===R&&te===W)return _;J=R,te=W;const re=10;return _={xaxis:{automargin:!0,tickangle:0,tickfont:{size:re},title:{standoff:8,text:R}},yaxis:{automargin:!0,tickangle:0,tickfont:{size:re},title:{standoff:8,text:W}}},_},F=(R,W)=>R!==void 0?R:W===-1?0:W,G=()=>{var Se,Fe,we,Re,Me;const R=d.value;if(!R)return{left:0,right:0};const W=R.querySelectorAll(".ytick text");let re=0;W!=null&&W.length&&W.forEach(H=>{var X;re=Math.max(re,((X=H.getBoundingClientRect())==null?void 0:X.width)||0)});const Y=i.data.yAxisTitle&&((Fe=(Se=R.querySelector(".ytitle"))==null?void 0:Se.getBoundingClientRect())==null?void 0:Fe.width)||0,de=re+Y;let fe=0;i.showLegend&&(fe=((Re=(we=R.querySelector(".legend"))==null?void 0:we.getBoundingClientRect())==null?void 0:Re.width)||0);const be=R.querySelectorAll(".xtick text");if(be!=null&&be.length){const H=be[be.length-1],X=H.style.display;H.style.display="block",fe+=.5*(((Me=H==null?void 0:H.getBoundingClientRect())==null?void 0:Me.width)||0),H.style.display=X}return{left:de?Math.ceil(de+5):0,right:fe?Math.ceil(fe+5):0}},U=()=>{const R=d.value;if(!R)return!1;const{width:W,height:re}=R.getBoundingClientRect();return W>0&&re>0},oe=()=>{x===void 0&&(x=requestAnimationFrame(()=>{if(x=void 0,!U())return;const R=G();n(k,R)||(k=R,o("marginsUpdated",R));const W={};i.margins||(f.value.left!==R.left&&(f.value.left=R.left,W["margin.l"]=f.value.left),f.value.right!==R.right&&(f.value.right=R.right,W["margin.r"]=f.value.right)),Object.keys(W).length&&Nn.relayout(d.value,W)}))},ae=()=>{var be,Se,Fe;b=!1,i.margins||(f.value.left=-1,f.value.right=-1);const R=we=>{if(we.traceId)return`id::${we.traceId}`;if(we.name&&we.xValue&&we.yValue)return`expr::${we.xValue}::${we.yValue}::${we.name}`},W={},re=(be=d.value)==null?void 0:be.data;for(const we of re??[]){const Re=R(we);Re&&we.visible!==void 0&&(W[Re]=we.visible)}const Y=i.data.traces,de=Y.length,fe=new Array(de);for(let we=0;we<de;++we){const Re=Y[we],Me=R(Re);fe[we]={x:Re.x,y:Re.y,name:Re.name,visible:Me?W[Me]:void 0,line:{color:Re.color},legendrank:Re.zorder}}Nn.react(d.value,fe,{...C(),margin:{t:0,l:F((Se=i.margins)==null?void 0:Se.left,f.value.left),b:i.data.xAxisTitle?35:20,r:F((Fe=i.margins)==null?void 0:Fe.right,f.value.right),pad:0},showlegend:i.showLegend,...K()},{responsive:!0,displayModeBar:!1,doubleClickDelay:1e3,scrollZoom:!0,showTips:!1}).then(()=>{b=!0,u()})},Q=R=>{var re,Y;const W=R==null?void 0:R.detail;!W||W.sourceId===l||((Y=(re=m.value)==null?void 0:re.hide)==null||Y.call(re))};return ue.onMounted(()=>{window.addEventListener(jm,Q);const{stop:R}=bS(d,()=>{var Y,de;const W=((Y=d.value)==null?void 0:Y.clientWidth)||0,re=((de=d.value)==null?void 0:de.clientHeight)||0;!b||W<=0||re<=0||W===S&&re===w||(S=W,w=re,u())},{box:"border-box"});y=R,ue.nextTick(()=>{const W=d.value;W.on("plotly_doubleclick",()=>{o("resetMargins")}),W.on("plotly_relayout",(...re)=>{const Y=re[0];Y&&("xaxis.range[0]"in Y||"yaxis.range[0]"in Y)&&o("resetMargins")})})}),ue.onUnmounted(()=>{window.removeEventListener(jm,Q),y==null||y()}),ue.watch(()=>i.data,()=>{ue.nextTick(()=>{ae()})},{immediate:!0}),ue.watch(()=>p.useLightMode(),()=>{ue.nextTick(()=>{b&&d.value&&Nn.relayout(d.value,{...C(),...K()})})},{immediate:!0}),ue.watch(()=>i.margins,()=>{ue.nextTick(()=>{var R,W;if(b&&d.value)return Nn.relayout(d.value,{"margin.l":F((R=i.margins)==null?void 0:R.left,f.value.left),"margin.r":F((W=i.margins)==null?void 0:W.right,f.value.right)})}).then(()=>{i.margins||(k=void 0,oe())})},{immediate:!0}),ue.watch(()=>i.showLegend,()=>{ue.nextTick(()=>{b&&d.value&&Nn.relayout(d.value,{showlegend:i.showLegend}).then(()=>{oe()})})},{immediate:!0}),(R,W)=>(a.openBlock(),a.createElementBlock("div",w1e,[R.showMarker?(a.openBlock(),a.createElementBlock("div",x1e)):a.createCommentVNode("",!0),a.createElementVNode("div",{ref_key:"mainDivRef",ref:d,class:"grow h-full",onContextmenu:B},null,544),a.createVNode(a.unref($4),{ref_key:"contextMenuRef",ref:m,model:a.unref(N),appendTo:a.unref(h)},null,8,["model","appendTo"])]))}}),$i=e=>(a.pushScopeId("data-v-3607ca5a"),e=e(),a.popScopeId(),e),S1e={class:"h-full"},k1e={key:1,class:"w-full h-full flex flex-col"},N1e={key:1,class:"grow h-full min-h-0"},E1e=$i(()=>a.createElementVNode("br",null,null,-1)),B1e=["innerHTML"],D1e={key:2,class:"grow min-h-0"},M1e={class:"flex h-full"},A1e={key:0,class:"flex flex-col items-center justify-center grow"},T1e=$i(()=>a.createElementVNode("i",{class:"pi pi-info-circle text-[1.5rem]! text-muted-color mb-3"},null,-1)),I1e=$i(()=>a.createElementVNode("p",{class:"text-muted-color text-center"},[a.createTextVNode(" The "),a.createElementVNode("em",null,"Interactive mode"),a.createTextVNode(" needs to be configured."),a.createElementVNode("br"),a.createTextVNode(" Please click on the "),a.createElementVNode("i",{class:"pi pi-cog"}),a.createTextVNode(" icon in the top-right corner. ")],-1)),F1e=[T1e,I1e],O1e={key:2,class:"flex grow min-h-0"},R1e={class:"ml-4 mr-4 mb-4"},P1e={class:"flex flex-col gap-4"},L1e={class:"flex gap-2"},V1e={class:"flex flex-col gap-2"},z1e={class:"flex items-center"},_1e={class:"flex items-center"},U1e={key:1,class:"w-5 h-5"},C1e={key:0,class:"empty-state p-2 text-center rounded-lg"},j1e=$i(()=>a.createElementVNode("i",{class:"pi pi-info-circle empty-state-icon mb-1.5 opacity-50"},null,-1)),Q1e=$i(()=>a.createElementVNode("p",{class:"text-xs"}," No runs are being tracked. ",-1)),q1e=[j1e,Q1e],W1e=$i(()=>a.createElementVNode("br",null,null,-1)),H1e={class:"relative flex flex-col grow h-full min-h-0"},Z1e={class:"flex gap-2"},G1e=["title","onClick"],K1e=a.defineComponent({__name:"SimulationExperimentView",props:{file:{},isActive:{type:Boolean},isActiveFile:{type:Boolean},simulationOnly:{type:Boolean},uiEnabled:{type:Boolean},uiJson:{}},emits:["error","simulationData"],setup(e,{expose:t,emit:r}){const n=e,i=r,o=ue.ref(null),s=(De,se,ie=!1)=>{const ke=ge=>{De.value.push(ge)};ie||ke(se.voiName());for(let ge=0;ge<se.stateCount();ge++)ke(se.stateName(ge));if(!ie)for(let ge=0;ge<se.rateCount();ge++)ke(se.rateName(ge));for(let ge=0;ge<se.constantCount();ge++)ke(se.constantName(ge));if(!ie){for(let ge=0;ge<se.computedConstantCount();ge++)ke(se.computedConstantName(ge));for(let ge=0;ge<se.algebraicVariableCount();ge++)ke(se.algebraicVariableName(ge))}De.value.sort((ge,Ze)=>ge.localeCompare(Ze))},u=()=>new Promise(De=>{requestAnimationFrame(()=>{setTimeout(De,0)})}),c=async()=>{if(!L.value){const De=k.run();k.hasIssues()?k.issues().forEach(se=>{const ie=se.type===_e.ERROR?ed.Red:se.type===_e.WARNING?ed.Orange:ed.Blue,ke=se.type===_e.ERROR?"Error":se.type===_e.WARNING?"Warning":"Info",ge=se.description.replace("Task | ","");D.value+=`<br />&nbsp;&nbsp;<span style="color: ${ie};"><strong>${ke}:</strong> ${ge}</span>`}):D.value+=`<br />&nbsp;&nbsp;<strong>Simulation time:</strong> <span style="color: ${ed.Blue};">${kX(De)}</span>`,ue.nextTick(()=>{const se=o.value;se&&(se.scrollTop=se.scrollHeight)}),await u(),V();return}Ge(!0)},l=()=>{const De=new jp,se=L3(C.path()).replace(/\.[^/.]+$/,""),ie=re.file();if(!ie){i("error","Cannot create COMBINE archive: no model file available.");return}De.file("manifest.xml",`<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
4487
4487
  <omexManifest xmlns="http://identifiers.org/combine.specifications/omex-manifest">
4488
4488
  <content location="." format="http://identifiers.org/combine.specifications/omex"/>
4489
4489
  <content location="document.sedml" format="http://identifiers.org/combine.specifications/sed-ml" master="true"/>
4490
4490
  <content location="model.cellml" format="http://identifiers.org/combine.specifications/cellml"/>
4491
4491
  <content location="simulation.json" format="http://purl.org/NET/mediatypes/application/json"/>
4492
4492
  </omexManifest>
4493
- `),De.file("model.cellml",ie.contents()),De.file("document.sedml",_.serialise().replace(ie.path(),"model.cellml")),De.file("simulation.json",JSON.stringify(Q.value,Yp,2)),De.generateAsync({type:"blob",compression:"DEFLATE"}).then(ke=>{P3(`${se}.omex`,ke,"application/zip")}).catch(ke=>{console.warn("OpenCOR: failed to generate COMBINE archive:",Bt(ke))})},d={type:_e.INFORMATION,description:'Please check the <em>Interactive mode</em> settings (click on the <i class="pi pi-cog"></i> icon in the top-right corner) and try again.'},f=()=>{Fe.value=Q.value.input.map(De=>De.defaultValue),we.value=Q.value.input.map(De=>(De.visible??"true")!=="false")},p=ue.ref([]);let m=!1;const h={xAxisTitle:void 0,yAxisTitle:void 0,traces:[]},g={type:um.UNKNOWN,index:-1},b=De=>De.type===um.UNKNOWN&&De.index===-1,v=n.file,S=v.document(),w=S.simulation(0),k=S.instantiate();p.value=k.issues(),m=p.value.length>0;const y=m?null:k.task(0),x=ue.ref([]),E=ue.ref(y?y.voiName():""),N=ue.ref(y?y.stateName(0):""),B=ue.ref(h),D=ue.ref(`<b>${v.path()}</b>`);y&&s(x,y);const M=(De,se,ie)=>De??`${ie} <i>vs.</i> ${se}`,T=ue.computed(()=>y?Qc(y,E.value):g),O=ue.computed(()=>y?Qc(y,N.value):g),V=()=>{if(!y){B.value=h;return}B.value={xAxisTitle:E.value,yAxisTitle:N.value,traces:[{name:M(void 0,E.value,N.value),xValue:E.value,x:qc(y,T.value).data,yValue:N.value,y:qc(y,O.value).data,color:qa}]}},L=ue.ref(!!n.uiJson),A=ue.ref(!0),P=ue.ref(!1),C=n.file,_=C.document(),J=_.simulation(0),te=J.cvode();let K=_.instantiate(),F=m?null:K.task(0);const G=ue.ref([]),U=ue.ref([]),oe=ue.ref(F?F.voiName():""),ae=ue.ref(F?oe.value.split("/")[1]??"":""),Q=ue.ref(n.uiJson?JSON.parse(JSON.stringify(n.uiJson,Yp)):{input:[],output:{data:[{id:ae.value,name:oe.value}],plots:[]},parameters:[]}),R=ue.computed(()=>{var De;if(Q.value.input.length===0&&Q.value.parameters.length===0&&(((De=Q.value.output.externalData)==null?void 0:De.length)??0)===0&&Q.value.output.plots.length===0){if(Q.value.output.data.length===0)return!0;if(Q.value.output.data.length===1){const se=Q.value.output.data[0];return!!(se&&se.id===ae.value&&se.name===oe.value)}}return!1}),W=new s1e,re=_.model(0),Y=ue.ref([]);let de={};const fe=ue.ref(),be=ue.ref(Xp(Q.value,{allModelParameters:G.value,editableModelParameters:U.value})),Se=ue.ref([]),Fe=ue.ref([]),we=ue.ref([]),Re={},Me=ue.ref([{id:"live",inputParameters:{},isVisible:!0,data:[],color:qa,tooltip:"",isLiveRun:!0}]);let H=0;const X=ue.ref(-1),z=ue.ref(),Z=ue.ref({}),q=fl(),ee=ue.computed(()=>{var We,Pe,Te;const De=Y.value,se=Me.value,ie=se.length,ke=[],ge=Qa,Ze=ge.length;for(let le=0;le<De.length;++le){const Ee=[];for(let qe=0;qe<ie;++qe){const at=se[qe];if(!at||!at.isVisible)continue;const kt=ge.indexOf(at.color),wt=kt>=0?kt:0,Be=(We=at.isLiveRun?De[le]:at.data[le])==null?void 0:We.traces;if(!(Be!=null&&Be.length))continue;const Le=ie===1?"":at.isLiveRun?" [Live]":` [#${qe}]`;for(let Xe=0;Xe<Be.length;++Xe){const xt=Be[Xe];xt&&Ee.push({...xt,traceId:`${at.id}::${xt.traceId??`${xt.xValue}::${xt.yValue}::${Xe}`}`,name:xt.name+Le,color:ge[(wt+Xe)%Ze]??qa,zorder:at.isLiveRun?1:void 0})}}ke.push({xAxisTitle:(Pe=De[le])==null?void 0:Pe.xAxisTitle,yAxisTitle:(Te=De[le])==null?void 0:Te.yAxisTitle,traces:Ee})}return ke}),me=ue.computed(()=>{const De=Q.value;return{simulation:{initialPoint:J.initialTime(),startingPoint:J.outputStartTime(),endingPoint:J.outputEndTime(),pointInterval:(J.outputEndTime()-J.outputStartTime())/J.numberOfSteps()},solvers:{cvodeMaximumStep:te.maximumStep()},interactive:{uiJson:De},miscellaneous:{liveUpdates:A.value}}}),ce=ue.computed(()=>{const De=me.value;return De.simulation.startingPoint-De.simulation.initialPoint}),Ne=ue.ref(JSON.stringify(ue.toRaw(me.value))),xe=(De,se)=>{const ie=`${De.replace(/[^A-Za-z0-9_]/g,"_")}_ext`;let ke=ie,ge=0;for(;se.has(ke);)ke=`${ie}_${++ge}`;return se.add(ke),ke},pe=(De,se)=>{let ie=De;const ke=Object.keys(se).sort((ge,Ze)=>Ze.length-ge.length);for(const ge of ke){const Ze=se[ge];let We="",Pe=0;for(;Pe<ie.length;){if(ie.startsWith(ge,Pe)){const Te=Pe===0?"":ie[Pe-1],le=Pe+ge.length>=ie.length?"":ie[Pe+ge.length];if(!/[A-Za-z0-9_]/.test(Te)&&!/[A-Za-z0-9_]/.test(le)){We+=Ze,Pe+=ge.length;continue}}We+=ie[Pe++]}ie=We}return ie},ne=new Set,ye=new Set;t({addExternalData:async(De,se,ie)=>{const ke=()=>({type:"added",csv:De,issues:[]}),ge=Pe=>({type:"issue",csv:De,issues:Pe});if(!n.simulationOnly)return Promise.resolve(ge(["The exposed addExternalData() method is only available in simulation-only mode."]));let Ze="";if(Ac(De))try{const Pe=await fetch(Js(De));if(!Pe.ok)return Promise.resolve(ge([`Could not retrieve the CSV file from ${De} (status: ${Pe.status}).`]));Ze=await Pe.text()}catch(Pe){return Promise.resolve(ge([`Could not retrieve the CSV file from ${De} (${er(Bt(Pe),!1)}).`]))}else Ze=De;if(!Ze)return Promise.resolve(ke());const We=R3(Ze);if(ne.has(We)||ye.has(We))return Promise.resolve(ge(["The external data has already been added."]));ye.add(We);try{let Pe;try{Pe=Bm(Ze)}catch(Be){return Promise.resolve(ge([er(Bt(Be))]))}if(Pe.headers.length-1!==ie.length)return Promise.resolve(ge([`The number of model parameters provided must match the number of data columns in the CSV file (i.e. ${Pe.headers.length-1}, not ${ie.length}).`]));const Te=ie.map(Be=>(Be==null?void 0:Be.trim())??""),le=[];for(let Be=0;Be<Te.length;++Be){const Le=Te[Be];Le?/^\w+\/\w+$/.test(Le)||le.push(`Model parameter #${Be+1} must be of the form '<component>/<variable>'.`):le.push(`Model parameter #${Be+1} must be a non-empty string.`)}if(le.length)return Promise.resolve(ge(le));const Ee=Q.value.output.externalData??[],qe=new Set;for(const Be of Ee)for(const Le of Be.data)Le.id&&qe.add(Le.id);for(const Be of Q.value.output.data)Be.id&&qe.add(Be.id);const at=[],kt=[],wt={};for(let Be=1;Be<Pe.headers.length;++Be){const Le=Pe.headers[Be],Xe=xe(Le,qe);at.push({name:Le,values:new Float64Array(Pe.columns[Be])}),kt.push({id:Xe,name:Le});const xt=Te[Be-1];for(const qt of Q.value.output.data)if(qt.name===xt){wt[qt.id]=Xe;break}}Q.value.output.externalData||(Q.value.output.externalData=[]),Q.value.output.externalData.push({data:kt,dataSeries:at,description:`External data ${We}`,voiExpression:(se==null?void 0:se.trim())||"voi",voiValues:new Float64Array(Pe.columns[0])});for(let Be=0;Be<Q.value.output.plots.length;++Be){const Le=Q.value.output.plots[Be];if(!Le)continue;Le.additionalTraces||(Le.additionalTraces=[]);const Xe=(rr,sr)=>`${rr}::${sr}`,xt=new Set,qt=Je[Be]??Le.additionalTraces.length;xt.add(Xe(Le.xValue,Le.yValue));for(let rr=0;rr<qt;++rr){const sr=Le.additionalTraces[rr];sr&&xt.add(Xe(sr.xValue,sr.yValue))}const pr=[{xValue:Le.xValue,yValue:Le.yValue}];for(let rr=0;rr<qt;++rr){const sr=Le.additionalTraces[rr];sr&&pr.push({xValue:sr.xValue,yValue:sr.yValue})}for(let rr=0;rr<pr.length;++rr){const sr=pr[rr];if(!sr)continue;const Ft=pe(sr.xValue,wt),Pr=pe(sr.yValue,wt);xt.has(Xe(Ft,Pr))||Le.additionalTraces.push({xValue:Ft,yValue:Pr})}}return Ge(),$(),ne.add(We),Promise.resolve(ke())}finally{ye.delete(We)}},simulationData:De=>{const se=Ys(De);if(!n.simulationOnly)return Promise.resolve({type:"issue",simulationData:se,issues:["The exposed simulationData() method is only available in simulation-only mode."]});if(!F)return Promise.resolve({type:"issue",simulationData:se,issues:["No SED-ML instance task available."]});const ie=F,ke=[];for(const ge of De){const Ze=Qc(ie,ge==="VOI"?ie.voiName():ge);if(b(Ze)){ke.push(`No simulation data information was found for model parameter "${ge}".`);continue}try{se[ge]=qc(ie,Ze)}catch(We){ke.push(`Error for model parameter "${ge}": ${Bt(We)}`)}}return ke.length?Promise.resolve({type:"issue",simulationData:se,issues:ke}):Promise.resolve({type:"updated",simulationData:se,issues:[]})}});const Ve=ue.computed(()=>n.simulationOnly&&R.value||!n.simulationOnly);F&&(s(G,F),s(U,F,!0)),f();let Je=[];ue.watch(()=>Q.value,()=>{W.resetCompiledExpressions(),Je=Q.value.output.plots.map(De=>{var se;return((se=De.additionalTraces)==null?void 0:se.length)??0})},{deep:!0,immediate:!0});const He=(De,se)=>{const ie=De.length,ke=new Float64Array(ie),{x:ge,y:Ze}=se,We=Math.min(ge.length,Ze.length);if(We<2)return ke.fill(Number.NaN),ke;let Pe=!0;for(let Le=1;Le<We&&Pe;++Le)Pe=ge[Le]>ge[Le-1];let Te,le,Ee=We;if(Pe)Te=ge,le=Ze;else{const Le=new Array(We);for(let pr=0;pr<We;++pr)Le[pr]=pr;Le.sort((pr,rr)=>ge[pr]-ge[rr]);const Xe=new Float64Array(Le.length),xt=new Float64Array(Le.length);let qt=0;for(let pr=0;pr<Le.length;++pr){const rr=ge[Le[pr]],sr=Ze[Le[pr]];qt===0||rr!==Xe[qt-1]?(Xe[qt]=rr,xt[qt]=sr,++qt):xt[qt-1]=sr}if(qt<2)return ke.fill(Number.NaN),ke;Te=qt===Xe.length?Xe:Xe.slice(0,qt),le=qt===xt.length?xt:xt.slice(0,qt),Ee=qt}const qe=Ee-1,at=new Float64Array(qe);for(let Le=0;Le<qe;++Le){const Xe=Te[Le+1]-Te[Le];at[Le]=Xe>0?(le[Le+1]-le[Le])/Xe:Number.NaN}let kt=!0;for(let Le=1;Le<ie;++Le)if(De[Le]<De[Le-1]){kt=!1;break}const wt=Te[0],Be=Te[Ee-1];if(kt){let Le=0;for(let Xe=0;Xe<ie;++Xe){const xt=De[Xe];if(xt<wt||xt>Be){ke[Xe]=Number.NaN;continue}for(;Le+1<Ee&&Te[Le+1]<xt;)++Le;const qt=at[Le];if(!Number.isFinite(qt)){ke[Xe]=Number.NaN;continue}ke[Xe]=le[Le]+(xt-Te[Le])*qt}}else for(let Le=0;Le<ie;++Le){const Xe=De[Le];if(Xe<wt||Xe>Be){ke[Le]=Number.NaN;continue}let xt=0,qt=Ee-1;for(;xt+1<qt;){const rr=Math.floor(.5*(xt+qt));Te[rr]<=Xe?xt=rr:qt=rr}const pr=at[xt];if(!Number.isFinite(pr)){ke[Le]=Number.NaN;continue}ke[Le]=le[xt]+(Xe-Te[xt])*pr}return ke},Ge=(De=!1)=>{var Ze,We;if(be.value.length||!A.value&&!De)return;const se={};for(let Pe=0;Pe<Q.value.input.length;++Pe){const Te=Q.value.input[Pe];Te&&(se[Te.id]=Fe.value[Pe])}Se.value=[];for(let Pe=0;Pe<Q.value.input.length;++Pe){const Te=Q.value.input[Pe];if(Te)try{we.value[Pe]=!!W.evaluate(Te.visible??"true",se)}catch(le){we.value[Pe]=!1,Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating visibility for input '${Te.name}' (${er(Bt(le),!1)}).`})}}re.removeAllChanges();for(const Pe of Q.value.parameters){const Te=Pe.name.split("/");if(Te[0]&&Te[1])try{re.addChange(Te[0],Te[1],String(W.evaluate(Pe.value,se)))}catch(le){Se.value.push({type:_e.ERROR,description:`An error occurred while applying parameter change for '${Pe.name}' (${er(Bt(le),!1)}).`})}}if(Se.value.length){Se.value.push(d);return}if(K.run(),K.hasIssues()){Se.value=K.issues();return}const ie=(Pe,Te)=>{const le=W.evaluate(Pe,Te);return typeof le=="boolean"?new Float64Array([le?1:0]):typeof le=="number"?new Float64Array([le]):le};if(F){const Pe=F.voi();for(const Te of Q.value.output.externalData??[])try{const le=Te.voiValues,Ee=(Ze=Te.voiExpression)==null?void 0:Ze.trim(),qe=!Ee||Ee==="voi"?le:ie(Ee,{voi:le}),at=new Set;for(const wt of Te.data)at.add(wt.name);const kt=Object.create(null);for(const wt of Te.dataSeries)at.has(wt.name)&&(kt[wt.name]=wt.values);for(const wt of Te.data){const Be=kt[wt.name];Be&&(se[wt.id]=He(Pe,{x:qe,y:Be}))}}catch(le){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the VOI expression '${Te.voiExpression}' (${er(Bt(le),!1)}).`})}}if(Se.value.length){Se.value.push(d);return}if(Object.keys(Re).forEach(Pe=>{delete Re[Pe]}),Q.value.output.data.forEach(Pe=>{Pe.id&&F&&(Re[Pe.id]=Qc(F,Pe.name))}),F)for(const Pe of Q.value.output.data)se[Pe.id]=qc(F,Re[Pe.id]).data;const ke=(Pe,Te)=>{if(Pe.length===Te.length)return{x:Pe,y:Te};if(Pe.length===1&&Te.length>1){const Ee=Pe[0],qe=new Float64Array(Te.length);return qe.fill(Ee),{x:qe,y:Te}}if(Te.length===1&&Pe.length>1){const Ee=Te[0],qe=new Float64Array(Pe.length);return qe.fill(Ee),{x:Pe,y:qe}}const le=Math.min(Pe.length,Te.length);return{x:Pe.slice(0,le),y:Te.slice(0,le)}},ge=[];for(let Pe=0;Pe<Q.value.output.plots.length;++Pe){const Te=Q.value.output.plots[Pe];if(!Te){ge[Pe]={xAxisTitle:"",yAxisTitle:"",traces:[]};continue}let le=new Float64Array(0);try{le=ie(Te.xValue,se)}catch(kt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the X value expression for plot '${Te.name}' (${er(Bt(kt),!1)}).`})}let Ee=new Float64Array(0);try{Ee=ie(Te.yValue,se)}catch(kt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the Y value expression for plot '${Te.name}' (${er(Bt(kt),!1)}).`})}const qe=ke(le,Ee),at=[{traceId:`plot_${Pe}::trace_0`,name:M(Te.name,Te.xValue,Te.yValue),xValue:Te.xValue,x:qe.x,yValue:Te.yValue,y:qe.y,color:qa}];for(let kt=0;kt<(Te.additionalTraces??[]).length;++kt){const wt=(We=Te.additionalTraces)==null?void 0:We[kt];if(!wt)continue;let Be=new Float64Array(0);try{Be=ie(wt.xValue,se)}catch(xt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the X value expression for additional trace #${kt+1} of plot '${Te.name}' (${er(Bt(xt),!1)}).`})}let Le=new Float64Array(0);try{Le=ie(wt.yValue,se)}catch(xt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the Y value expression for additional trace #${kt+1} of plot '${Te.name}' (${er(Bt(xt),!1)}).`})}const Xe=ke(Be,Le);at.push({traceId:`plot_${Pe}::trace_${kt+1}`,name:M(wt.name,wt.xValue,wt.yValue),xValue:wt.xValue,x:Xe.x,yValue:wt.yValue,y:Xe.y,color:qa})}ge[Pe]={xAxisTitle:Te.xAxisTitle,yAxisTitle:Te.yAxisTitle,traces:at}}if(Y.value=ge,Se.value.length){Se.value.push(d);return}i("simulationData")},I=(De,se)=>{de[De]=se;let ie=0,ke=0,ge=0;for(const Ze in de){const We=de[Ze];We&&(++ie,ke=Math.max(ke,We.left),ge=Math.max(ge,We.right))}if(ie!==Q.value.output.plots.length){fe.value=void 0;return}fe.value={left:ke,right:ge}},$=()=>{de={},fe.value=void 0},he=()=>{var Pe;const De={};for(let Te=0;Te<Q.value.input.length;++Te){const le=Q.value.input[Te];if(!le)continue;const Ee=Fe.value[Te];Ee!==void 0&&(De[le.id]=Ee)}const se=[];for(let Te=0;Te<Q.value.input.length;++Te){if(!we.value[Te])continue;const le=Q.value.input[Te];if(!le)continue;let Ee=De[le.id];if(za(le)){const qe=le.possibleValues.find(at=>at.value===De[le.id]);qe!=null&&qe.name?Ee=qe.name.charAt(0).toLowerCase()+qe.name.slice(1):Ee=De[le.id]}se.push(`<tr>
4494
- <td style="vertical-align: top; font-weight: bold;">
4493
+ `),De.file("model.cellml",ie.contents()),De.file("document.sedml",_.serialise().replace(ie.path(),"model.cellml")),De.file("simulation.json",JSON.stringify(Q.value,Yp,2)),De.generateAsync({type:"blob",compression:"DEFLATE"}).then(ke=>{P3(`${se}.omex`,ke,"application/zip")}).catch(ke=>{console.warn("OpenCOR: failed to generate COMBINE archive:",Bt(ke))})},d={type:_e.INFORMATION,description:'Please check the <em>Interactive mode</em> settings (click on the <i class="pi pi-cog"></i> icon in the top-right corner) and try again.'},f=()=>{Fe.value=Q.value.input.map(De=>De.defaultValue),we.value=Q.value.input.map(De=>(De.visible??"true")!=="false")},p=ue.ref([]);let m=!1;const h={xAxisTitle:void 0,yAxisTitle:void 0,traces:[]},g={type:um.UNKNOWN,index:-1},b=De=>De.type===um.UNKNOWN&&De.index===-1,v=n.file,S=v.document(),w=S.simulation(0),k=S.instantiate();p.value=k.issues(),m=p.value.length>0;const y=m?null:k.task(0),x=ue.ref([]),E=ue.ref(y?y.voiName():""),N=ue.ref(y?y.stateName(0):""),B=ue.ref(h),D=ue.ref(`<b>${v.path()}</b>`);y&&s(x,y);const M=(De,se,ie)=>De??`${ie} <i>vs.</i> ${se}`,T=ue.computed(()=>y?Qc(y,E.value):g),O=ue.computed(()=>y?Qc(y,N.value):g),V=()=>{if(!y){B.value=h;return}B.value={xAxisTitle:E.value,yAxisTitle:N.value,traces:[{name:M(void 0,E.value,N.value),xValue:E.value,x:qc(y,T.value).data,yValue:N.value,y:qc(y,O.value).data,color:qa}]}},L=ue.ref(!!n.uiJson),A=ue.ref(!0),P=ue.ref(!1),C=n.file,_=C.document(),J=_.simulation(0),te=J.cvode();let K=_.instantiate(),F=m?null:K.task(0);const G=ue.ref([]),U=ue.ref([]),oe=ue.ref(F?F.voiName():""),ae=ue.ref(F?oe.value.split("/")[1]??"":""),Q=ue.ref(n.uiJson?JSON.parse(JSON.stringify(n.uiJson,Yp)):{input:[],output:{data:[{id:ae.value,name:oe.value}],plots:[]},parameters:[]}),R=ue.computed(()=>{var De;if(Q.value.input.length===0&&Q.value.parameters.length===0&&(((De=Q.value.output.externalData)==null?void 0:De.length)??0)===0&&Q.value.output.plots.length===0){if(Q.value.output.data.length===0)return!0;if(Q.value.output.data.length===1){const se=Q.value.output.data[0];return!!(se&&se.id===ae.value&&se.name===oe.value)}}return!1}),W=new s1e,re=_.model(0),Y=ue.ref([]);let de={};const fe=ue.ref(),be=ue.ref(Xp(Q.value,{allModelParameters:G.value,editableModelParameters:U.value})),Se=ue.ref([]),Fe=ue.ref([]),we=ue.ref([]),Re={},Me=ue.ref([{id:"live",inputParameters:{},isVisible:!0,data:[],color:qa,tooltip:"",isLiveRun:!0}]);let H=0;const X=ue.ref(-1),z=ue.ref(),Z=ue.ref({}),q=fl(),ee=ue.computed(()=>{var We,Pe,Te;const De=Y.value,se=Me.value,ie=se.length,ke=[],ge=Qa,Ze=ge.length;for(let le=0;le<De.length;++le){const Ee=[];for(let qe=0;qe<ie;++qe){const at=se[qe];if(!at||!at.isVisible)continue;const kt=ge.indexOf(at.color),wt=kt>=0?kt:0,Be=(We=at.isLiveRun?De[le]:at.data[le])==null?void 0:We.traces;if(!(Be!=null&&Be.length))continue;const Le=ie===1?"":at.isLiveRun?" [Live]":` [#${qe}]`;for(let Xe=0;Xe<Be.length;++Xe){const xt=Be[Xe];xt&&Ee.push({...xt,traceId:`${at.id}::${xt.traceId??`${xt.xValue}::${xt.yValue}::${Xe}`}`,name:xt.name+Le,color:ge[(wt+Xe)%Ze]??qa,zorder:at.isLiveRun?1:void 0})}}ke.push({xAxisTitle:(Pe=De[le])==null?void 0:Pe.xAxisTitle,yAxisTitle:(Te=De[le])==null?void 0:Te.yAxisTitle,traces:Ee})}return ke}),me=ue.computed(()=>{const De=Q.value;return{simulation:{initialPoint:J.initialTime(),startingPoint:J.outputStartTime(),endingPoint:J.outputEndTime(),pointInterval:(J.outputEndTime()-J.outputStartTime())/J.numberOfSteps()},solvers:{cvodeMaximumStep:te.maximumStep()},interactive:{uiJson:De},miscellaneous:{liveUpdates:A.value}}}),ce=ue.computed(()=>{const De=me.value;return De.simulation.startingPoint-De.simulation.initialPoint}),Ne=ue.ref(JSON.stringify(ue.toRaw(me.value))),xe=(De,se)=>{const ie=`${De.replace(/[^A-Za-z0-9_]/g,"_")}_ext`;let ke=ie,ge=0;for(;se.has(ke);)ke=`${ie}_${++ge}`;return se.add(ke),ke},pe=(De,se)=>{let ie=De;const ke=Object.keys(se).sort((ge,Ze)=>Ze.length-ge.length);for(const ge of ke){const Ze=se[ge];let We="",Pe=0;for(;Pe<ie.length;){if(ie.startsWith(ge,Pe)){const Te=Pe===0?"":ie[Pe-1],le=Pe+ge.length>=ie.length?"":ie[Pe+ge.length];if(!/[A-Za-z0-9_]/.test(Te)&&!/[A-Za-z0-9_]/.test(le)){We+=Ze,Pe+=ge.length;continue}}We+=ie[Pe++]}ie=We}return ie},ne=new Set,ye=new Set;t({addExternalData:async(De,se,ie)=>{const ke=()=>({type:"added",csv:De,issues:[]}),ge=Pe=>({type:"issue",csv:De,issues:Pe});if(!n.simulationOnly)return Promise.resolve(ge(["The exposed addExternalData() method is only available in simulation-only mode."]));let Ze="";if(Ac(De))try{const Pe=await fetch(Js(De));if(!Pe.ok)return Promise.resolve(ge([`Could not retrieve the CSV file from ${De} (status: ${Pe.status}).`]));Ze=await Pe.text()}catch(Pe){return Promise.resolve(ge([`Could not retrieve the CSV file from ${De} (${er(Bt(Pe),!1)}).`]))}else Ze=De;if(!Ze)return Promise.resolve(ke());const We=R3(Ze);if(ne.has(We)||ye.has(We))return Promise.resolve(ge(["The external data has already been added."]));ye.add(We);try{let Pe;try{Pe=Bm(Ze)}catch(Be){return Promise.resolve(ge([er(Bt(Be))]))}if(Pe.headers.length-1!==ie.length)return Promise.resolve(ge([`The number of model parameters provided must match the number of data columns in the CSV file (i.e. ${Pe.headers.length-1}, not ${ie.length}).`]));const Te=ie.map(Be=>(Be==null?void 0:Be.trim())??""),le=[];for(let Be=0;Be<Te.length;++Be){const Le=Te[Be];Le?/^\w+\/\w+$/.test(Le)||le.push(`Model parameter #${Be+1} must be of the form '<component>/<variable>'.`):le.push(`Model parameter #${Be+1} must be a non-empty string.`)}if(le.length)return Promise.resolve(ge(le));const Ee=Q.value.output.externalData??[],qe=new Set;for(const Be of Ee)for(const Le of Be.data)Le.id&&qe.add(Le.id);for(const Be of Q.value.output.data)Be.id&&qe.add(Be.id);const at=[],kt=[],wt={};for(let Be=1;Be<Pe.headers.length;++Be){const Le=Pe.headers[Be],Xe=xe(Le,qe);at.push({name:Le,values:new Float64Array(Pe.columns[Be])}),kt.push({id:Xe,name:Le});const xt=Te[Be-1];for(const qt of Q.value.output.data)if(qt.name===xt){wt[qt.id]=Xe;break}}Q.value.output.externalData||(Q.value.output.externalData=[]),Q.value.output.externalData.push({data:kt,dataSeries:at,description:`External data ${We}`,voiExpression:(se==null?void 0:se.trim())||"voi",voiValues:new Float64Array(Pe.columns[0])});for(let Be=0;Be<Q.value.output.plots.length;++Be){const Le=Q.value.output.plots[Be];if(!Le)continue;Le.additionalTraces||(Le.additionalTraces=[]);const Xe=(rr,sr)=>`${rr}::${sr}`,xt=new Set,qt=Je[Be]??Le.additionalTraces.length;xt.add(Xe(Le.xValue,Le.yValue));for(let rr=0;rr<qt;++rr){const sr=Le.additionalTraces[rr];sr&&xt.add(Xe(sr.xValue,sr.yValue))}const pr=[{xValue:Le.xValue,yValue:Le.yValue}];for(let rr=0;rr<qt;++rr){const sr=Le.additionalTraces[rr];sr&&pr.push({xValue:sr.xValue,yValue:sr.yValue})}for(let rr=0;rr<pr.length;++rr){const sr=pr[rr];if(!sr)continue;const Ft=pe(sr.xValue,wt),Pr=pe(sr.yValue,wt);xt.has(Xe(Ft,Pr))||Le.additionalTraces.push({xValue:Ft,yValue:Pr})}}return Ge(),$(),ne.add(We),Promise.resolve(ke())}finally{ye.delete(We)}},simulationData:De=>{const se=Ys(De);if(!n.simulationOnly)return Promise.resolve({type:"issue",simulationData:se,issues:["The exposed simulationData() method is only available in simulation-only mode."]});if(!F)return Promise.resolve({type:"issue",simulationData:se,issues:["No SED-ML instance task available."]});const ie=F,ke=[];for(const ge of De){const Ze=Qc(ie,ge==="VOI"?ie.voiName():ge);if(b(Ze)){ke.push(`No simulation data information was found for model parameter "${ge}".`);continue}try{se[ge]=qc(ie,Ze)}catch(We){ke.push(`Error for model parameter "${ge}": ${Bt(We)}`)}}return ke.length?Promise.resolve({type:"issue",simulationData:se,issues:ke}):Promise.resolve({type:"updated",simulationData:se,issues:[]})}});const Ve=ue.computed(()=>n.simulationOnly&&R.value||!n.simulationOnly);F&&(s(G,F),s(U,F,!0)),f();let Je=[];ue.watch(()=>Q.value,()=>{W.resetCompiledExpressions(),Je=Q.value.output.plots.map(De=>{var se;return((se=De.additionalTraces)==null?void 0:se.length)??0})},{deep:!0,immediate:!0});const He=(De,se)=>{const ie=De.length,ke=new Float64Array(ie),{x:ge,y:Ze}=se,We=Math.min(ge.length,Ze.length);if(We<2)return ke.fill(Number.NaN),ke;let Pe=!0;for(let Le=1;Le<We&&Pe;++Le)Pe=ge[Le]>ge[Le-1];let Te,le,Ee=We;if(Pe)Te=ge,le=Ze;else{const Le=new Array(We);for(let pr=0;pr<We;++pr)Le[pr]=pr;Le.sort((pr,rr)=>ge[pr]-ge[rr]);const Xe=new Float64Array(Le.length),xt=new Float64Array(Le.length);let qt=0;for(let pr=0;pr<Le.length;++pr){const rr=ge[Le[pr]],sr=Ze[Le[pr]];qt===0||rr!==Xe[qt-1]?(Xe[qt]=rr,xt[qt]=sr,++qt):xt[qt-1]=sr}if(qt<2)return ke.fill(Number.NaN),ke;Te=qt===Xe.length?Xe:Xe.slice(0,qt),le=qt===xt.length?xt:xt.slice(0,qt),Ee=qt}const qe=Ee-1,at=new Float64Array(qe);for(let Le=0;Le<qe;++Le){const Xe=Te[Le+1]-Te[Le];at[Le]=Xe>0?(le[Le+1]-le[Le])/Xe:Number.NaN}let kt=!0;for(let Le=1;Le<ie;++Le)if(De[Le]<De[Le-1]){kt=!1;break}const wt=Te[0],Be=Te[Ee-1];if(kt){let Le=0;for(let Xe=0;Xe<ie;++Xe){const xt=De[Xe];if(xt<wt||xt>Be){ke[Xe]=Number.NaN;continue}for(;Le+1<Ee&&Te[Le+1]<xt;)++Le;const qt=at[Le];if(!Number.isFinite(qt)){ke[Xe]=Number.NaN;continue}ke[Xe]=le[Le]+(xt-Te[Le])*qt}}else for(let Le=0;Le<ie;++Le){const Xe=De[Le];if(Xe<wt||Xe>Be){ke[Le]=Number.NaN;continue}let xt=0,qt=Ee-1;for(;xt+1<qt;){const rr=Math.floor(.5*(xt+qt));Te[rr]<=Xe?xt=rr:qt=rr}const pr=at[xt];if(!Number.isFinite(pr)){ke[Le]=Number.NaN;continue}ke[Le]=le[xt]+(Xe-Te[xt])*pr}return ke},Ge=(De=!1)=>{var Ze,We;if(be.value.length||!A.value&&!De)return;const se={};for(let Pe=0;Pe<Q.value.input.length;++Pe){const Te=Q.value.input[Pe];Te&&(se[Te.id]=Fe.value[Pe])}Se.value=[];for(let Pe=0;Pe<Q.value.input.length;++Pe){const Te=Q.value.input[Pe];if(Te)try{we.value[Pe]=!!W.evaluate(Te.visible??"true",se)}catch(le){we.value[Pe]=!1,Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating visibility for input '${Te.name}' (${er(Bt(le),!1)}).`})}}re.removeAllChanges();for(const Pe of Q.value.parameters){const Te=Pe.name.split("/");if(Te[0]&&Te[1])try{re.addChange(Te[0],Te[1],String(W.evaluate(Pe.value,se)))}catch(le){Se.value.push({type:_e.ERROR,description:`An error occurred while applying parameter change for '${Pe.name}' (${er(Bt(le),!1)}).`})}}if(Se.value.length){Se.value.push(d);return}if(K.run(),K.hasIssues()){Se.value=K.issues();return}const ie=(Pe,Te)=>{const le=W.evaluate(Pe,Te);return typeof le=="boolean"?new Float64Array([le?1:0]):typeof le=="number"?new Float64Array([le]):le};if(F){const Pe=F.voi();for(const Te of Q.value.output.externalData??[])try{const le=Te.voiValues,Ee=(Ze=Te.voiExpression)==null?void 0:Ze.trim(),qe=!Ee||Ee==="voi"?le:ie(Ee,{voi:le}),at=new Set;for(const wt of Te.data)at.add(wt.name);const kt=Object.create(null);for(const wt of Te.dataSeries)at.has(wt.name)&&(kt[wt.name]=wt.values);for(const wt of Te.data){const Be=kt[wt.name];Be&&(se[wt.id]=He(Pe,{x:qe,y:Be}))}}catch(le){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the VOI expression '${Te.voiExpression}' (${er(Bt(le),!1)}).`})}}if(Se.value.length){Se.value.push(d);return}if(Object.keys(Re).forEach(Pe=>{delete Re[Pe]}),Q.value.output.data.forEach(Pe=>{Pe.id&&F&&(Re[Pe.id]=Qc(F,Pe.name))}),F)for(const Pe of Q.value.output.data)se[Pe.id]=qc(F,Re[Pe.id]).data;const ke=(Pe,Te)=>{if(Pe.length===Te.length)return{x:Pe,y:Te};if(Pe.length===1&&Te.length>1){const Ee=Pe[0],qe=new Float64Array(Te.length);return qe.fill(Ee),{x:qe,y:Te}}if(Te.length===1&&Pe.length>1){const Ee=Te[0],qe=new Float64Array(Pe.length);return qe.fill(Ee),{x:Pe,y:qe}}const le=Math.min(Pe.length,Te.length);return{x:Pe.slice(0,le),y:Te.slice(0,le)}},ge=[];for(let Pe=0;Pe<Q.value.output.plots.length;++Pe){const Te=Q.value.output.plots[Pe];if(!Te){ge[Pe]={xAxisTitle:"",yAxisTitle:"",traces:[]};continue}let le=new Float64Array(0);try{le=ie(Te.xValue,se)}catch(kt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the X value expression for plot '${Te.name}' (${er(Bt(kt),!1)}).`})}let Ee=new Float64Array(0);try{Ee=ie(Te.yValue,se)}catch(kt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the Y value expression for plot '${Te.name}' (${er(Bt(kt),!1)}).`})}const qe=ke(le,Ee),at=[{traceId:`plot_${Pe}::trace_0`,name:M(Te.name,Te.xValue,Te.yValue),xValue:Te.xValue,x:qe.x,yValue:Te.yValue,y:qe.y,color:qa}];for(let kt=0;kt<(Te.additionalTraces??[]).length;++kt){const wt=(We=Te.additionalTraces)==null?void 0:We[kt];if(!wt)continue;let Be=new Float64Array(0);try{Be=ie(wt.xValue,se)}catch(xt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the X value expression for additional trace #${kt+1} of plot '${Te.name}' (${er(Bt(xt),!1)}).`})}let Le=new Float64Array(0);try{Le=ie(wt.yValue,se)}catch(xt){Se.value.push({type:_e.ERROR,description:`An error occurred while evaluating the Y value expression for additional trace #${kt+1} of plot '${Te.name}' (${er(Bt(xt),!1)}).`})}const Xe=ke(Be,Le);at.push({traceId:`plot_${Pe}::trace_${kt+1}`,name:M(wt.name,wt.xValue,wt.yValue),xValue:wt.xValue,x:Xe.x,yValue:wt.yValue,y:Xe.y,color:qa})}ge[Pe]={xAxisTitle:Te.xAxisTitle,yAxisTitle:Te.yAxisTitle,traces:at}}if(Y.value=ge,Se.value.length){Se.value.push(d);return}i("simulationData")},I=(De,se)=>{de[De]=se;let ie=0,ke=0,ge=0;for(const Ze in de){const We=de[Ze];We&&(++ie,ke=Math.max(ke,We.left),ge=Math.max(ge,We.right))}if(ie!==Q.value.output.plots.length){fe.value=void 0;return}fe.value={left:ke,right:ge}},$=()=>{de={},fe.value=void 0},he=()=>{var Pe;const De={};for(let Te=0;Te<Q.value.input.length;++Te){const le=Q.value.input[Te];if(!le)continue;const Ee=Fe.value[Te];Ee!==void 0&&(De[le.id]=Ee)}const se=[];for(let Te=0;Te<Q.value.input.length;++Te){if(!we.value[Te])continue;const le=Q.value.input[Te];if(!le)continue;let Ee=De[le.id];if(za(le)){const qe=le.possibleValues.find(at=>at.value===De[le.id]);qe!=null&&qe.name?Ee=qe.name.charAt(0).toLowerCase()+qe.name.slice(1):Ee=De[le.id]}se.push(`<tr style="vertical-align: top;">
4494
+ <td style="font-weight: bold;">
4495
4495
  ${le.name}:
4496
4496
  </td>
4497
4497
  <td style="padding-left: 8px;">
@@ -4501,7 +4501,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4501
4501
  <tbody>
4502
4502
  ${se.join("")}
4503
4503
  </tbody>
4504
- </table>`,ke=new Set;for(const Te of Me.value)ke.add(Te.color);const ge=((Pe=Me.value[Me.value.length-1])==null?void 0:Pe.color)??qa,Ze=Qa.indexOf(ge);let We=qa;for(let Te=1;Te<=Qa.length;++Te){const le=Qa[(Ze+Te)%Qa.length];if(le&&(!ke.has(le)||ke.size===Qa.length)){We=le;break}}Me.value.push({id:`run_${++H}`,inputParameters:De,isVisible:!0,data:Y.value,color:We,tooltip:ie,isLiveRun:!1})},Ae=De=>{Me.value.splice(De,1)},Qe=()=>{Me.value.splice(1)},Ke=De=>{const se=Me.value[De];se&&(se.isVisible=!se.isVisible)},Yt=(De,se)=>{const ie=Me.value[De];ie&&(ie.color=se)},Cr=(De,se)=>{var ie;X.value=De,(ie=z.value)==null||ie.toggle(se)},Rr=De=>{const se=JSON.stringify(ue.toRaw(De)),ie=se!==Ne.value;if(Ne.value=se,!ie){P.value=!1;return}Qe();const ke=te.maximumStep();J.setInitialTime(De.simulation.initialPoint),J.setOutputStartTime(De.simulation.startingPoint),J.setOutputEndTime(De.simulation.endingPoint),J.setNumberOfSteps(Math.max(1,Math.round((De.simulation.endingPoint-De.simulation.startingPoint)/De.simulation.pointInterval))),te.setMaximumStep(De.solvers.cvodeMaximumStep),Q.value=Z3(De.interactive.uiJson),A.value=De.miscellaneous.liveUpdates,P.value=!1,be.value=Xp(De.interactive.uiJson,{allModelParameters:G.value,editableModelParameters:U.value}),!(be.value.length>0)&&(te.maximumStep()!==ke&&(K=_.instantiate(),F=K.task(0)),f(),Ge(),!Se.value.length&&$())};ue.onMounted(()=>{V(),Ge()});const Io=zde();return ue.onMounted(()=>{ue.watch(()=>Io.value,De=>{var se;De||X.value!==-1&&((se=z.value)==null||se.hide(),X.value=-1)})}),Wp()&&pm(De=>{!n.isActive||!n.uiEnabled||n.isActiveFile&&!m&&!De.ctrlKey&&!De.shiftKey&&!De.metaKey&&De.code==="F9"&&(!L.value||L.value&&!A.value)&&(De.preventDefault(),c())}),(De,se)=>{const ie=_c,ke=kn,ge=Y4,Ze=J4,We=Hye,Pe=Ca,Te=Zc,le=zc,Ee=JS,qe=KS,at=Kve,kt=IS,wt=Fve;return a.openBlock(),a.createElementBlock("div",S1e,[a.unref(p).length?(a.openBlock(),a.createBlock(ie,{key:0,class:"m-4 mb-0",style:{height:"calc(100% - 2rem)"},issues:a.unref(p)},null,8,["issues"])):(a.openBlock(),a.createElementBlock("div",k1e,[a.unref(Ve)?(a.openBlock(),a.createBlock(Ze,{key:0,class:"p-1! shrink-0"},a.createSlots({start:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass({invisible:a.unref(L)&&a.unref(A)})},[a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-play-circle",text:"",severity:"secondary",title:"Run simulation (F9)",onClick:c})],2)]),end:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass([{invisible:!a.unref(L)},"flex gap-1"])},[a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-download",text:"",severity:"secondary",title:"Export COMBINE archive",onClick:l}),a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-cog",text:"",severity:"secondary",title:"Settings",onClick:se[1]||(se[1]=Be=>P.value=!0)})],2)]),_:2},[De.simulationOnly?void 0:{name:"center",fn:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(ge,{size:"small",modelValue:a.unref(L),"onUpdate:modelValue":se[0]||(se[0]=Be=>a.isRef(L)?L.value=Be:null),onLabel:"Interactive mode",offLabel:"Standard mode"},null,8,["modelValue"])])]),key:"0"}]),1024)):a.createCommentVNode("",!0),a.unref(L)?(a.openBlock(),a.createElementBlock("div",D1e,[a.createElementVNode("div",M1e,[a.unref(R)?(a.openBlock(),a.createElementBlock("div",A1e,F1e)):a.unref(be).length?(a.openBlock(),a.createBlock(ie,{key:1,class:"w-full m-4",issues:a.unref(be)},null,8,["issues"])):(a.openBlock(),a.createElementBlock("div",O1e,[a.createElementVNode("div",R1e,[a.createVNode(le,{class:"h-full"},{default:a.withCtx(()=>[a.createVNode(Te,{legend:"Simulation inputs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q).input,(Be,Le)=>a.withDirectives((a.openBlock(),a.createBlock(at,{modelValue:a.unref(Fe)[Le],"onUpdate:modelValue":Xe=>a.unref(Fe)[Le]=Xe,key:`input_${Le}`,name:Be.name,maximumValue:el(Be)?Be.maximumValue:void 0,minimumValue:el(Be)?Be.minimumValue:void 0,possibleValues:za(Be)?Be.possibleValues:void 0,stepValue:el(Be)?Be.stepValue:void 0,class:a.normalizeClass(Le!==0?"mt-6":""),onChange:se[6]||(se[6]=Xe=>Ge())},null,8,["modelValue","onUpdate:modelValue","name","maximumValue","minimumValue","possibleValues","stepValue","class"])),[[a.vShow,a.unref(we)[Le]]])),128))]),_:1}),a.createVNode(Te,{legend:"Runs"},{default:a.withCtx(()=>[a.createElementVNode("div",P1e,[a.createElementVNode("div",L1e,[a.createVNode(ke,{class:"grow",icon:"pi pi-plus",label:"Track run",outlined:"",size:"small",title:"Track current run",onClick:he}),a.createVNode(ke,{class:"w-9!",icon:"pi pi-trash",outlined:"",severity:"danger",size:"small",title:"Remove all tracked runs",onClick:Qe,disabled:a.unref(Me).length===1},null,8,["disabled"])]),a.createElementVNode("div",V1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Me),(Be,Le)=>(a.openBlock(),a.createElementBlock("div",{key:Be.id,class:a.normalizeClass(["run-card rounded-lg p-1 pl-2 opacity-75 hover:opacity-100",{"run-card-live":Be.isLiveRun,"opacity-50":!Be.isVisible}])},[a.createElementVNode("div",z1e,[a.createElementVNode("div",{class:"w-1 h-6 rounded-xs mr-2",style:a.normalizeStyle(`background-color: ${Be.color};`)},null,4),a.createVNode(kt,{content:Be.isLiveRun?"":Be.tooltip,class:a.normalizeClass(["grow text-sm",{"cursor-help":!Be.isLiveRun,"opacity-50":!Be.isVisible}])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Be.isLiveRun?"Live run":`Run #${Le}`),1)]),_:2},1032,["content","class"]),a.createElementVNode("div",_1e,[a.createVNode(ke,{class:"p-0! w-5! h-5! run-action-button",icon:"pi pi-palette",text:"",size:"small",style:a.normalizeStyle(`color: ${Be.color};`),title:`Change ${Be.isLiveRun?"live run":"run"} colour`,onClick:Xe=>Cr(Le,Xe)},null,8,["style","title","onClick"]),a.createVNode(ke,{class:"p-0! w-5! h-5! run-action-button",icon:Be.isVisible?"pi pi-eye":"pi pi-eye-slash",text:"",severity:Be.isVisible?"info":"secondary",size:"small",title:`${Be.isVisible?"Hide":"Show"} ${Be.isLiveRun?"live run":"run"}`,onClick:Xe=>Ke(Le)},null,8,["icon","severity","title","onClick"]),Be.isLiveRun?(a.openBlock(),a.createElementBlock("div",U1e)):(a.openBlock(),a.createBlock(ke,{key:0,class:"p-0! w-5! h-5! run-action-button",icon:"pi pi-times",text:"",severity:"danger",size:"small",title:"Remove run",onClick:Xe=>Ae(Le)},null,8,["onClick"]))])])],2))),128))]),a.unref(Me).length===1?(a.openBlock(),a.createElementBlock("div",C1e,q1e)):a.createCommentVNode("",!0)])]),_:1}),a.unref(ce)?(a.openBlock(),a.createBlock(Te,{key:0,legend:"Note",class:"note"},{default:a.withCtx(()=>[a.createTextVNode(" The simulation was run for "),W1e,a.createElementVNode("strong",null,a.toDisplayString(a.unref(ce))+" "+a.toDisplayString(a.unref(F)?a.unref(F).voiUnit():""),1),a.createTextVNode(" prior to plotting. ")]),_:1})):a.createCommentVNode("",!0)]),_:1})]),a.createElementVNode("div",H1e,[a.createElementVNode("div",{class:a.normalizeClass(["flex flex-col grow gap-2 min-h-0",{"invisible pointer-events-none":a.unref(Se).length}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q).output.plots,(Be,Le)=>(a.openBlock(),a.createBlock(e5,{ref_for:!0,ref:Xe=>a.unref(Z)[Le]=Xe,key:`plot_${Le}`,class:"w-full min-h-0",margins:a.unref(fe),data:a.unref(ee)[Le]||{traces:[]},onMarginsUpdated:Xe=>I(`plot_${Le}`,Xe),onResetMargins:se[7]||(se[7]=()=>$())},null,8,["margins","data","onMarginsUpdated"]))),128))],2),a.withDirectives(a.createVNode(ie,{class:"absolute inset-0 m-4 ml-0",issues:a.unref(Se)},null,8,["issues"]),[[a.vShow,a.unref(Se).length]])])]))])])):(a.openBlock(),a.createElementBlock("div",N1e,[a.createVNode(qe,{class:"border-none! h-full m-0",layout:"vertical"},{default:a.withCtx(()=>[a.createVNode(Ee,{size:De.simulationOnly?100:89},{default:a.withCtx(()=>[a.createVNode(qe,null,{default:a.withCtx(()=>[a.createVNode(Ee,{class:"ml-4 mr-4 mb-4 min-w-fit",size:25},{default:a.withCtx(()=>[a.createVNode(le,{class:"h-full"},{default:a.withCtx(()=>[a.unref(y)?(a.openBlock(),a.createBlock(We,{key:0,uniformTimeCourse:a.unref(w),instanceTask:a.unref(y)},null,8,["uniformTimeCourse","instanceTask"])):a.createCommentVNode("",!0),a.createVNode(Te,{legend:"X Axis"},{default:a.withCtx(()=>[a.createVNode(Pe,{modelValue:a.unref(E),"onUpdate:modelValue":se[2]||(se[2]=Be=>a.isRef(E)?E.value=Be:null),editable:"",filter:"",filterMode:"lenient",options:a.unref(x),size:"small",class:"w-full",appendTo:a.unref(q),onChange:se[3]||(se[3]=Be=>V())},null,8,["modelValue","options","appendTo"])]),_:1}),a.createVNode(Te,{legend:"Y Axis"},{default:a.withCtx(()=>[a.createVNode(Pe,{modelValue:a.unref(N),"onUpdate:modelValue":se[4]||(se[4]=Be=>a.isRef(N)?N.value=Be:null),editable:"",filter:"",filterMode:"lenient",options:a.unref(x),size:"small",class:"w-full",appendTo:a.unref(q),onChange:se[5]||(se[5]=Be=>V())},null,8,["modelValue","options","appendTo"])]),_:1}),a.unref(ce)?(a.openBlock(),a.createBlock(Te,{key:1,legend:"Note",class:"note"},{default:a.withCtx(()=>[a.createTextVNode(" The simulation was run for "),E1e,a.createElementVNode("strong",null,a.toDisplayString(a.unref(ce))+" "+a.toDisplayString(a.unref(F)?a.unref(F).voiUnit():""),1),a.createTextVNode(" prior to plotting. ")]),_:1})):a.createCommentVNode("",!0)]),_:1})]),_:1}),a.createVNode(Ee,{size:75},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(e5,{key:a.unref(L)?"hidden-graph-panel":"visible-graph-panel",data:a.unref(B),showLegend:!1},null,8,["data"]))]),_:1})]),_:1})]),_:1},8,["size"]),De.simulationOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(Ee,{key:0,size:11},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"editorRef",ref:o,class:"h-full console overflow-y-auto px-2 py-1 leading-[1.42] text-[13px]","aria-readonly":"true",innerHTML:a.unref(D)},null,8,B1e)]),_:1}))]),_:1})])),a.createVNode(wt,{visible:a.unref(P),"onUpdate:visible":se[8]||(se[8]=Be=>a.isRef(P)?P.value=Be:null),settings:a.unref(me),voiId:a.unref(ae),voiName:a.unref(oe),voiUnit:a.unref(F)?a.unref(F).voiUnit():"",allModelParameters:a.unref(G),editableModelParameters:a.unref(U),onOk:Rr,onClose:se[9]||(se[9]=Be=>P.value=!1)},null,8,["visible","settings","voiId","voiName","voiUnit","allModelParameters","editableModelParameters"]),a.createVNode(a.unref(Ji),{ref_key:"interactiveRunColorPopoverRef",ref:z,appendTo:a.unref(q)},{default:a.withCtx(()=>[a.createElementVNode("div",Z1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Cm,(Be,Le)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["color-swatch cursor-pointer w-6 h-6 outline-2 outline-transparent rounded-md hover:scale-[1.15]",{"color-swatch-selected":Le===a.unref(Me)[a.unref(X)].color}]),key:Le,style:a.normalizeStyle(`background-color: ${Le};`),title:Be,onClick:Xe=>Yt(a.unref(X),Le)},null,14,G1e))),128))])]),_:1},8,["appendTo"])]))])}}}),t5=Qn(K1e,[["__scopeId","data-v-8e9d78f4"]]),J1e={key:0,class:"h-full"},Y1e=["value"],X1e={key:1,class:"h-full flex flex-col"},$1e={class:"flex gap-2 items-center"},ewe=["onClick"],twe=a.defineComponent({__name:"ContentsComponent",props:{isActive:{type:Boolean},simulationOnly:{type:Boolean},uiEnabled:{type:Boolean}},emits:["error","fileClosed","fileOpened","simulationData"],setup(e,{expose:t,emit:r}){const n=e,i=r,o=ue.ref([]),s=ue.ref([]),u=ue.ref(""),c=ue.computed(()=>{const S=[];for(const w of s.value)S.push(w.file.path());return S}),l=S=>n.simulationOnly?!1:s.value.find(w=>w.file.path()===S)!==void 0,d=()=>n.simulationOnly?!1:s.value.length>0,f=async()=>{await ue.nextTick();for(let S=0;S<3;++S)await NX()},p=async(S,w=!1)=>{n.simulationOnly||(u.value=S,w&&await f())},m=async()=>{var k;const S=s.value.findIndex(y=>y.file.path()===u.value),w=((k=s.value[(S+1)%s.value.length])==null?void 0:k.file.path())||"";w!==""&&await p(w)},h=async()=>{var k;const S=s.value.findIndex(y=>y.file.path()===u.value),w=((k=s.value[(S-1+s.value.length)%s.value.length])==null?void 0:k.file.path())||"";w!==""&&await p(w)},g=async(S,w=!1)=>{const k=S.path(),y=u.value;await p(k),s.value.splice(s.value.findIndex(x=>x.file.path()===y)+1,0,{file:S,uiJson:S.uiJson()}),w&&await f(),Oe==null||Oe.fileOpened(k),i("fileOpened",k)},b=async S=>{W3.unmanage(S);const w=s.value.findIndex(k=>k.file.path()===S);if(s.value.splice(w,1),u.value===S&&s.value.length){const k=s.value[Math.min(w,s.value.length-1)];k&&await p(k.file.path())}Oe==null||Oe.fileClosed(S),i("fileClosed",S)},v=async()=>{n.simulationOnly||await b(u.value)};return t({openFile:g,closeAllFiles:async()=>{if(!n.simulationOnly)for(;s.value.length;)await v()},closeCurrentFile:v,hasFile:l,hasFiles:d,selectFile:p,addExternalData:async(S,w,k)=>{const y=o.value;return y.length?y[0].addExternalData(S,w,k).catch(x=>({type:"issue",csv:S,issues:[Bt(x)]})):Promise.resolve({type:"issue",csv:S,issues:["No simulation experiment view available."]})},simulationData:S=>{if(!n.simulationOnly)return Promise.resolve({type:"issue",simulationData:Ys(S),issues:["Simulation data can only be retrieved in simulation-only mode."]});const w=o.value;return w.length?w[0].simulationData(S).catch(k=>({type:"issue",simulationData:Ys(S),issues:[Bt(k)]})):Promise.resolve({type:"issue",simulationData:Ys(S),issues:["No simulation experiment view available."]})}}),ue.watch(c,S=>{Oe==null||Oe.filesOpened(S)}),ue.watch(u,S=>{Oe==null||Oe.fileSelected(S)}),Wp()&&pm(S=>{!n.isActive||!n.uiEnabled||!s.value.length||(S.ctrlKey&&!S.shiftKey&&S.code==="Tab"?(S.preventDefault(),m()):S.ctrlKey&&S.shiftKey&&S.code==="Tab"&&(S.preventDefault(),h()))}),(S,w)=>{const k=_c,y=Y3,x=bm,E=vm,N=gm,B=hm,D=mm;return S.simulationOnly?(a.openBlock(),a.createElementBlock("div",J1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createElementBlock("div",{key:`tabPanel_${M.file.path()}`,class:"h-full",value:M.file.path()},[M.file.issues().length?(a.openBlock(),a.createBlock(k,{key:0,class:"m-4",style:{height:"calc(100% - 2rem)"},issues:M.file.issues()},null,8,["issues"])):(a.openBlock(),a.createBlock(t5,{key:1,ref_for:!0,ref_key:"simulationExperimentViewRef",ref:o,class:"h-full",isActive:S.isActive,uiEnabled:S.uiEnabled,file:M.file,isActiveFile:M.file.path()===a.unref(u),simulationOnly:S.simulationOnly,uiJson:M.uiJson,onSimulationData:w[0]||(w[0]=T=>S.$emit("simulationData"))},null,8,["isActive","uiEnabled","file","isActiveFile","simulationOnly","uiJson"]))],8,Y1e))),128))])):(a.openBlock(),a.createElementBlock("div",X1e,[a.withDirectives(a.createVNode(y,{class:"h-full"},null,512),[[a.vShow,!a.unref(s).length]]),a.withDirectives(a.createVNode(D,{id:"fileTabs",class:"h-full flex flex-col",value:a.unref(u),"onUpdate:value":w[3]||(w[3]=M=>a.isRef(u)?u.value=M:null),scrollable:!0,selectOnFocus:!0},{default:a.withCtx(()=>[a.createVNode(E,{class:"border-b border-b-primary shrink-0"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createBlock(x,{id:`tab_${M.file.path()}`,key:`tab_${M.file.path()}`,value:M.file.path()},{default:a.withCtx(()=>[a.createElementVNode("div",$1e,[a.createElementVNode("div",null,a.toDisplayString(L3(M.file.path())),1),a.createElementVNode("div",{class:"pi pi-times remove-button",onMousedown:w[1]||(w[1]=a.withModifiers(()=>{},["prevent"])),onClick:a.withModifiers(T=>b(M.file.path()),["stop"])},null,40,ewe)])]),_:2},1032,["id","value"]))),128))]),_:1}),a.createVNode(B,{class:"p-0! grow min-h-0"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createBlock(N,{class:"h-full",key:`tabPanel_${M.file.path()}`,value:M.file.path()},{default:a.withCtx(()=>[M.file.issues().length?(a.openBlock(),a.createBlock(k,{key:0,class:"m-4",style:{height:"calc(100% - 2rem)"},issues:M.file.issues()},null,8,["issues"])):(a.openBlock(),a.createBlock(t5,{key:1,isActive:S.isActive,uiEnabled:S.uiEnabled,file:M.file,isActiveFile:M.file.path()===a.unref(u),uiJson:M.uiJson,onError:w[2]||(w[2]=T=>S.$emit("error",T))},null,8,["isActive","uiEnabled","file","isActiveFile","uiJson"]))]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),[[a.vShow,a.unref(s).length]])]))}}}),rwe=Qn(twe,[["__scopeId","data-v-cfa7b04f"]]);var nwe=function(e){var t=e.dt;return`
4504
+ </table>`,ke=new Set;for(const Te of Me.value)ke.add(Te.color);const ge=((Pe=Me.value[Me.value.length-1])==null?void 0:Pe.color)??qa,Ze=Qa.indexOf(ge);let We=qa;for(let Te=1;Te<=Qa.length;++Te){const le=Qa[(Ze+Te)%Qa.length];if(le&&(!ke.has(le)||ke.size===Qa.length)){We=le;break}}Me.value.push({id:`run_${++H}`,inputParameters:De,isVisible:!0,data:Y.value,color:We,tooltip:ie,isLiveRun:!1})},Ae=De=>{Me.value.splice(De,1)},Qe=()=>{Me.value.splice(1)},Ke=De=>{const se=Me.value[De];se&&(se.isVisible=!se.isVisible)},Yt=(De,se)=>{const ie=Me.value[De];ie&&(ie.color=se)},Cr=(De,se)=>{var ie;X.value=De,(ie=z.value)==null||ie.toggle(se)},Rr=De=>{const se=JSON.stringify(ue.toRaw(De)),ie=se!==Ne.value;if(Ne.value=se,!ie){P.value=!1;return}Qe();const ke=te.maximumStep();J.setInitialTime(De.simulation.initialPoint),J.setOutputStartTime(De.simulation.startingPoint),J.setOutputEndTime(De.simulation.endingPoint),J.setNumberOfSteps(Math.max(1,Math.round((De.simulation.endingPoint-De.simulation.startingPoint)/De.simulation.pointInterval))),te.setMaximumStep(De.solvers.cvodeMaximumStep),Q.value=Z3(De.interactive.uiJson),A.value=De.miscellaneous.liveUpdates,P.value=!1,be.value=Xp(De.interactive.uiJson,{allModelParameters:G.value,editableModelParameters:U.value}),!(be.value.length>0)&&(te.maximumStep()!==ke&&(K=_.instantiate(),F=K.task(0)),f(),Ge(),!Se.value.length&&$())};ue.onMounted(()=>{V(),Ge()});const Io=zde();return ue.onMounted(()=>{ue.watch(()=>Io.value,De=>{var se;De||X.value!==-1&&((se=z.value)==null||se.hide(),X.value=-1)})}),Wp()&&pm(De=>{!n.isActive||!n.uiEnabled||n.isActiveFile&&!m&&!De.ctrlKey&&!De.shiftKey&&!De.metaKey&&De.code==="F9"&&(!L.value||L.value&&!A.value)&&(De.preventDefault(),c())}),(De,se)=>{const ie=_c,ke=kn,ge=Y4,Ze=J4,We=Hye,Pe=Ca,Te=Zc,le=zc,Ee=JS,qe=KS,at=Kve,kt=IS,wt=Fve;return a.openBlock(),a.createElementBlock("div",S1e,[a.unref(p).length?(a.openBlock(),a.createBlock(ie,{key:0,class:"m-4 mb-0",style:{height:"calc(100% - 2rem)"},issues:a.unref(p)},null,8,["issues"])):(a.openBlock(),a.createElementBlock("div",k1e,[a.unref(Ve)?(a.openBlock(),a.createBlock(Ze,{key:0,class:"p-1! shrink-0"},a.createSlots({start:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass({invisible:a.unref(L)&&a.unref(A)})},[a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-play-circle",text:"",severity:"secondary",title:"Run simulation (F9)",onClick:c})],2)]),end:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass([{invisible:!a.unref(L)},"flex gap-1"])},[a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-download",text:"",severity:"secondary",title:"Export COMBINE archive",onClick:l}),a.createVNode(ke,{class:"p-1! toolbar-button",icon:"pi pi-cog",text:"",severity:"secondary",title:"Settings",onClick:se[1]||(se[1]=Be=>P.value=!0)})],2)]),_:2},[De.simulationOnly?void 0:{name:"center",fn:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(ge,{size:"small",modelValue:a.unref(L),"onUpdate:modelValue":se[0]||(se[0]=Be=>a.isRef(L)?L.value=Be:null),onLabel:"Interactive mode",offLabel:"Standard mode"},null,8,["modelValue"])])]),key:"0"}]),1024)):a.createCommentVNode("",!0),a.unref(L)?(a.openBlock(),a.createElementBlock("div",D1e,[a.createElementVNode("div",M1e,[a.unref(R)?(a.openBlock(),a.createElementBlock("div",A1e,F1e)):a.unref(be).length?(a.openBlock(),a.createBlock(ie,{key:1,class:"w-full m-4",issues:a.unref(be)},null,8,["issues"])):(a.openBlock(),a.createElementBlock("div",O1e,[a.createElementVNode("div",R1e,[a.createVNode(le,{class:"h-full"},{default:a.withCtx(()=>[a.createVNode(Te,{legend:"Simulation inputs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q).input,(Be,Le)=>a.withDirectives((a.openBlock(),a.createBlock(at,{modelValue:a.unref(Fe)[Le],"onUpdate:modelValue":Xe=>a.unref(Fe)[Le]=Xe,key:`input_${Le}`,name:Be.name,maximumValue:el(Be)?Be.maximumValue:void 0,minimumValue:el(Be)?Be.minimumValue:void 0,possibleValues:za(Be)?Be.possibleValues:void 0,stepValue:el(Be)?Be.stepValue:void 0,class:a.normalizeClass(Le!==0?"mt-6":""),onChange:se[6]||(se[6]=Xe=>Ge())},null,8,["modelValue","onUpdate:modelValue","name","maximumValue","minimumValue","possibleValues","stepValue","class"])),[[a.vShow,a.unref(we)[Le]]])),128))]),_:1}),a.createVNode(Te,{legend:"Runs"},{default:a.withCtx(()=>[a.createElementVNode("div",P1e,[a.createElementVNode("div",L1e,[a.createVNode(ke,{class:"grow",icon:"pi pi-plus",label:"Track run",outlined:"",size:"small",title:"Track current run",onClick:he}),a.createVNode(ke,{class:"w-9!",icon:"pi pi-trash",outlined:"",severity:"danger",size:"small",title:"Remove all tracked runs",onClick:Qe,disabled:a.unref(Me).length===1},null,8,["disabled"])]),a.createElementVNode("div",V1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Me),(Be,Le)=>(a.openBlock(),a.createElementBlock("div",{key:Be.id,class:a.normalizeClass(["run-card rounded-lg p-1 pl-2 opacity-75 hover:opacity-100",{"run-card-live":Be.isLiveRun,"opacity-50":!Be.isVisible}])},[a.createElementVNode("div",z1e,[a.createElementVNode("div",{class:"w-1 h-6 rounded-xs mr-2",style:a.normalizeStyle(`background-color: ${Be.color};`)},null,4),a.createVNode(kt,{content:Be.isLiveRun?"":Be.tooltip,class:a.normalizeClass(["grow text-sm",{"cursor-help":!Be.isLiveRun,"opacity-50":!Be.isVisible}])},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(Be.isLiveRun?"Live run":`Run #${Le}`),1)]),_:2},1032,["content","class"]),a.createElementVNode("div",_1e,[a.createVNode(ke,{class:"p-0! w-5! h-5! run-action-button",icon:"pi pi-palette",text:"",size:"small",style:a.normalizeStyle(`color: ${Be.color};`),title:`Change ${Be.isLiveRun?"live run":"run"} colour`,onClick:Xe=>Cr(Le,Xe)},null,8,["style","title","onClick"]),a.createVNode(ke,{class:"p-0! w-5! h-5! run-action-button",icon:Be.isVisible?"pi pi-eye":"pi pi-eye-slash",text:"",severity:Be.isVisible?"info":"secondary",size:"small",title:`${Be.isVisible?"Hide":"Show"} ${Be.isLiveRun?"live run":"run"}`,onClick:Xe=>Ke(Le)},null,8,["icon","severity","title","onClick"]),Be.isLiveRun?(a.openBlock(),a.createElementBlock("div",U1e)):(a.openBlock(),a.createBlock(ke,{key:0,class:"p-0! w-5! h-5! run-action-button",icon:"pi pi-times",text:"",severity:"danger",size:"small",title:"Remove run",onClick:Xe=>Ae(Le)},null,8,["onClick"]))])])],2))),128))]),a.unref(Me).length===1?(a.openBlock(),a.createElementBlock("div",C1e,q1e)):a.createCommentVNode("",!0)])]),_:1}),a.unref(ce)?(a.openBlock(),a.createBlock(Te,{key:0,legend:"Note",class:"note"},{default:a.withCtx(()=>[a.createTextVNode(" The simulation was run for "),W1e,a.createElementVNode("strong",null,a.toDisplayString(a.unref(ce))+" "+a.toDisplayString(a.unref(F)?a.unref(F).voiUnit():""),1),a.createTextVNode(" prior to plotting. ")]),_:1})):a.createCommentVNode("",!0)]),_:1})]),a.createElementVNode("div",H1e,[a.createElementVNode("div",{class:a.normalizeClass(["flex flex-col grow gap-2 min-h-0",{"invisible pointer-events-none":a.unref(Se).length}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q).output.plots,(Be,Le)=>(a.openBlock(),a.createBlock(e5,{ref_for:!0,ref:Xe=>a.unref(Z)[Le]=Xe,key:`plot_${Le}`,class:"w-full min-h-0",margins:a.unref(fe),data:a.unref(ee)[Le]||{traces:[]},onMarginsUpdated:Xe=>I(`plot_${Le}`,Xe),onResetMargins:se[7]||(se[7]=()=>$())},null,8,["margins","data","onMarginsUpdated"]))),128))],2),a.withDirectives(a.createVNode(ie,{class:"absolute inset-0 m-4 ml-0",issues:a.unref(Se)},null,8,["issues"]),[[a.vShow,a.unref(Se).length]])])]))])])):(a.openBlock(),a.createElementBlock("div",N1e,[a.createVNode(qe,{class:"border-none! h-full m-0",layout:"vertical"},{default:a.withCtx(()=>[a.createVNode(Ee,{size:De.simulationOnly?100:89},{default:a.withCtx(()=>[a.createVNode(qe,null,{default:a.withCtx(()=>[a.createVNode(Ee,{class:"ml-4 mr-4 mb-4 min-w-fit",size:25},{default:a.withCtx(()=>[a.createVNode(le,{class:"h-full"},{default:a.withCtx(()=>[a.unref(y)?(a.openBlock(),a.createBlock(We,{key:0,uniformTimeCourse:a.unref(w),instanceTask:a.unref(y)},null,8,["uniformTimeCourse","instanceTask"])):a.createCommentVNode("",!0),a.createVNode(Te,{legend:"X Axis"},{default:a.withCtx(()=>[a.createVNode(Pe,{modelValue:a.unref(E),"onUpdate:modelValue":se[2]||(se[2]=Be=>a.isRef(E)?E.value=Be:null),editable:"",filter:"",filterMode:"lenient",options:a.unref(x),size:"small",class:"w-full",appendTo:a.unref(q),onChange:se[3]||(se[3]=Be=>V())},null,8,["modelValue","options","appendTo"])]),_:1}),a.createVNode(Te,{legend:"Y Axis"},{default:a.withCtx(()=>[a.createVNode(Pe,{modelValue:a.unref(N),"onUpdate:modelValue":se[4]||(se[4]=Be=>a.isRef(N)?N.value=Be:null),editable:"",filter:"",filterMode:"lenient",options:a.unref(x),size:"small",class:"w-full",appendTo:a.unref(q),onChange:se[5]||(se[5]=Be=>V())},null,8,["modelValue","options","appendTo"])]),_:1}),a.unref(ce)?(a.openBlock(),a.createBlock(Te,{key:1,legend:"Note",class:"note"},{default:a.withCtx(()=>[a.createTextVNode(" The simulation was run for "),E1e,a.createElementVNode("strong",null,a.toDisplayString(a.unref(ce))+" "+a.toDisplayString(a.unref(F)?a.unref(F).voiUnit():""),1),a.createTextVNode(" prior to plotting. ")]),_:1})):a.createCommentVNode("",!0)]),_:1})]),_:1}),a.createVNode(Ee,{size:75},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(e5,{key:a.unref(L)?"hidden-graph-panel":"visible-graph-panel",data:a.unref(B),showLegend:!1},null,8,["data"]))]),_:1})]),_:1})]),_:1},8,["size"]),De.simulationOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(Ee,{key:0,size:11},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"editorRef",ref:o,class:"h-full console overflow-y-auto px-2 py-1 leading-[1.42] text-[13px]","aria-readonly":"true",innerHTML:a.unref(D)},null,8,B1e)]),_:1}))]),_:1})])),a.createVNode(wt,{visible:a.unref(P),"onUpdate:visible":se[8]||(se[8]=Be=>a.isRef(P)?P.value=Be:null),settings:a.unref(me),voiId:a.unref(ae),voiName:a.unref(oe),voiUnit:a.unref(F)?a.unref(F).voiUnit():"",allModelParameters:a.unref(G),editableModelParameters:a.unref(U),onOk:Rr,onClose:se[9]||(se[9]=Be=>P.value=!1)},null,8,["visible","settings","voiId","voiName","voiUnit","allModelParameters","editableModelParameters"]),a.createVNode(a.unref(Ji),{ref_key:"interactiveRunColorPopoverRef",ref:z,appendTo:a.unref(q)},{default:a.withCtx(()=>[a.createElementVNode("div",Z1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Cm,(Be,Le)=>(a.openBlock(),a.createElementBlock("button",{class:a.normalizeClass(["color-swatch cursor-pointer w-6 h-6 outline-2 outline-transparent rounded-md hover:scale-[1.15]",{"color-swatch-selected":Le===a.unref(Me)[a.unref(X)].color}]),key:Le,style:a.normalizeStyle(`background-color: ${Le};`),title:Be,onClick:Xe=>Yt(a.unref(X),Le)},null,14,G1e))),128))])]),_:1},8,["appendTo"])]))])}}}),t5=Qn(K1e,[["__scopeId","data-v-3607ca5a"]]),J1e={key:0,class:"h-full"},Y1e=["value"],X1e={key:1,class:"h-full flex flex-col"},$1e={class:"flex gap-2 items-center"},ewe=["onClick"],twe=a.defineComponent({__name:"ContentsComponent",props:{isActive:{type:Boolean},simulationOnly:{type:Boolean},uiEnabled:{type:Boolean}},emits:["error","fileClosed","fileOpened","simulationData"],setup(e,{expose:t,emit:r}){const n=e,i=r,o=ue.ref([]),s=ue.ref([]),u=ue.ref(""),c=ue.computed(()=>{const S=[];for(const w of s.value)S.push(w.file.path());return S}),l=S=>n.simulationOnly?!1:s.value.find(w=>w.file.path()===S)!==void 0,d=()=>n.simulationOnly?!1:s.value.length>0,f=async()=>{await ue.nextTick();for(let S=0;S<3;++S)await NX()},p=async(S,w=!1)=>{n.simulationOnly||(u.value=S,w&&await f())},m=async()=>{var k;const S=s.value.findIndex(y=>y.file.path()===u.value),w=((k=s.value[(S+1)%s.value.length])==null?void 0:k.file.path())||"";w!==""&&await p(w)},h=async()=>{var k;const S=s.value.findIndex(y=>y.file.path()===u.value),w=((k=s.value[(S-1+s.value.length)%s.value.length])==null?void 0:k.file.path())||"";w!==""&&await p(w)},g=async(S,w=!1)=>{const k=S.path(),y=u.value;await p(k),s.value.splice(s.value.findIndex(x=>x.file.path()===y)+1,0,{file:S,uiJson:S.uiJson()}),w&&await f(),Oe==null||Oe.fileOpened(k),i("fileOpened",k)},b=async S=>{W3.unmanage(S);const w=s.value.findIndex(k=>k.file.path()===S);if(s.value.splice(w,1),u.value===S&&s.value.length){const k=s.value[Math.min(w,s.value.length-1)];k&&await p(k.file.path())}Oe==null||Oe.fileClosed(S),i("fileClosed",S)},v=async()=>{n.simulationOnly||await b(u.value)};return t({openFile:g,closeAllFiles:async()=>{if(!n.simulationOnly)for(;s.value.length;)await v()},closeCurrentFile:v,hasFile:l,hasFiles:d,selectFile:p,addExternalData:async(S,w,k)=>{const y=o.value;return y.length?y[0].addExternalData(S,w,k).catch(x=>({type:"issue",csv:S,issues:[Bt(x)]})):Promise.resolve({type:"issue",csv:S,issues:["No simulation experiment view available."]})},simulationData:S=>{if(!n.simulationOnly)return Promise.resolve({type:"issue",simulationData:Ys(S),issues:["Simulation data can only be retrieved in simulation-only mode."]});const w=o.value;return w.length?w[0].simulationData(S).catch(k=>({type:"issue",simulationData:Ys(S),issues:[Bt(k)]})):Promise.resolve({type:"issue",simulationData:Ys(S),issues:["No simulation experiment view available."]})}}),ue.watch(c,S=>{Oe==null||Oe.filesOpened(S)}),ue.watch(u,S=>{Oe==null||Oe.fileSelected(S)}),Wp()&&pm(S=>{!n.isActive||!n.uiEnabled||!s.value.length||(S.ctrlKey&&!S.shiftKey&&S.code==="Tab"?(S.preventDefault(),m()):S.ctrlKey&&S.shiftKey&&S.code==="Tab"&&(S.preventDefault(),h()))}),(S,w)=>{const k=_c,y=Y3,x=bm,E=vm,N=gm,B=hm,D=mm;return S.simulationOnly?(a.openBlock(),a.createElementBlock("div",J1e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createElementBlock("div",{key:`tabPanel_${M.file.path()}`,class:"h-full",value:M.file.path()},[M.file.issues().length?(a.openBlock(),a.createBlock(k,{key:0,class:"m-4",style:{height:"calc(100% - 2rem)"},issues:M.file.issues()},null,8,["issues"])):(a.openBlock(),a.createBlock(t5,{key:1,ref_for:!0,ref_key:"simulationExperimentViewRef",ref:o,class:"h-full",isActive:S.isActive,uiEnabled:S.uiEnabled,file:M.file,isActiveFile:M.file.path()===a.unref(u),simulationOnly:S.simulationOnly,uiJson:M.uiJson,onSimulationData:w[0]||(w[0]=T=>S.$emit("simulationData"))},null,8,["isActive","uiEnabled","file","isActiveFile","simulationOnly","uiJson"]))],8,Y1e))),128))])):(a.openBlock(),a.createElementBlock("div",X1e,[a.withDirectives(a.createVNode(y,{class:"h-full"},null,512),[[a.vShow,!a.unref(s).length]]),a.withDirectives(a.createVNode(D,{id:"fileTabs",class:"h-full flex flex-col",value:a.unref(u),"onUpdate:value":w[3]||(w[3]=M=>a.isRef(u)?u.value=M:null),scrollable:!0,selectOnFocus:!0},{default:a.withCtx(()=>[a.createVNode(E,{class:"border-b border-b-primary shrink-0"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createBlock(x,{id:`tab_${M.file.path()}`,key:`tab_${M.file.path()}`,value:M.file.path()},{default:a.withCtx(()=>[a.createElementVNode("div",$1e,[a.createElementVNode("div",null,a.toDisplayString(L3(M.file.path())),1),a.createElementVNode("div",{class:"pi pi-times remove-button",onMousedown:w[1]||(w[1]=a.withModifiers(()=>{},["prevent"])),onClick:a.withModifiers(T=>b(M.file.path()),["stop"])},null,40,ewe)])]),_:2},1032,["id","value"]))),128))]),_:1}),a.createVNode(B,{class:"p-0! grow min-h-0"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(s),M=>(a.openBlock(),a.createBlock(N,{class:"h-full",key:`tabPanel_${M.file.path()}`,value:M.file.path()},{default:a.withCtx(()=>[M.file.issues().length?(a.openBlock(),a.createBlock(k,{key:0,class:"m-4",style:{height:"calc(100% - 2rem)"},issues:M.file.issues()},null,8,["issues"])):(a.openBlock(),a.createBlock(t5,{key:1,isActive:S.isActive,uiEnabled:S.uiEnabled,file:M.file,isActiveFile:M.file.path()===a.unref(u),uiJson:M.uiJson,onError:w[2]||(w[2]=T=>S.$emit("error",T))},null,8,["isActive","uiEnabled","file","isActiveFile","uiJson"]))]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),[[a.vShow,a.unref(s).length]])]))}}}),rwe=Qn(twe,[["__scopeId","data-v-cfa7b04f"]]);var nwe=function(e){var t=e.dt;return`
4505
4505
  .p-blockui {
4506
4506
  position: relative;
4507
4507
  }