@htmlbricks/hb-auth-social-login-button 0.60.10 → 0.60.12
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/main.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(ut){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const hr=2,ft="[",ct="[!",ht="]",ie={},$=Symbol(),dt=!1;var vt=Array.isArray,dr=Array.prototype.indexOf,vr=Array.from,Se=Object.keys,se=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,_r=Object.prototype,pr=Array.prototype,gr=Object.getPrototypeOf,_t=Object.isExtensible;function pt(e){for(var t=0;t<e.length;t++)e[t]()}function mr(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const S=2,Ze=4,wr=8,ae=16,P=32,U=64,gt=128,L=256,Te=512,b=1024,N=2048,Y=4096,z=8192,le=16384,Ge=32768,Je=65536,mt=1<<17,$r=1<<18,ke=1<<19,yr=1<<20,We=1<<21,wt=1<<22,Oe=1<<23,Ke=Symbol("$state"),br=Symbol("legacy props"),$t=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},kr=3,Le=8;function Er(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Tr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Or(){throw new Error("https://svelte.dev/e/hydration_failed")}function Lr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Nr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ne(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let y=!1;function ue(e){y=e}let m;function fe(e){if(e===null)throw Ne(),ie;return m=e}function Ae(){return fe(ve(m))}function yt(e){if(y){if(ve(m)!==null)throw Ne(),ie;m=e}}function Rr(){for(var e=0,t=m;;){if(t.nodeType===Le){var r=t.data;if(r===ht){if(e===0)return t;e-=1}else(r===ft||r===ct)&&(e+=1)}var n=ve(t);t.remove(),t=n}}function Ir(e){if(!e||e.nodeType!==Le)throw Ne(),ie;return e.data}function bt(e){return e===this.v}function Fr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Pr(e){return!Fr(e,this.v)}let Dr=!1,R=null;function kt(e){R=e}function Et(e,t=!1,r){R={p:R,c:null,e:null,s:e,x:null,l:null}}function Ct(e){var t=R,r=t.e;if(r!==null){t.e=null;for(var n of r)zt(n)}return e!==void 0&&(t.x=e),R=t.p,e??{}}function xt(){return!0}const Mr=new WeakMap;function jr(e){var t=g;if(t===null)return p.f|=Oe,e;if((t.f&Ge)===0){if((t.f>)===0)throw!t.parent&&e instanceof Error&&Tt(e),e;t.b.error(e)}else St(e,t)}function St(e,t){for(;t!==null;){if((t.f>)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&Tt(e),e}function Tt(e){const t=Mr.get(e);t&&(se(e,"message",{value:t.message}),se(e,"stack",{value:t.stack}))}let Xe=[],Qe=[];function qr(){var e=Xe;Xe=[],pt(e)}function Br(){var e=Qe;Qe=[],pt(e)}function Ur(){Xe.length>0&&qr(),Qe.length>0&&Br()}function Yr(e){var t=S|N,r=p!==null&&(p.f&S)!==0?p:null;return g===null||r!==null&&(r.f&L)!==0?t|=L:g.f|=ke,{ctx:R,deps:null,effects:null,equals:bt,f:t,fn:e,reactions:null,rv:0,v:$,wv:0,parent:r??g,ac:null}}function Ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Z(t[r])}}function zr(e){for(var t=e.parent;t!==null;){if((t.f&S)===0)return t;t=t.parent}return null}function et(e){var t,r=g;pe(zr(e));try{Ot(e),t=nr(e)}finally{pe(r)}return t}function Lt(e){var t=et(e);if(e.equals(t)||(e.v=t,e.wv=tr()),!re){var r=(J||(e.f&L)!==0)&&e.deps!==null?Y:b;O(e,r)}}const tt=new Set;let C=null,Nt=new Set,Re=[];function At(){const e=Re.shift();Re.length>0&&queueMicrotask(At),e()}let K=[],Ie=null,rt=!1,Fe=!1;class X{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#c=[];#h=[];skipped_effects=new Set;process(t){K=[];for(const i of t)this.#v(i);if(this.#i.length===0&&this.#r===0){this.#d();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],C=null,It(r),It(n),C===null?C=this:tt.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#n),this.#l(this.#a);for(const i of this.#i)ge(i);for(const i of this.#o)ge(i);this.#i=[],this.#o=[]}#v(t){t.f^=b;for(var r=t.first;r!==null;){var n=r.f,i=(n&(P|U))!==0,s=i&&(n&b)!==0,o=s||(n&z)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=b;else if((n&Ze)!==0)this.#n.push(r);else if((n&b)===0)if((n&wt)!==0){var a=r.b?.is_pending()?this.#o:this.#i;a.push(r)}else De(r)&&((r.f&ae)!==0&&this.#a.push(r),ge(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&N)!==0?this.#c:this.#h).push(r),O(r,b);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){C=this}deactivate(){C=null;for(const t of Nt)if(Nt.delete(t),t(),C!==null)break}neuter(){this.#f=!0}flush(){K.length>0?Rt():this.#d(),C===this&&(this.#r===0&&tt.delete(this),this.deactivate())}#d(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)O(t,N),he(t);for(const t of this.#h)O(t,Y),he(t);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=mr()).promise}static ensure(){if(C===null){const t=C=new X;tt.add(C),Fe||X.enqueue(()=>{C===t&&t.flush()})}return C}static enqueue(t){Re.length===0&&queueMicrotask(At),Re.unshift(t)}}function ce(e){var t=Fe;Fe=!0;try{for(var r;;){if(Ur(),K.length===0&&(C?.flush(),K.length===0))return Ie=null,r;Rt()}}finally{Fe=t}}function Rt(){var e=_e;rt=!0;try{var t=0;for(Kt(!0);K.length>0;){var r=X.ensure();if(t++>1e3){var n,i;Vr()}r.process(K),V.clear()}}finally{rt=!1,Kt(e),Ie=null}}function Vr(){try{Tr()}catch(e){St(e,Ie)}}let Q=null;function It(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(le|z))===0&&De(n)&&(Q=[],ge(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Zt(n):n.fn=null),Q?.length>0)){V.clear();for(const i of Q)ge(i);Q=[]}}Q=null}}function he(e){for(var t=Ie=e;t.parent!==null;){t=t.parent;var r=t.f;if(rt&&t===g&&(r&ae)!==0)return;if((r&(U|P))!==0){if((r&b)===0)return;t.f^=b}}K.push(t)}const V=new Map;function Ft(e,t){var r={f:0,v:e,reactions:null,equals:bt,rv:0,wv:0};return r}function H(e,t){const r=Ft(e);return ln(r),r}function Hr(e,t=!1,r=!0){const n=Ft(e);return t||(n.equals=Pr),n}function D(e,t,r=!1){p!==null&&(!F||(p.f&mt)!==0)&&xt()&&(p.f&(S|ae|wt|mt))!==0&&!M?.includes(e)&&Ar();let n=r?Ee(t):t;return Zr(e,n)}function Zr(e,t){if(!e.equals(t)){var r=e.v;re?V.set(e,t):V.set(e,r),e.v=t;var n=X.ensure();n.capture(e,r),(e.f&S)!==0&&((e.f&N)!==0&&et(e),O(e,(e.f&L)===0?b:Y)),e.wv=tr(),Pt(e,N),g!==null&&(g.f&b)!==0&&(g.f&(P|U))===0&&(A===null?un([e]):A.push(e))}return t}function nt(e){D(e,e.v+1)}function Pt(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,a=(o&N)===0;a&&O(s,t),(o&S)!==0?Pt(s,Y):a&&((o&ae)!==0&&Q!==null&&Q.push(s),he(s))}}function Ee(e){if(typeof e!="object"||e===null||Ke in e)return e;const t=gr(e);if(t!==_r&&t!==pr)return e;var r=new Map,n=vt(e),i=H(0),s=ne,o=a=>{if(ne===s)return a();var l=p,u=ne;G(null),er(s);var c=a();return G(l),er(u),c};return n&&r.set("length",H(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Lr();var c=r.get(l);return c===void 0?c=o(()=>{var _=H(u.value);return r.set(l,_),_}):D(c,u.value,!0),!0},deleteProperty(a,l){var u=r.get(l);if(u===void 0){if(l in a){const c=o(()=>H($));r.set(l,c),nt(i)}}else D(u,$),nt(i);return!0},get(a,l,u){if(l===Ke)return e;var c=r.get(l),_=l in a;if(c===void 0&&(!_||oe(a,l)?.writable)&&(c=o(()=>{var h=Ee(_?a[l]:$),v=H(h);return v}),r.set(l,c)),c!==void 0){var d=W(c);return d===$?void 0:d}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=W(c))}else if(u===void 0){var _=r.get(l),d=_?.v;if(_!==void 0&&d!==$)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(a,l){if(l===Ke)return!0;var u=r.get(l),c=u!==void 0&&u.v!==$||Reflect.has(a,l);if(u!==void 0||g!==null&&(!c||oe(a,l)?.writable)){u===void 0&&(u=o(()=>{var d=c?Ee(a[l]):$,h=H(d);return h}),r.set(l,u));var _=W(u);if(_===$)return!1}return c},set(a,l,u,c){var _=r.get(l),d=l in a;if(n&&l==="length")for(var h=u;h<_.v;h+=1){var v=r.get(h+"");v!==void 0?D(v,$):h in a&&(v=o(()=>H($)),r.set(h+"",v))}if(_===void 0)(!d||oe(a,l)?.writable)&&(_=o(()=>H(void 0)),D(_,Ee(u)),r.set(l,_));else{d=_.v!==$;var f=o(()=>Ee(u));D(_,f)}var w=Reflect.getOwnPropertyDescriptor(a,l);if(w?.set&&w.set.call(c,u),!d){if(n&&typeof l=="string"){var E=r.get("length"),x=Number(l);Number.isInteger(x)&&x>=E.v&&D(E,x+1)}nt(i)}return!0},ownKeys(a){W(i);var l=Reflect.ownKeys(a).filter(_=>{var d=r.get(_);return d===void 0||d.v!==$});for(var[u,c]of r)c.v!==$&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Nr()}})}var Dt,Mt,jt,qt;function it(){if(Dt===void 0){Dt=window,Mt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;jt=oe(t,"firstChild").get,qt=oe(t,"nextSibling").get,_t(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),_t(r)&&(r.__t=void 0)}}function de(e=""){return document.createTextNode(e)}function ee(e){return jt.call(e)}function ve(e){return qt.call(e)}function Bt(e,t){if(!y)return ee(e);var r=ee(m);return r===null&&(r=m.appendChild(de())),fe(r),r}function Pe(e,t){if(!y){var r=ee(e);return r instanceof Comment&&r.data===""?ve(r):r}return m}function Gr(e){e.textContent=""}function Jr(){return!1}function Ut(e){var t=p,r=g;G(null),pe(null);try{return e()}finally{G(t),pe(r)}}function Wr(e){g===null&&p===null&&Sr(),p!==null&&(p.f&L)!==0&&g===null&&xr(),re&&Cr()}function Kr(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function te(e,t,r,n=!0){var i=g;i!==null&&(i.f&z)!==0&&(e|=z);var s={ctx:R,deps:null,nodes_start:null,nodes_end:null,f:e|N,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{ge(s),s.f|=Ge}catch(l){throw Z(s),l}else t!==null&&he(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&ke)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&Kr(o,i),p!==null&&(p.f&S)!==0&&(e&U)===0)){var a=p;(a.effects??=[]).push(o)}}return s}function Yt(e){Wr();var t=g.f,r=!p&&(t&P)!==0&&(t&Ge)===0;if(r){var n=R;(n.e??=[]).push(e)}else return zt(e)}function zt(e){return te(Ze|yr,e,!1)}function Xr(e){X.ensure();const t=te(U|ke,e,!0);return()=>{Z(t)}}function Qr(e){X.ensure();const t=te(U|ke,e,!0);return(r={})=>new Promise(n=>{r.outro?Gt(t,()=>{Z(t),n(void 0)}):(Z(t),n(void 0))})}function en(e){return te(Ze,e,!1)}function tn(e,t=0){return te(wr|t,e,!0)}function rn(e,t=0){var r=te(ae|t,e,!0);return r}function st(e,t=!0){return te(P|ke,e,!0,t)}function Vt(e){var t=e.teardown;if(t!==null){const r=re,n=p;Xt(!0),G(null);try{t.call(null)}finally{Xt(r),G(n)}}}function Ht(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ut(()=>{i.abort($t)});var n=r.next;(r.f&U)!==0?r.parent=null:Z(r,t),r=n}}function nn(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&P)===0&&Z(t),t=r}}function Z(e,t=!0){var r=!1;(t||(e.f&$r)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(sn(e.nodes_start,e.nodes_end),r=!0),Ht(e,t&&!r),Me(e,0),O(e,le);var n=e.transitions;if(n!==null)for(const s of n)s.stop();Vt(e);var i=e.parent;i!==null&&i.first!==null&&Zt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function sn(e,t){for(;e!==null;){var r=e===t?null:ve(e);e.remove(),e=r}}function Zt(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Gt(e,t){var r=[];Jt(e,r,!0),on(r,()=>{Z(e),t&&t()})}function on(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Jt(e,t,r){if((e.f&z)===0){if(e.f^=z,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Je)!==0||(n.f&P)!==0;Jt(n,t,s?r:!1),n=i}}}function an(e){Wt(e,!0)}function Wt(e,t){if((e.f&z)!==0){e.f^=z,(e.f&b)===0&&(O(e,N),he(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Je)!==0||(r.f&P)!==0;Wt(r,i?t:!1),r=n}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}let _e=!1;function Kt(e){_e=e}let re=!1;function Xt(e){re=e}let p=null,F=!1;function G(e){p=e}let g=null;function pe(e){g=e}let M=null;function ln(e){p!==null&&(M===null?M=[e]:M.push(e))}let k=null,T=0,A=null;function un(e){A=e}let Qt=1,Ce=0,ne=Ce;function er(e){ne=e}let J=!1;function tr(){return++Qt}function De(e){var t=e.f;if((t&N)!==0)return!0;if((t&Y)!==0){var r=e.deps,n=(t&L)!==0;if(r!==null){var i,s,o=(t&Te)!==0,a=n&&g!==null&&!J,l=r.length;if((o||a)&&(g===null||(g.f&le)===0)){var u=e,c=u.parent;for(i=0;i<l;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=Te),a&&c!==null&&(c.f&L)===0&&(u.f^=L)}for(i=0;i<l;i++)if(s=r[i],De(s)&&Lt(s),s.wv>e.wv)return!0}(!n||g!==null&&!J)&&O(e,b)}return!1}function rr(e,t,r=!0){var n=e.reactions;if(n!==null&&!M?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&S)!==0?rr(s,t,!1):t===s&&(r?O(s,N):(s.f&b)!==0&&O(s,Y),he(s))}}function nr(e){var t=k,r=T,n=A,i=p,s=J,o=M,a=R,l=F,u=ne,c=e.f;k=null,T=0,A=null,J=(c&L)!==0&&(F||!_e||p===null),p=(c&(P|U))===0?e:null,M=null,kt(e.ctx),F=!1,ne=++Ce,e.ac!==null&&(Ut(()=>{e.ac.abort($t)}),e.ac=null);try{e.f|=We;var _=e.fn,d=_(),h=e.deps;if(k!==null){var v;if(Me(e,T),h!==null&&T>0)for(h.length=T+k.length,v=0;v<k.length;v++)h[T+v]=k[v];else e.deps=h=k;if(!J||(c&S)!==0&&e.reactions!==null)for(v=T;v<h.length;v++)(h[v].reactions??=[]).push(e)}else h!==null&&T<h.length&&(Me(e,T),h.length=T);if(xt()&&A!==null&&!F&&h!==null&&(e.f&(S|Y|N))===0)for(v=0;v<A.length;v++)rr(A[v],e);return i!==null&&i!==e&&(Ce++,A!==null&&(n===null?n=A:n.push(...A))),(e.f&Oe)!==0&&(e.f^=Oe),d}catch(f){return jr(f)}finally{e.f^=We,k=t,T=r,A=n,p=i,J=s,M=o,kt(a),F=l,ne=u}}function fn(e,t){let r=t.reactions;if(r!==null){var n=dr.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&S)!==0&&(k===null||!k.includes(t))&&(O(t,Y),(t.f&(L|Te))===0&&(t.f^=Te),Ot(t),Me(t,0))}function Me(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)fn(e,r[n])}function ge(e){var t=e.f;if((t&le)===0){O(e,b);var r=g,n=_e;g=e,_e=!0;try{(t&ae)!==0?nn(e):Ht(e),Vt(e);var i=nr(e);e.teardown=typeof i=="function"?i:null,e.wv=Qt;var s;dt&&Dr&&(e.f&N)!==0&&e.deps}finally{_e=n,g=r}}}function W(e){var t=e.f,r=(t&S)!==0;if(p!==null&&!F){var n=g!==null&&(g.f&le)!==0;if(!n&&!M?.includes(e)){var i=p.deps;if((p.f&We)!==0)e.rv<Ce&&(e.rv=Ce,k===null&&i!==null&&i[T]===e?T++:k===null?k=[e]:(!J||!k.includes(e))&&k.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:s.includes(p)||s.push(p)}}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&L)===0&&(o.f^=L)}if(re){if(V.has(e))return V.get(e);if(r){o=e;var l=o.v;return((o.f&b)===0&&o.reactions!==null||ir(o))&&(l=et(o)),V.set(o,l),l}}else r&&(o=e,De(o)&&Lt(o));if((e.f&Oe)!==0)throw e.v;return e.v}function ir(e){if(e.v===$)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(V.has(t)||(t.f&S)!==0&&ir(t))return!0;return!1}function cn(e){var t=F;try{return F=!0,e()}finally{F=t}}const hn=-7169;function O(e,t){e.f=e.f&hn|t}const sr=new Set,ot=new Set;function dn(e){for(var t=0;t<e.length;t++)sr.add(e[t]);for(var r of ot)r(e)}let or=null;function je(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;or=e;var o=0,a=or===e&&e.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||e.target,s!==t){se(e,"currentTarget",{configurable:!0,get(){return s||r}});var c=p,_=g;G(null),pe(null);try{for(var d,h=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var f=s["__"+n];if(f!=null&&(!s.disabled||e.target===s))if(vt(f)){var[w,...E]=f;w.apply(s,[e,...E])}else f.call(s,e)}catch(x){d?h.push(x):d=x}if(e.cancelBubble||v===t||v===null)break;s=v}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,G(c),pe(_)}}}function ar(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function j(e,t){var r=g;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function vn(e,t){var r=(t&hr)!==0,n,i=!e.startsWith("<!>");return()=>{if(y)return j(m,null),m;n===void 0&&(n=ar(i?e:"<!>"+e),n=ee(n));var s=r||Mt?document.importNode(n,!0):n.cloneNode(!0);return j(s,s),s}}function _n(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,s;return()=>{if(y)return j(m,null),m;if(!s){var o=ar(i),a=ee(o);s=ee(a)}var l=s.cloneNode(!0);return j(l,l),l}}function qe(e,t){return _n(e,t,"svg")}function pn(e=""){if(!y){var t=de(e+"");return j(t,t),t}var r=m;return r.nodeType!==kr&&(r.before(r=de()),fe(r)),j(r,r),r}function Be(){if(y)return j(m,null),m;var e=document.createDocumentFragment(),t=document.createComment(""),r=de();return e.append(t,r),j(t,r),e}function I(e,t){if(y){g.nodes_end=m,Ae();return}e!==null&&e.before(t)}const gn=["touchstart","touchmove"];function mn(e){return gn.includes(e)}function lr(e,t){return ur(e,t)}function wn(e,t){it(),t.intro=t.intro??!1;const r=t.target,n=y,i=m;try{for(var s=ee(r);s&&(s.nodeType!==Le||s.data!==ft);)s=ve(s);if(!s)throw ie;ue(!0),fe(s),Ae();const o=ur(e,{...t,anchor:s});if(m===null||m.nodeType!==Le||m.data!==ht)throw Ne(),ie;return ue(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==ie&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Or(),it(),Gr(r),ue(!1),lr(e,t)}finally{ue(n),fe(i)}}const me=new Map;function ur(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0}){it();var a=new Set,l=_=>{for(var d=0;d<_.length;d++){var h=_[d];if(!a.has(h)){a.add(h);var v=mn(h);t.addEventListener(h,je,{passive:v});var f=me.get(h);f===void 0?(document.addEventListener(h,je,{passive:v}),me.set(h,1)):me.set(h,f+1)}}};l(vr(sr)),ot.add(l);var u=void 0,c=Qr(()=>{var _=r??t.appendChild(de());return st(()=>{if(s){Et({});var d=R;d.c=s}i&&(n.$$events=i),y&&j(_,null),u=e(_,n)||{},y&&(g.nodes_end=m),s&&Ct()}),()=>{for(var d of a){t.removeEventListener(d,je);var h=me.get(d);--h===0?(document.removeEventListener(d,je),me.delete(d)):me.set(d,h)}ot.delete(l),_!==r&&_.parentNode?.removeChild(_)}});return at.set(u,c),u}let at=new WeakMap;function $n(e,t){const r=at.get(e);return r?(at.delete(e),r(t)):Promise.resolve()}function yn(e){R===null&&Er(),Yt(()=>{const t=cn(e);if(typeof t=="function")return t})}function Ue(e,t,r=!1){y&&Ae();var n=e,i=null,s=null,o=$,a=r?Je:0,l=!1;const u=(h,v=!0)=>{l=!0,d(v,h)};var c=null;function _(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var h=o?i:s,v=o?s:i;h&&an(h),v&&Gt(v,()=>{o?s=null:i=null})}const d=(h,v)=>{if(o===(o=h))return;let f=!1;if(y){const we=Ir(n)===ct;!!o===we&&(n=Rr(),fe(n),ue(!1),f=!0)}var w=Jr(),E=n;if(w&&(c=document.createDocumentFragment(),c.append(E=de())),o?i??=v&&st(()=>v(E)):s??=v&&st(()=>v(E)),w){var x=C,ze=o?i:s,B=o?s:i;ze&&x.skipped_effects.delete(ze),B&&x.skipped_effects.add(B),x.add_callback(_)}else _();f&&ue(!0)};rn(()=>{l=!1,t(u),l||d(null,null)},a),y&&(n=m)}function bn(e,t,r,n,i){y&&Ae();var s=t.$$slots?.[r],o=!1;s===!0&&(s=t.children,o=!0),s===void 0?i!==null&&i(e):s(e,o?()=>n:n)}function kn(e,t){en(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function xe(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var l;l=()=>{var d=e[t];return d===void 0?o():(s=!0,d)};var u=!1,c=Yr(()=>(u=!1,l())),_=g;return(function(d,h){if(arguments.length>0){const v=h?W(c):d;return D(c,v),u=!0,i!==void 0&&(i=v),d}return re&&u||(_.f&le)!==0?c.v:W(c)})}function En(e){return new Cn(e)}class Cn{#t;#e;constructor(t){var r=new Map,n=(s,o)=>{var a=Hr(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return W(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===br?!0:(W(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return D(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#e=(t.hydrate?wn:lr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&ce(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||se(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{$n(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let fr;typeof HTMLElement=="function"&&(fr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),I(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=xn(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ye(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=En({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Xr(()=>{tn(()=>{this.$$r=!0;for(const n of Se(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ye(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ye(e,r,this.$$p_d,"toProp"),this.$$c?.$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 Se(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ye(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function xn(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Sn(e,t,r,n,i,s){let o=class extends fr{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Se(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Se(t).forEach(a=>{se(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Ye(a,l,t),this.$$d[a]=l;var u=this.$$c;if(u){var c=oe(u,a)?.get;c?u[a]=l:u.$set({[a]:l})}}})}),n.forEach(a=>{se(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}class q{constructor(t){this.authUrl=t.authUrl,this.authCookieName=t.authCookieName||"authToken"}async authorizeByToken(t){return q.authByToken(this.authUrl+"/token",t)}async checkLogin(t){return q.checkLogin(this.authUrl+"/token",this.authCookieName,t)}async authorizeSocialLogin(t){return q.authorizeSocialLogin(t,{authUrl:this.authUrl,authCookieName:this.authCookieName})}async socialLoginOauthAnswer(t){return q.socialLoginOauthAnswer(t,{authUrl:this.authUrl,authCookieName:this.authCookieName})}static async authByToken(t,r){const n=await fetch(t,{headers:{Authorization:r,"Content-Type":"application/json"},method:"POST",body:JSON.stringify({token:r})});if(n.ok){const i=await n.json();if(i.error)throw new Error("unauthorized");if(i.token)return i.token;throw console.error("no token on answer"),new Error("no token on answer")}else throw new Error("unauthorized")}static async checkLogin(t,r,n){if(!r)throw new Error("authCookieName is not defined");if(!t)throw new Error("tokenUri is not defined");let i="localStorage",s;if(s=localStorage.getItem(r),s||(s=sessionStorage.getItem(r),i="sessionStorage"),n){console.info("checking auth by token");try{const o=await q.authByToken(t,n);switch(console.info("new token token",o),i){case"localStorage":localStorage.setItem(r,o);break;case"sessionStorage":sessionStorage.setItem(r,o);break}return o}catch{throw new Error("token is not valid")}}if(s){console.info("checking local token",s);try{const o=await q.authByToken(t,s);switch(console.info("new token token",o),i){case"localStorage":localStorage.setItem(r,o);break;case"sessionStorage":sessionStorage.setItem(r,o);break}return o}catch(o){switch(console.error("error on authByToken",o),console.error("not logged"),i){case"localStorage":localStorage.removeItem(r);break;case"sessionStorage":sessionStorage.removeItem(r);break}throw new Error("not logged")}}else throw new Error("not authorized")}static async authorizeSocialLogin(t,r){const n=r.authUrl+"/social/login",i=await fetch(n,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(Object.assign({redirect_uri:t.redirect_uri},t))});if(console.log("server answer with",i),i.ok){const s=await i.json();return r.authCookieName&&localStorage.setItem(r.authCookieName,s.token),console.info("now is logged, token is: "+s.token),s.token}else try{const s=await i.json();throw new Error(JSON.stringify(s))}catch(s){throw s}}static async socialLoginOauthAnswer(t,r){console.log("auth socialLoginOauthAnswer",t);try{if(!t?.provider)return console.error("auth socialLoginOauthAnswer: no provider");const n={provider:t.provider,token:t.token||t.tmpCode,redirect_uri:t.redirect_uri};return n.token?await q.authorizeSocialLogin(n,r):console.error("auth socialLoginOauthAnswer: no token")}catch(n){console.error("auth socialLoginOauthAnswer:",n)}}}var Tn=(e,t)=>{t()},On=(e,t)=>{(e.key==="Enter"||e.key===" ")&&t()},Ln=qe('<svg viewBox="-.1 .5 960.2 923.9" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="m958.9 442.4c1.1 26.1-2 52.1-9.2 77.2-7.1 25.1-18.3 48.8-33.1 70.3a240.43 240.43 0 0 1 -53.6 56.2l-.5.4-199.9 149.8-98.3 74.5-59.9 45.2c-3.5 2.7-7.4 4.7-11.5 6.1s-8.5 2.1-12.9 2.1c-4.3 0-8.7-.7-12.8-2.1s-8-3.4-11.5-6.1l-59.9-45.2-98.3-74.5-198.7-148.9-1.2-.8-.4-.4c-20.9-15.7-39-34.7-53.8-56.2s-26-45.3-33.2-70.4c-7.2-25.1-10.3-51.2-9.2-77.3 1.2-26.1 6.5-51.8 15.8-76.2l1.3-3.5 130.7-340.5q1-2.5 2.4-4.8 1.3-2.3 3.1-4.3 1.7-2.1 3.7-3.9 2-1.7 4.2-3.2c3.1-1.9 6.3-3.3 9.8-4.1 3.4-.9 7-1.3 10.5-1.1 3.6.2 7.1.9 10.4 2.2 3.3 1.2 6.5 3 9.3 5.2q2 1.7 3.9 3.6 1.8 2 3.2 4.3 1.5 2.2 2.6 4.7 1.1 2.4 1.8 5l88.1 269.7h356.6l88.1-269.7q.7-2.6 1.9-5 1.1-2.4 2.6-4.7 1.4-2.2 3.2-4.2 1.8-2 3.9-3.7c2.8-2.2 5.9-3.9 9.2-5.2 3.4-1.2 6.9-1.9 10.4-2.1 3.6-.2 7.1.1 10.6 1 3.4.9 6.7 2.3 9.7 4.2q2.3 1.4 4.3 3.2 2 1.7 3.7 3.8 1.7 2.1 3.1 4.4 1.3 2.3 2.3 4.8l130.5 340.6 1.3 3.5c9.3 24.3 14.6 50 15.7 76.1z" fill="#e24329"></path><path d="m959 442.5c1.1 26-2 52.1-9.2 77.2s-18.4 48.9-33.2 70.4-32.9 40.5-53.7 56.2l-.5.4-199.9 149.8s-84.9-64.1-182.5-138l286.5-216.8c12.9-9.7 26.4-18.6 40.3-26.8 13.9-8.3 28.3-15.7 43-22.3 14.8-6.6 29.9-12.5 45.2-17.4 15.4-5 31-9.1 46.9-12.4l1.3 3.5c9.3 24.4 14.6 50.1 15.8 76.2z" fill="#fc6d26"></path><path d="m480 658.5c97.6 73.7 182.6 138 182.6 138l-98.3 74.5-59.9 45.2c-3.5 2.7-7.4 4.7-11.5 6.1s-8.5 2.1-12.9 2.1c-4.3 0-8.7-.7-12.8-2.1s-8-3.4-11.5-6.1l-59.9-45.2-98.3-74.5s84.9-64.3 182.5-138z" fill="#fca326"></path><path d="m480 658.3c-97.7 73.9-182.5 138-182.5 138l-198.7-148.9-1.2-.8-.4-.4c-20.9-15.7-39-34.7-53.8-56.2s-26-45.3-33.2-70.4c-7.2-25.1-10.3-51.2-9.2-77.3 1.2-26.1 6.5-51.8 15.8-76.2l1.3-3.5c15.9 3.3 31.5 7.4 46.9 12.4 15.3 5 30.4 10.8 45.2 17.5 14.7 6.6 29.1 14.1 43 22.3s27.3 17.2 40.3 26.9z" fill="#fc6d26"></path></svg>'),Nn=qe('<svg width="100%" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" transform="scale(64)" fill="#1B1F23"></path></svg>'),An=qe(`<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 287.56 191"><defs><style>.cls-1 {
|
|
1
|
+
(function(ut){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const hr=2,ft="[",ct="[!",ht="]",ie={},y=Symbol(),dt=!1;var vt=Array.isArray,dr=Array.prototype.indexOf,vr=Array.from,Se=Object.keys,se=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,_r=Object.prototype,pr=Array.prototype,gr=Object.getPrototypeOf,_t=Object.isExtensible;function pt(e){for(var t=0;t<e.length;t++)e[t]()}function mr(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const S=2,Ze=4,wr=8,ae=16,D=32,U=64,gt=128,L=256,Te=512,k=1024,N=2048,Y=4096,z=8192,le=16384,Ge=32768,Je=65536,mt=1<<17,$r=1<<18,ke=1<<19,yr=1<<20,We=1<<21,wt=1<<22,Oe=1<<23,Ke=Symbol("$state"),br=Symbol("legacy props"),$t=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},kr=3,Le=8;function Er(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Tr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Or(){throw new Error("https://svelte.dev/e/hydration_failed")}function Lr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Nr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ne(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let b=!1;function ue(e){b=e}let w;function fe(e){if(e===null)throw Ne(),ie;return w=e}function Ae(){return fe(ve(w))}function yt(e){if(b){if(ve(w)!==null)throw Ne(),ie;w=e}}function Rr(){for(var e=0,t=w;;){if(t.nodeType===Le){var r=t.data;if(r===ht){if(e===0)return t;e-=1}else(r===ft||r===ct)&&(e+=1)}var n=ve(t);t.remove(),t=n}}function Ir(e){if(!e||e.nodeType!==Le)throw Ne(),ie;return e.data}function bt(e){return e===this.v}function Fr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dr(e){return!Fr(e,this.v)}let Pr=!1,R=null;function kt(e){R=e}function Et(e,t=!1,r){R={p:R,c:null,e:null,s:e,x:null,l:null}}function Ct(e){var t=R,r=t.e;if(r!==null){t.e=null;for(var n of r)zt(n)}return e!==void 0&&(t.x=e),R=t.p,e??{}}function xt(){return!0}const Mr=new WeakMap;function jr(e){var t=g;if(t===null)return p.f|=Oe,e;if((t.f&Ge)===0){if((t.f>)===0)throw!t.parent&&e instanceof Error&&Tt(e),e;t.b.error(e)}else St(e,t)}function St(e,t){for(;t!==null;){if((t.f>)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&Tt(e),e}function Tt(e){const t=Mr.get(e);t&&(se(e,"message",{value:t.message}),se(e,"stack",{value:t.stack}))}let Xe=[],Qe=[];function qr(){var e=Xe;Xe=[],pt(e)}function Br(){var e=Qe;Qe=[],pt(e)}function Ur(){Xe.length>0&&qr(),Qe.length>0&&Br()}function Yr(e){var t=S|N,r=p!==null&&(p.f&S)!==0?p:null;return g===null||r!==null&&(r.f&L)!==0?t|=L:g.f|=ke,{ctx:R,deps:null,effects:null,equals:bt,f:t,fn:e,reactions:null,rv:0,v:y,wv:0,parent:r??g,ac:null}}function Ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Z(t[r])}}function zr(e){for(var t=e.parent;t!==null;){if((t.f&S)===0)return t;t=t.parent}return null}function et(e){var t,r=g;pe(zr(e));try{Ot(e),t=nr(e)}finally{pe(r)}return t}function Lt(e){var t=et(e);if(e.equals(t)||(e.v=t,e.wv=tr()),!re){var r=(J||(e.f&L)!==0)&&e.deps!==null?Y:k;O(e,r)}}const tt=new Set;let C=null,Nt=new Set,Re=[];function At(){const e=Re.shift();Re.length>0&&queueMicrotask(At),e()}let K=[],Ie=null,rt=!1,Fe=!1;class X{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#o=[];#s=[];#n=[];#a=[];#c=[];#h=[];skipped_effects=new Set;process(t){K=[];for(const i of t)this.#v(i);if(this.#i.length===0&&this.#r===0){this.#d();var r=this.#s,n=this.#n;this.#s=[],this.#n=[],this.#a=[],C=null,It(r),It(n),C===null?C=this:tt.delete(this),this.#u?.resolve()}else this.#l(this.#s),this.#l(this.#n),this.#l(this.#a);for(const i of this.#i)ge(i);for(const i of this.#o)ge(i);this.#i=[],this.#o=[]}#v(t){t.f^=k;for(var r=t.first;r!==null;){var n=r.f,i=(n&(D|U))!==0,s=i&&(n&k)!==0,o=s||(n&z)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=k;else if((n&Ze)!==0)this.#n.push(r);else if((n&k)===0)if((n&wt)!==0){var a=r.b?.is_pending()?this.#o:this.#i;a.push(r)}else Pe(r)&&((r.f&ae)!==0&&this.#a.push(r),ge(r));var l=r.first;if(l!==null){r=l;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&N)!==0?this.#c:this.#h).push(r),O(r,k);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){C=this}deactivate(){C=null;for(const t of Nt)if(Nt.delete(t),t(),C!==null)break}neuter(){this.#f=!0}flush(){K.length>0?Rt():this.#d(),C===this&&(this.#r===0&&tt.delete(this),this.deactivate())}#d(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)O(t,N),he(t);for(const t of this.#h)O(t,Y),he(t);this.#s=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=mr()).promise}static ensure(){if(C===null){const t=C=new X;tt.add(C),Fe||X.enqueue(()=>{C===t&&t.flush()})}return C}static enqueue(t){Re.length===0&&queueMicrotask(At),Re.unshift(t)}}function ce(e){var t=Fe;Fe=!0;try{for(var r;;){if(Ur(),K.length===0&&(C?.flush(),K.length===0))return Ie=null,r;Rt()}}finally{Fe=t}}function Rt(){var e=_e;rt=!0;try{var t=0;for(Kt(!0);K.length>0;){var r=X.ensure();if(t++>1e3){var n,i;Vr()}r.process(K),V.clear()}}finally{rt=!1,Kt(e),Ie=null}}function Vr(){try{Tr()}catch(e){St(e,Ie)}}let Q=null;function It(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(le|z))===0&&Pe(n)&&(Q=[],ge(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Zt(n):n.fn=null),Q?.length>0)){V.clear();for(const i of Q)ge(i);Q=[]}}Q=null}}function he(e){for(var t=Ie=e;t.parent!==null;){t=t.parent;var r=t.f;if(rt&&t===g&&(r&ae)!==0)return;if((r&(U|D))!==0){if((r&k)===0)return;t.f^=k}}K.push(t)}const V=new Map;function Ft(e,t){var r={f:0,v:e,reactions:null,equals:bt,rv:0,wv:0};return r}function H(e,t){const r=Ft(e);return ln(r),r}function Hr(e,t=!1,r=!0){const n=Ft(e);return t||(n.equals=Dr),n}function P(e,t,r=!1){p!==null&&(!F||(p.f&mt)!==0)&&xt()&&(p.f&(S|ae|wt|mt))!==0&&!M?.includes(e)&&Ar();let n=r?Ee(t):t;return Zr(e,n)}function Zr(e,t){if(!e.equals(t)){var r=e.v;re?V.set(e,t):V.set(e,r),e.v=t;var n=X.ensure();n.capture(e,r),(e.f&S)!==0&&((e.f&N)!==0&&et(e),O(e,(e.f&L)===0?k:Y)),e.wv=tr(),Dt(e,N),g!==null&&(g.f&k)!==0&&(g.f&(D|U))===0&&(A===null?un([e]):A.push(e))}return t}function nt(e){P(e,e.v+1)}function Dt(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,a=(o&N)===0;a&&O(s,t),(o&S)!==0?Dt(s,Y):a&&((o&ae)!==0&&Q!==null&&Q.push(s),he(s))}}function Ee(e){if(typeof e!="object"||e===null||Ke in e)return e;const t=gr(e);if(t!==_r&&t!==pr)return e;var r=new Map,n=vt(e),i=H(0),s=ne,o=a=>{if(ne===s)return a();var l=p,u=ne;G(null),er(s);var c=a();return G(l),er(u),c};return n&&r.set("length",H(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Lr();var c=r.get(l);return c===void 0?c=o(()=>{var _=H(u.value);return r.set(l,_),_}):P(c,u.value,!0),!0},deleteProperty(a,l){var u=r.get(l);if(u===void 0){if(l in a){const c=o(()=>H(y));r.set(l,c),nt(i)}}else P(u,y),nt(i);return!0},get(a,l,u){if(l===Ke)return e;var c=r.get(l),_=l in a;if(c===void 0&&(!_||oe(a,l)?.writable)&&(c=o(()=>{var h=Ee(_?a[l]:y),v=H(h);return v}),r.set(l,c)),c!==void 0){var d=W(c);return d===y?void 0:d}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=W(c))}else if(u===void 0){var _=r.get(l),d=_?.v;if(_!==void 0&&d!==y)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(a,l){if(l===Ke)return!0;var u=r.get(l),c=u!==void 0&&u.v!==y||Reflect.has(a,l);if(u!==void 0||g!==null&&(!c||oe(a,l)?.writable)){u===void 0&&(u=o(()=>{var d=c?Ee(a[l]):y,h=H(d);return h}),r.set(l,u));var _=W(u);if(_===y)return!1}return c},set(a,l,u,c){var _=r.get(l),d=l in a;if(n&&l==="length")for(var h=u;h<_.v;h+=1){var v=r.get(h+"");v!==void 0?P(v,y):h in a&&(v=o(()=>H(y)),r.set(h+"",v))}if(_===void 0)(!d||oe(a,l)?.writable)&&(_=o(()=>H(void 0)),P(_,Ee(u)),r.set(l,_));else{d=_.v!==y;var f=o(()=>Ee(u));P(_,f)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m?.set&&m.set.call(c,u),!d){if(n&&typeof l=="string"){var $=r.get("length"),x=Number(l);Number.isInteger(x)&&x>=$.v&&P($,x+1)}nt(i)}return!0},ownKeys(a){W(i);var l=Reflect.ownKeys(a).filter(_=>{var d=r.get(_);return d===void 0||d.v!==y});for(var[u,c]of r)c.v!==y&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Nr()}})}var Pt,Mt,jt,qt;function it(){if(Pt===void 0){Pt=window,Mt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;jt=oe(t,"firstChild").get,qt=oe(t,"nextSibling").get,_t(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),_t(r)&&(r.__t=void 0)}}function de(e=""){return document.createTextNode(e)}function ee(e){return jt.call(e)}function ve(e){return qt.call(e)}function Bt(e,t){if(!b)return ee(e);var r=ee(w);return r===null&&(r=w.appendChild(de())),fe(r),r}function De(e,t){if(!b){var r=ee(e);return r instanceof Comment&&r.data===""?ve(r):r}return w}function Gr(e){e.textContent=""}function Jr(){return!1}function Ut(e){var t=p,r=g;G(null),pe(null);try{return e()}finally{G(t),pe(r)}}function Wr(e){g===null&&p===null&&Sr(),p!==null&&(p.f&L)!==0&&g===null&&xr(),re&&Cr()}function Kr(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function te(e,t,r,n=!0){var i=g;i!==null&&(i.f&z)!==0&&(e|=z);var s={ctx:R,deps:null,nodes_start:null,nodes_end:null,f:e|N,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{ge(s),s.f|=Ge}catch(l){throw Z(s),l}else t!==null&&he(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&ke)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&Kr(o,i),p!==null&&(p.f&S)!==0&&(e&U)===0)){var a=p;(a.effects??=[]).push(o)}}return s}function Yt(e){Wr();var t=g.f,r=!p&&(t&D)!==0&&(t&Ge)===0;if(r){var n=R;(n.e??=[]).push(e)}else return zt(e)}function zt(e){return te(Ze|yr,e,!1)}function Xr(e){X.ensure();const t=te(U|ke,e,!0);return()=>{Z(t)}}function Qr(e){X.ensure();const t=te(U|ke,e,!0);return(r={})=>new Promise(n=>{r.outro?Gt(t,()=>{Z(t),n(void 0)}):(Z(t),n(void 0))})}function en(e){return te(Ze,e,!1)}function tn(e,t=0){return te(wr|t,e,!0)}function rn(e,t=0){var r=te(ae|t,e,!0);return r}function st(e,t=!0){return te(D|ke,e,!0,t)}function Vt(e){var t=e.teardown;if(t!==null){const r=re,n=p;Xt(!0),G(null);try{t.call(null)}finally{Xt(r),G(n)}}}function Ht(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ut(()=>{i.abort($t)});var n=r.next;(r.f&U)!==0?r.parent=null:Z(r,t),r=n}}function nn(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&D)===0&&Z(t),t=r}}function Z(e,t=!0){var r=!1;(t||(e.f&$r)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(sn(e.nodes_start,e.nodes_end),r=!0),Ht(e,t&&!r),Me(e,0),O(e,le);var n=e.transitions;if(n!==null)for(const s of n)s.stop();Vt(e);var i=e.parent;i!==null&&i.first!==null&&Zt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function sn(e,t){for(;e!==null;){var r=e===t?null:ve(e);e.remove(),e=r}}function Zt(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Gt(e,t){var r=[];Jt(e,r,!0),on(r,()=>{Z(e),t&&t()})}function on(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Jt(e,t,r){if((e.f&z)===0){if(e.f^=z,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Je)!==0||(n.f&D)!==0;Jt(n,t,s?r:!1),n=i}}}function an(e){Wt(e,!0)}function Wt(e,t){if((e.f&z)!==0){e.f^=z,(e.f&k)===0&&(O(e,N),he(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Je)!==0||(r.f&D)!==0;Wt(r,i?t:!1),r=n}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}let _e=!1;function Kt(e){_e=e}let re=!1;function Xt(e){re=e}let p=null,F=!1;function G(e){p=e}let g=null;function pe(e){g=e}let M=null;function ln(e){p!==null&&(M===null?M=[e]:M.push(e))}let E=null,T=0,A=null;function un(e){A=e}let Qt=1,Ce=0,ne=Ce;function er(e){ne=e}let J=!1;function tr(){return++Qt}function Pe(e){var t=e.f;if((t&N)!==0)return!0;if((t&Y)!==0){var r=e.deps,n=(t&L)!==0;if(r!==null){var i,s,o=(t&Te)!==0,a=n&&g!==null&&!J,l=r.length;if((o||a)&&(g===null||(g.f&le)===0)){var u=e,c=u.parent;for(i=0;i<l;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=Te),a&&c!==null&&(c.f&L)===0&&(u.f^=L)}for(i=0;i<l;i++)if(s=r[i],Pe(s)&&Lt(s),s.wv>e.wv)return!0}(!n||g!==null&&!J)&&O(e,k)}return!1}function rr(e,t,r=!0){var n=e.reactions;if(n!==null&&!M?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&S)!==0?rr(s,t,!1):t===s&&(r?O(s,N):(s.f&k)!==0&&O(s,Y),he(s))}}function nr(e){var t=E,r=T,n=A,i=p,s=J,o=M,a=R,l=F,u=ne,c=e.f;E=null,T=0,A=null,J=(c&L)!==0&&(F||!_e||p===null),p=(c&(D|U))===0?e:null,M=null,kt(e.ctx),F=!1,ne=++Ce,e.ac!==null&&(Ut(()=>{e.ac.abort($t)}),e.ac=null);try{e.f|=We;var _=e.fn,d=_(),h=e.deps;if(E!==null){var v;if(Me(e,T),h!==null&&T>0)for(h.length=T+E.length,v=0;v<E.length;v++)h[T+v]=E[v];else e.deps=h=E;if(!J||(c&S)!==0&&e.reactions!==null)for(v=T;v<h.length;v++)(h[v].reactions??=[]).push(e)}else h!==null&&T<h.length&&(Me(e,T),h.length=T);if(xt()&&A!==null&&!F&&h!==null&&(e.f&(S|Y|N))===0)for(v=0;v<A.length;v++)rr(A[v],e);return i!==null&&i!==e&&(Ce++,A!==null&&(n===null?n=A:n.push(...A))),(e.f&Oe)!==0&&(e.f^=Oe),d}catch(f){return jr(f)}finally{e.f^=We,E=t,T=r,A=n,p=i,J=s,M=o,kt(a),F=l,ne=u}}function fn(e,t){let r=t.reactions;if(r!==null){var n=dr.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&S)!==0&&(E===null||!E.includes(t))&&(O(t,Y),(t.f&(L|Te))===0&&(t.f^=Te),Ot(t),Me(t,0))}function Me(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)fn(e,r[n])}function ge(e){var t=e.f;if((t&le)===0){O(e,k);var r=g,n=_e;g=e,_e=!0;try{(t&ae)!==0?nn(e):Ht(e),Vt(e);var i=nr(e);e.teardown=typeof i=="function"?i:null,e.wv=Qt;var s;dt&&Pr&&(e.f&N)!==0&&e.deps}finally{_e=n,g=r}}}function W(e){var t=e.f,r=(t&S)!==0;if(p!==null&&!F){var n=g!==null&&(g.f&le)!==0;if(!n&&!M?.includes(e)){var i=p.deps;if((p.f&We)!==0)e.rv<Ce&&(e.rv=Ce,E===null&&i!==null&&i[T]===e?T++:E===null?E=[e]:(!J||!E.includes(e))&&E.push(e));else{(p.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[p]:s.includes(p)||s.push(p)}}}else if(r&&e.deps===null&&e.effects===null){var o=e,a=o.parent;a!==null&&(a.f&L)===0&&(o.f^=L)}if(re){if(V.has(e))return V.get(e);if(r){o=e;var l=o.v;return((o.f&k)===0&&o.reactions!==null||ir(o))&&(l=et(o)),V.set(o,l),l}}else r&&(o=e,Pe(o)&&Lt(o));if((e.f&Oe)!==0)throw e.v;return e.v}function ir(e){if(e.v===y)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(V.has(t)||(t.f&S)!==0&&ir(t))return!0;return!1}function cn(e){var t=F;try{return F=!0,e()}finally{F=t}}const hn=-7169;function O(e,t){e.f=e.f&hn|t}const sr=new Set,ot=new Set;function dn(e){for(var t=0;t<e.length;t++)sr.add(e[t]);for(var r of ot)r(e)}let or=null;function je(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;or=e;var o=0,a=or===e&&e.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||e.target,s!==t){se(e,"currentTarget",{configurable:!0,get(){return s||r}});var c=p,_=g;G(null),pe(null);try{for(var d,h=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var f=s["__"+n];if(f!=null&&(!s.disabled||e.target===s))if(vt(f)){var[m,...$]=f;m.apply(s,[e,...$])}else f.call(s,e)}catch(x){d?h.push(x):d=x}if(e.cancelBubble||v===t||v===null)break;s=v}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,G(c),pe(_)}}}function ar(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function j(e,t){var r=g;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function vn(e,t){var r=(t&hr)!==0,n,i=!e.startsWith("<!>");return()=>{if(b)return j(w,null),w;n===void 0&&(n=ar(i?e:"<!>"+e),n=ee(n));var s=r||Mt?document.importNode(n,!0):n.cloneNode(!0);return j(s,s),s}}function _n(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,s;return()=>{if(b)return j(w,null),w;if(!s){var o=ar(i),a=ee(o);s=ee(a)}var l=s.cloneNode(!0);return j(l,l),l}}function qe(e,t){return _n(e,t,"svg")}function pn(e=""){if(!b){var t=de(e+"");return j(t,t),t}var r=w;return r.nodeType!==kr&&(r.before(r=de()),fe(r)),j(r,r),r}function Be(){if(b)return j(w,null),w;var e=document.createDocumentFragment(),t=document.createComment(""),r=de();return e.append(t,r),j(t,r),e}function I(e,t){if(b){g.nodes_end=w,Ae();return}e!==null&&e.before(t)}const gn=["touchstart","touchmove"];function mn(e){return gn.includes(e)}function lr(e,t){return ur(e,t)}function wn(e,t){it(),t.intro=t.intro??!1;const r=t.target,n=b,i=w;try{for(var s=ee(r);s&&(s.nodeType!==Le||s.data!==ft);)s=ve(s);if(!s)throw ie;ue(!0),fe(s),Ae();const o=ur(e,{...t,anchor:s});if(w===null||w.nodeType!==Le||w.data!==ht)throw Ne(),ie;return ue(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==ie&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Or(),it(),Gr(r),ue(!1),lr(e,t)}finally{ue(n),fe(i)}}const me=new Map;function ur(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0}){it();var a=new Set,l=_=>{for(var d=0;d<_.length;d++){var h=_[d];if(!a.has(h)){a.add(h);var v=mn(h);t.addEventListener(h,je,{passive:v});var f=me.get(h);f===void 0?(document.addEventListener(h,je,{passive:v}),me.set(h,1)):me.set(h,f+1)}}};l(vr(sr)),ot.add(l);var u=void 0,c=Qr(()=>{var _=r??t.appendChild(de());return st(()=>{if(s){Et({});var d=R;d.c=s}i&&(n.$$events=i),b&&j(_,null),u=e(_,n)||{},b&&(g.nodes_end=w),s&&Ct()}),()=>{for(var d of a){t.removeEventListener(d,je);var h=me.get(d);--h===0?(document.removeEventListener(d,je),me.delete(d)):me.set(d,h)}ot.delete(l),_!==r&&_.parentNode?.removeChild(_)}});return at.set(u,c),u}let at=new WeakMap;function $n(e,t){const r=at.get(e);return r?(at.delete(e),r(t)):Promise.resolve()}function yn(e){R===null&&Er(),Yt(()=>{const t=cn(e);if(typeof t=="function")return t})}function Ue(e,t,r=!1){b&&Ae();var n=e,i=null,s=null,o=y,a=r?Je:0,l=!1;const u=(h,v=!0)=>{l=!0,d(v,h)};var c=null;function _(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var h=o?i:s,v=o?s:i;h&&an(h),v&&Gt(v,()=>{o?s=null:i=null})}const d=(h,v)=>{if(o===(o=h))return;let f=!1;if(b){const we=Ir(n)===ct;!!o===we&&(n=Rr(),fe(n),ue(!1),f=!0)}var m=Jr(),$=n;if(m&&(c=document.createDocumentFragment(),c.append($=de())),o?i??=v&&st(()=>v($)):s??=v&&st(()=>v($)),m){var x=C,ze=o?i:s,B=o?s:i;ze&&x.skipped_effects.delete(ze),B&&x.skipped_effects.add(B),x.add_callback(_)}else _();f&&ue(!0)};rn(()=>{l=!1,t(u),l||d(null,null)},a),b&&(n=w)}function bn(e,t,r,n,i){b&&Ae();var s=t.$$slots?.[r],o=!1;s===!0&&(s=t.children,o=!0),s===void 0?i!==null&&i(e):s(e,o?()=>n:n)}function kn(e,t){en(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function xe(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var l;l=()=>{var d=e[t];return d===void 0?o():(s=!0,d)};var u=!1,c=Yr(()=>(u=!1,l())),_=g;return(function(d,h){if(arguments.length>0){const v=h?W(c):d;return P(c,v),u=!0,i!==void 0&&(i=v),d}return re&&u||(_.f&le)!==0?c.v:W(c)})}function En(e){return new Cn(e)}class Cn{#t;#e;constructor(t){var r=new Map,n=(s,o)=>{var a=Hr(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return W(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===br?!0:(W(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return P(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#e=(t.hydrate?wn:lr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&ce(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||se(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{$n(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let fr;typeof HTMLElement=="function"&&(fr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),I(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=xn(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Ye(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=En({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Xr(()=>{tn(()=>{this.$$r=!0;for(const n of Se(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Ye(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ye(e,r,this.$$p_d,"toProp"),this.$$c?.$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 Se(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Ye(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function xn(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Sn(e,t,r,n,i,s){let o=class extends fr{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return Se(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Se(t).forEach(a=>{se(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Ye(a,l,t),this.$$d[a]=l;var u=this.$$c;if(u){var c=oe(u,a)?.get;c?u[a]=l:u.$set({[a]:l})}}})}),n.forEach(a=>{se(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}class q{constructor(t){this.authUrl=t.authUrl,this.authCookieName=t.authCookieName||"authToken"}async authorizeByToken(t){return q.authByToken(this.authUrl+"/token",t)}async checkLogin(t){return q.checkLogin(this.authUrl+"/token",this.authCookieName,t)}async authorizeSocialLogin(t){return q.authorizeSocialLogin(t,{authUrl:this.authUrl,authCookieName:this.authCookieName})}async socialLoginOauthAnswer(t){return q.socialLoginOauthAnswer(t,{authUrl:this.authUrl,authCookieName:this.authCookieName})}static async authByToken(t,r){const n=await fetch(t,{headers:{Authorization:r,"Content-Type":"application/json"},method:"POST",body:JSON.stringify({token:r})});if(n.ok){const i=await n.json();if(i.error)throw new Error("unauthorized");if(i.token)return i.token;throw console.error("no token on answer"),new Error("no token on answer")}else throw new Error("unauthorized")}static async checkLogin(t,r,n){if(!r)throw new Error("authCookieName is not defined");if(!t)throw new Error("tokenUri is not defined");let i="localStorage",s;if(s=localStorage.getItem(r),s||(s=sessionStorage.getItem(r),i="sessionStorage"),n){console.info("checking auth by token");try{const o=await q.authByToken(t,n);switch(console.info("new token token",o),i){case"localStorage":localStorage.setItem(r,o);break;case"sessionStorage":sessionStorage.setItem(r,o);break}return o}catch{throw new Error("token is not valid")}}if(s){console.info("checking local token",s);try{const o=await q.authByToken(t,s);switch(console.info("new token token",o),i){case"localStorage":localStorage.setItem(r,o);break;case"sessionStorage":sessionStorage.setItem(r,o);break}return o}catch(o){switch(console.error("error on authByToken",o),console.error("not logged"),i){case"localStorage":localStorage.removeItem(r);break;case"sessionStorage":sessionStorage.removeItem(r);break}throw new Error("not logged")}}else throw new Error("not authorized")}static async authorizeSocialLogin(t,r){const n=r.authUrl+"/social/login",i=await fetch(n,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(Object.assign({redirect_uri:t.redirect_uri},t))});if(console.log("server answer with",i),i.ok){const s=await i.json();return r.authCookieName&&localStorage.setItem(r.authCookieName,s.token),console.info("now is logged, token is: "+s.token),s.token}else try{const s=await i.json();throw new Error(JSON.stringify(s))}catch(s){throw s}}static async socialLoginOauthAnswer(t,r){console.log("auth socialLoginOauthAnswer",t);try{if(!t?.provider)return console.error("auth socialLoginOauthAnswer: no provider");const n={provider:t.provider,token:t.token||t.tmpCode,redirect_uri:t.redirect_uri};return n.token?await q.authorizeSocialLogin(n,r):console.error("auth socialLoginOauthAnswer: no token")}catch(n){console.error("auth socialLoginOauthAnswer:",n)}}}var Tn=(e,t)=>{t()},On=(e,t)=>{(e.key==="Enter"||e.key===" ")&&t()},Ln=qe('<svg viewBox="-.1 .5 960.2 923.9" width="100%" xmlns="http://www.w3.org/2000/svg"><path d="m958.9 442.4c1.1 26.1-2 52.1-9.2 77.2-7.1 25.1-18.3 48.8-33.1 70.3a240.43 240.43 0 0 1 -53.6 56.2l-.5.4-199.9 149.8-98.3 74.5-59.9 45.2c-3.5 2.7-7.4 4.7-11.5 6.1s-8.5 2.1-12.9 2.1c-4.3 0-8.7-.7-12.8-2.1s-8-3.4-11.5-6.1l-59.9-45.2-98.3-74.5-198.7-148.9-1.2-.8-.4-.4c-20.9-15.7-39-34.7-53.8-56.2s-26-45.3-33.2-70.4c-7.2-25.1-10.3-51.2-9.2-77.3 1.2-26.1 6.5-51.8 15.8-76.2l1.3-3.5 130.7-340.5q1-2.5 2.4-4.8 1.3-2.3 3.1-4.3 1.7-2.1 3.7-3.9 2-1.7 4.2-3.2c3.1-1.9 6.3-3.3 9.8-4.1 3.4-.9 7-1.3 10.5-1.1 3.6.2 7.1.9 10.4 2.2 3.3 1.2 6.5 3 9.3 5.2q2 1.7 3.9 3.6 1.8 2 3.2 4.3 1.5 2.2 2.6 4.7 1.1 2.4 1.8 5l88.1 269.7h356.6l88.1-269.7q.7-2.6 1.9-5 1.1-2.4 2.6-4.7 1.4-2.2 3.2-4.2 1.8-2 3.9-3.7c2.8-2.2 5.9-3.9 9.2-5.2 3.4-1.2 6.9-1.9 10.4-2.1 3.6-.2 7.1.1 10.6 1 3.4.9 6.7 2.3 9.7 4.2q2.3 1.4 4.3 3.2 2 1.7 3.7 3.8 1.7 2.1 3.1 4.4 1.3 2.3 2.3 4.8l130.5 340.6 1.3 3.5c9.3 24.3 14.6 50 15.7 76.1z" fill="#e24329"></path><path d="m959 442.5c1.1 26-2 52.1-9.2 77.2s-18.4 48.9-33.2 70.4-32.9 40.5-53.7 56.2l-.5.4-199.9 149.8s-84.9-64.1-182.5-138l286.5-216.8c12.9-9.7 26.4-18.6 40.3-26.8 13.9-8.3 28.3-15.7 43-22.3 14.8-6.6 29.9-12.5 45.2-17.4 15.4-5 31-9.1 46.9-12.4l1.3 3.5c9.3 24.4 14.6 50.1 15.8 76.2z" fill="#fc6d26"></path><path d="m480 658.5c97.6 73.7 182.6 138 182.6 138l-98.3 74.5-59.9 45.2c-3.5 2.7-7.4 4.7-11.5 6.1s-8.5 2.1-12.9 2.1c-4.3 0-8.7-.7-12.8-2.1s-8-3.4-11.5-6.1l-59.9-45.2-98.3-74.5s84.9-64.3 182.5-138z" fill="#fca326"></path><path d="m480 658.3c-97.7 73.9-182.5 138-182.5 138l-198.7-148.9-1.2-.8-.4-.4c-20.9-15.7-39-34.7-53.8-56.2s-26-45.3-33.2-70.4c-7.2-25.1-10.3-51.2-9.2-77.3 1.2-26.1 6.5-51.8 15.8-76.2l1.3-3.5c15.9 3.3 31.5 7.4 46.9 12.4 15.3 5 30.4 10.8 45.2 17.5 14.7 6.6 29.1 14.1 43 22.3s27.3 17.2 40.3 26.9z" fill="#fc6d26"></path></svg>'),Nn=qe('<svg width="100%" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z" transform="scale(64)" fill="#1B1F23"></path></svg>'),An=qe(`<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 287.56 191"><defs><style>.cls-1 {
|
|
3
3
|
fill: #0081fb;
|
|
4
4
|
}
|
|
5
5
|
.cls-2 {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @license: MIT License
|
|
17
17
|
*
|
|
18
|
-
*/function r(f,
|
|
18
|
+
*/function r(f,m){t.$$host.dispatchEvent(new CustomEvent(f,{detail:m}))}let n=xe(t,"provider",7,void 0),i=xe(t,"auth_cookie_name",7,void 0),s=xe(t,"social_auth_server_url",7,void 0),o=xe(t,"redirectonlogin",7,void 0),a=xe(t,"id",7,"");Yt(()=>{if(typeof n()=="string")try{n(JSON.parse(n()))}catch(f){console.error(f)}});async function l(){if(!n()?.name||!n().url&&!n().params)return console.error("Provider not defined");if(n().url)location.href=n().url;else if(n().params?.client_id&&n().params.redirect_url){if(!n().params.client_id||!n().params.redirect_url)return console.error("Missing client_id or redirect_url in oauth2ProvidersObj");let f;switch(n().name){case"google":f=`https://accounts.google.com/o/oauth2/v2/auth?scope=${n().params.scope}&include_granted_scopes=true&response_type=token&state=state_parameter_passthrough_value&client_id=${n().params.client_id}&redirect_uri=${n().params.redirect_url}`;break;case"github":f=`https://github.com/login/oauth/authorize?scope=${n().params.scope}&client_id=${n().params.client_id}&redirect_uri=${n().params.redirect_url}`;break;case"gitlab":f=`https://gitlab.com/oauth/authorize?scope=${n().params.scope}&response_type=code&state=${new Date().valueOf()}&client_id=${n().params.client_id}&redirect_uri=${n().params.redirect_url}`;break;case"facebook":f=`https://gitlab.com/oauth/authorize?scope=${n().params.scope}&response_type=code&state=${new Date().valueOf()}&client_id=${n().params.client_id}&redirect_uri=${n().params.redirect_url}`;break;case"authentik":f=`https://${n().params.auth_server_url}/application/o/authorize?scope=${n().params.scope}&response_type=code&state=${new Date().valueOf()}&client_id=${n().params.client_id}&redirect_uri=${n().params.redirect_url}`;break;default:return console.error("no provider uri composed for "+n().name)}if(f)location.href=f;else return console.error("no provider url obtained!?",n())}else console.warn("no provider uri or params defined for "+n().name),r("oauthFlowCustom",{provider:n().name})}function u(f){i()&&s()&&q.socialLoginOauthAnswer(f,{authUrl:s(),authCookieName:i()}).then(m=>{console.log("auth",m),o()?location.href=o():r("oauthFlowSuccess",{token:m})}).catch(m=>console.error("flowerr",m))}function c(){if(console.info("detecting by uri",location.href),n()?.name){if(n().name==="google"&&location?.href&&location.href.split("access_token=").length>1&&location.href.includes("google")){console.info("google auth login detected");const f=location.href.split("access_token=")[1].split("&")[0];u({provider:n().name,token:f}),r("oauthFlowInit",{provider:n().name,token:f})}if(n().name==="github"&&location?.href&&location.href.includes("code=")&&location.href.includes("provider=")&&location.href.split("provider=")[1].split("&")[0]==="github"){console.info("github auth login detected");const f=location.href.split("code=")[1].split("&")[0];u({provider:n().name,token:f,tmpCode:f}),r("oauthFlowInit",{provider:n().name,token:f,tmpCode:f})}if(n().name==="facebook"&&location?.href&&location.href.includes("code=")&&location.href.includes("provider=")&&location.href.split("provider=")[1].split("&")[0]==="facebook"){console.info("facebook auth login detected");const f=location.href.split("code=")[1].split("&")[0],m=location.href.split("state=")[1].split("&")[0],$=location.href.replace("&state=","").replace("?state=","").replace("&code=","").replace("?code=","").replace(f,"").replace(m,"");u({provider:n().name,token:f,tmpCode:f,redirect_uri:$}),r("oauthFlowInit",{provider:n().name,token:f,tmpCode:f,redirect_uri:$})}if(n().name==="gitlab"&&location?.href&&location.href.includes("provider=")&&location.href.includes("code=")&&location.href.split("provider=")[1].split("&")[0]==="gitlab"){const f=location.href.split("code=")[1].split("&")[0],m=location.href.split("state=")[1].split("&")[0],$=location.href.replace("&state=","").replace("?state=","").replace("&code=","").replace("?code=","").replace(f,"").replace(m,"");u({provider:n().name,token:f,tmpCode:f,redirect_uri:$}),r("oauthFlowInit",{provider:n().name,token:f,tmpCode:f,redirect_uri:location.href.replace("&state=","").replace("?state=","").replace("&code=","").replace("?code=","").replace(f,"").replace(m,"")})}if(n().name==="authentik"&&location?.href&&location.href.includes("provider=")&&location.href.includes("code=")&&location.href.split("provider=")[1].split("&")[0]==="authentik"){console.info("authentik auth login detected");const f=location.href.split("code=")[1].split("&")[0],m=location.href.split("state=")[1].split("&")[0],$=location.href.replace("&state=","").replace("?state=","").replace("&code=","").replace("?code=","").replace(f,"").replace(m,"");u({provider:n().name,token:f,tmpCode:f,redirect_uri:$}),r("oauthFlowInit",{provider:n().name,token:f,tmpCode:f,redirect_uri:$})}}}yn(()=>{c()});var _={get provider(){return n()},set provider(f=void 0){n(f),ce()},get auth_cookie_name(){return i()},set auth_cookie_name(f=void 0){i(f),ce()},get social_auth_server_url(){return s()},set social_auth_server_url(f=void 0){s(f),ce()},get redirectonlogin(){return o()},set redirectonlogin(f=void 0){o(f),ce()},get id(){return a()},set id(f=""){a(f),ce()}},d=In(),h=Bt(d);h.__click=[Tn,l],h.__keydown=[On,l];var v=Bt(h);return bn(v,t,"default",{},f=>{var m=Be(),$=De(m);{var x=B=>{var we=Ln();I(B,we)},ze=B=>{var we=Be(),Dn=De(we);{var Pn=$e=>{var Ve=Nn();I($e,Ve)},Mn=$e=>{var Ve=Be(),jn=De(Ve);{var qn=ye=>{var He=An();I(ye,He)},Bn=ye=>{var He=Be(),Un=De(He);{var Yn=be=>{var lt=Rn();I(be,lt)},zn=be=>{var lt=pn("btn");I(be,lt)};Ue(Un,be=>{n()?.name==="google"?be(Yn):be(zn,!1)},!0)}I(ye,He)};Ue(jn,ye=>{n()?.name==="facebook"?ye(qn):ye(Bn,!1)},!0)}I($e,Ve)};Ue(Dn,$e=>{n()?.name==="github"?$e(Pn):$e(Mn,!1)},!0)}I(B,we)};Ue($,B=>{n()?.name==="gitlab"?B(x):B(ze,!1)})}I(f,m)}),yt(h),yt(d),I(e,d),Ct(_)}dn(["click","keydown"]),customElements.define("hb-auth-social-login-button",Sn(cr,{provider:{},auth_cookie_name:{},social_auth_server_url:{},redirectonlogin:{},id:{}},["default"],[],!0)),ut.Component=cr,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})})(this["auth-social-login-button"]=this["auth-social-login-button"]||{});
|
|
19
19
|
//# sourceMappingURL=main.iife.js.map
|