diff --git a/CLI/wwwroot/build/bundle.css b/CLI/wwwroot/build/bundle.css
index 0407504..dc130f9 100644
--- a/CLI/wwwroot/build/bundle.css
+++ b/CLI/wwwroot/build/bundle.css
@@ -1,11 +1,11 @@
main.svelte-1kds1eb{text-align:center;padding:1em;max-width:240px;margin:0 auto}@media(min-width: 640px){main.svelte-1kds1eb{max-width:none}}
tr.svelte-1aug0lv:hover{cursor:pointer}
textarea.svelte-nhavks{width:750px;min-height:250px}
+.preview.svelte-9zwial{height:calc(100% - 60px)}iframe.svelte-9zwial{width:100%;margin:2rem 0;height:100%;border:none}
.errors.svelte-1l9twu{position:fixed;right:1rem;top:6rem}.error.svelte-1l9twu{min-width:300px;max-width:700px}.error.svelte-1l9twu pre.svelte-1l9twu{overflow-wrap:break-word}.editor-container.svelte-1l9twu{margin-top:1rem}.editor-container.svelte-1l9twu,#editor.svelte-1l9twu{height:calc(100% - 4rem)}
-.preview.svelte-7yoi32{height:calc(100% - 60px)}iframe.svelte-7yoi32{height:100%;width:23cm;padding:0 1cm;border:none;position:absolute;left:50%;transform:translateX(-50%)}
.topology.svelte-sq8u03{height:calc(100% - 4rem)}#topology.svelte-sq8u03{height:100%}#topology>.svelte-sq8u03:focus{outline:none !important}.options-form.svelte-sq8u03{position:fixed;right:10px;bottom:10px}
-.descriptor.svelte-86a2ch{border:1px solid lightgray;font-size:14px;padding:1;margin:0;width:450px;margin-bottom:1rem;margin-left:50%;transform:translateX(-50%)}.descriptor.svelte-86a2ch:hover{cursor:pointer}.descriptor.svelte-86a2ch h2.svelte-86a2ch{background:#3083db;color:white;padding:0.5em;font-size:1em;margin:0;position:relative}.descriptor.svelte-86a2ch .description.svelte-86a2ch{color:gray;padding:0 1rem}.pill.svelte-86a2ch{background:orange;border:1 px solid rgb(172, 114, 6);color:white;border-radius:50%;font-size:10px;text-transform:lowercase;padding:0.5em 1em 0.6em 1em;position:absolute;left:10px;top:50%;transform:translateY(-50%)}.pill.type.svelte-86a2ch{background:purple}.pill.field.svelte-86a2ch{background:darkgreen}
ul.svelte-wjec8i{list-style:none;text-align:left}
+.descriptor.svelte-86a2ch{border:1px solid lightgray;font-size:14px;padding:1;margin:0;width:450px;margin-bottom:1rem;margin-left:50%;transform:translateX(-50%)}.descriptor.svelte-86a2ch:hover{cursor:pointer}.descriptor.svelte-86a2ch h2.svelte-86a2ch{background:#3083db;color:white;padding:0.5em;font-size:1em;margin:0;position:relative}.descriptor.svelte-86a2ch .description.svelte-86a2ch{color:gray;padding:0 1rem}.pill.svelte-86a2ch{background:orange;border:1 px solid rgb(172, 114, 6);color:white;border-radius:50%;font-size:10px;text-transform:lowercase;padding:0.5em 1em 0.6em 1em;position:absolute;left:10px;top:50%;transform:translateY(-50%)}.pill.type.svelte-86a2ch{background:purple}.pill.field.svelte-86a2ch{background:darkgreen}
.overlay.svelte-yjqhyw{position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;background:rgba(0, 0, 0, 0.4);visibility:hidden}.overlay.show.svelte-yjqhyw{visibility:visible}.overlay.svelte-yjqhyw .window.svelte-yjqhyw{background:#313338;border:1px solid 616265;border-radius:5px;position:absolute;top:10%;width:300px;left:50%;transform:translateX(-50%);font-size:2em;color:white}
/*# sourceMappingURL=bundle.css.map */
\ No newline at end of file
diff --git a/CLI/wwwroot/build/bundle.css.map b/CLI/wwwroot/build/bundle.css.map
index d6fe97e..7b14041 100644
--- a/CLI/wwwroot/build/bundle.css.map
+++ b/CLI/wwwroot/build/bundle.css.map
@@ -5,24 +5,24 @@
"../../../web/src/App.svelte",
"../../../web/src/Lexicon.svelte",
"../../../web/src/LexiconAdmin.svelte",
- "../../../web/src/Editor.svelte",
"../../../web/src/Preview.svelte",
+ "../../../web/src/Editor.svelte",
"../../../web/src/ModuleTopology.svelte",
- "../../../web/src/SearchResult.svelte",
"../../../web/src/FileTree.svelte",
+ "../../../web/src/SearchResult.svelte",
"../../../web/src/Controls/Overlay.svelte"
],
"sourcesContent": [
"\n\n\n\n\n\n navigator.navigate('index')}>\n Home\n \n navigator.navigate('module-topology')}>\n Topology\n \n navigator.navigate('lexicon')}>\n Lexicon\n \n {#if navigator.module}\n navigator.navigate('editor')}>\n Editor\n \n navigator.navigate('preview')}>\n Preview\n \n {/if}\n \n\n{#if route === 'index'}\n \n{:else if route === 'lexicon'}\n \n{:else if route === 'add-lexicon'}\n \n{:else if route === 'edit-lexicon'}\n \n{:else if route === 'lexicon-admin'}\n \n{:else if route === 'preview'}\n \n{:else if route === 'editor'}\n \n{:else if route === 'config'}\n \n{:else if route === 'module-topology'}\n \n{:else if route === 'module-create'}\n \n{:else}\n \n{/if}\n",
"\n\n\n\n
\n
Search your lexicon! \n
\n {\n navigator.navigate('add-lexicon');\n }}>\n Create\n \n
Search your lexicon: \n e.code === 'Enter' && onkeyup(e.target.value)}\n on:change={e => findData(e.target.value)} />\n \n
\n\n \n Domain \n Name \n Description \n \n \n {#each data as d}\n navigator.navigate('edit-lexicon', d.id)}>\n {d.domain} \n {d.name} \n {d.description} \n \n {/each}\n \n
\n",
"\n\n\n\nDomains \nPlease give the domains you would like to restrict your lexicon to.
\n\n\nOwners \nPlease give the owners you would like to restrict the lexicon to.
\n\n",
+ "\n\n\n\n\n \n
\n",
"\n\n\n\n\n Save \n
\n\n\n{#if errors && errors.length > 0}\n \n {#each errors as error}\n
\n
{error.title}
\n
{error.message} \n
\n {/each}\n
\n{/if}\n\n",
- "\n\n\n\n\n \n
\n",
"\n\n\n\n\n",
- "\n\n\n\n selectNode(descriptor)}>\n
\n \n {descriptor.descriptorType}\n \n {descriptor.module} - {descriptor.parent ? descriptor.parent + '.' : ''}{descriptor.name}\n \n
{descriptor.description || 'No Description'}
\n
\n Module: {descriptor.module}\n \n {#if descriptor.descriptorType === 'Type'}\n
\n
\n Show me the data!\n \n {/if}\n\n
\n
\n",
"\n\n\n\n\n {#each tree.root.files as file}\n {\n showOverlay = !showOverlay;\n }}>\n {file.name}\n \n {#each file.files as nested}\n {nested.name} \n {/each}\n \n \n {/each}\n \n \n",
+ "\n\n\n\n selectNode(descriptor)}>\n
\n \n {descriptor.descriptorType}\n \n {descriptor.module} - {descriptor.parent ? descriptor.parent + '.' : ''}{descriptor.name}\n \n
{descriptor.description || 'No Description'}
\n
\n Module: {descriptor.module}\n \n {#if descriptor.descriptorType === 'Type'}\n
\n
\n Show me the data!\n \n {/if}\n\n
\n
\n",
"\n\n\n\n\n
\n keyup(e)} on:blur={focus} />\n
\n
\n"
],
"names": [],
- "mappings": "AAoBE,IAAI,eAAC,CAAC,AACJ,UAAU,CAAE,MAAM,CAClB,OAAO,CAAE,GAAG,CACZ,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,CAAC,CAAC,IAAI,AAChB,CAAC,AACD,MAAM,AAAC,YAAY,KAAK,CAAC,AAAC,CAAC,AACzB,IAAI,eAAC,CAAC,AACJ,SAAS,CAAE,IAAI,AACjB,CAAC,AACH,CAAC;ACKD,iBAAE,MAAM,AAAC,CAAC,AACR,MAAM,CAAE,OAAO,AACjB,CAAC;AC3BD,QAAQ,cAAC,CAAC,AACR,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,KAAK,AACnB,CAAC;ACgGD,OAAO,cAAC,CAAC,AACP,QAAQ,CAAE,KAAK,CACf,KAAK,CAAE,IAAI,CACX,GAAG,CAAE,IAAI,AACX,CAAC,AACD,MAAM,cAAC,CAAC,AACN,SAAS,CAAE,KAAK,CAChB,SAAS,CAAE,KAAK,AAClB,CAAC,AACD,oBAAM,CAAC,GAAG,cAAC,CAAC,AACV,aAAa,CAAE,UAAU,AAC3B,CAAC,AACD,iBAAiB,cAAC,CAAC,AACjB,UAAU,CAAE,IAAI,AAClB,CAAC,AACD,+BAAiB,CACjB,OAAO,cAAC,CAAC,AAEP,MAAM,CAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,AAC3B,CAAC;AC1HD,QAAQ,cAAC,CAAC,AACR,MAAM,CAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,AAC3B,CAA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f,cAAc,CAAE,SAAS,CACzB,OAAO,CAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAC5B,QAAQ,CAAE,QAAQ,CAClB,IAAI,CAAE,IAAI,CACV,GAAG,CAAE,GAAG,CACR,SAAS,CAAE,WAAW,IAAI,CAAC,AAC7B,CAAC,AACD,KAAK,KAAK,cAAC,CAAC,AACV,UAAU,CAAE,MAAM,AACpB,CAAC,AACD,KAAK,MAAM,cAAC,CAAC,AACX,UAAU,CAAE,SAAS,AACvB,CAAC;ACtDD,QAAQ,cAAC,CAAC,AACR,QAAQ,CAAE,KAAK,CACf,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,CAAC,CACR,MAAM,CAAE,CAAC,CACT,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,UAAU,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAC9B,UAAU,CAAE,MAAM,AACpB,CAAC,AACD,QAAQ,KAAK,cAAC,CAAC,AACb,UAAU,CAAE,OAAO,AACrB,CAAC,AACD,sBAAQ,CAAC,OAAO,cAAC,CAAC,AAChB,UAAU,CAAE,OAAO,CACnB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CACxB,aAAa,CAAE,GAAG,CAClB,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,KAAK,CACZ,IAAI,CAAE,GAAG,CACT,SAAS,CAAE,WAAW,IAAI,CAAC,CAC3B,SAAS,CAAE,GAAG,CACd,KAAK,CAAE,KAAK,AACd,CAAC"
}
\ No newline at end of file
diff --git a/CLI/wwwroot/build/bundle.js b/CLI/wwwroot/build/bundle.js
index 268f0ce..1447805 100644
--- a/CLI/wwwroot/build/bundle.js
+++ b/CLI/wwwroot/build/bundle.js
@@ -1,2 +1,2 @@
-var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function a(e){e.forEach(t)}function o(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,t){e.appendChild(t)}function r(e,t,n){e.insertBefore(t,n||null)}function c(e){e.parentNode.removeChild(e)}function s(e,t){for(let n=0;ne.removeEventListener(t,n,a)}function f(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function h(e,t){t=""+t,e.data!==t&&(e.data=t)}function v(e,t){(null!=t||e.value)&&(e.value=t)}function _(e,t,n,a){e.style.setProperty(t,n,a?"important":"")}function w(e,t){for(let n=0;n{E.delete(e),a&&(n&&e.d(1),a())}),e.o(t)}}function M(e){e&&e.c()}function F(e,n,i){const{fragment:l,on_mount:r,on_destroy:c,after_update:s}=e.$$;l&&l.m(n,i),A(()=>{const n=r.map(t).filter(o);c?c.push(...n):a(n),e.$$.on_mount=[]}),s.forEach(A)}function q(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx={})}function z(e,t){e.$$.dirty||(C.push(e),N||(N=!0,I.then(S)),e.$$.dirty=n()),e.$$.dirty[t]=!0}function B(t,o,i,l,r,c){const s=y;$(t);const d=o.props||{},u=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:r,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:[]),callbacks:n(),dirty:null};let p=!1;u.ctx=i?i(t,d,(e,n,a=n)=>(u.ctx&&r(u.ctx[e],u.ctx[e]=a)&&(u.bound[e]&&u.bound[e](a),p&&z(t,e)),n)):d,u.update(),p=!0,a(u.before_update),u.fragment=!!l&&l(u.ctx),o.target&&(o.hydrate?u.fragment&&u.fragment.l(function(e){return Array.from(e.childNodes)}(o.target)):u.fragment&&u.fragment.c(),o.intro&&L(t.$$.fragment),F(t,o.target,o.anchor),S()),$(s)}class V{$destroy(){q(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}}function H(e){let t,n,a,o,i,s;return{c(){t=d("br"),n=p(),a=d("a"),o=u("Show me the data!"),f(a,"alt",i=e.descriptor.name),f(a,"href",s=`/api/data/${e.descriptor.module}/${e.descriptor.name}`)},m(e,i){r(e,t,i),r(e,n,i),r(e,a,i),l(a,o)},p(e,t){e.descriptor&&i!==(i=t.descriptor.name)&&f(a,"alt",i),e.descriptor&&s!==(s=`/api/data/${t.descriptor.module}/${t.descriptor.name}`)&&f(a,"href",s)},d(e){e&&c(t),e&&c(n),e&&c(a)}}}function U(t){let n,a,o,i,s,g,v,_,w,x,y,$,b,C,k,T,O,I,N,A,S,D,E,j=t.descriptor.descriptorType+"",P=t.descriptor.module+"",R=t.descriptor.parent?t.descriptor.parent+".":"",L=t.descriptor.name+"",K=(t.descriptor.description||"No Description")+"",M=t.descriptor.module+"",F="Type"===t.descriptor.descriptorType&&H(t);return{c(){n=d("div"),a=d("h2"),o=d("span"),i=u(j),g=p(),v=u(P),_=u(" - "),w=u(R),x=u(L),y=p(),$=d("p"),b=u(K),C=p(),k=d("a"),T=u("Module: "),O=u(M),A=p(),F&&F.c(),S=p(),D=d("div"),f(o,"class",s="pill "+t.descriptor.descriptorType.toLowerCase()+" svelte-86a2ch"),f(a,"class","svelte-86a2ch"),f($,"class","description svelte-86a2ch"),f(k,"alt",I=t.descriptor.module),f(k,"href",N=`?path=preview&module=${t.descriptor.module}`),f(D,"id",t.id),f(n,"class","descriptor svelte-86a2ch"),E=m(n,"click",t.click_handler)},m(e,t){r(e,n,t),l(n,a),l(a,o),l(o,i),l(a,g),l(a,v),l(a,_),l(a,w),l(a,x),l(n,y),l(n,$),l($,b),l(n,C),l(n,k),l(k,T),l(k,O),l(n,A),F&&F.m(n,null),l(n,S),l(n,D)},p(e,t){e.descriptor&&j!==(j=t.descriptor.descriptorType+"")&&h(i,j),e.descriptor&&s!==(s="pill "+t.descriptor.descriptorType.toLowerCase()+" svelte-86a2ch")&&f(o,"class",s),e.descriptor&&P!==(P=t.descriptor.module+"")&&h(v,P),e.descriptor&&R!==(R=t.descriptor.parent?t.descriptor.parent+".":"")&&h(w,R),e.descriptor&&L!==(L=t.descriptor.name+"")&&h(x,L),e.descriptor&&K!==(K=(t.descriptor.description||"No Description")+"")&&h(b,K),e.descriptor&&M!==(M=t.descriptor.module+"")&&h(O,M),e.descriptor&&I!==(I=t.descriptor.module)&&f(k,"alt",I),e.descriptor&&N!==(N=`?path=preview&module=${t.descriptor.module}`)&&f(k,"href",N),"Type"===t.descriptor.descriptorType?F?F.p(e,t):((F=H(t)).c(),F.m(n,S)):F&&(F.d(1),F=null)},i:e,o:e,d(e){e&&c(n),F&&F.d(),E()}}}function W(e,t,n){let{descriptor:a}=t,o=async e=>{let t=`/api/svg?module=${e.module}&name=${e.name}&type=g`,n=await fetch(t),a=await n.text();var o=document.getElementById(i);mermaid.render("inner-"+i,a,(e,t)=>{o.innerHTML=e},o)},i="mermaid-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)+"-"+Date.now();return e.$set=e=>{"descriptor"in e&&n("descriptor",a=e.descriptor)},{descriptor:a,selectNode:o,id:i,click_handler:()=>o(a)}}class J extends V{constructor(e){super(),B(this,e,W,U,i,{descriptor:0})}}const X=[];function Y(t,n=e){let a;const o=[];function l(e){if(i(t,e)&&(t=e,a)){const e=!X.length;for(let e=0;e{const e=o.indexOf(c);-1!==e&&o.splice(e,1),0===o.length&&(a(),a=null)}}}}var Z=new class{constructor(){this.route=Y(G("path")||"index"),this.params=Y([]),this.module=G("module")||null}navigate(e,...t){this.route.update(t=>e),this.params.update(e=>t),"edit-lexicon"!==e&&function(e,t,n){n||(n=window.location.href);var a,o=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(!o.test(n)){if(null!=t){var i=-1!==n.indexOf("?")?"&":"?";return a=n.split("#"),n=a[0]+i+e+"="+t,void 0!==a[1]&&null!==a[1]&&(n+="#"+a[1]),window.location.href=n,n}return n}if(null==t)return a=n.split("#"),n=a[0].replace(o,"$1$3").replace(/(&|\?)$/,""),void 0!==a[1]&&null!==a[1]&&(n+="#"+a[1]),window.location.href=n,n;var l=n.replace(o,"$1"+e+"="+t+"$2$3");window.location.href=l}("path",e)}preview(e){window.location.href=`/index.html?path=preview&module=${e}`}subscribe(e){this.route.subscribe(e)}$params(e){this.params.subscribe(t=>{e(t||[])})}};function G(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function Q(e,t,n){const a=Object.create(e);return a.d=t[n],a}function ee(t){let n;return{c(){(n=d("div")).textContent="Your query returned no results."},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}function te(e){let t,n,a=e.data,o=[];for(let t=0;tK(o[e],1,1,()=>{o[e]=null});return{c(){for(let e=0;e0?0:1}return _=C(0,e),w=b[_]=$[_](e),{c(){t=d("div"),(n=d("h1")).textContent="Welcome to ZDragon!",a=p(),(o=d("p")).innerHTML='\n Visit\n \n ZDragon.nl\n \n to learn more about zdragon!\n ',i=p(),s=d("div"),(u=d("h2")).textContent="Search your models:",g=p(),h=d("input"),v=p(),w.c(),f(n,"class","title"),f(h,"class","search"),f(h,"autocomplete","off"),f(h,"type","text"),f(t,"class","content--center"),y=m(h,"keypress",e.keypress)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i),l(t,s),l(s,u),l(s,g),l(s,h),l(t,v),b[_].m(t,null),x=!0},p(e,n){let a=_;(_=C(0,n))===a?b[_].p(e,n):(P(),K(b[a],1,1,()=>{b[a]=null}),R(),(w=b[_])||(w=b[_]=$[_](n)).c(),L(w,1),w.m(t,null))},i(e){x||(L(w),x=!0)},o(e){K(w),x=!1},d(e){e&&c(t),b[_].d(),y()}}}function oe(e,t,n){let a=sessionStorage.getItem("search-results"),o=a?JSON.parse(a):[];const i=async e=>{try{n("data",o=[]);var t=await fetch(`/api/search/${e||"nothing"}`);n("data",o=await t.json()),sessionStorage.setItem("search-results",JSON.stringify(o))}catch(e){console.log(e)}},l=async e=>{try{var t=await fetch("/api/modules/"+e,{method:"POST"});let a=await t.json();n("data",o=a),setTimeout(()=>{window.location.href=`/index.html?path=editor&module=${e}`},500)}catch(e){console.log(e)}};return{data:o,keypress:e=>{"Enter"===e.key&&(async e=>{let[t,n,...a]=e.split(":");n?"modules"==t.trim()?i("modules:"):"new"==t.trim()&&n&&l(n.trim()):i(t)})(e.target.value)}}}class ie extends V{constructor(e){super(),B(this,e,oe,ae,i,{})}}function le(e,t,n){const a=Object.create(e);return a.d=t[n],a}function re(e){let t,n,a,o,i,s,g,v,_,w,x,y=e.d.domain+"",$=e.d.name+"",b=e.d.description+"";function C(...t){return e.click_handler_1(e,...t)}return{c(){t=d("tr"),n=d("td"),a=u(y),o=p(),i=d("td"),s=u($),g=p(),v=d("td"),_=u(b),w=p(),f(t,"class","svelte-1aug0lv"),x=m(t,"click",C)},m(e,c){r(e,t,c),l(t,n),l(n,a),l(t,o),l(t,i),l(i,s),l(t,g),l(t,v),l(v,_),l(t,w)},p(t,n){e=n,t.data&&y!==(y=e.d.domain+"")&&h(a,y),t.data&&$!==($=e.d.name+"")&&h(s,$),t.data&&b!==(b=e.d.description+"")&&h(_,b)},d(e){e&&c(t),x()}}}function ce(t){let n,o,i,u,g,h,v,_,w,x,y,$,b,C,k,T=t.data,O=[];for(let e=0;eDomain \n Name \n Description ",b=p(),C=d("tbody");for(let e=0;e{if(e){o=e;var t=await fetch("/api/lexicon?query="+o),i=await t.json();n("data",a=i||[])}},l=e=>{i(e)};i("all:");return{data:a,findData:i,onkeyup:l,click_handler:()=>{Z.navigate("add-lexicon")},keyup_handler:e=>"Enter"===e.code&&l(e.target.value),change_handler:e=>i(e.target.value),click_handler_1:({d:e})=>Z.navigate("edit-lexicon",e.id)}}class de extends V{constructor(e){super(),B(this,e,se,ce,i,{})}}function ue(e,t,n){const a=Object.create(e);return a.tag=t[n],a}function pe(e,t,n){const a=Object.create(e);return a.application=t[n],a}function ge(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function me(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function fe(e,t,n){const a=Object.create(e);return a.domain=t[n],a}function he(e){let t;return{c(){(t=d("div")).textContent="The configuration seems to be incomplete. There are no domains defined.\n Without a domain it is impossible to create a Lexicon entry. Please ask you\n administrator to complete the configuration.",f(t,"class","error")},m(e,n){r(e,t,n)},d(e){e&&c(t)}}}function ve(e){let t,n,a,o=e.domain+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.domain,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.domain+"")&&h(n,o),e.config&&a!==(a=i.domain)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function _e(e){let t,n,a,o=e.owner+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.owner,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.owner+"")&&h(n,o),e.config&&a!==(a=i.owner)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function we(e){let t,n,a,o=e.owner+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.owner,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.owner+"")&&h(n,o),e.config&&a!==(a=i.owner)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function xe(e){let t,n,a,o,i,s,g=e.application+"";function v(...t){return e.click_handler_1(e,...t)}return{c(){t=d("div"),n=u(g),a=p(),(o=d("span")).textContent="X",i=p(),f(o,"class","delete"),s=m(o,"click",v)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i)},p(t,a){e=a,t.data&&g!==(g=e.application+"")&&h(n,g)},d(e){e&&c(t),s()}}}function ye(e){let t,n,a,o,i,s,g=e.tag+"";function v(...t){return e.click_handler_2(e,...t)}return{c(){t=d("div"),n=u(g),a=p(),(o=d("span")).textContent="X",i=p(),f(o,"class","delete"),s=m(o,"click",v)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i)},p(t,a){e=a,t.data&&g!==(g=e.tag+"")&&h(n,g)},d(e){e&&c(t),s()}}}function $e(t){let n,o,i,u,g,h,x,y,$,b,C,k,T,O,I,N,S,D,E,j,P,R,L,K,M,F,q,z,B,V,H,U,W,J,X,Y,Z,G,Q,ee,te,ne,ae,oe,ie,le,re,ce,se,de,$e,be,Ce,ke,Te,Oe=(!t.config||!t.config.domains||t.config.domains.length<1)&&he(),Ie=t.config.domains,Ne=[];for(let e=0;et.select0_change_handler.call(O)),f(b,"class","left"),U.__value="",U.value=U.__value,void 0===t.data.functionalOwner&&A(()=>t.select1_change_handler.call(H)),G.__value="",G.value=G.__value,void 0===t.data.technicalOwner&&A(()=>t.select2_change_handler.call(Z)),le.value=t.newApplication,f(ie,"class","input"),_(ne,"margin-bottom","1em"),Ce.value=t.newTag,f(be,"class","input"),f(q,"class","right"),f($,"submit","() => "),f(o,"class","content--center"),Te=[m(g,"click",t.submit),m(x,"click",t.click_handler),m(O,"change",t.select0_change_handler),m(j,"input",t.input0_input_handler),m(M,"input",t.textarea_input_handler),m(H,"change",t.select1_change_handler),m(Z,"change",t.select2_change_handler),m(le,"change",t.changeApplication),m(le,"keyup",t.keyup_handler),m(Ce,"change",t.changeTag),m(Ce,"keyup",t.keyup_handler_1)]},m(e,a){Oe&&Oe.m(e,a),r(e,n,a),r(e,o,a),l(o,i),l(o,u),l(o,g),l(o,h),l(o,x),l(o,y),l(o,$),l($,b),l(b,C),l(C,k),l(C,T),l(C,O),l(O,I);for(let e=0;e{var e=await fetch("/api/lexicon/config");n("config",o=await e.json())})();let i="",l="",r=e=>{n("data",a.tags=a.tags.filter(t=>t!==e),a)},c=e=>{n("data",a.applications=a.applications.filter(t=>t!==e),a)},s=(e,t)=>{"Enter"===e.code&&("a"===t?(n("data",a.applications=a.applications||[],a),l&&l.length>0&&-1===a.applications.indexOf(l)&&(a.applications.push(l),n("newApplication",l=""))):"t"===t&&(n("data",a.tags=a.tags||[],a),i&&i.length>0&&-1===a.tags.indexOf(i)&&(a.tags.push(i),n("newTag",i=""))))};return{data:a,config:o,newTag:i,newApplication:l,submit:async()=>{a.name&&a.domain&&a.description&&(await fetch("/api/lexicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),Z.navigate("lexicon"))},changeTag:e=>{n("newTag",i=e.target.value)},removeTag:r,changeApplication:e=>{n("newApplication",l=e.target.value)},removeApplication:c,onkeyup:s,click_handler:()=>Z.navigate("lexicon"),select0_change_handler:function(){a.domain=x(this),n("data",a),n("config",o)},input0_input_handler:function(){a.name=this.value,n("data",a),n("config",o)},textarea_input_handler:function(){a.description=this.value,n("data",a),n("config",o)},select1_change_handler:function(){a.functionalOwner=x(this),n("data",a),n("config",o)},select2_change_handler:function(){a.technicalOwner=x(this),n("data",a),n("config",o)},keyup_handler:e=>s(e,"a"),click_handler_1:({application:e})=>c(e),keyup_handler_1:e=>s(e,"t"),click_handler_2:({tag:e})=>r(e)}}class Ce extends V{constructor(e){super(),B(this,e,be,$e,i,{})}}function ke(e,t,n){const a=Object.create(e);return a.tag=t[n],a}function Te(e,t,n){const a=Object.create(e);return a.application=t[n],a}function Oe(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function Ie(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function Ne(e,t,n){const a=Object.create(e);return a.domain=t[n],a}function Ae(e){let t,n,o,i,u,g,h,x,y,$,b,C,k,T,O,I,N,S,D,E,j,P,R,L,K,M,F,q,z,B,V,H,U,W,J,X,Y,Z,G,Q,ee,te,ne,ae,oe,ie,le,re,ce,se,de,ue,pe,ge,me,fe=e.config.domains,he=[];for(let t=0;te.select0_change_handler.call(T)),f($,"class","left"),H.__value="",H.value=H.__value,void 0===e.data.functionalOwner&&A(()=>e.select1_change_handler.call(V)),Z.__value="",Z.value=Z.__value,void 0===e.data.technicalOwner&&A(()=>e.select2_change_handler.call(Y)),ie.value=e.newApplication,f(oe,"class","input"),_(te,"margin-bottom","1em"),pe.value=e.newTag,f(ue,"class","input"),f(F,"class","right"),f(y,"submit","() => "),f(x,"class","edit-form"),f(t,"class","content--center"),me=[m(i,"click",e.submit),m(g,"click",e.click_handler),m(T,"change",e.select0_change_handler),m(E,"input",e.input0_input_handler),m(K,"input",e.textarea_input_handler),m(V,"change",e.select1_change_handler),m(Y,"change",e.select2_change_handler),m(ie,"change",e.changeApplication),m(ie,"keyup",e.keyup_handler),m(pe,"change",e.changeTag),m(pe,"keyup",e.keyup_handler_1)]},m(a,c){r(a,t,c),l(t,n),l(t,o),l(t,i),l(t,u),l(t,g),l(t,h),l(t,x),l(x,y),l(y,$),l($,b),l(b,C),l(b,k),l(b,T),l(T,O);for(let e=0;e{var e=await fetch("/api/lexicon/config");n("config",o=await e.json())})();Z.$params(async e=>{if(e&&0!==e.length){var t=await fetch("/api/lexicon/"+e),o=await t.json();n("data",a=o)}else n("data",a=null)});let i="",l="",r=e=>{n("data",a.tags=a.tags.filter(t=>t!==e),a)},c=e=>{n("data",a.applications=a.applications.filter(t=>t!==e),a)},s=(e,t)=>{"Enter"===e.code&&("a"===t?(n("data",a.applications=a.applications||[],a),l&&l.length>0&&-1===a.applications.indexOf(l)&&(a.applications.push(l),n("newApplication",l=""))):"t"===t&&(n("data",a.tags=a.tags||[],a),i&&i.length>0&&-1===a.tags.indexOf(i)&&(a.tags.push(i),n("newTag",i=""))))};return{data:a,config:o,newTag:i,newApplication:l,submit:async()=>{a.name&&a.domain&&a.description&&(await fetch("/api/lexicon",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),Z.navigate("lexicon"))},changeTag:e=>{n("newTag",i=e.target.value)},removeTag:r,changeApplication:e=>{n("newApplication",l=e.target.value)},removeApplication:c,onkeyup:s,click_handler:()=>Z.navigate("lexicon"),select0_change_handler:function(){a.domain=x(this),n("data",a),n("config",o)},input0_input_handler:function(){a.name=this.value,n("data",a),n("config",o)},textarea_input_handler:function(){a.description=this.value,n("data",a),n("config",o)},select1_change_handler:function(){a.functionalOwner=x(this),n("data",a),n("config",o)},select2_change_handler:function(){a.technicalOwner=x(this),n("data",a),n("config",o)},keyup_handler:e=>s(e,"a"),click_handler_1:({application:e})=>c(e),keyup_handler_1:e=>s(e,"t"),click_handler_2:({tag:e})=>r(e)}}class Me extends V{constructor(e){super(),B(this,e,Ke,Le,i,{})}}let Fe=async e=>{var t=await fetch("/api/module/"+Z.module);return await t.text()};const qe={brackets:[{open:"{*",close:"*}",token:"delimiter.bracket"}],keywords:["type","alias","choice","data","open","view","flow"],autoClosingPairs:[{open:"{*",close:"*}"}],digits:/\d+(_+\d+)*/,tokenizer:{root:[{include:"@chapter"},{include:"@annotation"},{include:"common"}],chapter:[[/#.*/,"chapter"]],annotation:[[/@.*/,"annotation"]],common:[[/^.[a-z$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/(@digits)n?/,"number"]]}},ze={base:"vs",inherit:!0,rules:[{token:"chapter",foreground:"#ea5dd5"},{token:"annotation",foreground:"#800000"}]},Be=(e,t)=>{t.addCommand(e.KeyMod.CtrlCmd|e.KeyCode.KEY_P,(e,n,a)=>{var o=t.getModel(),i=t.getPosition(),{word:l}=o.getWordAtPosition(i);alert(l)})},Ve=(e,t)=>{t.addAction({id:"zdragon_create_type",label:"Create Type",keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.KEY_E],precondition:null,keybindingContext:null,contextMenuGroupId:"navigation",contextMenuOrder:1.5,run:function(e){var n,a=t.getPosition(),o=t.getValue(a),i=t.getModel(),l=i.getLineContent(a.lineNumber),{word:r}=i.getWordAtPosition(a);if(-1==["String","Number","Date","DateTime","Time","Decimal","List","Maybe"].indexOf(r))n=o+`\ntype ${r}\n`;else{n=o+`\nalias ${l.split(":").map(e=>e.trim())[0]} = ${r};\n`}return t.setValue(n),t.setPosition(a),null}})},He=(e,t)=>{e.languages.registerCompletionItemProvider("carlang",{provideCompletionItems:function(t,n){t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});var a=t.getWordUntilPosition(n),o={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn};return{suggestions:[{label:"type_simple",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"@The ${1:Name} type description\ntype ${1:Name}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"type_complex",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"@The ${1:Name} type description\ntype ${1:Name} =\n\t${2:FieldName}: ${3:FieldType};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"field_simple",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"${1:FieldName}: ${2:FieldType};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"alias",kind:e.languages.CompletionItemKind.Function,documentation:"Create an alias",insertText:"alias ${1:Name} = ${2:Type};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"choice_string",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Choice",insertText:'@The ${1:Name} choice\nchoice ${1:Name} =\n\t| "${2:Option1}"\n\t| "${3:Option1}"',insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"choice_number",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Numbered Choice",insertText:"choice ${1:Name} =\n\t| 1\n\t| 2",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"view",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Numbered Choice",insertText:"view ${1:Name} =\n\t${2:RootElement}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},...Ue(e)]}}})},Ue=(e,t)=>[{label:"String",kind:e.languages.CompletionItemKind.Class,documentation:"The String base type",insertText:"String"},{label:"Number",kind:e.languages.CompletionItemKind.Class,documentation:"Represents whol numbers",insertText:"Number"},{label:"Decimal",kind:e.languages.CompletionItemKind.Class,documentation:"Represents decimal numbers",insertText:"Decimal"},{label:"Date",kind:e.languages.CompletionItemKind.Class,documentation:"Represents the date without time",insertText:"Date"},{label:"Time",kind:e.languages.CompletionItemKind.Class,documentation:"Represents the time",insertText:"Time"},{label:"DateTime",kind:e.languages.CompletionItemKind.Class,documentation:"Represents a date-time value",insertText:"DateTime"}];function We(e,t,n){const a=Object.create(e);return a.error=t[n],a}function Je(e){let t,n=e.errors,a=[];for(let t=0;t0&&Je(t);return{c(){n=d("div"),(a=d("span")).textContent="Save",o=p(),(i=d("div")).innerHTML='
',s=p(),v&&v.c(),u=g(),f(a,"class","nav-button"),f(n,"class","content--center"),f(i,"class","editor-container svelte-1l9twu"),h=m(a,"click",t.saveCode)},m(e,t){r(e,n,t),l(n,a),r(e,o,t),r(e,i,t),r(e,s,t),v&&v.m(e,t),r(e,u,t)},p(e,t){t.errors&&t.errors.length>0?v?v.p(e,t):((v=Je(t)).c(),v.m(u.parentNode,u)):v&&(v.d(1),v=null)},i:e,o:e,d(e){e&&c(n),e&&c(o),e&&c(i),e&&c(s),v&&v.d(e),e&&c(u),h()}}}function Ze(e,t,n){let a,o=[],i=e=>{const t=a.getModel(),n=a.getPosition();null!=e&&e!==t.getValue()&&(a.pushUndoStop(),t.pushEditOperations([],[{range:t.getFullModelRange(),text:e}]),a.pushUndoStop(),a.setPosition(n))},l=async()=>{var e=a.getValue();await fetch("/api/module/"+Z.module,{method:"POST",headers:{"Content-Type":"text/plain","Content-Length":e.length.toString()},body:e});setTimeout(r,2e3)},r=async()=>{var e=await fetch("/api/module/"+Z.module+"/errors");n("errors",o=await e.json()),o&&o.length>0&&console.log(o)};function c(e){if("s"===e.key&&(!0===e.ctrlKey||1==e.metaKey))return l(),e.preventDefault(),!1}var s;return s=()=>{require.config({paths:{vs:"/vs"}}),require(["vs/editor/editor.main"],(function(){monaco.languages.register({id:"carlang"}),monaco.languages.setMonarchTokensProvider("carlang",qe),monaco.editor.defineTheme("carlangTheme",ze),a=monaco.editor.create(document.getElementById("editor"),{value:"",language:"carlang",theme:"carlangTheme",scrollBeyondLastLine:!1,roundedSelection:!0,minimap:{enabled:!1}}),Be(monaco,a),Ve(monaco,a),He(monaco),(async()=>{var e=await Fe();setTimeout(r,0),i(e)})()})),window.addEventListener("keydown",c,!0)},b().$$.on_mount.push(s),function(e){b().$$.on_destroy.push(e)}(()=>{window.removeEventListener("keydown",c,!0)}),{errors:o,saveCode:l}}class Ge extends V{constructor(e){super(),B(this,e,Ze,Ye,i,{})}}function Qe(t){let n,a,o,i,l,s,u,g,m,h,v;return{c(){(n=d("h2")).textContent="Domains",a=p(),(o=d("p")).textContent="Please give the domains you would like to restrict your lexicon to.",i=p(),l=d("textarea"),s=p(),(u=d("h2")).textContent="Owners",g=p(),(m=d("p")).textContent="Please give the owners you would like to restrict the lexicon to.",h=p(),v=d("textarea"),f(l,"class","svelte-nhavks"),f(v,"class","svelte-nhavks")},m(e,t){r(e,n,t),r(e,a,t),r(e,o,t),r(e,i,t),r(e,l,t),r(e,s,t),r(e,u,t),r(e,g,t),r(e,m,t),r(e,h,t),r(e,v,t)},p:e,i:e,o:e,d(e){e&&c(n),e&&c(a),e&&c(o),e&&c(i),e&&c(l),e&&c(s),e&&c(u),e&&c(g),e&&c(m),e&&c(h),e&&c(v)}}}class et extends V{constructor(e){super(),B(this,e,null,Qe,i,{})}}function tt(t){let n,a,o;return{c(){n=d("div"),f(a=d("iframe"),"title","module_preview"),a.src!==(o=t.route)&&f(a,"src",o),f(a,"class","svelte-7yoi32"),f(n,"class","preview svelte-7yoi32")},m(e,t){r(e,n,t),l(n,a)},p:e,i:e,o:e,d(e){e&&c(n)}}}function nt(e){return{route:`/${Z.module}/index.html`}}class at extends V{constructor(e){super(),B(this,e,nt,tt,i,{})}}function ot(t){let n;return{c(){(n=d("div")).textContent="The ZDragon configuration"},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}class it extends V{constructor(e){super(),B(this,e,null,ot,i,{})}}function lt(t){let n,a,o,i,s,u,g,h,v;return{c(){n=d("div"),a=d("div"),o=p(),i=d("div"),s=d("div"),(u=d("label")).textContent="Include Details",g=p(),h=d("input"),f(a,"id","topology"),f(a,"class","svelte-sq8u03"),f(h,"type","checkbox"),f(s,"class","form-field"),f(i,"class","options-form svelte-sq8u03"),f(n,"class","topology svelte-sq8u03"),v=m(h,"change",t.change_handler)},m(e,t){r(e,n,t),l(n,a),l(n,o),l(n,i),l(i,s),l(s,u),l(s,g),l(s,h)},p:e,i:e,o:e,d(e){e&&c(n),v()}}}function rt(e){var t={interaction:{dragNodes:!1,hover:!0},manipulation:{enabled:!1}},n=async e=>{var n=e?"/api/topology":"/api/topology/modules",a=await fetch(n),o=await a.json(),i=document.getElementById("topology");new vis.Network(i,o,t).on("click",(function(e){let[t,...n]=e.nodes,a=o.nodes.find(e=>e.id===t);a&&a.module&&Z.preview(a.module)}))};n(!1);return{getData:n,change_handler:e=>{n(e.target.checked)}}}class ct extends V{constructor(e){super(),B(this,e,rt,lt,i,{})}}function st(t){let n;return{c(){(n=d("div")).textContent="Create Module"},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}function dt(e){return{}}class ut extends V{constructor(e){super(),B(this,e,dt,st,i,{})}}function pt(e){let t;const n=new ie({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function gt(e){let t;const n=new ut({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function mt(e){let t;const n=new ct({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function ft(e){let t;const n=new it({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function ht(e){let t;const n=new Ge({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function vt(e){let t;const n=new at({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function _t(e){let t;const n=new et({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function wt(e){let t;const n=new Me({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function xt(e){let t;const n=new Ce({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function yt(e){let t;const n=new de({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function $t(e){let t;const n=new ie({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function bt(t){let n,o,i,s,u,h,v,_,w,x,y,$,b,C=Z.module&&function(t){let n,o,i,l;return{c(){(n=d("span")).textContent="Editor",o=p(),(i=d("span")).textContent="Preview",f(n,"class","nav-button"),f(i,"class","nav-button"),l=[m(n,"click",t.click_handler_3),m(i,"click",t.click_handler_4)]},m(e,t){r(e,n,t),r(e,o,t),r(e,i,t)},p:e,d(e){e&&c(n),e&&c(o),e&&c(i),a(l)}}}(t);const k=[$t,yt,xt,wt,_t,vt,ht,ft,mt,gt,pt],T=[];function O(e,t){return"index"===t.route?0:"lexicon"===t.route?1:"add-lexicon"===t.route?2:"edit-lexicon"===t.route?3:"lexicon-admin"===t.route?4:"preview"===t.route?5:"editor"===t.route?6:"config"===t.route?7:"module-topology"===t.route?8:"module-create"===t.route?9:10}return w=O(0,t),x=T[w]=k[w](t),{c(){n=d("main"),(o=d("span")).textContent="Home",i=p(),(s=d("span")).textContent="Topology",u=p(),(h=d("span")).textContent="Lexicon",v=p(),C&&C.c(),_=p(),x.c(),y=g(),f(o,"class","nav-button"),f(s,"class","nav-button"),f(h,"class","nav-button"),f(n,"class","svelte-1kds1eb"),b=[m(o,"click",t.click_handler),m(s,"click",t.click_handler_1),m(h,"click",t.click_handler_2)]},m(e,t){r(e,n,t),l(n,o),l(n,i),l(n,s),l(n,u),l(n,h),l(n,v),C&&C.m(n,null),r(e,_,t),T[w].m(e,t),r(e,y,t),$=!0},p(e,t){Z.module&&C.p(e,t);let n=w;(w=O(0,t))!==n&&(P(),K(T[n],1,1,()=>{T[n]=null}),R(),(x=T[w])||(x=T[w]=k[w](t)).c(),L(x,1),x.m(y.parentNode,y))},i(e){$||(L(x),$=!0)},o(e){K(x),$=!1},d(e){e&&c(n),C&&C.d(),e&&c(_),T[w].d(e),e&&c(y),a(b)}}}function Ct(e,t,n){let a;Z.subscribe(e=>{n("route",a=e)});return{route:a,click_handler:()=>Z.navigate("index"),click_handler_1:()=>Z.navigate("module-topology"),click_handler_2:()=>Z.navigate("lexicon"),click_handler_3:()=>Z.navigate("editor"),click_handler_4:()=>Z.navigate("preview")}}const kt=new class extends V{constructor(e){super(),B(this,e,Ct,bt,i,{})}}({target:document.body,props:{name:"world"}});return!Prism||Prism.languages,Prism.languages.carlang={prolog:/<\?[\s\S]+?\?>/,keyword:/\b(?:type|alias|choice|data|flow|view|compose|loop)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,chapter:/#.*\n/},kt}();
+var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function a(e){e.forEach(t)}function o(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,t){e.appendChild(t)}function r(e,t,n){e.insertBefore(t,n||null)}function c(e){e.parentNode.removeChild(e)}function s(e,t){for(let n=0;ne.removeEventListener(t,n,a)}function f(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function h(e,t){t=""+t,e.data!==t&&(e.data=t)}function v(e,t){(null!=t||e.value)&&(e.value=t)}function _(e,t,n,a){e.style.setProperty(t,n,a?"important":"")}function w(e,t){for(let n=0;n{E.delete(e),a&&(n&&e.d(1),a())}),e.o(t)}}function M(e){e&&e.c()}function F(e,n,i){const{fragment:l,on_mount:r,on_destroy:c,after_update:s}=e.$$;l&&l.m(n,i),A(()=>{const n=r.map(t).filter(o);c?c.push(...n):a(n),e.$$.on_mount=[]}),s.forEach(A)}function q(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx={})}function z(e,t){e.$$.dirty||(C.push(e),N||(N=!0,I.then(S)),e.$$.dirty=n()),e.$$.dirty[t]=!0}function B(t,o,i,l,r,c){const s=y;$(t);const d=o.props||{},u=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:r,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:[]),callbacks:n(),dirty:null};let p=!1;u.ctx=i?i(t,d,(e,n,a=n)=>(u.ctx&&r(u.ctx[e],u.ctx[e]=a)&&(u.bound[e]&&u.bound[e](a),p&&z(t,e)),n)):d,u.update(),p=!0,a(u.before_update),u.fragment=!!l&&l(u.ctx),o.target&&(o.hydrate?u.fragment&&u.fragment.l(function(e){return Array.from(e.childNodes)}(o.target)):u.fragment&&u.fragment.c(),o.intro&&L(t.$$.fragment),F(t,o.target,o.anchor),S()),$(s)}class V{$destroy(){q(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(){}}function H(e){let t,n,a,o,i,s;return{c(){t=d("br"),n=p(),a=d("a"),o=u("Show me the data!"),f(a,"alt",i=e.descriptor.name),f(a,"href",s=`/api/data/${e.descriptor.module}/${e.descriptor.name}`)},m(e,i){r(e,t,i),r(e,n,i),r(e,a,i),l(a,o)},p(e,t){e.descriptor&&i!==(i=t.descriptor.name)&&f(a,"alt",i),e.descriptor&&s!==(s=`/api/data/${t.descriptor.module}/${t.descriptor.name}`)&&f(a,"href",s)},d(e){e&&c(t),e&&c(n),e&&c(a)}}}function U(t){let n,a,o,i,s,g,v,_,w,x,y,$,b,C,k,T,O,I,N,A,S,D,E,j=t.descriptor.descriptorType+"",P=t.descriptor.module+"",R=t.descriptor.parent?t.descriptor.parent+".":"",L=t.descriptor.name+"",K=(t.descriptor.description||"No Description")+"",M=t.descriptor.module+"",F="Type"===t.descriptor.descriptorType&&H(t);return{c(){n=d("div"),a=d("h2"),o=d("span"),i=u(j),g=p(),v=u(P),_=u(" - "),w=u(R),x=u(L),y=p(),$=d("p"),b=u(K),C=p(),k=d("a"),T=u("Module: "),O=u(M),A=p(),F&&F.c(),S=p(),D=d("div"),f(o,"class",s="pill "+t.descriptor.descriptorType.toLowerCase()+" svelte-86a2ch"),f(a,"class","svelte-86a2ch"),f($,"class","description svelte-86a2ch"),f(k,"alt",I=t.descriptor.module),f(k,"href",N=`?path=preview&module=${t.descriptor.module}`),f(D,"id",t.id),f(n,"class","descriptor svelte-86a2ch"),E=m(n,"click",t.click_handler)},m(e,t){r(e,n,t),l(n,a),l(a,o),l(o,i),l(a,g),l(a,v),l(a,_),l(a,w),l(a,x),l(n,y),l(n,$),l($,b),l(n,C),l(n,k),l(k,T),l(k,O),l(n,A),F&&F.m(n,null),l(n,S),l(n,D)},p(e,t){e.descriptor&&j!==(j=t.descriptor.descriptorType+"")&&h(i,j),e.descriptor&&s!==(s="pill "+t.descriptor.descriptorType.toLowerCase()+" svelte-86a2ch")&&f(o,"class",s),e.descriptor&&P!==(P=t.descriptor.module+"")&&h(v,P),e.descriptor&&R!==(R=t.descriptor.parent?t.descriptor.parent+".":"")&&h(w,R),e.descriptor&&L!==(L=t.descriptor.name+"")&&h(x,L),e.descriptor&&K!==(K=(t.descriptor.description||"No Description")+"")&&h(b,K),e.descriptor&&M!==(M=t.descriptor.module+"")&&h(O,M),e.descriptor&&I!==(I=t.descriptor.module)&&f(k,"alt",I),e.descriptor&&N!==(N=`?path=preview&module=${t.descriptor.module}`)&&f(k,"href",N),"Type"===t.descriptor.descriptorType?F?F.p(e,t):((F=H(t)).c(),F.m(n,S)):F&&(F.d(1),F=null)},i:e,o:e,d(e){e&&c(n),F&&F.d(),E()}}}function W(e,t,n){let{descriptor:a}=t,o=async e=>{let t=`/api/svg?module=${e.module}&name=${e.name}&type=g`,n=await fetch(t),a=await n.text();var o=document.getElementById(i);mermaid.render("inner-"+i,a,(e,t)=>{o.innerHTML=e},o)},i="mermaid-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)+"-"+Date.now();return e.$set=e=>{"descriptor"in e&&n("descriptor",a=e.descriptor)},{descriptor:a,selectNode:o,id:i,click_handler:()=>o(a)}}class J extends V{constructor(e){super(),B(this,e,W,U,i,{descriptor:0})}}const X=[];function Y(t,n=e){let a;const o=[];function l(e){if(i(t,e)&&(t=e,a)){const e=!X.length;for(let e=0;e{const e=o.indexOf(c);-1!==e&&o.splice(e,1),0===o.length&&(a(),a=null)}}}}var Z=new class{constructor(){this.route=Y(G("path")||"index"),this.params=Y([]),this.module=G("module")||null}navigate(e,...t){this.route.update(t=>e),this.params.update(e=>t),"edit-lexicon"!==e&&function(e,t,n){n||(n=window.location.href);var a,o=new RegExp("([?&])"+e+"=.*?(&|#|$)(.*)","gi");if(!o.test(n)){if(null!=t){var i=-1!==n.indexOf("?")?"&":"?";return a=n.split("#"),n=a[0]+i+e+"="+t,void 0!==a[1]&&null!==a[1]&&(n+="#"+a[1]),window.location.href=n,n}return n}if(null==t)return a=n.split("#"),n=a[0].replace(o,"$1$3").replace(/(&|\?)$/,""),void 0!==a[1]&&null!==a[1]&&(n+="#"+a[1]),window.location.href=n,n;var l=n.replace(o,"$1"+e+"="+t+"$2$3");window.location.href=l}("path",e)}preview(e){window.location.href=`/index.html?path=preview&module=${e}`}subscribe(e){this.route.subscribe(e)}$params(e){this.params.subscribe(t=>{e(t||[])})}};function G(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function Q(e,t,n){const a=Object.create(e);return a.d=t[n],a}function ee(t){let n;return{c(){(n=d("div")).textContent="Your query returned no results."},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}function te(e){let t,n,a=e.data,o=[];for(let t=0;tK(o[e],1,1,()=>{o[e]=null});return{c(){for(let e=0;e0?0:1}return _=C(0,e),w=b[_]=$[_](e),{c(){t=d("div"),(n=d("h1")).textContent="Welcome to ZDragon!",a=p(),(o=d("p")).innerHTML='\n Visit\n \n ZDragon.nl\n \n to learn more about zdragon!\n ',i=p(),s=d("div"),(u=d("h2")).textContent="Search your models:",g=p(),h=d("input"),v=p(),w.c(),f(n,"class","title"),f(h,"class","search"),f(h,"autocomplete","off"),f(h,"type","text"),f(t,"class","content--center"),y=m(h,"keypress",e.keypress)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i),l(t,s),l(s,u),l(s,g),l(s,h),l(t,v),b[_].m(t,null),x=!0},p(e,n){let a=_;(_=C(0,n))===a?b[_].p(e,n):(P(),K(b[a],1,1,()=>{b[a]=null}),R(),(w=b[_])||(w=b[_]=$[_](n)).c(),L(w,1),w.m(t,null))},i(e){x||(L(w),x=!0)},o(e){K(w),x=!1},d(e){e&&c(t),b[_].d(),y()}}}function oe(e,t,n){let a=sessionStorage.getItem("search-results"),o=a?JSON.parse(a):[];const i=async e=>{try{n("data",o=[]);var t=await fetch(`/api/search/${e||"nothing"}`);n("data",o=await t.json()),sessionStorage.setItem("search-results",JSON.stringify(o))}catch(e){console.log(e)}},l=async e=>{try{var t=await fetch("/api/modules/"+e,{method:"POST"});let a=await t.json();n("data",o=a),setTimeout(()=>{window.location.href=`/index.html?path=editor&module=${e}`},500)}catch(e){console.log(e)}};return{data:o,keypress:e=>{"Enter"===e.key&&(async e=>{let[t,n,...a]=e.split(":");n?"modules"==t.trim()?i("modules:"):"new"==t.trim()&&n&&l(n.trim()):i(t)})(e.target.value)}}}class ie extends V{constructor(e){super(),B(this,e,oe,ae,i,{})}}function le(e,t,n){const a=Object.create(e);return a.d=t[n],a}function re(e){let t,n,a,o,i,s,g,v,_,w,x,y=e.d.domain+"",$=e.d.name+"",b=e.d.description+"";function C(...t){return e.click_handler_1(e,...t)}return{c(){t=d("tr"),n=d("td"),a=u(y),o=p(),i=d("td"),s=u($),g=p(),v=d("td"),_=u(b),w=p(),f(t,"class","svelte-1aug0lv"),x=m(t,"click",C)},m(e,c){r(e,t,c),l(t,n),l(n,a),l(t,o),l(t,i),l(i,s),l(t,g),l(t,v),l(v,_),l(t,w)},p(t,n){e=n,t.data&&y!==(y=e.d.domain+"")&&h(a,y),t.data&&$!==($=e.d.name+"")&&h(s,$),t.data&&b!==(b=e.d.description+"")&&h(_,b)},d(e){e&&c(t),x()}}}function ce(t){let n,o,i,u,g,h,v,_,w,x,y,$,b,C,k,T=t.data,O=[];for(let e=0;eDomain \n Name \n Description ",b=p(),C=d("tbody");for(let e=0;e{if(e){o=e;var t=await fetch("/api/lexicon?query="+o),i=await t.json();n("data",a=i||[])}},l=e=>{i(e)};i("all:");return{data:a,findData:i,onkeyup:l,click_handler:()=>{Z.navigate("add-lexicon")},keyup_handler:e=>"Enter"===e.code&&l(e.target.value),change_handler:e=>i(e.target.value),click_handler_1:({d:e})=>Z.navigate("edit-lexicon",e.id)}}class de extends V{constructor(e){super(),B(this,e,se,ce,i,{})}}function ue(e,t,n){const a=Object.create(e);return a.tag=t[n],a}function pe(e,t,n){const a=Object.create(e);return a.application=t[n],a}function ge(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function me(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function fe(e,t,n){const a=Object.create(e);return a.domain=t[n],a}function he(e){let t;return{c(){(t=d("div")).textContent="The configuration seems to be incomplete. There are no domains defined.\n Without a domain it is impossible to create a Lexicon entry. Please ask you\n administrator to complete the configuration.",f(t,"class","error")},m(e,n){r(e,t,n)},d(e){e&&c(t)}}}function ve(e){let t,n,a,o=e.domain+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.domain,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.domain+"")&&h(n,o),e.config&&a!==(a=i.domain)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function _e(e){let t,n,a,o=e.owner+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.owner,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.owner+"")&&h(n,o),e.config&&a!==(a=i.owner)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function we(e){let t,n,a,o=e.owner+"";return{c(){t=d("option"),n=u(o),t.__value=a=e.owner,t.value=t.__value},m(e,a){r(e,t,a),l(t,n)},p(e,i){e.config&&o!==(o=i.owner+"")&&h(n,o),e.config&&a!==(a=i.owner)&&(t.__value=a),t.value=t.__value},d(e){e&&c(t)}}}function xe(e){let t,n,a,o,i,s,g=e.application+"";function v(...t){return e.click_handler_1(e,...t)}return{c(){t=d("div"),n=u(g),a=p(),(o=d("span")).textContent="X",i=p(),f(o,"class","delete"),s=m(o,"click",v)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i)},p(t,a){e=a,t.data&&g!==(g=e.application+"")&&h(n,g)},d(e){e&&c(t),s()}}}function ye(e){let t,n,a,o,i,s,g=e.tag+"";function v(...t){return e.click_handler_2(e,...t)}return{c(){t=d("div"),n=u(g),a=p(),(o=d("span")).textContent="X",i=p(),f(o,"class","delete"),s=m(o,"click",v)},m(e,c){r(e,t,c),l(t,n),l(t,a),l(t,o),l(t,i)},p(t,a){e=a,t.data&&g!==(g=e.tag+"")&&h(n,g)},d(e){e&&c(t),s()}}}function $e(t){let n,o,i,u,g,h,x,y,$,b,C,k,T,O,I,N,S,D,E,j,P,R,L,K,M,F,q,z,B,V,H,U,W,J,X,Y,Z,G,Q,ee,te,ne,ae,oe,ie,le,re,ce,se,de,$e,be,Ce,ke,Te,Oe=(!t.config||!t.config.domains||t.config.domains.length<1)&&he(),Ie=t.config.domains,Ne=[];for(let e=0;et.select0_change_handler.call(O)),f(b,"class","left"),U.__value="",U.value=U.__value,void 0===t.data.functionalOwner&&A(()=>t.select1_change_handler.call(H)),G.__value="",G.value=G.__value,void 0===t.data.technicalOwner&&A(()=>t.select2_change_handler.call(Z)),le.value=t.newApplication,f(ie,"class","input"),_(ne,"margin-bottom","1em"),Ce.value=t.newTag,f(be,"class","input"),f(q,"class","right"),f($,"submit","() => "),f(o,"class","content--center"),Te=[m(g,"click",t.submit),m(x,"click",t.click_handler),m(O,"change",t.select0_change_handler),m(j,"input",t.input0_input_handler),m(M,"input",t.textarea_input_handler),m(H,"change",t.select1_change_handler),m(Z,"change",t.select2_change_handler),m(le,"change",t.changeApplication),m(le,"keyup",t.keyup_handler),m(Ce,"change",t.changeTag),m(Ce,"keyup",t.keyup_handler_1)]},m(e,a){Oe&&Oe.m(e,a),r(e,n,a),r(e,o,a),l(o,i),l(o,u),l(o,g),l(o,h),l(o,x),l(o,y),l(o,$),l($,b),l(b,C),l(C,k),l(C,T),l(C,O),l(O,I);for(let e=0;e{var e=await fetch("/api/lexicon/config");n("config",o=await e.json())})();let i="",l="",r=e=>{n("data",a.tags=a.tags.filter(t=>t!==e),a)},c=e=>{n("data",a.applications=a.applications.filter(t=>t!==e),a)},s=(e,t)=>{"Enter"===e.code&&("a"===t?(n("data",a.applications=a.applications||[],a),l&&l.length>0&&-1===a.applications.indexOf(l)&&(a.applications.push(l),n("newApplication",l=""))):"t"===t&&(n("data",a.tags=a.tags||[],a),i&&i.length>0&&-1===a.tags.indexOf(i)&&(a.tags.push(i),n("newTag",i=""))))};return{data:a,config:o,newTag:i,newApplication:l,submit:async()=>{a.name&&a.domain&&a.description&&(await fetch("/api/lexicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),Z.navigate("lexicon"))},changeTag:e=>{n("newTag",i=e.target.value)},removeTag:r,changeApplication:e=>{n("newApplication",l=e.target.value)},removeApplication:c,onkeyup:s,click_handler:()=>Z.navigate("lexicon"),select0_change_handler:function(){a.domain=x(this),n("data",a),n("config",o)},input0_input_handler:function(){a.name=this.value,n("data",a),n("config",o)},textarea_input_handler:function(){a.description=this.value,n("data",a),n("config",o)},select1_change_handler:function(){a.functionalOwner=x(this),n("data",a),n("config",o)},select2_change_handler:function(){a.technicalOwner=x(this),n("data",a),n("config",o)},keyup_handler:e=>s(e,"a"),click_handler_1:({application:e})=>c(e),keyup_handler_1:e=>s(e,"t"),click_handler_2:({tag:e})=>r(e)}}class Ce extends V{constructor(e){super(),B(this,e,be,$e,i,{})}}function ke(e,t,n){const a=Object.create(e);return a.tag=t[n],a}function Te(e,t,n){const a=Object.create(e);return a.application=t[n],a}function Oe(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function Ie(e,t,n){const a=Object.create(e);return a.owner=t[n],a}function Ne(e,t,n){const a=Object.create(e);return a.domain=t[n],a}function Ae(e){let t,n,o,i,u,g,h,x,y,$,b,C,k,T,O,I,N,S,D,E,j,P,R,L,K,M,F,q,z,B,V,H,U,W,J,X,Y,Z,G,Q,ee,te,ne,ae,oe,ie,le,re,ce,se,de,ue,pe,ge,me,fe=e.config.domains,he=[];for(let t=0;te.select0_change_handler.call(T)),f($,"class","left"),H.__value="",H.value=H.__value,void 0===e.data.functionalOwner&&A(()=>e.select1_change_handler.call(V)),Z.__value="",Z.value=Z.__value,void 0===e.data.technicalOwner&&A(()=>e.select2_change_handler.call(Y)),ie.value=e.newApplication,f(oe,"class","input"),_(te,"margin-bottom","1em"),pe.value=e.newTag,f(ue,"class","input"),f(F,"class","right"),f(y,"submit","() => "),f(x,"class","edit-form"),f(t,"class","content--center"),me=[m(i,"click",e.submit),m(g,"click",e.click_handler),m(T,"change",e.select0_change_handler),m(E,"input",e.input0_input_handler),m(K,"input",e.textarea_input_handler),m(V,"change",e.select1_change_handler),m(Y,"change",e.select2_change_handler),m(ie,"change",e.changeApplication),m(ie,"keyup",e.keyup_handler),m(pe,"change",e.changeTag),m(pe,"keyup",e.keyup_handler_1)]},m(a,c){r(a,t,c),l(t,n),l(t,o),l(t,i),l(t,u),l(t,g),l(t,h),l(t,x),l(x,y),l(y,$),l($,b),l(b,C),l(b,k),l(b,T),l(T,O);for(let e=0;e{var e=await fetch("/api/lexicon/config");n("config",o=await e.json())})();Z.$params(async e=>{if(e&&0!==e.length){var t=await fetch("/api/lexicon/"+e),o=await t.json();n("data",a=o)}else n("data",a=null)});let i="",l="",r=e=>{n("data",a.tags=a.tags.filter(t=>t!==e),a)},c=e=>{n("data",a.applications=a.applications.filter(t=>t!==e),a)},s=(e,t)=>{"Enter"===e.code&&("a"===t?(n("data",a.applications=a.applications||[],a),l&&l.length>0&&-1===a.applications.indexOf(l)&&(a.applications.push(l),n("newApplication",l=""))):"t"===t&&(n("data",a.tags=a.tags||[],a),i&&i.length>0&&-1===a.tags.indexOf(i)&&(a.tags.push(i),n("newTag",i=""))))};return{data:a,config:o,newTag:i,newApplication:l,submit:async()=>{a.name&&a.domain&&a.description&&(await fetch("/api/lexicon",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),Z.navigate("lexicon"))},changeTag:e=>{n("newTag",i=e.target.value)},removeTag:r,changeApplication:e=>{n("newApplication",l=e.target.value)},removeApplication:c,onkeyup:s,click_handler:()=>Z.navigate("lexicon"),select0_change_handler:function(){a.domain=x(this),n("data",a),n("config",o)},input0_input_handler:function(){a.name=this.value,n("data",a),n("config",o)},textarea_input_handler:function(){a.description=this.value,n("data",a),n("config",o)},select1_change_handler:function(){a.functionalOwner=x(this),n("data",a),n("config",o)},select2_change_handler:function(){a.technicalOwner=x(this),n("data",a),n("config",o)},keyup_handler:e=>s(e,"a"),click_handler_1:({application:e})=>c(e),keyup_handler_1:e=>s(e,"t"),click_handler_2:({tag:e})=>r(e)}}class Me extends V{constructor(e){super(),B(this,e,Ke,Le,i,{})}}let Fe=async e=>{var t=await fetch("/api/module/"+Z.module);return await t.text()};const qe={brackets:[{open:"{*",close:"*}",token:"delimiter.bracket"}],keywords:["type","alias","choice","data","open","view","flow"],autoClosingPairs:[{open:"{*",close:"*}"}],digits:/\d+(_+\d+)*/,tokenizer:{root:[{include:"@chapter"},{include:"@annotation"},{include:"common"}],chapter:[[/#.*/,"chapter"]],annotation:[[/@.*/,"annotation"]],common:[[/^.[a-z$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/(@digits)n?/,"number"]]}},ze={base:"vs",inherit:!0,rules:[{token:"chapter",foreground:"#ea5dd5"},{token:"annotation",foreground:"#800000"}]},Be=(e,t)=>{t.addCommand(e.KeyMod.CtrlCmd|e.KeyCode.KEY_P,(e,n,a)=>{var o=t.getModel(),i=t.getPosition(),{word:l}=o.getWordAtPosition(i);alert(l)})},Ve=(e,t)=>{t.addAction({id:"zdragon_create_type",label:"Create Type",keybindings:[e.KeyMod.CtrlCmd|e.KeyCode.KEY_E],precondition:null,keybindingContext:null,contextMenuGroupId:"navigation",contextMenuOrder:1.5,run:function(e){var n,a=t.getPosition(),o=t.getValue(a),i=t.getModel(),l=i.getLineContent(a.lineNumber),{word:r}=i.getWordAtPosition(a);if(-1==["String","Number","Date","DateTime","Time","Decimal","List","Maybe"].indexOf(r))n=o+`\ntype ${r}\n`;else{n=o+`\nalias ${l.split(":").map(e=>e.trim())[0]} = ${r};\n`}return t.setValue(n),t.setPosition(a),null}})},He=(e,t)=>{e.languages.registerCompletionItemProvider("carlang",{provideCompletionItems:function(t,n){t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});var a=t.getWordUntilPosition(n),o={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn};return{suggestions:[{label:"type_simple",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"@The ${1:Name} type description\ntype ${1:Name}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"type_complex",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"@The ${1:Name} type description\ntype ${1:Name} =\n\t${2:FieldName}: ${3:FieldType};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"field_simple",kind:e.languages.CompletionItemKind.Function,documentation:"Create a type snippet",insertText:"${1:FieldName}: ${2:FieldType};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"alias",kind:e.languages.CompletionItemKind.Function,documentation:"Create an alias",insertText:"alias ${1:Name} = ${2:Type};",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"choice_string",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Choice",insertText:'@The ${1:Name} choice\nchoice ${1:Name} =\n\t| "${2:Option1}"\n\t| "${3:Option1}"',insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"choice_number",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Numbered Choice",insertText:"choice ${1:Name} =\n\t| 1\n\t| 2",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},{label:"view",kind:e.languages.CompletionItemKind.Function,documentation:"Create a Numbered Choice",insertText:"view ${1:Name} =\n\t${2:RootElement}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o},...Ue(e)]}}})},Ue=(e,t)=>[{label:"String",kind:e.languages.CompletionItemKind.Class,documentation:"The String base type",insertText:"String"},{label:"Number",kind:e.languages.CompletionItemKind.Class,documentation:"Represents whol numbers",insertText:"Number"},{label:"Decimal",kind:e.languages.CompletionItemKind.Class,documentation:"Represents decimal numbers",insertText:"Decimal"},{label:"Date",kind:e.languages.CompletionItemKind.Class,documentation:"Represents the date without time",insertText:"Date"},{label:"Time",kind:e.languages.CompletionItemKind.Class,documentation:"Represents the time",insertText:"Time"},{label:"DateTime",kind:e.languages.CompletionItemKind.Class,documentation:"Represents a date-time value",insertText:"DateTime"}];function We(e,t,n){const a=Object.create(e);return a.error=t[n],a}function Je(e){let t,n=e.errors,a=[];for(let t=0;t0&&Je(t);return{c(){n=d("div"),(a=d("span")).textContent="Save",o=p(),(i=d("div")).innerHTML='
',s=p(),v&&v.c(),u=g(),f(a,"class","nav-button"),f(n,"class","content--center"),f(i,"class","editor-container svelte-1l9twu"),h=m(a,"click",t.saveCode)},m(e,t){r(e,n,t),l(n,a),r(e,o,t),r(e,i,t),r(e,s,t),v&&v.m(e,t),r(e,u,t)},p(e,t){t.errors&&t.errors.length>0?v?v.p(e,t):((v=Je(t)).c(),v.m(u.parentNode,u)):v&&(v.d(1),v=null)},i:e,o:e,d(e){e&&c(n),e&&c(o),e&&c(i),e&&c(s),v&&v.d(e),e&&c(u),h()}}}function Ze(e,t,n){let a,o=[],i=e=>{const t=a.getModel(),n=a.getPosition();null!=e&&e!==t.getValue()&&(a.pushUndoStop(),t.pushEditOperations([],[{range:t.getFullModelRange(),text:e}]),a.pushUndoStop(),a.setPosition(n))},l=async()=>{var e=a.getValue();await fetch("/api/module/"+Z.module,{method:"POST",headers:{"Content-Type":"text/plain","Content-Length":e.length.toString()},body:e});setTimeout(r,2e3)},r=async()=>{var e=await fetch("/api/module/"+Z.module+"/errors");n("errors",o=await e.json()),o&&o.length>0&&console.log(o)};function c(e){if("s"===e.key&&(!0===e.ctrlKey||1==e.metaKey))return l(),e.preventDefault(),!1}var s;return s=()=>{require.config({paths:{vs:"/vs"}}),require(["vs/editor/editor.main"],(function(){monaco.languages.register({id:"carlang"}),monaco.languages.setMonarchTokensProvider("carlang",qe),monaco.editor.defineTheme("carlangTheme",ze),a=monaco.editor.create(document.getElementById("editor"),{value:"",language:"carlang",theme:"carlangTheme",scrollBeyondLastLine:!1,roundedSelection:!0,minimap:{enabled:!1}}),Be(monaco,a),Ve(monaco,a),He(monaco),(async()=>{var e=await Fe();setTimeout(r,0),i(e)})()})),window.addEventListener("keydown",c,!0)},b().$$.on_mount.push(s),function(e){b().$$.on_destroy.push(e)}(()=>{window.removeEventListener("keydown",c,!0)}),{errors:o,saveCode:l}}class Ge extends V{constructor(e){super(),B(this,e,Ze,Ye,i,{})}}function Qe(t){let n,a,o,i,l,s,u,g,m,h,v;return{c(){(n=d("h2")).textContent="Domains",a=p(),(o=d("p")).textContent="Please give the domains you would like to restrict your lexicon to.",i=p(),l=d("textarea"),s=p(),(u=d("h2")).textContent="Owners",g=p(),(m=d("p")).textContent="Please give the owners you would like to restrict the lexicon to.",h=p(),v=d("textarea"),f(l,"class","svelte-nhavks"),f(v,"class","svelte-nhavks")},m(e,t){r(e,n,t),r(e,a,t),r(e,o,t),r(e,i,t),r(e,l,t),r(e,s,t),r(e,u,t),r(e,g,t),r(e,m,t),r(e,h,t),r(e,v,t)},p:e,i:e,o:e,d(e){e&&c(n),e&&c(a),e&&c(o),e&&c(i),e&&c(l),e&&c(s),e&&c(u),e&&c(g),e&&c(m),e&&c(h),e&&c(v)}}}class et extends V{constructor(e){super(),B(this,e,null,Qe,i,{})}}function tt(t){let n,a,o;return{c(){n=d("div"),f(a=d("iframe"),"title","module_preview"),a.src!==(o=t.route)&&f(a,"src",o),f(a,"class","svelte-9zwial"),f(n,"class","preview svelte-9zwial")},m(e,t){r(e,n,t),l(n,a)},p:e,i:e,o:e,d(e){e&&c(n)}}}function nt(e){return{route:`/${Z.module}/index.html`}}class at extends V{constructor(e){super(),B(this,e,nt,tt,i,{})}}function ot(t){let n;return{c(){(n=d("div")).textContent="The ZDragon configuration"},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}class it extends V{constructor(e){super(),B(this,e,null,ot,i,{})}}function lt(t){let n,a,o,i,s,u,g,h,v;return{c(){n=d("div"),a=d("div"),o=p(),i=d("div"),s=d("div"),(u=d("label")).textContent="Include Details",g=p(),h=d("input"),f(a,"id","topology"),f(a,"class","svelte-sq8u03"),f(h,"type","checkbox"),f(s,"class","form-field"),f(i,"class","options-form svelte-sq8u03"),f(n,"class","topology svelte-sq8u03"),v=m(h,"change",t.change_handler)},m(e,t){r(e,n,t),l(n,a),l(n,o),l(n,i),l(i,s),l(s,u),l(s,g),l(s,h)},p:e,i:e,o:e,d(e){e&&c(n),v()}}}function rt(e){var t={interaction:{dragNodes:!1,hover:!0},manipulation:{enabled:!1}},n=async e=>{var n=e?"/api/topology":"/api/topology/modules",a=await fetch(n),o=await a.json(),i=document.getElementById("topology");new vis.Network(i,o,t).on("click",(function(e){let[t,...n]=e.nodes,a=o.nodes.find(e=>e.id===t);a&&a.module&&Z.preview(a.module)}))};n(!1);return{getData:n,change_handler:e=>{n(e.target.checked)}}}class ct extends V{constructor(e){super(),B(this,e,rt,lt,i,{})}}function st(t){let n;return{c(){(n=d("div")).textContent="Create Module"},m(e,t){r(e,n,t)},p:e,i:e,o:e,d(e){e&&c(n)}}}function dt(e){return{}}class ut extends V{constructor(e){super(),B(this,e,dt,st,i,{})}}function pt(e){let t;const n=new ie({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function gt(e){let t;const n=new ut({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function mt(e){let t;const n=new ct({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function ft(e){let t;const n=new it({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function ht(e){let t;const n=new Ge({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function vt(e){let t;const n=new at({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function _t(e){let t;const n=new et({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function wt(e){let t;const n=new Me({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function xt(e){let t;const n=new Ce({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function yt(e){let t;const n=new de({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function $t(e){let t;const n=new ie({});return{c(){M(n.$$.fragment)},m(e,a){F(n,e,a),t=!0},i(e){t||(L(n.$$.fragment,e),t=!0)},o(e){K(n.$$.fragment,e),t=!1},d(e){q(n,e)}}}function bt(t){let n,o,i,s,u,h,v,_,w,x,y,$,b,C=Z.module&&function(t){let n,o,i,l;return{c(){(n=d("span")).textContent="Editor",o=p(),(i=d("span")).textContent="Preview",f(n,"class","nav-button"),f(i,"class","nav-button"),l=[m(n,"click",t.click_handler_3),m(i,"click",t.click_handler_4)]},m(e,t){r(e,n,t),r(e,o,t),r(e,i,t)},p:e,d(e){e&&c(n),e&&c(o),e&&c(i),a(l)}}}(t);const k=[$t,yt,xt,wt,_t,vt,ht,ft,mt,gt,pt],T=[];function O(e,t){return"index"===t.route?0:"lexicon"===t.route?1:"add-lexicon"===t.route?2:"edit-lexicon"===t.route?3:"lexicon-admin"===t.route?4:"preview"===t.route?5:"editor"===t.route?6:"config"===t.route?7:"module-topology"===t.route?8:"module-create"===t.route?9:10}return w=O(0,t),x=T[w]=k[w](t),{c(){n=d("main"),(o=d("span")).textContent="Home",i=p(),(s=d("span")).textContent="Topology",u=p(),(h=d("span")).textContent="Lexicon",v=p(),C&&C.c(),_=p(),x.c(),y=g(),f(o,"class","nav-button"),f(s,"class","nav-button"),f(h,"class","nav-button"),f(n,"class","svelte-1kds1eb"),b=[m(o,"click",t.click_handler),m(s,"click",t.click_handler_1),m(h,"click",t.click_handler_2)]},m(e,t){r(e,n,t),l(n,o),l(n,i),l(n,s),l(n,u),l(n,h),l(n,v),C&&C.m(n,null),r(e,_,t),T[w].m(e,t),r(e,y,t),$=!0},p(e,t){Z.module&&C.p(e,t);let n=w;(w=O(0,t))!==n&&(P(),K(T[n],1,1,()=>{T[n]=null}),R(),(x=T[w])||(x=T[w]=k[w](t)).c(),L(x,1),x.m(y.parentNode,y))},i(e){$||(L(x),$=!0)},o(e){K(x),$=!1},d(e){e&&c(n),C&&C.d(),e&&c(_),T[w].d(e),e&&c(y),a(b)}}}function Ct(e,t,n){let a;Z.subscribe(e=>{n("route",a=e)});return{route:a,click_handler:()=>Z.navigate("index"),click_handler_1:()=>Z.navigate("module-topology"),click_handler_2:()=>Z.navigate("lexicon"),click_handler_3:()=>Z.navigate("editor"),click_handler_4:()=>Z.navigate("preview")}}const kt=new class extends V{constructor(e){super(),B(this,e,Ct,bt,i,{})}}({target:document.body,props:{name:"world"}});return!Prism||Prism.languages,Prism.languages.carlang={prolog:/<\?[\s\S]+?\?>/,keyword:/\b(?:type|alias|choice|data|flow|view|compose|loop)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,chapter:/#.*\n/},kt}();
//# sourceMappingURL=bundle.js.map
diff --git a/CLI/wwwroot/build/bundle.js.map b/CLI/wwwroot/build/bundle.js.map
index ea7ec3b..f1cf8fa 100644
--- a/CLI/wwwroot/build/bundle.js.map
+++ b/CLI/wwwroot/build/bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"bundle.js","sources":["../../../web/node_modules/svelte/internal/index.mjs","../../../web/src/SearchResult.svelte","../../../web/node_modules/svelte/store/index.mjs","../../../web/src/navigator.js","../../../web/src/Home.svelte","../../../web/src/Lexicon.svelte","../../../web/src/LexiconAdd.svelte","../../../web/src/LexiconEdit.svelte","../../../web/src/Services/codeServices.js","../../../web/src/editor-carlang.js","../../../web/src/editor-completionProvider.js","../../../web/src/Editor.svelte","../../../web/src/Preview.svelte","../../../web/src/ModuleTopology.svelte","../../../web/src/App.svelte","../../../web/src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction validate_store(store, name) {\n if (!store || typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, callback) {\n const unsub = store.subscribe(callback);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, fn) {\n return definition[1]\n ? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {})))\n : ctx.$$scope.ctx;\n}\nfunction get_slot_changes(definition, ctx, changed, fn) {\n return definition[1]\n ? assign({}, assign(ctx.$$scope.changed || {}, definition[1](fn ? fn(changed) : {})))\n : ctx.$$scope.changed || {};\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nlet running = false;\nfunction run_tasks() {\n tasks.forEach(task => {\n if (!task[0](now())) {\n tasks.delete(task);\n task[1]();\n }\n });\n running = tasks.size > 0;\n if (running)\n raf(run_tasks);\n}\nfunction clear_loops() {\n // for testing...\n tasks.forEach(task => tasks.delete(task));\n running = false;\n}\nfunction loop(fn) {\n let task;\n if (!running) {\n running = true;\n raf(run_tasks);\n }\n return {\n promise: new Promise(fulfil => {\n tasks.add(task = [fn, fulfil]);\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n // eslint-disable-next-line @typescript-eslint/no-object-literal-type-assertion\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group) {\n const value = [];\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.push(group[i].__value);\n }\n return value;\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n for (let j = 0; j < node.attributes.length; j += 1) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name])\n node.removeAttribute(attribute.name);\n }\n return nodes.splice(i, 1)[0]; // TODO strip unwanted attributes\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n if (value != null || input.value) {\n input.value = value;\n }\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\nfunction add_resize_listener(element, fn) {\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n const object = document.createElement('object');\n object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n object.setAttribute('aria-hidden', 'true');\n object.type = 'text/html';\n object.tabIndex = -1;\n let win;\n object.onload = () => {\n win = object.contentDocument.defaultView;\n win.addEventListener('resize', fn);\n };\n if (/Trident/.test(navigator.userAgent)) {\n element.appendChild(object);\n object.data = 'about:blank';\n }\n else {\n object.data = 'about:blank';\n element.appendChild(object);\n }\n return {\n cancel: () => {\n win && win.removeEventListener && win.removeEventListener('resize', fn);\n element.removeChild(object);\n }\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nclass HtmlTag {\n constructor(html, anchor = null) {\n this.e = element('div');\n this.a = anchor;\n this.u(html);\n }\n m(target, anchor = null) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(target, this.n[i], anchor);\n }\n this.t = target;\n }\n u(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n p(html) {\n this.d();\n this.u(html);\n this.m(this.t, this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nlet stylesheet;\nlet active = 0;\nlet current_rules = {};\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n if (!current_rules[name]) {\n if (!stylesheet) {\n const style = element('style');\n document.head.appendChild(style);\n stylesheet = style.sheet;\n }\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n node.style.animation = (node.style.animation || '')\n .split(', ')\n .filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n )\n .join(', ');\n if (name && !--active)\n clear_rules();\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n current_rules = {};\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nfunction flush() {\n const seen_callbacks = new Set();\n do {\n // first, call beforeUpdate functions\n // and update components\n while (dirty_components.length) {\n const component = dirty_components.shift();\n set_current_component(component);\n update(component.$$);\n }\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n callback();\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update($$.dirty);\n run_all($$.before_update);\n $$.fragment && $$.fragment.p($$.dirty, $$.ctx);\n $$.dirty = null;\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = key && { [key]: value };\n const child_ctx = assign(assign({}, info.ctx), info.resolved);\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = { [info.value]: promise };\n }\n}\n\nconst globals = (typeof window !== 'undefined' ? window : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(changed, child_ctx);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction measure(blocks) {\n const rects = {};\n let i = blocks.length;\n while (i--)\n rects[blocks[i].key] = blocks[i].node.getBoundingClientRect();\n return rects;\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += \" \" + name + \"=\" + JSON.stringify(String(value)\n .replace(/\"/g, '"')\n .replace(/'/g, '''));\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n if (has_prop(component.$$.props, name)) {\n name = component.$$.props[name] || name;\n component.$$.bound[name] = callback;\n callback(component.$$.ctx[name]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = {};\n }\n}\nfunction make_dirty(component, key) {\n if (!component.$$.dirty) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty = blank_object();\n }\n component.$$.dirty[key] = true;\n}\nfunction init(component, options, instance, create_fragment, not_equal, props) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty: null\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (key, ret, value = ret) => {\n if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) {\n if ($$.bound[key])\n $$.bound[key](value);\n if (ready)\n make_dirty(component, key);\n }\n return ret;\n })\n : prop_values;\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(children(options.target));\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, detail));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_function, is_promise, listen, listen_dev, loop, loop_guard, measure, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, validate_component, validate_store, xlink_attr };\n","\n\n\n\n selectNode(descriptor)}>\n
\n \n {descriptor.descriptorType}\n \n {descriptor.module} - {descriptor.parent ? descriptor.parent + '.' : ''}{descriptor.name}\n \n
{descriptor.description || 'No Description'}
\n
\n Module: {descriptor.module}\n \n {#if descriptor.descriptorType === 'Type'}\n
\n
\n Show me the data!\n \n {/if}\n\n
\n
\n","import { safe_not_equal, noop, run_all, is_function } from '../internal';\nexport { get_store_value as get } from '../internal';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe,\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => store.subscribe((value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from \"svelte/store\";\n\nclass Navigator {\n constructor() {\n this.route = writable(getUrlParameter(\"path\") || \"index\");\n this.params = writable([]);\n this.module = getUrlParameter(\"module\") || null;\n }\n navigate(route, ...p) {\n this.route.update(n => route);\n this.params.update(n => p);\n\n if (route !== \"edit-lexicon\") {\n UpdateQueryString(\"path\", route);\n }\n }\n preview(module) {\n window.location.href = `/index.html?path=preview&module=${module}`;\n }\n\n subscribe(f) {\n this.route.subscribe(f);\n }\n\n $params(f) {\n this.params.subscribe(newParams => {\n f(newParams || []);\n });\n }\n}\n\nexport default new Navigator();\n\nfunction UpdateQueryString(key, value, url) {\n if (!url) url = window.location.href;\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\n hash;\n\n if (re.test(url)) {\n if (typeof value !== \"undefined\" && value !== null) {\n var _url = url.replace(re, \"$1\" + key + \"=\" + value + \"$2$3\");\n window.location.href = _url;\n } else {\n hash = url.split(\"#\");\n url = hash[0].replace(re, \"$1$3\").replace(/(&|\\?)$/, \"\");\n if (typeof hash[1] !== \"undefined\" && hash[1] !== null) {\n url += \"#\" + hash[1];\n }\n window.location.href = url;\n return url;\n }\n } else {\n if (typeof value !== \"undefined\" && value !== null) {\n var separator = url.indexOf(\"?\") !== -1 ? \"&\" : \"?\";\n hash = url.split(\"#\");\n url = hash[0] + separator + key + \"=\" + value;\n if (typeof hash[1] !== \"undefined\" && hash[1] !== null) {\n url += \"#\" + hash[1];\n }\n window.location.href = url;\n return url;\n } else {\n return url;\n }\n }\n}\nfunction getUrlParameter(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^]*)\");\n var results = regex.exec(location.search);\n return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n}\n","\n\n\n\n\n
Welcome to ZDragon! \n
\n Visit\n \n ZDragon.nl\n \n to learn more about zdragon!\n
\n\n
\n
Search your models: \n \n \n\n {#if data && data.length > 0}\n {#each data as d}\n
\n {/each}\n {:else}\n
Your query returned no results.
\n {/if}\n
\n\n","\n\n\n\n\n
Search your lexicon! \n
\n {\n navigator.navigate('add-lexicon');\n }}>\n Create\n \n
Search your lexicon: \n e.code === 'Enter' && onkeyup(e.target.value)}\n on:change={e => findData(e.target.value)} />\n \n
\n\n \n Domain \n Name \n Description \n \n \n {#each data as d}\n navigator.navigate('edit-lexicon', d.id)}>\n {d.domain} \n {d.name} \n {d.description} \n \n {/each}\n \n
\n","\n\n\n\n{#if !config || !config.domains || config.domains.length < 1}\n \n The configuration seems to be incomplete. There are no domains defined.\n Without a domain it is impossible to create a Lexicon entry. Please ask you\n administrator to complete the configuration.\n
\n{/if}\n\n\n
Create your Lexicon entry! \n
Save \n
navigator.navigate('lexicon')}>\n Cancel\n \n\n
\n
\n","\n\n\n\n{#if !data}\n Could not find your lexicon entry.
\n{:else}\n\n \n
Edit your Lexicon Entry! \n
Save \n
navigator.navigate('lexicon')}>\n Cancel\n \n
\n
\n{/if}\n","import navigator from \"./../navigator.js\";\n\nexport let getCode = async moduleName => {\n var codeRequest = await fetch(\"/api/module/\" + navigator.module);\n return await codeRequest.text();\n};\n","export const tokenizer = {\n brackets: [{ open: \"{*\", close: \"*}\", token: \"delimiter.bracket\" }],\n keywords: [\"type\", \"alias\", \"choice\", \"data\", \"open\", \"view\", \"flow\"],\n autoClosingPairs: [{ open: \"{*\", close: \"*}\" }],\n digits: /\\d+(_+\\d+)*/,\n tokenizer: {\n root: [{ include: \"@chapter\" }, { include: \"@annotation\" }, { include: \"common\" }],\n chapter: [[/#.*/, \"chapter\"]],\n annotation: [[/@.*/, \"annotation\"]],\n common: [\n [\n /^.[a-z$][\\w$]*/,\n {\n cases: {\n \"@keywords\": \"keyword\",\n \"@default\": \"identifier\"\n }\n }\n ],\n [/(@digits)n?/, \"number\"]\n ]\n }\n};\n\nexport const theme = {\n base: \"vs\",\n inherit: true,\n rules: [\n { token: \"chapter\", foreground: \"#ea5dd5\" },\n { token: \"annotation\", foreground: \"#800000\" }\n ]\n};\n\nexport const createCommands = (monaco, editor) => {\n editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_P, (e, a, b) => {\n var model = editor.getModel();\n var position = editor.getPosition();\n var { word } = model.getWordAtPosition(position);\n alert(word);\n });\n};\n\nexport const createActions = (monaco, editor) => {\n editor.addAction({\n // An unique identifier of the contributed action.\n id: \"zdragon_create_type\",\n\n // A label of the action that will be presented to the user.\n label: \"Create Type\",\n\n // An optional array of keybindings for the action.\n keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_E],\n\n // A precondition for this action.\n precondition: null,\n\n // A rule to evaluate on top of the precondition in order to dispatch the keybindings.\n keybindingContext: null,\n\n contextMenuGroupId: \"navigation\",\n\n contextMenuOrder: 1.5,\n\n // Method that will be executed when the action is triggered.\n // @param editor The editor instance is passed in as a convinience\n run: function(ed) {\n var baseTypes = [\"String\", \"Number\", \"Date\", \"DateTime\", \"Time\", \"Decimal\", \"List\", \"Maybe\"];\n var position = editor.getPosition();\n var text = editor.getValue(position);\n var model = editor.getModel();\n var line = model.getLineContent(position.lineNumber);\n var { word } = model.getWordAtPosition(position);\n\n var newtext;\n if (baseTypes.indexOf(word) == -1) {\n newtext =\n text +\n `\ntype ${word}\n`;\n } else {\n let type = line.split(\":\").map(s => s.trim())[0];\n newtext =\n text +\n `\nalias ${type} = ${word};\n`;\n }\n editor.setValue(newtext);\n editor.setPosition(position);\n return null;\n }\n });\n};\n","export const completionProvider = (monaco, editor) => {\n monaco.languages.registerCompletionItemProvider(\"carlang\", {\n provideCompletionItems: function(model, position) {\n var textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column\n });\n var word = model.getWordUntilPosition(position);\n var range = {\n startLineNumber: position.lineNumber,\n endLineNumber: position.lineNumber,\n startColumn: word.startColumn,\n endColumn: word.endColumn\n };\n return {\n suggestions: [\n {\n label: \"type_simple\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText: \"@The ${1:Name} type description\\ntype ${1:Name}\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"type_complex\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText:\n \"@The ${1:Name} type description\\ntype ${1:Name} =\\n\\t${2:FieldName}: ${3:FieldType};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"field_simple\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText: \"${1:FieldName}: ${2:FieldType};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"alias\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create an alias\",\n insertText: \"alias ${1:Name} = ${2:Type};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"choice_string\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Choice\",\n insertText:\n '@The ${1:Name} choice\\nchoice ${1:Name} =\\n\\t| \"${2:Option1}\"\\n\\t| \"${3:Option1}\"',\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"choice_number\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Numbered Choice\",\n insertText: \"choice ${1:Name} =\\n\\t| 1\\n\\t| 2\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"view\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Numbered Choice\",\n insertText: \"view ${1:Name} =\\n\\t${2:RootElement}\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n ...BaseTypes(monaco, range)\n ]\n };\n }\n });\n};\n\nconst BaseTypes = (monaco, range) => [\n {\n label: \"String\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"The String base type\",\n insertText: \"String\"\n },\n {\n label: \"Number\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents whol numbers\",\n insertText: \"Number\"\n },\n {\n label: \"Decimal\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents decimal numbers\",\n insertText: \"Decimal\"\n },\n {\n label: \"Date\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents the date without time\",\n insertText: \"Date\"\n },\n {\n label: \"Time\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents the time\",\n insertText: \"Time\"\n },\n {\n label: \"DateTime\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents a date-time value\",\n insertText: \"DateTime\"\n }\n];\n","\n\n\n\n\n Save \n
\n\n\n{#if errors && errors.length > 0}\n \n {#each errors as error}\n
\n
{error.title}
\n
{error.message} \n
\n {/each}\n
\n{/if}\n\n","\n\n\n\n\n \n
\n","\n\n\n\n\n","\n\n\n\n\n\n navigator.navigate('index')}>\n Home\n \n navigator.navigate('module-topology')}>\n Topology\n \n navigator.navigate('lexicon')}>\n Lexicon\n \n {#if navigator.module}\n navigator.navigate('editor')}>\n Editor\n \n navigator.navigate('preview')}>\n Preview\n \n {/if}\n \n\n{#if route === 'index'}\n \n{:else if route === 'lexicon'}\n \n{:else if route === 'add-lexicon'}\n \n{:else if route === 'edit-lexicon'}\n \n{:else if route === 'lexicon-admin'}\n \n{:else if route === 'preview'}\n \n{:else if route === 'editor'}\n \n{:else if route === 'config'}\n \n{:else if route === 'module-topology'}\n \n{:else if route === 'module-create'}\n \n{:else}\n \n{/if}\n","import App from \"./App.svelte\";\n\nconst app = new App({\n target: document.body,\n props: {\n name: \"world\"\n }\n});\n\nexport default app;\n\nif (!Prism || !Prism.languages) {\n debugger;\n}\nPrism.languages.carlang = {\n prolog: /<\\?[\\s\\S]+?\\?>/,\n keyword: /\\b(?:type|alias|choice|data|flow|view|compose|loop)\\b/,\n number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n operator: /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,\n chapter: /#.*\\n/\n};\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_data","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","select_value","selected_option","querySelector","current_component","set_current_component","component","get_current_component","Error","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flush","seen_callbacks","Set","shift","update","$$","pop","callback","has","add","fragment","dirty","before_update","p","ctx","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","create_component","mount_component","on_mount","on_destroy","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","context","Map","callbacks","ready","ret","hydrate","l","Array","from","childNodes","children","intro","SvelteComponent","[object Object]","this","$destroy","type","index","indexOf","splice","descriptor","module","descriptorType","parent","description","toLowerCase","selectNode","url","_fetchResult","fetch","result","getElementById","id","mermaid","render","svg","bind","innerHTML","Math","random","toString","replace","substr","Date","now","subscriber_queue","writable","start","stop","subscribers","set","new_value","run_queue","s","subscribe","invalidate","subscriber","route","getUrlParameter","params","n","window","location","href","hash","re","RegExp","test","separator","split","_url","UpdateQueryString","f","newParams","results","exec","search","decodeURIComponent","storedData","sessionStorage","getItem","JSON","parse","findData","descriptions","param","json","setItem","stringify","error","console","log","createNewModule","request","method","descriptors","setTimeout","command","trim","fireCommand","domain","_search","fetchResult","onkeyup","query","navigator","navigate","e","code","config","domains","functionalOwners","technicalOwners","applications","tags","functionalOwner","technicalOwner","newApplication","newTag","changeApplication","changeTag","response","getConfiguration","removeTag","tag","t","removeApplication","headers","Content-Type","body","application","$params","_data","getCode","async","codeRequest","tokenizer","brackets","open","close","token","keywords","autoClosingPairs","digits","root","include","chapter","annotation","common","cases","@keywords","@default","theme","base","inherit","rules","foreground","createCommands","monaco","editor","addCommand","KeyMod","CtrlCmd","KeyCode","KEY_P","model","getModel","position","getPosition","word","getWordAtPosition","alert","createActions","addAction","label","keybindings","KEY_E","precondition","keybindingContext","contextMenuGroupId","contextMenuOrder","ed","newtext","getValue","line","getLineContent","lineNumber","setValue","setPosition","completionProvider","languages","registerCompletionItemProvider","provideCompletionItems","getValueInRange","startLineNumber","startColumn","endLineNumber","endColumn","column","getWordUntilPosition","range","suggestions","kind","CompletionItemKind","Function","documentation","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","BaseTypes","Class","errors","title","message","saveCode","pushUndoStop","pushEditOperations","getFullModelRange","Content-Length","getErrors","errorsRequest","mouseTrap","ctrlKey","metaKey","preventDefault","require","paths","vs","register","setMonarchTokensProvider","defineTheme","language","scrollBeyondLastLine","roundedSelection","minimap","enabled","getcode","onDestroy","interaction","dragNodes","hover","manipulation","getData","topology","container","vis","Network","on","rest","nodes","find","preview","checked","app","Prism","carlang","prolog","keyword","number","operator"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EA8GhF,SAASE,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,MAExC,SAASE,EAAOL,GACZA,EAAKM,WAAWC,YAAYP,GAEhC,SAASQ,EAAaC,EAAYC,GAC9B,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,IACXF,EAAWE,GAAGE,EAAEH,GAG5B,SAASI,EAAQC,GACb,OAAOC,SAASC,cAAcF,GAqBlC,SAASG,EAAKC,GACV,OAAOH,SAASI,eAAeD,GAEnC,SAASE,IACL,OAAOH,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D,EAAUnD,UAAUxI,cACtC2I,EAAQ3I,sCAoB+B2L,EAAUC,SAAS,6BAK1CD,EAAUC,SAAS,uCAGID,EAAUC,SAAS,+BAIjBD,EAAUC,SAAS,8BAGnBD,EAAUC,SAAS,YChDhE,MAAMoJ,GAAM,kEAAQ,CAClBhX,OAAQiB,SAASkO,KACjBrI,MAAO,CACL9F,KAAM,kBAMLiW,OAAUA,MAAMjE,UAGrBiE,MAAMjE,UAAUkE,QAAU,CACxBC,OAAQ,iBACRC,QAAS,wDACTC,OAAQ,wDACRC,SAAU,+CACVlH,QAAS"}
\ No newline at end of file
+{"version":3,"file":"bundle.js","sources":["../../../web/node_modules/svelte/internal/index.mjs","../../../web/src/SearchResult.svelte","../../../web/node_modules/svelte/store/index.mjs","../../../web/src/navigator.js","../../../web/src/Home.svelte","../../../web/src/Lexicon.svelte","../../../web/src/LexiconAdd.svelte","../../../web/src/LexiconEdit.svelte","../../../web/src/Services/codeServices.js","../../../web/src/editor-carlang.js","../../../web/src/editor-completionProvider.js","../../../web/src/Editor.svelte","../../../web/src/Preview.svelte","../../../web/src/ModuleTopology.svelte","../../../web/src/App.svelte","../../../web/src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction validate_store(store, name) {\n if (!store || typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, callback) {\n const unsub = store.subscribe(callback);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, fn) {\n return definition[1]\n ? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {})))\n : ctx.$$scope.ctx;\n}\nfunction get_slot_changes(definition, ctx, changed, fn) {\n return definition[1]\n ? assign({}, assign(ctx.$$scope.changed || {}, definition[1](fn ? fn(changed) : {})))\n : ctx.$$scope.changed || {};\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nlet running = false;\nfunction run_tasks() {\n tasks.forEach(task => {\n if (!task[0](now())) {\n tasks.delete(task);\n task[1]();\n }\n });\n running = tasks.size > 0;\n if (running)\n raf(run_tasks);\n}\nfunction clear_loops() {\n // for testing...\n tasks.forEach(task => tasks.delete(task));\n running = false;\n}\nfunction loop(fn) {\n let task;\n if (!running) {\n running = true;\n raf(run_tasks);\n }\n return {\n promise: new Promise(fulfil => {\n tasks.add(task = [fn, fulfil]);\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n // eslint-disable-next-line @typescript-eslint/no-object-literal-type-assertion\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group) {\n const value = [];\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.push(group[i].__value);\n }\n return value;\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n for (let j = 0; j < node.attributes.length; j += 1) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name])\n node.removeAttribute(attribute.name);\n }\n return nodes.splice(i, 1)[0]; // TODO strip unwanted attributes\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n if (value != null || input.value) {\n input.value = value;\n }\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\nfunction add_resize_listener(element, fn) {\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n const object = document.createElement('object');\n object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n object.setAttribute('aria-hidden', 'true');\n object.type = 'text/html';\n object.tabIndex = -1;\n let win;\n object.onload = () => {\n win = object.contentDocument.defaultView;\n win.addEventListener('resize', fn);\n };\n if (/Trident/.test(navigator.userAgent)) {\n element.appendChild(object);\n object.data = 'about:blank';\n }\n else {\n object.data = 'about:blank';\n element.appendChild(object);\n }\n return {\n cancel: () => {\n win && win.removeEventListener && win.removeEventListener('resize', fn);\n element.removeChild(object);\n }\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nclass HtmlTag {\n constructor(html, anchor = null) {\n this.e = element('div');\n this.a = anchor;\n this.u(html);\n }\n m(target, anchor = null) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(target, this.n[i], anchor);\n }\n this.t = target;\n }\n u(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n p(html) {\n this.d();\n this.u(html);\n this.m(this.t, this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nlet stylesheet;\nlet active = 0;\nlet current_rules = {};\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n if (!current_rules[name]) {\n if (!stylesheet) {\n const style = element('style');\n document.head.appendChild(style);\n stylesheet = style.sheet;\n }\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n node.style.animation = (node.style.animation || '')\n .split(', ')\n .filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n )\n .join(', ');\n if (name && !--active)\n clear_rules();\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n current_rules = {};\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nfunction flush() {\n const seen_callbacks = new Set();\n do {\n // first, call beforeUpdate functions\n // and update components\n while (dirty_components.length) {\n const component = dirty_components.shift();\n set_current_component(component);\n update(component.$$);\n }\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n callback();\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update($$.dirty);\n run_all($$.before_update);\n $$.fragment && $$.fragment.p($$.dirty, $$.ctx);\n $$.dirty = null;\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = key && { [key]: value };\n const child_ctx = assign(assign({}, info.ctx), info.resolved);\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = { [info.value]: promise };\n }\n}\n\nconst globals = (typeof window !== 'undefined' ? window : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(changed, child_ctx);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction measure(blocks) {\n const rects = {};\n let i = blocks.length;\n while (i--)\n rects[blocks[i].key] = blocks[i].node.getBoundingClientRect();\n return rects;\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += \" \" + name + \"=\" + JSON.stringify(String(value)\n .replace(/\"/g, '"')\n .replace(/'/g, '''));\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n if (has_prop(component.$$.props, name)) {\n name = component.$$.props[name] || name;\n component.$$.bound[name] = callback;\n callback(component.$$.ctx[name]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = {};\n }\n}\nfunction make_dirty(component, key) {\n if (!component.$$.dirty) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty = blank_object();\n }\n component.$$.dirty[key] = true;\n}\nfunction init(component, options, instance, create_fragment, not_equal, props) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty: null\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (key, ret, value = ret) => {\n if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) {\n if ($$.bound[key])\n $$.bound[key](value);\n if (ready)\n make_dirty(component, key);\n }\n return ret;\n })\n : prop_values;\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(children(options.target));\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, detail));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_function, is_promise, listen, listen_dev, loop, loop_guard, measure, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, validate_component, validate_store, xlink_attr };\n","\n\n\n\n selectNode(descriptor)}>\n
\n \n {descriptor.descriptorType}\n \n {descriptor.module} - {descriptor.parent ? descriptor.parent + '.' : ''}{descriptor.name}\n \n
{descriptor.description || 'No Description'}
\n
\n Module: {descriptor.module}\n \n {#if descriptor.descriptorType === 'Type'}\n
\n
\n Show me the data!\n \n {/if}\n\n
\n
\n","import { safe_not_equal, noop, run_all, is_function } from '../internal';\nexport { get_store_value as get } from '../internal';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe,\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => store.subscribe((value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from \"svelte/store\";\n\nclass Navigator {\n constructor() {\n this.route = writable(getUrlParameter(\"path\") || \"index\");\n this.params = writable([]);\n this.module = getUrlParameter(\"module\") || null;\n }\n navigate(route, ...p) {\n this.route.update(n => route);\n this.params.update(n => p);\n\n if (route !== \"edit-lexicon\") {\n UpdateQueryString(\"path\", route);\n }\n }\n preview(module) {\n window.location.href = `/index.html?path=preview&module=${module}`;\n }\n\n subscribe(f) {\n this.route.subscribe(f);\n }\n\n $params(f) {\n this.params.subscribe(newParams => {\n f(newParams || []);\n });\n }\n}\n\nexport default new Navigator();\n\nfunction UpdateQueryString(key, value, url) {\n if (!url) url = window.location.href;\n var re = new RegExp(\"([?&])\" + key + \"=.*?(&|#|$)(.*)\", \"gi\"),\n hash;\n\n if (re.test(url)) {\n if (typeof value !== \"undefined\" && value !== null) {\n var _url = url.replace(re, \"$1\" + key + \"=\" + value + \"$2$3\");\n window.location.href = _url;\n } else {\n hash = url.split(\"#\");\n url = hash[0].replace(re, \"$1$3\").replace(/(&|\\?)$/, \"\");\n if (typeof hash[1] !== \"undefined\" && hash[1] !== null) {\n url += \"#\" + hash[1];\n }\n window.location.href = url;\n return url;\n }\n } else {\n if (typeof value !== \"undefined\" && value !== null) {\n var separator = url.indexOf(\"?\") !== -1 ? \"&\" : \"?\";\n hash = url.split(\"#\");\n url = hash[0] + separator + key + \"=\" + value;\n if (typeof hash[1] !== \"undefined\" && hash[1] !== null) {\n url += \"#\" + hash[1];\n }\n window.location.href = url;\n return url;\n } else {\n return url;\n }\n }\n}\nfunction getUrlParameter(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^]*)\");\n var results = regex.exec(location.search);\n return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n}\n","\n\n\n\n\n
Welcome to ZDragon! \n
\n Visit\n \n ZDragon.nl\n \n to learn more about zdragon!\n
\n\n
\n
Search your models: \n \n \n\n {#if data && data.length > 0}\n {#each data as d}\n
\n {/each}\n {:else}\n
Your query returned no results.
\n {/if}\n
\n\n","\n\n\n\n\n
Search your lexicon! \n
\n {\n navigator.navigate('add-lexicon');\n }}>\n Create\n \n
Search your lexicon: \n e.code === 'Enter' && onkeyup(e.target.value)}\n on:change={e => findData(e.target.value)} />\n \n
\n\n \n Domain \n Name \n Description \n \n \n {#each data as d}\n navigator.navigate('edit-lexicon', d.id)}>\n {d.domain} \n {d.name} \n {d.description} \n \n {/each}\n \n
\n","\n\n\n\n{#if !config || !config.domains || config.domains.length < 1}\n \n The configuration seems to be incomplete. There are no domains defined.\n Without a domain it is impossible to create a Lexicon entry. Please ask you\n administrator to complete the configuration.\n
\n{/if}\n\n\n
Create your Lexicon entry! \n
Save \n
navigator.navigate('lexicon')}>\n Cancel\n \n\n
\">\n \n
\n Domain: \n \n \n {#each config.domains as domain}\n {domain} \n {/each}\n \n
\n
\n Name: \n \n
\n
\n Description: \n \n
\n
\n \n
\n Functional Owner: \n \n \n {#each config.functionalOwners as owner}\n {owner} \n {/each}\n \n
\n
\n Technical Owner: \n \n \n {#each config.technicalOwners as owner}\n {owner} \n {/each}\n \n
\n\n
Tag your entry \n
\n
Applications: \n
\n onkeyup(e, 'a')} />\n
\n {#each data.applications as application}\n
\n {application}\n removeApplication(application)}>\n X\n \n
\n {/each}\n
\n\n
\n
Tags: \n
\n onkeyup(e, 't')} />\n
\n {#each data.tags as tag}\n
\n {tag}\n removeTag(tag)}>X \n
\n {/each}\n
\n
\n \n
\n","\n\n\n\n{#if !data}\n Could not find your lexicon entry.
\n{:else}\n\n \n
Edit your Lexicon Entry! \n
Save \n
navigator.navigate('lexicon')}>\n Cancel\n \n
\n
\n{/if}\n","import navigator from \"./../navigator.js\";\n\nexport let getCode = async moduleName => {\n var codeRequest = await fetch(\"/api/module/\" + navigator.module);\n return await codeRequest.text();\n};\n","export const tokenizer = {\n brackets: [{ open: \"{*\", close: \"*}\", token: \"delimiter.bracket\" }],\n keywords: [\"type\", \"alias\", \"choice\", \"data\", \"open\", \"view\", \"flow\"],\n autoClosingPairs: [{ open: \"{*\", close: \"*}\" }],\n digits: /\\d+(_+\\d+)*/,\n tokenizer: {\n root: [{ include: \"@chapter\" }, { include: \"@annotation\" }, { include: \"common\" }],\n chapter: [[/#.*/, \"chapter\"]],\n annotation: [[/@.*/, \"annotation\"]],\n common: [\n [\n /^.[a-z$][\\w$]*/,\n {\n cases: {\n \"@keywords\": \"keyword\",\n \"@default\": \"identifier\"\n }\n }\n ],\n [/(@digits)n?/, \"number\"]\n ]\n }\n};\n\nexport const theme = {\n base: \"vs\",\n inherit: true,\n rules: [\n { token: \"chapter\", foreground: \"#ea5dd5\" },\n { token: \"annotation\", foreground: \"#800000\" }\n ]\n};\n\nexport const createCommands = (monaco, editor) => {\n editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_P, (e, a, b) => {\n var model = editor.getModel();\n var position = editor.getPosition();\n var { word } = model.getWordAtPosition(position);\n alert(word);\n });\n};\n\nexport const createActions = (monaco, editor) => {\n editor.addAction({\n // An unique identifier of the contributed action.\n id: \"zdragon_create_type\",\n\n // A label of the action that will be presented to the user.\n label: \"Create Type\",\n\n // An optional array of keybindings for the action.\n keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_E],\n\n // A precondition for this action.\n precondition: null,\n\n // A rule to evaluate on top of the precondition in order to dispatch the keybindings.\n keybindingContext: null,\n\n contextMenuGroupId: \"navigation\",\n\n contextMenuOrder: 1.5,\n\n // Method that will be executed when the action is triggered.\n // @param editor The editor instance is passed in as a convinience\n run: function(ed) {\n var baseTypes = [\"String\", \"Number\", \"Date\", \"DateTime\", \"Time\", \"Decimal\", \"List\", \"Maybe\"];\n var position = editor.getPosition();\n var text = editor.getValue(position);\n var model = editor.getModel();\n var line = model.getLineContent(position.lineNumber);\n var { word } = model.getWordAtPosition(position);\n\n var newtext;\n if (baseTypes.indexOf(word) == -1) {\n newtext =\n text +\n `\ntype ${word}\n`;\n } else {\n let type = line.split(\":\").map(s => s.trim())[0];\n newtext =\n text +\n `\nalias ${type} = ${word};\n`;\n }\n editor.setValue(newtext);\n editor.setPosition(position);\n return null;\n }\n });\n};\n","export const completionProvider = (monaco, editor) => {\n monaco.languages.registerCompletionItemProvider(\"carlang\", {\n provideCompletionItems: function(model, position) {\n var textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column\n });\n var word = model.getWordUntilPosition(position);\n var range = {\n startLineNumber: position.lineNumber,\n endLineNumber: position.lineNumber,\n startColumn: word.startColumn,\n endColumn: word.endColumn\n };\n return {\n suggestions: [\n {\n label: \"type_simple\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText: \"@The ${1:Name} type description\\ntype ${1:Name}\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"type_complex\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText:\n \"@The ${1:Name} type description\\ntype ${1:Name} =\\n\\t${2:FieldName}: ${3:FieldType};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"field_simple\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a type snippet\",\n insertText: \"${1:FieldName}: ${2:FieldType};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"alias\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create an alias\",\n insertText: \"alias ${1:Name} = ${2:Type};\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"choice_string\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Choice\",\n insertText:\n '@The ${1:Name} choice\\nchoice ${1:Name} =\\n\\t| \"${2:Option1}\"\\n\\t| \"${3:Option1}\"',\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"choice_number\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Numbered Choice\",\n insertText: \"choice ${1:Name} =\\n\\t| 1\\n\\t| 2\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n {\n label: \"view\",\n kind: monaco.languages.CompletionItemKind.Function,\n documentation: \"Create a Numbered Choice\",\n insertText: \"view ${1:Name} =\\n\\t${2:RootElement}\",\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n range: range\n },\n ...BaseTypes(monaco, range)\n ]\n };\n }\n });\n};\n\nconst BaseTypes = (monaco, range) => [\n {\n label: \"String\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"The String base type\",\n insertText: \"String\"\n },\n {\n label: \"Number\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents whol numbers\",\n insertText: \"Number\"\n },\n {\n label: \"Decimal\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents decimal numbers\",\n insertText: \"Decimal\"\n },\n {\n label: \"Date\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents the date without time\",\n insertText: \"Date\"\n },\n {\n label: \"Time\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents the time\",\n insertText: \"Time\"\n },\n {\n label: \"DateTime\",\n kind: monaco.languages.CompletionItemKind.Class,\n documentation: \"Represents a date-time value\",\n insertText: \"DateTime\"\n }\n];\n","\n\n\n\n\n Save \n
\n\n\n{#if errors && errors.length > 0}\n \n {#each errors as error}\n
\n
{error.title}
\n
{error.message} \n
\n {/each}\n
\n{/if}\n\n","\n\n\n\n\n \n
\n","\n\n\n\n\n","\n\n\n\n\n\n navigator.navigate('index')}>\n Home\n \n navigator.navigate('module-topology')}>\n Topology\n \n navigator.navigate('lexicon')}>\n Lexicon\n \n {#if navigator.module}\n navigator.navigate('editor')}>\n Editor\n \n navigator.navigate('preview')}>\n Preview\n \n {/if}\n \n\n{#if route === 'index'}\n \n{:else if route === 'lexicon'}\n \n{:else if route === 'add-lexicon'}\n \n{:else if route === 'edit-lexicon'}\n \n{:else if route === 'lexicon-admin'}\n \n{:else if route === 'preview'}\n \n{:else if route === 'editor'}\n \n{:else if route === 'config'}\n \n{:else if route === 'module-topology'}\n \n{:else if route === 'module-create'}\n \n{:else}\n \n{/if}\n","import App from \"./App.svelte\";\n\nconst app = new App({\n target: document.body,\n props: {\n name: \"world\"\n }\n});\n\nexport default app;\n\nif (!Prism || !Prism.languages) {\n debugger;\n}\nPrism.languages.carlang = {\n prolog: /<\\?[\\s\\S]+?\\?>/,\n keyword: /\\b(?:type|alias|choice|data|flow|view|compose|loop)\\b/,\n number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n operator: /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,\n chapter: /#.*\\n/\n};\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","i","length","d","element","name","document","createElement","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_data","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","select_value","selected_option","querySelector","current_component","set_current_component","component","get_current_component","Error","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flush","seen_callbacks","Set","shift","update","$$","pop","callback","has","add","fragment","dirty","before_update","p","ctx","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","create_component","mount_component","on_mount","on_destroy","m","new_on_destroy","map","filter","destroy_component","make_dirty","then","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","context","Map","callbacks","ready","ret","hydrate","l","Array","from","childNodes","children","intro","SvelteComponent","[object Object]","this","$destroy","type","index","indexOf","splice","descriptor","module","descriptorType","parent","description","toLowerCase","selectNode","url","_fetchResult","fetch","result","getElementById","id","mermaid","render","svg","bind","innerHTML","Math","random","toString","replace","substr","Date","now","subscriber_queue","writable","start","stop","subscribers","set","new_value","run_queue","s","subscribe","invalidate","subscriber","route","getUrlParameter","params","n","window","location","href","hash","re","RegExp","test","separator","split","_url","UpdateQueryString","f","newParams","results","exec","search","decodeURIComponent","storedData","sessionStorage","getItem","JSON","parse","findData","descriptions","param","json","setItem","stringify","error","console","log","createNewModule","request","method","descriptors","setTimeout","command","trim","fireCommand","domain","_search","fetchResult","onkeyup","query","navigator","navigate","e","code","config","domains","functionalOwners","technicalOwners","applications","tags","functionalOwner","technicalOwner","newApplication","newTag","changeApplication","changeTag","response","getConfiguration","removeTag","tag","t","removeApplication","headers","Content-Type","body","application","$params","_data","getCode","async","codeRequest","tokenizer","brackets","open","close","token","keywords","autoClosingPairs","digits","root","include","chapter","annotation","common","cases","@keywords","@default","theme","base","inherit","rules","foreground","createCommands","monaco","editor","addCommand","KeyMod","CtrlCmd","KeyCode","KEY_P","model","getModel","position","getPosition","word","getWordAtPosition","alert","createActions","addAction","label","keybindings","KEY_E","precondition","keybindingContext","contextMenuGroupId","contextMenuOrder","ed","newtext","getValue","line","getLineContent","lineNumber","setValue","setPosition","completionProvider","languages","registerCompletionItemProvider","provideCompletionItems","getValueInRange","startLineNumber","startColumn","endLineNumber","endColumn","column","getWordUntilPosition","range","suggestions","kind","CompletionItemKind","Function","documentation","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","BaseTypes","Class","errors","title","message","saveCode","pushUndoStop","pushEditOperations","getFullModelRange","Content-Length","getErrors","errorsRequest","mouseTrap","ctrlKey","metaKey","preventDefault","require","paths","vs","register","setMonarchTokensProvider","defineTheme","language","scrollBeyondLastLine","roundedSelection","minimap","enabled","getcode","onDestroy","interaction","dragNodes","hover","manipulation","getData","topology","container","vis","Network","on","rest","nodes","find","preview","checked","app","Prism","carlang","prolog","keyword","number","operator"],"mappings":"gCAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EA8GhF,SAASE,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,GAEvB,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,MAExC,SAASE,EAAOL,GACZA,EAAKM,WAAWC,YAAYP,GAEhC,SAASQ,EAAaC,EAAYC,GAC9B,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,IACXF,EAAWE,GAAGE,EAAEH,GAG5B,SAASI,EAAQC,GACb,OAAOC,SAASC,cAAcF,GAqBlC,SAASG,EAAKC,GACV,OAAOH,SAASI,eAAeD,GAEnC,SAASE,IACL,OAAOH,EAAK,KAEhB,SAASI,IACL,OAAOJ,EAAK,IAEhB,SAASK,EAAOvB,EAAMwB,EAAOC,EAASC,GAElC,OADA1B,EAAK2B,iBAAiBH,EAAOC,EAASC,GAC/B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GnBD,EAAUC,SAAS,YChDhE,MAAMoJ,GAAM,kEAAQ,CAClBhX,OAAQiB,SAASkO,KACjBrI,MAAO,CACL9F,KAAM,kBAMLiW,OAAUA,MAAMjE,UAGrBiE,MAAMjE,UAAUkE,QAAU,CACxBC,OAAQ,iBACRC,QAAS,wDACTC,OAAQ,wDACRC,SAAU,+CACVlH,QAAS"}
\ No newline at end of file
diff --git a/web/src/Preview.svelte b/web/src/Preview.svelte
index 5d02f4f..9ab0c94 100644
--- a/web/src/Preview.svelte
+++ b/web/src/Preview.svelte
@@ -8,13 +8,10 @@
height: calc(100% - 60px);
}
iframe {
+ width: 100%;
+ margin: 2rem 0;
height: 100%;
- width: 23cm;
- padding: 0 1cm;
border: none;
- position: absolute;
- left: 50%;
- transform: translateX(-50%);
}