@sockethub/examples 1.0.0-alpha.12 → 1.0.0-alpha.13

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 (48) hide show
  1. package/README.md +36 -148
  2. package/build/_app/immutable/assets/{0.DWIWvKCl.css → 0.GKlhshq0.css} +1 -1
  3. package/build/_app/immutable/chunks/{Cf7Xaqef.js → B5Mgq-ia.js} +1 -1
  4. package/build/_app/immutable/chunks/{B1Dg8LdY.js → BAMCB3hl.js} +1 -1
  5. package/build/_app/immutable/chunks/{P3PHXZz3.js → BB3nrZKK.js} +2 -2
  6. package/build/_app/immutable/chunks/{B-2myMF5.js → BPmfLl8P.js} +1 -1
  7. package/build/_app/immutable/chunks/Bh9jqwq3.js +2 -0
  8. package/build/_app/immutable/chunks/CE_Br0Li.js +36 -0
  9. package/build/_app/immutable/chunks/{CARmnL8B.js → CF0IgWN3.js} +1 -1
  10. package/build/_app/immutable/chunks/{CC-fhLYv.js → CLc0OQ-M.js} +1 -1
  11. package/build/_app/immutable/chunks/CLcl1K30.js +1 -0
  12. package/build/_app/immutable/chunks/{D_xw8KSE.js → CPsRFLIg.js} +1 -1
  13. package/build/_app/immutable/chunks/DTPsrcK7.js +4 -0
  14. package/build/_app/immutable/chunks/{Ciq9INsC.js → DT_OQU4t.js} +1 -1
  15. package/build/_app/immutable/chunks/{DOKWDPrU.js → De6kqrZW.js} +1 -1
  16. package/build/_app/immutable/chunks/{BFNCz1gq.js → DhU_U-a9.js} +1 -1
  17. package/build/_app/immutable/chunks/Dm-WrFn1.js +1 -0
  18. package/build/_app/immutable/chunks/aGNzqrdP.js +1 -0
  19. package/build/_app/immutable/entry/{app.C9H-zozU.js → app.44tyicEj.js} +2 -2
  20. package/build/_app/immutable/entry/start.D_PJ6UtD.js +1 -0
  21. package/build/_app/immutable/nodes/{0.DcZ2dsmt.js → 0.COBjogKI.js} +1 -1
  22. package/build/_app/immutable/nodes/{1.C6aP9uS2.js → 1.ZmYfbvuo.js} +1 -1
  23. package/build/_app/immutable/nodes/{2.BPwYaw3N.js → 2.B-c8MtqI.js} +3 -3
  24. package/build/_app/immutable/nodes/3.DKOfQDif.js +2 -0
  25. package/build/_app/immutable/nodes/{6.BSB3XMkK.js → 4.PE7b6wi8.js} +1 -1
  26. package/build/_app/immutable/nodes/5.Cc6bNRTx.js +1 -0
  27. package/build/_app/immutable/nodes/6.D0DWXXhX.js +1 -0
  28. package/build/_app/immutable/nodes/7.CFhuHlBr.js +1 -0
  29. package/build/_app/version.json +1 -1
  30. package/build/dummy.html +12 -12
  31. package/build/feeds.html +12 -12
  32. package/build/index.html +12 -12
  33. package/build/irc.html +12 -12
  34. package/build/metadata-test.html +16 -0
  35. package/build/metadata.html +12 -12
  36. package/build/xmpp.html +12 -12
  37. package/package.json +5 -4
  38. package/build/_app/immutable/chunks/BnKTx64M.js +0 -1
  39. package/build/_app/immutable/chunks/CihmTBhe.js +0 -66
  40. package/build/_app/immutable/chunks/Dcal-xrT.js +0 -4
  41. package/build/_app/immutable/chunks/DqdrLdzV.js +0 -2
  42. package/build/_app/immutable/chunks/FDiY3NYw.js +0 -1
  43. package/build/_app/immutable/chunks/UKP-Z6jI.js +0 -1
  44. package/build/_app/immutable/entry/start.vRxtmFzd.js +0 -1
  45. package/build/_app/immutable/nodes/3.BGd6WCa1.js +0 -1
  46. package/build/_app/immutable/nodes/4.G9Lcgqeg.js +0 -1
  47. package/build/_app/immutable/nodes/5.B4MUA0zQ.js +0 -1
  48. package/build/_app/immutable/nodes/7.IHPDEcKQ.js +0 -1
