Ron Au commited on
Commit
339a63f
1 Parent(s): 67158c5

fix: Remove placeholders

Browse files
source/ui/src/lib/Notes.svelte CHANGED
@@ -56,26 +56,15 @@ const handleKeydown = (e: KeyboardEvent): void => {
56
  on:touchmove|preventDefault={touchMove}
57
  style:width={Math.min(imageWidth, sectionWidth) + 'px'}
58
  >
59
- <!-- <div class="container" bind:this={container} on:mousemove={handleMove} on:touchmove|preventDefault={handleMove}> -->
60
- <!-- <img
61
- class="visualisation"
62
- src={$notesImage}
63
- alt="MIDI notes of composition"
64
- draggable="false"
65
- bind:this={visualisation}
66
- on:click={() => (paused = !paused)}
67
- /> -->
68
  <img
69
  class="visualisation"
70
- src="compose.png"
71
  alt="MIDI notes of composition"
72
  draggable="false"
73
  bind:this={visualisation}
74
  on:click={() => (paused = !paused)}
75
- style:width="calc({sectionWidth}px - 4rem)"
76
  />
77
- <!-- <audio bind:currentTime bind:duration bind:paused src={$audioBlob} /> -->
78
- <audio bind:currentTime bind:duration bind:paused src="synth.wav" />
79
  <div class="handle" style:transform="translateX({imageWidth * (currentTime / duration)}px)" />
80
  {#if paused}
81
  <img
 
56
  on:touchmove|preventDefault={touchMove}
57
  style:width={Math.min(imageWidth, sectionWidth) + 'px'}
58
  >
 
 
 
 
 
 
 
 
 
59
  <img
60
  class="visualisation"
61
+ src={$notesImage}
62
  alt="MIDI notes of composition"
63
  draggable="false"
64
  bind:this={visualisation}
65
  on:click={() => (paused = !paused)}
 
66
  />
67
+ <audio bind:currentTime bind:duration bind:paused src={$audioBlob} />
 
68
  <div class="handle" style:transform="translateX({imageWidth * (currentTime / duration)}px)" />
69
  {#if paused}
70
  <img
static/_app/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  ".svelte-kit/runtime/client/start.js": {
3
- "file": "start-d715fd74.js",
4
  "src": ".svelte-kit/runtime/client/start.js",
5
  "isEntry": true,
6
  "imports": [
@@ -32,7 +32,7 @@
32
  ]
33
  },
34
  "src/routes/index.svelte": {
35
- "file": "pages/index.svelte-a12665f4.js",
36
  "src": "src/routes/index.svelte",
37
  "isEntry": true,
38
  "isDynamicEntry": true,
 
1
  {
2
  ".svelte-kit/runtime/client/start.js": {
3
+ "file": "start-b4f523d8.js",
4
  "src": ".svelte-kit/runtime/client/start.js",
5
  "isEntry": true,
6
  "imports": [
 
32
  ]
33
  },
34
  "src/routes/index.svelte": {
35
+ "file": "pages/index.svelte-416adc10.js",
36
  "src": "src/routes/index.svelte",
37
  "isEntry": true,
38
  "isDynamicEntry": true,
static/_app/pages/index.svelte-416adc10.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import{S as J,i as K,s as Q,e as g,k as T,c as v,a as y,d as p,m as I,K as se,b as _,g as M,J as f,L as B,t as O,h as z,j as Ie,E as Y,M as Ge,N as L,O as de,P as Ue,w as W,x as X,y as F,Q as We,q as S,o as A,B as q,R as oe,T as qe,U as ce,f as fe,V as Ye,W as Je,X as ae,n as Ne,p as Ce,Y as Xe,l as _e,Z as Ke}from"../chunks/index-c61749f5.js";import{w as le}from"../chunks/index-f9918abc.js";const ye=le("synth"),ke=le("medium"),we=le("medium"),be=le(!1),Ee=le(""),$e=le(""),Te=le(""),he={piano:"Piano",chamber:"Chamber Music",rock_and_metal:"Rock and Metal",synth:"Synthesizer",church:"Church",timpani_strings_harp:"Timpani, Contrabass, Harp",country:"Country"},Qe={low:"Low",medium:"Medium",high:"High"},Ze={low:"Low",medium:"Medium",high:"High",very_high:"Very High"};function Be(r,e,t){const s=r.slice();return s[4]=e[t],s[6]=t,s}function Le(r){let e,t,s,c,l,n,a,o,d,u,i,m;return{c(){e=g("label"),t=g("div"),s=g("img"),n=T(),a=g("input"),d=T(),this.h()},l(h){e=v(h,"LABEL",{"data-selected":!0,class:!0});var k=y(e);t=v(k,"DIV",{class:!0});var P=y(t);s=v(P,"IMG",{src:!0,alt:!0,class:!0}),P.forEach(p),n=I(k),a=v(k,"INPUT",{type:!0,class:!0}),d=I(k),k.forEach(p),this.h()},h(){se(s.src,c=`${r[4]}.svg`)||_(s,"src",c),_(s,"alt",l=he[r[4]]),_(s,"class","svelte-1r9pswz"),_(t,"class","svelte-1r9pswz"),_(a,"type","radio"),a.__value=o=r[4],a.value=a.__value,_(a,"class","svelte-1r9pswz"),r[3][0].push(a),_(e,"data-selected",u=r[0]===r[4]),_(e,"class","svelte-1r9pswz")},m(h,k){M(h,e,k),f(e,t),f(t,s),f(e,n),f(e,a),a.checked=a.__value===r[0],f(e,d),i||(m=B(a,"change",r[2]),i=!0)},p(h,k){k&1&&(a.checked=a.__value===h[0]),k&1&&u!==(u=h[0]===h[4])&&_(e,"data-selected",u)},d(h){h&&p(e),r[3][0].splice(r[3][0].indexOf(a),1),i=!1,m()}}}function xe(r){let e,t,s=(he[r[0]]||"Synthesizer")+"",c,l,n,a=r[1],o=[];for(let d=0;d<a.length;d+=1)o[d]=Le(Be(r,a,d));return{c(){e=g("fieldset"),t=g("legend"),c=O(s),l=T(),n=g("div");for(let d=0;d<o.length;d+=1)o[d].c();this.h()},l(d){e=v(d,"FIELDSET",{class:!0});var u=y(e);t=v(u,"LEGEND",{class:!0});var i=y(t);c=z(i,s),i.forEach(p),l=I(u),n=v(u,"DIV",{class:!0});var m=y(n);for(let h=0;h<o.length;h+=1)o[h].l(m);m.forEach(p),u.forEach(p),this.h()},h(){_(t,"class","svelte-1r9pswz"),_(n,"class","grid svelte-1r9pswz"),_(e,"class","svelte-1r9pswz")},m(d,u){M(d,e,u),f(e,t),f(t,c),f(e,l),f(e,n);for(let i=0;i<o.length;i+=1)o[i].m(n,null)},p(d,[u]){if(u&1&&s!==(s=(he[d[0]]||"Synthesizer")+"")&&Ie(c,s),u&3){a=d[1];let i;for(i=0;i<a.length;i+=1){const m=Be(d,a,i);o[i]?o[i].p(m,u):(o[i]=Le(m),o[i].c(),o[i].m(n,null))}for(;i<o.length;i+=1)o[i].d(1);o.length=a.length}},i:Y,o:Y,d(d){d&&p(e),Ge(o,d)}}}function et(r,e,t){let s;L(r,ye,a=>t(0,s=a));const c=Object.keys(he),l=[[]];function n(){s=this.__value,ye.set(s)}return[s,c,n,l]}class tt extends J{constructor(e){super(),K(this,e,et,xe,Q,{})}}function je(r,e,t){const s=r.slice();return s[5]=e[t],s}function Pe(r){let e,t=r[1][r[5]]+"",s,c,l,n,a,o,d;return{c(){e=g("label"),s=O(t),c=T(),l=g("input"),this.h()},l(u){e=v(u,"LABEL",{"data-selected":!0,class:!0});var i=y(e);s=z(i,t),c=I(i),l=v(i,"INPUT",{type:!0,class:!0}),i.forEach(p),this.h()},h(){_(l,"type","radio"),l.__value=n=r[5],l.value=l.__value,_(l,"class","svelte-1m848u0"),r[4][0].push(l),_(e,"data-selected",a=r[5]===r[0]),_(e,"class","svelte-1m848u0")},m(u,i){M(u,e,i),f(e,s),f(e,c),f(e,l),l.checked=l.__value===r[0],o||(d=B(l,"change",r[3]),o=!0)},p(u,i){i&2&&t!==(t=u[1][u[5]]+"")&&Ie(s,t),i&1&&(l.checked=l.__value===u[0]),i&1&&a!==(a=u[5]===u[0])&&_(e,"data-selected",a)},d(u){u&&p(e),r[4][0].splice(r[4][0].indexOf(l),1),o=!1,d()}}}function st(r){let e,t,s,c=r[2],l=[];for(let n=0;n<c.length;n+=1)l[n]=Pe(je(r,c,n));return{c(){e=g("div");for(let n=0;n<l.length;n+=1)l[n].c();t=T(),s=g("input"),this.h()},l(n){e=v(n,"DIV",{class:!0});var a=y(e);for(let o=0;o<l.length;o+=1)l[o].l(a);t=I(a),s=v(a,"INPUT",{type:!0,class:!0}),a.forEach(p),this.h()},h(){_(s,"type","radio"),s.checked=!0,_(s,"class","svelte-1m848u0"),_(e,"class","options svelte-1m848u0")},m(n,a){M(n,e,a);for(let o=0;o<l.length;o+=1)l[o].m(e,null);f(e,t),f(e,s)},p(n,[a]){if(a&7){c=n[2];let o;for(o=0;o<c.length;o+=1){const d=je(n,c,o);l[o]?l[o].p(d,a):(l[o]=Pe(d),l[o].c(),l[o].m(e,t))}for(;o<l.length;o+=1)l[o].d(1);l.length=c.length}},i:Y,o:Y,d(n){n&&p(e),Ge(l,n)}}}function lt(r,e,t){let{options:s}=e;const c=Object.keys(s);let{selection:l=c[1]}=e;const n=[[]];function a(){l=this.__value,t(0,l)}return r.$$set=o=>{"options"in o&&t(1,s=o.options),"selection"in o&&t(0,l=o.selection)},[l,s,c,a,n]}class Fe extends J{constructor(e){super(),K(this,e,lt,st,Q,{options:1,selection:0})}}function nt(r){let e,t,s,c,l,n,a,o;function d(i){r[1](i)}let u={options:Qe};return r[0]!==void 0&&(u.selection=r[0]),n=new Fe({props:u}),de.push(()=>Ue(n,"selection",d)),{c(){e=g("div"),t=g("fieldset"),s=g("legend"),c=O("Note density"),l=T(),W(n.$$.fragment),this.h()},l(i){e=v(i,"DIV",{});var m=y(e);t=v(m,"FIELDSET",{class:!0});var h=y(t);s=v(h,"LEGEND",{class:!0});var k=y(s);c=z(k,"Note density"),k.forEach(p),l=I(h),X(n.$$.fragment,h),h.forEach(p),m.forEach(p),this.h()},h(){_(s,"class","svelte-1ikh8be"),_(t,"class","svelte-1ikh8be")},m(i,m){M(i,e,m),f(e,t),f(t,s),f(s,c),f(t,l),F(n,t,null),o=!0},p(i,[m]){const h={};!a&&m&1&&(a=!0,h.selection=i[0],We(()=>a=!1)),n.$set(h)},i(i){o||(S(n.$$.fragment,i),o=!0)},o(i){A(n.$$.fragment,i),o=!1},d(i){i&&p(e),q(n)}}}function rt(r,e,t){let s;L(r,ke,l=>t(0,s=l));function c(l){s=l,ke.set(s)}return[s,c]}class at extends J{constructor(e){super(),K(this,e,rt,nt,Q,{})}}function it(r){let e,t,s,c,l,n,a,o;function d(i){r[1](i)}let u={options:Ze};return r[0]!==void 0&&(u.selection=r[0]),n=new Fe({props:u}),de.push(()=>Ue(n,"selection",d)),{c(){e=g("div"),t=g("fieldset"),s=g("legend"),c=O("Temperature"),l=T(),W(n.$$.fragment),this.h()},l(i){e=v(i,"DIV",{});var m=y(e);t=v(m,"FIELDSET",{class:!0});var h=y(t);s=v(h,"LEGEND",{class:!0});var k=y(s);c=z(k,"Temperature"),k.forEach(p),l=I(h),X(n.$$.fragment,h),h.forEach(p),m.forEach(p),this.h()},h(){_(s,"class","svelte-1ikh8be"),_(t,"class","svelte-1ikh8be")},m(i,m){M(i,e,m),f(e,t),f(t,s),f(s,c),f(t,l),F(n,t,null),o=!0},p(i,[m]){const h={};!a&&m&1&&(a=!0,h.selection=i[0],We(()=>a=!1)),n.$set(h)},i(i){o||(S(n.$$.fragment,i),o=!0)},o(i){A(n.$$.fragment,i),o=!1},d(i){i&&p(e),q(n)}}}function ot(r,e,t){let s;L(r,we,l=>t(0,s=l));function c(l){s=l,we.set(s)}return[s,c]}class ct extends J{constructor(e){super(),K(this,e,ot,it,Q,{})}}function ut(r){let e,t,s;return{c(){e=O("Compose "),t=g("img"),this.h()},l(c){e=z(c,"Compose "),t=v(c,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){se(t.src,s="wand.svg")||_(t,"src",s),_(t,"alt","Magic wand"),_(t,"class","svelte-18w38ow")},m(c,l){M(c,e,l),M(c,t,l)},d(c){c&&p(e),c&&p(t)}}}function ft(r){let e;return{c(){e=O("Composing...")},l(t){e=z(t,"Composing...")},m(t,s){M(t,e,s)},d(t){t&&p(e)}}}function dt(r){let e,t,s;function c(a,o){return a[0]?ft:ut}let l=c(r),n=l(r);return{c(){e=g("button"),n.c(),this.h()},l(a){e=v(a,"BUTTON",{class:!0});var o=y(e);n.l(o),o.forEach(p),this.h()},h(){e.disabled=r[0],_(e,"class","svelte-18w38ow")},m(a,o){M(a,e,o),n.m(e,null),t||(s=B(e,"click",r[1]),t=!0)},p(a,[o]){l!==(l=c(a))&&(n.d(1),n=l(a),n&&(n.c(),n.m(e,null))),o&1&&(e.disabled=a[0])},i:Y,o:Y,d(a){a&&p(e),n.d(),t=!1,s()}}}function _t(r,e,t){let s,c,l,n,a,o,d;return L(r,be,i=>t(0,s=i)),L(r,Ee,i=>t(2,c=i)),L(r,Te,i=>t(3,l=i)),L(r,$e,i=>t(4,n=i)),L(r,we,i=>t(5,a=i)),L(r,ke,i=>t(6,o=i)),L(r,ye,i=>t(7,d=i)),[s,async()=>{try{oe(be,s=!0,s);const i=await fetch("compose",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({music_style:d,density:o,temperature:a})});if(!i.ok)throw new Error(`Unable to create composition: [${i.status}] ${i.text()}`);const{audio:m,image:h,tokens:k}=await i.json();oe($e,n=h,n),oe(Te,l=k,l),oe(Ee,c=m,c)}catch(i){console.error(i)}finally{oe(be,s=!1,s)}}]}class ht extends J{constructor(e){super(),K(this,e,_t,dt,Q,{})}}function ie(r,{delay:e=0,duration:t=400,easing:s=qe}={}){const c=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:s,css:l=>`opacity: ${l*c}`}}function Re(r){let e,t,s,c,l,n,a,o=!1,d,u=!0,i,m,h=`translateX(${r[7]*(r[0]/r[1])}px)`,k,P,C,j,H,U;function R(){cancelAnimationFrame(d),n.paused||(d=Ke(R),o=!0),r[15].call(n)}let $=r[2]&&Ve(r);return{c(){e=g("section"),t=g("div"),s=g("img"),l=T(),n=g("audio"),i=T(),m=g("div"),k=T(),$&&$.c(),this.h()},l(w){e=v(w,"SECTION",{class:!0});var E=y(e);t=v(E,"DIV",{class:!0});var b=y(t);s=v(b,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),l=I(b),n=v(b,"AUDIO",{src:!0,class:!0}),y(n).forEach(p),i=I(b),m=v(b,"DIV",{class:!0}),y(m).forEach(p),k=I(b),$&&$.l(b),b.forEach(p),E.forEach(p),this.h()},h(){_(s,"class","visualisation svelte-sa1t0p"),se(s.src,c=r[8])||_(s,"src",c),_(s,"alt","MIDI notes of composition"),_(s,"draggable","false"),se(n.src,a=r[4])||_(n,"src",a),_(n,"class","svelte-sa1t0p"),r[1]===void 0&&ce(()=>r[16].call(n)),_(m,"class","handle svelte-sa1t0p"),fe(m,"transform",h,!1),_(t,"class","container svelte-sa1t0p"),fe(t,"width",Math.min(r[7],r[6])+"px",!1),_(e,"class","svelte-sa1t0p"),ce(()=>r[20].call(e))},m(w,E){M(w,e,E),f(e,t),f(t,s),r[13](s),f(t,l),f(t,n),f(t,i),f(t,m),f(t,k),$&&$.m(t,null),r[19](t),P=Ye(e,r[20].bind(e)),j=!0,H||(U=[B(s,"click",r[14]),B(n,"timeupdate",R),B(n,"durationchange",r[16]),B(n,"play",r[17]),B(n,"pause",r[17]),B(t,"mousemove",r[9]),B(t,"touchmove",Je(r[10]))],H=!0)},p(w,E){(!j||E&256&&!se(s.src,c=w[8]))&&_(s,"src",c),(!j||E&16&&!se(n.src,a=w[4]))&&_(n,"src",a),!o&&E&1&&!isNaN(w[0])&&(n.currentTime=w[0]),o=!1,E&4&&u!==(u=w[2])&&n[u?"pause":"play"](),E&131&&h!==(h=`translateX(${w[7]*(w[0]/w[1])}px)`)&&fe(m,"transform",h,!1),w[2]?$?($.p(w,E),E&4&&S($,1)):($=Ve(w),$.c(),S($,1),$.m(t,null)):$&&(Ne(),A($,1,1,()=>{$=null}),Ce()),E&192&&fe(t,"width",Math.min(w[7],w[6])+"px",!1)},i(w){j||(S($),ce(()=>{C||(C=ae(e,ie,{},!0)),C.run(1)}),j=!0)},o(w){A($),C||(C=ae(e,ie,{},!1)),C.run(0),j=!1},d(w){w&&p(e),r[13](null),$&&$.d(),r[19](null),P(),w&&C&&C.end(),H=!1,Xe(U)}}}function Ve(r){let e,t,s,c,l,n;return{c(){e=g("img"),this.h()},l(a){e=v(a,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),this.h()},h(){_(e,"class","play svelte-sa1t0p"),se(e.src,t="play.svg")||_(e,"src",t),_(e,"alt","Play button"),_(e,"draggable","false")},m(a,o){M(a,e,o),c=!0,l||(n=B(e,"click",r[18]),l=!0)},p:Y,i(a){c||(ce(()=>{s||(s=ae(e,ie,{},!0)),s.run(1)}),c=!0)},o(a){s||(s=ae(e,ie,{},!1)),s.run(0),c=!1},d(a){a&&p(e),a&&s&&s.end(),l=!1,n()}}}function pt(r){let e,t,s,c,l=r[4]&&Re(r);return{c(){l&&l.c(),e=_e()},l(n){l&&l.l(n),e=_e()},m(n,a){l&&l.m(n,a),M(n,e,a),t=!0,s||(c=[B(window,"keydown",r[11]),B(window,"resize",r[12])],s=!0)},p(n,[a]){n[4]?l?(l.p(n,a),a&16&&S(l,1)):(l=Re(n),l.c(),S(l,1),l.m(e.parentNode,e)):l&&(Ne(),A(l,1,1,()=>{l=null}),Ce())},i(n){t||(S(l),t=!0)},o(n){A(l),t=!1},d(n){l&&l.d(n),n&&p(e),s=!1,Xe(c)}}}function mt(r,e,t){let s,c,l;L(r,Ee,b=>t(4,c=b)),L(r,$e,b=>t(8,l=b));let n,a,o=!0,d,u,i;const m=b=>{if(!a||!b.buttons)return;const{left:G,right:V}=d.getBoundingClientRect();t(0,n=a*(b.clientX-G)/(V-G))},h=b=>{if(!a)return;const{left:G,right:V}=d.getBoundingClientRect();t(0,n=a*(b.touches[0].clientX-G)/(V-G))},k=b=>{b.code==="Space"&&t(2,o=!o)},P=()=>t(7,s=u&&u.clientWidth);function C(b){de[b?"unshift":"push"](()=>{u=b,t(3,u)})}const j=()=>t(2,o=!o);function H(){n=this.currentTime,t(0,n)}function U(){a=this.duration,t(1,a)}function R(){o=this.paused,t(2,o)}const $=()=>t(2,o=!o);function w(b){de[b?"unshift":"push"](()=>{d=b,t(5,d)})}function E(){i=this.clientWidth,t(6,i)}return r.$$.update=()=>{r.$$.dirty&8&&t(7,s=u&&u.clientWidth),r.$$.dirty&31&&(c||n||a||!o)&&t(7,s=u&&u.clientWidth)},[n,a,o,u,c,d,i,s,l,m,h,k,P,C,j,H,U,R,$,w,E]}class gt extends J{constructor(e){super(),K(this,e,mt,pt,Q,{})}}function He(r){let e,t,s,c,l,n,a,o;return{c(){e=g("section"),t=g("h2"),s=O("Tokenized notes"),c=T(),l=g("p"),n=O(r[0]),this.h()},l(d){e=v(d,"SECTION",{class:!0});var u=y(e);t=v(u,"H2",{});var i=y(t);s=z(i,"Tokenized notes"),i.forEach(p),c=I(u),l=v(u,"P",{class:!0});var m=y(l);n=z(m,r[0]),m.forEach(p),u.forEach(p),this.h()},h(){_(l,"class","svelte-4un5mw"),_(e,"class","svelte-4un5mw")},m(d,u){M(d,e,u),f(e,t),f(t,s),f(e,c),f(e,l),f(l,n),o=!0},p(d,u){(!o||u&1)&&Ie(n,d[0])},i(d){o||(ce(()=>{a||(a=ae(e,ie,{},!0)),a.run(1)}),o=!0)},o(d){a||(a=ae(e,ie,{},!1)),a.run(0),o=!1},d(d){d&&p(e),d&&a&&a.end()}}}function vt(r){let e,t,s=r[0]&&He(r);return{c(){s&&s.c(),e=_e()},l(c){s&&s.l(c),e=_e()},m(c,l){s&&s.m(c,l),M(c,e,l),t=!0},p(c,[l]){c[0]?s?(s.p(c,l),l&1&&S(s,1)):(s=He(c),s.c(),S(s,1),s.m(e.parentNode,e)):s&&(Ne(),A(s,1,1,()=>{s=null}),Ce())},i(c){t||(S(s),t=!0)},o(c){A(s),t=!1},d(c){s&&s.d(c),c&&p(e)}}}function bt(r,e,t){let s;return L(r,Te,c=>t(0,s=c)),[s]}class yt extends J{constructor(e){super(),K(this,e,bt,vt,Q,{})}}function kt(r){let e,t,s,c,l,n,a,o,d,u,i,m,h,k,P,C,j,H,U,R,$,w,E,b,G,V,pe,Z,me,x,ge,ee,ve,te,ue;return b=new tt({}),V=new at({}),Z=new ct({}),x=new ht({}),ee=new gt({}),te=new yt({}),{c(){e=g("main"),t=g("h1"),s=O("Composer"),c=T(),l=g("p"),n=O("A hundred thousand songs used to train. One AI model. Infinite compositions."),a=T(),o=g("p"),d=O(`This space contains a deep neural network model that can compose music. You can use it to generate music in
2
+ different styles, 4 bars at a time.`),u=T(),i=g("p"),m=O("Developed by "),h=g("a"),k=O("Ron Au"),P=O(` and
3
+ `),C=g("a"),j=O("Tristan Behrens"),H=O("."),U=T(),R=g("p"),$=O("Have fun! And always feel free to send us some feedback and share your compositions!"),w=T(),E=g("section"),W(b.$$.fragment),G=T(),W(V.$$.fragment),pe=T(),W(Z.$$.fragment),me=T(),W(x.$$.fragment),ge=T(),W(ee.$$.fragment),ve=T(),W(te.$$.fragment),this.h()},l(D){e=v(D,"MAIN",{class:!0});var N=y(e);t=v(N,"H1",{class:!0});var De=y(t);s=z(De,"Composer"),De.forEach(p),c=I(N),l=v(N,"P",{class:!0});var Oe=y(l);n=z(Oe,"A hundred thousand songs used to train. One AI model. Infinite compositions."),Oe.forEach(p),a=I(N),o=v(N,"P",{class:!0});var ze=y(o);d=z(ze,`This space contains a deep neural network model that can compose music. You can use it to generate music in
4
+ different styles, 4 bars at a time.`),ze.forEach(p),u=I(N),i=v(N,"P",{class:!0});var ne=y(i);m=z(ne,"Developed by "),h=v(ne,"A",{href:!0,rel:!0,target:!0});var Se=y(h);k=z(Se,"Ron Au"),Se.forEach(p),P=z(ne,` and
5
+ `),C=v(ne,"A",{href:!0,rel:!0,target:!0});var Me=y(C);j=z(Me,"Tristan Behrens"),Me.forEach(p),H=z(ne,"."),ne.forEach(p),U=I(N),R=v(N,"P",{class:!0});var Ae=y(R);$=z(Ae,"Have fun! And always feel free to send us some feedback and share your compositions!"),Ae.forEach(p),w=I(N),E=v(N,"SECTION",{id:!0,class:!0});var re=y(E);X(b.$$.fragment,re),G=I(re),X(V.$$.fragment,re),pe=I(re),X(Z.$$.fragment,re),re.forEach(p),me=I(N),X(x.$$.fragment,N),ge=I(N),X(ee.$$.fragment,N),ve=I(N),X(te.$$.fragment,N),N.forEach(p),this.h()},h(){_(t,"class","svelte-1rfjlkw"),_(l,"class","heading svelte-1rfjlkw"),_(o,"class","svelte-1rfjlkw"),_(h,"href","https://twitter.com/ronvoluted"),_(h,"rel","noopener"),_(h,"target","_blank"),_(C,"href","https://twitter.com/DrTBehrens"),_(C,"rel","noopener"),_(C,"target","_blank"),_(i,"class","svelte-1rfjlkw"),_(R,"class","svelte-1rfjlkw"),_(E,"id","options"),_(E,"class","svelte-1rfjlkw"),_(e,"class","svelte-1rfjlkw")},m(D,N){M(D,e,N),f(e,t),f(t,s),f(e,c),f(e,l),f(l,n),f(e,a),f(e,o),f(o,d),f(e,u),f(e,i),f(i,m),f(i,h),f(h,k),f(i,P),f(i,C),f(C,j),f(i,H),f(e,U),f(e,R),f(R,$),f(e,w),f(e,E),F(b,E,null),f(E,G),F(V,E,null),f(E,pe),F(Z,E,null),f(e,me),F(x,e,null),f(e,ge),F(ee,e,null),f(e,ve),F(te,e,null),ue=!0},p:Y,i(D){ue||(S(b.$$.fragment,D),S(V.$$.fragment,D),S(Z.$$.fragment,D),S(x.$$.fragment,D),S(ee.$$.fragment,D),S(te.$$.fragment,D),ue=!0)},o(D){A(b.$$.fragment,D),A(V.$$.fragment,D),A(Z.$$.fragment,D),A(x.$$.fragment,D),A(ee.$$.fragment,D),A(te.$$.fragment,D),ue=!1},d(D){D&&p(e),q(b),q(V),q(Z),q(x),q(ee),q(te)}}}class $t extends J{constructor(e){super(),K(this,e,null,kt,Q,{})}}export{$t as default};
static/_app/pages/index.svelte-a12665f4.js DELETED
@@ -1,5 +0,0 @@
1
- import{S as Y,i as J,s as K,e as v,k as E,c as y,a as b,d as m,m as T,K as ue,b as d,g as S,J as f,L,t as C,h as D,j as Te,E as q,M as Ge,N as P,O as de,P as Ue,w as U,x as W,y as X,Q as We,q as O,o as A,B as F,R as oe,T as qe,f as re,U as ce,V as Ye,W as Je,X as ae,n as Ie,p as Ne,Y as Xe,l as _e,Z as Ke}from"../chunks/index-c61749f5.js";import{w as se}from"../chunks/index-f9918abc.js";const be=se("synth"),ke=se("medium"),we=se("medium"),ye=se(!1),$e=se(""),Ae=se(""),Ee=se(""),he={piano:"Piano",chamber:"Chamber Music",rock_and_metal:"Rock and Metal",synth:"Synthesizer",church:"Church",timpani_strings_harp:"Timpani, Contrabass, Harp",country:"Country"},Qe={low:"Low",medium:"Medium",high:"High"},Ze={low:"Low",medium:"Medium",high:"High",very_high:"Very High"};function Be(r,e,t){const s=r.slice();return s[4]=e[t],s[6]=t,s}function Le(r){let e,t,s,c,l,a,n,o,u,_,i,g;return{c(){e=v("label"),t=v("div"),s=v("img"),a=E(),n=v("input"),u=E(),this.h()},l(h){e=y(h,"LABEL",{"data-selected":!0,class:!0});var k=b(e);t=y(k,"DIV",{class:!0});var j=b(t);s=y(j,"IMG",{src:!0,alt:!0,class:!0}),j.forEach(m),a=T(k),n=y(k,"INPUT",{type:!0,class:!0}),u=T(k),k.forEach(m),this.h()},h(){ue(s.src,c=`${r[4]}.svg`)||d(s,"src",c),d(s,"alt",l=he[r[4]]),d(s,"class","svelte-1r9pswz"),d(t,"class","svelte-1r9pswz"),d(n,"type","radio"),n.__value=o=r[4],n.value=n.__value,d(n,"class","svelte-1r9pswz"),r[3][0].push(n),d(e,"data-selected",_=r[0]===r[4]),d(e,"class","svelte-1r9pswz")},m(h,k){S(h,e,k),f(e,t),f(t,s),f(e,a),f(e,n),n.checked=n.__value===r[0],f(e,u),i||(g=L(n,"change",r[2]),i=!0)},p(h,k){k&1&&(n.checked=n.__value===h[0]),k&1&&_!==(_=h[0]===h[4])&&d(e,"data-selected",_)},d(h){h&&m(e),r[3][0].splice(r[3][0].indexOf(n),1),i=!1,g()}}}function xe(r){let e,t,s=(he[r[0]]||"Synthesizer")+"",c,l,a,n=r[1],o=[];for(let u=0;u<n.length;u+=1)o[u]=Le(Be(r,n,u));return{c(){e=v("fieldset"),t=v("legend"),c=C(s),l=E(),a=v("div");for(let u=0;u<o.length;u+=1)o[u].c();this.h()},l(u){e=y(u,"FIELDSET",{class:!0});var _=b(e);t=y(_,"LEGEND",{class:!0});var i=b(t);c=D(i,s),i.forEach(m),l=T(_),a=y(_,"DIV",{class:!0});var g=b(a);for(let h=0;h<o.length;h+=1)o[h].l(g);g.forEach(m),_.forEach(m),this.h()},h(){d(t,"class","svelte-1r9pswz"),d(a,"class","grid svelte-1r9pswz"),d(e,"class","svelte-1r9pswz")},m(u,_){S(u,e,_),f(e,t),f(t,c),f(e,l),f(e,a);for(let i=0;i<o.length;i+=1)o[i].m(a,null)},p(u,[_]){if(_&1&&s!==(s=(he[u[0]]||"Synthesizer")+"")&&Te(c,s),_&3){n=u[1];let i;for(i=0;i<n.length;i+=1){const g=Be(u,n,i);o[i]?o[i].p(g,_):(o[i]=Le(g),o[i].c(),o[i].m(a,null))}for(;i<o.length;i+=1)o[i].d(1);o.length=n.length}},i:q,o:q,d(u){u&&m(e),Ge(o,u)}}}function et(r,e,t){let s;P(r,be,n=>t(0,s=n));const c=Object.keys(he),l=[[]];function a(){s=this.__value,be.set(s)}return[s,c,a,l]}class tt extends Y{constructor(e){super(),J(this,e,et,xe,K,{})}}function je(r,e,t){const s=r.slice();return s[5]=e[t],s}function Pe(r){let e,t=r[1][r[5]]+"",s,c,l,a,n,o,u;return{c(){e=v("label"),s=C(t),c=E(),l=v("input"),this.h()},l(_){e=y(_,"LABEL",{"data-selected":!0,class:!0});var i=b(e);s=D(i,t),c=T(i),l=y(i,"INPUT",{type:!0,class:!0}),i.forEach(m),this.h()},h(){d(l,"type","radio"),l.__value=a=r[5],l.value=l.__value,d(l,"class","svelte-1m848u0"),r[4][0].push(l),d(e,"data-selected",n=r[5]===r[0]),d(e,"class","svelte-1m848u0")},m(_,i){S(_,e,i),f(e,s),f(e,c),f(e,l),l.checked=l.__value===r[0],o||(u=L(l,"change",r[3]),o=!0)},p(_,i){i&2&&t!==(t=_[1][_[5]]+"")&&Te(s,t),i&1&&(l.checked=l.__value===_[0]),i&1&&n!==(n=_[5]===_[0])&&d(e,"data-selected",n)},d(_){_&&m(e),r[4][0].splice(r[4][0].indexOf(l),1),o=!1,u()}}}function st(r){let e,t,s,c=r[2],l=[];for(let a=0;a<c.length;a+=1)l[a]=Pe(je(r,c,a));return{c(){e=v("div");for(let a=0;a<l.length;a+=1)l[a].c();t=E(),s=v("input"),this.h()},l(a){e=y(a,"DIV",{class:!0});var n=b(e);for(let o=0;o<l.length;o+=1)l[o].l(n);t=T(n),s=y(n,"INPUT",{type:!0,class:!0}),n.forEach(m),this.h()},h(){d(s,"type","radio"),s.checked=!0,d(s,"class","svelte-1m848u0"),d(e,"class","options svelte-1m848u0")},m(a,n){S(a,e,n);for(let o=0;o<l.length;o+=1)l[o].m(e,null);f(e,t),f(e,s)},p(a,[n]){if(n&7){c=a[2];let o;for(o=0;o<c.length;o+=1){const u=je(a,c,o);l[o]?l[o].p(u,n):(l[o]=Pe(u),l[o].c(),l[o].m(e,t))}for(;o<l.length;o+=1)l[o].d(1);l.length=c.length}},i:q,o:q,d(a){a&&m(e),Ge(l,a)}}}function lt(r,e,t){let{options:s}=e;const c=Object.keys(s);let{selection:l=c[1]}=e;const a=[[]];function n(){l=this.__value,t(0,l)}return r.$$set=o=>{"options"in o&&t(1,s=o.options),"selection"in o&&t(0,l=o.selection)},[l,s,c,n,a]}class Fe extends Y{constructor(e){super(),J(this,e,lt,st,K,{options:1,selection:0})}}function nt(r){let e,t,s,c,l,a,n,o;function u(i){r[1](i)}let _={options:Qe};return r[0]!==void 0&&(_.selection=r[0]),a=new Fe({props:_}),de.push(()=>Ue(a,"selection",u)),{c(){e=v("div"),t=v("fieldset"),s=v("legend"),c=C("Note density"),l=E(),U(a.$$.fragment),this.h()},l(i){e=y(i,"DIV",{});var g=b(e);t=y(g,"FIELDSET",{class:!0});var h=b(t);s=y(h,"LEGEND",{class:!0});var k=b(s);c=D(k,"Note density"),k.forEach(m),l=T(h),W(a.$$.fragment,h),h.forEach(m),g.forEach(m),this.h()},h(){d(s,"class","svelte-1ikh8be"),d(t,"class","svelte-1ikh8be")},m(i,g){S(i,e,g),f(e,t),f(t,s),f(s,c),f(t,l),X(a,t,null),o=!0},p(i,[g]){const h={};!n&&g&1&&(n=!0,h.selection=i[0],We(()=>n=!1)),a.$set(h)},i(i){o||(O(a.$$.fragment,i),o=!0)},o(i){A(a.$$.fragment,i),o=!1},d(i){i&&m(e),F(a)}}}function rt(r,e,t){let s;P(r,ke,l=>t(0,s=l));function c(l){s=l,ke.set(s)}return[s,c]}class at extends Y{constructor(e){super(),J(this,e,rt,nt,K,{})}}function it(r){let e,t,s,c,l,a,n,o;function u(i){r[1](i)}let _={options:Ze};return r[0]!==void 0&&(_.selection=r[0]),a=new Fe({props:_}),de.push(()=>Ue(a,"selection",u)),{c(){e=v("div"),t=v("fieldset"),s=v("legend"),c=C("Temperature"),l=E(),U(a.$$.fragment),this.h()},l(i){e=y(i,"DIV",{});var g=b(e);t=y(g,"FIELDSET",{class:!0});var h=b(t);s=y(h,"LEGEND",{class:!0});var k=b(s);c=D(k,"Temperature"),k.forEach(m),l=T(h),W(a.$$.fragment,h),h.forEach(m),g.forEach(m),this.h()},h(){d(s,"class","svelte-1ikh8be"),d(t,"class","svelte-1ikh8be")},m(i,g){S(i,e,g),f(e,t),f(t,s),f(s,c),f(t,l),X(a,t,null),o=!0},p(i,[g]){const h={};!n&&g&1&&(n=!0,h.selection=i[0],We(()=>n=!1)),a.$set(h)},i(i){o||(O(a.$$.fragment,i),o=!0)},o(i){A(a.$$.fragment,i),o=!1},d(i){i&&m(e),F(a)}}}function ot(r,e,t){let s;P(r,we,l=>t(0,s=l));function c(l){s=l,we.set(s)}return[s,c]}class ct extends Y{constructor(e){super(),J(this,e,ot,it,K,{})}}function ut(r){let e,t,s;return{c(){e=C("Compose "),t=v("img"),this.h()},l(c){e=D(c,"Compose "),t=y(c,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){ue(t.src,s="wand.svg")||d(t,"src",s),d(t,"alt","Magic wand"),d(t,"class","svelte-18w38ow")},m(c,l){S(c,e,l),S(c,t,l)},d(c){c&&m(e),c&&m(t)}}}function ft(r){let e;return{c(){e=C("Composing...")},l(t){e=D(t,"Composing...")},m(t,s){S(t,e,s)},d(t){t&&m(e)}}}function dt(r){let e,t,s;function c(n,o){return n[0]?ft:ut}let l=c(r),a=l(r);return{c(){e=v("button"),a.c(),this.h()},l(n){e=y(n,"BUTTON",{class:!0});var o=b(e);a.l(o),o.forEach(m),this.h()},h(){e.disabled=r[0],d(e,"class","svelte-18w38ow")},m(n,o){S(n,e,o),a.m(e,null),t||(s=L(e,"click",r[1]),t=!0)},p(n,[o]){l!==(l=c(n))&&(a.d(1),a=l(n),a&&(a.c(),a.m(e,null))),o&1&&(e.disabled=n[0])},i:q,o:q,d(n){n&&m(e),a.d(),t=!1,s()}}}function _t(r,e,t){let s,c,l,a,n,o,u;return P(r,ye,i=>t(0,s=i)),P(r,$e,i=>t(2,c=i)),P(r,Ee,i=>t(3,l=i)),P(r,Ae,i=>t(4,a=i)),P(r,we,i=>t(5,n=i)),P(r,ke,i=>t(6,o=i)),P(r,be,i=>t(7,u=i)),[s,async()=>{try{oe(ye,s=!0,s);const i=await fetch("compose",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({music_style:u,density:o,temperature:n})});if(!i.ok)throw new Error(`Unable to create composition: [${i.status}] ${i.text()}`);const{audio:g,image:h,tokens:k}=await i.json();oe(Ae,a=h,a),oe(Ee,l=k,l),oe($e,c=g,c)}catch(i){console.error(i)}finally{oe(ye,s=!1,s)}}]}class ht extends Y{constructor(e){super(),J(this,e,_t,dt,K,{})}}function ie(r,{delay:e=0,duration:t=400,easing:s=qe}={}){const c=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:s,css:l=>`opacity: ${l*c}`}}function Re(r){let e,t,s,c,l=`calc(${r[6]}px - 4rem)`,a,n,o,u=!1,_,i=!0,g,h,k=`translateX(${r[7]*(r[0]/r[1])}px)`,j,B,M,V,H,R;function G(){cancelAnimationFrame(_),n.paused||(_=Ke(G),u=!0),r[14].call(n)}let w=r[2]&&Ve(r);return{c(){e=v("section"),t=v("div"),s=v("img"),a=E(),n=v("audio"),g=E(),h=v("div"),j=E(),w&&w.c(),this.h()},l(p){e=y(p,"SECTION",{class:!0});var $=b(e);t=y($,"DIV",{class:!0});var z=b(t);s=y(z,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),a=T(z),n=y(z,"AUDIO",{src:!0,class:!0}),b(n).forEach(m),g=T(z),h=y(z,"DIV",{class:!0}),b(h).forEach(m),j=T(z),w&&w.l(z),z.forEach(m),$.forEach(m),this.h()},h(){d(s,"class","visualisation svelte-sa1t0p"),ue(s.src,c="compose.png")||d(s,"src",c),d(s,"alt","MIDI notes of composition"),d(s,"draggable","false"),re(s,"width",l,!1),ue(n.src,o="synth.wav")||d(n,"src",o),d(n,"class","svelte-sa1t0p"),r[1]===void 0&&ce(()=>r[15].call(n)),d(h,"class","handle svelte-sa1t0p"),re(h,"transform",k,!1),d(t,"class","container svelte-sa1t0p"),re(t,"width",Math.min(r[7],r[6])+"px",!1),d(e,"class","svelte-sa1t0p"),ce(()=>r[19].call(e))},m(p,$){S(p,e,$),f(e,t),f(t,s),r[12](s),f(t,a),f(t,n),f(t,g),f(t,h),f(t,j),w&&w.m(t,null),r[18](t),B=Ye(e,r[19].bind(e)),V=!0,H||(R=[L(s,"click",r[13]),L(n,"timeupdate",G),L(n,"durationchange",r[15]),L(n,"play",r[16]),L(n,"pause",r[16]),L(t,"mousemove",r[8]),L(t,"touchmove",Je(r[9]))],H=!0)},p(p,$){$&64&&l!==(l=`calc(${p[6]}px - 4rem)`)&&re(s,"width",l,!1),!u&&$&1&&!isNaN(p[0])&&(n.currentTime=p[0]),u=!1,$&4&&i!==(i=p[2])&&n[i?"pause":"play"](),$&131&&k!==(k=`translateX(${p[7]*(p[0]/p[1])}px)`)&&re(h,"transform",k,!1),p[2]?w?(w.p(p,$),$&4&&O(w,1)):(w=Ve(p),w.c(),O(w,1),w.m(t,null)):w&&(Ie(),A(w,1,1,()=>{w=null}),Ne()),$&192&&re(t,"width",Math.min(p[7],p[6])+"px",!1)},i(p){V||(O(w),ce(()=>{M||(M=ae(e,ie,{},!0)),M.run(1)}),V=!0)},o(p){A(w),M||(M=ae(e,ie,{},!1)),M.run(0),V=!1},d(p){p&&m(e),r[12](null),w&&w.d(),r[18](null),B(),p&&M&&M.end(),H=!1,Xe(R)}}}function Ve(r){let e,t,s,c,l,a;return{c(){e=v("img"),this.h()},l(n){e=y(n,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),this.h()},h(){d(e,"class","play svelte-sa1t0p"),ue(e.src,t="play.svg")||d(e,"src",t),d(e,"alt","Play button"),d(e,"draggable","false")},m(n,o){S(n,e,o),c=!0,l||(a=L(e,"click",r[17]),l=!0)},p:q,i(n){c||(ce(()=>{s||(s=ae(e,ie,{},!0)),s.run(1)}),c=!0)},o(n){s||(s=ae(e,ie,{},!1)),s.run(0),c=!1},d(n){n&&m(e),n&&s&&s.end(),l=!1,a()}}}function pt(r){let e,t,s,c,l=r[4]&&Re(r);return{c(){l&&l.c(),e=_e()},l(a){l&&l.l(a),e=_e()},m(a,n){l&&l.m(a,n),S(a,e,n),t=!0,s||(c=[L(window,"keydown",r[10]),L(window,"resize",r[11])],s=!0)},p(a,[n]){a[4]?l?(l.p(a,n),n&16&&O(l,1)):(l=Re(a),l.c(),O(l,1),l.m(e.parentNode,e)):l&&(Ie(),A(l,1,1,()=>{l=null}),Ne())},i(a){t||(O(l),t=!0)},o(a){A(l),t=!1},d(a){l&&l.d(a),a&&m(e),s=!1,Xe(c)}}}function mt(r,e,t){let s,c;P(r,$e,p=>t(4,c=p));let l,a,n=!0,o,u,_;const i=p=>{if(!a||!p.buttons)return;const{left:$,right:z}=o.getBoundingClientRect();t(0,l=a*(p.clientX-$)/(z-$))},g=p=>{if(!a)return;const{left:$,right:z}=o.getBoundingClientRect();t(0,l=a*(p.touches[0].clientX-$)/(z-$))},h=p=>{p.code==="Space"&&t(2,n=!n)},k=()=>t(7,s=u&&u.clientWidth);function j(p){de[p?"unshift":"push"](()=>{u=p,t(3,u)})}const B=()=>t(2,n=!n);function M(){l=this.currentTime,t(0,l)}function V(){a=this.duration,t(1,a)}function H(){n=this.paused,t(2,n)}const R=()=>t(2,n=!n);function G(p){de[p?"unshift":"push"](()=>{o=p,t(5,o)})}function w(){_=this.clientWidth,t(6,_)}return r.$$.update=()=>{r.$$.dirty&8&&t(7,s=u&&u.clientWidth),r.$$.dirty&31&&(c||l||a||!n)&&t(7,s=u&&u.clientWidth)},[l,a,n,u,c,o,_,s,i,g,h,k,j,B,M,V,H,R,G,w]}class gt extends Y{constructor(e){super(),J(this,e,mt,pt,K,{})}}function He(r){let e,t,s,c,l,a,n,o;return{c(){e=v("section"),t=v("h2"),s=C("Tokenized notes"),c=E(),l=v("p"),a=C(r[0]),this.h()},l(u){e=y(u,"SECTION",{class:!0});var _=b(e);t=y(_,"H2",{});var i=b(t);s=D(i,"Tokenized notes"),i.forEach(m),c=T(_),l=y(_,"P",{class:!0});var g=b(l);a=D(g,r[0]),g.forEach(m),_.forEach(m),this.h()},h(){d(l,"class","svelte-4un5mw"),d(e,"class","svelte-4un5mw")},m(u,_){S(u,e,_),f(e,t),f(t,s),f(e,c),f(e,l),f(l,a),o=!0},p(u,_){(!o||_&1)&&Te(a,u[0])},i(u){o||(ce(()=>{n||(n=ae(e,ie,{},!0)),n.run(1)}),o=!0)},o(u){n||(n=ae(e,ie,{},!1)),n.run(0),o=!1},d(u){u&&m(e),u&&n&&n.end()}}}function vt(r){let e,t,s=r[0]&&He(r);return{c(){s&&s.c(),e=_e()},l(c){s&&s.l(c),e=_e()},m(c,l){s&&s.m(c,l),S(c,e,l),t=!0},p(c,[l]){c[0]?s?(s.p(c,l),l&1&&O(s,1)):(s=He(c),s.c(),O(s,1),s.m(e.parentNode,e)):s&&(Ie(),A(s,1,1,()=>{s=null}),Ne())},i(c){t||(O(s),t=!0)},o(c){A(s),t=!1},d(c){s&&s.d(c),c&&m(e)}}}function yt(r,e,t){let s;return P(r,Ee,c=>t(0,s=c)),[s]}class bt extends Y{constructor(e){super(),J(this,e,yt,vt,K,{})}}function kt(r){let e,t,s,c,l,a,n,o,u,_,i,g,h,k,j,B,M,V,H,R,G,w,p,$,z,Q,pe,Z,me,x,ge,ee,ve,te,fe;return $=new tt({}),Q=new at({}),Z=new ct({}),x=new ht({}),ee=new gt({}),te=new bt({}),{c(){e=v("main"),t=v("h1"),s=C("Composer"),c=E(),l=v("p"),a=C("A hundred thousand songs used to train. One AI model. Infinite compositions."),n=E(),o=v("p"),u=C(`This space contains a deep neural network model that can compose music. You can use it to generate music in
2
- different styles, 4 bars at a time.`),_=E(),i=v("p"),g=C("Developed by "),h=v("a"),k=C("Ron Au"),j=C(` and
3
- `),B=v("a"),M=C("Tristan Behrens"),V=C("."),H=E(),R=v("p"),G=C("Have fun! And always feel free to send us some feedback and share your compositions!"),w=E(),p=v("section"),U($.$$.fragment),z=E(),U(Q.$$.fragment),pe=E(),U(Z.$$.fragment),me=E(),U(x.$$.fragment),ge=E(),U(ee.$$.fragment),ve=E(),U(te.$$.fragment),this.h()},l(N){e=y(N,"MAIN",{class:!0});var I=b(e);t=y(I,"H1",{class:!0});var Ce=b(t);s=D(Ce,"Composer"),Ce.forEach(m),c=T(I),l=y(I,"P",{class:!0});var De=b(l);a=D(De,"A hundred thousand songs used to train. One AI model. Infinite compositions."),De.forEach(m),n=T(I),o=y(I,"P",{class:!0});var Oe=b(o);u=D(Oe,`This space contains a deep neural network model that can compose music. You can use it to generate music in
4
- different styles, 4 bars at a time.`),Oe.forEach(m),_=T(I),i=y(I,"P",{class:!0});var le=b(i);g=D(le,"Developed by "),h=y(le,"A",{href:!0,rel:!0,target:!0});var ze=b(h);k=D(ze,"Ron Au"),ze.forEach(m),j=D(le,` and
5
- `),B=y(le,"A",{href:!0,rel:!0,target:!0});var Se=b(B);M=D(Se,"Tristan Behrens"),Se.forEach(m),V=D(le,"."),le.forEach(m),H=T(I),R=y(I,"P",{class:!0});var Me=b(R);G=D(Me,"Have fun! And always feel free to send us some feedback and share your compositions!"),Me.forEach(m),w=T(I),p=y(I,"SECTION",{id:!0,class:!0});var ne=b(p);W($.$$.fragment,ne),z=T(ne),W(Q.$$.fragment,ne),pe=T(ne),W(Z.$$.fragment,ne),ne.forEach(m),me=T(I),W(x.$$.fragment,I),ge=T(I),W(ee.$$.fragment,I),ve=T(I),W(te.$$.fragment,I),I.forEach(m),this.h()},h(){d(t,"class","svelte-1rfjlkw"),d(l,"class","heading svelte-1rfjlkw"),d(o,"class","svelte-1rfjlkw"),d(h,"href","https://twitter.com/ronvoluted"),d(h,"rel","noopener"),d(h,"target","_blank"),d(B,"href","https://twitter.com/DrTBehrens"),d(B,"rel","noopener"),d(B,"target","_blank"),d(i,"class","svelte-1rfjlkw"),d(R,"class","svelte-1rfjlkw"),d(p,"id","options"),d(p,"class","svelte-1rfjlkw"),d(e,"class","svelte-1rfjlkw")},m(N,I){S(N,e,I),f(e,t),f(t,s),f(e,c),f(e,l),f(l,a),f(e,n),f(e,o),f(o,u),f(e,_),f(e,i),f(i,g),f(i,h),f(h,k),f(i,j),f(i,B),f(B,M),f(i,V),f(e,H),f(e,R),f(R,G),f(e,w),f(e,p),X($,p,null),f(p,z),X(Q,p,null),f(p,pe),X(Z,p,null),f(e,me),X(x,e,null),f(e,ge),X(ee,e,null),f(e,ve),X(te,e,null),fe=!0},p:q,i(N){fe||(O($.$$.fragment,N),O(Q.$$.fragment,N),O(Z.$$.fragment,N),O(x.$$.fragment,N),O(ee.$$.fragment,N),O(te.$$.fragment,N),fe=!0)},o(N){A($.$$.fragment,N),A(Q.$$.fragment,N),A(Z.$$.fragment,N),A(x.$$.fragment,N),A(ee.$$.fragment,N),A(te.$$.fragment,N),fe=!1},d(N){N&&m(e),F($),F(Q),F(Z),F(x),F(ee),F(te)}}}class Et extends Y{constructor(e){super(),J(this,e,null,kt,K,{})}}export{Et as default};
 
 
 
 
 
 
static/_app/start-b4f523d8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ var et=Object.defineProperty,tt=Object.defineProperties;var nt=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;var Ie=(n,e,t)=>e in n?et(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,P=(n,e)=>{for(var t in e||(e={}))Te.call(e,t)&&Ie(n,t,e[t]);if(fe)for(var t of fe(e))De.call(e,t)&&Ie(n,t,e[t]);return n},ne=(n,e)=>tt(n,nt(e));var Ve=(n,e)=>{var t={};for(var s in n)Te.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&fe)for(var s of fe(n))e.indexOf(s)<0&&De.call(n,s)&&(t[s]=n[s]);return t};import{S as rt,i as st,s as it,e as at,c as ot,a as ct,d as V,b as we,f as B,g as q,t as lt,h as ft,j as ut,k as dt,l as C,m as pt,n as M,o as j,p as F,q as I,r as ht,u as _t,v as $e,w as z,x as se,y as J,z as ie,A as ae,B as K,C as oe,D as qe}from"./chunks/index-c61749f5.js";import{w as ue}from"./chunks/index-f9918abc.js";let ze="",He="";function mt(n){ze=n.base,He=n.assets||ze}function gt(n){let e,t,s;const l=[n[1]||{}];var c=n[0][0];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&2?ie(l,[ae(r[1]||{})]):{};if(c!==(c=r[0][0])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function wt(n){let e,t,s;const l=[n[1]||{}];var c=n[0][0];function f(r){let i={$$slots:{default:[$t]},$$scope:{ctx:r}};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f(n))),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&2?ie(l,[ae(r[1]||{})]):{};if(i&525&&(a.$$scope={dirty:i,ctx:r}),c!==(c=r[0][0])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f(r)),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function bt(n){let e,t,s;const l=[n[2]||{}];var c=n[0][1];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&4?ie(l,[ae(r[2]||{})]):{};if(c!==(c=r[0][1])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function yt(n){let e,t,s;const l=[n[2]||{}];var c=n[0][1];function f(r){let i={$$slots:{default:[vt]},$$scope:{ctx:r}};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f(n))),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&4?ie(l,[ae(r[2]||{})]):{};if(i&521&&(a.$$scope={dirty:i,ctx:r}),c!==(c=r[0][1])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f(r)),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function vt(n){let e,t,s;const l=[n[3]||{}];var c=n[0][2];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&8?ie(l,[ae(r[3]||{})]):{};if(c!==(c=r[0][2])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function $t(n){let e,t,s,l;const c=[yt,bt],f=[];function r(i,a){return i[0][2]?0:1}return e=r(n),t=f[e]=c[e](n),{c(){t.c(),s=C()},l(i){t.l(i),s=C()},m(i,a){f[e].m(i,a),q(i,s,a),l=!0},p(i,a){let d=e;e=r(i),e===d?f[e].p(i,a):(M(),j(f[d],1,1,()=>{f[d]=null}),F(),t=f[e],t?t.p(i,a):(t=f[e]=c[e](i),t.c()),I(t,1),t.m(s.parentNode,s))},i(i){l||(I(t),l=!0)},o(i){j(t),l=!1},d(i){f[e].d(i),i&&V(s)}}}function Je(n){let e,t=n[5]&&Ke(n);return{c(){e=at("div"),t&&t.c(),this.h()},l(s){e=ot(s,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=ct(e);t&&t.l(l),l.forEach(V),this.h()},h(){we(e,"id","svelte-announcer"),we(e,"aria-live","assertive"),we(e,"aria-atomic","true"),B(e,"position","absolute"),B(e,"left","0"),B(e,"top","0"),B(e,"clip","rect(0 0 0 0)"),B(e,"clip-path","inset(50%)"),B(e,"overflow","hidden"),B(e,"white-space","nowrap"),B(e,"width","1px"),B(e,"height","1px")},m(s,l){q(s,e,l),t&&t.m(e,null)},p(s,l){s[5]?t?t.p(s,l):(t=Ke(s),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(s){s&&V(e),t&&t.d()}}}function Ke(n){let e;return{c(){e=lt(n[6])},l(t){e=ft(t,n[6])},m(t,s){q(t,e,s)},p(t,s){s&64&&ut(e,t[6])},d(t){t&&V(e)}}}function kt(n){let e,t,s,l,c;const f=[wt,gt],r=[];function i(d,R){return d[0][1]?0:1}e=i(n),t=r[e]=f[e](n);let a=n[4]&&Je(n);return{c(){t.c(),s=dt(),a&&a.c(),l=C()},l(d){t.l(d),s=pt(d),a&&a.l(d),l=C()},m(d,R){r[e].m(d,R),q(d,s,R),a&&a.m(d,R),q(d,l,R),c=!0},p(d,[R]){let y=e;e=i(d),e===y?r[e].p(d,R):(M(),j(r[y],1,1,()=>{r[y]=null}),F(),t=r[e],t?t.p(d,R):(t=r[e]=f[e](d),t.c()),I(t,1),t.m(s.parentNode,s)),d[4]?a?a.p(d,R):(a=Je(d),a.c(),a.m(l.parentNode,l)):a&&(a.d(1),a=null)},i(d){c||(I(t),c=!0)},o(d){j(t),c=!1},d(d){r[e].d(d),d&&V(s),a&&a.d(d),d&&V(l)}}}function Et(n,e,t){let{stores:s}=e,{page:l}=e,{components:c}=e,{props_0:f=null}=e,{props_1:r=null}=e,{props_2:i=null}=e;ht("__svelte__",s),_t(s.page.notify);let a=!1,d=!1,R=null;return $e(()=>{const y=s.page.subscribe(()=>{a&&(t(5,d=!0),t(6,R=document.title||"untitled page"))});return t(4,a=!0),y}),n.$$set=y=>{"stores"in y&&t(7,s=y.stores),"page"in y&&t(8,l=y.page),"components"in y&&t(0,c=y.components),"props_0"in y&&t(1,f=y.props_0),"props_1"in y&&t(2,r=y.props_1),"props_2"in y&&t(3,i=y.props_2)},n.$$.update=()=>{n.$$.dirty&384&&s.page.set(l)},[c,f,r,i,a,d,R,s,l]}class Rt extends rt{constructor(e){super(),st(this,e,Et,kt,it,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const St="modulepreload",Be={},Lt="https://hf.space/embed/ai-guru/composer/_app",be=function(e,t){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=`${Lt}${s}`,s in Be)return;Be[s]=!0;const l=s.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":St,l||(f.as="script",f.crossOrigin=""),f.href=s,document.head.appendChild(f),l)return new Promise((r,i)=>{f.addEventListener("load",r),f.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},Ut={},Ee=[()=>be(()=>import("./layout.svelte-0c060267.js"),["layout.svelte-0c060267.js","chunks/index-c61749f5.js"]),()=>be(()=>import("./error.svelte-83166d57.js"),["error.svelte-83166d57.js","chunks/index-c61749f5.js"]),()=>be(()=>import("./pages/index.svelte-416adc10.js"),["pages/index.svelte-416adc10.js","assets/pages/index.svelte-45cd6b36.css","chunks/index-c61749f5.js","chunks/index-f9918abc.js"])],At={"":[[0,2],[1]]};function We(n){return n instanceof Error||n&&n.name&&n.message?n:new Error(JSON.stringify(n))}function Ye(n){if(n.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if("maxage"in n)throw new Error("maxage should be replaced with cache: { maxage }");const e=n.status&&n.status>=400&&n.status<=599&&!n.redirect;if(n.error||e){const t=n.status;if(!n.error&&e)return{status:t||500,error:new Error};const s=typeof n.error=="string"?new Error(n.error):n.error;return s instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:s}):{status:t,error:s}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof s}"`)}}if(n.redirect){if(!n.status||Math.floor(n.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof n.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(n.dependencies&&(!Array.isArray(n.dependencies)||n.dependencies.some(t=>typeof t!="string")))return{status:500,error:new Error('"dependencies" property returned from load() must be of type string[]')};if(n.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return n}function Nt(n,e){return n==="/"||e==="ignore"?n:e==="never"?n.endsWith("/")?n.slice(0,-1):n:e==="always"&&!n.endsWith("/")?n+"/":n}function Ot(n){let e=5381,t=n.length;if(typeof n=="string")for(;t;)e=e*33^n.charCodeAt(--t);else for(;t;)e=e*33^n[--t];return(e>>>0).toString(36)}function Me(n){let e=n.baseURI;if(!e){const t=n.getElementsByTagName("base");e=t.length?t[0].href:n.URL}return e}function ke(){return{x:pageXOffset,y:pageYOffset}}function Fe(n){return n.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function Ge(n){return n instanceof SVGAElement?new URL(n.href.baseVal,document.baseURI):new URL(n.href)}function Xe(n){const e=ue(n);let t=!0;function s(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function c(f){let r;return e.subscribe(i=>{(r===void 0||t&&i!==r)&&f(r=i)})}return{notify:s,set:l,subscribe:c}}function xt(){const{set:n,subscribe:e}=ue(!1),t="1651227702162";let s;async function l(){clearTimeout(s);const f=await fetch(`https://hf.space/embed/ai-guru/composer/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:r}=await f.json(),i=r!==t;return i&&(n(!0),clearTimeout(s)),i}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Pt(n,e){let s=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof n=="string"?n:n.url)}]`;e&&typeof e.body=="string"&&(s+=`[sveltekit\\:data-body="${Ot(e.body)}"]`);const l=document.querySelector(s);if(l&&l.textContent){const c=JSON.parse(l.textContent),{body:f}=c,r=Ve(c,["body"]);return Promise.resolve(new Response(f,r))}return fetch(n,e)}const Ct=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function jt(n){const e=[],t=[];let s=!0;return{pattern:n===""?/^\/$/:new RegExp(`^${decodeURIComponent(n).split(/(?:@[a-zA-Z0-9_-]+)?(?:\/|$)/).map((c,f,r)=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(c);if(i)return e.push(i[1]),t.push(i[2]),"(?:/(.*))?";const a=f===r.length-1;return c&&"/"+c.split(/\[(.+?)\]/).map((d,R)=>{if(R%2){const[,y,Z,G]=Ct.exec(d);return e.push(Z),t.push(G),y?"(.*?)":"([^/]+?)"}return a&&d.includes(".")&&(s=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${s?"/?":""}$`),names:e,types:t}}function It(n,e,t,s){const l={};for(let c=0;c<e.length;c+=1){const f=e[c],r=t[c],i=n[c+1]||"";if(r){const a=s[r];if(!a)throw new Error(`Missing "${r}" param matcher`);if(!a(i))return}l[f]=i}return l}function Tt(n,e,t){return Object.entries(e).map(([l,[c,f,r]])=>{const{pattern:i,names:a,types:d}=jt(l);return{id:l,exec:R=>{const y=i.exec(R);if(y)return It(y,a,d,t)},a:c.map(R=>n[R]),b:f.map(R=>n[R]),has_shadow:!!r}})}const Qe="sveltekit:scroll",W="sveltekit:index",ye=Tt(Ee,At,Ut),Dt=Ee[0](),Vt=Ee[1](),Ze={};let re={};try{re=JSON.parse(sessionStorage[Qe])}catch{}function ve(n){re[n]=ke()}function qt({target:n,session:e,base:t,trailing_slash:s}){var Ce;const l=new Map,c=[],f={url:Xe({}),page:Xe({}),navigating:ue(null),session:ue(e),updated:xt()},r={id:null,promise:null},i={before_navigate:[],after_navigate:[]};let a={branch:[],error:null,session_id:0,stuff:Ze,url:null},d=!1,R=!0,y=!1,Z=1,G=null,Re,Se,Le=!1;f.session.subscribe(async o=>{Se=o,Le&&(Z+=1,_e(new URL(location.href),[],!0))}),Le=!0;let X=!0,T=(Ce=history.state)==null?void 0:Ce[W];T||(T=Date.now(),history.replaceState(ne(P({},history.state),{[W]:T}),"",location.href));const de=re[T];de&&(history.scrollRestoration="manual",scrollTo(de.x,de.y));let pe=!1,he,Ue;async function Ae(o,{noscroll:p=!1,replaceState:w=!1,keepfocus:u=!1,state:h={}},b){const _=new URL(o,Me(document));if(X)return ge({url:_,scroll:p?ke():null,keepfocus:u,redirect_chain:b,details:{state:h,replaceState:w},accepted:()=>{},blocked:()=>{}});await ee(_)}async function Ne(o){const p=Pe(o);if(!p)throw new Error("Attempted to prefetch a URL that does not belong to this app");return r.promise=xe(p,!1),r.id=p.id,r.promise}async function _e(o,p,w,u){var g,$,S;const h=Pe(o),b=Ue={};let _=h&&await xe(h,w);if(!_&&o.origin===location.origin&&o.pathname===location.pathname&&(_=await Q({status:404,error:new Error(`Not found: ${o.pathname}`),url:o,routeId:null})),!_)return await ee(o),!1;if(Ue!==b)return!1;if(c.length=0,_.redirect)if(p.length>10||p.includes(o.pathname))_=await Q({status:500,error:new Error("Redirect loop"),url:o,routeId:null});else return X?Ae(new URL(_.redirect,o).href,{},[...p,o.pathname]):await ee(new URL(_.redirect,location.href)),!1;else(($=(g=_.props)==null?void 0:g.page)==null?void 0:$.status)>=400&&await f.updated.check()&&await ee(o);if(y=!0,u&&u.details){const{details:k}=u,E=k.replaceState?0:1;k.state[W]=T+=E,history[k.replaceState?"replaceState":"pushState"](k.state,"",o)}if(d?(a=_.state,Re.$set(_.props)):Oe(_),u){const{scroll:k,keepfocus:E}=u;if(!E){const m=document.body,A=m.getAttribute("tabindex");(S=getSelection())==null||S.removeAllRanges(),m.tabIndex=-1,m.focus(),A!==null?m.setAttribute("tabindex",A):m.removeAttribute("tabindex")}if(await qe(),R){const m=o.hash&&document.getElementById(o.hash.slice(1));k?scrollTo(k.x,k.y):m?m.scrollIntoView():scrollTo(0,0)}}else await qe();r.promise=null,r.id=null,R=!0,y=!1,_.props.page&&(he=_.props.page);const v=_.state.branch[_.state.branch.length-1];return X=(v==null?void 0:v.module.router)!==!1,!0}function Oe(o){a=o.state;const p=document.querySelector("style[data-sveltekit]");if(p&&p.remove(),he=o.props.page,Re=new Rt({target:n,props:ne(P({},o.props),{stores:f}),hydrate:!0}),d=!0,X){const w={from:null,to:new URL(location.href)};i.after_navigate.forEach(u=>u(w))}}async function me({url:o,params:p,stuff:w,branch:u,status:h,error:b,routeId:_}){var m,A;const v=u.filter(Boolean),g=v.find(U=>{var O;return(O=U.loaded)==null?void 0:O.redirect}),$={redirect:(m=g==null?void 0:g.loaded)==null?void 0:m.redirect,state:{url:o,params:p,branch:u,error:b,stuff:w,session_id:Z},props:{components:v.map(U=>U.module.default)}};for(let U=0;U<v.length;U+=1){const O=v[U].loaded;$.props[`props_${U}`]=O?await O.props:null}if(!a.url||o.href!==a.url.href||a.error!==b||a.stuff!==w){$.props.page={error:b,params:p,routeId:_,status:h,stuff:w,url:o};const U=(O,L)=>{Object.defineProperty($.props.page,O,{get:()=>{throw new Error(`$page.${O} has been replaced by $page.url.${L}`)}})};U("origin","origin"),U("path","pathname"),U("query","searchParams")}const k=v[v.length-1],E=(A=k==null?void 0:k.loaded)==null?void 0:A.cache;if(E){const U=o.pathname+o.search;let O=!1;const L=()=>{l.get(U)===$&&l.delete(U),x(),clearTimeout(N)},N=setTimeout(L,E.maxage*1e3),x=f.session.subscribe(()=>{O&&L()});O=!0,l.set(U,$)}return $}async function H({status:o,error:p,module:w,url:u,params:h,stuff:b,props:_,routeId:v}){const g={module:w,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:b};function $(E){const{href:m}=new URL(E,u);g.uses.dependencies.add(m)}_&&g.uses.dependencies.add(u.href);const S={};for(const E in h)Object.defineProperty(S,E,{get(){return g.uses.params.add(E),h[E]},enumerable:!0});const k=Se;if(w.load){const E={routeId:v,params:S,props:_||{},get url(){return g.uses.url=!0,u},get session(){return g.uses.session=!0,k},get stuff(){return g.uses.stuff=!0,P({},b)},fetch(A,U){const O=typeof A=="string"?A:A.url;return $(O),d?fetch(A,U):Pt(A,U)},status:o!=null?o:null,error:p!=null?p:null},m=await w.load.call(null,E);if(!m)throw new Error("load function must return a value");g.loaded=Ye(m),g.loaded.stuff&&(g.stuff=g.loaded.stuff),g.loaded.dependencies&&g.loaded.dependencies.forEach($)}else _&&(g.loaded=Ye({props:_}));return g}async function xe({id:o,url:p,params:w,route:u},h){var A,U,O;if(r.id===o&&r.promise)return r.promise;if(!h){const L=l.get(o);if(L)return L}const{a:b,b:_,has_shadow:v}=u,g=a.url&&{url:o!==a.url.pathname+a.url.search,params:Object.keys(w).filter(L=>a.params[L]!==w[L]),session:Z!==a.session_id};let $=[],S=Ze,k=!1,E=200,m=null;b.forEach(L=>L());e:for(let L=0;L<b.length;L+=1){let N;try{if(!b[L])continue;const x=await b[L](),D=a.branch[L];if(!D||x!==D.module||g.url&&D.uses.url||g.params.some(Y=>D.uses.params.has(Y))||g.session&&D.uses.session||Array.from(D.uses.dependencies).some(Y=>c.some(le=>le(Y)))||k&&D.uses.stuff){let Y={};const le=v&&L===b.length-1;if(le){const te=await fetch(`${p.pathname}${p.pathname.endsWith("/")?"":"/"}__data.json${p.search}`,{headers:{"x-sveltekit-load":"true"}});if(te.ok){const je=te.headers.get("x-sveltekit-location");if(je)return{redirect:je,props:{},state:a};Y=te.status===204?{}:await te.json()}else E=te.status,m=new Error("Failed to load data")}if(m||(N=await H({module:x,url:p,params:w,props:Y,stuff:S,routeId:u.id})),N&&(le&&(N.uses.url=!0),N.loaded)){if(N.loaded.error&&(E=N.loaded.status,m=N.loaded.error),N.loaded.redirect)return{redirect:N.loaded.redirect,props:{},state:a};N.loaded.stuff&&(k=!0)}}else N=D}catch(x){E=500,m=We(x)}if(m){for(;L--;)if(_[L]){let x,D,ce=L;for(;!(D=$[ce]);)ce-=1;try{if(x=await H({status:E,error:m,module:await _[L](),url:p,params:w,stuff:D.stuff,routeId:u.id}),(A=x==null?void 0:x.loaded)!=null&&A.error)continue;(U=x==null?void 0:x.loaded)!=null&&U.stuff&&(S=P(P({},S),x.loaded.stuff)),$=$.slice(0,ce+1).concat(x);break e}catch{continue}}return await Q({status:E,error:m,url:p,routeId:u.id})}else(O=N==null?void 0:N.loaded)!=null&&O.stuff&&(S=P(P({},S),N.loaded.stuff)),$.push(N)}return await me({url:p,params:w,stuff:S,branch:$,status:E,error:m,routeId:u.id})}async function Q({status:o,error:p,url:w,routeId:u}){var v,g;const h={},b=await H({module:await Dt,url:w,params:h,stuff:{},routeId:u}),_=await H({status:o,error:p,module:await Vt,url:w,params:h,stuff:b&&b.loaded&&b.loaded.stuff||{},routeId:u});return await me({url:w,params:h,stuff:P(P({},(v=b==null?void 0:b.loaded)==null?void 0:v.stuff),(g=_==null?void 0:_.loaded)==null?void 0:g.stuff),branch:[b,_],status:o,error:p,routeId:u})}function Pe(o){if(o.origin!==location.origin||!o.pathname.startsWith(t))return;const p=decodeURI(o.pathname.slice(t.length)||"/");for(const w of ye){const u=w.exec(p);if(u)return{id:o.pathname+o.search,route:w,params:u,url:o}}}async function ge({url:o,scroll:p,keepfocus:w,redirect_chain:u,details:h,accepted:b,blocked:_}){const v=a.url;let g=!1;const $={from:v,to:o,cancel:()=>g=!0};if(i.before_navigate.forEach(m=>m($)),g){_();return}const S=Nt(o.pathname,s),k=new URL(o.origin+S+o.search+o.hash);if(ve(T),b(),d&&f.navigating.set({from:a.url,to:k}),await _e(k,u,!1,{scroll:p,keepfocus:w,details:h})){const m={from:v,to:k};i.after_navigate.forEach(A=>A(m)),f.navigating.set(null)}}function ee(o){return location.href=o.href,new Promise(()=>{})}return{after_navigate:o=>{$e(()=>(i.after_navigate.push(o),()=>{const p=i.after_navigate.indexOf(o);i.after_navigate.splice(p,1)}))},before_navigate:o=>{$e(()=>(i.before_navigate.push(o),()=>{const p=i.before_navigate.indexOf(o);i.before_navigate.splice(p,1)}))},disable_scroll_handling:()=>{(y||!d)&&(R=!1)},goto:(o,p={})=>Ae(o,p,[]),invalidate:o=>{if(typeof o=="function")c.push(o);else{const{href:p}=new URL(o,location.href);c.push(w=>w===p)}return G||(G=Promise.resolve().then(async()=>{await _e(new URL(location.href),[],!0),G=null})),G},prefetch:async o=>{const p=new URL(o,Me(document));await Ne(p)},prefetch_routes:async o=>{const w=(o?ye.filter(u=>o.some(h=>u.exec(h))):ye).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(w)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const b={from:a.url,to:null,cancel:()=>h=!0};i.before_navigate.forEach(_=>_(b)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ve(T);try{sessionStorage[Qe]=JSON.stringify(re)}catch{}}});const o=u=>{const h=Fe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ne(Ge(h))};let p;const w=u=>{clearTimeout(p),p=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",o),addEventListener("mousemove",w),addEventListener("sveltekit:trigger_prefetch",o),addEventListener("click",u=>{if(!X||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=Fe(u);if(!h||!h.href)return;const b=h instanceof SVGAElement,_=Ge(h);if(!b&&_.origin==="null")return;const v=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||v.includes("external")||h.hasAttribute("sveltekit:reload")||(b?h.target.baseVal:h.target))return;const[g,$]=_.href.split("#");if($!==void 0&&g===location.href.split("#")[0]){pe=!0,ve(T),f.page.set(ne(P({},he),{url:_})),f.page.notify();return}ge({url:_,scroll:h.hasAttribute("sveltekit:noscroll")?ke():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:_.href===location.href},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&X){if(u.state[W]===T)return;ge({url:new URL(location.href),scroll:re[u.state[W]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{T=u.state[W]},blocked:()=>{const h=T-u.state[W];history.go(h)}})}}),addEventListener("hashchange",()=>{pe&&(pe=!1,history.replaceState(ne(P({},history.state),{[W]:++T}),"",location.href))})},_hydrate:async({status:o,error:p,nodes:w,params:u,routeId:h})=>{const b=new URL(location.href),_=[];let v={},g,$;try{for(let S=0;S<w.length;S+=1){const k=S===w.length-1;let E;if(k){const A=document.querySelector('script[sveltekit\\:data-type="props"]');A&&(E=JSON.parse(A.textContent))}const m=await H({module:await w[S],url:b,params:u,stuff:v,status:k?o:void 0,error:k?p:void 0,props:E,routeId:h});if(E&&(m.uses.dependencies.add(b.href),m.uses.url=!0),_.push(m),m&&m.loaded)if(m.loaded.error){if(p)throw m.loaded.error;$={status:m.loaded.status,error:m.loaded.error,url:b,routeId:h}}else m.loaded.stuff&&(v=P(P({},v),m.loaded.stuff))}g=$?await Q($):await me({url:b,params:u,stuff:v,branch:_,status:o,error:p,routeId:h})}catch(S){if(p)throw S;g=await Q({status:500,error:We(S),url:b,routeId:h})}g.redirect&&await ee(new URL(g.redirect,location.href)),Oe(g)}}}async function Bt({paths:n,target:e,session:t,route:s,spa:l,trailing_slash:c,hydrate:f}){const r=qt({target:e,session:t,base:n.base,trailing_slash:c});mt(n),f&&await r._hydrate(f),s&&(l&&r.goto(location.href,{replaceState:!0}),r._start_router()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{Bt as start};
static/_app/start-d715fd74.js DELETED
@@ -1 +0,0 @@
1
- var et=Object.defineProperty,tt=Object.defineProperties;var nt=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable;var Ie=(n,e,t)=>e in n?et(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,P=(n,e)=>{for(var t in e||(e={}))Te.call(e,t)&&Ie(n,t,e[t]);if(fe)for(var t of fe(e))De.call(e,t)&&Ie(n,t,e[t]);return n},ne=(n,e)=>tt(n,nt(e));var Ve=(n,e)=>{var t={};for(var s in n)Te.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&fe)for(var s of fe(n))e.indexOf(s)<0&&De.call(n,s)&&(t[s]=n[s]);return t};import{S as rt,i as st,s as it,e as at,c as ot,a as ct,d as V,b as we,f as B,g as q,t as lt,h as ft,j as ut,k as dt,l as C,m as pt,n as M,o as j,p as F,q as I,r as ht,u as _t,v as $e,w as z,x as se,y as J,z as ie,A as ae,B as K,C as oe,D as qe}from"./chunks/index-c61749f5.js";import{w as ue}from"./chunks/index-f9918abc.js";let ze="",He="";function mt(n){ze=n.base,He=n.assets||ze}function gt(n){let e,t,s;const l=[n[1]||{}];var c=n[0][0];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&2?ie(l,[ae(r[1]||{})]):{};if(c!==(c=r[0][0])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function wt(n){let e,t,s;const l=[n[1]||{}];var c=n[0][0];function f(r){let i={$$slots:{default:[$t]},$$scope:{ctx:r}};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f(n))),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&2?ie(l,[ae(r[1]||{})]):{};if(i&525&&(a.$$scope={dirty:i,ctx:r}),c!==(c=r[0][0])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f(r)),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function bt(n){let e,t,s;const l=[n[2]||{}];var c=n[0][1];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&4?ie(l,[ae(r[2]||{})]):{};if(c!==(c=r[0][1])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function yt(n){let e,t,s;const l=[n[2]||{}];var c=n[0][1];function f(r){let i={$$slots:{default:[vt]},$$scope:{ctx:r}};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f(n))),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&4?ie(l,[ae(r[2]||{})]):{};if(i&521&&(a.$$scope={dirty:i,ctx:r}),c!==(c=r[0][1])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f(r)),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function vt(n){let e,t,s;const l=[n[3]||{}];var c=n[0][2];function f(r){let i={};for(let a=0;a<l.length;a+=1)i=oe(i,l[a]);return{props:i}}return c&&(e=new c(f())),{c(){e&&z(e.$$.fragment),t=C()},l(r){e&&se(e.$$.fragment,r),t=C()},m(r,i){e&&J(e,r,i),q(r,t,i),s=!0},p(r,i){const a=i&8?ie(l,[ae(r[3]||{})]):{};if(c!==(c=r[0][2])){if(e){M();const d=e;j(d.$$.fragment,1,0,()=>{K(d,1)}),F()}c?(e=new c(f()),z(e.$$.fragment),I(e.$$.fragment,1),J(e,t.parentNode,t)):e=null}else c&&e.$set(a)},i(r){s||(e&&I(e.$$.fragment,r),s=!0)},o(r){e&&j(e.$$.fragment,r),s=!1},d(r){r&&V(t),e&&K(e,r)}}}function $t(n){let e,t,s,l;const c=[yt,bt],f=[];function r(i,a){return i[0][2]?0:1}return e=r(n),t=f[e]=c[e](n),{c(){t.c(),s=C()},l(i){t.l(i),s=C()},m(i,a){f[e].m(i,a),q(i,s,a),l=!0},p(i,a){let d=e;e=r(i),e===d?f[e].p(i,a):(M(),j(f[d],1,1,()=>{f[d]=null}),F(),t=f[e],t?t.p(i,a):(t=f[e]=c[e](i),t.c()),I(t,1),t.m(s.parentNode,s))},i(i){l||(I(t),l=!0)},o(i){j(t),l=!1},d(i){f[e].d(i),i&&V(s)}}}function Je(n){let e,t=n[5]&&Ke(n);return{c(){e=at("div"),t&&t.c(),this.h()},l(s){e=ot(s,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=ct(e);t&&t.l(l),l.forEach(V),this.h()},h(){we(e,"id","svelte-announcer"),we(e,"aria-live","assertive"),we(e,"aria-atomic","true"),B(e,"position","absolute"),B(e,"left","0"),B(e,"top","0"),B(e,"clip","rect(0 0 0 0)"),B(e,"clip-path","inset(50%)"),B(e,"overflow","hidden"),B(e,"white-space","nowrap"),B(e,"width","1px"),B(e,"height","1px")},m(s,l){q(s,e,l),t&&t.m(e,null)},p(s,l){s[5]?t?t.p(s,l):(t=Ke(s),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(s){s&&V(e),t&&t.d()}}}function Ke(n){let e;return{c(){e=lt(n[6])},l(t){e=ft(t,n[6])},m(t,s){q(t,e,s)},p(t,s){s&64&&ut(e,t[6])},d(t){t&&V(e)}}}function kt(n){let e,t,s,l,c;const f=[wt,gt],r=[];function i(d,R){return d[0][1]?0:1}e=i(n),t=r[e]=f[e](n);let a=n[4]&&Je(n);return{c(){t.c(),s=dt(),a&&a.c(),l=C()},l(d){t.l(d),s=pt(d),a&&a.l(d),l=C()},m(d,R){r[e].m(d,R),q(d,s,R),a&&a.m(d,R),q(d,l,R),c=!0},p(d,[R]){let y=e;e=i(d),e===y?r[e].p(d,R):(M(),j(r[y],1,1,()=>{r[y]=null}),F(),t=r[e],t?t.p(d,R):(t=r[e]=f[e](d),t.c()),I(t,1),t.m(s.parentNode,s)),d[4]?a?a.p(d,R):(a=Je(d),a.c(),a.m(l.parentNode,l)):a&&(a.d(1),a=null)},i(d){c||(I(t),c=!0)},o(d){j(t),c=!1},d(d){r[e].d(d),d&&V(s),a&&a.d(d),d&&V(l)}}}function Et(n,e,t){let{stores:s}=e,{page:l}=e,{components:c}=e,{props_0:f=null}=e,{props_1:r=null}=e,{props_2:i=null}=e;ht("__svelte__",s),_t(s.page.notify);let a=!1,d=!1,R=null;return $e(()=>{const y=s.page.subscribe(()=>{a&&(t(5,d=!0),t(6,R=document.title||"untitled page"))});return t(4,a=!0),y}),n.$$set=y=>{"stores"in y&&t(7,s=y.stores),"page"in y&&t(8,l=y.page),"components"in y&&t(0,c=y.components),"props_0"in y&&t(1,f=y.props_0),"props_1"in y&&t(2,r=y.props_1),"props_2"in y&&t(3,i=y.props_2)},n.$$.update=()=>{n.$$.dirty&384&&s.page.set(l)},[c,f,r,i,a,d,R,s,l]}class Rt extends rt{constructor(e){super(),st(this,e,Et,kt,it,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const St="modulepreload",Be={},Lt="https://hf.space/embed/ai-guru/composer/_app/",be=function(e,t){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=`${Lt}${s}`,s in Be)return;Be[s]=!0;const l=s.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":St,l||(f.as="script",f.crossOrigin=""),f.href=s,document.head.appendChild(f),l)return new Promise((r,i)=>{f.addEventListener("load",r),f.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},Ut={},Ee=[()=>be(()=>import("./layout.svelte-0c060267.js"),["layout.svelte-0c060267.js","chunks/index-c61749f5.js"]),()=>be(()=>import("./error.svelte-83166d57.js"),["error.svelte-83166d57.js","chunks/index-c61749f5.js"]),()=>be(()=>import("./pages/index.svelte-a12665f4.js"),["pages/index.svelte-a12665f4.js","assets/pages/index.svelte-45cd6b36.css","chunks/index-c61749f5.js","chunks/index-f9918abc.js"])],At={"":[[0,2],[1]]};function We(n){return n instanceof Error||n&&n.name&&n.message?n:new Error(JSON.stringify(n))}function Ye(n){if(n.fallthrough)throw new Error("fallthrough is no longer supported. Use matchers instead: https://kit.svelte.dev/docs/routing#advanced-routing-matching");if("maxage"in n)throw new Error("maxage should be replaced with cache: { maxage }");const e=n.status&&n.status>=400&&n.status<=599&&!n.redirect;if(n.error||e){const t=n.status;if(!n.error&&e)return{status:t||500,error:new Error};const s=typeof n.error=="string"?new Error(n.error):n.error;return s instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:s}):{status:t,error:s}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof s}"`)}}if(n.redirect){if(!n.status||Math.floor(n.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof n.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(n.dependencies&&(!Array.isArray(n.dependencies)||n.dependencies.some(t=>typeof t!="string")))return{status:500,error:new Error('"dependencies" property returned from load() must be of type string[]')};if(n.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return n}function Nt(n,e){return n==="/"||e==="ignore"?n:e==="never"?n.endsWith("/")?n.slice(0,-1):n:e==="always"&&!n.endsWith("/")?n+"/":n}function Ot(n){let e=5381,t=n.length;if(typeof n=="string")for(;t;)e=e*33^n.charCodeAt(--t);else for(;t;)e=e*33^n[--t];return(e>>>0).toString(36)}function Me(n){let e=n.baseURI;if(!e){const t=n.getElementsByTagName("base");e=t.length?t[0].href:n.URL}return e}function ke(){return{x:pageXOffset,y:pageYOffset}}function Fe(n){return n.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function Ge(n){return n instanceof SVGAElement?new URL(n.href.baseVal,document.baseURI):new URL(n.href)}function Xe(n){const e=ue(n);let t=!0;function s(){t=!0,e.update(f=>f)}function l(f){t=!1,e.set(f)}function c(f){let r;return e.subscribe(i=>{(r===void 0||t&&i!==r)&&f(r=i)})}return{notify:s,set:l,subscribe:c}}function xt(){const{set:n,subscribe:e}=ue(!1),t="1651224666680";let s;async function l(){clearTimeout(s);const f=await fetch(`https://hf.space/embed/ai-guru/composer/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(f.ok){const{version:r}=await f.json(),i=r!==t;return i&&(n(!0),clearTimeout(s)),i}else throw new Error(`Version check failed: ${f.status}`)}return{subscribe:e,check:l}}function Pt(n,e){let s=`script[sveltekit\\:data-type="data"][sveltekit\\:data-url=${JSON.stringify(typeof n=="string"?n:n.url)}]`;e&&typeof e.body=="string"&&(s+=`[sveltekit\\:data-body="${Ot(e.body)}"]`);const l=document.querySelector(s);if(l&&l.textContent){const c=JSON.parse(l.textContent),{body:f}=c,r=Ve(c,["body"]);return Promise.resolve(new Response(f,r))}return fetch(n,e)}const Ct=/^(\.\.\.)?(\w+)(?:=(\w+))?$/;function jt(n){const e=[],t=[];let s=!0;return{pattern:n===""?/^\/$/:new RegExp(`^${decodeURIComponent(n).split(/(?:@[a-zA-Z0-9_-]+)?(?:\/|$)/).map((c,f,r)=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(c);if(i)return e.push(i[1]),t.push(i[2]),"(?:/(.*))?";const a=f===r.length-1;return c&&"/"+c.split(/\[(.+?)\]/).map((d,R)=>{if(R%2){const[,y,Z,G]=Ct.exec(d);return e.push(Z),t.push(G),y?"(.*?)":"([^/]+?)"}return a&&d.includes(".")&&(s=!1),d.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${s?"/?":""}$`),names:e,types:t}}function It(n,e,t,s){const l={};for(let c=0;c<e.length;c+=1){const f=e[c],r=t[c],i=n[c+1]||"";if(r){const a=s[r];if(!a)throw new Error(`Missing "${r}" param matcher`);if(!a(i))return}l[f]=i}return l}function Tt(n,e,t){return Object.entries(e).map(([l,[c,f,r]])=>{const{pattern:i,names:a,types:d}=jt(l);return{id:l,exec:R=>{const y=i.exec(R);if(y)return It(y,a,d,t)},a:c.map(R=>n[R]),b:f.map(R=>n[R]),has_shadow:!!r}})}const Qe="sveltekit:scroll",W="sveltekit:index",ye=Tt(Ee,At,Ut),Dt=Ee[0](),Vt=Ee[1](),Ze={};let re={};try{re=JSON.parse(sessionStorage[Qe])}catch{}function ve(n){re[n]=ke()}function qt({target:n,session:e,base:t,trailing_slash:s}){var Ce;const l=new Map,c=[],f={url:Xe({}),page:Xe({}),navigating:ue(null),session:ue(e),updated:xt()},r={id:null,promise:null},i={before_navigate:[],after_navigate:[]};let a={branch:[],error:null,session_id:0,stuff:Ze,url:null},d=!1,R=!0,y=!1,Z=1,G=null,Re,Se,Le=!1;f.session.subscribe(async o=>{Se=o,Le&&(Z+=1,_e(new URL(location.href),[],!0))}),Le=!0;let X=!0,T=(Ce=history.state)==null?void 0:Ce[W];T||(T=Date.now(),history.replaceState(ne(P({},history.state),{[W]:T}),"",location.href));const de=re[T];de&&(history.scrollRestoration="manual",scrollTo(de.x,de.y));let pe=!1,he,Ue;async function Ae(o,{noscroll:p=!1,replaceState:w=!1,keepfocus:u=!1,state:h={}},b){const _=new URL(o,Me(document));if(X)return ge({url:_,scroll:p?ke():null,keepfocus:u,redirect_chain:b,details:{state:h,replaceState:w},accepted:()=>{},blocked:()=>{}});await ee(_)}async function Ne(o){const p=Pe(o);if(!p)throw new Error("Attempted to prefetch a URL that does not belong to this app");return r.promise=xe(p,!1),r.id=p.id,r.promise}async function _e(o,p,w,u){var g,$,S;const h=Pe(o),b=Ue={};let _=h&&await xe(h,w);if(!_&&o.origin===location.origin&&o.pathname===location.pathname&&(_=await Q({status:404,error:new Error(`Not found: ${o.pathname}`),url:o,routeId:null})),!_)return await ee(o),!1;if(Ue!==b)return!1;if(c.length=0,_.redirect)if(p.length>10||p.includes(o.pathname))_=await Q({status:500,error:new Error("Redirect loop"),url:o,routeId:null});else return X?Ae(new URL(_.redirect,o).href,{},[...p,o.pathname]):await ee(new URL(_.redirect,location.href)),!1;else(($=(g=_.props)==null?void 0:g.page)==null?void 0:$.status)>=400&&await f.updated.check()&&await ee(o);if(y=!0,u&&u.details){const{details:k}=u,E=k.replaceState?0:1;k.state[W]=T+=E,history[k.replaceState?"replaceState":"pushState"](k.state,"",o)}if(d?(a=_.state,Re.$set(_.props)):Oe(_),u){const{scroll:k,keepfocus:E}=u;if(!E){const m=document.body,A=m.getAttribute("tabindex");(S=getSelection())==null||S.removeAllRanges(),m.tabIndex=-1,m.focus(),A!==null?m.setAttribute("tabindex",A):m.removeAttribute("tabindex")}if(await qe(),R){const m=o.hash&&document.getElementById(o.hash.slice(1));k?scrollTo(k.x,k.y):m?m.scrollIntoView():scrollTo(0,0)}}else await qe();r.promise=null,r.id=null,R=!0,y=!1,_.props.page&&(he=_.props.page);const v=_.state.branch[_.state.branch.length-1];return X=(v==null?void 0:v.module.router)!==!1,!0}function Oe(o){a=o.state;const p=document.querySelector("style[data-sveltekit]");if(p&&p.remove(),he=o.props.page,Re=new Rt({target:n,props:ne(P({},o.props),{stores:f}),hydrate:!0}),d=!0,X){const w={from:null,to:new URL(location.href)};i.after_navigate.forEach(u=>u(w))}}async function me({url:o,params:p,stuff:w,branch:u,status:h,error:b,routeId:_}){var m,A;const v=u.filter(Boolean),g=v.find(U=>{var O;return(O=U.loaded)==null?void 0:O.redirect}),$={redirect:(m=g==null?void 0:g.loaded)==null?void 0:m.redirect,state:{url:o,params:p,branch:u,error:b,stuff:w,session_id:Z},props:{components:v.map(U=>U.module.default)}};for(let U=0;U<v.length;U+=1){const O=v[U].loaded;$.props[`props_${U}`]=O?await O.props:null}if(!a.url||o.href!==a.url.href||a.error!==b||a.stuff!==w){$.props.page={error:b,params:p,routeId:_,status:h,stuff:w,url:o};const U=(O,L)=>{Object.defineProperty($.props.page,O,{get:()=>{throw new Error(`$page.${O} has been replaced by $page.url.${L}`)}})};U("origin","origin"),U("path","pathname"),U("query","searchParams")}const k=v[v.length-1],E=(A=k==null?void 0:k.loaded)==null?void 0:A.cache;if(E){const U=o.pathname+o.search;let O=!1;const L=()=>{l.get(U)===$&&l.delete(U),x(),clearTimeout(N)},N=setTimeout(L,E.maxage*1e3),x=f.session.subscribe(()=>{O&&L()});O=!0,l.set(U,$)}return $}async function H({status:o,error:p,module:w,url:u,params:h,stuff:b,props:_,routeId:v}){const g={module:w,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:b};function $(E){const{href:m}=new URL(E,u);g.uses.dependencies.add(m)}_&&g.uses.dependencies.add(u.href);const S={};for(const E in h)Object.defineProperty(S,E,{get(){return g.uses.params.add(E),h[E]},enumerable:!0});const k=Se;if(w.load){const E={routeId:v,params:S,props:_||{},get url(){return g.uses.url=!0,u},get session(){return g.uses.session=!0,k},get stuff(){return g.uses.stuff=!0,P({},b)},fetch(A,U){const O=typeof A=="string"?A:A.url;return $(O),d?fetch(A,U):Pt(A,U)},status:o!=null?o:null,error:p!=null?p:null},m=await w.load.call(null,E);if(!m)throw new Error("load function must return a value");g.loaded=Ye(m),g.loaded.stuff&&(g.stuff=g.loaded.stuff),g.loaded.dependencies&&g.loaded.dependencies.forEach($)}else _&&(g.loaded=Ye({props:_}));return g}async function xe({id:o,url:p,params:w,route:u},h){var A,U,O;if(r.id===o&&r.promise)return r.promise;if(!h){const L=l.get(o);if(L)return L}const{a:b,b:_,has_shadow:v}=u,g=a.url&&{url:o!==a.url.pathname+a.url.search,params:Object.keys(w).filter(L=>a.params[L]!==w[L]),session:Z!==a.session_id};let $=[],S=Ze,k=!1,E=200,m=null;b.forEach(L=>L());e:for(let L=0;L<b.length;L+=1){let N;try{if(!b[L])continue;const x=await b[L](),D=a.branch[L];if(!D||x!==D.module||g.url&&D.uses.url||g.params.some(Y=>D.uses.params.has(Y))||g.session&&D.uses.session||Array.from(D.uses.dependencies).some(Y=>c.some(le=>le(Y)))||k&&D.uses.stuff){let Y={};const le=v&&L===b.length-1;if(le){const te=await fetch(`${p.pathname}${p.pathname.endsWith("/")?"":"/"}__data.json${p.search}`,{headers:{"x-sveltekit-load":"true"}});if(te.ok){const je=te.headers.get("x-sveltekit-location");if(je)return{redirect:je,props:{},state:a};Y=te.status===204?{}:await te.json()}else E=te.status,m=new Error("Failed to load data")}if(m||(N=await H({module:x,url:p,params:w,props:Y,stuff:S,routeId:u.id})),N&&(le&&(N.uses.url=!0),N.loaded)){if(N.loaded.error&&(E=N.loaded.status,m=N.loaded.error),N.loaded.redirect)return{redirect:N.loaded.redirect,props:{},state:a};N.loaded.stuff&&(k=!0)}}else N=D}catch(x){E=500,m=We(x)}if(m){for(;L--;)if(_[L]){let x,D,ce=L;for(;!(D=$[ce]);)ce-=1;try{if(x=await H({status:E,error:m,module:await _[L](),url:p,params:w,stuff:D.stuff,routeId:u.id}),(A=x==null?void 0:x.loaded)!=null&&A.error)continue;(U=x==null?void 0:x.loaded)!=null&&U.stuff&&(S=P(P({},S),x.loaded.stuff)),$=$.slice(0,ce+1).concat(x);break e}catch{continue}}return await Q({status:E,error:m,url:p,routeId:u.id})}else(O=N==null?void 0:N.loaded)!=null&&O.stuff&&(S=P(P({},S),N.loaded.stuff)),$.push(N)}return await me({url:p,params:w,stuff:S,branch:$,status:E,error:m,routeId:u.id})}async function Q({status:o,error:p,url:w,routeId:u}){var v,g;const h={},b=await H({module:await Dt,url:w,params:h,stuff:{},routeId:u}),_=await H({status:o,error:p,module:await Vt,url:w,params:h,stuff:b&&b.loaded&&b.loaded.stuff||{},routeId:u});return await me({url:w,params:h,stuff:P(P({},(v=b==null?void 0:b.loaded)==null?void 0:v.stuff),(g=_==null?void 0:_.loaded)==null?void 0:g.stuff),branch:[b,_],status:o,error:p,routeId:u})}function Pe(o){if(o.origin!==location.origin||!o.pathname.startsWith(t))return;const p=decodeURI(o.pathname.slice(t.length)||"/");for(const w of ye){const u=w.exec(p);if(u)return{id:o.pathname+o.search,route:w,params:u,url:o}}}async function ge({url:o,scroll:p,keepfocus:w,redirect_chain:u,details:h,accepted:b,blocked:_}){const v=a.url;let g=!1;const $={from:v,to:o,cancel:()=>g=!0};if(i.before_navigate.forEach(m=>m($)),g){_();return}const S=Nt(o.pathname,s),k=new URL(o.origin+S+o.search+o.hash);if(ve(T),b(),d&&f.navigating.set({from:a.url,to:k}),await _e(k,u,!1,{scroll:p,keepfocus:w,details:h})){const m={from:v,to:k};i.after_navigate.forEach(A=>A(m)),f.navigating.set(null)}}function ee(o){return location.href=o.href,new Promise(()=>{})}return{after_navigate:o=>{$e(()=>(i.after_navigate.push(o),()=>{const p=i.after_navigate.indexOf(o);i.after_navigate.splice(p,1)}))},before_navigate:o=>{$e(()=>(i.before_navigate.push(o),()=>{const p=i.before_navigate.indexOf(o);i.before_navigate.splice(p,1)}))},disable_scroll_handling:()=>{(y||!d)&&(R=!1)},goto:(o,p={})=>Ae(o,p,[]),invalidate:o=>{if(typeof o=="function")c.push(o);else{const{href:p}=new URL(o,location.href);c.push(w=>w===p)}return G||(G=Promise.resolve().then(async()=>{await _e(new URL(location.href),[],!0),G=null})),G},prefetch:async o=>{const p=new URL(o,Me(document));await Ne(p)},prefetch_routes:async o=>{const w=(o?ye.filter(u=>o.some(h=>u.exec(h))):ye).map(u=>Promise.all(u.a.map(h=>h())));await Promise.all(w)},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",u=>{let h=!1;const b={from:a.url,to:null,cancel:()=>h=!0};i.before_navigate.forEach(_=>_(b)),h?(u.preventDefault(),u.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ve(T);try{sessionStorage[Qe]=JSON.stringify(re)}catch{}}});const o=u=>{const h=Fe(u);h&&h.href&&h.hasAttribute("sveltekit:prefetch")&&Ne(Ge(h))};let p;const w=u=>{clearTimeout(p),p=setTimeout(()=>{var h;(h=u.target)==null||h.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",o),addEventListener("mousemove",w),addEventListener("sveltekit:trigger_prefetch",o),addEventListener("click",u=>{if(!X||u.button||u.which!==1||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.defaultPrevented)return;const h=Fe(u);if(!h||!h.href)return;const b=h instanceof SVGAElement,_=Ge(h);if(!b&&_.origin==="null")return;const v=(h.getAttribute("rel")||"").split(/\s+/);if(h.hasAttribute("download")||v.includes("external")||h.hasAttribute("sveltekit:reload")||(b?h.target.baseVal:h.target))return;const[g,$]=_.href.split("#");if($!==void 0&&g===location.href.split("#")[0]){pe=!0,ve(T),f.page.set(ne(P({},he),{url:_})),f.page.notify();return}ge({url:_,scroll:h.hasAttribute("sveltekit:noscroll")?ke():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:_.href===location.href},accepted:()=>u.preventDefault(),blocked:()=>u.preventDefault()})}),addEventListener("popstate",u=>{if(u.state&&X){if(u.state[W]===T)return;ge({url:new URL(location.href),scroll:re[u.state[W]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{T=u.state[W]},blocked:()=>{const h=T-u.state[W];history.go(h)}})}}),addEventListener("hashchange",()=>{pe&&(pe=!1,history.replaceState(ne(P({},history.state),{[W]:++T}),"",location.href))})},_hydrate:async({status:o,error:p,nodes:w,params:u,routeId:h})=>{const b=new URL(location.href),_=[];let v={},g,$;try{for(let S=0;S<w.length;S+=1){const k=S===w.length-1;let E;if(k){const A=document.querySelector('script[sveltekit\\:data-type="props"]');A&&(E=JSON.parse(A.textContent))}const m=await H({module:await w[S],url:b,params:u,stuff:v,status:k?o:void 0,error:k?p:void 0,props:E,routeId:h});if(E&&(m.uses.dependencies.add(b.href),m.uses.url=!0),_.push(m),m&&m.loaded)if(m.loaded.error){if(p)throw m.loaded.error;$={status:m.loaded.status,error:m.loaded.error,url:b,routeId:h}}else m.loaded.stuff&&(v=P(P({},v),m.loaded.stuff))}g=$?await Q($):await me({url:b,params:u,stuff:v,branch:_,status:o,error:p,routeId:h})}catch(S){if(p)throw S;g=await Q({status:500,error:We(S),url:b,routeId:h})}g.redirect&&await ee(new URL(g.redirect,location.href)),Oe(g)}}}async function Bt({paths:n,target:e,session:t,route:s,spa:l,trailing_slash:c,hydrate:f}){const r=qt({target:e,session:t,base:n.base,trailing_slash:c});mt(n),f&&await r._hydrate(f),s&&(l&&r.goto(location.href,{replaceState:!0}),r._start_router()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{Bt as start};
 
 
static/_app/version.json CHANGED
@@ -1 +1 @@
1
- {"version":"1651224666680"}
 
1
+ {"version":"1651227702162"}
templates/index.html CHANGED
@@ -13,11 +13,11 @@
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.2/iframeResizer.contentWindow.min.js"></script>
14
  <meta http-equiv="content-security-policy" content="">
15
  <link rel="stylesheet" href="https://hf.space/embed/ai-guru/composer/_app/assets/pages/index.svelte-45cd6b36.css">
16
- <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/start-d715fd74.js">
17
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/chunks/index-c61749f5.js">
18
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/chunks/index-f9918abc.js">
19
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/layout.svelte-0c060267.js">
20
- <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/pages/index.svelte-a12665f4.js">
21
  </head>
22
  <body>
23
  <div>
@@ -83,7 +83,7 @@
83
 
84
 
85
  <script type="module" data-hydrate="13n5810">
86
- import { start } from "https://hf.space/embed/ai-guru/composer/_app/start-d715fd74.js";
87
  start({
88
  target: document.querySelector('[data-hydrate="13n5810"]').parentNode,
89
  paths: {"base":"","assets":""},
@@ -96,7 +96,7 @@
96
  error: null,
97
  nodes: [
98
  import("https://hf.space/embed/ai-guru/composer/_app/layout.svelte-0c060267.js"),
99
- import("https://hf.space/embed/ai-guru/composer/_app/pages/index.svelte-a12665f4.js")
100
  ],
101
  params: {},
102
  routeId: ""
 
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.2/iframeResizer.contentWindow.min.js"></script>
14
  <meta http-equiv="content-security-policy" content="">
15
  <link rel="stylesheet" href="https://hf.space/embed/ai-guru/composer/_app/assets/pages/index.svelte-45cd6b36.css">
16
+ <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/start-b4f523d8.js">
17
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/chunks/index-c61749f5.js">
18
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/chunks/index-f9918abc.js">
19
  <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/layout.svelte-0c060267.js">
20
+ <link rel="modulepreload" href="https://hf.space/embed/ai-guru/composer/_app/pages/index.svelte-416adc10.js">
21
  </head>
22
  <body>
23
  <div>
 
83
 
84
 
85
  <script type="module" data-hydrate="13n5810">
86
+ import { start } from "https://hf.space/embed/ai-guru/composer/_app/start-b4f523d8.js";
87
  start({
88
  target: document.querySelector('[data-hydrate="13n5810"]').parentNode,
89
  paths: {"base":"","assets":""},
 
96
  error: null,
97
  nodes: [
98
  import("https://hf.space/embed/ai-guru/composer/_app/layout.svelte-0c060267.js"),
99
+ import("https://hf.space/embed/ai-guru/composer/_app/pages/index.svelte-416adc10.js")
100
  ],
101
  params: {},
102
  routeId: ""