From 477407323cad491ccdd81dadca26a2896503796c Mon Sep 17 00:00:00 2001 From: raguay Date: Tue, 8 Sep 2020 22:45:56 +0700 Subject: [PATCH] Added Templates, updated README.md, and notes in the program. --- README.md | 3 +- public/build/bundle.js | 2 +- public/build/bundle.js.map | 2 +- src/App.svx | 303 +++++++++++++++++++++++++++++++++++-- 4 files changed, 294 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 175f359..3d4d0c2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ work on my system. Therefore, you will need to run `fig local ~/run/projectmanag - get a status - commit with a message - It will use the editor defined in the BitBar, TextBar, and Alfred CurrentFiles scripts. The editor is designated in the file `~/.myeditorchoice` and is ran with the `open` command. If the file doesn't exist, then it will run the editor defined by the $EDITOR environment variable. +- Project templates: either local or on GitHub with a initializer script that will be ran after +copying. ### Ideals and Suggestions @@ -70,5 +72,4 @@ repository with the subject `[feature]` or `[bug]` in the subject line. I'm stil - Mask subcommands and parameters - Better styling and dark mode (depending on what the author's of fig decide about styling the whole application) -- Project templates diff --git a/public/build/bundle.js b/public/build/bundle.js index 7a32f4c..67220a3 100644 --- a/public/build/bundle.js +++ b/public/build/bundle.js @@ -1,2 +1,2 @@ -!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function i(t,e,n,o){if(t){const r=u(t,e,n,o);return t[0](r)}}function u(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function s(t,e,n,o,r,c,i){const s=function(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;ot.removeEventListener(e,n,o)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function w(t,e){t.value=null==e?"":e}function j(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function b(t,e){for(let n=0;n{const o=t.$$.callbacks[e];if(o){const r=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach(e=>{e.call(t,r)})}}}const E=[],N=[],_=[],F=[],P=Promise.resolve();let T=!1;function M(t){_.push(t)}let S=!1;const G=new Set;function O(){if(!S){S=!0;do{for(let t=0;t{L.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}}function W(t){t&&t.c()}function Y(t,n,c){const{fragment:i,on_mount:u,on_destroy:s,after_update:a}=t.$$;i&&i.m(n,c),M(()=>{const n=u.map(e).filter(r);s?s.push(...n):o(n),t.$$.on_mount=[]}),a.forEach(M)}function q(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function z(t,e){-1===t.$$.dirty[0]&&(E.push(t),T||(T=!0,P.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const r=o.length?o[0]:n;return d.ctx&&u(d.ctx[t],d.ctx[t]=r)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](r),m&&z(e,t)),n}):[],d.update(),m=!0,o(d.before_update),d.fragment=!!i&&i(d.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);d.fragment&&d.fragment.l(t),t.forEach(f)}else d.fragment&&d.fragment.c();r.intro&&J(e.$$.fragment),Y(e,r.target,r.anchor),O()}v(l)}class K{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Q(t,e,n){const o=t.slice();return o[5]=e[n],o}function U(t){let e,n,o,r=t[5][0]+"";return{c(){e=d("option"),n=m(r),e.__value=o=t[5][0],e.value=e.__value},m(t,o){l(t,e,o),a(e,n)},p(t,c){2&c&&r!==(r=t[5][0]+"")&&x(n,r),2&c&&o!==(o=t[5][0])&&(e.__value=o,e.value=e.__value)},d(t){t&&f(e)}}}function V(e){let n,r,c,i,u=e[1],s=[];for(let t=0;te[3].call(r)),g(n,"id","projectSelect")},m(t,o){l(t,n,o),a(n,r);for(let t=0;t{"project"in t&&n(0,o=t.project),"projects"in t&&n(1,r=t.projects)},[o,r,function(){c("projectChange",o)},function(){o=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(0,o),n(1,r)}]}class Z extends K{constructor(t){super(),B(this,t,X,V,c,{project:0,projects:1})}}const tt=t=>({}),et=t=>({});function nt(t){let e;const n=t[4].default,o=i(n,t,t[3],null),r=o||function(t){let e;return{c(){e=d("p"),e.textContent="No information for this button"},m(t,n){l(t,e,n)},d(t){t&&f(e)}}}();return{c(){r&&r.c()},m(t,n){r&&r.m(t,n),e=!0},p(t,e){o&&o.p&&8&e&&s(o,n,t,t[3],e,null,null)},i(t){e||(J(r,t),e=!0)},o(t){I(r,t),e=!1},d(t){r&&r.d(t)}}}function ot(t){let e,n,o,c,u,p,g,w=t[0]&&nt(t);const j=t[4].extra,b=i(j,t,t[3],et);return{c(){w&&w.c(),e=$(),b&&b.c(),n=$(),o=d("button"),c=m(t[2])},m(i,s){w&&w.m(i,s),l(i,e,s),b&&b.m(i,s),l(i,n,s),l(i,o,s),a(o,c),u=!0,p||(g=h(o,"click",(function(){r(t[1])&&t[1].apply(this,arguments)})),p=!0)},p(n,[o]){(t=n)[0]?w?(w.p(t,o),1&o&&J(w,1)):(w=nt(t),w.c(),J(w,1),w.m(e.parentNode,e)):w&&(R(),I(w,1,1,()=>{w=null}),A()),b&&b.p&&8&o&&s(b,j,t,t[3],o,tt,et),(!u||4&o)&&x(c,t[2])},i(t){u||(J(w),J(b,t),u=!0)},o(t){I(w),I(b,t),u=!1},d(t){w&&w.d(t),t&&f(e),b&&b.d(t),t&&f(n),t&&f(o),p=!1,g()}}}function rt(t,e,n){let{show:o}=e,{buttonFunction:r}=e,{buttonName:c}=e,{$$slots:i={},$$scope:u}=e;return t.$$set=t=>{"show"in t&&n(0,o=t.show),"buttonFunction"in t&&n(1,r=t.buttonFunction),"buttonName"in t&&n(2,c=t.buttonName),"$$scope"in t&&n(3,u=t.$$scope)},[o,r,c,u,i]}class ct extends K{constructor(t){super(),B(this,t,rt,ot,c,{show:0,buttonFunction:1,buttonName:2})}}function it(t,e,n){const o=t.slice();return o[44]=e[n],o}function ut(e){let n,r,c,i,u,s,a;return{c(){n=d("h3"),n.textContent="Give a name for the Project:",r=$(),c=d("input"),i=$(),u=d("button"),u.textContent="Return",g(c,"type","text")},m(t,o){l(t,n,o),l(t,r,o),l(t,c,o),w(c,e[0]),l(t,i,o),l(t,u,o),s||(a=[h(c,"input",e[33]),h(u,"click",e[34])],s=!0)},p(t,e){1&e[0]&&c.value!==t[0]&&w(c,t[0])},i:t,o:t,d(t){t&&f(n),t&&f(r),t&&f(c),t&&f(i),t&&f(u),s=!1,o(a)}}}function st(t){let e,n,o,r,c,i,u,s,p,h,g,x,w,j,b,y,v,C,k,E,N,_,F,P,T,M=!t[4]&&at();r=new Z({props:{project:t[0],projects:t[1]}}),r.$on("projectChange",t[30]),i=new ct({props:{show:!t[4],buttonFunction:t[15],buttonName:"Go to Project",$$slots:{default:[lt]},$$scope:{ctx:t}}});let S=!t[4]&&ft(),G=null!==t[11]&&pt(t);h=new ct({props:{show:!t[4],buttonFunction:t[19],buttonName:"Edit Project",$$slots:{default:[mt]},$$scope:{ctx:t}}});let O=t[5]&&$t(t),D=t[9]&>(t),L=t[8]&&wt(t),H=t[7]&&bt(t),z=t[6]&&vt(t);v=new ct({props:{show:!t[4],buttonFunction:t[16],buttonName:"Set Current Directory as Project",$$slots:{default:[kt]},$$scope:{ctx:t}}}),k=new ct({props:{show:!t[4],buttonFunction:t[17],buttonName:"Run Project Script",$$slots:{default:[Et]},$$scope:{ctx:t}}}),N=new ct({props:{show:!t[4],buttonFunction:t[18],buttonName:"Edit Project Script",$$slots:{default:[Nt]},$$scope:{ctx:t}}});let B=t[10]&&_t(t);return P=new ct({props:{show:!t[4],buttonFunction:t[13],buttonName:"Close",$$slots:{default:[Mt]},$$scope:{ctx:t}}}),{c(){M&&M.c(),e=$(),n=d("h3"),o=m("Current Project: "),W(r.$$.fragment),c=$(),W(i.$$.fragment),u=$(),S&&S.c(),s=$(),G&&G.c(),p=$(),W(h.$$.fragment),g=$(),O&&O.c(),x=$(),D&&D.c(),w=$(),L&&L.c(),j=$(),H&&H.c(),b=$(),z&&z.c(),y=$(),W(v.$$.fragment),C=$(),W(k.$$.fragment),E=$(),W(N.$$.fragment),_=$(),B&&B.c(),F=$(),W(P.$$.fragment)},m(t,f){M&&M.m(t,f),l(t,e,f),l(t,n,f),a(n,o),Y(r,n,null),l(t,c,f),Y(i,t,f),l(t,u,f),S&&S.m(t,f),l(t,s,f),G&&G.m(t,f),l(t,p,f),Y(h,t,f),l(t,g,f),O&&O.m(t,f),l(t,x,f),D&&D.m(t,f),l(t,w,f),L&&L.m(t,f),l(t,j,f),H&&H.m(t,f),l(t,b,f),z&&z.m(t,f),l(t,y,f),Y(v,t,f),l(t,C,f),Y(k,t,f),l(t,E,f),Y(N,t,f),l(t,_,f),B&&B.m(t,f),l(t,F,f),Y(P,t,f),T=!0},p(t,n){t[4]?M&&(M.d(1),M=null):M||(M=at(),M.c(),M.m(e.parentNode,e));const o={};1&n[0]&&(o.project=t[0]),2&n[0]&&(o.projects=t[1]),r.$set(o);const c={};16&n[0]&&(c.show=!t[4]),65536&n[1]&&(c.$$scope={dirty:n,ctx:t}),i.$set(c),t[4]?S&&(S.d(1),S=null):S||(S=ft(),S.c(),S.m(s.parentNode,s)),null!==t[11]?G?G.p(t,n):(G=pt(t),G.c(),G.m(p.parentNode,p)):G&&(G.d(1),G=null);const u={};16&n[0]&&(u.show=!t[4]),65536&n[1]&&(u.$$scope={dirty:n,ctx:t}),h.$set(u),t[5]?O?(O.p(t,n),32&n[0]&&J(O,1)):(O=$t(t),O.c(),J(O,1),O.m(x.parentNode,x)):O&&(R(),I(O,1,1,()=>{O=null}),A()),t[9]?D?(D.p(t,n),512&n[0]&&J(D,1)):(D=gt(t),D.c(),J(D,1),D.m(w.parentNode,w)):D&&(R(),I(D,1,1,()=>{D=null}),A()),t[8]?L?(L.p(t,n),256&n[0]&&J(L,1)):(L=wt(t),L.c(),J(L,1),L.m(j.parentNode,j)):L&&(R(),I(L,1,1,()=>{L=null}),A()),t[7]?H?(H.p(t,n),128&n[0]&&J(H,1)):(H=bt(t),H.c(),J(H,1),H.m(b.parentNode,b)):H&&(R(),I(H,1,1,()=>{H=null}),A()),t[6]?z?(z.p(t,n),64&n[0]&&J(z,1)):(z=vt(t),z.c(),J(z,1),z.m(y.parentNode,y)):z&&(R(),I(z,1,1,()=>{z=null}),A());const a={};16&n[0]&&(a.show=!t[4]),65536&n[1]&&(a.$$scope={dirty:n,ctx:t}),v.$set(a);const l={};16&n[0]&&(l.show=!t[4]),65536&n[1]&&(l.$$scope={dirty:n,ctx:t}),k.$set(l);const f={};16&n[0]&&(f.show=!t[4]),65536&n[1]&&(f.$$scope={dirty:n,ctx:t}),N.$set(f),t[10]?B?(B.p(t,n),1024&n[0]&&J(B,1)):(B=_t(t),B.c(),J(B,1),B.m(F.parentNode,F)):B&&(R(),I(B,1,1,()=>{B=null}),A());const d={};16&n[0]&&(d.show=!t[4]),65536&n[1]&&(d.$$scope={dirty:n,ctx:t}),P.$set(d)},i(t){T||(J(r.$$.fragment,t),J(i.$$.fragment,t),J(h.$$.fragment,t),J(O),J(D),J(L),J(H),J(z),J(v.$$.fragment,t),J(k.$$.fragment,t),J(N.$$.fragment,t),J(B),J(P.$$.fragment,t),T=!0)},o(t){I(r.$$.fragment,t),I(i.$$.fragment,t),I(h.$$.fragment,t),I(O),I(D),I(L),I(H),I(z),I(v.$$.fragment,t),I(k.$$.fragment,t),I(N.$$.fragment,t),I(B),I(P.$$.fragment,t),T=!1},d(t){M&&M.d(t),t&&f(e),t&&f(n),q(r),t&&f(c),q(i,t),t&&f(u),S&&S.d(t),t&&f(s),G&&G.d(t),t&&f(p),q(h,t),t&&f(g),O&&O.d(t),t&&f(x),D&&D.d(t),t&&f(w),L&&L.d(t),t&&f(j),H&&H.d(t),t&&f(b),z&&z.d(t),t&&f(y),q(v,t),t&&f(C),q(k,t),t&&f(E),q(N,t),t&&f(_),B&&B.d(t),t&&f(F),q(P,t)}}}function at(t){let e,n,o;return{c(){e=d("p"),e.textContent="Welcome to the Project Manager for Fig. Here, you can go to your projects, run scripts, and much more.",n=$(),o=d("p"),o.innerHTML="The Expert checkbox above will hide these information areas and just show the actions you can perform."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function lt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Goto Project Directory",n=$(),o=d("p"),o.textContent="This will take the current terminal session to the project directory in the dropdown."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function ft(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Scripts",n=$(),o=d("p"),o.innerHTML="The following buttons will launch scripts that are in npm, maid, or mask. You don’t have to be in the\nroot directory of the project to run them. Project Manager will save your current directory, run the\nscript, and return to your directory."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function pt(t){let e,n=t[11],o=[];for(let e=0;e$EDITOR environment variable."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function $t(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[21],buttonName:"Edit Maid File",$$slots:{default:[ht]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),65536&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function ht(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the Maid File",n=$(),o=d("p"),o.textContent="Maid is a task runner written in JavaScript for defining actions using a markdown file."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function gt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[24],buttonName:"Edit Gulp File",$$slots:{default:[xt]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),65536&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function xt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the Gulp File",n=$(),o=d("p"),o.textContent="Gulp is a task runner written in JavaScript for defining actions using a javascript file."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function wt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[23],buttonName:"Edit Grunt File",$$slots:{default:[jt]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),65536&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function jt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the Grunt File",n=$(),o=d("p"),o.textContent="Grunt is a task runner written in JavaScript for defining actions using a javascript file."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function bt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[20],buttonName:"Edit Mask File",$$slots:{default:[yt]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),65536&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function yt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the Mask File",n=$(),o=d("p"),o.textContent="Mask is a task runner written in Rust for defining actions using a markdown file."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function vt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[22],buttonName:"Edit Npm File",$$slots:{default:[Ct]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),65536&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Ct(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the npm File",n=$(),o=d("p"),o.innerHTML="This will edit the package.json file for the npm project."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function kt(t){let e,n,o,r,c;return{c(){e=d("h4"),e.textContent="Set as Current Project or Create New Project Directory",n=$(),o=d("p"),o.textContent="This will get the current directory and set it as the current project. If the current directory\nis a subdirectory in a currently defined project, it will set that project as the active project.",r=$(),c=d("p"),c.textContent="Otherwise, it will ask for a new project name, create a blank project start script, and save the current directory with that project name."},m(t,i){l(t,e,i),l(t,n,i),l(t,o,i),l(t,r,i),l(t,c,i)},d(t){t&&f(e),t&&f(n),t&&f(o),t&&f(r),t&&f(c)}}}function Et(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Run the Project Script",n=$(),o=d("p"),o.innerHTML="This will run the current project’s start script. This script is in the top of the project directory and is named .startproject."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function Nt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Edit the Project Script",n=$(),o=d("p"),o.innerHTML="This will open the project start script in the editor defined in the $EDITOR environment variable."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function _t(t){let e,n,o,r;return e=new ct({props:{show:!t[4],buttonFunction:t[27],buttonName:"Git Status",$$slots:{default:[Ft]},$$scope:{ctx:t}}}),o=new ct({props:{show:!t[4],buttonFunction:t[28],buttonName:"Git Commit and Push",$$slots:{default:[Tt],extra:[Pt]},$$scope:{ctx:t}}}),{c(){W(e.$$.fragment),n=$(),W(o.$$.fragment)},m(t,c){Y(e,t,c),l(t,n,c),Y(o,t,c),r=!0},p(t,n){const r={};16&n[0]&&(r.show=!t[4]),65536&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);const c={};16&n[0]&&(c.show=!t[4]),4096&n[0]|65536&n[1]&&(c.$$scope={dirty:n,ctx:t}),o.$set(c)},i(t){r||(J(e.$$.fragment,t),J(o.$$.fragment,t),r=!0)},o(t){I(e.$$.fragment,t),I(o.$$.fragment,t),r=!1},d(t){q(e,t),t&&f(n),q(o,t)}}}function Ft(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Git Status",n=$(),o=d("p"),o.textContent="Get the git status of the current project. You don’t have to be in the root directory of the\nproject to run this command."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function Pt(t){let e,n,o,r,c,i;return{c(){e=d("div"),n=d("h4"),n.textContent="Git Commit Message:",o=$(),r=d("input"),g(r,"type","text"),g(e,"slot","extra"),j(e,"width","100%"),j(e,"display","flex"),j(e,"flex-direction","column")},m(u,s){l(u,e,s),a(e,n),a(e,o),a(e,r),w(r,t[12]),c||(i=h(r,"input",t[32]),c=!0)},p(t,e){4096&e[0]&&r.value!==t[12]&&w(r,t[12])},d(t){t&&f(e),c=!1,i()}}}function Tt(e){let n,o,r,c;return{c(){n=d("h4"),n.textContent="Git Commit and Push",o=$(),r=d("p"),r.textContent="This will take the message below and commit the changes to the git repository. Once committed,\nit will push to GitHub. You don’t have to be in the root directory of the project to run this command.",c=$()},m(t,e){l(t,n,e),l(t,o,e),l(t,r,e),l(t,c,e)},p:t,d(t){t&&f(n),t&&f(o),t&&f(r),t&&f(c)}}}function Mt(t){let e,n,o;return{c(){e=d("h4"),e.textContent="Leave the Project Manager",n=$(),o=d("p"),o.textContent="Leave the Project Manager application for Fig."},m(t,r){l(t,e,r),l(t,n,r),l(t,o,r)},d(t){t&&f(e),t&&f(n),t&&f(o)}}}function St(t){let e,n,o,r,c,i,u,s,p,m,x;const w=[st,ut],b=[];function y(t,e){return t[2]?1:0}return u=y(t),s=b[u]=w[u](t),{c(){e=d("div"),n=d("div"),o=d("label"),o.textContent="Expert",r=$(),c=d("input"),i=$(),s.c(),g(o,"for","expert"),g(c,"id","expert"),g(c,"name","expert"),g(c,"type","checkbox"),c.checked=t[4],j(c,"margin","3px 0px 0px 10px"),j(n,"display","flex"),j(n,"flex-direction","row"),j(e,"display","flex"),j(e,"flex-direction","column")},m(s,f){l(s,e,f),a(e,n),a(n,o),a(n,r),a(n,c),a(e,i),b[u].m(e,null),p=!0,m||(x=h(c,"change",t[26]),m=!0)},p(t,n){(!p||16&n[0])&&(c.checked=t[4]);let o=u;u=y(t),u===o?b[u].p(t,n):(R(),I(b[o],1,1,()=>{b[o]=null}),A(),s=b[u],s||(s=b[u]=w[u](t),s.c()),J(s,1),s.m(e,null))},i(t){p||(J(s),p=!0)},o(t){I(s),p=!1},d(t){t&&f(e),b[u].d(),m=!1,x()}}}function Gt(t,e,n){let{fig:o}=e,r="Not Set",c="Not Set",i=[],u=!1,s=null,a=!1,l=!1,f=!1,p=!1,d=!1,m=!1,$=!1,h=null,g={},x="";var w;function j(t){n(0,r=null),c=null,i.forEach(e=>{""!==e&&t.includes(e[0])&&(c=e[1],n(0,r=e[0]))}),v()}function b(t){c=null,n(0,r=null),i.forEach(e=>{""!==e&&function(t,e){if((t=new String(t))===(e=new String(e)))return!0;const n=e.split("/").filter(t=>t.length),o=t.split("/").filter(t=>t.length);return n.every((t,e)=>o[e]===t)}(t,e[1])&&(n(0,r=e[0]),c=e[1])}),v()}function y(t){o.fread("~/.myeditorchoice",(e,n)=>{n?o.execute(o.env.EDITOR+" "+t,(t,e)=>{}):"/"===(e=e.trim())[0]?o.execute("open -a '"+e.trim()+"' "+t,(t,e)=>{}):o.execute(e+" "+t,(t,e)=>{})})}function v(){null===c&&""===c||(n(11,h=new Array),o.fread(c+"/maidfile.md",(t,e)=>{e?n(5,l=!1):(n(5,l=!0),t.split("\n").filter(t=>null!==t.match(/^##\s*\w*/)).forEach(t=>{const e=t.match(/^##\s*(\w*)/);h.push({name:"Maid "+e[1]+" script",command:"maid "+e[1]}),n(11,h)}));o.fread(c+"/maskfile.md",(t,e)=>{e?n(7,p=!1):(n(7,p=!0),t.split("\n").filter(t=>null!==t.match(/^##\s*\w*/)).forEach(t=>{const e=t.match(/^##\s*(\w*)/);h.push({name:"Mask "+e[1]+" script",command:"mask "+e[1]}),n(11,h)}));o.fread(c+"/package.json",(t,e)=>{if(e)n(6,f=!1);else{n(6,f=!0);var r=JSON.parse(t);for(const t in r.scripts)h.push({name:"NPM "+t+" script",command:"npm run "+t}),n(11,h)}o.fread(c+"/Gruntfile.js",(t,e)=>{e?n(8,d=!1):(n(8,d=!0),t.split("\n").filter(t=>null!==t.match(/grunt\.registerTask\(/)).forEach(t=>{const e=t.match(/grunt\.registerTask\(\'([^\']*)\'/);null===e&&(e=t.match(/grunt\.registerTask\(\"([^\']*)\"/)),h.push({name:"Grunt "+e[1]+" script",command:"grunt "+e[1]}),n(11,h)}));o.fread(c+"/gulpfile.js",(t,e)=>{e?n(9,m=!1):(n(9,m=!0),t.split("\n").filter(t=>null!==t.match(/^exports\.[^\=]+\=/)).forEach(t=>{const e=t.match(/^exports\.([^(\ |\=)]*)/);h.push({name:"Gulp "+e[1]+" script",command:"gulp "+e[1]}),n(11,h)}))})})})})}),o.fread(c+"/.git/HEAD",(t,e)=>{e||(n(10,$=!0),n(12,x=""))}))}function k(){o.fwrite("~/.currentprojectdir",c,t=>{t&&console.log(t)})}function E(){var t,e=[];e[0]=r,e[1]=c,i.push(e),t=i.map(t=>t[0]+"|"+t[1]).join("\n"),o.fwrite("~/.projects",t,t=>{t&&console.log(t)}),o.execute('touch "'+c+'/.startproject"; chmod a+x "'+c+'/.startproject";',(t,e)=>{})}function N(t){o.run("pushd .; cd '"+c+"'; "+t.command+"; popd;")}w=()=>{o.fread("~/.fig/apps/projectmanager/projectmanager.json",(t,e)=>{console.log(e),console.log(t),e||(g=JSON.parse(t),n(4,a=g.expert))}),o.fread("~/.projects",(t,e)=>{if(e)console.log("Error: "+e),n(1,i=""),n(0,r="");else{n(1,i=t.split("\n"));var c=!1;i.forEach((t,e,n)=>{""!==t?n[e]=t.split("|"):c=!0}),c&&i.pop()}o.fread("~/.currentprojectdir",(t,e)=>{e?console.log("Error: "+e):b(t)})})},C().$$.on_mount.push(w);return t.$$set=t=>{"fig"in t&&n(29,o=t.fig)},[r,i,u,s,a,l,f,p,d,m,$,h,x,function(){o.reposition("7")},j,function(){o.run("cd '"+c+"'"),k()},function(){var t,e;t=t=>{b(t),null===r&&(n(0,r="New"),c=t,n(2,u=!0),n(3,s=E)),k()},e=o.env.PWD,o.fread("~/.path",(n,r)=>{e=r?o.env.PWD:n.trim(),t(e)})},function(){o.run('pushd .; cd "'+c+'"; ./.startproject "'+c+'"; popd;')},function(){y("'"+c+"/.startproject'")},function(){y('"'+c+'"')},function(){y('"'+c+'/maskfile.md"')},function(){y('"'+c+'/maidfile.md"')},function(){y('"'+c+'/package.json"')},function(){y('"'+c+'/Gruntfile.js"')},function(){y('"'+c+'/gulpfile.js"')},N,function(){o.fwrite("~/.fig/apps/projectmanager/projectmanager.json",JSON.stringify({expert:!a}),t=>{}),n(4,a=!a)},function(){o.run("pushd .; cd '"+c+"'; git status; popd;")},function(){o.run("pushd .; cd '"+c+"'; git commit -am '"+x+"'; git push; popd;"),n(12,x="")},o,t=>{j(t.detail)},t=>{N(t)},function(){x=this.value,n(12,x)},function(){r=this.value,n(0,r)},()=>{n(2,u=!1),s()}]}class Ot extends K{constructor(t){super(),B(this,t,Gt,St,c,{fig:29},[-1,-1])}}fig.init=(t,e)=>{fig.title="Project Manager",fig.icon="fig://"+fig.env.PWD;new Ot({target:document.body,props:{fig:fig}})}}(); +!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e,n,o){if(t){const r=a(t,e,n,o);return t[0](r)}}function a(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function l(t,e,n,o,r,i,c){const l=function(t,e,n,o){if(t[2]&&o){const r=t[2](o(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let o=0;ot.removeEventListener(e,n,o)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function x(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function w(t,e){t.value=null==e?"":e}function y(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function b(t,e){for(let n=0;n{const o=t.$$.callbacks[e];if(o){const r=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach(e=>{e.call(t,r)})}}}const _=[],N=[],E=[],S=[],F=Promise.resolve();let P=!1;function M(t){E.push(t)}let G=!1;const D=new Set;function H(){if(!G){G=!0;do{for(let t=0;t<_.length;t+=1){const e=_[t];C(e),L(e.$$)}for(_.length=0;N.length;)N.pop()();for(let t=0;t{I.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}}function J(t){t&&t.c()}function Y(t,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:u}=t.$$;c&&c.m(n,i),M(()=>{const n=a.map(e).filter(r);l?l.push(...n):o(n),t.$$.on_mount=[]}),u.forEach(M)}function W(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function q(t,e){-1===t.$$.dirty[0]&&(_.push(t),P||(P=!0,F.then(H)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const r=o.length?o[0]:n;return f.ctx&&a(f.ctx[t],f.ctx[t]=r)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](r),m&&q(e,t)),n}):[],f.update(),m=!0,o(f.before_update),f.fragment=!!c&&c(f.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);f.fragment&&f.fragment.l(t),t.forEach(p)}else f.fragment&&f.fragment.c();r.intro&&A(e.$$.fragment),Y(e,r.target,r.anchor),H()}C(s)}class K{$destroy(){W(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Q(t,e,n){const o=t.slice();return o[5]=e[n],o}function V(t){let e,n,o,r=t[5][0]+"";return{c(){e=f("option"),n=m(r),e.__value=o=t[5][0],e.value=e.__value},m(t,o){s(t,e,o),u(e,n)},p(t,i){2&i&&r!==(r=t[5][0]+"")&&x(n,r),2&i&&o!==(o=t[5][0])&&(e.__value=o,e.value=e.__value)},d(t){t&&p(e)}}}function X(e){let n,r,i,c,a=e[1],l=[];for(let t=0;te[3].call(r)),g(n,"id","projectSelect")},m(t,o){s(t,n,o),u(n,r);for(let t=0;t{"project"in t&&n(0,o=t.project),"projects"in t&&n(1,r=t.projects)},[o,r,function(){i("projectChange",o)},function(){o=v(this),n(0,o),n(1,r)}]}class tt extends K{constructor(t){super(),z(this,t,Z,X,i,{project:0,projects:1})}}const et=t=>({}),nt=t=>({});function ot(t){let e;const n=t[4].default,o=c(n,t,t[3],null),r=o||function(t){let e;return{c(){e=f("p"),e.textContent="No information for this button"},m(t,n){s(t,e,n)},d(t){t&&p(e)}}}();return{c(){r&&r.c()},m(t,n){r&&r.m(t,n),e=!0},p(t,e){o&&o.p&&8&e&&l(o,n,t,t[3],e,null,null)},i(t){e||(A(r,t),e=!0)},o(t){U(r,t),e=!1},d(t){r&&r.d(t)}}}function rt(t){let e,n,o,i,a,d,g,w=t[0]&&ot(t);const y=t[4].extra,b=c(y,t,t[3],nt);return{c(){w&&w.c(),e=h(),b&&b.c(),n=h(),o=f("button"),i=m(t[2])},m(c,l){w&&w.m(c,l),s(c,e,l),b&&b.m(c,l),s(c,n,l),s(c,o,l),u(o,i),a=!0,d||(g=$(o,"click",(function(){r(t[1])&&t[1].apply(this,arguments)})),d=!0)},p(n,[o]){(t=n)[0]?w?(w.p(t,o),1&o&&A(w,1)):(w=ot(t),w.c(),A(w,1),w.m(e.parentNode,e)):w&&(B(),U(w,1,1,()=>{w=null}),R()),b&&b.p&&8&o&&l(b,y,t,t[3],o,et,nt),(!a||4&o)&&x(i,t[2])},i(t){a||(A(w),A(b,t),a=!0)},o(t){U(w),U(b,t),a=!1},d(t){w&&w.d(t),t&&p(e),b&&b.d(t),t&&p(n),t&&p(o),d=!1,g()}}}function it(t,e,n){let{show:o}=e,{buttonFunction:r}=e,{buttonName:i}=e,{$$slots:c={},$$scope:a}=e;return t.$$set=t=>{"show"in t&&n(0,o=t.show),"buttonFunction"in t&&n(1,r=t.buttonFunction),"buttonName"in t&&n(2,i=t.buttonName),"$$scope"in t&&n(3,a=t.$$scope)},[o,r,i,a,c]}class ct extends K{constructor(t){super(),z(this,t,it,rt,i,{show:0,buttonFunction:1,buttonName:2})}}function at(t,e,n){const o=t.slice();return o[74]=e[n],o}function lt(t,e,n){const o=t.slice();return o[74]=e[n],o}function ut(t,e,n){const o=t.slice();return o[71]=e[n],o}function st(e){let n,r,i,c,a,l,m,x,y,v,j,C,k,T,_=e[13],N=[];for(let t=0;t<_.length;t+=1)N[t]=mt(at(e,_,t));return{c(){n=f("h3"),n.textContent="Give a name for the Project:",r=h(),i=f("input"),c=h(),a=f("h3"),a.textContent="Use Template",l=h(),m=f("p"),m.textContent="If you want to install a template, change from ‘none’ to the template you want to use.",x=h(),y=f("select"),v=f("option"),v.textContent="None";for(let t=0;te[59].call(y))},m(t,o){s(t,n,o),s(t,r,o),s(t,i,o),w(i,e[0]),s(t,c,o),s(t,a,o),s(t,l,o),s(t,m,o),s(t,x,o),s(t,y,o),u(y,v);for(let t=0;te[47].call(l)),y(k,"margin","7px 10px 0px 0px"),g(_,"type","text"),y(C,"display","flex"),y(C,"flex-direction","row"),y(S,"margin","7px 10px 0px 0px"),g(P,"type","text"),y(E,"display","flex"),y(E,"flex-direction","row"),y(H,"margin","0px 10px 0px 0px"),y(I,"margin","2px 0px 0px 0px"),g(I,"type","checkbox"),y(D,"display","flex"),y(D,"flex-direction","row"),y(R,"margin","8px 10px 0px 0px"),g(U,"type","text"),y(B,"display","flex"),y(B,"flex-direction","row"),y(W,"margin","5px"),y(W,"padding","3px"),y(z,"margin","5px"),y(z,"padding","3px"),y(Q,"margin","5px"),y(Q,"padding","3px"),y(X,"margin","5px"),y(X,"padding","3px"),y(Y,"display","flex"),y(Y,"flex-direction","row")},m(t,o){s(t,n,o),s(t,r,o),et&&et.m(t,o),s(t,i,o),s(t,c,o),s(t,a,o),s(t,l,o),u(l,m);for(let t=0;t{O=null}),R()),t[9]?q?(q.p(t,n),512&n[0]&&A(q,1)):(q=Tt(t),q.c(),A(q,1),q.m(w.parentNode,w)):q&&(B(),U(q,1,1,()=>{q=null}),R()),t[8]?z?(z.p(t,n),256&n[0]&&A(z,1)):(z=Nt(t),z.c(),A(z,1),z.m(y.parentNode,y)):z&&(B(),U(z,1,1,()=>{z=null}),R()),t[7]?K?(K.p(t,n),128&n[0]&&A(K,1)):(K=St(t),K.c(),A(K,1),K.m(b.parentNode,b)):K&&(B(),U(K,1,1,()=>{K=null}),R()),t[6]?Q?(Q.p(t,n),64&n[0]&&A(Q,1)):(Q=Pt(t),Q.c(),A(Q,1),Q.m(v.parentNode,v)):Q&&(B(),U(Q,1,1,()=>{Q=null}),R());const u={};16&n[0]&&(u.show=!t[4]),131072&n[2]&&(u.$$scope={dirty:n,ctx:t}),j.$set(u);const s={};16&n[0]&&(s.show=!t[4]),131072&n[2]&&(s.$$scope={dirty:n,ctx:t}),k.$set(s);const p={};16&n[0]&&(p.show=!t[4]),131072&n[2]&&(p.$$scope={dirty:n,ctx:t}),_.$set(p);const f={};16&n[0]&&(f.show=!t[4]),131072&n[2]&&(f.$$scope={dirty:n,ctx:t}),E.$set(f),t[10]?V?(V.p(t,n),1024&n[0]&&A(V,1)):(V=It(t),V.c(),A(V,1),V.m(F.parentNode,F)):V&&(B(),U(V,1,1,()=>{V=null}),R());const m={};16&n[0]&&(m.show=!t[4]),131072&n[2]&&(m.$$scope={dirty:n,ctx:t}),P.$set(m);const h={};16&n[0]&&(h.show=!t[4]),131072&n[2]&&(h.$$scope={dirty:n,ctx:t}),G.$set(h)},i(t){D||(A(r.$$.fragment,t),A(c.$$.fragment,t),A($.$$.fragment,t),A(O),A(q),A(z),A(K),A(Q),A(j.$$.fragment,t),A(k.$$.fragment,t),A(_.$$.fragment,t),A(E.$$.fragment,t),A(V),A(P.$$.fragment,t),A(G.$$.fragment,t),D=!0)},o(t){U(r.$$.fragment,t),U(c.$$.fragment,t),U($.$$.fragment,t),U(O),U(q),U(z),U(K),U(Q),U(j.$$.fragment,t),U(k.$$.fragment,t),U(_.$$.fragment,t),U(E.$$.fragment,t),U(V),U(P.$$.fragment,t),U(G.$$.fragment,t),D=!1},d(t){H&&H.d(t),t&&p(e),t&&p(n),W(r),t&&p(i),W(c,t),t&&p(a),L&&L.d(t),t&&p(l),I&&I.d(t),t&&p(d),W($,t),t&&p(g),O&&O.d(t),t&&p(x),q&&q.d(t),t&&p(w),z&&z.d(t),t&&p(y),K&&K.d(t),t&&p(b),Q&&Q.d(t),t&&p(v),W(j,t),t&&p(C),W(k,t),t&&p(T),W(_,t),t&&p(N),W(E,t),t&&p(S),V&&V.d(t),t&&p(F),W(P,t),t&&p(M),W(G,t)}}}function mt(t){let e,n,o,r=t[74].name+"";return{c(){e=f("option"),n=m(r),e.__value=o=t[74].name,e.value=e.__value},m(t,o){s(t,e,o),u(e,n)},p(t,i){8192&i[0]&&r!==(r=t[74].name+"")&&x(n,r),8192&i[0]&&o!==(o=t[74].name)&&(e.__value=o,e.value=e.__value)},d(t){t&&p(e)}}}function ht(t){let e,n,o;return{c(){e=f("p"),e.textContent="This will create a new template item in the structure for templates. The user\ncan then use the information to create a new project from the template. It is a\nfairly flexable system in which you can designate a script or command line to\nexecute after the template is copied.",n=h(),o=f("table"),o.innerHTML="Field \nDescription \nName \nYour name for the template. It will use the templates directory name for starters. \nPath \nThe path, whether a local directory or a GitHub url, to use as a template. \nLocal \nIf checked, is a local directory. Otherwise, it is a GitHub url. \nScript \nThe script to run in the new directory after the template is copied."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function $t(t){let e,n,o;return{c(){e=f("p"),e.textContent="Here you can edit the different templates, remove a template, or create a new blank template.\nEach template has the following data structure:",n=h(),o=f("table"),o.innerHTML="Field \nDescription \nName \nYour name for the template. It will use the templates directory name for starters. \nPath \nThe path, whether a local directory or a GitHub url, to use as a template. \nLocal \nIf checked, is a local directory. Otherwise, it is a GitHub url. \nScript \nThe script to run in the new directory after the template is copied."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function gt(t){let e,n,o,r=t[74].name+"";return{c(){e=f("option"),n=m(r),e.__value=o=t[74].name,e.value=e.__value},m(t,o){s(t,e,o),u(e,n)},p(t,i){8192&i[0]&&r!==(r=t[74].name+"")&&x(n,r),8192&i[0]&&o!==(o=t[74].name)&&(e.__value=o,e.value=e.__value)},d(t){t&&p(e)}}}function xt(t){let e,n,o;return{c(){e=f("p"),e.textContent="Welcome to the Project Manager for Fig. Here, you can go to your projects, run scripts, and much more.",n=h(),o=f("p"),o.innerHTML="The Expert checkbox above will hide these information areas and just show the actions you can perform."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function wt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Goto Project Directory",n=h(),o=f("p"),o.textContent="This will take the current terminal session to the project directory in the dropdown."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function yt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Scripts",n=h(),o=f("p"),o.innerHTML="The following buttons will launch scripts that are in npm, gulp, grunt, maid, or mask files. You don’t have to be in the\nroot directory of the project to run them. Project Manager will save your current directory, run the\nscript in the root directory of the project, and return to your directory."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function bt(t){let e,n=t[11],o=[];for(let e=0;e$EDITOR environment variable or the\neditor listed in the ~/.myeditorchoice file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with BitBar,\nTextBar, and ScriptBar (my own version that isn’t available yet).'},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Ct(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[31],buttonName:"Edit Maid File",$$slots:{default:[kt]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),131072&n[2]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(A(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function kt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the Maid File",n=h(),o=f("p"),o.textContent="Maid is a task runner written in JavaScript for defining actions using a markdown file."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Tt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[34],buttonName:"Edit Gulp File",$$slots:{default:[_t]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),131072&n[2]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(A(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function _t(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the Gulp File",n=h(),o=f("p"),o.textContent="Gulp is a task runner written in JavaScript for defining actions using a javascript file."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Nt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[33],buttonName:"Edit Grunt File",$$slots:{default:[Et]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),131072&n[2]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(A(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function Et(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the Grunt File",n=h(),o=f("p"),o.textContent="Grunt is a task runner written in JavaScript for defining actions using a javascript file."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function St(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[30],buttonName:"Edit Mask File",$$slots:{default:[Ft]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),131072&n[2]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(A(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function Ft(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the Mask File",n=h(),o=f("p"),o.textContent="Mask is a task runner written in Rust for defining actions using a markdown file."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Pt(t){let e,n;return e=new ct({props:{show:!t[4],buttonFunction:t[32],buttonName:"Edit Npm File",$$slots:{default:[Mt]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,o){Y(e,t,o),n=!0},p(t,n){const o={};16&n[0]&&(o.show=!t[4]),131072&n[2]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(A(e.$$.fragment,t),n=!0)},o(t){U(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function Mt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the npm File",n=h(),o=f("p"),o.innerHTML="This will edit the package.json file for the npm project."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Gt(t){let e,n,o,r,i,c,a;return{c(){e=f("h4"),e.textContent="Set as Current Project or Create New Project Directory",n=h(),o=f("p"),o.textContent="This will get the current directory and set it as the current project. If the current directory\nis a subdirectory in a currently defined project, it will set that project as the active project.",r=h(),i=f("p"),i.textContent="Otherwise, it will ask for a new project name, create a blank project start script, and save the current directory with that project name.",c=h(),a=f("p"),a.innerHTML="You can also set a template to be used to create this project. If a local template have the script setupTemplate in the template directory, it will be removed\nafter the script in the variable Script is ran. The script variable is automatically set to\nsetupTemplate for convience when creating templates."},m(t,l){s(t,e,l),s(t,n,l),s(t,o,l),s(t,r,l),s(t,i,l),s(t,c,l),s(t,a,l)},d(t){t&&p(e),t&&p(n),t&&p(o),t&&p(r),t&&p(i),t&&p(c),t&&p(a)}}}function Dt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Set the Current Directory as a Template",n=h(),o=f("p"),o.textContent="This will set the current directory as a template. It will show the template maker dialog\nfor adding the different fields that make up a template specification."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Ht(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Run the Project Script",n=h(),o=f("p"),o.innerHTML="This will run the current project’s start script. This script is in the top of the project directory and is named .startproject."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Lt(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit the Project Script",n=h(),o=f("p"),o.innerHTML='This will open the project start script in the editor defined in the $EDITOR environment variable or the\neditor listed in the ~/.myeditorchoice file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with BitBar,\nTextBar, and ScriptBar (my own version that isn’t available yet).'},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function It(t){let e,n,o,r;return e=new ct({props:{show:!t[4],buttonFunction:t[37],buttonName:"Git Status",$$slots:{default:[Ot]},$$scope:{ctx:t}}}),o=new ct({props:{show:!t[4],buttonFunction:t[38],buttonName:"Git Commit and Push",$$slots:{default:[Rt],extra:[Bt]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment),n=h(),J(o.$$.fragment)},m(t,i){Y(e,t,i),s(t,n,i),Y(o,t,i),r=!0},p(t,n){const r={};16&n[0]&&(r.show=!t[4]),131072&n[2]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);const i={};16&n[0]&&(i.show=!t[4]),4096&n[0]|131072&n[2]&&(i.$$scope={dirty:n,ctx:t}),o.$set(i)},i(t){r||(A(e.$$.fragment,t),A(o.$$.fragment,t),r=!0)},o(t){U(e.$$.fragment,t),U(o.$$.fragment,t),r=!1},d(t){W(e,t),t&&p(n),W(o,t)}}}function Ot(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Git Status",n=h(),o=f("p"),o.textContent="Get the git status of the current project. You don’t have to be in the root directory of the\nproject to run this command."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Bt(t){let e,n,o,r,i,c;return{c(){e=f("div"),n=f("h4"),n.textContent="Git Commit Message:",o=h(),r=f("input"),g(r,"type","text"),g(e,"slot","extra"),y(e,"width","100%"),y(e,"display","flex"),y(e,"flex-direction","column")},m(a,l){s(a,e,l),u(e,n),u(e,o),u(e,r),w(r,t[12]),i||(c=$(r,"input",t[46]),i=!0)},p(t,e){4096&e[0]&&r.value!==t[12]&&w(r,t[12])},d(t){t&&p(e),i=!1,c()}}}function Rt(e){let n,o,r,i;return{c(){n=f("h4"),n.textContent="Git Commit and Push",o=h(),r=f("p"),r.textContent="This will take the message below and commit the changes to the git repository. Once committed,\nit will push to GitHub. You don’t have to be in the root directory of the project to run this command.",i=h()},m(t,e){s(t,n,e),s(t,o,e),s(t,r,e),s(t,i,e)},p:t,d(t){t&&p(n),t&&p(o),t&&p(r),t&&p(i)}}}function At(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Edit Template",n=h(),o=f("p"),o.textContent="This button will show the edit template dialog for edit the different templates, remove a\ntemplate, or create a new blank template."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Ut(t){let e,n,o;return{c(){e=f("h4"),e.textContent="Leave the Project Manager",n=h(),o=f("p"),o.textContent="Leave the Project Manager application for Fig."},m(t,r){s(t,e,r),s(t,n,r),s(t,o,r)},d(t){t&&p(e),t&&p(n),t&&p(o)}}}function Jt(t){let e,n,o,r,i,c,a,l,d,m,x;const w=[ft,dt,pt,st],b=[];function v(t,e){return t[2]||t[18]||t[20]?t[20]?1:t[18]?2:3:0}return a=v(t),l=b[a]=w[a](t),{c(){e=f("div"),n=f("div"),o=f("label"),o.textContent="Expert",r=h(),i=f("input"),c=h(),l.c(),g(o,"for","expert"),g(i,"id","expert"),g(i,"name","expert"),g(i,"type","checkbox"),i.checked=t[4],y(i,"margin","3px 0px 0px 10px"),y(n,"display","flex"),y(n,"flex-direction","row"),y(e,"display","flex"),y(e,"flex-direction","column")},m(l,p){s(l,e,p),u(e,n),u(n,o),u(n,r),u(n,i),u(e,c),b[a].m(e,null),d=!0,m||(x=$(i,"change",t[36]),m=!0)},p(t,n){(!d||16&n[0])&&(i.checked=t[4]);let o=a;a=v(t),a===o?b[a].p(t,n):(B(),U(b[o],1,1,()=>{b[o]=null}),R(),l=b[a],l||(l=b[a]=w[a](t),l.c()),A(l,1),l.m(e,null))},i(t){d||(A(l),d=!0)},o(t){U(l),d=!1},d(t){t&&p(e),b[a].d(),m=!1,x()}}}function Yt(t,e,n){let{fig:o}=e,r="Not Set",i="Not Set",c=[],a=!1,l=null,u=!1,s=!1,p=!1,d=!1,f=!1,m=!1,h=!1,$=null,g="",x=[],w="",y=!0,b="setupTemplate",j="",C=!1,T="none",_=!1;var N;function E(t){n(0,r=null),i=null,c.forEach(e=>{""!==e&&t.includes(e[0])&&(i=e[1],n(0,r=e[0]))}),P()}function S(t){i=null,n(0,r=null),c.forEach(e=>{""!==e&&function(t,e){if((t=new String(t))===(e=new String(e)))return!0;const n=e.split("/").filter(t=>t.length),o=t.split("/").filter(t=>t.length);return n.every((t,e)=>o[e]===t)}(t,e[1])&&(n(0,r=e[0]),i=e[1])}),P()}function F(t){o.fread("~/.myeditorchoice",(e,n)=>{n?o.execute(o.env.EDITOR+" "+t,(t,e)=>{}):"/"===(e=e.trim())[0]?o.execute("open -a '"+e.trim()+"' "+t,(t,e)=>{}):o.execute(e+" "+t,(t,e)=>{})})}function P(){null===i&&""===i||(n(11,$=new Array),o.fread(i+"/maidfile.md",(t,e)=>{e?n(5,s=!1):(n(5,s=!0),t.split("\n").filter(t=>null!==t.match(/^##\s*\w*/)).forEach(t=>{const e=t.match(/^##\s*(\w*)/);$.push({name:"Maid "+e[1]+" script",command:"maid "+e[1]}),n(11,$)}));o.fread(i+"/maskfile.md",(t,e)=>{e?n(7,d=!1):(n(7,d=!0),t.split("\n").filter(t=>null!==t.match(/^##\s*\w*/)).forEach(t=>{const e=t.match(/^##\s*(\w*)/);$.push({name:"Mask "+e[1]+" script",command:"mask "+e[1]}),n(11,$)}));o.fread(i+"/package.json",(t,e)=>{if(e)n(6,p=!1);else{n(6,p=!0);var r=JSON.parse(t);for(const t in r.scripts)$.push({name:"NPM "+t+" script",command:"npm run "+t}),n(11,$)}o.fread(i+"/Gruntfile.js",(t,e)=>{e?n(8,f=!1):(n(8,f=!0),t.split("\n").filter(t=>null!==t.match(/grunt\.registerTask\(/)).forEach(t=>{const e=t.match(/grunt\.registerTask\(\'([^\']*)\'/);null===e&&(e=t.match(/grunt\.registerTask\(\"([^\']*)\"/)),$.push({name:"Grunt "+e[1]+" script",command:"grunt "+e[1]}),n(11,$)}));o.fread(i+"/gulpfile.js",(t,e)=>{e?n(9,m=!1):(n(9,m=!0),t.split("\n").filter(t=>null!==t.match(/^exports\.[^\=]+\=/)).forEach(t=>{const e=t.match(/^exports\.([^(\ |\=)]*)/);$.push({name:"Gulp "+e[1]+" script",command:"gulp "+e[1]}),n(11,$)}))})})})})}),o.fread(i+"/.git/HEAD",(t,e)=>{e||(n(10,h=!0),n(12,g=""))}))}function M(){o.fwrite("~/.currentprojectdir",i,t=>{t&&console.log(t)})}function G(){var t,e=[];if(e[0]=r,e[1]=i,c.push(e),t=c.map(t=>t[0]+"|"+t[1]).join("\n"),o.fwrite("~/.projects",t,t=>{t&&console.log(t)}),o.execute('touch "'+i+'/.startproject"; chmod a+x "'+i+'/.startproject";',(t,e)=>{}),!T.includes("none")){var n=x.find(t=>t.name.includes(T));n.local?(o.run('echo "Copy template'+T+'..."; cp -R "'+n.templateDirUrl+'/." .; '+n.runScript+";"),o.fread(n.templateDirUrl+"/setupTemplate",(t,e)=>{e||o.run("rm setupTemplate;")})):o.run('echo "Copy GitHub template '+T+'..."; npx degit --force '+n.templateDirUrl+' "'+i+'"; '+n.runScript+";")}}function D(t){var e=o.env.PWD;o.fread("~/.path",(n,r)=>{e=r?o.env.PWD:n.trim(),t(e)})}function H(t){o.run("pushd .; cd '"+i+"'; "+t.command+"; popd;")}function L(){o.fwrite("~/.fig/apps/projectmanager/projectmanager.json",JSON.stringify({expert:u,templates:x}),t=>{})}N=()=>{o.fread("~/.fig/apps/projectmanager/projectmanager.json",(t,e)=>{if(e)n(4,u=!1),n(13,x=[]),L();else{var o=JSON.parse(t);void 0!==o.expert&&n(4,u=o.expert),void 0!==o.templates&&n(13,x=o.templates)}}),o.fread("~/.projects",(t,e)=>{if(e)console.log("Error: "+e),n(1,c=""),n(0,r="");else{n(1,c=t.split("\n"));var i=!1;c.forEach((t,e,n)=>{""!==t?n[e]=t.split("|"):i=!0}),i&&c.pop()}o.fread("~/.currentprojectdir",(t,e)=>{e?console.log("Error: "+e):S(t)})})},k().$$.on_mount.push(N);return t.$$set=t=>{"fig"in t&&n(43,o=t.fig)},[r,c,a,l,u,s,p,d,f,m,h,$,g,x,w,y,b,j,C,T,_,function(){o.reposition("7")},E,function(){o.run("cd '"+i+"'"),M()},function(){D(t=>{S(t),null===r&&(n(0,r="New"),i=t,n(2,a=!0),n(3,l=G)),M()})},function(){n(13,x=x.filter(t=>!t.name.includes(T))),n(19,T="none"),n(17,j=""),n(14,w=""),n(16,b="setupTemplate"),n(15,y=!0),L()},function(){n(19,T="none"),n(17,j="New Template"),n(14,w=""),n(16,b="setupTemplate"),n(15,y=!0)},function(){o.run('pushd .; cd "'+i+'"; ./.startproject "'+i+'"; popd;')},function(){F("'"+i+"/.startproject'")},function(){F('"'+i+'"')},function(){F('"'+i+'/maskfile.md"')},function(){F('"'+i+'/maidfile.md"')},function(){F('"'+i+'/package.json"')},function(){F('"'+i+'/Gruntfile.js"')},function(){F('"'+i+'/gulpfile.js"')},H,function(){n(4,u=!u),L()},function(){o.run("pushd .; cd '"+i+"'; git status; popd;")},function(){o.run("pushd .; cd '"+i+"'; git commit -am '"+g+"'; git push; popd;"),n(12,g="")},function(){C?void 0!==w&&"string"==typeof w&&""!==w&&"boolean"==typeof y&&"string"==typeof b&&(x.push({name:j,templateDirUrl:w,local:y,runScript:b}),L()):D(t=>{var e=t.split("/");n(17,j=e[e.length-1]),n(14,w=t),n(15,y=!0),n(18,C=!0)})},function(){n(20,_=!0),n(19,T="none"),n(17,j=""),n(14,w=""),n(16,b="setupTemplate"),n(15,y=!0)},function(){var t=x.find(t=>t.name.includes(T));n(17,j=t.name),n(14,w=t.templateDirUrl),n(15,y=t.local),n(16,b=t.runScript)},function(){n(13,x=x.map(t=>(t.name.includes(T)&&(t.name=j,t.templateDirUrl=w,t.local=y,t.runScript=b),t))),L()},o,t=>{E(t.detail)},t=>{H(t)},function(){g=this.value,n(12,g)},function(){T=v(this),n(19,T),n(13,x)},function(){j=this.value,n(17,j)},function(){w=this.value,n(14,w)},function(){y=this.checked,n(15,y)},function(){b=this.value,n(16,b)},()=>{n(20,_=!1)},function(){j=this.value,n(17,j)},function(){w=this.value,n(14,w)},function(){y=this.checked,n(15,y)},function(){b=this.value,n(16,b)},()=>{n(18,C=!1)},function(){r=this.value,n(0,r)},function(){T=v(this),n(19,T),n(13,x)},()=>{n(2,a=!1),l()}]}class Wt extends K{constructor(t){super(),z(this,t,Yt,Jt,i,{fig:43},[-1,-1,-1])}}fig.init=(t,e)=>{fig.title="Project Manager",fig.icon="fig://"+fig.env.PWD;new Wt({target:document.body,props:{fig:fig}})}}(); //# sourceMappingURL=bundle.js.map diff --git a/public/build/bundle.js.map b/public/build/bundle.js.map index e8ea91b..aae2c75 100644 --- a/public/build/bundle.js.map +++ b/public/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../src/components/ProjectSelector.svelte","../../src/components/ButtonElement.svelte","../../src/App.svx","../../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 is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\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, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\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 compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\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);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\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();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\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 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 (key === '__value') {\n node.value = node[key] = 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, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(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 let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\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.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\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}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = `data:text/html,`;\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\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}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nconst active_docs = new Set();\nlet active = 0;\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 const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\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 const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\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}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n dirty_components.length = 0;\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 // ...so guard against infinite loops\n seen_callbacks.add(callback);\n 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 flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\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 = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\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 = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : 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, dirty, 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(child_ctx, dirty);\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 validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error(`Cannot have duplicate keys in a keyed each`);\n }\n keys.add(key);\n }\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}=\"${String(value).replace(/\"/g, '"').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 = { title: '', 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.title + 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 const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\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, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\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,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\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 const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\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($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\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($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.24.1' }, 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.wholeText === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\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 $capture_state() { }\n $inject_state() { }\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, action_destroyer, 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, compute_rest_props, 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_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, 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, query_selector_all, 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, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","
\n \n {#each projects as proj}\n \n {/each}\n \n
\n\n\n\n\n","{#if show}\n \n

No information for this button

\n
\n{/if}\n\n\n\n\n\n\n","\n
\n
\n\n\n
\n\n{#if !showDialog}\n\n{#if !expert}\nWelcome to the Project Manager for Fig. Here, you can go to your projects, run scripts, and much more.\n\nThe `Expert` checkbox above will hide these information areas and just show the actions you can perform.\n\n{/if}\n\n### Current Project: { setProjectByName(e.detail); }} /> \n\n\n\n#### Goto Project Directory\n\nThis will take the current terminal session to the project directory in the dropdown.\n\n\n\n{#if !expert}\n\n#### Scripts\n\nThe following buttons will launch scripts that are in `npm`, `maid`, or `mask`. You don't have to be in the \nroot directory of the project to run them. Project Manager will save your current directory, run the \nscript, and return to your directory.\n\n{/if}\n\n{#if tasks !== null}\n {#each tasks as task}\n \n {/each}\n{/if}\n\n\n\n#### Edit the Project\n\nThis will open the project in the editor defined in the `$EDITOR` environment variable.\n\n\n\n{#if maidfile}\n\n\n#### Edit the Maid File\n\nMaid is a task runner written in JavaScript for defining actions using a markdown file.\n\n\n{/if}\n\n{#if gulpfile}\n\n\n#### Edit the Gulp File\n\nGulp is a task runner written in JavaScript for defining actions using a javascript file.\n\n\n{/if}\n\n{#if gruntfile}\n\n\n#### Edit the Grunt File\n\nGrunt is a task runner written in JavaScript for defining actions using a javascript file.\n\n\n{/if}\n\n{#if maskfile}\n\n\n#### Edit the Mask File\n\nMask is a task runner written in Rust for defining actions using a markdown file.\n\n\n{/if}\n\n{#if npmfile}\n\n\n#### Edit the npm File\n\nThis will edit the `package.json` file for the npm project.\n\n\n{/if}\n\n\n\n#### Set as Current Project or Create New Project Directory\n\nThis will get the current directory and set it as the current project. If the current directory \nis a subdirectory in a currently defined project, it will set that project as the active project. \n\nOtherwise, it will ask for a new project name, create a blank project start script, and save the current directory with that project name. \n\n\n\n\n\n#### Run the Project Script\n\nThis will run the current project's start script. This script is in the top of the project directory and is named `.startproject`.\n\n\n\n\n\n#### Edit the Project Script\n\nThis will open the project start script in the editor defined in the `$EDITOR` environment variable.\n\n\n\n{#if gitfile}\n\n\n\n#### Git Status\n\nGet the git status of the current project. You don't have to be in the root directory of the \nproject to run this command.\n\n\n\n\n\n#### Git Commit and Push\n\nThis will take the message below and commit the changes to the git repository. Once committed, \nit will push to GitHub. You don't have to be in the root directory of the project to run this command.\n\n
\n\n#### Git Commit Message:\n\n \n
\n\n
\n\n{/if}\n\n\n\n#### Leave the Project Manager\n\nLeave the Project Manager application for Fig.\n\n\n\n{:else}\n\n### Give a name for the Project: \n\n\n{/if}\n\n
\n","import App from './App.svx';\n\nfig.init = (stdin, options) => {\n //\n // Fig setup.\n //\n fig.title = \"Project Manager\";\n fig.icon = `fig://${fig.env.PWD}`\n\n //\n // Calling the application.\n //\n const app = new App({\n target: document.body,\n props: {\n fig: fig\n }\n });\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","tar","src","k","assign","slice","update_slot","slot","slot_definition","dirty","get_slot_changes_fn","get_slot_context_fn","slot_changes","lets","undefined","merged","len","Math","max","length","i","get_slot_changes","slot_context","p","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","set_style","key","important","style","setProperty","select_option","select","option","__value","selected","current_component","set_current_component","component","get_current_component","Error","createEventDispatcher","type","detail","callbacks","$$","e","createEvent","initCustomEvent","custom_event","call","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flushing","seen_callbacks","Set","flush","update","pop","callback","has","add","clear","fragment","before_update","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","fill","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","context","Map","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","this","$destroy","index","indexOf","splice","$$props","obj","$$set","keys","project","projects","dispatch","selected_option","querySelector","show","buttonFunction","buttonName","fig","currentProject","currentProjectDir","showDialog","runCleanUp","expert","maidfile","npmfile","maskfile","gruntfile","gulpfile","gitfile","tasks","appData","gitmessage","setProjectByName","row","includes","initProjects","setProjectByDirectory","dir","child","parent","String","parentTokens","split","childTokens","every","t","isChildOf","runEditor","file","fread","err","execute","env","EDITOR","out","trim","item","match","command","jpack","JSON","parse","scripts","SaveCurrentProject","fwrite","console","log","FinishNewProject","saveString","narr","join","runTask","tsk","nodata","line","arr","reposition","fun","pth","PWD","stringify","task","stdin","title","icon","App","body"],"mappings":"yBAAA,SAASA,KAgBT,SAASC,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,S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6BAIpC4B,EAAU,IAAM5B,EAAoB,8BAIpC4B,EAAU,IAAM5B,EAAoB,8BAIpC4B,EAAU,IAAM5B,EAAoB,+BAQpCF,EAAI+C,OAAO,iDAAkDJ,KAAKoB,WAAY1D,QAASA,IAAW4B,WAClG5B,GAAUA,eAIVL,EAAIjM,IAAI,gBAAkBmM,EAAoB,oCAI9CF,EAAIjM,IAAI,gBAAkBmM,EAAoB,sBAAwBY,EAAa,2BACnFA,EAAa,OAaqF3G,IAAQ4G,EAAiB5G,EAAEH,aAanGsJ,EAAQU,eA+DLlD,iCAUFb,8BACNE,GAAa,GAAOC,oFCnd7CJ,IAAIzC,KAAO,CAAC0G,EAAO/L,KAIjB8H,IAAIkE,MAAQ,kBACZlE,IAAImE,KAAO,SAASnE,IAAImC,IAAI2B,IAKhB,IAAIM,GAAI,CAClB1N,OAAQe,SAAS4M,KACjB1G,MAAO,CACLqC,IAAKA"} \ No newline at end of file +{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../src/components/ProjectSelector.svelte","../../src/components/ButtonElement.svelte","../../src/App.svx","../../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 is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\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, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\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 compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\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);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\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();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\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 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 (key === '__value') {\n node.value = node[key] = 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, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(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 let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\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.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\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}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = `data:text/html,`;\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\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}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nconst active_docs = new Set();\nlet active = 0;\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 const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\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 const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\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}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n dirty_components.length = 0;\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 // ...so guard against infinite loops\n seen_callbacks.add(callback);\n 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 flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\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 = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\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 = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : 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, dirty, 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(child_ctx, dirty);\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 validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error(`Cannot have duplicate keys in a keyed each`);\n }\n keys.add(key);\n }\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}=\"${String(value).replace(/\"/g, '"').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 = { title: '', 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.title + 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 const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\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, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\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,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\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 const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\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($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\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($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.24.1' }, 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.wholeText === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\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 $capture_state() { }\n $inject_state() { }\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, action_destroyer, 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, compute_rest_props, 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_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, 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, query_selector_all, 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, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","
\n \n {#each projects as proj}\n \n {/each}\n \n
\n\n\n\n\n","{#if show}\n \n

No information for this button

\n
\n{/if}\n\n\n\n\n\n\n","\n
\n
\n\n\n
\n\n{#if !showDialog && !showNewTemplate && !showEditTemplate}\n\n{#if !expert}\nWelcome to the Project Manager for Fig. Here, you can go to your projects, run scripts, and much more.\n\nThe `Expert` checkbox above will hide these information areas and just show the actions you can perform.\n\n{/if}\n\n### Current Project: { setProjectByName(e.detail); }} /> \n\n\n\n#### Goto Project Directory\n\nThis will take the current terminal session to the project directory in the dropdown.\n\n\n\n{#if !expert}\n\n#### Scripts\n\nThe following buttons will launch scripts that are in `npm`, `gulp`, `grunt`, `maid`, or `mask` files. You don't have to be in the \nroot directory of the project to run them. Project Manager will save your current directory, run the \nscript in the root directory of the project, and return to your directory.\n\n{/if}\n\n{#if tasks !== null}\n {#each tasks as task}\n \n {/each}\n{/if}\n\n\n\n#### Edit the Project\n\nThis will open the project in the editor defined in the `$EDITOR` environment variable or the \neditor listed in the `~/.myeditorchoice` file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with [BitBar](http://getbitbar.org), \n[TextBar](http://richsomerfield.com/apps/textbar/), and ScriptBar (my own version that isn't available yet).\n\n\n\n{#if maidfile}\n\n\n#### Edit the Maid File\n\nMaid is a task runner written in JavaScript for defining actions using a markdown file.\n\n\n{/if}\n\n{#if gulpfile}\n\n\n#### Edit the Gulp File\n\nGulp is a task runner written in JavaScript for defining actions using a javascript file.\n\n\n{/if}\n\n{#if gruntfile}\n\n\n#### Edit the Grunt File\n\nGrunt is a task runner written in JavaScript for defining actions using a javascript file.\n\n\n{/if}\n\n{#if maskfile}\n\n\n#### Edit the Mask File\n\nMask is a task runner written in Rust for defining actions using a markdown file.\n\n\n{/if}\n\n{#if npmfile}\n\n\n#### Edit the npm File\n\nThis will edit the `package.json` file for the npm project.\n\n\n{/if}\n\n\n\n#### Set as Current Project or Create New Project Directory\n\nThis will get the current directory and set it as the current project. If the current directory \nis a subdirectory in a currently defined project, it will set that project as the active project. \n\nOtherwise, it will ask for a new project name, create a blank project start script, and save the current directory with that project name. \n\nYou can also set a template to be used to create this project. If a local template have the script `setupTemplate` in the template directory, it will be removed \nafter the script in the variable `Script` is ran. The script variable is automatically set to \n`setupTemplate` for convience when creating templates.\n\n\n\n\n\n#### Set the Current Directory as a Template\n\nThis will set the current directory as a template. It will show the template maker dialog\nfor adding the different fields that make up a template specification. \n\n\n\n\n\n#### Run the Project Script\n\nThis will run the current project's start script. This script is in the top of the project directory and is named `.startproject`.\n\n\n\n\n\n#### Edit the Project Script\n\nThis will open the project start script in the editor defined in the `$EDITOR` environment variable or the \neditor listed in the `~/.myeditorchoice` file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with [BitBar](http://getbitbar.org), \n[TextBar](http://richsomerfield.com/apps/textbar/), and ScriptBar (my own version that isn't available yet).\n\n\n\n{#if gitfile}\n\n\n\n#### Git Status\n\nGet the git status of the current project. You don't have to be in the root directory of the \nproject to run this command.\n\n\n\n\n\n#### Git Commit and Push\n\nThis will take the message below and commit the changes to the git repository. Once committed, \nit will push to GitHub. You don't have to be in the root directory of the project to run this command.\n\n
\n\n#### Git Commit Message:\n\n \n
\n\n
\n\n{/if}\n\n\n\n#### Edit Template\n\nThis button will show the edit template dialog for edit the different templates, remove a \ntemplate, or create a new blank template.\n\n\n\n\n\n#### Leave the Project Manager\n\nLeave the Project Manager application for Fig.\n\n\n{:else if showEditTemplate}\n\n### Edit Template\n\n{#if !expert}\n\nHere you can edit the different templates, remove a template, or create a new blank template. \nEach template has the following data structure:\n\n| Field | Description |\n| --- | ------ |\n| Name | Your name for the template. It will use the templates directory name for starters. |\n| Path | The path, whether a local directory or a GitHub url, to use as a template.|\n| Local | If checked, is a local directory. Otherwise, it is a GitHub url. |\n| Script | The script to run in the new directory after the template is copied. |\n\n{/if}\n\n#### Select Template:\n\n\n\n#### Template Items:\n\n
\n\n\n
\n
\n\n\n
\n
\n\n\n
\n
\n\n\n
\n\n
\n\n\n\n\n
\n\n{:else if showNewTemplate}\n\n### Setup Current Directory as a Template\n\n{#if !expert}\n\nThis will create a new template item in the structure for templates. The user \ncan then use the information to create a new project from the template. It is a \nfairly flexable system in which you can designate a script or command line to \nexecute after the template is copied.\n\n| Field | Description |\n| --- | ------ |\n| Name | Your name for the template. It will use the templates directory name for starters. |\n| Path | The path, whether a local directory or a GitHub url, to use as a template.|\n| Local | If checked, is a local directory. Otherwise, it is a GitHub url. |\n| Script | The script to run in the new directory after the template is copied. |\n\n{/if}\n\n
\n\n\n
\n
\n\n\n
\n
\n\n\n
\n
\n\n\n
\n\n
\n\n\n
\n\n{:else}\n\n### Give a name for the Project: \n\n\n\n### Use Template\n\nIf you want to install a template, change from 'none' to the template you want to use.\n\n\n\n\n{/if}\n\n
\n","import App from './App.svx';\n\nfig.init = (stdin, options) => {\n //\n // Fig setup.\n //\n fig.title = \"Project Manager\";\n fig.icon = `fig://${fig.env.PWD}`\n\n //\n // Calling the application.\n //\n const app = new App({\n target: document.body,\n props: {\n fig: fig\n }\n });\n}\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","tar","src","k","assign","slice","update_slot","slot","slot_definition","dirty","get_slot_changes_fn","get_slot_context_fn","slot_changes","lets","undefined","merged","len","Math","max","length","i","get_slot_changes","slot_context","p","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","document","createElement","text","data","createTextNode","space","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_data","wholeText","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","createEventDispatcher","type","detail","callbacks","$$","e","createEvent","initCustomEvent","custom_event","call","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","push","flushing","seen_callbacks","Set","flush","update","pop","callback","has","add","clear","fragment","before_update","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","fill","init","instance","create_fragment","not_equal","props","parent_component","prop_values","bound","context","Map","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","this","$destroy","index","indexOf","splice","$$props","obj","$$set","keys","project","projects","dispatch","show","buttonFunction","buttonName","fig","currentProject","currentProjectDir","showDialog","runCleanUp","expert","maidfile","npmfile","maskfile","gruntfile","gulpfile","gitfile","tasks","gitmessage","templates","templateDirUrl","runScript","templateName","showNewTemplate","useTemplate","showEditTemplate","setProjectByName","row","includes","initProjects","setProjectByDirectory","dir","child","parent","String","parentTokens","split","childTokens","every","t","isChildOf","runEditor","file","fread","err","execute","env","EDITOR","out","trim","item","match","command","jpack","JSON","parse","scripts","SaveCurrentProject","fwrite","console","log","FinishNewProject","saveString","narr","join","template","find","getCurrentDirectory","fun","pth","PWD","runTask","tsk","saveAppData","stringify","appData","nodata","line","arr","reposition","dirName","task","stdin","title","icon","App","body"],"mappings":"yBAAA,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,EA4BhF,SAASE,EAAYC,EAAYC,EAAKC,EAASf,GAC3C,GAAIa,EAAY,CACZ,MAAMG,EAAWC,EAAiBJ,EAAYC,EAAKC,EAASf,GAC5D,OAAOa,EAAW,GAAGG,IAG7B,SAASC,EAAiBJ,EAAYC,EAAKC,EAASf,GAChD,OAAOa,EAAW,IAAMb,EA9D5B,SAAgBkB,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,EA2DDG,CAAON,EAAQD,IAAIQ,QAAST,EAAW,GAAGb,EAAGc,KAC7CC,EAAQD,IAoBlB,SAASS,EAAYC,EAAMC,EAAiBX,EAAKC,EAASW,EAAOC,EAAqBC,GAClF,MAAMC,EAnBV,SAA0BhB,EAAYE,EAASW,EAAO1B,GAClD,GAAIa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,eAAAA,EACTtE,MAAAA,EACIuE,UAAAA,IAEboD,KAcAN,EAAqBpC,QACfiD,EAAUjD,EAAIK,MAAM,UACxBd,EAAe0D,EAAQA,EAAQxO,OAAO,SACtC4K,EAAiBW,QACjBjF,GAAQ,QACRyE,GAAkB,sBAMtBE,GAAmB,QACnBD,EAAc,aACdF,EAAe,SACfF,EAAiB,SACjBC,EAAY,sBACZvE,GAAQ,mBAIJmH,EAAW9C,EAAU+C,KAAKhB,GAAQA,EAAKtL,KAAKgK,SAASJ,SACzDF,EAAe2C,EAASrM,WACxBwJ,EAAiB6C,EAAS7C,qBAC1BtE,EAAQmH,EAASnH,YACjBuE,EAAY4C,EAAS5C,4BAIrBF,EAAYA,EAAU3D,IAAI0F,IACrBA,EAAKtL,KAAKgK,SAASJ,KACpB0B,EAAKtL,KAAO0J,EACZ4B,EAAK9B,eAAiBA,EACtB8B,EAAKpG,MAAQA,EACboG,EAAK7B,UAAYA,GAEZ6B,KAETuB,OAakG/J,IAAQgH,EAAiBhH,EAAEH,aAanGgK,EAAQU,eAiFL/D,iCA8CbM,sCASWF,iCAIAF,iCAIuCtE,mCAIvCuE,gCAG8BI,GAAmB,eAyCjDH,iCAIAF,iCAIuCtE,mCAIvCuE,gCAG8BE,GAAkB,eAKhDjB,gCAGXkB,oCAMKhB,GAAa,GAAOC,uFCtvB7CJ,IAAIvC,KAAO,CAACoH,EAAO5M,KAIjB+H,IAAI8E,MAAQ,kBACZ9E,IAAI+E,KAAO,SAAS/E,IAAIyC,IAAIwB,IAKhB,IAAIe,GAAI,CAClBvO,OAAQe,SAASyN,KACjBpH,MAAO,CACLmC,IAAKA"} \ No newline at end of file diff --git a/src/App.svx b/src/App.svx index e4774f7..da22d07 100644 --- a/src/App.svx +++ b/src/App.svx @@ -19,9 +19,16 @@ let gulpfile = false; let gitfile = false; let tasks = null; - let appData = {}; let gitmessage = ''; - + let templates = []; + let templateDirUrl = ''; + let local = true; + let runScript = 'setupTemplate'; + let templateName = ''; + let showNewTemplate = false; + let useTemplate = 'none'; + let showEditTemplate = false; + function close() { fig.reposition("7"); } @@ -31,11 +38,20 @@ // Get the project manager application information. // fig.fread('~/.fig/apps/projectmanager/projectmanager.json',(data, err) => { - console.log(err); - console.log(data); - if(!err) { - appData = JSON.parse(data); - expert = appData.expert; + if(err) { + // + // Files doesn't exist. Set the defaults and save the file. + // + expert = false; + templates = []; + saveAppData(); + } else { + // + // Parse the information. + // + var appData = JSON.parse(data); + if(typeof appData.expert !== 'undefined') expert = appData.expert; + if(typeof appData.templates !== 'undefined') templates = appData.templates; } }); @@ -281,6 +297,48 @@ // Create the startup script as a blank executable file. // fig.execute('touch "' + currentProjectDir + '/.startproject"; chmod a+x "' + currentProjectDir + '/.startproject";', (out, err) => {}); + + // + // If using template, then copy it into place. + // + if(!useTemplate.includes('none')) { + var template = templates.find(item => item.name.includes(useTemplate)); + if(template.local) { + // + // It's a local directoy. Copy away. + // + fig.run('echo "Copy template' + useTemplate + '..."; cp -R "' + template.templateDirUrl + '/." .; ' + template.runScript + ';'); + fig.fread(template.templateDirUrl + "/setupTemplate",(data,err) => { + // + // The setup script for the template is there. remove it. + // + if(!err) fig.run("rm setupTemplate;"); + }); + } else { + // + // It's a repository on GitHub. + // + fig.run('echo "Copy GitHub template ' + useTemplate + '..."; npx degit --force ' + template.templateDirUrl + ' "' + currentProjectDir + '"; ' + template.runScript + ';'); + } + } + } + + function removeTemplate() { + templates = templates.filter(item => !item.name.includes(useTemplate)); + useTemplate = 'none'; + templateName = ''; + templateDirUrl = ''; + runScript = 'setupTemplate'; + local = true; + saveAppData(); + } + + function newBlankTemplate() { + useTemplate = 'none'; + templateName = 'New Template'; + templateDirUrl = ''; + runScript = 'setupTemplate'; + local = true; } function saveProjects() { @@ -357,8 +415,13 @@ } function toggleExpertSave() { - fig.fwrite('~/.fig/apps/projectmanager/projectmanager.json', JSON.stringify({ expert: !expert}), (err) => {}); expert = !expert; + saveAppData(); + } + + function saveAppData() { + fig.fwrite('~/.fig/apps/projectmanager/projectmanager.json', + JSON.stringify({ expert: expert, templates: templates}), (err) => {}); } function gitStatus() { @@ -369,6 +432,87 @@ fig.run("pushd .; cd '" + currentProjectDir + "'; git commit -am '" + gitmessage + "'; git push; popd;"); gitmessage = ''; } + + function addTemplate() { + // + // The templates structure is: + // + // templates = { + // templateName, + // templateDirUrl, + // local, + // runScript + // } + // + // where templateDirUrl is the path to a local directory or a URL of a GitHub account + // to copy for the template, local is true if the template is local or false if it is + // on the web, and runScript contains the commands to run in the freshly copied directory + // to initialize the project or do what ever is needed to get the template ready for use. + // + if((typeof templateDirUrl !== 'undefined') && + (typeof templateDirUrl === 'string') && + (templateDirUrl !== '') && + (typeof local === 'boolean') && + (typeof runScript === 'string')) { + templates.push({ + name: templateName, + templateDirUrl: templateDirUrl, + local: local, + runScript: runScript + }); + saveAppData(); + } + } + + function setDirAsTemplate() { + if(showNewTemplate) { + // + // Inside of the create template dialog. Create it. + // + addTemplate(); + } else { + // + // Turn on the template dialog so the user can fill it in. + // + getCurrentDirectory((dir) => { + var dirName = dir.split('\/'); + templateName = dirName[dirName.length-1]; + templateDirUrl = dir; + local = true; + showNewTemplate = true; + }); + } + } + + function editTemplates() { + showEditTemplate = true; + useTemplate = 'none'; + templateName = ''; + templateDirUrl = ''; + runScript = 'setupTemplate'; + local = true; + } + + function setTemplateToEdit() { + var template = templates.find(item => item.name.includes(useTemplate)); + templateName = template.name; + templateDirUrl = template.templateDirUrl; + local = template.local; + runScript = template.runScript; + } + + function saveTemplate() { + templates = templates.map(item => { + if(item.name.includes(useTemplate)) { + item.name = templateName; + item.templateDirUrl = templateDirUrl; + item.local = local; + item.runScript = runScript; + } + return item; + }); + saveAppData(); + }
@@ -376,7 +520,7 @@
-{#if !showDialog} +{#if !showDialog && !showNewTemplate && !showEditTemplate} {#if !expert} Welcome to the Project Manager for Fig. Here, you can go to your projects, run scripts, and much more. @@ -399,9 +543,9 @@ This will take the current terminal session to the project directory in the drop #### Scripts -The following buttons will launch scripts that are in `npm`, `maid`, or `mask`. You don't have to be in the +The following buttons will launch scripts that are in `npm`, `gulp`, `grunt`, `maid`, or `mask` files. You don't have to be in the root directory of the project to run them. Project Manager will save your current directory, run the -script, and return to your directory. +script in the root directory of the project, and return to your directory. {/if} @@ -415,7 +559,9 @@ script, and return to your directory. #### Edit the Project -This will open the project in the editor defined in the `$EDITOR` environment variable. +This will open the project in the editor defined in the `$EDITOR` environment variable or the +editor listed in the `~/.myeditorchoice` file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with [BitBar](http://getbitbar.org), +[TextBar](http://richsomerfield.com/apps/textbar/), and ScriptBar (my own version that isn't available yet). @@ -478,6 +624,19 @@ is a subdirectory in a currently defined project, it will set that project as th Otherwise, it will ask for a new project name, create a blank project start script, and save the current directory with that project name. +You can also set a template to be used to create this project. If a local template have the script `setupTemplate` in the template directory, it will be removed +after the script in the variable `Script` is ran. The script variable is automatically set to +`setupTemplate` for convience when creating templates. + + + + + +#### Set the Current Directory as a Template + +This will set the current directory as a template. It will show the template maker dialog +for adding the different fields that make up a template specification. + @@ -492,7 +651,9 @@ This will run the current project's start script. This script is in the top of t #### Edit the Project Script -This will open the project start script in the editor defined in the `$EDITOR` environment variable. +This will open the project start script in the editor defined in the `$EDITOR` environment variable or the +editor listed in the `~/.myeditorchoice` file, which is used by the My Editor workflow for Alfred or the CurrentFiles script used with [BitBar](http://getbitbar.org), +[TextBar](http://richsomerfield.com/apps/textbar/), and ScriptBar (my own version that isn't available yet). @@ -525,6 +686,15 @@ it will push to GitHub. You don't have to be in the root directory of the projec {/if} + + +#### Edit Template + +This button will show the edit template dialog for edit the different templates, remove a +template, or create a new blank template. + + + #### Leave the Project Manager @@ -532,11 +702,118 @@ it will push to GitHub. You don't have to be in the root directory of the projec Leave the Project Manager application for Fig. +{:else if showEditTemplate} + +### Edit Template + +{#if !expert} + +Here you can edit the different templates, remove a template, or create a new blank template. +Each template has the following data structure: + +| Field | Description | +| --- | ------ | +| Name | Your name for the template. It will use the templates directory name for starters. | +| Path | The path, whether a local directory or a GitHub url, to use as a template.| +| Local | If checked, is a local directory. Otherwise, it is a GitHub url. | +| Script | The script to run in the new directory after the template is copied. | + +{/if} + +#### Select Template: + + + +#### Template Items: + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + + + +
+ +{:else if showNewTemplate} + +### Setup Current Directory as a Template + +{#if !expert} + +This will create a new template item in the structure for templates. The user +can then use the information to create a new project from the template. It is a +fairly flexable system in which you can designate a script or command line to +execute after the template is copied. + +| Field | Description | +| --- | ------ | +| Name | Your name for the template. It will use the templates directory name for starters. | +| Path | The path, whether a local directory or a GitHub url, to use as a template.| +| Local | If checked, is a local directory. Otherwise, it is a GitHub url. | +| Script | The script to run in the new directory after the template is copied. | + +{/if} + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
{:else} ### Give a name for the Project: + + +### Use Template + +If you want to install a template, change from 'none' to the template you want to use. + + + {/if}