feat: server playground

This commit is contained in:
Max Richter
2025-10-05 23:52:31 +02:00
parent 6d92c92797
commit 5adc3a3cc1
24 changed files with 805 additions and 1 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{c as d,u as g,a as l,b,r as i,d as m,g as p,e as h,f as v,h as k}from"./B7O2AcR_.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let o=()=>h(s.s);if(n){let a=0,t={};const _=v(()=>{let c=!1;const r=s.s;for(const f in r)r[f]!==t[f]&&(t[f]=r[f],c=!0);return c&&a++,a});o=()=>p(_)}e.b.length&&g(()=>{u(s,o),i(e.b)}),l(()=>{const a=b(()=>e.m.map(m));return()=>{for(const t of a)typeof t=="function"&&t()}}),e.a.length&&l(()=>{u(s,o),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}k();export{x as i};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{af as X,g as $,Z as j,Q as Z,b as y,ag as I,R as U,O as p,A as g,ah as ee,Y as R,z as te,B as se,ai as M,H as ne,J as d,aj as C,N as D,a6 as L,ak as E,al as P,am as ie,an as A,c as f,ao as ae,ap as N,F as S,x as re,D as oe,aq as z,ar as le,E as ue,as as fe,at as ce,au as V,av as he,aw as k,ax as _e,ay as de,az as O,G as w,aA as pe,aB as ge,aC as be,aD as ve,aE as B,aF as ye,aG as T,aH as me,I as Ee,aI as we,p as Te,aJ as Re,aK as xe,aL as Ae,l as Se,y as x,aM as Ce,aN as m,a as De,aO as Ne,aP as ke,aQ as W,a8 as Oe,aR as Fe,aS as Me,aT as Ye,aU as qe,aV as He,aW as Ie,aX as Le,aY as Pe}from"./B7O2AcR_.js";function ze(t){let e=0,s=j(0),n;return()=>{X()&&($(s),Z(()=>(e===0&&(n=y(()=>t(()=>I(s)))),e+=1,()=>{U(()=>{e-=1,e===0&&(n?.(),n=void 0,I(s))})})))}}var Be=ue|fe|ce;function $e(t,e,s){new je(t,e,s)}class je{parent;#n=!1;#t;#p=g?p:null;#i;#f;#a;#s=null;#e=null;#r=null;#o=null;#c=0;#l=0;#h=!1;#u=null;#b=()=>{this.#u&&ee(this.#u,this.#c)};#v=ze(()=>(this.#u=j(this.#c),()=>{this.#u=null}));constructor(e,s,n){this.#t=e,this.#i=s,this.#f=n,this.parent=R.b,this.#n=!!this.#i.pending,this.#a=te(()=>{if(R.b=this,g){const i=this.#p;se(),i.nodeType===M&&i.data===ne?this.#m():this.#y()}else{try{this.#s=d(()=>n(this.#t))}catch(i){this.error(i)}this.#l>0?this.#d():this.#n=!1}},Be),g&&(this.#t=p)}#y(){try{this.#s=d(()=>this.#f(this.#t))}catch(e){this.error(e)}this.#n=!1}#m(){const e=this.#i.pending;e&&(this.#e=d(()=>e(this.#t)),C.enqueue(()=>{this.#s=this.#_(()=>(C.ensure(),d(()=>this.#f(this.#t)))),this.#l>0?this.#d():(D(this.#e,()=>{this.#e=null}),this.#n=!1)}))}is_pending(){return this.#n||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#i.pending}#_(e){var s=R,n=A,i=f;L(this.#a),E(this.#a),P(this.#a.ctx);try{return e()}catch(a){return ie(a),null}finally{L(s),E(n),P(i)}}#d(){const e=this.#i.pending;this.#s!==null&&(this.#o=document.createDocumentFragment(),Ue(this.#s,this.#o)),this.#e===null&&(this.#e=d(()=>e(this.#t)))}#g(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(e);return}this.#l+=e,this.#l===0&&(this.#n=!1,this.#e&&D(this.#e,()=>{this.#e=null}),this.#o&&(this.#t.before(this.#o),this.#o=null))}update_pending_count(e){this.#g(e),this.#c+=e,ae.add(this.#b)}get_effect_pending(){return this.#v(),$(this.#u)}error(e){var s=this.#i.onerror;let n=this.#i.failed;if(this.#h||!s&&!n)throw e;this.#s&&(N(this.#s),this.#s=null),this.#e&&(N(this.#e),this.#e=null),this.#r&&(N(this.#r),this.#r=null),g&&(S(this.#p),re(),S(oe()));var i=!1,a=!1;const o=()=>{if(i){he();return}i=!0,a&&le(),C.ensure(),this.#c=0,this.#r!==null&&D(this.#r,()=>{this.#r=null}),this.#n=this.has_pending_snippet(),this.#s=this.#_(()=>(this.#h=!1,d(()=>this.#f(this.#t)))),this.#l>0?this.#d():this.#n=!1};var r=A;try{E(null),a=!0,s?.(e,o),a=!1}catch(h){z(h,this.#a&&this.#a.parent)}finally{E(r)}n&&U(()=>{this.#r=this.#_(()=>{this.#h=!0;try{return d(()=>{n(this.#t,()=>e,()=>o)})}catch(h){return z(h,this.#a.parent),null}finally{this.#h=!1}})})}}function Ue(t,e){for(var s=t.nodes_start,n=t.nodes_end;s!==null;){var i=s===n?null:V(s);e.append(s),s=i}}function nt(t,e){var s=e==null?"":typeof e=="object"?e+"":e;s!==(t.__t??=t.nodeValue)&&(t.__t=s,t.nodeValue=s+"")}function G(t,e){return J(t,e)}function Ve(t,e){k(),e.intro=e.intro??!1;const s=e.target,n=g,i=p;try{for(var a=_e(s);a&&(a.nodeType!==M||a.data!==de);)a=V(a);if(!a)throw O;w(!0),S(a);const o=J(t,{...e,anchor:a});return w(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
`).some(r=>r.startsWith("https://svelte.dev/e/")))throw o;return o!==O&&console.warn("Failed to hydrate: ",o),e.recover===!1&&pe(),k(),ge(s),w(!1),G(t,e)}finally{w(n),S(i),we()}}const b=new Map;function J(t,{target:e,anchor:s,props:n={},events:i,context:a,intro:o=!0}){k();var r=new Set,h=_=>{for(var c=0;c<_.length;c++){var u=_[c];if(!r.has(u)){r.add(u);var q=me(u);e.addEventListener(u,T,{passive:q});var H=b.get(u);H===void 0?(document.addEventListener(u,T,{passive:q}),b.set(u,1)):b.set(u,H+1)}}};h(be(ve)),B.add(h);var l=void 0,K=ye(()=>{var _=s??e.appendChild(Ee());return $e(_,{pending:()=>{}},c=>{if(a){Te({});var u=f;u.c=a}if(i&&(n.$$events=i),g&&Re(c,null),l=t(c,n)||{},g&&(R.nodes_end=p,p===null||p.nodeType!==M||p.data!==xe))throw Ae(),O;a&&Se()}),()=>{for(var c of r){e.removeEventListener(c,T);var u=b.get(c);--u===0?(document.removeEventListener(c,T),b.delete(c)):b.set(c,u)}B.delete(h),_!==s&&_.parentNode?.removeChild(_)}});return F.set(l,K),l}let F=new WeakMap;function We(t,e){const s=F.get(t);return s?(F.delete(t),s(e)):Promise.resolve()}function Ge(t,e,s){if(t==null)return e(void 0),x;const n=y(()=>t.subscribe(e,s));return n.unsubscribe?()=>n.unsubscribe():n}const v=[];function it(t,e){return{subscribe:Je(t,e).subscribe}}function Je(t,e=x){let s=null;const n=new Set;function i(r){if(Ce(t,r)&&(t=r,s)){const h=!v.length;for(const l of n)l[1](),v.push(l,t);if(h){for(let l=0;l<v.length;l+=2)v[l][0](v[l+1]);v.length=0}}}function a(r){i(r(t))}function o(r,h=x){const l=[r,h];return n.add(l),n.size===1&&(s=e(i,a)||x),r(t),()=>{n.delete(l),n.size===0&&s&&(s(),s=null)}}return{set:i,update:a,subscribe:o}}function at(t){let e;return Ge(t,s=>e=s)(),e}function Qe(){return A===null&&Ne(),(A.ac??=new AbortController).signal}function Q(t){f===null&&m(),Oe&&f.l!==null?Y(f).m.push(t):De(()=>{const e=y(t);if(typeof e=="function")return e})}function Ke(t){f===null&&m(),Q(()=>()=>y(t))}function Xe(t,e,{bubbles:s=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:e,bubbles:s,cancelable:n})}function Ze(){const t=f;return t===null&&m(),(e,s,n)=>{const i=t.s.$$events?.[e];if(i){const a=ke(i)?i.slice():[i],o=Xe(e,s,n);for(const r of a)r.call(t.x,o);return!o.defaultPrevented}return!0}}function et(t){f===null&&m(),f.l===null&&W(),Y(f).b.push(t)}function tt(t){f===null&&m(),f.l===null&&W(),Y(f).a.push(t)}function Y(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const rt=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:tt,beforeUpdate:et,createEventDispatcher:Ze,createRawSnippet:Fe,flushSync:Me,getAbortSignal:Qe,getAllContexts:Ye,getContext:qe,hasContext:He,hydrate:Ve,mount:G,onDestroy:Ke,onMount:Q,setContext:Ie,settled:Le,tick:Pe,unmount:We,untrack:y},Symbol.toStringTag,{value:"Module"}));export{Ge as a,Ke as b,rt as c,at as g,Ve as h,G as m,Q as o,it as r,nt as s,We as u,Je as w};

View File

@@ -0,0 +1 @@
typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");

View File

@@ -0,0 +1 @@
import{z as K,A as y,B as j,E as q,C as Z,H as $,D as z,F as G,G as x,I as H,J as D,K as J,U as Q,L as V,M as W,N as X,O as k,P as ee,Q as re,b as B,R as ne,S as A,y as N,T as se,g as P,V as ie,W as M,X as ae,Y as m,Z as te,_ as R,a0 as ue,a1 as C,a2 as fe,a3 as le,f as ce,a4 as oe,a5 as L,a6 as U,a7 as de,a8 as _e,a9 as pe,aa as ve,ab as S,ac as F,ad as be,ae as he}from"./B7O2AcR_.js";import{a as Se,g as Pe}from"./D02mbrNz.js";function Re(e,r,s=!1){y&&j();var n=e,i=null,a=null,l=Q,d=s?q:0,p=!1;const I=(c,u=!0)=>{p=!0,_(u,c)};var f=null;function g(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var c=l?i:a,u=l?a:i;c&&W(c),u&&X(u,()=>{l?a=null:i=null})}const _=(c,u)=>{if(l===(l=c))return;let E=!1;if(y){const O=Z(n)===$;!!l===O&&(n=z(),G(n),x(!1),E=!0)}var b=V(),o=n;if(b&&(f=document.createDocumentFragment(),f.append(o=H())),l?i??=u&&D(()=>u(o)):a??=u&&D(()=>u(o)),b){var h=J,t=l?i:a,v=l?a:i;t&&h.skipped_effects.delete(t),v&&h.skipped_effects.add(v),h.add_callback(g)}else g();E&&x(!0)};K(()=>{p=!1,r(I),p||_(null,null)},d),y&&(n=k)}function Y(e,r){return e===r||e?.[A]===r}function we(e={},r,s,n){return ee(()=>{var i,a;return re(()=>{i=a,a=[],B(()=>{e!==s(...a)&&(r(e,...a),i&&Y(s(...i),e)&&r(null,...i))})}),()=>{ne(()=>{a&&Y(s(...a),e)&&r(null,...a)})}}),e}let T=!1,w=Symbol();function Ae(e,r,s){const n=s[r]??={store:null,source:se(void 0),unsubscribe:N};if(n.store!==e&&!(w in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=N;else{var i=!0;n.unsubscribe=Se(e,a=>{i?n.source.v=a:M(n.source,a)}),i=!1}return e&&w in s?Pe(e):P(n.source)}function me(){const e={};function r(){ie(()=>{for(var s in e)e[s].unsubscribe();ae(e,w,{enumerable:!1,value:!0})})}return[e,r]}function Ie(e){var r=T;try{return T=!1,[e(),T]}finally{T=r}}const ge={get(e,r){if(!e.exclude.includes(r))return P(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=m;try{U(e.parent_effect),e.special[r]=Oe({get[r](){return e.props[r]}},r,C)}finally{U(n)}}return e.special[r](s),L(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),L(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function xe(e,r){return new Proxy({props:e,exclude:r,special:{},version:te(0),parent_effect:m},ge)}const Ee={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let i=e.props[n];S(i)&&(i=i());const a=R(i,r);if(a&&a.set)return a.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(S(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=R(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===A||r===F)return!1;for(let s of e.props)if(S(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(S(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function De(...e){return new Proxy({props:e},Ee)}function Oe(e,r,s,n){var i=!_e||(s&pe)!==0,a=(s&de)!==0,l=(s&be)!==0,d=n,p=!0,I=()=>(p&&(p=!1,d=l?B(n):n),d),f;if(a){var g=A in e||F in e;f=R(e,r)?.set??(g&&r in e?t=>e[r]=t:void 0)}var _,c=!1;a?[_,c]=Ie(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=I(),f&&(i&&ue(),f(_)));var u;if(i?u=()=>{var t=e[r];return t===void 0?I():(p=!0,t)}:u=()=>{var t=e[r];return t!==void 0&&(d=void 0),t===void 0?d:t},i&&(s&C)===0)return u;if(f){var E=e.$$legacy;return(function(t,v){return arguments.length>0?((!i||!v||E||c)&&f(v?u():t),t):u()})}var b=!1,o=((s&ve)!==0?ce:oe)(()=>(b=!1,u()));a&&P(o);var h=m;return(function(t,v){if(arguments.length>0){const O=v?P(o):i&&a?fe(t):t;return M(o,O),b=!0,d!==void 0&&(d=O),t}return he&&b||(h.f&le)!==0?o.v:P(o)})}export{Ae as a,we as b,me as c,Re as i,xe as l,Oe as p,De as s};