diff --git a/develop/assets/FileSaver.min-d51f946c.js b/develop/assets/FileSaver.min-f8ebd46c.js similarity index 97% rename from develop/assets/FileSaver.min-d51f946c.js rename to develop/assets/FileSaver.min-f8ebd46c.js index 233f172..fb7d3b4 100644 --- a/develop/assets/FileSaver.min-d51f946c.js +++ b/develop/assets/FileSaver.min-f8ebd46c.js @@ -1 +1 @@ -import{g as O,c as d}from"./index-42d3d144.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){console.error("could not download file")},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; +import{g as O,c as d}from"./index-9aa800aa.js";function A(u,v){for(var l=0;lr[c]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}};(function(u,v){(function(l,r){r()})(d,function(){function l(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){p(o.response,t,i)},o.onerror=function(){console.error("could not download file")},o.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof d=="object"&&d.global===d?d:void 0,y=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!y?function(e,t,i){var o=a.URL||a.webkitURL,n=document.createElement("a");t=t||e.name||"download",n.download=t,n.rel="noopener",typeof e=="string"?(n.href=e,n.origin===location.origin?s(n):c(n.href)?r(e,t,i):s(n,n.target="_blank")):(n.href=o.createObjectURL(e),setTimeout(function(){o.revokeObjectURL(n.href)},4e4),setTimeout(function(){s(n)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(l(e,i),t);else if(c(e))r(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){s(o)})}}:function(e,t,i,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var n=e.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||n&&g||y)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var f=m.result;f=b?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location=f,o=null},m.readAsDataURL(e)}else{var j=a.URL||a.webkitURL,w=j.createObjectURL(e);o?o.location=w:location.href=w,o=null,setTimeout(function(){j.revokeObjectURL(w)},4e4)}});a.saveAs=p.saveAs=p,u.exports=p})})(E);var h=E.exports;const L=O(h),S=A({__proto__:null,default:L},[h]);export{S as F}; diff --git a/develop/assets/index-42d3d144.js b/develop/assets/index-9aa800aa.js similarity index 99% rename from develop/assets/index-42d3d144.js rename to develop/assets/index-9aa800aa.js index dbd6b5c..5a06337 100644 --- a/develop/assets/index-42d3d144.js +++ b/develop/assets/index-9aa800aa.js @@ -53,7 +53,7 @@ function print() { __p += __j.call(arguments, '') } `)+ne+`return __p }`;var je=rm(function(){return bt(W,ke+"return "+ne).apply(t,T)});if(je.source=ne,gh(je))throw je;return je}function _W(a){return $t(a).toLowerCase()}function WW(a){return $t(a).toUpperCase()}function xW(a,c,d){if(a=$t(a),a&&(d||c===t))return Op(a);if(!a||!(c=mn(c)))return a;var m=Kn(a),w=Kn(c),W=dp(m,w),T=pp(m,w)+1;return as(m,W,T).join("")}function CW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.slice(0,mp(a)+1);if(!a||!(c=mn(c)))return a;var m=Kn(a),w=pp(m,Kn(c))+1;return as(m,0,w).join("")}function XW(a,c,d){if(a=$t(a),a&&(d||c===t))return a.replace(Xt,"");if(!a||!(c=mn(c)))return a;var m=Kn(a),w=dp(m,Kn(c));return as(m,w).join("")}function TW(a,c){var d=z,m=oe;if(Ft(c)){var w="separator"in c?c.separator:w;d="length"in c?Le(c.length):d,m="omission"in c?mn(c.omission):m}a=$t(a);var W=a.length;if(rl(a)){var T=Kn(a);W=T.length}if(d>=W)return a;var A=d-sl(m);if(A<1)return m;var M=T?as(T,0,A).join(""):a.slice(0,A);if(w===t)return M+m;if(T&&(A+=M.length-A),mh(w)){if(a.slice(A).search(w)){var J,ee=M;for(w.global||(w=Zu(w.source,$t(ce.exec(w))+"g")),w.lastIndex=0;J=w.exec(ee);)var ne=J.index;M=M.slice(0,ne===t?A:ne)}}else if(a.indexOf(mn(w),A)!=A){var Oe=M.lastIndexOf(w);Oe>-1&&(M=M.slice(0,Oe))}return M+m}function ZW(a){return a=$t(a),a&&ri.test(a)?a.replace(Vt,av):a}var RW=hl(function(a,c,d){return a+(d?" ":"")+c.toUpperCase()}),$h=sg("toUpperCase");function nm(a,c,d){return a=$t(a),c=d?t:c,c===t?nv(a)?uv(a):jy(a):a.match(c)||[]}var rm=He(function(a,c){try{return pn(a,t,c)}catch(d){return gh(d)?d:new De(d)}}),AW=Yr(function(a,c){return Zn(c,function(d){d=Or(d),Ar(a,d,dh(a[d],a))}),a});function UW(a){var c=a==null?0:a.length,d=Te();return a=c?zt(a,function(m){if(typeof m[1]!="function")throw new Rn(l);return[d(m[0]),m[1]]}):[],He(function(m){for(var w=-1;++wXe)return[];var d=pt,m=Ei(a,pt);c=Te(c),a-=pt;for(var w=Cu(m,c);++d0||c<0)?new at(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),c!==t&&(c=Le(c),d=c<0?d.dropRight(-c):d.take(c-a)),d)},at.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},at.prototype.toArray=function(){return this.take(pt)},ur(at.prototype,function(a,c){var d=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),w=P[m?"take"+(c=="last"?"Right":""):c],W=m||/^find/.test(c);w&&(P.prototype[c]=function(){var T=this.__wrapped__,A=m?[1]:arguments,M=T instanceof at,J=A[0],ee=M||Ie(T),ne=function(lt){var ht=w.apply(P,is([lt],A));return m&&Oe?ht[0]:ht};ee&&d&&typeof J=="function"&&J.length!=1&&(M=ee=!1);var Oe=this.__chain__,ke=!!this.__actions__.length,Re=W&&!Oe,je=M&&!ke;if(!W&&ee){T=je?T:new at(this);var Ae=a.apply(T,A);return Ae.__actions__.push({func:cf,args:[ne],thisArg:t}),new An(Ae,Oe)}return Re&&je?a.apply(this,A):(Ae=this.thru(ne),Re?m?Ae.value()[0]:Ae.value():Ae)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(a){var c=Aa[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);P.prototype[a]=function(){var w=arguments;if(m&&!this.__chain__){var W=this.value();return c.apply(Ie(W)?W:[],w)}return this[d](function(T){return c.apply(Ie(T)?T:[],w)})}}),ur(at.prototype,function(a,c){var d=P[c];if(d){var m=d.name+"";yt.call(fl,m)||(fl[m]=[]),fl[m].push({name:c,func:d})}}),fl[nf(t,_).name]=[{name:"wrapper",func:t}],at.prototype.clone=Zv,at.prototype.reverse=Rv,at.prototype.value=Av,P.prototype.at=ck,P.prototype.chain=uk,P.prototype.commit=hk,P.prototype.next=Ok,P.prototype.plant=pk,P.prototype.reverse=gk,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=mk,P.prototype.first=P.prototype.head,io&&(P.prototype[io]=dk),P},ll=hv();Ts?((Ts.exports=ll)._=ll,wu._=ll):_i._=ll}).call(ko)})(qc,qc.exports);var X9=qc.exports;const T9=_s.define({parser:G4.configure({props:[Ll.add({ParenthesisedExpression:us({closing:")",align:!1}),Application:us({closing:")",align:!1}),GeneratorCallGenerators:us({closing:")",align:!1}),LetItems:us({closing:"}",align:!1}),ArrayLiteral:us({closing:"]",align:!1}),ArrayLiteral2d:us({closing:"|]",align:!1}),SetLiteral:us({closing:"}",align:!1})}),Bl.add({ParenthesisedExpression:Sr,Application:Sr,GeneratorCallGenerators:Sr,LetItems:Sr,ArrayLiteral:Sr,ArrayLiteral2d:Sr,SetLiteral:Sr}),Nl({Keyword:S.keyword,"Identifier QuotedIdentifier":S.variableName,"Call/Identifier Call/QuotedIdentifier GeneratorCall/Identifier GeneratorCall/QuotedIdentifier":S.name,Absent:S.null,Anonymous:S.null,BooleanLiteral:S.bool,Number:S.number,Infinity:S.number,StringLiteral:S.string,LineComment:S.comment,BlockComment:S.comment,"( )":S.paren,"{ }":S.paren,"[ ]":S.paren})]}),languageData:{commentTokens:{line:"%"}}});function j0(){return new fa(T9)}const Ay=Pi({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#690"},{tag:[S.number,S.bool,S.null],color:"#905"},{tag:S.variableName,color:"#000000"},{tag:S.name,color:"#07a"},{tag:[S.keyword],color:"#07a"}]}),Uy=Pi({variant:"dark",settings:{background:"#222",foreground:"#F6F6F6",caret:"#EEE",selection:"#036dd626",gutterBackground:"#333",gutterForeground:"#999",lineHighlight:"#90909020"},styles:[{tag:S.comment,color:"slategray"},{tag:S.string,color:"#e09177"},{tag:[S.number,S.bool,S.null],color:"#a9e07e"},{tag:S.variableName,color:"#FFFFFF"},{tag:S.name,color:"#e6cf77"},{tag:[S.keyword],color:"#54a2e3"}]}),Jd=new Il,Is=new Il,Z9=Is.reconfigure(me.editable.of(!1)),R9=Is.reconfigure(me.editable.of(!0)),A9=Jd.reconfigure(Ay),U9=Jd.reconfigure(Uy);function zf(n,e,t,i=!1){const r=[ZR,oa.of([eZ]),Jd.of(t?Uy:Ay),me.theme({"&":{height:"100%"},"&.cm-editor.cm-focused":{outline:"none"},".cm-content, .cm-gutter":{minHeight:"100%"},"&.cm-focused .cm-selectionBackground":{backgroundColor:"#036dd638"}})];return n===".json"||n===".mpc"?[...r,Is.of(me.editable.of(!i)),YR()]:n===".mzc"?[...r,Is.of(me.editable.of(!1))]:n===".dzn"?[...r,Is.of(me.editable.of(!i)),j0()]:n===".html"?[...r,Is.of(me.editable.of(!i)),x9()]:[...r,Is.of(me.editable.of(!i)),j0(),me.updateListener.of(X9.debounce(e,250))]}function F0(n,e,t){const i=n.slice();return i[4]=e[t],i}function G0(n,e,t){const i=n.slice();return i[7]=e[t],i}function H0(n,e,t){const i=n.slice();return i[10]=e[t],i[12]=t,i}function Y9(n){let e,t,i=Ec(n[0].location)+"",r,s,l,o,f,u,h;return{c(){e=k("pre"),t=k("a"),r=$e(i),l=$e(":"),o=N(),f=k("br"),y(t,"class",s="mzn-link mzn-"+n[0].type+" svelte-w513p9"),y(e,"class","svelte-w513p9")},m(O,p){V(O,e,p),v(e,t),v(t,r),v(e,l),V(O,o,p),V(O,f,p),u||(h=re(t,"click",n[3]),u=!0)},p(O,p){p&1&&i!==(i=Ec(O[0].location)+"")&&Be(r,i),p&1&&s!==(s="mzn-link mzn-"+O[0].type+" svelte-w513p9")&&y(t,"class",s)},d(O){O&&(Y(e),Y(o),Y(f)),u=!1,h()}}}function V9(n){let e,t=nt(n[0].stack),i=[];for(let r=0;rr("goto",{location:o.location}),l=()=>r("goto",{location:i.location});return n.$$set=o=>{"msg"in o&&t(0,i=o.msg)},[i,r,s,l]}class Yy extends Ui{constructor(e){super(),Ai(this,e,I9,z9,Ri,{msg:0})}}function rS(n,e,t){const i=n.slice();return i[40]=e[t],i}function sS(n,e,t){const i=n.slice();return i[43]=e[t],i}function lS(n,e,t){const i=n.slice();return i[52]=e[t],i}function oS(n,e,t){const i=n.slice();return i[49]=e[t],i}function aS(n,e,t){const i=n.slice();return i[46]=e[t],i}const N9=n=>({}),fS=n=>({});function cS(n,e,t){const i=n.slice();return i[46]=e[t],i}function uS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g;function b(q,B){return q[13].length===0?B9:L9}let $=b(n),Q=$(n),_=nt(n[14]),x=[];for(let q=0;q<_.length;q+=1)x[q]=hS(cS(n,_,q));let Z=n[19]&&OS(n),C=n[18]&&dS(n),X=n[17]&&pS(n),R=n[16]&&gS(n),I=n[15]&&mS(n);return{c(){e=k("button"),Q.c(),i=N();for(let q=0;q{o=null}),it()),u[2]?f?(f.p(u,h),h[0]&4&&D(f,1)):(f=$S(u),f.c(),D(f,1),f.m(e,null)):f&&(tt(),F(f,1,1,()=>{f=null}),it())},i(u){r||(D(l,u),D(o),D(f),r=!0)},o(u){F(l,u),F(o),F(f),r=!1},d(u){u&&Y(e),l&&l.d(u),o&&o.d(),f&&f.d()}}}function bS(n){let e,t,i,r,s,l,o;return r=new Wt({props:{icon:h4}}),{c(){e=k("p"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Clear output on each run"),le(t,"is-primary",n[0]),le(t,"is-light",!n[0]),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ue(r,i,null),s=!0,l||(o=re(t,"click",n[33]),l=!0)},p(f,u){(!s||u[0]&1)&&le(t,"is-primary",f[0]),(!s||u[0]&1)&&le(t,"is-light",!f[0])},i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ye(r),l=!1,o()}}}function $S(n){let e,t,i,r,s,l,o;return r=new Wt({props:{icon:vQ}}),{c(){e=k("p"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small is-danger"),y(t,"title","Clear output"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ue(r,i,null),s=!0,l||(o=re(t,"click",n[34]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ye(r),l=!1,o()}}}function j9(n){let e;return{c(){e=$e("Running")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function F9(n){let e;return{c(){e=$e("Compiling")},m(t,i){V(t,e,i)},d(t){t&&Y(e)}}}function G9(n){let e,t,i,r=Mc(n[43].runTime)+"",s,l,o=n[43].code&&QS(n);return{c(){o&&o.c(),e=N(),t=k("pre"),i=$e("Finished in "),s=$e(r),l=$e("."),y(t,"class","mzn-runtime")},m(f,u){o&&o.m(f,u),V(f,e,u),V(f,t,u),v(t,i),v(t,s),v(t,l)},p(f,u){f[43].code?o?o.p(f,u):(o=QS(f),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),u[0]&2&&r!==(r=Mc(f[43].runTime)+"")&&Be(s,r)},i:We,o:We,d(f){f&&(Y(e),Y(t)),o&&o.d(f)}}}function H9(n){let e,t,i=(n[43].type==="error"&&n[12]||n[43].type==="warning"&&n[11])&&wS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,s){r[43].type==="error"&&r[12]||r[43].type==="warning"&&r[11]?i?(i.p(r,s),s[0]&6146&&D(i,1)):(i=wS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(tt(),F(i,1,1,()=>{i=null}),it())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function K9(n){let e,t=n[23][n[43].status]+"",i,r,s;return{c(){e=k("pre"),i=$e(t),r=N(),s=k("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=l[23][l[43].status]+"")&&Be(i,t)},i:We,o:We,d(l){l&&(Y(e),Y(r),Y(s))}}}function J9(n){let e,t,i;return{c(){e=k("pre"),e.textContent="Stopped.",t=N(),i=k("br"),y(e,"class","mzn-runtime")},m(r,s){V(r,e,s),V(r,t,s),V(r,i,s)},p:We,i:We,o:We,d(r){r&&(Y(e),Y(t),Y(i))}}}function e8(n){let e,t=n[8]&&yS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[8]?t?t.p(i,r):(t=yS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function t8(n){let e,t=n[9]&&PS(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[9]?t?t.p(i,r):(t=PS(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function i8(n){let e,t=n[43].comment+"",i;return{c(){e=k("pre"),i=$e(t),y(e,"class","mzn-comment")},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].comment+"")&&Be(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function n8(n){let e=n[13].indexOf(n[43].section)===-1&&n[43].section!=="vis_json",t,i=e&&kS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[43].section)===-1&&r[43].section!=="vis_json"),e?i?i.p(r,s):(i=kS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},i:We,o:We,d(r){r&&Y(t),i&&i.d(r)}}}function r8(n){let e,t=n[10]&&_S(n);return{c(){t&&t.c(),e=fi()},m(i,r){t&&t.m(i,r),V(i,e,r)},p(i,r){i[10]?t?t.p(i,r):(t=_S(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:We,o:We,d(i){i&&Y(e),t&&t.d(i)}}}function s8(n){let e,t,i,r,s,l,o,f=nt(RS(n[43],n[13])),u=[];for(let O=0;OF(u[O],1,1,()=>{u[O]=null});return{c(){e=k("span"),t=k("pre"),t.textContent="% Solution checker report:",i=N(),r=k("br"),s=N();for(let O=0;O%%%mzn-stat-end',i=N(),r=k("br")},m(o,f){for(let u=0;u{i=null}),it())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function c8(n){let e,t=n[49].message+"",i;return{c(){e=k("pre"),i=$e(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&8194&&t!==(t=r[49].message+"")&&Be(i,t)},i:We,o:We,d(r){r&&Y(e)}}}function WS(n){let e,t;return e=new Yy({props:{msg:n[49]}}),e.$on("goto",n[35]),{c(){Ve(e.$$.fragment)},m(i,r){Ue(e,i,r),t=!0},p(i,r){const s={};r[0]&8194&&(s.msg=i[49]),e.$set(s)},i(i){t||(D(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){Ye(e,i)}}}function xS(n){let e,t,i,r;const s=[c8,f8],l=[];function o(f,u){return f[49].type==="text"?0:f[49].type==="error"||f[49].type==="warning"?1:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(tt(),F(l[h],1,1,()=>{l[h]=null}),it()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function CS(n){let e,t;function i(l,o){if(o[0]&2&&(e=null),e==null&&(e=!!(l[46]==="json"||l[46].endsWith("_json"))),e)return h8;if(l[46]!=="raw")return u8}let r=i(n,[-1,-1]),s=r&&r(n);return{c(){s&&s.c(),t=fi()},m(l,o){s&&s.m(l,o),V(l,t,o)},p(l,o){r===(r=i(l,o))&&s?s.p(l,o):(s&&s.d(1),s=r&&r(l),s&&(s.c(),s.m(t.parentNode,t)))},d(l){l&&Y(t),s&&s.d(l)}}}function u8(n){let e,t=n[43].output[n[46]]+"",i;return{c(){e=k("pre"),i=$e(t)},m(r,s){V(r,e,s),v(e,i)},p(r,s){s[0]&2&&t!==(t=r[43].output[r[46]]+"")&&Be(i,t)},d(r){r&&Y(e)}}}function h8(n){let e,t=JSON.stringify(n[43].output[n[46]],null,2)+"",i,r,s;return{c(){e=k("pre"),i=$e(t),r=N(),s=k("br")},m(l,o){V(l,e,o),v(e,i),V(l,r,o),V(l,s,o)},p(l,o){o[0]&2&&t!==(t=JSON.stringify(l[43].output[l[46]],null,2)+"")&&Be(i,t)},d(l){l&&(Y(e),Y(r),Y(s))}}}function XS(n){let e=n[13].indexOf(n[46])===-1&&n[46]!=="vis_json",t,i=e&&CS(n);return{c(){i&&i.c(),t=fi()},m(r,s){i&&i.m(r,s),V(r,t,s)},p(r,s){s[0]&8194&&(e=r[13].indexOf(r[46])===-1&&r[46]!=="vis_json"),e?i?i.p(r,s):(i=CS(r),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(r){r&&Y(t),i&&i.d(r)}}}function TS(n){let e,t,i,r;const s=[l8,s8,r8,n8,i8,t8,e8,J9,K9,H9,G9],l=[];function o(f,u){return f[43].type==="solution"?0:f[43].type==="checker"?1:f[43].type==="time"?2:f[43].type==="trace"?3:f[43].type==="comment"?4:f[43].type==="stderr"?5:f[43].type==="statistics"?6:f[43].type==="cancel"?7:f[43].type==="status"?8:f[43].type==="error"||f[43].type==="warning"?9:f[43].type==="exit"?10:-1}return~(e=o(n))&&(t=l[e]=s[e](n)),{c(){t&&t.c(),i=fi()},m(f,u){~e&&l[e].m(f,u),V(f,i,u),r=!0},p(f,u){let h=e;e=o(f),e===h?~e&&l[e].p(f,u):(t&&(tt(),F(l[h],1,1,()=>{l[h]=null}),it()),~e?(t=l[e],t?t.p(f,u):(t=l[e]=s[e](f),t.c()),D(t,1),t.m(i.parentNode,i)):t=null)},i(f){r||(D(t),r=!0)},o(f){F(t),r=!1},d(f){f&&Y(i),~e&&l[e].d(f)}}}function ZS(n){let e,t,i,r=n[40].files.join(", ")+"",s,l,o,f,u;function h(Q,_){return Q[40].isCompile?F9:j9}let O=h(n),p=O(n),g=nt(n[40].output),b=[];for(let Q=0;QF(b[Q],1,1,()=>{b[Q]=null});return{c(){e=k("details"),t=k("summary"),p.c(),i=N(),s=$e(r),l=N(),o=k("div");for(let Q=0;QF(O[g],1,1,()=>{O[g]=null});return{c(){e=k("div"),t=k("div"),f&&f.c(),i=N(),u&&u.c(),r=N(),s=k("div"),l=k("div");for(let g=0;g{u=null}),it()),(!o||b[0]&48)&&le(t,"is-empty",!g[4]&&!g[5]),(!o||b[0]&64)&&le(t,"is-tab",g[6]),b[0]&8404738){h=nt(g[1]);let $;for($=0;$0&&(s+=`${e}h `),(e>0||t>0)&&(s+=`${t}m `),(e>0||t>0||i>0)&&(s+=`${i}s `),e==0&&t==0&&(i>0&&(s+=" "),s+=`${r}msec`),s.trimEnd()}function RS(n,e){const t=[];let i=[];const r=()=>{if(i.length>0){const s=i.join("").split(` `);s[s.length-1]===""&&s.splice(s.length-1,1),t.push({type:"text",message:s.map(l=>`% ${l}`).join(` -`)}),i=[]}};if(n.messages){for(const s of n.messages)if(s.type==="solution")for(const l of s.sections)e.indexOf(l)===-1&&l!=="raw"&&i.push(n.output[l]);else s.type==="trace"?e.indexOf(s.section)===-1&&s.section!=="raw"&&i.push(s.message):(r(),t.push(s));r()}else{for(const s of n.sections)e.indexOf(s)===-1&&i.push(n.output[s]);r()}return t}function d8(n,e,t){let i,r,s,l,o,f,{$$slots:u={},$$scope:h}=e;const O=Fn();let{output:p}=e,{autoClearOutput:g=!1}=e,{showClearOutput:b=!0}=e,{showAutoClearOutput:$=!0}=e,{showSectionToggles:Q=!0}=e,{showRightControls:_=!0}=e,{isTab:x=!1}=e,Z,C=!0,X=!0,R=!0,I=!0,q=!0;function B(be){const te=be.flatMap(ae=>ae.output),H=new Set([...te.filter(ae=>ae.type==="solution"||ae.type==="checker").flatMap(ae=>ae.sections.filter(Ke=>ae.output[Ke].length>0)),...te.filter(ae=>ae.type==="trace").map(ae=>ae.section)]);H.delete("raw"),H.delete("vis_json");const ie=[...H.values()];return ie.sort(),t(13,de=de.filter(ae=>H.has(ae))),ie}function z(be){de.indexOf(be)===-1?t(13,de=[...de,be]):t(13,de=de.filter(te=>te!==be))}function oe(){de.length===0?t(13,de=[...f]):t(13,de=[])}let de=[];const xe={ALL_SOLUTIONS:"==========",OPTIMAL_SOLUTION:"==========",UNSATISFIABLE:"=====UNSATISFIABLE=====",UNSAT_OR_UNBOUNDED:"=====UNSATorUNBOUNDED=====",UNBOUNDED:"=====UNBOUNDED=====",UNKNOWN:"=====UNKNOWN=====",ERROR:"=====ERROR====="};async function ye(be){Z&&(await ds(),Z.scrollTo(0,Z.scrollHeight))}const Ee=()=>oe(),pe=be=>z(be),fe=()=>t(8,C=!C),Xe=()=>t(9,X=!X),Me=()=>t(10,R=!R),Ne=()=>t(11,I=!I),pt=()=>t(12,q=!q),Lt=()=>t(0,g=!g),ti=()=>O("clear");function xt(be){hm.call(this,n,be)}function Ct(be){hm.call(this,n,be)}function Zt(be){ui[be?"unshift":"push"](()=>{Z=be,t(7,Z)})}return n.$$set=be=>{"output"in be&&t(1,p=be.output),"autoClearOutput"in be&&t(0,g=be.autoClearOutput),"showClearOutput"in be&&t(2,b=be.showClearOutput),"showAutoClearOutput"in be&&t(3,$=be.showAutoClearOutput),"showSectionToggles"in be&&t(4,Q=be.showSectionToggles),"showRightControls"in be&&t(5,_=be.showRightControls),"isTab"in be&&t(6,x=be.isTab),"$$scope"in be&&t(24,h=be.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(19,i=p.some(be=>be.output.some(te=>te.type==="statistics"))),n.$$.dirty[0]&2&&t(18,r=p.some(be=>be.output.some(te=>te.type==="stderr"))),n.$$.dirty[0]&2&&t(17,s=p.some(be=>be.output.some(te=>te.type==="time"))),n.$$.dirty[0]&2&&t(16,l=p.some(be=>be.output.some(te=>te.type==="warning"||te.type==="checker"&&te.messages&&te.messages.some(H=>H.type==="warning")))),n.$$.dirty[0]&2&&t(15,o=p.some(be=>be.output.some(te=>te.type==="error"||te.type==="checker"&&te.messages&&te.messages.some(H=>H.type==="error")))),n.$$.dirty[0]&2&&t(14,f=B(p)),n.$$.dirty[0]&2&&ye()},[g,p,b,$,Q,_,x,Z,C,X,R,I,q,de,f,o,l,s,r,i,O,z,oe,xe,h,u,Ee,pe,fe,Xe,Me,Ne,pt,Lt,ti,xt,Ct,Zt]}class p8 extends Ui{constructor(e){super(),Ai(this,e,d8,O8,Ri,{output:1,autoClearOutput:0,showClearOutput:2,showAutoClearOutput:3,showSectionToggles:4,showRightControls:5,isTab:6},null,[-1,-1])}}const g8=`const MiniZincIDE = (() => { +`)}),i=[]}};if(n.messages){for(const s of n.messages)if(s.type==="solution")for(const l of s.sections)e.indexOf(l)===-1&&l!=="raw"&&i.push(n.output[l]);else s.type==="trace"?e.indexOf(s.section)===-1&&s.section!=="raw"&&i.push(s.message):(r(),t.push(s));r()}else{for(const s of n.sections)e.indexOf(s)===-1&&s!=="raw"&&i.push(n.output[s]);r()}return t}function d8(n,e,t){let i,r,s,l,o,f,{$$slots:u={},$$scope:h}=e;const O=Fn();let{output:p}=e,{autoClearOutput:g=!1}=e,{showClearOutput:b=!0}=e,{showAutoClearOutput:$=!0}=e,{showSectionToggles:Q=!0}=e,{showRightControls:_=!0}=e,{isTab:x=!1}=e,Z,C=!0,X=!0,R=!0,I=!0,q=!0;function B(be){const te=be.flatMap(ae=>ae.output),H=new Set([...te.filter(ae=>ae.type==="solution"||ae.type==="checker").flatMap(ae=>ae.sections.filter(Ke=>ae.output[Ke].length>0)),...te.filter(ae=>ae.type==="trace").map(ae=>ae.section)]);H.delete("raw"),H.delete("vis_json");const ie=[...H.values()];return ie.sort(),t(13,de=de.filter(ae=>H.has(ae))),ie}function z(be){de.indexOf(be)===-1?t(13,de=[...de,be]):t(13,de=de.filter(te=>te!==be))}function oe(){de.length===0?t(13,de=[...f]):t(13,de=[])}let de=[];const xe={ALL_SOLUTIONS:"==========",OPTIMAL_SOLUTION:"==========",UNSATISFIABLE:"=====UNSATISFIABLE=====",UNSAT_OR_UNBOUNDED:"=====UNSATorUNBOUNDED=====",UNBOUNDED:"=====UNBOUNDED=====",UNKNOWN:"=====UNKNOWN=====",ERROR:"=====ERROR====="};async function ye(be){Z&&(await ds(),Z.scrollTo(0,Z.scrollHeight))}const Ee=()=>oe(),pe=be=>z(be),fe=()=>t(8,C=!C),Xe=()=>t(9,X=!X),Me=()=>t(10,R=!R),Ne=()=>t(11,I=!I),pt=()=>t(12,q=!q),Lt=()=>t(0,g=!g),ti=()=>O("clear");function xt(be){hm.call(this,n,be)}function Ct(be){hm.call(this,n,be)}function Zt(be){ui[be?"unshift":"push"](()=>{Z=be,t(7,Z)})}return n.$$set=be=>{"output"in be&&t(1,p=be.output),"autoClearOutput"in be&&t(0,g=be.autoClearOutput),"showClearOutput"in be&&t(2,b=be.showClearOutput),"showAutoClearOutput"in be&&t(3,$=be.showAutoClearOutput),"showSectionToggles"in be&&t(4,Q=be.showSectionToggles),"showRightControls"in be&&t(5,_=be.showRightControls),"isTab"in be&&t(6,x=be.isTab),"$$scope"in be&&t(24,h=be.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(19,i=p.some(be=>be.output.some(te=>te.type==="statistics"))),n.$$.dirty[0]&2&&t(18,r=p.some(be=>be.output.some(te=>te.type==="stderr"))),n.$$.dirty[0]&2&&t(17,s=p.some(be=>be.output.some(te=>te.type==="time"))),n.$$.dirty[0]&2&&t(16,l=p.some(be=>be.output.some(te=>te.type==="warning"||te.type==="checker"&&te.messages&&te.messages.some(H=>H.type==="warning")))),n.$$.dirty[0]&2&&t(15,o=p.some(be=>be.output.some(te=>te.type==="error"||te.type==="checker"&&te.messages&&te.messages.some(H=>H.type==="error")))),n.$$.dirty[0]&2&&t(14,f=B(p)),n.$$.dirty[0]&2&&ye()},[g,p,b,$,Q,_,x,Z,C,X,R,I,q,de,f,o,l,s,r,i,O,z,oe,xe,h,u,Ee,pe,fe,Xe,Me,Ne,pt,Lt,ti,xt,Ct,Zt]}class p8 extends Ui{constructor(e){super(),Ai(this,e,d8,O8,Ri,{output:1,autoClearOutput:0,showClearOutput:2,showAutoClearOutput:3,showSectionToggles:4,showRightControls:5,isTab:6},null,[-1,-1])}}const g8=`const MiniZincIDE = (() => { const callbacks = {}; const responses = []; const freeSlots = []; @@ -196,5 +196,5 @@ function print() { __p += __j.call(arguments, '') } })(); `;function AS(n,e,t){const i=n.slice();return i[22]=e[t],i[23]=e,i[24]=t,i}function US(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x,Z;return Q=new Wt({props:{icon:l4}}),{c(){e=k("div"),t=k("div"),t.innerHTML="Solution:",i=N(),r=k("div"),s=k("input"),o=N(),f=k("div"),u=k("input"),O=N(),p=k("div"),g=k("p"),b=k("button"),$=k("span"),Ve(Q.$$.fragment),y(t,"class","solution-label svelte-152bhkz"),y(s,"class","input is-small"),y(s,"type","number"),y(s,"min",l=n[2]>0?1:0),y(s,"max",n[2]),y(u,"type","range"),y(u,"min",h=n[2]>0?1:0),y(u,"max",n[2]),y(u,"class","svelte-152bhkz"),y(f,"class","solution-slider svelte-152bhkz"),y($,"class","icon"),y(b,"class","button is-small"),y(b,"title","Follow latest solution"),le(b,"is-primary",n[0]),le(b,"is-light",!n[0]),y(g,"class","control"),y(p,"class","field has-addons svelte-152bhkz"),y(e,"class","top svelte-152bhkz")},m(C,X){V(C,e,X),v(e,t),v(e,i),v(e,r),v(r,s),Ni(s,n[1]),v(e,o),v(e,f),v(f,u),Ni(u,n[1]),v(e,O),v(e,p),v(p,g),v(g,b),v(b,$),Ue(Q,$,null),_=!0,x||(Z=[re(s,"input",n[11]),re(u,"change",n[12]),re(u,"input",n[12]),re(b,"click",n[13])],x=!0)},p(C,X){(!_||X&4&&l!==(l=C[2]>0?1:0))&&y(s,"min",l),(!_||X&4)&&y(s,"max",C[2]),X&2&&Mo(s.value)!==C[1]&&Ni(s,C[1]),(!_||X&4&&h!==(h=C[2]>0?1:0))&&y(u,"min",h),(!_||X&4)&&y(u,"max",C[2]),X&2&&Ni(u,C[1]),(!_||X&1)&&le(b,"is-primary",C[0]),(!_||X&1)&&le(b,"is-light",!C[0])},i(C){_||(D(Q.$$.fragment,C),_=!0)},o(C){F(Q.$$.fragment,C),_=!1},d(C){C&&Y(e),Ye(Q),x=!1,Nt(Z)}}}function YS(n){let e,t,i=n[23],r=n[24],s,l;const o=()=>n[14](e,i,r),f=()=>n[14](null,i,r);function u(...h){return n[15](n[22],...h)}return{c(){e=k("iframe"),y(e,"class","vis-window svelte-152bhkz"),am(e.src,t=n[22].url)||y(e,"src",t),y(e,"title","Visualisation")},m(h,O){V(h,e,O),o(),s||(l=re(e,"load",u),s=!0)},p(h,O){n=h,O&8&&!am(e.src,t=n[22].url)&&y(e,"src",t),(i!==n[23]||r!==n[24])&&(f(),i=n[23],r=n[24],o())},d(h){h&&Y(e),f(),s=!1,l()}}}function m8(n){let e,t,i,r,s,l,o,f=n[2]>0&&US(n),u=nt(n[3]),h=[];for(let O=0;O0?f?(f.p(O,p),p&4&&D(f,1)):(f=US(O),f.c(),D(f,1),f.m(e,t)):f&&(tt(),F(f,1,1,()=>{f=null}),it()),p&8){u=nt(O[3]);let g;for(g=0;g{oe=ye});de.then(ye=>{ye.contentWindow.postMessage({event:"init",payload:z},"*")});const xe=URL.createObjectURL(new Blob([B.replace("/minizinc-ide.js",S8)],{type:"text/html; charset=utf-8"}));t(3,h=[...h,{url:xe,makeReady:oe,ready:de,solutions:[],element:null}])}function $(B,z){for(let oe=0;oede.element.contentWindow===B.source);switch(z.event){case"rebroadcast":for(const xe of h)En(z.message,xe);z.message.event==="goToSolution"&&(s=z.message.payload===-1,t(0,l=z.message.payload===-1),o=z.message.payload+1,t(1,f=z.message.payload+1));break;case"solve":r("solve",{modelFile:z.modelFile,dataFiles:z.dataFiles,options:z.options});break;case"getNumSolutions":En({event:"response",id:z.id,payload:oe.solutions.length},oe);break;case"getSolution":const de=z.index<0?z.index+oe.solutions.length:z.index;if(de<0||de>=oe.solutions.length)En({event:"error",id:z.id,message:"Solution index out of range"},oe);else{En({event:"response",id:z.id,payload:oe.solutions[z.index===-1?oe.solutions.length-1:z.index]},oe);break}case"getAllSolutions":En({event:"response",id:z.id,payload:oe.solutions},oe);break;case"getStatus":En({event:"response",id:z.id,payload:O},oe);break;case"getFinishTime":En({event:"response",id:z.id,payload:p},oe);break}}function Z(B,z,oe){if(l&&o===f&&(o=u,t(1,f=u)),l!==s){s=l;for(const de of h)En({event:"goToSolution",payload:l?-1:f-1},de)}if(o!==f){o=f,s=!1,t(0,l=!1);for(const de of h)En({event:"goToSolution",payload:f-1},de)}}function C(){f=Mo(this.value),t(1,f)}function X(){f=Mo(this.value),t(1,f)}const R=()=>t(0,l=!l);function I(B,z,oe){ui[B?"unshift":"push"](()=>{z[oe].element=B,t(3,h)})}const q=(B,z)=>B.makeReady(z.target);return n.$$.update=()=>{n.$$.dirty&8&&t(4,i=Math.ceil(Math.sqrt(h.length))),n.$$.dirty&7&&Z()},[l,f,u,h,i,x,g,b,$,Q,_,C,X,R,I,q]}class $8 extends Ui{constructor(e){super(),Ai(this,e,b8,m8,Ri,{reset:6,addVisualisation:7,addSolution:8,status:9,finish:10})}get reset(){return this.$$.ctx[6]}get addVisualisation(){return this.$$.ctx[7]}get addSolution(){return this.$$.ctx[8]}get status(){return this.$$.ctx[9]}get finish(){return this.$$.ctx[10]}}function Q8(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x,Z,C,X,R,I,q,B,z,oe,de,xe,ye,Ee,pe;return{c(){e=k("aside"),t=k("p"),t.textContent="Model",i=N(),r=k("ul"),s=k("li"),l=k("a"),l.textContent="Model file (.mzn)",o=N(),f=k("li"),u=k("a"),u.textContent="Solution checker model (.mzc.mzn)",h=N(),O=k("p"),O.textContent="Data",p=N(),g=k("ul"),b=k("li"),$=k("a"),$.textContent="Data file (.dzn)",Q=N(),_=k("li"),x=k("a"),x.textContent="JSON data file (.json)",Z=N(),C=k("p"),C.textContent="Visualisation",X=N(),R=k("ul"),I=k("li"),q=k("a"),q.textContent="Custom visualisation (.html)",B=N(),z=k("p"),z.textContent="Import",oe=N(),de=k("ul"),xe=k("li"),ye=k("a"),ye.textContent="Upload file(s)",y(t,"class","menu-label"),y(r,"class","menu-list"),y(O,"class","menu-label"),y(g,"class","menu-list"),y(C,"class","menu-label"),y(R,"class","menu-list"),y(z,"class","menu-label"),y(de,"class","menu-list"),y(e,"class","menu")},m(fe,Xe){V(fe,e,Xe),v(e,t),v(e,i),v(e,r),v(r,s),v(s,l),v(r,o),v(r,f),v(f,u),v(e,h),v(e,O),v(e,p),v(e,g),v(g,b),v(b,$),v(g,Q),v(g,_),v(_,x),v(e,Z),v(e,C),v(e,X),v(e,R),v(R,I),v(I,q),v(e,B),v(e,z),v(e,oe),v(e,de),v(de,xe),v(xe,ye),Ee||(pe=[re(l,"click",n[5]),re(u,"click",n[6]),re($,"click",n[7]),re(x,"click",n[8]),re(q,"click",n[9]),re(ye,"click",n[10])],Ee=!0)},p:We,d(fe){fe&&Y(e),Ee=!1,Nt(pe)}}}function w8(n){let e,t,i,r,s,l;return e=new Yl({props:{active:n[0],title:"Create new file",$$slots:{default:[Q8]},$$scope:{ctx:n}}}),e.$on("cancel",n[11]),{c(){Ve(e.$$.fragment),t=N(),i=k("input"),y(i,"class","is-hidden svelte-1surl6b"),y(i,"type","file"),i.multiple=!0,y(i,"accept",".mzn,.mzc,.dzn,.json,.html")},m(o,f){Ue(e,o,f),V(o,t,f),V(o,i,f),n[12](i),r=!0,s||(l=[re(i,"change",n[13]),re(i,"change",n[4])],s=!0)},p(o,[f]){const u={};f&1&&(u.active=o[0]),f&16386&&(u.$$scope={dirty:f,ctx:o}),e.$set(u)},i(o){r||(D(e.$$.fragment,o),r=!0)},o(o){F(e.$$.fragment,o),r=!1},d(o){o&&(Y(t),Y(i)),Ye(e,o),n[12](null),s=!1,Nt(l)}}}function y8(n,e,t){let{active:i=!1}=e;const r=Fn();let s,l;async function o(){const _=[];for(const Z of l)_.push(new Promise((C,X)=>{const R=new FileReader;R.onload=()=>{C({name:Z.name,contents:R.result})},R.onerror=I=>X(I),R.readAsText(Z)}));const x=await Promise.all(_);r("open",{files:x})}const f=()=>r("new",{type:".mzn"}),u=()=>r("new",{type:".mzc.mzn"}),h=()=>r("new",{type:".dzn"}),O=()=>r("new",{type:".json"}),p=()=>r("new",{type:".html"}),g=()=>s.click(),b=()=>r("cancel");function $(_){ui[_?"unshift":"push"](()=>{s=_,t(1,s)})}function Q(){l=this.files,t(2,l)}return n.$$set=_=>{"active"in _&&t(0,i=_.active)},[i,s,l,r,o,f,u,h,O,p,g,b,$,Q]}class v8 extends Ui{constructor(e){super(),Ai(this,e,y8,w8,Ri,{active:0})}}function VS(n,e,t){const i=n.slice();return i[15]=e[t],i}function qS(n,e,t){const i=n.slice();return i[18]=e[t].file,i[19]=e[t].index,i}function P8(n){let e,t,i,r,s,l,o;i=new Wt({props:{icon:n[18].readOnly?FO:k1}});function f(){return n[11](n[19],n[18])}return{c(){e=k("button"),t=k("span"),Ve(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title",r="Click to "+(n[18].readOnly?"unlock":"lock")+" this file for editing"),le(e,"is-primary",!n[18].readOnly),le(e,"is-light",n[18].readOnly)},m(u,h){V(u,e,h),v(e,t),Ue(i,t,null),s=!0,l||(o=re(e,"click",f),l=!0)},p(u,h){n=u;const O={};h&2&&(O.icon=n[18].readOnly?FO:k1),i.$set(O),(!s||h&2&&r!==(r="Click to "+(n[18].readOnly?"unlock":"lock")+" this file for editing"))&&y(e,"title",r),(!s||h&2)&&le(e,"is-primary",!n[18].readOnly),(!s||h&2)&&le(e,"is-light",n[18].readOnly)},i(u){s||(D(i.$$.fragment,u),s=!0)},o(u){F(i.$$.fragment,u),s=!1},d(u){u&&Y(e),Ye(i),l=!1,o()}}}function k8(n){let e,t,i,r;return i=new Wt({props:{icon:FO}}),{c(){e=k("button"),t=k("span"),Ve(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small is-light"),y(e,"title","Compiled checkers are read only"),e.disabled=!0},m(s,l){V(s,e,l),v(e,t),Ue(i,t,null),r=!0},p:We,i(s){r||(D(i.$$.fragment,s),r=!0)},o(s){F(i.$$.fragment,s),r=!1},d(s){s&&Y(e),Ye(i)}}}function ES(n){let e,t,i=n[18].name+"",r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x,Z,C,X,R,I,q,B,z;p=new Wt({props:{icon:n[18].hidden?P1:_1}});function oe(){return n[10](n[19],n[18])}const de=[k8,P8],xe=[];function ye(pe,fe){return fe&2&&(Q=null),Q==null&&(Q=!!pe[18].name.endsWith(".mzc")),Q?0:1}_=ye(n,-1),x=xe[_]=de[_](n),I=new Wt({props:{icon:vQ}});function Ee(){return n[12](n[19])}return{c(){e=k("tr"),t=k("td"),r=$e(i),s=N(),l=k("td"),o=k("div"),f=k("div"),u=k("p"),h=k("button"),O=k("span"),Ve(p.$$.fragment),b=N(),$=k("p"),x.c(),Z=N(),C=k("p"),X=k("button"),R=k("span"),Ve(I.$$.fragment),y(O,"class","icon"),y(h,"class","button is-small"),y(h,"title",g="Click to "+(n[18].hidden?"show":"hide")+" this file"),le(h,"is-primary",!n[18].hidden),le(h,"is-light",n[18].hidden),y(u,"class","control"),y($,"class","control"),y(R,"class","icon"),y(X,"class","button is-small is-danger"),y(X,"title","Delete this file"),y(C,"class","control"),y(f,"class","field is-grouped"),y(o,"class","tool-buttons svelte-1bgv9sn")},m(pe,fe){V(pe,e,fe),v(e,t),v(t,r),v(e,s),v(e,l),v(l,o),v(o,f),v(f,u),v(u,h),v(h,O),Ue(p,O,null),v(f,b),v(f,$),xe[_].m($,null),v(f,Z),v(f,C),v(C,X),v(X,R),Ue(I,R,null),q=!0,B||(z=[re(h,"click",oe),re(X,"click",Ee)],B=!0)},p(pe,fe){n=pe,(!q||fe&2)&&i!==(i=n[18].name+"")&&Be(r,i);const Xe={};fe&2&&(Xe.icon=n[18].hidden?P1:_1),p.$set(Xe),(!q||fe&2&&g!==(g="Click to "+(n[18].hidden?"show":"hide")+" this file"))&&y(h,"title",g),(!q||fe&2)&&le(h,"is-primary",!n[18].hidden),(!q||fe&2)&&le(h,"is-light",n[18].hidden);let Me=_;_=ye(n,fe),_===Me?xe[_].p(n,fe):(tt(),F(xe[Me],1,1,()=>{xe[Me]=null}),it(),x=xe[_],x?x.p(n,fe):(x=xe[_]=de[_](n),x.c()),D(x,1),x.m($,null))},i(pe){q||(D(p.$$.fragment,pe),D(x),D(I.$$.fragment,pe),q=!0)},o(pe){F(p.$$.fragment,pe),F(x),F(I.$$.fragment,pe),q=!1},d(pe){pe&&Y(e),Ye(p),xe[_].d(),Ye(I),B=!1,Nt(z)}}}function MS(n){let e,t=n[15].label+"",i,r,s,l,o=nt(n[15].files),f=[];for(let h=0;hF(f[h],1,1,()=>{f[h]=null});return{c(){e=k("p"),i=$e(t),r=N(),s=k("table");for(let h=0;hF(p[b],1,1,()=>{p[b]=null});return s=new Wt({props:{icon:kQ}}),{c(){for(let b=0;bO("close"),g=(x,Z)=>O("modifyFile",{index:x,options:{hidden:!Z.hidden}}),b=(x,Z)=>O("modifyFile",{index:x,options:{readOnly:!Z.readOnly}}),$=x=>O("delete",{index:x}),Q=()=>O("newFile"),_=()=>O("close");return n.$$set=x=>{"active"in x&&t(0,u=x.active),"files"in x&&t(3,h=x.files)},n.$$.update=()=>{n.$$.dirty&8&&t(8,i=h.map((x,Z)=>({file:x,index:Z}))),n.$$.dirty&256&&t(7,r=i.filter(x=>x.file.name.endsWith(".mzn")&&!x.file.name.endsWith(".mzc.mzn")).sort((x,Z)=>x.file.name.localeCompare(Z.file.name))),n.$$.dirty&256&&t(6,s=i.filter(x=>x.file.name.endsWith(".dzn")||x.file.name.endsWith(".json")).sort((x,Z)=>x.file.name.localeCompare(Z.file.name))),n.$$.dirty&256&&t(5,l=i.filter(x=>x.file.name.endsWith(".mzc")||x.file.name.endsWith(".mzc.mzn")).sort((x,Z)=>x.file.name.localeCompare(Z.file.name))),n.$$.dirty&256&&t(4,o=i.filter(x=>!x.file.name.endsWith(".mzn")&&!x.file.name.endsWith(".mzc")&&!x.file.name.endsWith(".dzn")&&!x.file.name.endsWith(".json")).sort((x,Z)=>x.file.name.localeCompare(Z.file.name))),n.$$.dirty&240&&t(1,f=[{label:"Model files",files:r},{label:"Data files",files:s},{label:"Solution checkers",files:l},{label:"Other files",files:o}].filter(x=>x.files.length>0))},[u,f,O,h,o,l,s,r,i,p,g,b,$,Q,_]}class X8 extends Ui{constructor(e){super(),Ai(this,e,C8,x8,Ri,{active:0,files:3})}}function DS(n,e,t){const i=n.slice();return i[9]=e[t],i}function zS(n){let e,t=n[9]+"",i,r;return{c(){e=k("option"),i=$e(t),e.__value=r=n[9],Ni(e,e.__value)},m(s,l){V(s,e,l),v(e,i)},p(s,l){l&1&&t!==(t=s[9]+"")&&Be(i,t),l&1&&r!==(r=s[9])&&(e.__value=r,Ni(e,e.__value))},d(s){s&&Y(e)}}}function T8(n){let e,t,i,r,s=nt(n[0]),l=[];for(let o=0;on[6].call(t)),y(e,"class","select is-fullwidth")},m(o,f){V(o,e,f),v(e,t);for(let u=0;u0&&t(2,l=p[0])}function f(){i("accept",{modelFile:l})}const u=()=>i("cancel");function h(){l=fO(this),t(2,l),t(0,r)}const O=()=>i("cancel");return n.$$set=p=>{"modelFiles"in p&&t(0,r=p.modelFiles),"active"in p&&t(1,s=p.active)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,s,l,i,f,u,h,O]}class U8 extends Ui{constructor(e){super(),Ai(this,e,A8,R8,Ri,{modelFiles:0,active:1})}}function IS(n,e,t){const i=n.slice();return i[20]=e[t],i[21]=e,i[22]=t,i}function NS(n,e,t){const i=n.slice();return i[17]=e[t],i}function LS(n){let e,t,i,r,s,l,o,f,u;return{c(){e=k("div"),t=k("ul"),i=k("li"),r=k("a"),r.textContent="Enter parameters",s=N(),l=k("li"),o=k("a"),o.textContent="Select data file",le(i,"is-active",!n[2]),le(l,"is-active",n[2]),y(e,"class","tabs")},m(h,O){V(h,e,O),v(e,t),v(t,i),v(i,r),v(t,s),v(t,l),v(l,o),f||(u=[re(r,"click",n[11]),re(o,"click",n[12])],f=!0)},p(h,O){O&4&&le(i,"is-active",!h[2]),O&4&&le(l,"is-active",h[2])},d(h){h&&Y(e),f=!1,Nt(u)}}}function Y8(n){let e,t=nt(n[5]),i=[];for(let r=0;rn[13].call(t)),y(e,"class","select is-fullwidth is-multiple")},m(o,f){V(o,e,f),v(e,t);for(let u=0;uC[X]===void 0?{name:X,value:""}:{name:X,value:C[X]}))}function g(){r?s("accept",{dataFiles:h}):s("accept",{parameters:O.reduce((C,X)=>({...C,[X.name]:X.value}),{})})}const b=()=>s("cancel"),$=()=>t(2,u=!1),Q=()=>t(2,u=!0);function _(){h=Cx(this),t(4,h),t(1,f)}function x(C,X){C[X].value=this.value,t(5,O)}const Z=()=>s("cancel");return n.$$set=C=>{"active"in C&&t(0,l=C.active),"parameters"in C&&t(9,o=C.parameters),"dataFiles"in C&&t(1,f=C.dataFiles)},n.$$.update=()=>{n.$$.dirty&512&&p(o),n.$$.dirty&2&&t(3,i=f.length>0),n.$$.dirty&12&&t(6,r=i&&u)},[l,f,u,i,h,O,r,s,g,o,b,$,Q,_,x,Z]}class z8 extends Ui{constructor(e){super(),Ai(this,e,D8,M8,Ri,{active:0,parameters:9,dataFiles:1})}}function FS(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x=Dn(n[1],"-a"),Z,C=Dn(n[1],"-f"),X,R,I,q,B,z,oe,de,xe,ye=Dn(n[1],"-v"),Ee,pe,fe,Xe,Me,Ne,pt,Lt=Dn(n[1],"-s"),ti,xt,Ct,Zt,be,te,H,ie,ae,Ke,Je,ot,Ot,et,se,Qi,Rt;r=new Wt({props:{icon:_Q}});let ct=x&&GS(n),ze=C&&HS(n),St=ye&&KS(n),dt=Lt&&JS(n);return{c(){e=k("div"),t=k("button"),i=k("span"),Ve(r.$$.fragment),s=N(),l=k("h5"),l.textContent="Solving options",o=N(),f=k("div"),u=k("p"),h=k("input"),O=N(),p=k("label"),p.textContent="Time limit (s)",g=N(),b=k("p"),$=k("input"),_=N(),ct&&ct.c(),Z=N(),ze&&ze.c(),X=N(),R=k("h5"),R.textContent="Output options",I=N(),q=k("div"),B=k("p"),z=k("input"),oe=N(),de=k("label"),de.textContent="Verbose compilation",xe=N(),St&&St.c(),Ee=N(),pe=k("div"),fe=k("p"),Xe=k("input"),Me=N(),Ne=k("label"),Ne.textContent="Compilation statistics",pt=N(),dt&&dt.c(),ti=N(),xt=k("div"),Ct=k("p"),Zt=k("input"),be=N(),te=k("label"),te.textContent="Timing information",H=N(),ie=k("div"),ae=k("p"),Ke=k("button"),Ke.textContent="Accept",Je=N(),ot=k("p"),Ot=k("button"),Ot.textContent="Reset to defaults",y(i,"class","icon"),y(t,"class","button is-text is-small exit-button svelte-1uq9463"),y(l,"class","title is-5"),y(h,"id","enable-timelimit"),y(h,"type","checkbox"),y(h,"class","svelte-1uq9463"),y(p,"for","enable-timelimit"),y(p,"class","svelte-1uq9463"),y(u,"class","control checkbox-control svelte-1uq9463"),y($,"class","input is-fullwidth"),y($,"type","number"),y($,"step","1"),y($,"min",0),$.disabled=Q=!n[3],y(b,"class","control is-expanded"),y(f,"class","field is-grouped"),y(R,"class","title is-5"),y(z,"id","enable-verbose-compile"),y(z,"type","checkbox"),y(z,"class","svelte-1uq9463"),y(de,"for","enable-verbose-compile"),y(de,"class","svelte-1uq9463"),y(B,"class","control checkbox-control svelte-1uq9463"),y(q,"class","field"),y(Xe,"id","enable-compilation-satistics"),y(Xe,"type","checkbox"),y(Xe,"class","svelte-1uq9463"),y(Ne,"for","enable-compilation-satistics"),y(Ne,"class","svelte-1uq9463"),y(fe,"class","control checkbox-control svelte-1uq9463"),y(pe,"class","field"),y(Zt,"id","enable-timing-information"),y(Zt,"type","checkbox"),y(Zt,"class","svelte-1uq9463"),y(te,"for","enable-timing-information"),y(te,"class","svelte-1uq9463"),y(Ct,"class","control checkbox-control svelte-1uq9463"),y(xt,"class","field"),y(Ke,"class","button is-primary"),y(ae,"class","control"),y(Ot,"class","button is-danger"),y(ot,"class","control"),y(ie,"class","field is-grouped bottom-buttons svelte-1uq9463"),y(e,"class","config-window svelte-1uq9463")},m(Ge,ut){V(Ge,e,ut),v(e,t),v(t,i),Ue(r,i,null),v(e,s),v(e,l),v(e,o),v(e,f),v(f,u),v(u,h),h.checked=n[3],v(u,O),v(u,p),v(f,g),v(f,b),v(b,$),Ni($,n[2]),v(e,_),ct&&ct.m(e,null),v(e,Z),ze&&ze.m(e,null),v(e,X),v(e,R),v(e,I),v(e,q),v(q,B),v(B,z),z.checked=n[5],v(B,oe),v(B,de),v(e,xe),St&&St.m(e,null),v(e,Ee),v(e,pe),v(pe,fe),v(fe,Xe),Xe.checked=n[7],v(fe,Me),v(fe,Ne),v(e,pt),dt&&dt.m(e,null),v(e,ti),v(e,xt),v(xt,Ct),v(Ct,Zt),Zt.checked=n[9],v(Ct,be),v(Ct,te),v(e,H),v(e,ie),v(ie,ae),v(ae,Ke),v(ie,Je),v(ie,ot),v(ot,Ot),se=!0,Qi||(Rt=[re(t,"click",n[17]),re(h,"change",n[18]),re($,"input",n[19]),re(z,"change",n[22]),re(Xe,"change",n[24]),re(Zt,"change",n[26]),re(Ke,"click",n[27]),re(Ot,"click",n[12])],Qi=!0)},p(Ge,ut){ut&8&&(h.checked=Ge[3]),(!se||ut&8&&Q!==(Q=!Ge[3]))&&($.disabled=Q),ut&4&&Mo($.value)!==Ge[2]&&Ni($,Ge[2]),ut&2&&(x=Dn(Ge[1],"-a")),x?ct?ct.p(Ge,ut):(ct=GS(Ge),ct.c(),ct.m(e,Z)):ct&&(ct.d(1),ct=null),ut&2&&(C=Dn(Ge[1],"-f")),C?ze?ze.p(Ge,ut):(ze=HS(Ge),ze.c(),ze.m(e,X)):ze&&(ze.d(1),ze=null),ut&32&&(z.checked=Ge[5]),ut&2&&(ye=Dn(Ge[1],"-v")),ye?St?St.p(Ge,ut):(St=KS(Ge),St.c(),St.m(e,Ee)):St&&(St.d(1),St=null),ut&128&&(Xe.checked=Ge[7]),ut&2&&(Lt=Dn(Ge[1],"-s")),Lt?dt?dt.p(Ge,ut):(dt=JS(Ge),dt.c(),dt.m(e,ti)):dt&&(dt.d(1),dt=null),ut&512&&(Zt.checked=Ge[9])},i(Ge){se||(D(r.$$.fragment,Ge),Ge&&ar(()=>{se&&(et||(et=Ql(e,dc,{x:100,duration:200},!0)),et.run(1))}),se=!0)},o(Ge){F(r.$$.fragment,Ge),Ge&&(et||(et=Ql(e,dc,{x:100,duration:200},!1)),et.run(0)),se=!1},d(Ge){Ge&&Y(e),Ye(r),ct&&ct.d(),ze&&ze.d(),St&&St.d(),dt&&dt.d(),Ge&&et&&et.end(),Qi=!1,Nt(Rt)}}}function GS(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="All solutions (for satisfication problems)",y(i,"id","enable-all-solutions"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-all-solutions"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[4],v(t,r),v(t,s),l||(o=re(i,"change",n[20]),l=!0)},p(f,u){u&16&&(i.checked=f[4])},d(f){f&&Y(e),l=!1,o()}}}function HS(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Free search",y(i,"id","enable-free-search"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-free-search"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[10],v(t,r),v(t,s),l||(o=re(i,"change",n[21]),l=!0)},p(f,u){u&1024&&(i.checked=f[10])},d(f){f&&Y(e),l=!1,o()}}}function KS(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Verbose solving",y(i,"id","enable-verbose-solve"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-verbose-solve"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[6],v(t,r),v(t,s),l||(o=re(i,"change",n[23]),l=!0)},p(f,u){u&64&&(i.checked=f[6])},d(f){f&&Y(e),l=!1,o()}}}function JS(n){let e,t,i,r,s,l,o;return{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("label"),s.textContent="Solving statistics",y(i,"id","enable-solving-satistics"),y(i,"type","checkbox"),y(i,"class","svelte-1uq9463"),y(s,"for","enable-solving-satistics"),y(s,"class","svelte-1uq9463"),y(t,"class","control checkbox-control svelte-1uq9463"),y(e,"class","field")},m(f,u){V(f,e,u),v(e,t),v(t,i),i.checked=n[8],v(t,r),v(t,s),l||(o=re(i,"change",n[25]),l=!0)},p(f,u){u&256&&(i.checked=f[8])},d(f){f&&Y(e),l=!1,o()}}}function I8(n){let e,t,i=n[0]&&FS(n);return{c(){i&&i.c(),e=fi()},m(r,s){i&&i.m(r,s),V(r,e,s),t=!0},p(r,[s]){r[0]?i?(i.p(r,s),s&1&&D(i,1)):(i=FS(r),i.c(),D(i,1),i.m(e.parentNode,e)):i&&(tt(),F(i,1,1,()=>{i=null}),it())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d(r)}}}function Dn(n,e){return n.indexOf(e)!==-1}function N8(n,e,t){const i=Fn();let{active:r}=e,{stdFlags:s=[]}=e,l=!1,o=1,f=!1,u=!1,h=!1,O=!1,p=!1,g=!1,b=!1;function $(pe){const fe=pe*1e3;fe!==Math.floor(fe)&&t(2,o=Math.floor(fe)/1e3)}function Q(){t(3,l=!1),t(2,o=1),t(4,f=!1),t(5,u=!1),t(6,h=!1),t(7,O=!1),t(8,p=!1),t(9,g=!1),t(10,b=!1)}function _(pe){t(3,l=pe.enableTimeLimit),t(2,o=pe.timeLimit),t(4,f=pe.allSolutions),t(5,u=pe.verboseCompilation),t(6,h=pe.verboseSolving),t(7,O=pe.compilerStatistics),t(8,p=pe.solvingStatistics),t(9,g=pe.outputTime),t(10,b=pe.freeSearch)}function x(){return{enableTimeLimit:l,timeLimit:o,allSolutions:f,verboseCompilation:u,verboseSolving:h,compilerStatistics:O,solvingStatistics:p,outputTime:g,freeSearch:b}}function Z(pe){const fe={solver:pe};return l&&o>0&&(fe["time-limit"]=o*1e3),f&&Dn(s,"-a")&&(fe["all-satisfaction"]=!0),u&&(fe["verbose-compilation"]=!0),h&&Dn(s,"-v")&&(fe["verbose-solving"]=!0),O&&(fe["compiler-statistics"]=!0),p&&Dn(s,"-s")&&(fe["solver-statistics"]=!0),g&&(fe["output-time"]=!0),b&&Dn(s,"-f")&&(fe["free-search"]=!0),fe}function C(pe){const fe={solver:pe};return u&&(fe["verbose-compilation"]=!0),O&&(fe["compiler-statistics"]=!0),fe}const X=()=>i("close");function R(){l=this.checked,t(3,l)}function I(){o=Mo(this.value),t(2,o)}function q(){f=this.checked,t(4,f)}function B(){b=this.checked,t(10,b)}function z(){u=this.checked,t(5,u)}function oe(){h=this.checked,t(6,h)}function de(){O=this.checked,t(7,O)}function xe(){p=this.checked,t(8,p)}function ye(){g=this.checked,t(9,g)}const Ee=()=>i("close");return n.$$set=pe=>{"active"in pe&&t(0,r=pe.active),"stdFlags"in pe&&t(1,s=pe.stdFlags)},n.$$.update=()=>{n.$$.dirty&4&&$(o)},[r,s,o,l,f,u,h,O,p,g,b,i,Q,_,x,Z,C,X,R,I,q,B,z,oe,de,xe,ye,Ee]}class L8 extends Ui{constructor(e){super(),Ai(this,e,N8,I8,Ri,{active:0,stdFlags:1,load:13,save:14,getSolvingConfiguration:15,getCompilationConfiguration:16})}get load(){return this.$$.ctx[13]}get save(){return this.$$.ctx[14]}get getSolvingConfiguration(){return this.$$.ctx[15]}get getCompilationConfiguration(){return this.$$.ctx[16]}}function eb(n,e,t){const i=n.slice();return i[13]=e[t],i}const B8=n=>({item:n&2}),tb=n=>({item:n[13]}),j8=n=>({item:n&4}),ib=n=>({item:n[2]});function nb(n){let e;const t=n[8].selected,i=an(t,n,n[7],ib),r=i||F8(n);return{c(){r&&r.c()},m(s,l){r&&r.m(s,l),e=!0},p(s,l){i?i.p&&(!e||l&132)&&cn(i,t,s,s[7],e?fn(t,s[7],l,j8):un(s[7]),ib):r&&r.p&&(!e||l&4)&&r.p(s,e?l:-1)},i(s){e||(D(r,s),e=!0)},o(s){F(r,s),e=!1},d(s){r&&r.d(s)}}}function F8(n){let e=n[2].label+"",t;return{c(){t=$e(e)},m(i,r){V(i,t,r)},p(i,r){r&4&&e!==(e=i[2].label+"")&&Be(t,e)},d(i){i&&Y(t)}}}function G8(n){let e=n[13].label+"",t;return{c(){t=$e(e)},m(i,r){V(i,t,r)},p(i,r){r&2&&e!==(e=i[13].label+"")&&Be(t,e)},d(i){i&&Y(t)}}}function rb(n){let e,t,i,r,s;const l=n[8].item,o=an(l,n,n[7],tb),f=o||G8(n);function u(){return n[10](n[13])}return{c(){e=k("a"),f&&f.c(),t=N(),y(e,"href","javascript:void(0);"),y(e,"class","dropdown-item"),le(e,"is-active",n[2]===n[13])},m(h,O){V(h,e,O),f&&f.m(e,null),v(e,t),i=!0,r||(s=re(e,"click",u),r=!0)},p(h,O){n=h,o?o.p&&(!i||O&130)&&cn(o,l,n,n[7],i?fn(l,n[7],O,B8):un(n[7]),tb):f&&f.p&&(!i||O&2)&&f.p(n,i?O:-1),(!i||O&6)&&le(e,"is-active",n[2]===n[13])},i(h){i||(D(f,h),i=!0)},o(h){F(f,h),i=!1},d(h){h&&Y(e),f&&f.d(h),r=!1,s()}}}function H8(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,$=n[2]&&nb(n);f=new Wt({props:{icon:u4}});let Q=nt(n[1]),_=[];for(let Z=0;ZF(_[Z],1,1,()=>{_[Z]=null});return{c(){e=N(),t=k("div"),i=k("div"),r=k("button"),s=k("span"),$&&$.c(),l=N(),o=k("span"),Ve(f.$$.fragment),u=N(),h=k("div"),O=k("div");for(let Z=0;Z<_.length;Z+=1)_[Z].c();y(o,"class","icon is-small"),y(r,"class","button"),r.disabled=n[3],y(i,"class","dropdown-trigger"),y(O,"class","dropdown-content"),y(h,"class","dropdown-menu"),y(t,"class","dropdown"),le(t,"is-active",n[0])},m(Z,C){V(Z,e,C),V(Z,t,C),v(t,i),v(i,r),v(r,s),$&&$.m(s,null),v(r,l),v(r,o),Ue(f,o,null),v(t,u),v(t,h),v(h,O);for(let X=0;X<_.length;X+=1)_[X]&&_[X].m(O,null);n[11](t),p=!0,g||(b=[re(document.body,"click",n[6]),re(r,"click",n[9])],g=!0)},p(Z,[C]){if(Z[2]?$?($.p(Z,C),C&4&&D($,1)):($=nb(Z),$.c(),D($,1),$.m(s,null)):$&&(tt(),F($,1,1,()=>{$=null}),it()),(!p||C&8)&&(r.disabled=Z[3]),C&166){Q=nt(Z[1]);let X;for(X=0;Xt(0,f=!f),b=Q=>O(Q);function $(Q){ui[Q?"unshift":"push"](()=>{h=Q,t(4,h)})}return n.$$set=Q=>{"items"in Q&&t(1,l=Q.items),"currentItem"in Q&&t(2,o=Q.currentItem),"active"in Q&&t(0,f=Q.active),"disabled"in Q&&t(3,u=Q.disabled),"$$scope"in Q&&t(7,r=Q.$$scope)},[f,l,o,u,h,O,p,r,i,g,b,$]}class J8 extends Ui{constructor(e){super(),Ai(this,e,K8,H8,Ri,{items:1,currentItem:2,active:0,disabled:3})}}const Vy=qe.define({map:(n,e)=>({from:e.mapPos(n.from),to:e.mapPos(n.to),msg:n.msg,type:n.type})}),qy=qe.define(),sb=$i.define({create(){return Ze.none},update(n,e){n=n.map(e.changes);for(const t of e.effects)t.is(qy)&&(n=Ze.none),t.is(Vy)&&(n=n.update({add:[Ze.mark({class:`cm-mzn-underline-${t.value.type}`,attributes:{title:t.value.msg}}).range(t.value.from,t.value.to)]}));return n},provide:n=>me.decorations.from(n)});function ud(n,e,t){let i,r=1,s=1;for(i=0;i=n&&s>=e)return i;s++,t[i]===` `&&(r++,s=1)}return i}function e6(n,e,t){const i=e.map(r=>Vy.of({from:ud(r.location.firstLine,r.location.firstColumn,n),to:ud(r.location.lastLine,r.location.lastColumn,n)+1,msg:`${r.type==="error"?"Error":"Warning"}: ${r.what}: ${r.message}`,type:r.type}));t.state.field(sb,!1)||i.push(qe.appendConfig.of([sb])),t.dispatch({effects:[qy.of(null),...i]})}const t6=n=>({}),lb=n=>({}),i6=n=>({}),ob=n=>({}),n6=n=>({}),ab=n=>({}),r6=n=>({}),fb=n=>({});function cb(n,e,t){const i=n.slice();return i[149]=e[t],i[151]=t,i}const s6=n=>({}),ub=n=>({});function hb(n,e,t){const i=n.slice();return i[149]=e[t],i[151]=t,i}const l6=n=>({}),Ob=n=>({}),o6=n=>({}),db=n=>({});function a6(n){let e,t,i,r,s,l,o,f,u;return s=new Wt({props:{icon:O4}}),{c(){e=k("button"),t=k("span"),t.textContent="Run",i=N(),r=k("span"),Ve(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-primary"),y(e,"title","Run the current file"),e.disabled=l=!n[49]},m(h,O){V(h,e,O),v(e,t),v(e,i),v(e,r),Ue(s,r,null),o=!0,f||(u=re(e,"click",n[60]),f=!0)},p(h,O){(!o||O[1]&262144&&l!==(l=!h[49]))&&(e.disabled=l)},i(h){o||(D(s.$$.fragment,h),o=!0)},o(h){F(s.$$.fragment,h),o=!1},d(h){h&&Y(e),Ye(s),f=!1,u()}}}function f6(n){let e,t,i,r,s,l,o,f;return s=new Wt({props:{icon:c4}}),{c(){e=k("button"),t=k("span"),t.textContent="Stop",i=N(),r=k("span"),Ve(s.$$.fragment),y(r,"class","icon"),y(e,"class","button is-danger"),y(e,"title","Cancel solving")},m(u,h){V(u,e,h),v(e,t),v(e,i),v(e,r),Ue(s,r,null),l=!0,o||(f=re(e,"click",n[62]),o=!0)},p:We,i(u){l||(D(s.$$.fragment,u),l=!0)},o(u){F(s.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(s),o=!1,f()}}}function pb(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),i=k("span"),i.textContent="Compile",y(t,"class","button"),y(t,"title","Compile the current file and show the resultant FlatZinc"),t.disabled=r=n[46]||!n[48],y(e,"class","control is-hidden-mobile")},m(o,f){V(o,e,f),v(e,t),v(t,i),s||(l=re(t,"click",n[61]),s=!0)},p(o,f){f[1]&163840&&r!==(r=o[46]||!o[48])&&(t.disabled=r)},d(o){o&&Y(e),s=!1,l()}}}function gb(n){let e,t,i;return t=new J8({props:{items:n[51],currentItem:n[0]?n[18].edge:n[18].latest,disabled:n[46],$$slots:{item:[c6,({item:r})=>({153:r}),({item:r})=>[0,0,0,0,r?536870912:0]]},$$scope:{ctx:n}}}),t.$on("selectItem",n[69]),{c(){e=k("div"),Ve(t.$$.fragment),y(e,"class","control is-hidden-mobile")},m(r,s){V(r,e,s),Ue(t,e,null),i=!0},p(r,s){const l={};s[1]&1048576&&(l.items=r[51]),s[0]&262145&&(l.currentItem=r[0]?r[18].edge:r[18].latest),s[1]&32768&&(l.disabled=r[46]),s[4]&536871168&&(l.$$scope={dirty:s,ctx:r}),t.$set(l)},i(r){i||(D(t.$$.fragment,r),i=!0)},o(r){F(t.$$.fragment,r),i=!1},d(r){r&&Y(e),Ye(t)}}}function c6(n){let e,t=n[153].label+"",i,r,s=n[153].detail+"",l,o;return{c(){e=k("span"),i=$e(t),r=$e(" ("),l=$e(s),o=$e(")"),y(e,"slot","item")},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[4]&536870912&&t!==(t=f[153].label+"")&&Be(i,t),u[4]&536870912&&s!==(s=f[153].detail+"")&&Be(l,s)},d(f){f&&Y(e)}}}function mb(n){let e,t,i,r,s,l=nt(n[23]),o=[];for(let f=0;fn[88].call(i)),y(t,"class","select is-fullwidth"),y(e,"class","control is-expanded is-hidden-tablet")},m(f,u){V(f,e,u),v(e,t),v(t,i);for(let h=0;hSolver:',r=N(),s=k("div"),l=k("div"),o=k("select");for(let $=0;$n[89].call(o)),y(l,"class","select is-fullwidth"),y(s,"class","control is-expanded"),y(t,"class","field has-addons"),y(e,"class","navbar-item is-hidden-mobile")},m($,Q){V($,e,Q),v(e,t),v(t,i),v(t,r),v(t,s),v(s,l),v(l,o);for(let _=0;_{b=null}),it())},i($){u||(D(b),u=!0)},o($){F(b),u=!1},d($){$&&Y(e),vi(g,$),b&&b.d(),h=!1,O()}}}function $b(n){let e,t=n[149].name+"",i,r,s=n[149].version+"",l,o;return{c(){e=k("option"),i=$e(t),r=N(),l=$e(s),o=N(),e.__value=n[151],Ni(e,e.__value)},m(f,u){V(f,e,u),v(e,i),v(e,r),v(e,l),v(e,o)},p(f,u){u[0]&8388608&&t!==(t=f[149].name+"")&&Be(i,t),u[0]&8388608&&s!==(s=f[149].version+"")&&Be(l,s)},d(f){f&&Y(e)}}}function Qb(n){let e,t,i,r,s,l,o;return r=new Wt({props:{icon:PQ}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(e,"class","control")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ue(r,i,null),s=!0,l||(o=re(t,"click",n[52]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ye(r),l=!1,o()}}}function wb(n){let e,t,i,r,s,l,o,f;return r=new Wt({props:{icon:wQ}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Share"),t.disabled=s=n[17]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ue(r,i,null),l=!0,o||(f=re(t,"click",n[91]),o=!0)},p(u,h){(!l||h[0]&131072&&s!==(s=u[17]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(r),o=!1,f()}}}function yb(n){let e,t,i,r,s,l,o,f;return r=new Wt({props:{icon:f4}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button"),y(t,"title","Download project"),t.disabled=s=n[36]||n[17]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ue(r,i,null),l=!0,o||(f=re(t,"click",n[92]),o=!0)},p(u,h){(!l||h[0]&131072|h[1]&32&&s!==(s=u[36]||u[17]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(r),o=!1,f()}}}function vb(n){let e,t,i,r,s,l,o,f;return r=new Wt({props:{icon:yQ}}),{c(){e=k("div"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-primary"),y(t,"title","Open in playground"),t.disabled=s=n[17]!==0,y(e,"class","control")},m(u,h){V(u,e,h),v(e,t),v(t,i),Ue(r,i,null),l=!0,o||(f=re(t,"click",n[66]),o=!0)},p(u,h){(!l||h[0]&131072&&s!==(s=u[17]!==0))&&(t.disabled=s)},i(u){l||(D(r.$$.fragment,u),l=!0)},o(u){F(r.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(r),o=!1,f()}}}function Pb(n){let e,t,i,r,s,l,o,f;return i=new Wt({props:{icon:d4}}),{c(){e=k("a"),t=k("span"),Ve(i.$$.fragment),r=N(),s=k("span"),s.textContent="Compile current file",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ue(i,t,null),v(e,r),v(e,s),l=!0,o||(f=re(e,"click",n[93]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(i),o=!1,f()}}}function kb(n){let e,t,i,r,s,l,o,f;return i=new Wt({props:{icon:PQ}}),{c(){e=k("a"),t=k("span"),Ve(i.$$.fragment),r=N(),s=k("span"),s.textContent="Solver configuration",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ue(i,t,null),v(e,r),v(e,s),l=!0,o||(f=re(e,"click",n[94]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(i),o=!1,f()}}}function _b(n){let e,t,i,r,s,l,o=n[0]?"latest":"edge",f,u,h,O,p;return i=new Wt({props:{icon:r4}}),{c(){e=k("a"),t=k("span"),Ve(i.$$.fragment),r=N(),s=k("span"),l=$e("Switch to the "),f=$e(o),u=$e(" version of MiniZinc"),y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(g,b){V(g,e,b),v(e,t),Ue(i,t,null),v(e,r),v(e,s),v(s,l),v(s,f),v(s,u),h=!0,O||(p=re(e,"click",n[95]),O=!0)},p(g,b){(!h||b[0]&1)&&o!==(o=g[0]?"latest":"edge")&&Be(f,o)},i(g){h||(D(i.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),h=!1},d(g){g&&Y(e),Ye(i),O=!1,p()}}}function Wb(n){let e,t,i,r,s,l,o,f;return i=new Wt({props:{icon:wQ}}),{c(){e=k("a"),t=k("span"),Ve(i.$$.fragment),r=N(),s=k("span"),s.textContent="Share this project",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ue(i,t,null),v(e,r),v(e,s),l=!0,o||(f=re(e,"click",n[96]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(i),o=!1,f()}}}function xb(n){let e,t,i,r,s,l,o,f;return i=new Wt({props:{icon:yQ}}),{c(){e=k("a"),t=k("span"),Ve(i.$$.fragment),r=N(),s=k("span"),s.textContent="Open in MiniZinc Playground",y(t,"class","icon svelte-1llogi3"),y(e,"class","navbar-item is-hidden-tablet mobile-menu-item svelte-1llogi3"),y(e,"href","javascript:void(0);")},m(u,h){V(u,e,h),v(e,t),Ue(i,t,null),v(e,r),v(e,s),l=!0,o||(f=re(e,"click",n[97]),o=!0)},p:We,i(u){l||(D(i.$$.fragment,u),l=!0)},o(u){F(i.$$.fragment,u),l=!1},d(u){u&&Y(e),Ye(i),o=!1,f()}}}function Cb(n){let e,t,i={state:n[50]};return e=new E5({props:i}),n[110](e),{c(){Ve(e.$$.fragment)},m(r,s){Ue(e,r,s),t=!0},p(r,s){const l={};s[1]&524288&&(l.state=r[50]),e.$set(l)},i(r){t||(D(e.$$.fragment,r),t=!0)},o(r){F(e.$$.fragment,r),t=!1},d(r){n[110](null),Ye(e,r)}}}function u6(n){let e,t,i,r,s,l;i=new y4({props:{files:n[19],currentIndex:n[20],readonly:!n[6]}}),i.$on("selectTab",n[105]),i.$on("reorder",n[106]),i.$on("newFile",n[107]),i.$on("rename",n[56]),i.$on("close",n[108]),i.$on("manageFiles",n[109]);let o=n[50]&&Cb(n);return{c(){e=k("div"),t=k("div"),Ve(i.$$.fragment),r=N(),s=k("div"),o&&o.c(),y(t,"class","top svelte-1llogi3"),y(s,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelA")},m(f,u){V(f,e,u),v(e,t),Ue(i,t,null),v(e,r),v(e,s),o&&o.m(s,null),l=!0},p(f,u){const h={};u[0]&524288&&(h.files=f[19]),u[0]&1048576&&(h.currentIndex=f[20]),u[0]&64&&(h.readonly=!f[6]),i.$set(h),f[50]?o?(o.p(f,u),u[1]&524288&&D(o,1)):(o=Cb(f),o.c(),D(o,1),o.m(s,null)):o&&(tt(),F(o,1,1,()=>{o=null}),it())},i(f){l||(D(i.$$.fragment,f),D(o),l=!0)},o(f){F(i.$$.fragment,f),F(o),l=!1},d(f){f&&Y(e),Ye(i),o&&o.d()}}}function Xb(n){let e,t,i,r,s,l,o,f,u,h,O,p,g=n[12]&&Tb(n);return{c(){e=k("div"),t=k("div"),i=k("ul"),r=k("li"),s=k("a"),s.textContent="Output",l=N(),o=k("li"),f=k("a"),f.textContent="Visualisation",u=N(),g&&g.c(),y(s,"href","javascript:void(0);"),le(r,"is-active",!n[42]),y(f,"href","javascript:void(0);"),le(o,"is-active",n[42]),y(t,"class","tabs is-boxed"),y(e,"class","top svelte-1llogi3")},m(b,$){V(b,e,$),v(e,t),v(t,i),v(i,r),v(r,s),v(i,l),v(i,o),v(o,f),v(i,u),g&&g.m(i,null),h=!0,O||(p=[re(s,"click",n[98]),re(f,"click",n[99])],O=!0)},p(b,$){(!h||$[1]&2048)&&le(r,"is-active",!b[42]),(!h||$[1]&2048)&&le(o,"is-active",b[42]),b[12]?g?(g.p(b,$),$[0]&4096&&D(g,1)):(g=Tb(b),g.c(),D(g,1),g.m(i,null)):g&&(tt(),F(g,1,1,()=>{g=null}),it())},i(b){h||(D(g),h=!0)},o(b){F(g),h=!1},d(b){b&&Y(e),g&&g.d(),O=!1,Nt(p)}}}function Tb(n){let e,t,i,r,s,l,o;return r=new Wt({props:{icon:WQ}}),{c(){e=k("li"),t=k("button"),i=k("span"),Ve(r.$$.fragment),y(i,"class","icon"),y(t,"class","button is-small"),y(t,"title","Switch orientation"),y(e,"class","tab-end svelte-1llogi3")},m(f,u){V(f,e,u),v(e,t),v(t,i),Ue(r,i,null),s=!0,l||(o=re(t,"click",n[68]),l=!0)},p:We,i(f){s||(D(r.$$.fragment,f),s=!0)},o(f){F(r.$$.fragment,f),s=!1},d(f){f&&Y(e),Ye(r),l=!1,o()}}}function Zb(n){let e,t,i,r,s,l;return i=new Wt({props:{icon:WQ}}),{c(){e=k("button"),t=k("span"),Ve(i.$$.fragment),y(t,"class","icon"),y(e,"class","button is-small"),y(e,"title","Switch orientation")},m(o,f){V(o,e,f),v(e,t),Ue(i,t,null),r=!0,s||(l=re(e,"click",n[68]),s=!0)},p:We,i(o){r||(D(i.$$.fragment,o),r=!0)},o(o){F(i.$$.fragment,o),r=!1},d(o){o&&Y(e),Ye(i),s=!1,l()}}}function h6(n){let e,t,i=n[12]&&!n[41]&&Zb(n);return{c(){e=k("p"),i&&i.c(),y(e,"class","control"),y(e,"slot","before-right-controls")},m(r,s){V(r,e,s),i&&i.m(e,null),t=!0},p(r,s){r[12]&&!r[41]?i?(i.p(r,s),s[0]&4096|s[1]&1024&&D(i,1)):(i=Zb(r),i.c(),D(i,1),i.m(e,null)):i&&(tt(),F(i,1,1,()=>{i=null}),it())},i(r){t||(D(i),t=!0)},o(r){F(i),t=!1},d(r){r&&Y(e),i&&i.d()}}}function O6(n){let e,t,i,r,s,l,o,f,u,h,O=n[41]&&Xb(n),p={};s=new $8({props:p}),n[100](s),s.$on("solve",n[101]);function g($){n[102]($)}let b={output:n[32],showClearOutput:n[13],showAutoClearOutput:n[14],showSectionToggles:n[15],showRightControls:n[16],isTab:n[41],$$slots:{"before-right-controls":[h6]},$$scope:{ctx:n}};return n[1]!==void 0&&(b.autoClearOutput=n[1]),f=new p8({props:b}),ui.push(()=>Ao(f,"autoClearOutput",g)),f.$on("clear",n[103]),f.$on("goto",n[104]),{c(){e=k("div"),O&&O.c(),t=N(),i=k("div"),r=k("div"),Ve(s.$$.fragment),l=N(),o=k("div"),Ve(f.$$.fragment),y(r,"class","tab-window svelte-1llogi3"),le(r,"visible",n[42]),y(o,"class","tab-window svelte-1llogi3"),le(o,"visible",!n[41]||!n[42]),y(i,"class","grow svelte-1llogi3"),y(e,"class","panel stack svelte-1llogi3"),y(e,"slot","panelB")},m($,Q){V($,e,Q),O&&O.m(e,null),v(e,t),v(e,i),v(i,r),Ue(s,r,null),v(i,l),v(i,o),Ue(f,o,null),h=!0},p($,Q){$[41]?O?(O.p($,Q),Q[1]&1024&&D(O,1)):(O=Xb($),O.c(),D(O,1),O.m(e,t)):O&&(tt(),F(O,1,1,()=>{O=null}),it());const _={};s.$set(_),(!h||Q[1]&2048)&&le(r,"visible",$[42]);const x={};Q[1]&2&&(x.output=$[32]),Q[0]&8192&&(x.showClearOutput=$[13]),Q[0]&16384&&(x.showAutoClearOutput=$[14]),Q[0]&32768&&(x.showSectionToggles=$[15]),Q[0]&65536&&(x.showRightControls=$[16]),Q[1]&1024&&(x.isTab=$[41]),Q[0]&4096|Q[1]&1024|Q[4]&256&&(x.$$scope={dirty:Q,ctx:$}),!u&&Q[0]&2&&(u=!0,x.autoClearOutput=$[1],Ro(()=>u=!1)),f.$set(x),(!h||Q[1]&3072)&&le(o,"visible",!$[41]||!$[42])},i($){h||(D(O),D(s.$$.fragment,$),D(f.$$.fragment,$),h=!0)},o($){F(O),F(s.$$.fragment,$),F(f.$$.fragment,$),h=!1},d($){$&&Y(e),O&&O.d(),n[100](null),Ye(s),Ye(f)}}}function d6(n){let e,t,i,r=n[19][n[28]].name+"",s,l,o,f;return{c(){e=k("p"),t=$e("Are you sure you wish to delete "),i=k("code"),s=$e(r),l=$e("?"),o=N(),f=k("p"),f.textContent="This cannot be undone."},m(u,h){V(u,e,h),v(e,t),v(e,i),v(i,s),v(e,l),V(u,o,h),V(u,f,h)},p(u,h){h[0]&268959744&&r!==(r=u[19][u[28]].name+"")&&Be(s,r)},d(u){u&&(Y(e),Y(o),Y(f))}}}function p6(n){let e,t,i,r,s,l;return{c(){e=k("div"),t=k("button"),t.textContent="Delete",i=N(),r=k("button"),r.textContent="Cancel",y(t,"class","button is-danger"),y(r,"class","button"),y(e,"slot","footer")},m(o,f){V(o,e,f),v(e,t),v(e,i),v(e,r),s||(l=[re(t,"click",n[121]),re(r,"click",n[122])],s=!0)},p:We,d(o){o&&Y(e),s=!1,Nt(l)}}}function g6(n){let e,t,i,r,s,l,o,f,u,h,O;return f=new Wt({props:{icon:s4}}),{c(){e=k("div"),t=k("p"),i=k("input"),r=N(),s=k("p"),l=k("button"),o=k("span"),Ve(f.$$.fragment),y(i,"class","input"),y(i,"type","text"),i.value=n[38],i.readOnly=!0,y(t,"class","control is-expanded"),y(o,"class","icon"),y(l,"class","button"),le(l,"is-primary",!n[39]),le(l,"is-success",n[39]),y(s,"class","control"),y(e,"class","field has-addons")},m(p,g){V(p,e,g),v(e,t),v(t,i),n[129](i),v(e,r),v(e,s),v(s,l),v(l,o),Ue(f,o,null),u=!0,h||(O=[re(i,"click",n[130]),re(l,"click",n[65])],h=!0)},p(p,g){(!u||g[1]&128&&i.value!==p[38])&&(i.value=p[38]),(!u||g[1]&256)&&le(l,"is-primary",!p[39]),(!u||g[1]&256)&&le(l,"is-success",p[39])},i(p){u||(D(f.$$.fragment,p),u=!0)},o(p){F(f.$$.fragment,p),u=!1},d(p){p&&Y(e),n[129](null),Ye(f),h=!1,Nt(O)}}}function m6(n){let e,t,i,r;return{c(){e=k("div"),t=k("button"),t.textContent="Done",y(t,"class","button is-primary"),y(e,"slot","footer")},m(s,l){V(s,e,l),v(e,t),i||(r=re(t,"click",n[128]),i=!0)},p:We,d(s){s&&Y(e),i=!1,r()}}}function S6(n){let e,t,i,r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x,Z,C,X,R,I,q,B,z,oe,de,xe,ye,Ee,pe,fe,Xe,Me,Ne,pt,Lt,ti,xt,Ct,Zt,be,te,H,ie,ae,Ke,Je,ot,Ot,et,se,Qi,Rt,ct,ze,St,dt,Ge,ut,wt,ii,rt;const xn=n[87]["navbar-before-run-buttons"],ci=an(xn,n,n[132],db),di=[f6,a6],en=[];function Cn(L,ce){return L[46]?0:1}h=Cn(n),O=en[h]=di[h](n);let ni=n[7]&&pb(n),gt=n[4]&&gb(n);const cr=n[87]["navbar-run-buttons"],pi=an(cr,n,n[132],Ob);let wi=n[5]&&n[23].length>0&&mb(n);const Gr=n[87]["navbar-after-run-buttons"],Yi=an(Gr,n,n[132],ub);let Vt=n[5]&&n[23].length>0&&bb(n);const Cr=n[87]["navbar-after-solver-selector"],ri=an(Cr,n,n[132],fb),Hr=n[87]["navbar-before-share-buttons"],ji=an(Hr,n,n[132],ab);let qt=n[9]&&wb(n),Et=n[10]&&yb(n),Bt=n[11]&&vb(n);const vt=n[87]["navbar-share-buttons"],Vi=an(vt,n,n[132],ob);let Mt=n[7]&&!n[46]&&n[48]&&Pb(n),Dt=n[8]&&n[5]&&n[23].length>0&&kb(n),Xt=n[4]&&!n[46]&&_b(n),jt=n[9]&&n[17]===0&&Wb(n),Pt=n[11]&&n[17]===0&&xb(n);const dn=n[87]["navbar-after-share-buttons"],ki=an(dn,n,n[132],lb);function Kr(L){n[111](L)}let Js={direction:n[2],showPanels:n[47],$$slots:{panelB:[O6],panelA:[u6]},$$scope:{ctx:n}};n[3]!==void 0&&(Js.split=n[3]),ie=new G5({props:Js}),ui.push(()=>Ao(ie,"split",Kr));let el={active:n[34],stdFlags:n[44]};return Je=new L8({props:el}),n[112](Je),Je.$on("close",n[113]),Ot=new X8({props:{active:n[29],files:n[19]}}),Ot.$on("close",n[114]),Ot.$on("delete",n[115]),Ot.$on("modifyFile",n[116]),Ot.$on("newFile",n[117]),se=new v8({props:{active:n[27]}}),se.$on("cancel",n[118]),se.$on("new",n[119]),se.$on("open",n[120]),Rt=new Yl({props:{active:n[28]!==null,title:"Delete file",$$slots:{footer:[p6],default:[d6]},$$scope:{ctx:n}}}),Rt.$on("cancel",n[123]),ze=new U8({props:{active:n[30],modelFiles:n[43]}}),ze.$on("accept",n[124]),ze.$on("cancel",n[125]),dt=new z8({props:{active:n[31],dataFiles:n[45],parameters:n[33]}}),dt.$on("accept",n[126]),dt.$on("cancel",n[127]),ut=new Yl({props:{active:n[38],title:"Share this project",$$slots:{footer:[m6],default:[g6]},$$scope:{ctx:n}}}),ut.$on("cancel",n[131]),{c(){e=k("div"),t=k("div"),i=k("div"),r=k("nav"),s=k("div"),ci&&ci.c(),l=N(),o=k("div"),f=k("div"),u=k("div"),O.c(),p=N(),ni&&ni.c(),g=N(),gt&>.c(),b=N(),pi&&pi.c(),$=N(),wi&&wi.c(),Q=N(),Yi&&Yi.c(),_=N(),Vt&&Vt.c(),x=N(),ri&&ri.c(),Z=N(),C=k("a"),X=k("span"),R=N(),I=k("span"),q=N(),B=k("span"),z=N(),oe=k("div"),de=k("div"),xe=N(),ye=k("div"),ji&&ji.c(),Ee=N(),pe=k("div"),fe=k("div"),qt&&qt.c(),Xe=N(),Et&&Et.c(),Me=N(),Bt&&Bt.c(),Ne=N(),Vi&&Vi.c(),pt=N(),Mt&&Mt.c(),Lt=N(),Dt&&Dt.c(),ti=N(),Xt&&Xt.c(),xt=N(),jt&&jt.c(),Ct=N(),Pt&&Pt.c(),Zt=N(),ki&&ki.c(),be=N(),te=k("div"),H=k("div"),Ve(ie.$$.fragment),Ke=N(),Ve(Je.$$.fragment),ot=N(),Ve(Ot.$$.fragment),et=N(),Ve(se.$$.fragment),Qi=N(),Ve(Rt.$$.fragment),ct=N(),Ve(ze.$$.fragment),St=N(),Ve(dt.$$.fragment),Ge=N(),Ve(ut.$$.fragment),y(u,"class","control"),y(f,"class","field has-addons navbar-run-buttons svelte-1llogi3"),y(o,"class","navbar-item is-expanded"),y(X,"aria-hidden","true"),y(I,"aria-hidden","true"),y(B,"aria-hidden","true"),y(C,"role","button"),y(C,"class","navbar-burger"),y(C,"aria-label","menu"),y(C,"aria-expanded",n[25]),le(C,"is-active",n[25]),y(s,"class","navbar-brand"),y(de,"class","navbar-start is-hidden-tablet"),y(fe,"class","field has-addons"),y(pe,"class","navbar-item is-hidden-mobile"),y(ye,"class","navbar-end"),y(oe,"class","navbar-menu"),le(oe,"is-active",n[25]),y(r,"class","navbar"),y(i,"class","top svelte-1llogi3"),y(H,"class","left svelte-1llogi3"),y(te,"class","grow main-panel svelte-1llogi3"),y(t,"class","stack svelte-1llogi3"),y(e,"class","mzn-playground svelte-1llogi3"),le(e,"is-dark",n[22])},m(L,ce){V(L,e,ce),v(e,t),v(t,i),v(i,r),v(r,s),ci&&ci.m(s,null),v(s,l),v(s,o),v(o,f),v(f,u),en[h].m(u,null),v(f,p),ni&&ni.m(f,null),v(f,g),gt&>.m(f,null),v(f,b),pi&&pi.m(f,null),v(f,$),wi&&wi.m(f,null),v(s,Q),Yi&&Yi.m(s,null),v(s,_),Vt&&Vt.m(s,null),v(s,x),ri&&ri.m(s,null),v(s,Z),v(s,C),v(C,X),v(C,R),v(C,I),v(C,q),v(C,B),v(r,z),v(r,oe),v(oe,de),v(oe,xe),v(oe,ye),ji&&ji.m(ye,null),v(ye,Ee),v(ye,pe),v(pe,fe),qt&&qt.m(fe,null),v(fe,Xe),Et&&Et.m(fe,null),v(fe,Me),Bt&&Bt.m(fe,null),v(fe,Ne),Vi&&Vi.m(fe,null),v(ye,pt),Mt&&Mt.m(ye,null),v(ye,Lt),Dt&&Dt.m(ye,null),v(ye,ti),Xt&&Xt.m(ye,null),v(ye,xt),jt&&jt.m(ye,null),v(ye,Ct),Pt&&Pt.m(ye,null),v(ye,Zt),ki&&ki.m(ye,null),v(t,be),v(t,te),v(te,H),Ue(ie,H,null),v(te,Ke),Ue(Je,te,null),v(e,ot),Ue(Ot,e,null),v(e,et),Ue(se,e,null),v(e,Qi),Ue(Rt,e,null),v(e,ct),Ue(ze,e,null),v(e,St),Ue(dt,e,null),v(e,Ge),Ue(ut,e,null),wt=!0,ii||(rt=re(C,"click",n[90]),ii=!0)},p(L,ce){ci&&ci.p&&(!wt||ce[4]&256)&&cn(ci,xn,L,L[132],wt?fn(xn,L[132],ce,o6):un(L[132]),db);let Jr=h;h=Cn(L),h===Jr?en[h].p(L,ce):(tt(),F(en[Jr],1,1,()=>{en[Jr]=null}),it(),O=en[h],O?O.p(L,ce):(O=en[h]=di[h](L),O.c()),D(O,1),O.m(u,null)),L[7]?ni?ni.p(L,ce):(ni=pb(L),ni.c(),ni.m(f,g)):ni&&(ni.d(1),ni=null),L[4]?gt?(gt.p(L,ce),ce[0]&16&&D(gt,1)):(gt=gb(L),gt.c(),D(gt,1),gt.m(f,b)):gt&&(tt(),F(gt,1,1,()=>{gt=null}),it()),pi&&pi.p&&(!wt||ce[4]&256)&&cn(pi,cr,L,L[132],wt?fn(cr,L[132],ce,l6):un(L[132]),Ob),L[5]&&L[23].length>0?wi?wi.p(L,ce):(wi=mb(L),wi.c(),wi.m(f,null)):wi&&(wi.d(1),wi=null),Yi&&Yi.p&&(!wt||ce[4]&256)&&cn(Yi,Gr,L,L[132],wt?fn(Gr,L[132],ce,s6):un(L[132]),ub),L[5]&&L[23].length>0?Vt?(Vt.p(L,ce),ce[0]&8388640&&D(Vt,1)):(Vt=bb(L),Vt.c(),D(Vt,1),Vt.m(s,x)):Vt&&(tt(),F(Vt,1,1,()=>{Vt=null}),it()),ri&&ri.p&&(!wt||ce[4]&256)&&cn(ri,Cr,L,L[132],wt?fn(Cr,L[132],ce,r6):un(L[132]),fb),(!wt||ce[0]&33554432)&&y(C,"aria-expanded",L[25]),(!wt||ce[0]&33554432)&&le(C,"is-active",L[25]),ji&&ji.p&&(!wt||ce[4]&256)&&cn(ji,Hr,L,L[132],wt?fn(Hr,L[132],ce,n6):un(L[132]),ab),L[9]?qt?(qt.p(L,ce),ce[0]&512&&D(qt,1)):(qt=wb(L),qt.c(),D(qt,1),qt.m(fe,Xe)):qt&&(tt(),F(qt,1,1,()=>{qt=null}),it()),L[10]?Et?(Et.p(L,ce),ce[0]&1024&&D(Et,1)):(Et=yb(L),Et.c(),D(Et,1),Et.m(fe,Me)):Et&&(tt(),F(Et,1,1,()=>{Et=null}),it()),L[11]?Bt?(Bt.p(L,ce),ce[0]&2048&&D(Bt,1)):(Bt=vb(L),Bt.c(),D(Bt,1),Bt.m(fe,Ne)):Bt&&(tt(),F(Bt,1,1,()=>{Bt=null}),it()),Vi&&Vi.p&&(!wt||ce[4]&256)&&cn(Vi,vt,L,L[132],wt?fn(vt,L[132],ce,i6):un(L[132]),ob),L[7]&&!L[46]&&L[48]?Mt?(Mt.p(L,ce),ce[0]&128|ce[1]&163840&&D(Mt,1)):(Mt=Pb(L),Mt.c(),D(Mt,1),Mt.m(ye,Lt)):Mt&&(tt(),F(Mt,1,1,()=>{Mt=null}),it()),L[8]&&L[5]&&L[23].length>0?Dt?(Dt.p(L,ce),ce[0]&8388896&&D(Dt,1)):(Dt=kb(L),Dt.c(),D(Dt,1),Dt.m(ye,ti)):Dt&&(tt(),F(Dt,1,1,()=>{Dt=null}),it()),L[4]&&!L[46]?Xt?(Xt.p(L,ce),ce[0]&16|ce[1]&32768&&D(Xt,1)):(Xt=_b(L),Xt.c(),D(Xt,1),Xt.m(ye,xt)):Xt&&(tt(),F(Xt,1,1,()=>{Xt=null}),it()),L[9]&&L[17]===0?jt?(jt.p(L,ce),ce[0]&131584&&D(jt,1)):(jt=Wb(L),jt.c(),D(jt,1),jt.m(ye,Ct)):jt&&(tt(),F(jt,1,1,()=>{jt=null}),it()),L[11]&&L[17]===0?Pt?(Pt.p(L,ce),ce[0]&133120&&D(Pt,1)):(Pt=xb(L),Pt.c(),D(Pt,1),Pt.m(ye,Zt)):Pt&&(tt(),F(Pt,1,1,()=>{Pt=null}),it()),ki&&ki.p&&(!wt||ce[4]&256)&&cn(ki,dn,L,L[132],wt?fn(dn,L[132],ce,t6):un(L[132]),lb),(!wt||ce[0]&33554432)&&le(oe,"is-active",L[25]);const Xr={};ce[0]&4&&(Xr.direction=L[2]),ce[1]&65536&&(Xr.showPanels=L[47]),ce[0]&958001218|ce[1]&527874|ce[4]&256&&(Xr.$$scope={dirty:ce,ctx:L}),!ae&&ce[0]&8&&(ae=!0,Xr.split=L[3],Ro(()=>ae=!1)),ie.$set(Xr);const Xs={};ce[1]&8&&(Xs.active=L[34]),ce[1]&8192&&(Xs.stdFlags=L[44]),Je.$set(Xs);const Tr={};ce[0]&536870912&&(Tr.active=L[29]),ce[0]&524288&&(Tr.files=L[19]),Ot.$set(Tr);const tl={};ce[0]&134217728&&(tl.active=L[27]),se.$set(tl);const qi={};ce[0]&268435456&&(qi.active=L[28]!==null),ce[0]&268959744|ce[4]&256&&(qi.$$scope={dirty:ce,ctx:L}),Rt.$set(qi);const tn={};ce[0]&1073741824&&(tn.active=L[30]),ce[1]&4096&&(tn.modelFiles=L[43]),ze.$set(tn);const Xn={};ce[1]&1&&(Xn.active=L[31]),ce[1]&16384&&(Xn.dataFiles=L[45]),ce[1]&4&&(Xn.parameters=L[33]),dt.$set(Xn);const Hn={};ce[1]&128&&(Hn.active=L[38]),ce[1]&448|ce[4]&256&&(Hn.$$scope={dirty:ce,ctx:L}),ut.$set(Hn),(!wt||ce[0]&4194304)&&le(e,"is-dark",L[22])},i(L){wt||(D(ci,L),D(O),D(gt),D(pi,L),D(Yi,L),D(Vt),D(ri,L),D(ji,L),D(qt),D(Et),D(Bt),D(Vi,L),D(Mt),D(Dt),D(Xt),D(jt),D(Pt),D(ki,L),D(ie.$$.fragment,L),D(Je.$$.fragment,L),D(Ot.$$.fragment,L),D(se.$$.fragment,L),D(Rt.$$.fragment,L),D(ze.$$.fragment,L),D(dt.$$.fragment,L),D(ut.$$.fragment,L),wt=!0)},o(L){F(ci,L),F(O),F(gt),F(pi,L),F(Yi,L),F(Vt),F(ri,L),F(ji,L),F(qt),F(Et),F(Bt),F(Vi,L),F(Mt),F(Dt),F(Xt),F(jt),F(Pt),F(ki,L),F(ie.$$.fragment,L),F(Je.$$.fragment,L),F(Ot.$$.fragment,L),F(se.$$.fragment,L),F(Rt.$$.fragment,L),F(ze.$$.fragment,L),F(dt.$$.fragment,L),F(ut.$$.fragment,L),wt=!1},d(L){L&&Y(e),ci&&ci.d(L),en[h].d(),ni&&ni.d(),gt&>.d(),pi&&pi.d(L),wi&&wi.d(),Yi&&Yi.d(L),Vt&&Vt.d(),ri&&ri.d(L),ji&&ji.d(L),qt&&qt.d(),Et&&Et.d(),Bt&&Bt.d(),Vi&&Vi.d(L),Mt&&Mt.d(),Dt&&Dt.d(),Xt&&Xt.d(),jt&&jt.d(),Pt&&Pt.d(),ki&&ki.d(L),Ye(ie),n[112](null),Ye(Je),Ye(Ot),Ye(se),Ye(Rt),Ye(ze),Ye(dt),Ye(ut),ii=!1,rt()}}}function Rb(n,e){n.effects=n.effects?[...n.effects,e]:[e]}function b6(n,e,t){let i,r,s,l,o,f,u,h,O,p,g,b,$,Q,_,x,Z,{$$slots:C={},$$scope:X}=e,{showVersionSwitcher:R=!0}=e,{showSolverDropdown:I=!0}=e,{edgeMiniZinc:q=!1}=e,{autoClearOutput:B=!1}=e,{canEditTabs:z=!0}=e,{compilationEnabled:oe=!0}=e,{project:de}=e,{enabledSolvers:xe=null}=e,{canEditSolverSettings:ye=!0}=e,{showShareButton:Ee=!0}=e,{showDownloadButton:pe=!0}=e,{externalPlaygroundURL:fe=null}=e,{splitterDirection:Xe="vertical"}=e,{splitterSize:Me=75}=e,{canSwitchOrientation:Ne=!0}=e,{showClearOutput:pt=!0}=e,{showAutoClearOutput:Lt=!0}=e,{showOutputSectionToggles:ti=!0}=e,{showOutputRightControls:xt=!0}=e,{theme:Ct="auto"}=e,{hideOutputOnStartup:Zt=!0}=e,be=0,te=[],H,ie,ae={latest:{label:"Latest",detail:"stable"},edge:{label:"Edge",detail:"development"}};function Ke(U){const ue=q?yx:wx;if(ie!==ue){t(17,be++,be);const Se=H;H=new Promise(async(Ce,ge)=>{Se&&await Se,ie&&ie.shutdown(),ie=ue,ie.shutdown(),await ie.init();const[Qe]=/version \d+\.\d+\.\d+(?:, build .*)?$/m.exec(await ie.version()),st=q?"edge":"latest";t(18,ae={...ae,[st]:{...ae[st],detail:Qe}}),t(78,te=await ie.solvers()),await ds(),t(17,be--,be),Ce()})}return H}const Je=new Promise((U,ue)=>{zc(()=>{Ke(),U();const Se=window.matchMedia("(prefers-color-scheme: dark)"),Ce=()=>{t(81,Tr=window.matchMedia("(prefers-color-scheme: dark)").matches)};return Ce(),Se.addEventListener("change",Ce),()=>Se.removeEventListener("change",Ce)})});async function ot(U){t(0,q=U.minizincVersion==="edge"),await Je,t(19,se=[]),pi(U.files),t(20,Rt=U.tab||0),U.solverId&&(await Ke(),t(21,di=Q.findIndex(ue=>ue.id===U.solverId))),U.solverConfig&&ct.load(U.solverConfig)}function Ot(){return se.length>0}let et,se=[],Qi=!1,Rt=0,ct,ze=!1,St=null,dt=!1,Ge=!1,ut=null,wt=!1,ii=[],rt=null,xn=[],ci={},di=-1;async function en(U,ue){if(await Ke(),di<0||di>=Q.length){const Se=Q.findIndex(Ce=>Ce.extraInfo&&Ce.extraInfo.isDefault);Se!==-1&&t(21,di=Se)}}let Cn=!1;function ni(){t(34,Cn=!Cn)}async function gt(U){for(et&&Rt=0&&se[U].hidden;)U--;U===-1&&(U=se.findIndex(ue=>!ue.hidden)),t(20,Rt=U),await ds(),et&&h&&(et.focus(),h.scrollTop!==void 0&&et.getView().requestMeasure({read(ue){ue.scrollDOM.scrollTo(h.scrollLeft,h.scrollTop)}}))}function cr(U){let ue=`Untitled${U}`,Se=2;for(;se.find(Ce=>Ce.name===ue);)ue=`Untitled-${Se++}${U}`;t(19,se=[...se,{name:ue,state:ft.create({extensions:zf(U,ce,Z)})}]),gt(se.length-1),t(27,ze=!1)}function pi(U){let ue=[];for(const Se of U){const Ce=Se.name.endsWith(".mzc.mzn")?Se.name.length-8:Se.name.lastIndexOf("."),ge=Se.name.substring(0,Ce).replaceAll(/[\/\\\.]/g,""),Qe=Se.name.substring(Ce);let st=`${ge}${Qe}`,nn=2;for(;se.find(Qu=>Qu.name===st);)st=`${ge}-${nn++}${Qe}`;const si=zf(Qe,ce,Z,Se.readOnly);ue.push({...Se,hidden:Se.hidden||Qe===".mzc",name:st,state:ft.create({doc:Se.contents,extensions:si,selection:{anchor:Se.anchor||0}})})}t(19,se=[...se,...ue]),gt(se.length-1),t(27,ze=!1)}function wi(U){const{index:ue,name:Se,suffix:Ce}=U.detail;let ge=Se,Qe=2;for(;se.some(st=>st===ge+Ce);)ge=`${Se}-${Qe++}`;h&&t(83,h.state=et.getState(),h),t(19,se=[...se.slice(0,ue),{...se[ue],name:Se+Ce},...se.slice(ue+1)])}function Gr(U){const ue=r===1&&!se[U].hidden;t(19,se=[...se.slice(0,U),...se.slice(U+1),...ue?[{name:"Untitled.mzn",state:ft.create({extensions:zf(".mzn",ce,Z)})}]:[]]),Rt>=se.length?gt(se.length-1):gt(Rt),t(28,St=null)}function Yi(U,ue){h&&t(83,h.state=et.getState(),h);const Se={...se[U],...ue};"readOnly"in ue&&Rb(Se,ue.readOnly?Z9:R9),t(19,se=[...se.slice(0,U),Se,...se.slice(U+1)]),gt(Rt)}function Vt(U,ue){let Se;U0){await ds();const ue=et.getView();ue&&ue.state===U.state&&(ue.dispatch({effects:U.effects}),U.effects=[])}}let ri=null;async function Hr(U){t(17,be++,be),t(83,h.state=et.getState(),h);let ue=O?h:null;if(!ue){if(b.length===0)return t(17,be--,be),!1;if(b.length===1)ue=se.find(ge=>ge.name===b[0]);else try{const ge=await new Promise((Qe,st)=>{t(35,ri=Qe),t(30,Ge=!0)});if(!ge)return t(17,be--,be),!1;ue=se.find(Qe=>Qe.name===ge.modelFile)}finally{t(30,Ge=!1)}}const Se=new ie.Model,Ce=[ue.name];if(U){const ge=ue.name.substring(0,ue.name.length-4),Qe=se.find(st=>st.name===`${ge}.mzc`||st.name===`${ge}.mzc.mzn`);Qe&&Ce.push(Qe.name)}ue!==h&&Ce.push(h.name);for(const ge of se)Se.addFile(ge.name,ge.state.doc.toString(),Ce.indexOf(ge.name)!==-1);try{const{input:ge}=await Se.interface({options:ct.getCompilationConfiguration(_.id)});if(Object.keys(ge).length>0){const Qe={};for(const st in ge)Qe[st]=ci[st];t(33,ci=Qe),p&&xn.indexOf(h.name)===-1&&(xn=[...xn,h.name]);try{const st=await new Promise((nn,si)=>{t(35,ri=nn),t(31,ut=!0)});if(!st)return t(17,be--,be),!1;if(st.parameters){let nn="";for(const si in st.parameters)st.parameters[si].trim().length>0&&(nn+=`${si} = ${st.parameters[si]}; -`);Se.addDznString(nn),t(33,ci=st.parameters)}else{for(const nn of st.dataFiles)Ce.indexOf(nn)===-1&&(Se.addFile(nn),Ce.push(nn));xn=st.dataFiles}}finally{t(31,ut=!1)}}}catch(ge){console.error(ge)}return t(17,be--,be),{model:Se,fileList:Ce}}async function ji(){if(g){const ge=new ie.Model;ge.addFile(h.name,h.state.doc.toString());const Qe=[h.name],st=ct.getSolvingConfiguration(_.id);await qt(ge,Qe,st);return}const U=await Hr(!0);if(!U)return;const{model:ue,fileList:Se}=U,Ce=ct.getSolvingConfiguration(_.id);await qt(ue,Se,Ce)}async function qt(U,ue,Se){t(79,wt=!0);const Ce=Date.now();B&&t(32,ii=[]),t(32,ii=[...ii,{files:ue,output:[]}]),t(80,rt=U.solve({options:Se,jsonOutput:!1})),Vi(),rt.on("error",vt),rt.on("warning",vt),rt.on("solution",ge=>vt(ge,Date.now()-Ce)),rt.on("status",ge=>vt(ge,Date.now()-Ce)),rt.on("statistics",vt),rt.on("trace",ge=>vt(ge,Date.now()-Ce)),rt.on("statistics",vt),rt.on("comment",vt),rt.on("time",vt),rt.on("checker",vt),rt.on("stderr",vt);try{await rt,vt({type:"exit",code:0,runTime:Date.now()-Ce})}catch(ge){vt({type:"exit",code:ge.code,runTime:Date.now()-Ce})}t(80,rt=null)}async function Et(){t(79,wt=!0);const U=await Hr(!0);if(!U)return;Vi();const{model:ue,fileList:Se}=U,Ce=Se[0],ge=Date.now();B&&t(32,ii=[]),t(32,ii=[...ii,{files:Se,isCompile:!0,output:[]}]),t(80,rt=ue.compile({options:ct.getCompilationConfiguration(_.id)})),rt.on("error",vt),rt.on("warning",vt),rt.on("statistics",vt),rt.on("trace",vt),rt.on("statistics",vt),rt.on("stderr",vt);try{const Qe=await rt;t(19,se=[...se,{name:`${Ce.substring(0,Ce.indexOf("."))}.fzn`,state:ft.create({extensions:zf(".fzn",ce,Z),doc:Qe})}]),gt(se.length-1),vt({type:"exit",code:0,runTime:Date.now()-ge})}catch(Qe){vt({type:"exit",code:Qe.code,runTime:Date.now()-ge})}t(80,rt=null)}function Bt(){vt({type:"cancel"}),rt.cancel()}function vt(U,ue){Mt(U,ue),ii[ii.length-1].output.push(U),t(32,ii)}function Vi(){qi&&qi.reset(),t(41,tn=!1),t(42,Xn=!1)}async function Mt(U,ue){if(U.type==="trace"&&U.section==="vis_json"){tn||(t(41,tn=!0),t(42,Xn=!0)),await ds();const Se=se.find(ge=>ge.name===U.message.url);let Ce=null;if(Se)Ce=Se.state.doc.toString();else try{Ce=await ie.readStdlibFileContents(U.message.url)}catch(ge){console.error(ge);return}if(Ce===null){console.error(`Failed to get visualisation file ${U.message.url}`);return}qi.addVisualisation(Ce,U.message.userData);return}if(tn){for(;!qi;)await ds();switch(U.type){case"solution":qi.addSolution(U.output.vis_json,"time"in U?U.time:ue);break;case"status":qi.status(U.status,"time"in U?U.time:ue);break;case"exit":qi.status("time"in U?U.time:ue);break}}}function Dt(){return h&&t(83,h.state=et.getState(),h),{files:se.map(U=>({name:U.name,contents:U.state.doc.toString(),...U.hidden?{hidden:!0}:{},...U.readOnly?{readOnly:!0}:{}})),tab:Rt,solverId:_.id,solverConfig:ct.save(),minizincVersion:q?"edge":"latest"}}let Xt=!1;async function jt(){t(36,Xt=!0);try{const U=(await dm(()=>import("./jszip.min-19e8762f.js").then(si=>si.j),[])).default,ue=(await dm(()=>import("./FileSaver.min-d51f946c.js").then(si=>si.F),[])).default,Se=Dt(),Ce=se.map(si=>si.name),ge=se.filter(si=>!si.hidden).map(si=>si.name);let Qe=_.id;Qe==="org.minizinc.gecode_presolver"?Qe="org.gecode.gecode":Qe==="org.minizinc.chuffed"&&(Qe="org.chuffed.chuffed");const st=new U;for(const si of Se.files)st.file(si.name,si.contents);st.file("Project.mzp",JSON.stringify({version:105,projectFiles:Ce,openFiles:ge,openTab:Se.tab,selectedBuiltinConfigId:Qe,selectedBuiltinConfigVersion:"default"}));const nn=await st.generateAsync({type:"blob"});ue.saveAs(nn,"Project.zip")}catch(U){console.error(U)}finally{t(36,Xt=!1)}}let Pt,dn=null,ki=!1;function Kr(U){const ue=Dt(),Se=new URL(U);return Se.hash=`#project=${encodeURIComponent(JSON.stringify(ue))}`,t(39,ki=!1),Se.toString()}function Js(){Pt.select(),Pt.setSelectionRange(0,dn.length),navigator.clipboard.writeText(dn),t(39,ki=!0)}function el(){fe&&window.open(Kr(fe),"_blank").focus()}let L=null;async function ce(U){const ue=U.view;if(!(be!==0||!_||!h||!h.name.endsWith(".mzn")))try{const Se=ue.state.doc.toString();if(Se===L)return;L=Se;const Ce=new ie.Model;for(const st of se)Ce.addFile(st.name,st.state.doc.toString(),!1);const ge=Ce.addString(Se),Qe=await Ce.check({options:ct.getCompilationConfiguration(_.id)});if(ue.state.doc.toString()!==Se)return;e6(Se,Qe.filter(st=>st.location.filename===ge),ue)}catch(Se){console.error(Se)}}function Jr(U){const ue=se.findIndex(Se=>Se.name===U.filename);if(ue!==-1){gt(ue);const Se=se[ue].state.doc.toString(),Ce=ud(U.firstLine,U.firstColumn,Se);et.focus(),et.setCursor(Ce)}}function Xr(){Xe==="horizontal"?t(2,Xe="vertical"):t(2,Xe="horizontal")}function Xs(U){t(0,q=U.detail.item===ae.edge)}let Tr=!1;function tl(U){h&&t(83,h.state=et.getState(),h),se.forEach(ue=>Rb(ue,U?U9:A9)),Cr(h)}let qi,tn=!1,Xn=!1;function Hn(U){rt&&Bt();const ue=[U.modelFile],Se=U.modelFile.substring(0,U.modelFile.length-4),Ce=se.find(Qe=>Qe.name===`${Se}.mzc`||Qe.name===`${Se}.mzc.mzn`);if(Ce&&ue.push(Ce.name),U.dataFiles)for(const Qe of U.dataFiles)ue.push(Qe);const ge=new ie.Model;for(const Qe of se)ge.addFile(Qe.name,Qe.state.doc.toString(),ue.indexOf(Qe.name)!==-1);qt(ge,ue,U.options||ct.getSolvingConfiguration(_.id))}function iu(){di=fO(this),t(21,di)}function nu(){di=fO(this),t(21,di)}const ru=()=>{t(25,Qi=!Qi),t(34,Cn=!1)},da=()=>t(38,dn=Kr(window.location.href)),pa=()=>jt(),ga=()=>{Et(),t(25,Qi=!1)},su=()=>{ni(),t(25,Qi=!1)},lu=()=>{t(0,q=!q),t(25,Qi=!1)},ou=()=>{t(38,dn=Kr(window.location.href)),t(25,Qi=!1)},au=()=>{el(),t(25,Qi=!1)},ma=()=>{t(42,Xn=!1)},Sa=()=>{t(42,Xn=!0)};function ba(U){ui[U?"unshift":"push"](()=>{qi=U,t(40,qi)})}const Gl=U=>Hn(U.detail);function fu(U){B=U,t(1,B)}const $a=()=>t(32,ii=[]),il=U=>Jr(U.detail.location),Qa=U=>gt(U.detail.index),cu=U=>Vt(U.detail.src,U.detail.dest),wa=()=>t(27,ze=!0),ya=U=>t(28,St=U.detail.index),Hl=()=>t(29,dt=!0);function uu(U){ui[U?"unshift":"push"](()=>{et=U,t(24,et)})}function va(U){Me=U,t(3,Me)}function Kl(U){ui[U?"unshift":"push"](()=>{ct=U,t(26,ct)})}const Jl=()=>t(34,Cn=!1),es=()=>t(29,dt=!1),Pa=U=>t(28,St=U.detail.index),ka=U=>Yi(U.detail.index,U.detail.options),hu=()=>t(27,ze=!0),_a=()=>t(27,ze=!1),Wa=U=>cr(U.detail.type),xa=U=>pi(U.detail.files),Ca=()=>Gr(St),Ou=()=>t(28,St=null),du=()=>t(28,St=null),pu=U=>ri(U.detail),Xa=()=>ri(!1),gu=U=>ri(U.detail),mu=()=>ri(!1),Su=()=>t(38,dn=null);function bu(U){ui[U?"unshift":"push"](()=>{Pt=U,t(37,Pt)})}const eo=()=>Pt.select(),$u=()=>t(38,dn=null);return n.$$set=U=>{"showVersionSwitcher"in U&&t(4,R=U.showVersionSwitcher),"showSolverDropdown"in U&&t(5,I=U.showSolverDropdown),"edgeMiniZinc"in U&&t(0,q=U.edgeMiniZinc),"autoClearOutput"in U&&t(1,B=U.autoClearOutput),"canEditTabs"in U&&t(6,z=U.canEditTabs),"compilationEnabled"in U&&t(7,oe=U.compilationEnabled),"project"in U&&t(71,de=U.project),"enabledSolvers"in U&&t(72,xe=U.enabledSolvers),"canEditSolverSettings"in U&&t(8,ye=U.canEditSolverSettings),"showShareButton"in U&&t(9,Ee=U.showShareButton),"showDownloadButton"in U&&t(10,pe=U.showDownloadButton),"externalPlaygroundURL"in U&&t(11,fe=U.externalPlaygroundURL),"splitterDirection"in U&&t(2,Xe=U.splitterDirection),"splitterSize"in U&&t(3,Me=U.splitterSize),"canSwitchOrientation"in U&&t(12,Ne=U.canSwitchOrientation),"showClearOutput"in U&&t(13,pt=U.showClearOutput),"showAutoClearOutput"in U&&t(14,Lt=U.showAutoClearOutput),"showOutputSectionToggles"in U&&t(15,ti=U.showOutputSectionToggles),"showOutputRightControls"in U&&t(16,xt=U.showOutputRightControls),"theme"in U&&t(73,Ct=U.theme),"hideOutputOnStartup"in U&&t(74,Zt=U.hideOutputOnStartup),"$$scope"in U&&t(132,X=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&262144&&t(51,i=[ae.latest,ae.edge]),n.$$.dirty[0]&1&&Ke(),n.$$.dirty[2]&512&&ot(de),n.$$.dirty[0]&524288&&(r=se.filter(U=>!U.hidden).length),n.$$.dirty[0]&1572864&&t(83,h=Rtxe.indexOf(U.id)!==-1):te),n.$$.dirty[0]&10485760&&t(82,_=di>=0&&diU.name.endsWith(".mzn")&&!U.name.endsWith(".mzc.mzn")).map(U=>U.name)),n.$$.dirty[0]&524288&&t(45,$=se.filter(U=>U.name.endsWith(".dzn")||U.name.endsWith(".json")).map(U=>U.name)),n.$$.dirty[0]&10485760&&en(),n.$$.dirty[2]&1048576&&t(44,x=_?_.stdFlags:[]),n.$$.dirty[2]&2097152&&Cr(h),n.$$.dirty[2]&526336&&t(22,Z={dark:!0,light:!1,auto:Tr}[Ct]),n.$$.dirty[0]&4194304&&tl(Z)},[q,B,Xe,Me,R,I,z,oe,ye,Ee,pe,fe,Ne,pt,Lt,ti,xt,be,ae,se,Rt,di,Z,Q,et,Qi,ct,ze,St,dt,Ge,ut,ii,ci,Cn,ri,Xt,Pt,dn,ki,qi,tn,Xn,b,x,$,u,f,o,l,s,i,ni,gt,cr,pi,wi,Gr,Yi,Vt,ji,Et,Bt,jt,Kr,Js,el,Jr,Xr,Xs,Hn,de,xe,Ct,Zt,ot,Ot,Dt,te,wt,rt,Tr,_,h,g,p,O,C,iu,nu,ru,da,pa,ga,su,lu,ou,au,ma,Sa,ba,Gl,fu,$a,il,Qa,cu,wa,ya,Hl,uu,va,Kl,Jl,es,Pa,ka,hu,_a,Wa,xa,Ca,Ou,du,pu,Xa,gu,mu,Su,bu,eo,$u,X]}class $6 extends Ui{constructor(e){super(),Ai(this,e,b6,S6,Ri,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,canEditTabs:6,compilationEnabled:7,project:71,enabledSolvers:72,canEditSolverSettings:8,showShareButton:9,showDownloadButton:10,externalPlaygroundURL:11,splitterDirection:2,splitterSize:3,canSwitchOrientation:12,showClearOutput:13,showAutoClearOutput:14,showOutputSectionToggles:15,showOutputRightControls:16,theme:73,hideOutputOnStartup:74,loadProject:75,hasFiles:76,getProject:77},null,[-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[75]}get hasFiles(){return this.$$.ctx[76]}get getProject(){return this.$$.ctx[77]}}const{window:Ab}=kx;function Q6(n){let e,t,i,r,s,l,o,f;function u(g){n[6](g)}function h(g){n[7](g)}function O(g){n[8](g)}let p={project:n[1]};return n[2].autoClearOutput!==void 0&&(p.autoClearOutput=n[2].autoClearOutput),n[2].splitterDirection!==void 0&&(p.splitterDirection=n[2].splitterDirection),n[2].splitterSize!==void 0&&(p.splitterSize=n[2].splitterSize),t=new $6({props:p}),n[5](t),ui.push(()=>Ao(t,"autoClearOutput",u)),ui.push(()=>Ao(t,"splitterDirection",h)),ui.push(()=>Ao(t,"splitterSize",O)),{c(){e=k("div"),Ve(t.$$.fragment),y(e,"class","playground-app svelte-tuc1wl")},m(g,b){V(g,e,b),Ue(t,e,null),l=!0,o||(f=[re(Ab,"beforeunload",n[4]),re(Ab,"hashchange",n[3])],o=!0)},p(g,[b]){const $={};b&2&&($.project=g[1]),!i&&b&4&&(i=!0,$.autoClearOutput=g[2].autoClearOutput,Ro(()=>i=!1)),!r&&b&4&&(r=!0,$.splitterDirection=g[2].splitterDirection,Ro(()=>r=!1)),!s&&b&4&&(s=!0,$.splitterSize=g[2].splitterSize,Ro(()=>s=!1)),t.$set($)},i(g){l||(D(t.$$.fragment,g),l=!0)},o(g){F(t.$$.fragment,g),l=!1},d(g){g&&Y(e),n[5](null),Ye(t),o=!1,Nt(f)}}}const Ub=`% Use this editor as a MiniZinc scratch book +`);Se.addDznString(nn),t(33,ci=st.parameters)}else{for(const nn of st.dataFiles)Ce.indexOf(nn)===-1&&(Se.addFile(nn),Ce.push(nn));xn=st.dataFiles}}finally{t(31,ut=!1)}}}catch(ge){console.error(ge)}return t(17,be--,be),{model:Se,fileList:Ce}}async function ji(){if(g){const ge=new ie.Model;ge.addFile(h.name,h.state.doc.toString());const Qe=[h.name],st=ct.getSolvingConfiguration(_.id);await qt(ge,Qe,st);return}const U=await Hr(!0);if(!U)return;const{model:ue,fileList:Se}=U,Ce=ct.getSolvingConfiguration(_.id);await qt(ue,Se,Ce)}async function qt(U,ue,Se){t(79,wt=!0);const Ce=Date.now();B&&t(32,ii=[]),t(32,ii=[...ii,{files:ue,output:[]}]),t(80,rt=U.solve({options:Se,jsonOutput:!1})),Vi(),rt.on("error",vt),rt.on("warning",vt),rt.on("solution",ge=>vt(ge,Date.now()-Ce)),rt.on("status",ge=>vt(ge,Date.now()-Ce)),rt.on("statistics",vt),rt.on("trace",ge=>vt(ge,Date.now()-Ce)),rt.on("statistics",vt),rt.on("comment",vt),rt.on("time",vt),rt.on("checker",vt),rt.on("stderr",vt);try{await rt,vt({type:"exit",code:0,runTime:Date.now()-Ce})}catch(ge){vt({type:"exit",code:ge.code,runTime:Date.now()-Ce})}t(80,rt=null)}async function Et(){t(79,wt=!0);const U=await Hr(!0);if(!U)return;Vi();const{model:ue,fileList:Se}=U,Ce=Se[0],ge=Date.now();B&&t(32,ii=[]),t(32,ii=[...ii,{files:Se,isCompile:!0,output:[]}]),t(80,rt=ue.compile({options:ct.getCompilationConfiguration(_.id)})),rt.on("error",vt),rt.on("warning",vt),rt.on("statistics",vt),rt.on("trace",vt),rt.on("statistics",vt),rt.on("stderr",vt);try{const Qe=await rt;t(19,se=[...se,{name:`${Ce.substring(0,Ce.indexOf("."))}.fzn`,state:ft.create({extensions:zf(".fzn",ce,Z),doc:Qe})}]),gt(se.length-1),vt({type:"exit",code:0,runTime:Date.now()-ge})}catch(Qe){vt({type:"exit",code:Qe.code,runTime:Date.now()-ge})}t(80,rt=null)}function Bt(){vt({type:"cancel"}),rt.cancel()}function vt(U,ue){Mt(U,ue),ii[ii.length-1].output.push(U),t(32,ii)}function Vi(){qi&&qi.reset(),t(41,tn=!1),t(42,Xn=!1)}async function Mt(U,ue){if(U.type==="trace"&&U.section==="vis_json"){tn||(t(41,tn=!0),t(42,Xn=!0)),await ds();const Se=se.find(ge=>ge.name===U.message.url);let Ce=null;if(Se)Ce=Se.state.doc.toString();else try{Ce=await ie.readStdlibFileContents(U.message.url)}catch(ge){console.error(ge);return}if(Ce===null){console.error(`Failed to get visualisation file ${U.message.url}`);return}qi.addVisualisation(Ce,U.message.userData);return}if(tn){for(;!qi;)await ds();switch(U.type){case"solution":qi.addSolution(U.output.vis_json,"time"in U?U.time:ue);break;case"status":qi.status(U.status,"time"in U?U.time:ue);break;case"exit":qi.status("time"in U?U.time:ue);break}}}function Dt(){return h&&t(83,h.state=et.getState(),h),{files:se.map(U=>({name:U.name,contents:U.state.doc.toString(),...U.hidden?{hidden:!0}:{},...U.readOnly?{readOnly:!0}:{}})),tab:Rt,solverId:_.id,solverConfig:ct.save(),minizincVersion:q?"edge":"latest"}}let Xt=!1;async function jt(){t(36,Xt=!0);try{const U=(await dm(()=>import("./jszip.min-0cb11090.js").then(si=>si.j),[])).default,ue=(await dm(()=>import("./FileSaver.min-f8ebd46c.js").then(si=>si.F),[])).default,Se=Dt(),Ce=se.map(si=>si.name),ge=se.filter(si=>!si.hidden).map(si=>si.name);let Qe=_.id;Qe==="org.minizinc.gecode_presolver"?Qe="org.gecode.gecode":Qe==="org.minizinc.chuffed"&&(Qe="org.chuffed.chuffed");const st=new U;for(const si of Se.files)st.file(si.name,si.contents);st.file("Project.mzp",JSON.stringify({version:105,projectFiles:Ce,openFiles:ge,openTab:Se.tab,selectedBuiltinConfigId:Qe,selectedBuiltinConfigVersion:"default"}));const nn=await st.generateAsync({type:"blob"});ue.saveAs(nn,"Project.zip")}catch(U){console.error(U)}finally{t(36,Xt=!1)}}let Pt,dn=null,ki=!1;function Kr(U){const ue=Dt(),Se=new URL(U);return Se.hash=`#project=${encodeURIComponent(JSON.stringify(ue))}`,t(39,ki=!1),Se.toString()}function Js(){Pt.select(),Pt.setSelectionRange(0,dn.length),navigator.clipboard.writeText(dn),t(39,ki=!0)}function el(){fe&&window.open(Kr(fe),"_blank").focus()}let L=null;async function ce(U){const ue=U.view;if(!(be!==0||!_||!h||!h.name.endsWith(".mzn")))try{const Se=ue.state.doc.toString();if(Se===L)return;L=Se;const Ce=new ie.Model;for(const st of se)Ce.addFile(st.name,st.state.doc.toString(),!1);const ge=Ce.addString(Se),Qe=await Ce.check({options:ct.getCompilationConfiguration(_.id)});if(ue.state.doc.toString()!==Se)return;e6(Se,Qe.filter(st=>st.location.filename===ge),ue)}catch(Se){console.error(Se)}}function Jr(U){const ue=se.findIndex(Se=>Se.name===U.filename);if(ue!==-1){gt(ue);const Se=se[ue].state.doc.toString(),Ce=ud(U.firstLine,U.firstColumn,Se);et.focus(),et.setCursor(Ce)}}function Xr(){Xe==="horizontal"?t(2,Xe="vertical"):t(2,Xe="horizontal")}function Xs(U){t(0,q=U.detail.item===ae.edge)}let Tr=!1;function tl(U){h&&t(83,h.state=et.getState(),h),se.forEach(ue=>Rb(ue,U?U9:A9)),Cr(h)}let qi,tn=!1,Xn=!1;function Hn(U){rt&&Bt();const ue=[U.modelFile],Se=U.modelFile.substring(0,U.modelFile.length-4),Ce=se.find(Qe=>Qe.name===`${Se}.mzc`||Qe.name===`${Se}.mzc.mzn`);if(Ce&&ue.push(Ce.name),U.dataFiles)for(const Qe of U.dataFiles)ue.push(Qe);const ge=new ie.Model;for(const Qe of se)ge.addFile(Qe.name,Qe.state.doc.toString(),ue.indexOf(Qe.name)!==-1);qt(ge,ue,U.options||ct.getSolvingConfiguration(_.id))}function iu(){di=fO(this),t(21,di)}function nu(){di=fO(this),t(21,di)}const ru=()=>{t(25,Qi=!Qi),t(34,Cn=!1)},da=()=>t(38,dn=Kr(window.location.href)),pa=()=>jt(),ga=()=>{Et(),t(25,Qi=!1)},su=()=>{ni(),t(25,Qi=!1)},lu=()=>{t(0,q=!q),t(25,Qi=!1)},ou=()=>{t(38,dn=Kr(window.location.href)),t(25,Qi=!1)},au=()=>{el(),t(25,Qi=!1)},ma=()=>{t(42,Xn=!1)},Sa=()=>{t(42,Xn=!0)};function ba(U){ui[U?"unshift":"push"](()=>{qi=U,t(40,qi)})}const Gl=U=>Hn(U.detail);function fu(U){B=U,t(1,B)}const $a=()=>t(32,ii=[]),il=U=>Jr(U.detail.location),Qa=U=>gt(U.detail.index),cu=U=>Vt(U.detail.src,U.detail.dest),wa=()=>t(27,ze=!0),ya=U=>t(28,St=U.detail.index),Hl=()=>t(29,dt=!0);function uu(U){ui[U?"unshift":"push"](()=>{et=U,t(24,et)})}function va(U){Me=U,t(3,Me)}function Kl(U){ui[U?"unshift":"push"](()=>{ct=U,t(26,ct)})}const Jl=()=>t(34,Cn=!1),es=()=>t(29,dt=!1),Pa=U=>t(28,St=U.detail.index),ka=U=>Yi(U.detail.index,U.detail.options),hu=()=>t(27,ze=!0),_a=()=>t(27,ze=!1),Wa=U=>cr(U.detail.type),xa=U=>pi(U.detail.files),Ca=()=>Gr(St),Ou=()=>t(28,St=null),du=()=>t(28,St=null),pu=U=>ri(U.detail),Xa=()=>ri(!1),gu=U=>ri(U.detail),mu=()=>ri(!1),Su=()=>t(38,dn=null);function bu(U){ui[U?"unshift":"push"](()=>{Pt=U,t(37,Pt)})}const eo=()=>Pt.select(),$u=()=>t(38,dn=null);return n.$$set=U=>{"showVersionSwitcher"in U&&t(4,R=U.showVersionSwitcher),"showSolverDropdown"in U&&t(5,I=U.showSolverDropdown),"edgeMiniZinc"in U&&t(0,q=U.edgeMiniZinc),"autoClearOutput"in U&&t(1,B=U.autoClearOutput),"canEditTabs"in U&&t(6,z=U.canEditTabs),"compilationEnabled"in U&&t(7,oe=U.compilationEnabled),"project"in U&&t(71,de=U.project),"enabledSolvers"in U&&t(72,xe=U.enabledSolvers),"canEditSolverSettings"in U&&t(8,ye=U.canEditSolverSettings),"showShareButton"in U&&t(9,Ee=U.showShareButton),"showDownloadButton"in U&&t(10,pe=U.showDownloadButton),"externalPlaygroundURL"in U&&t(11,fe=U.externalPlaygroundURL),"splitterDirection"in U&&t(2,Xe=U.splitterDirection),"splitterSize"in U&&t(3,Me=U.splitterSize),"canSwitchOrientation"in U&&t(12,Ne=U.canSwitchOrientation),"showClearOutput"in U&&t(13,pt=U.showClearOutput),"showAutoClearOutput"in U&&t(14,Lt=U.showAutoClearOutput),"showOutputSectionToggles"in U&&t(15,ti=U.showOutputSectionToggles),"showOutputRightControls"in U&&t(16,xt=U.showOutputRightControls),"theme"in U&&t(73,Ct=U.theme),"hideOutputOnStartup"in U&&t(74,Zt=U.hideOutputOnStartup),"$$scope"in U&&t(132,X=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&262144&&t(51,i=[ae.latest,ae.edge]),n.$$.dirty[0]&1&&Ke(),n.$$.dirty[2]&512&&ot(de),n.$$.dirty[0]&524288&&(r=se.filter(U=>!U.hidden).length),n.$$.dirty[0]&1572864&&t(83,h=Rtxe.indexOf(U.id)!==-1):te),n.$$.dirty[0]&10485760&&t(82,_=di>=0&&diU.name.endsWith(".mzn")&&!U.name.endsWith(".mzc.mzn")).map(U=>U.name)),n.$$.dirty[0]&524288&&t(45,$=se.filter(U=>U.name.endsWith(".dzn")||U.name.endsWith(".json")).map(U=>U.name)),n.$$.dirty[0]&10485760&&en(),n.$$.dirty[2]&1048576&&t(44,x=_?_.stdFlags:[]),n.$$.dirty[2]&2097152&&Cr(h),n.$$.dirty[2]&526336&&t(22,Z={dark:!0,light:!1,auto:Tr}[Ct]),n.$$.dirty[0]&4194304&&tl(Z)},[q,B,Xe,Me,R,I,z,oe,ye,Ee,pe,fe,Ne,pt,Lt,ti,xt,be,ae,se,Rt,di,Z,Q,et,Qi,ct,ze,St,dt,Ge,ut,ii,ci,Cn,ri,Xt,Pt,dn,ki,qi,tn,Xn,b,x,$,u,f,o,l,s,i,ni,gt,cr,pi,wi,Gr,Yi,Vt,ji,Et,Bt,jt,Kr,Js,el,Jr,Xr,Xs,Hn,de,xe,Ct,Zt,ot,Ot,Dt,te,wt,rt,Tr,_,h,g,p,O,C,iu,nu,ru,da,pa,ga,su,lu,ou,au,ma,Sa,ba,Gl,fu,$a,il,Qa,cu,wa,ya,Hl,uu,va,Kl,Jl,es,Pa,ka,hu,_a,Wa,xa,Ca,Ou,du,pu,Xa,gu,mu,Su,bu,eo,$u,X]}class $6 extends Ui{constructor(e){super(),Ai(this,e,b6,S6,Ri,{showVersionSwitcher:4,showSolverDropdown:5,edgeMiniZinc:0,autoClearOutput:1,canEditTabs:6,compilationEnabled:7,project:71,enabledSolvers:72,canEditSolverSettings:8,showShareButton:9,showDownloadButton:10,externalPlaygroundURL:11,splitterDirection:2,splitterSize:3,canSwitchOrientation:12,showClearOutput:13,showAutoClearOutput:14,showOutputSectionToggles:15,showOutputRightControls:16,theme:73,hideOutputOnStartup:74,loadProject:75,hasFiles:76,getProject:77},null,[-1,-1,-1,-1,-1])}get loadProject(){return this.$$.ctx[75]}get hasFiles(){return this.$$.ctx[76]}get getProject(){return this.$$.ctx[77]}}const{window:Ab}=kx;function Q6(n){let e,t,i,r,s,l,o,f;function u(g){n[6](g)}function h(g){n[7](g)}function O(g){n[8](g)}let p={project:n[1]};return n[2].autoClearOutput!==void 0&&(p.autoClearOutput=n[2].autoClearOutput),n[2].splitterDirection!==void 0&&(p.splitterDirection=n[2].splitterDirection),n[2].splitterSize!==void 0&&(p.splitterSize=n[2].splitterSize),t=new $6({props:p}),n[5](t),ui.push(()=>Ao(t,"autoClearOutput",u)),ui.push(()=>Ao(t,"splitterDirection",h)),ui.push(()=>Ao(t,"splitterSize",O)),{c(){e=k("div"),Ve(t.$$.fragment),y(e,"class","playground-app svelte-tuc1wl")},m(g,b){V(g,e,b),Ue(t,e,null),l=!0,o||(f=[re(Ab,"beforeunload",n[4]),re(Ab,"hashchange",n[3])],o=!0)},p(g,[b]){const $={};b&2&&($.project=g[1]),!i&&b&4&&(i=!0,$.autoClearOutput=g[2].autoClearOutput,Ro(()=>i=!1)),!r&&b&4&&(r=!0,$.splitterDirection=g[2].splitterDirection,Ro(()=>r=!1)),!s&&b&4&&(s=!0,$.splitterSize=g[2].splitterSize,Ro(()=>s=!1)),t.$set($)},i(g){l||(D(t.$$.fragment,g),l=!0)},o(g){F(t.$$.fragment,g),l=!1},d(g){g&&Y(e),n[5](null),Ye(t),o=!1,Nt(f)}}}const Ub=`% Use this editor as a MiniZinc scratch book `,Yb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function w6(n,e,t){let i,r={files:[]},s={autoClearOutput:!1,splitterDirection:"vertical",splitterSize:75,sessions:{}};try{const $=localStorage.getItem("mznPlayground");$&&$.length>0&&(s={...s,...JSON.parse($)})}catch($){console.error($)}let l;function o(){if(Object.keys(s.sessions).length>=5){const x=Object.keys(s.sessions).map(Z=>({key:Z,value:s.sessions[Z]}));x.sort((Z,C)=>C.value.timestamp-Z.value.timestamp),t(2,s.sessions=x.slice(0,5-1).reduce((Z,C)=>({...Z,[C.key]:C.value}),{}),s)}const Q=()=>Array(6).fill(0).map(()=>Yb[Math.floor(Math.random()*Yb.length)]).join("");let _=Q();for(;_ in s.sessions;)_=Q();return _}function f($){return $.solverId||($.solver===0?$.solverId="org.minizinc.gecode_presolver":r.solver===1&&($.solverId="org.minizinc.mip.coin-bc")),$}function u(){if(l&&i.hasFiles()){const Q=i.getProject();t(2,s.sessions[l]=Q,s)}if(window.location.hash.startsWith("#project="))try{const Q=decodeURIComponent(window.location.hash.substring(9));t(1,r=f(JSON.parse(Q))),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`);return}catch(Q){console.error(Q)}if(window.location.hash.startsWith("#code="))try{const Q=decodeURIComponent(window.location.hash.substring(6));t(1,r={files:[{name:"Playground.mzn",contents:Q,anchor:Q.length}]}),l=o(),window.history.replaceState(void 0,void 0,`#session=${l}`)}catch(Q){console.error(Q)}window.location.hash.startsWith("#session=")||window.history.replaceState(void 0,void 0,`#session=${o()}`);const $=window.location.hash.substring(9);if($!==l&&s.sessions&&s.sessions[$])try{t(1,r=f(s.sessions[$])),l=$}catch(Q){console.error(Q)}r.files.length===0&&t(1,r={files:[{name:"Playground.mzn",contents:Ub,anchor:Ub.length}]}),l=$}zc(()=>u());function h(){const $=i.getProject();t(2,s.sessions[l]={...$,timestamp:Date.now()},s),localStorage.setItem("mznPlayground",JSON.stringify(s))}function O($){ui[$?"unshift":"push"](()=>{i=$,t(0,i)})}function p($){n.$$.not_equal(s.autoClearOutput,$)&&(s.autoClearOutput=$,t(2,s))}function g($){n.$$.not_equal(s.splitterDirection,$)&&(s.splitterDirection=$,t(2,s))}function b($){n.$$.not_equal(s.splitterSize,$)&&(s.splitterSize=$,t(2,s))}return[i,r,s,u,h,O,p,g,b]}class y6 extends Ui{constructor(e){super(),Ai(this,e,w6,Q6,Ri,{})}}new y6({target:document.getElementById("app")});export{ko as c,W6 as g}; diff --git a/develop/assets/jszip.min-19e8762f.js b/develop/assets/jszip.min-0cb11090.js similarity index 99% rename from develop/assets/jszip.min-19e8762f.js rename to develop/assets/jszip.min-0cb11090.js index 1679a97..868752d 100644 --- a/develop/assets/jszip.min-19e8762f.js +++ b/develop/assets/jszip.min-0cb11090.js @@ -1,4 +1,4 @@ -import{g as Ot,c as vt}from"./index-42d3d144.js";function Bt(ct,wt){for(var _=0;_N[w]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}function yt(ct){throw new Error('Could not dynamically require "'+ct+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zt={exports:{}};/*! +import{g as Ot,c as vt}from"./index-9aa800aa.js";function Bt(ct,wt){for(var _=0;_N[w]})}}}return Object.freeze(Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"}))}function yt(ct){throw new Error('Could not dynamically require "'+ct+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var zt={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/develop/index.html b/develop/index.html index 62662d3..cc69e35 100644 --- a/develop/index.html +++ b/develop/index.html @@ -5,7 +5,7 @@ MiniZinc Playground - +