@sockethub/examples 1.0.0-alpha.14 → 1.0.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/build/_app/immutable/chunks/BF3skBIG.js +1 -0
  2. package/build/_app/immutable/chunks/{DTPsrcK7.js → BJRrkVji.js} +1 -1
  3. package/build/_app/immutable/chunks/{DZxyUSp9.js → BaJgcY-K.js} +1 -1
  4. package/build/_app/immutable/chunks/{DhU_U-a9.js → DDdxxuPN.js} +1 -1
  5. package/build/_app/immutable/chunks/{CE_Br0Li.js → DJmaXuzm.js} +3 -3
  6. package/build/_app/immutable/chunks/{De6kqrZW.js → Xcu1kWNr.js} +1 -1
  7. package/build/_app/immutable/chunks/pIrFrRr_.js +1 -0
  8. package/build/_app/immutable/entry/{app.DX05TQx7.js → app.O51Bq4gE.js} +2 -2
  9. package/build/_app/immutable/entry/start.CsBI0vdE.js +1 -0
  10. package/build/_app/immutable/nodes/{0.CUKpZtNl.js → 0.BRqQLijI.js} +1 -1
  11. package/build/_app/immutable/nodes/{1.BrfAO1-b.js → 1.DgRkrrFn.js} +1 -1
  12. package/build/_app/immutable/nodes/{2.B1Xhzoi4.js → 2.BPd2TBcL.js} +1 -1
  13. package/build/_app/immutable/nodes/{3.D2Llbnh2.js → 3.CLtTIQ-W.js} +1 -1
  14. package/build/_app/immutable/nodes/{4.PE7b6wi8.js → 4.DnrOHjLB.js} +1 -1
  15. package/build/_app/immutable/nodes/{5.Cc6bNRTx.js → 5.DygHZ5nm.js} +1 -1
  16. package/build/_app/immutable/nodes/{6.D0DWXXhX.js → 6.Be2N6Kf3.js} +1 -1
  17. package/build/_app/immutable/nodes/{7.Dby-1i_s.js → 7.D0zF0cZZ.js} +1 -1
  18. package/build/_app/version.json +1 -1
  19. package/build/dummy.html +7 -7
  20. package/build/feeds.html +7 -7
  21. package/build/index.html +7 -7
  22. package/build/irc.html +7 -7
  23. package/build/metadata.html +7 -7
  24. package/build/xmpp.html +7 -7
  25. package/package.json +3 -3
  26. package/build/_app/immutable/chunks/BfZhcH3H.js +0 -1
  27. package/build/_app/immutable/chunks/BpD8G2jq.js +0 -1
  28. package/build/_app/immutable/entry/start.D5427z_U.js +0 -1
