@sesamy/sesamy-components 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -41
- package/dist/lib/sesamy-components.d.ts +1 -0
- package/dist/lib/sesamy-components.es.js +885 -671
- package/dist/lib/sesamy-components.umd.js +4 -4
- package/package.json +1 -1
|
@@ -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(L,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(L=typeof globalThis<"u"?globalThis:L||self,v(L["@sesamy/sesamy-components"]={}))})(this,function(L){"use strict";var cn=Object.defineProperty;var an=(L,v,O)=>v in L?cn(L,v,{enumerable:!0,configurable:!0,writable:!0,value:O}):L[v]=O;var R=(L,v,O)=>an(L,typeof v!="symbol"?v+"":v,O);function v(){}function O(e,t){for(const n in t)e[n]=t[n];return e}function Ot(e){return e()}function Tt(){return Object.create(null)}function tt(e){e.forEach(Ot)}function Ft(e){return typeof e=="function"}function Y(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let bt;function Ht(e,t){return e===t?!0:(bt||(bt=document.createElement("a")),bt.href=t,e===bt.href)}function ce(e){return Object.keys(e).length===0}function _t(e,t,n,s){if(e){const l=Wt(e,t,n,s);return e[0](l)}}function Wt(e,t,n,s){return e[1]&&s?O(n.ctx.slice(),e[1](s(t))):n.ctx}function vt(e,t,n,s){if(e[2]&&s){const l=e[2](s(n));if(t.dirty===void 0)return l;if(typeof l=="object"){const i=[],r=Math.max(t.dirty.length,l.length);for(let a=0;a<r;a+=1)i[a]=t.dirty[a]|l[a];return i}return t.dirty|l}return t.dirty}function $t(e,t,n,s,l,i){if(l){const r=Wt(t,n,s,i);e.p(r,l)}}function wt(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let s=0;s<n;s++)t[s]=-1;return t}return-1}function kt(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function Vt(e,t){const n={};t=new Set(t);for(const s in e)!t.has(s)&&s[0]!=="$"&&(n[s]=e[s]);return n}function c(e,t){e.appendChild(t)}function zt(e,t,n){const s=ae(e);if(!s.getElementById(t)){const l=d("style");l.id=t,l.textContent=n,ue(s,l)}}function ae(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function ue(e,t){return c(e.head||e,t),t.sheet}function z(e,t,n){e.insertBefore(t,n||null)}function q(e){e.parentNode&&e.parentNode.removeChild(e)}function Et(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function d(e){return document.createElement(e)}function D(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function It(e){return document.createTextNode(e)}function b(){return It(" ")}function Lt(){return It("")}function A(e,t,n,s){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xt(e,t){for(const n in t)o(e,n,t[n])}function fe(e){let t;return{p(...n){t=n,t.forEach(s=>e.push(s))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function de(e){return Array.from(e.childNodes)}function Rt(e,t){e.value=t??""}function he(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let St;function ht(e){St=e}const lt=[],Dt=[];let it=[];const Gt=[],ge=Promise.resolve();let Nt=!1;function pe(){Nt||(Nt=!0,ge.then(Kt))}function At(e){it.push(e)}const Mt=new Set;let ot=0;function Kt(){if(ot!==0)return;const e=St;do{try{for(;ot<lt.length;){const t=lt[ot];ot++,ht(t),me(t.$$)}}catch(t){throw lt.length=0,ot=0,t}for(ht(null),lt.length=0,ot=0;Dt.length;)Dt.pop()();for(let t=0;t<it.length;t+=1){const n=it[t];Mt.has(n)||(Mt.add(n),n())}it.length=0}while(lt.length);for(;Gt.length;)Gt.pop()();Nt=!1,Mt.clear(),ht(e)}function me(e){if(e.fragment!==null){e.update(),tt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(At)}}function be(e){const t=[],n=[];it.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),it=t}const jt=new Set;let nt;function _e(){nt={r:0,c:[],p:nt}}function ve(){nt.r||tt(nt.c),nt=nt.p}function T(e,t){e&&e.i&&(jt.delete(e),e.i(t))}function G(e,t,n,s){if(e&&e.o){if(jt.has(e))return;jt.add(e),nt.c.push(()=>{jt.delete(e),s&&(n&&e.d(1),s())}),e.o(t)}else s&&s()}function rt(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Pt(e,t){const n={},s={},l={$$scope:1};let i=e.length;for(;i--;){const r=e[i],a=t[i];if(a){for(const h in r)h in a||(s[h]=1);for(const h in a)l[h]||(n[h]=a[h],l[h]=1);e[i]=a}else for(const h in r)l[h]=1}for(const r in s)r in n||(n[r]=void 0);return n}function $e(e){return typeof e=="object"&&e!==null?e:{}}function gt(e){e&&e.c()}function ct(e,t,n){const{fragment:s,after_update:l}=e.$$;s&&s.m(t,n),At(()=>{const i=e.$$.on_mount.map(Ot).filter(Ft);e.$$.on_destroy?e.$$.on_destroy.push(...i):tt(i),e.$$.on_mount=[]}),l.forEach(At)}function at(e,t){const n=e.$$;n.fragment!==null&&(be(n.after_update),tt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function we(e,t){e.$$.dirty[0]===-1&&(lt.push(e),pe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Q(e,t,n,s,l,i,r=null,a=[-1]){const h=St;ht(e);const p=e.$$={fragment:null,ctx:[],props:i,update:v,not_equal:l,bound:Tt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:Tt(),dirty:a,skip_bound:!1,root:t.target||h.$$.root};r&&r(p.root);let k=!1;if(p.ctx=n?n(e,t.props||{},(_,u,...w)=>{const g=w.length?w[0]:u;return p.ctx&&l(p.ctx[_],p.ctx[_]=g)&&(!p.skip_bound&&p.bound[_]&&p.bound[_](g),k&&we(e,_)),u}):[],p.update(),k=!0,tt(p.before_update),p.fragment=s?s(p.ctx):!1,t.target){if(t.hydrate){const _=de(t.target);p.fragment&&p.fragment.l(_),_.forEach(q)}else p.fragment&&p.fragment.c();t.intro&&T(e.$$.fragment),ct(e,t.target,t.anchor),Kt()}ht(h)}let Zt;typeof HTMLElement=="function"&&(Zt=class extends HTMLElement{constructor(t,n,s){super();R(this,"$$ctor");R(this,"$$s");R(this,"$$c");R(this,"$$cn",!1);R(this,"$$d",{});R(this,"$$r",!1);R(this,"$$p_d",{});R(this,"$$l",{});R(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const l=this.$$c.$on(t,n);this.$$l_u.set(n,l)}super.addEventListener(t,n,s)}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let r;return{c:function(){r=d("slot"),i!=="default"&&o(r,"name",i)},m:function(p,k){z(p,r,k)},d:function(p){p&&q(r)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=he(this);for(const i of this.$$s)i in s&&(n[i]=[t(i)]);for(const i of this.attributes){const r=this.$$g_p(i.name);r in this.$$d||(this.$$d[r]=yt(r,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 l=()=>{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 r=yt(i,this.$$d[i],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,r)}this.$$r=!1};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const r of this.$$l[i]){const a=this.$$c.$on(i,r);this.$$l_u.set(r,a)}this.$$l={}}}attributeChangedCallback(t,n,s){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=yt(t,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function yt(e,t,n,s){var i;const l=(i=n[e])==null?void 0:i.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(l){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(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ct(e,t,n,s,l,i){let r=class extends Zt{constructor(){super(e,n,l),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(a=>(t[a].attribute||a).toLowerCase())}};return Object.keys(t).forEach(a=>{Object.defineProperty(r.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(h){var p;h=yt(a,h,t),this.$$d[a]=h,(p=this.$$c)==null||p.$set({[a]:h})}})}),s.forEach(a=>{Object.defineProperty(r.prototype,a,{get(){var h;return(h=this.$$c)==null?void 0:h[a]}})}),e.element=r,r}class X{constructor(){R(this,"$$");R(this,"$$set")}$destroy(){at(this,1),this.$destroy=v}$on(t,n){if(!Ft(n))return v;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1)}}$set(t){this.$$set&&!ce(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ke="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ke);function xe(e){zt(e,"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 je(e){let t,n,s;return{c(){t=d("button"),t.textContent="Login",o(t,"class","login-btn svelte-1nq6lsq"),o(t,"aria-label","Log in")},m(l,i){z(l,t,i),n||(s=A(t,"click",e[2]),n=!0)},p:v,d(l){l&&q(t),n=!1,s()}}}function ye(e){let t,n,s,l,i;return{c(){t=d("button"),n=d("img"),Ht(n.src,s=ze)||o(n,"src",s),o(n,"alt","User Avatar"),o(n,"class","svelte-1nq6lsq"),o(t,"class","avatar-btn svelte-1nq6lsq"),o(t,"aria-label","Log out")},m(r,a){z(r,t,a),c(t,n),l||(i=A(t,"click",e[3]),l=!0)},p:v,d(r){r&&q(t),l=!1,i()}}}function Ce(e){let t;return{c(){t=d("button"),t.innerHTML="",o(t,"class","loading-btn svelte-1nq6lsq"),o(t,"aria-busy","true"),o(t,"aria-label","Logging in")},m(n,s){z(n,t,s)},p:v,d(n){n&&q(t)}}}function qe(e){let t;function n(i,r){return i[0]?Ce:i[1]?ye:je}let s=n(e),l=s(e);return{c(){l.c(),t=Lt()},m(i,r){l.m(i,r),z(i,t,r)},p(i,[r]){s===(s=n(i))&&l?l.p(i,r):(l.d(1),l=s(i),l&&(l.c(),l.m(t.parentNode,t)))},i:v,o:v,d(i){i&&q(t),l.d(i)}}}let ze="https://via.placeholder.com/50";function Ee(e,t,n){let s=!1,l=!1;const i=async()=>{n(0,s=!0),await new Promise(h=>setTimeout(h,2e3)),n(0,s=!1),n(1,l=!0)},r=()=>{n(1,l=!1)};return l=l,[s,l,i,r]}class Ut extends X{constructor(t){super(),Q(this,t,Ee,qe,Y,{},xe)}}customElements.define("sesamy-login",Ct(Ut,{},[],[],!0));const Le=Ut;/**
|
|
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
|
|
7
|
-
podcasts and some daily games.`,i=b(),
|
|
6
|
+
*/const Jt={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 Yt(e,t,n){const s=e.slice();return s[11]=t[n][0],s[12]=t[n][1],s}function Bt(e){let t,n=[e[12]],s={};for(let l=0;l<n.length;l+=1)s=O(s,n[l]);return{c(){t=D(e[11]),xt(t,s)},m(l,i){z(l,t,i)},p(l,i){xt(t,s=Pt(n,[i&32&&l[12]]))},d(l){l&&q(t)}}}function Qt(e){let t=e[11],n,s=e[11]&&Bt(e);return{c(){s&&s.c(),n=Lt()},m(l,i){s&&s.m(l,i),z(l,n,i)},p(l,i){l[11]?t?Y(t,l[11])?(s.d(1),s=Bt(l),t=l[11],s.c(),s.m(n.parentNode,n)):s.p(l,i):(s=Bt(l),t=l[11],s.c(),s.m(n.parentNode,n)):t&&(s.d(1),s=null,t=l[11])},d(l){l&&q(n),s&&s.d(l)}}}function Se(e){let t,n,s,l,i,r=rt(e[5]),a=[];for(let u=0;u<r.length;u+=1)a[u]=Qt(Yt(e,r,u));const h=e[10].default,p=_t(h,e,e[9],null);let k=[Jt,e[7],{width:e[2]},{height:e[2]},{stroke:e[1]},{"stroke-width":s=e[4]?Number(e[3])*24/Number(e[2]):e[3]},{class:l=e[6]("lucide-icon","lucide",e[0]?`lucide-${e[0]}`:"",e[8].class)}],_={};for(let u=0;u<k.length;u+=1)_=O(_,k[u]);return{c(){t=D("svg");for(let u=0;u<a.length;u+=1)a[u].c();n=Lt(),p&&p.c(),xt(t,_)},m(u,w){z(u,t,w);for(let g=0;g<a.length;g+=1)a[g]&&a[g].m(t,null);c(t,n),p&&p.m(t,null),i=!0},p(u,[w]){if(w&32){r=rt(u[5]);let g;for(g=0;g<r.length;g+=1){const E=Yt(u,r,g);a[g]?a[g].p(E,w):(a[g]=Qt(E),a[g].c(),a[g].m(t,n))}for(;g<a.length;g+=1)a[g].d(1);a.length=r.length}p&&p.p&&(!i||w&512)&&$t(p,h,u,u[9],i?vt(h,u[9],w,null):wt(u[9]),null),xt(t,_=Pt(k,[Jt,w&128&&u[7],(!i||w&4)&&{width:u[2]},(!i||w&4)&&{height:u[2]},(!i||w&2)&&{stroke:u[1]},(!i||w&28&&s!==(s=u[4]?Number(u[3])*24/Number(u[2]):u[3]))&&{"stroke-width":s},(!i||w&257&&l!==(l=u[6]("lucide-icon","lucide",u[0]?`lucide-${u[0]}`:"",u[8].class)))&&{class:l}]))},i(u){i||(T(p,u),i=!0)},o(u){G(p,u),i=!1},d(u){u&&q(t),Et(a,u),p&&p.d(u)}}}function Ne(e,t,n){const s=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Vt(t,s),{$$slots:i={},$$scope:r}=t,{name:a=void 0}=t,{color:h="currentColor"}=t,{size:p=24}=t,{strokeWidth:k=2}=t,{absoluteStrokeWidth:_=!1}=t,{iconNode:u=[]}=t;const w=(...g)=>g.filter((E,S,F)=>!!E&&F.indexOf(E)===S).join(" ");return e.$$set=g=>{n(8,t=O(O({},t),kt(g))),n(7,l=Vt(t,s)),"name"in g&&n(0,a=g.name),"color"in g&&n(1,h=g.color),"size"in g&&n(2,p=g.size),"strokeWidth"in g&&n(3,k=g.strokeWidth),"absoluteStrokeWidth"in g&&n(4,_=g.absoluteStrokeWidth),"iconNode"in g&&n(5,u=g.iconNode),"$$scope"in g&&n(9,r=g.$$scope)},t=kt(t),[a,h,p,k,_,u,w,l,t,r,i]}class Ae extends X{constructor(t){super(),Q(this,t,Ne,Se,Y,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Me(e){let t;const n=e[2].default,s=_t(n,e,e[3],null);return{c(){s&&s.c()},m(l,i){s&&s.m(l,i),t=!0},p(l,i){s&&s.p&&(!t||i&8)&&$t(s,n,l,l[3],t?vt(n,l[3],i,null):wt(l[3]),null)},i(l){t||(T(s,l),t=!0)},o(l){G(s,l),t=!1},d(l){s&&s.d(l)}}}function Pe(e){let t,n;const s=[{name:"circle-check"},e[1],{iconNode:e[0]}];let l={$$slots:{default:[Me]},$$scope:{ctx:e}};for(let i=0;i<s.length;i+=1)l=O(l,s[i]);return t=new Ae({props:l}),{c(){gt(t.$$.fragment)},m(i,r){ct(t,i,r),n=!0},p(i,[r]){const a=r&3?Pt(s,[s[0],r&2&&$e(i[1]),r&1&&{iconNode:i[0]}]):{};r&8&&(a.$$scope={dirty:r,ctx:i}),t.$set(a)},i(i){n||(T(t.$$.fragment,i),n=!0)},o(i){G(t.$$.fragment,i),n=!1},d(i){at(t,i)}}}function Be(e,t,n){let{$$slots:s={},$$scope:l}=t;const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return e.$$set=r=>{n(1,t=O(O({},t),kt(r))),"$$scope"in r&&n(3,l=r.$$scope)},t=kt(t),[i,t,s,l]}class Oe extends X{constructor(t){super(),Q(this,t,Be,Pe,Y,{})}}function Xt(e,t,n){const s=e.slice();return s[6]=t[n],s}function te(e,t,n){const s=e.slice();return s[9]=t[n],s}function ee(e){let t,n,s,l,i,r;return n=new Oe({props:{class:"text-green-500 mr-2",size:20}}),{c(){t=d("li"),gt(n.$$.fragment),s=b(),l=d("span"),l.textContent=`${e[9]}`,i=b(),o(t,"class","flex items-center")},m(a,h){z(a,t,h),ct(n,t,null),c(t,s),c(t,l),c(t,i),r=!0},p:v,i(a){r||(T(n.$$.fragment,a),r=!0)},o(a){G(n.$$.fragment,a),r=!1},d(a){a&&q(t),at(n)}}}function ne(e){let t,n;return{c(){t=d("img"),Ht(t.src,n="/api/placeholder/40/25")||o(t,"src",n),o(t,"alt",e[6]),o(t,"class","h-6")},m(s,l){z(s,t,l)},p:v,d(s){s&&q(t)}}}function Te(e){let t,n,s,l,i,r,a,h,p,k,_,u,w,g,E,S,F,C,x,K,Z,V,H,M,P,U,W,et,B,N,st,ft,dt,I=rt(e[1]),$=[];for(let f=0;f<I.length;f+=1)$[f]=ee(te(e,I,f));const pt=f=>G($[f],1,1,()=>{$[f]=null});let J=rt(e[2]),j=[];for(let f=0;f<J.length;f+=1)j[f]=ne(Xt(e,J,f));return st=fe(e[4][0]),{c(){t=d("div"),n=d("div"),n.textContent="Redan prenumerant? Logga in",s=b(),l=d("h1"),l.textContent="FOKUS",i=b(),r=d("h2"),r.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",a=b(),h=d("ul");for(let f=0;f<$.length;f+=1)$[f].c();p=b(),k=d("div"),_=d("label"),u=d("input"),w=b(),g=d("div"),g.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>',E=b(),S=d("div"),S.textContent="79 SEK/6 mån",F=b(),C=d("label"),x=d("input"),K=b(),Z=d("div"),Z.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>',V=b(),H=d("div"),H.textContent="995 SEK/år",M=b(),P=d("button"),P.textContent="Fortsätt",U=b(),W=d("div"),W.textContent="Säker SSL-krypterad betalning",et=b(),B=d("div");for(let f=0;f<j.length;f+=1)j[f].c();o(n,"class","text-right text-sm text-red-500 mb-4"),o(l,"class","text-4xl font-bold text-red-500 mb-4"),o(r,"class","text-xl font-semibold mb-6"),o(h,"class","space-y-2 mb-6"),o(u,"type","radio"),o(u,"name","subscription"),u.__value="sixMonths",Rt(u,u.__value),o(u,"class","mr-3"),o(S,"class","ml-auto font-semibold"),o(_,"class","flex items-center p-4 border rounded-lg"),o(x,"type","radio"),o(x,"name","subscription"),x.__value="oneYear",Rt(x,x.__value),o(x,"class","mr-3"),o(H,"class","ml-auto font-semibold"),o(C,"class","flex items-center p-4 border rounded-lg"),o(k,"class","space-y-4 mb-6"),o(P,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),o(W,"class","text-center text-sm text-gray-600 mt-4"),o(B,"class","flex justify-center space-x-2 mt-2"),o(t,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),st.p(u,x)},m(f,y){z(f,t,y),c(t,n),c(t,s),c(t,l),c(t,i),c(t,r),c(t,a),c(t,h);for(let m=0;m<$.length;m+=1)$[m]&&$[m].m(h,null);c(t,p),c(t,k),c(k,_),c(_,u),u.checked=u.__value===e[0],c(_,w),c(_,g),c(_,E),c(_,S),c(k,F),c(k,C),c(C,x),x.checked=x.__value===e[0],c(C,K),c(C,Z),c(C,V),c(C,H),c(t,M),c(t,P),c(t,U),c(t,W),c(t,et),c(t,B);for(let m=0;m<j.length;m+=1)j[m]&&j[m].m(B,null);N=!0,ft||(dt=[A(u,"change",e[3]),A(x,"change",e[5])],ft=!0)},p(f,[y]){if(y&2){I=rt(f[1]);let m;for(m=0;m<I.length;m+=1){const mt=te(f,I,m);$[m]?($[m].p(mt,y),T($[m],1)):($[m]=ee(mt),$[m].c(),T($[m],1),$[m].m(h,null))}for(_e(),m=I.length;m<$.length;m+=1)pt(m);ve()}if(y&1&&(u.checked=u.__value===f[0]),y&1&&(x.checked=x.__value===f[0]),y&4){J=rt(f[2]);let m;for(m=0;m<J.length;m+=1){const mt=Xt(f,J,m);j[m]?j[m].p(mt,y):(j[m]=ne(mt),j[m].c(),j[m].m(B,null))}for(;m<j.length;m+=1)j[m].d(1);j.length=J.length}},i(f){if(!N){for(let y=0;y<I.length;y+=1)T($[y]);N=!0}},o(f){$=$.filter(Boolean);for(let y=0;y<$.length;y+=1)G($[y]);N=!1},d(f){f&&q(t),Et($,f),Et(j,f),st.r(),ft=!1,tt(dt)}}}function Fe(e,t,n){let s="sixMonths";const l=["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"],r=[[]];function a(){s=this.__value,n(0,s)}function h(){s=this.__value,n(0,s)}return[s,l,i,a,r,h]}class se extends X{constructor(t){super(),Q(this,t,Fe,Te,Y,{})}}customElements.define("sesamy-paywall",Ct(se,{},[],[],!0));const He=se;function We(e){zt(e,"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 Ve(e){let t,n,s,l,i,r,a,h,p,k,_,u,w,g,E,S,F,C,x,K,Z,V,H,M,P,U,W,et;return{c(){t=d("div"),n=d("h1"),n.textContent="Create a free account, or log in.",s=b(),l=d("p"),l.textContent=`Gain access to limited free articles, news alerts, select newsletters,
|
|
7
|
+
podcasts and some daily games.`,i=b(),r=d("label"),r.textContent="Email Address",a=b(),h=d("input"),p=b(),k=d("button"),k.textContent="Continue",_=b(),u=d("div"),u.textContent="or",w=b(),g=d("p"),g.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>.`,
|
|
9
|
+
<a href="#privacy" class="svelte-phjzbp">Privacy Policy</a>.`,E=b(),S=d("button"),S.textContent="Continue with Google",F=b(),C=d("button"),C.textContent="Continue with Facebook",x=b(),K=d("button"),K.textContent="Continue with Apple",Z=b(),V=d("a"),V.textContent="Continue with work or school single sign-on >",H=b(),M=d("p"),M.textContent="Enjoy unlimited access to all of The Times.",P=b(),U=d("button"),U.textContent="See subscription options",o(n,"class","svelte-phjzbp"),o(l,"class","svelte-phjzbp"),o(r,"for","email"),o(h,"type","email"),o(h,"id","email"),o(h,"placeholder","Enter your email"),o(h,"class","svelte-phjzbp"),o(k,"class","svelte-phjzbp"),o(u,"class","divider svelte-phjzbp"),o(g,"class","terms svelte-phjzbp"),o(S,"class","social-button google svelte-phjzbp"),o(C,"class","social-button facebook svelte-phjzbp"),o(K,"class","social-button apple svelte-phjzbp"),o(V,"href","#"),o(V,"class","svelte-phjzbp"),o(M,"class","svelte-phjzbp"),o(U,"class","svelte-phjzbp"),o(t,"class","registration-wall svelte-phjzbp")},m(B,N){z(B,t,N),c(t,n),c(t,s),c(t,l),c(t,i),c(t,r),c(t,a),c(t,h),c(t,p),c(t,k),c(t,_),c(t,u),c(t,w),c(t,g),c(t,E),c(t,S),c(t,F),c(t,C),c(t,x),c(t,K),c(t,Z),c(t,V),c(t,H),c(t,M),c(t,P),c(t,U),W||(et=[A(k,"click",ut),A(S,"click",ut),A(C,"click",ut),A(K,"click",ut),A(V,"click",ut),A(U,"click",ut)],W=!0)},p:v,i:v,o:v,d(B){B&&q(t),W=!1,tt(et)}}}function ut(){console.log("Button clicked")}class le extends X{constructor(t){super(),Q(this,t,null,Ve,Y,{},We)}}customElements.define("sesamy-hello",Ct(le,{},[],[],!0));const Ie=le;function Re(e){let t,n;return{c(){t=D("svg"),n=D("path"),o(n,"d","M20.4 7.8c-.8.5-1.4 1.1-1.8 1.9-.4.8-.7 1.6-.7 2.5 0 1 .3 2 .9 2.8.6.8 1.3 1.5 2.3 1.9-.4 1.2-.9 2.3-1.6 3.3-1 1.4-2 2.8-3.6 2.8s-2-.9-3.8-.9c-1.8 0-2.4.9-3.9.9s-2.5-1.3-3.6-2.9c-1.5-2.3-2.4-4.9-2.4-7.6C2 8 4.9 5.6 7.9 5.6c1.5 0 2.8 1 3.8 1 .9 0 2.4-1.1 4.1-1.1.9 0 1.8.2 2.6.6.8.4 1.5 1 2 1.7zm-5.5-4.1c.8-.9 1.2-2 1.2-3.2V0c-1.3.1-2.6.8-3.4 1.7-.8.9-1.2 2-1.3 3.1v.4h.3c.6 0 1.2-.2 1.8-.5.6-.2 1-.6 1.4-1z"),o(n,"fill","#000"),o(t,"xmlns","http://www.w3.org/2000/svg"),o(t,"width",e[0]),o(t,"height",e[1]),o(t,"viewBox","0 0 22.773 28.025")},m(s,l){z(s,t,l),c(t,n)},p(s,[l]){l&1&&o(t,"width",s[0]),l&2&&o(t,"height",s[1])},i:v,o:v,d(s){s&&q(t)}}}function De(e,t,n){let{width:s="18"}=t,{height:l="18"}=t;return e.$$set=i=>{"width"in i&&n(0,s=i.width),"height"in i&&n(1,l=i.height)},[s,l]}class Ge extends X{constructor(t){super(),Q(this,t,De,Re,Y,{width:0,height:1})}}function Ke(e){let t,n;return{c(){t=D("svg"),n=D("path"),o(n,"d","M12.8 9h-2.5v9H6.6V9H4.9V5.8h1.8v-2C6.6 2.3 7.3 0 10.4 0h2.8v3.1h-2c-.3 0-.8.2-.8.9v1.9h2.8L12.8 9z"),o(n,"fill","#1877F2"),o(t,"xmlns","http://www.w3.org/2000/svg"),o(t,"width",e[0]),o(t,"height",e[1]),o(t,"viewBox","0 0 18 18")},m(s,l){z(s,t,l),c(t,n)},p(s,[l]){l&1&&o(t,"width",s[0]),l&2&&o(t,"height",s[1])},i:v,o:v,d(s){s&&q(t)}}}function Ze(e,t,n){let{width:s="18"}=t,{height:l="18"}=t;return e.$$set=i=>{"width"in i&&n(0,s=i.width),"height"in i&&n(1,l=i.height)},[s,l]}class Ue extends X{constructor(t){super(),Q(this,t,Ze,Ke,Y,{width:0,height:1})}}function Je(e){let t,n,s,l,i;return{c(){t=D("svg"),n=D("path"),s=D("path"),l=D("path"),i=D("path"),o(n,"d","M44.1035 23.0123C44.1054 21.4791 43.9758 19.9486 43.716 18.4375H22.498V27.1028H34.6507C34.4021 28.4868 33.8757 29.8061 33.1034 30.9812C32.3311 32.1562 31.3289 33.1628 30.1571 33.9401V39.5649H37.41C41.6567 35.6494 44.1035 29.859 44.1035 23.0123Z"),o(n,"fill","#4285F4"),o(s,"d","M22.4982 44.9997C28.5698 44.9997 33.6821 43.0061 37.4101 39.5687L30.1573 33.9439C28.1386 35.3126 25.5387 36.0938 22.4982 36.0938C16.6296 36.0938 11.6485 32.1377 9.86736 26.8066H2.39575V32.6033C4.26839 36.3297 7.13989 39.4622 10.6896 41.6512C14.2394 43.8402 18.3277 44.9995 22.4982 44.9997Z"),o(s,"fill","#34A853"),o(l,"d","M9.86737 26.8073C8.92572 24.0138 8.92572 20.9886 9.86737 18.1951V12.3984H2.39576C0.820432 15.5332 0 18.9929 0 22.5012C0 26.0095 0.820432 29.4692 2.39576 32.604L9.86737 26.8073Z"),o(l,"fill","#FBBC04"),o(i,"d","M22.4982 8.90741C25.7068 8.85499 28.8071 10.0673 31.1291 12.2823L37.5507 5.86064C33.4788 2.03602 28.0843 -0.0637686 22.4982 0.00147616C18.3277 0.00166623 14.2394 1.16098 10.6896 3.34999C7.13989 5.539 4.26839 8.67155 2.39575 12.3979L9.86736 18.1946C11.6485 12.8635 16.6296 8.90741 22.4982 8.90741Z"),o(i,"fill","#EA4335"),o(t,"width",e[0]),o(t,"height",e[1]),o(t,"viewBox","0 0 45 45"),o(t,"xmlns","http://www.w3.org/2000/svg")},m(r,a){z(r,t,a),c(t,n),c(t,s),c(t,l),c(t,i)},p(r,[a]){a&1&&o(t,"width",r[0]),a&2&&o(t,"height",r[1])},i:v,o:v,d(r){r&&q(t)}}}function Ye(e,t,n){let{width:s="18"}=t,{height:l="18"}=t;return e.$$set=i=>{"width"in i&&n(0,s=i.width),"height"in i&&n(1,l=i.height)},[s,l]}class Qe extends X{constructor(t){super(),Q(this,t,Ye,Je,Y,{width:0,height:1})}}function Xe(e){zt(e,"svelte-592fsj",'.registration-wall.svelte-592fsj{font-family:Arial, sans-serif;max-width:500px;margin:0 auto;padding:20px;text-align:center;background-color:rgb(248, 248, 245);border:solid 1px #e9e9da;border-radius:8px}h1.svelte-592fsj{font-size:24px;margin-bottom:10px}p.svelte-592fsj{font-size:14px;margin-bottom:20px;color:#555}.form-container.svelte-592fsj{width:100%}input.svelte-592fsj{width:100%;padding:10px;margin-bottom:10px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box}.continue-button.svelte-592fsj{width:100%;padding:10px;background-color:#4285f4;color:#fff;border:none;border-radius:4px;cursor:pointer;margin-bottom:10px;font-size:14px}.divider.svelte-592fsj{margin:15px 0;text-align:center;position:relative;color:#777}.divider.svelte-592fsj::before,.divider.svelte-592fsj::after{content:"";position:absolute;top:50%;width:45%;height:1px;background-color:#ccc}.divider.svelte-592fsj::before{left:0}.divider.svelte-592fsj::after{right:0}.social-button.svelte-592fsj{width:100%;padding:10px;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;cursor:pointer;margin-bottom:10px;font-size:14px;display:flex;justify-content:center}.button-content.svelte-592fsj{display:flex;align-items:center;justify-content:center}.button-content.svelte-592fsj svg{margin-right:8px}.terms.svelte-592fsj{font-size:12px;margin-top:20px;color:#777}a.svelte-592fsj{color:#4285f4;text-decoration:none}')}const tn=e=>({}),ie=e=>({}),en=e=>({}),oe=e=>({});function nn(e){let t;return{c(){t=d("h1"),t.textContent="Skapa ett gratis konto eller logga in",o(t,"class","svelte-592fsj")},m(n,s){z(n,t,s)},p:v,d(n){n&&q(t)}}}function sn(e){let t;return{c(){t=d("p"),t.textContent="Få tillgång till gratis artiklar och nyhetsbrev.",o(t,"class","svelte-592fsj")},m(n,s){z(n,t,s)},p:v,d(n){n&&q(t)}}}function ln(e){let t,n,s,l,i,r,a,h,p,k,_,u,w,g,E,S,F,C,x,K,Z,V,H,M,P,U,W,et,B,N,st,ft;const dt=e[1].title,I=_t(dt,e,e[0],oe),$=I||nn(),pt=e[1].description,J=_t(pt,e,e[0],ie),j=J||sn();return w=new Qe({props:{width:"18",height:"18"}}),x=new Ue({props:{width:"18",height:"18"}}),P=new Ge({props:{width:"18",height:"18"}}),{c(){t=d("div"),$&&$.c(),n=b(),j&&j.c(),s=b(),l=d("div"),i=d("input"),r=b(),a=d("button"),a.textContent="Fortsätt",h=b(),p=d("div"),p.textContent="eller",k=b(),_=d("button"),u=d("span"),gt(w.$$.fragment),g=b(),E=d("span"),E.textContent="Fortsätt med Google",S=b(),F=d("button"),C=d("span"),gt(x.$$.fragment),K=b(),Z=d("span"),Z.textContent="Fortsätt med Facebook",V=b(),H=d("button"),M=d("span"),gt(P.$$.fragment),U=b(),W=d("span"),W.textContent="Fortsätt med Apple",et=b(),B=d("p"),B.innerHTML='Genom att logga in godkänner du våra <a href="#terms" class="svelte-592fsj">Vilkor</a>',o(i,"type","email"),o(i,"id","email"),o(i,"placeholder","Skriv in din epost"),o(i,"class","svelte-592fsj"),o(a,"part","continueButton"),o(a,"class","continue-button svelte-592fsj"),o(p,"class","divider svelte-592fsj"),o(E,"class","button-text"),o(u,"class","button-content svelte-592fsj"),o(_,"class","social-button google svelte-592fsj"),o(Z,"class","button-text"),o(C,"class","button-content svelte-592fsj"),o(F,"class","social-button facebook svelte-592fsj"),o(W,"class","button-text"),o(M,"class","button-content svelte-592fsj"),o(H,"class","social-button apple svelte-592fsj"),o(l,"class","form-container svelte-592fsj"),o(B,"class","terms svelte-592fsj"),o(t,"class","registration-wall svelte-592fsj")},m(f,y){z(f,t,y),$&&$.m(t,null),c(t,n),j&&j.m(t,null),c(t,s),c(t,l),c(l,i),c(l,r),c(l,a),c(l,h),c(l,p),c(l,k),c(l,_),c(_,u),ct(w,u,null),c(u,g),c(u,E),c(l,S),c(l,F),c(F,C),ct(x,C,null),c(C,K),c(C,Z),c(l,V),c(l,H),c(H,M),ct(P,M,null),c(M,U),c(M,W),c(t,et),c(t,B),N=!0,st||(ft=[A(a,"click",qt),A(_,"click",qt),A(F,"click",qt),A(H,"click",qt)],st=!0)},p(f,[y]){I&&I.p&&(!N||y&1)&&$t(I,dt,f,f[0],N?vt(dt,f[0],y,en):wt(f[0]),oe),J&&J.p&&(!N||y&1)&&$t(J,pt,f,f[0],N?vt(pt,f[0],y,tn):wt(f[0]),ie)},i(f){N||(T($,f),T(j,f),T(w.$$.fragment,f),T(x.$$.fragment,f),T(P.$$.fragment,f),N=!0)},o(f){G($,f),G(j,f),G(w.$$.fragment,f),G(x.$$.fragment,f),G(P.$$.fragment,f),N=!1},d(f){f&&q(t),$&&$.d(f),j&&j.d(f),at(w),at(x),at(P),st=!1,tt(ft)}}}function qt(){console.log("Button clicked")}function on(e,t,n){let{$$slots:s={},$$scope:l}=t;return e.$$set=i=>{"$$scope"in i&&n(0,l=i.$$scope)},[l,s]}class re extends X{constructor(t){super(),Q(this,t,on,ln,Y,{},Xe)}}customElements.define("sesamy-registration-wall",Ct(re,{},["title","description"],[],!0));const rn=re;L.Hello=Ie,L.Login=Le,L.Paywall=He,L.RegistrationWall=rn,Object.defineProperty(L,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.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/lib/sesamy-components.es.js",
|
|
7
7
|
"main": "dist/lib/sesamy-components.umd.js",
|