import{_ as P}from"../chunks/preload-helper.a4192956.js";import{s as j,n as k,o as L}from"../chunks/scheduler.e108d1fd.js";import{S as M,i as N,g,s as b,h as x,j as S,y as C,c as v,f as y,k as p,a as w,x as f,z as I,m as O,n as R,o as T}from"../chunks/index.7e6319f2.js";function E(l){let e,s=(!l[0]||!l[1]?"Loading...":JSON.stringify(l[1],null,2))+"",u;return{c(){e=g("pre"),u=O(s),this.h()},l(t){e=x(t,"PRE",{class:!0});var a=S(e);u=R(a,s),a.forEach(y),this.h()},h(){p(e,"class","bg-gray-100 p-2 rounded")},m(t,a){w(t,e,a),f(e,u)},p(t,a){a&3&&s!==(s=(!t[0]||!t[1]?"Loading...":JSON.stringify(t[1],null,2))+"")&&T(u,s)},d(t){t&&y(e)}}}function q(l){let e,s,u="Transformers.js",t,a,d="SvelteKit Static template (client-side)",m,i,o,h,_,r=l[0]!==null&&E(l);return{c(){e=g("main"),s=g("h1"),s.textContent=u,t=b(),a=g("h2"),a.textContent=d,m=b(),i=g("input"),o=b(),r&&r.c(),this.h()},l(c){e=x(c,"MAIN",{class:!0});var n=S(e);s=x(n,"H1",{class:!0,"data-svelte-h":!0}),C(s)!=="svelte-1e9bq3j"&&(s.textContent=u),t=v(n),a=x(n,"H2",{class:!0,"data-svelte-h":!0}),C(a)!=="svelte-1r4npkn"&&(a.textContent=d),m=v(n),i=x(n,"INPUT",{type:!0,class:!0,placeholder:!0}),o=v(n),r&&r.l(n),n.forEach(y),this.h()},h(){p(s,"class","text-5xl font-bold mb-2 text-center"),p(a,"class","text-2xl mb-4 text-center"),p(i,"type","text"),p(i,"class","w-full max-w-xs p-2 border border-gray-300 rounded mb-4"),p(i,"placeholder","Enter text here"),p(e,"class","flex min-h-screen flex-col items-center justify-center p-12")},m(c,n){w(c,e,n),f(e,s),f(e,t),f(e,a),f(e,m),f(e,i),f(e,o),r&&r.m(e,null),h||(_=I(i,"input",l[4]),h=!0)},p(c,[n]){c[0]!==null?r?r.p(c,n):(r=E(c),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i:k,o:k,d(c){c&&y(e),r&&r.d(),h=!1,_()}}}function A(l,e,s){let t,a=null,d=null;L(async()=>{if(!t){const o=await P(()=>import("../chunks/worker.359c8cc9.js"),[],import.meta.url);t=new o.default;const h=_=>{switch(_.data.status){case"initiate":s(0,d=!1);break;case"ready":s(0,d=!0);break;case"complete":s(1,a=_.data.output[0]);break}};t.addEventListener("message",h)}});function m(o){t&&t.postMessage({text:o})}const i=o=>{m(o.target.value)};return l.$$.update=()=>{l.$$.dirty&1&&console.log("ready",d)},[d,a,m,!0,i]}class $ extends M{constructor(e){super(),N(this,e,A,q,j,{prerender:3})}get prerender(){return this.$$.ctx[3]}}export{$ as component};