@@ -1 +1 @@
1
- import{d as v,f as _,s as y,a as g}from"./Bh9jqwq3.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./DT_OQU4t.js";import{r as I,s as l,a as k}from"./BB3nrZKK.js";import{b as C}from"./DhU_U-a9.js";import{p as r}from"./B5Mgq-ia.js";var j=_('<div class="w-full space-y-2"><label class="block text-sm font-semibold text-gray-700"> </label> <input/></div>');function E(n,e){h(e,!0);let c=r(e,"type",3,"text"),f=r(e,"placeholder",3,""),o=r(e,"value",15),m=r(e,"class",3,"");var s=j(),t=u(s),p=u(t,!0);d(t);var a=x(t,2);I(a),a.__input=function(...b){var i;(i=e.onInput?()=>e.onInput(o()):void 0)==null||i.apply(this,b)},d(s),w(()=>{l(t,"for",e.id),y(p,e.label),l(a,"id",e.id),l(a,"type",c()),l(a,"placeholder",f()),k(a,1,`w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 text-gray-900 placeholder-gray-500 ${m()??""}`)}),C(a,o),g(n,s),F()}v(["input"]);export{E as F};
1
+ import{d as v,f as _,s as y,a as g}from"./Bh9jqwq3.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./DT_OQU4t.js";import{r as I,s as l,a as k}from"./BB3nrZKK.js";import{b as C}from"./DDdxxuPN.js";import{p as r}from"./B5Mgq-ia.js";var j=_('<div class="w-full space-y-2"><label class="block text-sm font-semibold text-gray-700"> </label> <input/></div>');function E(n,e){h(e,!0);let c=r(e,"type",3,"text"),f=r(e,"placeholder",3,""),o=r(e,"value",15),m=r(e,"class",3,"");var s=j(),t=u(s),p=u(t,!0);d(t);var a=x(t,2);I(a),a.__input=function(...b){var i;(i=e.onInput?()=>e.onInput(o()):void 0)==null||i.apply(this,b)},d(s),w(()=>{l(t,"for",e.id),y(p,e.label),l(a,"id",e.id),l(a,"type",c()),l(a,"placeholder",f()),k(a,1,`w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 text-gray-900 placeholder-gray-500 ${m()??""}`)}),C(a,o),g(n,s),F()}v(["input"]);export{E as F};
@@ -0,0 +1 @@
1
+ var s;const e=((s=globalThis.__sveltekit_1pvd4mq)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_1pvd4mq)==null?void 0:a.assets)??e??"";export{t as a,e as b};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CUKpZtNl.js","../chunks/Bh9jqwq3.js","../chunks/DT_OQU4t.js","../chunks/BB3nrZKK.js","../chunks/CLc0OQ-M.js","../chunks/CE_Br0Li.js","../chunks/CLcl1K30.js","../chunks/CF0IgWN3.js","../chunks/B5Mgq-ia.js","../chunks/BPmfLl8P.js","../assets/sockethub.Bpv0Wt6b.css","../chunks/BfZhcH3H.js","../chunks/BpD8G2jq.js","../assets/0.GKlhshq0.css","../nodes/1.BrfAO1-b.js","../nodes/2.B1Xhzoi4.js","../chunks/CPsRFLIg.js","../nodes/3.D2Llbnh2.js","../chunks/DhU_U-a9.js","../chunks/DTPsrcK7.js","../chunks/DZxyUSp9.js","../nodes/4.PE7b6wi8.js","../chunks/De6kqrZW.js","../nodes/5.Cc6bNRTx.js","../nodes/6.D0DWXXhX.js","../nodes/7.Dby-1i_s.js"])))=>i.map(i=>d[i]);
2
- var M=e=>{throw TypeError(e)};var N=(e,t,r)=>t.has(e)||M("Cannot "+r);var f=(e,t,r)=>(N(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),j=(e,t,r,o)=>(N(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);import{A as Q,M as X,L as Z,N as $,ah as tt,J as et,e as rt,ai as st,aa as at,d as S,ab as nt,g as v,aj as ot,U as it,V as ct,p as ut,i as lt,j as ft,b as I,I as mt,f as x,s as dt,a as ht,c as _t,r as vt,u as V,t as gt}from"../chunks/DT_OQU4t.js";import{h as Et,m as yt,u as Pt,f as J,a as L,c as C,t as bt,s as Rt}from"../chunks/Bh9jqwq3.js";import{o as Ot}from"../chunks/CF0IgWN3.js";import{p as D,i as B}from"../chunks/B5Mgq-ia.js";import{B as At}from"../chunks/CLc0OQ-M.js";function q(e,t,r){Q&&X();var o=new At(e);Z(()=>{var n=t()??null;o.ensure(n,n&&(i=>r(i,n)))},$)}function Y(e,t){return e===t||(e==null?void 0:e[at])===t}function U(e={},t,r,o){return tt(()=>{var n,i;return et(()=>{n=i,i=[],rt(()=>{e!==r(...i)&&(t(e,...i),n&&Y(r(...n),e)&&t(null,...n))})}),()=>{st(()=>{i&&Y(r(...i),e)&&t(null,...i)})}}),e}function Lt(e){return class extends kt{constructor(t){super({component:e,...t})}}}var g,m;class kt{constructor(t){p(this,g);p(this,m);var i;var r=new Map,o=(a,s)=>{var u=ct(s,!1,!1);return r.set(a,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(a,s){return v(r.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===nt?!0:(v(r.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,u){return S(r.get(s)??o(s,u),u),Reflect.set(a,s,u)}});j(this,m,(t.hydrate?Et:yt)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&ot(),j(this,g,n.$$events);for(const a of Object.keys(f(this,m)))a==="$set"||a==="$destroy"||a==="$on"||it(this,a,{get(){return f(this,m)[a]},set(s){f(this,m)[a]=s},enumerable:!0});f(this,m).$set=a=>{Object.assign(n,a)},f(this,m).$destroy=()=>{Pt(f(this,m))}}$set(t){f(this,m).$set(t)}$on(t,r){f(this,g)[t]=f(this,g)[t]||[];const o=(...n)=>r.call(this,...n);return f(this,g)[t].push(o),()=>{f(this,g)[t]=f(this,g)[t].filter(n=>n!==o)}}$destroy(){f(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;const Tt="modulepreload",wt=function(e,t){return new URL(e,t).href},G={},E=function(t,r,o){let n=Promise.resolve();if(r&&r.length>0){let a=function(l){return Promise.all(l.map(_=>Promise.resolve(_).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const s=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),k=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));n=a(r.map(l=>{if(l=wt(l,o),l in G)return;G[l]=!0;const _=l.endsWith(".css"),y=_?'[rel="stylesheet"]':"";if(o)for(let P=s.length-1;P>=0;P--){const c=s[P];if(c.href===l&&(!_||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${y}`))return;const h=document.createElement("link");if(h.rel=_?"stylesheet":Tt,_||(h.as="script"),h.crossOrigin="",h.href=l,k&&h.setAttribute("nonce",k),document.head.appendChild(h),_)return new Promise((P,c)=>{h.addEventListener("load",P),h.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})},Ft={};var xt=J('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),St=J("<!> <!>",1);function pt(e,t){ut(t,!0);let r=D(t,"components",23,()=>[]),o=D(t,"data_0",3,null),n=D(t,"data_1",3,null);lt(()=>t.stores.page.set(t.page)),ft(()=>{t.stores,t.page,t.constructors,r(),t.form,o(),n(),t.stores.page.notify()});let i=I(!1),a=I(!1),s=I(null);Ot(()=>{const c=t.stores.page.subscribe(()=>{v(i)&&(S(a,!0),mt().then(()=>{S(s,document.title||"untitled page",!0)}))});return S(i,!0),c});const u=V(()=>t.constructors[1]);var k=St(),l=x(k);{var _=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(d,It)=>{var F=C(),z=x(F);q(z,()=>v(u),(H,K)=>{U(K(H,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),w=>r()[1]=w,()=>{var w;return(w=r())==null?void 0:w[1]})}),L(d,F)},$$slots:{default:!0}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)},y=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)};B(l,c=>{t.constructors[1]?c(_):c(y,!1)})}var h=dt(l,2);{var P=c=>{var b=xt(),R=_t(b);{var T=O=>{var A=bt();gt(()=>Rt(A,v(s))),L(O,A)};B(R,O=>{v(a)&&O(T)})}vt(b),L(c,b)};B(h,c=>{v(i)&&c(P)})}L(e,k),ht()}const Mt=Lt(pt),Nt=[()=>E(()=>import("../nodes/0.CUKpZtNl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/1.BrfAO1-b.js"),__vite__mapDeps([14,1,2,6,9,12,7,11]),import.meta.url),()=>E(()=>import("../nodes/2.B1Xhzoi4.js"),__vite__mapDeps([15,1,2,6,3,4,11,16]),import.meta.url),()=>E(()=>import("../nodes/3.D2Llbnh2.js"),__vite__mapDeps([17,1,2,8,4,7,3,18,5,6,9,10,16,19,20]),import.meta.url),()=>E(()=>import("../nodes/4.PE7b6wi8.js"),__vite__mapDeps([21,1,2,5,6,7,8,4,3,9,10,18,16,22]),import.meta.url),()=>E(()=>import("../nodes/5.Cc6bNRTx.js"),__vite__mapDeps([23,1,2,8,4,7,19,3,18,5,6,9,10,16,22]),import.meta.url),()=>E(()=>import("../nodes/6.D0DWXXhX.js"),__vite__mapDeps([24,1,2,8,4,7,19,3,18,5,6,9,10,16,22]),import.meta.url),()=>E(()=>import("../nodes/7.Dby-1i_s.js"),__vite__mapDeps([25,1,2,8,4,7,19,3,18,5,6,9,10,16,20,22]),import.meta.url)],Yt=[],Gt={"/":[2],"/dummy":[4],"/feeds":[6],"/irc":[7],"/metadata":[5],"/xmpp":[3]},W={handleError:({error:e})=>{console.error(e)},reroute:()=>{},transport:{}},jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.decode])),Jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.encode])),Wt=!1,zt=(e,t)=>jt[e](t);export{zt as decode,jt as decoders,Gt as dictionary,Jt as encoders,Wt as hash,W as hooks,Ft as matchers,Nt as nodes,Mt as root,Yt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BRqQLijI.js","../chunks/Bh9jqwq3.js","../chunks/DT_OQU4t.js","../chunks/BB3nrZKK.js","../chunks/CLc0OQ-M.js","../chunks/DJmaXuzm.js","../chunks/CLcl1K30.js","../chunks/CF0IgWN3.js","../chunks/B5Mgq-ia.js","../chunks/BPmfLl8P.js","../assets/sockethub.Bpv0Wt6b.css","../chunks/pIrFrRr_.js","../chunks/BF3skBIG.js","../assets/0.GKlhshq0.css","../nodes/1.DgRkrrFn.js","../nodes/2.BPd2TBcL.js","../chunks/CPsRFLIg.js","../nodes/3.CLtTIQ-W.js","../chunks/DDdxxuPN.js","../chunks/BJRrkVji.js","../chunks/BaJgcY-K.js","../nodes/4.DnrOHjLB.js","../chunks/Xcu1kWNr.js","../nodes/5.DygHZ5nm.js","../nodes/6.Be2N6Kf3.js","../nodes/7.D0zF0cZZ.js"])))=>i.map(i=>d[i]);
2
+ var M=e=>{throw TypeError(e)};var N=(e,t,r)=>t.has(e)||M("Cannot "+r);var f=(e,t,r)=>(N(e,t,"read from private field"),r?r.call(e):t.get(e)),p=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),j=(e,t,r,o)=>(N(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);import{A as Q,M as X,L as Z,N as $,ah as tt,J as et,e as rt,ai as st,aa as at,d as S,ab as nt,g as v,aj as ot,U as it,V as ct,p as ut,i as lt,j as ft,b as I,I as mt,f as x,s as dt,a as ht,c as _t,r as vt,u as V,t as gt}from"../chunks/DT_OQU4t.js";import{h as Et,m as yt,u as Pt,f as J,a as L,c as C,t as bt,s as Rt}from"../chunks/Bh9jqwq3.js";import{o as Ot}from"../chunks/CF0IgWN3.js";import{p as D,i as B}from"../chunks/B5Mgq-ia.js";import{B as At}from"../chunks/CLc0OQ-M.js";function q(e,t,r){Q&&X();var o=new At(e);Z(()=>{var n=t()??null;o.ensure(n,n&&(i=>r(i,n)))},$)}function Y(e,t){return e===t||(e==null?void 0:e[at])===t}function U(e={},t,r,o){return tt(()=>{var n,i;return et(()=>{n=i,i=[],rt(()=>{e!==r(...i)&&(t(e,...i),n&&Y(r(...n),e)&&t(null,...n))})}),()=>{st(()=>{i&&Y(r(...i),e)&&t(null,...i)})}}),e}function Lt(e){return class extends kt{constructor(t){super({component:e,...t})}}}var g,m;class kt{constructor(t){p(this,g);p(this,m);var i;var r=new Map,o=(a,s)=>{var u=ct(s,!1,!1);return r.set(a,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(a,s){return v(r.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===nt?!0:(v(r.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,u){return S(r.get(s)??o(s,u),u),Reflect.set(a,s,u)}});j(this,m,(t.hydrate?Et:yt)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((i=t==null?void 0:t.props)!=null&&i.$$host)||t.sync===!1)&&ot(),j(this,g,n.$$events);for(const a of Object.keys(f(this,m)))a==="$set"||a==="$destroy"||a==="$on"||it(this,a,{get(){return f(this,m)[a]},set(s){f(this,m)[a]=s},enumerable:!0});f(this,m).$set=a=>{Object.assign(n,a)},f(this,m).$destroy=()=>{Pt(f(this,m))}}$set(t){f(this,m).$set(t)}$on(t,r){f(this,g)[t]=f(this,g)[t]||[];const o=(...n)=>r.call(this,...n);return f(this,g)[t].push(o),()=>{f(this,g)[t]=f(this,g)[t].filter(n=>n!==o)}}$destroy(){f(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;const Tt="modulepreload",wt=function(e,t){return new URL(e,t).href},G={},E=function(t,r,o){let n=Promise.resolve();if(r&&r.length>0){let a=function(l){return Promise.all(l.map(_=>Promise.resolve(_).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const s=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),k=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));n=a(r.map(l=>{if(l=wt(l,o),l in G)return;G[l]=!0;const _=l.endsWith(".css"),y=_?'[rel="stylesheet"]':"";if(o)for(let P=s.length-1;P>=0;P--){const c=s[P];if(c.href===l&&(!_||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${y}`))return;const h=document.createElement("link");if(h.rel=_?"stylesheet":Tt,_||(h.as="script"),h.crossOrigin="",h.href=l,k&&h.setAttribute("nonce",k),document.head.appendChild(h),_)return new Promise((P,c)=>{h.addEventListener("load",P),h.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})},Ft={};var xt=J('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),St=J("<!> <!>",1);function pt(e,t){ut(t,!0);let r=D(t,"components",23,()=>[]),o=D(t,"data_0",3,null),n=D(t,"data_1",3,null);lt(()=>t.stores.page.set(t.page)),ft(()=>{t.stores,t.page,t.constructors,r(),t.form,o(),n(),t.stores.page.notify()});let i=I(!1),a=I(!1),s=I(null);Ot(()=>{const c=t.stores.page.subscribe(()=>{v(i)&&(S(a,!0),mt().then(()=>{S(s,document.title||"untitled page",!0)}))});return S(i,!0),c});const u=V(()=>t.constructors[1]);var k=St(),l=x(k);{var _=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(d,It)=>{var F=C(),z=x(F);q(z,()=>v(u),(H,K)=>{U(K(H,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),w=>r()[1]=w,()=>{var w;return(w=r())==null?void 0:w[1]})}),L(d,F)},$$slots:{default:!0}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)},y=c=>{const b=V(()=>t.constructors[0]);var R=C(),T=x(R);q(T,()=>v(b),(O,A)=>{U(A(O,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),d=>r()[0]=d,()=>{var d;return(d=r())==null?void 0:d[0]})}),L(c,R)};B(l,c=>{t.constructors[1]?c(_):c(y,!1)})}var h=dt(l,2);{var P=c=>{var b=xt(),R=_t(b);{var T=O=>{var A=bt();gt(()=>Rt(A,v(s))),L(O,A)};B(R,O=>{v(a)&&O(T)})}vt(b),L(c,b)};B(h,c=>{v(i)&&c(P)})}L(e,k),ht()}const Mt=Lt(pt),Nt=[()=>E(()=>import("../nodes/0.BRqQLijI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/1.DgRkrrFn.js"),__vite__mapDeps([14,1,2,6,9,12,7,11]),import.meta.url),()=>E(()=>import("../nodes/2.BPd2TBcL.js"),__vite__mapDeps([15,1,2,6,3,4,11,16]),import.meta.url),()=>E(()=>import("../nodes/3.CLtTIQ-W.js"),__vite__mapDeps([17,1,2,8,4,7,3,18,5,6,9,10,16,19,20]),import.meta.url),()=>E(()=>import("../nodes/4.DnrOHjLB.js"),__vite__mapDeps([21,1,2,5,6,7,8,4,3,9,10,18,16,22]),import.meta.url),()=>E(()=>import("../nodes/5.DygHZ5nm.js"),__vite__mapDeps([23,1,2,8,4,7,19,3,18,5,6,9,10,16,22]),import.meta.url),()=>E(()=>import("../nodes/6.Be2N6Kf3.js"),__vite__mapDeps([24,1,2,8,4,7,19,3,18,5,6,9,10,16,22]),import.meta.url),()=>E(()=>import("../nodes/7.D0zF0cZZ.js"),__vite__mapDeps([25,1,2,8,4,7,19,3,18,5,6,9,10,16,20,22]),import.meta.url)],Yt=[],Gt={"/":[2],"/dummy":[4],"/feeds":[6],"/irc":[7],"/metadata":[5],"/xmpp":[3]},W={handleError:({error:e})=>{console.error(e)},reroute:()=>{},transport:{}},jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.decode])),Jt=Object.fromEntries(Object.entries(W.transport).map(([e,t])=>[e,t.encode])),Wt=!1,zt=(e,t)=>jt[e](t);export{zt as decode,jt as decoders,Gt as dictionary,Jt as encoders,Wt as hash,W as hooks,Ft as matchers,Nt as nodes,Mt as root,Yt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/BF3skBIG.js";export{o as load_css,r as start};
@@ -1,4 +1,4 @@
1
- import{f as x,a as g,s as y,c as W}from"../chunks/Bh9jqwq3.js";import{t as S,c as t,n as C,r as e,s as m,p as q,a as z,g as f,u as D,ag as E,f as F,F as B}from"../chunks/DT_OQU4t.js";import{a as w,s as k,b as H}from"../chunks/BB3nrZKK.js";import{b as N,f as V,i as X,h as G,g as J}from"../chunks/CE_Br0Li.js";import{b as A}from"../chunks/BfZhcH3H.js";import"../chunks/CLcl1K30.js";import{i as K,s as I,b as T}from"../chunks/B5Mgq-ia.js";import{i as Q}from"../chunks/BPmfLl8P.js";import{s as U}from"../chunks/BpD8G2jq.js";const Y=!0,Z=!1,fe=Object.freeze(Object.defineProperty({__proto__:null,prerender:Y,ssr:Z},Symbol.toStringTag,{value:"Module"})),ee=`<style>/*!
1
+ import{f as x,a as g,s as y,c as W}from"../chunks/Bh9jqwq3.js";import{t as S,c as t,n as C,r as e,s as m,p as q,a as z,g as f,u as D,ag as E,f as F,F as B}from"../chunks/DT_OQU4t.js";import{a as w,s as k,b as H}from"../chunks/BB3nrZKK.js";import{b as N,f as V,i as X,h as G,g as J}from"../chunks/DJmaXuzm.js";import{b as A}from"../chunks/pIrFrRr_.js";import"../chunks/CLcl1K30.js";import{i as K,s as I,b as T}from"../chunks/B5Mgq-ia.js";import{i as Q}from"../chunks/BPmfLl8P.js";import{s as U}from"../chunks/BF3skBIG.js";const Y=!0,Z=!1,fe=Object.freeze(Object.defineProperty({__proto__:null,prerender:Y,ssr:Z},Symbol.toStringTag,{value:"Module"})),ee=`<style>/*!
2
2
  Theme: Edge Light
3
3
  Author: cjayross (https://github.com/cjayross)
4
4
  License: ~ MIT (or more permissive) [via base16-schemes-source]
@@ -1 +1 @@
1
- import{f as h,a as g,s as e}from"../chunks/Bh9jqwq3.js";import"../chunks/CLcl1K30.js";import{p as l,f as v,t as d,a as _,c as o,r as p,s as x}from"../chunks/DT_OQU4t.js";import{i as $}from"../chunks/BPmfLl8P.js";import{s as k,p as m}from"../chunks/BpD8G2jq.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const i=b;var E=h("<h1> </h1> <p> </p>",1);function A(f,c){l(c,!1),$();var t=E(),r=v(t),n=o(r,!0);p(r);var s=x(r,2),u=o(s,!0);p(s),d(()=>{var a;e(n,i.status),e(u,(a=i.error)==null?void 0:a.message)}),g(f,t),_()}export{A as component};
1
+ import{f as h,a as g,s as e}from"../chunks/Bh9jqwq3.js";import"../chunks/CLcl1K30.js";import{p as l,f as v,t as d,a as _,c as o,r as p,s as x}from"../chunks/DT_OQU4t.js";import{i as $}from"../chunks/BPmfLl8P.js";import{s as k,p as m}from"../chunks/BF3skBIG.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const i=b;var E=h("<h1> </h1> <p> </p>",1);function A(f,c){l(c,!1),$();var t=E(),r=v(t),n=o(r,!0);p(r);var s=x(r,2),u=o(s,!0);p(s),d(()=>{var a;e(n,i.status),e(u,(a=i.error)==null?void 0:a.message)}),g(f,t),_()}export{A as component};
@@ -1,4 +1,4 @@
1
- import{f as x,a as f}from"../chunks/Bh9jqwq3.js";import"../chunks/CLcl1K30.js";import{s as e,f as y,c as t,r as s,n as w,t as S}from"../chunks/DT_OQU4t.js";import{s as a}from"../chunks/BB3nrZKK.js";import{b as r}from"../chunks/BfZhcH3H.js";import{I as k}from"../chunks/CPsRFLIg.js";var P=x(`<title>Sockethub Examples</title> <div class="space-y-6"><div class="bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg"><h2 class="text-xl font-semibold text-blue-800 mb-2">What is Sockethub?</h2> <p class="text-blue-700 mb-3">Sockethub is a <strong>protocol gateway</strong> that bridges web applications with various internet protocols
1
+ import{f as x,a as f}from"../chunks/Bh9jqwq3.js";import"../chunks/CLcl1K30.js";import{s as e,f as y,c as t,r as s,n as w,t as S}from"../chunks/DT_OQU4t.js";import{s as a}from"../chunks/BB3nrZKK.js";import{b as r}from"../chunks/pIrFrRr_.js";import{I as k}from"../chunks/CPsRFLIg.js";var P=x(`<title>Sockethub Examples</title> <div class="space-y-6"><div class="bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg"><h2 class="text-xl font-semibold text-blue-800 mb-2">What is Sockethub?</h2> <p class="text-blue-700 mb-3">Sockethub is a <strong>protocol gateway</strong> that bridges web applications with various internet protocols
2
2
  like IRC, XMPP, RSS/ATOM feeds, and more. Instead of implementing each protocol directly in your web app,
3
3
  you send standardized <strong>ActivityStreams</strong> messages to Sockethub, which handles the protocol-specific details.</p> <p class="text-blue-700">Think of it as a universal translator that lets your web application communicate with
4
4
  chat servers, feed readers, and other internet services using a single, consistent API.</p></div> <div class="bg-green-50 border-l-4 border-green-400 p-4 rounded-r-lg"><h2 class="text-xl font-semibold text-green-800 mb-2">Key Concepts</h2> <div class="space-y-3"><div><h3 class="font-semibold text-green-700">🎭 Actor</h3> <p class="text-green-600 text-sm">Your identity on a platform (e.g., IRC nickname, XMPP username, feed URL)</p></div> <div><h3 class="font-semibold text-green-700">🔧 Platform</h3> <p class="text-green-600 text-sm">A protocol handler (IRC, XMPP, Feeds, etc.) that runs as a separate process</p></div> <div><h3 class="font-semibold text-green-700">📝 ActivityStreams</h3> <p class="text-green-600 text-sm">Standardized JSON format for describing activities like "send message", "connect", "fetch"</p></div> <div><h3 class="font-semibold text-green-700">🔐 Credentials</h3> <p class="text-green-600 text-sm">Connection details securely stored per session (servers, passwords, API keys)</p></div></div></div> <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded-r-lg"><h2 class="text-xl font-semibold text-yellow-800 mb-2">How It Works</h2> <ol class="text-yellow-700 space-y-2 text-sm"><li><span class="font-semibold">1.</span> Your web app connects to Sockethub via WebSocket</li> <li><span class="font-semibold">2.</span> You define an actor and send ActivityStreams messages (<code>credentials</code>, <code>connect</code>, <code>join</code>, …) with full actor objects</li> <li><span class="font-semibold">3.</span> Sockethub routes messages to the appropriate platform</li> <li><span class="font-semibold">4.</span> Platform handles protocol-specific communication</li> <li><span class="font-semibold">5.</span> Results are sent back to your web app as ActivityStreams</li></ol></div> <div class="bg-purple-50 border-l-4 border-purple-400 p-4 rounded-r-lg"><h2 class="text-xl font-semibold text-purple-800 mb-2">Explore the Examples</h2> <p class="text-purple-700 mb-3">Each example demonstrates a different platform. Start with <strong>Dummy</strong> to understand
@@ -1,2 +1,2 @@
1
- import{f as k,a as y}from"../chunks/Bh9jqwq3.js";import{p as Q,a as T,s as t,f as U,c as n,g as e,u as P,r as d,n as W,b as S,t as Z,d as m,e as c}from"../chunks/DT_OQU4t.js";import{s as ee,a as te,m as re,b as J,i as oe,c as _}from"../chunks/B5Mgq-ia.js";import{r as se}from"../chunks/BB3nrZKK.js";import{B as ae,b as ne}from"../chunks/DhU_U-a9.js";import{A as de}from"../chunks/DTPsrcK7.js";import{A as ce,C as ie,P as le,R as me,S as pe}from"../chunks/DZxyUSp9.js";import{I as ge,s as ue,c as be}from"../chunks/CE_Br0Li.js";import{w as R}from"../chunks/CF0IgWN3.js";var ve=k('<div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 4 & 5: Join Room and Chat</h4> <div class="space-y-4"><!> <!> <!></div></div>'),he=k('<div class="bg-gray-50 border border-gray-200 rounded-lg p-4 text-center"><p class="text-gray-500">Connect to the XMPP server to access chat features</p></div>'),fe=k(`<div class="bg-indigo-50 border-l-4 border-indigo-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-indigo-800 mb-2">📨 XMPP Connection Process</h3> <p class="text-indigo-700 text-sm mb-3">XMPP (Extensible Messaging and Presence Protocol) is a real-time communication protocol used by services like Jabber.</p> <div class="text-indigo-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Your XMPP login secret, sent through the password field</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to XMPP server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a multi-user chat room</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users in real-time</div></div></div> <div class="space-y-6"><div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 1: Set Your XMPP Address</h4> <!> <p class="text-gray-600 text-sm mt-2">💡 Format: username@server.com (e.g., user@jabber.org, alice@conversations.im)</p> <!></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 2: Set Your Credentials</h4> <label class="block text-sm font-medium text-gray-700 mb-1" for="xmpp-password-input">Password</label> <input id="xmpp-password-input" type="password" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm mb-3" placeholder="your XMPP password or compatible bearer token"/> <p class="text-gray-600 text-xs mb-3">💡 If your deployment accepts a bearer-style token in the SASL PLAIN password
1
+ import{f as k,a as y}from"../chunks/Bh9jqwq3.js";import{p as Q,a as T,s as t,f as U,c as n,g as e,u as P,r as d,n as W,b as S,t as Z,d as m,e as c}from"../chunks/DT_OQU4t.js";import{s as ee,a as te,m as re,b as J,i as oe,c as _}from"../chunks/B5Mgq-ia.js";import{r as se}from"../chunks/BB3nrZKK.js";import{B as ae,b as ne}from"../chunks/DDdxxuPN.js";import{A as de}from"../chunks/BJRrkVji.js";import{A as ce,C as ie,P as le,R as me,S as pe}from"../chunks/BaJgcY-K.js";import{I as ge,s as ue,c as be}from"../chunks/DJmaXuzm.js";import{w as R}from"../chunks/CF0IgWN3.js";var ve=k('<div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 4 & 5: Join Room and Chat</h4> <div class="space-y-4"><!> <!> <!></div></div>'),he=k('<div class="bg-gray-50 border border-gray-200 rounded-lg p-4 text-center"><p class="text-gray-500">Connect to the XMPP server to access chat features</p></div>'),fe=k(`<div class="bg-indigo-50 border-l-4 border-indigo-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-indigo-800 mb-2">📨 XMPP Connection Process</h3> <p class="text-indigo-700 text-sm mb-3">XMPP (Extensible Messaging and Presence Protocol) is a real-time communication protocol used by services like Jabber.</p> <div class="text-indigo-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Your XMPP login secret, sent through the password field</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to XMPP server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a multi-user chat room</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users in real-time</div></div></div> <div class="space-y-6"><div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 1: Set Your XMPP Address</h4> <!> <p class="text-gray-600 text-sm mt-2">💡 Format: username@server.com (e.g., user@jabber.org, alice@conversations.im)</p> <!></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 2: Set Your Credentials</h4> <label class="block text-sm font-medium text-gray-700 mb-1" for="xmpp-password-input">Password</label> <input id="xmpp-password-input" type="password" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm mb-3" placeholder="your XMPP password or compatible bearer token"/> <p class="text-gray-600 text-xs mb-3">💡 If your deployment accepts a bearer-style token in the SASL PLAIN password
2
2
  slot, enter that token here. Sockethub's XMPP platform still submits it as <code>password</code>.</p> <!> <p class="text-gray-600 text-sm mt-2">🔐 Sockethub's XMPP platform accepts a single <code>password</code> field.</p></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 3: Connect to XMPP Server</h4> <!></div> <!></div>`,1);function Ae(F,Y){Q(Y,!0);const p=()=>J(M,"$actorIdStore",w),s=()=>J(o,"$sockethubState",w),[w,B]=ee(),M=R("user@jabber.org");let g=S(!1),u=S("123456"),X=P(()=>`${p()}/SockethubExample`),b=S("kosmos-random@kosmos.chat");const o=R({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let a=P(()=>({id:e(X),type:"person",name:e(X)})),L=P(()=>({type:"credentials",userAddress:p(),resource:"SockethubExample",password:e(u)}));async function N(){m(g,!0);try{await ue({"@context":await be("xmpp"),type:"connect",actor:{id:e(a).id,type:e(a).type,name:e(a).name}}),_(o,c(s).connected=!0,c(s))}catch(v){console.error(v),_(o,c(s).connected=!1,c(s)),_(o,c(s).joined=!1,c(s))}finally{m(g,!1)}}ae(F,{title:"XMPP Platform Example",description:"Connect to XMPP servers (Jabber), join multi-user chats, and exchange messages using Sockethub's XMPP platform.",children:(v,xe)=>{var C=fe(),A=t(U(C),2),h=n(A),I=t(n(h),2);ce(I,{get value(){return re(),p()},set value(r){te(M,r)}});var O=t(I,4);de(O,{get actor(){return e(a)},get sockethubState(){return o}}),d(h);var f=t(h,2),l=t(n(f),4);se(l);var V=t(l,4);ie(V,{context:"xmpp",get credentials(){return e(L)},get actor(){return e(a)},get sockethubState(){return o}}),W(2),d(f);var x=t(f,2),q=t(n(x),2);le(q,{get sockethubState(){return o},get connecting(){return e(g)},onConnect:N}),d(x);var z=t(x,2);{var D=r=>{var i=ve(),$=t(n(i),2),E=n($);me(E,{get actor(){return e(a)},get sockethubState(){return o},context:"xmpp",get room(){return e(b)},set room(K){m(b,K,!0)}});var j=t(E,2);ge(j,{});var H=t(j,2);pe(H,{context:"xmpp",get actor(){return e(a)},get sockethubState(){return o},get room(){return e(b)}}),d($),d(i),y(r,i)},G=r=>{var i=he();y(r,i)};oe(z,r=>{s().connected?r(D):r(G,!1)})}d(A),Z(()=>l.disabled=s().credentialsSet),ne(l,()=>e(u),r=>m(u,r)),y(v,C)}}),T(),B()}export{Ae as component};
@@ -1 +1 @@
1
- import{f as be,t as a,a as d}from"../chunks/Bh9jqwq3.js";import{p as xe,a as pe,s,f as fe,c as e,d as he,b as ue,g as N,n as o,r as t}from"../chunks/DT_OQU4t.js";import{s as b,c as ge}from"../chunks/CE_Br0Li.js";import{B as we,S as l}from"../chunks/DhU_U-a9.js";import{F as ye}from"../chunks/De6kqrZW.js";var _e=be(`<div class="bg-gradient-to-r from-blue-50 to-blue-100 border border-blue-200 rounded-xl p-6 shadow-sm"><h3 class="text-xl font-bold text-blue-900 mb-3 flex items-center"><span class="mr-2">💡</span> What You'll Learn</h3> <p class="text-blue-800 mb-4 leading-relaxed">This example demonstrates the core Sockethub workflow with a test platform that doesn't require external connections.</p> <div class="grid md:grid-cols-2 gap-3 text-blue-800"><div class="flex items-start space-x-2"><span class="text-lg">📤</span> <div><div class="font-semibold">Sending</div> <div class="text-sm text-blue-700">How to create and send ActivityStreams messages</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">📥</span> <div><div class="font-semibold">Receiving</div> <div class="text-sm text-blue-700">How Sockethub responds with results or errors</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">🎯</span> <div><div class="font-semibold">Actor</div> <div class="text-sm text-blue-700">How your identity is represented</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">🔄</span> <div><div class="font-semibold">Types</div> <div class="text-sm text-blue-700">Different activity types (echo, greet, fail, throw, exit0, exit1, sigterm, sigkill, throwTypeError, throwReferenceError, hang)</div></div></div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">⬆️ This text will be included in the <code>object.content</code> field of your ActivityStreams message.</p> <div class="bg-gradient-to-r from-amber-50 to-yellow-50 border border-amber-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-amber-900 mb-3 flex items-center"><span class="mr-2">🚀</span> Try Different Activity Types</h4> <p class="text-amber-800 mb-4 leading-relaxed">Each button sends the same basic message structure but with a different <code class="bg-amber-100 px-1 rounded text-sm">type</code> field:</p> <div class="grid md:grid-cols-2 gap-4"><div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Echo</div> <p class="text-amber-700 text-sm">Returns your message back unchanged</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Greet</div> <p class="text-amber-700 text-sm">Returns a friendly greeting</p></div> <!></div></div></div> <div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Fail</div> <p class="text-amber-700 text-sm">Returns an error message (for testing error handling)</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Throw</div> <p class="text-amber-700 text-sm">Throws an exception (for testing exception handling)</p></div> <!></div></div></div></div></div> <div class="bg-gradient-to-r from-red-50 to-rose-50 border border-red-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-red-900 mb-3 flex items-center"><span class="mr-2">⚠️</span> Crash/Recovery Tests</h4> <p class="text-red-800 mb-4 leading-relaxed">These types intentionally terminate or hang the dummy platform process. Use them to validate crash handling and recovery.</p> <div class="grid md:grid-cols-2 gap-4"><div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Exit 0</div> <p class="text-red-700 text-sm">Graceful exit (process.exit(0))</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Exit 1</div> <p class="text-red-700 text-sm">Crash exit (process.exit(1))</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">SIGTERM</div> <p class="text-red-700 text-sm">Self-terminate with SIGTERM</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">SIGKILL</div> <p class="text-red-700 text-sm">Self-terminate with SIGKILL</p></div> <!></div></div></div> <div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">TypeError</div> <p class="text-red-700 text-sm">Throw a TypeError on next tick</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">ReferenceError</div> <p class="text-red-700 text-sm">Throw a ReferenceError on next tick</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Hang</div> <p class="text-red-700 text-sm">Block the event loop (heartbeat timeout)</p></div> <!></div></div></div></div></div></div>`,1);function ke(Q,V){xe(V,!0);const T="https://sockethub.org/examples/dummy";let x=ue("");async function c(m){return{"@context":await ge("dummy"),type:m,actor:{type:"person",id:T,name:T},object:{type:"message",content:N(x)}}}async function v(m){await b(await c(m))}async function X(){await b(await c("echo"))}async function Z(){await b(await c("fail"))}async function ee(){await b(await c("throw"))}async function te(){await b(await c("greet"))}we(Q,{title:"Dummy Platform Example",description:"The dummy platform is the most basic test to communicate via Sockethub to a platform, and receive a response back. You can use either the echo or fail types on your Activity Stream object.",children:(m,$e)=>{var S=_e(),A=s(fe(S),2),j=e(A);ye(j,{label:"Message Content",id:"objectContent",placeholder:"Hello from Sockethub",get value(){return N(x)},set value(r){he(x,r,!0)}});var p=s(j,4),k=s(e(p),4),f=e(k),h=e(f),P=e(h),se=s(e(P),2);l(se,{buttonAction:X,children:(r,n)=>{o();var i=a("Echo");d(r,i)}}),t(P),t(h);var R=s(h,2),G=e(R),re=s(e(G),2);l(re,{buttonAction:te,children:(r,n)=>{o();var i=a("Greet");d(r,i)}}),t(G),t(R),t(f);var I=s(f,2),u=e(I),F=e(u),ie=s(e(F),2);l(ie,{buttonAction:Z,children:(r,n)=>{o();var i=a("Fail");d(r,i)}}),t(F),t(u);var L=s(u,2),H=e(L),de=s(e(H),2);l(de,{buttonAction:ee,children:(r,n)=>{o();var i=a("Throw");d(r,i)}}),t(H),t(L),t(I),t(k),t(p);var B=s(p,2),C=s(e(B),4),g=e(C),w=e(g),M=e(w),ae=s(e(M),2);l(ae,{buttonAction:()=>v("exit0"),children:(r,n)=>{o();var i=a("Exit 0");d(r,i)}}),t(M),t(w);var y=s(w,2),D=e(y),oe=s(e(D),2);l(oe,{buttonAction:()=>v("exit1"),children:(r,n)=>{o();var i=a("Exit 1");d(r,i)}}),t(D),t(y);var _=s(y,2),K=e(_),le=s(e(K),2);l(le,{buttonAction:()=>v("sigterm"),children:(r,n)=>{o();var i=a("SIGTERM");d(r,i)}}),t(K),t(_);var Y=s(_,2),q=e(Y),ne=s(e(q),2);l(ne,{buttonAction:()=>v("sigkill"),children:(r,n)=>{o();var i=a("SIGKILL");d(r,i)}}),t(q),t(Y),t(g);var O=s(g,2),$=e(O),U=e($),ve=s(e(U),2);l(ve,{buttonAction:()=>v("throwTypeError"),children:(r,n)=>{o();var i=a("TypeError");d(r,i)}}),t(U),t($);var E=s($,2),W=e(E),ce=s(e(W),2);l(ce,{buttonAction:()=>v("throwReferenceError"),children:(r,n)=>{o();var i=a("ReferenceError");d(r,i)}}),t(W),t(E);var z=s(E,2),J=e(z),me=s(e(J),2);l(me,{buttonAction:()=>v("hang"),children:(r,n)=>{o();var i=a("Hang");d(r,i)}}),t(J),t(z),t(O),t(C),t(B),t(A),d(m,S)}}),pe()}export{ke as component};
1
+ import{f as be,t as a,a as d}from"../chunks/Bh9jqwq3.js";import{p as xe,a as pe,s,f as fe,c as e,d as he,b as ue,g as N,n as o,r as t}from"../chunks/DT_OQU4t.js";import{s as b,c as ge}from"../chunks/DJmaXuzm.js";import{B as we,S as l}from"../chunks/DDdxxuPN.js";import{F as ye}from"../chunks/Xcu1kWNr.js";var _e=be(`<div class="bg-gradient-to-r from-blue-50 to-blue-100 border border-blue-200 rounded-xl p-6 shadow-sm"><h3 class="text-xl font-bold text-blue-900 mb-3 flex items-center"><span class="mr-2">💡</span> What You'll Learn</h3> <p class="text-blue-800 mb-4 leading-relaxed">This example demonstrates the core Sockethub workflow with a test platform that doesn't require external connections.</p> <div class="grid md:grid-cols-2 gap-3 text-blue-800"><div class="flex items-start space-x-2"><span class="text-lg">📤</span> <div><div class="font-semibold">Sending</div> <div class="text-sm text-blue-700">How to create and send ActivityStreams messages</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">📥</span> <div><div class="font-semibold">Receiving</div> <div class="text-sm text-blue-700">How Sockethub responds with results or errors</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">🎯</span> <div><div class="font-semibold">Actor</div> <div class="text-sm text-blue-700">How your identity is represented</div></div></div> <div class="flex items-start space-x-2"><span class="text-lg">🔄</span> <div><div class="font-semibold">Types</div> <div class="text-sm text-blue-700">Different activity types (echo, greet, fail, throw, exit0, exit1, sigterm, sigkill, throwTypeError, throwReferenceError, hang)</div></div></div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">⬆️ This text will be included in the <code>object.content</code> field of your ActivityStreams message.</p> <div class="bg-gradient-to-r from-amber-50 to-yellow-50 border border-amber-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-amber-900 mb-3 flex items-center"><span class="mr-2">🚀</span> Try Different Activity Types</h4> <p class="text-amber-800 mb-4 leading-relaxed">Each button sends the same basic message structure but with a different <code class="bg-amber-100 px-1 rounded text-sm">type</code> field:</p> <div class="grid md:grid-cols-2 gap-4"><div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Echo</div> <p class="text-amber-700 text-sm">Returns your message back unchanged</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Greet</div> <p class="text-amber-700 text-sm">Returns a friendly greeting</p></div> <!></div></div></div> <div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Fail</div> <p class="text-amber-700 text-sm">Returns an error message (for testing error handling)</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-amber-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-amber-900 mb-1">Throw</div> <p class="text-amber-700 text-sm">Throws an exception (for testing exception handling)</p></div> <!></div></div></div></div></div> <div class="bg-gradient-to-r from-red-50 to-rose-50 border border-red-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-red-900 mb-3 flex items-center"><span class="mr-2">⚠️</span> Crash/Recovery Tests</h4> <p class="text-red-800 mb-4 leading-relaxed">These types intentionally terminate or hang the dummy platform process. Use them to validate crash handling and recovery.</p> <div class="grid md:grid-cols-2 gap-4"><div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Exit 0</div> <p class="text-red-700 text-sm">Graceful exit (process.exit(0))</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Exit 1</div> <p class="text-red-700 text-sm">Crash exit (process.exit(1))</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">SIGTERM</div> <p class="text-red-700 text-sm">Self-terminate with SIGTERM</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">SIGKILL</div> <p class="text-red-700 text-sm">Self-terminate with SIGKILL</p></div> <!></div></div></div> <div class="space-y-4"><div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">TypeError</div> <p class="text-red-700 text-sm">Throw a TypeError on next tick</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">ReferenceError</div> <p class="text-red-700 text-sm">Throw a ReferenceError on next tick</p></div> <!></div></div> <div class="bg-white rounded-lg p-4 border border-red-200"><div class="flex items-center justify-between"><div class="flex-1"><div class="font-semibold text-red-900 mb-1">Hang</div> <p class="text-red-700 text-sm">Block the event loop (heartbeat timeout)</p></div> <!></div></div></div></div></div></div>`,1);function ke(Q,V){xe(V,!0);const T="https://sockethub.org/examples/dummy";let x=ue("");async function c(m){return{"@context":await ge("dummy"),type:m,actor:{type:"person",id:T,name:T},object:{type:"message",content:N(x)}}}async function v(m){await b(await c(m))}async function X(){await b(await c("echo"))}async function Z(){await b(await c("fail"))}async function ee(){await b(await c("throw"))}async function te(){await b(await c("greet"))}we(Q,{title:"Dummy Platform Example",description:"The dummy platform is the most basic test to communicate via Sockethub to a platform, and receive a response back. You can use either the echo or fail types on your Activity Stream object.",children:(m,$e)=>{var S=_e(),A=s(fe(S),2),j=e(A);ye(j,{label:"Message Content",id:"objectContent",placeholder:"Hello from Sockethub",get value(){return N(x)},set value(r){he(x,r,!0)}});var p=s(j,4),k=s(e(p),4),f=e(k),h=e(f),P=e(h),se=s(e(P),2);l(se,{buttonAction:X,children:(r,n)=>{o();var i=a("Echo");d(r,i)}}),t(P),t(h);var R=s(h,2),G=e(R),re=s(e(G),2);l(re,{buttonAction:te,children:(r,n)=>{o();var i=a("Greet");d(r,i)}}),t(G),t(R),t(f);var I=s(f,2),u=e(I),F=e(u),ie=s(e(F),2);l(ie,{buttonAction:Z,children:(r,n)=>{o();var i=a("Fail");d(r,i)}}),t(F),t(u);var L=s(u,2),H=e(L),de=s(e(H),2);l(de,{buttonAction:ee,children:(r,n)=>{o();var i=a("Throw");d(r,i)}}),t(H),t(L),t(I),t(k),t(p);var B=s(p,2),C=s(e(B),4),g=e(C),w=e(g),M=e(w),ae=s(e(M),2);l(ae,{buttonAction:()=>v("exit0"),children:(r,n)=>{o();var i=a("Exit 0");d(r,i)}}),t(M),t(w);var y=s(w,2),D=e(y),oe=s(e(D),2);l(oe,{buttonAction:()=>v("exit1"),children:(r,n)=>{o();var i=a("Exit 1");d(r,i)}}),t(D),t(y);var _=s(y,2),K=e(_),le=s(e(K),2);l(le,{buttonAction:()=>v("sigterm"),children:(r,n)=>{o();var i=a("SIGTERM");d(r,i)}}),t(K),t(_);var Y=s(_,2),q=e(Y),ne=s(e(q),2);l(ne,{buttonAction:()=>v("sigkill"),children:(r,n)=>{o();var i=a("SIGKILL");d(r,i)}}),t(q),t(Y),t(g);var O=s(g,2),$=e(O),U=e($),ve=s(e(U),2);l(ve,{buttonAction:()=>v("throwTypeError"),children:(r,n)=>{o();var i=a("TypeError");d(r,i)}}),t(U),t($);var E=s($,2),W=e(E),ce=s(e(W),2);l(ce,{buttonAction:()=>v("throwReferenceError"),children:(r,n)=>{o();var i=a("ReferenceError");d(r,i)}}),t(W),t(E);var z=s(E,2),J=e(z),me=s(e(J),2);l(me,{buttonAction:()=>v("hang"),children:(r,n)=>{o();var i=a("Hang");d(r,i)}}),t(J),t(z),t(O),t(C),t(B),t(A),d(m,S)}}),pe()}export{ke as component};
@@ -1 +1 @@
1
- import{f as _,t as F,a as l}from"../chunks/Bh9jqwq3.js";import{p as L,a as R,s,f as A,c as u,d as E,b as P,g as t,u as m,n as U,r as h}from"../chunks/DT_OQU4t.js";import{s as B,b as M}from"../chunks/B5Mgq-ia.js";import{A as O}from"../chunks/DTPsrcK7.js";import{B as T,S as W}from"../chunks/DhU_U-a9.js";import{F as j}from"../chunks/De6kqrZW.js";import{s as C,a as D,c as G}from"../chunks/CE_Br0Li.js";import{w as H}from"../chunks/CF0IgWN3.js";var J=_('<div class="bg-purple-50 border-l-4 border-purple-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-purple-800 mb-2">🔍 How Metadata Extraction Works</h3> <p class="text-purple-700 text-sm mb-3">This example shows how Sockethub can extract structured metadata from any web page.</p> <div class="text-purple-700 text-sm space-y-1"><div><strong>🌐 Fetching:</strong> Sockethub downloads the web page content</div> <div><strong>🔍 Scanning:</strong> Searches for Open Graph, Twitter Cards, JSON-LD, and meta tags</div> <div><strong>📊 Extracting:</strong> Pulls out titles, descriptions, images, and other metadata</div> <div><strong>📋 Returning:</strong> Provides structured data about the page</div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">The page URL is the actor <code>id</code> with <code>type: "website"</code>.</p> <!> <div class="bg-blue-50 border border-blue-200 p-3 rounded-lg"><p class="text-blue-700 text-sm"><strong>💡 What happens when you click Fetch:</strong><br/> Sockethub sends a <code>fetch</code> activity with the page URL as the actor and returns extracted metadata.</p></div> <div class="w-full text-right"><!></div></div>',1);function tt(g,b){L(b,!0);const v=()=>M(r,"$sockethubState",f),[f,x]=B(),r=H({actorSet:!1});let e=P("https://sockethub.org");const o=m(()=>({id:t(e),type:"website",name:t(e)}));async function w(){await C({"@context":await G("metadata"),type:"fetch",actor:D(t(o))})}T(g,{title:"Metadata Platform Example",description:"Sockethub's metadata platform takes a URL, fetches and parses it for any metadata.",children:(S,N)=>{var c=J(),d=s(A(c),2),i=u(d);j(i,{label:"Website URL",id:"URL",placeholder:"https://example.com",get value(){return t(e)},set value(a){E(e,a,!0)}});var n=s(i,4);O(n,{get actor(){return t(o)},get sockethubState(){return r}});var p=s(n,4),k=u(p);{let a=m(()=>!v().actorSet);W(k,{buttonAction:w,get disabled(){return t(a)},children:(y,q)=>{U();var $=F("Extract Metadata");l(y,$)}})}h(p),h(d),l(S,c)}}),R(),x()}export{tt as component};
1
+ import{f as _,t as F,a as l}from"../chunks/Bh9jqwq3.js";import{p as L,a as R,s,f as A,c as u,d as E,b as P,g as t,u as m,n as U,r as h}from"../chunks/DT_OQU4t.js";import{s as B,b as M}from"../chunks/B5Mgq-ia.js";import{A as O}from"../chunks/BJRrkVji.js";import{B as T,S as W}from"../chunks/DDdxxuPN.js";import{F as j}from"../chunks/Xcu1kWNr.js";import{s as C,a as D,c as G}from"../chunks/DJmaXuzm.js";import{w as H}from"../chunks/CF0IgWN3.js";var J=_('<div class="bg-purple-50 border-l-4 border-purple-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-purple-800 mb-2">🔍 How Metadata Extraction Works</h3> <p class="text-purple-700 text-sm mb-3">This example shows how Sockethub can extract structured metadata from any web page.</p> <div class="text-purple-700 text-sm space-y-1"><div><strong>🌐 Fetching:</strong> Sockethub downloads the web page content</div> <div><strong>🔍 Scanning:</strong> Searches for Open Graph, Twitter Cards, JSON-LD, and meta tags</div> <div><strong>📊 Extracting:</strong> Pulls out titles, descriptions, images, and other metadata</div> <div><strong>📋 Returning:</strong> Provides structured data about the page</div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">The page URL is the actor <code>id</code> with <code>type: "website"</code>.</p> <!> <div class="bg-blue-50 border border-blue-200 p-3 rounded-lg"><p class="text-blue-700 text-sm"><strong>💡 What happens when you click Fetch:</strong><br/> Sockethub sends a <code>fetch</code> activity with the page URL as the actor and returns extracted metadata.</p></div> <div class="w-full text-right"><!></div></div>',1);function tt(g,b){L(b,!0);const v=()=>M(r,"$sockethubState",f),[f,x]=B(),r=H({actorSet:!1});let e=P("https://sockethub.org");const o=m(()=>({id:t(e),type:"website",name:t(e)}));async function w(){await C({"@context":await G("metadata"),type:"fetch",actor:D(t(o))})}T(g,{title:"Metadata Platform Example",description:"Sockethub's metadata platform takes a URL, fetches and parses it for any metadata.",children:(S,N)=>{var c=J(),d=s(A(c),2),i=u(d);j(i,{label:"Website URL",id:"URL",placeholder:"https://example.com",get value(){return t(e)},set value(a){E(e,a,!0)}});var n=s(i,4);O(n,{get actor(){return t(o)},get sockethubState(){return r}});var p=s(n,4),k=u(p);{let a=m(()=>!v().actorSet);W(k,{buttonAction:w,get disabled(){return t(a)},children:(y,q)=>{U();var $=F("Extract Metadata");l(y,$)}})}h(p),h(d),l(S,c)}}),R(),x()}export{tt as component};
@@ -1 +1 @@
1
- import{f as w,t as E,a as p,s as O}from"../chunks/Bh9jqwq3.js";import{p as P,a as j,s as a,f as B,c,d as f,b as y,g as e,u as _,n as M,r as n,t as C}from"../chunks/DT_OQU4t.js";import{s as W,i as H,b as Y}from"../chunks/B5Mgq-ia.js";import{A as q}from"../chunks/DTPsrcK7.js";import{B as z,S as D}from"../chunks/DhU_U-a9.js";import{F as G}from"../chunks/De6kqrZW.js";import{s as I,a as J,c as K}from"../chunks/CE_Br0Li.js";import{w as N}from"../chunks/CF0IgWN3.js";var Q=w('<div class="bg-red-50 border border-red-200 text-red-800 rounded-lg p-4 text-sm" role="alert"><p class="font-semibold mb-1">Fetch failed</p> <p class="font-mono text-xs whitespace-pre-wrap break-words"> </p></div>'),V=w('<div class="bg-green-50 border-l-4 border-green-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-green-800 mb-2">📰 How Feed Processing Works</h3> <p class="text-green-700 text-sm mb-3">This example shows how Sockethub can fetch and parse RSS/ATOM feeds from any website.</p> <div class="text-green-700 text-sm space-y-1"><div><strong>🌐 Fetching:</strong> Sockethub downloads the feed content from the URL</div> <div><strong>🔍 Parsing:</strong> Content is parsed from RSS/ATOM format</div> <div><strong>📝 Converting:</strong> Each feed entry becomes an ActivityStreams object</div> <div><strong>📊 Results:</strong> You receive an array of structured feed entries</div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">The feed URL is the actor <code>id</code> with <code>type: "feed"</code>.</p> <!> <div class="bg-blue-50 border border-blue-200 p-3 rounded-lg"><p class="text-blue-700 text-sm"><strong>💡 What happens when you click Fetch:</strong><br/> Sockethub sends a <code>fetch</code> activity with the feed URL as the actor and returns a collection of entries.</p></div> <!> <div class="w-full text-right"><!></div></div>',1);function ce(k,F){P(F,!0);const $=()=>Y(m,"$sockethubState",A),[A,R]=W(),m=N({actorSet:!1});let o=y("https://sockethub.org/feed.xml"),d=y(null);const h=_(()=>({id:e(o),type:"feed",name:e(o)}));async function L(){f(d,null);try{await I({"@context":await K("feeds"),type:"fetch",actor:J(e(h))})}catch(r){f(d,r instanceof Error?r.message:String(r),!0)}}z(k,{title:"Feeds Platform Example",description:"The feeds platform takes an RSS/ATOM feed URL, fetches and parses it, and returns an array of Activity Objects for each entry.",children:(r,X)=>{var v=V(),u=a(B(v),2),b=c(u);G(b,{label:"Feed URL",id:"URL",placeholder:"https://example.com/feed.xml",get value(){return e(o)},set value(t){f(o,t,!0)}});var g=a(b,4);q(g,{get actor(){return e(h)},get sockethubState(){return m}});var x=a(g,4);{var T=t=>{var s=Q(),i=a(c(s),2),l=c(i,!0);n(i),n(s),C(()=>O(l,e(d))),p(t,s)};H(x,t=>{e(d)&&t(T)})}var S=a(x,2),U=c(S);{let t=_(()=>!$().actorSet);D(U,{buttonAction:L,get disabled(){return e(t)},children:(s,i)=>{M();var l=E("Fetch Feed");p(s,l)}})}n(S),n(u),p(r,v)}}),j(),R()}export{ce as component};
1
+ import{f as w,t as E,a as p,s as O}from"../chunks/Bh9jqwq3.js";import{p as P,a as j,s as a,f as B,c,d as f,b as y,g as e,u as _,n as M,r as n,t as C}from"../chunks/DT_OQU4t.js";import{s as W,i as H,b as Y}from"../chunks/B5Mgq-ia.js";import{A as q}from"../chunks/BJRrkVji.js";import{B as z,S as D}from"../chunks/DDdxxuPN.js";import{F as G}from"../chunks/Xcu1kWNr.js";import{s as I,a as J,c as K}from"../chunks/DJmaXuzm.js";import{w as N}from"../chunks/CF0IgWN3.js";var Q=w('<div class="bg-red-50 border border-red-200 text-red-800 rounded-lg p-4 text-sm" role="alert"><p class="font-semibold mb-1">Fetch failed</p> <p class="font-mono text-xs whitespace-pre-wrap break-words"> </p></div>'),V=w('<div class="bg-green-50 border-l-4 border-green-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-green-800 mb-2">📰 How Feed Processing Works</h3> <p class="text-green-700 text-sm mb-3">This example shows how Sockethub can fetch and parse RSS/ATOM feeds from any website.</p> <div class="text-green-700 text-sm space-y-1"><div><strong>🌐 Fetching:</strong> Sockethub downloads the feed content from the URL</div> <div><strong>🔍 Parsing:</strong> Content is parsed from RSS/ATOM format</div> <div><strong>📝 Converting:</strong> Each feed entry becomes an ActivityStreams object</div> <div><strong>📊 Results:</strong> You receive an array of structured feed entries</div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">The feed URL is the actor <code>id</code> with <code>type: "feed"</code>.</p> <!> <div class="bg-blue-50 border border-blue-200 p-3 rounded-lg"><p class="text-blue-700 text-sm"><strong>💡 What happens when you click Fetch:</strong><br/> Sockethub sends a <code>fetch</code> activity with the feed URL as the actor and returns a collection of entries.</p></div> <!> <div class="w-full text-right"><!></div></div>',1);function ce(k,F){P(F,!0);const $=()=>Y(m,"$sockethubState",A),[A,R]=W(),m=N({actorSet:!1});let o=y("https://sockethub.org/feed.xml"),d=y(null);const h=_(()=>({id:e(o),type:"feed",name:e(o)}));async function L(){f(d,null);try{await I({"@context":await K("feeds"),type:"fetch",actor:J(e(h))})}catch(r){f(d,r instanceof Error?r.message:String(r),!0)}}z(k,{title:"Feeds Platform Example",description:"The feeds platform takes an RSS/ATOM feed URL, fetches and parses it, and returns an array of Activity Objects for each entry.",children:(r,X)=>{var v=V(),u=a(B(v),2),b=c(u);G(b,{label:"Feed URL",id:"URL",placeholder:"https://example.com/feed.xml",get value(){return e(o)},set value(t){f(o,t,!0)}});var g=a(b,4);q(g,{get actor(){return e(h)},get sockethubState(){return m}});var x=a(g,4);{var T=t=>{var s=Q(),i=a(c(s),2),l=c(i,!0);n(i),n(s),C(()=>O(l,e(d))),p(t,s)};H(x,t=>{e(d)&&t(T)})}var S=a(x,2),U=c(S);{let t=_(()=>!$().actorSet);D(U,{buttonAction:L,get disabled(){return e(t)},children:(s,i)=>{M();var l=E("Fetch Feed");p(s,l)}})}n(S),n(u),p(r,v)}}),j(),R()}export{ce as component};
@@ -1 +1 @@
1
- import{f as w,a as C}from"../chunks/Bh9jqwq3.js";import{p as ee,a as te,s as t,f as re,c as s,g as e,u as B,r as a,d as l,b as v,e as c}from"../chunks/DT_OQU4t.js";import{s as oe,a as se,m as ae,b as q,i as ne,c as S}from"../chunks/B5Mgq-ia.js";import{A as de}from"../chunks/DTPsrcK7.js";import{A as ce,C as ie,P as le,R as me,S as ve}from"../chunks/DZxyUSp9.js";import{B as ue}from"../chunks/DhU_U-a9.js";import{F as z}from"../chunks/De6kqrZW.js";import{I as ge,s as pe,c as be}from"../chunks/CE_Br0Li.js";import{w as N}from"../chunks/CF0IgWN3.js";var fe=w('<div class="bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-emerald-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-emerald-600 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span> Join Channel and Chat</h4> <div class="space-y-6"><!> <!> <!></div></div>'),he=w('<div class="bg-gradient-to-r from-gray-50 to-slate-50 border border-gray-200 rounded-xl p-6 text-center shadow-sm"><div class="flex items-center justify-center mb-3"><span class="w-8 h-8 bg-gray-400 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span></div> <p class="text-gray-600 font-medium">Connect to the IRC server to access chat features</p> <p class="text-gray-500 text-sm mt-1">Complete steps 1-3 above to unlock this section</p></div>'),xe=w('<div class="bg-orange-50 border-l-4 border-orange-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-orange-800 mb-2">💬 IRC Connection Process</h3> <p class="text-orange-700 text-sm mb-3">IRC (Internet Relay Chat) requires several steps to get connected and chatting.</p> <div class="text-orange-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Provide server connection details</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to IRC server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a channel to start chatting</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users</div></div></div> <div class="space-y-6"><div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-green-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-green-600 text-white rounded-full flex items-center justify-center text-sm font-bold">1</span> Confirm your actor</h4> <div class="space-y-4"><!> <!></div></div> <div class="bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-blue-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold">2</span> Configure Server Connection</h4> <div class="space-y-4"><div class="grid md:grid-cols-2 gap-4"><!> <!></div> <div class="bg-blue-100 border border-blue-200 rounded-lg p-3"><p class="text-blue-800 text-sm">💡 <strong>Popular IRC networks:</strong> irc.libera.chat, irc.oftc.net, irc.rizon.net</p></div> <!></div></div> <div class="bg-gradient-to-r from-purple-50 to-violet-50 border border-purple-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-purple-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold">3</span> Connect to Server</h4> <!></div> <!></div>',1);function Pe(O,D){ee(D,!0);const m=()=>q(k,"$actorIdStore",I),n=()=>q(o,"$sockethubState",I),[I,G]=oe(),k=N(`sh-${(Math.random()+1).toString(36).substring(7)}`);let u=v("chat.freenode.net"),g=v(6697),p=v("#sh-random"),b=v(!1);const o=N({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let d=B(()=>({id:m(),type:"person",name:m()})),H=B(()=>({type:"credentials",nick:m(),server:e(u),port:e(g),secure:!0}));async function K(){l(b,!0);try{await pe({"@context":await be("irc"),type:"connect",actor:{id:e(d).id,type:e(d).type,name:e(d).name}}),S(o,c(n).connected=!0,c(n))}catch(f){console.error(f),S(o,c(n).connected=!1,c(n)),S(o,c(n).joined=!1,c(n))}finally{l(b,!1)}}ue(O,{title:"IRC Platform Example",description:"Connect to IRC servers, join channels, and send messages using Sockethub's IRC platform.",children:(f,_e)=>{var R=xe(),j=t(re(R),2),h=s(j),$=t(s(h),2),P=s($);ce(P,{get value(){return ae(),m()},set value(r){se(k,r)}});var L=t(P,2);de(L,{get actor(){return e(d)},get sockethubState(){return o}}),a($),a(h);var x=t(h,2),A=t(s(x),2),_=s(A),F=s(_);z(F,{label:"IRC Server",id:"server",placeholder:"irc.libera.chat",get value(){return e(u)},set value(r){l(u,r,!0)}});var Q=t(F,2);z(Q,{label:"Port",id:"port",type:"number",placeholder:"6697",get value(){return e(g)},set value(r){l(g,r,!0)}}),a(_);var T=t(_,4);ie(T,{context:"irc",get credentials(){return e(H)},get actor(){return e(d)},get sockethubState(){return o}}),a(A),a(x);var y=t(x,2),U=t(s(y),2);le(U,{get sockethubState(){return o},get connecting(){return e(b)},onConnect:K}),a(y);var V=t(y,2);{var W=r=>{var i=fe(),E=t(s(i),2),M=s(E);me(M,{get actor(){return e(d)},get sockethubState(){return o},context:"irc",get room(){return e(p)},set room(Z){l(p,Z,!0)}});var J=t(M,2);ge(J,{});var Y=t(J,2);ve(Y,{context:"irc",get actor(){return e(d)},get sockethubState(){return o},get room(){return e(p)}}),a(E),a(i),C(r,i)},X=r=>{var i=he();C(r,i)};ne(V,r=>{n().connected?r(W):r(X,!1)})}a(j),C(f,R)}}),te(),G()}export{Pe as component};
1
+ import{f as w,a as C}from"../chunks/Bh9jqwq3.js";import{p as ee,a as te,s as t,f as re,c as s,g as e,u as B,r as a,d as l,b as v,e as c}from"../chunks/DT_OQU4t.js";import{s as oe,a as se,m as ae,b as q,i as ne,c as S}from"../chunks/B5Mgq-ia.js";import{A as de}from"../chunks/BJRrkVji.js";import{A as ce,C as ie,P as le,R as me,S as ve}from"../chunks/BaJgcY-K.js";import{B as ue}from"../chunks/DDdxxuPN.js";import{F as z}from"../chunks/Xcu1kWNr.js";import{I as ge,s as pe,c as be}from"../chunks/DJmaXuzm.js";import{w as N}from"../chunks/CF0IgWN3.js";var fe=w('<div class="bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-emerald-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-emerald-600 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span> Join Channel and Chat</h4> <div class="space-y-6"><!> <!> <!></div></div>'),he=w('<div class="bg-gradient-to-r from-gray-50 to-slate-50 border border-gray-200 rounded-xl p-6 text-center shadow-sm"><div class="flex items-center justify-center mb-3"><span class="w-8 h-8 bg-gray-400 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span></div> <p class="text-gray-600 font-medium">Connect to the IRC server to access chat features</p> <p class="text-gray-500 text-sm mt-1">Complete steps 1-3 above to unlock this section</p></div>'),xe=w('<div class="bg-orange-50 border-l-4 border-orange-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-orange-800 mb-2">💬 IRC Connection Process</h3> <p class="text-orange-700 text-sm mb-3">IRC (Internet Relay Chat) requires several steps to get connected and chatting.</p> <div class="text-orange-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Provide server connection details</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to IRC server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a channel to start chatting</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users</div></div></div> <div class="space-y-6"><div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-green-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-green-600 text-white rounded-full flex items-center justify-center text-sm font-bold">1</span> Confirm your actor</h4> <div class="space-y-4"><!> <!></div></div> <div class="bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-blue-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold">2</span> Configure Server Connection</h4> <div class="space-y-4"><div class="grid md:grid-cols-2 gap-4"><!> <!></div> <div class="bg-blue-100 border border-blue-200 rounded-lg p-3"><p class="text-blue-800 text-sm">💡 <strong>Popular IRC networks:</strong> irc.libera.chat, irc.oftc.net, irc.rizon.net</p></div> <!></div></div> <div class="bg-gradient-to-r from-purple-50 to-violet-50 border border-purple-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-purple-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold">3</span> Connect to Server</h4> <!></div> <!></div>',1);function Pe(O,D){ee(D,!0);const m=()=>q(k,"$actorIdStore",I),n=()=>q(o,"$sockethubState",I),[I,G]=oe(),k=N(`sh-${(Math.random()+1).toString(36).substring(7)}`);let u=v("chat.freenode.net"),g=v(6697),p=v("#sh-random"),b=v(!1);const o=N({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let d=B(()=>({id:m(),type:"person",name:m()})),H=B(()=>({type:"credentials",nick:m(),server:e(u),port:e(g),secure:!0}));async function K(){l(b,!0);try{await pe({"@context":await be("irc"),type:"connect",actor:{id:e(d).id,type:e(d).type,name:e(d).name}}),S(o,c(n).connected=!0,c(n))}catch(f){console.error(f),S(o,c(n).connected=!1,c(n)),S(o,c(n).joined=!1,c(n))}finally{l(b,!1)}}ue(O,{title:"IRC Platform Example",description:"Connect to IRC servers, join channels, and send messages using Sockethub's IRC platform.",children:(f,_e)=>{var R=xe(),j=t(re(R),2),h=s(j),$=t(s(h),2),P=s($);ce(P,{get value(){return ae(),m()},set value(r){se(k,r)}});var L=t(P,2);de(L,{get actor(){return e(d)},get sockethubState(){return o}}),a($),a(h);var x=t(h,2),A=t(s(x),2),_=s(A),F=s(_);z(F,{label:"IRC Server",id:"server",placeholder:"irc.libera.chat",get value(){return e(u)},set value(r){l(u,r,!0)}});var Q=t(F,2);z(Q,{label:"Port",id:"port",type:"number",placeholder:"6697",get value(){return e(g)},set value(r){l(g,r,!0)}}),a(_);var T=t(_,4);ie(T,{context:"irc",get credentials(){return e(H)},get actor(){return e(d)},get sockethubState(){return o}}),a(A),a(x);var y=t(x,2),U=t(s(y),2);le(U,{get sockethubState(){return o},get connecting(){return e(b)},onConnect:K}),a(y);var V=t(y,2);{var W=r=>{var i=fe(),E=t(s(i),2),M=s(E);me(M,{get actor(){return e(d)},get sockethubState(){return o},context:"irc",get room(){return e(p)},set room(Z){l(p,Z,!0)}});var J=t(M,2);ge(J,{});var Y=t(J,2);ve(Y,{context:"irc",get actor(){return e(d)},get sockethubState(){return o},get room(){return e(p)}}),a(E),a(i),C(r,i)},X=r=>{var i=he();C(r,i)};ne(V,r=>{n().connected?r(W):r(X,!1)})}a(j),C(f,R)}}),te(),G()}export{Pe as component};
@@ -1 +1 @@
1
- {"version":"1783339121292"}
1
+ {"version":"1783553781869"}
package/build/dummy.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="./favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="./_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: new URL(".", location).pathname.slice(0, -1)
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.D5427z_U.js"),
30
- import("./_app/immutable/entry/app.DX05TQx7.js")
29
+ import("./_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("./_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/build/feeds.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="./favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="./_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: new URL(".", location).pathname.slice(0, -1)
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.D5427z_U.js"),
30
- import("./_app/immutable/entry/app.DX05TQx7.js")
29
+ import("./_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("./_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/build/index.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="/favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="/_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="/_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="/_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="/_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="/_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="/_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="/_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="/_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="/_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="/_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="/_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="/_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="/_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: ""
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("/_app/immutable/entry/start.D5427z_U.js"),
30
- import("/_app/immutable/entry/app.DX05TQx7.js")
29
+ import("/_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("/_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/build/irc.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="./favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="./_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: new URL(".", location).pathname.slice(0, -1)
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.D5427z_U.js"),
30
- import("./_app/immutable/entry/app.DX05TQx7.js")
29
+ import("./_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("./_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="./favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="./_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: new URL(".", location).pathname.slice(0, -1)
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.D5427z_U.js"),
30
- import("./_app/immutable/entry/app.DX05TQx7.js")
29
+ import("./_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("./_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/build/xmpp.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <link rel="icon" href="./favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width" />
7
7
 
8
- <link rel="modulepreload" href="./_app/immutable/entry/start.D5427z_U.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/BpD8G2jq.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.CsBI0vdE.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BF3skBIG.js">
10
10
  <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
11
  <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/BfZhcH3H.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.DX05TQx7.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/pIrFrRr_.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.O51Bq4gE.js">
14
14
  <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
15
  <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
@@ -19,15 +19,15 @@
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_mm1ziy = {
22
+ __sveltekit_1pvd4mq = {
23
23
  base: new URL(".", location).pathname.slice(0, -1)
24
24
  };
25
25
 
26
26
  const element = document.currentScript.parentElement;
27
27
 
28
28
  Promise.all([
29
- import("./_app/immutable/entry/start.D5427z_U.js"),
30
- import("./_app/immutable/entry/app.DX05TQx7.js")
29
+ import("./_app/immutable/entry/start.CsBI0vdE.js"),
30
+ import("./_app/immutable/entry/app.O51Bq4gE.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sockethub/examples",
3
- "version": "1.0.0-alpha.14",
3
+ "version": "1.0.0-alpha.16",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "build"
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@playwright/test": "^1.57.0",
46
- "@sockethub/client": "^5.0.0-alpha.14",
46
+ "@sockethub/client": "^5.0.0-alpha.16",
47
47
  "@sveltejs/adapter-static": "^3.0.10",
48
48
  "@sveltejs/kit": "^2.50.0",
49
49
  "@sveltejs/vite-plugin-svelte": "^5.1.1",
@@ -62,5 +62,5 @@
62
62
  "vite": "^6.4.1",
63
63
  "vitest": "^3.2.4"
64
64
  },
65
- "gitHead": "4f99b07fc19c9606875621b3f96323fa6e62ae3f"
65
+ "gitHead": "0e0fc020bfee01abea1f9a6b1812ab6414bbdadf"
66
66
  }
@@ -1 +0,0 @@
1
- var s;const e=((s=globalThis.__sveltekit_mm1ziy)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_mm1ziy)==null?void 0:a.assets)??e??"";export{t as a,e as b};
@@ -1 +0,0 @@
1
- var Jt=t=>{throw TypeError(t)};var Ue=(t,e,n)=>e.has(t)||Jt("Cannot "+n);var w=(t,e,n)=>(Ue(t,e,"read from private field"),n?n.call(t):e.get(t)),L=(t,e,n)=>e.has(t)?Jt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b as T,g as I,d as O,I as ht,bf as Te}from"./DT_OQU4t.js";import{w as $t,o as Xt}from"./CF0IgWN3.js";import{a as Ie,b as U}from"./BfZhcH3H.js";class jt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Nt{constructor(e,n){this.status=e,this.location=n}}class Dt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}new URL("sveltekit-internal://");function Oe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Pe(t){return t.split("%25").map(decodeURI).join("%25")}function Ce(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function xt({href:t}){return t.split("#")[0]}function $e(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function je(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}const Ne=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&W.delete(Vt(t)),Ne(t,e));const W=new Map;function De(t,e){const n=Vt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&W.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=je(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Ve(t,e,n){if(W.size>0){const r=Vt(t,n),a=W.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);W.delete(r)}}return window.fetch(e,n)}function Vt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${$e(...a)}"]`}return r}const qe=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Be(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Me(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return At(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return At(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=qe.exec(c),[,u,v,f,h]=d;return e.push({name:f,matcher:h,optional:!!u,rest:!!v,chained:v?l===1&&o[0]==="":!1}),v?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return At(c)}).join("")}).join("")}/?$`),params:e}}function Ke(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Me(t){return t.slice(1).split("/").filter(Ke)}function ze(t,e,n){const r={},a=t.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<e.length;i+=1){const c=e[i];let l=a[i-o];if(c.chained&&c.rest&&o&&(l=a.slice(i-o,i+1).filter(d=>d).join("/"),o=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&c.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return r}function At(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Fe({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[c,l,d]])=>{const{pattern:u,params:v}=Be(i),f={id:i,exec:h=>{const _=u.exec(h);if(_)return ze(_,v,r)},errors:[1,...d||[]].map(h=>t[h]),layouts:[0,...l||[]].map(o),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function o(i){return i===void 0?i:[a.has(i),t[i]]}}function ce(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const Ge="1783339121292",le="sveltekit:snapshot",fe="sveltekit:scroll",ue="sveltekit:states",We="sveltekit:pageurl",z="sveltekit:history",H="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},qt=location.origin;function de(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function kt(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Zt={...D,"":D.hover};function he(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function pe(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=he(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||St(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===qt&&t.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function pt(t){let e=null,n=null,r=null,a=null,s=null,o=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=M(i,"preload-code")),a===null&&(a=M(i,"preload-data")),e===null&&(e=M(i,"keepfocus")),n===null&&(n=M(i,"noscroll")),s===null&&(s=M(i,"reload")),o===null&&(o=M(i,"replacestate")),i=he(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Zt[r??"off"],preload_data:Zt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(o)}}function te(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(o=>o)}function a(o){n=!1,e.set(o)}function s(o){let i;return e.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:r,set:a,subscribe:s}}const ge={v:()=>{}};function Ye(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ge;return o&&(t(!0),ge.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function St(t,e,n){return t.origin!==qt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Rn(t){}const me=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...me];const He=new Set([...me]);[...He];function Je(t){return t.filter(e=>e!=null)}function Bt(t){return t instanceof jt||t instanceof Dt?t.status:500}function Xe(t){return t instanceof Dt?t.text:"Internal Error"}let R,J,Lt;const Qe=Xt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Xt.toString());var et,nt,at,rt,ot,st,it,ct,oe,lt,se,ft,ie;Qe?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},Lt={current:!1}):(R=new(oe=class{constructor(){L(this,et,T({}));L(this,nt,T(null));L(this,at,T(null));L(this,rt,T({}));L(this,ot,T({id:null}));L(this,st,T({}));L(this,it,T(-1));L(this,ct,T(new URL("https://example.com")))}get data(){return I(w(this,et))}set data(e){O(w(this,et),e)}get form(){return I(w(this,nt))}set form(e){O(w(this,nt),e)}get error(){return I(w(this,at))}set error(e){O(w(this,at),e)}get params(){return I(w(this,rt))}set params(e){O(w(this,rt),e)}get route(){return I(w(this,ot))}set route(e){O(w(this,ot),e)}get state(){return I(w(this,st))}set state(e){O(w(this,st),e)}get status(){return I(w(this,it))}set status(e){O(w(this,it),e)}get url(){return I(w(this,ct))}set url(e){O(w(this,ct),e)}},et=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,oe),J=new(se=class{constructor(){L(this,lt,T(null))}get current(){return I(w(this,lt))}set current(e){O(w(this,lt),e)}},lt=new WeakMap,se),Lt=new(ie=class{constructor(){L(this,ft,T(!1))}get current(){return I(w(this,ft))}set current(e){O(w(this,ft),e)}},ft=new WeakMap,ie),ge.v=()=>Lt.current=!0);function Ze(t){Object.assign(R,t)}const tn=new Set(["icon","shortcut icon","apple-touch-icon"]),q=ce(fe)??{},X=ce(le)??{},N={url:te({}),page:te({}),navigating:$t(null),updated:Ye()};function Kt(t){q[t]=kt()}function en(t,e){let n=t+1;for(;q[n];)delete q[n],n+=1;for(n=e+1;X[n];)delete X[n],n+=1}function Q(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ee(){}let Mt,It,gt,C,Ot,b;const mt=[],_t=[];let y=null;function Pt(){var t;(t=y==null?void 0:y.fork)==null||t.then(e=>e==null?void 0:e.discard()),y=null}const dt=new Map,we=new Set,nn=new Set,Y=new Set;let m={branch:[],error:null,url:null},ye=!1,wt=!1,ne=!0,Z=!1,G=!1,ve=!1,zt=!1,be,S,A,V;const yt=new Set,ae=new Map;async function Un(t,e,n){var s,o,i,c,l;(s=globalThis.__sveltekit_mm1ziy)!=null&&s.data&&globalThis.__sveltekit_mm1ziy.data,document.URL!==location.href&&(location.href=location.href),b=t,await((i=(o=t.hooks).init)==null?void 0:i.call(o)),Mt=Fe(t),C=document.documentElement,Ot=e,It=t.nodes[0],gt=t.nodes[1],It(),gt(),S=(c=history.state)==null?void 0:c[z],A=(l=history.state)==null?void 0:l[H],S||(S=A=Date.now(),history.replaceState({...history.state,[z]:S,[H]:A},""));const r=q[S];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await _n(Ot,n)):(await F({type:"enter",url:de(b.hash?vn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function an(){mt.length=0,zt=!1}function ke(t){_t.some(e=>e==null?void 0:e.snapshot)&&(X[t]=_t.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=X[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=_t[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function re(){Kt(S),Qt(fe,q),ke(A),Qt(le,X)}async function rn(t,e,n,r){let a;e.invalidateAll&&Pt(),await F({type:"goto",url:de(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(zt=!0,a=[...ae.keys()]),e.invalidate&&e.invalidate.forEach(gn)}}),e.invalidateAll&&ht().then(ht).then(()=>{ae.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function on(t){if(t.id!==(y==null?void 0:y.id)){Pt();const e={};yt.add(e),y={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(yt.delete(e),n.type==="loaded"&&n.state.error&&Pt(),n)),fork:null}}return y.promise}async function Ut(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}async function Ee(t,e,n){var a;m=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),be=new b.root({target:e,props:{...t.props,stores:N,components:_t},hydrate:n,sync:!1}),await Promise.resolve(),Se(A),n){const s={from:null,to:{params:m.params,route:{id:((a=m.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};Y.forEach(o=>o(s))}wt=!0}function vt({url:t,params:e,branch:n,status:r,error:a,route:s,form:o}){let i="never";if(U&&(t.pathname===U||t.pathname===U+"/"))i="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=Oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:Je(n).map(f=>f.node.component),page:Ht(R)}};o!==void 0&&(c.props.form=o);let l={},d=!R,u=0;for(let f=0;f<Math.max(n.length,m.branch.length);f+=1){const h=n[f],_=m.branch[f];(h==null?void 0:h.data)!==(_==null?void 0:_.data)&&(d=!0),h&&(l={...l,...h.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!m.url||t.href!==m.url.href||m.error!==a||o!==void 0&&o!==R.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:d?l:R.data}),c}async function Ft({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var l,d;let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:s,universal:(l=c.universal)!=null&&l.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((d=c.universal)==null?void 0:d.trailingSlash)??(s==null?void 0:s.slash)}}function sn(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=wt?Ve(r,a.href,e):De(r,e);return{resolved:a,promise:s}}function cn(t,e,n,r,a,s){if(zt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==m.params[o])return!0;for(const o of a.dependencies)if(mt.some(i=>i(new URL(o))))return!0;return!1}function Gt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function ln(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function fn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Ht(R),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((y==null?void 0:y.id)===t)return yt.delete(y.token),y.promise;const{errors:o,layouts:i,leaf:c}=a,l=[...i,c];o.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));const d=m.url?t!==bt(m.url):!1,u=m.route?a.id!==m.route.id:!1,v=ln(m.url,n);let f=!1;const h=l.map(async(g,p)=>{var $;if(!g)return;const k=m.branch[p];return g[1]===(k==null?void 0:k.loader)&&!cn(f,u,d,v,($=k.universal)==null?void 0:$.uses,r)?k:(f=!0,Ft({loader:g[1],url:n,params:r,route:a,parent:async()=>{var ut;const P={};for(let B=0;B<p;B+=1)Object.assign(P,(ut=await h[B])==null?void 0:ut.data);return P},server_data_node:Gt(g[0]?{type:"skip"}:null,g[0]?k==null?void 0:k.server:void 0)}))});for(const g of h)g.catch(()=>{});const _=[];for(let g=0;g<l.length;g+=1)if(l[g])try{_.push(await h[g])}catch(p){if(p instanceof Nt)return{type:"redirect",location:p.location};if(yt.has(s))return fn({error:await tt(p,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Bt(p),x;if(p instanceof jt)x=p.body;else{if(await N.updated.check())return await _e(),await Q(n);x=await tt(p,{params:r,url:n,route:{id:a.id}})}const $=await un(g,_,o);return $?vt({url:n,params:r,branch:_.slice(0,$.idx).concat($.node),status:k,error:x,route:a}):await Ae(n,{id:a.id},x,k)}else _.push(void 0);return vt({url:n,params:r,branch:_,status:200,error:null,route:a,form:e?void 0:null})}async function un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Wt({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const o=await Ft({loader:It,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Gt(s)}),i={node:await gt(),loader:gt,universal:null,server:null,data:null};return vt({url:n,params:a,branch:[o,i],status:t,error:e,route:null})}catch(o){if(o instanceof Nt)return rn(new URL(o.location,location.href),{},0);throw o}}async function dn(t){const e=t.href;if(dt.has(e))return dt.get(e);let n;try{const r=(async()=>{let a=await b.hooks.reroute({url:new URL(t),fetch:async(s,o)=>sn(s,o,t).promise})??t;if(typeof a=="string"){const s=new URL(t);b.hash?s.hash=a:s.pathname=a,a=s}return a})();dt.set(e,r),n=await r}catch{dt.delete(e);return}return n}async function Et(t,e){if(t&&!St(t,U,b.hash)){const n=await dn(t);if(!n)return;const r=hn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ce(s),url:t}}}}function hn(t){return Pe(b.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function bt(t){return(b.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function xe({url:t,type:e,intent:n,delta:r,event:a}){let s=!1;const o=Yt(m,n,t,e);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Z||we.forEach(c=>c(i)),s?null:o}async function F({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=ee,block:d=ee,event:u}){var B;const v=V;V=c;const f=await Et(e,!1),h=t==="enter"?Yt(m,f,e,t):xe({url:e,type:t,delta:n==null?void 0:n.delta,intent:f,event:u});if(!h){d(),V===c&&(V=v);return}const _=S,g=A;l(),Z=!0,wt&&h.navigation.type!=="enter"&&N.navigating.set(J.current=h.navigation);let p=f&&await Re(f);if(!p){if(St(e,U,b.hash))return await Q(e,s);p=await Ae(e,{id:null},await tt(new Dt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(f==null?void 0:f.url)||e,V!==c)return h.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await F({type:t,url:new URL(p.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),h.fulfil(void 0);return}p=await Wt({status:500,error:await tt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else p.props.page.status>=400&&await N.updated.check()&&(await _e(),await Q(e,s));if(an(),Kt(_),ke(g),p.props.page.url.pathname!==e.pathname&&(e.pathname=p.props.page.url.pathname),o=n?n.state:o,!n){const E=s?0:1,K={[z]:S+=E,[H]:A+=E,[ue]:o};(s?history.replaceState:history.pushState).call(history,K,"",e),s||en(S,A)}const k=f&&(y==null?void 0:y.id)===f.id?y.fork:null;y=null,p.props.page.state=o;let x;if(wt){const E=(await Promise.all(Array.from(nn,j=>j(h.navigation)))).filter(j=>typeof j=="function");if(E.length>0){let j=function(){E.forEach(Rt=>{Y.delete(Rt)})};E.push(j),E.forEach(Rt=>{Y.add(Rt)})}m=p.state,p.props.page&&(p.props.page.url=e);const K=k&&await k;K?x=K.commit():(be.$set(p.props),Ze(p.props.page),x=(B=Te)==null?void 0:B()),ve=!0}else await Ee(p,Ot,!1);const{activeElement:$}=document;await x,await ht(),await ht();let P=n?n.scroll:a?kt():null;if(ne){const E=e.hash&&document.getElementById(Le(e));if(P)scrollTo(P.x,P.y);else if(E){E.scrollIntoView();const{top:K,left:j}=E.getBoundingClientRect();P={x:pageXOffset+j,y:pageYOffset+K}}else scrollTo(0,0)}const ut=document.activeElement!==$&&document.activeElement!==document.body;!r&&!ut&&yn(e,P),ne=!0,p.props.page&&Object.assign(R,p.props.page),Z=!1,t==="popstate"&&Se(A),h.fulfil(void 0),Y.forEach(E=>E(h.navigation)),N.navigating.set(J.current=null)}async function Ae(t,e,n,r,a){return t.origin===qt&&t.pathname===location.pathname&&!ye?await Wt({status:r,error:n,url:t,route:e}):await Q(t,a)}function pn(){let t,e,n;C.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{s(c,D.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],D.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(Ut(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(i,c){const l=pe(i,C),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:v,download:f}=Tt(l,U,b.hash);if(v||f)return;const h=pt(l),_=u&&bt(m.url)===bt(u);if(!(h.reload||_))if(c<=h.preload_data){e=l,n=D.tap;const g=await Et(u,!1);if(!g)return;on(g)}else c<=h.preload_code&&(e=l,n=c,Ut(u))}function o(){a.disconnect();for(const i of C.querySelectorAll("a")){const{url:c,external:l,download:d}=Tt(i,U,b.hash);if(l||d)continue;const u=pt(i);u.reload||(u.preload_code===D.viewport&&a.observe(i),u.preload_code===D.eager&&Ut(c))}}Y.add(o),o()}function tt(t,e){if(t instanceof jt)return t.body;const n=Bt(t),r=Xe(t);return b.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function gn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function mn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(re(),!Z){const a=Yt(m,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};we.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&re()}),(e=navigator.connection)!=null&&e.saveData||pn(),C.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pe(n.composedPath()[0],C);if(!r)return;const{url:a,external:s,target:o,download:i}=Tt(r,U,b.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(b.hash?a.hash.replace(/^#/,""):a.href).split("#"),v=d===xt(location);if(s||c.reload&&(!v||!u)){xe({url:a,type:"link",event:n})?Z=!0:n.preventDefault();return}if(u!==void 0&&v){const[,f]=m.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=r.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(G=!0,Kt(S),t(a),!c.replace_state)return;G=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),C.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(St(i,U,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);i.search=new URLSearchParams(d).toString(),F({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ct){if((r=n.state)!=null&&r[z]){const a=n.state[z];if(V={},a===S)return;const s=q[a],o=n.state[ue]??{},i=new URL(n.state[We]??location.href),c=n.state[H],l=m.url?xt(location)===xt(m.url):!1;if(c===A&&(ve||l)){o!==R.state&&(R.state=o),t(i),q[S]=kt(),s&&scrollTo(s.x,s.y),S=a;return}const u=a-S;await F({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{S=a,A=c},block:()=>{history.go(-u)},nav_token:V,event:n})}else if(!G){const a=new URL(location.href);t(a),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[z]:++S,[H]:A},"",location.href))});for(const n of document.querySelectorAll("link"))tn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&N.navigating.set(J.current=null)});function t(n){m.url=R.url=n,N.page.set(Ht(R)),N.page.notify()}}async function _n(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:c}){ye=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,v=!0;try{const f=r.map(async(_,g)=>{const p=i[g];return p!=null&&p.uses&&(p.uses=wn(p.uses)),Ft({loader:b.nodes[_],url:l,params:a,route:s,parent:async()=>{const k={};for(let x=0;x<g;x+=1)Object.assign(k,(await f[x]).data);return k},server_data_node:Gt(p)})}),h=await Promise.all(f);if(d){const _=d.layouts;for(let g=0;g<_.length;g++)_[g]||h.splice(g,0,void 0)}u=vt({url:l,params:a,branch:h,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Nt){await Q(new URL(f.location,location.href));return}u=await Wt({status:Bt(f),error:await tt(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",v=!1}u.props.page&&(u.props.page.state={}),await Ee(u,t,v)}function wn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Ct=!1;function yn(t,e=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Le(t);if(r&&document.getElementById(r)){const{x:s,y:o}=e??kt();setTimeout(()=>{const i=history.state;Ct=!0,location.replace(`#${r}`),b.hash&&location.replace(t.hash),history.replaceState(i,"",t.hash),scrollTo(s,o),Ct=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],c=a.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Yt(t,e,n,r){var c,l;let a,s;const o=new Promise((d,u)=>{a=d,s=u});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:o},fulfil:a,reject:s}}function Ht(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function vn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Le(t){let e;if(b.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Un as a,Rn as l,R as p,N as s};
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/BpD8G2jq.js";export{o as load_css,r as start};