@@ -1 +1 @@
1
- import{F as l,e as p,ad as m,j as h,h as r,ae as g,af as v,a4 as y}from"./Ciq9INsC.js";function _(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function w(e,n,t){if(e==null)return n(void 0),l;const s=p(()=>e.subscribe(n,t));return s.unsubscribe?()=>s.unsubscribe():s}const i=[];function q(e,n=l){let t=null;const s=new Set;function o(c){if(m(e,c)&&(e=c,t)){const f=!i.length;for(const u of s)u[1](),i.push(u,e);if(f){for(let u=0;u<i.length;u+=2)i[u][0](i[u+1]);i.length=0}}}function a(c){o(c(e))}function b(c,f=l){const u=[c,f];return s.add(u),s.size===1&&(t=n(o,a)||l),c(e),()=>{s.delete(u),s.size===0&&t&&(t(),t=null)}}return{set:o,update:a,subscribe:b}}function E(e){let n;return w(e,t=>n=t)(),n}function z(e){r===null&&_(),y&&r.l!==null?d(r).m.push(e):h(()=>{const n=p(e);if(typeof n=="function")return n})}function x(e,n,{bubbles:t=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:n,bubbles:t,cancelable:s})}function $(){const e=r;return e===null&&_(),(n,t,s)=>{var a;const o=(a=e.s.$$events)==null?void 0:a[n];if(o){const b=g(o)?o.slice():[o],c=x(n,t,s);for(const f of b)f.call(e.x,c);return!c.defaultPrevented}return!0}}function j(e){r===null&&_(),r.l===null&&v(),d(r).a.push(e)}function d(e){var n=e.l;return n.u??(n.u={a:[],b:[],m:[]})}export{j as a,$ as c,E as g,z as o,w as s,q as w};
1
+ import{F as l,e as p,ad as m,j as h,h as r,ae as g,af as v,a4 as y}from"./DT_OQU4t.js";function _(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function w(e,n,t){if(e==null)return n(void 0),l;const s=p(()=>e.subscribe(n,t));return s.unsubscribe?()=>s.unsubscribe():s}const i=[];function q(e,n=l){let t=null;const s=new Set;function o(c){if(m(e,c)&&(e=c,t)){const f=!i.length;for(const u of s)u[1](),i.push(u,e);if(f){for(let u=0;u<i.length;u+=2)i[u][0](i[u+1]);i.length=0}}}function a(c){o(c(e))}function b(c,f=l){const u=[c,f];return s.add(u),s.size===1&&(t=n(o,a)||l),c(e),()=>{s.delete(u),s.size===0&&t&&(t(),t=null)}}return{set:o,update:a,subscribe:b}}function E(e){let n;return w(e,t=>n=t)(),n}function z(e){r===null&&_(),y&&r.l!==null?d(r).m.push(e):h(()=>{const n=p(e);if(typeof n=="function")return n})}function x(e,n,{bubbles:t=!1,cancelable:s=!1}={}){return new CustomEvent(e,{detail:n,bubbles:t,cancelable:s})}function $(){const e=r;return e===null&&_(),(n,t,s)=>{var a;const o=(a=e.s.$$events)==null?void 0:a[n];if(o){const b=g(o)?o.slice():[o],c=x(n,t,s);for(const f of b)f.call(e.x,c);return!c.defaultPrevented}return!0}}function j(e){r===null&&_(),r.l===null&&v(),d(r).a.push(e)}function d(e){var n=e.l;return n.u??(n.u={a:[],b:[],m:[]})}export{j as a,$ as c,E as g,z as o,w as s,q as w};
@@ -1 +1 @@
1
- var D=Object.defineProperty;var g=i=>{throw TypeError(i)};var C=(i,e,s)=>e in i?D(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s;var w=(i,e,s)=>C(i,typeof e!="symbol"?e+"":e,s),y=(i,e,s)=>e.has(i)||g("Cannot "+s);var t=(i,e,s)=>(y(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(i,e,s)=>e.has(i)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),M=(i,e,s,a)=>(y(i,e,"write to private field"),a?a.call(i,s):e.set(i,s),s);import{q as x,v as F,w as k,x as q,y as A,z as B,A as z,B as S,C as j,D as E}from"./Ciq9INsC.js";var r,n,h,p,m,v,_;class I{constructor(e,s=!0){w(this,"anchor");l(this,r,new Map);l(this,n,new Map);l(this,h,new Map);l(this,p,new Set);l(this,m,!0);l(this,v,()=>{var e=x;if(t(this,r).has(e)){var s=t(this,r).get(e),a=t(this,n).get(s);if(a)F(a),t(this,p).delete(s);else{var c=t(this,h).get(s);c&&(t(this,n).set(s,c.effect),t(this,h).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),a=c.effect)}for(const[f,o]of t(this,r)){if(t(this,r).delete(f),f===e)break;const d=t(this,h).get(o);d&&(k(d.effect),t(this,h).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,p).has(f))continue;const d=()=>{if(Array.from(t(this,r).values()).includes(f)){var b=document.createDocumentFragment();j(o,b),b.append(A()),t(this,h).set(f,{effect:o,fragment:b})}else k(o);t(this,p).delete(f),t(this,n).delete(f)};t(this,m)||!a?(t(this,p).add(f),q(o,d,!1)):d()}}});l(this,_,e=>{t(this,r).delete(e);const s=Array.from(t(this,r).values());for(const[a,c]of t(this,h))s.includes(a)||(k(c.effect),t(this,h).delete(a))});this.anchor=e,M(this,m,s)}ensure(e,s){var a=x,c=E();if(s&&!t(this,n).has(e)&&!t(this,h).has(e))if(c){var f=document.createDocumentFragment(),o=A();f.append(o),t(this,h).set(e,{effect:B(()=>s(o)),fragment:f})}else t(this,n).set(e,B(()=>s(this.anchor)));if(t(this,r).set(a,e),c){for(const[d,u]of t(this,n))d===e?a.skipped_effects.delete(u):a.skipped_effects.add(u);for(const[d,u]of t(this,h))d===e?a.skipped_effects.delete(u.effect):a.skipped_effects.add(u.effect);a.oncommit(t(this,v)),a.ondiscard(t(this,_))}else z&&(this.anchor=S),t(this,v).call(this)}}r=new WeakMap,n=new WeakMap,h=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,_=new WeakMap;export{I as B};
1
+ var D=Object.defineProperty;var g=i=>{throw TypeError(i)};var C=(i,e,s)=>e in i?D(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s;var w=(i,e,s)=>C(i,typeof e!="symbol"?e+"":e,s),y=(i,e,s)=>e.has(i)||g("Cannot "+s);var t=(i,e,s)=>(y(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(i,e,s)=>e.has(i)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),M=(i,e,s,a)=>(y(i,e,"write to private field"),a?a.call(i,s):e.set(i,s),s);import{q as x,v as F,w as k,x as q,y as A,z as B,A as z,B as S,C as j,D as E}from"./DT_OQU4t.js";var r,n,h,p,m,v,_;class I{constructor(e,s=!0){w(this,"anchor");l(this,r,new Map);l(this,n,new Map);l(this,h,new Map);l(this,p,new Set);l(this,m,!0);l(this,v,()=>{var e=x;if(t(this,r).has(e)){var s=t(this,r).get(e),a=t(this,n).get(s);if(a)F(a),t(this,p).delete(s);else{var c=t(this,h).get(s);c&&(t(this,n).set(s,c.effect),t(this,h).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),a=c.effect)}for(const[f,o]of t(this,r)){if(t(this,r).delete(f),f===e)break;const d=t(this,h).get(o);d&&(k(d.effect),t(this,h).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,p).has(f))continue;const d=()=>{if(Array.from(t(this,r).values()).includes(f)){var b=document.createDocumentFragment();j(o,b),b.append(A()),t(this,h).set(f,{effect:o,fragment:b})}else k(o);t(this,p).delete(f),t(this,n).delete(f)};t(this,m)||!a?(t(this,p).add(f),q(o,d,!1)):d()}}});l(this,_,e=>{t(this,r).delete(e);const s=Array.from(t(this,r).values());for(const[a,c]of t(this,h))s.includes(a)||(k(c.effect),t(this,h).delete(a))});this.anchor=e,M(this,m,s)}ensure(e,s){var a=x,c=E();if(s&&!t(this,n).has(e)&&!t(this,h).has(e))if(c){var f=document.createDocumentFragment(),o=A();f.append(o),t(this,h).set(e,{effect:B(()=>s(o)),fragment:f})}else t(this,n).set(e,B(()=>s(this.anchor)));if(t(this,r).set(a,e),c){for(const[d,u]of t(this,n))d===e?a.skipped_effects.delete(u):a.skipped_effects.add(u);for(const[d,u]of t(this,h))d===e?a.skipped_effects.delete(u.effect):a.skipped_effects.add(u.effect);a.oncommit(t(this,v)),a.ondiscard(t(this,_))}else z&&(this.anchor=S),t(this,v).call(this)}}r=new WeakMap,n=new WeakMap,h=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,_=new WeakMap;export{I as B};
@@ -0,0 +1 @@
1
+ import{E as a}from"./DT_OQU4t.js";a();
@@ -1 +1 @@
1
- import{f as l,a as p,s as h}from"./DqdrLdzV.js";import{c as t,F as x,r as a,s as b,t as g}from"./Ciq9INsC.js";import{b as c}from"./P3PHXZz3.js";var u=l('<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8"><!></div>');function y(e,o){var r=u(),s=t(r);c(s,()=>o.children??x),a(r),p(e,r)}var _=l('<div class="bg-white shadow-sm border border-gray-200 rounded-xl overflow-hidden"><div class="bg-gradient-to-r from-blue-50 to-indigo-50 px-8 py-6 border-b border-gray-200"><h1 class="text-3xl font-bold text-gray-900 tracking-tight"> </h1></div> <div class="px-8 py-6"><!></div></div>');function A(e,o){y(e,{children:(r,s)=>{var i=_(),d=t(i),v=t(d),m=t(v,!0);a(v),a(d);var n=b(d,2),f=t(n);c(f,()=>o.children??x),a(n),a(i),g(()=>h(m,o.title)),p(r,i)}})}export{A as I};
1
+ import{f as l,a as p,s as h}from"./Bh9jqwq3.js";import{c as t,F as x,r as a,s as b,t as g}from"./DT_OQU4t.js";import{b as c}from"./BB3nrZKK.js";var u=l('<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8"><!></div>');function y(e,o){var r=u(),s=t(r);c(s,()=>o.children??x),a(r),p(e,r)}var _=l('<div class="bg-white shadow-sm border border-gray-200 rounded-xl overflow-hidden"><div class="bg-gradient-to-r from-blue-50 to-indigo-50 px-8 py-6 border-b border-gray-200"><h1 class="text-3xl font-bold text-gray-900 tracking-tight"> </h1></div> <div class="px-8 py-6"><!></div></div>');function A(e,o){y(e,{children:(r,s)=>{var i=_(),d=t(i),v=t(d),m=t(v,!0);a(v),a(d);var n=b(d,2),f=t(n);c(f,()=>o.children??x),a(n),a(i),g(()=>h(m,o.title)),p(r,i)}})}export{A as I};
@@ -0,0 +1,4 @@
1
+ import{f as j,a as g,s as D,t as z}from"./Bh9jqwq3.js";import{p as O,G as F,t as w,a as T,j as p,d as m,b as J,f as B,c as x,r as h,s as v,g as r,u as H,n as K,e as i}from"./DT_OQU4t.js";import{p as C,i as M,b as Q,c as _,s as R}from"./B5Mgq-ia.js";import{s as y,r as U}from"./BB3nrZKK.js";import{b as E,S as V}from"./DhU_U-a9.js";var W=j(`<textarea class="form-control block w-full px-3 py-1.5 text-base font-normal
2
+ text-gray-700 bg-white bg-clip-padding border border-solid
3
+ border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700
4
+ focus:bg-white focus:border-blue-600 focus:outline-none" rows="5"></textarea>`);function X(l,t){O(t,!0);let e=C(t,"data",15);var o=W();F(o),w(()=>y(o,"id",`json-object-${t.title??""}`)),E(o,e),g(l,o),T()}var Y=j('<div class="w-full p-2"><label class="inline-block text-gray-900 font-bold w-32">Password</label> <input type="password" class="border-4"/></div>'),Z=j('<div class="w-full"><label class="form-label inline-block text-gray-900 font-bold mb-2"> </label> <!></div> <!> <div class="w-full text-right"><!></div>',1);function $(l,t){O(t,!0);let e=C(t,"buttonText",3,"Send"),o=J(""),S=H(()=>`secret-input-${t.title.toLowerCase().replace(/\s+/g,"-")}`),s=J("");p(()=>{m(o,typeof t.obj.password=="string"?t.obj.password:"",!0)}),p(()=>{const a={...t.obj};delete a.password,m(s,JSON.stringify(a,null,3),!0)});async function k(){let a;try{a=JSON.parse(r(s))}catch(n){const d=n instanceof Error?n.message:String(n);throw new Error(`Invalid JSON: ${d}`)}r(o).length>0&&(a.password=r(o)),t.submitData(JSON.stringify(a))}var u=Z(),f=B(u),c=x(f),b=x(c,!0);h(c);var P=v(c,2);X(P,{get title(){return t.title},get data(){return r(s)},set data(a){m(s,a,!0)}}),h(f);var I=v(f,2);{var G=a=>{var n=Y(),d=x(n),A=v(d,2);U(A),h(n),w(()=>{y(d,"for",r(S)),y(A,"id",r(S))}),E(A,()=>r(o),q=>m(o,q)),g(a,n)};M(I,a=>{typeof t.obj.password=="string"&&a(G)})}var N=v(I,2),L=x(N);V(L,{get disabled(){return t.disabled},buttonAction:k,children:(a,n)=>{K();var d=z();w(()=>D(d,e())),g(a,d)}}),h(N),w(()=>{y(c,"for",`json-object-${t.title??""}`),D(b,t.title)}),g(l,u),T()}var tt=j('<p class="text-sm text-gray-600 mb-2">Define the <code>actor</code> object for credentials and message events. Include <code>id</code>, <code>type</code>, and <code>name</code> on every outbound message.</p> <!>',1);function nt(l,t){O(t,!0);const e=()=>Q(t.sockethubState,"$sockethubState",o),[o,S]=R();let s=J(void 0);p(()=>{e().actorSet&&r(s)&&t.actor.id!==r(s)&&(_(t.sockethubState,i(e).actorSet=!1,i(e)),"credentialsSet"in e()&&_(t.sockethubState,i(e).credentialsSet=!1,i(e)),"connected"in e()&&_(t.sockethubState,i(e).connected=!1,i(e)),"joined"in e()&&_(t.sockethubState,i(e).joined=!1,i(e)))});function k(c){const b=JSON.parse(c);console.log("actor confirmed for this app session:",b),t.sockethubState.set({actorSet:!0,credentialsSet:!1,connected:!1,joined:!1}),m(s,typeof b.id=="string"?b.id:void 0,!0)}var u=tt(),f=v(B(u),2);$(f,{title:"Actor",get obj(){return t.actor},buttonText:"Confirm actor",submitData:k,get disabled(){return e().actorSet}}),g(l,u),T(),S()}export{nt as A,$ as T};
@@ -1 +1 @@
1
- var ln=Object.defineProperty;var dt=e=>{throw TypeError(e)};var un=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>un(e,typeof t!="symbol"?t+"":t,n),Ke=(e,t,n)=>t.has(e)||dt("Cannot "+n);var y=(e,t,n)=>(Ke(e,t,"read from private field"),n?n.call(e):t.get(e)),Y=(e,t,n)=>t.has(e)?dt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),oe=(e,t,n,r)=>(Ke(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Ke(e,t,"access private method"),n);var on=Array.isArray,cn=Array.prototype.indexOf,Qn=Array.from,er=Object.defineProperty,be=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyDescriptors,vn=Object.prototype,dn=Array.prototype,bt=Object.getPrototypeOf,pt=Object.isExtensible;function tr(e){return typeof e=="function"}const nr=()=>{};function rr(e){return e()}function pn(e){for(var t=0;t<e.length;t++)e[t]()}function At(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function sr(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const A=2,Ie=4,Oe=8,nt=1<<24,q=16,H=32,ue=64,St=128,C=512,T=1024,D=2048,U=4096,j=8192,K=16384,rt=32768,ke=65536,ht=1<<17,Rt=1<<18,De=1<<19,xt=1<<20,fr=1<<25,Se=32768,Xe=1<<21,st=1<<22,$=1<<23,re=Symbol("$state"),ar=Symbol("legacy props"),ir=Symbol(""),ce=new class extends Error{constructor(){super(...arguments);B(this,"name","StaleReactionError");B(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ft=3,Ot=8;function hn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function yn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function wn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function En(e){throw new Error("https://svelte.dev/e/effect_orphan")}function gn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ur(){throw new Error("https://svelte.dev/e/hydration_failed")}function or(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function cr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Tn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function _r(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vr=1,dr=2,pr=4,hr=8,yr=16,wr=1,Er=2,gr=4,mr=8,Tr=16,br=1,Ar=2,An="[",Sn="[!",Rn="]",at={},E=Symbol(),Sr="http://www.w3.org/1999/xhtml",Rr="@attach";function it(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function xr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let X=!1;function Dr(e){X=e}let g;function ye(e){if(e===null)throw it(),at;return g=e}function Nr(){return ye(W(g))}function Pr(e){if(X){if(W(g)!==null)throw it(),at;g=e}}function Cr(e=1){if(X){for(var t=e,n=g;t--;)n=W(n);g=n}}function Ir(e=!0){for(var t=0,n=g;;){if(n.nodeType===Ot){var r=n.data;if(r===Rn){if(t===0)return n;t-=1}else(r===An||r===Sn)&&(t+=1)}var s=W(n);e&&n.remove(),n=s}}function kr(e){if(!e||e.nodeType!==Ot)throw it(),at;return e.data}function Dt(e){return e===this.v}function xn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Nt(e){return!xn(e,this.v)}let Be=!1;function Fr(){Be=!0}let b=null;function Fe(e){b=e}function Mr(e,t=!1,n){b={p:b,i:!1,c:null,e:null,s:e,x:null,l:Be&&!t?{s:null,u:null,$:[]}:null}}function jr(e){var t=b,n=t.e;if(n!==null){t.e=null;for(var r of n)$t(r)}return t.i=!0,b=t.p,{}}function Ne(){return!Be||b!==null&&b.l===null}let ee=[];function Pt(){var e=ee;ee=[],pn(e)}function Ct(e){if(ee.length===0&&!Ae){var t=ee;queueMicrotask(()=>{t===ee&&Pt()})}ee.push(e)}function On(){for(;ee.length>0;)Pt()}function Dn(e){var t=h;if(t===null)return _.f|=$,e;if((t.f&rt)===0){if((t.f&St)===0)throw e;t.b.error(e)}else Me(e,t)}function Me(e,t){for(;t!==null;){if((t.f&St)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Nn=-7169;function S(e,t){e.f=e.f&Nn|t}function lt(e){(e.f&C)!==0||e.deps===null?S(e,T):S(e,U)}function It(e){if(e!==null)for(const t of e)(t.f&A)===0||(t.f&Se)===0||(t.f^=Se,It(t.deps))}function Pn(e,t,n){(e.f&D)!==0?t.add(e):(e.f&U)!==0&&n.add(e),It(e.deps),S(e,T)}const Ce=new Set;let p=null,$e=null,m=null,P=[],Ve=null,Ze=!1,Ae=!1;var ve,de,te,ne,xe,pe,he,I,We,Je,kt,Ft;const Ue=class Ue{constructor(){Y(this,I);B(this,"committed",!1);B(this,"current",new Map);B(this,"previous",new Map);Y(this,ve,new Set);Y(this,de,new Set);Y(this,te,0);Y(this,ne,0);Y(this,xe,null);Y(this,pe,new Set);Y(this,he,new Set);B(this,"skipped_effects",new Set);B(this,"is_fork",!1)}is_deferred(){return this.is_fork||y(this,ne)>0}process(t){var s;P=[],$e=null,this.apply();var n=[],r=[];for(const f of t)Q(this,I,We).call(this,f,n,r);this.is_fork||Q(this,I,kt).call(this),this.is_deferred()?(Q(this,I,Je).call(this,r),Q(this,I,Je).call(this,n)):($e=this,p=null,yt(r),yt(n),$e=null,(s=y(this,xe))==null||s.resolve()),m=null}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&$)===0&&(this.current.set(t,t.v),m==null||m.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,m=null)}flush(){if(this.activate(),P.length>0){if(Mt(),p!==null&&p!==this)return}else y(this,te)===0&&this.process([]);this.deactivate()}discard(){for(const t of y(this,de))t(this);y(this,de).clear()}increment(t){oe(this,te,y(this,te)+1),t&&oe(this,ne,y(this,ne)+1)}decrement(t){oe(this,te,y(this,te)-1),t&&oe(this,ne,y(this,ne)-1),this.revive()}revive(){for(const t of y(this,pe))y(this,he).delete(t),S(t,D),ae(t);for(const t of y(this,he))S(t,U),ae(t);this.flush()}oncommit(t){y(this,ve).add(t)}ondiscard(t){y(this,de).add(t)}settled(){return(y(this,xe)??oe(this,xe,At())).promise}static ensure(){if(p===null){const t=p=new Ue;Ce.add(p),Ae||Ue.enqueue(()=>{p===t&&t.flush()})}return p}static enqueue(t){Ct(t)}apply(){}};ve=new WeakMap,de=new WeakMap,te=new WeakMap,ne=new WeakMap,xe=new WeakMap,pe=new WeakMap,he=new WeakMap,I=new WeakSet,We=function(t,n,r){t.f^=T;for(var s=t.first,f=null;s!==null;){var a=s.f,u=(a&(H|ue))!==0,i=u&&(a&T)!==0,l=i||(a&j)!==0||this.skipped_effects.has(s);if(!l&&s.fn!==null){u?s.f^=T:f!==null&&(a&(Ie|Oe|nt))!==0?f.b.defer_effect(s):(a&Ie)!==0?n.push(s):me(s)&&((a&q)!==0&&y(this,pe).add(s),ge(s));var o=s.first;if(o!==null){s=o;continue}}var c=s.parent;for(s=s.next;s===null&&c!==null;)c===f&&(f=null),s=c.next,c=c.parent}},Je=function(t){for(var n=0;n<t.length;n+=1)Pn(t[n],y(this,pe),y(this,he))},kt=function(){if(y(this,ne)===0){for(const t of y(this,ve))t();y(this,ve).clear()}y(this,te)===0&&Q(this,I,Ft).call(this)},Ft=function(){var s;if(Ce.size>1){this.previous.clear();var t=m,n=!0;for(const f of Ce){if(f===this){n=!1;continue}const a=[];for(const[i,l]of this.current){if(f.current.has(i))if(n&&l!==f.current.get(i))f.current.set(i,l);else continue;a.push(i)}if(a.length===0)continue;const u=[...f.current.keys()].filter(i=>!this.current.has(i));if(u.length>0){var r=P;P=[];const i=new Set,l=new Map;for(const o of a)jt(o,u,i,l);if(P.length>0){p=f,f.apply();for(const o of P)Q(s=f,I,We).call(s,o,[],[]);f.deactivate()}P=r}}p=null,m=t}this.committed=!0,Ce.delete(this)};let we=Ue;function Cn(e){var t=Ae;Ae=!0;try{for(var n;;){if(On(),P.length===0&&(p==null||p.flush(),P.length===0))return Ve=null,n;Mt()}}finally{Ae=t}}function Mt(){var e=se;Ze=!0;var t=null;try{var n=0;for(qe(!0);P.length>0;){var r=we.ensure();if(n++>1e3){var s,f;In()}r.process(P),z.clear()}}finally{Ze=!1,qe(e),Ve=null}}function In(){try{gn()}catch(e){Me(e,Ve)}}let k=null;function yt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(K|j))===0&&me(r)&&(k=new Set,ge(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Wt(r):r.fn=null),(k==null?void 0:k.size)>0)){z.clear();for(const s of k){if((s.f&(K|j))!==0)continue;const f=[s];let a=s.parent;for(;a!==null;)k.has(a)&&(k.delete(a),f.push(a)),a=a.parent;for(let u=f.length-1;u>=0;u--){const i=f[u];(i.f&(K|j))===0&&ge(i)}}k.clear()}}k=null}}function jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&A)!==0?jt(s,t,n,r):(f&(st|q))!==0&&(f&D)===0&&Lt(s,t,r)&&(S(s,D),ae(s))}}function Lt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&A)!==0&&Lt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ae(e){for(var t=Ve=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===h&&(n&q)!==0&&(n&Rt)===0)return;if((n&(ue|H))!==0){if((n&T)===0)return;t.f^=T}}P.push(t)}function kn(e,t,n,r){const s=Ne()?ut:jn;if(n.length===0&&e.length===0){r(t.map(s));return}var f=p,a=h,u=Fn();function i(){Promise.all(n.map(l=>Mn(l))).then(l=>{u();try{r([...t.map(s),...l])}catch(o){(a.f&K)===0&&Me(o,a)}f==null||f.deactivate(),je()}).catch(l=>{Me(l,a)})}e.length>0?Promise.all(e).then(()=>{u();try{return i()}finally{f==null||f.deactivate(),je()}}):i()}function Fn(){var e=h,t=_,n=b,r=p;return function(f=!0){Ee(e),Z(t),Fe(n),f&&(r==null||r.activate())}}function je(){Ee(null),Z(null),Fe(null)}function ut(e){var t=A|D,n=_!==null&&(_.f&A)!==0?_:null;return h!==null&&(h.f|=De),{ctx:b,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??h,ac:null}}function Mn(e,t,n){let r=h;r===null&&hn();var s=r.b,f=void 0,a=ct(E),u=!_,i=new Map;return Gn(()=>{var d;var l=At();f=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{o===p&&o.committed&&o.deactivate(),je()})}catch(w){l.reject(w),je()}var o=p;if(u){var c=s.is_rendered();s.update_pending_count(1),o.increment(c),(d=i.get(o))==null||d.reject(ce),i.delete(o),i.set(o,l)}const v=(w,L=void 0)=>{if(o.activate(),L)L!==ce&&(a.f|=$,et(a,L));else{(a.f&$)!==0&&(a.f^=$),et(a,w);for(const[J,Pe]of i){if(i.delete(J),J===o)break;Pe.reject(ce)}}u&&(s.update_pending_count(-1),o.decrement(c))};l.promise.then(v,w=>v(null,w||"unknown"))}),Vn(()=>{for(const l of i.values())l.reject(ce)}),new Promise(l=>{function o(c){function v(){c===f?l(a):o(f)}c.then(v,v)}o(f)})}function Lr(e){const t=ut(e);return en(t),t}function jn(e){const t=ut(e);return t.equals=Nt,t}function Yt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ie(t[n])}}function Ln(e){for(var t=e.parent;t!==null;){if((t.f&A)===0)return(t.f&K)===0?t:null;t=t.parent}return null}function ot(e){var t,n=h;Ee(Ln(e));try{e.f&=~Se,Yt(e),t=sn(e)}finally{Ee(n)}return t}function qt(e){var t=ot(e);if(!e.equals(t)&&(e.wv=nn(),(!(p!=null&&p.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){S(e,T);return}le||(m!==null?(Kt()||p!=null&&p.is_fork)&&m.set(e,t):lt(e))}let Qe=new Set;const z=new Map;let Ht=!1;function ct(e,t){var n={f:0,v:e,reactions:null,equals:Dt,rv:0,wv:0};return n}function V(e,t){const n=ct(e);return en(n),n}function Yr(e,t=!1,n=!0){var s;const r=ct(e);return t||(r.equals=Nt),Be&&n&&b!==null&&b.l!==null&&((s=b.l).s??(s.s=[])).push(r),r}function G(e,t,n=!1){_!==null&&(!F||(_.f&ht)!==0)&&Ne()&&(_.f&(A|q|st|ht))!==0&&!(x!=null&&x.includes(e))&&bn();let r=n?Te(t):t;return et(e,r)}function et(e,t){if(!e.equals(t)){var n=e.v;le?z.set(e,t):z.set(e,n),e.v=t;var r=we.ensure();if(r.capture(e,n),(e.f&A)!==0){const s=e;(e.f&D)!==0&&ot(s),lt(s)}e.wv=nn(),Ut(e,D),Ne()&&h!==null&&(h.f&T)!==0&&(h.f&(H|ue))===0&&(N===null?Xn([e]):N.push(e)),!r.is_fork&&Qe.size>0&&!Ht&&Yn()}return t}function Yn(){Ht=!1;var e=se;qe(!0);const t=Array.from(Qe);try{for(const n of t)(n.f&T)!==0&&S(n,U),me(n)&&ge(n)}finally{qe(e)}Qe.clear()}function qr(e,t=1){var n=_e(e),r=t===1?n++:n--;return G(e,n),r}function ze(e){G(e,e.v+1)}function Ut(e,t){var n=e.reactions;if(n!==null)for(var r=Ne(),s=n.length,f=0;f<s;f++){var a=n[f],u=a.f;if(!(!r&&a===h)){var i=(u&D)===0;if(i&&S(a,t),(u&A)!==0){var l=a;m==null||m.delete(l),(u&Se)===0&&(u&C&&(a.f|=Se),Ut(l,U))}else i&&((u&q)!==0&&k!==null&&k.add(a),ae(a))}}}function Te(e){if(typeof e!="object"||e===null||re in e)return e;const t=bt(e);if(t!==vn&&t!==dn)return e;var n=new Map,r=on(e),s=V(0),f=fe,a=u=>{if(fe===f)return u();var i=_,l=fe;Z(null),Tt(f);var o=u();return Z(i),Tt(l),o};return r&&n.set("length",V(e.length)),new Proxy(e,{defineProperty(u,i,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&mn();var o=n.get(i);return o===void 0?o=a(()=>{var c=V(l.value);return n.set(i,c),c}):G(o,l.value,!0),!0},deleteProperty(u,i){var l=n.get(i);if(l===void 0){if(i in u){const o=a(()=>V(E));n.set(i,o),ze(s)}}else G(l,E),ze(s);return!0},get(u,i,l){var d;if(i===re)return e;var o=n.get(i),c=i in u;if(o===void 0&&(!c||(d=be(u,i))!=null&&d.writable)&&(o=a(()=>{var w=Te(c?u[i]:E),L=V(w);return L}),n.set(i,o)),o!==void 0){var v=_e(o);return v===E?void 0:v}return Reflect.get(u,i,l)},getOwnPropertyDescriptor(u,i){var l=Reflect.getOwnPropertyDescriptor(u,i);if(l&&"value"in l){var o=n.get(i);o&&(l.value=_e(o))}else if(l===void 0){var c=n.get(i),v=c==null?void 0:c.v;if(c!==void 0&&v!==E)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return l},has(u,i){var v;if(i===re)return!0;var l=n.get(i),o=l!==void 0&&l.v!==E||Reflect.has(u,i);if(l!==void 0||h!==null&&(!o||(v=be(u,i))!=null&&v.writable)){l===void 0&&(l=a(()=>{var d=o?Te(u[i]):E,w=V(d);return w}),n.set(i,l));var c=_e(l);if(c===E)return!1}return o},set(u,i,l,o){var vt;var c=n.get(i),v=i in u;if(r&&i==="length")for(var d=l;d<c.v;d+=1){var w=n.get(d+"");w!==void 0?G(w,E):d in u&&(w=a(()=>V(E)),n.set(d+"",w))}if(c===void 0)(!v||(vt=be(u,i))!=null&&vt.writable)&&(c=a(()=>V(void 0)),G(c,Te(l)),n.set(i,c));else{v=c.v!==E;var L=a(()=>Te(l));G(c,L)}var J=Reflect.getOwnPropertyDescriptor(u,i);if(J!=null&&J.set&&J.set.call(o,l),!v){if(r&&typeof i=="string"){var Pe=n.get("length"),Ge=Number(i);Number.isInteger(Ge)&&Ge>=Pe.v&&G(Pe,Ge+1)}ze(s)}return!0},ownKeys(u){_e(s);var i=Reflect.ownKeys(u).filter(c=>{var v=n.get(c);return v===void 0||v.v!==E});for(var[l,o]of n)o.v!==E&&!(l in u)&&i.push(l);return i},setPrototypeOf(){Tn()}})}function wt(e){try{if(e!==null&&typeof e=="object"&&re in e)return e[re]}catch{}return e}function Hr(e,t){return Object.is(wt(e),wt(t))}var Et,qn,Bt,Vt;function Ur(){if(Et===void 0){Et=window,qn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Bt=be(t,"firstChild").get,Vt=be(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Le(e=""){return document.createTextNode(e)}function Ye(e){return Bt.call(e)}function W(e){return Vt.call(e)}function Br(e,t){if(!X)return Ye(e);var n=Ye(g);if(n===null)n=g.appendChild(Le());else if(t&&n.nodeType!==ft){var r=Le();return n==null||n.before(r),ye(r),r}return ye(n),n}function Vr(e,t=!1){if(!X){var n=Ye(e);return n instanceof Comment&&n.data===""?W(n):n}if(t&&(g==null?void 0:g.nodeType)!==ft){var r=Le();return g==null||g.before(r),ye(r),r}return g}function Gr(e,t=1,n=!1){let r=X?g:e;for(var s;t--;)s=r,r=W(r);if(!X)return r;if(n&&(r==null?void 0:r.nodeType)!==ft){var f=Le();return r===null?s==null||s.after(f):r.before(f),ye(f),f}return ye(r),r}function Hn(e){e.textContent=""}function Kr(){return!1}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,Ct(()=>{document.activeElement===n&&e.focus()})}}function zr(e){X&&Ye(e)!==null&&Hn(e)}let gt=!1;function Un(){gt||(gt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function _t(e){var t=_,n=h;Z(null),Ee(null);try{return e()}finally{Z(t),Ee(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>_t(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Un()}function Gt(e){h===null&&(_===null&&En(),wn()),le&&yn()}function Bn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function M(e,t,n){var r=h;r!==null&&(r.f&j)!==0&&(e|=j);var s={ctx:b,deps:null,nodes:null,f:e|D|C,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ge(s),s.f|=rt}catch(u){throw ie(s),u}else t!==null&&ae(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&De)===0&&(f=f.first,(e&q)!==0&&(e&ke)!==0&&f!==null&&(f.f|=ke)),f!==null&&(f.parent=r,r!==null&&Bn(f,r),_!==null&&(_.f&A)!==0&&(e&ue)===0)){var a=_;(a.effects??(a.effects=[])).push(f)}return s}function Kt(){return _!==null&&!F}function Vn(e){const t=M(Oe,null,!1);return S(t,T),t.teardown=e,t}function Zr(e){Gt();var t=h.f,n=!_&&(t&H)!==0&&(t&rt)===0;if(n){var r=b;(r.e??(r.e=[])).push(e)}else return $t(e)}function $t(e){return M(Ie|xt,e,!1)}function Wr(e){return Gt(),M(Oe|xt,e,!0)}function Jr(e){we.ensure();const t=M(ue|De,e,!0);return(n={})=>new Promise(r=>{n.outro?zn(t,()=>{ie(t),r(void 0)}):(ie(t),r(void 0))})}function Qr(e){return M(Ie,e,!1)}function es(e,t){var n=b,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=zt(()=>{e(),!r.ran&&(r.ran=!0,Wn(t))})}function ts(){var e=b;zt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&T)!==0&&n.deps!==null&&S(n,U),me(n)&&ge(n),t.ran=!1}})}function Gn(e){return M(st|De,e,!0)}function zt(e,t=0){return M(Oe|t,e,!0)}function ns(e,t=[],n=[],r=[]){kn(r,t,n,s=>{M(Oe,()=>e(...s.map(_e)),!0)})}function rs(e,t=0){var n=M(q|t,e,!0);return n}function ss(e,t=0){var n=M(nt|t,e,!0);return n}function fs(e){return M(H|De,e,!0)}function Xt(e){var t=e.teardown;if(t!==null){const n=le,r=_;mt(!0),Z(null);try{t.call(null)}finally{mt(n),Z(r)}}}function Zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&_t(()=>{s.abort(ce)});var r=n.next;(n.f&ue)!==0?n.parent=null:ie(n,t),n=r}}function Kn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&H)===0&&ie(t),t=n}}function ie(e,t=!0){var n=!1;(t||(e.f&Rt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&($n(e.nodes.start,e.nodes.end),n=!0),Zt(e,t&&!n),He(e,0),S(e,K);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Xt(e);var s=e.parent;s!==null&&s.first!==null&&Wt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function $n(e,t){for(;e!==null;){var n=e===t?null:W(e);e.remove(),e=n}}function Wt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function zn(e,t,n=!0){var r=[];Jt(e,r,!0);var s=()=>{n&&ie(e),t&&t()},f=r.length;if(f>0){var a=()=>--f||s();for(var u of r)u.out(a)}else s()}function Jt(e,t,n){if((e.f&j)===0){e.f^=j;var r=e.nodes&&e.nodes.t;if(r!==null)for(const u of r)(u.is_global||n)&&t.push(u);for(var s=e.first;s!==null;){var f=s.next,a=(s.f&ke)!==0||(s.f&H)!==0&&(e.f&q)!==0;Jt(s,t,a?n:!1),s=f}}}function as(e){Qt(e,!0)}function Qt(e,t){if((e.f&j)!==0){e.f^=j,(e.f&T)===0&&(S(e,D),ae(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&ke)!==0||(n.f&H)!==0;Qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const a of f)(a.is_global||t)&&a.in()}}function is(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:W(n);t.append(n),n=s}}let se=!1;function qe(e){se=e}let le=!1;function mt(e){le=e}let _=null,F=!1;function Z(e){_=e}let h=null;function Ee(e){h=e}let x=null;function en(e){_!==null&&(x===null?x=[e]:x.push(e))}let R=null,O=0,N=null;function Xn(e){N=e}let tn=1,Re=0,fe=Re;function Tt(e){fe=e}function nn(){return++tn}function me(e){var t=e.f;if((t&D)!==0)return!0;if(t&A&&(e.f&=-32769),(t&U)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(me(f)&&qt(f),f.wv>e.wv)return!0}(t&C)!==0&&m===null&&S(e,T)}return!1}function rn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(x!=null&&x.includes(e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&A)!==0?rn(f,t,!1):t===f&&(n?S(f,D):(f.f&T)!==0&&S(f,U),ae(f))}}function sn(e){var w;var t=R,n=O,r=N,s=_,f=x,a=b,u=F,i=fe,l=e.f;R=null,O=0,N=null,_=(l&(H|ue))===0?e:null,x=null,Fe(e.ctx),F=!1,fe=++Re,e.ac!==null&&(_t(()=>{e.ac.abort(ce)}),e.ac=null);try{e.f|=Xe;var o=e.fn,c=o(),v=e.deps;if(R!==null){var d;if(He(e,O),v!==null&&O>0)for(v.length=O+R.length,d=0;d<R.length;d++)v[O+d]=R[d];else e.deps=v=R;if(Kt()&&(e.f&C)!==0)for(d=O;d<v.length;d++)((w=v[d]).reactions??(w.reactions=[])).push(e)}else v!==null&&O<v.length&&(He(e,O),v.length=O);if(Ne()&&N!==null&&!F&&v!==null&&(e.f&(A|U|D))===0)for(d=0;d<N.length;d++)rn(N[d],e);return s!==null&&s!==e&&(Re++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&$)!==0&&(e.f^=$),c}catch(L){return Dn(L)}finally{e.f^=Xe,R=t,O=n,N=r,_=s,x=f,Fe(a),F=u,fe=i}}function Zn(e,t){let n=t.reactions;if(n!==null){var r=cn.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&A)!==0&&(R===null||!R.includes(t))){var f=t;(f.f&C)!==0&&(f.f^=C,f.f&=-32769),lt(f),Yt(f),He(f,0)}}function He(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Zn(e,n[r])}function ge(e){var t=e.f;if((t&K)===0){S(e,T);var n=h,r=se;h=e,se=!0;try{(t&(q|nt))!==0?Kn(e):Zt(e),Xt(e);var s=sn(e);e.teardown=typeof s=="function"?s:null,e.wv=tn;var f}finally{se=r,h=n}}}async function ls(){await Promise.resolve(),Cn()}function us(){return we.ensure().settled()}function _e(e){var t=e.f,n=(t&A)!==0;if(_!==null&&!F){var r=h!==null&&(h.f&K)!==0;if(!r&&!(x!=null&&x.includes(e))){var s=_.deps;if((_.f&Xe)!==0)e.rv<Re&&(e.rv=Re,R===null&&s!==null&&s[O]===e?O++:R===null?R=[e]:R.includes(e)||R.push(e));else{(_.deps??(_.deps=[])).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(le&&z.has(e))return z.get(e);if(n){var a=e;if(le){var u=a.v;return((a.f&T)===0&&a.reactions!==null||an(a))&&(u=ot(a)),z.set(a,u),u}var i=(a.f&C)===0&&!F&&_!==null&&(se||(_.f&C)!==0),l=a.deps===null;me(a)&&(i&&(a.f|=C),qt(a)),i&&!l&&fn(a)}if(m!=null&&m.has(e))return m.get(e);if((e.f&$)!==0)throw e.v;return e.v}function fn(e){if(e.deps!==null){e.f|=C;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&A)!==0&&(t.f&C)===0&&fn(t)}}function an(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(z.has(t)||(t.f&A)!==0&&an(t))return!0;return!1}function Wn(e){var t=F;try{return F=!0,e()}finally{F=t}}function os(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(re in e)tt(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&re in n&&tt(n)}}}function tt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{tt(e[r],t)}catch{}const n=bt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=_n(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}export{Te as $,X as A,g as B,is as C,Kr as D,Fr as E,nr as F,zr as G,Xr as H,ls as I,zt as J,$e as K,rs as L,Nr as M,ke as N,kr as O,Sn as P,Ir as Q,ye as R,Dr as S,Vn as T,er as U,Yr as V,h as W,ct as X,be as Y,cr as Z,gr as _,jr as a,Hn as a$,K as a0,jn as a1,qr as a2,Ee as a3,Be as a4,Er as a5,mr as a6,wr as a7,Tr as a8,le as a9,Pn as aA,Z as aB,Fe as aC,Dn as aD,_ as aE,S as aF,D as aG,ae as aH,U as aI,et as aJ,Me as aK,_r as aL,De as aM,St as aN,Or as aO,_t as aP,Ye as aQ,qn as aR,br as aS,Ar as aT,rt as aU,ft as aV,Ur as aW,An as aX,W as aY,at as aZ,ur as a_,re as aa,ar as ab,tr as ac,xn as ad,on as ae,or as af,sr as ag,Qr as ah,Ct as ai,Cn as aj,ss as ak,xr as al,Hr as am,kn as an,Rr as ao,$r as ap,E as aq,Un as ar,Sr as as,bt as at,ir as au,_n as av,Kt as aw,ze as ax,Ot as ay,we as az,G as b,Qn as b0,Jr as b1,Rn as b2,it as b3,fr as b4,vr as b5,yr as b6,dr as b7,j as b8,pr as b9,hr as ba,$n as bb,Rt as bc,es as bd,ts as be,us as bf,Br as c,V as d,Wn as e,Vr as f,_e as g,b as h,Wr as i,Zr as j,rr as k,pn as l,os as m,Cr as n,ut as o,Mr as p,p as q,Pr as r,Gr as s,ns as t,Lr as u,as as v,ie as w,zn as x,Le as y,fs as z};
1
+ var ln=Object.defineProperty;var dt=e=>{throw TypeError(e)};var un=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>un(e,typeof t!="symbol"?t+"":t,n),Ke=(e,t,n)=>t.has(e)||dt("Cannot "+n);var y=(e,t,n)=>(Ke(e,t,"read from private field"),n?n.call(e):t.get(e)),Y=(e,t,n)=>t.has(e)?dt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),oe=(e,t,n,r)=>(Ke(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Ke(e,t,"access private method"),n);var on=Array.isArray,cn=Array.prototype.indexOf,Qn=Array.from,er=Object.defineProperty,be=Object.getOwnPropertyDescriptor,_n=Object.getOwnPropertyDescriptors,vn=Object.prototype,dn=Array.prototype,bt=Object.getPrototypeOf,pt=Object.isExtensible;function tr(e){return typeof e=="function"}const nr=()=>{};function rr(e){return e()}function pn(e){for(var t=0;t<e.length;t++)e[t]()}function At(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function sr(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const A=2,Ie=4,Oe=8,nt=1<<24,q=16,H=32,ue=64,St=128,C=512,T=1024,D=2048,U=4096,j=8192,K=16384,rt=32768,ke=65536,ht=1<<17,Rt=1<<18,De=1<<19,xt=1<<20,fr=1<<25,Se=32768,Xe=1<<21,st=1<<22,$=1<<23,re=Symbol("$state"),ar=Symbol("legacy props"),ir=Symbol(""),ce=new class extends Error{constructor(){super(...arguments);B(this,"name","StaleReactionError");B(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ft=3,Ot=8;function hn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function yn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function wn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function En(e){throw new Error("https://svelte.dev/e/effect_orphan")}function gn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ur(){throw new Error("https://svelte.dev/e/hydration_failed")}function or(e){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}function cr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Tn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function _r(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vr=1,dr=2,pr=4,hr=8,yr=16,wr=1,Er=2,gr=4,mr=8,Tr=16,br=1,Ar=2,An="[",Sn="[!",Rn="]",at={},E=Symbol(),Sr="http://www.w3.org/1999/xhtml",Rr="@attach";function it(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function xr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Or(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let X=!1;function Dr(e){X=e}let g;function ye(e){if(e===null)throw it(),at;return g=e}function Nr(){return ye(W(g))}function Pr(e){if(X){if(W(g)!==null)throw it(),at;g=e}}function Cr(e=1){if(X){for(var t=e,n=g;t--;)n=W(n);g=n}}function Ir(e=!0){for(var t=0,n=g;;){if(n.nodeType===Ot){var r=n.data;if(r===Rn){if(t===0)return n;t-=1}else(r===An||r===Sn)&&(t+=1)}var s=W(n);e&&n.remove(),n=s}}function kr(e){if(!e||e.nodeType!==Ot)throw it(),at;return e.data}function Dt(e){return e===this.v}function xn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Nt(e){return!xn(e,this.v)}let Be=!1;function Fr(){Be=!0}let b=null;function Fe(e){b=e}function Mr(e,t=!1,n){b={p:b,i:!1,c:null,e:null,s:e,x:null,l:Be&&!t?{s:null,u:null,$:[]}:null}}function jr(e){var t=b,n=t.e;if(n!==null){t.e=null;for(var r of n)$t(r)}return t.i=!0,b=t.p,{}}function Ne(){return!Be||b!==null&&b.l===null}let ee=[];function Pt(){var e=ee;ee=[],pn(e)}function Ct(e){if(ee.length===0&&!Ae){var t=ee;queueMicrotask(()=>{t===ee&&Pt()})}ee.push(e)}function On(){for(;ee.length>0;)Pt()}function Dn(e){var t=h;if(t===null)return _.f|=$,e;if((t.f&rt)===0){if((t.f&St)===0)throw e;t.b.error(e)}else Me(e,t)}function Me(e,t){for(;t!==null;){if((t.f&St)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Nn=-7169;function S(e,t){e.f=e.f&Nn|t}function lt(e){(e.f&C)!==0||e.deps===null?S(e,T):S(e,U)}function It(e){if(e!==null)for(const t of e)(t.f&A)===0||(t.f&Se)===0||(t.f^=Se,It(t.deps))}function Pn(e,t,n){(e.f&D)!==0?t.add(e):(e.f&U)!==0&&n.add(e),It(e.deps),S(e,T)}const Ce=new Set;let p=null,$e=null,m=null,P=[],Ve=null,Ze=!1,Ae=!1;var ve,de,te,ne,xe,pe,he,I,We,Je,kt,Ft;const Ue=class Ue{constructor(){Y(this,I);B(this,"committed",!1);B(this,"current",new Map);B(this,"previous",new Map);Y(this,ve,new Set);Y(this,de,new Set);Y(this,te,0);Y(this,ne,0);Y(this,xe,null);Y(this,pe,new Set);Y(this,he,new Set);B(this,"skipped_effects",new Set);B(this,"is_fork",!1)}is_deferred(){return this.is_fork||y(this,ne)>0}process(t){var s;P=[],$e=null,this.apply();var n=[],r=[];for(const f of t)Q(this,I,We).call(this,f,n,r);this.is_fork||Q(this,I,kt).call(this),this.is_deferred()?(Q(this,I,Je).call(this,r),Q(this,I,Je).call(this,n)):($e=this,p=null,yt(r),yt(n),$e=null,(s=y(this,xe))==null||s.resolve()),m=null}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&$)===0&&(this.current.set(t,t.v),m==null||m.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,m=null)}flush(){if(this.activate(),P.length>0){if(Mt(),p!==null&&p!==this)return}else y(this,te)===0&&this.process([]);this.deactivate()}discard(){for(const t of y(this,de))t(this);y(this,de).clear()}increment(t){oe(this,te,y(this,te)+1),t&&oe(this,ne,y(this,ne)+1)}decrement(t){oe(this,te,y(this,te)-1),t&&oe(this,ne,y(this,ne)-1),this.revive()}revive(){for(const t of y(this,pe))y(this,he).delete(t),S(t,D),ae(t);for(const t of y(this,he))S(t,U),ae(t);this.flush()}oncommit(t){y(this,ve).add(t)}ondiscard(t){y(this,de).add(t)}settled(){return(y(this,xe)??oe(this,xe,At())).promise}static ensure(){if(p===null){const t=p=new Ue;Ce.add(p),Ae||Ue.enqueue(()=>{p===t&&t.flush()})}return p}static enqueue(t){Ct(t)}apply(){}};ve=new WeakMap,de=new WeakMap,te=new WeakMap,ne=new WeakMap,xe=new WeakMap,pe=new WeakMap,he=new WeakMap,I=new WeakSet,We=function(t,n,r){t.f^=T;for(var s=t.first,f=null;s!==null;){var a=s.f,u=(a&(H|ue))!==0,i=u&&(a&T)!==0,l=i||(a&j)!==0||this.skipped_effects.has(s);if(!l&&s.fn!==null){u?s.f^=T:f!==null&&(a&(Ie|Oe|nt))!==0?f.b.defer_effect(s):(a&Ie)!==0?n.push(s):me(s)&&((a&q)!==0&&y(this,pe).add(s),ge(s));var o=s.first;if(o!==null){s=o;continue}}var c=s.parent;for(s=s.next;s===null&&c!==null;)c===f&&(f=null),s=c.next,c=c.parent}},Je=function(t){for(var n=0;n<t.length;n+=1)Pn(t[n],y(this,pe),y(this,he))},kt=function(){if(y(this,ne)===0){for(const t of y(this,ve))t();y(this,ve).clear()}y(this,te)===0&&Q(this,I,Ft).call(this)},Ft=function(){var s;if(Ce.size>1){this.previous.clear();var t=m,n=!0;for(const f of Ce){if(f===this){n=!1;continue}const a=[];for(const[i,l]of this.current){if(f.current.has(i))if(n&&l!==f.current.get(i))f.current.set(i,l);else continue;a.push(i)}if(a.length===0)continue;const u=[...f.current.keys()].filter(i=>!this.current.has(i));if(u.length>0){var r=P;P=[];const i=new Set,l=new Map;for(const o of a)jt(o,u,i,l);if(P.length>0){p=f,f.apply();for(const o of P)Q(s=f,I,We).call(s,o,[],[]);f.deactivate()}P=r}}p=null,m=t}this.committed=!0,Ce.delete(this)};let we=Ue;function Cn(e){var t=Ae;Ae=!0;try{for(var n;;){if(On(),P.length===0&&(p==null||p.flush(),P.length===0))return Ve=null,n;Mt()}}finally{Ae=t}}function Mt(){var e=se;Ze=!0;var t=null;try{var n=0;for(qe(!0);P.length>0;){var r=we.ensure();if(n++>1e3){var s,f;In()}r.process(P),z.clear()}}finally{Ze=!1,qe(e),Ve=null}}function In(){try{gn()}catch(e){Me(e,Ve)}}let k=null;function yt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(K|j))===0&&me(r)&&(k=new Set,ge(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Wt(r):r.fn=null),(k==null?void 0:k.size)>0)){z.clear();for(const s of k){if((s.f&(K|j))!==0)continue;const f=[s];let a=s.parent;for(;a!==null;)k.has(a)&&(k.delete(a),f.push(a)),a=a.parent;for(let u=f.length-1;u>=0;u--){const i=f[u];(i.f&(K|j))===0&&ge(i)}}k.clear()}}k=null}}function jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&A)!==0?jt(s,t,n,r):(f&(st|q))!==0&&(f&D)===0&&Lt(s,t,r)&&(S(s,D),ae(s))}}function Lt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&A)!==0&&Lt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ae(e){for(var t=Ve=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ze&&t===h&&(n&q)!==0&&(n&Rt)===0)return;if((n&(ue|H))!==0){if((n&T)===0)return;t.f^=T}}P.push(t)}function kn(e,t,n,r){const s=Ne()?ut:jn;if(n.length===0&&e.length===0){r(t.map(s));return}var f=p,a=h,u=Fn();function i(){Promise.all(n.map(l=>Mn(l))).then(l=>{u();try{r([...t.map(s),...l])}catch(o){(a.f&K)===0&&Me(o,a)}f==null||f.deactivate(),je()}).catch(l=>{Me(l,a)})}e.length>0?Promise.all(e).then(()=>{u();try{return i()}finally{f==null||f.deactivate(),je()}}):i()}function Fn(){var e=h,t=_,n=b,r=p;return function(f=!0){Ee(e),Z(t),Fe(n),f&&(r==null||r.activate())}}function je(){Ee(null),Z(null),Fe(null)}function ut(e){var t=A|D,n=_!==null&&(_.f&A)!==0?_:null;return h!==null&&(h.f|=De),{ctx:b,deps:null,effects:null,equals:Dt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??h,ac:null}}function Mn(e,t,n){let r=h;r===null&&hn();var s=r.b,f=void 0,a=ct(E),u=!_,i=new Map;return Gn(()=>{var d;var l=At();f=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{o===p&&o.committed&&o.deactivate(),je()})}catch(w){l.reject(w),je()}var o=p;if(u){var c=s.is_rendered();s.update_pending_count(1),o.increment(c),(d=i.get(o))==null||d.reject(ce),i.delete(o),i.set(o,l)}const v=(w,L=void 0)=>{if(o.activate(),L)L!==ce&&(a.f|=$,et(a,L));else{(a.f&$)!==0&&(a.f^=$),et(a,w);for(const[J,Pe]of i){if(i.delete(J),J===o)break;Pe.reject(ce)}}u&&(s.update_pending_count(-1),o.decrement(c))};l.promise.then(v,w=>v(null,w||"unknown"))}),Vn(()=>{for(const l of i.values())l.reject(ce)}),new Promise(l=>{function o(c){function v(){c===f?l(a):o(f)}c.then(v,v)}o(f)})}function Lr(e){const t=ut(e);return en(t),t}function jn(e){const t=ut(e);return t.equals=Nt,t}function Yt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ie(t[n])}}function Ln(e){for(var t=e.parent;t!==null;){if((t.f&A)===0)return(t.f&K)===0?t:null;t=t.parent}return null}function ot(e){var t,n=h;Ee(Ln(e));try{e.f&=~Se,Yt(e),t=sn(e)}finally{Ee(n)}return t}function qt(e){var t=ot(e);if(!e.equals(t)&&(e.wv=nn(),(!(p!=null&&p.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){S(e,T);return}le||(m!==null?(Kt()||p!=null&&p.is_fork)&&m.set(e,t):lt(e))}let Qe=new Set;const z=new Map;let Ht=!1;function ct(e,t){var n={f:0,v:e,reactions:null,equals:Dt,rv:0,wv:0};return n}function V(e,t){const n=ct(e);return en(n),n}function Yr(e,t=!1,n=!0){var s;const r=ct(e);return t||(r.equals=Nt),Be&&n&&b!==null&&b.l!==null&&((s=b.l).s??(s.s=[])).push(r),r}function G(e,t,n=!1){_!==null&&(!F||(_.f&ht)!==0)&&Ne()&&(_.f&(A|q|st|ht))!==0&&!(x!=null&&x.includes(e))&&bn();let r=n?Te(t):t;return et(e,r)}function et(e,t){if(!e.equals(t)){var n=e.v;le?z.set(e,t):z.set(e,n),e.v=t;var r=we.ensure();if(r.capture(e,n),(e.f&A)!==0){const s=e;(e.f&D)!==0&&ot(s),lt(s)}e.wv=nn(),Ut(e,D),Ne()&&h!==null&&(h.f&T)!==0&&(h.f&(H|ue))===0&&(N===null?Xn([e]):N.push(e)),!r.is_fork&&Qe.size>0&&!Ht&&Yn()}return t}function Yn(){Ht=!1;var e=se;qe(!0);const t=Array.from(Qe);try{for(const n of t)(n.f&T)!==0&&S(n,U),me(n)&&ge(n)}finally{qe(e)}Qe.clear()}function qr(e,t=1){var n=_e(e),r=t===1?n++:n--;return G(e,n),r}function ze(e){G(e,e.v+1)}function Ut(e,t){var n=e.reactions;if(n!==null)for(var r=Ne(),s=n.length,f=0;f<s;f++){var a=n[f],u=a.f;if(!(!r&&a===h)){var i=(u&D)===0;if(i&&S(a,t),(u&A)!==0){var l=a;m==null||m.delete(l),(u&Se)===0&&(u&C&&(a.f|=Se),Ut(l,U))}else i&&((u&q)!==0&&k!==null&&k.add(a),ae(a))}}}function Te(e){if(typeof e!="object"||e===null||re in e)return e;const t=bt(e);if(t!==vn&&t!==dn)return e;var n=new Map,r=on(e),s=V(0),f=fe,a=u=>{if(fe===f)return u();var i=_,l=fe;Z(null),Tt(f);var o=u();return Z(i),Tt(l),o};return r&&n.set("length",V(e.length)),new Proxy(e,{defineProperty(u,i,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&mn();var o=n.get(i);return o===void 0?o=a(()=>{var c=V(l.value);return n.set(i,c),c}):G(o,l.value,!0),!0},deleteProperty(u,i){var l=n.get(i);if(l===void 0){if(i in u){const o=a(()=>V(E));n.set(i,o),ze(s)}}else G(l,E),ze(s);return!0},get(u,i,l){var d;if(i===re)return e;var o=n.get(i),c=i in u;if(o===void 0&&(!c||(d=be(u,i))!=null&&d.writable)&&(o=a(()=>{var w=Te(c?u[i]:E),L=V(w);return L}),n.set(i,o)),o!==void 0){var v=_e(o);return v===E?void 0:v}return Reflect.get(u,i,l)},getOwnPropertyDescriptor(u,i){var l=Reflect.getOwnPropertyDescriptor(u,i);if(l&&"value"in l){var o=n.get(i);o&&(l.value=_e(o))}else if(l===void 0){var c=n.get(i),v=c==null?void 0:c.v;if(c!==void 0&&v!==E)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return l},has(u,i){var v;if(i===re)return!0;var l=n.get(i),o=l!==void 0&&l.v!==E||Reflect.has(u,i);if(l!==void 0||h!==null&&(!o||(v=be(u,i))!=null&&v.writable)){l===void 0&&(l=a(()=>{var d=o?Te(u[i]):E,w=V(d);return w}),n.set(i,l));var c=_e(l);if(c===E)return!1}return o},set(u,i,l,o){var vt;var c=n.get(i),v=i in u;if(r&&i==="length")for(var d=l;d<c.v;d+=1){var w=n.get(d+"");w!==void 0?G(w,E):d in u&&(w=a(()=>V(E)),n.set(d+"",w))}if(c===void 0)(!v||(vt=be(u,i))!=null&&vt.writable)&&(c=a(()=>V(void 0)),G(c,Te(l)),n.set(i,c));else{v=c.v!==E;var L=a(()=>Te(l));G(c,L)}var J=Reflect.getOwnPropertyDescriptor(u,i);if(J!=null&&J.set&&J.set.call(o,l),!v){if(r&&typeof i=="string"){var Pe=n.get("length"),Ge=Number(i);Number.isInteger(Ge)&&Ge>=Pe.v&&G(Pe,Ge+1)}ze(s)}return!0},ownKeys(u){_e(s);var i=Reflect.ownKeys(u).filter(c=>{var v=n.get(c);return v===void 0||v.v!==E});for(var[l,o]of n)o.v!==E&&!(l in u)&&i.push(l);return i},setPrototypeOf(){Tn()}})}function wt(e){try{if(e!==null&&typeof e=="object"&&re in e)return e[re]}catch{}return e}function Hr(e,t){return Object.is(wt(e),wt(t))}var Et,qn,Bt,Vt;function Ur(){if(Et===void 0){Et=window,qn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Bt=be(t,"firstChild").get,Vt=be(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Le(e=""){return document.createTextNode(e)}function Ye(e){return Bt.call(e)}function W(e){return Vt.call(e)}function Br(e,t){if(!X)return Ye(e);var n=Ye(g);if(n===null)n=g.appendChild(Le());else if(t&&n.nodeType!==ft){var r=Le();return n==null||n.before(r),ye(r),r}return ye(n),n}function Vr(e,t=!1){if(!X){var n=Ye(e);return n instanceof Comment&&n.data===""?W(n):n}if(t&&(g==null?void 0:g.nodeType)!==ft){var r=Le();return g==null||g.before(r),ye(r),r}return g}function Gr(e,t=1,n=!1){let r=X?g:e;for(var s;t--;)s=r,r=W(r);if(!X)return r;if(n&&(r==null?void 0:r.nodeType)!==ft){var f=Le();return r===null?s==null||s.after(f):r.before(f),ye(f),f}return ye(r),r}function Hn(e){e.textContent=""}function Kr(){return!1}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,Ct(()=>{document.activeElement===n&&e.focus()})}}function zr(e){X&&Ye(e)!==null&&Hn(e)}let gt=!1;function Un(){gt||(gt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function _t(e){var t=_,n=h;Z(null),Ee(null);try{return e()}finally{Z(t),Ee(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>_t(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Un()}function Gt(e){h===null&&(_===null&&En(),wn()),le&&yn()}function Bn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function M(e,t,n){var r=h;r!==null&&(r.f&j)!==0&&(e|=j);var s={ctx:b,deps:null,nodes:null,f:e|D|C,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ge(s),s.f|=rt}catch(u){throw ie(s),u}else t!==null&&ae(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&De)===0&&(f=f.first,(e&q)!==0&&(e&ke)!==0&&f!==null&&(f.f|=ke)),f!==null&&(f.parent=r,r!==null&&Bn(f,r),_!==null&&(_.f&A)!==0&&(e&ue)===0)){var a=_;(a.effects??(a.effects=[])).push(f)}return s}function Kt(){return _!==null&&!F}function Vn(e){const t=M(Oe,null,!1);return S(t,T),t.teardown=e,t}function Zr(e){Gt();var t=h.f,n=!_&&(t&H)!==0&&(t&rt)===0;if(n){var r=b;(r.e??(r.e=[])).push(e)}else return $t(e)}function $t(e){return M(Ie|xt,e,!1)}function Wr(e){return Gt(),M(Oe|xt,e,!0)}function Jr(e){we.ensure();const t=M(ue|De,e,!0);return(n={})=>new Promise(r=>{n.outro?zn(t,()=>{ie(t),r(void 0)}):(ie(t),r(void 0))})}function Qr(e){return M(Ie,e,!1)}function es(e,t){var n=b,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=zt(()=>{e(),!r.ran&&(r.ran=!0,Wn(t))})}function ts(){var e=b;zt(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&T)!==0&&n.deps!==null&&S(n,U),me(n)&&ge(n),t.ran=!1}})}function Gn(e){return M(st|De,e,!0)}function zt(e,t=0){return M(Oe|t,e,!0)}function ns(e,t=[],n=[],r=[]){kn(r,t,n,s=>{M(Oe,()=>e(...s.map(_e)),!0)})}function rs(e,t=0){var n=M(q|t,e,!0);return n}function ss(e,t=0){var n=M(nt|t,e,!0);return n}function fs(e){return M(H|De,e,!0)}function Xt(e){var t=e.teardown;if(t!==null){const n=le,r=_;mt(!0),Z(null);try{t.call(null)}finally{mt(n),Z(r)}}}function Zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&_t(()=>{s.abort(ce)});var r=n.next;(n.f&ue)!==0?n.parent=null:ie(n,t),n=r}}function Kn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&H)===0&&ie(t),t=n}}function ie(e,t=!0){var n=!1;(t||(e.f&Rt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&($n(e.nodes.start,e.nodes.end),n=!0),Zt(e,t&&!n),He(e,0),S(e,K);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Xt(e);var s=e.parent;s!==null&&s.first!==null&&Wt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function $n(e,t){for(;e!==null;){var n=e===t?null:W(e);e.remove(),e=n}}function Wt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function zn(e,t,n=!0){var r=[];Jt(e,r,!0);var s=()=>{n&&ie(e),t&&t()},f=r.length;if(f>0){var a=()=>--f||s();for(var u of r)u.out(a)}else s()}function Jt(e,t,n){if((e.f&j)===0){e.f^=j;var r=e.nodes&&e.nodes.t;if(r!==null)for(const u of r)(u.is_global||n)&&t.push(u);for(var s=e.first;s!==null;){var f=s.next,a=(s.f&ke)!==0||(s.f&H)!==0&&(e.f&q)!==0;Jt(s,t,a?n:!1),s=f}}}function as(e){Qt(e,!0)}function Qt(e,t){if((e.f&j)!==0){e.f^=j,(e.f&T)===0&&(S(e,D),ae(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&ke)!==0||(n.f&H)!==0;Qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const a of f)(a.is_global||t)&&a.in()}}function is(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:W(n);t.append(n),n=s}}let se=!1;function qe(e){se=e}let le=!1;function mt(e){le=e}let _=null,F=!1;function Z(e){_=e}let h=null;function Ee(e){h=e}let x=null;function en(e){_!==null&&(x===null?x=[e]:x.push(e))}let R=null,O=0,N=null;function Xn(e){N=e}let tn=1,Re=0,fe=Re;function Tt(e){fe=e}function nn(){return++tn}function me(e){var t=e.f;if((t&D)!==0)return!0;if(t&A&&(e.f&=-32769),(t&U)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(me(f)&&qt(f),f.wv>e.wv)return!0}(t&C)!==0&&m===null&&S(e,T)}return!1}function rn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(x!=null&&x.includes(e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&A)!==0?rn(f,t,!1):t===f&&(n?S(f,D):(f.f&T)!==0&&S(f,U),ae(f))}}function sn(e){var w;var t=R,n=O,r=N,s=_,f=x,a=b,u=F,i=fe,l=e.f;R=null,O=0,N=null,_=(l&(H|ue))===0?e:null,x=null,Fe(e.ctx),F=!1,fe=++Re,e.ac!==null&&(_t(()=>{e.ac.abort(ce)}),e.ac=null);try{e.f|=Xe;var o=e.fn,c=o(),v=e.deps;if(R!==null){var d;if(He(e,O),v!==null&&O>0)for(v.length=O+R.length,d=0;d<R.length;d++)v[O+d]=R[d];else e.deps=v=R;if(Kt()&&(e.f&C)!==0)for(d=O;d<v.length;d++)((w=v[d]).reactions??(w.reactions=[])).push(e)}else v!==null&&O<v.length&&(He(e,O),v.length=O);if(Ne()&&N!==null&&!F&&v!==null&&(e.f&(A|U|D))===0)for(d=0;d<N.length;d++)rn(N[d],e);return s!==null&&s!==e&&(Re++,N!==null&&(r===null?r=N:r.push(...N))),(e.f&$)!==0&&(e.f^=$),c}catch(L){return Dn(L)}finally{e.f^=Xe,R=t,O=n,N=r,_=s,x=f,Fe(a),F=u,fe=i}}function Zn(e,t){let n=t.reactions;if(n!==null){var r=cn.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&A)!==0&&(R===null||!R.includes(t))){var f=t;(f.f&C)!==0&&(f.f^=C,f.f&=-32769),lt(f),Yt(f),He(f,0)}}function He(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Zn(e,n[r])}function ge(e){var t=e.f;if((t&K)===0){S(e,T);var n=h,r=se;h=e,se=!0;try{(t&(q|nt))!==0?Kn(e):Zt(e),Xt(e);var s=sn(e);e.teardown=typeof s=="function"?s:null,e.wv=tn;var f}finally{se=r,h=n}}}async function ls(){await Promise.resolve(),Cn()}function us(){return we.ensure().settled()}function _e(e){var t=e.f,n=(t&A)!==0;if(_!==null&&!F){var r=h!==null&&(h.f&K)!==0;if(!r&&!(x!=null&&x.includes(e))){var s=_.deps;if((_.f&Xe)!==0)e.rv<Re&&(e.rv=Re,R===null&&s!==null&&s[O]===e?O++:R===null?R=[e]:R.includes(e)||R.push(e));else{(_.deps??(_.deps=[])).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(le&&z.has(e))return z.get(e);if(n){var a=e;if(le){var u=a.v;return((a.f&T)===0&&a.reactions!==null||an(a))&&(u=ot(a)),z.set(a,u),u}var i=(a.f&C)===0&&!F&&_!==null&&(se||(_.f&C)!==0),l=a.deps===null;me(a)&&(i&&(a.f|=C),qt(a)),i&&!l&&fn(a)}if(m!=null&&m.has(e))return m.get(e);if((e.f&$)!==0)throw e.v;return e.v}function fn(e){if(e.deps!==null){e.f|=C;for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&A)!==0&&(t.f&C)===0&&fn(t)}}function an(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(z.has(t)||(t.f&A)!==0&&an(t))return!0;return!1}function Wn(e){var t=F;try{return F=!0,e()}finally{F=t}}function os(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(re in e)tt(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&re in n&&tt(n)}}}function tt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{tt(e[r],t)}catch{}const n=bt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=_n(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}export{Te as $,X as A,g as B,is as C,Kr as D,Fr as E,nr as F,zr as G,Xr as H,ls as I,zt as J,$e as K,rs as L,Nr as M,ke as N,kr as O,Sn as P,Ir as Q,ye as R,Dr as S,Vn as T,er as U,Yr as V,h as W,ct as X,be as Y,cr as Z,gr as _,jr as a,Hn as a$,K as a0,jn as a1,qr as a2,Ee as a3,Be as a4,Er as a5,mr as a6,wr as a7,Tr as a8,le as a9,Pn as aA,Z as aB,Fe as aC,Dn as aD,_ as aE,S as aF,D as aG,ae as aH,U as aI,et as aJ,Me as aK,_r as aL,De as aM,St as aN,Or as aO,_t as aP,Ye as aQ,qn as aR,br as aS,Ar as aT,rt as aU,ft as aV,Ur as aW,An as aX,W as aY,at as aZ,ur as a_,re as aa,ar as ab,tr as ac,xn as ad,on as ae,or as af,sr as ag,Qr as ah,Ct as ai,Cn as aj,ss as ak,xr as al,Hr as am,kn as an,Rr as ao,$r as ap,E as aq,Un as ar,Sr as as,bt as at,ir as au,_n as av,Kt as aw,ze as ax,Ot as ay,we as az,V as b,Qn as b0,Jr as b1,Rn as b2,it as b3,fr as b4,vr as b5,yr as b6,dr as b7,j as b8,pr as b9,hr as ba,$n as bb,Rt as bc,es as bd,ts as be,us as bf,Br as c,G as d,Wn as e,Vr as f,_e as g,b as h,Wr as i,Zr as j,rr as k,pn as l,os as m,Cr as n,ut as o,Mr as p,p as q,Pr as r,Gr as s,ns as t,Lr as u,as as v,ie as w,zn as x,Le as y,fs as z};
@@ -1 +1 @@
1
- import{d as v,f as _,s as y,a as g}from"./DqdrLdzV.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./Ciq9INsC.js";import{r as I,s as l,a as k}from"./P3PHXZz3.js";import{b as C}from"./BFNCz1gq.js";import{p as r}from"./Cf7Xaqef.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"./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 +1 @@
1
- import{H as P,q as b,I as V,A as q,e as D,J as F,K as J,c as u,g as x,u as K,r as f,t as E,f as A,F as j,s as p}from"./Ciq9INsC.js";import{d as N,f as _,a as m,c as W,s as B}from"./DqdrLdzV.js";import{a as G,s as O,b as I}from"./P3PHXZz3.js";import{i as M,b as Q,s as R}from"./Cf7Xaqef.js";import{b as T,L as U}from"./CihmTBhe.js";import{I as X}from"./D_xw8KSE.js";function ie(e,a,o=a){var n=new WeakSet;P(e,"input",async s=>{var t=s?e.defaultValue:e.value;if(t=w(e)?S(t):t,o(t),b!==null&&n.add(b),await V(),t!==(t=a())){var r=e.selectionStart,i=e.selectionEnd,c=e.value.length;if(e.value=t??"",i!==null){var d=e.value.length;r===i&&i===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=r,e.selectionEnd=Math.min(i,d))}}}),(q&&e.defaultValue!==e.value||D(a)==null&&e.value)&&(o(w(e)?S(e.value):e.value),b!==null&&n.add(b)),F(()=>{var s=a();if(e===document.activeElement){var t=J??b;if(n.has(t))return}w(e)&&s===S(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function w(e){var a=e.type;return a==="number"||a==="range"}function S(e){return e===""?null:+e}var Y=_('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75A11.959 11.959 0 0112 2.704z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 15.75h.007v.008H12v-.008z"></path></svg> <span class="text-xs">Not Connected</span></div>'),Z=_("<button><!></button>");function de(e,a){const o=()=>Q(T,"$connected",n),[n,s]=R(),t=K(()=>o()?!!a.disabled:!0);var r=Z();r.__click=function(...l){var v;(v=a.buttonAction)==null||v.apply(this,l)};var i=u(r);{var c=l=>{var v=Y();m(l,v)},d=l=>{var v=W(),g=A(v);I(g,()=>a.children??j),m(l,v)};M(i,l=>{!o()&&x(t)?l(c):l(d,!1)})}f(r),E(()=>{G(r,1,`inline-flex items-center justify-center px-6 py-3 text-sm font-semibold border border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed transition-all duration-200 ${x(t)&&!o()?"bg-red-100 text-red-700 border-red-200 hover:bg-red-100":x(t)?"bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100":"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}`),r.disabled=x(t),O(r,"title",o()?"":"Please connect to Sockethub first")}),m(e,r),s()}N(["click"]);var $=_('<p class="text-lg text-gray-600 leading-relaxed"> </p>'),ee=_("<title> </title> <!>",1),ae=_('<!> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8"><div class="bg-white shadow-sm border border-gray-200 rounded-xl p-8"><div class="space-y-8"><!></div></div></div> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 mt-8"><!></div>',1);function ve(e,a){var o=ae(),n=A(o);X(n,{get title(){return a.title},children:(l,v)=>{var g=ee(),h=A(g),z=u(h,!0);f(h);var C=p(h,2);{var H=y=>{var k=$(),L=u(k,!0);f(k),E(()=>B(L,a.description)),m(y,k)};M(C,y=>{a.description&&y(H)})}E(()=>B(z,a.title)),m(l,g)}});var s=p(n,2),t=u(s),r=u(t),i=u(r);I(i,()=>a.children??j),f(r),f(t),f(s);var c=p(s,2),d=u(c);U(d,{}),f(c),m(e,o)}export{ve as B,de as S,ie as b};
1
+ import{H as P,q as b,I as V,A as q,e as D,J as F,K as J,c as u,g as x,u as K,r as f,t as E,f as A,F as j,s as p}from"./DT_OQU4t.js";import{d as N,f as _,a as m,c as W,s as B}from"./Bh9jqwq3.js";import{a as G,s as O,b as I}from"./BB3nrZKK.js";import{i as M,b as Q,s as R}from"./B5Mgq-ia.js";import{b as T,L as U}from"./CE_Br0Li.js";import{I as X}from"./CPsRFLIg.js";function ie(e,a,o=a){var n=new WeakSet;P(e,"input",async s=>{var t=s?e.defaultValue:e.value;if(t=w(e)?S(t):t,o(t),b!==null&&n.add(b),await V(),t!==(t=a())){var r=e.selectionStart,i=e.selectionEnd,c=e.value.length;if(e.value=t??"",i!==null){var d=e.value.length;r===i&&i===c&&d>c?(e.selectionStart=d,e.selectionEnd=d):(e.selectionStart=r,e.selectionEnd=Math.min(i,d))}}}),(q&&e.defaultValue!==e.value||D(a)==null&&e.value)&&(o(w(e)?S(e.value):e.value),b!==null&&n.add(b)),F(()=>{var s=a();if(e===document.activeElement){var t=J??b;if(n.has(t))return}w(e)&&s===S(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function w(e){var a=e.type;return a==="number"||a==="range"}function S(e){return e===""?null:+e}var Y=_('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75A11.959 11.959 0 0112 2.704z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 15.75h.007v.008H12v-.008z"></path></svg> <span class="text-xs">Not Connected</span></div>'),Z=_("<button><!></button>");function de(e,a){const o=()=>Q(T,"$connected",n),[n,s]=R(),t=K(()=>o()?!!a.disabled:!0);var r=Z();r.__click=function(...l){var v;(v=a.buttonAction)==null||v.apply(this,l)};var i=u(r);{var c=l=>{var v=Y();m(l,v)},d=l=>{var v=W(),g=A(v);I(g,()=>a.children??j),m(l,v)};M(i,l=>{!o()&&x(t)?l(c):l(d,!1)})}f(r),E(()=>{G(r,1,`inline-flex items-center justify-center px-6 py-3 text-sm font-semibold border border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed transition-all duration-200 ${x(t)&&!o()?"bg-red-100 text-red-700 border-red-200 hover:bg-red-100":x(t)?"bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100":"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}`),r.disabled=x(t),O(r,"title",o()?"":"Please connect to Sockethub first")}),m(e,r),s()}N(["click"]);var $=_('<p class="text-lg text-gray-600 leading-relaxed"> </p>'),ee=_("<title> </title> <!>",1),ae=_('<!> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8"><div class="bg-white shadow-sm border border-gray-200 rounded-xl p-8"><div class="space-y-8"><!></div></div></div> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 mt-8"><!></div>',1);function ve(e,a){var o=ae(),n=A(o);X(n,{get title(){return a.title},children:(l,v)=>{var g=ee(),h=A(g),z=u(h,!0);f(h);var C=p(h,2);{var H=y=>{var k=$(),L=u(k,!0);f(k),E(()=>B(L,a.description)),m(y,k)};M(C,y=>{a.description&&y(H)})}E(()=>B(z,a.title)),m(l,g)}});var s=p(n,2),t=u(s),r=u(t),i=u(r);I(i,()=>a.children??j),f(r),f(t),f(s);var c=p(s,2),d=u(c);U(d,{}),f(c),m(e,o)}export{ve as B,de as S,ie as b};
@@ -0,0 +1 @@
1
+ import{f as c,a as o,c as R,d as te}from"./Bh9jqwq3.js";import{p as L,s as j,c as h,r as p,t as se,a as D,g as r,u as V,e as _,f as J,j as ae,b as H,n as Q,d as S}from"./DT_OQU4t.js";import{r as N,a as oe,c as re}from"./BB3nrZKK.js";import{b as X,S as Y}from"./DhU_U-a9.js";import{p as I,s as O,c as F,b as U,i as T}from"./B5Mgq-ia.js";import{T as ne}from"./DTPsrcK7.js";import{e as ie,a as G,c as K,d as le,s as W}from"./CE_Br0Li.js";var ce=c('<div class="pb-4"><label for="actor-id-input" class="pr-3">Actor ID</label> <input id="actor-id-input" type="text"/></div>');function Ae(w,e){L(e,!0);let t=I(e,"value",15),x=I(e,"class",3,"bg-white border border-solid border-gray-300 rounded");var d=ce(),s=j(h(d),2);N(s),p(d),se(()=>oe(s,1,re(x()))),X(s,t),o(w,d),D()}function ze(w,e){L(e,!0);const t=()=>U(e.sockethubState,"$sockethubState",x),[x,d]=O();async function s(a){await ie();const v={"@context":await K(e.context),type:"credentials",actor:G(e.actor),object:JSON.parse(a)};return new Promise((b,m)=>{le.socket.emit("credentials",v,u=>{if(u!=null&&u.error){m(new Error(u.error));return}F(e.sockethubState,_(t).credentialsSet=!0,_(t)),b()})})}{let a=V(()=>!t().actorSet||t().credentialsSet||!1);ne(w,{title:"Credentials",get obj(){return e.credentials},buttonText:"Set Credentials",submitData:s,get disabled(){return r(a)}})}D(),d()}var de=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Connecting...</span></div>'),ve=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4 text-green-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Connected</span></div>'),ue=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"></path></svg> <span>Connect</span></div>'),me=c('<div class="w-full flex justify-end"><!></div>');function Be(w,e){L(e,!0);const t=()=>U(e.sockethubState,"$sockethubState",x),[x,d]=O();let s=I(e,"disabled",3,!1),a=V(()=>s()||!t().credentialsSet||t().connected||e.connecting);var v=me(),b=h(v);Y(b,{get disabled(){return r(a)},buttonAction:async()=>{await e.onConnect()},children:(m,u)=>{var k=R(),y=J(k);{var M=i=>{var C=de();o(i,C)},n=i=>{var C=R(),B=J(C);{var A=g=>{var l=ve();o(g,l)},P=g=>{var l=ue();o(g,l)};T(B,g=>{t().connected?g(A):g(P,!1)},!0)}o(i,C)};T(y,i=>{e.connecting?i(M):i(n,!1)})}o(m,k)}}),p(v),o(w,v),D(),d()}var ge=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Joining...</span></div>'),fe=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Joined</span></div>'),he=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg> <span>Join Room</span></div>'),pe=c('<div class="bg-gradient-to-r from-indigo-50 to-purple-50 border border-indigo-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-indigo-900 mb-4 flex items-center"><span class="mr-2">🏠</span> Join Chat Room</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="room" class="block text-sm font-semibold text-gray-700">Room/Channel</label> <input id="room" class="w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="#general, kosmos-random@kosmos.chat"/> <p class="text-gray-500 text-xs">💡 IRC: Use #channel-name | XMPP: Use room@server.com</p></div> <div class="flex justify-end"><!></div></div></div>');function Pe(w,e){L(e,!0);const t=()=>U(e.sockethubState,"$sockethubState",x),[x,d]=O();let s=I(e,"room",15),a=H(!1),v=H("");ae(()=>{s()!==r(v)&&F(e.sockethubState,_(t).joined=!1,_(t))});async function b(){return S(a,!0),await W({"@context":await K(e.context),type:"join",actor:G(e.actor),target:{id:s(),name:s(),type:"room"}}).catch(()=>{F(e.sockethubState,_(t).joined=!1,_(t)),S(a,!1)}).then(()=>{S(v,s(),!0),F(e.sockethubState,_(t).joined=!0,_(t)),S(a,!1)})}var m=pe(),u=j(h(m),2),k=h(u),y=j(h(k),2);N(y),Q(2),p(k);var M=j(k,2),n=h(M);{let i=V(()=>!t().connected||t().joined||r(a));Y(n,{get disabled(){return r(i)},buttonAction:b,children:(C,B)=>{var A=R(),P=J(A);{var g=f=>{var E=ge();o(f,E)},l=f=>{var E=R(),Z=J(E);{var $=z=>{var q=fe();o(z,q)},ee=z=>{var q=he();o(z,q)};T(Z,z=>{t().joined?z($):z(ee,!1)},!0)}o(f,E)};T(P,f=>{r(a)?f(g):f(l,!1)})}o(C,A)}})}p(M),p(u),p(m),X(y,s),o(w,m),D(),d()}var we=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span class="hidden sm:inline">Sending...</span></div>'),xe=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"></path></svg> <span class="hidden sm:inline">Send</span></div>'),be=c('<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-2">💬</span> Send Message</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="sendMessage" class="block text-sm font-semibold text-gray-700">Your Message</label> <div class="flex space-x-3"><input id="sendMessage" class="flex-1 px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="Type your message here..."/> <!></div> <p class="text-gray-500 text-xs">💡 Press Enter to send quickly</p></div></div></div>');function Re(w,e){L(e,!0);const t=()=>U(e.sockethubState,"$sockethubState",x),[x,d]=O();let s=H(""),a=H(!1);async function v(){if(!r(s).trim())return;S(a,!0);const n=r(s).trim();console.log("send message: ",n);try{await W({"@context":await K(e.context),type:"send",actor:G(e.actor),object:{type:"message",content:n},target:{id:e.room,name:e.room,type:"room"}}),S(s,"")}catch(i){console.error("Failed to send message:",i)}finally{S(a,!1)}}var b=be(),m=j(h(b),2),u=h(m),k=j(h(u),2),y=h(k);N(y),y.__keydown=n=>{n.key==="Enter"&&!r(a)&&t().connected&&v()};var M=j(y,2);{let n=V(()=>!t().connected||r(a)||!r(s).trim());Y(M,{get disabled(){return r(n)},buttonAction:v,children:(i,C)=>{var B=R(),A=J(B);{var P=l=>{var f=we();o(l,f)},g=l=>{var f=xe();o(l,f)};T(A,l=>{r(a)?l(P):l(g,!1)})}o(i,B)}})}p(k),Q(2),p(u),p(m),p(b),X(y,()=>r(s),n=>S(s,n)),o(w,b),D(),d()}te(["keydown"]);export{Ae as A,ze as C,Be as P,Pe as R,Re as S};
@@ -0,0 +1 @@
1
+ var s;const e=((s=globalThis.__sveltekit_kn43ud)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_kn43ud)==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.DcZ2dsmt.js","../chunks/DqdrLdzV.js","../chunks/Ciq9INsC.js","../chunks/P3PHXZz3.js","../chunks/CC-fhLYv.js","../chunks/CihmTBhe.js","../chunks/BnKTx64M.js","../chunks/CARmnL8B.js","../chunks/Cf7Xaqef.js","../chunks/B-2myMF5.js","../assets/sockethub.Bpv0Wt6b.css","../chunks/UKP-Z6jI.js","../chunks/B1Dg8LdY.js","../assets/0.DWIWvKCl.css","../nodes/1.C6aP9uS2.js","../nodes/2.BPwYaw3N.js","../chunks/D_xw8KSE.js","../nodes/3.BGd6WCa1.js","../chunks/Dcal-xrT.js","../chunks/BFNCz1gq.js","../chunks/DOKWDPrU.js","../nodes/4.G9Lcgqeg.js","../chunks/FDiY3NYw.js","../nodes/5.B4MUA0zQ.js","../nodes/6.BSB3XMkK.js","../nodes/7.IHPDEcKQ.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,b 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,d 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/Ciq9INsC.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/DqdrLdzV.js";import{o as Ot}from"../chunks/CARmnL8B.js";import{p as D,i as B}from"../chunks/Cf7Xaqef.js";import{B as At}from"../chunks/CC-fhLYv.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.DcZ2dsmt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/1.C6aP9uS2.js"),__vite__mapDeps([14,1,2,6,9,12,7,11]),import.meta.url),()=>E(()=>import("../nodes/2.BPwYaw3N.js"),__vite__mapDeps([15,1,2,6,3,4,11,16]),import.meta.url),()=>E(()=>import("../nodes/3.BGd6WCa1.js"),__vite__mapDeps([17,1,2,7,18,8,4,3,19,5,6,9,10,16,20]),import.meta.url),()=>E(()=>import("../nodes/4.G9Lcgqeg.js"),__vite__mapDeps([21,1,2,8,4,7,18,3,19,5,6,9,10,16,22,20]),import.meta.url),()=>E(()=>import("../nodes/5.B4MUA0zQ.js"),__vite__mapDeps([23,1,2,7,18,8,4,3,19,5,6,9,10,16,20]),import.meta.url),()=>E(()=>import("../nodes/6.BSB3XMkK.js"),__vite__mapDeps([24,1,2,5,6,7,8,4,3,9,10,19,16,20]),import.meta.url),()=>E(()=>import("../nodes/7.IHPDEcKQ.js"),__vite__mapDeps([25,1,2,8,4,7,18,3,19,5,6,9,10,16,22]),import.meta.url)],Yt=[],Gt={"/":[2],"/dummy":[6],"/feeds":[3],"/irc":[4],"/metadata":[5],"/xmpp":[7]},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.COBjogKI.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/aGNzqrdP.js","../chunks/BAMCB3hl.js","../assets/0.GKlhshq0.css","../nodes/1.ZmYfbvuo.js","../nodes/2.B-c8MtqI.js","../chunks/CPsRFLIg.js","../nodes/3.DKOfQDif.js","../chunks/DhU_U-a9.js","../chunks/DTPsrcK7.js","../chunks/Dm-WrFn1.js","../nodes/4.PE7b6wi8.js","../chunks/De6kqrZW.js","../nodes/5.Cc6bNRTx.js","../nodes/6.D0DWXXhX.js","../nodes/7.CFhuHlBr.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.COBjogKI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/1.ZmYfbvuo.js"),__vite__mapDeps([14,1,2,6,9,12,7,11]),import.meta.url),()=>E(()=>import("../nodes/2.B-c8MtqI.js"),__vite__mapDeps([15,1,2,6,3,4,11,16]),import.meta.url),()=>E(()=>import("../nodes/3.DKOfQDif.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.CFhuHlBr.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/BAMCB3hl.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/DqdrLdzV.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/Ciq9INsC.js";import{a as w,s as k,b as H}from"../chunks/P3PHXZz3.js";import{b as N,e as V,i as X,h as G,d as J}from"../chunks/CihmTBhe.js";import{b as A}from"../chunks/UKP-Z6jI.js";import"../chunks/BnKTx64M.js";import{i as K,s as I,b as T}from"../chunks/Cf7Xaqef.js";import{i as Q}from"../chunks/B-2myMF5.js";import{s as U}from"../chunks/B1Dg8LdY.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/CE_Br0Li.js";import{b as A}from"../chunks/aGNzqrdP.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/BAMCB3hl.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/DqdrLdzV.js";import"../chunks/BnKTx64M.js";import{p as l,f as v,t as d,a as _,c as o,r as p,s as x}from"../chunks/Ciq9INsC.js";import{i as $}from"../chunks/B-2myMF5.js";import{s as k,p as m}from"../chunks/B1Dg8LdY.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/BAMCB3hl.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,5 +1,5 @@
1
- import{f as x,a as f}from"../chunks/DqdrLdzV.js";import"../chunks/BnKTx64M.js";import{s as e,f as y,c as t,r as s,n as w,t as S}from"../chunks/Ciq9INsC.js";import{s as a}from"../chunks/P3PHXZz3.js";import{b as r}from"../chunks/UKP-Z6jI.js";import{I as k}from"../chunks/D_xw8KSE.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/aGNzqrdP.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
- 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 send ActivityStreams messages describing what you want to do</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
5
- the basic flow, then explore real-world protocols:</p> <div class="grid gap-3 text-sm"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-green-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">🔧 Dummy Platform</div> <div class="text-purple-600">Learn the basics with simple echo/fail examples</div></div> <span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded">Start Here</span></div></a> <div class="grid md:grid-cols-2 gap-3"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors"><div class="font-semibold text-purple-800">📰 RSS/ATOM Feeds</div> <div class="text-purple-600">Fetch and parse web feeds</div></a> <a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors"><div class="font-semibold text-purple-800">🔍 Metadata</div> <div class="text-purple-600">Extract metadata from web pages</div></a></div> <div class="grid md:grid-cols-2 gap-3"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-orange-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">💬 IRC Chat</div> <div class="text-purple-600">Connect to IRC servers and channels</div></div> <span class="text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded">Advanced</span></div></a> <a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-orange-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">📨 XMPP Messaging</div> <div class="text-purple-600">Send and receive XMPP messages</div></div> <span class="text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded">Advanced</span></div></a></div></div></div> <div class="text-center text-gray-600 text-sm bg-gray-50 p-4 rounded-lg">💡 <strong>Tip:</strong> Watch the connection status at the top and the activity log at the bottom of each example to understand what's happening behind the scenes.</div></div>`,1);function E(m){k(m,{title:"Sockethub Examples",children:(g,_)=>{var i=P(),l=e(y(i),2),d=e(t(l),6),n=e(t(d),4),p=t(n),o=e(p,2),c=t(o),h=e(c,2);s(o);var b=e(o,2),v=t(b),u=e(v,2);s(b),s(n),s(d),w(2),s(l),S(()=>{a(p,"href",`${r??""}/dummy`),a(c,"href",`${r??""}/feeds`),a(h,"href",`${r??""}/metadata`),a(v,"href",`${r??""}/irc`),a(u,"href",`${r??""}/xmpp`)}),f(g,i)}})}export{E as component};
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
5
+ the basic flow, then explore real-world protocols:</p> <div class="grid gap-3 text-sm"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-green-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">🔧 Dummy Platform</div> <div class="text-purple-600">Learn the basics with simple echo/fail examples</div></div> <span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded">Start Here</span></div></a> <div class="grid md:grid-cols-2 gap-3"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors"><div class="font-semibold text-purple-800">📰 RSS/ATOM Feeds</div> <div class="text-purple-600">Fetch and parse web feeds</div></a> <a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors"><div class="font-semibold text-purple-800">🔍 Metadata</div> <div class="text-purple-600">Extract metadata from web pages</div></a></div> <div class="grid md:grid-cols-2 gap-3"><a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-orange-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">💬 IRC Chat</div> <div class="text-purple-600">Connect to IRC servers and channels</div></div> <span class="text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded">Advanced</span></div></a> <a class="block p-3 bg-white rounded border hover:bg-purple-50 transition-colors border-l-4 border-l-orange-400"><div class="flex items-center justify-between"><div><div class="font-semibold text-purple-800">📨 XMPP Messaging</div> <div class="text-purple-600">Send and receive XMPP messages</div></div> <span class="text-xs bg-orange-100 text-orange-700 px-2 py-1 rounded">Advanced</span></div></a></div></div></div> <div class="text-center text-gray-600 text-sm bg-gray-50 p-4 rounded-lg">💡 <strong>Tip:</strong> Watch the connection status at the top and the activity log at the bottom of each example to understand what's happening behind the scenes.</div></div>`,1);function E(m){k(m,{title:"Sockethub Examples",children:(h,_)=>{var i=P(),l=e(y(i),2),d=e(t(l),6),n=e(t(d),4),c=t(n),o=e(c,2),p=t(o),g=e(p,2);s(o);var b=e(o,2),v=t(b),u=e(v,2);s(b),s(n),s(d),w(2),s(l),S(()=>{a(c,"href",`${r??""}/dummy`),a(p,"href",`${r??""}/feeds`),a(g,"href",`${r??""}/metadata`),a(v,"href",`${r??""}/irc`),a(u,"href",`${r??""}/xmpp`)}),f(h,i)}})}export{E as component};
@@ -0,0 +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/Dm-WrFn1.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
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/DqdrLdzV.js";import{p as xe,a as pe,s,f as fe,c as e,b as he,d as ue,g as J,n as o,r as t}from"../chunks/Ciq9INsC.js";import{s as b,c as ge}from"../chunks/CihmTBhe.js";import{B as ye,S as l}from"../chunks/BFNCz1gq.js";import{F as _e}from"../chunks/DOKWDPrU.js";var we=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(N,Q){xe(Q,!0);const V="https://sockethub.org/examples/dummy";let x=ue("");function c(m){return{"@context":ge("dummy"),type:m,actor:{type:"person",id:V},object:{type:"message",content:J(x)}}}function n(m){b(c(m))}async function X(){b(c("echo"))}async function Z(){b(c("fail"))}async function ee(){b(c("throw"))}async function te(){b(c("greet"))}ye(N,{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 T=we(),S=s(fe(T),2),A=e(S);_e(A,{label:"Message Content",id:"objectContent",placeholder:"Hello from Sockethub",get value(){return J(x)},set value(r){he(x,r,!0)}});var p=s(A,4),j=s(e(p),4),f=e(j),h=e(f),k=e(h),se=s(e(k),2);l(se,{buttonAction:X,children:(r,v)=>{o();var i=a("Echo");d(r,i)}}),t(k),t(h);var P=s(h,2),R=e(P),re=s(e(R),2);l(re,{buttonAction:te,children:(r,v)=>{o();var i=a("Greet");d(r,i)}}),t(R),t(P),t(f);var G=s(f,2),u=e(G),I=e(u),ie=s(e(I),2);l(ie,{buttonAction:Z,children:(r,v)=>{o();var i=a("Fail");d(r,i)}}),t(I),t(u);var F=s(u,2),L=e(F),de=s(e(L),2);l(de,{buttonAction:ee,children:(r,v)=>{o();var i=a("Throw");d(r,i)}}),t(L),t(F),t(G),t(j),t(p);var H=s(p,2),B=s(e(H),4),g=e(B),y=e(g),C=e(y),ae=s(e(C),2);l(ae,{buttonAction:()=>n("exit0"),children:(r,v)=>{o();var i=a("Exit 0");d(r,i)}}),t(C),t(y);var _=s(y,2),M=e(_),oe=s(e(M),2);l(oe,{buttonAction:()=>n("exit1"),children:(r,v)=>{o();var i=a("Exit 1");d(r,i)}}),t(M),t(_);var w=s(_,2),D=e(w),le=s(e(D),2);l(le,{buttonAction:()=>n("sigterm"),children:(r,v)=>{o();var i=a("SIGTERM");d(r,i)}}),t(D),t(w);var K=s(w,2),Y=e(K),ve=s(e(Y),2);l(ve,{buttonAction:()=>n("sigkill"),children:(r,v)=>{o();var i=a("SIGKILL");d(r,i)}}),t(Y),t(K),t(g);var q=s(g,2),$=e(q),O=e($),ne=s(e(O),2);l(ne,{buttonAction:()=>n("throwTypeError"),children:(r,v)=>{o();var i=a("TypeError");d(r,i)}}),t(O),t($);var E=s($,2),U=e(E),ce=s(e(U),2);l(ce,{buttonAction:()=>n("throwReferenceError"),children:(r,v)=>{o();var i=a("ReferenceError");d(r,i)}}),t(U),t(E);var W=s(E,2),z=e(W),me=s(e(z),2);l(me,{buttonAction:()=>n("hang"),children:(r,v)=>{o();var i=a("Hang");d(r,i)}}),t(z),t(W),t(q),t(B),t(H),t(S),d(m,T)}}),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/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};
@@ -0,0 +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};
@@ -0,0 +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};
@@ -0,0 +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/Dm-WrFn1.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 +1 @@
1
- {"version":"1774814700311"}
1
+ {"version":"1783215817775"}
package/build/dummy.html CHANGED
@@ -5,29 +5,29 @@
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.vRxtmFzd.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/B1Dg8LdY.js">
10
- <link rel="modulepreload" href="./_app/immutable/chunks/Ciq9INsC.js">
11
- <link rel="modulepreload" href="./_app/immutable/chunks/CARmnL8B.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/UKP-Z6jI.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.C9H-zozU.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/DqdrLdzV.js">
15
- <link rel="modulepreload" href="./_app/immutable/chunks/Cf7Xaqef.js">
16
- <link rel="modulepreload" href="./_app/immutable/chunks/CC-fhLYv.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.D_PJ6UtD.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BAMCB3hl.js">
10
+ <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
+ <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/aGNzqrdP.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.44tyicEj.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
+ <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
+ <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
17
17
  </head>
18
18
  <body class="bg-white-100">
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_4h0jh5 = {
22
+ __sveltekit_kn43ud = {
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.vRxtmFzd.js"),
30
- import("./_app/immutable/entry/app.C9H-zozU.js")
29
+ import("./_app/immutable/entry/start.D_PJ6UtD.js"),
30
+ import("./_app/immutable/entry/app.44tyicEj.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });
package/build/feeds.html CHANGED
@@ -5,29 +5,29 @@
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.vRxtmFzd.js">
9
- <link rel="modulepreload" href="./_app/immutable/chunks/B1Dg8LdY.js">
10
- <link rel="modulepreload" href="./_app/immutable/chunks/Ciq9INsC.js">
11
- <link rel="modulepreload" href="./_app/immutable/chunks/CARmnL8B.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/UKP-Z6jI.js">
13
- <link rel="modulepreload" href="./_app/immutable/entry/app.C9H-zozU.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/DqdrLdzV.js">
15
- <link rel="modulepreload" href="./_app/immutable/chunks/Cf7Xaqef.js">
16
- <link rel="modulepreload" href="./_app/immutable/chunks/CC-fhLYv.js">
8
+ <link rel="modulepreload" href="./_app/immutable/entry/start.D_PJ6UtD.js">
9
+ <link rel="modulepreload" href="./_app/immutable/chunks/BAMCB3hl.js">
10
+ <link rel="modulepreload" href="./_app/immutable/chunks/DT_OQU4t.js">
11
+ <link rel="modulepreload" href="./_app/immutable/chunks/CF0IgWN3.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/aGNzqrdP.js">
13
+ <link rel="modulepreload" href="./_app/immutable/entry/app.44tyicEj.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/Bh9jqwq3.js">
15
+ <link rel="modulepreload" href="./_app/immutable/chunks/B5Mgq-ia.js">
16
+ <link rel="modulepreload" href="./_app/immutable/chunks/CLc0OQ-M.js">
17
17
  </head>
18
18
  <body class="bg-white-100">
19
19
  <div class="container mx-auto pl-2 pr-2 pt-2">
20
20
  <script>
21
21
  {
22
- __sveltekit_4h0jh5 = {
22
+ __sveltekit_kn43ud = {
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.vRxtmFzd.js"),
30
- import("./_app/immutable/entry/app.C9H-zozU.js")
29
+ import("./_app/immutable/entry/start.D_PJ6UtD.js"),
30
+ import("./_app/immutable/entry/app.44tyicEj.js")
31
31
  ]).then(([kit, app]) => {
32
32
  kit.start(app, element);
33
33
  });