@abi-software/simulationvuer 4.0.0 → 4.0.1

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.
@@ -43423,7 +43423,7 @@ const Ud = () => {
43423
43423
  ]), 1024);
43424
43424
  };
43425
43425
  }
43426
- }), Cee = "0.20260728.1", See = {
43426
+ }), Cee = "0.20260729.0", See = {
43427
43427
  version: Cee
43428
43428
  }, { version: Dh } = See, Sc = ve.ref(!1), ul = ve.ref(""), Rw = async () => {
43429
43429
  try {
@@ -48179,9 +48179,13 @@ const mS = [
48179
48179
  try {
48180
48180
  const e = (await import(
48181
48181
  /* @vite-ignore */
48182
- "https://opencor.ws/libopencor/downloads/wasm/1.20260723.2/libopencor.js"
48182
+ new URL("./libopencor/wasm/1.20260723.2/libopencor.js", window.location.href).href
48183
48183
  )).default;
48184
- ++Bs.value, nte(await e()), ++Bs.value;
48184
+ ++Bs.value, nte(
48185
+ await e({
48186
+ locateFile: (t) => `https://opencor.ws/libopencor/downloads/wasm/1.20260723.2/${t}`
48187
+ })
48188
+ ), ++Bs.value;
48185
48189
  } catch (e) {
48186
48190
  throw console.error("OpenCOR: failed to load libOpenCOR:", Gt(e)), e;
48187
48191
  }
@@ -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&&la(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=kr(e.container),n=Wn(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=Us(),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:Or,focustrap:Kp},components:{Button:Fn,Portal:qa,WindowMinimizeIcon:P3,WindowMaximizeIcon:R3,TimesIcon:Ki}};function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function Q3(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 q3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(r),!0).forEach(function(n){TX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TX(e,t,r){return(t=IX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IX(e){var t=FX(e,"string");return nl(t)=="symbol"?t:t+""}function FX(e,t){if(nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OX=["aria-labelledby","aria-modal"],RX=["id"];function PX(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,RX)):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},q3(q3({},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,OX)),[[c,{disabled:!e.modal}]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]}),_:3},8,["appendTo"])}j3.render=PX;const LX=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 VX(){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,k,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=v.encodeInto(T,d.subarray(y)).written):(f(T.byteLength,y),d.set(T,y),O=T.byteLength),k(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 v=new TextEncoder,b=0,S=0n;function w(y,x=b){return f(3*y.length,0),m(r(0,v.encodeInto(y,d).written,x))}function N(y,x=S){return f(3*y.length,0),g(n(0,v.encodeInto(y,d).written,x))}return{h32:w,h32ToString:(y,x=b)=>w(y,x).toString(16).padStart(8,"0"),h32Raw:(y,x=b)=>(f(y.byteLength,0),d.set(y),m(r(0,y.byteLength,x))),create32:(y=b)=>p(48,y,i,o,s,m),h64:N,h64ToString:(y,x=S)=>N(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(LX)).instance)}let W3=null,Jp=null,Yi=null,rn=null,Yp=null;const _X=e=>{W3=e},zX=e=>{Jp=e},UX=e=>{Yi=e},CX=e=>{rn=e},jX=VX().then(e=>(Yp=e,e)),Oe=typeof window<"u"?window.electronApi:void 0;let po=null;const Lc=()=>{if(po)return po;try{const e=window.navigator.userAgent;/Android/i.test(e)?po="Android":/iPhone|iPad|iPod/i.test(e)?po="iOS":/Windows/i.test(e)?po="Windows":/Linux/i.test(e)?po="Linux":/Mac/i.test(e)?po="macOS":po="Unknown"}catch{po="Unknown"}return po},QX=()=>Lc()==="Windows",qX=()=>Lc()==="Linux",Xp=()=>Lc()==="macOS",$p=()=>{const e=Lc();return e==="Windows"||e==="Linux"||e==="macOS"},em=e=>Xp()?e.metaKey:e.ctrlKey,H3=e=>{Oe==null||Oe.enableDisableMainMenu(e)},WX="OMEX #",Vc=e=>e.startsWith("http://")||e.startsWith("https://"),tm=e=>`https://cors-proxy.opencor.workers.dev/?url=${e}`,Z3=e=>typeof e=="string"?Yp.h64(e).toString(16).padStart(16,"0"):Yp.h64Raw(e).toString(16).padStart(16,"0"),HX=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},Mt=e=>e instanceof Error?e.message:String(e),ar=(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),rm=(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))},G3=(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)},K3=e=>{const t=e.split(/(\\|\/)/g).pop()||"";try{return decodeURIComponent(t)}catch(r){return console.warn("OpenCOR: failed to decode the file path:",t,Mt(r)),t}},_c=e=>new Promise(t=>{setTimeout(t,e)}),ZX=()=>new Promise(e=>{requestAnimationFrame(e)}),ol=Object.freeze(new Float64Array(0)),J3=Object.freeze({data:ol,unit:""}),al=e=>{const t={};for(const r of e)t[r]={...J3};return t},Y3=Symbol("DialogState"),GX=()=>{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(Y3,r),r},KX=()=>{const e=ue.inject(Y3);if(!e)throw new Error("useDialogState() must be called within a component that has provideDialogState in its ancestor tree.");return e},ca=a.defineComponent({__name:"BaseDialog",emits:["cancel"],setup(e,{emit:t}){const r=t,{incrementDialogs:n,decrementDialogs:i}=KX();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(),H3(!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(),H3(!0),r("cancel"),ue.nextTick(()=>{u&&(u.disconnect(),u=null)})};return(f,p)=>{const m=j3;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(v=>[a.renderSlot(f.$slots,g,a.normalizeProps(a.guardReactiveProps(v)))])}))]),1024)}}}),JX="0.20260728.1",YX={version:JX},{version:nm}=YX,zc=ue.ref(!1),il=ue.ref(""),X3=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."),zc.value=!1,il.value="",!1;const t=await e.json();il.value=t.version;const r=XX(il.value,nm);return zc.value=r,r}catch{return zc.value=!1,il.value="",!1}},XX=(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 $3=null;const $X=()=>{X3(),$3||($3=window.setInterval(()=>{X3()},300*1e3))},sl=e=>(a.pushScopeId("data-v-c05d59eb"),e=e(),a.popScopeId(),e),e$={class:"space-y-7"},t$={class:"text-center"},r$={class:"text-3xl font-bold"},n$={class:"highlight highlight-version"},o$={class:"space-y-2"},a$={class:"text-center"},i$=sl(()=>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)),s$=sl(()=>a.createElementVNode("br",null,null,-1)),l$={key:0,class:"highlight"},u$={key:1},c$=sl(()=>a.createElementVNode("span",{class:"highlight"},"Ctrl",-1)),d$=sl(()=>a.createElementVNode("span",{class:"highlight"},"Shift",-1)),f$=sl(()=>a.createElementVNode("span",{class:"highlight"},"R",-1)),p$=a.defineComponent({__name:"UpdateAvailableDialog",emits:["close"],setup(e){return(t,r)=>{const n=Fn,i=ca;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",e$,[a.createElementVNode("div",t$,[a.createElementVNode("div",r$,[a.createTextVNode("OpenCOR "),a.createElementVNode("span",n$,a.toDisplayString(a.unref(il)),1),a.createTextVNode(" is available!")])]),a.createElementVNode("div",o$,[a.createElementVNode("div",a$,[i$,s$,a.createElementVNode("em",null,[a.createTextVNode("(You can force reload by pressing "),Xp()?(a.openBlock(),a.createElementBlock("span",l$,"⇧⌘R")):(a.openBlock(),a.createElementBlock("span",u$,[c$,a.createTextVNode("+"),d$,a.createTextVNode("+"),f$])),a.createTextVNode(".)")])])])])]),_:1})}}}),mo=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},m$=mo(p$,[["__scopeId","data-v-c05d59eb"]]),h$="opencor",eS=`${h$}://`,g$=0,tS=19,Uc=69,om=169,rS=369,_o=3e3,v$=500,b$=40,nS=new Date().getFullYear(),oS=nS===2025?"2025":`2025-${nS}`;var Ce=(e=>(e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFORMATION=2]="INFORMATION",e))(Ce||{});const am=e=>{const t=[];for(const r of e)r&&t.push({type:r.type.value,description:r.description});return t},ga=class ga{constructor(){zt(this,"_fileManager",null)}static instance(){return ga._instance??(ga._instance=new ga),ga._instance}fileManager(){return this._fileManager??(this._fileManager=$i.FileManager.instance()),this._fileManager}file(t){if(et()){const n=Ye.fileContents(t);return n?new Xi(t,n):null}const r=this.fileManager().files;for(const n of r)if(n&&n.path===t)return new Xi(t,n.contents());return null}unmanage(t){if(et())Ye.fileManagerUnmanage(t);else{const r=this.fileManager(),n=r.files;for(const i of n)if(i&&i.path===t){r.unmanage(i);break}}}};zt(ga,"_instance",null);let im=ga;const sm=im.instance();var Wa=(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))(Wa||{});let Xi=class{constructor(e,t=void 0){zt(this,"_path");zt(this,"_wasmFile",{});zt(this,"_issues",[]);if(this._path=e,et())Ye.fileCreate(e,t),this._issues=Ye.fileIssues(e);else if(t)this._wasmFile=ue.markRaw(new $i.File(e)),this._wasmFile.setContents(t),this._issues=am(this._wasmFile.issues);else{console.warn(`OpenCOR: no contents provided for file '${e}'.`);return}}type(){return et()?Ye.fileType(this._path):this._wasmFile.type.value}path(){return this._path}issues(){return this._issues}contents(){return et()?Ye.fileContents(this._path):this._wasmFile.contents()}document(){return new y$(this._path,this._wasmFile)}uiJson(){let e;if(et()){if(e=Ye.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 aS(r)}};class Cc{constructor(t){zt(this,"_index");this._index=t}}class y${constructor(t,r){zt(this,"_cppDocumentId",-1);zt(this,"_wasmSedDocument",{});zt(this,"_issues",[]);if(et()?this._cppDocumentId=Ye.sedDocumentCreate(t):this._wasmSedDocument=new $i.SedDocument(r),this._issues=et()?Ye.sedDocumentIssues(this._cppDocumentId):am(this._wasmSedDocument.issues),this.modelCount()!==1){this._issues.push({type:Ce.WARNING,description:"Only SED-ML files with one model are currently supported."});return}if(this.simulationCount()!==1){this._issues.push({type:Ce.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:Ce.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:Ce.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:Ce.ERROR,description:`The uniform time course simulation must have different values for 'outputStartTime' (${o}) and 'outputEndTime' (${s}).`}),u<=0&&this._issues.push({type:Ce.ERROR,description:`The uniform time course simulation must have a positive value for 'numberOfSteps' (${u}).`})}issues(){return this._issues}modelCount(){return et()?Ye.sedDocumentModelCount(this._cppDocumentId):this._wasmSedDocument.modelCount}model(t){return new w$(this._cppDocumentId,this._wasmSedDocument,t)}simulationCount(){return et()?Ye.sedDocumentSimulationCount(this._cppDocumentId):this._wasmSedDocument.simulationCount}simulation(t){var n;let r;if(et())r=Ye.sedDocumentSimulationType(this._cppDocumentId,t);else switch((n=this._wasmSedDocument.simulation(t))==null?void 0:n.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 S$(this._cppDocumentId,this._wasmSedDocument,t,r):r===2?new N$(this._cppDocumentId,this._wasmSedDocument,t,r):new k$(this._cppDocumentId,this._wasmSedDocument,t,r)}instantiate(){return new B$(this._cppDocumentId,this._wasmSedDocument)}serialise(){return et()?Ye.sedDocumentSerialise(this._cppDocumentId):this._wasmSedDocument.serialise()}}class w$ extends Cc{constructor(r,n,i){super(i);zt(this,"_cppDocumentId");zt(this,"_wasmSedModel",{});this._cppDocumentId=r,ul()&&(this._wasmSedModel=n.model(i))}file(){var r;return et()?sm.file(Ye.sedModelFilePath(this._cppDocumentId,this._index)):((r=this._wasmSedModel.file)==null?void 0:r.path)!=null?sm.file(this._wasmSedModel.file.path):null}addChange(r,n,i){et()?Ye.sedModelAddChange(this._cppDocumentId,this._index,r,n,i):this._wasmSedModel.addChange(new $i.SedChangeAttribute(r,n,i))}removeAllChanges(){et()?Ye.sedModelRemoveAllChanges(this._cppDocumentId,this._index):this._wasmSedModel.removeAllChanges()}}class jc extends Cc{constructor(r,n,i,o){super(i);zt(this,"_cppDocumentId");zt(this,"_type");this._cppDocumentId=r,this._type=o}type(){return this._type}}class x$ extends jc{}class S$ extends jc{}class N$ extends jc{constructor(r,n,i,o){super(r,n,i,o);zt(this,"_wasmSedOneStep",{});ul()&&(this._wasmSedOneStep=n.simulation(i))}step(){return et()?Ye.sedOneStepStep(this._cppDocumentId,this._index):this._wasmSedOneStep.step}}class k$ extends jc{constructor(r,n,i,o){super(r,n,i,o);zt(this,"_wasmSedUniformTimeCourse",{});ul()&&(this._wasmSedUniformTimeCourse=n.simulation(i))}initialTime(){return et()?Ye.sedUniformTimeCourseInitialTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.initialTime}setInitialTime(r){et()?Ye.sedUniformTimeCourseSetInitialTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.initialTime=r}outputStartTime(){return et()?Ye.sedUniformTimeCourseOutputStartTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputStartTime}setOutputStartTime(r){et()?Ye.sedUniformTimeCourseSetOutputStartTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputStartTime=r}outputEndTime(){return et()?Ye.sedUniformTimeCourseOutputEndTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputEndTime}setOutputEndTime(r){et()?Ye.sedUniformTimeCourseSetOutputEndTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputEndTime=r}numberOfSteps(){return et()?Ye.sedUniformTimeCourseNumberOfSteps(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.numberOfSteps}setNumberOfSteps(r){et()?Ye.sedUniformTimeCourseSetNumberOfSteps(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.numberOfSteps=r}cvode(){return new E$(this._cppDocumentId,this._wasmSedUniformTimeCourse,this._index)}}class E$ extends Cc{constructor(r,n,i){super(i);zt(this,"_cppDocumentId");zt(this,"_wasmSolverCvode",{});this._cppDocumentId=r,ul()&&(this._wasmSolverCvode=n.odeSolver)}maximumStep(){return et()?Ye.solverCvodeMaximumStep(this._cppDocumentId,this._index):this._wasmSolverCvode.maximumStep}setMaximumStep(r){et()?Ye.solverCvodeSetMaximumStep(this._cppDocumentId,this._index,r):this._wasmSolverCvode.maximumStep=r}}var gn=(e=>(e[e.IDLE=0]="IDLE",e[e.RUNNING=1]="RUNNING",e[e.PAUSED=2]="PAUSED",e))(gn||{});class B${constructor(t,r){zt(this,"_cppInstanceId",-1);zt(this,"_wasmSedInstance",{});et()?this._cppInstanceId=Ye.sedDocumentInstantiate(t):this._wasmSedInstance=ue.markRaw(r.instantiate())}hasIssues(){return et()?Ye.sedInstanceHasIssues(this._cppInstanceId):this._wasmSedInstance.hasIssues}issues(){return et()?Ye.sedInstanceIssues(this._cppInstanceId):am(this._wasmSedInstance.issues)}task(t){return new D$(this._cppInstanceId,t,this._wasmSedInstance)}status(){return et()?Ye.sedInstanceStatus(this._cppInstanceId):this._wasmSedInstance.status.value}progress(){return et()?Ye.sedInstanceProgress(this._cppInstanceId):this._wasmSedInstance.progress}startRun(){return et()?Ye.sedInstanceStartRun(this._cppInstanceId):this._wasmSedInstance.startRun()}waitForRun(){return et()?Ye.sedInstanceWaitForRun(this._cppInstanceId):this._wasmSedInstance.waitForRun()}pauseRun(){et()?Ye.sedInstancePauseRun(this._cppInstanceId):this._wasmSedInstance.pauseRun()}resumeRun(){et()?Ye.sedInstanceResumeRun(this._cppInstanceId):this._wasmSedInstance.resumeRun()}stopRun(){et()?Ye.sedInstanceStopRun(this._cppInstanceId):this._wasmSedInstance.stopRun()}}class D$ extends Cc{constructor(r,n,i){super(n);zt(this,"_cppInstanceId");zt(this,"_wasmSedInstanceTask",{});this._cppInstanceId=r,ul()&&(this._wasmSedInstanceTask=i.task(n))}voiName(){return et()?Ye.sedInstanceTaskVoiName(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiName}voiUnit(){return et()?Ye.sedInstanceTaskVoiUnit(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiUnit}voi(){return et()?Ye.sedInstanceTaskVoi(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voi}stateCount(){return et()?Ye.sedInstanceTaskStateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.stateCount}stateName(r){return et()?Ye.sedInstanceTaskStateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateName(r)}stateUnit(r){return et()?Ye.sedInstanceTaskStateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateUnit(r)}state(r){return et()?Ye.sedInstanceTaskState(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.state(r)}rateCount(){return et()?Ye.sedInstanceTaskRateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.rateCount}rateName(r){return et()?Ye.sedInstanceTaskRateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateName(r)}rateUnit(r){return et()?Ye.sedInstanceTaskRateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateUnit(r)}rate(r){return et()?Ye.sedInstanceTaskRate(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rate(r)}constantCount(){return et()?Ye.sedInstanceTaskConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.constantCount}constantName(r){return et()?Ye.sedInstanceTaskConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantName(r)}constantUnit(r){return et()?Ye.sedInstanceTaskConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantUnit(r)}constant(r){return et()?Ye.sedInstanceTaskConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constant(r)}computedConstantCount(){return et()?Ye.sedInstanceTaskComputedConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.computedConstantCount}computedConstantName(r){return et()?Ye.sedInstanceTaskComputedConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantName(r)}computedConstantUnit(r){return et()?Ye.sedInstanceTaskComputedConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantUnit(r)}computedConstant(r){return et()?Ye.sedInstanceTaskComputedConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstant(r)}algebraicVariableCount(){return et()?Ye.sedInstanceTaskAlgebraicVariableCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.algebraicVariableCount}algebraicVariableName(r){return et()?Ye.sedInstanceTaskAlgebraicVariableName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableName(r)}algebraicVariableUnit(r){return et()?Ye.sedInstanceTaskAlgebraicVariableUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableUnit(r)}algebraicVariable(r){return et()?Ye.sedInstanceTaskAlgebraicVariable(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariable(r)}}const ll=e=>"maximumValue"in e&&"minimumValue"in e,Ha=e=>"possibleValues"in e,lm=(e,t)=>t instanceof Float64Array?Array.from(t):t,aS=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},M$=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},iS=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)},Qc=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]}`},um=(e,t)=>{if(!e)return[{type:Ce.WARNING,description:"UI JSON: no UI JSON was provided."}];e=iS(e);const r=new W3.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(M$(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&&la(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=kr(e.container),n=Wn(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=Us(),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:Or,focustrap:Kp},components:{Button:Fn,Portal:qa,WindowMinimizeIcon:P3,WindowMaximizeIcon:R3,TimesIcon:Ki}};function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function Q3(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 q3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(r),!0).forEach(function(n){TX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TX(e,t,r){return(t=IX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IX(e){var t=FX(e,"string");return nl(t)=="symbol"?t:t+""}function FX(e,t){if(nl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OX=["aria-labelledby","aria-modal"],RX=["id"];function PX(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,RX)):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},q3(q3({},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,OX)),[[c,{disabled:!e.modal}]]):a.createCommentVNode("",!0)]}),_:3},16,["onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):a.createCommentVNode("",!0)]}),_:3},8,["appendTo"])}j3.render=PX;const LX=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 VX(){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,k,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=v.encodeInto(T,d.subarray(y)).written):(f(T.byteLength,y),d.set(T,y),O=T.byteLength),k(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 v=new TextEncoder,b=0,S=0n;function w(y,x=b){return f(3*y.length,0),m(r(0,v.encodeInto(y,d).written,x))}function N(y,x=S){return f(3*y.length,0),g(n(0,v.encodeInto(y,d).written,x))}return{h32:w,h32ToString:(y,x=b)=>w(y,x).toString(16).padStart(8,"0"),h32Raw:(y,x=b)=>(f(y.byteLength,0),d.set(y),m(r(0,y.byteLength,x))),create32:(y=b)=>p(48,y,i,o,s,m),h64:N,h64ToString:(y,x=S)=>N(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(LX)).instance)}let W3=null,Jp=null,Yi=null,rn=null,Yp=null;const _X=e=>{W3=e},zX=e=>{Jp=e},UX=e=>{Yi=e},CX=e=>{rn=e},jX=VX().then(e=>(Yp=e,e)),Oe=typeof window<"u"?window.electronApi:void 0;let po=null;const Lc=()=>{if(po)return po;try{const e=window.navigator.userAgent;/Android/i.test(e)?po="Android":/iPhone|iPad|iPod/i.test(e)?po="iOS":/Windows/i.test(e)?po="Windows":/Linux/i.test(e)?po="Linux":/Mac/i.test(e)?po="macOS":po="Unknown"}catch{po="Unknown"}return po},QX=()=>Lc()==="Windows",qX=()=>Lc()==="Linux",Xp=()=>Lc()==="macOS",$p=()=>{const e=Lc();return e==="Windows"||e==="Linux"||e==="macOS"},em=e=>Xp()?e.metaKey:e.ctrlKey,H3=e=>{Oe==null||Oe.enableDisableMainMenu(e)},WX="OMEX #",Vc=e=>e.startsWith("http://")||e.startsWith("https://"),tm=e=>`https://cors-proxy.opencor.workers.dev/?url=${e}`,Z3=e=>typeof e=="string"?Yp.h64(e).toString(16).padStart(16,"0"):Yp.h64Raw(e).toString(16).padStart(16,"0"),HX=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},Mt=e=>e instanceof Error?e.message:String(e),ar=(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),rm=(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))},G3=(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)},K3=e=>{const t=e.split(/(\\|\/)/g).pop()||"";try{return decodeURIComponent(t)}catch(r){return console.warn("OpenCOR: failed to decode the file path:",t,Mt(r)),t}},_c=e=>new Promise(t=>{setTimeout(t,e)}),ZX=()=>new Promise(e=>{requestAnimationFrame(e)}),ol=Object.freeze(new Float64Array(0)),J3=Object.freeze({data:ol,unit:""}),al=e=>{const t={};for(const r of e)t[r]={...J3};return t},Y3=Symbol("DialogState"),GX=()=>{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(Y3,r),r},KX=()=>{const e=ue.inject(Y3);if(!e)throw new Error("useDialogState() must be called within a component that has provideDialogState in its ancestor tree.");return e},ca=a.defineComponent({__name:"BaseDialog",emits:["cancel"],setup(e,{emit:t}){const r=t,{incrementDialogs:n,decrementDialogs:i}=KX();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(),H3(!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(),H3(!0),r("cancel"),ue.nextTick(()=>{u&&(u.disconnect(),u=null)})};return(f,p)=>{const m=j3;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(v=>[a.renderSlot(f.$slots,g,a.normalizeProps(a.guardReactiveProps(v)))])}))]),1024)}}}),JX="0.20260729.0",YX={version:JX},{version:nm}=YX,zc=ue.ref(!1),il=ue.ref(""),X3=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."),zc.value=!1,il.value="",!1;const t=await e.json();il.value=t.version;const r=XX(il.value,nm);return zc.value=r,r}catch{return zc.value=!1,il.value="",!1}},XX=(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 $3=null;const $X=()=>{X3(),$3||($3=window.setInterval(()=>{X3()},300*1e3))},sl=e=>(a.pushScopeId("data-v-c05d59eb"),e=e(),a.popScopeId(),e),e$={class:"space-y-7"},t$={class:"text-center"},r$={class:"text-3xl font-bold"},n$={class:"highlight highlight-version"},o$={class:"space-y-2"},a$={class:"text-center"},i$=sl(()=>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)),s$=sl(()=>a.createElementVNode("br",null,null,-1)),l$={key:0,class:"highlight"},u$={key:1},c$=sl(()=>a.createElementVNode("span",{class:"highlight"},"Ctrl",-1)),d$=sl(()=>a.createElementVNode("span",{class:"highlight"},"Shift",-1)),f$=sl(()=>a.createElementVNode("span",{class:"highlight"},"R",-1)),p$=a.defineComponent({__name:"UpdateAvailableDialog",emits:["close"],setup(e){return(t,r)=>{const n=Fn,i=ca;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",e$,[a.createElementVNode("div",t$,[a.createElementVNode("div",r$,[a.createTextVNode("OpenCOR "),a.createElementVNode("span",n$,a.toDisplayString(a.unref(il)),1),a.createTextVNode(" is available!")])]),a.createElementVNode("div",o$,[a.createElementVNode("div",a$,[i$,s$,a.createElementVNode("em",null,[a.createTextVNode("(You can force reload by pressing "),Xp()?(a.openBlock(),a.createElementBlock("span",l$,"⇧⌘R")):(a.openBlock(),a.createElementBlock("span",u$,[c$,a.createTextVNode("+"),d$,a.createTextVNode("+"),f$])),a.createTextVNode(".)")])])])])]),_:1})}}}),mo=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},m$=mo(p$,[["__scopeId","data-v-c05d59eb"]]),h$="opencor",eS=`${h$}://`,g$=0,tS=19,Uc=69,om=169,rS=369,_o=3e3,v$=500,b$=40,nS=new Date().getFullYear(),oS=nS===2025?"2025":`2025-${nS}`;var Ce=(e=>(e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFORMATION=2]="INFORMATION",e))(Ce||{});const am=e=>{const t=[];for(const r of e)r&&t.push({type:r.type.value,description:r.description});return t},ga=class ga{constructor(){zt(this,"_fileManager",null)}static instance(){return ga._instance??(ga._instance=new ga),ga._instance}fileManager(){return this._fileManager??(this._fileManager=$i.FileManager.instance()),this._fileManager}file(t){if(et()){const n=Ye.fileContents(t);return n?new Xi(t,n):null}const r=this.fileManager().files;for(const n of r)if(n&&n.path===t)return new Xi(t,n.contents());return null}unmanage(t){if(et())Ye.fileManagerUnmanage(t);else{const r=this.fileManager(),n=r.files;for(const i of n)if(i&&i.path===t){r.unmanage(i);break}}}};zt(ga,"_instance",null);let im=ga;const sm=im.instance();var Wa=(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))(Wa||{});let Xi=class{constructor(e,t=void 0){zt(this,"_path");zt(this,"_wasmFile",{});zt(this,"_issues",[]);if(this._path=e,et())Ye.fileCreate(e,t),this._issues=Ye.fileIssues(e);else if(t)this._wasmFile=ue.markRaw(new $i.File(e)),this._wasmFile.setContents(t),this._issues=am(this._wasmFile.issues);else{console.warn(`OpenCOR: no contents provided for file '${e}'.`);return}}type(){return et()?Ye.fileType(this._path):this._wasmFile.type.value}path(){return this._path}issues(){return this._issues}contents(){return et()?Ye.fileContents(this._path):this._wasmFile.contents()}document(){return new y$(this._path,this._wasmFile)}uiJson(){let e;if(et()){if(e=Ye.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 aS(r)}};class Cc{constructor(t){zt(this,"_index");this._index=t}}class y${constructor(t,r){zt(this,"_cppDocumentId",-1);zt(this,"_wasmSedDocument",{});zt(this,"_issues",[]);if(et()?this._cppDocumentId=Ye.sedDocumentCreate(t):this._wasmSedDocument=new $i.SedDocument(r),this._issues=et()?Ye.sedDocumentIssues(this._cppDocumentId):am(this._wasmSedDocument.issues),this.modelCount()!==1){this._issues.push({type:Ce.WARNING,description:"Only SED-ML files with one model are currently supported."});return}if(this.simulationCount()!==1){this._issues.push({type:Ce.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:Ce.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:Ce.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:Ce.ERROR,description:`The uniform time course simulation must have different values for 'outputStartTime' (${o}) and 'outputEndTime' (${s}).`}),u<=0&&this._issues.push({type:Ce.ERROR,description:`The uniform time course simulation must have a positive value for 'numberOfSteps' (${u}).`})}issues(){return this._issues}modelCount(){return et()?Ye.sedDocumentModelCount(this._cppDocumentId):this._wasmSedDocument.modelCount}model(t){return new w$(this._cppDocumentId,this._wasmSedDocument,t)}simulationCount(){return et()?Ye.sedDocumentSimulationCount(this._cppDocumentId):this._wasmSedDocument.simulationCount}simulation(t){var n;let r;if(et())r=Ye.sedDocumentSimulationType(this._cppDocumentId,t);else switch((n=this._wasmSedDocument.simulation(t))==null?void 0:n.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 S$(this._cppDocumentId,this._wasmSedDocument,t,r):r===2?new N$(this._cppDocumentId,this._wasmSedDocument,t,r):new k$(this._cppDocumentId,this._wasmSedDocument,t,r)}instantiate(){return new B$(this._cppDocumentId,this._wasmSedDocument)}serialise(){return et()?Ye.sedDocumentSerialise(this._cppDocumentId):this._wasmSedDocument.serialise()}}class w$ extends Cc{constructor(r,n,i){super(i);zt(this,"_cppDocumentId");zt(this,"_wasmSedModel",{});this._cppDocumentId=r,ul()&&(this._wasmSedModel=n.model(i))}file(){var r;return et()?sm.file(Ye.sedModelFilePath(this._cppDocumentId,this._index)):((r=this._wasmSedModel.file)==null?void 0:r.path)!=null?sm.file(this._wasmSedModel.file.path):null}addChange(r,n,i){et()?Ye.sedModelAddChange(this._cppDocumentId,this._index,r,n,i):this._wasmSedModel.addChange(new $i.SedChangeAttribute(r,n,i))}removeAllChanges(){et()?Ye.sedModelRemoveAllChanges(this._cppDocumentId,this._index):this._wasmSedModel.removeAllChanges()}}class jc extends Cc{constructor(r,n,i,o){super(i);zt(this,"_cppDocumentId");zt(this,"_type");this._cppDocumentId=r,this._type=o}type(){return this._type}}class x$ extends jc{}class S$ extends jc{}class N$ extends jc{constructor(r,n,i,o){super(r,n,i,o);zt(this,"_wasmSedOneStep",{});ul()&&(this._wasmSedOneStep=n.simulation(i))}step(){return et()?Ye.sedOneStepStep(this._cppDocumentId,this._index):this._wasmSedOneStep.step}}class k$ extends jc{constructor(r,n,i,o){super(r,n,i,o);zt(this,"_wasmSedUniformTimeCourse",{});ul()&&(this._wasmSedUniformTimeCourse=n.simulation(i))}initialTime(){return et()?Ye.sedUniformTimeCourseInitialTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.initialTime}setInitialTime(r){et()?Ye.sedUniformTimeCourseSetInitialTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.initialTime=r}outputStartTime(){return et()?Ye.sedUniformTimeCourseOutputStartTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputStartTime}setOutputStartTime(r){et()?Ye.sedUniformTimeCourseSetOutputStartTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputStartTime=r}outputEndTime(){return et()?Ye.sedUniformTimeCourseOutputEndTime(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.outputEndTime}setOutputEndTime(r){et()?Ye.sedUniformTimeCourseSetOutputEndTime(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.outputEndTime=r}numberOfSteps(){return et()?Ye.sedUniformTimeCourseNumberOfSteps(this._cppDocumentId,this._index):this._wasmSedUniformTimeCourse.numberOfSteps}setNumberOfSteps(r){et()?Ye.sedUniformTimeCourseSetNumberOfSteps(this._cppDocumentId,this._index,r):this._wasmSedUniformTimeCourse.numberOfSteps=r}cvode(){return new E$(this._cppDocumentId,this._wasmSedUniformTimeCourse,this._index)}}class E$ extends Cc{constructor(r,n,i){super(i);zt(this,"_cppDocumentId");zt(this,"_wasmSolverCvode",{});this._cppDocumentId=r,ul()&&(this._wasmSolverCvode=n.odeSolver)}maximumStep(){return et()?Ye.solverCvodeMaximumStep(this._cppDocumentId,this._index):this._wasmSolverCvode.maximumStep}setMaximumStep(r){et()?Ye.solverCvodeSetMaximumStep(this._cppDocumentId,this._index,r):this._wasmSolverCvode.maximumStep=r}}var gn=(e=>(e[e.IDLE=0]="IDLE",e[e.RUNNING=1]="RUNNING",e[e.PAUSED=2]="PAUSED",e))(gn||{});class B${constructor(t,r){zt(this,"_cppInstanceId",-1);zt(this,"_wasmSedInstance",{});et()?this._cppInstanceId=Ye.sedDocumentInstantiate(t):this._wasmSedInstance=ue.markRaw(r.instantiate())}hasIssues(){return et()?Ye.sedInstanceHasIssues(this._cppInstanceId):this._wasmSedInstance.hasIssues}issues(){return et()?Ye.sedInstanceIssues(this._cppInstanceId):am(this._wasmSedInstance.issues)}task(t){return new D$(this._cppInstanceId,t,this._wasmSedInstance)}status(){return et()?Ye.sedInstanceStatus(this._cppInstanceId):this._wasmSedInstance.status.value}progress(){return et()?Ye.sedInstanceProgress(this._cppInstanceId):this._wasmSedInstance.progress}startRun(){return et()?Ye.sedInstanceStartRun(this._cppInstanceId):this._wasmSedInstance.startRun()}waitForRun(){return et()?Ye.sedInstanceWaitForRun(this._cppInstanceId):this._wasmSedInstance.waitForRun()}pauseRun(){et()?Ye.sedInstancePauseRun(this._cppInstanceId):this._wasmSedInstance.pauseRun()}resumeRun(){et()?Ye.sedInstanceResumeRun(this._cppInstanceId):this._wasmSedInstance.resumeRun()}stopRun(){et()?Ye.sedInstanceStopRun(this._cppInstanceId):this._wasmSedInstance.stopRun()}}class D$ extends Cc{constructor(r,n,i){super(n);zt(this,"_cppInstanceId");zt(this,"_wasmSedInstanceTask",{});this._cppInstanceId=r,ul()&&(this._wasmSedInstanceTask=i.task(n))}voiName(){return et()?Ye.sedInstanceTaskVoiName(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiName}voiUnit(){return et()?Ye.sedInstanceTaskVoiUnit(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voiUnit}voi(){return et()?Ye.sedInstanceTaskVoi(this._cppInstanceId,this._index):this._wasmSedInstanceTask.voi}stateCount(){return et()?Ye.sedInstanceTaskStateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.stateCount}stateName(r){return et()?Ye.sedInstanceTaskStateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateName(r)}stateUnit(r){return et()?Ye.sedInstanceTaskStateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.stateUnit(r)}state(r){return et()?Ye.sedInstanceTaskState(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.state(r)}rateCount(){return et()?Ye.sedInstanceTaskRateCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.rateCount}rateName(r){return et()?Ye.sedInstanceTaskRateName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateName(r)}rateUnit(r){return et()?Ye.sedInstanceTaskRateUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rateUnit(r)}rate(r){return et()?Ye.sedInstanceTaskRate(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.rate(r)}constantCount(){return et()?Ye.sedInstanceTaskConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.constantCount}constantName(r){return et()?Ye.sedInstanceTaskConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantName(r)}constantUnit(r){return et()?Ye.sedInstanceTaskConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constantUnit(r)}constant(r){return et()?Ye.sedInstanceTaskConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.constant(r)}computedConstantCount(){return et()?Ye.sedInstanceTaskComputedConstantCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.computedConstantCount}computedConstantName(r){return et()?Ye.sedInstanceTaskComputedConstantName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantName(r)}computedConstantUnit(r){return et()?Ye.sedInstanceTaskComputedConstantUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstantUnit(r)}computedConstant(r){return et()?Ye.sedInstanceTaskComputedConstant(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.computedConstant(r)}algebraicVariableCount(){return et()?Ye.sedInstanceTaskAlgebraicVariableCount(this._cppInstanceId,this._index):this._wasmSedInstanceTask.algebraicVariableCount}algebraicVariableName(r){return et()?Ye.sedInstanceTaskAlgebraicVariableName(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableName(r)}algebraicVariableUnit(r){return et()?Ye.sedInstanceTaskAlgebraicVariableUnit(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariableUnit(r)}algebraicVariable(r){return et()?Ye.sedInstanceTaskAlgebraicVariable(this._cppInstanceId,this._index,r):this._wasmSedInstanceTask.algebraicVariable(r)}}const ll=e=>"maximumValue"in e&&"minimumValue"in e,Ha=e=>"possibleValues"in e,lm=(e,t)=>t instanceof Float64Array?Array.from(t):t,aS=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},M$=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},iS=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)},Qc=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]}`},um=(e,t)=>{if(!e)return[{type:Ce.WARNING,description:"UI JSON: no UI JSON was provided."}];e=iS(e);const r=new W3.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(M$(e),n,{nestedErrors:!0});if(!i.valid){const p=[];for(const m of String(i).split(`
1136
1136
  `))m&&p.push({type:Ce.WARNING,description:`UI JSON: ${ar(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:Ce.WARNING,description:`UI JSON: an input id must be unique ('${p.id}' is used more than once).`}),c[p.id]=!0):u.push({type:Ce.WARNING,description:"UI JSON: an input id must not be empty."}),p.name||u.push({type:Ce.WARNING,description:"UI JSON: an input name must not be empty."}),"possibleValues"in p){for(const v of p.possibleValues)v.name||u.push({type:Ce.WARNING,description:"UI JSON: an input possible value name must not be empty."});const m=p.possibleValues.map(v=>v.value),h=Qc(new Set(m.map(v=>String(v)))),g={};for(const v of m)g[v]&&u.push({type:Ce.WARNING,description:`UI JSON: an input possible value must have a unique value ('${v}' is used more than once).`}),g[v]=!0;m.includes(p.defaultValue)||u.push({type:Ce.WARNING,description:`UI JSON: an input default value must be one of the possible values ('${p.defaultValue}' is not one of ${h}).`})}if(ll(p)){p.minimumValue>=p.maximumValue&&u.push({type:Ce.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:Ce.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:Ce.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}).`}),rm(m,p.stepValue)||u.push({type:Ce.WARNING,description:`UI JSON: an input step value must be a factor of the range value (${p.stepValue} is not a factor of ${m}).`})):rm(m,1)||u.push({type:Ce.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:Ce.WARNING,description:"UI JSON: an input visible must not be empty."})}const l={},d=Qc(o);for(const p of e.output.data)p.id||u.push({type:Ce.WARNING,description:"UI JSON: an output data id must not be empty."}),l[p.id]&&u.push({type:Ce.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:Ce.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:Ce.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{Yi.parse(p.voiExpression)}catch(v){u.push({type:Ce.WARNING,description:`UI JSON: an output external data VOI expression must be valid ('${p.voiExpression}' is not: ${ar(Mt(v),!1)}).`})}p.voiValues.length||u.push({type:Ce.WARNING,description:"UI JSON: an output external data VOI values must not be empty."});const m={};for(const v of p.dataSeries)m[v.name]&&u.push({type:Ce.WARNING,description:`UI JSON: an output external data series name must be unique ('${v.name}' is used more than once).`}),m[v.name]=!0,v.name||u.push({type:Ce.WARNING,description:"UI JSON: an output external data series name must not be empty."}),v.values.length||u.push({type:Ce.WARNING,description:"UI JSON: an output external data series values must not be empty."}),v.values.length!==p.voiValues.length&&u.push({type:Ce.WARNING,description:`UI JSON: an output external data series values length must match the output external data VOI values length (${v.values.length} is not equal to ${p.voiValues.length}).`});const h={},g=Qc(new Set(Object.keys(m)));for(const v of p.data)v.id||u.push({type:Ce.WARNING,description:"UI JSON: an output external data id must not be empty."}),h[v.id]&&u.push({type:Ce.WARNING,description:`UI JSON: an output external data id must be unique ('${v.id}' is used more than once).`}),h[v.id]=!0,v.id&&l[v.id]&&u.push({type:Ce.WARNING,description:`UI JSON: an output external data id must be unique across simulation and external data ('${v.id}' is used more than once).`}),v.id&&(l[v.id]=!0),v.name||u.push({type:Ce.WARNING,description:"UI JSON: an output external data name must not be empty."}),m[v.name]||u.push({type:Ce.WARNING,description:`UI JSON: an output external data name must match one of the available options ('${v.name}' is not one of ${g}).`});p.dataSeries.length||u.push({type:Ce.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{Yi.parse(h)}catch(v){u.push({type:Ce.WARNING,description:`UI JSON: an output plot ${g} must be valid ('${h}' is not: ${ar(Mt(v),!1)}).`})}};if(p.xValue?m(p.xValue,"X value"):u.push({type:Ce.WARNING,description:"UI JSON: an output plot X value must not be empty."}),p.yValue?m(p.yValue,"Y value"):u.push({type:Ce.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:Ce.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:Ce.WARNING,description:"UI JSON: an output plot additional trace Y value must not be empty."})}const f=Qc(s);for(const p of e.parameters)if(p.name?s.size>0&&!s.has(p.name)&&u.push({type:Ce.WARNING,description:`UI JSON: a parameter name must match one of the available options ('${p.name}' is not one of ${f}).`}):u.push({type:Ce.WARNING,description:"UI JSON: a parameter name must not be empty."}),!p.value)u.push({type:Ce.WARNING,description:"UI JSON: a parameter value must not be empty."});else try{Yi.parse(p.value)}catch(m){u.push({type:Ce.WARNING,description:`UI JSON: a parameter value must be valid ('${p.value}' is not: ${ar(Mt(m),!1)}).`})}return u},et=()=>Oe!==void 0,ul=()=>!et(),A$=()=>et()?Ye.version():$i.versionString();let Ye={},$i={};const T$=e=>{Ye=e},I$=e=>{$i=e},F$={class:"space-y-7"},O$={class:"text-center"},R$={class:"text-3xl font-bold"},P$={key:0,class:"text-xl italic font-bold"},L$={class:"text-sm italic"},V$={class:"space-y-2"},_$=a.createElementVNode("a",{href:"https://opencor.ws/",target:"_blank",rel:"noopener"},"OpenCOR",-1),z$=a.createElementVNode("a",{href:"https://opencor.ws/libopencor/",target:"_blank",rel:"noopener"},"libOpenCOR",-1),U$=a.createElementVNode("a",{href:"https://cellml.org/",target:"_blank",rel:"noopener"},"CellML",-1),C$=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),j$=a.defineComponent({__name:"AboutDialog",emits:["close"],setup(e){return(t,r)=>{const n=Fn,i=ca;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",F$,[a.createElementVNode("div",O$,[a.createElementVNode("div",R$,"OpenCOR "+a.toDisplayString(a.unref(nm)),1),a.unref(Oe)?(a.openBlock(),a.createElementBlock("div",P$,a.toDisplayString(a.unref(Oe).operatingSystem()),1)):a.createCommentVNode("",!0),a.createElementVNode("div",L$,"Copyright "+a.toDisplayString(a.unref(oS)),1)]),a.createElementVNode("div",V$,[a.createElementVNode("div",null,[_$,a.createTextVNode(" is a frontend to "),z$,a.createTextVNode(" "+a.toDisplayString(A$())+", a library that can be used to organise, edit, simulate, and analyse ",1),U$,a.createTextVNode(" files. ")]),C$])])]),_:1})}}});var da={name:"CheckIcon",extends:Ct};function Q$(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)}da.render=Q$;var cm={name:"MinusIcon",extends:Ct};function q$(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)}cm.render=q$;var qc={name:"BaseEditableHolder",extends:lt,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 Qe(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}}},cl={name:"BaseInput",extends:qc,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}}},W$=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=qde,document.head.appendChild(e)}const ES=[{name:"jsonschema",url:"https://cdn.jsdelivr.net/npm/jsonschema@1.5.0/+esm",set:e=>_X(e)},{name:"JSZip",url:"https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm",set:e=>zX(e)},{name:"Math.js",url:"https://cdn.jsdelivr.net/npm/mathjs@15.2.0/+esm",set:e=>UX(e)},{name:"Plotly.js",url:"https://cdn.jsdelivr.net/npm/plotly.js-gl2d-dist-min@3.6.0/+esm",set:e=>CX(e)}],rs=ue.ref(0),Wde=(Oe?0:2)+ES.reduce((e,t)=>e+(t.url?1:0)+(t.cssUrl?1:0),0)+1,Hde=async()=>{if(window.locApi)T$(window.locApi);else try{const e=(await import("https://opencor.ws/libopencor/downloads/wasm/1.20260723.2/libopencor.js")).default;++rs.value,I$(await e()),++rs.value}catch(e){throw console.error("OpenCOR: failed to load libOpenCOR:",Mt(e)),e}},BS=new Set,Zde=(e,t,r,n)=>async()=>{try{const i=await import(t);if(r(i.default??i),++rs.value,n){if(!BS.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),BS.add(n)}++rs.value}}catch(i){throw console.error(`OpenCOR: failed to import ${e??t}:`,Mt(i)),i}},bm=e=>{bl.value.length||bl.value.push({type:Ce.INFORMATION,description:"An error occurred while initialising OpenCOR. Please check your setup and reload the page."}),bl.value.splice(Math.max(0,bl.value.length-1),0,{type:Ce.ERROR,description:ar(Mt(e))}),DS.value=!0};Hde().catch(e=>{bm(e)});for(const e of ES)Zde(e.name,e.url,e.set,e.cssUrl)().catch(t=>{bm(t)});jX.then(()=>{++rs.value}).catch(e=>{bm(e)});const Gde=ue.computed(()=>MS.value>=100),DS=ue.ref(!1),bl=ue.ref([]),MS=ue.computed(()=>Math.round(100*rs.value/Wde)),AS=(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 (${ar(Mt(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}},Kde=async e=>{const t="application/x.vnd.zip-cellml+zip",r=AS(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 (${ar(Mt(n),!1)}).`}}}return{res:!1}},Jde=e=>{const t=AS(e,"application/zip");return t.res?t.data?{res:!0,data:t.data}:t:{res:!1}},yl=(e,t,r)=>t||(r?`${WX}${r}`:e instanceof File?Oe?Oe.filePath(e):e.name:typeof e=="string"?e:Z3(e)),Yde=(e,t,r)=>typeof e=="string"?Vc(e)?new Promise((n,i)=>{fetch(tm(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(Mt(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 Xi(yl(e,t,r),s))}).catch(o=>{i(new Error(Mt(o)))})}):new Promise((n,i)=>{Oe?n(new Xi(yl(e,t,r))):i(new Error("Local files cannot be opened."))}):e instanceof Uint8Array?new Promise(n=>{n(new Xi(yl(e,t,r),e))}):new Promise((n,i)=>{e.arrayBuffer().then(o=>{const s=new Uint8Array(o);n(new Xi(yl(e,t,r),s))}).catch(o=>{i(new Error(Mt(o)))})});var wl=(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))(wl||{});const Xc=(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}},$c=(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{...J3}}};function TS(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function IS(e){let t=!1,r;const n=a.effectScope(!0);return(...i)=>(t||(r=n.run(()=>e(...i)),t=!0),r)}const Xde=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $de=Object.prototype.toString,efe=e=>$de.call(e)==="[object Object]";function ym(e){return Array.isArray(e)?e:[e]}function tfe(e,t,r){return a.watch(e,t,{...r,immediate:!0})}const ed=Xde?window:void 0;function wm(e){var t;const r=a.toValue(e);return(t=r==null?void 0:r.$el)!=null?t:r}function xm(...e){const t=[],r=()=>{t.forEach(u=>u()),t.length=0},n=(u,c,l,d)=>(u.addEventListener(c,l,d),()=>u.removeEventListener(c,l,d)),i=a.computed(()=>{const u=ym(a.toValue(e[0])).filter(c=>c!=null);return u.every(c=>typeof c!="string")?u:void 0}),o=tfe(()=>{var u,c;return[(c=(u=i.value)==null?void 0:u.map(l=>wm(l)))!=null?c:[ed].filter(l=>l!=null),ym(a.toValue(i.value?e[1]:e[0])),ym(a.unref(i.value?e[2]:e[1])),a.toValue(i.value?e[3]:e[2])]},([u,c,l,d])=>{if(r(),!(u!=null&&u.length)||!(c!=null&&c.length)||!(l!=null&&l.length))return;const f=efe(d)?{...d}:d;t.push(...u.flatMap(p=>c.flatMap(m=>l.map(h=>n(p,m,h,f)))))},{flush:"post"}),s=()=>{o(),r()};return TS(r),s}function rfe(){const e=a.shallowRef(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function nfe(e){const t=rfe();return a.computed(()=>(t.value,!!e()))}function ofe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Sm(...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=ed,eventName:o="keydown",passive:s=!1,dedupe:u=!1}=n,c=ofe(t);return xm(i,o,l=>{l.repeat&&a.toValue(u)||c(l)&&r(l)},s)}function FS(e,t,r={}){const{window:n=ed,...i}=r;let o;const s=nfe(()=>n&&"ResizeObserver"in n),u=()=>{o&&(o.disconnect(),o=void 0)},c=a.computed(()=>{const f=a.toValue(e);return Array.isArray(f)?f.map(p=>wm(p)):[wm(f)]}),l=a.watch(c,f=>{if(u(),s.value&&n){o=new ResizeObserver(t);for(const p of f)p&&o.observe(p,i)}},{immediate:!0,flush:"post"}),d=()=>{u(),l()};return TS(d),{isSupported:s,stop:d}}function afe(e={}){const{window:t=ed}=e;if(!t)return a.shallowRef(!1);const r=a.shallowRef(t.document.hasFocus()),n={passive:!0};return xm(t,"blur",()=>{r.value=!1},n),xm(t,"focus",()=>{r.value=!0},n),r}const ife=IS(()=>ue.ref(null)),OS=IS(()=>{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}}),sfe=(e,t,r)=>{const n=()=>{const o=e.offsetHeight;t.style.setProperty(r,`${o}px`)};n();const{stop:i}=FS(e,()=>{n()},{box:"border-box"});return i},xl=e=>{const t=ue.shallowRef(void 0),r="opencor-overlay-container";return ue.onMounted(()=>{var i;const n=(i=e.value)==null?void 0:i.closest(".opencor");if(n){let o=n.querySelector(`.${r}`);if(!o){const s=document.createElement("div");s.className=r,s.style.cssText="position: fixed; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 99999;",s.appendChild(Object.assign(document.createElement("style"),{textContent:`.${r} > * { pointer-events: auto; }`})),n.appendChild(s);const u=()=>{s.style.top=`-${window.scrollY}px`,s.style.left=`-${window.scrollX}px`};u(),window.addEventListener("scroll",u,{passive:!0}),o=s}t.value=o}}),t};var lfe=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=qde,document.head.appendChild(e)}const ES=[{name:"jsonschema",url:"https://cdn.jsdelivr.net/npm/jsonschema@1.5.0/+esm",set:e=>_X(e)},{name:"JSZip",url:"https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm",set:e=>zX(e)},{name:"Math.js",url:"https://cdn.jsdelivr.net/npm/mathjs@15.2.0/+esm",set:e=>UX(e)},{name:"Plotly.js",url:"https://cdn.jsdelivr.net/npm/plotly.js-gl2d-dist-min@3.6.0/+esm",set:e=>CX(e)}],rs=ue.ref(0),Wde=(Oe?0:2)+ES.reduce((e,t)=>e+(t.url?1:0)+(t.cssUrl?1:0),0)+1,Hde=async()=>{if(window.locApi)T$(window.locApi);else try{const e=(await import(new URL("./libopencor/wasm/1.20260723.2/libopencor.js",window.location.href).href)).default;++rs.value,I$(await e({locateFile:t=>`https://opencor.ws/libopencor/downloads/wasm/1.20260723.2/${t}`})),++rs.value}catch(e){throw console.error("OpenCOR: failed to load libOpenCOR:",Mt(e)),e}},BS=new Set,Zde=(e,t,r,n)=>async()=>{try{const i=await import(t);if(r(i.default??i),++rs.value,n){if(!BS.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),BS.add(n)}++rs.value}}catch(i){throw console.error(`OpenCOR: failed to import ${e??t}:`,Mt(i)),i}},bm=e=>{bl.value.length||bl.value.push({type:Ce.INFORMATION,description:"An error occurred while initialising OpenCOR. Please check your setup and reload the page."}),bl.value.splice(Math.max(0,bl.value.length-1),0,{type:Ce.ERROR,description:ar(Mt(e))}),DS.value=!0};Hde().catch(e=>{bm(e)});for(const e of ES)Zde(e.name,e.url,e.set,e.cssUrl)().catch(t=>{bm(t)});jX.then(()=>{++rs.value}).catch(e=>{bm(e)});const Gde=ue.computed(()=>MS.value>=100),DS=ue.ref(!1),bl=ue.ref([]),MS=ue.computed(()=>Math.round(100*rs.value/Wde)),AS=(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 (${ar(Mt(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}},Kde=async e=>{const t="application/x.vnd.zip-cellml+zip",r=AS(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 (${ar(Mt(n),!1)}).`}}}return{res:!1}},Jde=e=>{const t=AS(e,"application/zip");return t.res?t.data?{res:!0,data:t.data}:t:{res:!1}},yl=(e,t,r)=>t||(r?`${WX}${r}`:e instanceof File?Oe?Oe.filePath(e):e.name:typeof e=="string"?e:Z3(e)),Yde=(e,t,r)=>typeof e=="string"?Vc(e)?new Promise((n,i)=>{fetch(tm(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(Mt(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 Xi(yl(e,t,r),s))}).catch(o=>{i(new Error(Mt(o)))})}):new Promise((n,i)=>{Oe?n(new Xi(yl(e,t,r))):i(new Error("Local files cannot be opened."))}):e instanceof Uint8Array?new Promise(n=>{n(new Xi(yl(e,t,r),e))}):new Promise((n,i)=>{e.arrayBuffer().then(o=>{const s=new Uint8Array(o);n(new Xi(yl(e,t,r),s))}).catch(o=>{i(new Error(Mt(o)))})});var wl=(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))(wl||{});const Xc=(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}},$c=(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{...J3}}};function TS(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function IS(e){let t=!1,r;const n=a.effectScope(!0);return(...i)=>(t||(r=n.run(()=>e(...i)),t=!0),r)}const Xde=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $de=Object.prototype.toString,efe=e=>$de.call(e)==="[object Object]";function ym(e){return Array.isArray(e)?e:[e]}function tfe(e,t,r){return a.watch(e,t,{...r,immediate:!0})}const ed=Xde?window:void 0;function wm(e){var t;const r=a.toValue(e);return(t=r==null?void 0:r.$el)!=null?t:r}function xm(...e){const t=[],r=()=>{t.forEach(u=>u()),t.length=0},n=(u,c,l,d)=>(u.addEventListener(c,l,d),()=>u.removeEventListener(c,l,d)),i=a.computed(()=>{const u=ym(a.toValue(e[0])).filter(c=>c!=null);return u.every(c=>typeof c!="string")?u:void 0}),o=tfe(()=>{var u,c;return[(c=(u=i.value)==null?void 0:u.map(l=>wm(l)))!=null?c:[ed].filter(l=>l!=null),ym(a.toValue(i.value?e[1]:e[0])),ym(a.unref(i.value?e[2]:e[1])),a.toValue(i.value?e[3]:e[2])]},([u,c,l,d])=>{if(r(),!(u!=null&&u.length)||!(c!=null&&c.length)||!(l!=null&&l.length))return;const f=efe(d)?{...d}:d;t.push(...u.flatMap(p=>c.flatMap(m=>l.map(h=>n(p,m,h,f)))))},{flush:"post"}),s=()=>{o(),r()};return TS(r),s}function rfe(){const e=a.shallowRef(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},t),e}function nfe(e){const t=rfe();return a.computed(()=>(t.value,!!e()))}function ofe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Sm(...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=ed,eventName:o="keydown",passive:s=!1,dedupe:u=!1}=n,c=ofe(t);return xm(i,o,l=>{l.repeat&&a.toValue(u)||c(l)&&r(l)},s)}function FS(e,t,r={}){const{window:n=ed,...i}=r;let o;const s=nfe(()=>n&&"ResizeObserver"in n),u=()=>{o&&(o.disconnect(),o=void 0)},c=a.computed(()=>{const f=a.toValue(e);return Array.isArray(f)?f.map(p=>wm(p)):[wm(f)]}),l=a.watch(c,f=>{if(u(),s.value&&n){o=new ResizeObserver(t);for(const p of f)p&&o.observe(p,i)}},{immediate:!0,flush:"post"}),d=()=>{u(),l()};return TS(d),{isSupported:s,stop:d}}function afe(e={}){const{window:t=ed}=e;if(!t)return a.shallowRef(!1);const r=a.shallowRef(t.document.hasFocus()),n={passive:!0};return xm(t,"blur",()=>{r.value=!1},n),xm(t,"focus",()=>{r.value=!0},n),r}const ife=IS(()=>ue.ref(null)),OS=IS(()=>{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}}),sfe=(e,t,r)=>{const n=()=>{const o=e.offsetHeight;t.style.setProperty(r,`${o}px`)};n();const{stop:i}=FS(e,()=>{n()},{box:"border-box"});return i},xl=e=>{const t=ue.shallowRef(void 0),r="opencor-overlay-container";return ue.onMounted(()=>{var i;const n=(i=e.value)==null?void 0:i.closest(".opencor");if(n){let o=n.querySelector(`.${r}`);if(!o){const s=document.createElement("div");s.className=r,s.style.cssText="position: fixed; top: 0; left: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 99999;",s.appendChild(Object.assign(document.createElement("style"),{textContent:`.${r} > * { pointer-events: auto; }`})),n.appendChild(s);const u=()=>{s.style.top=`-${window.scrollY}px`,s.style.left=`-${window.scrollX}px`};u(),window.addEventListener("scroll",u,{passive:!0}),o=s}t.value=o}}),t};var lfe=function(e){var t=e.dt;return`
2222
2222
  .p-tabs {
2223
2223
  display: flex;
2224
2224
  flex-direction: column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/simulationvuer",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vite serve --host --force",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@abi-software/plotvuer": "1.0.7",
24
- "@opencor/opencor": "^0.20260728.1",
24
+ "@opencor/opencor": "^0.20260729.0",
25
25
  "element-plus": "2.8.4",
26
26
  "jsonschema": "^1.5.0",
27
27
  "mathjs": "^15.2.0",
package/vite.config.js CHANGED
@@ -10,17 +10,6 @@ import { defineConfig } from "vite";
10
10
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
11
11
  const pathSrc = path.resolve(__dirname, "./src");
12
12
 
13
- // Retrieve the version of libOpenCOR used by @opencor/opencor.
14
-
15
- const opencorPackage = JSON.parse(
16
- fs.readFileSync(
17
- path.resolve(__dirname, "node_modules/@opencor/opencor/package.json"),
18
- "utf-8",
19
- ),
20
- );
21
- const libopencorVersion = opencorPackage.libopencorVersion;
22
- const libopencorUrl = `https://opencor.ws/libopencor/downloads/wasm/${libopencorVersion}`;
23
-
24
13
  export default defineConfig(({ command, mode }) => {
25
14
  const config = {
26
15
  plugins: [
@@ -38,44 +27,41 @@ export default defineConfig(({ command, mode }) => {
38
27
  dts: "src/components.d.ts",
39
28
  }),
40
29
 
41
- // Rewrite the libOpenCOR import URL in @opencor/opencor to a same-origin path. This is needed because
42
- // libopencor.js constructs pthread workers via new Worker(), which requires the worker script to be
43
- // same-origin with the page. The actual files are served by the dev server proxy (see below).
30
+ // Serve the local libopencor/ directory from @opencor/opencor so that the dynamic import in opencor.es.js (new
31
+ // URL("./libopencor/wasm/...", window.location.href)) resolves same-origin. libopencor.js itself is bundled in
32
+ // the package while the threaded WASM is loaded from opencor.ws via locateFile.
44
33
 
45
34
  {
46
- name: "opencor-local-libopencor",
47
- enforce: "pre",
48
-
49
- // Tell Vite that /libopencor/* paths are external.
50
- // Note: they are served via the dev server proxy, so Vite should not try to resolve them locally.
51
-
52
- resolveId(id) {
53
- if (id.startsWith("/libopencor/")) {
54
- return { id, external: true };
55
- }
56
- },
57
-
58
- // Rewrite the libOpenCOR URL to same-origin path for @opencor/opencor.
59
- // Note: this is needed so the worker constructed inside libopencor.js is same-origin (i.e. no CORS error).
60
- // For production, the target server should be configured to serve /libopencor/* files.
61
-
62
- transform(code, id) {
63
- if (command !== "serve") {
64
- return;
65
- }
66
-
67
- if (
68
- id.includes("@opencor/opencor") &&
69
- !id.split("?")[0].endsWith(".css")
70
- ) {
71
- return {
72
- code: code.replace(
73
- /"https:\/\/opencor\.ws\/libopencor\/downloads\/wasm\/[^/]+\/libopencor\.js"/g,
74
- '"/libopencor/libopencor.js"',
75
- ),
76
- map: null,
77
- };
78
- }
35
+ name: "opencor-serve-local-libopencor",
36
+ configureServer(server) {
37
+ const libopencorDir = path.resolve(
38
+ __dirname,
39
+ "node_modules/@opencor/opencor/dist/libopencor",
40
+ );
41
+
42
+ server.middlewares.use((req, res, next) => {
43
+ const urlPath = req.url;
44
+
45
+ if (urlPath.startsWith("/libopencor/")) {
46
+ const filePath = path.join(
47
+ libopencorDir,
48
+ urlPath.replace("/libopencor/", ""),
49
+ );
50
+
51
+ if (fs.existsSync(filePath)) {
52
+ res.writeHead(200, {
53
+ "Content-Type": "application/javascript",
54
+ "Cross-Origin-Embedder-Policy": "require-corp",
55
+ "Cross-Origin-Resource-Policy": "same-origin",
56
+ });
57
+ res.end(fs.readFileSync(filePath));
58
+
59
+ return;
60
+ }
61
+ }
62
+
63
+ next();
64
+ });
79
65
  },
80
66
  },
81
67
  ],
@@ -115,17 +101,6 @@ export default defineConfig(({ command, mode }) => {
115
101
  config.server = {
116
102
  port: 8081,
117
103
 
118
- // Proxy /libopencor/* requests to the libOpenCOR server, so the worker constructed inside libopencor.js loads
119
- // from a same-origin path (new Worker() requires the worker script to be same-origin with the page).
120
-
121
- proxy: {
122
- "/libopencor": {
123
- target: libopencorUrl,
124
- changeOrigin: true,
125
- rewrite: (path) => path.replace(/^\/libopencor/, ""),
126
- },
127
- },
128
-
129
104
  // Emscripten pthreads require SharedArrayBuffer, which needs cross-origin isolation.
130
105
 
131
106
  headers: {
@@ -133,13 +108,6 @@ export default defineConfig(({ command, mode }) => {
133
108
  "Cross-Origin-Embedder-Policy": "require-corp",
134
109
  },
135
110
  };
136
-
137
- // Exclude @opencor/opencor from Vite's pre-bundling so our transform plugin above can rewrite the import URL in
138
- // opencor.es.js.
139
-
140
- config.optimizeDeps = {
141
- exclude: ["@opencor/opencor"],
142
- };
143
111
  config.define = {
144
112
  "process.env.HTTP_PROXY": 8081,
145
113
  global: "globalThis",