@konemono/nostr-share-component 0.2.7 → 0.4.0
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.
- package/README.md +22 -11
- package/dist/main.d.ts +1 -4
- package/dist/nostr-share-component.es.js +849 -935
- package/dist/nostr-share-component.js +9 -18
- package/dist/nostr-share-component.umd.js +9 -18
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var NostrShare=function(m){"use strict";var Mn=Object.defineProperty;var vr=m=>{throw TypeError(m)};var Ln=(m,w,k)=>w in m?Mn(m,w,{enumerable:!0,configurable:!0,writable:!0,value:k}):m[w]=k;var P=(m,w,k)=>Ln(m,typeof w!="symbol"?w+"":w,k),dr=(m,w,k)=>w.has(m)||vr("Cannot "+k);var R=(m,w,k)=>(dr(m,w,"read from private field"),k?k.call(m):w.get(m)),$e=(m,w,k)=>w.has(m)?vr("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(m):w.set(m,k),xe=(m,w,k,Ct)=>(dr(m,w,"write to private field"),Ct?Ct.call(m,k):w.set(m,k),k);var X,z;const w="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(w);const k=1,Ct=2,hr=16,_r=8,pr=1,gr=2,ye="[",Zt="[!",Qt="]",gt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const we=!1;var Ee=Array.isArray,te=Array.from,Nt=Object.keys,At=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,xr=Object.getOwnPropertyDescriptors,yr=Object.getPrototypeOf;function wr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Rt=8,ee=16,q=32,st=64,re=128,it=256,It=512,I=1024,Z=2048,bt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Te=1<<20,Tr=Symbol("$state"),Se=Symbol("legacy props"),Sr=Symbol("");function Ce(t){return t===this.v}function Cr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Nr(t){return!Cr(t,this.v)}function Ar(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Or(){throw new Error("https://svelte.dev/e/hydration_failed")}function Rr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Dr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ne=!1;function Dt(t,e){var r={f:0,v:t,reactions:null,equals:Ce,version:0};return r}function Mr(t){return Lr(Dt(t))}function oe(t,e=!1){const r=Dt(t);return e||(r.equals=Nr),r}function Lr(t){return y!==null&&y.f&j&&(B===null?Kr([t]):B.push(t)),t}function Mt(t,e){return y!==null&&Jr()&&y.f&(j|ee)&&(B===null||!B.includes(t))&&Dr(),Ae(t,e)}function Ae(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Oe(t,Z),p!==null&&p.f&I&&!(p.f&q)&&(S!==null&&S.includes(t)?(J(p,Z),Gt(p)):tt===null?Wr([t]):tt.push(t))),e}function Oe(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var l=r[o],s=l.f;s&Z||(J(l,e),s&(I|it)&&(s&j?Oe(l,bt):Gt(l)))}}function le(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let g=!1;function Y(t){g=t}let b;function V(t){if(t===null)throw le(),gt;return b=t}function mt(){return V(K(b))}function $t(t){if(g){if(K(b)!==null)throw le(),gt;b=t}}function zr(t=1){if(g){for(var e=t,r=b;e--;)r=K(r);b=r}}function se(){for(var t=0,e=b;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===ye||r===Zt)&&(t+=1)}var n=K(e);e.remove(),e=n}}var Re,Ie,De;function ie(){if(Re===void 0){Re=window;var t=Element.prototype,e=Node.prototype;Ie=Ot(e,"firstChild").get,De=Ot(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Lt(t=""){return document.createTextNode(t)}function G(t){return Ie.call(t)}function K(t){return De.call(t)}function zt(t,e){if(!g)return G(t);var r=G(b);return r===null&&(r=b.appendChild(Lt())),V(r),r}function Me(t,e){if(!g){var r=G(t);return r instanceof Comment&&r.data===""?K(r):r}return b}function jt(t,e=1,r=!1){let n=g?b:t;for(var o;e--;)o=n,n=K(n);if(!g)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var s=Lt();return n===null?o==null||o.after(s):n.before(s),V(s),s}return V(n),n}function Le(t){t.textContent=""}function ae(t){var e=j|Z;p===null?e|=it:p.f|=Te;var r=y!==null&&y.f&j?y:null;const n={children:null,ctx:F,deps:null,equals:Ce,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function ze(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):W(n)}}}function jr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=p;Q(jr(t));try{ze(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(ot||t.f&it)&&t.deps!==null?bt:I;J(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){ze(t),kt(t,0),J(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Fr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var o=(t&st)!==0,l=p,s={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|Z,first:null,fn:e,last:null,next:null,parent:o?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(s),s.f|=Er}catch(_){throw W(s),_}finally{Ke(i)}}else e!==null&&Gt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&Te)===0;if(!u&&!o&&n&&(l!==null&&Fr(s,l),y!==null&&y.f&j)){var f=y;(f.children??(f.children=[])).push(s)}return s}function Pr(t){const e=ut(st,t,!0);return()=>{W(e)}}function qr(t){const e=ut(st,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{W(e),n(void 0)}):(W(e),n(void 0))})}function Hr(t){return ut(ke,t,!1)}function Vr(t){return ut(Rt,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Rt|ee|e,t,!0)}function xt(t,e=!0){return ut(Rt|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=y;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;W(r,e),r=n}}function Br(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||W(e),e=r}}function W(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var l=n===o?null:K(n);n.remove(),n=l}r=!0}He(t,e&&!r),qe(t),kt(t,0),J(t,at);var s=t.transitions;if(s!==null)for(const u of s)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{W(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,l=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,l?r:!1),n=o}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){Et(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,o?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],wr(t)}function Ur(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Yr(){Ht&&Ye()}const Ge=0,Gr=1;let Vt=!1,Bt=Ge,yt=!1,wt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,zn=[],y=null;function vt(t){y=t}let p=null;function Q(t){p=t}let B=null;function Kr(t){B=t}let S=null,D=0,tt=null;function Wr(t){tt=t}let We=1,ot=!1,F=null;function Je(){return++We}function Jr(){return!Ne}function Et(t){var s,i;var e=t.f;if(e&Z)return!0;if(e&bt){var r=t.deps,n=(e&it)!==0;if(r!==null){var o;if(e&It){for(o=0;o<r.length;o++)((s=r[o]).reactions??(s.reactions=[])).push(t);t.f^=It}for(o=0;o<r.length;o++){var l=r[o];if(Et(l)&&Fe(l),n&&p!==null&&!ot&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!ot)&&J(t,I)}return!1}function Xr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Zr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Zr(e))throw t;return}r!==null&&(Vt=!0);{Xr(t,e);return}}function Xe(t){var c;var e=S,r=D,n=tt,o=y,l=ot,s=B,i=F,u=t.f;S=null,D=0,tt=null,y=u&(q|st)?null:t,ot=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(S!==null){var a;if(kt(t,D),_!==null&&D>0)for(_.length=D+S.length,a=0;a<S.length;a++)_[D+a]=S[a];else t.deps=_=S;if(!ot)for(a=D;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&D<_.length&&(kt(t,D),_.length=D);return f}finally{S=e,D=r,tt=n,y=o,ot=l,B=s,F=i}}function Qr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&j&&(S===null||!S.includes(e))&&(J(e,bt),e.f&(it|It)||(e.f^=It),kt(e,0))}function kt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Qr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){J(t,I);var r=p,n=F;p=t;try{e&ee?Br(t):He(t),qe(t),Pe(t);var o=Xe(t);t.teardown=typeof o=="function"?o:null,t.version=We}catch(l){Ut(l,t,r,n||t.ctx)}finally{p=r}}}function Ze(){if(ft>1e3){ft=0;try{Ar()}catch(t){if(wt!==null)Ut(t,wt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&I||(o.f^=I);var l=[];tr(o,l),tn(l)}}finally{ct=r}}}function tn(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{Et(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(o){Ut(o,n,null,n.ctx)}}}function en(){if(yt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),yt||(ft=0,wt=null)}function Gt(t){Bt===Ge&&(yt||(yt=!0,queueMicrotask(en))),wt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(st|q)){if(!(r&I))return;e.f^=I}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,l=(o&q)!==0,s=l&&(o&I)!==0,i=r.next;if(!s&&!(o&H))if(o&Rt){if(l)r.f^=I;else try{Et(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function A(t){var e=Bt,r=nt;try{Ze();const o=[];Bt=Gr,nt=o,yt=!1,Qe(r);var n=t==null?void 0:t();return Yr(),(nt.length>0||o.length>0)&&A(),ft=0,wt=null,n}finally{Bt=e,nt=r}}function M(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(y!==null){B!==null&&B.includes(t)&&Ir();var o=y.deps;S===null&&o!==null&&o[D]===t?D++:S===null?S=[t]:S.push(t),tt!==null&&p!==null&&p.f&I&&!(p.f&q)&&tt.includes(t)&&(J(p,Z),Gt(p))}else if(r&&t.deps===null)for(var l=t,s=l.parent,i=l;s!==null;)if(s.f&j){var u=s;i=u,s=u.parent}else{var f=s;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(l=t,Et(l)&&Fe(l)),t.v}function rn(t){const e=y;try{return y=null,t()}finally{y=e}}const nn=~(Z|bt|I);function J(t,e){t.f=t.f&nn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=p,n=y;e.e=null;try{for(var o=0;o<s.length;o++){var l=s[o];Q(l.effect),vt(l.reaction),Hr(l.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,o=((h=t.composedPath)==null?void 0:h.call(t))||[],l=o[0]||t.target,s=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=o.indexOf(e);if(f===-1)return;u<=f&&(s=u)}if(l=o[s]||t.target,l!==e){At(t,"currentTarget",{configurable:!0,get(){return l||r}});var _=y,a=p;vt(null),Q(null);try{for(var c,v=[];l!==null;){var d=l.assignedSlot||l.parentNode||l.host||null;try{var $=l["__"+n];if($!==void 0&&!l.disabled)if(Ee($)){var[N,...C]=$;N.apply(l,[t,...C])}else $.call(l,t)}catch(x){c?v.push(x):c=x}if(t.cancelBubble||d===e||d===null)break;l=d}if(c){for(let x of v)queueMicrotask(()=>{throw x});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Tt(t,e){var r=(e&pr)!==0,n=(e&gr)!==0,o,l=!t.startsWith("<!>");return()=>{if(g)return dt(b,null),b;o===void 0&&(o=nr(l?t:"<!>"+t),r||(o=G(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=G(s),u=s.lastChild;dt(i,u)}else dt(s,s);return s}}function on(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if(g)return dt(b,null),b;if(!l){var s=nr(o),i=G(s);l=G(i)}var u=l.cloneNode(!0);return dt(u,u),u}}function lt(t,e){if(g){p.nodes_end=b,mt();return}t!==null&&t.before(e)}function ln(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function or(t,e){return lr(t,e)}function sn(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=g,o=b;try{for(var l=G(r);l&&(l.nodeType!==8||l.data!==ye);)l=K(l);if(!l)throw gt;Y(!0),V(l),mt();const s=lr(t,{...e,anchor:l});if(b===null||b.nodeType!==8||b.data!==Qt)throw le(),gt;return Y(!1),s}catch(s){if(s===gt)return e.recover===!1&&Or(),ie(),Le(r),Y(!1),or(t,e);throw s}finally{Y(n),V(o)}}const ht=new Map;function lr(t,{target:e,anchor:r,props:n={},events:o,context:l,intro:s=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var $=ht.get(v);$===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,$+1)}}};u(te(er)),de.add(u);var f=void 0,_=qr(()=>{var a=r??e.appendChild(Lt());return xt(()=>{if(l){Kt({});var c=F;c.c=l}o&&(n.$$events=o),g&&dt(a,null),f=t(a,n)||{},g&&(p.nodes_end=b),l&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function an(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){g&&mt();var n=t,o=null,l=null,s=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(s===(s=a))return;let v=!1;if(g){const d=n.data===Zt;!!s===d&&(n=se(),V(n),Y(!1),v=!0)}s?(o?qt(o):c&&(o=xt(()=>c(n))),l&&Pt(l,()=>{l=null})):(l?qt(l):c&&(l=xt(()=>c(n))),o&&Pt(o,()=>{o=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),g&&(n=b)}function un(t,e){return e}function cn(t,e,r,n){for(var o=[],l=e.length,s=0;s<l;s++)fe(e[s].e,o,!0);var i=l>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Le(u),u.append(r),n.clear(),et(t,e[0].prev,e[l-1].next)}Be(o,()=>{for(var f=0;f<l;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),W(_.e,!i)}})}function fn(t,e,r,n,o,l=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=g?V(G(u)):u.appendChild(Lt())}g&&mt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(g){var $=s.data===Zt;$!==(v===0)&&(s=se(),V(s),Y(!1),d=!0)}if(g){for(var N=null,C,h=0;h<v;h++){if(b.nodeType===8&&b.data===Qt){s=b,d=!0,Y(!1);break}var x=c[h],U=n(x,h);C=sr(b,i,N,null,x,U,h,o,e),i.items.set(U,C),N=C}v>0&&V(se())}if(!g){var E=y;vn(c,i,s,o,e,(E.f&H)!==0,n)}l!==null&&(v===0?f?qt(f):f=xt(()=>l(s)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),g&&(s=b)}function vn(t,e,r,n,o,l,s,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],$=[],N,C,h,x;for(x=0;x<u;x+=1){if(N=t[x],C=s(N,x),h=f.get(C),h===void 0){var U=a?a.e.nodes_start:r;v=sr(U,e,v,v===null?e.first:v.next,N,C,x,n,o),f.set(C,v),d=[],$=[],a=v.next;continue}if(dn(h,N,x),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<$.length){var E=$[0],T;v=E.prev;var rt=d[0],St=d[d.length-1];for(T=0;T<d.length;T+=1)ir(d[T],E,r);for(T=0;T<$.length;T+=1)c.delete($[T]);et(e,rt.prev,St.next),et(e,v,rt),et(e,St,E),a=E,v=St,x-=1,d=[],$=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],$=[];a!==null&&a.k!==C;)(l||!(a.e.f&H))&&(c??(c=new Set)).add(a),$.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var O=c===void 0?[]:te(c);a!==null;)(l||!(a.e.f&H))&&O.push(a),a=a.next;var pt=O.length;if(pt>0){var Dn=u===0?r:null;cn(e,O,Dn,f)}}p.first=e.first&&e.first.e,p.last=v&&v.e}function dn(t,e,r,n){Ae(t.v,e),t.i=r}function sr(t,e,r,n,o,l,s,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?oe(o):Dt(o):o,v=u&Ct?Dt(s):s,d={i:v,v:c,k:l,a:null,e:null,prev:r,next:n};try{return d.e=xt(()=>i(t,c,v),g),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var s=K(l);o.before(l),l=s}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function hn(t,e,r,n,o){var i;g&&mt();var l=(i=e.$$slots)==null?void 0:i[r],s=!1;l===!0&&(l=e.children,s=!0),l===void 0?o!==null&&o(t):l(t,s?()=>n:n)}function pe(t,e){Ur(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function _t(t,e,r,n){var o=t.__attributes??(t.__attributes={});g&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[Sr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&_n(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function _n(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=xr(n);for(var l in r)r[l].set&&e.push(l);n=yr(n)}return e}function ur(t,e){var r=t.__className,n=pn(e);g&&t.className===n?t.__className=n:(r!==n||g&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function pn(t){return t??""}function gn(t){for(var e=p,r=p;e!==null&&!(e.f&(q|st));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function L(t,e,r,n){var U;var o=!Ne,l=(r&_r)!==0,s=!1,i;i=t[e];var u=Tr in t||Se in t,f=((U=Ot(t,e))==null?void 0:U.set)??(u&&l&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&o&&Rr(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var $=t.$$legacy;return function(E,T){return arguments.length>0?((!T||$||s)&&f(T?d():E),E):d()}}var N=!1,C=!1,h=oe(i),x=gn(()=>ae(()=>{var E=d(),T=M(h);return N?(N=!1,C=!0,T):(C=!1,h.v=E)}));return function(E,T){if(arguments.length>0){const rt=T?M(x):E;return x.equals(rt)||(N=!0,Mt(h,rt),c&&_!==void 0&&(_=rt),rn(()=>M(x))),E}return M(x)}}function bn(t){return new mn(t)}class mn{constructor(e){$e(this,X);$e(this,z);var l;var r=new Map,n=(s,i)=>{var u=oe(i);return r.set(s,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(s,i){return M(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===Se?!0:(M(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return Mt(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});xe(this,z,(e.hydrate?sn:or)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&A(),xe(this,X,o.$$events);for(const s of Object.keys(R(this,z)))s==="$set"||s==="$destroy"||s==="$on"||At(this,s,{get(){return R(this,z)[s]},set(i){R(this,z)[s]=i},enumerable:!0});R(this,z).$set=s=>{Object.assign(o,s)},R(this,z).$destroy=()=>{an(R(this,z))}}$set(e){R(this,z).$set(e)}$on(e,r){R(this,X)[e]=R(this,X)[e]||[];const n=(...o)=>r.call(this,...o);return R(this,X)[e].push(n),()=>{R(this,X)[e]=R(this,X)[e].filter(o=>o!==n)}}$destroy(){R(this,z).$destroy()}}X=new WeakMap,z=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return l=>{const s=document.createElement("slot");o!=="default"&&(s.name=o),lt(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=$n(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Xt(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=bn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Pr(()=>{Vr(()=>{var o;this.$$r=!0;for(const l of Nt(this.$$c)){if(!((o=this.$$p_d[l])!=null&&o.reflect))continue;this.$$d[l]=this.$$c[l];const s=Xt(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const s=this.$$c.$on(o,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Nt(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var l;const o=(l=r[t])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function $n(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ge(t,e,r,n,o,l){let s=class extends cr{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Nt(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Nt(e).forEach(i=>{At(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=Ot(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{At(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const xn=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var yn=t=>t.stopPropagation(),wn=(t,e,r)=>e(M(r).url),En=Tt('<button class="item svelte-xie82o"><img> </button>'),kn=Tt('<div class="overlay svelte-xie82o"><div class="inner svelte-xie82o"><button class="close-button svelte-xie82o" aria-label="Close">✖</button> <h2 class="title svelte-xie82o">Select Share Client</h2> <div class="list svelte-xie82o"></div> <div class="footer svelte-xie82o"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-xie82o">nostr-share-component</a></div></div></div>');const Tn={hash:"svelte-xie82o",code:`
|
|
1
|
+
var NostrShare=function(b){"use strict";var Dn=Object.defineProperty;var cr=b=>{throw TypeError(b)};var In=(b,y,k)=>y in b?Dn(b,y,{enumerable:!0,configurable:!0,writable:!0,value:k}):b[y]=k;var z=(b,y,k)=>In(b,typeof y!="symbol"?y+"":y,k),fr=(b,y,k)=>y.has(b)||cr("Cannot "+k);var A=(b,y,k)=>(fr(b,y,"read from private field"),k?k.call(b):y.get(b)),pe=(b,y,k)=>y.has(b)?cr("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(b):y.set(b,k),ge=(b,y,k,kt)=>(fr(b,y,"write to private field"),kt?kt.call(b,k):y.set(b,k),k);var G,I;const y="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(y);const k=1,kt=2,vr=16,dr=8,hr=1,_r=2,be="[",Kt="[!",Wt="]",ht={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var xe=Array.isArray,Jt=Array.from,Tt=Object.keys,Ct=Object.defineProperty,St=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,xr=Object.getPrototypeOf;function mr(t){for(var e=0;e<t.length;e++)t[e]()}const M=2,me=4,Nt=8,Xt=16,j=32,nt=64,Zt=128,ot=256,At=512,O=1024,W=2048,_t=4096,F=8192,lt=16384,wr=32768,Qt=65536,yr=1<<19,we=1<<20,Er=Symbol("$state"),ye=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Tr(t,this.v)}function Sr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ar(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Ot(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Dr(t){return Ir(Ot(t))}function te(t,e=!1){const r=Ot(t);return e||(r.equals=Cr),r}function Ir(t){return m!==null&&m.f&M&&(q===null?Ur([t]):q.push(t)),t}function Rt(t,e){return m!==null&&Kr()&&m.f&(M|Xt)&&(q===null||!q.includes(t))&&Rr(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Ce(t,W),p!==null&&p.f&O&&!(p.f&j)&&(T!==null&&T.includes(t)?(U(p,W),Vt(p)):X===null?Gr([t]):X.push(t))),e}function Ce(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var l=r[o],s=l.f;s&W||(U(l,e),s&(O|ot)&&(s&M?Ce(l,_t):Vt(l)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let $=!1;function H(t){$=t}let g;function P(t){if(t===null)throw ee(),ht;return g=t}function pt(){return P(B(g))}function gt(t){if($){if(B(g)!==null)throw ee(),ht;g=t}}function Mr(t=1){if($){for(var e=t,r=g;e--;)r=B(r);g=r}}function re(){for(var t=0,e=g;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=B(e);e.remove(),e=n}}var Se,Ne,Ae;function ne(){if(Se===void 0){Se=window;var t=Element.prototype,e=Node.prototype;Ne=St(e,"firstChild").get,Ae=St(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Dt(t=""){return document.createTextNode(t)}function V(t){return Ne.call(t)}function B(t){return Ae.call(t)}function It(t,e){if(!$)return V(t);var r=V(g);return r===null&&(r=g.appendChild(Dt())),P(r),r}function Oe(t,e){if(!$){var r=V(t);return r instanceof Comment&&r.data===""?B(r):r}return g}function Mt(t,e=1,r=!1){let n=$?g:t;for(var o;e--;)o=n,n=B(n);if(!$)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var s=Dt();return n===null?o==null||o.after(s):n.before(s),P(s),s}return P(n),n}function Re(t){t.textContent=""}function De(t){var e=M|W;p===null?e|=ot:p.f|=we;var r=m!==null&&m.f&M?m:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Ie(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&M?oe(n):Y(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&M))return e;e=e.parent}return null}function Me(t){var e,r=p;J(Lr(t));try{Ie(t),e=Ke(t)}finally{J(r)}return e}function Le(t){var e=Me(t),r=(et||t.f&ot)&&t.deps!==null?_t:O;U(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){Ie(t),wt(t,0),U(t,lt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function zr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function st(t,e,r,n=!0){var o=(t&nt)!==0,l=p,s={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|W,first:null,fn:e,last:null,next:null,parent:o?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=it;try{Ye(!0),Ht(s),s.f|=wr}catch(v){throw Y(s),v}finally{Ye(i)}}else e!==null&&Vt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&we)===0;if(!u&&!o&&n&&(l!==null&&zr(s,l),m!==null&&m.f&M)){var c=m;(c.children??(c.children=[])).push(s)}return s}function jr(t){const e=st(nt,t,!0);return()=>{Y(e)}}function Fr(t){const e=st(nt,t,!0);return(r={})=>new Promise(n=>{r.outro?Lt(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function Pr(t){return st(me,t,!1)}function qr(t){return st(Nt,t,!0)}function le(t){return se(t)}function se(t,e=0){return st(Nt|Xt|e,t,!0)}function bt(t,e=!0){return st(Nt|j,t,!0,e)}function ze(t){var e=t.teardown;if(e!==null){const r=m;ut(null);try{e.call(null)}finally{ut(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;Y(r,e),r=n}}function Hr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&j||Y(e),e=r}}function Y(t,e=!0){var r=!1;if((e||t.f&yr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var l=n===o?null:B(n);n.remove(),n=l}r=!0}Fe(t,e&&!r),je(t),wt(t,0),U(t,lt);var s=t.transitions;if(s!==null)for(const u of s)u.stop();ze(t);var i=t.parent;i!==null&&i.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Lt(t,e){var r=[];ie(t,r,!0),qe(r,()=>{Y(t),e&&e()})}function qe(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&F)){if(t.f^=F,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,l=(n.f&Qt)!==0||(n.f&j)!==0;ie(n,e,l?r:!1),n=o}}}function zt(t){He(t,!0)}function He(t,e){if(t.f&F){mt(t)&&Ht(t),t.f^=F;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&j)!==0;He(r,o?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],mr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Yr=1;let Ft=!1,Pt=Be,$t=!1,xt=null,it=!1;function Ye(t){it=t}let tt=[],at=0,Mn=[],m=null;function ut(t){m=t}let p=null;function J(t){p=t}let q=null;function Ur(t){q=t}let T=null,R=0,X=null;function Gr(t){X=t}let Ue=1,et=!1,L=null;function Ge(){return++Ue}function Kr(){return!ke}function mt(t){var s,i;var e=t.f;if(e&W)return!0;if(e&_t){var r=t.deps,n=(e&ot)!==0;if(r!==null){var o;if(e&At){for(o=0;o<r.length;o++)((s=r[o]).reactions??(s.reactions=[])).push(t);t.f^=At}for(o=0;o<r.length;o++){var l=r[o];if(mt(l)&&Le(l),n&&p!==null&&!et&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!et)&&U(t,O)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f<)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function qt(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var d;var e=T,r=R,n=X,o=m,l=et,s=q,i=L,u=t.f;T=null,R=0,X=null,m=u&(j|nt)?null:t,et=!it&&(u&ot)!==0,q=null,L=t.ctx;try{var c=(0,t.fn)(),v=t.deps;if(T!==null){var a;if(wt(t,R),v!==null&&R>0)for(v.length=R+T.length,a=0;a<T.length;a++)v[R+a]=T[a];else t.deps=v=T;if(!et)for(a=R;a<v.length;a++)((d=v[a]).reactions??(d.reactions=[])).push(t)}else v!==null&&R<v.length&&(wt(t,R),v.length=R);return c}finally{T=e,R=r,X=n,m=o,et=l,q=s,L=i}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&M&&(T===null||!T.includes(e))&&(U(e,_t),e.f&(ot|At)||(e.f^=At),wt(e,0))}function wt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function Ht(t){var e=t.f;if(!(e<)){U(t,O);var r=p,n=L;p=t;try{e&Xt?Hr(t):Fe(t),je(t),ze(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ue}catch(l){qt(l,t,r,n||t.ctx)}finally{p=r}}}function We(){if(at>1e3){at=0;try{Sr()}catch(t){if(xt!==null)qt(t,xt,null);else throw t}}at++}function Je(t){var e=t.length;if(e!==0){We();var r=it;it=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&O||(o.f^=O);var l=[];Xe(o,l),Zr(l)}}finally{it=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(lt|F)))try{mt(n)&&(Ht(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){qt(o,n,null,n.ctx)}}}function Qr(){if($t=!1,at>1001)return;const t=tt;tt=[],Je(t),$t||(at=0,xt=null)}function Vt(t){Pt===Be&&($t||($t=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(nt|j)){if(!(r&O))return;e.f^=O}}tt.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,l=(o&j)!==0,s=l&&(o&O)!==0,i=r.next;if(!s&&!(o&F))if(o&Nt){if(l)r.f^=O;else try{mt(r)&&Ht(r)}catch(a){qt(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&me&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var c=a.next;if(c!==null){r=c;continue t}a=a.parent}}r=i}for(var v=0;v<n.length;v++)u=n[v],e.push(u),Xe(u,e)}function Z(t){var e=Pt,r=tt;try{We();const o=[];Pt=Yr,tt=o,$t=!1,Je(r);var n=t==null?void 0:t();return Br(),(tt.length>0||o.length>0)&&Z(),at=0,xt=null,n}finally{Pt=e,tt=r}}function D(t){var v;var e=t.f,r=(e&M)!==0;if(r&&e<){var n=Me(t);return oe(t),n}if(m!==null){q!==null&&q.includes(t)&&Or();var o=m.deps;T===null&&o!==null&&o[R]===t?R++:T===null?T=[t]:T.push(t),X!==null&&p!==null&&p.f&O&&!(p.f&j)&&X.includes(t)&&(U(p,W),Vt(p))}else if(r&&t.deps===null)for(var l=t,s=l.parent,i=l;s!==null;)if(s.f&M){var u=s;i=u,s=u.parent}else{var c=s;(v=c.deriveds)!=null&&v.includes(i)||(c.deriveds??(c.deriveds=[])).push(i);break}return r&&(l=t,mt(l)&&Le(l)),t.v}function tn(t){const e=m;try{return m=null,t()}finally{m=e}}const en=~(W|_t|O);function U(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Yt(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=p,n=m;e.e=null;try{for(var o=0;o<s.length;o++){var l=s[o];J(l.effect),ut(l.reaction),Pr(l.fn)}}finally{J(r),ut(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Ut(t){var _;var e=this,r=e.ownerDocument,n=t.type,o=((_=t.composedPath)==null?void 0:_.call(t))||[],l=o[0]||t.target,s=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var c=o.indexOf(e);if(c===-1)return;u<=c&&(s=u)}if(l=o[s]||t.target,l!==e){Ct(t,"currentTarget",{configurable:!0,get(){return l||r}});var v=m,a=p;ut(null),J(null);try{for(var d,f=[];l!==null;){var h=l.assignedSlot||l.parentNode||l.host||null;try{var w=l["__"+n];if(w!==void 0&&!l.disabled)if(xe(w)){var[S,...C]=w;S.apply(l,[t,...C])}else w.call(l,t)}catch(x){d?f.push(x):d=x}if(t.cancelBubble||h===e||h===null)break;l=h}if(d){for(let x of f)queueMicrotask(()=>{throw x});throw d}}finally{t.__root=e,delete t.currentTarget,ut(v),J(a)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function ct(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function yt(t,e){var r=(e&hr)!==0,n=(e&_r)!==0,o,l=!t.startsWith("<!>");return()=>{if($)return ct(g,null),g;o===void 0&&(o=tr(l?t:"<!>"+t),r||(o=V(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=V(s),u=s.lastChild;ct(i,u)}else ct(s,s);return s}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if($)return ct(g,null),g;if(!l){var s=tr(o),i=V(s);l=V(i)}var u=l.cloneNode(!0);return ct(u,u),u}}function rt(t,e){if($){p.nodes_end=g,pt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=$,o=g;try{for(var l=V(r);l&&(l.nodeType!==8||l.data!==be);)l=B(l);if(!l)throw ht;H(!0),P(l),pt();const s=rr(t,{...e,anchor:l});if(g===null||g.nodeType!==8||g.data!==Wt)throw ee(),ht;return H(!1),s}catch(s){if(s===ht)return e.recover===!1&&Nr(),ne(),Re(r),H(!1),er(t,e);throw s}finally{H(n),P(o)}}const ft=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:l,intro:s=!0}){ne();var i=new Set,u=a=>{for(var d=0;d<a.length;d++){var f=a[d];if(!i.has(f)){i.add(f);var h=br(f);e.addEventListener(f,Ut,{passive:h});var w=ft.get(f);w===void 0?(document.addEventListener(f,Ut,{passive:h}),ft.set(f,1)):ft.set(f,w+1)}}};u(Jt(Ze)),ue.add(u);var c=void 0,v=Fr(()=>{var a=r??e.appendChild(Dt());return bt(()=>{if(l){Bt({});var d=L;d.c=l}o&&(n.$$events=o),$&&ct(a,null),c=t(a,n)||{},$&&(p.nodes_end=g),l&&Yt()}),()=>{var h;for(var d of i){e.removeEventListener(d,Ut);var f=ft.get(d);--f===0?(document.removeEventListener(d,Ut),ft.delete(d)):ft.set(d,f)}ue.delete(u),a!==r&&((h=a.parentNode)==null||h.removeChild(a))}});return ce.set(c,v),c}let ce=new WeakMap;function ln(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){$&&pt();var n=t,o=null,l=null,s=pr,i=r?Qt:0,u=!1;const c=(a,d=!0)=>{u=!0,v(d,a)},v=(a,d)=>{if(s===(s=a))return;let f=!1;if($){const h=n.data===Kt;!!s===h&&(n=re(),P(n),H(!1),f=!0)}s?(o?zt(o):d&&(o=bt(()=>d(n))),l&&Lt(l,()=>{l=null})):(l?zt(l):d&&(l=bt(()=>d(n))),o&&Lt(o,()=>{o=null})),f&&H(!0)};se(()=>{u=!1,e(c),u||v(null,null)},i),$&&(n=g)}function sn(t,e){return e}function an(t,e,r,n){for(var o=[],l=e.length,s=0;s<l;s++)ie(e[s].e,o,!0);var i=l>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Re(u),u.append(r),n.clear(),Q(t,e[0].prev,e[l-1].next)}qe(o,()=>{for(var c=0;c<l;c++){var v=e[c];i||(n.delete(v.k),Q(t,v.prev,v.next)),Y(v.e,!i)}})}function un(t,e,r,n,o,l=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=$?P(V(u)):u.appendChild(Dt())}$&&pt();var c=null,v=!1;se(()=>{var a=r(),d=xe(a)?a:a==null?[]:Jt(a),f=d.length;if(v&&f===0)return;v=f===0;let h=!1;if($){var w=s.data===Kt;w!==(f===0)&&(s=re(),P(s),H(!1),h=!0)}if($){for(var S=null,C,_=0;_<f;_++){if(g.nodeType===8&&g.data===Wt){s=g,h=!0,H(!1);break}var x=d[_],K=n(x,_);C=or(g,i,S,null,x,K,_,o,e),i.items.set(K,C),S=C}f>0&&P(re())}if(!$){var E=m;cn(d,i,s,o,e,(E.f&F)!==0,n)}l!==null&&(f===0?c?zt(c):c=bt(()=>l(s)):c!==null&&Lt(c,()=>{c=null})),h&&H(!0)}),$&&(s=g)}function cn(t,e,r,n,o,l,s,i){var u=t.length,c=e.items,v=e.first,a=v,d,f=null,h=[],w=[],S,C,_,x;for(x=0;x<u;x+=1){if(S=t[x],C=s(S,x),_=c.get(C),_===void 0){var K=a?a.e.nodes_start:r;f=or(K,e,f,f===null?e.first:f.next,S,C,x,n,o),c.set(C,f),h=[],w=[],a=f.next;continue}if(fn(_,S,x),_.e.f&F&&zt(_.e),_!==a){if(d!==void 0&&d.has(_)){if(h.length<w.length){var E=w[0],N;f=E.prev;var dt=h[0],he=h[h.length-1];for(N=0;N<h.length;N+=1)lr(h[N],E,r);for(N=0;N<w.length;N+=1)d.delete(w[N]);Q(e,dt.prev,he.next),Q(e,f,dt),Q(e,he,E),a=E,f=he,x-=1,h=[],w=[]}else d.delete(_),lr(_,a,r),Q(e,_.prev,_.next),Q(e,_,f===null?e.first:f.next),Q(e,f,_),f=_;continue}for(h=[],w=[];a!==null&&a.k!==C;)(l||!(a.e.f&F))&&(d??(d=new Set)).add(a),w.push(a),a=a.next;if(a===null)continue;_=a}h.push(_),f=_,a=_.next}if(a!==null||d!==void 0){for(var _e=d===void 0?[]:Jt(d);a!==null;)(l||!(a.e.f&F))&&_e.push(a),a=a.next;var On=_e.length;if(On>0){var Rn=u===0?r:null;an(e,_e,Rn,c)}}p.first=e.first&&e.first.e,p.last=f&&f.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,l,s,i,u,c){var v=(u&k)!==0,a=(u&vr)===0,d=v?a?te(o):Ot(o):o,f=u&kt?Ot(s):s,h={i:f,v:d,k:l,a:null,e:null,prev:r,next:n};try{return h.e=bt(()=>i(t,d,f),$),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function lr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var s=B(l);o.before(l),l=s}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var i;$&&pt();var l=(i=e.$$slots)==null?void 0:i[r],s=!1;l===!0&&(l=e.children,s=!0),l===void 0?o!==null&&o(t):l(t,s?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Et(t,e,r,n){var o=t.__attributes??(t.__attributes={});$&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&dn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var sr=new Map;function dn(t){var e=sr.get(t.nodeName);if(e)return e;sr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var l in r)r[l].set&&e.push(l);n=xr(n)}return e}function hn(t){for(var e=p,r=p;e!==null&&!(e.f&(j|nt));)e=e.parent;try{return J(e),t()}finally{J(r)}}function vt(t,e,r,n){var K;var o=!ke,l=(r&dr)!==0,s=!1,i;i=t[e];var u=Er in t||ye in t,c=((K=St(t,e))==null?void 0:K.set)??(u&&l&&e in t?E=>t[e]=E:void 0),v=n,a=!0,d=!1,f=()=>(d=!0,a&&(a=!1,v=n),v);i===void 0&&n!==void 0&&(c&&o&&Ar(),i=f(),c&&c(i));var h;if(h=()=>{var E=t[e];return E===void 0?f():(a=!0,d=!1,E)},c){var w=t.$$legacy;return function(E,N){return arguments.length>0?((!N||w||s)&&c(N?h():E),E):h()}}var S=!1,C=!1,_=te(i),x=hn(()=>De(()=>{var E=h(),N=D(_);return S?(S=!1,C=!0,N):(C=!1,_.v=E)}));return function(E,N){if(arguments.length>0){const dt=N?D(x):E;return x.equals(dt)||(S=!0,Rt(_,dt),d&&v!==void 0&&(v=dt),tn(()=>D(x))),E}return D(x)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,G);pe(this,I);var l;var r=new Map,n=(s,i)=>{var u=te(i);return r.set(s,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(s,i){return D(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===ye?!0:(D(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return Rt(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});ge(this,I,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Z(),ge(this,G,o.$$events);for(const s of Object.keys(A(this,I)))s==="$set"||s==="$destroy"||s==="$on"||Ct(this,s,{get(){return A(this,I)[s]},set(i){A(this,I)[s]=i},enumerable:!0});A(this,I).$set=s=>{Object.assign(o,s)},A(this,I).$destroy=()=>{ln(A(this,I))}}$set(e){A(this,I).$set(e)}$on(e,r){A(this,G)[e]=A(this,G)[e]||[];const n=(...o)=>r.call(this,...o);return A(this,G)[e].push(n),()=>{A(this,G)[e]=A(this,G)[e].filter(o=>o!==n)}}$destroy(){A(this,I).$destroy()}}G=new WeakMap,I=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();z(this,"$$ctor");z(this,"$$s");z(this,"$$c");z(this,"$$cn",!1);z(this,"$$d",{});z(this,"$$r",!1);z(this,"$$p_d",{});z(this,"$$l",{});z(this,"$$l_u",new Map);z(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return l=>{const s=document.createElement("slot");o!=="default"&&(s.name=o),rt(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Gt(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{qr(()=>{var o;this.$$r=!0;for(const l of Tt(this.$$c)){if(!((o=this.$$p_d[l])!=null&&o.reflect))continue;this.$$d[l]=this.$$c[l];const s=Gt(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const s=this.$$c.$on(o,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Tt(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var l;const o=(l=r[t])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,l){let s=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Tt(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Tt(e).forEach(i=>{Ct(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Gt(i,u,e),this.$$d[i]=u;var c=this.$$c;if(c){var v=(a=St(c,i))==null?void 0:a.get;v?c[i]=u:c.$set({[i]:u})}}})}),n.forEach(i=>{Ct(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const bn=[{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),xn=(t,e,r)=>e(D(r).url),mn=yt('<button class="item svelte-xie82o"><img> </button>'),wn=yt('<div class="overlay svelte-xie82o"><div class="inner svelte-xie82o"><button class="close-button svelte-xie82o" aria-label="Close">✖</button> <h2 class="title svelte-xie82o">Select Share Client</h2> <div class="list svelte-xie82o"></div> <div class="footer svelte-xie82o"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-xie82o">nostr-share-component</a></div></div></div>');const yn={hash:"svelte-xie82o",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-xie82o {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;z-index:50;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-xie82o {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -11,7 +11,8 @@ var NostrShare=function(m){"use strict";var Mn=Object.defineProperty;var vr=m=>{
|
|
|
11
11
|
box-shadow 0.2s ease;}.item.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー200 */box-shadow:0 2px 6px rgba(0, 0, 0, 0.1);}.item.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー300 */}
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-xie82o {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
|
-
transform 0.1s ease;}.close-button.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-xie82o {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-xie82o {font-weight:500;color:var(--button1-border-color);}a.svelte-xie82o:hover {color:var(--button2-text-color);}`};function
|
|
14
|
+
transform 0.1s ease;}.close-button.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-xie82o {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-xie82o {font-weight:500;color:var(--button1-border-color);}a.svelte-xie82o:hover {color:var(--button2-text-color);}`};function de(t,e){Bt(e,!0),fe(t,yn);let r=vt(e,"text",7,""),n=vt(e,"handleClose",7);const o=c=>{r()===""&&r(`${document.title}
|
|
15
|
+
${window.location.href}`);const v=c.replace("{text}",encodeURIComponent(r()));console.log(v),window.open(v,"_blank","noreferrer"),n()()};var l=wn();l.__click=function(...c){var v;(v=n())==null||v.apply(this,c)};var s=It(l);s.__click=[$n];var i=It(s);i.__click=function(...c){var v;(v=n())==null||v.apply(this,c)};var u=Mt(i,4);return un(u,21,()=>bn,sn,(c,v)=>{var a=mn();a.__click=[xn,o,v];var d=It(a);Et(d,"width",24);var f=Mt(d);gt(a),le(()=>{Et(d,"src",D(v).icon),Et(d,"alt",D(v).name),nn(f,` ${D(v).name??""}`)}),rt(c,a)}),gt(u),Mr(2),gt(s),gt(l),rt(t,l),Yt({get text(){return r()},set text(c=""){r(c),Z()},get handleClose(){return n()},set handleClose(c){n(c),Z()}})}Qe(["click"]),customElements.define("nostr-share-dialog",ve(de,{text:{},handleClose:{}},[],[],!0));var En=rn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
15
16
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
16
17
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
17
18
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -26,19 +27,9 @@ var NostrShare=function(m){"use strict";var Mn=Object.defineProperty;var vr=m=>{
|
|
|
26
27
|
c-8.3-3.3-8.6-9.2-8.6-11.2c-0.4-23.1-34.5-25.9-64.5-20.1c-32.8,6.2,0.4,53.3,0.4,116v8.4c-0.1,3.1-2.5,5.6-5.6,5.6H57.7
|
|
27
28
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
28
29
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
29
|
-
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const
|
|
30
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function
|
|
31
|
-
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
32
|
-
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* ボタン全体の基本スタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup,
|
|
37
|
-
[data-nostr-share="nostr-share-mini"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;border:1px solid var(--button1-border-color);cursor:pointer;transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--icon-size);height:var(--icon-size);margin:auto;padding:4px;border-radius:50%;border:none;background-color:transparent;}
|
|
38
|
-
|
|
39
|
-
/* ボタンスタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup {padding:6px 16px;margin:4px;font-weight:bold;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-button"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-button"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
40
|
-
|
|
41
|
-
/* テキスト用スタイル */.nostrShare-text.svelte-1swpyup {margin-left:8px;font-size:medium;color:var(--button2-text-color);}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* グレー */box-shadow:0 0 6px rgba(0, 0, 0, 0.1);transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:active {background-color:#d1d5db;transform:scale(0.95);transition:all 0.2s ease-in-out;}
|
|
42
|
-
|
|
43
|
-
/* miniスタイル */[data-nostr-share="nostr-share-mini"].svelte-1swpyup {padding:2px 6px;margin:2px;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
44
|
-
/* テキスト用スタイル */.nostrShare-text-mini.svelte-1swpyup {margin-left:4px;font-size:small;font-weight:bold;color:var(--button2-text-color);}`};function fr(t,e){Kt(e,!0),pe(t,In);let r=L(e,"data-url",7),n=L(e,"data-text",7),o=L(e,"data-title",7),l=L(e,"data-type",7,"default"),s=L(e,"icon-size",7,28),i=L(e,"class",7),u=L(e,"data-style",7),f=Mr(!1);const _=()=>{Mt(f,!1)},a=typeof s()=="string"?parseInt(s(),10):s();let c=ae(()=>u()?"":l()==="icon"?"nostr-share-icon":l()==="mini"?"nostr-share-mini":"nostr-share-button");var v=Rn(),d=Me(v);d.__click=[Nn,f];var $=zt(d);hn($,e,"default",{},h=>{var x=On(),U=Me(x);{var E=O=>{me(O,{size:24})},T=O=>{var pt=ae(()=>l()==="icon"?a:28);me(O,{get size(){return M(pt)}})};_e(U,O=>{l()==="mini"?O(E):O(T,!1)})}var rt=jt(U,2);{var St=O=>{var pt=An();Ft(()=>ur(pt,`${(l()==="mini"?"nostrShare-text-mini":"nostrShare-text")??""} svelte-1swpyup`)),lt(O,pt)};_e(rt,O=>{l()!=="icon"&&O(St)})}lt(h,x)}),$t(d);var N=jt(d,2);{var C=h=>{be(h,{handleClose:_,get url(){return r()},get text(){return n()},get shareTitle(){return o()}})};_e(N,h=>{M(f)&&h(C)})}return Ft(()=>{ur(d,`${i()??""} svelte-1swpyup`),_t(d,"data-nostr-share",M(c)),_t(d,"style",u()||"")}),lt(t,v),Wt({get"data-url"(){return r()},set"data-url"(h){r(h),A()},get"data-text"(){return n()},set"data-text"(h){n(h),A()},get"data-title"(){return o()},set"data-title"(h){o(h),A()},get"data-type"(){return l()},set"data-type"(h="default"){l(h),A()},get"icon-size"(){return s()},set"icon-size"(h=28){s(h),A()},get class(){return i()},set class(h){i(h),A()},get"data-style"(){return u()},set"data-style"(h){u(h),A()}})}return rr(["click"]),customElements.define("nostr-share",ge(fr,{"data-url":{},"data-text":{},"data-title":{},"data-type":{},"icon-size":{},class:{},"data-style":{}},["default"],[],!0)),m.Dialog=be,m.NostrShare=fr,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),m}({});
|
|
30
|
+
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const kn={hash:"svelte-givlj7",code:`
|
|
31
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=vt(e,"size",7,28);var n=En();return le(()=>Et(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),rt(t,n),Yt({get size(){return r()},set size(o=28){r(o),Z()}})}ve(ar,{size:{}},[],[],!0);const Tn=(t,e)=>{Rt(e,!0)};var Cn=yt('<span part="text" class="svelte-1h3gn4x">Nostr</span>'),Sn=yt("<!> <!>",1),Nn=yt('<button part="button" class="svelte-1h3gn4x"><!></button> <!>',1);const An={hash:"svelte-1h3gn4x",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
32
|
+
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-active-color: #999999;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
33
|
+
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-active-color: #757575;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
34
|
+
}[part="button"].svelte-1h3gn4x {display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.5em;transition:all 0.1s ease-in-out;border-radius:8px;font-weight:bold;}[part="button"].svelte-1h3gn4x:active {transform:scale(0.98);}[data-nostr-share="default"].svelte-1h3gn4x {padding:6px 16px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="mini"].svelte-1h3gn4x {padding:2px 6px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="default"].svelte-1h3gn4x:hover,
|
|
35
|
+
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,An);let r=vt(e,"data-text",7),n=vt(e,"data-type",7,"default"),o=vt(e,"icon-size",7,28),l=Dr(!1);const s=()=>{Rt(l,!1)},i=typeof o()=="string"?parseInt(o(),10):o();var u=Nn(),c=Oe(u);c.__click=[Tn,l];var v=It(c);vn(v,e,"default",{},f=>{var h=Sn(),w=Oe(h),S=De(()=>n()==="icon"?i:28);ar(w,{get size(){return D(S)}});var C=Mt(w,2);{var _=x=>{var K=Cn();rt(x,K)};nr(C,x=>{n()!=="icon"&&x(_)})}rt(f,h)}),gt(c);var a=Mt(c,2);{var d=f=>{de(f,{handleClose:s,get text(){return r()}})};nr(a,f=>{D(l)&&f(d)})}return le(()=>Et(c,"data-nostr-share",n())),rt(t,u),Yt({get"data-text"(){return r()},set"data-text"(f){r(f),Z()},get"data-type"(){return n()},set"data-type"(f="default"){n(f),Z()},get"icon-size"(){return o()},set"icon-size"(f=28){o(f),Z()}})}return Qe(["click"]),customElements.define("nostr-share",ve(ur,{"data-text":{},"data-type":{},"icon-size":{}},["default"],[],!0)),b.Dialog=de,b.NostrShare=ur,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),b}({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(g,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(g=typeof globalThis<"u"?globalThis:g||self,$(g.NostrShare={}))})(this,function(g){"use strict";var Mn=Object.defineProperty;var vr=g=>{throw TypeError(g)};var Ln=(g,$,k)=>$ in g?Mn(g,$,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[$]=k;var P=(g,$,k)=>Ln(g,typeof $!="symbol"?$+"":$,k),dr=(g,$,k)=>$.has(g)||vr("Cannot "+k);var R=(g,$,k)=>(dr(g,$,"read from private field"),k?k.call(g):$.get(g)),$e=(g,$,k)=>$.has(g)?vr("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(g):$.set(g,k),xe=(g,$,k,Ct)=>(dr(g,$,"write to private field"),Ct?Ct.call(g,k):$.set(g,k),k);var X,z;const $="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add($);const k=1,Ct=2,hr=16,_r=8,pr=1,gr=2,ye="[",Zt="[!",Qt="]",gt={},br=Symbol(),mr=["touchstart","touchmove"];function $r(t){return mr.includes(t)}const we=!1;var Ee=Array.isArray,te=Array.from,Nt=Object.keys,At=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,xr=Object.getOwnPropertyDescriptors,yr=Object.getPrototypeOf;function wr(t){for(var e=0;e<t.length;e++)t[e]()}const j=2,ke=4,Rt=8,ee=16,q=32,lt=64,re=128,it=256,It=512,I=1024,Z=2048,bt=4096,H=8192,at=16384,Er=32768,ne=65536,kr=1<<19,Te=1<<20,Tr=Symbol("$state"),Se=Symbol("legacy props"),Sr=Symbol("");function Ce(t){return t===this.v}function Cr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Nr(t){return!Cr(t,this.v)}function Ar(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Or(){throw new Error("https://svelte.dev/e/hydration_failed")}function Rr(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ir(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Dr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ne=!1;function Dt(t,e){var r={f:0,v:t,reactions:null,equals:Ce,version:0};return r}function Mr(t){return Lr(Dt(t))}function oe(t,e=!1){const r=Dt(t);return e||(r.equals=Nr),r}function Lr(t){return w!==null&&w.f&j&&(B===null?Kr([t]):B.push(t)),t}function Mt(t,e){return w!==null&&Jr()&&w.f&(j|ee)&&(B===null||!B.includes(t))&&Dr(),Ae(t,e)}function Ae(t,e){return t.equals(e)||(t.v=e,t.version=Je(),Oe(t,Z),p!==null&&p.f&I&&!(p.f&q)&&(S!==null&&S.includes(t)?(J(p,Z),Gt(p)):tt===null?Wr([t]):tt.push(t))),e}function Oe(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var s=r[o],l=s.f;l&Z||(J(s,e),l&(I|it)&&(l&j?Oe(s,bt):Gt(s)))}}function se(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let b=!1;function Y(t){b=t}let m;function V(t){if(t===null)throw se(),gt;return m=t}function mt(){return V(K(m))}function $t(t){if(b){if(K(m)!==null)throw se(),gt;m=t}}function zr(t=1){if(b){for(var e=t,r=m;e--;)r=K(r);m=r}}function le(){for(var t=0,e=m;;){if(e.nodeType===8){var r=e.data;if(r===Qt){if(t===0)return e;t-=1}else(r===ye||r===Zt)&&(t+=1)}var n=K(e);e.remove(),e=n}}var Re,Ie,De;function ie(){if(Re===void 0){Re=window;var t=Element.prototype,e=Node.prototype;Ie=Ot(e,"firstChild").get,De=Ot(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Lt(t=""){return document.createTextNode(t)}function G(t){return Ie.call(t)}function K(t){return De.call(t)}function zt(t,e){if(!b)return G(t);var r=G(m);return r===null&&(r=m.appendChild(Lt())),V(r),r}function Me(t,e){if(!b){var r=G(t);return r instanceof Comment&&r.data===""?K(r):r}return m}function jt(t,e=1,r=!1){let n=b?m:t;for(var o;e--;)o=n,n=K(n);if(!b)return n;var s=n==null?void 0:n.nodeType;if(r&&s!==3){var l=Lt();return n===null?o==null||o.after(l):n.before(l),V(l),l}return V(n),n}function Le(t){t.textContent=""}function ae(t){var e=j|Z;p===null?e|=it:p.f|=Te;var r=w!==null&&w.f&j?w:null;const n={children:null,ctx:F,deps:null,equals:Ce,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function ze(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&j?ue(n):W(n)}}}function jr(t){for(var e=t.parent;e!==null;){if(!(e.f&j))return e;e=e.parent}return null}function je(t){var e,r=p;Q(jr(t));try{ze(t),e=Xe(t)}finally{Q(r)}return e}function Fe(t){var e=je(t),r=(ot||t.f&it)&&t.deps!==null?bt:I;J(t,r),t.equals(e)||(t.v=e,t.version=Je())}function ue(t){ze(t),kt(t,0),J(t,at),t.v=t.children=t.deps=t.ctx=t.reactions=null}function Fr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ut(t,e,r,n=!0){var o=(t<)!==0,s=p,l={ctx:F,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|Z,first:null,fn:e,last:null,next:null,parent:o?null:s,prev:null,teardown:null,transitions:null,version:0};if(r){var i=ct;try{Ke(!0),Yt(l),l.f|=Er}catch(_){throw W(l),_}finally{Ke(i)}}else e!==null&&Gt(l);var u=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&Te)===0;if(!u&&!o&&n&&(s!==null&&Fr(l,s),w!==null&&w.f&j)){var f=w;(f.children??(f.children=[])).push(l)}return l}function Pr(t){const e=ut(lt,t,!0);return()=>{W(e)}}function qr(t){const e=ut(lt,t,!0);return(r={})=>new Promise(n=>{r.outro?Pt(e,()=>{W(e),n(void 0)}):(W(e),n(void 0))})}function Hr(t){return ut(ke,t,!1)}function Vr(t){return ut(Rt,t,!0)}function Ft(t){return ce(t)}function ce(t,e=0){return ut(Rt|ee|e,t,!0)}function xt(t,e=!0){return ut(Rt|q,t,!0,e)}function Pe(t){var e=t.teardown;if(e!==null){const r=w;vt(null);try{e.call(null)}finally{vt(r)}}}function qe(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)ue(e[r])}}function He(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;W(r,e),r=n}}function Br(t){for(var e=t.first;e!==null;){var r=e.next;e.f&q||W(e),e=r}}function W(t,e=!0){var r=!1;if((e||t.f&kr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var s=n===o?null:K(n);n.remove(),n=s}r=!0}He(t,e&&!r),qe(t),kt(t,0),J(t,at);var l=t.transitions;if(l!==null)for(const u of l)u.stop();Pe(t);var i=t.parent;i!==null&&i.first!==null&&Ve(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Ve(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Pt(t,e){var r=[];fe(t,r,!0),Be(r,()=>{W(t),e&&e()})}function Be(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function fe(t,e,r){if(!(t.f&H)){if(t.f^=H,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&e.push(l);for(var n=t.first;n!==null;){var o=n.next,s=(n.f&ne)!==0||(n.f&q)!==0;fe(n,e,s?r:!1),n=o}}}function qt(t){Ue(t,!0)}function Ue(t,e){if(t.f&H){Et(t)&&Yt(t),t.f^=H;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&ne)!==0||(r.f&q)!==0;Ue(r,o?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}let Ht=!1,ve=[];function Ye(){Ht=!1;const t=ve.slice();ve=[],wr(t)}function Ur(t){Ht||(Ht=!0,queueMicrotask(Ye)),ve.push(t)}function Yr(){Ht&&Ye()}const Ge=0,Gr=1;let Vt=!1,Bt=Ge,yt=!1,wt=null,ct=!1;function Ke(t){ct=t}let nt=[],ft=0,zn=[],w=null;function vt(t){w=t}let p=null;function Q(t){p=t}let B=null;function Kr(t){B=t}let S=null,D=0,tt=null;function Wr(t){tt=t}let We=1,ot=!1,F=null;function Je(){return++We}function Jr(){return!Ne}function Et(t){var l,i;var e=t.f;if(e&Z)return!0;if(e&bt){var r=t.deps,n=(e&it)!==0;if(r!==null){var o;if(e&It){for(o=0;o<r.length;o++)((l=r[o]).reactions??(l.reactions=[])).push(t);t.f^=It}for(o=0;o<r.length;o++){var s=r[o];if(Et(s)&&Fe(s),n&&p!==null&&!ot&&!((i=s==null?void 0:s.reactions)!=null&&i.includes(t))&&(s.reactions??(s.reactions=[])).push(t),s.version>t.version)return!0}}(!n||p!==null&&!ot)&&J(t,I)}return!1}function Xr(t,e){for(var r=e;r!==null;){if(r.f&re)try{r.fn(t);return}catch{r.f^=re}r=r.parent}throw Vt=!1,t}function Zr(t){return(t.f&at)===0&&(t.parent===null||(t.parent.f&re)===0)}function Ut(t,e,r,n){if(Vt){if(r===null&&(Vt=!1),Zr(e))throw t;return}r!==null&&(Vt=!0);{Xr(t,e);return}}function Xe(t){var c;var e=S,r=D,n=tt,o=w,s=ot,l=B,i=F,u=t.f;S=null,D=0,tt=null,w=u&(q|lt)?null:t,ot=!ct&&(u&it)!==0,B=null,F=t.ctx;try{var f=(0,t.fn)(),_=t.deps;if(S!==null){var a;if(kt(t,D),_!==null&&D>0)for(_.length=D+S.length,a=0;a<S.length;a++)_[D+a]=S[a];else t.deps=_=S;if(!ot)for(a=D;a<_.length;a++)((c=_[a]).reactions??(c.reactions=[])).push(t)}else _!==null&&D<_.length&&(kt(t,D),_.length=D);return f}finally{S=e,D=r,tt=n,w=o,ot=s,B=l,F=i}}function Qr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&j&&(S===null||!S.includes(e))&&(J(e,bt),e.f&(it|It)||(e.f^=It),kt(e,0))}function kt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Qr(t,r[n])}function Yt(t){var e=t.f;if(!(e&at)){J(t,I);var r=p,n=F;p=t;try{e&ee?Br(t):He(t),qe(t),Pe(t);var o=Xe(t);t.teardown=typeof o=="function"?o:null,t.version=We}catch(s){Ut(s,t,r,n||t.ctx)}finally{p=r}}}function Ze(){if(ft>1e3){ft=0;try{Ar()}catch(t){if(wt!==null)Ut(t,wt,null);else throw t}}ft++}function Qe(t){var e=t.length;if(e!==0){Ze();var r=ct;ct=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&I||(o.f^=I);var s=[];tr(o,s),tn(s)}}finally{ct=r}}}function tn(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(at|H)))try{Et(n)&&(Yt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Ve(n):n.fn=null))}catch(o){Ut(o,n,null,n.ctx)}}}function en(){if(yt=!1,ft>1001)return;const t=nt;nt=[],Qe(t),yt||(ft=0,wt=null)}function Gt(t){Bt===Ge&&(yt||(yt=!0,queueMicrotask(en))),wt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(lt|q)){if(!(r&I))return;e.f^=I}}nt.push(e)}function tr(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,s=(o&q)!==0,l=s&&(o&I)!==0,i=r.next;if(!l&&!(o&H))if(o&Rt){if(s)r.f^=I;else try{Et(r)&&Yt(r)}catch(a){Ut(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&ke&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var f=a.next;if(f!==null){r=f;continue t}a=a.parent}}r=i}for(var _=0;_<n.length;_++)u=n[_],e.push(u),tr(u,e)}function A(t){var e=Bt,r=nt;try{Ze();const o=[];Bt=Gr,nt=o,yt=!1,Qe(r);var n=t==null?void 0:t();return Yr(),(nt.length>0||o.length>0)&&A(),ft=0,wt=null,n}finally{Bt=e,nt=r}}function M(t){var _;var e=t.f,r=(e&j)!==0;if(r&&e&at){var n=je(t);return ue(t),n}if(w!==null){B!==null&&B.includes(t)&&Ir();var o=w.deps;S===null&&o!==null&&o[D]===t?D++:S===null?S=[t]:S.push(t),tt!==null&&p!==null&&p.f&I&&!(p.f&q)&&tt.includes(t)&&(J(p,Z),Gt(p))}else if(r&&t.deps===null)for(var s=t,l=s.parent,i=s;l!==null;)if(l.f&j){var u=l;i=u,l=u.parent}else{var f=l;(_=f.deriveds)!=null&&_.includes(i)||(f.deriveds??(f.deriveds=[])).push(i);break}return r&&(s=t,Et(s)&&Fe(s)),t.v}function rn(t){const e=w;try{return w=null,t()}finally{w=e}}const nn=~(Z|bt|I);function J(t,e){t.f=t.f&nn|e}function Kt(t,e=!1,r){F={p:F,c:null,e:null,m:!1,s:t,x:null,l:null}}function Wt(t){const e=F;if(e!==null){t!==void 0&&(e.x=t);const l=e.e;if(l!==null){var r=p,n=w;e.e=null;try{for(var o=0;o<l.length;o++){var s=l[o];Q(s.effect),vt(s.reaction),Hr(s.fn)}}finally{Q(r),vt(n)}}F=e.p,e.m=!0}return t||{}}const er=new Set,de=new Set;function rr(t){for(var e=0;e<t.length;e++)er.add(t[e]);for(var r of de)r(t)}function Jt(t){var h;var e=this,r=e.ownerDocument,n=t.type,o=((h=t.composedPath)==null?void 0:h.call(t))||[],s=o[0]||t.target,l=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var f=o.indexOf(e);if(f===-1)return;u<=f&&(l=u)}if(s=o[l]||t.target,s!==e){At(t,"currentTarget",{configurable:!0,get(){return s||r}});var _=w,a=p;vt(null),Q(null);try{for(var c,v=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var x=s["__"+n];if(x!==void 0&&!s.disabled)if(Ee(x)){var[N,...C]=x;N.apply(s,[t,...C])}else x.call(s,t)}catch(y){c?v.push(y):c=y}if(t.cancelBubble||d===e||d===null)break;s=d}if(c){for(let y of v)queueMicrotask(()=>{throw y});throw c}}finally{t.__root=e,delete t.currentTarget,vt(_),Q(a)}}}function nr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function dt(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Tt(t,e){var r=(e&pr)!==0,n=(e&gr)!==0,o,s=!t.startsWith("<!>");return()=>{if(b)return dt(m,null),m;o===void 0&&(o=nr(s?t:"<!>"+t),r||(o=G(o)));var l=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=G(l),u=l.lastChild;dt(i,u)}else dt(l,l);return l}}function on(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,s;return()=>{if(b)return dt(m,null),m;if(!s){var l=nr(o),i=G(l);s=G(i)}var u=s.cloneNode(!0);return dt(u,u),u}}function st(t,e){if(b){p.nodes_end=m,mt();return}t!==null&&t.before(e)}function sn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function or(t,e){return sr(t,e)}function ln(t,e){ie(),e.intro=e.intro??!1;const r=e.target,n=b,o=m;try{for(var s=G(r);s&&(s.nodeType!==8||s.data!==ye);)s=K(s);if(!s)throw gt;Y(!0),V(s),mt();const l=sr(t,{...e,anchor:s});if(m===null||m.nodeType!==8||m.data!==Qt)throw se(),gt;return Y(!1),l}catch(l){if(l===gt)return e.recover===!1&&Or(),ie(),Le(r),Y(!1),or(t,e);throw l}finally{Y(n),V(o)}}const ht=new Map;function sr(t,{target:e,anchor:r,props:n={},events:o,context:s,intro:l=!0}){ie();var i=new Set,u=a=>{for(var c=0;c<a.length;c++){var v=a[c];if(!i.has(v)){i.add(v);var d=$r(v);e.addEventListener(v,Jt,{passive:d});var x=ht.get(v);x===void 0?(document.addEventListener(v,Jt,{passive:d}),ht.set(v,1)):ht.set(v,x+1)}}};u(te(er)),de.add(u);var f=void 0,_=qr(()=>{var a=r??e.appendChild(Lt());return xt(()=>{if(s){Kt({});var c=F;c.c=s}o&&(n.$$events=o),b&&dt(a,null),f=t(a,n)||{},b&&(p.nodes_end=m),s&&Wt()}),()=>{var d;for(var c of i){e.removeEventListener(c,Jt);var v=ht.get(c);--v===0?(document.removeEventListener(c,Jt),ht.delete(c)):ht.set(c,v)}de.delete(u),a!==r&&((d=a.parentNode)==null||d.removeChild(a))}});return he.set(f,_),f}let he=new WeakMap;function an(t,e){const r=he.get(t);return r?(he.delete(t),r(e)):Promise.resolve()}function _e(t,e,r=!1){b&&mt();var n=t,o=null,s=null,l=br,i=r?ne:0,u=!1;const f=(a,c=!0)=>{u=!0,_(c,a)},_=(a,c)=>{if(l===(l=a))return;let v=!1;if(b){const d=n.data===Zt;!!l===d&&(n=le(),V(n),Y(!1),v=!0)}l?(o?qt(o):c&&(o=xt(()=>c(n))),s&&Pt(s,()=>{s=null})):(s?qt(s):c&&(s=xt(()=>c(n))),o&&Pt(o,()=>{o=null})),v&&Y(!0)};ce(()=>{u=!1,e(f),u||_(null,null)},i),b&&(n=m)}function un(t,e){return e}function cn(t,e,r,n){for(var o=[],s=e.length,l=0;l<s;l++)fe(e[l].e,o,!0);var i=s>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Le(u),u.append(r),n.clear(),et(t,e[0].prev,e[s-1].next)}Be(o,()=>{for(var f=0;f<s;f++){var _=e[f];i||(n.delete(_.k),et(t,_.prev,_.next)),W(_.e,!i)}})}function fn(t,e,r,n,o,s=null){var l=t,i={flags:e,items:new Map,first:null};{var u=t;l=b?V(G(u)):u.appendChild(Lt())}b&&mt();var f=null,_=!1;ce(()=>{var a=r(),c=Ee(a)?a:a==null?[]:te(a),v=c.length;if(_&&v===0)return;_=v===0;let d=!1;if(b){var x=l.data===Zt;x!==(v===0)&&(l=le(),V(l),Y(!1),d=!0)}if(b){for(var N=null,C,h=0;h<v;h++){if(m.nodeType===8&&m.data===Qt){l=m,d=!0,Y(!1);break}var y=c[h],U=n(y,h);C=lr(m,i,N,null,y,U,h,o,e),i.items.set(U,C),N=C}v>0&&V(le())}if(!b){var E=w;vn(c,i,l,o,e,(E.f&H)!==0,n)}s!==null&&(v===0?f?qt(f):f=xt(()=>s(l)):f!==null&&Pt(f,()=>{f=null})),d&&Y(!0)}),b&&(l=m)}function vn(t,e,r,n,o,s,l,i){var u=t.length,f=e.items,_=e.first,a=_,c,v=null,d=[],x=[],N,C,h,y;for(y=0;y<u;y+=1){if(N=t[y],C=l(N,y),h=f.get(C),h===void 0){var U=a?a.e.nodes_start:r;v=lr(U,e,v,v===null?e.first:v.next,N,C,y,n,o),f.set(C,v),d=[],x=[],a=v.next;continue}if(dn(h,N,y),h.e.f&H&&qt(h.e),h!==a){if(c!==void 0&&c.has(h)){if(d.length<x.length){var E=x[0],T;v=E.prev;var rt=d[0],St=d[d.length-1];for(T=0;T<d.length;T+=1)ir(d[T],E,r);for(T=0;T<x.length;T+=1)c.delete(x[T]);et(e,rt.prev,St.next),et(e,v,rt),et(e,St,E),a=E,v=St,y-=1,d=[],x=[]}else c.delete(h),ir(h,a,r),et(e,h.prev,h.next),et(e,h,v===null?e.first:v.next),et(e,v,h),v=h;continue}for(d=[],x=[];a!==null&&a.k!==C;)(s||!(a.e.f&H))&&(c??(c=new Set)).add(a),x.push(a),a=a.next;if(a===null)continue;h=a}d.push(h),v=h,a=h.next}if(a!==null||c!==void 0){for(var O=c===void 0?[]:te(c);a!==null;)(s||!(a.e.f&H))&&O.push(a),a=a.next;var pt=O.length;if(pt>0){var Dn=u===0?r:null;cn(e,O,Dn,f)}}p.first=e.first&&e.first.e,p.last=v&&v.e}function dn(t,e,r,n){Ae(t.v,e),t.i=r}function lr(t,e,r,n,o,s,l,i,u,f){var _=(u&k)!==0,a=(u&hr)===0,c=_?a?oe(o):Dt(o):o,v=u&Ct?Dt(l):l,d={i:v,v:c,k:s,a:null,e:null,prev:r,next:n};try{return d.e=xt(()=>i(t,c,v),b),d.e.prev=r&&r.e,d.e.next=n&&n.e,r===null?e.first=d:(r.next=d,r.e.next=d.e),n!==null&&(n.prev=d,n.e.prev=d.e),d}finally{}}function ir(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==n;){var l=K(s);o.before(s),s=l}}function et(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function hn(t,e,r,n,o){var i;b&&mt();var s=(i=e.$$slots)==null?void 0:i[r],l=!1;s===!0&&(s=e.children,l=!0),s===void 0?o!==null&&o(t):s(t,l?()=>n:n)}function pe(t,e){Ur(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function _t(t,e,r,n){var o=t.__attributes??(t.__attributes={});b&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[Sr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&_n(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var ar=new Map;function _n(t){var e=ar.get(t.nodeName);if(e)return e;ar.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=xr(n);for(var s in r)r[s].set&&e.push(s);n=yr(n)}return e}function ur(t,e){var r=t.__className,n=pn(e);b&&t.className===n?t.__className=n:(r!==n||b&&t.className!==n)&&(e==null?t.removeAttribute("class"):t.className=n,t.__className=n)}function pn(t){return t??""}function gn(t){for(var e=p,r=p;e!==null&&!(e.f&(q|lt));)e=e.parent;try{return Q(e),t()}finally{Q(r)}}function L(t,e,r,n){var U;var o=!Ne,s=(r&_r)!==0,l=!1,i;i=t[e];var u=Tr in t||Se in t,f=((U=Ot(t,e))==null?void 0:U.set)??(u&&s&&e in t?E=>t[e]=E:void 0),_=n,a=!0,c=!1,v=()=>(c=!0,a&&(a=!1,_=n),_);i===void 0&&n!==void 0&&(f&&o&&Rr(),i=v(),f&&f(i));var d;if(d=()=>{var E=t[e];return E===void 0?v():(a=!0,c=!1,E)},f){var x=t.$$legacy;return function(E,T){return arguments.length>0?((!T||x||l)&&f(T?d():E),E):d()}}var N=!1,C=!1,h=oe(i),y=gn(()=>ae(()=>{var E=d(),T=M(h);return N?(N=!1,C=!0,T):(C=!1,h.v=E)}));return function(E,T){if(arguments.length>0){const rt=T?M(y):E;return y.equals(rt)||(N=!0,Mt(h,rt),c&&_!==void 0&&(_=rt),rn(()=>M(y))),E}return M(y)}}function bn(t){return new mn(t)}class mn{constructor(e){$e(this,X);$e(this,z);var s;var r=new Map,n=(l,i)=>{var u=oe(i);return r.set(l,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(l,i){return M(r.get(i)??n(i,Reflect.get(l,i)))},has(l,i){return i===Se?!0:(M(r.get(i)??n(i,Reflect.get(l,i))),Reflect.has(l,i))},set(l,i,u){return Mt(r.get(i)??n(i,u),u),Reflect.set(l,i,u)}});xe(this,z,(e.hydrate?ln:or)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&A(),xe(this,X,o.$$events);for(const l of Object.keys(R(this,z)))l==="$set"||l==="$destroy"||l==="$on"||At(this,l,{get(){return R(this,z)[l]},set(i){R(this,z)[l]=i},enumerable:!0});R(this,z).$set=l=>{Object.assign(o,l)},R(this,z).$destroy=()=>{an(R(this,z))}}$set(e){R(this,z).$set(e)}$on(e,r){R(this,X)[e]=R(this,X)[e]||[];const n=(...o)=>r.call(this,...o);return R(this,X)[e].push(n),()=>{R(this,X)[e]=R(this,X)[e].filter(o=>o!==n)}}$destroy(){R(this,z).$destroy()}}X=new WeakMap,z=new WeakMap;let cr;typeof HTMLElement=="function"&&(cr=class extends HTMLElement{constructor(e,r,n){super();P(this,"$$ctor");P(this,"$$s");P(this,"$$c");P(this,"$$cn",!1);P(this,"$$d",{});P(this,"$$r",!1);P(this,"$$p_d",{});P(this,"$$l",{});P(this,"$$l_u",new Map);P(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return s=>{const l=document.createElement("slot");o!=="default"&&(l.name=o),st(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=$n(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=Xt(s,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=bn({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=Pr(()=>{Vr(()=>{var o;this.$$r=!0;for(const s of Nt(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];const l=Xt(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const o in this.$$l)for(const s of this.$$l[o]){const l=this.$$c.$on(o,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Nt(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Xt(t,e,r,n){var s;const o=(s=r[t])==null?void 0:s.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function $n(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ge(t,e,r,n,o,s){let l=class extends cr{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Nt(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Nt(e).forEach(i=>{At(l.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Xt(i,u,e),this.$$d[i]=u;var f=this.$$c;if(f){var _=(a=Ot(f,i))==null?void 0:a.get;_?f[i]=u:f.$set({[i]:u})}}})}),n.forEach(i=>{At(l.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=l,l}const xn=[{name:"nostter",url:"https://nostter.app/post?text={text}&url={url}&title={title}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?url={url}&text={text}&title={title}",icon:"https://lumilumi.app/favicon.ico"}];var yn=t=>t.stopPropagation(),wn=(t,e,r)=>e(M(r).url),En=Tt('<button class="item svelte-xie82o"><img> </button>'),kn=Tt('<div class="overlay svelte-xie82o"><div class="inner svelte-xie82o"><button class="close-button svelte-xie82o" aria-label="Close">✖</button> <h2 class="title svelte-xie82o">Select Share Client</h2> <div class="list svelte-xie82o"></div> <div class="footer svelte-xie82o"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-xie82o">nostr-share-component</a></div></div></div>');const Tn={hash:"svelte-xie82o",code:`
|
|
1
|
+
(function(g,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(g=typeof globalThis<"u"?globalThis:g||self,$(g.NostrShare={}))})(this,function(g){"use strict";var Dn=Object.defineProperty;var cr=g=>{throw TypeError(g)};var In=(g,$,k)=>$ in g?Dn(g,$,{enumerable:!0,configurable:!0,writable:!0,value:k}):g[$]=k;var z=(g,$,k)=>In(g,typeof $!="symbol"?$+"":$,k),fr=(g,$,k)=>$.has(g)||cr("Cannot "+k);var A=(g,$,k)=>(fr(g,$,"read from private field"),k?k.call(g):$.get(g)),pe=(g,$,k)=>$.has(g)?cr("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(g):$.set(g,k),ge=(g,$,k,kt)=>(fr(g,$,"write to private field"),kt?kt.call(g,k):$.set(g,k),k);var G,I;const $="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add($);const k=1,kt=2,vr=16,dr=8,hr=1,_r=2,be="[",Kt="[!",Wt="]",ht={},pr=Symbol(),gr=["touchstart","touchmove"];function br(t){return gr.includes(t)}const $e=!1;var xe=Array.isArray,Jt=Array.from,Tt=Object.keys,Ct=Object.defineProperty,St=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,xr=Object.getPrototypeOf;function mr(t){for(var e=0;e<t.length;e++)t[e]()}const M=2,me=4,Nt=8,Xt=16,j=32,nt=64,Zt=128,ot=256,At=512,O=1024,W=2048,_t=4096,F=8192,lt=16384,yr=32768,Qt=65536,wr=1<<19,ye=1<<20,Er=Symbol("$state"),we=Symbol("legacy props"),kr=Symbol("");function Ee(t){return t===this.v}function Tr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Cr(t){return!Tr(t,this.v)}function Sr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ar(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Or(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function Rr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ke=!1;function Ot(t,e){var r={f:0,v:t,reactions:null,equals:Ee,version:0};return r}function Dr(t){return Ir(Ot(t))}function te(t,e=!1){const r=Ot(t);return e||(r.equals=Cr),r}function Ir(t){return y!==null&&y.f&M&&(q===null?Ur([t]):q.push(t)),t}function Rt(t,e){return y!==null&&Kr()&&y.f&(M|Xt)&&(q===null||!q.includes(t))&&Rr(),Te(t,e)}function Te(t,e){return t.equals(e)||(t.v=e,t.version=Ge(),Ce(t,W),p!==null&&p.f&O&&!(p.f&j)&&(T!==null&&T.includes(t)?(U(p,W),Vt(p)):X===null?Gr([t]):X.push(t))),e}function Ce(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,o=0;o<n;o++){var l=r[o],s=l.f;s&W||(U(l,e),s&(O|ot)&&(s&M?Ce(l,_t):Vt(l)))}}function ee(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let x=!1;function H(t){x=t}let b;function P(t){if(t===null)throw ee(),ht;return b=t}function pt(){return P(B(b))}function gt(t){if(x){if(B(b)!==null)throw ee(),ht;b=t}}function Mr(t=1){if(x){for(var e=t,r=b;e--;)r=B(r);b=r}}function re(){for(var t=0,e=b;;){if(e.nodeType===8){var r=e.data;if(r===Wt){if(t===0)return e;t-=1}else(r===be||r===Kt)&&(t+=1)}var n=B(e);e.remove(),e=n}}var Se,Ne,Ae;function ne(){if(Se===void 0){Se=window;var t=Element.prototype,e=Node.prototype;Ne=St(e,"firstChild").get,Ae=St(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Dt(t=""){return document.createTextNode(t)}function V(t){return Ne.call(t)}function B(t){return Ae.call(t)}function It(t,e){if(!x)return V(t);var r=V(b);return r===null&&(r=b.appendChild(Dt())),P(r),r}function Oe(t,e){if(!x){var r=V(t);return r instanceof Comment&&r.data===""?B(r):r}return b}function Mt(t,e=1,r=!1){let n=x?b:t;for(var o;e--;)o=n,n=B(n);if(!x)return n;var l=n==null?void 0:n.nodeType;if(r&&l!==3){var s=Dt();return n===null?o==null||o.after(s):n.before(s),P(s),s}return P(n),n}function Re(t){t.textContent=""}function De(t){var e=M|W;p===null?e|=ot:p.f|=ye;var r=y!==null&&y.f&M?y:null;const n={children:null,ctx:L,deps:null,equals:Ee,f:e,fn:t,reactions:null,v:null,version:0,parent:r??p};return r!==null&&(r.children??(r.children=[])).push(n),n}function Ie(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&M?oe(n):Y(n)}}}function Lr(t){for(var e=t.parent;e!==null;){if(!(e.f&M))return e;e=e.parent}return null}function Me(t){var e,r=p;J(Lr(t));try{Ie(t),e=Ke(t)}finally{J(r)}return e}function Le(t){var e=Me(t),r=(et||t.f&ot)&&t.deps!==null?_t:O;U(t,r),t.equals(e)||(t.v=e,t.version=Ge())}function oe(t){Ie(t),yt(t,0),U(t,lt),t.v=t.children=t.deps=t.ctx=t.reactions=null}function zr(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function st(t,e,r,n=!0){var o=(t&nt)!==0,l=p,s={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|W,first:null,fn:e,last:null,next:null,parent:o?null:l,prev:null,teardown:null,transitions:null,version:0};if(r){var i=it;try{Ye(!0),Ht(s),s.f|=yr}catch(v){throw Y(s),v}finally{Ye(i)}}else e!==null&&Vt(s);var u=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&ye)===0;if(!u&&!o&&n&&(l!==null&&zr(s,l),y!==null&&y.f&M)){var c=y;(c.children??(c.children=[])).push(s)}return s}function jr(t){const e=st(nt,t,!0);return()=>{Y(e)}}function Fr(t){const e=st(nt,t,!0);return(r={})=>new Promise(n=>{r.outro?Lt(e,()=>{Y(e),n(void 0)}):(Y(e),n(void 0))})}function Pr(t){return st(me,t,!1)}function qr(t){return st(Nt,t,!0)}function le(t){return se(t)}function se(t,e=0){return st(Nt|Xt|e,t,!0)}function bt(t,e=!0){return st(Nt|j,t,!0,e)}function ze(t){var e=t.teardown;if(e!==null){const r=y;ut(null);try{e.call(null)}finally{ut(r)}}}function je(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)oe(e[r])}}function Fe(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;Y(r,e),r=n}}function Hr(t){for(var e=t.first;e!==null;){var r=e.next;e.f&j||Y(e),e=r}}function Y(t,e=!0){var r=!1;if((e||t.f&wr)&&t.nodes_start!==null){for(var n=t.nodes_start,o=t.nodes_end;n!==null;){var l=n===o?null:B(n);n.remove(),n=l}r=!0}Fe(t,e&&!r),je(t),yt(t,0),U(t,lt);var s=t.transitions;if(s!==null)for(const u of s)u.stop();ze(t);var i=t.parent;i!==null&&i.first!==null&&Pe(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Pe(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Lt(t,e){var r=[];ie(t,r,!0),qe(r,()=>{Y(t),e&&e()})}function qe(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var o of t)o.out(n)}else e()}function ie(t,e,r){if(!(t.f&F)){if(t.f^=F,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var o=n.next,l=(n.f&Qt)!==0||(n.f&j)!==0;ie(n,e,l?r:!1),n=o}}}function zt(t){He(t,!0)}function He(t,e){if(t.f&F){mt(t)&&Ht(t),t.f^=F;for(var r=t.first;r!==null;){var n=r.next,o=(r.f&Qt)!==0||(r.f&j)!==0;He(r,o?e:!1),r=n}if(t.transitions!==null)for(const l of t.transitions)(l.is_global||e)&&l.in()}}let jt=!1,ae=[];function Ve(){jt=!1;const t=ae.slice();ae=[],mr(t)}function Vr(t){jt||(jt=!0,queueMicrotask(Ve)),ae.push(t)}function Br(){jt&&Ve()}const Be=0,Yr=1;let Ft=!1,Pt=Be,$t=!1,xt=null,it=!1;function Ye(t){it=t}let tt=[],at=0,Mn=[],y=null;function ut(t){y=t}let p=null;function J(t){p=t}let q=null;function Ur(t){q=t}let T=null,R=0,X=null;function Gr(t){X=t}let Ue=1,et=!1,L=null;function Ge(){return++Ue}function Kr(){return!ke}function mt(t){var s,i;var e=t.f;if(e&W)return!0;if(e&_t){var r=t.deps,n=(e&ot)!==0;if(r!==null){var o;if(e&At){for(o=0;o<r.length;o++)((s=r[o]).reactions??(s.reactions=[])).push(t);t.f^=At}for(o=0;o<r.length;o++){var l=r[o];if(mt(l)&&Le(l),n&&p!==null&&!et&&!((i=l==null?void 0:l.reactions)!=null&&i.includes(t))&&(l.reactions??(l.reactions=[])).push(t),l.version>t.version)return!0}}(!n||p!==null&&!et)&&U(t,O)}return!1}function Wr(t,e){for(var r=e;r!==null;){if(r.f&Zt)try{r.fn(t);return}catch{r.f^=Zt}r=r.parent}throw Ft=!1,t}function Jr(t){return(t.f<)===0&&(t.parent===null||(t.parent.f&Zt)===0)}function qt(t,e,r,n){if(Ft){if(r===null&&(Ft=!1),Jr(e))throw t;return}r!==null&&(Ft=!0);{Wr(t,e);return}}function Ke(t){var d;var e=T,r=R,n=X,o=y,l=et,s=q,i=L,u=t.f;T=null,R=0,X=null,y=u&(j|nt)?null:t,et=!it&&(u&ot)!==0,q=null,L=t.ctx;try{var c=(0,t.fn)(),v=t.deps;if(T!==null){var a;if(yt(t,R),v!==null&&R>0)for(v.length=R+T.length,a=0;a<T.length;a++)v[R+a]=T[a];else t.deps=v=T;if(!et)for(a=R;a<v.length;a++)((d=v[a]).reactions??(d.reactions=[])).push(t)}else v!==null&&R<v.length&&(yt(t,R),v.length=R);return c}finally{T=e,R=r,X=n,y=o,et=l,q=s,L=i}}function Xr(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var o=r.length-1;o===0?r=e.reactions=null:(r[n]=r[o],r.pop())}}r===null&&e.f&M&&(T===null||!T.includes(e))&&(U(e,_t),e.f&(ot|At)||(e.f^=At),yt(e,0))}function yt(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Xr(t,r[n])}function Ht(t){var e=t.f;if(!(e<)){U(t,O);var r=p,n=L;p=t;try{e&Xt?Hr(t):Fe(t),je(t),ze(t);var o=Ke(t);t.teardown=typeof o=="function"?o:null,t.version=Ue}catch(l){qt(l,t,r,n||t.ctx)}finally{p=r}}}function We(){if(at>1e3){at=0;try{Sr()}catch(t){if(xt!==null)qt(t,xt,null);else throw t}}at++}function Je(t){var e=t.length;if(e!==0){We();var r=it;it=!0;try{for(var n=0;n<e;n++){var o=t[n];o.f&O||(o.f^=O);var l=[];Xe(o,l),Zr(l)}}finally{it=r}}}function Zr(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];if(!(n.f&(lt|F)))try{mt(n)&&(Ht(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Pe(n):n.fn=null))}catch(o){qt(o,n,null,n.ctx)}}}function Qr(){if($t=!1,at>1001)return;const t=tt;tt=[],Je(t),$t||(at=0,xt=null)}function Vt(t){Pt===Be&&($t||($t=!0,queueMicrotask(Qr))),xt=t;for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(nt|j)){if(!(r&O))return;e.f^=O}}tt.push(e)}function Xe(t,e){var r=t.first,n=[];t:for(;r!==null;){var o=r.f,l=(o&j)!==0,s=l&&(o&O)!==0,i=r.next;if(!s&&!(o&F))if(o&Nt){if(l)r.f^=O;else try{mt(r)&&Ht(r)}catch(a){qt(a,r,null,r.ctx)}var u=r.first;if(u!==null){r=u;continue}}else o&me&&n.push(r);if(i===null){let a=r.parent;for(;a!==null;){if(t===a)break t;var c=a.next;if(c!==null){r=c;continue t}a=a.parent}}r=i}for(var v=0;v<n.length;v++)u=n[v],e.push(u),Xe(u,e)}function Z(t){var e=Pt,r=tt;try{We();const o=[];Pt=Yr,tt=o,$t=!1,Je(r);var n=t==null?void 0:t();return Br(),(tt.length>0||o.length>0)&&Z(),at=0,xt=null,n}finally{Pt=e,tt=r}}function D(t){var v;var e=t.f,r=(e&M)!==0;if(r&&e<){var n=Me(t);return oe(t),n}if(y!==null){q!==null&&q.includes(t)&&Or();var o=y.deps;T===null&&o!==null&&o[R]===t?R++:T===null?T=[t]:T.push(t),X!==null&&p!==null&&p.f&O&&!(p.f&j)&&X.includes(t)&&(U(p,W),Vt(p))}else if(r&&t.deps===null)for(var l=t,s=l.parent,i=l;s!==null;)if(s.f&M){var u=s;i=u,s=u.parent}else{var c=s;(v=c.deriveds)!=null&&v.includes(i)||(c.deriveds??(c.deriveds=[])).push(i);break}return r&&(l=t,mt(l)&&Le(l)),t.v}function tn(t){const e=y;try{return y=null,t()}finally{y=e}}const en=~(W|_t|O);function U(t,e){t.f=t.f&en|e}function Bt(t,e=!1,r){L={p:L,c:null,e:null,m:!1,s:t,x:null,l:null}}function Yt(t){const e=L;if(e!==null){t!==void 0&&(e.x=t);const s=e.e;if(s!==null){var r=p,n=y;e.e=null;try{for(var o=0;o<s.length;o++){var l=s[o];J(l.effect),ut(l.reaction),Pr(l.fn)}}finally{J(r),ut(n)}}L=e.p,e.m=!0}return t||{}}const Ze=new Set,ue=new Set;function Qe(t){for(var e=0;e<t.length;e++)Ze.add(t[e]);for(var r of ue)r(t)}function Ut(t){var _;var e=this,r=e.ownerDocument,n=t.type,o=((_=t.composedPath)==null?void 0:_.call(t))||[],l=o[0]||t.target,s=0,i=t.__root;if(i){var u=o.indexOf(i);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var c=o.indexOf(e);if(c===-1)return;u<=c&&(s=u)}if(l=o[s]||t.target,l!==e){Ct(t,"currentTarget",{configurable:!0,get(){return l||r}});var v=y,a=p;ut(null),J(null);try{for(var d,f=[];l!==null;){var h=l.assignedSlot||l.parentNode||l.host||null;try{var w=l["__"+n];if(w!==void 0&&!l.disabled)if(xe(w)){var[S,...C]=w;S.apply(l,[t,...C])}else w.call(l,t)}catch(m){d?f.push(m):d=m}if(t.cancelBubble||h===e||h===null)break;l=h}if(d){for(let m of f)queueMicrotask(()=>{throw m});throw d}}finally{t.__root=e,delete t.currentTarget,ut(v),J(a)}}}function tr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function ct(t,e){var r=p;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function wt(t,e){var r=(e&hr)!==0,n=(e&_r)!==0,o,l=!t.startsWith("<!>");return()=>{if(x)return ct(b,null),b;o===void 0&&(o=tr(l?t:"<!>"+t),r||(o=V(o)));var s=n?document.importNode(o,!0):o.cloneNode(!0);if(r){var i=V(s),u=s.lastChild;ct(i,u)}else ct(s,s);return s}}function rn(t,e,r="svg"){var n=!t.startsWith("<!>"),o=`<${r}>${n?t:"<!>"+t}</${r}>`,l;return()=>{if(x)return ct(b,null),b;if(!l){var s=tr(o),i=V(s);l=V(i)}var u=l.cloneNode(!0);return ct(u,u),u}}function rt(t,e){if(x){p.nodes_end=b,pt();return}t!==null&&t.before(e)}function nn(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function er(t,e){return rr(t,e)}function on(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=x,o=b;try{for(var l=V(r);l&&(l.nodeType!==8||l.data!==be);)l=B(l);if(!l)throw ht;H(!0),P(l),pt();const s=rr(t,{...e,anchor:l});if(b===null||b.nodeType!==8||b.data!==Wt)throw ee(),ht;return H(!1),s}catch(s){if(s===ht)return e.recover===!1&&Nr(),ne(),Re(r),H(!1),er(t,e);throw s}finally{H(n),P(o)}}const ft=new Map;function rr(t,{target:e,anchor:r,props:n={},events:o,context:l,intro:s=!0}){ne();var i=new Set,u=a=>{for(var d=0;d<a.length;d++){var f=a[d];if(!i.has(f)){i.add(f);var h=br(f);e.addEventListener(f,Ut,{passive:h});var w=ft.get(f);w===void 0?(document.addEventListener(f,Ut,{passive:h}),ft.set(f,1)):ft.set(f,w+1)}}};u(Jt(Ze)),ue.add(u);var c=void 0,v=Fr(()=>{var a=r??e.appendChild(Dt());return bt(()=>{if(l){Bt({});var d=L;d.c=l}o&&(n.$$events=o),x&&ct(a,null),c=t(a,n)||{},x&&(p.nodes_end=b),l&&Yt()}),()=>{var h;for(var d of i){e.removeEventListener(d,Ut);var f=ft.get(d);--f===0?(document.removeEventListener(d,Ut),ft.delete(d)):ft.set(d,f)}ue.delete(u),a!==r&&((h=a.parentNode)==null||h.removeChild(a))}});return ce.set(c,v),c}let ce=new WeakMap;function ln(t,e){const r=ce.get(t);return r?(ce.delete(t),r(e)):Promise.resolve()}function nr(t,e,r=!1){x&&pt();var n=t,o=null,l=null,s=pr,i=r?Qt:0,u=!1;const c=(a,d=!0)=>{u=!0,v(d,a)},v=(a,d)=>{if(s===(s=a))return;let f=!1;if(x){const h=n.data===Kt;!!s===h&&(n=re(),P(n),H(!1),f=!0)}s?(o?zt(o):d&&(o=bt(()=>d(n))),l&&Lt(l,()=>{l=null})):(l?zt(l):d&&(l=bt(()=>d(n))),o&&Lt(o,()=>{o=null})),f&&H(!0)};se(()=>{u=!1,e(c),u||v(null,null)},i),x&&(n=b)}function sn(t,e){return e}function an(t,e,r,n){for(var o=[],l=e.length,s=0;s<l;s++)ie(e[s].e,o,!0);var i=l>0&&o.length===0&&r!==null;if(i){var u=r.parentNode;Re(u),u.append(r),n.clear(),Q(t,e[0].prev,e[l-1].next)}qe(o,()=>{for(var c=0;c<l;c++){var v=e[c];i||(n.delete(v.k),Q(t,v.prev,v.next)),Y(v.e,!i)}})}function un(t,e,r,n,o,l=null){var s=t,i={flags:e,items:new Map,first:null};{var u=t;s=x?P(V(u)):u.appendChild(Dt())}x&&pt();var c=null,v=!1;se(()=>{var a=r(),d=xe(a)?a:a==null?[]:Jt(a),f=d.length;if(v&&f===0)return;v=f===0;let h=!1;if(x){var w=s.data===Kt;w!==(f===0)&&(s=re(),P(s),H(!1),h=!0)}if(x){for(var S=null,C,_=0;_<f;_++){if(b.nodeType===8&&b.data===Wt){s=b,h=!0,H(!1);break}var m=d[_],K=n(m,_);C=or(b,i,S,null,m,K,_,o,e),i.items.set(K,C),S=C}f>0&&P(re())}if(!x){var E=y;cn(d,i,s,o,e,(E.f&F)!==0,n)}l!==null&&(f===0?c?zt(c):c=bt(()=>l(s)):c!==null&&Lt(c,()=>{c=null})),h&&H(!0)}),x&&(s=b)}function cn(t,e,r,n,o,l,s,i){var u=t.length,c=e.items,v=e.first,a=v,d,f=null,h=[],w=[],S,C,_,m;for(m=0;m<u;m+=1){if(S=t[m],C=s(S,m),_=c.get(C),_===void 0){var K=a?a.e.nodes_start:r;f=or(K,e,f,f===null?e.first:f.next,S,C,m,n,o),c.set(C,f),h=[],w=[],a=f.next;continue}if(fn(_,S,m),_.e.f&F&&zt(_.e),_!==a){if(d!==void 0&&d.has(_)){if(h.length<w.length){var E=w[0],N;f=E.prev;var dt=h[0],he=h[h.length-1];for(N=0;N<h.length;N+=1)lr(h[N],E,r);for(N=0;N<w.length;N+=1)d.delete(w[N]);Q(e,dt.prev,he.next),Q(e,f,dt),Q(e,he,E),a=E,f=he,m-=1,h=[],w=[]}else d.delete(_),lr(_,a,r),Q(e,_.prev,_.next),Q(e,_,f===null?e.first:f.next),Q(e,f,_),f=_;continue}for(h=[],w=[];a!==null&&a.k!==C;)(l||!(a.e.f&F))&&(d??(d=new Set)).add(a),w.push(a),a=a.next;if(a===null)continue;_=a}h.push(_),f=_,a=_.next}if(a!==null||d!==void 0){for(var _e=d===void 0?[]:Jt(d);a!==null;)(l||!(a.e.f&F))&&_e.push(a),a=a.next;var On=_e.length;if(On>0){var Rn=u===0?r:null;an(e,_e,Rn,c)}}p.first=e.first&&e.first.e,p.last=f&&f.e}function fn(t,e,r,n){Te(t.v,e),t.i=r}function or(t,e,r,n,o,l,s,i,u,c){var v=(u&k)!==0,a=(u&vr)===0,d=v?a?te(o):Ot(o):o,f=u&kt?Ot(s):s,h={i:f,v:d,k:l,a:null,e:null,prev:r,next:n};try{return h.e=bt(()=>i(t,d,f),x),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function lr(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,o=e?e.e.nodes_start:r,l=t.e.nodes_start;l!==n;){var s=B(l);o.before(l),l=s}}function Q(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function vn(t,e,r,n,o){var i;x&&pt();var l=(i=e.$$slots)==null?void 0:i[r],s=!1;l===!0&&(l=e.children,s=!0),l===void 0?o!==null&&o(t):l(t,s?()=>n:n)}function fe(t,e){Vr(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const o=document.createElement("style");o.id=e.hash,o.textContent=e.code,n.appendChild(o)}})}function Et(t,e,r,n){var o=t.__attributes??(t.__attributes={});x&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||o[e]!==(o[e]=r)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[kr]=r),r==null?t.removeAttribute(e):typeof r!="string"&&dn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var sr=new Map;function dn(t){var e=sr.get(t.nodeName);if(e)return e;sr.set(t.nodeName,e=[]);for(var r,n=t,o=Element.prototype;o!==n;){r=$r(n);for(var l in r)r[l].set&&e.push(l);n=xr(n)}return e}function hn(t){for(var e=p,r=p;e!==null&&!(e.f&(j|nt));)e=e.parent;try{return J(e),t()}finally{J(r)}}function vt(t,e,r,n){var K;var o=!ke,l=(r&dr)!==0,s=!1,i;i=t[e];var u=Er in t||we in t,c=((K=St(t,e))==null?void 0:K.set)??(u&&l&&e in t?E=>t[e]=E:void 0),v=n,a=!0,d=!1,f=()=>(d=!0,a&&(a=!1,v=n),v);i===void 0&&n!==void 0&&(c&&o&&Ar(),i=f(),c&&c(i));var h;if(h=()=>{var E=t[e];return E===void 0?f():(a=!0,d=!1,E)},c){var w=t.$$legacy;return function(E,N){return arguments.length>0?((!N||w||s)&&c(N?h():E),E):h()}}var S=!1,C=!1,_=te(i),m=hn(()=>De(()=>{var E=h(),N=D(_);return S?(S=!1,C=!0,N):(C=!1,_.v=E)}));return function(E,N){if(arguments.length>0){const dt=N?D(m):E;return m.equals(dt)||(S=!0,Rt(_,dt),d&&v!==void 0&&(v=dt),tn(()=>D(m))),E}return D(m)}}function _n(t){return new pn(t)}class pn{constructor(e){pe(this,G);pe(this,I);var l;var r=new Map,n=(s,i)=>{var u=te(i);return r.set(s,u),u};const o=new Proxy({...e.props||{},$$events:{}},{get(s,i){return D(r.get(i)??n(i,Reflect.get(s,i)))},has(s,i){return i===we?!0:(D(r.get(i)??n(i,Reflect.get(s,i))),Reflect.has(s,i))},set(s,i,u){return Rt(r.get(i)??n(i,u),u),Reflect.set(s,i,u)}});ge(this,I,(e.hydrate?on:er)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Z(),ge(this,G,o.$$events);for(const s of Object.keys(A(this,I)))s==="$set"||s==="$destroy"||s==="$on"||Ct(this,s,{get(){return A(this,I)[s]},set(i){A(this,I)[s]=i},enumerable:!0});A(this,I).$set=s=>{Object.assign(o,s)},A(this,I).$destroy=()=>{ln(A(this,I))}}$set(e){A(this,I).$set(e)}$on(e,r){A(this,G)[e]=A(this,G)[e]||[];const n=(...o)=>r.call(this,...o);return A(this,G)[e].push(n),()=>{A(this,G)[e]=A(this,G)[e].filter(o=>o!==n)}}$destroy(){A(this,I).$destroy()}}G=new WeakMap,I=new WeakMap;let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{constructor(e,r,n){super();z(this,"$$ctor");z(this,"$$s");z(this,"$$c");z(this,"$$cn",!1);z(this,"$$d",{});z(this,"$$r",!1);z(this,"$$p_d",{});z(this,"$$l",{});z(this,"$$l_u",new Map);z(this,"$$me");this.$$ctor=e,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(e,r,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(r),this.$$c){const o=this.$$c.$on(e,r);this.$$l_u.set(r,o)}super.addEventListener(e,r,n)}removeEventListener(e,r,n){if(super.removeEventListener(e,r,n),this.$$c){const o=this.$$l_u.get(r);o&&(o(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return l=>{const s=document.createElement("slot");o!=="default"&&(s.name=o),rt(l,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},n=gn(this);for(const o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=e(o),r.default=!0):r[o]=e(o));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Gt(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=_n({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=jr(()=>{qr(()=>{var o;this.$$r=!0;for(const l of Tt(this.$$c)){if(!((o=this.$$p_d[l])!=null&&o.reflect))continue;this.$$d[l]=this.$$c[l];const s=Gt(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const s=this.$$c.$on(o,l);this.$$l_u.set(l,s)}this.$$l={}}}attributeChangedCallback(e,r,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Gt(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Tt(this.$$p_d).find(r=>this.$$p_d[r].attribute===e||!this.$$p_d[r].attribute&&r.toLowerCase()===e)||e}});function Gt(t,e,r,n){var l;const o=(l=r[t])==null?void 0:l.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function gn(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function ve(t,e,r,n,o,l){let s=class extends ir{constructor(){super(t,r,o),this.$$p_d=e}static get observedAttributes(){return Tt(e).map(i=>(e[i].attribute||i).toLowerCase())}};return Tt(e).forEach(i=>{Ct(s.prototype,i,{get(){return this.$$c&&i in this.$$c?this.$$c[i]:this.$$d[i]},set(u){var a;u=Gt(i,u,e),this.$$d[i]=u;var c=this.$$c;if(c){var v=(a=St(c,i))==null?void 0:a.get;v?c[i]=u:c.$set({[i]:u})}}})}),n.forEach(i=>{Ct(s.prototype,i,{get(){var u;return(u=this.$$c)==null?void 0:u[i]}})}),t.element=s,s}const bn=[{name:"nostter",url:"https://nostter.app/post?content={text}",icon:"https://nostter.app/favicon.ico"},{name:"Lumilumi",url:"https://lumilumi.app/post?text={text}",icon:"https://lumilumi.app/favicon.ico"}];var $n=t=>t.stopPropagation(),xn=(t,e,r)=>e(D(r).url),mn=wt('<button class="item svelte-xie82o"><img> </button>'),yn=wt('<div class="overlay svelte-xie82o"><div class="inner svelte-xie82o"><button class="close-button svelte-xie82o" aria-label="Close">✖</button> <h2 class="title svelte-xie82o">Select Share Client</h2> <div class="list svelte-xie82o"></div> <div class="footer svelte-xie82o"><a target="_blank" referrerpolicy="no-referrer" href="https://tsukemonogit.github.io/nostr-share-component/" class="svelte-xie82o">nostr-share-component</a></div></div></div>');const wn={hash:"svelte-xie82o",code:`
|
|
2
2
|
/* オーバーレイ背景 */.overlay.svelte-xie82o {position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.3); /* 少し濃い背景 */display:flex;justify-content:center;align-items:center;z-index:50;}
|
|
3
3
|
|
|
4
4
|
/* ダイアログ本体 */.inner.svelte-xie82o {display:flex;flex-direction:column;position:relative;background-color:var(--bg-color);padding:1rem;border-radius:12px; /* 柔らかい角丸 */box-shadow:0 8px 16px rgba(0, 0, 0, 0.2);width:90%;max-width:400px;gap:1rem; /* スペーシング */}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
box-shadow 0.2s ease;}.item.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー200 */box-shadow:0 2px 6px rgba(0, 0, 0, 0.1);}.item.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー300 */}
|
|
12
12
|
|
|
13
13
|
/* バツボタン */.close-button.svelte-xie82o {position:absolute;right:12px;top:12px;width:36px;height:36px;display:flex;justify-content:center;align-items:center;background-color:var(--button2-bg-color); /* グレー200 */border:none;border-radius:50%;font-size:1.25rem;color:var(--button2-text-color); /* グレー700 */cursor:pointer;transition:background-color 0.2s ease,
|
|
14
|
-
transform 0.1s ease;}.close-button.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-xie82o {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-xie82o {font-weight:500;color:var(--button1-border-color);}a.svelte-xie82o:hover {color:var(--button2-text-color);}`};function
|
|
14
|
+
transform 0.1s ease;}.close-button.svelte-xie82o:hover {background-color:var(--button2-hover-color); /* グレー300 */}.close-button.svelte-xie82o:active {background-color:var(--button2-active-color); /* グレー400 */transform:scale(0.95); /* 押した感覚を演出 */}.footer.svelte-xie82o {margin-top:1rem;text-align:center;font-size:0.75rem;border-top:1px solid var(--border-color); /* 線を追加 */padding-top:0.5rem; /* 線とコンテンツの間にスペースを追加 */}a.svelte-xie82o {font-weight:500;color:var(--button1-border-color);}a.svelte-xie82o:hover {color:var(--button2-text-color);}`};function de(t,e){Bt(e,!0),fe(t,wn);let r=vt(e,"text",7,""),n=vt(e,"handleClose",7);const o=c=>{r()===""&&r(`${document.title}
|
|
15
|
+
${window.location.href}`);const v=c.replace("{text}",encodeURIComponent(r()));console.log(v),window.open(v,"_blank","noreferrer"),n()()};var l=yn();l.__click=function(...c){var v;(v=n())==null||v.apply(this,c)};var s=It(l);s.__click=[$n];var i=It(s);i.__click=function(...c){var v;(v=n())==null||v.apply(this,c)};var u=Mt(i,4);return un(u,21,()=>bn,sn,(c,v)=>{var a=mn();a.__click=[xn,o,v];var d=It(a);Et(d,"width",24);var f=Mt(d);gt(a),le(()=>{Et(d,"src",D(v).icon),Et(d,"alt",D(v).name),nn(f,` ${D(v).name??""}`)}),rt(c,a)}),gt(u),Mr(2),gt(s),gt(l),rt(t,l),Yt({get text(){return r()},set text(c=""){r(c),Z()},get handleClose(){return n()},set handleClose(c){n(c),Z()}})}Qe(["click"]),customElements.define("nostr-share-dialog",ve(de,{text:{},handleClose:{}},[],[],!0));var En=rn(`<svg class="nostr-icon svelte-givlj7" version="1.1" id="_8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 256 256" xml:space="preserve"><g><path class="st0 svelte-givlj7" d="M0,0v256h256V0H0z M231.2,159.2c0,20.7,0,31.1-3.5,42.2c-4.4,12.2-14,21.8-26.2,26.2
|
|
15
16
|
c-11.1,3.5-21.5,3.5-42.2,3.5H96.8c-20.7,0-31.1,0-42.2-3.5c-12.2-4.4-21.8-14-26.2-26.2c-3.5-11.1-3.5-21.5-3.5-42.2V96.8
|
|
16
17
|
c0-20.7,0-31.1,3.5-42.2c4.4-12.2,14-21.8,26.2-26.2c11.2-3.5,21.5-3.5,42.2-3.5h62.5c20.7,0,31.1,0,42.2,3.5
|
|
17
18
|
c12.2,4.4,21.8,14,26.2,26.2c3.5,11.1,3.5,21.5,3.5,42.2V159.2z"></path><circle class="st1 svelte-givlj7" cx="137.9" cy="99" r="12.1"></circle><path class="st1 svelte-givlj7" d="M210.8,115.9c0-47.3-27.7-68.7-64.4-68.7c-16.4,0-31,4.4-42.4,12.5c-3.8,2.7-9,0.1-9-4.5
|
|
@@ -26,19 +27,9 @@
|
|
|
26
27
|
c-8.3-3.3-8.6-9.2-8.6-11.2c-0.4-23.1-34.5-25.9-64.5-20.1c-32.8,6.2,0.4,53.3,0.4,116v8.4c-0.1,3.1-2.5,5.6-5.6,5.6H57.7
|
|
27
28
|
c-3.1,0-5.7-2.5-5.7-5.7v-144c0-3.1,2.5-5.7,5.7-5.7h31.7c3.1,0,5.7,2.5,5.7,5.7c0,4.7,5.2,7.2,9,4.5c11.4-8.2,26-12.5,42.4-12.5
|
|
28
29
|
c36.7,0,64.4,21.4,64.4,68.7v83.2l0,0C210.8,202.3,208.3,204.8,205.1,204.8z M125.7,99c0-6.7,5.4-12.1,12.1-12.1S150,92.3,150,99
|
|
29
|
-
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const
|
|
30
|
-
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function
|
|
31
|
-
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
32
|
-
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* ボタン全体の基本スタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup,
|
|
37
|
-
[data-nostr-share="nostr-share-mini"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;border:1px solid var(--button1-border-color);cursor:pointer;transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup {color:var(--button1-text-color);display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--icon-size);height:var(--icon-size);margin:auto;padding:4px;border-radius:50%;border:none;background-color:transparent;}
|
|
38
|
-
|
|
39
|
-
/* ボタンスタイル */[data-nostr-share="nostr-share-button"].svelte-1swpyup {padding:6px 16px;margin:4px;font-weight:bold;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-button"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-button"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
40
|
-
|
|
41
|
-
/* テキスト用スタイル */.nostrShare-text.svelte-1swpyup {margin-left:8px;font-size:medium;color:var(--button2-text-color);}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* グレー */box-shadow:0 0 6px rgba(0, 0, 0, 0.1);transition:all 0.2s ease-in-out;}[data-nostr-share="nostr-share-icon"].svelte-1swpyup:active {background-color:#d1d5db;transform:scale(0.95);transition:all 0.2s ease-in-out;}
|
|
42
|
-
|
|
43
|
-
/* miniスタイル */[data-nostr-share="nostr-share-mini"].svelte-1swpyup {padding:2px 6px;margin:2px;border-radius:8px;background-color:var(--button1-bg-color); /* グレー */color:var(--button2-text-color); /* ダークグレー */}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:hover {background-color:var(--button1-hover-color); /* 少し明るいグレー */box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="nostr-share-mini"].svelte-1swpyup:active {background-color:#d1d5db; /* ダークグレー */transform:scale(0.98);}
|
|
44
|
-
/* テキスト用スタイル */.nostrShare-text-mini.svelte-1swpyup {margin-left:4px;font-size:small;font-weight:bold;color:var(--button2-text-color);}`};function fr(t,e){Kt(e,!0),pe(t,In);let r=L(e,"data-url",7),n=L(e,"data-text",7),o=L(e,"data-title",7),s=L(e,"data-type",7,"default"),l=L(e,"icon-size",7,28),i=L(e,"class",7),u=L(e,"data-style",7),f=Mr(!1);const _=()=>{Mt(f,!1)},a=typeof l()=="string"?parseInt(l(),10):l();let c=ae(()=>u()?"":s()==="icon"?"nostr-share-icon":s()==="mini"?"nostr-share-mini":"nostr-share-button");var v=Rn(),d=Me(v);d.__click=[Nn,f];var x=zt(d);hn(x,e,"default",{},h=>{var y=On(),U=Me(y);{var E=O=>{me(O,{size:24})},T=O=>{var pt=ae(()=>s()==="icon"?a:28);me(O,{get size(){return M(pt)}})};_e(U,O=>{s()==="mini"?O(E):O(T,!1)})}var rt=jt(U,2);{var St=O=>{var pt=An();Ft(()=>ur(pt,`${(s()==="mini"?"nostrShare-text-mini":"nostrShare-text")??""} svelte-1swpyup`)),st(O,pt)};_e(rt,O=>{s()!=="icon"&&O(St)})}st(h,y)}),$t(d);var N=jt(d,2);{var C=h=>{be(h,{handleClose:_,get url(){return r()},get text(){return n()},get shareTitle(){return o()}})};_e(N,h=>{M(f)&&h(C)})}return Ft(()=>{ur(d,`${i()??""} svelte-1swpyup`),_t(d,"data-nostr-share",M(c)),_t(d,"style",u()||"")}),st(t,v),Wt({get"data-url"(){return r()},set"data-url"(h){r(h),A()},get"data-text"(){return n()},set"data-text"(h){n(h),A()},get"data-title"(){return o()},set"data-title"(h){o(h),A()},get"data-type"(){return s()},set"data-type"(h="default"){s(h),A()},get"icon-size"(){return l()},set"icon-size"(h=28){l(h),A()},get class(){return i()},set class(h){i(h),A()},get"data-style"(){return u()},set"data-style"(h){u(h),A()}})}rr(["click"]),customElements.define("nostr-share",ge(fr,{"data-url":{},"data-text":{},"data-title":{},"data-type":{},"icon-size":{},class:{},"data-style":{}},["default"],[],!0)),g.Dialog=be,g.NostrShare=fr,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
s-5.4,12.1-12.1,12.1S125.7,105.8,125.7,99z"></path></g></svg>`);const kn={hash:"svelte-givlj7",code:`
|
|
31
|
+
/* アイコン内部のSVG */.nostr-icon.svelte-givlj7 {margin:auto;display:flex;align-items:center;justify-content:center;}.st0.svelte-givlj7 {fill:none;}.st1.svelte-givlj7 {fill:var(--bg-color);}.st2.svelte-givlj7 {fill:var(--nostr-color);}`};function ar(t,e){Bt(e,!0),fe(t,kn);let r=vt(e,"size",7,28);var n=En();return le(()=>Et(n,"style",`enable-background:new 0 0 256 256; width: ${r()??""}px; height: ${r()??""}px;`)),rt(t,n),Yt({get size(){return r()},set size(o=28){r(o),Z()}})}ve(ar,{size:{}},[],[],!0);const Tn=(t,e)=>{Rt(e,!0)};var Cn=wt('<span part="text" class="svelte-1h3gn4x">Nostr</span>'),Sn=wt("<!> <!>",1),Nn=wt('<button part="button" class="svelte-1h3gn4x"><!></button> <!>',1);const An={hash:"svelte-1h3gn4x",code:`:host {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
|
32
|
+
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;display:flex;justify-content:center;align-items:center;--text-color-main: #2e2e2e;--button1-text-color: #662482;--button1-bg-color: #ececec;--button1-hover-color: #b1b1b1;--button1-active-color: #999999;--button1-border-color: #b9b9b9;--button2-text-color: rgb(73, 73, 73);--button2-bg-color: #f3f4f6;--button2-hover-color: #e5e7eb;--nostr-color: #662482;--bg-color: #ffffff;--border-color: #d1d5db;}
|
|
33
|
+
@media (prefers-color-scheme: dark) {:host {display:flex;justify-content:center;align-items:center;--text-color-main: #ffffff;--button1-text-color: #eec5ff;--button1-bg-color: #363636;--button1-hover-color: #555555;--button1-active-color: #757575;--button1-border-color: #555555;--button2-text-color: #f1f1f1;--button2-bg-color: #1f1f1f;--button2-hover-color: #3b3b3b;--nostr-color: #eec5ff;--bg-color: #000000;--border-color: #333333;}
|
|
34
|
+
}[part="button"].svelte-1h3gn4x {display:flex;align-items:center;justify-content:center;cursor:pointer;gap:0.5em;transition:all 0.1s ease-in-out;border-radius:8px;font-weight:bold;}[part="button"].svelte-1h3gn4x:active {transform:scale(0.98);}[data-nostr-share="default"].svelte-1h3gn4x {padding:6px 16px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="mini"].svelte-1h3gn4x {padding:2px 6px;background-color:var(--button1-bg-color);color:var(--button2-text-color);border:1px solid var(--button1-border-color);}[data-nostr-share="default"].svelte-1h3gn4x:hover,
|
|
35
|
+
[data-nostr-share="mini"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);}[data-nostr-share="icon"].svelte-1h3gn4x {width:var(--icon-size);height:var(--icon-size);padding:2px;border-radius:50%;background-color:transparent;border:none;}[data-nostr-share="icon"].svelte-1h3gn4x:hover {background-color:var(--button1-hover-color);box-shadow:0 0 6px rgba(0, 0, 0, 0.1);}[part="text"].svelte-1h3gn4x {font-size:medium;}[data-nostr-share="mini"].svelte-1h3gn4x [part="text"]:where(.svelte-1h3gn4x) {font-size:small;}`};function ur(t,e){Bt(e,!0),fe(t,An);let r=vt(e,"data-text",7),n=vt(e,"data-type",7,"default"),o=vt(e,"icon-size",7,28),l=Dr(!1);const s=()=>{Rt(l,!1)},i=typeof o()=="string"?parseInt(o(),10):o();var u=Nn(),c=Oe(u);c.__click=[Tn,l];var v=It(c);vn(v,e,"default",{},f=>{var h=Sn(),w=Oe(h),S=De(()=>n()==="icon"?i:28);ar(w,{get size(){return D(S)}});var C=Mt(w,2);{var _=m=>{var K=Cn();rt(m,K)};nr(C,m=>{n()!=="icon"&&m(_)})}rt(f,h)}),gt(c);var a=Mt(c,2);{var d=f=>{de(f,{handleClose:s,get text(){return r()}})};nr(a,f=>{D(l)&&f(d)})}return le(()=>Et(c,"data-nostr-share",n())),rt(t,u),Yt({get"data-text"(){return r()},set"data-text"(f){r(f),Z()},get"data-type"(){return n()},set"data-type"(f="default"){n(f),Z()},get"icon-size"(){return o()},set"icon-size"(f=28){o(f),Z()}})}Qe(["click"]),customElements.define("nostr-share",ve(ur,{"data-text":{},"data-type":{},"icon-size":{}},["default"],[],!0)),g.Dialog=de,g.NostrShare=ur,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|