import{S as E,i as j,s as G,k as d,l as u,m as g,h as f,n as m,b as p,B as b,I as M,o as S,e as k,q as V,a as w,r as x,c as y,J as I,G as h,u as B}from"../../chunks/index-b346583a.js";function $(n,a,t){const e=n.slice();return e[2]=a[t],e}function q(n){let a,t,e=n[2].data.prompt+"",s,i,l,r,_;return{c(){a=d("div"),t=d("h1"),s=V(e),i=w(),l=d("img"),_=w(),this.h()},l(o){a=u(o,"DIV",{});var c=g(a);t=u(c,"H1",{});var v=g(t);s=x(v,e),v.forEach(f),i=y(c),l=u(c,"IMG",{src:!0,class:!0}),_=y(c),c.forEach(f),this.h()},h(){I(l.src,r=n[2].data.images[0])||m(l,"src",r),m(l,"class","max-w-[20rem]")},m(o,c){p(o,a,c),h(a,t),h(t,s),h(a,i),h(a,l),h(a,_)},p(o,c){c&1&&e!==(e=o[2].data.prompt+"")&&B(s,e),c&1&&!I(l.src,r=o[2].data.images[0])&&m(l,"src",r)},d(o){o&&f(a)}}}function D(n){let a,t=n[2].data.images.length>0&&q(n);return{c(){t&&t.c(),a=k()},l(e){t&&t.l(e),a=k()},m(e,s){t&&t.m(e,s),p(e,a,s)},p(e,s){e[2].data.images.length>0?t?t.p(e,s):(t=q(e),t.c(),t.m(a.parentNode,a)):t&&(t.d(1),t=null)},d(e){t&&t.d(e),e&&f(a)}}}function C(n){let a,t=n[0],e=[];for(let s=0;si.json()).then(i=>{t(0,e=i),console.log(e)})}return S(()=>{s()}),[e]}class P extends E{constructor(a){super(),j(this,a,J,C,G,{})}}export{P as default};