@sesamy/sesamy-components 0.0.6 → 0.0.7

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.
@@ -1,9 +1,9 @@
1
- (function(j,z){typeof exports=="object"&&typeof module<"u"?z(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],z):(j=typeof globalThis<"u"?globalThis:j||self,z(j["@sesamy/sesamy-components"]={},j.Svelte))})(this,function(j,z){"use strict";var Rt=Object.defineProperty;var Dt=(j,z,y)=>z in j?Rt(j,z,{enumerable:!0,configurable:!0,writable:!0,value:y}):j[z]=y;var A=(j,z,y)=>Dt(j,typeof z!="symbol"?z+"":z,y);function y(){}function M(t,e){for(const n in e)t[n]=e[n];return t}function ze(t){return t()}function Ee(){return Object.create(null)}function F(t){t.forEach(ze)}function Se(t){return typeof t=="function"}function Y(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let ue;function Le(t,e){return t===e?!0:(ue||(ue=document.createElement("a")),ue.href=e,t===ue.href)}function lt(t){return Object.keys(t).length===0}function Ne(t,e,n,l){if(t){const s=Ae(t,e,n,l);return t[0](s)}}function Ae(t,e,n,l){return t[1]&&l?M(n.ctx.slice(),t[1](l(e))):n.ctx}function Oe(t,e,n,l){if(t[2]&&l){const s=t[2](l(n));if(e.dirty===void 0)return s;if(typeof s=="object"){const i=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r<o;r+=1)i[r]=e.dirty[r]|s[r];return i}return e.dirty|s}return e.dirty}function Pe(t,e,n,l,s,i){if(s){const o=Ae(e,n,l,i);t.p(o,s)}}function Te(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let l=0;l<n;l++)e[l]=-1;return e}return-1}function ae(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Me(t,e){const n={};e=new Set(e);for(const l in t)!e.has(l)&&l[0]!=="$"&&(n[l]=t[l]);return n}function u(t,e){t.appendChild(e)}function We(t,e,n){const l=st(t);if(!l.getElementById(e)){const s=p("style");s.id=e,s.textContent=n,it(l,s)}}function st(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function it(t,e){return u(t.head||t,e),e.sheet}function S(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function ge(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function p(t){return document.createElement(t)}function Be(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ie(t){return document.createTextNode(t)}function b(){return Ie(" ")}function me(){return Ie("")}function O(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function f(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function fe(t,e){for(const n in e)f(t,n,e[n])}function ot(t){let e;return{p(...n){e=n,e.forEach(l=>t.push(l))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function rt(t){return Array.from(t.childNodes)}function de(t,e){t.value=e??""}function ct(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let _e;function se(t){_e=t}const Q=[],Re=[];let X=[];const De=[],ut=Promise.resolve();let be=!1;function at(){be||(be=!0,ut.then(Fe))}function $e(t){X.push(t)}const ve=new Set;let Z=0;function Fe(){if(Z!==0)return;const t=_e;do{try{for(;Z<Q.length;){const e=Q[Z];Z++,se(e),ft(e.$$)}}catch(e){throw Q.length=0,Z=0,e}for(se(null),Q.length=0,Z=0;Re.length;)Re.pop()();for(let e=0;e<X.length;e+=1){const n=X[e];ve.has(n)||(ve.add(n),n())}X.length=0}while(Q.length);for(;De.length;)De.pop()();be=!1,ve.clear(),se(t)}function ft(t){if(t.fragment!==null){t.update(),F(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach($e)}}function dt(t){const e=[],n=[];X.forEach(l=>t.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),X=e}const he=new Set;let H;function ht(){H={r:0,c:[],p:H}}function pt(){H.r||F(H.c),H=H.p}function W(t,e){t&&t.i&&(he.delete(t),t.i(e))}function ee(t,e,n,l){if(t&&t.o){if(he.has(t))return;he.add(t),H.c.push(()=>{he.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function te(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function ke(t,e){const n={},l={},s={$$scope:1};let i=t.length;for(;i--;){const o=t[i],r=e[i];if(r){for(const a in o)a in r||(l[a]=1);for(const a in r)s[a]||(n[a]=r[a],s[a]=1);t[i]=r}else for(const a in o)s[a]=1}for(const o in l)o in n||(n[o]=void 0);return n}function gt(t){return typeof t=="object"&&t!==null?t:{}}function He(t){t&&t.c()}function ye(t,e,n){const{fragment:l,after_update:s}=t.$$;l&&l.m(e,n),$e(()=>{const i=t.$$.on_mount.map(ze).filter(Se);t.$$.on_destroy?t.$$.on_destroy.push(...i):F(i),t.$$.on_mount=[]}),s.forEach($e)}function we(t,e){const n=t.$$;n.fragment!==null&&(dt(n.after_update),F(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function mt(t,e){t.$$.dirty[0]===-1&&(Q.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ie(t,e,n,l,s,i,o=null,r=[-1]){const a=_e;se(t);const h=t.$$={fragment:null,ctx:[],props:i,update:y,not_equal:s,bound:Ee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:Ee(),dirty:r,skip_bound:!1,root:e.target||a.$$.root};o&&o(h.root);let $=!1;if(h.ctx=n?n(t,e.props||{},(_,c,...v)=>{const d=v.length?v[0]:c;return h.ctx&&s(h.ctx[_],h.ctx[_]=d)&&(!h.skip_bound&&h.bound[_]&&h.bound[_](d),$&&mt(t,_)),c}):[],h.update(),$=!0,F(h.before_update),h.fragment=l?l(h.ctx):!1,e.target){if(e.hydrate){const _=rt(e.target);h.fragment&&h.fragment.l(_),_.forEach(E)}else h.fragment&&h.fragment.c();e.intro&&W(t.$$.fragment),ye(t,e.target,e.anchor),Fe()}se(a)}let Ke;typeof HTMLElement=="function"&&(Ke=class extends HTMLElement{constructor(e,n,l){super();A(this,"$$ctor");A(this,"$$s");A(this,"$$c");A(this,"$$cn",!1);A(this,"$$d",{});A(this,"$$r",!1);A(this,"$$p_d",{});A(this,"$$l",{});A(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=n,l&&this.attachShadow({mode:"open"})}addEventListener(e,n,l){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const s=this.$$c.$on(e,n);this.$$l_u.set(n,s)}super.addEventListener(e,n,l)}removeEventListener(e,n,l){if(super.removeEventListener(e,n,l),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return()=>{let o;return{c:function(){o=p("slot"),i!=="default"&&f(o,"name",i)},m:function(h,$){S(h,o,$)},d:function(h){h&&E(o)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},l=ct(this);for(const i of this.$$s)i in l&&(n[i]=[e(i)]);for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=pe(o,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const o=pe(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const i in this.$$l)for(const o of this.$$l[i]){const r=this.$$c.$on(i,o);this.$$l_u.set(o,r)}this.$$l={}}}attributeChangedCallback(e,n,l){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=pe(e,l,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function pe(t,e,n,l){var i;const s=(i=n[t])==null?void 0:i.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!l||!n[t])return e;if(l==="toAttribute")switch(s){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(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function qe(t,e,n,l,s,i){let o=class extends Ke{constructor(){super(t,n,s),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(r=>(e[r].attribute||r).toLowerCase())}};return Object.keys(e).forEach(r=>{Object.defineProperty(o.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(a){var h;a=pe(r,a,e),this.$$d[r]=a,(h=this.$$c)==null||h.$set({[r]:a})}})}),l.forEach(r=>{Object.defineProperty(o.prototype,r,{get(){var a;return(a=this.$$c)==null?void 0:a[r]}})}),t.element=o,o}class oe{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){we(this,1),this.$destroy=y}$on(e,n){if(!Se(n))return y;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(e){this.$$set&&!lt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const _t="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_t);function bt(t){We(t,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function $t(t){let e,n,l;return{c(){e=p("button"),e.textContent="Login",f(e,"class","login-btn svelte-1nq6lsq"),f(e,"aria-label","Log in")},m(s,i){S(s,e,i),n||(l=O(e,"click",t[2]),n=!0)},p:y,d(s){s&&E(e),n=!1,l()}}}function vt(t){let e,n,l,s,i;return{c(){e=p("button"),n=p("img"),Le(n.src,l=wt)||f(n,"src",l),f(n,"alt","User Avatar"),f(n,"class","svelte-1nq6lsq"),f(e,"class","avatar-btn svelte-1nq6lsq"),f(e,"aria-label","Log out")},m(o,r){S(o,e,r),u(e,n),s||(i=O(e,"click",t[3]),s=!0)},p:y,d(o){o&&E(e),s=!1,i()}}}function kt(t){let e;return{c(){e=p("button"),e.innerHTML="",f(e,"class","loading-btn svelte-1nq6lsq"),f(e,"aria-busy","true"),f(e,"aria-label","Logging in")},m(n,l){S(n,e,l)},p:y,d(n){n&&E(e)}}}function yt(t){let e;function n(i,o){return i[0]?kt:i[1]?vt:$t}let l=n(t),s=l(t);return{c(){s.c(),e=me()},m(i,o){s.m(i,o),S(i,e,o)},p(i,[o]){l===(l=n(i))&&s?s.p(i,o):(s.d(1),s=l(i),s&&(s.c(),s.m(e.parentNode,e)))},i:y,o:y,d(i){i&&E(e),s.d(i)}}}let wt="https://via.placeholder.com/50";function qt(t,e,n){let l=!1,s=!1;const i=async()=>{n(0,l=!0),await new Promise(a=>setTimeout(a,2e3)),n(0,l=!1),n(1,s=!0)},o=()=>{n(1,s=!1)};return s=s,[l,s,i,o]}class Ge extends oe{constructor(e){super(),ie(this,e,qt,yt,Y,{},bt)}}customElements.define("sesamy-login",qe(Ge,{},[],[],!0));const jt=Ge;/**
1
+ (function(j,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(j=typeof globalThis<"u"?globalThis:j||self,$(j["@sesamy/sesamy-components"]={}))})(this,function(j){"use strict";var Ht=Object.defineProperty;var It=(j,$,z)=>$ in j?Ht(j,$,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[$]=z;var L=(j,$,z)=>It(j,typeof $!="symbol"?$+"":$,z);function $(){}function z(t,e){for(const n in e)t[n]=e[n];return t}function Ce(t){return t()}function ze(){return Object.create(null)}function I(t){t.forEach(Ce)}function Ee(t){return typeof t=="function"}function V(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let ue;function Ne(t,e){return t===e?!0:(ue||(ue=document.createElement("a")),ue.href=e,t===ue.href)}function lt(t){return Object.keys(t).length===0}function Se(t,e,n,l){if(t){const s=Le(t,e,n,l);return t[0](s)}}function Le(t,e,n,l){return t[1]&&l?z(n.ctx.slice(),t[1](l(e))):n.ctx}function Ae(t,e,n,l){if(t[2]&&l){const s=t[2](l(n));if(e.dirty===void 0)return s;if(typeof s=="object"){const o=[],i=Math.max(e.dirty.length,s.length);for(let r=0;r<i;r+=1)o[r]=e.dirty[r]|s[r];return o}return e.dirty|s}return e.dirty}function Pe(t,e,n,l,s,o){if(s){const i=Le(e,n,l,o);t.p(i,s)}}function Oe(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let l=0;l<n;l++)e[l]=-1;return e}return-1}function ae(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Te(t,e){const n={};e=new Set(e);for(const l in t)!e.has(l)&&l[0]!=="$"&&(n[l]=t[l]);return n}function u(t,e){t.appendChild(e)}function Me(t,e,n){const l=st(t);if(!l.getElementById(e)){const s=m("style");s.id=e,s.textContent=n,ot(l,s)}}function st(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function ot(t,e){return u(t.head||t,e),e.sheet}function N(t,e,n){t.insertBefore(e,n||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function me(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function m(t){return document.createElement(t)}function Be(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function We(t){return document.createTextNode(t)}function b(){return We(" ")}function ge(){return We("")}function P(t,e,n,l){return t.addEventListener(e,n,l),()=>t.removeEventListener(e,n,l)}function a(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function fe(t,e){for(const n in e)a(t,n,e[n])}function it(t){let e;return{p(...n){e=n,e.forEach(l=>t.push(l))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function rt(t){return Array.from(t.childNodes)}function He(t,e){t.value=e??""}function ct(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let pe;function se(t){pe=t}const J=[],Ie=[];let Y=[];const Fe=[],ut=Promise.resolve();let _e=!1;function at(){_e||(_e=!0,ut.then(De))}function be(t){Y.push(t)}const $e=new Set;let Q=0;function De(){if(Q!==0)return;const t=pe;do{try{for(;Q<J.length;){const e=J[Q];Q++,se(e),ft(e.$$)}}catch(e){throw J.length=0,Q=0,e}for(se(null),J.length=0,Q=0;Ie.length;)Ie.pop()();for(let e=0;e<Y.length;e+=1){const n=Y[e];$e.has(n)||($e.add(n),n())}Y.length=0}while(J.length);for(;Fe.length;)Fe.pop()();_e=!1,$e.clear(),se(t)}function ft(t){if(t.fragment!==null){t.update(),I(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(be)}}function dt(t){const e=[],n=[];Y.forEach(l=>t.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),Y=e}const de=new Set;let F;function ht(){F={r:0,c:[],p:F}}function mt(){F.r||I(F.c),F=F.p}function M(t,e){t&&t.i&&(de.delete(t),t.i(e))}function X(t,e,n,l){if(t&&t.o){if(de.has(t))return;de.add(t),F.c.push(()=>{de.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function Z(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function ve(t,e){const n={},l={},s={$$scope:1};let o=t.length;for(;o--;){const i=t[o],r=e[o];if(r){for(const f in i)f in r||(l[f]=1);for(const f in r)s[f]||(n[f]=r[f],s[f]=1);t[o]=r}else for(const f in i)s[f]=1}for(const i in l)i in n||(n[i]=void 0);return n}function gt(t){return typeof t=="object"&&t!==null?t:{}}function Re(t){t&&t.c()}function ye(t,e,n){const{fragment:l,after_update:s}=t.$$;l&&l.m(e,n),be(()=>{const o=t.$$.on_mount.map(Ce).filter(Ee);t.$$.on_destroy?t.$$.on_destroy.push(...o):I(o),t.$$.on_mount=[]}),s.forEach(be)}function ke(t,e){const n=t.$$;n.fragment!==null&&(dt(n.after_update),I(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function pt(t,e){t.$$.dirty[0]===-1&&(J.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function oe(t,e,n,l,s,o,i=null,r=[-1]){const f=pe;se(t);const h=t.$$={fragment:null,ctx:[],props:o,update:$,not_equal:s,bound:ze(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:ze(),dirty:r,skip_bound:!1,root:e.target||f.$$.root};i&&i(h.root);let v=!1;if(h.ctx=n?n(t,e.props||{},(_,c,...y)=>{const d=y.length?y[0]:c;return h.ctx&&s(h.ctx[_],h.ctx[_]=d)&&(!h.skip_bound&&h.bound[_]&&h.bound[_](d),v&&pt(t,_)),c}):[],h.update(),v=!0,I(h.before_update),h.fragment=l?l(h.ctx):!1,e.target){if(e.hydrate){const _=rt(e.target);h.fragment&&h.fragment.l(_),_.forEach(E)}else h.fragment&&h.fragment.c();e.intro&&M(t.$$.fragment),ye(t,e.target,e.anchor),De()}se(f)}let Ke;typeof HTMLElement=="function"&&(Ke=class extends HTMLElement{constructor(e,n,l){super();L(this,"$$ctor");L(this,"$$s");L(this,"$$c");L(this,"$$cn",!1);L(this,"$$d",{});L(this,"$$r",!1);L(this,"$$p_d",{});L(this,"$$l",{});L(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=n,l&&this.attachShadow({mode:"open"})}addEventListener(e,n,l){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const s=this.$$c.$on(e,n);this.$$l_u.set(n,s)}super.addEventListener(e,n,l)}removeEventListener(e,n,l){if(super.removeEventListener(e,n,l),this.$$c){const s=this.$$l_u.get(n);s&&(s(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return()=>{let i;return{c:function(){i=m("slot"),o!=="default"&&a(i,"name",o)},m:function(h,v){N(h,i,v)},d:function(h){h&&E(i)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},l=ct(this);for(const o of this.$$s)o in l&&(n[o]=[e(o)]);for(const o of this.attributes){const i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=he(i,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=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const i=he(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const o in this.$$l)for(const i of this.$$l[o]){const r=this.$$c.$on(o,i);this.$$l_u.set(i,r)}this.$$l={}}}attributeChangedCallback(e,n,l){var s;this.$$r||(e=this.$$g_p(e),this.$$d[e]=he(e,l,this.$$p_d,"toProp"),(s=this.$$c)==null||s.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function he(t,e,n,l){var o;const s=(o=n[t])==null?void 0:o.type;if(e=s==="Boolean"&&typeof e!="boolean"?e!=null:e,!l||!n[t])return e;if(l==="toAttribute")switch(s){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(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function we(t,e,n,l,s,o){let i=class extends Ke{constructor(){super(t,n,s),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(r=>(e[r].attribute||r).toLowerCase())}};return Object.keys(e).forEach(r=>{Object.defineProperty(i.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(f){var h;f=he(r,f,e),this.$$d[r]=f,(h=this.$$c)==null||h.$set({[r]:f})}})}),l.forEach(r=>{Object.defineProperty(i.prototype,r,{get(){var f;return(f=this.$$c)==null?void 0:f[r]}})}),t.element=i,i}class ie{constructor(){L(this,"$$");L(this,"$$set")}$destroy(){ke(this,1),this.$destroy=$}$on(e,n){if(!Ee(n))return $;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(e){this.$$set&&!lt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const _t="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_t);function bt(t){Me(t,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function $t(t){let e,n,l;return{c(){e=m("button"),e.textContent="Login",a(e,"class","login-btn svelte-1nq6lsq"),a(e,"aria-label","Log in")},m(s,o){N(s,e,o),n||(l=P(e,"click",t[2]),n=!0)},p:$,d(s){s&&E(e),n=!1,l()}}}function vt(t){let e,n,l,s,o;return{c(){e=m("button"),n=m("img"),Ne(n.src,l=wt)||a(n,"src",l),a(n,"alt","User Avatar"),a(n,"class","svelte-1nq6lsq"),a(e,"class","avatar-btn svelte-1nq6lsq"),a(e,"aria-label","Log out")},m(i,r){N(i,e,r),u(e,n),s||(o=P(e,"click",t[3]),s=!0)},p:$,d(i){i&&E(e),s=!1,o()}}}function yt(t){let e;return{c(){e=m("button"),e.innerHTML="",a(e,"class","loading-btn svelte-1nq6lsq"),a(e,"aria-busy","true"),a(e,"aria-label","Logging in")},m(n,l){N(n,e,l)},p:$,d(n){n&&E(e)}}}function kt(t){let e;function n(o,i){return o[0]?yt:o[1]?vt:$t}let l=n(t),s=l(t);return{c(){s.c(),e=ge()},m(o,i){s.m(o,i),N(o,e,i)},p(o,[i]){l===(l=n(o))&&s?s.p(o,i):(s.d(1),s=l(o),s&&(s.c(),s.m(e.parentNode,e)))},i:$,o:$,d(o){o&&E(e),s.d(o)}}}let wt="https://via.placeholder.com/50";function xt(t,e,n){let l=!1,s=!1;const o=async()=>{n(0,l=!0),await new Promise(f=>setTimeout(f,2e3)),n(0,l=!1),n(1,s=!0)},i=()=>{n(1,s=!1)};return s=s,[l,s,o,i]}class Ge extends ie{constructor(e){super(),oe(this,e,xt,kt,V,{},bt)}}customElements.define("sesamy-login",we(Ge,{},[],[],!0));const qt=Ge;/**
2
2
  * @license lucide-svelte v0.445.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Ue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Ve(t,e,n){const l=t.slice();return l[11]=e[n][0],l[12]=e[n][1],l}function je(t){let e,n=[t[12]],l={};for(let s=0;s<n.length;s+=1)l=M(l,n[s]);return{c(){e=Be(t[11]),fe(e,l)},m(s,i){S(s,e,i)},p(s,i){fe(e,l=ke(n,[i&32&&s[12]]))},d(s){s&&E(e)}}}function Je(t){let e=t[11],n,l=t[11]&&je(t);return{c(){l&&l.c(),n=me()},m(s,i){l&&l.m(s,i),S(s,n,i)},p(s,i){s[11]?e?Y(e,s[11])?(l.d(1),l=je(s),e=s[11],l.c(),l.m(n.parentNode,n)):l.p(s,i):(l=je(s),e=s[11],l.c(),l.m(n.parentNode,n)):e&&(l.d(1),l=null,e=s[11])},d(s){s&&E(n),l&&l.d(s)}}}function xt(t){let e,n,l,s,i,o=te(t[5]),r=[];for(let c=0;c<o.length;c+=1)r[c]=Je(Ve(t,o,c));const a=t[10].default,h=Ne(a,t,t[9],null);let $=[Ue,t[7],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":l=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:s=t[6]("lucide-icon","lucide",t[0]?`lucide-${t[0]}`:"",t[8].class)}],_={};for(let c=0;c<$.length;c+=1)_=M(_,$[c]);return{c(){e=Be("svg");for(let c=0;c<r.length;c+=1)r[c].c();n=me(),h&&h.c(),fe(e,_)},m(c,v){S(c,e,v);for(let d=0;d<r.length;d+=1)r[d]&&r[d].m(e,null);u(e,n),h&&h.m(e,null),i=!0},p(c,[v]){if(v&32){o=te(c[5]);let d;for(d=0;d<o.length;d+=1){const P=Ve(c,o,d);r[d]?r[d].p(P,v):(r[d]=Je(P),r[d].c(),r[d].m(e,n))}for(;d<r.length;d+=1)r[d].d(1);r.length=o.length}h&&h.p&&(!i||v&512)&&Pe(h,a,c,c[9],i?Oe(a,c[9],v,null):Te(c[9]),null),fe(e,_=ke($,[Ue,v&128&&c[7],(!i||v&4)&&{width:c[2]},(!i||v&4)&&{height:c[2]},(!i||v&2)&&{stroke:c[1]},(!i||v&28&&l!==(l=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":l},(!i||v&257&&s!==(s=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:s}]))},i(c){i||(W(h,c),i=!0)},o(c){ee(h,c),i=!1},d(c){c&&E(e),ge(r,c),h&&h.d(c)}}}function Ct(t,e,n){const l=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let s=Me(e,l),{$$slots:i={},$$scope:o}=e,{name:r=void 0}=e,{color:a="currentColor"}=e,{size:h=24}=e,{strokeWidth:$=2}=e,{absoluteStrokeWidth:_=!1}=e,{iconNode:c=[]}=e;const v=(...d)=>d.filter((P,L,K)=>!!P&&K.indexOf(P)===L).join(" ");return t.$$set=d=>{n(8,e=M(M({},e),ae(d))),n(7,s=Me(e,l)),"name"in d&&n(0,r=d.name),"color"in d&&n(1,a=d.color),"size"in d&&n(2,h=d.size),"strokeWidth"in d&&n(3,$=d.strokeWidth),"absoluteStrokeWidth"in d&&n(4,_=d.absoluteStrokeWidth),"iconNode"in d&&n(5,c=d.iconNode),"$$scope"in d&&n(9,o=d.$$scope)},e=ae(e),[r,a,h,$,_,c,v,s,e,o,i]}class zt extends oe{constructor(e){super(),ie(this,e,Ct,xt,Y,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Et(t){let e;const n=t[2].default,l=Ne(n,t,t[3],null);return{c(){l&&l.c()},m(s,i){l&&l.m(s,i),e=!0},p(s,i){l&&l.p&&(!e||i&8)&&Pe(l,n,s,s[3],e?Oe(n,s[3],i,null):Te(s[3]),null)},i(s){e||(W(l,s),e=!0)},o(s){ee(l,s),e=!1},d(s){l&&l.d(s)}}}function St(t){let e,n;const l=[{name:"circle-check"},t[1],{iconNode:t[0]}];let s={$$slots:{default:[Et]},$$scope:{ctx:t}};for(let i=0;i<l.length;i+=1)s=M(s,l[i]);return e=new zt({props:s}),{c(){He(e.$$.fragment)},m(i,o){ye(e,i,o),n=!0},p(i,[o]){const r=o&3?ke(l,[l[0],o&2&&gt(i[1]),o&1&&{iconNode:i[0]}]):{};o&8&&(r.$$scope={dirty:o,ctx:i}),e.$set(r)},i(i){n||(W(e.$$.fragment,i),n=!0)},o(i){ee(e.$$.fragment,i),n=!1},d(i){we(e,i)}}}function Lt(t,e,n){let{$$slots:l={},$$scope:s}=e;const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return t.$$set=o=>{n(1,e=M(M({},e),ae(o))),"$$scope"in o&&n(3,s=o.$$scope)},e=ae(e),[i,e,l,s]}class Nt extends oe{constructor(e){super(),ie(this,e,Lt,St,Y,{})}}function Ye(t,e,n){const l=t.slice();return l[6]=e[n],l}function Qe(t,e,n){const l=t.slice();return l[9]=e[n],l}function Xe(t){let e,n,l,s,i,o;return n=new Nt({props:{class:"text-green-500 mr-2",size:20}}),{c(){e=p("li"),He(n.$$.fragment),l=b(),s=p("span"),s.textContent=`${t[9]}`,i=b(),f(e,"class","flex items-center")},m(r,a){S(r,e,a),ye(n,e,null),u(e,l),u(e,s),u(e,i),o=!0},p:y,i(r){o||(W(n.$$.fragment,r),o=!0)},o(r){ee(n.$$.fragment,r),o=!1},d(r){r&&E(e),we(n)}}}function Ze(t){let e,n;return{c(){e=p("img"),Le(e.src,n="/api/placeholder/40/25")||f(e,"src",n),f(e,"alt",t[6]),f(e,"class","h-6")},m(l,s){S(l,e,s)},p:y,d(l){l&&E(e)}}}function At(t){let e,n,l,s,i,o,r,a,h,$,_,c,v,d,P,L,K,C,w,B,ne,T,G,U,V,I,R,re,N,D,xe,Ce,nt,J=te(t[1]),k=[];for(let m=0;m<J.length;m+=1)k[m]=Xe(Qe(t,J,m));const It=m=>ee(k[m],1,1,()=>{k[m]=null});let le=te(t[2]),x=[];for(let m=0;m<le.length;m+=1)x[m]=Ze(Ye(t,le,m));return xe=ot(t[4][0]),{c(){e=p("div"),n=p("div"),n.textContent="Redan prenumerant? Logga in",l=b(),s=p("h1"),s.textContent="FOKUS",i=b(),o=p("h2"),o.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",r=b(),a=p("ul");for(let m=0;m<k.length;m+=1)k[m].c();h=b(),$=p("div"),_=p("label"),c=p("input"),v=b(),d=p("div"),d.innerHTML='<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>',P=b(),L=p("div"),L.textContent="79 SEK/6 mån",K=b(),C=p("label"),w=p("input"),B=b(),ne=p("div"),ne.innerHTML='<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>',T=b(),G=p("div"),G.textContent="995 SEK/år",U=b(),V=p("button"),V.textContent="Fortsätt",I=b(),R=p("div"),R.textContent="Säker SSL-krypterad betalning",re=b(),N=p("div");for(let m=0;m<x.length;m+=1)x[m].c();f(n,"class","text-right text-sm text-red-500 mb-4"),f(s,"class","text-4xl font-bold text-red-500 mb-4"),f(o,"class","text-xl font-semibold mb-6"),f(a,"class","space-y-2 mb-6"),f(c,"type","radio"),f(c,"name","subscription"),c.__value="sixMonths",de(c,c.__value),f(c,"class","mr-3"),f(L,"class","ml-auto font-semibold"),f(_,"class","flex items-center p-4 border rounded-lg"),f(w,"type","radio"),f(w,"name","subscription"),w.__value="oneYear",de(w,w.__value),f(w,"class","mr-3"),f(G,"class","ml-auto font-semibold"),f(C,"class","flex items-center p-4 border rounded-lg"),f($,"class","space-y-4 mb-6"),f(V,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),f(R,"class","text-center text-sm text-gray-600 mt-4"),f(N,"class","flex justify-center space-x-2 mt-2"),f(e,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),xe.p(c,w)},m(m,q){S(m,e,q),u(e,n),u(e,l),u(e,s),u(e,i),u(e,o),u(e,r),u(e,a);for(let g=0;g<k.length;g+=1)k[g]&&k[g].m(a,null);u(e,h),u(e,$),u($,_),u(_,c),c.checked=c.__value===t[0],u(_,v),u(_,d),u(_,P),u(_,L),u($,K),u($,C),u(C,w),w.checked=w.__value===t[0],u(C,B),u(C,ne),u(C,T),u(C,G),u(e,U),u(e,V),u(e,I),u(e,R),u(e,re),u(e,N);for(let g=0;g<x.length;g+=1)x[g]&&x[g].m(N,null);D=!0,Ce||(nt=[O(c,"change",t[3]),O(w,"change",t[5])],Ce=!0)},p(m,[q]){if(q&2){J=te(m[1]);let g;for(g=0;g<J.length;g+=1){const ce=Qe(m,J,g);k[g]?(k[g].p(ce,q),W(k[g],1)):(k[g]=Xe(ce),k[g].c(),W(k[g],1),k[g].m(a,null))}for(ht(),g=J.length;g<k.length;g+=1)It(g);pt()}if(q&1&&(c.checked=c.__value===m[0]),q&1&&(w.checked=w.__value===m[0]),q&4){le=te(m[2]);let g;for(g=0;g<le.length;g+=1){const ce=Ye(m,le,g);x[g]?x[g].p(ce,q):(x[g]=Ze(ce),x[g].c(),x[g].m(N,null))}for(;g<x.length;g+=1)x[g].d(1);x.length=le.length}},i(m){if(!D){for(let q=0;q<J.length;q+=1)W(k[q]);D=!0}},o(m){k=k.filter(Boolean);for(let q=0;q<k.length;q+=1)ee(k[q]);D=!1},d(m){m&&E(e),ge(k,m),ge(x,m),xe.r(),Ce=!1,F(nt)}}}function Ot(t,e,n){let l="sixMonths";const s=["Allt material på Fokus.se","Tillgång till e-tidning","Tillgång till våra podcasts","Nyhetsbrev"],i=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],o=[[]];function r(){l=this.__value,n(0,l)}function a(){l=this.__value,n(0,l)}return[l,s,i,r,o,a]}class et extends oe{constructor(e){super(),ie(this,e,Ot,At,Y,{})}}customElements.define("sesamy-paywall",qe(et,{},[],[],!0));const Pt=et;function Tt(t){We(t,"svelte-phjzbp",'.registration-wall.svelte-phjzbp{font-family:Arial, sans-serif;max-width:400px;margin:0 auto;padding:20px;text-align:center}h1.svelte-phjzbp{font-size:24px;margin-bottom:10px}p.svelte-phjzbp{font-size:16px;margin-bottom:20px}input.svelte-phjzbp{width:100%;padding:10px;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}button.svelte-phjzbp{width:100%;padding:10px;background-color:#000;color:#fff;border:none;border-radius:4px;cursor:pointer;margin-bottom:10px}.divider.svelte-phjzbp{margin:20px 0;text-align:center;position:relative}.divider.svelte-phjzbp::before,.divider.svelte-phjzbp::after{content:"";position:absolute;top:50%;width:45%;height:1px;background-color:#ccc}.divider.svelte-phjzbp::before{left:0}.divider.svelte-phjzbp::after{right:0}.social-button.svelte-phjzbp{background-color:#fff;color:#000;border:1px solid #ccc}a.svelte-phjzbp{color:#000;text-decoration:none}.terms.svelte-phjzbp{font-size:12px;margin-bottom:20px}')}function Mt(t){let e,n,l,s,i,o,r,a,h,$,_,c,v,d,P,L,K,C,w,B,ne,T,G,U,V,I,R,re;return{c(){e=p("div"),n=p("h1"),n.textContent="Create a free account, or log in.",l=b(),s=p("p"),s.textContent=`Gain access to limited free articles, news alerts, select newsletters,
7
- podcasts and some daily games.`,i=b(),o=p("label"),o.textContent="Email Address",r=b(),a=p("input"),h=b(),$=p("button"),$.textContent="Continue",_=b(),c=p("div"),c.textContent="or",v=b(),d=p("p"),d.innerHTML=`By continuing, you agree to the <a href="#terms" class="svelte-phjzbp">Terms of Sale</a>,
6
+ */const Ue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Ve(t,e,n){const l=t.slice();return l[11]=e[n][0],l[12]=e[n][1],l}function xe(t){let e,n=[t[12]],l={};for(let s=0;s<n.length;s+=1)l=z(l,n[s]);return{c(){e=Be(t[11]),fe(e,l)},m(s,o){N(s,e,o)},p(s,o){fe(e,l=ve(n,[o&32&&s[12]]))},d(s){s&&E(e)}}}function Je(t){let e=t[11],n,l=t[11]&&xe(t);return{c(){l&&l.c(),n=ge()},m(s,o){l&&l.m(s,o),N(s,n,o)},p(s,o){s[11]?e?V(e,s[11])?(l.d(1),l=xe(s),e=s[11],l.c(),l.m(n.parentNode,n)):l.p(s,o):(l=xe(s),e=s[11],l.c(),l.m(n.parentNode,n)):e&&(l.d(1),l=null,e=s[11])},d(s){s&&E(n),l&&l.d(s)}}}function jt(t){let e,n,l,s,o,i=Z(t[5]),r=[];for(let c=0;c<i.length;c+=1)r[c]=Je(Ve(t,i,c));const f=t[10].default,h=Se(f,t,t[9],null);let v=[Ue,t[7],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":l=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:s=t[6]("lucide-icon","lucide",t[0]?`lucide-${t[0]}`:"",t[8].class)}],_={};for(let c=0;c<v.length;c+=1)_=z(_,v[c]);return{c(){e=Be("svg");for(let c=0;c<r.length;c+=1)r[c].c();n=ge(),h&&h.c(),fe(e,_)},m(c,y){N(c,e,y);for(let d=0;d<r.length;d+=1)r[d]&&r[d].m(e,null);u(e,n),h&&h.m(e,null),o=!0},p(c,[y]){if(y&32){i=Z(c[5]);let d;for(d=0;d<i.length;d+=1){const A=Ve(c,i,d);r[d]?r[d].p(A,y):(r[d]=Je(A),r[d].c(),r[d].m(e,n))}for(;d<r.length;d+=1)r[d].d(1);r.length=i.length}h&&h.p&&(!o||y&512)&&Pe(h,f,c,c[9],o?Ae(f,c[9],y,null):Oe(c[9]),null),fe(e,_=ve(v,[Ue,y&128&&c[7],(!o||y&4)&&{width:c[2]},(!o||y&4)&&{height:c[2]},(!o||y&2)&&{stroke:c[1]},(!o||y&28&&l!==(l=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":l},(!o||y&257&&s!==(s=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:s}]))},i(c){o||(M(h,c),o=!0)},o(c){X(h,c),o=!1},d(c){c&&E(e),me(r,c),h&&h.d(c)}}}function Ct(t,e,n){const l=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let s=Te(e,l),{$$slots:o={},$$scope:i}=e,{name:r=void 0}=e,{color:f="currentColor"}=e,{size:h=24}=e,{strokeWidth:v=2}=e,{absoluteStrokeWidth:_=!1}=e,{iconNode:c=[]}=e;const y=(...d)=>d.filter((A,S,D)=>!!A&&D.indexOf(A)===S).join(" ");return t.$$set=d=>{n(8,e=z(z({},e),ae(d))),n(7,s=Te(e,l)),"name"in d&&n(0,r=d.name),"color"in d&&n(1,f=d.color),"size"in d&&n(2,h=d.size),"strokeWidth"in d&&n(3,v=d.strokeWidth),"absoluteStrokeWidth"in d&&n(4,_=d.absoluteStrokeWidth),"iconNode"in d&&n(5,c=d.iconNode),"$$scope"in d&&n(9,i=d.$$scope)},e=ae(e),[r,f,h,v,_,c,y,s,e,i,o]}class zt extends ie{constructor(e){super(),oe(this,e,Ct,jt,V,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Et(t){let e;const n=t[2].default,l=Se(n,t,t[3],null);return{c(){l&&l.c()},m(s,o){l&&l.m(s,o),e=!0},p(s,o){l&&l.p&&(!e||o&8)&&Pe(l,n,s,s[3],e?Ae(n,s[3],o,null):Oe(s[3]),null)},i(s){e||(M(l,s),e=!0)},o(s){X(l,s),e=!1},d(s){l&&l.d(s)}}}function Nt(t){let e,n;const l=[{name:"circle-check"},t[1],{iconNode:t[0]}];let s={$$slots:{default:[Et]},$$scope:{ctx:t}};for(let o=0;o<l.length;o+=1)s=z(s,l[o]);return e=new zt({props:s}),{c(){Re(e.$$.fragment)},m(o,i){ye(e,o,i),n=!0},p(o,[i]){const r=i&3?ve(l,[l[0],i&2&&gt(o[1]),i&1&&{iconNode:o[0]}]):{};i&8&&(r.$$scope={dirty:i,ctx:o}),e.$set(r)},i(o){n||(M(e.$$.fragment,o),n=!0)},o(o){X(e.$$.fragment,o),n=!1},d(o){ke(e,o)}}}function St(t,e,n){let{$$slots:l={},$$scope:s}=e;const o=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return t.$$set=i=>{n(1,e=z(z({},e),ae(i))),"$$scope"in i&&n(3,s=i.$$scope)},e=ae(e),[o,e,l,s]}class Lt extends ie{constructor(e){super(),oe(this,e,St,Nt,V,{})}}function Ye(t,e,n){const l=t.slice();return l[6]=e[n],l}function Qe(t,e,n){const l=t.slice();return l[9]=e[n],l}function Xe(t){let e,n,l,s,o,i;return n=new Lt({props:{class:"text-green-500 mr-2",size:20}}),{c(){e=m("li"),Re(n.$$.fragment),l=b(),s=m("span"),s.textContent=`${t[9]}`,o=b(),a(e,"class","flex items-center")},m(r,f){N(r,e,f),ye(n,e,null),u(e,l),u(e,s),u(e,o),i=!0},p:$,i(r){i||(M(n.$$.fragment,r),i=!0)},o(r){X(n.$$.fragment,r),i=!1},d(r){r&&E(e),ke(n)}}}function Ze(t){let e,n;return{c(){e=m("img"),Ne(e.src,n="/api/placeholder/40/25")||a(e,"src",n),a(e,"alt",t[6]),a(e,"class","h-6")},m(l,s){N(l,e,s)},p:$,d(l){l&&E(e)}}}function At(t){let e,n,l,s,o,i,r,f,h,v,_,c,y,d,A,S,D,C,w,B,te,O,R,K,G,W,H,re,T,ne,qe,je,nt,U=Z(t[1]),k=[];for(let p=0;p<U.length;p+=1)k[p]=Xe(Qe(t,U,p));const Wt=p=>X(k[p],1,1,()=>{k[p]=null});let le=Z(t[2]),q=[];for(let p=0;p<le.length;p+=1)q[p]=Ze(Ye(t,le,p));return qe=it(t[4][0]),{c(){e=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",l=b(),s=m("h1"),s.textContent="FOKUS",o=b(),i=m("h2"),i.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",r=b(),f=m("ul");for(let p=0;p<k.length;p+=1)k[p].c();h=b(),v=m("div"),_=m("label"),c=m("input"),y=b(),d=m("div"),d.innerHTML='<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>',A=b(),S=m("div"),S.textContent="79 SEK/6 mån",D=b(),C=m("label"),w=m("input"),B=b(),te=m("div"),te.innerHTML='<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>',O=b(),R=m("div"),R.textContent="995 SEK/år",K=b(),G=m("button"),G.textContent="Fortsätt",W=b(),H=m("div"),H.textContent="Säker SSL-krypterad betalning",re=b(),T=m("div");for(let p=0;p<q.length;p+=1)q[p].c();a(n,"class","text-right text-sm text-red-500 mb-4"),a(s,"class","text-4xl font-bold text-red-500 mb-4"),a(i,"class","text-xl font-semibold mb-6"),a(f,"class","space-y-2 mb-6"),a(c,"type","radio"),a(c,"name","subscription"),c.__value="sixMonths",He(c,c.__value),a(c,"class","mr-3"),a(S,"class","ml-auto font-semibold"),a(_,"class","flex items-center p-4 border rounded-lg"),a(w,"type","radio"),a(w,"name","subscription"),w.__value="oneYear",He(w,w.__value),a(w,"class","mr-3"),a(R,"class","ml-auto font-semibold"),a(C,"class","flex items-center p-4 border rounded-lg"),a(v,"class","space-y-4 mb-6"),a(G,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),a(H,"class","text-center text-sm text-gray-600 mt-4"),a(T,"class","flex justify-center space-x-2 mt-2"),a(e,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),qe.p(c,w)},m(p,x){N(p,e,x),u(e,n),u(e,l),u(e,s),u(e,o),u(e,i),u(e,r),u(e,f);for(let g=0;g<k.length;g+=1)k[g]&&k[g].m(f,null);u(e,h),u(e,v),u(v,_),u(_,c),c.checked=c.__value===t[0],u(_,y),u(_,d),u(_,A),u(_,S),u(v,D),u(v,C),u(C,w),w.checked=w.__value===t[0],u(C,B),u(C,te),u(C,O),u(C,R),u(e,K),u(e,G),u(e,W),u(e,H),u(e,re),u(e,T);for(let g=0;g<q.length;g+=1)q[g]&&q[g].m(T,null);ne=!0,je||(nt=[P(c,"change",t[3]),P(w,"change",t[5])],je=!0)},p(p,[x]){if(x&2){U=Z(p[1]);let g;for(g=0;g<U.length;g+=1){const ce=Qe(p,U,g);k[g]?(k[g].p(ce,x),M(k[g],1)):(k[g]=Xe(ce),k[g].c(),M(k[g],1),k[g].m(f,null))}for(ht(),g=U.length;g<k.length;g+=1)Wt(g);mt()}if(x&1&&(c.checked=c.__value===p[0]),x&1&&(w.checked=w.__value===p[0]),x&4){le=Z(p[2]);let g;for(g=0;g<le.length;g+=1){const ce=Ye(p,le,g);q[g]?q[g].p(ce,x):(q[g]=Ze(ce),q[g].c(),q[g].m(T,null))}for(;g<q.length;g+=1)q[g].d(1);q.length=le.length}},i(p){if(!ne){for(let x=0;x<U.length;x+=1)M(k[x]);ne=!0}},o(p){k=k.filter(Boolean);for(let x=0;x<k.length;x+=1)X(k[x]);ne=!1},d(p){p&&E(e),me(k,p),me(q,p),qe.r(),je=!1,I(nt)}}}function Pt(t,e,n){let l="sixMonths";const s=["Allt material på Fokus.se","Tillgång till e-tidning","Tillgång till våra podcasts","Nyhetsbrev"],o=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],i=[[]];function r(){l=this.__value,n(0,l)}function f(){l=this.__value,n(0,l)}return[l,s,o,r,i,f]}class et extends ie{constructor(e){super(),oe(this,e,Pt,At,V,{})}}customElements.define("sesamy-paywall",we(et,{},[],[],!0));const Ot=et;function Tt(t){Me(t,"svelte-phjzbp",'.registration-wall.svelte-phjzbp{font-family:Arial, sans-serif;max-width:400px;margin:0 auto;padding:20px;text-align:center}h1.svelte-phjzbp{font-size:24px;margin-bottom:10px}p.svelte-phjzbp{font-size:16px;margin-bottom:20px}input.svelte-phjzbp{width:100%;padding:10px;margin-bottom:10px;border:1px solid #ccc;border-radius:4px}button.svelte-phjzbp{width:100%;padding:10px;background-color:#000;color:#fff;border:none;border-radius:4px;cursor:pointer;margin-bottom:10px}.divider.svelte-phjzbp{margin:20px 0;text-align:center;position:relative}.divider.svelte-phjzbp::before,.divider.svelte-phjzbp::after{content:"";position:absolute;top:50%;width:45%;height:1px;background-color:#ccc}.divider.svelte-phjzbp::before{left:0}.divider.svelte-phjzbp::after{right:0}.social-button.svelte-phjzbp{background-color:#fff;color:#000;border:1px solid #ccc}a.svelte-phjzbp{color:#000;text-decoration:none}.terms.svelte-phjzbp{font-size:12px;margin-bottom:20px}')}function Mt(t){let e,n,l,s,o,i,r,f,h,v,_,c,y,d,A,S,D,C,w,B,te,O,R,K,G,W,H,re;return{c(){e=m("div"),n=m("h1"),n.textContent="Create a free account, or log in.",l=b(),s=m("p"),s.textContent=`Gain access to limited free articles, news alerts, select newsletters,
7
+ podcasts and some daily games.`,o=b(),i=m("label"),i.textContent="Email Address",r=b(),f=m("input"),h=b(),v=m("button"),v.textContent="Continue",_=b(),c=m("div"),c.textContent="or",y=b(),d=m("p"),d.innerHTML=`By continuing, you agree to the <a href="#terms" class="svelte-phjzbp">Terms of Sale</a>,
8
8
  <a href="#service" class="svelte-phjzbp">Terms of Service</a>, and
9
- <a href="#privacy" class="svelte-phjzbp">Privacy Policy</a>.`,P=b(),L=p("button"),L.textContent="Continue with Google",K=b(),C=p("button"),C.textContent="Continue with Facebook",w=b(),B=p("button"),B.textContent="Continue with Apple",ne=b(),T=p("a"),T.textContent="Continue with work or school single sign-on >",G=b(),U=p("p"),U.textContent="Enjoy unlimited access to all of The Times.",V=b(),I=p("button"),I.textContent="See subscription options",f(n,"class","svelte-phjzbp"),f(s,"class","svelte-phjzbp"),f(o,"for","email"),f(a,"type","email"),f(a,"id","email"),f(a,"placeholder","Enter your email"),f(a,"class","svelte-phjzbp"),f($,"class","svelte-phjzbp"),f(c,"class","divider svelte-phjzbp"),f(d,"class","terms svelte-phjzbp"),f(L,"class","social-button google svelte-phjzbp"),f(C,"class","social-button facebook svelte-phjzbp"),f(B,"class","social-button apple svelte-phjzbp"),f(T,"href","#"),f(T,"class","svelte-phjzbp"),f(U,"class","svelte-phjzbp"),f(I,"class","svelte-phjzbp"),f(e,"class","registration-wall svelte-phjzbp")},m(N,D){S(N,e,D),u(e,n),u(e,l),u(e,s),u(e,i),u(e,o),u(e,r),u(e,a),de(a,t[0]),u(e,h),u(e,$),u(e,_),u(e,c),u(e,v),u(e,d),u(e,P),u(e,L),u(e,K),u(e,C),u(e,w),u(e,B),u(e,ne),u(e,T),u(e,G),u(e,U),u(e,V),u(e,I),R||(re=[O(a,"input",t[5]),O($,"click",t[1]),O(L,"click",t[6]),O(C,"click",t[7]),O(B,"click",t[8]),O(T,"click",t[3]),O(I,"click",t[4])],R=!0)},p(N,[D]){D&1&&a.value!==N[0]&&de(a,N[0])},i:y,o:y,d(N){N&&E(e),R=!1,F(re)}}}function Wt(t,e,n){const l=z.createEventDispatcher();let s="";function i(){l("continue",{email:s})}function o(v){l("socialLogin",{provider:v})}function r(){l("workSchoolLogin")}function a(){l("subscriptionOptions")}function h(){s=this.value,n(0,s)}return[s,i,o,r,a,h,()=>o("google"),()=>o("facebook"),()=>o("apple")]}class tt extends oe{constructor(e){super(),ie(this,e,Wt,Mt,Y,{},Tt)}}customElements.define("sesamy-registration-wall",qe(tt,{},[],[],!0));const Bt=tt;j.Login=jt,j.Paywall=Pt,j.RegistrationWall=Bt,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
9
+ <a href="#privacy" class="svelte-phjzbp">Privacy Policy</a>.`,A=b(),S=m("button"),S.textContent="Continue with Google",D=b(),C=m("button"),C.textContent="Continue with Facebook",w=b(),B=m("button"),B.textContent="Continue with Apple",te=b(),O=m("a"),O.textContent="Continue with work or school single sign-on >",R=b(),K=m("p"),K.textContent="Enjoy unlimited access to all of The Times.",G=b(),W=m("button"),W.textContent="See subscription options",a(n,"class","svelte-phjzbp"),a(s,"class","svelte-phjzbp"),a(i,"for","email"),a(f,"type","email"),a(f,"id","email"),a(f,"placeholder","Enter your email"),a(f,"class","svelte-phjzbp"),a(v,"class","svelte-phjzbp"),a(c,"class","divider svelte-phjzbp"),a(d,"class","terms svelte-phjzbp"),a(S,"class","social-button google svelte-phjzbp"),a(C,"class","social-button facebook svelte-phjzbp"),a(B,"class","social-button apple svelte-phjzbp"),a(O,"href","#"),a(O,"class","svelte-phjzbp"),a(K,"class","svelte-phjzbp"),a(W,"class","svelte-phjzbp"),a(e,"class","registration-wall svelte-phjzbp")},m(T,ne){N(T,e,ne),u(e,n),u(e,l),u(e,s),u(e,o),u(e,i),u(e,r),u(e,f),u(e,h),u(e,v),u(e,_),u(e,c),u(e,y),u(e,d),u(e,A),u(e,S),u(e,D),u(e,C),u(e,w),u(e,B),u(e,te),u(e,O),u(e,R),u(e,K),u(e,G),u(e,W),H||(re=[P(v,"click",ee),P(S,"click",ee),P(C,"click",ee),P(B,"click",ee),P(O,"click",ee),P(W,"click",ee)],H=!0)},p:$,i:$,o:$,d(T){T&&E(e),H=!1,I(re)}}}function ee(){console.log("Button clicked")}class tt extends ie{constructor(e){super(),oe(this,e,null,Mt,V,{},Tt)}}customElements.define("sesamy-hello",we(tt,{},[],[],!0));const Bt=tt;j.Hello=Bt,j.Login=qt,j.Paywall=Ot,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sesamy/sesamy-components",
3
3
  "description": "Ahareable web components library with Vite + Svelte",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "type": "module",
6
6
  "module": "dist/lib/sesamy-components.es.js",
7
7
  "main": "dist/lib/sesamy-components.umd.js",